daisy-ui-kit 5.0.0-pre.4 → 5.0.0-pre.6

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 (133) hide show
  1. package/app/components/Accordion.vue +26 -0
  2. package/app/components/Alert.vue +35 -0
  3. package/app/components/Avatar.vue +128 -0
  4. package/app/components/AvatarGroup.vue +18 -0
  5. package/app/components/Badge.vue +54 -0
  6. package/app/components/Breadcrumbs.vue +7 -0
  7. package/app/components/Button.vue +113 -0
  8. package/app/components/Calendar.vue +66 -0
  9. package/app/components/CalendarInput.vue +176 -0
  10. package/app/components/CalendarSkeleton.vue +46 -0
  11. package/app/components/Card.vue +33 -0
  12. package/app/components/CardActions.vue +13 -0
  13. package/app/components/CardBody.vue +13 -0
  14. package/app/components/CardTitle.vue +11 -0
  15. package/app/components/Carousel.vue +23 -0
  16. package/app/components/CarouselItem.vue +5 -0
  17. package/app/components/Chat.vue +21 -0
  18. package/app/components/ChatBubble.vue +31 -0
  19. package/app/components/ChatFooter.vue +5 -0
  20. package/app/components/ChatHeader.vue +5 -0
  21. package/app/components/ChatImage.vue +5 -0
  22. package/app/components/Checkbox.vue +49 -0
  23. package/app/components/Collapse.vue +43 -0
  24. package/app/components/CollapseContent.vue +5 -0
  25. package/app/components/CollapseTitle.vue +5 -0
  26. package/app/components/Countdown.vue +15 -0
  27. package/app/components/CountdownTimers.vue +72 -0
  28. package/app/components/Counter.vue +10 -0
  29. package/app/components/Crumb.vue +5 -0
  30. package/app/components/DaisyLink.vue +38 -0
  31. package/app/components/Diff.vue +11 -0
  32. package/app/components/Divider.vue +43 -0
  33. package/app/components/Dock.vue +58 -0
  34. package/app/components/DockItem.vue +25 -0
  35. package/app/components/DockLabel.vue +5 -0
  36. package/app/components/Drawer.vue +47 -0
  37. package/app/components/DrawerContent.vue +17 -0
  38. package/app/components/DrawerSide.vue +18 -0
  39. package/app/components/Dropdown.vue +95 -0
  40. package/app/components/DropdownButton.vue +16 -0
  41. package/app/components/DropdownContent.vue +57 -0
  42. package/app/components/DropdownTarget.vue +14 -0
  43. package/app/components/Fieldset.vue +19 -0
  44. package/app/components/FileInput.vue +53 -0
  45. package/app/components/Filter.vue +122 -0
  46. package/app/components/Flex.vue +82 -0
  47. package/app/components/FlexItem.vue +59 -0
  48. package/app/components/Footer.vue +27 -0
  49. package/app/components/FooterTitle.vue +15 -0
  50. package/app/components/FormControl.vue +5 -0
  51. package/app/components/Hero.vue +15 -0
  52. package/app/components/HeroContent.vue +15 -0
  53. package/app/components/HeroOverlay.vue +5 -0
  54. package/app/components/Indicator.vue +13 -0
  55. package/app/components/IndicatorItem.vue +36 -0
  56. package/app/components/Input.vue +102 -0
  57. package/app/components/Join.vue +5 -0
  58. package/app/components/Kbd.vue +24 -0
  59. package/app/components/Label.vue +61 -0
  60. package/app/components/List.vue +5 -0
  61. package/app/components/ListColGrow.vue +5 -0
  62. package/app/components/ListColWrap.vue +5 -0
  63. package/app/components/ListRow.vue +5 -0
  64. package/app/components/LoadingBall.vue +42 -0
  65. package/app/components/LoadingBars.vue +42 -0
  66. package/app/components/LoadingDots.vue +42 -0
  67. package/app/components/LoadingInfinity.vue +42 -0
  68. package/app/components/LoadingRing.vue +42 -0
  69. package/app/components/LoadingSpinner.vue +42 -0
  70. package/app/components/Mask.vue +49 -0
  71. package/app/components/Menu.vue +30 -0
  72. package/app/components/MenuExpand.vue +100 -0
  73. package/app/components/MenuExpandToggle.vue +14 -0
  74. package/app/components/MenuItem.vue +37 -0
  75. package/app/components/MenuTitle.vue +5 -0
  76. package/app/components/MockupBrowser.vue +5 -0
  77. package/app/components/MockupBrowserToolbar.vue +5 -0
  78. package/app/components/MockupCode.vue +4 -0
  79. package/app/components/MockupPhone.vue +8 -0
  80. package/app/components/MockupWindow.vue +5 -0
  81. package/app/components/Modal.vue +57 -0
  82. package/app/components/ModalAction.vue +5 -0
  83. package/app/components/ModalBox.vue +5 -0
  84. package/app/components/NavButton.vue +12 -0
  85. package/app/components/Navbar.vue +12 -0
  86. package/app/components/NavbarCenter.vue +11 -0
  87. package/app/components/NavbarEnd.vue +11 -0
  88. package/app/components/NavbarStart.vue +11 -0
  89. package/app/components/Progress.vue +34 -0
  90. package/app/components/Prose.vue +32 -0
  91. package/app/components/RadialProgress.vue +36 -0
  92. package/app/components/Radio.vue +67 -0
  93. package/app/components/RadioGroup.vue +47 -0
  94. package/app/components/Range.vue +61 -0
  95. package/app/components/RangeMeasure.vue +84 -0
  96. package/app/components/RangeMeasureTick.vue +70 -0
  97. package/app/components/Rating.vue +180 -0
  98. package/app/components/Select.vue +104 -0
  99. package/app/components/Skeleton.vue +5 -0
  100. package/app/components/Stack.vue +25 -0
  101. package/app/components/Stat.vue +19 -0
  102. package/app/components/StatActions.vue +5 -0
  103. package/app/components/StatDesc.vue +5 -0
  104. package/app/components/StatFigure.vue +5 -0
  105. package/app/components/StatTitle.vue +5 -0
  106. package/app/components/StatValue.vue +5 -0
  107. package/app/components/Stats.vue +5 -0
  108. package/app/components/Status.vue +43 -0
  109. package/app/components/Step.vue +34 -0
  110. package/app/components/StepIcon.vue +5 -0
  111. package/app/components/Steps.vue +18 -0
  112. package/app/components/Swap.vue +62 -0
  113. package/app/components/Tab.vue +38 -0
  114. package/app/components/TabContent.vue +29 -0
  115. package/app/components/Table.vue +32 -0
  116. package/app/components/Tabs.vue +53 -0
  117. package/app/components/Text.vue +142 -0
  118. package/app/components/TextArea.vue +61 -0
  119. package/app/components/Timeline.vue +22 -0
  120. package/app/components/TimelineEnd.vue +14 -0
  121. package/app/components/TimelineItem.vue +5 -0
  122. package/app/components/TimelineLine.vue +29 -0
  123. package/app/components/TimelineMiddle.vue +5 -0
  124. package/app/components/TimelineStart.vue +13 -0
  125. package/app/components/Toast.vue +29 -0
  126. package/app/components/Toggle.vue +58 -0
  127. package/app/components/Tooltip.vue +47 -0
  128. package/app/components/TooltipContent.vue +5 -0
  129. package/app/components/ValidatorHint.vue +5 -0
  130. package/app/utils/drawer-utils.ts +32 -0
  131. package/app/utils/random-string.ts +19 -0
  132. package/nuxt.js +22 -0
  133. package/package.json +5 -4
