daisy-ui-kit 3.0.12 → 5.0.0-pre.11

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 (213) hide show
  1. package/README.md +62 -14
  2. package/app/components/Accordion.vue +29 -0
  3. package/app/components/Alert.vue +36 -0
  4. package/app/components/Avatar.vue +131 -0
  5. package/app/components/AvatarGroup.vue +22 -0
  6. package/app/components/Badge.vue +67 -0
  7. package/app/components/Button.vue +135 -0
  8. package/app/components/Calendar.vue +89 -0
  9. package/app/components/CalendarInput.vue +174 -0
  10. package/app/components/CalendarSkeleton.vue +87 -0
  11. package/app/components/Card.vue +46 -0
  12. package/{components → app/components}/CardActions.vue +2 -5
  13. package/{components → app/components}/CardBody.vue +2 -5
  14. package/{components → app/components}/CardTitle.vue +1 -6
  15. package/app/components/Carousel.vue +24 -0
  16. package/app/components/Chat.vue +26 -0
  17. package/app/components/ChatBubble.vue +31 -0
  18. package/app/components/Checkbox.vue +51 -0
  19. package/app/components/Collapse.vue +75 -0
  20. package/app/components/CollapseTitle.vue +15 -0
  21. package/{components → app/components}/Countdown.vue +1 -1
  22. package/app/components/CountdownTimers.vue +69 -0
  23. package/app/components/Counter.vue +21 -0
  24. package/app/components/DaisyLink.vue +52 -0
  25. package/app/components/Diff.vue +11 -0
  26. package/app/components/Divider.vue +43 -0
  27. package/app/components/Dock.vue +60 -0
  28. package/app/components/DockItem.vue +26 -0
  29. package/app/components/DockLabel.vue +5 -0
  30. package/{components → app/components}/Drawer.vue +17 -12
  31. package/{components → app/components}/DrawerContent.vue +8 -5
  32. package/{components → app/components}/DrawerSide.vue +8 -5
  33. package/app/components/Dropdown.vue +106 -0
  34. package/app/components/DropdownButton.vue +23 -0
  35. package/app/components/DropdownContent.vue +127 -0
  36. package/{components → app/components}/DropdownTarget.vue +9 -2
  37. package/app/components/Fab.vue +16 -0
  38. package/app/components/FabClose.vue +18 -0
  39. package/app/components/FabMainAction.vue +5 -0
  40. package/app/components/FabTrigger.vue +117 -0
  41. package/app/components/Fieldset.vue +16 -0
  42. package/app/components/FileInput.vue +53 -0
  43. package/app/components/Filter.vue +125 -0
  44. package/app/components/Flex.vue +84 -0
  45. package/{components → app/components}/FlexItem.vue +30 -27
  46. package/app/components/Footer.vue +31 -0
  47. package/{components → app/components}/FooterTitle.vue +8 -5
  48. package/app/components/FormControl.vue +5 -0
  49. package/{components → app/components}/Hero.vue +8 -5
  50. package/{components → app/components}/HeroContent.vue +8 -5
  51. package/app/components/Hover3D.vue +22 -0
  52. package/app/components/HoverGallery.vue +11 -0
  53. package/{components → app/components}/Indicator.vue +8 -5
  54. package/{components → app/components}/IndicatorItem.vue +16 -13
  55. package/app/components/Input.vue +126 -0
  56. package/app/components/Kbd.vue +25 -0
  57. package/app/components/Label.vue +100 -0
  58. package/{components/CollapseTitle.vue → app/components/List.vue} +1 -1
  59. package/{components/FormControl.vue → app/components/ListColGrow.vue} +1 -1
  60. package/app/components/ListColWrap.vue +5 -0
  61. package/{components/Stat.vue → app/components/ListRow.vue} +1 -1
  62. package/app/components/LoadingBall.vue +42 -0
  63. package/app/components/LoadingBars.vue +42 -0
  64. package/app/components/LoadingDots.vue +42 -0
  65. package/app/components/LoadingInfinity.vue +42 -0
  66. package/app/components/LoadingRing.vue +42 -0
  67. package/app/components/LoadingSpinner.vue +42 -0
  68. package/app/components/Mask.vue +49 -0
  69. package/app/components/Menu.vue +30 -0
  70. package/app/components/MenuExpand.vue +94 -0
  71. package/app/components/MenuExpandToggle.vue +20 -0
  72. package/{components → app/components}/MenuItem.vue +7 -6
  73. package/app/components/MockupPhone.vue +14 -0
  74. package/{components → app/components}/Modal.vue +28 -13
  75. package/app/components/NavButton.vue +12 -0
  76. package/{components → app/components}/Navbar.vue +3 -5
  77. package/{components → app/components}/NavbarCenter.vue +3 -5
  78. package/{components → app/components}/NavbarEnd.vue +3 -5
  79. package/{components → app/components}/NavbarStart.vue +3 -5
  80. package/app/components/Progress.vue +46 -0
  81. package/{components → app/components}/Prose.vue +8 -3
  82. package/app/components/RadialProgress.vue +36 -0
  83. package/app/components/Radio.vue +69 -0
  84. package/{components → app/components}/RadioGroup.vue +2 -1
  85. package/app/components/Range.vue +61 -0
  86. package/app/components/RangeMeasure.vue +87 -0
  87. package/{components → app/components}/RangeMeasureTick.vue +9 -14
  88. package/app/components/Rating.vue +197 -0
  89. package/app/components/Select.vue +101 -0
  90. package/app/components/Skeleton.vue +5 -0
  91. package/app/components/SkeletonText.vue +11 -0
  92. package/app/components/Stack.vue +25 -0
  93. package/app/components/Stat.vue +19 -0
  94. package/app/components/Status.vue +43 -0
  95. package/app/components/Step.vue +34 -0
  96. package/app/components/StepIcon.vue +5 -0
  97. package/app/components/Steps.vue +23 -0
  98. package/app/components/Swap.vue +56 -0
  99. package/app/components/Tab.vue +51 -0
  100. package/{components → app/components}/TabContent.vue +10 -10
  101. package/app/components/Table.vue +32 -0
  102. package/app/components/Tabs.vue +53 -0
  103. package/app/components/Text.vue +162 -0
  104. package/app/components/TextArea.vue +64 -0
  105. package/app/components/TextRotate.vue +24 -0
  106. package/app/components/ThemeController.vue +45 -0
  107. package/app/components/ThemeProvider.vue +302 -0
  108. package/app/components/ThemeTile.vue +50 -0
  109. package/app/components/Timeline.vue +22 -0
  110. package/app/components/TimelineEnd.vue +14 -0
  111. package/app/components/TimelineItem.vue +5 -0
  112. package/app/components/TimelineLine.vue +29 -0
  113. package/app/components/TimelineMiddle.vue +5 -0
  114. package/app/components/TimelineStart.vue +14 -0
  115. package/app/components/Toast.vue +67 -0
  116. package/app/components/Toggle.vue +60 -0
  117. package/app/components/Tooltip.vue +48 -0
  118. package/app/components/TooltipContent.vue +5 -0
  119. package/app/components/ValidatorHint.vue +5 -0
  120. package/{utils → app/utils}/drawer-utils.ts +15 -13
  121. package/app/utils/position-area.ts +41 -0
  122. package/nuxt.js +7 -1
  123. package/package.json +60 -61
  124. package/components/Accordion.vue +0 -29
  125. package/components/Alert.vue +0 -25
  126. package/components/Artboard.vue +0 -33
  127. package/components/Avatar.vue +0 -70
  128. package/components/AvatarGroup.vue +0 -19
  129. package/components/Badge.vue +0 -50
  130. package/components/BottomNav.vue +0 -25
  131. package/components/Button.vue +0 -111
  132. package/components/Card.vue +0 -30
  133. package/components/Carousel.vue +0 -25
  134. package/components/Chat.vue +0 -27
  135. package/components/ChatBubble.vue +0 -34
  136. package/components/Checkbox.vue +0 -55
  137. package/components/Code.vue +0 -92
  138. package/components/Collapse.vue +0 -54
  139. package/components/CountdownTimers.vue +0 -70
  140. package/components/Counter.vue +0 -14
  141. package/components/Divider.vue +0 -24
  142. package/components/Dropdown.vue +0 -95
  143. package/components/DropdownButton.vue +0 -16
  144. package/components/DropdownContent.vue +0 -56
  145. package/components/FileInput.vue +0 -59
  146. package/components/Flex.vue +0 -59
  147. package/components/Footer.vue +0 -24
  148. package/components/Kbd.vue +0 -25
  149. package/components/Label.vue +0 -15
  150. package/components/LabelText.vue +0 -15
  151. package/components/LabelTextAlt.vue +0 -15
  152. package/components/Link.vue +0 -40
  153. package/components/LoadingBall.vue +0 -43
  154. package/components/LoadingBars.vue +0 -43
  155. package/components/LoadingDots.vue +0 -43
  156. package/components/LoadingInfinity.vue +0 -43
  157. package/components/LoadingRing.vue +0 -43
  158. package/components/LoadingSpinner.vue +0 -43
  159. package/components/Mask.config.ts +0 -77
  160. package/components/Mask.vue +0 -14
  161. package/components/Menu.vue +0 -35
  162. package/components/MenuExpand.vue +0 -79
  163. package/components/MenuExpandToggle.vue +0 -13
  164. package/components/MockupPhone.vue +0 -8
  165. package/components/NavButton.vue +0 -20
  166. package/components/Progress.vue +0 -42
  167. package/components/RadialProgress.vue +0 -41
  168. package/components/Radio.vue +0 -76
  169. package/components/Range.vue +0 -60
  170. package/components/RangeMeasure.vue +0 -83
  171. package/components/Rating.vue +0 -167
  172. package/components/Select.vue +0 -100
  173. package/components/Stack.vue +0 -13
  174. package/components/Step.vue +0 -36
  175. package/components/Steps.vue +0 -21
  176. package/components/Swap.vue +0 -58
  177. package/components/Tab.vue +0 -48
  178. package/components/Tabs.vue +0 -77
  179. package/components/TabsManager.vue +0 -38
  180. package/components/Text.vue +0 -142
  181. package/components/TextArea.vue +0 -64
  182. package/components/TextInput.vue +0 -66
  183. package/components/Toast.vue +0 -31
  184. package/components/Toggle.vue +0 -59
  185. package/components/Tooltip.vue +0 -47
  186. package/index.ts +0 -108
  187. package/utils/-utils.ts +0 -41
  188. package/utils/Button.config.ts +0 -26
  189. package/utils/fixtures.ts +0 -62
  190. package/utils/types.ts +0 -7
  191. /package/{components → app/components}/Breadcrumbs.vue +0 -0
  192. /package/{components → app/components}/CarouselItem.vue +0 -0
  193. /package/{components → app/components}/ChatFooter.vue +0 -0
  194. /package/{components → app/components}/ChatHeader.vue +0 -0
  195. /package/{components → app/components}/ChatImage.vue +0 -0
  196. /package/{components → app/components}/CollapseContent.vue +0 -0
  197. /package/{components → app/components}/Crumb.vue +0 -0
  198. /package/{components → app/components}/HeroOverlay.vue +0 -0
  199. /package/{components → app/components}/Join.vue +0 -0
  200. /package/{components → app/components}/MenuTitle.vue +0 -0
  201. /package/{components → app/components}/MockupBrowser.vue +0 -0
  202. /package/{components → app/components}/MockupBrowserToolbar.vue +0 -0
  203. /package/{components → app/components}/MockupCode.vue +0 -0
  204. /package/{components → app/components}/MockupWindow.vue +0 -0
  205. /package/{components → app/components}/ModalAction.vue +0 -0
  206. /package/{components → app/components}/ModalBox.vue +0 -0
  207. /package/{components → app/components}/StatActions.vue +0 -0
  208. /package/{components → app/components}/StatDesc.vue +0 -0
  209. /package/{components → app/components}/StatFigure.vue +0 -0
  210. /package/{components → app/components}/StatTitle.vue +0 -0
  211. /package/{components → app/components}/StatValue.vue +0 -0
  212. /package/{components → app/components}/Stats.vue +0 -0
  213. /package/{utils → app/utils}/random-string.ts +0 -0
