daisy-ui-kit 5.0.0-pre.8 → 5.0.0

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 (93) hide show
  1. package/app/components/Accordion.vue +8 -5
  2. package/app/components/Alert.vue +2 -1
  3. package/app/components/Avatar.vue +10 -7
  4. package/app/components/AvatarGroup.vue +6 -2
  5. package/app/components/Badge.vue +19 -1
  6. package/app/components/Button.vue +67 -45
  7. package/app/components/Calendar.vue +151 -42
  8. package/app/components/CalendarInput.vue +229 -130
  9. package/app/components/CalendarSkeleton.vue +51 -10
  10. package/app/components/Card.vue +20 -2
  11. package/app/components/CardActions.vue +1 -1
  12. package/app/components/CardBody.vue +1 -1
  13. package/app/components/CardTitle.vue +1 -1
  14. package/app/components/Carousel.vue +2 -1
  15. package/app/components/Chat.vue +6 -1
  16. package/app/components/Checkbox.vue +1 -1
  17. package/app/components/Collapse.vue +38 -5
  18. package/app/components/CollapseTitle.vue +11 -1
  19. package/app/components/Countdown.vue +3 -3
  20. package/app/components/CountdownTimers.vue +4 -7
  21. package/app/components/Counter.vue +14 -3
  22. package/app/components/DaisyLink.vue +33 -15
  23. package/app/components/Dock.vue +5 -6
  24. package/app/components/DockItem.vue +5 -3
  25. package/app/components/Drawer.vue +15 -12
  26. package/app/components/DrawerContent.vue +9 -6
  27. package/app/components/DrawerSide.vue +9 -6
  28. package/app/components/Dropdown.vue +61 -50
  29. package/app/components/DropdownButton.vue +11 -4
  30. package/app/components/DropdownContent.vue +90 -20
  31. package/app/components/DropdownTarget.vue +10 -3
  32. package/app/components/Fab.vue +16 -0
  33. package/app/components/FabClose.vue +18 -0
  34. package/app/components/FabMainAction.vue +5 -0
  35. package/app/components/FabTrigger.vue +117 -0
  36. package/app/components/Fieldset.vue +5 -4
  37. package/app/components/FileInput.vue +1 -1
  38. package/app/components/Filter.vue +45 -38
  39. package/app/components/Flex.vue +8 -1
  40. package/app/components/FlexItem.vue +30 -27
  41. package/app/components/Footer.vue +16 -12
  42. package/app/components/FooterTitle.vue +8 -5
  43. package/app/components/Hero.vue +9 -6
  44. package/app/components/HeroContent.vue +9 -6
  45. package/app/components/Hover3D.vue +22 -0
  46. package/app/components/HoverGallery.vue +11 -0
  47. package/app/components/Indicator.vue +12 -5
  48. package/app/components/IndicatorItem.vue +21 -14
  49. package/app/components/Input.vue +44 -47
  50. package/app/components/Kbd.vue +2 -1
  51. package/app/components/Label.vue +32 -29
  52. package/app/components/MenuExpand.vue +5 -13
  53. package/app/components/MenuExpandToggle.vue +7 -1
  54. package/app/components/MenuItem.vue +6 -4
  55. package/app/components/Modal.vue +23 -17
  56. package/app/components/Progress.vue +13 -1
  57. package/app/components/Prose.vue +7 -2
  58. package/app/components/RadialProgress.vue +8 -8
  59. package/app/components/Radio.vue +1 -1
  60. package/app/components/RadioGroup.vue +2 -2
  61. package/app/components/Range.vue +186 -46
  62. package/app/components/RangeMeasure.vue +33 -30
  63. package/app/components/RangeMeasureTick.vue +4 -5
  64. package/app/components/Rating.vue +70 -53
  65. package/app/components/Select.vue +44 -47
  66. package/app/components/SkeletonText.vue +11 -0
  67. package/app/components/Stack.vue +5 -0
  68. package/app/components/Steps.vue +7 -2
  69. package/app/components/Swap.vue +4 -10
  70. package/app/components/Tab.vue +23 -5
  71. package/app/components/Text.vue +47 -23
  72. package/app/components/TextArea.vue +75 -30
  73. package/app/components/TextRotate.vue +24 -0
  74. package/app/components/ThemeController.vue +3 -4
  75. package/app/components/ThemeProvider.vue +47 -32
  76. package/app/components/TimelineLine.vue +1 -1
  77. package/app/components/TimelineStart.vue +2 -1
  78. package/app/components/Toast.vue +46 -8
  79. package/app/components/Toggle.vue +2 -2
  80. package/app/components/Tooltip.vue +111 -21
  81. package/app/components/TooltipContent.vue +279 -1
  82. package/app/components/TooltipTarget.vue +20 -0
  83. package/app/composables/__tests__/use-calendar.test.ts +239 -0
  84. package/app/composables/use-calendar.ts +288 -0
  85. package/app/composables/use-daisy-theme.ts +140 -0
  86. package/app/composables/use-toast.ts +345 -0
  87. package/app/composables/useSearch.ts +22 -0
  88. package/app/utils/drawer-utils.ts +15 -13
  89. package/app/utils/position-area.ts +40 -0
  90. package/nuxt.d.ts +13 -0
  91. package/nuxt.js +12 -9
  92. package/package.json +52 -27
  93. package/app/utils/random-string.ts +0 -19
