daisy-ui-kit 5.0.0-pre.10 → 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/app/components/Accordion.vue +8 -5
- package/app/components/Alert.vue +2 -1
- package/app/components/Avatar.vue +10 -7
- package/app/components/AvatarGroup.vue +6 -2
- package/app/components/Badge.vue +14 -1
- package/app/components/Button.vue +60 -45
- package/app/components/Calendar.vue +24 -1
- package/app/components/CalendarInput.vue +2 -2
- package/app/components/CalendarSkeleton.vue +51 -10
- package/app/components/Card.vue +15 -2
- package/app/components/CardActions.vue +1 -1
- package/app/components/CardBody.vue +1 -1
- package/app/components/CardTitle.vue +1 -1
- package/app/components/Carousel.vue +2 -1
- package/app/components/Chat.vue +6 -1
- package/app/components/Checkbox.vue +1 -1
- package/app/components/Collapse.vue +37 -5
- package/app/components/CollapseTitle.vue +11 -1
- package/app/components/Countdown.vue +3 -3
- package/app/components/CountdownTimers.vue +4 -7
- package/app/components/Counter.vue +13 -2
- package/app/components/DaisyLink.vue +29 -15
- package/app/components/Dock.vue +1 -1
- package/app/components/DockItem.vue +1 -1
- package/app/components/Drawer.vue +15 -12
- package/app/components/DrawerContent.vue +9 -6
- package/app/components/DrawerSide.vue +9 -6
- package/app/components/Dropdown.vue +61 -50
- package/app/components/DropdownButton.vue +11 -4
- package/app/components/DropdownContent.vue +90 -19
- package/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 +1 -4
- package/app/components/FileInput.vue +1 -1
- package/app/components/Filter.vue +35 -32
- package/app/components/Flex.vue +3 -1
- package/app/components/FlexItem.vue +30 -27
- package/app/components/Footer.vue +16 -12
- package/app/components/FooterTitle.vue +8 -5
- package/app/components/Hero.vue +9 -6
- package/app/components/HeroContent.vue +9 -6
- package/app/components/Hover3D.vue +22 -0
- package/app/components/HoverGallery.vue +11 -0
- package/app/components/Indicator.vue +8 -5
- package/app/components/IndicatorItem.vue +16 -13
- package/app/components/Input.vue +47 -40
- package/app/components/Kbd.vue +2 -1
- package/app/components/Label.vue +32 -29
- package/app/components/MenuExpand.vue +1 -7
- package/app/components/MenuExpandToggle.vue +7 -1
- package/app/components/MenuItem.vue +6 -4
- package/app/components/Modal.vue +23 -17
- package/app/components/Progress.vue +13 -1
- package/app/components/Prose.vue +7 -2
- package/app/components/RadialProgress.vue +8 -8
- package/app/components/Radio.vue +1 -1
- package/app/components/RadioGroup.vue +2 -2
- package/app/components/Range.vue +2 -2
- package/app/components/RangeMeasure.vue +33 -30
- package/app/components/Rating.vue +70 -53
- package/app/components/Select.vue +44 -47
- package/app/components/SkeletonText.vue +11 -0
- package/app/components/Steps.vue +7 -2
- package/app/components/Swap.vue +4 -10
- package/app/components/Tab.vue +18 -5
- package/app/components/Text.vue +42 -22
- package/app/components/TextArea.vue +30 -27
- package/app/components/TextRotate.vue +24 -0
- package/app/components/ThemeController.vue +3 -4
- package/app/components/ThemeProvider.vue +47 -32
- package/app/components/TimelineLine.vue +1 -1
- package/app/components/TimelineStart.vue +2 -1
- package/app/components/Toast.vue +1 -6
- package/app/components/Toggle.vue +2 -2
- package/app/components/Tooltip.vue +2 -1
- package/app/utils/drawer-utils.ts +15 -13
- package/app/utils/position-area.ts +41 -0
- package/package.json +9 -7
|
@@ -8,36 +8,39 @@ interface FilterItem {
|
|
|
8
8
|
|
|
9
9
|
type FilterItemInput = string | FilterItem
|
|
10
10
|
|
|
11
|
-
const props = withDefaults(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}>(),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
+
)
|
|
41
44
|
|
|
42
45
|
const emit = defineEmits(['update:modelValue'])
|
|
43
46
|
|
|
@@ -49,7 +52,7 @@ const currentValue = computed({
|
|
|
49
52
|
})
|
|
50
53
|
|
|
51
54
|
const normalizedItems = computed(() => {
|
|
52
|
-
return props.items.map(
|
|
55
|
+
return props.items.map(item => {
|
|
53
56
|
if (typeof item === 'string') {
|
|
54
57
|
return { label: item, value: item }
|
|
55
58
|
}
|
|
@@ -76,7 +79,7 @@ const normalizedItems = computed(() => {
|
|
|
76
79
|
:name="name"
|
|
77
80
|
:aria-label="resetLabel"
|
|
78
81
|
:value="null"
|
|
79
|
-
|
|
82
|
+
/>
|
|
80
83
|
|
|
81
84
|
<!-- Filter items -->
|
|
82
85
|
<template v-for="(item, index) in normalizedItems" :key="index">
|
|
@@ -102,7 +105,7 @@ const normalizedItems = computed(() => {
|
|
|
102
105
|
:name="name"
|
|
103
106
|
:aria-label="item.label"
|
|
104
107
|
:value="item.value"
|
|
105
|
-
|
|
108
|
+
/>
|
|
106
109
|
</template>
|
|
107
110
|
|
|
108
111
|
<!-- Reset button at end -->
|
|
@@ -114,7 +117,7 @@ const normalizedItems = computed(() => {
|
|
|
114
117
|
:name="name"
|
|
115
118
|
:aria-label="resetLabel"
|
|
116
119
|
:value="null"
|
|
117
|
-
|
|
120
|
+
/>
|
|
118
121
|
|
|
119
122
|
<!-- Optional slot for custom items -->
|
|
120
123
|
<slot />
|
package/app/components/Flex.vue
CHANGED
|
@@ -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 {
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import Text from './Text.vue'
|
|
2
|
+
import Text from './Text.vue'
|
|
3
3
|
|
|
4
|
-
const props = withDefaults(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
+
)
|
|
14
17
|
</script>
|
|
15
18
|
|
|
16
19
|
<template>
|
|
17
20
|
<Text
|
|
18
|
-
:is="is"
|
|
21
|
+
:is="is"
|
|
22
|
+
class="footer"
|
|
19
23
|
:class="{
|
|
20
24
|
'divider-center': props.center,
|
|
21
25
|
'divider-horizontal': props.horizontal || props.orientation === 'horizontal',
|
|
@@ -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>
|
package/app/components/Hero.vue
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import Text from './Text.vue'
|
|
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
|
-
import Text from './Text.vue'
|
|
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',
|
package/app/components/Input.vue
CHANGED
|
@@ -1,36 +1,49 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import { computed, inject, ref } from 'vue'
|
|
2
|
+
import { computed, inject } from 'vue'
|
|
4
3
|
|
|
5
4
|
// Map input type to value type
|
|
6
5
|
type InputType =
|
|
7
|
-
| 'text'
|
|
6
|
+
| 'text'
|
|
7
|
+
| 'password'
|
|
8
|
+
| 'email'
|
|
9
|
+
| 'number'
|
|
10
|
+
| 'date'
|
|
11
|
+
| 'datetime-local'
|
|
12
|
+
| 'week'
|
|
13
|
+
| 'month'
|
|
14
|
+
| 'tel'
|
|
15
|
+
| 'url'
|
|
16
|
+
| 'search'
|
|
17
|
+
| 'time'
|
|
8
18
|
|
|
9
|
-
const props = withDefaults(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
const props = withDefaults(
|
|
20
|
+
defineProps<{
|
|
21
|
+
modelValue?: string | number | null
|
|
22
|
+
type?: InputType
|
|
23
|
+
placeholder?: string
|
|
24
|
+
disabled?: boolean
|
|
25
|
+
validator?: boolean
|
|
26
|
+
join?: boolean
|
|
27
|
+
color?: string
|
|
28
|
+
primary?: boolean
|
|
29
|
+
secondary?: boolean
|
|
30
|
+
accent?: boolean
|
|
31
|
+
info?: boolean
|
|
32
|
+
success?: boolean
|
|
33
|
+
warning?: boolean
|
|
34
|
+
error?: boolean
|
|
35
|
+
ghost?: boolean
|
|
36
|
+
size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
|
|
37
|
+
xl?: boolean
|
|
38
|
+
lg?: boolean
|
|
39
|
+
md?: boolean
|
|
40
|
+
sm?: boolean
|
|
41
|
+
xs?: boolean
|
|
42
|
+
}>(),
|
|
43
|
+
{
|
|
44
|
+
type: 'text',
|
|
45
|
+
},
|
|
46
|
+
)
|
|
34
47
|
const emit = defineEmits(['update:modelValue'])
|
|
35
48
|
|
|
36
49
|
// For slot context
|
|
@@ -45,18 +58,17 @@ function handleInput(event: Event) {
|
|
|
45
58
|
if (props.type === 'number') {
|
|
46
59
|
const inputVal = (event.target as HTMLInputElement).value
|
|
47
60
|
val = inputVal === '' ? null : Number(inputVal)
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
61
|
+
} else {
|
|
50
62
|
val = (event.target as HTMLInputElement).value
|
|
51
63
|
}
|
|
52
64
|
emit('update:modelValue', val)
|
|
53
65
|
|
|
54
66
|
// Sync checked only on input if it's a checkbox
|
|
55
67
|
if (
|
|
56
|
-
props.type === 'checkbox'
|
|
57
|
-
&&
|
|
58
|
-
|
|
59
|
-
|
|
68
|
+
props.type === 'checkbox' &&
|
|
69
|
+
labelCtx &&
|
|
70
|
+
Object.prototype.hasOwnProperty.call(labelCtx, 'checked') &&
|
|
71
|
+
typeof labelCtx.checked.value === 'boolean'
|
|
60
72
|
) {
|
|
61
73
|
labelCtx.checked.value = Boolean(event.target.checked)
|
|
62
74
|
}
|
|
@@ -110,10 +122,5 @@ const inputModel = computed({
|
|
|
110
122
|
:input-model="inputModel"
|
|
111
123
|
/>
|
|
112
124
|
</div>
|
|
113
|
-
<input
|
|
114
|
-
v-else
|
|
115
|
-
v-bind="inputAttrs"
|
|
116
|
-
:value="inputModel"
|
|
117
|
-
@input="handleInput"
|
|
118
|
-
>
|
|
125
|
+
<input v-else v-bind="inputAttrs" :value="inputModel" @input="handleInput" />
|
|
119
126
|
</template>
|
package/app/components/Kbd.vue
CHANGED
package/app/components/Label.vue
CHANGED
|
@@ -2,34 +2,37 @@
|
|
|
2
2
|
import { provide, ref } from 'vue'
|
|
3
3
|
import Text from './Text.vue'
|
|
4
4
|
|
|
5
|
-
withDefaults(
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
withDefaults(
|
|
6
|
+
defineProps<{
|
|
7
|
+
is?: string
|
|
8
|
+
floating?: boolean
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
input?: boolean
|
|
11
|
+
select?: boolean
|
|
12
|
+
toggle?: boolean
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}>(),
|
|
31
|
-
|
|
32
|
-
|
|
14
|
+
join?: boolean
|
|
15
|
+
color?: string
|
|
16
|
+
neutral?: boolean
|
|
17
|
+
primary?: boolean
|
|
18
|
+
secondary?: boolean
|
|
19
|
+
accent?: boolean
|
|
20
|
+
info?: boolean
|
|
21
|
+
success?: boolean
|
|
22
|
+
warning?: boolean
|
|
23
|
+
error?: boolean
|
|
24
|
+
ghost?: boolean
|
|
25
|
+
size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
|
|
26
|
+
xl?: boolean
|
|
27
|
+
lg?: boolean
|
|
28
|
+
md?: boolean
|
|
29
|
+
sm?: boolean
|
|
30
|
+
xs?: boolean
|
|
31
|
+
}>(),
|
|
32
|
+
{
|
|
33
|
+
is: 'label',
|
|
34
|
+
},
|
|
35
|
+
)
|
|
33
36
|
|
|
34
37
|
// Provide label context for child inputs
|
|
35
38
|
const checked = ref(false)
|
|
@@ -41,9 +44,9 @@ provide('labelCtx', { checked })
|
|
|
41
44
|
:is="is"
|
|
42
45
|
:class="[
|
|
43
46
|
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
input,
|
|
48
|
+
select,
|
|
49
|
+
toggle,
|
|
47
50
|
'join-item': (input || select || toggle) && join,
|
|
48
51
|
'input-neutral': input && (neutral || color === 'neutral'),
|
|
49
52
|
'input-primary': input && (primary || color === 'primary'),
|
|
@@ -88,13 +88,7 @@ function handleClick(_ev: MouseEvent) {}
|
|
|
88
88
|
</script>
|
|
89
89
|
|
|
90
90
|
<template>
|
|
91
|
-
<details
|
|
92
|
-
:id="wrapperId"
|
|
93
|
-
ref="expandEl"
|
|
94
|
-
class="dropdown menu-expand"
|
|
95
|
-
:open="isOpen"
|
|
96
|
-
@click="handleClick"
|
|
97
|
-
>
|
|
91
|
+
<details :id="wrapperId" ref="expandEl" class="dropdown menu-expand" :open="isOpen" @click="handleClick">
|
|
98
92
|
<slot v-bind="{ toggle, open, close }" />
|
|
99
93
|
</details>
|
|
100
94
|
</template>
|
|
@@ -8,7 +8,13 @@ const { id, isOpen, toggle } = menuExpandState || {}
|
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
|
-
<summary
|
|
11
|
+
<summary
|
|
12
|
+
:id="id"
|
|
13
|
+
:aria-expanded="isOpen"
|
|
14
|
+
aria-haspopup="menu"
|
|
15
|
+
class="menu-expand-toggle"
|
|
16
|
+
@click.prevent.stop="toggle"
|
|
17
|
+
>
|
|
12
18
|
<slot />
|
|
13
19
|
</summary>
|
|
14
20
|
</template>
|
|
@@ -15,12 +15,14 @@ defineProps<{
|
|
|
15
15
|
Allow adding .active class to the MenuItem element.
|
|
16
16
|
DaisyUI only supports adding it to the `a` element.
|
|
17
17
|
*/
|
|
18
|
-
.menu-item.menu-active > a,
|
|
18
|
+
.menu-item.menu-active > a,
|
|
19
|
+
.menu-item.menu-active > span {
|
|
19
20
|
background-color: hsl(var(--n) / var(--tw-bg-opacity));
|
|
20
21
|
color: hsl(var(--nc) / var(--tw-text-opacity));
|
|
21
22
|
}
|
|
22
|
-
.menu-item.menu-disabled > a,
|
|
23
|
-
|
|
23
|
+
.menu-item.menu-disabled > a,
|
|
24
|
+
.menu-item.menu-disabled > span {
|
|
25
|
+
background-color: var(--n);
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
/* Fix padding when putting a Dropdown inside of a menu */
|
|
@@ -32,6 +34,6 @@ defineProps<{
|
|
|
32
34
|
padding-left: 1rem;
|
|
33
35
|
padding-right: 1rem;
|
|
34
36
|
padding-top: 0.5rem;
|
|
35
|
-
padding-bottom: 0.5rem
|
|
37
|
+
padding-bottom: 0.5rem;
|
|
36
38
|
}
|
|
37
39
|
</style>
|