daisy-ui-kit 3.0.12 → 5.0.0-pre.10
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/{components → app/components}/Accordion.vue +7 -10
- package/app/components/Alert.vue +35 -0
- package/app/components/Avatar.vue +128 -0
- package/app/components/AvatarGroup.vue +18 -0
- package/app/components/Badge.vue +54 -0
- package/app/components/Button.vue +120 -0
- package/app/components/Calendar.vue +66 -0
- package/app/components/CalendarInput.vue +174 -0
- package/app/components/CalendarSkeleton.vue +46 -0
- package/app/components/Card.vue +33 -0
- package/{components → app/components}/CardActions.vue +3 -6
- package/{components → app/components}/CardBody.vue +3 -6
- package/{components → app/components}/CardTitle.vue +2 -7
- package/app/components/Carousel.vue +23 -0
- package/app/components/Chat.vue +21 -0
- package/app/components/ChatBubble.vue +31 -0
- package/app/components/Checkbox.vue +51 -0
- package/app/components/Collapse.vue +43 -0
- package/app/components/Countdown.vue +15 -0
- package/app/components/CountdownTimers.vue +72 -0
- package/app/components/Counter.vue +10 -0
- package/app/components/DaisyLink.vue +38 -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 +6 -4
- package/{components → app/components}/DrawerContent.vue +1 -1
- package/{components → app/components}/DrawerSide.vue +1 -1
- package/{components → app/components}/Dropdown.vue +2 -2
- package/{components → app/components}/DropdownContent.vue +3 -3
- package/app/components/Fieldset.vue +19 -0
- package/app/components/FileInput.vue +53 -0
- package/app/components/Filter.vue +122 -0
- package/app/components/Flex.vue +82 -0
- package/{components → app/components}/FlexItem.vue +1 -1
- package/app/components/Footer.vue +27 -0
- package/app/components/FormControl.vue +5 -0
- package/{components → app/components}/Hero.vue +1 -1
- package/{components → app/components}/HeroContent.vue +1 -1
- package/app/components/Input.vue +119 -0
- package/app/components/Kbd.vue +24 -0
- package/app/components/Label.vue +97 -0
- package/app/components/List.vue +5 -0
- 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 +100 -0
- package/{components → app/components}/MenuExpandToggle.vue +5 -4
- package/{components → app/components}/MenuItem.vue +3 -4
- package/app/components/MockupPhone.vue +14 -0
- package/{components → app/components}/Modal.vue +14 -5
- 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 +34 -0
- package/{components → app/components}/Prose.vue +1 -1
- 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/{components → app/components}/RangeMeasure.vue +22 -21
- package/{components → app/components}/RangeMeasureTick.vue +9 -14
- package/app/components/Rating.vue +180 -0
- package/{components → app/components}/Select.vue +33 -29
- package/app/components/Skeleton.vue +5 -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 +18 -0
- package/app/components/Swap.vue +62 -0
- package/app/components/Tab.vue +38 -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 +142 -0
- package/app/components/TextArea.vue +61 -0
- package/app/components/ThemeController.vue +46 -0
- package/app/components/ThemeProvider.vue +287 -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 +13 -0
- package/app/components/Toast.vue +72 -0
- package/app/components/Toggle.vue +60 -0
- package/app/components/Tooltip.vue +47 -0
- package/app/components/TooltipContent.vue +5 -0
- package/app/components/ValidatorHint.vue +5 -0
- package/nuxt.js +7 -1
- package/package.json +58 -61
- 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/Countdown.vue +0 -15
- package/components/CountdownTimers.vue +0 -70
- package/components/Counter.vue +0 -14
- package/components/Divider.vue +0 -24
- 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/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/Rating.vue +0 -167
- 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}/CollapseTitle.vue +0 -0
- /package/{components → app/components}/Crumb.vue +0 -0
- /package/{components → app/components}/DropdownButton.vue +0 -0
- /package/{components → app/components}/DropdownTarget.vue +0 -0
- /package/{components → app/components}/FooterTitle.vue +0 -0
- /package/{components → app/components}/HeroOverlay.vue +0 -0
- /package/{components → app/components}/Indicator.vue +0 -0
- /package/{components → app/components}/IndicatorItem.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}/drawer-utils.ts +0 -0
- /package/{utils → app/utils}/random-string.ts +0 -0
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
color?: string
|
|
6
|
-
neutral?: boolean
|
|
7
|
-
primary?: boolean
|
|
8
|
-
secondary?: boolean
|
|
9
|
-
accent?: boolean
|
|
10
|
-
info?: boolean
|
|
11
|
-
success?: boolean
|
|
12
|
-
warning?: boolean
|
|
13
|
-
error?: boolean
|
|
14
|
-
|
|
15
|
-
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
16
|
-
lg?: boolean
|
|
17
|
-
md?: boolean
|
|
18
|
-
sm?: boolean
|
|
19
|
-
xs?: boolean
|
|
20
|
-
}>()
|
|
21
|
-
|
|
22
|
-
const classes = computed(() => {
|
|
23
|
-
return {
|
|
24
|
-
'text-primary': props.primary || props.color === 'primary',
|
|
25
|
-
'text-secondary': props.secondary || props.color === 'secondary',
|
|
26
|
-
'text-neutral': props.neutral || props.color === 'neutral',
|
|
27
|
-
'text-accent': props.accent || props.color === 'accent',
|
|
28
|
-
'text-info': props.info || props.color === 'info',
|
|
29
|
-
'text-success': props.success || props.color === 'success',
|
|
30
|
-
'text-warning': props.warning || props.color === 'warning',
|
|
31
|
-
'text-error': props.error || props.color === 'error',
|
|
32
|
-
|
|
33
|
-
'loading-lg': props.lg || props.size === 'lg',
|
|
34
|
-
'loading-md': props.md || props.size === 'md',
|
|
35
|
-
'loading-sm': props.sm || props.size === 'sm',
|
|
36
|
-
'loading-xs': props.xs || props.size === 'xs',
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<template>
|
|
42
|
-
<span class="loading loading-dots" :class="classes" />
|
|
43
|
-
</template>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
color?: string
|
|
6
|
-
neutral?: boolean
|
|
7
|
-
primary?: boolean
|
|
8
|
-
secondary?: boolean
|
|
9
|
-
accent?: boolean
|
|
10
|
-
info?: boolean
|
|
11
|
-
success?: boolean
|
|
12
|
-
warning?: boolean
|
|
13
|
-
error?: boolean
|
|
14
|
-
|
|
15
|
-
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
16
|
-
lg?: boolean
|
|
17
|
-
md?: boolean
|
|
18
|
-
sm?: boolean
|
|
19
|
-
xs?: boolean
|
|
20
|
-
}>()
|
|
21
|
-
|
|
22
|
-
const classes = computed(() => {
|
|
23
|
-
return {
|
|
24
|
-
'text-primary': props.primary || props.color === 'primary',
|
|
25
|
-
'text-secondary': props.secondary || props.color === 'secondary',
|
|
26
|
-
'text-neutral': props.neutral || props.color === 'neutral',
|
|
27
|
-
'text-accent': props.accent || props.color === 'accent',
|
|
28
|
-
'text-info': props.info || props.color === 'info',
|
|
29
|
-
'text-success': props.success || props.color === 'success',
|
|
30
|
-
'text-warning': props.warning || props.color === 'warning',
|
|
31
|
-
'text-error': props.error || props.color === 'error',
|
|
32
|
-
|
|
33
|
-
'loading-lg': props.lg || props.size === 'lg',
|
|
34
|
-
'loading-md': props.md || props.size === 'md',
|
|
35
|
-
'loading-sm': props.sm || props.size === 'sm',
|
|
36
|
-
'loading-xs': props.xs || props.size === 'xs',
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<template>
|
|
42
|
-
<span class="loading loading-infinity" :class="classes" />
|
|
43
|
-
</template>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
color?: string
|
|
6
|
-
neutral?: boolean
|
|
7
|
-
primary?: boolean
|
|
8
|
-
secondary?: boolean
|
|
9
|
-
accent?: boolean
|
|
10
|
-
info?: boolean
|
|
11
|
-
success?: boolean
|
|
12
|
-
warning?: boolean
|
|
13
|
-
error?: boolean
|
|
14
|
-
|
|
15
|
-
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
16
|
-
lg?: boolean
|
|
17
|
-
md?: boolean
|
|
18
|
-
sm?: boolean
|
|
19
|
-
xs?: boolean
|
|
20
|
-
}>()
|
|
21
|
-
|
|
22
|
-
const classes = computed(() => {
|
|
23
|
-
return {
|
|
24
|
-
'text-primary': props.primary || props.color === 'primary',
|
|
25
|
-
'text-secondary': props.secondary || props.color === 'secondary',
|
|
26
|
-
'text-neutral': props.neutral || props.color === 'neutral',
|
|
27
|
-
'text-accent': props.accent || props.color === 'accent',
|
|
28
|
-
'text-info': props.info || props.color === 'info',
|
|
29
|
-
'text-success': props.success || props.color === 'success',
|
|
30
|
-
'text-warning': props.warning || props.color === 'warning',
|
|
31
|
-
'text-error': props.error || props.color === 'error',
|
|
32
|
-
|
|
33
|
-
'loading-lg': props.lg || props.size === 'lg',
|
|
34
|
-
'loading-md': props.md || props.size === 'md',
|
|
35
|
-
'loading-sm': props.sm || props.size === 'sm',
|
|
36
|
-
'loading-xs': props.xs || props.size === 'xs',
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<template>
|
|
42
|
-
<span class="loading loading-ring" :class="classes" />
|
|
43
|
-
</template>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
color?: string
|
|
6
|
-
neutral?: boolean
|
|
7
|
-
primary?: boolean
|
|
8
|
-
secondary?: boolean
|
|
9
|
-
accent?: boolean
|
|
10
|
-
info?: boolean
|
|
11
|
-
success?: boolean
|
|
12
|
-
warning?: boolean
|
|
13
|
-
error?: boolean
|
|
14
|
-
|
|
15
|
-
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
16
|
-
lg?: boolean
|
|
17
|
-
md?: boolean
|
|
18
|
-
sm?: boolean
|
|
19
|
-
xs?: boolean
|
|
20
|
-
}>()
|
|
21
|
-
|
|
22
|
-
const classes = computed(() => {
|
|
23
|
-
return {
|
|
24
|
-
'text-primary': props.primary || props.color === 'primary',
|
|
25
|
-
'text-secondary': props.secondary || props.color === 'secondary',
|
|
26
|
-
'text-neutral': props.neutral || props.color === 'neutral',
|
|
27
|
-
'text-accent': props.accent || props.color === 'accent',
|
|
28
|
-
'text-info': props.info || props.color === 'info',
|
|
29
|
-
'text-success': props.success || props.color === 'success',
|
|
30
|
-
'text-warning': props.warning || props.color === 'warning',
|
|
31
|
-
'text-error': props.error || props.color === 'error',
|
|
32
|
-
|
|
33
|
-
'loading-lg': props.lg || props.size === 'lg',
|
|
34
|
-
'loading-md': props.md || props.size === 'md',
|
|
35
|
-
'loading-sm': props.sm || props.size === 'sm',
|
|
36
|
-
'loading-xs': props.xs || props.size === 'xs',
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<template>
|
|
42
|
-
<span class="loading loading-spinner" :class="classes" />
|
|
43
|
-
</template>
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { computed } from 'vue'
|
|
2
|
-
|
|
3
|
-
export const maskProps = {
|
|
4
|
-
shape: { type: String },
|
|
5
|
-
squircle: Boolean,
|
|
6
|
-
heart: Boolean,
|
|
7
|
-
hexagon: Boolean,
|
|
8
|
-
hexagon2: Boolean,
|
|
9
|
-
decagon: Boolean,
|
|
10
|
-
pentagon: Boolean,
|
|
11
|
-
diamond: Boolean,
|
|
12
|
-
square: Boolean,
|
|
13
|
-
circle: Boolean,
|
|
14
|
-
parallelogram: Boolean,
|
|
15
|
-
parallelogram2: Boolean,
|
|
16
|
-
parallelogram3: Boolean,
|
|
17
|
-
parallelogram4: Boolean,
|
|
18
|
-
star: Boolean,
|
|
19
|
-
star2: Boolean,
|
|
20
|
-
triangle: Boolean,
|
|
21
|
-
triangle2: Boolean,
|
|
22
|
-
triangle3: Boolean,
|
|
23
|
-
triangle4: Boolean,
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function makeMaskClasses(props: any) {
|
|
27
|
-
const classes = computed(() => {
|
|
28
|
-
return {
|
|
29
|
-
'mask-squircle': props.squircle || props.shape === 'squircle',
|
|
30
|
-
'mask-heart': props.heart || props.shape === 'heart',
|
|
31
|
-
'mask-hexagon': props.hexagon || props.shape === 'hexagon',
|
|
32
|
-
'mask-hexagon-2': props.hexagon2 || props.shape === 'hexagon-2',
|
|
33
|
-
'mask-decagon': props.decagon || props.shape === 'decagon',
|
|
34
|
-
'mask-pentagon': props.pentagon || props.shape === 'pentagon',
|
|
35
|
-
'mask-diamond': props.diamond || props.shape === 'diamond',
|
|
36
|
-
'mask-square': props.square || props.shape === 'square',
|
|
37
|
-
'mask-circle': props.circle || props.shape === 'circle',
|
|
38
|
-
'mask-parallelogram':
|
|
39
|
-
props.parallelogram || props.shape === 'parallelogram',
|
|
40
|
-
'mask-parallelogram-2':
|
|
41
|
-
props.parallelogram2 || props.shape === 'parallelogram-2',
|
|
42
|
-
'mask-parallelogram-3':
|
|
43
|
-
props.parallelogram3 || props.shape === 'parallelogram-3',
|
|
44
|
-
'mask-parallelogram-4':
|
|
45
|
-
props.parallelogram4 || props.shape === 'parallelogram-4',
|
|
46
|
-
'mask-star': props.star || props.shape === 'star',
|
|
47
|
-
'mask-star-2': props.star2 || props.shape === 'star-2',
|
|
48
|
-
'mask-triangle': props.triangle || props.shape === 'triangle',
|
|
49
|
-
'mask-triangle-2': props.triangle2 || props.shape === 'triangle-2',
|
|
50
|
-
'mask-triangle-3': props.triangle3 || props.shape === 'triangle-3',
|
|
51
|
-
'mask-triangle-4': props.triangle4 || props.shape === 'triangle-4',
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
return classes
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export const shapes = [
|
|
58
|
-
'squircle',
|
|
59
|
-
'heart',
|
|
60
|
-
'hexagon',
|
|
61
|
-
'hexagon-2',
|
|
62
|
-
'decagon',
|
|
63
|
-
'pentagon',
|
|
64
|
-
'diamond',
|
|
65
|
-
'square',
|
|
66
|
-
'circle',
|
|
67
|
-
'parallelogram',
|
|
68
|
-
'parallelogram-2',
|
|
69
|
-
'parallelogram-3',
|
|
70
|
-
'parallelogram-4',
|
|
71
|
-
'star',
|
|
72
|
-
'star-2',
|
|
73
|
-
'triangle',
|
|
74
|
-
'triangle-2',
|
|
75
|
-
'triangle-3',
|
|
76
|
-
'triangle-4',
|
|
77
|
-
]
|
package/components/Mask.vue
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { makeMaskClasses, maskProps } from './Mask.config'
|
|
3
|
-
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
...maskProps,
|
|
6
|
-
})
|
|
7
|
-
const classes = makeMaskClasses(props)
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<template>
|
|
11
|
-
<div class="mask" :class="[classes]">
|
|
12
|
-
<slot />
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
package/components/Menu.vue
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, provide } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
align?: 'vertical' | 'horizontal'
|
|
6
|
-
vertical?: boolean
|
|
7
|
-
horizontal?: boolean
|
|
8
|
-
|
|
9
|
-
size?: | 'lg' | 'md' | 'sm' | 'xs'
|
|
10
|
-
lg?: boolean
|
|
11
|
-
md?: boolean
|
|
12
|
-
sm?: boolean
|
|
13
|
-
xs?: boolean
|
|
14
|
-
}>()
|
|
15
|
-
|
|
16
|
-
provide('withinExpand', false)
|
|
17
|
-
|
|
18
|
-
// `normal` and `compact` provide backwards compatibility with DaisyUI 2.x
|
|
19
|
-
const classes = computed(() => {
|
|
20
|
-
return {
|
|
21
|
-
'menu-vertical': props.vertical || props.align === 'vertical',
|
|
22
|
-
'menu-horizontal': props.horizontal || props.align === 'horizontal',
|
|
23
|
-
'menu-lg': props.lg || props.size === 'lg',
|
|
24
|
-
'menu-md': props.md || props.size === 'md',
|
|
25
|
-
'menu-sm': props.sm || props.size === 'sm',
|
|
26
|
-
'menu-xs': props.xs || props.size === 'xs',
|
|
27
|
-
}
|
|
28
|
-
})
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<template>
|
|
32
|
-
<ul class="menu" :class="classes">
|
|
33
|
-
<slot />
|
|
34
|
-
</ul>
|
|
35
|
-
</template>
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { onMounted, provide, ref } from 'vue'
|
|
3
|
-
import { onClickOutside, syncRefs, useElementHover } from '@vueuse/core'
|
|
4
|
-
import { randomString } from '../utils/random-string'
|
|
5
|
-
|
|
6
|
-
const props = withDefaults(defineProps<{
|
|
7
|
-
randomId?: string
|
|
8
|
-
hover?: boolean
|
|
9
|
-
delayEnter?: number
|
|
10
|
-
delayLeave?: number
|
|
11
|
-
closeOnClickOutside?: boolean
|
|
12
|
-
}>(), {
|
|
13
|
-
randomId: randomString(12),
|
|
14
|
-
position: 'bottom',
|
|
15
|
-
end: false,
|
|
16
|
-
hover: false,
|
|
17
|
-
delayEnter: 0,
|
|
18
|
-
delayLeave: 300,
|
|
19
|
-
closeOnClickOutside: false,
|
|
20
|
-
})
|
|
21
|
-
// "Expand" Visibility
|
|
22
|
-
const isOpen = defineModel('open', { local: true, default: false, type: Boolean })
|
|
23
|
-
provide('isExpandOpen', isOpen)
|
|
24
|
-
|
|
25
|
-
// ids for accessibility
|
|
26
|
-
const wrapperId = `expand-wrapper-${props.randomId}`
|
|
27
|
-
const id = `expand-${props.randomId}`
|
|
28
|
-
provide('expandId', id)
|
|
29
|
-
|
|
30
|
-
// Visibility Utils
|
|
31
|
-
function toggle() {
|
|
32
|
-
setTimeout(() => {
|
|
33
|
-
isOpen.value = !isOpen.value
|
|
34
|
-
}, 50)
|
|
35
|
-
}
|
|
36
|
-
function open() {
|
|
37
|
-
isOpen.value = true
|
|
38
|
-
}
|
|
39
|
-
function close() {
|
|
40
|
-
isOpen.value = false
|
|
41
|
-
}
|
|
42
|
-
provide('toggleExpand', toggle)
|
|
43
|
-
provide('openExpand', open)
|
|
44
|
-
provide('closeExpand', close)
|
|
45
|
-
|
|
46
|
-
const expandEl = ref()
|
|
47
|
-
|
|
48
|
-
onMounted(() => {
|
|
49
|
-
// Close when clicking outside the element
|
|
50
|
-
onClickOutside(expandEl, () => {
|
|
51
|
-
if (props.closeOnClickOutside) {
|
|
52
|
-
setTimeout(() => {
|
|
53
|
-
isOpen.value = false
|
|
54
|
-
}, 500)
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
if (props.hover) {
|
|
59
|
-
// Sync with top-level isHovered ref. For SSR compatibility.
|
|
60
|
-
const hover = useElementHover(expandEl, {
|
|
61
|
-
delayLeave: props.delayLeave,
|
|
62
|
-
delayEnter: props.delayEnter,
|
|
63
|
-
})
|
|
64
|
-
syncRefs(hover, isOpen)
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
function handleClick(ev: MouseEvent) {
|
|
69
|
-
ev.preventDefault()
|
|
70
|
-
if (ev.target === expandEl.value.children[0])
|
|
71
|
-
isOpen.value = !isOpen.value
|
|
72
|
-
}
|
|
73
|
-
</script>
|
|
74
|
-
|
|
75
|
-
<template>
|
|
76
|
-
<details :id="wrapperId" ref="expandEl" class="dropdown menu-expand" :open="isOpen" @click="handleClick">
|
|
77
|
-
<slot v-bind="{ toggle, open, close }" />
|
|
78
|
-
</details>
|
|
79
|
-
</template>
|
package/components/NavButton.vue
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
active?: boolean
|
|
6
|
-
disabled?: boolean
|
|
7
|
-
}>()
|
|
8
|
-
const classes = computed(() => {
|
|
9
|
-
return {
|
|
10
|
-
active: props.active,
|
|
11
|
-
disabled: props.disabled,
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<template>
|
|
17
|
-
<button class="nav-button" :class="classes">
|
|
18
|
-
<slot />
|
|
19
|
-
</button>
|
|
20
|
-
</template>
|
package/components/Progress.vue
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = withDefaults(defineProps<{
|
|
5
|
-
value: any
|
|
6
|
-
max?: any
|
|
7
|
-
|
|
8
|
-
color?: string
|
|
9
|
-
primary?: boolean
|
|
10
|
-
secondary?: boolean
|
|
11
|
-
accent?: boolean
|
|
12
|
-
success?: boolean
|
|
13
|
-
info?: boolean
|
|
14
|
-
warning?: boolean
|
|
15
|
-
error?: boolean
|
|
16
|
-
}>(), {
|
|
17
|
-
value: 0,
|
|
18
|
-
max: 100,
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
const classes = computed(() => {
|
|
22
|
-
const { color, primary, secondary, accent, success, info, warning, error } = props
|
|
23
|
-
return {
|
|
24
|
-
'progress-primary': primary || color === 'primary',
|
|
25
|
-
'progress-secondary': secondary || color === 'secondary',
|
|
26
|
-
'progress-accent': accent || color === 'accent',
|
|
27
|
-
'progress-success': success || color === 'success',
|
|
28
|
-
'progress-info': info || color === 'info',
|
|
29
|
-
'progress-warning': warning || color === 'warning',
|
|
30
|
-
'progress-error': error || color === 'error',
|
|
31
|
-
}
|
|
32
|
-
})
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<template>
|
|
36
|
-
<progress
|
|
37
|
-
:value="value"
|
|
38
|
-
:max="max"
|
|
39
|
-
class="progress"
|
|
40
|
-
:class="classes"
|
|
41
|
-
/>
|
|
42
|
-
</template>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
value: number | string
|
|
6
|
-
size?: string
|
|
7
|
-
thickness?: string
|
|
8
|
-
|
|
9
|
-
color?: string
|
|
10
|
-
neutral?: boolean
|
|
11
|
-
primary?: boolean
|
|
12
|
-
secondary?: boolean
|
|
13
|
-
accent?: boolean
|
|
14
|
-
info?: boolean
|
|
15
|
-
success?: boolean
|
|
16
|
-
warning?: boolean
|
|
17
|
-
error?: boolean
|
|
18
|
-
}>()
|
|
19
|
-
|
|
20
|
-
const calculatedSize = computed(() => props.size || '4rem')
|
|
21
|
-
const calculatedThickness = computed(() => props.thickness || 'calc(var(--size) / 10)')
|
|
22
|
-
|
|
23
|
-
const classes = computed(() => {
|
|
24
|
-
return {
|
|
25
|
-
'text-primary': (props.primary || props.color === 'primary'),
|
|
26
|
-
'text-secondary': (props.secondary || props.color === 'secondary'),
|
|
27
|
-
'text-neutral': (props.neutral || props.color === 'neutral'),
|
|
28
|
-
'text-accent': (props.accent || props.color === 'accent'),
|
|
29
|
-
'text-info': (props.info || props.color === 'info'),
|
|
30
|
-
'text-success': (props.success || props.color === 'success'),
|
|
31
|
-
'text-warning': (props.warning || props.color === 'warning'),
|
|
32
|
-
'text-error': (props.error || props.color === 'error'),
|
|
33
|
-
}
|
|
34
|
-
})
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<template>
|
|
38
|
-
<div class="radial-progress" :class="classes" :style="`--value:${value}; --size:${calculatedSize}; --thickness:${calculatedThickness};`">
|
|
39
|
-
<slot />
|
|
40
|
-
</div>
|
|
41
|
-
</template>
|
package/components/Radio.vue
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, inject } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
modelValue?: any
|
|
6
|
-
value: any
|
|
7
|
-
disabled?: boolean
|
|
8
|
-
|
|
9
|
-
color?: string
|
|
10
|
-
neutral?: boolean
|
|
11
|
-
primary?: boolean
|
|
12
|
-
secondary?: boolean
|
|
13
|
-
accent?: boolean
|
|
14
|
-
success?: boolean
|
|
15
|
-
warning?: boolean
|
|
16
|
-
info?: boolean
|
|
17
|
-
error?: boolean
|
|
18
|
-
|
|
19
|
-
size?: string
|
|
20
|
-
xs?: boolean
|
|
21
|
-
sm?: boolean
|
|
22
|
-
md?: boolean
|
|
23
|
-
lg?: boolean
|
|
24
|
-
}>()
|
|
25
|
-
const emit = defineEmits(['update:modelValue'])
|
|
26
|
-
|
|
27
|
-
const radioGroup: any = inject('radio-group', null)
|
|
28
|
-
|
|
29
|
-
const _props = computed(() => {
|
|
30
|
-
if (radioGroup)
|
|
31
|
-
return Object.assign({}, radioGroup.props, props)
|
|
32
|
-
else return props
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
const classes = computed(() => {
|
|
36
|
-
const { color, neutral, primary, secondary, accent, success, warning, info, error, size, xs, sm, md, lg } = _props.value
|
|
37
|
-
return {
|
|
38
|
-
'radio-neutral': neutral || color === 'neutral',
|
|
39
|
-
'radio-primary': primary || color === 'primary',
|
|
40
|
-
'radio-secondary': secondary || color === 'secondary',
|
|
41
|
-
'radio-accent': accent || color === 'accent',
|
|
42
|
-
'radio-success': success || color === 'success',
|
|
43
|
-
'radio-warning': warning || color === 'warning',
|
|
44
|
-
'radio-info': info || color === 'info',
|
|
45
|
-
'radio-error': error || color === 'error',
|
|
46
|
-
'radio-xs': xs || size === 'xs',
|
|
47
|
-
'radio-sm': sm || size === 'sm',
|
|
48
|
-
'radio-md': md || size === 'md',
|
|
49
|
-
'radio-lg': lg || size === 'lg',
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
const currentValue = computed({
|
|
54
|
-
get() {
|
|
55
|
-
if (radioGroup)
|
|
56
|
-
return radioGroup.currentValue
|
|
57
|
-
return props.modelValue
|
|
58
|
-
},
|
|
59
|
-
set(val: string) {
|
|
60
|
-
radioGroup && (radioGroup.currentValue = val)
|
|
61
|
-
emit('update:modelValue', val)
|
|
62
|
-
},
|
|
63
|
-
})
|
|
64
|
-
</script>
|
|
65
|
-
|
|
66
|
-
<template>
|
|
67
|
-
<input
|
|
68
|
-
v-model="currentValue"
|
|
69
|
-
type="radio"
|
|
70
|
-
v-bind="{ ..._props, ...$attrs }"
|
|
71
|
-
class="radio"
|
|
72
|
-
:class="classes"
|
|
73
|
-
:disabled="disabled"
|
|
74
|
-
:value="props.value"
|
|
75
|
-
>
|
|
76
|
-
</template>
|
package/components/Range.vue
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
modelValue?: number | string
|
|
6
|
-
min?: number | string
|
|
7
|
-
max?: number | string
|
|
8
|
-
step?: number | string
|
|
9
|
-
disabled?: boolean
|
|
10
|
-
|
|
11
|
-
color?: string
|
|
12
|
-
neutral?: boolean
|
|
13
|
-
primary?: boolean
|
|
14
|
-
secondary?: boolean
|
|
15
|
-
accent?: boolean
|
|
16
|
-
success?: boolean
|
|
17
|
-
warning?: boolean
|
|
18
|
-
info?: boolean
|
|
19
|
-
error?: boolean
|
|
20
|
-
|
|
21
|
-
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
22
|
-
lg?: boolean
|
|
23
|
-
md?: boolean
|
|
24
|
-
sm?: boolean
|
|
25
|
-
xs?: boolean
|
|
26
|
-
}>()
|
|
27
|
-
defineEmits(['update:modelValue'])
|
|
28
|
-
|
|
29
|
-
const classes = computed(() => {
|
|
30
|
-
const { color, neutral, primary, secondary, accent, success, info, warning, error, size, lg, md, sm, xs } = props
|
|
31
|
-
return {
|
|
32
|
-
'range-neutral': neutral || color === 'neutral',
|
|
33
|
-
'range-primary': primary || color === 'primary',
|
|
34
|
-
'range-secondary': secondary || color === 'secondary',
|
|
35
|
-
'range-accent': accent || color === 'accent',
|
|
36
|
-
'range-success': success || color === 'success',
|
|
37
|
-
'range-info': info || color === 'info',
|
|
38
|
-
'range-warning': warning || color === 'warning',
|
|
39
|
-
'range-error': error || color === 'error',
|
|
40
|
-
'range-lg': lg || size === 'lg',
|
|
41
|
-
'range-md': md || size === 'md',
|
|
42
|
-
'range-sm': sm || size === 'sm',
|
|
43
|
-
'range-xs': xs || size === 'xs',
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<template>
|
|
49
|
-
<input
|
|
50
|
-
type="range"
|
|
51
|
-
class="range"
|
|
52
|
-
:class="classes"
|
|
53
|
-
:min="min"
|
|
54
|
-
:max="max"
|
|
55
|
-
:step="step"
|
|
56
|
-
:disabled="disabled"
|
|
57
|
-
:value="modelValue"
|
|
58
|
-
@input="$emit('update:modelValue', ($event.target as any).value)"
|
|
59
|
-
>
|
|
60
|
-
</template>
|