@@ -1,61 +1,201 @@
1
1
  <script setup lang="ts">
2
- import { computed } from 'vue';
3
-
4
- const props = defineProps<{
5
- modelValue?: number | string
6
- min?: number | string
7
- max?: number | string
8
- step?: number | string
9
- disabled?: boolean
10
-
11
- color?: string
12
- neutral?: boolean
13
- primary?: boolean
14
- secondary?: boolean
15
- accent?: boolean
16
- success?: boolean
17
- warning?: boolean
18
- info?: boolean
19
- error?: boolean
20
-
21
- size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
22
- xl?: boolean
23
- lg?: boolean
24
- md?: boolean
25
- sm?: boolean
26
- xs?: boolean
27
- }>()
2
+ import { computed } from 'vue'
3
+
4
+ const props = withDefaults(
5
+ defineProps<{
6
+ modelValue?: number | [number, number]
7
+ min?: number
8
+ max?: number
9
+ step?: number
10
+ disabled?: boolean
11
+
12
+ color?: string
13
+ neutral?: boolean
14
+ primary?: boolean
15
+ secondary?: boolean
16
+ accent?: boolean
17
+ success?: boolean
18
+ warning?: boolean
19
+ info?: boolean
20
+ error?: boolean
21
+
22
+ size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
23
+ xl?: boolean
24
+ lg?: boolean
25
+ md?: boolean
26
+ sm?: boolean
27
+ xs?: boolean
28
+ }>(),
29
+ {
30
+ min: 0,
31
+ max: 100,
32
+ step: 1,
33
+ },
34
+ )
28
35
  const emit = defineEmits(['update:modelValue'])
29
36
 
