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.
- package/README.md +62 -14
- package/app/components/Accordion.vue +29 -0
- package/app/components/Alert.vue +36 -0
- package/app/components/Avatar.vue +131 -0
- package/app/components/AvatarGroup.vue +22 -0
- package/app/components/Badge.vue +67 -0
- package/app/components/Button.vue +135 -0
- package/app/components/Calendar.vue +89 -0
- package/app/components/CalendarInput.vue +174 -0
- package/app/components/CalendarSkeleton.vue +87 -0
- package/app/components/Card.vue +46 -0
- package/{components → app/components}/CardActions.vue +2 -5
- package/{components → app/components}/CardBody.vue +2 -5
- package/{components → app/components}/CardTitle.vue +1 -6
- package/app/components/Carousel.vue +24 -0
- package/app/components/Chat.vue +26 -0
- package/app/components/ChatBubble.vue +31 -0
- package/app/components/Checkbox.vue +51 -0
- package/app/components/Collapse.vue +75 -0
- package/app/components/CollapseTitle.vue +15 -0
- package/{components → app/components}/Countdown.vue +1 -1
- package/app/components/CountdownTimers.vue +69 -0
- package/app/components/Counter.vue +21 -0
- package/app/components/DaisyLink.vue +52 -0
- package/app/components/Diff.vue +11 -0
- package/app/components/Divider.vue +43 -0
- package/app/components/Dock.vue +60 -0
- package/app/components/DockItem.vue +26 -0
- package/app/components/DockLabel.vue +5 -0
- package/{components → app/components}/Drawer.vue +17 -12
- package/{components → app/components}/DrawerContent.vue +8 -5
- package/{components → app/components}/DrawerSide.vue +8 -5
- package/app/components/Dropdown.vue +106 -0
- package/app/components/DropdownButton.vue +23 -0
- package/app/components/DropdownContent.vue +127 -0
- package/{components → app/components}/DropdownTarget.vue +9 -2
- package/app/components/Fab.vue +16 -0
- package/app/components/FabClose.vue +18 -0
- package/app/components/FabMainAction.vue +5 -0
- package/app/components/FabTrigger.vue +117 -0
- package/app/components/Fieldset.vue +16 -0
- package/app/components/FileInput.vue +53 -0
- package/app/components/Filter.vue +125 -0
- package/app/components/Flex.vue +84 -0
- package/{components → app/components}/FlexItem.vue +30 -27
- package/app/components/Footer.vue +31 -0
- package/{components → app/components}/FooterTitle.vue +8 -5
- package/app/components/FormControl.vue +5 -0
- package/{components → app/components}/Hero.vue +8 -5
- package/{components → app/components}/HeroContent.vue +8 -5
- package/app/components/Hover3D.vue +22 -0
- package/app/components/HoverGallery.vue +11 -0
- package/{components → app/components}/Indicator.vue +8 -5
- package/{components → app/components}/IndicatorItem.vue +16 -13
- package/app/components/Input.vue +126 -0
- package/app/components/Kbd.vue +25 -0
- package/app/components/Label.vue +100 -0
- package/{components/CollapseTitle.vue → app/components/List.vue} +1 -1
- package/{components/FormControl.vue → app/components/ListColGrow.vue} +1 -1
- package/app/components/ListColWrap.vue +5 -0
- package/{components/Stat.vue → app/components/ListRow.vue} +1 -1
- package/app/components/LoadingBall.vue +42 -0
- package/app/components/LoadingBars.vue +42 -0
- package/app/components/LoadingDots.vue +42 -0
- package/app/components/LoadingInfinity.vue +42 -0
- package/app/components/LoadingRing.vue +42 -0
- package/app/components/LoadingSpinner.vue +42 -0
- package/app/components/Mask.vue +49 -0
- package/app/components/Menu.vue +30 -0
- package/app/components/MenuExpand.vue +94 -0
- package/app/components/MenuExpandToggle.vue +20 -0
- package/{components → app/components}/MenuItem.vue +7 -6
- package/app/components/MockupPhone.vue +14 -0
- package/{components → app/components}/Modal.vue +28 -13
- package/app/components/NavButton.vue +12 -0
- package/{components → app/components}/Navbar.vue +3 -5
- package/{components → app/components}/NavbarCenter.vue +3 -5
- package/{components → app/components}/NavbarEnd.vue +3 -5
- package/{components → app/components}/NavbarStart.vue +3 -5
- package/app/components/Progress.vue +46 -0
- package/{components → app/components}/Prose.vue +8 -3
- package/app/components/RadialProgress.vue +36 -0
- package/app/components/Radio.vue +69 -0
- package/{components → app/components}/RadioGroup.vue +2 -1
- package/app/components/Range.vue +61 -0
- package/app/components/RangeMeasure.vue +87 -0
- package/{components → app/components}/RangeMeasureTick.vue +9 -14
- package/app/components/Rating.vue +197 -0
- package/app/components/Select.vue +101 -0
- package/app/components/Skeleton.vue +5 -0
- package/app/components/SkeletonText.vue +11 -0
- package/app/components/Stack.vue +25 -0
- package/app/components/Stat.vue +19 -0
- package/app/components/Status.vue +43 -0
- package/app/components/Step.vue +34 -0
- package/app/components/StepIcon.vue +5 -0
- package/app/components/Steps.vue +23 -0
- package/app/components/Swap.vue +56 -0
- package/app/components/Tab.vue +51 -0
- package/{components → app/components}/TabContent.vue +10 -10
- package/app/components/Table.vue +32 -0
- package/app/components/Tabs.vue +53 -0
- package/app/components/Text.vue +162 -0
- package/app/components/TextArea.vue +64 -0
- package/app/components/TextRotate.vue +24 -0
- package/app/components/ThemeController.vue +45 -0
- package/app/components/ThemeProvider.vue +302 -0
- package/app/components/ThemeTile.vue +50 -0
- package/app/components/Timeline.vue +22 -0
- package/app/components/TimelineEnd.vue +14 -0
- package/app/components/TimelineItem.vue +5 -0
- package/app/components/TimelineLine.vue +29 -0
- package/app/components/TimelineMiddle.vue +5 -0
- package/app/components/TimelineStart.vue +14 -0
- package/app/components/Toast.vue +67 -0
- package/app/components/Toggle.vue +60 -0
- package/app/components/Tooltip.vue +48 -0
- package/app/components/TooltipContent.vue +5 -0
- package/app/components/ValidatorHint.vue +5 -0
- package/{utils → app/utils}/drawer-utils.ts +15 -13
- package/app/utils/position-area.ts +41 -0
- package/nuxt.js +7 -1
- package/package.json +60 -61
- package/components/Accordion.vue +0 -29
- package/components/Alert.vue +0 -25
- package/components/Artboard.vue +0 -33
- package/components/Avatar.vue +0 -70
- package/components/AvatarGroup.vue +0 -19
- package/components/Badge.vue +0 -50
- package/components/BottomNav.vue +0 -25
- package/components/Button.vue +0 -111
- package/components/Card.vue +0 -30
- package/components/Carousel.vue +0 -25
- package/components/Chat.vue +0 -27
- package/components/ChatBubble.vue +0 -34
- package/components/Checkbox.vue +0 -55
- package/components/Code.vue +0 -92
- package/components/Collapse.vue +0 -54
- package/components/CountdownTimers.vue +0 -70
- package/components/Counter.vue +0 -14
- package/components/Divider.vue +0 -24
- package/components/Dropdown.vue +0 -95
- package/components/DropdownButton.vue +0 -16
- package/components/DropdownContent.vue +0 -56
- package/components/FileInput.vue +0 -59
- package/components/Flex.vue +0 -59
- package/components/Footer.vue +0 -24
- package/components/Kbd.vue +0 -25
- package/components/Label.vue +0 -15
- package/components/LabelText.vue +0 -15
- package/components/LabelTextAlt.vue +0 -15
- package/components/Link.vue +0 -40
- package/components/LoadingBall.vue +0 -43
- package/components/LoadingBars.vue +0 -43
- package/components/LoadingDots.vue +0 -43
- package/components/LoadingInfinity.vue +0 -43
- package/components/LoadingRing.vue +0 -43
- package/components/LoadingSpinner.vue +0 -43
- package/components/Mask.config.ts +0 -77
- package/components/Mask.vue +0 -14
- package/components/Menu.vue +0 -35
- package/components/MenuExpand.vue +0 -79
- package/components/MenuExpandToggle.vue +0 -13
- package/components/MockupPhone.vue +0 -8
- package/components/NavButton.vue +0 -20
- package/components/Progress.vue +0 -42
- package/components/RadialProgress.vue +0 -41
- package/components/Radio.vue +0 -76
- package/components/Range.vue +0 -60
- package/components/RangeMeasure.vue +0 -83
- package/components/Rating.vue +0 -167
- package/components/Select.vue +0 -100
- package/components/Stack.vue +0 -13
- package/components/Step.vue +0 -36
- package/components/Steps.vue +0 -21
- package/components/Swap.vue +0 -58
- package/components/Tab.vue +0 -48
- package/components/Tabs.vue +0 -77
- package/components/TabsManager.vue +0 -38
- package/components/Text.vue +0 -142
- package/components/TextArea.vue +0 -64
- package/components/TextInput.vue +0 -66
- package/components/Toast.vue +0 -31
- package/components/Toggle.vue +0 -59
- package/components/Tooltip.vue +0 -47
- package/index.ts +0 -108
- package/utils/-utils.ts +0 -41
- package/utils/Button.config.ts +0 -26
- package/utils/fixtures.ts +0 -62
- package/utils/types.ts +0 -7
- /package/{components → app/components}/Breadcrumbs.vue +0 -0
- /package/{components → app/components}/CarouselItem.vue +0 -0
- /package/{components → app/components}/ChatFooter.vue +0 -0
- /package/{components → app/components}/ChatHeader.vue +0 -0
- /package/{components → app/components}/ChatImage.vue +0 -0
- /package/{components → app/components}/CollapseContent.vue +0 -0
- /package/{components → app/components}/Crumb.vue +0 -0
- /package/{components → app/components}/HeroOverlay.vue +0 -0
- /package/{components → app/components}/Join.vue +0 -0
- /package/{components → app/components}/MenuTitle.vue +0 -0
- /package/{components → app/components}/MockupBrowser.vue +0 -0
- /package/{components → app/components}/MockupBrowserToolbar.vue +0 -0
- /package/{components → app/components}/MockupCode.vue +0 -0
- /package/{components → app/components}/MockupWindow.vue +0 -0
- /package/{components → app/components}/ModalAction.vue +0 -0
- /package/{components → app/components}/ModalBox.vue +0 -0
- /package/{components → app/components}/StatActions.vue +0 -0
- /package/{components → app/components}/StatDesc.vue +0 -0
- /package/{components → app/components}/StatFigure.vue +0 -0
- /package/{components → app/components}/StatTitle.vue +0 -0
- /package/{components → app/components}/StatValue.vue +0 -0
- /package/{components → app/components}/Stats.vue +0 -0
- /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,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,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>
|
|
@@ -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 =
|
|
18
|
-
name
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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": "
|
|
18
|
+
"main": "./nuxt.js",
|
|
19
|
+
"module": "./nuxt.js",
|
|
13
20
|
"files": [
|
|
14
|
-
"components/*.vue",
|
|
15
|
-
"
|
|
16
|
-
"utils/*",
|
|
21
|
+
"app/components/*.vue",
|
|
22
|
+
"app/utils/*",
|
|
17
23
|
"nuxt.js"
|
|
18
24
|
],
|
|
19
25
|
"scripts": {
|
|
20
|
-
"
|
|
21
|
-
"build": "
|
|
22
|
-
"dev": "
|
|
23
|
-
"
|
|
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": "^
|
|
33
|
-
"daisyui": "^
|
|
34
|
-
"prismjs": "^1.29.0"
|
|
42
|
+
"@vueuse/core": "^13.1.0",
|
|
43
|
+
"daisyui": "^5"
|
|
35
44
|
},
|
|
36
45
|
"dependencies": {
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
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": "^
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
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
|
}
|
package/components/Accordion.vue
DELETED
|
@@ -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>
|
package/components/Alert.vue
DELETED
|
@@ -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>
|
package/components/Artboard.vue
DELETED
|
@@ -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>
|