@@ -0,0 +1,50 @@
1
+ <script setup lang="ts">
2
+ import { computed } from 'vue'
3
+
4
+ const props = defineProps<{
5
+ theme?: string
6
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
7
+ xs?: boolean
8
+ sm?: boolean
9
+ md?: boolean
10
+ lg?: boolean
11
+ xl?: boolean
12
+ }>()
13
+ const size = computed(() => props.size ?? 'md')
14
+
15
+ const squareClass = computed(() => {
16
+ switch (size.value) {
17
+ case 'xs':
18
+ return 'w-full h-full rounded-[2px]'
19
+ case 'sm':
20
+ return 'w-full h-full rounded-[2px]'
21
+ case 'md':
22
+ return 'w-full h-full rounded-xs'
23
+ case 'lg':
24
+ return 'w-full h-full rounded-sm'
25
+ case 'xl':
26
+ return 'w-full h-full rounded'
27
+ default:
28
+ return 'w-full h-full rounded-xs'
29
+ }
30
+ })
31
+ </script>
32
+
33
+ <template>
34
+ <div
35
+ :data-theme="theme"
36
+ class="grid grid-cols-2 bg-white rounded-sm"
37
+ :class="{
38
+ '!size-4 p-0.5 gap-px': xs || size === 'xs',
39
+ '!size-5 p-0.5 gap-px': sm || size === 'sm',
40
+ 'size-6 p-0.5 gap-0.5': md || size === 'md' || !size,
41
+ 'size-8 p-0.75 gap-0.5': lg || size === 'lg',
42
+ 'size-10 h-10 p-1 gap-0.75': xl || size === 'xl',
43
+ }"
44
+ >
45
+ <div class="bg-neutral" :class="squareClass" />
46
+ <div class="bg-primary" :class="squareClass" />
47
+ <div class="bg-secondary" :class="squareClass" />
48
+ <div class="bg-accent" :class="squareClass" />
49
+ </div>
50
+ </template>
@@ -0,0 +1,22 @@
1
+ <script setup lang="ts">
2
+ defineProps<{
3
+ vertical?: boolean
4
+ horizontal?: boolean
5
+ compact?: boolean
6
+ snapIcon?: boolean
7
+ }>()
8
+ </script>
9
+
10
+ <template>
11
+ <ul
12
+ class="timeline"
13
+ :class="{
14
+ 'timeline-vertical': vertical,
15
+ 'timeline-horizontal': horizontal,
16
+ 'timeline-compact': compact,
17
+ 'timeline-snap-icon': snapIcon,
18
+ }"
19
+ >
20
+ <slot />
21
+ </ul>
22
+ </template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ defineProps<{ box?: boolean }>()
3
+ </script>
4
+
5
+ <template>
6
+ <div
7
+ class="timeline-end"
8
+ :class="{
9
+ 'timeline-box': box,
10
+ }"
11
+ >
12
+ <slot />
13
+ </div>
14
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <li class="timeline-item">
3
+ <slot />
4
+ </li>
5
+ </template>
@@ -0,0 +1,29 @@
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
+ </script>
14
+
15
+ <template>
16
+ <hr
17
+ class="timeline-line"
18
+ :class="{
19
+ 'bg-neutral': neutral || color === 'neutral',
20
+ 'bg-primary': primary || color === 'primary',
21
+ 'bg-secondary': secondary || color === 'secondary',
22
+ 'bg-accent': accent || color === 'accent',
23
+ 'bg-info': info || color === 'info',
24
+ 'bg-success': success || color === 'success',
25
+ 'bg-warning': warning || color === 'warning',
26
+ 'bg-error': error || color === 'error',
27
+ }"
28
+ />
29
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div class="timeline-middle">
3
+ <slot />
4
+ </div>
5
+ </template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ defineProps<{ box?: boolean }>()
3
+ </script>
4
+
5
+ <template>
6
+ <div
7
+ class="timeline-start"
8
+ :class="{
9
+ 'timeline-box': box,
10
+ }"
11
+ >
12
+ <slot />
13
+ </div>
14
+ </template>
@@ -0,0 +1,67 @@
1
+ <script setup lang="ts">
2
+ import type { Toast } from '~/composables/use-toast'
3
+ import { computed } from 'vue'
4
+ import { useToast } from '~/composables/use-toast'
5
+
6
+ // Explicit slot typing (Vue 3.4+ / Volar)
7
+ interface ToastSlotProps {
8
+ toast?: Toast
9
+ removeToast?: (id: number) => void
10
+ [key: string]: unknown
11
+ }
12
+ const props = defineProps<{
13
+ /**
14
+ * Horizontal alignment (start, center, end)
15
+ */
16
+ hAlign?: 'start' | 'center' | 'end'
17
+ start?: boolean
18
+ center?: boolean
19
+ end?: boolean
20
+ /**
21
+ * Vertical alignment (top, middle, bottom)
22
+ */
23
+ vAlign?: 'top' | 'middle' | 'bottom'
24
+ top?: boolean
25
+ middle?: boolean
26
+ bottom?: boolean
27
+ /**
28
+ * Toast channel name (for named channels)
29
+ */
30
+ name?: string
31
+ /**
32
+ * Default toast settings for this channel (merged into every toast)
33
+ * Example: { duration: 6000, type: 'info', position: 'top-center' }
34
+ */
35
+ defaults?: Partial<Toast>
36
+ }>()
37
+
38
+ defineSlots<{
39
+ default: (props: ToastSlotProps) => any
40
+ }>()
41
+
42
+ // Extract useToast options from props (name, defaults, future-proof)
43
+ const toastOptions = computed(() => {
44
+ const { name, defaults } = props
45
+ return { name, defaults }
46
+ })
47
+
48
+ const { toasts, removeToast } = useToast(toastOptions.value)
49
+ const visibleToasts = computed(() => toasts.value ?? [])
50
+ </script>
51
+
52
+ <template>
53
+ <div
54
+ class="toast"
55
+ :class="{
56
+ 'toast-start': props.start || props.hAlign === 'start',
57
+ 'toast-center': props.center || props.hAlign === 'center',
58
+ 'toast-end': props.end || props.hAlign === 'end',
59
+ 'toast-top': props.top || props.vAlign === 'top',
60
+ 'toast-middle': props.middle || props.vAlign === 'middle',
61
+ 'toast-bottom': props.bottom || props.vAlign === 'bottom',
62
+ }"
63
+ >
64
+ <slot v-for="toast in visibleToasts" :key="toast.id" :toast="toast" :remove-toast="removeToast" />
65
+ <slot />
66
+ </div>
67
+ </template>
@@ -0,0 +1,60 @@
1
+ <script setup lang="ts">
2
+ import { computed } from 'vue'
3
+
4
+ const props = defineProps<{
5
+ modelValue?: any
6
+ disabled?: boolean
7
+ validator?: boolean
8
+ themeController?: boolean
9
+
10
+ color?: string
11
+ neutral?: boolean
12
+ primary?: boolean
13
+ secondary?: boolean
14
+ accent?: boolean
15
+ success?: boolean
16
+ info?: boolean
17
+ warning?: boolean
18
+ error?: boolean
19
+
20
+ size?: string
21
+ xs?: boolean
22
+ sm?: boolean
23
+ md?: boolean
24
+ lg?: boolean
25
+ xl?: boolean
26
+ }>()
27
+ const emit = defineEmits(['update:modelValue'])
28
+
29
+ const currentValue = computed({
30
+ get: () => props.modelValue,
31
+ set: (val: string) => emit('update:modelValue', val),
32
+ })
33
+ </script>
34
+
35
+ <template>
36
+ <input
37
+ v-model="currentValue"
38
+ type="checkbox"
39
+ v-bind="$attrs"
40
+ class="toggle"
41
+ :disabled="disabled"
42
+ :class="{
43
+ validator,
44
+ 'toggle-neutral': neutral || color === 'neutral',
45
+ 'toggle-primary': primary || color === 'primary',
46
+ 'toggle-secondary': secondary || color === 'secondary',
47
+ 'toggle-accent': accent || color === 'accent',
48
+ 'toggle-success': success || color === 'success',
49
+ 'toggle-info': info || color === 'info',
50
+ 'toggle-warning': warning || color === 'warning',
51
+ 'toggle-error': error || color === 'error',
52
+ 'toggle-xs': xs || size === 'xs',
53
+ 'toggle-sm': sm || size === 'sm',
54
+ 'toggle-md': md || size === 'md',
55
+ 'toggle-lg': lg || size === 'lg',
56
+ 'toggle-xl': xl || size === 'xl',
57
+ 'theme-controller': themeController,
58
+ }"
59
+ />
60
+ </template>
@@ -0,0 +1,48 @@
1
+ <script setup lang="ts">
2
+ const props = defineProps<{
3
+ tip?: string | number
4
+ open?: boolean
5
+
6
+ color?: string
7
+ neutral?: boolean
8
+ primary?: boolean
9
+ secondary?: boolean
10
+ accent?: boolean
11
+ info?: boolean
12
+ success?: boolean
13
+ warning?: boolean
14
+ error?: boolean
15
+
16
+ position?: 'top' | 'right' | 'bottom' | 'left'
17
+ top?: boolean
18
+ right?: boolean
19
+ bottom?: boolean
20
+ left?: boolean
21
+ }>()
22
+ </script>
23
+
24
+ <template>
25
+ <div
26
+ :data-tip="tip"
27
+ class="tooltip"
28
+ :class="{
29
+ 'tooltip-open': props.open,
30
+
31
+ 'tooltip-top': props.top || props.position === 'top',
32
+ 'tooltip-bottom': props.bottom || props.position === 'bottom',
33
+ 'tooltip-left': props.left || props.position === 'left',
34
+ 'tooltip-right': props.right || props.position === 'right',
35
+
36
+ 'tooltip-neutral': props.neutral || props.color === 'neutral',
37
+ 'tooltip-primary': props.primary || props.color === 'primary',
38
+ 'tooltip-secondary': props.secondary || props.color === 'secondary',
39
+ 'tooltip-accent': props.accent || props.color === 'accent',
40
+ 'tooltip-info': props.info || props.color === 'info',
41
+ 'tooltip-success': props.success || props.color === 'success',
42
+ 'tooltip-warning': props.warning || props.color === 'warning',
43
+ 'tooltip-error': props.error || props.color === 'error',
44
+ }"
45
+ >
46
+ <slot />
47
+ </div>
48
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div class="tooltip-content">
3
+ <slot />
4
+ </div>
5
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <span class="validator-hint">
3
+ <slot />
4
+ </span>
5
+ </template>
@@ -14,19 +14,21 @@ export interface Drawers {
14
14
  export const drawers = reactive<Drawers>({})
15
15
 
16
16
  export function createDrawerState(name: string) {
17
- const drawerState = drawers[name] || reactive<DrawerState>({
18
- name,
19
- isDrawerOpen: false,
20
- openDrawer() {
21
- drawerState.isDrawerOpen = true
22
- },
23
- closeDrawer() {
24
- drawerState.isDrawerOpen = false
25
- },
26
- toggleDrawer() {
27
- drawerState.isDrawerOpen = !drawerState.isDrawerOpen
28
- },
29
- })
17
+ const drawerState =
18
+ drawers[name] ||
19
+ reactive<DrawerState>({
20
+ name,
21
+ isDrawerOpen: false,
22
+ openDrawer() {
23
+ drawerState.isDrawerOpen = true
24
+ },
25
+ closeDrawer() {
26
+ drawerState.isDrawerOpen = false
27
+ },
28
+ toggleDrawer() {
29
+ drawerState.isDrawerOpen = !drawerState.isDrawerOpen
30
+ },
31
+ })
30
32
  drawers[name] = drawerState
31
33
  return drawerState
32
34
  }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Maps placement values to CSS position-area values for anchor positioning
3
+ *
4
+ * Using span to align edges:
5
+ * - "bottom span-right" = below anchor, aligned to left edge (spans from left to center)
6
+ * - "bottom span-left" = below anchor, aligned to right edge (spans from center to right)
7
+ */
8
+ export function getPositionArea(placement: string): string {
9
+ const positionMap: Record<string, string> = {
10
+ // Top positions
11
+ top: 'top', // centered above
12
+ 'top-start': 'top span-right', // above, left edge aligned
13
+ 'top-end': 'top span-left', // above, right edge aligned
14
+
15
+ // Right positions
16
+ right: 'center right', // centered to right
17
+ 'right-start': 'right span-bottom', // right, top edge aligned
18
+ 'right-end': 'right span-top', // right, bottom edge aligned
19
+
20
+ // Bottom positions (most common for dropdowns)
21
+ bottom: 'center bottom', // centered below
22
+ 'bottom-start': 'bottom span-right', // below, left edge aligned
23
+ 'bottom-end': 'bottom span-left', // below, right edge aligned
24
+
25
+ // Left positions
26
+ left: 'center left', // centered to left
27
+ 'left-start': 'left span-bottom', // left, top edge aligned
28
+ 'left-end': 'left span-top', // left, bottom edge aligned
29
+ }
30
+
31
+ return positionMap[placement] || 'bottom span-right'
32
+ }
33
+
34
+ /**
35
+ * Gets position-try-fallbacks for automatic repositioning
36
+ */
37
+ export function getPositionFallbacks(placement: string): string {
38
+ // Use flip-block and flip-inline to automatically flip positions
39
+ // when there's not enough room in the preferred direction
40
+ return 'flip-block, flip-inline'
41
+ }
package/nuxt.js CHANGED
@@ -14,9 +14,15 @@ export default defineNuxtModule({
14
14
 
15
15
  nuxt.hook('components:dirs', (dirs) => {
16
16
  dirs.push({
17
- path: fileURLToPath(new URL('./components', import.meta.url)),
17
+ path: fileURLToPath(new URL('./app/components', import.meta.url)),
18
18
  prefix,
19
19
  })
20
20
  })
21
+
22
+ nuxt.hook('composables:dirs', (dirs) => {
23
+ dirs.push({
24
+ path: fileURLToPath(new URL('./app/composables-docs', import.meta.url)),
25
+ })
26
+ })
21
27
  },
22
28
  })
