Skip to content

Commit

Permalink
refactor: remove .ce.vue files
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgoud committed Oct 10, 2023
1 parent 33c1247 commit ef3d5d0
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 349 deletions.
3 changes: 1 addition & 2 deletions packages/components/button-group/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { defineCustomElement } from 'vue'
import { withInstall } from '@puik/utils'

import ButtonGroup from './src/button-group.vue'
import ButtonGroupCe from './src/button-group.ce.vue'

export const PuikButtonGroup = withInstall(ButtonGroup)
export const PuikButtonGroupCe = defineCustomElement(withInstall(ButtonGroupCe))
export const PuikButtonGroupCe = defineCustomElement(PuikButtonGroup)

if (!customElements.get('puik-button-group-ce')) {
customElements.define('puik-button-group-ce', PuikButtonGroupCe)
Expand Down
25 changes: 0 additions & 25 deletions packages/components/button-group/src/button-group.ce.vue

This file was deleted.

3 changes: 1 addition & 2 deletions packages/components/button/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { defineCustomElement } from 'vue'
import { withInstall } from '@puik/utils'

import Button from './src/button.vue'
import ButtonCe from './src/button.ce.vue'

export const PuikButton = withInstall(Button)
export const PuikButtonCe = defineCustomElement(withInstall(ButtonCe))
export const PuikButtonCe = defineCustomElement(PuikButton)

if (!customElements.get('puik-button-ce')) {
customElements.define('puik-button-ce', PuikButtonCe)
Expand Down
66 changes: 0 additions & 66 deletions packages/components/button/src/button.ce.vue

This file was deleted.

3 changes: 1 addition & 2 deletions packages/components/icon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { defineCustomElement } from 'vue'
import { withInstall } from '@puik/utils'

import Icon from './src/icon.vue'
import IconCe from './src/icon.ce.vue'

export const PuikIcon = withInstall(Icon)
export const PuikIconCe = defineCustomElement(withInstall(IconCe))
export const PuikIconCe = defineCustomElement(PuikIcon)

if (!customElements.get('puik-icon-ce')) {
customElements.define('puik-icon-ce', PuikIconCe)
Expand Down
38 changes: 0 additions & 38 deletions packages/components/icon/src/icon.ce.vue

This file was deleted.

3 changes: 1 addition & 2 deletions packages/components/input/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { defineCustomElement } from 'vue'
import { withInstall } from '@puik/utils'

import Input from './src/input.vue'
import InputCe from './src/input.ce.vue'

export const PuikInput = withInstall(Input)
export const PuikInputCe = defineCustomElement(withInstall(InputCe))
export const PuikInputCe = defineCustomElement(PuikInput)

if (!customElements.get('puik-input-ce')) {
customElements.define('puik-input-ce', PuikInputCe)
Expand Down
111 changes: 0 additions & 111 deletions packages/components/input/src/input.ce.vue

This file was deleted.

16 changes: 10 additions & 6 deletions packages/components/input/src/input.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="puik-input">
<div class="puik-input__wrapper" :class="inputClasses">
<div v-if="$slots.prepend" class="puik-input__prepend">
<div v-if="$slots.prepend || hasSlotPrepend" class="puik-input__prepend">
<slot name="prepend"></slot>
</div>
<input
Expand All @@ -26,7 +26,10 @@
@click="togglePasswordVisibility"
>{{ passwordIsVisible ? 'visibility' : 'visibility_off' }}</span
>
<div v-else-if="$slots.append" class="puik-input__append">
<div
v-else-if="$slots.append || hasSlotAppend"
class="puik-input__append"
>
<slot name="append"></slot>
</div>
<puik-input-controls
Expand All @@ -36,13 +39,14 @@
@decrease="decrease"
></puik-input-controls>
</div>
<div v-if="$slots.hint || hasError" class="puik-input__hint">
<div v-if="$slots.hint || hasSlotHint || hasError" class="puik-input__hint">
<span
v-show="!hideHint"
v-if="$slots.hint && !hasError"
v-if="($slots.hint || hasSlotHint) && !hasError"
class="puik-input__hint__text"
><slot name="hint"></slot
></span>
>
<slot name="hint"></slot>
</span>
<div v-if="hasError" class="puik-input__hint__error">
<puik-icon
icon="error"
Expand Down
3 changes: 1 addition & 2 deletions packages/components/tooltip/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { defineCustomElement } from 'vue'
import { withInstall } from '@puik/utils'

import Tooltip from './src/tooltip.vue'
import TooltipCe from './src/tooltip.ce.vue'

export const PuikTooltip = withInstall(Tooltip)
export const PuikTooltipCe = defineCustomElement(withInstall(TooltipCe))
export const PuikTooltipCe = defineCustomElement(PuikTooltip)

if (!customElements.get('puik-tooltip-ce')) {
customElements.define('puik-tooltip-ce', PuikTooltipCe)
Expand Down
Loading

0 comments on commit ef3d5d0

Please sign in to comment.