daisy-ui-kit 5.0.3 → 5.0.5

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 (158) hide show
  1. package/README.md +1 -1
  2. package/dist/index.css +1 -0
  3. package/dist/index.d.ts +4652 -0
  4. package/dist/index.js +5279 -0
  5. package/nuxt.js +161 -14
  6. package/package.json +11 -21
  7. package/app/components/Accordion.vue +0 -29
  8. package/app/components/Alert.vue +0 -36
  9. package/app/components/Avatar.vue +0 -131
  10. package/app/components/AvatarGroup.vue +0 -22
  11. package/app/components/Badge.vue +0 -72
  12. package/app/components/Breadcrumbs.vue +0 -7
  13. package/app/components/Button.vue +0 -140
  14. package/app/components/Calendar.vue +0 -175
  15. package/app/components/CalendarInput.vue +0 -275
  16. package/app/components/CalendarSkeleton.vue +0 -87
  17. package/app/components/Card.vue +0 -51
  18. package/app/components/CardActions.vue +0 -13
  19. package/app/components/CardBody.vue +0 -13
  20. package/app/components/CardTitle.vue +0 -11
  21. package/app/components/Carousel.vue +0 -24
  22. package/app/components/CarouselItem.vue +0 -5
  23. package/app/components/Chat.vue +0 -26
  24. package/app/components/ChatBubble.vue +0 -31
  25. package/app/components/ChatFooter.vue +0 -5
  26. package/app/components/ChatHeader.vue +0 -5
  27. package/app/components/ChatImage.vue +0 -5
  28. package/app/components/Checkbox.vue +0 -51
  29. package/app/components/Collapse.vue +0 -76
  30. package/app/components/CollapseContent.vue +0 -5
  31. package/app/components/CollapseTitle.vue +0 -15
  32. package/app/components/Countdown.vue +0 -15
  33. package/app/components/CountdownTimers.vue +0 -69
  34. package/app/components/Counter.vue +0 -21
  35. package/app/components/Crumb.vue +0 -5
  36. package/app/components/DaisyLink.vue +0 -56
  37. package/app/components/Diff.vue +0 -11
  38. package/app/components/Divider.vue +0 -43
  39. package/app/components/Dock.vue +0 -57
  40. package/app/components/DockItem.vue +0 -27
  41. package/app/components/DockLabel.vue +0 -5
  42. package/app/components/Drawer.vue +0 -50
  43. package/app/components/DrawerContent.vue +0 -20
  44. package/app/components/DrawerSide.vue +0 -21
  45. package/app/components/Dropdown.vue +0 -106
  46. package/app/components/DropdownButton.vue +0 -23
  47. package/app/components/DropdownContent.vue +0 -127
  48. package/app/components/DropdownTarget.vue +0 -21
  49. package/app/components/Fab.vue +0 -16
  50. package/app/components/FabClose.vue +0 -18
  51. package/app/components/FabMainAction.vue +0 -5
  52. package/app/components/FabTrigger.vue +0 -117
  53. package/app/components/Fieldset.vue +0 -20
  54. package/app/components/FileInput.vue +0 -53
  55. package/app/components/Filter.vue +0 -129
  56. package/app/components/Flex.vue +0 -89
  57. package/app/components/FlexItem.vue +0 -62
  58. package/app/components/Footer.vue +0 -31
  59. package/app/components/FooterTitle.vue +0 -18
  60. package/app/components/FormControl.vue +0 -5
  61. package/app/components/Hero.vue +0 -18
  62. package/app/components/HeroContent.vue +0 -18
  63. package/app/components/HeroOverlay.vue +0 -5
  64. package/app/components/Hover3D.vue +0 -22
  65. package/app/components/HoverGallery.vue +0 -11
  66. package/app/components/Indicator.vue +0 -20
  67. package/app/components/IndicatorItem.vue +0 -43
  68. package/app/components/Input.vue +0 -116
  69. package/app/components/Join.vue +0 -5
  70. package/app/components/Kbd.vue +0 -25
  71. package/app/components/Label.vue +0 -100
  72. package/app/components/List.vue +0 -5
  73. package/app/components/ListColGrow.vue +0 -5
  74. package/app/components/ListColWrap.vue +0 -5
  75. package/app/components/ListRow.vue +0 -5
  76. package/app/components/LoadingBall.vue +0 -42
  77. package/app/components/LoadingBars.vue +0 -42
  78. package/app/components/LoadingDots.vue +0 -42
  79. package/app/components/LoadingInfinity.vue +0 -42
  80. package/app/components/LoadingRing.vue +0 -42
  81. package/app/components/LoadingSpinner.vue +0 -42
  82. package/app/components/Mask.vue +0 -49
  83. package/app/components/Menu.vue +0 -30
  84. package/app/components/MenuExpand.vue +0 -92
  85. package/app/components/MenuExpandToggle.vue +0 -20
  86. package/app/components/MenuItem.vue +0 -39
  87. package/app/components/MenuTitle.vue +0 -5
  88. package/app/components/MockupBrowser.vue +0 -5
  89. package/app/components/MockupBrowserToolbar.vue +0 -5
  90. package/app/components/MockupCode.vue +0 -4
  91. package/app/components/MockupPhone.vue +0 -14
  92. package/app/components/MockupWindow.vue +0 -5
  93. package/app/components/Modal.vue +0 -63
  94. package/app/components/ModalAction.vue +0 -5
  95. package/app/components/ModalBox.vue +0 -5
  96. package/app/components/NavButton.vue +0 -12
  97. package/app/components/Navbar.vue +0 -12
  98. package/app/components/NavbarCenter.vue +0 -11
  99. package/app/components/NavbarEnd.vue +0 -11
  100. package/app/components/NavbarStart.vue +0 -11
  101. package/app/components/Progress.vue +0 -46
  102. package/app/components/Prose.vue +0 -37
  103. package/app/components/RadialProgress.vue +0 -36
  104. package/app/components/Radio.vue +0 -69
  105. package/app/components/RadioGroup.vue +0 -47
  106. package/app/components/Range.vue +0 -201
  107. package/app/components/RangeMeasure.vue +0 -87
  108. package/app/components/RangeMeasureTick.vue +0 -69
  109. package/app/components/Rating.vue +0 -197
  110. package/app/components/Select.vue +0 -101
  111. package/app/components/Skeleton.vue +0 -5
  112. package/app/components/SkeletonText.vue +0 -11
  113. package/app/components/Stack.vue +0 -30
  114. package/app/components/Stat.vue +0 -19
  115. package/app/components/StatActions.vue +0 -5
  116. package/app/components/StatDesc.vue +0 -5
  117. package/app/components/StatFigure.vue +0 -5
  118. package/app/components/StatTitle.vue +0 -5
  119. package/app/components/StatValue.vue +0 -5
  120. package/app/components/Stats.vue +0 -5
  121. package/app/components/Status.vue +0 -43
  122. package/app/components/Step.vue +0 -34
  123. package/app/components/StepIcon.vue +0 -5
  124. package/app/components/Steps.vue +0 -23
  125. package/app/components/Swap.vue +0 -56
  126. package/app/components/Tab.vue +0 -56
  127. package/app/components/TabContent.vue +0 -29
  128. package/app/components/Table.vue +0 -32
  129. package/app/components/Tabs.vue +0 -53
  130. package/app/components/Text.vue +0 -166
  131. package/app/components/TextArea.vue +0 -106
  132. package/app/components/TextRotate.vue +0 -24
  133. package/app/components/ThemeController.vue +0 -45
  134. package/app/components/ThemeProvider.vue +0 -302
  135. package/app/components/ThemeTile.vue +0 -50
  136. package/app/components/Timeline.vue +0 -22
  137. package/app/components/TimelineEnd.vue +0 -14
  138. package/app/components/TimelineItem.vue +0 -5
  139. package/app/components/TimelineLine.vue +0 -29
  140. package/app/components/TimelineMiddle.vue +0 -5
  141. package/app/components/TimelineStart.vue +0 -14
  142. package/app/components/Toast.vue +0 -67
  143. package/app/components/Toggle.vue +0 -60
  144. package/app/components/Tooltip.vue +0 -137
  145. package/app/components/TooltipContent.vue +0 -283
  146. package/app/components/TooltipTarget.vue +0 -20
  147. package/app/components/ValidatorHint.vue +0 -5
  148. package/app/composables/__tests__/use-calendar.test.ts +0 -239
  149. package/app/composables/use-calendar.ts +0 -288
  150. package/app/composables/use-daisy-theme.ts +0 -140
  151. package/app/composables/use-toast.ts +0 -345
  152. package/app/composables/useSearch.ts +0 -22
  153. package/app/utils/drawer-utils.ts +0 -34
  154. package/app/utils/position-area.ts +0 -40
  155. package/components.d.ts +0 -145
  156. package/components.js +0 -141
  157. package/index.d.ts +0 -157
  158. package/index.js +0 -145