package/package.json CHANGED
@@ -1,80 +1,79 @@
1
1
  {
2
2
  "name": "daisy-ui-kit",
3
- "version": "3.0.12",
4
- "description": "Start with DaisyUI CSS and Sprinkle in TypeScript and A11y.",
5
- "author": "Marshall Thompson",
6
- "license": "MIT",
7
- "homepage": "https://daisyuikit.com",
8
- "repository": {
9
- "type": "git",
10
- "url": "https://github.com/marshallswain/daisy-ui-kit"
3
+ "type": "module",
4
+ "version": "5.0.0-pre.11",
5
+ "packageManager": "pnpm@10.10.0",
6
+ "exports": {
7
+ ".": {
8
+ "import": "./nuxt.js",
9
+ "require": "./nuxt.js"
10
+ },
11
+ "./nuxt": {
12
+ "import": "./nuxt.js",
13
+ "require": "./nuxt.js"
14
+ },
15
+ "./components/*": "./app/components/*",
16
+ "./utils/*": "./app/utils/*"
11
17
  },
12
- "main": "index.ts",
18
+ "main": "./nuxt.js",
19
+ "module": "./nuxt.js",
13
20
  "files": [
14
- "components/*.vue",
15
- "components/Mask.config.ts",
16
- "utils/*",
21
+ "app/components/*.vue",
22
+ "app/utils/*",
17
23
  "nuxt.js"
18
24
  ],
19
25
  "scripts": {
20
- "generate": "nuxi generate",
21
- "build": "nuxi build",
22
- "dev": "nuxi dev",
23
- "start": "node .output/server/index.mjs",
24
- "lint": "eslint .",
26
+ "import-d1-dumps": "./import-d1-dumps.sh",
27
+ "build": "nuxt build",
28
+ "dev": "nuxt dev",
29
+ "lint": "eslint",
30
+ "lint:fix": "eslint --fix",
31
+ "generate": "nuxt generate",
32
+ "preview": "nuxt preview",
33
+ "postinstall": "nuxt prepare",
25
34
  "publish": "git push origin --tags && git push origin",
26
35
  "release:pre": "npm version prerelease && npm publish --tag pre",
27
36
  "release:patch": "npm version patch && npm publish",
28
37
  "release:minor": "npm version minor && npm publish",
29
- "release:major": "npm version major && npm publish"
38
+ "release:major": "npm version major && npm publish",
39
+ "deploy": "pnpm run build && npx wrangler pages deploy dist"
30
40
  },
31
41
  "peerDependencies": {
32
- "@vueuse/core": "^10.2.1",
33
- "daisyui": "^3",
34
- "prismjs": "^1.29.0"
42
+ "@vueuse/core": "^13.1.0",
43
+ "daisyui": "^5"
35
44
  },
36
45
  "dependencies": {
37
- "@floating-ui/vue": "^1.0.2",
38
- "@vueuse/integrations": "^10.4.0",
39
- "focus-trap": "^7.5.2"
40
- },
41
- "optionalPeerDependencies": {
42
- "prismjs": "^1.29.0"
46
+ "@nuxt/content": "3.5.1",
47
+ "@nuxt/eslint": "1.3.0",
48
+ "@nuxt/fonts": "0.11.2",
49
+ "@nuxt/icon": "1.12.0",
50
+ "@nuxt/image": "1.10.0",
51
+ "@nuxt/kit": "^4.2.1",
52
+ "@nuxt/scripts": "0.11.6",
53
+ "@nuxt/test-utils": "3.18.0",
54
+ "@oddbird/css-anchor-positioning": "^0.7.0",
55
+ "@unhead/vue": "^2.0.8",
56
+ "@vueuse/core": "^13.1.0",
57
+ "@vueuse/integrations": "^13.1.0",
58
+ "focus-trap": "^7.6.4",
59
+ "nuxt": "^4.2.1",
60
+ "pikaday": "^1.8.2",
61
+ "shiki": "^3.3.0",
62
+ "typescript": "^5.8.3",
63
+ "vue": "^3.5.13",
64
+ "vue-router": "^4.5.1",
65
+ "zod": "^3.24.4"
43
66
  },
44
67
  "devDependencies": {
45
- "@antfu/eslint-config": "^0.41.0",
46
- "@headlessui/vue": "^1.7.16",
47
- "@heroicons/vue": "^2.0.18",
48
- "@iconify/json": "^2.2.106",
49
- "@nuxt/content": "^2.7.2",
50
- "@nuxt/devtools": "^2.0.0",
51
- "@nuxt/kit": "link:@nuxt/kit",
52
- "@nuxtjs/color-mode": "^3.3.0",
53
- "@nuxtjs/tailwindcss": "^6.8.0",
54
- "@pinia/nuxt": "^0.4.11",
55
- "@popperjs/core": "^2.11.8",
56
- "@rovit/popper": "^3.9.0",
57
- "@tailwindcss/aspect-ratio": "^0.4.2",
58
- "@tailwindcss/forms": "^0.5.5",
59
- "@tailwindcss/line-clamp": "^0.4.4",
60
- "@tailwindcss/typography": "^0.5.9",
61
- "@vueuse/core": "^10.3.0",
62
- "@vueuse/nuxt": "^10.3.0",
63
- "autoprefixer": "^10.4.15",
64
- "cookie": "^0.5.0",
65
- "daisyui": "^3.6.3",
66
- "eslint": "^8.48.0",
67
- "feathers-pinia": "^4.0.0",
68
- "fuse.js": "^6.6.2",
69
- "mobile-detect": "^1.4.5",
70
- "nuxt": "^3.6.5",
71
- "nuxt-icon": "^0.5.0",
72
- "ohmyfetch": "^0.4.21",
73
- "pinia": "^2.1.6",
74
- "postcss": "^8.4.28",
75
- "tailwindcss": "^3.3.3",
76
- "typescript": "^5.2.2",
77
- "unplugin-icons": "^0.16.5",
78
- "vue": "^3.3.4"
68
+ "@antfu/eslint-config": "^4.12.0",
69
+ "@stylistic/eslint-plugin": "^4.2.0",
70
+ "@tailwindcss/typography": "^0.5.16",
71
+ "@tailwindcss/vite": "^4.1.5",
72
+ "@types/pikaday": "^1.7.9",
73
+ "daisyui": "^5.5.5",
74
+ "eslint": "^9.26.0",
75
+ "eslint-config-prettier": "^10.1.8",
76
+ "eslint-plugin-vue": "^10.5.1",
77
+ "tailwindcss": "^4.1.5"
79
78
  }
80
79
  }
@@ -1,29 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, provide, ref, watch } from 'vue'
3
-
4
- const props = defineProps<{
5
- modelValue?: string | number
6
- }>()
7
- const emit = defineEmits(['update:modelValue'])
8
-
9
- const _value = ref(props.modelValue)
10
- watch(() => props.modelValue, (val) => {
11
- _value.value = val
12
- })
13
- const value = computed({
14
- get: () => _value.value,
15
- set: (val) => {
16
- _value.value = val
17
- if (props.modelValue !== val)
18
- emit('update:modelValue', val)
19
- },
20
- })
21
-
22
- provide('accordion-value', value)
23
- </script>
24
-
25
- <template>
26
- <div class="daisy-ui-kit-accordion">
27
- <slot />
28
- </div>
29
- </template>
@@ -1,25 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props: any = defineProps<{
5
- type?: string
6
- info?: boolean
7
- success?: boolean
8
- warning?: boolean
9
- error?: boolean
10
- }>()
11
- const classes = computed(() => {
12
- return {
13
- 'alert-info': props.info || props.type === 'info',
14
- 'alert-success': props.success || props.type === 'success',
15
- 'alert-warning': props.warning || props.type === 'warning',
16
- 'alert-error': props.error || props.type === 'error',
17
- }
18
- })
19
- </script>
20
-
21
- <template>
22
- <div class="alert" :class="classes">
23
- <slot />
24
- </div>
25
- </template>
@@ -1,33 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = defineProps<{
5
- demo?: boolean
6
- horizontal?: boolean
7
- size?: string
8
- phone1?: boolean
9
- phone2?: boolean
10
- phone3?: boolean
11
- phone4?: boolean
12
- phone5?: boolean
13
- phone6?: boolean
14
- }>()
15
- const classes = computed(() => {
16
- return {
17
- 'artboard-demo': props.demo,
18
- 'horizontal': props.horizontal,
19
- 'phone-1': props.phone1 || props.size === 'phone-1',
20
- 'phone-2': props.phone2 || props.size === 'phone-2',
21
- 'phone-3': props.phone3 || props.size === 'phone-3',
22
- 'phone-4': props.phone4 || props.size === 'phone-4',
23
- 'phone-5': props.phone5 || props.size === 'phone-5',
24
- 'phone-6': props.phone6 || props.size === 'phone-6',
25
- }
26
- })
27
- </script>
28
-
29
- <template>
30
- <div class="artboard" :class="classes">
31
- <slot />
32
- </div>
33
- </template>