30
- const currentValue = computed({
31
- get: () => props.modelValue,
32
- set: val => emit('update:modelValue', val),
37
+ const isRange = computed(() => {
38
+ return Array.isArray(props.modelValue)
39
+ })
40
+
41
+ const singleValue = computed({
42
+ get: () => (isRange.value ? 0 : (props.modelValue as number)),
43
+ set: val => emit('update:modelValue', Number(val)),
44
+ })
45
+
46
+ const lowValue = computed({
47
+ get: () => (isRange.value ? (props.modelValue as [number, number])[0] : 0),
48
+ set: val => {
49
+ const v = Number(val)
50
+ const high = (props.modelValue as [number, number])[1]
51
+ emit('update:modelValue', [Math.min(v, high), high])
52
+ },
53
+ })
54
+
55
+ const highValue = computed({
56
+ get: () => (isRange.value ? (props.modelValue as [number, number])[1] : 100),
57
+ set: val => {
58
+ const v = Number(val)
59
+ const low = (props.modelValue as [number, number])[0]
60
+ emit('update:modelValue', [low, Math.max(v, low)])
61
+ },
62
+ })
63
+
64
+ const rangeClasses = computed(() => ({
65
+ 'range-neutral': props.neutral || props.color === 'neutral',
66
+ 'range-primary': props.primary || props.color === 'primary',
67
+ 'range-secondary': props.secondary || props.color === 'secondary',
68
+ 'range-accent': props.accent || props.color === 'accent',
69
+ 'range-success': props.success || props.color === 'success',
70
+ 'range-info': props.info || props.color === 'info',
71
+ 'range-warning': props.warning || props.color === 'warning',
72
+ 'range-error': props.error || props.color === 'error',
73
+ 'range-xl': props.xl || props.size === 'xl',
74
+ 'range-lg': props.lg || props.size === 'lg',
75
+ 'range-md': props.md || props.size === 'md',
76
+ 'range-sm': props.sm || props.size === 'sm',
77
+ 'range-xs': props.xs || props.size === 'xs',
78
+ }))
79
+
80
+ // Calculate percentage positions for the filled track
81
+ const lowPercent = computed(() => {
82
+ const range = props.max - props.min
83
+ return ((lowValue.value - props.min) / range) * 100
84
+ })
85
+
86
+ const highPercent = computed(() => {
87
+ const range = props.max - props.min
88
+ return ((highValue.value - props.min) / range) * 100
33
89
  })
34
90
  </script>
35
91
 
36
92
  <template>
93
+ <!-- Single value mode -->
37
94
  <input
38
- v-model="currentValue"
95
+ v-if="!isRange"
96
+ v-model="singleValue"
39
97
  type="range"
40
98
  class="range"
41
- :class="{
42
- 'range-neutral': neutral || color === 'neutral',
43
- 'range-primary': primary || color === 'primary',
44
- 'range-secondary': secondary || color === 'secondary',
45
- 'range-accent': accent || color === 'accent',
46
- 'range-success': success || color === 'success',
47
- 'range-info': info || color === 'info',
48
- 'range-warning': warning || color === 'warning',
49
- 'range-error': error || color === 'error',
50
- 'range-xl': xl || size === 'xl',
51
- 'range-lg': lg || size === 'lg',
52
- 'range-md': md || size === 'md',
53
- 'range-sm': sm || size === 'sm',
54
- 'range-xs': xs || size === 'xs',
55
- }"
99
+ :class="rangeClasses"
56
100
  :min="min"
57
101
  :max="max"
58
102
  :step="step"
59
103
  :disabled="disabled"
60
- >
104
+ />
105
+
106
+ <!-- Dual handle range mode -->
107
+ <div v-else class="range range-slider-wrapper" :class="rangeClasses">
108
+ <div class="range-slider-track" />
109
+ <div
110
+ class="range-slider-fill"
111
+ :style="{
112
+ left: `calc(${lowPercent}% + (var(--range-thumb-size, 1.5rem) / 2) - (${lowPercent} * var(--range-thumb-size, 1.5rem) / 100))`,
113
+ width: `calc(${highPercent - lowPercent}% - (${highPercent - lowPercent} * var(--range-thumb-size, 1.5rem) / 100))`,
114
+ }"
115
+ />
116
+ <input
117
+ v-model="lowValue"
118
+ type="range"
119
+ class="range range-slider-input"
120
+ :class="rangeClasses"
121
+ :min="min"
122
+ :max="max"
123
+ :step="step"
124
+ :disabled="disabled"
125
+ />
126
+ <input
127
+ v-model="highValue"
128
+ type="range"
129
+ class="range range-slider-input"
130
+ :class="rangeClasses"
131
+ :min="min"
132
+ :max="max"
133
+ :step="step"
134
+ :disabled="disabled"
135
+ />
136
+ </div>
61
137
  </template>