@@ -1,197 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
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
- )
53
- const emit = defineEmits(['update:modelValue'])
54
-
55
- const max = computed(() => Number.parseInt(props.count as string))
56
-
57
- function handleValue(digit: number, half = false) {
58
- if (props.disabled) {
59
- return
60
- }
61
-
62
- if (props.half) {
63
- emit('update:modelValue', half ? digit - 0.5 : digit)
64
- return
65
- }
66
-
67
- emit('update:modelValue', digit)
68
- }
69
-
70
- // Check if any shape prop is set
71
- const hasShape = computed(() => {
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
- )
90
- })
91
- </script>
92
-
93
- <template>
94
- <div
95
- class="rating"
96
- :class="{
97
- 'rating-half': half,
98
- 'rating-xl': xl || size === 'xl',
99
- 'rating-lg': lg || size === 'lg',
100
- 'rating-md': md || size === 'md',
101
- 'rating-sm': sm || size === 'sm',
102
- 'rating-xs': xs || size === 'xs',
103
- 'opacity-60': disabled,
104
- 'cursor-not-allowed': disabled,
105
- }"
106
- >
107
- <input
108
- type="radio"
109
- :value="0"
110
- class="rating-hidden"
111
- :checked="modelValue === 0"
112
- @change="$emit('update:modelValue', 0)"
113
- />
114
- <template v-for="digit in max" :key="digit">
115
- <input
116
- type="radio"
117
- :value="half ? digit - 0.5 : digit"
118
- :disabled="disabled"
119
- class="mask"
120
- :class="[
121
- bg,
122
- { 'mask-half-1': half },
123
- { 'cursor-not-allowed opacity-50': disabled },
124
-
125
- // Color classes
126
- { 'bg-neutral': neutral || color === 'neutral' },
127
- { 'bg-primary': primary || color === 'primary' },
128
- { 'bg-secondary': secondary || color === 'secondary' },
129
- { 'bg-accent': accent || color === 'accent' },
130
- { 'bg-info': info || color === 'info' },
131
- { 'bg-success': success || color === 'success' },
132
- { 'bg-warning': warning || color === 'warning' },
133
- { 'bg-error': error || color === 'error' },
134
-
135
- // Shape classes
136
- { 'mask-squircle': squircle || shape === 'squircle' },
137
- { 'mask-heart': heart || shape === 'heart' },
138
- { 'mask-hexagon': hexagon || shape === 'hexagon' },
139
- { 'mask-hexagon-2': hexagon2 || shape === 'hexagon-2' },
140
- { 'mask-decagon': decagon || shape === 'decagon' },
141
- { 'mask-pentagon': pentagon || shape === 'pentagon' },
142
- { 'mask-diamond': diamond || shape === 'diamond' },
143
- { 'mask-square': square || shape === 'square' },
144
- { 'mask-circle': circle || shape === 'circle' },
145
- { 'mask-star': star || shape === 'star' },
146
- { 'mask-star-2': star2 || shape === 'star-2' || !hasShape },
147
- { 'mask-triangle': triangle || shape === 'triangle' },
148
- { 'mask-triangle-2': triangle2 || shape === 'triangle-2' },
149
- { 'mask-triangle-3': triangle3 || shape === 'triangle-3' },
150
- { 'mask-triangle-4': triangle4 || shape === 'triangle-4' },
151
- ]"
152
- :checked="half ? modelValue === digit - 0.5 : modelValue === digit"
153
- @change="() => handleValue(digit, true)"
154
- />
155
- <input
156
- v-if="half"
157
- type="radio"
158
- :value="digit"
159
- class="mask mask-half-2"
160
- :disabled="disabled"
161
- :class="[
162
- bg,
163
- { 'cursor-not-allowed opacity-50': disabled },
164
-
165
- // Color classes
166
- { 'bg-neutral': neutral || color === 'neutral' },
167
- { 'bg-primary': primary || color === 'primary' },
168
- { 'bg-secondary': secondary || color === 'secondary' },
169
- { 'bg-accent': accent || color === 'accent' },
170
- { 'bg-info': info || color === 'info' },
171
- { 'bg-success': success || color === 'success' },
172
- { 'bg-warning': warning || color === 'warning' },
173
- { 'bg-error': error || color === 'error' },
174
-
175
- // Shape classes
176
- { 'mask-squircle': squircle || shape === 'squircle' },
177
- { 'mask-heart': heart || shape === 'heart' },
178
- { 'mask-hexagon': hexagon || shape === 'hexagon' },
179
- { 'mask-hexagon-2': hexagon2 || shape === 'hexagon-2' },
180
- { 'mask-decagon': decagon || shape === 'decagon' },
181
- { 'mask-pentagon': pentagon || shape === 'pentagon' },
182
- { 'mask-diamond': diamond || shape === 'diamond' },
183
- { 'mask-square': square || shape === 'square' },
184
- { 'mask-circle': circle || shape === 'circle' },
185
- { 'mask-star': star || shape === 'star' },
186
- { 'mask-star-2': star2 || shape === 'star-2' || !hasShape },
187
- { 'mask-triangle': triangle || shape === 'triangle' },
188
- { 'mask-triangle-2': triangle2 || shape === 'triangle-2' },
189
- { 'mask-triangle-3': triangle3 || shape === 'triangle-3' },
190
- { 'mask-triangle-4': triangle4 || shape === 'triangle-4' },
191
- ]"
192
- :checked="modelValue === digit"
193
- @change="() => handleValue(digit)"
194
- />
195
- </template>
196
- </div>
197
- </template>
@@ -1,101 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- type Color = 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error'
5
-
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
14
-
15
- ghost?: boolean
16
- disabled?: boolean
17
- validator?: boolean
18
- native?: boolean
19
-
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
29
-
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
- }
42
-
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,
47
- },
48
- )
49
- const emit = defineEmits(['update:modelValue'])
50
-
51
- const computedVModel = computed({
52
- get: () => {
53
- if (props.resultAsObject && props.modelValue != null) {
54
- return props.value(props.modelValue)
55
- }
56
-
57
- return props.modelValue
58
- },
59
- set: val => {
60
- if (val === undefined) {
61
- val = null
62
- }
63
- if (props.resultAsObject && val != null) {
64
- val = props.options.find(o => props.value(o) === val)
65
- }
66
-
67
- emit('update:modelValue', val)
68
- },
69
- })
70
- </script>
71
-
72
- <template>
73
- <select
74
- v-model="computedVModel"
75
- class="select"
76
- :class="{
77
- 'join-item': props.join,
78
- validator: props.validator,
79
- 'select-ghost': props.ghost,
80
- 'appearance-none': props.native,
81
- 'select-neutral': props.neutral || props.color === 'neutral',
82
- 'select-primary': props.primary || props.color === 'primary',
83
- 'select-secondary': props.secondary || props.color === 'secondary',
84
- 'select-accent': props.accent || props.color === 'accent',
85
- 'select-info': props.info || props.color === 'info',
86
- 'select-success': props.success || props.color === 'success',
87
- 'select-warning': props.warning || props.color === 'warning',
88
- 'select-error': props.error || props.color === 'error',
89
- 'select-xl': props.xl || props.size === 'xl',
90
- 'select-lg': props.lg || props.size === 'lg',
91
- 'select-md': props.md || props.size === 'md',
92
- 'select-sm': props.sm || props.size === 'sm',
93
- 'select-xs': props.xs || props.size === 'xs',
94
- }"
95
- :disabled="disabled"
96
- >
97
- <option v-for="option in options" :key="value(option)" :value="value(option)" :disabled="option.disabled">
98
- {{ label(option) }}
99
- </option>
100
- </select>
101
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="skeleton">
3
- <slot />
4
- </div>
5
- </template>
@@ -1,11 +0,0 @@
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,30 +0,0 @@
1
- <script setup lang="ts">
2
- defineOptions({
3
- inheritAttrs: false,
4
- })
5
-
6
- const { is = 'div' } = defineProps<{
7
- is?: string
8
- direction?: 'top' | 'end' | 'bottom' | 'start'
9
- top?: boolean
10
- end?: boolean
11
- bottom?: boolean
12
- start?: boolean
13
- }>()
14
- </script>
15
-
16
- <template>
17
- <component
18
- :is="is"
19
- v-bind="$attrs"
20
- class="stack"
21
- :class="{
22
- 'stack-top': top || direction === 'top',
23
- 'stack-end': end || direction === 'end',
24
- 'stack-bottom': bottom || direction === 'bottom',
25
- 'stack-start': start || direction === 'start',
26
- }"
27
- >
28
- <slot />
29
- </component>
30
- </template>
@@ -1,19 +0,0 @@
1
- <script setup lang="ts">
2
- defineProps<{
3
- orientation?: 'vertical' | 'horizontal'
4
- vertical?: boolean
5
- horizontal?: boolean
6
- }>()
7
- </script>
8
-
9
- <template>
10
- <div
11
- class="stat"
12
- :class="{
13
- 'stat-vertical': vertical || orientation === 'vertical',
14
- 'stat-horizontal': horizontal || orientation === 'horizontal',
15
- }"
16
- >
17
- <slot />
18
- </div>
19
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="stat-actions">
3
- <slot />
4
- </div>
5
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="stat-desc">
3
- <slot />
4
- </div>
5
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="stat-figure">
3
- <slot />
4
- </div>
5
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="stat-title">
3
- <slot />
4
- </div>
5
- </template>
@@ -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,43 +0,0 @@
1
- <script setup lang="ts">
2
- defineProps<{
3
- color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error'
4
- neutral?: boolean
5
- primary?: boolean
6
- secondary?: boolean
7
- accent?: boolean
8
- info?: boolean
9
- success?: boolean
10
- warning?: boolean
11
- error?: boolean
12
-
13
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
14
- xs?: boolean
15
- sm?: boolean
16
- md?: boolean
17
- lg?: boolean
18
- xl?: boolean
19
- }>()
20
- </script>
21
-
22
- <template>
23
- <span
24
- class="status"
25
- :class="[
26
- neutral || color === 'neutral' ? 'status-neutral' : '',
27
- primary || color === 'primary' ? 'status-primary' : '',
28
- secondary || color === 'secondary' ? 'status-secondary' : '',
29
- accent || color === 'accent' ? 'status-accent' : '',
30
- info || color === 'info' ? 'status-info' : '',
31
- success || color === 'success' ? 'status-success' : '',
32
- warning || color === 'warning' ? 'status-warning' : '',
33
- error || color === 'error' ? 'status-error' : '',
34
- xs || size === 'xs' ? 'status-xs' : '',
35
- sm || size === 'sm' ? 'status-sm' : '',
36
- md || size === 'md' || (!xs && !sm && !lg && !xl && !size) ? 'status-md' : '',
37
- lg || size === 'lg' ? 'status-lg' : '',
38
- xl || size === 'xl' ? 'status-xl' : '',
39
- ]"
40
- >
41
- <slot />
42
- </span>
43
- </template>
@@ -1,34 +0,0 @@
1
- <script setup lang="ts">
2
- const props = defineProps<{
3
- glyph?: string
4
-
5
- color?: string
6
- neutral?: boolean
7
- primary?: boolean
8
- secondary?: boolean
9
- accent?: boolean
10
- info?: boolean
11
- success?: boolean
12
- warning?: boolean
13
- error?: boolean
14
- }>()
15
- </script>
16
-
17
- <template>
18
- <li
19
- class="step"
20
- :class="{
21
- 'step-neutral': props.neutral || props.color === 'neutral',
22
- 'step-primary': props.primary || props.color === 'primary',
23
- 'step-secondary': props.secondary || props.color === 'secondary',
24
- 'step-accent': props.accent || props.color === 'accent',
25
- 'step-info': props.info || props.color === 'info',
26
- 'step-success': props.success || props.color === 'success',
27
- 'step-warning': props.warning || props.color === 'warning',
28
- 'step-error': props.error || props.color === 'error',
29
- }"
30
- :data-content="glyph"
31
- >
32
- <slot />
33
- </li>
34
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <span class="step-icon">
3
- <slot />
4
- </span>
5
- </template>
@@ -1,23 +0,0 @@
1
- <script setup lang="ts">
2
- const {
3
- orientation,
4
- vertical = false,
5
- horizontal = false,
6
- } = defineProps<{
7
- orientation?: 'vertical' | 'horizontal'
8
- vertical?: boolean
9
- horizontal?: boolean
10
- }>()
11
- </script>
12
-
13
- <template>
14
- <ul
15
- class="steps"
16
- :class="{
17
- 'steps-vertical': orientation === 'vertical' || vertical,
18
- 'steps-horizontal': orientation === 'horizontal' || horizontal,
19
- }"
20
- >
21
- <slot />
22
- </ul>
23
- </template>
@@ -1,56 +0,0 @@
1
- <script setup lang="ts">
2
- import { nextTick, ref, watch } from 'vue'
3
-
4
- const props = defineProps<{
5
- modelValue?: boolean | null
6
- rotate?: boolean
7
- flip?: boolean
8
- }>()
9
- const emit = defineEmits(['update:modelValue'])
10
-
11
- const checkbox = ref<HTMLInputElement | null>(null)
12
-
13
- // Keep the checkbox's indeterminate property in sync with modelValue
14
- watch(
15
- () => props.modelValue,
16
- val => {
17
- nextTick(() => {
18
- if (checkbox.value) {
19
- checkbox.value.indeterminate = val === null
20
- }
21
- })
22
- },
23
- { immediate: true },
24
- )
25
-
26
- function updateValue(event: Event) {
27
- const input = event.target as HTMLInputElement
28
- // If indeterminate, toggle to checked
29
- if (props.modelValue === null) {
30
- emit('update:modelValue', true)
31
- } else {
32
- emit('update:modelValue', input.checked)
33
- }
34
- }
35
- </script>
36
-
37
- <template>
38
- <label
39
- class="swap"
40
- :class="{
41
- 'swap-rotate': rotate,
42
- 'swap-flip': flip,
43
- }"
44
- >
45
- <input ref="checkbox" type="checkbox" :checked="modelValue === true" @change="updateValue" />
46
- <div class="swap-indeterminate">
47
- <slot name="indeterminate" />
48
- </div>
49
- <div class="swap-on">
50
- <slot name="swap" />
51
- </div>
52
- <div class="swap-off">
53
- <slot />
54
- </div>
55
- </label>
56
- </template>
@@ -1,56 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, inject, resolveComponent } from 'vue'
3
-
4
- defineOptions({
5
- inheritAttrs: false,
6
- })
7
-
8
- const {
9
- is = 'label',
10
- name,
11
- ...props
12
- } = defineProps<{
13
- is?: string
14
- name?: string
15
- active?: boolean
16
- disabled?: boolean
17
- }>()
18
-
19
- const NuxtLink = resolveComponent('NuxtLink')
20
- const RouterLink = resolveComponent('RouterLink')
21
-
22
- const resolvedComponent = computed(() => {
23
- if (is === 'NuxtLink') return NuxtLink
24
- if (is === 'RouterLink') return RouterLink
25
- return is
26
- })
27
-
28
- const tabManager: any = inject('tabManager')
29
- if (!tabManager.currentTab.value) {
30
- tabManager.currentTab.value = name
31
- }
32
- </script>
33
-
34
- <template>
35
- <component
36
- :is="resolvedComponent"
37
- v-bind="$attrs"
38
- class="tab"
39
- :class="{
40
- 'tab-active': props.active || tabManager.currentTab.value === name,
41
- 'tab-disabled': props.disabled,
42
- }"
43
- @keypress.enter="() => (tabManager.currentTab.value = name)"
44
- >
45
- <input
46
- type="radio"
47
- :name="tabManager.name"
48
- :value="name"
49
- :checked="tabManager.currentTab.value === name"
50
- @change="() => (tabManager.currentTab.value = name)"
51
- />
52
-
53
- <slot v-if="$slots.default" />
54
- <span v-else>{{ name }}</span>
55
- </component>
56
- </template>
@@ -1,29 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, inject } from 'vue'
3
-
4
- const { is = 'div', name } = defineProps<{
5
- is?: any
6
- name: string
7
- }>()
8
-
9
- const tabManager: any = inject('tabManager')
10
-
11
- const isCurrentTab = computed(() => {
12
- return tabManager.currentTab.value === name
13
- })
14
-
15
- if (!tabManager?.currentTab.value) {
16
- tabManager.currentTab.value = name
17
- }
18
-
19
- const existing = tabManager?.tabs?.find((t: string) => t === name)
20
- if (!existing) {
21
- tabManager.tabs.push(name)
22
- }
23
- </script>
24
-
25
- <template>
26
- <component :is="is" v-show="isCurrentTab" class="tab-content">
27
- <slot />
28
- </component>
29
- </template>