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,117 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({
|
|
3
|
+
inheritAttrs: false,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const props = withDefaults(
|
|
7
|
+
defineProps<{
|
|
8
|
+
btn?: boolean
|
|
9
|
+
join?: boolean
|
|
10
|
+
close?: boolean
|
|
11
|
+
|
|
12
|
+
color?: string
|
|
13
|
+
neutral?: boolean
|
|
14
|
+
primary?: boolean
|
|
15
|
+
secondary?: boolean
|
|
16
|
+
accent?: boolean
|
|
17
|
+
info?: boolean
|
|
18
|
+
success?: boolean
|
|
19
|
+
warning?: boolean
|
|
20
|
+
error?: boolean
|
|
21
|
+
|
|
22
|
+
ghost?: boolean
|
|
23
|
+
link?: boolean
|
|
24
|
+
glass?: boolean
|
|
25
|
+
outline?: boolean
|
|
26
|
+
dash?: boolean
|
|
27
|
+
soft?: boolean
|
|
28
|
+
|
|
29
|
+
shape?: 'circle' | 'square' | 'wide' | 'block'
|
|
30
|
+
circle?: boolean
|
|
31
|
+
square?: boolean
|
|
32
|
+
wide?: boolean
|
|
33
|
+
block?: boolean
|
|
34
|
+
|
|
35
|
+
noAnimation?: boolean
|
|
36
|
+
active?: boolean
|
|
37
|
+
|
|
38
|
+
size?: 'lg' | 'md' | 'sm' | 'xs' | 'xl'
|
|
39
|
+
xl?: boolean
|
|
40
|
+
lg?: boolean
|
|
41
|
+
md?: boolean
|
|
42
|
+
sm?: boolean
|
|
43
|
+
xs?: boolean
|
|
44
|
+
}>(),
|
|
45
|
+
{
|
|
46
|
+
btn: true,
|
|
47
|
+
},
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
function handleMouseDown(event: MouseEvent) {
|
|
51
|
+
if (!props.close) return
|
|
52
|
+
const fab = (event.currentTarget as HTMLElement)?.closest('.fab')
|
|
53
|
+
// Only close if FAB is already open (has focus within)
|
|
54
|
+
if (fab instanceof HTMLElement && fab.matches(':focus-within')) {
|
|
55
|
+
event.preventDefault()
|
|
56
|
+
fab.blur()
|
|
57
|
+
if (document.activeElement instanceof HTMLElement) {
|
|
58
|
+
document.activeElement.blur()
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<template>
|
|
65
|
+
<div
|
|
66
|
+
tabindex="0"
|
|
67
|
+
role="button"
|
|
68
|
+
v-bind="$attrs"
|
|
69
|
+
:class="{
|
|
70
|
+
btn,
|
|
71
|
+
'join-item': join,
|
|
72
|
+
|
|
73
|
+
'btn-neutral': neutral || color === 'neutral',
|
|
74
|
+
'btn-primary': primary || color === 'primary',
|
|
75
|
+
'btn-secondary': secondary || color === 'secondary',
|
|
76
|
+
'btn-accent': accent || color === 'accent',
|
|
77
|
+
'btn-info': info || color === 'info',
|
|
78
|
+
'btn-success': success || color === 'success',
|
|
79
|
+
'btn-warning': warning || color === 'warning',
|
|
80
|
+
'btn-error': error || color === 'error',
|
|
81
|
+
|
|
82
|
+
'text-primary': (primary || color === 'primary') && link,
|
|
83
|
+
'text-secondary': (secondary || color === 'secondary') && link,
|
|
84
|
+
'text-neutral': (neutral || color === 'neutral') && link,
|
|
85
|
+
'text-accent': (accent || color === 'accent') && link,
|
|
86
|
+
'text-info': (info || color === 'info') && link,
|
|
87
|
+
'text-success': (success || color === 'success') && link,
|
|
88
|
+
'text-warning': (warning || color === 'warning') && link,
|
|
89
|
+
'text-error': (error || color === 'error') && link,
|
|
90
|
+
|
|
91
|
+
glass,
|
|
92
|
+
|
|
93
|
+
'btn-circle': circle || shape === 'circle',
|
|
94
|
+
'btn-square': square || shape === 'square',
|
|
95
|
+
'btn-wide': wide || shape === 'wide',
|
|
96
|
+
'btn-block': block || shape === 'block',
|
|
97
|
+
|
|
98
|
+
'btn-xl': xl || size === 'xl',
|
|
99
|
+
'btn-lg': lg || size === 'lg',
|
|
100
|
+
'btn-md': md || size === 'md',
|
|
101
|
+
'btn-sm': sm || size === 'sm',
|
|
102
|
+
'btn-xs': xs || size === 'xs',
|
|
103
|
+
|
|
104
|
+
'btn-outline': outline,
|
|
105
|
+
'btn-dash': dash,
|
|
106
|
+
'btn-ghost': ghost,
|
|
107
|
+
'btn-soft': soft,
|
|
108
|
+
'btn-link': link,
|
|
109
|
+
|
|
110
|
+
'no-animation': noAnimation,
|
|
111
|
+
'btn-active': active,
|
|
112
|
+
}"
|
|
113
|
+
@mousedown="handleMouseDown"
|
|
114
|
+
>
|
|
115
|
+
<slot />
|
|
116
|
+
</div>
|
|
117
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const { is = 'fieldset', legend } = defineProps<{
|
|
3
|
+
is?: string
|
|
4
|
+
legend?: string
|
|
5
|
+
}>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<component :is="is" class="fieldset bg-base-200 border-base-300 rounded-box border p-4">
|
|
10
|
+
<legend v-if="legend" class="fieldset-legend">
|
|
11
|
+
{{ legend }}
|
|
12
|
+
</legend>
|
|
13
|
+
<slot v-else name="legend" />
|
|
14
|
+
<slot />
|
|
15
|
+
</component>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps<{
|
|
3
|
+
join?: boolean
|
|
4
|
+
|
|
5
|
+
color?: string
|
|
6
|
+
primary?: boolean
|
|
7
|
+
secondary?: boolean
|
|
8
|
+
accent?: boolean
|
|
9
|
+
info?: boolean
|
|
10
|
+
success?: boolean
|
|
11
|
+
warning?: boolean
|
|
12
|
+
error?: boolean
|
|
13
|
+
|
|
14
|
+
ghost?: boolean
|
|
15
|
+
disabled?: 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
|
+
defineEmits(['files'])
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<input
|
|
29
|
+
type="file"
|
|
30
|
+
:disabled="disabled"
|
|
31
|
+
class="file-input"
|
|
32
|
+
:class="{
|
|
33
|
+
'join-item': join,
|
|
34
|
+
|
|
35
|
+
'file-input-primary': primary || color === 'primary',
|
|
36
|
+
'file-input-secondary': secondary || color === 'secondary',
|
|
37
|
+
'file-input-accent': accent || color === 'accent',
|
|
38
|
+
'file-input-info': info || color === 'info',
|
|
39
|
+
'file-input-success': success || color === 'success',
|
|
40
|
+
'file-input-warning': warning || color === 'warning',
|
|
41
|
+
'file-input-error': error || color === 'error',
|
|
42
|
+
|
|
43
|
+
'file-input-xl': xl || size === 'xl',
|
|
44
|
+
'file-input-lg': lg || size === 'lg',
|
|
45
|
+
'file-input-md': md || size === 'md',
|
|
46
|
+
'file-input-sm': sm || size === 'sm',
|
|
47
|
+
'file-input-xs': xs || size === 'xs',
|
|
48
|
+
|
|
49
|
+
'file-input-ghost': ghost,
|
|
50
|
+
}"
|
|
51
|
+
@input="$emit('files', ($event.target as any).value)"
|
|
52
|
+
/>
|
|
53
|
+
</template>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface FilterItem {
|
|
5
|
+
label: string
|
|
6
|
+
value: any
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type FilterItemInput = string | FilterItem
|
|
10
|
+
|
|
11
|
+
const props = withDefaults(
|
|
12
|
+
defineProps<{
|
|
13
|
+
is?: string
|
|
14
|
+
name: string
|
|
15
|
+
items: FilterItemInput[]
|
|
16
|
+
modelValue?: any
|
|
17
|
+
resetLabel?: string
|
|
18
|
+
position?: 'start' | 'end'
|
|
19
|
+
start?: boolean
|
|
20
|
+
end?: boolean
|
|
21
|
+
|
|
22
|
+
color?: string
|
|
23
|
+
neutral?: boolean
|
|
24
|
+
primary?: boolean
|
|
25
|
+
secondary?: boolean
|
|
26
|
+
accent?: boolean
|
|
27
|
+
info?: boolean
|
|
28
|
+
success?: boolean
|
|
29
|
+
warning?: boolean
|
|
30
|
+
error?: boolean
|
|
31
|
+
|
|
32
|
+
size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
|
|
33
|
+
xl?: boolean
|
|
34
|
+
lg?: boolean
|
|
35
|
+
md?: boolean
|
|
36
|
+
sm?: boolean
|
|
37
|
+
xs?: boolean
|
|
38
|
+
}>(),
|
|
39
|
+
{
|
|
40
|
+
resetLabel: 'All',
|
|
41
|
+
is: 'div',
|
|
42
|
+
},
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
const emit = defineEmits(['update:modelValue'])
|
|
46
|
+
|
|
47
|
+
const currentValue = computed({
|
|
48
|
+
get: () => props.modelValue,
|
|
49
|
+
set(val) {
|
|
50
|
+
emit('update:modelValue', val)
|
|
51
|
+
},
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
const normalizedItems = computed(() => {
|
|
55
|
+
return props.items.map(item => {
|
|
56
|
+
if (typeof item === 'string') {
|
|
57
|
+
return { label: item, value: item }
|
|
58
|
+
}
|
|
59
|
+
return item
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<template>
|
|
65
|
+
<component :is="props.is" class="filter">
|
|
66
|
+
<!-- Reset button at start -->
|
|
67
|
+
<input
|
|
68
|
+
v-if="resetLabel && (start || position === 'start')"
|
|
69
|
+
v-model="currentValue"
|
|
70
|
+
class="btn filter-reset"
|
|
71
|
+
type="radio"
|
|
72
|
+
:class="{
|
|
73
|
+
'btn-xl': size === 'xl' || xl,
|
|
74
|
+
'btn-lg': size === 'lg' || lg,
|
|
75
|
+
'btn-md': size === 'md' || md,
|
|
76
|
+
'btn-sm': size === 'sm' || sm,
|
|
77
|
+
'btn-xs': size === 'xs' || xs,
|
|
78
|
+
}"
|
|
79
|
+
:name="name"
|
|
80
|
+
:aria-label="resetLabel"
|
|
81
|
+
:value="null"
|
|
82
|
+
/>
|
|
83
|
+
|
|
84
|
+
<!-- Filter items -->
|
|
85
|
+
<template v-for="(item, index) in normalizedItems" :key="index">
|
|
86
|
+
<input
|
|
87
|
+
v-model="currentValue"
|
|
88
|
+
class="btn"
|
|
89
|
+
:class="{
|
|
90
|
+
'btn-neutral': color === 'neutral' || neutral,
|
|
91
|
+
'btn-primary': color === 'primary' || primary,
|
|
92
|
+
'btn-secondary': color === 'secondary' || secondary,
|
|
93
|
+
'btn-accent': color === 'accent' || accent,
|
|
94
|
+
'btn-info': color === 'info' || info,
|
|
95
|
+
'btn-success': color === 'success' || success,
|
|
96
|
+
'btn-warning': color === 'warning' || warning,
|
|
97
|
+
'btn-error': color === 'error' || error,
|
|
98
|
+
'btn-xl': size === 'xl' || xl,
|
|
99
|
+
'btn-lg': size === 'lg' || lg,
|
|
100
|
+
'btn-md': size === 'md' || md,
|
|
101
|
+
'btn-sm': size === 'sm' || sm,
|
|
102
|
+
'btn-xs': size === 'xs' || xs,
|
|
103
|
+
}"
|
|
104
|
+
type="radio"
|
|
105
|
+
:name="name"
|
|
106
|
+
:aria-label="item.label"
|
|
107
|
+
:value="item.value"
|
|
108
|
+
/>
|
|
109
|
+
</template>
|
|
110
|
+
|
|
111
|
+
<!-- Reset button at end -->
|
|
112
|
+
<input
|
|
113
|
+
v-if="resetLabel && (end || position === 'end')"
|
|
114
|
+
v-model="currentValue"
|
|
115
|
+
class="btn filter-reset"
|
|
116
|
+
type="radio"
|
|
117
|
+
:name="name"
|
|
118
|
+
:aria-label="resetLabel"
|
|
119
|
+
:value="null"
|
|
120
|
+
/>
|
|
121
|
+
|
|
122
|
+
<!-- Optional slot for custom items -->
|
|
123
|
+
<slot />
|
|
124
|
+
</component>
|
|
125
|
+
</template>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const { is = 'div', ...props } = defineProps<{
|
|
3
|
+
is?: string | object
|
|
4
|
+
join?: boolean
|
|
5
|
+
|
|
6
|
+
// https://tailwindcss.com/docs/flex
|
|
7
|
+
flex?: boolean
|
|
8
|
+
flex1?: boolean
|
|
9
|
+
flexAuto?: boolean
|
|
10
|
+
flexInitial?: boolean
|
|
11
|
+
none?: boolean
|
|
12
|
+
|
|
13
|
+
// justify
|
|
14
|
+
justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly'
|
|
15
|
+
justifyStart?: boolean
|
|
16
|
+
justifyEnd?: boolean
|
|
17
|
+
justifyCenter?: boolean
|
|
18
|
+
justifyBetween?: boolean
|
|
19
|
+
justifyAround?: boolean
|
|
20
|
+
justifyEvenly?: boolean
|
|
21
|
+
|
|
22
|
+
// align
|
|
23
|
+
items?: 'start' | 'end' | 'center' | 'baseline' | 'stretch'
|
|
24
|
+
itemsStart?: boolean
|
|
25
|
+
itemsEnd?: boolean
|
|
26
|
+
itemsCenter?: boolean
|
|
27
|
+
itemsBaseline?: boolean
|
|
28
|
+
itemsStretch?: boolean
|
|
29
|
+
|
|
30
|
+
grow?: boolean
|
|
31
|
+
|
|
32
|
+
// https://tailwindcss.com/docs/flex-direction
|
|
33
|
+
direction?: 'row' | 'col' | 'row-reverse' | 'col-reverse'
|
|
34
|
+
row?: boolean
|
|
35
|
+
col?: boolean
|
|
36
|
+
reverse?: boolean
|
|
37
|
+
|
|
38
|
+
// https://tailwindcss.com/docs/flex-wrap
|
|
39
|
+
wrap?: boolean
|
|
40
|
+
nowrap?: boolean
|
|
41
|
+
wrapReverse?: boolean
|
|
42
|
+
}>()
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<component
|
|
47
|
+
:is="is"
|
|
48
|
+
class="flex"
|
|
49
|
+
:class="{
|
|
50
|
+
'join-item': props.join,
|
|
51
|
+
|
|
52
|
+
'flex-1': props.flex1,
|
|
53
|
+
'flex-auto': props.flexAuto,
|
|
54
|
+
'flex-initial': props.flexInitial,
|
|
55
|
+
'flex-none': props.none,
|
|
56
|
+
|
|
57
|
+
'justify-start': props.justifyStart,
|
|
58
|
+
'justify-end': props.justifyEnd,
|
|
59
|
+
'justify-center': props.justifyCenter,
|
|
60
|
+
'justify-between': props.justifyBetween,
|
|
61
|
+
'justify-around': props.justifyAround,
|
|
62
|
+
'justify-evenly': props.justifyEvenly,
|
|
63
|
+
|
|
64
|
+
'items-start': props.itemsStart,
|
|
65
|
+
'items-end': props.itemsEnd,
|
|
66
|
+
'items-center': props.itemsCenter,
|
|
67
|
+
'items-baseline': props.itemsBaseline,
|
|
68
|
+
'items-stretch': props.itemsStretch,
|
|
69
|
+
|
|
70
|
+
'flex-grow': props.grow,
|
|
71
|
+
|
|
72
|
+
'flex-row': props.direction === 'row' || props.row,
|
|
73
|
+
'flex-col': props.direction === 'col' || props.col,
|
|
74
|
+
'flex-row-reverse': props.direction === 'row-reverse' || (props.row && props.reverse),
|
|
75
|
+
'flex-col-reverse': props.direction === 'col-reverse' || (props.col && props.reverse),
|
|
76
|
+
|
|
77
|
+
'flex-wrap': props.wrap,
|
|
78
|
+
'flex-wrap-reverse': props.wrapReverse,
|
|
79
|
+
'flex-nowrap': props.nowrap,
|
|
80
|
+
}"
|
|
81
|
+
>
|
|
82
|
+
<slot />
|
|
83
|
+
</component>
|
|
84
|
+
</template>
|
|
@@ -1,33 +1,36 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue'
|
|
3
3
|
|
|
4
|
-
const props = withDefaults(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
4
|
+
const props = withDefaults(
|
|
5
|
+
defineProps<{
|
|
6
|
+
is?: any
|
|
7
|
+
join?: boolean
|
|
8
|
+
|
|
9
|
+
// https://tailwindcss.com/docs/flex
|
|
10
|
+
flex?: boolean
|
|
11
|
+
flex1?: boolean
|
|
12
|
+
flexAuto?: boolean
|
|
13
|
+
flexInitial?: boolean
|
|
14
|
+
none?: boolean
|
|
15
|
+
|
|
16
|
+
grow?: boolean
|
|
17
|
+
|
|
18
|
+
// https://tailwindcss.com/docs/flex-direction
|
|
19
|
+
direction?: 'row' | 'col' | 'row-reverse' | 'col-reverse'
|
|
20
|
+
row?: boolean
|
|
21
|
+
col?: boolean
|
|
22
|
+
reverse?: boolean
|
|
23
|
+
|
|
24
|
+
// https://tailwindcss.com/docs/flex-wrap
|
|
25
|
+
wrap?: boolean
|
|
26
|
+
nowrap?: boolean
|
|
27
|
+
wrapReverse?: boolean
|
|
28
|
+
}>(),
|
|
29
|
+
{
|
|
30
|
+
is: 'div',
|
|
31
|
+
flex: false,
|
|
32
|
+
},
|
|
33
|
+
)
|
|
31
34
|
|
|
32
35
|
const classes = computed(() => {
|
|
33
36
|
return {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import Text from './Text.vue'
|
|
3
|
+
|
|
4
|
+
const props = withDefaults(
|
|
5
|
+
defineProps<{
|
|
6
|
+
center?: boolean
|
|
7
|
+
is?: string
|
|
8
|
+
orientation?: 'horizontal' | 'vertical'
|
|
9
|
+
horizontal?: boolean
|
|
10
|
+
vertical?: boolean
|
|
11
|
+
}>(),
|
|
12
|
+
{
|
|
13
|
+
center: false,
|
|
14
|
+
is: 'footer',
|
|
15
|
+
},
|
|
16
|
+
)
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<Text
|
|
21
|
+
:is="is"
|
|
22
|
+
class="footer"
|
|
23
|
+
:class="{
|
|
24
|
+
'divider-center': props.center,
|
|
25
|
+
'divider-horizontal': props.horizontal || props.orientation === 'horizontal',
|
|
26
|
+
'divider-vertical': props.vertical || props.orientation === 'vertical',
|
|
27
|
+
}"
|
|
28
|
+
>
|
|
29
|
+
<slot />
|
|
30
|
+
</Text>
|
|
31
|
+
</template>
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import Text from './Text.vue'
|
|
3
3
|
|
|
4
|
-
withDefaults(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
withDefaults(
|
|
5
|
+
defineProps<{
|
|
6
|
+
is?: string
|
|
7
|
+
}>(),
|
|
8
|
+
{
|
|
9
|
+
is: 'span',
|
|
10
|
+
},
|
|
11
|
+
)
|
|
9
12
|
</script>
|
|
10
13
|
|
|
11
14
|
<template>
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import Text from './Text.vue'
|
|
3
3
|
|
|
4
|
-
withDefaults(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
withDefaults(
|
|
5
|
+
defineProps<{
|
|
6
|
+
is?: string
|
|
7
|
+
}>(),
|
|
8
|
+
{
|
|
9
|
+
is: 'div',
|
|
10
|
+
},
|
|
11
|
+
)
|
|
9
12
|
</script>
|
|
10
13
|
|
|
11
14
|
<template>
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import Text from './Text.vue'
|
|
3
3
|
|
|
4
|
-
withDefaults(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
withDefaults(
|
|
5
|
+
defineProps<{
|
|
6
|
+
is?: string
|
|
7
|
+
}>(),
|
|
8
|
+
{
|
|
9
|
+
is: 'div',
|
|
10
|
+
},
|
|
11
|
+
)
|
|
9
12
|
</script>
|
|
10
13
|
|
|
11
14
|
<template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
is?: any
|
|
4
|
+
disabled?: boolean
|
|
5
|
+
}>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<component :is="props.is || 'div'" :class="{ 'hover-3d': !props.disabled }">
|
|
10
|
+
<slot />
|
|
11
|
+
<template v-if="!props.disabled">
|
|
12
|
+
<div></div>
|
|
13
|
+
<div></div>
|
|
14
|
+
<div></div>
|
|
15
|
+
<div></div>
|
|
16
|
+
<div></div>
|
|
17
|
+
<div></div>
|
|
18
|
+
<div></div>
|
|
19
|
+
<div></div>
|
|
20
|
+
</template>
|
|
21
|
+
</component>
|
|
22
|
+
</template>
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue'
|
|
3
3
|
|
|
4
|
-
const props = withDefaults(
|
|
5
|
-
|
|
4
|
+
const props = withDefaults(
|
|
5
|
+
defineProps<{
|
|
6
|
+
is?: string
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
align?: 'start' | 'center' | 'end'
|
|
9
|
+
start?: boolean
|
|
10
|
+
center?: boolean
|
|
11
|
+
end?: boolean
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}>(),
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
vAlign?: 'top' | 'middle' | 'bottom'
|
|
14
|
+
top?: boolean
|
|
15
|
+
middle?: boolean
|
|
16
|
+
bottom?: boolean
|
|
17
|
+
}>(),
|
|
18
|
+
{
|
|
19
|
+
is: 'div',
|
|
20
|
+
},
|
|
21
|
+
)
|
|
19
22
|
const classes = computed(() => {
|
|
20
23
|
return {
|
|
21
24
|
'indicator-start': props.start || props.align === 'start',
|