daisy-ui-kit 5.0.3 → 5.0.4

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 (157) 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/package.json +11 -21
  6. package/app/components/Accordion.vue +0 -29
  7. package/app/components/Alert.vue +0 -36
  8. package/app/components/Avatar.vue +0 -131
  9. package/app/components/AvatarGroup.vue +0 -22
  10. package/app/components/Badge.vue +0 -72
  11. package/app/components/Breadcrumbs.vue +0 -7
  12. package/app/components/Button.vue +0 -140
  13. package/app/components/Calendar.vue +0 -175
  14. package/app/components/CalendarInput.vue +0 -275
  15. package/app/components/CalendarSkeleton.vue +0 -87
  16. package/app/components/Card.vue +0 -51
  17. package/app/components/CardActions.vue +0 -13
  18. package/app/components/CardBody.vue +0 -13
  19. package/app/components/CardTitle.vue +0 -11
  20. package/app/components/Carousel.vue +0 -24
  21. package/app/components/CarouselItem.vue +0 -5
  22. package/app/components/Chat.vue +0 -26
  23. package/app/components/ChatBubble.vue +0 -31
  24. package/app/components/ChatFooter.vue +0 -5
  25. package/app/components/ChatHeader.vue +0 -5
  26. package/app/components/ChatImage.vue +0 -5
  27. package/app/components/Checkbox.vue +0 -51
  28. package/app/components/Collapse.vue +0 -76
  29. package/app/components/CollapseContent.vue +0 -5
  30. package/app/components/CollapseTitle.vue +0 -15
  31. package/app/components/Countdown.vue +0 -15
  32. package/app/components/CountdownTimers.vue +0 -69
  33. package/app/components/Counter.vue +0 -21
  34. package/app/components/Crumb.vue +0 -5
  35. package/app/components/DaisyLink.vue +0 -56
  36. package/app/components/Diff.vue +0 -11
  37. package/app/components/Divider.vue +0 -43
  38. package/app/components/Dock.vue +0 -57
  39. package/app/components/DockItem.vue +0 -27
  40. package/app/components/DockLabel.vue +0 -5
  41. package/app/components/Drawer.vue +0 -50
  42. package/app/components/DrawerContent.vue +0 -20
  43. package/app/components/DrawerSide.vue +0 -21
  44. package/app/components/Dropdown.vue +0 -106
  45. package/app/components/DropdownButton.vue +0 -23
  46. package/app/components/DropdownContent.vue +0 -127
  47. package/app/components/DropdownTarget.vue +0 -21
  48. package/app/components/Fab.vue +0 -16
  49. package/app/components/FabClose.vue +0 -18
  50. package/app/components/FabMainAction.vue +0 -5
  51. package/app/components/FabTrigger.vue +0 -117
  52. package/app/components/Fieldset.vue +0 -20
  53. package/app/components/FileInput.vue +0 -53
  54. package/app/components/Filter.vue +0 -129
  55. package/app/components/Flex.vue +0 -89
  56. package/app/components/FlexItem.vue +0 -62
  57. package/app/components/Footer.vue +0 -31
  58. package/app/components/FooterTitle.vue +0 -18
  59. package/app/components/FormControl.vue +0 -5
  60. package/app/components/Hero.vue +0 -18
  61. package/app/components/HeroContent.vue +0 -18
  62. package/app/components/HeroOverlay.vue +0 -5
  63. package/app/components/Hover3D.vue +0 -22
  64. package/app/components/HoverGallery.vue +0 -11
  65. package/app/components/Indicator.vue +0 -20
  66. package/app/components/IndicatorItem.vue +0 -43
  67. package/app/components/Input.vue +0 -116
  68. package/app/components/Join.vue +0 -5
  69. package/app/components/Kbd.vue +0 -25
  70. package/app/components/Label.vue +0 -100
  71. package/app/components/List.vue +0 -5
  72. package/app/components/ListColGrow.vue +0 -5
  73. package/app/components/ListColWrap.vue +0 -5
  74. package/app/components/ListRow.vue +0 -5
  75. package/app/components/LoadingBall.vue +0 -42
  76. package/app/components/LoadingBars.vue +0 -42
  77. package/app/components/LoadingDots.vue +0 -42
  78. package/app/components/LoadingInfinity.vue +0 -42
  79. package/app/components/LoadingRing.vue +0 -42
  80. package/app/components/LoadingSpinner.vue +0 -42
  81. package/app/components/Mask.vue +0 -49
  82. package/app/components/Menu.vue +0 -30
  83. package/app/components/MenuExpand.vue +0 -92
  84. package/app/components/MenuExpandToggle.vue +0 -20
  85. package/app/components/MenuItem.vue +0 -39
  86. package/app/components/MenuTitle.vue +0 -5
  87. package/app/components/MockupBrowser.vue +0 -5
  88. package/app/components/MockupBrowserToolbar.vue +0 -5
  89. package/app/components/MockupCode.vue +0 -4
  90. package/app/components/MockupPhone.vue +0 -14
  91. package/app/components/MockupWindow.vue +0 -5
  92. package/app/components/Modal.vue +0 -63
  93. package/app/components/ModalAction.vue +0 -5
  94. package/app/components/ModalBox.vue +0 -5
  95. package/app/components/NavButton.vue +0 -12
  96. package/app/components/Navbar.vue +0 -12
  97. package/app/components/NavbarCenter.vue +0 -11
  98. package/app/components/NavbarEnd.vue +0 -11
  99. package/app/components/NavbarStart.vue +0 -11
  100. package/app/components/Progress.vue +0 -46
  101. package/app/components/Prose.vue +0 -37
  102. package/app/components/RadialProgress.vue +0 -36
  103. package/app/components/Radio.vue +0 -69
  104. package/app/components/RadioGroup.vue +0 -47
  105. package/app/components/Range.vue +0 -201
  106. package/app/components/RangeMeasure.vue +0 -87
  107. package/app/components/RangeMeasureTick.vue +0 -69
  108. package/app/components/Rating.vue +0 -197
  109. package/app/components/Select.vue +0 -101
  110. package/app/components/Skeleton.vue +0 -5
  111. package/app/components/SkeletonText.vue +0 -11
  112. package/app/components/Stack.vue +0 -30
  113. package/app/components/Stat.vue +0 -19
  114. package/app/components/StatActions.vue +0 -5
  115. package/app/components/StatDesc.vue +0 -5
  116. package/app/components/StatFigure.vue +0 -5
  117. package/app/components/StatTitle.vue +0 -5
  118. package/app/components/StatValue.vue +0 -5
  119. package/app/components/Stats.vue +0 -5
  120. package/app/components/Status.vue +0 -43
  121. package/app/components/Step.vue +0 -34
  122. package/app/components/StepIcon.vue +0 -5
  123. package/app/components/Steps.vue +0 -23
  124. package/app/components/Swap.vue +0 -56
  125. package/app/components/Tab.vue +0 -56
  126. package/app/components/TabContent.vue +0 -29
  127. package/app/components/Table.vue +0 -32
  128. package/app/components/Tabs.vue +0 -53
  129. package/app/components/Text.vue +0 -166
  130. package/app/components/TextArea.vue +0 -106
  131. package/app/components/TextRotate.vue +0 -24
  132. package/app/components/ThemeController.vue +0 -45
  133. package/app/components/ThemeProvider.vue +0 -302
  134. package/app/components/ThemeTile.vue +0 -50
  135. package/app/components/Timeline.vue +0 -22
  136. package/app/components/TimelineEnd.vue +0 -14
  137. package/app/components/TimelineItem.vue +0 -5
  138. package/app/components/TimelineLine.vue +0 -29
  139. package/app/components/TimelineMiddle.vue +0 -5
  140. package/app/components/TimelineStart.vue +0 -14
  141. package/app/components/Toast.vue +0 -67
  142. package/app/components/Toggle.vue +0 -60
  143. package/app/components/Tooltip.vue +0 -137
  144. package/app/components/TooltipContent.vue +0 -283
  145. package/app/components/TooltipTarget.vue +0 -20
  146. package/app/components/ValidatorHint.vue +0 -5
  147. package/app/composables/__tests__/use-calendar.test.ts +0 -239
  148. package/app/composables/use-calendar.ts +0 -288
  149. package/app/composables/use-daisy-theme.ts +0 -140
  150. package/app/composables/use-toast.ts +0 -345
  151. package/app/composables/useSearch.ts +0 -22
  152. package/app/utils/drawer-utils.ts +0 -34
  153. package/app/utils/position-area.ts +0 -40
  154. package/components.d.ts +0 -145
  155. package/components.js +0 -141
  156. package/index.d.ts +0 -157
  157. package/index.js +0 -145
