daisy-ui-kit 3.0.11 → 5.0.0-pre.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/README.md +62 -14
  2. package/package.json +45 -64
  3. package/components/Accordion.vue +0 -29
  4. package/components/Alert.vue +0 -25
  5. package/components/Artboard.vue +0 -33
  6. package/components/Avatar.vue +0 -70
  7. package/components/AvatarGroup.vue +0 -19
  8. package/components/Badge.vue +0 -50
  9. package/components/BottomNav.vue +0 -25
  10. package/components/Breadcrumbs.vue +0 -7
  11. package/components/Button.vue +0 -111
  12. package/components/Card.vue +0 -30
  13. package/components/CardActions.vue +0 -16
  14. package/components/CardBody.vue +0 -16
  15. package/components/CardTitle.vue +0 -16
  16. package/components/Carousel.vue +0 -25
  17. package/components/CarouselItem.vue +0 -5
  18. package/components/Chat.vue +0 -27
  19. package/components/ChatBubble.vue +0 -34
  20. package/components/ChatFooter.vue +0 -5
  21. package/components/ChatHeader.vue +0 -5
  22. package/components/ChatImage.vue +0 -5
  23. package/components/Checkbox.vue +0 -55
  24. package/components/Code.vue +0 -92
  25. package/components/Collapse.vue +0 -54
  26. package/components/CollapseContent.vue +0 -5
  27. package/components/CollapseTitle.vue +0 -5
  28. package/components/Countdown.vue +0 -15
  29. package/components/CountdownTimers.vue +0 -70
  30. package/components/Counter.vue +0 -14
  31. package/components/Crumb.vue +0 -5
  32. package/components/Divider.vue +0 -24
  33. package/components/Drawer.vue +0 -45
  34. package/components/DrawerContent.vue +0 -17
  35. package/components/DrawerSide.vue +0 -18
  36. package/components/Dropdown.vue +0 -95
  37. package/components/DropdownButton.vue +0 -16
  38. package/components/DropdownContent.vue +0 -56
  39. package/components/DropdownTarget.vue +0 -14
  40. package/components/FileInput.vue +0 -59
  41. package/components/Flex.vue +0 -59
  42. package/components/FlexItem.vue +0 -59
  43. package/components/Footer.vue +0 -24
  44. package/components/FooterTitle.vue +0 -15
  45. package/components/FormControl.vue +0 -5
  46. package/components/Hero.vue +0 -15
  47. package/components/HeroContent.vue +0 -15
  48. package/components/HeroOverlay.vue +0 -5
  49. package/components/Indicator.vue +0 -13
  50. package/components/IndicatorItem.vue +0 -36
  51. package/components/Join.vue +0 -5
  52. package/components/Kbd.vue +0 -25
  53. package/components/Label.vue +0 -15
  54. package/components/LabelText.vue +0 -15
  55. package/components/LabelTextAlt.vue +0 -15
  56. package/components/Link.vue +0 -40
  57. package/components/LoadingBall.vue +0 -43
  58. package/components/LoadingBars.vue +0 -43
  59. package/components/LoadingDots.vue +0 -43
  60. package/components/LoadingInfinity.vue +0 -43
  61. package/components/LoadingRing.vue +0 -43
  62. package/components/LoadingSpinner.vue +0 -43
  63. package/components/Mask.config.ts +0 -77
  64. package/components/Mask.vue +0 -14
  65. package/components/Menu.vue +0 -35
  66. package/components/MenuExpand.vue +0 -78
  67. package/components/MenuExpandToggle.vue +0 -13
  68. package/components/MenuItem.vue +0 -38
  69. package/components/MenuTitle.vue +0 -5
  70. package/components/MockupBrowser.vue +0 -5
  71. package/components/MockupBrowserToolbar.vue +0 -5
  72. package/components/MockupCode.vue +0 -4
  73. package/components/MockupPhone.vue +0 -8
  74. package/components/MockupWindow.vue +0 -5
  75. package/components/Modal.vue +0 -48
  76. package/components/ModalAction.vue +0 -5
  77. package/components/ModalBox.vue +0 -5
  78. package/components/NavButton.vue +0 -20
  79. package/components/Navbar.vue +0 -14
  80. package/components/NavbarCenter.vue +0 -13
  81. package/components/NavbarEnd.vue +0 -13
  82. package/components/NavbarStart.vue +0 -13
  83. package/components/Progress.vue +0 -42
  84. package/components/Prose.vue +0 -32
  85. package/components/RadialProgress.vue +0 -41
  86. package/components/Radio.vue +0 -76
  87. package/components/RadioGroup.vue +0 -46
  88. package/components/Range.vue +0 -60
  89. package/components/RangeMeasure.vue +0 -83
  90. package/components/RangeMeasureTick.vue +0 -74
  91. package/components/Rating.vue +0 -167
  92. package/components/Select.vue +0 -100
  93. package/components/Stack.vue +0 -13
  94. package/components/Stat.vue +0 -5
  95. package/components/StatActions.vue +0 -5
  96. package/components/StatDesc.vue +0 -5
  97. package/components/StatFigure.vue +0 -5
  98. package/components/StatTitle.vue +0 -5
  99. package/components/StatValue.vue +0 -5
  100. package/components/Stats.vue +0 -5
  101. package/components/Step.vue +0 -36
  102. package/components/Steps.vue +0 -21
  103. package/components/Swap.vue +0 -58
  104. package/components/Tab.vue +0 -48
  105. package/components/TabContent.vue +0 -29
  106. package/components/Tabs.vue +0 -77
  107. package/components/TabsManager.vue +0 -38
  108. package/components/Text.vue +0 -142
  109. package/components/TextArea.vue +0 -64
  110. package/components/TextInput.vue +0 -66
  111. package/components/Toast.vue +0 -31
  112. package/components/Toggle.vue +0 -59
  113. package/components/Tooltip.vue +0 -47
  114. package/index.ts +0 -108
  115. package/nuxt.js +0 -22
  116. package/utils/-utils.ts +0 -41
  117. package/utils/Button.config.ts +0 -26
  118. package/utils/drawer-utils.ts +0 -32
  119. package/utils/fixtures.ts +0 -62
  120. package/utils/random-string.ts +0 -19
  121. package/utils/types.ts +0 -7
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="stat-value">
3
- <slot />
4
- </div>
5
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="stats">
3
- <slot />
4
- </div>
5
- </template>
@@ -1,36 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = defineProps<{
5
- glyph?: string
6
-
7
- color?: string
8
- neutral?: boolean
9
- primary?: boolean
10
- secondary?: boolean
11
- accent?: boolean
12
- info?: boolean
13
- success?: boolean
14
- warning?: boolean
15
- error?: boolean
16
- }>()
17
-
18
- const classes = computed(() => {
19
- return {
20
- 'step-neutral': props.neutral || props.color === 'neutral',
21
- 'step-primary': props.primary || props.color === 'primary',
22
- 'step-secondary': props.secondary || props.color === 'secondary',
23
- 'step-accent': props.accent || props.color === 'accent',
24
- 'step-info': props.info || props.color === 'info',
25
- 'step-success': props.success || props.color === 'success',
26
- 'step-warning': props.warning || props.color === 'warning',
27
- 'step-error': props.error || props.color === 'error',
28
- }
29
- })
30
- </script>
31
-
32
- <template>
33
- <li class="step" :class="classes" :data-content="glyph">
34
- <slot />
35
- </li>
36
- </template>
@@ -1,21 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = defineProps<{
5
- vertical?: boolean
6
- horizontal?: boolean
7
- }>()
8
-
9
- const classes = computed(() => {
10
- return {
11
- 'steps-vertical': props.vertical,
12
- 'steps-horizontal': props.horizontal,
13
- }
14
- })
15
- </script>
16
-
17
- <template>
18
- <ul class="steps" :class="classes">
19
- <slot />
20
- </ul>
21
- </template>
@@ -1,58 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, nextTick, ref, watch } from 'vue'
3
-
4
- const props = defineProps<{
5
- modelValue?: boolean | null
6
- indeterminate?: boolean
7
- rotate?: boolean
8
- flip?: boolean
9
- }>()
10
- const emit = defineEmits(['update:modelValue'])
11
- const classes = computed(() => {
12
- return {
13
- 'swap-rotate': props.rotate,
14
- 'swap-flip': props.flip,
15
- }
16
- })
17
-
18
- const checkbox = ref(null)
19
-
20
- // Allow internal or external control
21
- const isChecked = ref<any>(props.modelValue)
22
- watch(isChecked, val => emit('update:modelValue', val))
23
- watch(
24
- () => props.modelValue,
25
- (val) => {
26
- if (isChecked.value !== val)
27
- isChecked.value = val
28
- },
29
- )
30
-
31
- // When the indeterminate prop updates, manually update the checkbox element.
32
- watch(
33
- () => [props.indeterminate, checkbox.value],
34
- ([val]) => {
35
- nextTick(() => {
36
- if (checkbox.value != null)
37
- (checkbox.value as any).indeterminate = val
38
- isChecked.value = null
39
- })
40
- },
41
- { immediate: true },
42
- )
43
- </script>
44
-
45
- <template>
46
- <label class="swap" :class="classes">
47
- <input ref="checkbox" v-model="isChecked" type="checkbox">
48
- <div class="swap-off">
49
- <slot />
50
- </div>
51
- <div class="swap-on">
52
- <slot name="swap" />
53
- </div>
54
- <div v-if="indeterminate" class="swap-indeterminate">
55
- <slot name="indeterminate" />
56
- </div>
57
- </label>
58
- </template>
@@ -1,48 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, inject } from 'vue'
3
-
4
- const props = withDefaults(defineProps<{
5
- is?: string | Object | Function
6
- name?: string
7
- active?: boolean
8
-
9
- variant?: 'bordered' | 'lifted'
10
- bordered?: boolean
11
- lifted?: boolean
12
-
13
- size?: 'lg' | 'md' | 'sm' | 'xs'
14
- lg?: boolean
15
- md?: boolean
16
- sm?: boolean
17
- xs?: boolean
18
- }>(), {
19
- is: 'a',
20
- })
21
-
22
- const manager: any = inject('tabManager')
23
-
24
- const classes = computed(() => {
25
- return {
26
- 'tab-active': props.active || manager.currentTab === props.name,
27
-
28
- 'tab-lg': props.size === 'lg' || props.lg,
29
- 'tab-md': props.size === 'md' || props.md,
30
- 'tab-sm': props.size === 'sm' || props.sm,
31
- 'tab-xs': props.size === 'xs' || props.xs,
32
-
33
- 'tab-bordered': props.variant === 'bordered' || props.bordered,
34
- 'tab-lifted': props.variant === 'lifted' || props.lifted,
35
- }
36
- })
37
- </script>
38
-
39
- <template>
40
- <component
41
- :is="is" class="tab" :class="classes" tabindex="0"
42
- @click="() => (manager.currentTab = name)"
43
- @keypress.enter="() => (manager.currentTab = name)"
44
- >
45
- <slot v-if="$slots.default" />
46
- <span v-else>{{ name }}</span>
47
- </component>
48
- </template>
@@ -1,29 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, inject } from 'vue'
3
-
4
- const props = withDefaults(defineProps<{
5
- is?: any
6
- name: string
7
- }>(), {
8
- is: 'div',
9
- })
10
-
11
- const tabManager: any = inject('tabManager')
12
-
13
- const isCurrentTab = computed(() => {
14
- return tabManager.currentTab === props.name
15
- })
16
-
17
- if (!tabManager.currentTab)
18
- tabManager.currentTab = props.name
19
-
20
- const existing = tabManager.tabs.find(t => t === props.name)
21
- if (!existing)
22
- tabManager.tabs.push(props.name)
23
- </script>
24
-
25
- <template>
26
- <component :is="is" v-show="isCurrentTab" class="tab-content">
27
- <slot />
28
- </component>
29
- </template>
@@ -1,77 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, inject } from 'vue'
3
- import Tab from './Tab.vue'
4
-
5
- const props = withDefaults(defineProps<{
6
- is?: string | Object | Function
7
- tabs?: string[]
8
-
9
- variant?: 'bordered' | 'lifted' | 'boxed' | 'inline-boxed'
10
- bordered?: boolean
11
- lifted?: boolean
12
- boxed?: boolean
13
- inlineBoxed?: boolean
14
-
15
- size?: 'lg' | 'md' | 'sm' | 'xs'
16
- lg?: boolean
17
- md?: boolean
18
- sm?: boolean
19
- xs?: boolean
20
- }>(), {
21
- is: 'a',
22
- tabs: [] as any,
23
- })
24
-
25
- const tabManager: any = inject('tabManager')
26
-
27
- const _variant = computed(() => {
28
- if (props.bordered || props.variant === 'bordered')
29
- return 'bordered'
30
- if (props.lifted || props.variant === 'lifted')
31
- return 'lifted'
32
- return undefined
33
- })
34
- const _size = computed(() => {
35
- if (props.size)
36
- return props.size
37
- if (props.lg)
38
- return 'lg'
39
- if (props.md)
40
- return 'md'
41
- if (props.sm)
42
- return 'sm'
43
- if (props.xs)
44
- return 'xs'
45
- return 'md'
46
- })
47
-
48
- const classes = computed(() => {
49
- return {
50
- 'tabs-boxed':
51
- props.variant === 'boxed'
52
- || props.variant === 'inline-boxed'
53
- || props.boxed
54
- || props.inlineBoxed,
55
- 'inline-block': props.variant === 'inline-boxed' || props.inlineBoxed,
56
- }
57
- })
58
- </script>
59
-
60
- <template>
61
- <div class="tabs" :class="classes">
62
- <slot v-if="$slots.default" />
63
- <template v-for="tabName in tabs" v-else :key="tabName">
64
- <Tab
65
- :is="is"
66
- :name="tabName"
67
- :variant="_variant"
68
- :size="_size"
69
- :active="tabManager.currentTab === tabName"
70
- @click="() => (tabManager.currentTab = tabName)"
71
- >
72
- {{ tabName }}
73
- </Tab>
74
- </template>
75
- <div v-if="variant === 'lifted' || lifted" class="flex-1 cursor-default tab tab-lifted" />
76
- </div>
77
- </template>
@@ -1,38 +0,0 @@
1
- <script setup lang="ts">
2
- import { provide, reactive, watch } from 'vue'
3
-
4
- const props = defineProps<{
5
- tab?: string
6
- }>()
7
- const emit = defineEmits(['update:tab'])
8
-
9
- const manager = reactive({
10
- currentTab: props.tab,
11
- tabs: [],
12
- })
13
- provide('tabManager', manager)
14
-
15
- // If the tab changes from outside, update the internal value.
16
- watch(
17
- () => props.tab,
18
- (val) => {
19
- if (val !== manager.currentTab)
20
- manager.currentTab = val
21
- },
22
- )
23
-
24
- // If the internal tab value changes, update the tab
25
- watch(
26
- () => manager.currentTab,
27
- (val) => {
28
- if (val !== props.tab)
29
- emit('update:tab', val)
30
- },
31
- )
32
- </script>
33
-
34
- <template>
35
- <div class="tabs-manager">
36
- <slot />
37
- </div>
38
- </template>
@@ -1,142 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = defineProps<{
5
- is?: string
6
- join?: boolean
7
-
8
- block?: boolean
9
- inline?: boolean
10
- inlineBlock?: boolean
11
-
12
- color?: | 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'primary-content' | 'secondary-content' | 'neutral-content' | 'accent-content' | 'info-content' | 'success-content' | 'warning-content' | 'error-content'
13
- neutral?: boolean
14
- primary?: boolean
15
- secondary?: boolean
16
- accent?: boolean
17
- info?: boolean
18
- success?: boolean
19
- warning?: boolean
20
- error?: boolean
21
- neutralContent?: boolean
22
- primaryContent?: boolean
23
- secondaryContent?: boolean
24
- accentContent?: boolean
25
- infoContent?: boolean
26
- successContent?: boolean
27
- warningContent?: boolean
28
- errorContent?: boolean
29
-
30
- size?: | '9xl' | '8xl' | '7xl' | '6xl' | '5xl' | '4xl' | '3xl' | '2xl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs'
31
- xl?: boolean
32
- lg?: boolean
33
- md?: boolean
34
- sm?: boolean
35
- xs?: boolean
36
-
37
- align?: 'left' | 'center' | 'right' | 'justify'
38
- left?: boolean
39
- center?: boolean
40
- right?: boolean
41
- justify?: boolean
42
-
43
- case?: 'upper' | 'lower' | 'capitalize' | 'normal'
44
- uppercase?: boolean
45
- lowercase?: boolean
46
- capitalize?: boolean
47
- normalCase?: boolean
48
-
49
- font?: 'sans' | 'serif' | 'mono'
50
- sans?: boolean
51
- serif?: boolean
52
- mono?: boolean
53
-
54
- weight?: | 'thin' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black'
55
- thin?: boolean
56
- extralight?: boolean
57
- light?: boolean
58
- normal?: boolean
59
- medium?: boolean
60
- semibold?: boolean
61
- bold?: boolean
62
- extrabold?: boolean
63
- black?: boolean
64
- }>()
65
-
66
- const classes = computed(() => {
67
- return {
68
- 'join-item': props.join,
69
-
70
- 'block': props.block,
71
- 'inline': props.inline,
72
- 'inline-block': props.inlineBlock,
73
-
74
- 'text-primary': props.primary || props.color === 'primary',
75
- 'text-primary-content':
76
- props.primaryContent || props.color === 'primary-content',
77
- 'text-secondary': props.secondary || props.color === 'secondary',
78
- 'text-secondary-content':
79
- props.secondaryContent || props.color === 'secondary-content',
80
- 'text-neutral': props.neutral || props.color === 'neutral',
81
- 'text-neutral-content':
82
- props.neutralContent || props.color === 'neutral-content',
83
- 'text-accent': props.accent || props.color === 'accent',
84
- 'text-accent-content':
85
- props.accentContent || props.color === 'accent-content',
86
- 'text-info': props.info || props.color === 'info',
87
- 'text-info-content': props.infoContent || props.color === 'info-content',
88
- 'text-success': props.success || props.color === 'success',
89
- 'text-success-content':
90
- props.successContent || props.color === 'success-content',
91
- 'text-warning': props.warning || props.color === 'warning',
92
- 'text-warning-content':
93
- props.warningContent || props.color === 'warning-content',
94
- 'text-error': props.error || props.color === 'error',
95
- 'text-error-content': props.errorContent || props.color === 'error-content',
96
-
97
- 'text-9xl': props.size === '9xl',
98
- 'text-8xl': props.size === '8xl',
99
- 'text-7xl': props.size === '7xl',
100
- 'text-6xl': props.size === '6xl',
101
- 'text-5xl': props.size === '5xl',
102
- 'text-4xl': props.size === '4xl',
103
- 'text-3xl': props.size === '3xl',
104
- 'text-2xl': props.size === '2xl',
105
- 'text-xl': props.xl || props.size === 'xl',
106
- 'text-lg': props.lg || props.size === 'lg',
107
- 'text-md': props.md || props.size === 'md',
108
- 'text-sm': props.sm || props.size === 'sm',
109
- 'text-xs': props.xs || props.size === 'xs',
110
-
111
- 'text-left': props.left || props.align === 'left',
112
- 'text-center': props.center || props.align === 'center',
113
- 'text-right': props.right || props.align === 'right',
114
- 'text-justify': props.justify || props.align === 'justify',
115
-
116
- 'uppercase': props.uppercase || props.case === 'upper',
117
- 'lowercase': props.lowercase || props.case === 'lower',
118
- 'capitalize': props.capitalize || props.case === 'capitalize',
119
- 'normal-case': props.normalCase || props.case === 'normal',
120
-
121
- 'font-sans': props.sans || props.font === 'sans',
122
- 'font-serif': props.serif || props.font === 'serif',
123
- 'font-mono': props.mono || props.font === 'mono',
124
-
125
- 'font-thin': props.thin || props.weight === 'thin',
126
- 'font-extralight': props.extralight || props.weight === 'extralight',
127
- 'font-light': props.light || props.weight === 'light',
128
- 'font-normal': props.normal || props.weight === 'normal',
129
- 'font-medium': props.medium || props.weight === 'medium',
130
- 'font-semibold': props.semibold || props.weight === 'semibold',
131
- 'font-bold': props.bold || props.weight === 'bold',
132
- 'font-extrabold': props.extrabold || props.weight === 'extrabold',
133
- 'font-black': props.black || props.weight === 'black',
134
- }
135
- })
136
- </script>
137
-
138
- <template>
139
- <component :is="is || 'span'" :class="[classes]">
140
- <slot />
141
- </component>
142
- </template>
@@ -1,64 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = withDefaults(defineProps<{
5
- modelValue?: string
6
- placeholder?: string
7
- type?: 'text' | 'phone' | 'email' | 'search'
8
-
9
- color?: string
10
- primary?: boolean
11
- secondary?: boolean
12
- accent?: boolean
13
- info?: boolean
14
- success?: boolean
15
- warning?: boolean
16
- error?: boolean
17
-
18
- bordered?: boolean
19
- ghost?: boolean
20
- disabled?: boolean
21
-
22
- size?: 'lg' | 'md' | 'sm' | 'xs'
23
- lg?: boolean
24
- md?: boolean
25
- sm?: boolean
26
- xs?: boolean
27
- }>(), {
28
- type: 'text',
29
- })
30
- defineEmits(['update:modelValue'])
31
-
32
- const classes = computed(() => {
33
- return {
34
- 'textarea-primary': props.primary || props.color === 'primary',
35
- 'textarea-secondary': props.secondary || props.color === 'secondary',
36
- 'textarea-accent': props.accent || props.color === 'accent',
37
- 'textarea-info': props.info || props.color === 'info',
38
- 'textarea-success': props.success || props.color === 'success',
39
- 'textarea-warning': props.warning || props.color === 'warning',
40
- 'textarea-error': props.error || props.color === 'error',
41
-
42
- 'textarea-bordered': props.bordered,
43
- 'textarea-ghost': props.ghost,
44
-
45
- 'textarea-lg': props.lg || props.size === 'lg',
46
- 'textarea-md': props.md || props.size === 'md',
47
- 'textarea-sm': props.sm || props.size === 'sm',
48
- 'textarea-xs': props.xs || props.size === 'xs',
49
-
50
- }
51
- })
52
- </script>
53
-
54
- <template>
55
- <textarea
56
- :value="modelValue"
57
- :type="type"
58
- :placeholder="placeholder"
59
- :disabled="disabled"
60
- class="textarea"
61
- :class="classes"
62
- @input="$emit('update:modelValue', ($event.target as any).value)"
63
- />
64
- </template>
@@ -1,66 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = withDefaults(defineProps<{
5
- modelValue?: string | number
6
- placeholder?: string
7
- type?: 'text' | 'phone' | 'email' | 'search' | 'password' | 'number'
8
- join?: boolean
9
-
10
- color?: string
11
- primary?: boolean
12
- secondary?: boolean
13
- accent?: boolean
14
- info?: boolean
15
- success?: boolean
16
- warning?: boolean
17
- error?: boolean
18
-
19
- bordered?: boolean
20
- ghost?: boolean
21
- disabled?: boolean
22
-
23
- size?: 'lg' | 'md' | 'sm' | 'xs'
24
- lg?: boolean
25
- md?: boolean
26
- sm?: boolean
27
- xs?: boolean
28
- }>(), {
29
- type: 'text',
30
- })
31
- defineEmits(['update:modelValue'])
32
-
33
- const classes = computed(() => {
34
- return {
35
- 'join-item': props.join,
36
-
37
- 'input-primary': props.primary || props.color === 'primary',
38
- 'input-secondary': props.secondary || props.color === 'secondary',
39
- 'input-accent': props.accent || props.color === 'accent',
40
- 'input-info': props.info || props.color === 'info',
41
- 'input-success': props.success || props.color === 'success',
42
- 'input-warning': props.warning || props.color === 'warning',
43
- 'input-error': props.error || props.color === 'error',
44
-
45
- 'input-lg': props.lg || props.size === 'lg',
46
- 'input-md': props.md || props.size === 'md',
47
- 'input-sm': props.sm || props.size === 'sm',
48
- 'input-xs': props.xs || props.size === 'xs',
49
-
50
- 'input-bordered': props.bordered,
51
- 'input-ghost': props.ghost,
52
- }
53
- })
54
- </script>
55
-
56
- <template>
57
- <input
58
- :value="modelValue"
59
- :type="type"
60
- :placeholder="placeholder"
61
- :disabled="disabled"
62
- class="input"
63
- :class="classes"
64
- @input="$emit('update:modelValue', ($event.target as any).value)"
65
- >
66
- </template>
@@ -1,31 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = defineProps<{
5
- hAlign?: 'start' | 'center' | 'end'
6
- start?: boolean
7
- center?: boolean
8
- end?: boolean
9
-
10
- vAlign?: 'top' | 'middle' | 'bottom'
11
- top?: boolean
12
- middle?: boolean
13
- bottom?: boolean
14
- }>()
15
- const classes = computed(() => {
16
- return {
17
- 'toast-start': props.start || props.hAlign === 'start',
18
- 'toast-center': props.center || props.hAlign === 'center',
19
- 'toast-end': props.end || props.hAlign === 'end',
20
- 'toast-top': props.top || props.vAlign === 'top',
21
- 'toast-middle': props.middle || props.vAlign === 'middle',
22
- 'toast-bottom': props.bottom || props.vAlign === 'bottom',
23
- }
24
- })
25
- </script>
26
-
27
- <template>
28
- <div class="toast" :class="classes">
29
- <slot />
30
- </div>
31
- </template>
@@ -1,59 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = defineProps<{
5
- modelValue?: any
6
- disabled?: boolean
7
-
8
- color?: string
9
- neutral?: boolean
10
- primary?: boolean
11
- secondary?: boolean
12
- accent?: boolean
13
- success?: boolean
14
- info?: boolean
15
- warning?: boolean
16
- error?: boolean
17
-
18
- size?: string
19
- xs?: boolean
20
- sm?: boolean
21
- md?: boolean
22
- lg?: boolean
23
- }>()
24
- const emit = defineEmits(['update:modelValue'])
25
-
26
- const classes = computed(() => {
27
- const { color, neutral, primary, secondary, accent, success, info, warning, error, size, xs, sm, md, lg } = props
28
- return {
29
- 'toggle-neutral': neutral || color === 'neutral',
30
- 'toggle-primary': primary || color === 'primary',
31
- 'toggle-secondary': secondary || color === 'secondary',
32
- 'toggle-accent': accent || color === 'accent',
33
- 'toggle-success': success || color === 'success',
34
- 'toggle-info': info || color === 'info',
35
- 'toggle-warning': warning || color === 'warning',
36
- 'toggle-error': error || color === 'error',
37
- 'toggle-xs': xs || size === 'xs',
38
- 'toggle-sm': sm || size === 'sm',
39
- 'toggle-md': md || size === 'md',
40
- 'toggle-lg': lg || size === 'lg',
41
- }
42
- })
43
-
44
- const currentValue = computed({
45
- get: () => props.modelValue,
46
- set: (val: string) => emit('update:modelValue', val),
47
- })
48
- </script>
49
-
50
- <template>
51
- <input
52
- v-model="currentValue"
53
- type="checkbox"
54
- v-bind="$attrs"
55
- class="toggle"
56
- :disabled="disabled"
57
- :class="classes"
58
- >
59
- </template>