@@ -0,0 +1,53 @@
1
+ <script setup lang="ts">
2
+ import { provide } from 'vue'
3
+
4
+ const { name } = defineProps<{
5
+ is?: any
6
+ name: string
7
+
8
+ variant?: 'box' | 'border' | 'lift'
9
+ box?: boolean
10
+ border?: boolean
11
+ lift?: boolean
12
+
13
+ placement?: 'top' | 'bottom'
14
+ top?: boolean
15
+ bottom?: boolean
16
+
17
+ size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
18
+ xl?: boolean
19
+ lg?: boolean
20
+ md?: boolean
21
+ sm?: boolean
22
+ xs?: boolean
23
+ }>()
24
+
25
+ const currentTab = defineModel<string>('currentTab')
26
+
27
+ const tabManager = {
28
+ name,
29
+ currentTab,
30
+ tabs: [],
31
+ }
32
+ provide('tabManager', tabManager)
33
+ </script>
34
+
35
+ <template>
36
+ <div
37
+ class="tabs"
38
+ :class="{
39
+ 'tabs-box': variant === 'box' || box,
40
+ 'tabs-border': variant === 'border' || border,
41
+ 'tabs-lift': variant === 'lift' || lift,
42
+ 'tabs-top': placement === 'top' || top,
43
+ 'tabs-bottom': placement === 'bottom' || bottom,
44
+ 'tabs-xl': size === 'xl' || xl,
45
+ 'tabs-lg': size === 'lg' || lg,
46
+ 'tabs-md': size === 'md' || md,
47
+ 'tabs-sm': size === 'sm' || sm,
48
+ 'tabs-xs': size === 'xs' || xs,
49
+ }"
50
+ >
51
+ <slot />
52
+ </div>
53
+ </template>
@@ -0,0 +1,142 @@
1
+ <script setup lang="ts">
2
+ const props = defineProps<{
3
+ is?: string
4
+ join?: boolean
5
+
6
+ block?: boolean
7
+ inline?: boolean
8
+ inlineBlock?: boolean
9
+ label?: boolean
10
+
11
+ color?: | 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'primary-content' | 'secondary-content' | 'neutral-content' | 'accent-content' | 'info-content' | 'success-content' | 'warning-content' | 'error-content'
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
+ neutralContent?: boolean
21
+ primaryContent?: boolean
22
+ secondaryContent?: boolean
23
+ accentContent?: boolean
24
+ infoContent?: boolean
25
+ successContent?: boolean
26
+ warningContent?: boolean
27
+ errorContent?: boolean
28
+
29
+ size?: | '9xl' | '8xl' | '7xl' | '6xl' | '5xl' | '4xl' | '3xl' | '2xl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs'
30
+ xl?: boolean
31
+ lg?: boolean
32
+ md?: boolean
33
+ sm?: boolean
34
+ xs?: boolean
35
+
36
+ align?: 'left' | 'center' | 'right' | 'justify'
37
+ left?: boolean
38
+ center?: boolean
39
+ right?: boolean
40
+ justify?: boolean
41
+
42
+ case?: 'upper' | 'lower' | 'capitalize' | 'normal'
43
+ uppercase?: boolean
44
+ lowercase?: boolean
45
+ capitalize?: boolean
46
+ normalCase?: boolean
47
+
48
+ font?: 'sans' | 'serif' | 'mono'
49
+ sans?: boolean
50
+ serif?: boolean
51
+ mono?: boolean
52
+
53
+ weight?: | 'thin' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black'
54
+ thin?: boolean
55
+ extralight?: boolean
56
+ light?: boolean
57
+ normal?: boolean
58
+ medium?: boolean
59
+ semibold?: boolean
60
+ bold?: boolean
61
+ extrabold?: boolean
62
+ black?: boolean
63
+ }>()
64
+ </script>
65
+
66
+ <template>
67
+ <component
68
+ :is="is || 'span'"
69
+ v-bind="label ? { 'data-role': 'label' } : {}"
70
+ :class="{
71
+ 'join-item': join,
72
+
73
+ 'block': block,
74
+ 'inline': inline,
75
+ 'inline-block': inlineBlock,
76
+ 'label': label,
77
+
78
+ 'text-primary': primary || color === 'primary',
79
+ 'text-primary-content':
80
+ primaryContent || color === 'primary-content',
81
+ 'text-secondary': secondary || color === 'secondary',
82
+ 'text-secondary-content':
83
+ secondaryContent || color === 'secondary-content',
84
+ 'text-neutral': neutral || color === 'neutral',
85
+ 'text-neutral-content':
86
+ neutralContent || color === 'neutral-content',
87
+ 'text-accent': accent || color === 'accent',
88
+ 'text-accent-content':
89
+ accentContent || color === 'accent-content',
90
+ 'text-info': info || color === 'info',
91
+ 'text-info-content': infoContent || color === 'info-content',
92
+ 'text-success': success || color === 'success',
93
+ 'text-success-content':
94
+ successContent || color === 'success-content',
95
+ 'text-warning': warning || color === 'warning',
96
+ 'text-warning-content':
97
+ warningContent || color === 'warning-content',
98
+ 'text-error': error || color === 'error',
99
+ 'text-error-content': errorContent || color === 'error-content',
100
+
101
+ 'text-9xl': size === '9xl',
102
+ 'text-8xl': size === '8xl',
103
+ 'text-7xl': size === '7xl',
104
+ 'text-6xl': size === '6xl',
105
+ 'text-5xl': size === '5xl',
106
+ 'text-4xl': size === '4xl',
107
+ 'text-3xl': size === '3xl',
108
+ 'text-2xl': size === '2xl',
109
+ 'text-xl': xl || size === 'xl',
110
+ 'text-lg': lg || size === 'lg',
111
+ 'text-md': md || size === 'md',
112
+ 'text-sm': sm || size === 'sm',
113
+ 'text-xs': xs || size === 'xs',
114
+
115
+ 'text-left': left || align === 'left',
116
+ 'text-center': center || align === 'center',
117
+ 'text-right': right || align === 'right',
118
+ 'text-justify': justify || align === 'justify',
119
+
120
+ 'uppercase': uppercase || props.case === 'upper',
121
+ 'lowercase': lowercase || props.case === 'lower',
122
+ 'capitalize': capitalize || props.case === 'capitalize',
123
+ 'normal-case': normalCase || props.case === 'normal',
124
+
125
+ 'font-sans': sans || font === 'sans',
126
+ 'font-serif': serif || font === 'serif',
127
+ 'font-mono': mono || font === 'mono',
128
+
129
+ 'font-thin': thin || weight === 'thin',
130
+ 'font-extralight': extralight || weight === 'extralight',
131
+ 'font-light': light || weight === 'light',
132
+ 'font-normal': normal || weight === 'normal',
133
+ 'font-medium': medium || weight === 'medium',
134
+ 'font-semibold': semibold || weight === 'semibold',
135
+ 'font-bold': bold || weight === 'bold',
136
+ 'font-extrabold': extrabold || weight === 'extrabold',
137
+ 'font-black': black || weight === 'black',
138
+ }"
139
+ >
140
+ <slot />
141
+ </component>
142
+ </template>
@@ -0,0 +1,61 @@
1
+ <script setup lang="ts">
2
+ const props = withDefaults(defineProps<{
3
+ modelValue?: string
4
+ placeholder?: string
5
+ type?: 'text' | 'phone' | 'email' | 'search'
6
+
7
+ color?: string
8
+ neutral?: boolean
9
+ primary?: boolean
10
+ secondary?: boolean
11
+ accent?: boolean
12
+ info?: boolean
13
+ success?: boolean
14
+ warning?: boolean
15
+ error?: boolean
16
+
17
+ ghost?: boolean
18
+ disabled?: boolean
19
+ validator?: 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
+ }>(), {
28
+ type: 'text',
29
+ })
30
+ defineEmits(['update:modelValue'])
31
+ </script>
32
+
33
+ <template>
34
+ <textarea
35
+ :value="modelValue"
36
+ :type="type"
37
+ :placeholder="placeholder"
38
+ :disabled="disabled"
39
+ class="textarea"
40
+ :class="{
41
+ 'textarea-neutral': props.neutral || props.color === 'neutral',
42
+ 'textarea-primary': props.primary || props.color === 'primary',
43
+ 'textarea-secondary': props.secondary || props.color === 'secondary',
44
+ 'textarea-accent': props.accent || props.color === 'accent',
45
+ 'textarea-info': props.info || props.color === 'info',
46
+ 'textarea-success': props.success || props.color === 'success',
47
+ 'textarea-warning': props.warning || props.color === 'warning',
48
+ 'textarea-error': props.error || props.color === 'error',
49
+
50
+ 'textarea-ghost': props.ghost,
51
+ 'validator': props.validator,
52
+
53
+ 'textarea-xl': props.xl || props.size === 'xl',
54
+ 'textarea-lg': props.lg || props.size === 'lg',
55
+ 'textarea-md': props.md || props.size === 'md',
56
+ 'textarea-sm': props.sm || props.size === 'sm',
57
+ 'textarea-xs': props.xs || props.size === 'xs',
58
+ }"
59
+ @input="(event) => $emit('update:modelValue', (event.target as HTMLTextAreaElement).value)"
60
+ />
61
+ </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,13 @@
1
+ <script setup lang="ts">
2
+ defineProps<{ box?: boolean }>()
3
+ </script>
4
+
5
+ <template>
6
+ <div
7
+ class="timeline-start" :class="{
8
+ 'timeline-box': box,
9
+ }"
10
+ >
11
+ <slot />
12
+ </div>
13
+ </template>
@@ -0,0 +1,29 @@
1
+ <script setup lang="ts">
2
+ defineProps<{
3
+ hAlign?: 'start' | 'center' | 'end'
4
+ start?: boolean
5
+ center?: boolean
6
+ end?: boolean
7
+
8
+ vAlign?: 'top' | 'middle' | 'bottom'
9
+ top?: boolean
10
+ middle?: boolean
11
+ bottom?: boolean
12
+ }>()
13
+ </script>
14
+
15
+ <template>
16
+ <div
17
+ class="toast"
18
+ :class="{
19
+ 'toast-start': start || hAlign === 'start',
20
+ 'toast-center': center || hAlign === 'center',
21
+ 'toast-end': end || hAlign === 'end',
22
+ 'toast-top': top || vAlign === 'top',
23
+ 'toast-middle': middle || vAlign === 'middle',
24
+ 'toast-bottom': bottom || vAlign === 'bottom',
25
+ }"
26
+ >
27
+ <slot />
28
+ </div>
29
+ </template>
@@ -0,0 +1,58 @@
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
+
9
+ color?: string
10
+ neutral?: boolean
11
+ primary?: boolean
12
+ secondary?: boolean
13
+ accent?: boolean
14
+ success?: boolean
15
+ info?: boolean
16
+ warning?: boolean
17
+ error?: boolean
18
+
19
+ size?: string
20
+ xs?: boolean
21
+ sm?: boolean
22
+ md?: boolean
23
+ lg?: boolean
24
+ xl?: boolean
25
+ }>()
26
+ const emit = defineEmits(['update:modelValue'])
27
+
28
+ const currentValue = computed({
29
+ get: () => props.modelValue,
30
+ set: (val: string) => emit('update:modelValue', val),
31
+ })
32
+ </script>
33
+
34
+ <template>
35
+ <input
36
+ v-model="currentValue"
37
+ type="checkbox"
38
+ v-bind="$attrs"
39
+ class="toggle"
40
+ :disabled="disabled"
41
+ :class="{
42
+ 'validator': validator,
43
+ 'toggle-neutral': neutral || color === 'neutral',
44
+ 'toggle-primary': primary || color === 'primary',
45
+ 'toggle-secondary': secondary || color === 'secondary',
46
+ 'toggle-accent': accent || color === 'accent',
47
+ 'toggle-success': success || color === 'success',
48
+ 'toggle-info': info || color === 'info',
49
+ 'toggle-warning': warning || color === 'warning',
50
+ 'toggle-error': error || color === 'error',
51
+ 'toggle-xs': xs || size === 'xs',
52
+ 'toggle-sm': sm || size === 'sm',
53
+ 'toggle-md': md || size === 'md',
54
+ 'toggle-lg': lg || size === 'lg',
55
+ 'toggle-xl': xl || size === 'xl',
56
+ }"
57
+ >
58
+ </template>
@@ -0,0 +1,47 @@
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" :class="{
28
+ 'tooltip-open': props.open,
29
+
30
+ 'tooltip-top': props.top || props.position === 'top',
31
+ 'tooltip-bottom': props.bottom || props.position === 'bottom',
32
+ 'tooltip-left': props.left || props.position === 'left',
33
+ 'tooltip-right': props.right || props.position === 'right',
34
+
35
+ 'tooltip-neutral': props.neutral || props.color === 'neutral',
36
+ 'tooltip-primary': props.primary || props.color === 'primary',
37
+ 'tooltip-secondary': props.secondary || props.color === 'secondary',
38
+ 'tooltip-accent': props.accent || props.color === 'accent',
39
+ 'tooltip-info': props.info || props.color === 'info',
40
+ 'tooltip-success': props.success || props.color === 'success',
41
+ 'tooltip-warning': props.warning || props.color === 'warning',
42
+ 'tooltip-error': props.error || props.color === 'error',
43
+ }"
44
+ >
45
+ <slot />
46
+ </div>
47
+ </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>
@@ -0,0 +1,32 @@
1
+ import { reactive } from 'vue'
2
+
3
+ export interface DrawerState {
4
+ name: string
5
+ isDrawerOpen: boolean
6
+ openDrawer: () => void
7
+ closeDrawer: () => void
8
+ toggleDrawer: () => void
9
+ }
10
+ export interface Drawers {
11
+ [key: string]: DrawerState
12
+ }
13
+
14
+ export const drawers = reactive<Drawers>({})
15
+
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
+ })
30
+ drawers[name] = drawerState
31
+ return drawerState
32
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Generate a random string of `length` characters
3
+ *
4
+ * Usage:
5
+ * const myString = randomString(15); // This will give you a random string of 15 characters
6
+ * @param length The length of the string to generate
7
+ * @returns A random string of `length` characters
8
+ */
9
+ export function randomString(length: number = 10): string {
10
+ const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
11
+ let result = ''
12
+
13
+ for (let i = 0; i < length; i++) {
14
+ const randomIndex = Math.floor(Math.random() * characters.length)
15
+ result += characters[randomIndex]
16
+ }
17
+
18
+ return result
19
+ }
package/nuxt.js ADDED
@@ -0,0 +1,22 @@
1
+ import { fileURLToPath } from 'node:url'
2
+ import { defineNuxtModule } from '@nuxt/kit'
3
+
4
+ export default defineNuxtModule({
5
+ meta: {
6
+ name: 'daisy-ui-kit',
7
+ configKey: 'daisy',
8
+ },
9
+ defaults: {
10
+ prefix: '',
11
+ },
12
+ setup(moduleOptions, nuxt) {
13
+ const { prefix } = moduleOptions
14
+
15
+ nuxt.hook('components:dirs', (dirs) => {
16
+ dirs.push({
17
+ path: fileURLToPath(new URL('./components', import.meta.url)),
18
+ prefix,
19
+ })
20
+ })
21
+ },
22
+ })
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "daisy-ui-kit",
3
3
  "type": "module",
4
- "version": "5.0.0-pre.4",
4
+ "version": "5.0.0-pre.6",
5
5
  "packageManager": "pnpm@10.9.0",
6
6
  "files": [
7
- "components/*.vue",
8
- "nuxt.js",
9
- "utils/*"
7
+ "app/components/*.vue",
8
+ "app/utils/*",
9
+ "nuxt.js"
10
10
  ],
11
11
  "scripts": {
12
12
  "build": "nuxt build",
@@ -33,6 +33,7 @@
33
33
  "@nuxt/fonts": "0.11.1",
34
34
  "@nuxt/icon": "1.12.0",
35
35
  "@nuxt/image": "1.10.0",
36
+ "@nuxt/kit": "^3.17.1",
36
37
  "@nuxt/scripts": "0.11.6",
37
38
  "@nuxt/test-utils": "3.17.2",
38
39
  "@unhead/vue": "^2.0.8",