138
+
139
+ <style>
140
+ .range-slider-wrapper {
141
+ position: relative;
142
+ width: 100%;
143
+ height: var(--range-thumb-size, 1.5rem);
144
+ }
145
+
146
+ .range-slider-track {
147
+ position: absolute;
148
+ top: 50%;
149
+ left: 0;
150
+ right: 0;
151
+ height: calc(var(--range-thumb-size, 1.5rem) / 3);
152
+ transform: translateY(-50%);
153
+ background: color-mix(in oklab, currentColor 10%, transparent);
154
+ border-radius: var(--radius-selector, 1rem);
155
+ }
156
+
157
+ .range-slider-fill {
158
+ position: absolute;
159
+ top: 50%;
160
+ height: var(--range-thumb-size, 1.5rem);
161
+ transform: translateY(-50%);
162
+ background: currentColor;
163
+ border-radius: 0;
164
+ z-index: 1;
165
+ }
166
+
167
+ .range-slider-input {
168
+ position: absolute;
169
+ top: 0;
170
+ left: 0;
171
+ width: 100%;
172
+ height: 100%;
173
+ pointer-events: none;
174
+ background: transparent;
175
+ --range-fill: 0 !important;
176
+ }
177
+
178
+ /* Hide both tracks - we draw our own */
179
+ .range-slider-input::-webkit-slider-runnable-track {
180
+ background: transparent !important;
181
+ box-shadow: none !important;
182
+ }
183
+
184
+ .range-slider-input::-moz-range-track {
185
+ background: transparent !important;
186
+ box-shadow: none !important;
187
+ }
188
+
189
+ /* Enable pointer events only on thumbs */
190
+ .range-slider-input::-webkit-slider-thumb {
191
+ pointer-events: auto;
192
+ position: relative;
193
+ z-index: 3;
194
+ }
195
+
196
+ .range-slider-input::-moz-range-thumb {
197
+ pointer-events: auto;
198
+ position: relative;
199
+ z-index: 3;
200
+ }
201
+ </style>
@@ -1,37 +1,40 @@
1
1
  <script setup lang="ts">
2
- import { computed } from 'vue';
2
+ import { computed } from 'vue'
3
3
 
4
- const props = withDefaults(defineProps<{
5
- modelValue?: number | string
6
- min?: number | string
7
- max?: number | string
8
- step?: number | string
4
+ const props = withDefaults(
5
+ defineProps<{
6
+ modelValue?: number | string
7
+ min?: number | string
8
+ max?: number | string
9
+ step?: number | string
9
10
 
10
- numbered?: boolean
11
- asButtons?: boolean
12
- disabled?: boolean
11
+ numbered?: boolean
12
+ asButtons?: boolean
13
+ disabled?: boolean
13
14
 
14
- color?: string
15
- neutral?: boolean
16
- primary?: boolean
17
- secondary?: boolean
18
- accent?: boolean
19
- success?: boolean
20
- warning?: boolean
21
- info?: boolean
22
- error?: boolean
15
+ color?: string
16
+ neutral?: boolean
17
+ primary?: boolean
18
+ secondary?: boolean
19
+ accent?: boolean
20
+ success?: boolean
21
+ warning?: boolean
22
+ info?: boolean
23
+ error?: boolean
23
24
 
24
- size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
25
- xl?: boolean
26
- lg?: boolean
27
- md?: boolean
28
- sm?: boolean
29
- xs?: boolean
30
- }>(), {
31
- min: 0,
32
- max: 100,
33
- step: 1,
34
- })
25
+ size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
26
+ xl?: boolean
27
+ lg?: boolean
28
+ md?: boolean
29
+ sm?: boolean
30
+ xs?: boolean
31
+ }>(),
32
+ {
33
+ min: 0,
34
+ max: 100,
35
+ step: 1,
36
+ },
37
+ )
35
38
  defineEmits(['update:modelValue'])
