frappe-ui 0.1.197 → 0.1.199
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/package.json +1 -1
- package/src/components/Combobox/Combobox.vue +1 -1
- package/src/components/Combobox/types.ts +1 -0
- package/src/components/Dialog/Dialog.vue +2 -2
- package/src/components/Dropdown/Dropdown.story.vue +1 -0
- package/src/components/Dropdown/Dropdown.vue +60 -15
- package/src/components/Dropdown/types.ts +1 -0
- package/src/components/ListView/ListEmptyState.vue +1 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<DialogRoot v-model:open="isOpen" @update:open="handleOpenChange">
|
|
3
3
|
<DialogPortal>
|
|
4
4
|
<DialogOverlay
|
|
5
|
-
class="fixed inset-0 bg-black-overlay-200 backdrop-filter backdrop-blur-[12px] overflow-y-auto dialog-overlay"
|
|
5
|
+
class="fixed inset-0 bg-black-overlay-200 backdrop-filter backdrop-blur-[12px] overflow-y-auto dialog-overlay outline-none"
|
|
6
6
|
:data-dialog="options.title"
|
|
7
7
|
@after-leave="$emit('after-leave')"
|
|
8
8
|
>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:class="dialogPositionClasses"
|
|
12
12
|
>
|
|
13
13
|
<DialogContent
|
|
14
|
-
class="my-8 inline-block w-full transform overflow-hidden rounded-xl bg-surface-modal text-left align-middle shadow-xl dialog-content"
|
|
14
|
+
class="my-8 inline-block w-full transform overflow-hidden rounded-xl bg-surface-modal text-left align-middle shadow-xl dialog-content focus-visible:outline-none"
|
|
15
15
|
:class="{
|
|
16
16
|
'max-w-7xl': options.size === '7xl',
|
|
17
17
|
'max-w-6xl': options.size === '6xl',
|
|
@@ -31,14 +31,28 @@
|
|
|
31
31
|
</DropdownMenuLabel>
|
|
32
32
|
|
|
33
33
|
<template v-for="item in group.items" :key="item.label">
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
<div v-if="item.switch" :class="cssClasses.itemButton">
|
|
35
|
+
<FeatherIcon
|
|
36
|
+
v-if="item.icon && typeof item.icon === 'string'"
|
|
37
|
+
:name="item.icon"
|
|
38
|
+
:class="[cssClasses.itemIcon, getIconColor(item)]"
|
|
39
|
+
aria-hidden="true"
|
|
40
|
+
/>
|
|
41
|
+
<component
|
|
42
|
+
:class="[cssClasses.itemIcon, getIconColor(item)]"
|
|
43
|
+
v-else-if="item.icon"
|
|
44
|
+
:is="item.icon"
|
|
45
|
+
/>
|
|
46
|
+
<span :class="[cssClasses.itemLabel, getTextColor(item)]">
|
|
47
|
+
{{ item.label }}
|
|
48
|
+
</span>
|
|
49
|
+
<Switch
|
|
50
|
+
class="ml-auto"
|
|
51
|
+
label-classes="font-normal cursor-pointer"
|
|
52
|
+
@change="item.onClick?.($event)"
|
|
53
|
+
:model-value="item.switchValue || false"
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
42
56
|
<DropdownMenuItem v-else as-child @select="item.onClick">
|
|
43
57
|
<slot v-if="$slots.item" name="item" v-bind="{ item, close }" />
|
|
44
58
|
<component
|
|
@@ -100,14 +114,45 @@
|
|
|
100
114
|
v-for="subItem in submenuGroup.items"
|
|
101
115
|
:key="subItem.label"
|
|
102
116
|
>
|
|
103
|
-
<
|
|
117
|
+
<div
|
|
104
118
|
v-if="subItem.switch"
|
|
105
|
-
class="
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
119
|
+
:class="cssClasses.itemButton"
|
|
120
|
+
>
|
|
121
|
+
<FeatherIcon
|
|
122
|
+
v-if="
|
|
123
|
+
subItem.icon && typeof subItem.icon === 'string'
|
|
124
|
+
"
|
|
125
|
+
:name="subItem.icon"
|
|
126
|
+
:class="[
|
|
127
|
+
cssClasses.itemIcon,
|
|
128
|
+
getIconColor(subItem),
|
|
129
|
+
]"
|
|
130
|
+
aria-hidden="true"
|
|
131
|
+
/>
|
|
132
|
+
<component
|
|
133
|
+
:class="[
|
|
134
|
+
cssClasses.itemIcon,
|
|
135
|
+
getIconColor(subItem),
|
|
136
|
+
]"
|
|
137
|
+
v-else-if="subItem.icon"
|
|
138
|
+
:is="subItem.icon"
|
|
139
|
+
/>
|
|
140
|
+
<span
|
|
141
|
+
:class="[
|
|
142
|
+
cssClasses.itemLabel,
|
|
143
|
+
getTextColor(subItem),
|
|
144
|
+
]"
|
|
145
|
+
>
|
|
146
|
+
{{ subItem.label }}
|
|
147
|
+
</span>
|
|
148
|
+
<Switch
|
|
149
|
+
class="ml-auto"
|
|
150
|
+
label-classes="font-normal cursor-pointer"
|
|
151
|
+
@change="subItem.onClick?.($event)"
|
|
152
|
+
:model-value="subItem.switchValue || false"
|
|
153
|
+
/>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
111
156
|
<DropdownMenuItem
|
|
112
157
|
v-else
|
|
113
158
|
as-child
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
class="flex h-full w-full flex-col items-center justify-center text-base"
|
|
4
4
|
>
|
|
5
5
|
<slot>
|
|
6
|
-
<div class="text-xl font-medium">{{ list.options.emptyState.title }}</div>
|
|
6
|
+
<div class="text-xl font-medium text-ink-gray-8 mt-6">{{ list.options.emptyState.title }}</div>
|
|
7
7
|
<div class="mt-1 text-base text-ink-gray-5">
|
|
8
8
|
{{ list.options.emptyState.description }}
|
|
9
9
|
</div>
|