@@ -1,275 +0,0 @@
1
- <script setup lang="ts">
2
- import type { CalendarOptions } from '../composables/use-calendar'
3
- import { computed, ref, useId, watch } from 'vue'
4
- import { useCalendar } from '../composables/use-calendar'
5
-
6
- const props = defineProps<{
7
- /** Bound value: Date object or ISO string or null */
8
- modelValue?: Date | string | number | null
9
- /** Calendar options */
10
- options?: CalendarOptions
11
- /** If true, default to today when no value provided */
12
- autoDefault?: boolean
13
- placeholder?: string
14
- disabled?: boolean
15
- validator?: boolean
16
- join?: boolean
17
- color?: string
18
- primary?: boolean
19
- secondary?: boolean
20
- accent?: boolean
21
- info?: boolean
22
- success?: boolean
23
- warning?: boolean
24
- error?: boolean
25
- ghost?: boolean
26
- size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
27
- xl?: boolean
28
- lg?: boolean
29
- md?: boolean
30
- sm?: boolean
31
- xs?: boolean
32
- }>()
33
-
34
- const emit = defineEmits<{
35
- (e: 'update:modelValue', v: Date | null): void
36
- (e: 'update:inputValue', v: string | null): void
37
- }>()
38
-
39
- const uniqueId = useId()
40
- const popoverId = `calendar-popover-${uniqueId}`
41
- const anchorName = `--calendar-anchor-${uniqueId}`
42
- const inputRef = ref<HTMLInputElement | null>(null)
43
- const popoverRef = ref<HTMLElement | null>(null)
44
-
45
- // Parse date from various input types
46
- function parseDate(value: Date | string | number | null | undefined): Date | null {
47
- if (!value) return null
48
- if (value instanceof Date) return value
49
- const d = new Date(value)
50
- return Number.isNaN(d.getTime()) ? null : d
51
- }
52
-
53
- const initialDate = computed(() => {
54
- const parsed = parseDate(props.modelValue)
55
- if (parsed) return parsed
56
- if (props.autoDefault) return new Date()
57
- return null
58
- })
59
-
60
- const {
61
- selectedDate,
62
- viewMonth,
63
- viewYear,
64
- monthName,
65
- weekdayHeaders,
66
- weekdayHeadersFull,
67
- calendarDays,
68
- prevMonth,
69
- nextMonth,
70
- selectDate,
71
- goToDate,
72
- formatDate,
73
- } = useCalendar(initialDate.value, props.options)
74
-
75
- // Input display value
76
- const inputValue = computed(() => formatDate('D MMM YYYY'))
77
-
78
- // Sync selectedDate back to modelValue
79
- watch(selectedDate, date => {
80
- emit('update:modelValue', date)
81
- emit('update:inputValue', formatDate('D MMM YYYY'))
82
- })
83
-
84
- // Watch for external modelValue changes
85
- watch(
86
- () => props.modelValue,
87
- newValue => {
88
- const parsed = parseDate(newValue)
89
- if (parsed && (!selectedDate.value || parsed.getTime() !== selectedDate.value.getTime())) {
90
- selectDate(parsed)
91
- goToDate(parsed)
92
- } else if (!newValue && selectedDate.value) {
93
- selectedDate.value = null
94
- }
95
- },
96
- )
97
-
98
- function handleDayClick(day: (typeof calendarDays.value)[0]) {
99
- if (day.isDisabled) return
100
- selectDate(day.date)
101
- popoverRef.value?.hidePopover()
102
- }
103
-
104
- function handleClick() {
105
- // Sync view to selected date when opening
106
- if (selectedDate.value) {
107
- goToDate(selectedDate.value)
108
- }
109
- popoverRef.value?.togglePopover()
110
- }
111
- </script>
112
-
113
- <template>
114
- <div class="relative inline-block">
115
- <input
116
- ref="inputRef"
117
- type="text"
118
- readonly
119
- :value="inputValue"
120
- :placeholder="props.placeholder"
121
- :disabled="props.disabled"
122
- class="input cursor-pointer"
123
- :class="[
124
- { validator: props.validator },
125
- { 'input-primary': props.primary || props.color === 'primary' },
126
- { 'input-secondary': props.secondary || props.color === 'secondary' },
127
- { 'input-accent': props.accent || props.color === 'accent' },
128
- { 'input-info': props.info || props.color === 'info' },
129
- { 'input-success': props.success || props.color === 'success' },
130
- { 'input-warning': props.warning || props.color === 'warning' },
131
- { 'input-error': props.error || props.color === 'error' },
132
- { 'input-ghost': props.ghost },
133
- { 'input-xl': props.xl || props.size === 'xl' },
134
- { 'input-lg': props.lg || props.size === 'lg' },
135
- { 'input-md': props.md || props.size === 'md' },
136
- { 'input-sm': props.sm || props.size === 'sm' },
137
- { 'input-xs': props.xs || props.size === 'xs' },
138
- { 'join-item': props.join },
139
- ]"
140
- :style="{ 'anchor-name': anchorName } as any"
141
- v-bind="$attrs"
142
- @click="handleClick"
143
- />
144
-
145
- <!-- Dropdown calendar using Popover API -->
146
- <div
147
- :id="popoverId"
148
- ref="popoverRef"
149
- popover="auto"
150
- class="pika-single calendar-popover"
151
- :style="{ 'position-anchor': anchorName } as any"
152
- >
153
- <div class="pika-lendar">
154
- <!-- Header with navigation -->
155
- <div class="pika-title">
156
- <div class="pika-label">
157
- {{ monthName }}
158
- <select
159
- class="pika-select pika-select-month"
160
- :value="viewMonth"
161
- @change="
162
- e => {
163
- const target = e.target as HTMLSelectElement
164
- const newMonth = parseInt(target.value, 10)
165
- const d = new Date(viewYear, newMonth, 1)
166
- goToDate(d)
167
- }
168
- "
169
- >
170
- <option
171
- v-for="(m, i) in [
172
- 'January',
173
- 'February',
174
- 'March',
175
- 'April',
176
- 'May',
177
- 'June',
178
- 'July',
179
- 'August',
180
- 'September',
181
- 'October',
182
- 'November',
183
- 'December',
184
- ]"
185
- :key="i"
186
- :value="i"
187
- >
188
- {{ m }}
189
- </option>
190
- </select>
191
- </div>
192
- <div class="pika-label">
193
- {{ viewYear }}
194
- <select
195
- class="pika-select pika-select-year"
196
- :value="viewYear"
197
- @change="
198
- e => {
199
- const target = e.target as HTMLSelectElement
200
- const newYear = parseInt(target.value, 10)
201
- const d = new Date(newYear, viewMonth, 1)
202
- goToDate(d)
203
- }
204
- "
205
- >
206
- <option v-for="y in Array.from({ length: 21 }, (_, i) => viewYear - 10 + i)" :key="y" :value="y">
207
- {{ y }}
208
- </option>
209
- </select>
210
- </div>
211
- <button type="button" class="pika-prev" @click="prevMonth">Previous Month</button>
212
- <button type="button" class="pika-next" @click="nextMonth">Next Month</button>
213
- </div>
214
-
215
- <!-- Calendar grid -->
216
- <table class="pika-table" role="grid">
217
- <thead>
218
- <tr>
219
- <th v-for="(day, i) in weekdayHeaders" :key="i" scope="col">
220
- <abbr :title="weekdayHeadersFull[i]">{{ day }}</abbr>
221
- </th>
222
- </tr>
223
- </thead>
224
- <tbody>
225
- <tr v-for="week in 6" :key="week" class="pika-row">
226
- <td
227
- v-for="dayIndex in 7"
228
- :key="dayIndex"
229
- :class="{
230
- 'is-today': calendarDays[(week - 1) * 7 + dayIndex - 1]?.isToday,
231
- 'is-selected': calendarDays[(week - 1) * 7 + dayIndex - 1]?.isSelected,
232
- 'is-disabled': calendarDays[(week - 1) * 7 + dayIndex - 1]?.isDisabled,
233
- 'is-outside-current-month': calendarDays[(week - 1) * 7 + dayIndex - 1]?.isOutsideMonth,
234
- }"
235
- :aria-selected="calendarDays[(week - 1) * 7 + dayIndex - 1]?.isSelected"
236
- >
237
- <button
238
- type="button"
239
- class="pika-button pika-day"
240
- :disabled="calendarDays[(week - 1) * 7 + dayIndex - 1]?.isDisabled"
241
- @click="handleDayClick(calendarDays[(week - 1) * 7 + dayIndex - 1]!)"
242
- >
243
- {{ calendarDays[(week - 1) * 7 + dayIndex - 1]?.day }}
244
- </button>
245
- </td>
246
- </tr>
247
- </tbody>
248
- </table>
249
- </div>
250
- </div>
251
- </div>
252
- </template>
253
-
254
- <style>
255
- .calendar-popover[popover] {
256
- position-area: block-end span-inline-end;
257
- position-try-fallbacks:
258
- flip-block,
259
- flip-inline,
260
- flip-block flip-inline;
261
- margin: 0;
262
- margin-top: 0.25rem;
263
- /* Reset default popover styles */
264
- border: none;
265
- inset: auto;
266
- }
267
-
268
- .calendar-popover[popover]:popover-open {
269
- position: fixed;
270
- }
271
-
272
- .calendar-popover[popover]:not(:popover-open) {
273
- display: none;
274
- }
275
- </style>
@@ -1,87 +0,0 @@
1
- <script setup lang="ts">
2
- import Skeleton from './Skeleton.vue'
3
-
4
- const props = defineProps<{
5
- numberOfMonths?: number
6
- date?: Date
7
- firstDay?: number // 0 = Sunday, 1 = Monday, etc. (matches Pikaday's firstDay option)
8
- }>()
9
-
10
- // Calculate the number of weeks needed for a given month
11
- function getWeeksInMonth(date: Date, weekStartDay: number = 0): number {
12
- const year = date.getFullYear()
13
- const month = date.getMonth()
14
-
15
- // Get first day of month
16
- const firstDay = new Date(year, month, 1)
17
- const firstDayOfWeek = firstDay.getDay()
18
-
19
- // Get last day of month
20
- const lastDay = new Date(year, month + 1, 0)
21
- const daysInMonth = lastDay.getDate()
22
-
23
- // Calculate offset based on what day the week starts on
24
- // If week starts on Monday (1) and month starts on Sunday (0), offset is 6
25
- // If week starts on Sunday (0) and month starts on Sunday (0), offset is 0
26
- const offset = (firstDayOfWeek - weekStartDay + 7) % 7
27
-
28
- // Calculate total cells needed (days in month + offset from first day)
29
- const totalCells = daysInMonth + offset
30
-
31
- // Return number of weeks (rows) needed
32
- return Math.ceil(totalCells / 7)
33
- }
34
-
35
- // Calculate weeks for each month being displayed
36
- const weeksPerMonth = computed(() => {
37
- const baseDate = props.date || new Date()
38
- const weekStartDay = props.firstDay ?? 0
39
- const weeks: number[] = []
40
-
41
- for (let i = 0; i < (props.numberOfMonths || 1); i++) {
42
- const monthDate = new Date(baseDate.getFullYear(), baseDate.getMonth() + i, 1)
43
- weeks.push(getWeeksInMonth(monthDate, weekStartDay))
44
- }
45
-
46
- return weeks
47
- })
48
- </script>
49
-
50
- <template>
51
- <Skeleton col class="bg-base-200 rounded-box">
52
- <div
53
- v-for="(weeks, idx) in weeksPerMonth"
54
- :key="`calendar-${idx}`"
55
- class="w-[270px] px-3 py-[14px] mx-auto flex flex-col gap-2"
56
- :class="{
57
- '-mt-3.5': idx > 0,
58
- }"
59
- >
60
- <Flex justify-between items-center class="mb-3 px-2">
61
- <span
62
- class="size-4 rounded-full bg-base-300 inline-block"
63
- :class="{
64
- 'bg-base-300': idx === 0,
65
- 'bg-transparent': idx !== 0,
66
- }"
67
- />
68
- <span class="h-5 w-20 rounded-full bg-base-300 inline-block" />
69
- <span
70
- class="size-4 rounded-full bg-base-300 inline-block"
71
- :class="{
72
- 'bg-base-300': idx === weeksPerMonth.length - 1,
73
- 'bg-transparent': idx !== weeksPerMonth.length - 1,
74
- }"
75
- />
76
- </Flex>
77
- <Flex col class="h-full">
78
- <div class="grid grid-cols-7 gap-[4px] mb-3 flex-shrink-0">
79
- <span v-for="d in 7" :key="`dow-${d}`" class="size-4 rounded-full bg-base-300 mx-auto block" />
80
- </div>
81
- <div class="grid grid-cols-7 gap-y-[8px] gap-x-[4px]">
82
- <span v-for="i in weeks * 7" :key="`day-${i}`" class="size-7 rounded-full bg-base-300 block mx-auto" />
83
- </div>
84
- </Flex>
85
- </div>
86
- </Skeleton>
87
- </template>
@@ -1,51 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, resolveComponent } from 'vue'
3
-
4
- defineOptions({
5
- inheritAttrs: false,
6
- })
7
-
8
- const { is = 'div', ...props } = defineProps<{
9
- is?: string
10
- border?: boolean
11
- dash?: boolean
12
- side?: boolean
13
- imageFull?: boolean
14
- size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
15
- xl?: boolean
16
- lg?: boolean
17
- md?: boolean
18
- sm?: boolean
19
- xs?: boolean
20
- }>()
21
-
22
- const NuxtLink = resolveComponent('NuxtLink')
23
- const RouterLink = resolveComponent('RouterLink')
24
-
25
- const resolvedComponent = computed(() => {
26
- if (is === 'NuxtLink') return NuxtLink
27
- if (is === 'RouterLink') return RouterLink
28
- return is
29
- })
30
- </script>
31
-
32
- <template>
33
- <component
34
- :is="resolvedComponent"
35
- v-bind="$attrs"
36
- class="card"
37
- :class="{
38
- 'card-border': props.border,
39
- 'card-side': props.side,
40
- 'image-full': props.imageFull,
41
-
42
- 'card-xl': props.xl || props.size === 'xl',
43
- 'card-lg': props.lg || props.size === 'lg',
44
- 'card-md': props.md || props.size === 'md',
45
- 'card-sm': props.sm || props.size === 'sm',
46
- 'card-xs': props.xs || props.size === 'xs',
47
- }"
48
- >
49
- <slot />
50
- </component>
51
- </template>
@@ -1,13 +0,0 @@
1
- <script setup lang="ts">
2
- import Text from './Text.vue'
3
-
4
- const { is = 'div' } = defineProps<{
5
- is?: string
6
- }>()
7
- </script>
8
-
9
- <template>
10
- <Text :is="is" class="card-actions">
11
- <slot />
12
- </Text>
13
- </template>
@@ -1,13 +0,0 @@
1
- <script setup lang="ts">
2
- import Text from './Text.vue'
3
-
4
- const { is = 'div' } = defineProps<{
5
- is?: string
6
- }>()
7
- </script>
8
-
9
- <template>
10
- <Text :is="is" class="card-body">
11
- <slot />
12
- </Text>
13
- </template>
@@ -1,11 +0,0 @@
1
- <script setup lang="ts">
2
- import Text from './Text.vue'
3
-
4
- const { is = 'div' } = defineProps<{ is?: string }>()
5
- </script>
6
-
7
- <template>
8
- <Text :is="is" class="card-title">
9
- <slot />
10
- </Text>
11
- </template>
@@ -1,24 +0,0 @@
1
- <script setup lang="ts">
2
- const { snapTo, center, end, vertical } = defineProps<{
3
- snapTo?: 'center' | 'end'
4
- center?: boolean
5
- end?: boolean
6
- orientation?: 'horizontal' | 'vertical'
7
- horizontal?: boolean
8
- vertical?: boolean
9
- }>()
10
- </script>
11
-
12
- <template>
13
- <div
14
- class="carousel"
15
- :class="{
16
- 'carousel-center': center || snapTo === 'center',
17
- 'carousel-end': end || snapTo === 'end',
18
- 'carousel-horizontal': horizontal || orientation === 'horizontal',
19
- 'carousel-vertical': vertical || orientation === 'vertical',
20
- }"
21
- >
22
- <slot />
23
- </div>
24
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="carousel-item">
3
- <slot />
4
- </div>
5
- </template>
@@ -1,26 +0,0 @@
1
- <script setup lang="ts">
2
- const {
3
- pre,
4
- align = 'start',
5
- start,
6
- end,
7
- } = defineProps<{
8
- pre?: boolean
9
- align?: string
10
- start?: boolean
11
- end?: boolean
12
- }>()
13
- </script>
14
-
15
- <template>
16
- <div
17
- class="chat"
18
- :class="{
19
- 'chat-start': start || (!end && align === 'start'),
20
- 'chat-end': end || align === 'end',
21
- 'whitespace-pre': pre,
22
- }"
23
- >
24
- <slot />
25
- </div>
26
- </template>
@@ -1,31 +0,0 @@
1
- <script setup lang="ts">
2
- const { color, neutral, primary, secondary, accent, info, success, warning, error } = defineProps<{
3
- color?: string
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
- </script>
14
-
15
- <template>
16
- <div
17
- class="chat-bubble"
18
- :class="{
19
- 'chat-bubble-neutral': neutral || color === 'neutral',
20
- 'chat-bubble-primary': primary || color === 'primary',
21
- 'chat-bubble-secondary': secondary || color === 'secondary',
22
- 'chat-bubble-accent': accent || color === 'accent',
23
- 'chat-bubble-info': info || color === 'info',
24
- 'chat-bubble-success': success || color === 'success',
25
- 'chat-bubble-warning': warning || color === 'warning',
26
- 'chat-bubble-error': error || color === 'error',
27
- }"
28
- >
29
- <slot />
30
- </div>
31
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="chat-footer">
3
- <slot />
4
- </div>
5
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="chat-header">
3
- <slot />
4
- </div>
5
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <Avatar class="chat-image">
3
- <slot />
4
- </Avatar>
5
- </template>
@@ -1,51 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = defineProps<{
5
- modelValue?: any
6
- themeController?: boolean
7
-
8
- color?: string
9
- primary?: boolean
10
- secondary?: boolean
11
- accent?: boolean
12
- success?: boolean
13
- warning?: boolean
14
- info?: boolean
15
- error?: boolean
16
-
17
- size?: string
18
- lg?: boolean
19
- md?: boolean
20
- sm?: boolean
21
- xs?: boolean
22
- }>()
23
- const emit = defineEmits(['update:modelValue'])
24
-
25
- const currentValue = computed({
26
- get: () => props.modelValue,
27
- set: (val: string) => emit('update:modelValue', val),
28
- })
29
- </script>
30
-
31
- <template>
32
- <input
33
- v-model="currentValue"
34
- type="checkbox"
35
- class="checkbox"
36
- :class="{
37
- 'checkbox-primary': primary || color === 'primary',
38
- 'checkbox-secondary': secondary || color === 'secondary',
39
- 'checkbox-accent': accent || color === 'accent',
40
- 'checkbox-success': success || color === 'success',
41
- 'checkbox-warning': warning || color === 'warning',
42
- 'checkbox-info': info || color === 'info',
43
- 'checkbox-error': error || color === 'error',
44
- 'checkbox-xs': xs || size === 'xs',
45
- 'checkbox-sm': sm || size === 'sm',
46
- 'checkbox-md': md || size === 'md',
47
- 'checkbox-lg': lg || size === 'lg',
48
- 'theme-controller': themeController,
49
- }"
50
- />
51
- </template>
@@ -1,76 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, inject, provide, ref, useId, watch } from 'vue'
3
-
4
- const props = defineProps<{
5
- id?: string
6
- variant?: 'arrow' | 'plus'
7
- arrow?: boolean
8
- plus?: boolean
9
- open?: boolean
10
- close?: boolean
11
- toggle?: boolean
12
- value?: any
13
- }>()
14
-
15
- const isOpen = defineModel('open', { default: false })
16
-
17
- const accordionValue = inject('accordion-value', ref(null))
18
- const useAccordion = accordionValue.value !== null
19
-
20
- // Internal state for toggle mode
21
- const internalChecked = ref(props.open || false)
22
-
23
- // Generate unique ID for checkbox
24
- const checkboxId = props.id || `collapse-${useId()}`
25
- provide('collapseCheckboxId', checkboxId)
26
- provide('collapseToggle', props.toggle || useAccordion)
27
-
28
- // Sync internal state with modelValue
29
- watch(
30
- () => isOpen.value,
31
- newVal => {
32
- internalChecked.value = newVal
33
- },
34
- )
35
-
36
- watch(internalChecked, newVal => {
37
- isOpen.value = newVal
38
- })
39
-
40
- function handleClick() {
41
- // Only handle clicks for accordion mode
42
- if (useAccordion) {
43
- accordionValue.value = props.value
44
- }
45
- }
46
-
47
- const isChecked = computed(() => {
48
- if (useAccordion) {
49
- return accordionValue.value === props.value
50
- }
51
- return internalChecked.value
52
- })
53
- </script>
54
-
55
- <template>
56
- <div
57
- :tabindex="props.toggle || useAccordion ? undefined : 0"
58
- class="collapse"
59
- :class="[
60
- { 'collapse-arrow': props.arrow || props.variant === 'arrow' },
61
- { 'collapse-plus': props.plus || props.variant === 'plus' },
62
- { 'collapse-open': (props.open && !props.close) || (useAccordion && accordionValue === props.value) },
63
- { 'collapse-close': props.close },
64
- ]"
65
- @click="useAccordion ? handleClick : undefined"
66
- >
67
- <input
68
- v-if="props.toggle || useAccordion"
69
- :id="checkboxId"
70
- v-model="internalChecked"
71
- :type="useAccordion ? 'radio' : 'checkbox'"
72
- :checked="useAccordion ? isChecked : undefined"
73
- />
74
- <slot />
75
- </div>
76
- </template>