36
39
 
37
40
  const values = computed(() => {
@@ -76,7 +79,7 @@ const values = computed(() => {
76
79
  :as-button="asButtons"
77
80
  :is-hidden="!tick.isVisible"
78
81
  :disabled="disabled"
79
- @update:model-value="(val) => !disabled && $emit('update:modelValue', val)"
82
+ @update:model-value="val => !disabled && $emit('update:modelValue', val)"
80
83
  >
81
84
  {{ numbered ? tick : '|' }}
82
85
  </RangeMeasureTick>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { useTimeoutFn } from '@vueuse/core';
3
- import { computed, watch } from 'vue';
2
+ import { useTimeoutFn } from '@vueuse/core'
3
+ import { computed, ref, watch } from 'vue'
4
4
 
5
5
  const props = defineProps<{
6
6
  tick: number
@@ -18,12 +18,11 @@ const { isPending, start, stop } = useTimeoutFn(() => {
18
18
  }, 1000)
19
19
  watch(
20
20
  () => props.modelValue,
21
- (val) => {
21
+ val => {
22
22
  if (val) {
23
23
  start()
24
24
  hasChanged.value = true
25
- }
26
- else if (!isPending.value) {
25
+ } else if (!isPending.value) {
27
26
  stop()
28
27
  }
29
28
  },
@@ -1,52 +1,55 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
3
 
4
- const props = withDefaults(defineProps<{
5
- modelValue?: number | string
6
- count?: number | string
7
- half?: boolean
8
-
9
- disabled?: boolean
10
-
11
- color?: string
12
- neutral?: boolean
13
- primary?: boolean
14
- secondary?: boolean
15
- accent?: boolean
16
- info?: boolean
17
- success?: boolean
18
- warning?: boolean
19
- error?: boolean
20
-
21
- bg?: string
22
-
23
- shape?: string
24
- squircle?: boolean
25
- heart?: boolean
26
- hexagon?: boolean
27
- hexagon2?: boolean
28
- decagon?: boolean
29
- pentagon?: boolean
30
- diamond?: boolean
31
- square?: boolean
32
- circle?: boolean
33
-
34
- star?: boolean
35
- star2?: boolean
36
- triangle?: boolean
37
- triangle2?: boolean
38
- triangle3?: boolean
39
- triangle4?: boolean
40
-
41
- size?: 'lg' | 'md' | 'sm' | 'xs' | 'xl'
42
- xl?: boolean
43
- lg?: boolean
44
- md?: boolean
45
- sm?: boolean
46
- xs?: boolean
47
- }>(), {
48
- count: 5,
49
- })
4
+ const props = withDefaults(
5
+ defineProps<{
6
+ modelValue?: number | string
7
+ count?: number | string
8
+ half?: boolean
9
+
10
+ disabled?: boolean
11
+
12
+ color?: string
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
+
22
+ bg?: string
23
+
24
+ shape?: string
25
+ squircle?: boolean
26
+ heart?: boolean
27
+ hexagon?: boolean
28
+ hexagon2?: boolean
29
+ decagon?: boolean
30
+ pentagon?: boolean
31
+ diamond?: boolean
32
+ square?: boolean
33
+ circle?: boolean
34
+
35
+ star?: boolean
36
+ star2?: boolean
37
+ triangle?: boolean
38
+ triangle2?: boolean
39
+ triangle3?: boolean
40
+ triangle4?: boolean
41
+
42
+ size?: 'lg' | 'md' | 'sm' | 'xs' | 'xl'
43
+ xl?: boolean
44
+ lg?: boolean
45
+ md?: boolean
46
+ sm?: boolean
47
+ xs?: boolean
48
+ }>(),
49
+ {
50
+ count: 5,
51
+ },
52
+ )
50
53
  const emit = defineEmits(['update:modelValue'])
51
54
 
52
55
  const max = computed(() => Number.parseInt(props.count as string))
@@ -66,10 +69,24 @@ function handleValue(digit: number, half = false) {
66
69
 
67
70
  // Check if any shape prop is set
68
71
  const hasShape = computed(() => {
69
- return props.shape || props.squircle || props.heart || props.hexagon
70
- || props.hexagon2 || props.decagon || props.pentagon || props.diamond
71
- || props.square || props.circle || props.star || props.star2
72
- || props.triangle || props.triangle2 || props.triangle3 || props.triangle4
72
+ return (
73
+ props.shape ||
74
+ props.squircle ||
75
+ props.heart ||
76
+ props.hexagon ||
77
+ props.hexagon2 ||
78
+ props.decagon ||
79
+ props.pentagon ||
80
+ props.diamond ||
81
+ props.square ||
82
+ props.circle ||
83
+ props.star ||
84
+ props.star2 ||
85
+ props.triangle ||
86
+ props.triangle2 ||
87
+ props.triangle3 ||
88
+ props.triangle4
89
+ )
73
90
  })
74
91
  </script>
75
92
 
@@ -93,7 +110,7 @@ const hasShape = computed(() => {
93
110
  class="rating-hidden"
94
111
  :checked="modelValue === 0"
95
112
  @change="$emit('update:modelValue', 0)"
96
- >
113
+ />
97
114
  <template v-for="digit in max" :key="digit">
98
115
  <input
99
116
  type="radio"
@@ -134,7 +151,7 @@ const hasShape = computed(() => {
134
151
  ]"
135
152
  :checked="half ? modelValue === digit - 0.5 : modelValue === digit"
136
153
  @change="() => handleValue(digit, true)"
137
- >
154
+ />
138
155
  <input
139
156
  v-if="half"
140
157
  type="radio"
@@ -174,7 +191,7 @@ const hasShape = computed(() => {
174
191
  ]"
175
192
  :checked="modelValue === digit"
176
193
  @change="() => handleValue(digit)"
177
- >
194
+ />
178
195
  </template>
179
196
  </div>
180
197
  </template>
@@ -1,51 +1,51 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
3
 
4
- type Color = | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error'
4
+ type Color = 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error'
5
5
 
6
- const props = withDefaults(defineProps<{
7
- modelValue: any
8
- options: Record<string, any>[] | any[]
9
- value?: (val: any) => any
10
- label?: (val: any) => any
11
- resultAsObject?: boolean
12
- join?: boolean
6
+ const props = withDefaults(
7
+ defineProps<{
8
+ modelValue: any
9
+ options: Record<string, any>[] | any[]
10
+ value?: (val: any) => any
11
+ label?: (val: any) => any
12
+ resultAsObject?: boolean
13
+ join?: boolean
13
14
 
14
- ghost?: boolean
15
- disabled?: boolean
16
- validator?: boolean
15
+ ghost?: boolean
16
+ disabled?: boolean
17
+ validator?: boolean
18
+ native?: boolean
17
19
 
18
- color?: Color
19
- primary?: boolean
20
- secondary?: boolean
21
- accent?: boolean
22
- info?: boolean
23
- success?: boolean
24
- warning?: boolean
25
- error?: boolean
20
+ color?: Color
21
+ neutral?: boolean
22
+ primary?: boolean
23
+ secondary?: boolean
24
+ accent?: boolean
25
+ info?: boolean
26
+ success?: boolean
27
+ warning?: boolean
28
+ error?: boolean
26
29
 
27
- size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
28
- xl?: boolean
29
- lg?: boolean
30
- md?: boolean
31
- sm?: boolean
32
- xs?: boolean
33
- }>(), {
34
- value: (val: any) => {
35
- if (!val) {
36
- return null
37
- }
30
+ size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
31
+ xl?: boolean
32
+ lg?: boolean
33
+ md?: boolean
34
+ sm?: boolean
35
+ xs?: boolean
36
+ }>(),
37
+ {
38
+ value: (val: any) => {
39
+ if (val == null) {
40
+ return null
41
+ }
38
42
 
39
- return typeof val === 'string'
40
- ? (val as string)
41
- : (val?.value || val?.id || val?._id || val)
43
+ return typeof val === 'string' ? (val as string) : (val?.value ?? val?.id ?? val?._id ?? val)
44
+ },
45
+ label: (val: any) => (typeof val === 'string' ? (val as string) : val.label || val.name || val.title),
46
+ resultAsObject: false,
42
47
  },
43
- label: (val: any) =>
44
- typeof val === 'string'
45
- ? (val as string)
46
- : (val.label || val.name || val.title),
47
- resultAsObject: false,
48
- })
48
+ )
49
49
  const emit = defineEmits(['update:modelValue'])
50
50
 
51
51
  const computedVModel = computed({
@@ -56,7 +56,7 @@ const computedVModel = computed({
56
56
 
57
57
  return props.modelValue
58
58
  },
59
- set: (val) => {
59
+ set: val => {
60
60
  if (val === undefined) {
61
61
  val = null
62
62
  }
@@ -75,8 +75,10 @@ const computedVModel = computed({
75
75
  class="select"
76
76
  :class="{
77
77
  'join-item': props.join,
78
- 'validator': props.validator,
78
+ validator: props.validator,
79
79
  'select-ghost': props.ghost,
80
+ 'appearance-none': props.native,
81
+ 'select-neutral': props.neutral || props.color === 'neutral',
80
82
  'select-primary': props.primary || props.color === 'primary',
81
83
  'select-secondary': props.secondary || props.color === 'secondary',
82
84
  'select-accent': props.accent || props.color === 'accent',
@@ -92,12 +94,7 @@ const computedVModel = computed({
92
94
  }"
93
95
  :disabled="disabled"
94
96
  >
95
- <option
96
- v-for="option in options"
97
- :key="value(option)"
98
- :value="value(option)"
99
- :disabled="option.disabled"
100
- >
97
+ <option v-for="option in options" :key="value(option)" :value="value(option)" :disabled="option.disabled">
101
98
  {{ label(option) }}
102
99
  </option>
103
100
  </select>
@@ -0,0 +1,11 @@
1
+ <script setup lang="ts">
2
+ const props = defineProps<{
3
+ is?: any
4
+ }>()
5
+ </script>
6
+
7
+ <template>
8
+ <component :is="props.is || 'span'" class="skeleton skeleton-text">
9
+ <slot />
10
+ </component>
11
+ </template>
@@ -1,4 +1,8 @@
1
1
  <script setup lang="ts">
2
+ defineOptions({
3
+ inheritAttrs: false,
4
+ })
5
+
2
6
  const { is = 'div' } = defineProps<{
3
7
  is?: string
4
8
  direction?: 'top' | 'end' | 'bottom' | 'start'
@@ -12,6 +16,7 @@ const { is = 'div' } = defineProps<{
12
16
  <template>
13
17
  <component
14
18
  :is="is"
19
+ v-bind="$attrs"
15
20
  class="stack"
16
21
  :class="{
17
22
  'stack-top': top || direction === 'top',
@@ -1,5 +1,9 @@
1
1
  <script setup lang="ts">
2
- const { orientation, vertical = false, horizontal = false } = defineProps<{
2
+ const {
3
+ orientation,
4
+ vertical = false,
5
+ horizontal = false,
6
+ } = defineProps<{
3
7
  orientation?: 'vertical' | 'horizontal'
4
8
  vertical?: boolean
5
9
  horizontal?: boolean
@@ -8,7 +12,8 @@ const { orientation, vertical = false, horizontal = false } = defineProps<{
8
12
 
9
13
  <template>
10
14
  <ul
11
- class="steps" :class="{
15
+ class="steps"
16
+ :class="{
12
17
  'steps-vertical': orientation === 'vertical' || vertical,
13
18
  'steps-horizontal': orientation === 'horizontal' || horizontal,
14
19
  }"