@fy-/fws-vue 0.1.3 → 0.1.5
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/components/ui/DefaultInput.vue +1 -1
- package/index.ts +4 -1
- package/package.json +1 -1
- package/presets/Lara/accordion/index.js +86 -0
- package/presets/Lara/autocomplete/index.js +284 -0
- package/presets/Lara/avatar/index.js +46 -0
- package/presets/Lara/badge/index.js +44 -0
- package/presets/Lara/badgedirective/index.js +49 -0
- package/presets/Lara/blockui/index.js +8 -0
- package/presets/Lara/breadcrumb/index.js +64 -0
- package/presets/Lara/button/index.js +470 -0
- package/presets/Lara/calendar/index.js +683 -0
- package/presets/Lara/card/index.js +37 -0
- package/presets/Lara/carousel/index.js +152 -0
- package/presets/Lara/cascadeselect/index.js +228 -0
- package/presets/Lara/checkbox/index.js +106 -0
- package/presets/Lara/chip/index.js +45 -0
- package/presets/Lara/chips/index.js +118 -0
- package/presets/Lara/colorpicker/index.js +129 -0
- package/presets/Lara/confirmpopup/index.js +107 -0
- package/presets/Lara/contextmenu/index.js +130 -0
- package/presets/Lara/datatable/index.js +1289 -0
- package/presets/Lara/dataview/index.js +40 -0
- package/presets/Lara/deferred/index.js +3 -0
- package/presets/Lara/dialog/index.js +249 -0
- package/presets/Lara/divider/index.js +72 -0
- package/presets/Lara/dock/index.js +97 -0
- package/presets/Lara/dropdown/index.js +300 -0
- package/presets/Lara/fieldset/index.js +98 -0
- package/presets/Lara/fileupload/index.js +173 -0
- package/presets/Lara/floatlabel/index.js +26 -0
- package/presets/Lara/galleria/index.js +351 -0
- package/presets/Lara/global.js +90 -0
- package/presets/Lara/iconfield/index.js +22 -0
- package/presets/Lara/image/index.js +206 -0
- package/presets/Lara/index.js +181 -0
- package/presets/Lara/inlinemessage/index.js +36 -0
- package/presets/Lara/inplace/index.js +27 -0
- package/presets/Lara/inputgroup/index.js +5 -0
- package/presets/Lara/inputgroupaddon/index.js +28 -0
- package/presets/Lara/inputmask/index.js +37 -0
- package/presets/Lara/inputnumber/index.js +253 -0
- package/presets/Lara/inputotp/index.js +72 -0
- package/presets/Lara/inputswitch/index.js +93 -0
- package/presets/Lara/inputtext/index.js +61 -0
- package/presets/Lara/knob/index.js +47 -0
- package/presets/Lara/listbox/index.js +170 -0
- package/presets/Lara/megamenu/index.js +207 -0
- package/presets/Lara/menu/index.js +98 -0
- package/presets/Lara/menubar/index.js +181 -0
- package/presets/Lara/message/index.js +87 -0
- package/presets/Lara/metergroup/index.js +110 -0
- package/presets/Lara/multiselect/index.js +589 -0
- package/presets/Lara/orderlist/index.js +266 -0
- package/presets/Lara/organizationchart/index.js +142 -0
- package/presets/Lara/overlaypanel/index.js +41 -0
- package/presets/Lara/paginator/index.js +590 -0
- package/presets/Lara/panel/index.js +93 -0
- package/presets/Lara/panelmenu/index.js +139 -0
- package/presets/Lara/password/index.js +140 -0
- package/presets/Lara/picklist/index.js +659 -0
- package/presets/Lara/progressbar/index.js +61 -0
- package/presets/Lara/progressspinner/index.js +51 -0
- package/presets/Lara/radiobutton/index.js +116 -0
- package/presets/Lara/rating/index.js +95 -0
- package/presets/Lara/ripple/index.js +6 -0
- package/presets/Lara/scrollpanel/index.js +77 -0
- package/presets/Lara/scrolltop/index.js +45 -0
- package/presets/Lara/selectbutton/index.js +60 -0
- package/presets/Lara/sidebar/index.js +163 -0
- package/presets/Lara/skeleton/index.js +19 -0
- package/presets/Lara/slider/index.js +149 -0
- package/presets/Lara/speeddial/index.js +535 -0
- package/presets/Lara/splitbutton/index.js +1081 -0
- package/presets/Lara/splitter/index.js +64 -0
- package/presets/Lara/stepper/index.js +183 -0
- package/presets/Lara/steps/index.js +115 -0
- package/presets/Lara/tabmenu/index.js +82 -0
- package/presets/Lara/tabview/index.js +166 -0
- package/presets/Lara/tag/index.js +37 -0
- package/presets/Lara/terminal/index.js +60 -0
- package/presets/Lara/textarea/index.js +39 -0
- package/presets/Lara/tieredmenu/index.js +125 -0
- package/presets/Lara/timeline/index.js +107 -0
- package/presets/Lara/toast/index.js +113 -0
- package/presets/Lara/togglebutton/index.js +100 -0
- package/presets/Lara/toolbar/index.js +28 -0
- package/presets/Lara/tooltip/index.js +73 -0
- package/presets/Lara/tree/index.js +281 -0
- package/presets/Lara/treeselect/index.js +387 -0
- package/presets/Lara/treetable/index.js +509 -0
- package/presets/Lara/tristatecheckbox/index.js +112 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: {
|
|
3
|
+
class: [
|
|
4
|
+
// Space
|
|
5
|
+
"p-5",
|
|
6
|
+
|
|
7
|
+
// Shape
|
|
8
|
+
"rounded-md",
|
|
9
|
+
|
|
10
|
+
// Color
|
|
11
|
+
"bg-surface-0 dark:bg-surface-800",
|
|
12
|
+
"text-surface-700 dark:text-white/80",
|
|
13
|
+
"border border-solid border-surface-200 dark:border-surface-700",
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
wrapper: {
|
|
17
|
+
class: ["overflow-auto"],
|
|
18
|
+
},
|
|
19
|
+
container: {
|
|
20
|
+
class: [
|
|
21
|
+
// Spacing
|
|
22
|
+
"m-0 p-0",
|
|
23
|
+
|
|
24
|
+
// Misc
|
|
25
|
+
"list-none overflow-auto",
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
node: {
|
|
29
|
+
class: [
|
|
30
|
+
"p-1",
|
|
31
|
+
"rounded-md",
|
|
32
|
+
"focus:outline-none focus:outline-offset-0 focus:ring focus:ring-inset focus:ring-primary-400/50 dark:focus:ring-primary-300/50",
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
content: ({ context, props }) => ({
|
|
36
|
+
class: [
|
|
37
|
+
// Flex and Alignment
|
|
38
|
+
"flex items-center",
|
|
39
|
+
|
|
40
|
+
// Shape
|
|
41
|
+
"rounded-md",
|
|
42
|
+
|
|
43
|
+
// Spacing
|
|
44
|
+
"p-2",
|
|
45
|
+
|
|
46
|
+
// Colors
|
|
47
|
+
"text-surface-600 dark:text-white/70",
|
|
48
|
+
{
|
|
49
|
+
"bg-primary-50 dark:bg-primary-400/30 text-primary-600 dark:text-surface-0":
|
|
50
|
+
context.selected,
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
// States
|
|
54
|
+
{
|
|
55
|
+
"hover:bg-surface-50 dark:hover:bg-surface-700/40":
|
|
56
|
+
(props.selectionMode == "single" ||
|
|
57
|
+
props.selectionMode == "multiple") &&
|
|
58
|
+
!context.selected,
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
// Transition
|
|
62
|
+
"transition-shadow duration-200",
|
|
63
|
+
|
|
64
|
+
{
|
|
65
|
+
"cursor-pointer select-none":
|
|
66
|
+
props.selectionMode == "single" || props.selectionMode == "multiple",
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
}),
|
|
70
|
+
toggler: ({ context }) => ({
|
|
71
|
+
class: [
|
|
72
|
+
// Flex and Alignment
|
|
73
|
+
"inline-flex items-center justify-center",
|
|
74
|
+
|
|
75
|
+
// Shape
|
|
76
|
+
"border-0 rounded-full",
|
|
77
|
+
|
|
78
|
+
// Size
|
|
79
|
+
"w-8 h-8",
|
|
80
|
+
|
|
81
|
+
// Spacing
|
|
82
|
+
"mr-2",
|
|
83
|
+
|
|
84
|
+
// Colors
|
|
85
|
+
"bg-transparent",
|
|
86
|
+
{
|
|
87
|
+
"text-surface-500 dark:text-white": !context.selected,
|
|
88
|
+
"text-primary-600 dark:text-white": context.selected,
|
|
89
|
+
invisible: context.leaf,
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
// States
|
|
93
|
+
"hover:bg-surface-200/20 dark:hover:bg-surface-500/20",
|
|
94
|
+
"focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50",
|
|
95
|
+
|
|
96
|
+
// Transition
|
|
97
|
+
"transition duration-200",
|
|
98
|
+
|
|
99
|
+
// Misc
|
|
100
|
+
"cursor-pointer select-none",
|
|
101
|
+
],
|
|
102
|
+
}),
|
|
103
|
+
nodeCheckbox: ({ props, context, instance }) => ({
|
|
104
|
+
root: {
|
|
105
|
+
class: [
|
|
106
|
+
"relative",
|
|
107
|
+
|
|
108
|
+
// Alignment
|
|
109
|
+
"inline-flex",
|
|
110
|
+
"align-bottom",
|
|
111
|
+
|
|
112
|
+
// Size
|
|
113
|
+
"w-6",
|
|
114
|
+
"h-6",
|
|
115
|
+
|
|
116
|
+
// Spacing
|
|
117
|
+
"mr-2",
|
|
118
|
+
|
|
119
|
+
// Misc
|
|
120
|
+
"cursor-pointer",
|
|
121
|
+
"select-none",
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
box: {
|
|
125
|
+
class: [
|
|
126
|
+
// Alignment
|
|
127
|
+
"flex",
|
|
128
|
+
"items-center",
|
|
129
|
+
"justify-center",
|
|
130
|
+
|
|
131
|
+
// Size
|
|
132
|
+
"w-6",
|
|
133
|
+
"h-6",
|
|
134
|
+
|
|
135
|
+
// Shape
|
|
136
|
+
"rounded-md",
|
|
137
|
+
"border-2",
|
|
138
|
+
|
|
139
|
+
// Colors
|
|
140
|
+
{
|
|
141
|
+
"border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-900":
|
|
142
|
+
!context.checked,
|
|
143
|
+
"border-primary-500 bg-primary-500 dark:border-primary-400 dark:bg-primary-400":
|
|
144
|
+
context.checked,
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
// States
|
|
148
|
+
{
|
|
149
|
+
"peer-hover:border-primary-500 dark:peer-hover:border-primary-400":
|
|
150
|
+
!props.disabled && !context.checked,
|
|
151
|
+
"peer-hover:bg-primary-600 dark:peer-hover:bg-primary-300 peer-hover:border-primary-700 dark:peer-hover:border-primary-300":
|
|
152
|
+
!props.disabled && context.checked,
|
|
153
|
+
"peer-focus-visible:border-primary-500 dark:peer-focus-visible:border-primary-400 peer-focus-visible:ring-2 peer-focus-visible:ring-primary-400/20 dark:peer-focus-visible:ring-primary-300/20":
|
|
154
|
+
!props.disabled,
|
|
155
|
+
"cursor-default opacity-60": props.disabled,
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
// Transitions
|
|
159
|
+
"transition-colors",
|
|
160
|
+
"duration-200",
|
|
161
|
+
],
|
|
162
|
+
},
|
|
163
|
+
input: {
|
|
164
|
+
class: [
|
|
165
|
+
"peer",
|
|
166
|
+
|
|
167
|
+
// Size
|
|
168
|
+
"w-full ",
|
|
169
|
+
"h-full",
|
|
170
|
+
|
|
171
|
+
// Position
|
|
172
|
+
"absolute",
|
|
173
|
+
"top-0 left-0",
|
|
174
|
+
"z-10",
|
|
175
|
+
|
|
176
|
+
// Spacing
|
|
177
|
+
"p-0",
|
|
178
|
+
"m-0",
|
|
179
|
+
|
|
180
|
+
// Shape
|
|
181
|
+
"opacity-0",
|
|
182
|
+
"rounded-md",
|
|
183
|
+
"outline-none",
|
|
184
|
+
"border-2 border-surface-200 dark:border-surface-700",
|
|
185
|
+
|
|
186
|
+
// Misc
|
|
187
|
+
"appearance-none",
|
|
188
|
+
"cursor-pointer",
|
|
189
|
+
],
|
|
190
|
+
},
|
|
191
|
+
icon: {
|
|
192
|
+
class: [
|
|
193
|
+
// Font
|
|
194
|
+
"text-base leading-none",
|
|
195
|
+
|
|
196
|
+
// Size
|
|
197
|
+
"w-4",
|
|
198
|
+
"h-4",
|
|
199
|
+
|
|
200
|
+
// Colors
|
|
201
|
+
{
|
|
202
|
+
"text-white dark:text-surface-900": !instance.partialChecked,
|
|
203
|
+
"text-gray dark:text-white": instance.partialChecked,
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
// Transitions
|
|
207
|
+
"transition-all",
|
|
208
|
+
"duration-200",
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
}),
|
|
212
|
+
nodeicon: {
|
|
213
|
+
class: [
|
|
214
|
+
// Space
|
|
215
|
+
"mr-2",
|
|
216
|
+
|
|
217
|
+
// Color
|
|
218
|
+
"text-surface-600 dark:text-white/70",
|
|
219
|
+
],
|
|
220
|
+
},
|
|
221
|
+
subgroup: {
|
|
222
|
+
class: ["m-0 list-none p-0 pl-2 mt-1"],
|
|
223
|
+
},
|
|
224
|
+
filtercontainer: {
|
|
225
|
+
class: [
|
|
226
|
+
"relative block",
|
|
227
|
+
|
|
228
|
+
// Space
|
|
229
|
+
"mb-2",
|
|
230
|
+
|
|
231
|
+
// Size
|
|
232
|
+
"w-full",
|
|
233
|
+
],
|
|
234
|
+
},
|
|
235
|
+
input: {
|
|
236
|
+
class: [
|
|
237
|
+
"relative",
|
|
238
|
+
// Font
|
|
239
|
+
"font-sans leading-none",
|
|
240
|
+
|
|
241
|
+
// Spacing
|
|
242
|
+
"m-0",
|
|
243
|
+
"p-3 pr-10",
|
|
244
|
+
|
|
245
|
+
// Size
|
|
246
|
+
"w-full",
|
|
247
|
+
|
|
248
|
+
// Shape
|
|
249
|
+
"rounded-md",
|
|
250
|
+
|
|
251
|
+
// Colors
|
|
252
|
+
"text-surface-600 dark:text-surface-200",
|
|
253
|
+
"placeholder:text-surface-400 dark:placeholder:text-surface-500",
|
|
254
|
+
"bg-surface-0 dark:bg-surface-900",
|
|
255
|
+
"border border-surface-300 dark:border-surface-600",
|
|
256
|
+
|
|
257
|
+
// States
|
|
258
|
+
"hover:border-primary-500 dark:hover:border-primary-400",
|
|
259
|
+
"focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-500/50 dark:focus:ring-primary-400/50",
|
|
260
|
+
|
|
261
|
+
// Transition & Misc
|
|
262
|
+
"appearance-none",
|
|
263
|
+
"transition-colors duration-200",
|
|
264
|
+
],
|
|
265
|
+
},
|
|
266
|
+
loadingicon: {
|
|
267
|
+
class: [
|
|
268
|
+
"text-surface-500 dark:text-surface-0/70",
|
|
269
|
+
"absolute top-[50%] right-[50%] -mt-2 -mr-2 animate-spin",
|
|
270
|
+
],
|
|
271
|
+
},
|
|
272
|
+
searchicon: {
|
|
273
|
+
class: [
|
|
274
|
+
// Position
|
|
275
|
+
"absolute top-1/2 -mt-2 right-3",
|
|
276
|
+
|
|
277
|
+
// Color
|
|
278
|
+
"text-surface-600 dark:hover:text-white/70",
|
|
279
|
+
],
|
|
280
|
+
},
|
|
281
|
+
};
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props, state }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
// Display and Position
|
|
5
|
+
"inline-flex",
|
|
6
|
+
"relative",
|
|
7
|
+
|
|
8
|
+
// Shape
|
|
9
|
+
"rounded-md",
|
|
10
|
+
|
|
11
|
+
// Color and Background
|
|
12
|
+
"bg-surface-0 dark:bg-surface-900",
|
|
13
|
+
"border",
|
|
14
|
+
{ "border-surface-300 dark:border-surface-600": !props.invalid },
|
|
15
|
+
|
|
16
|
+
// Invalid State
|
|
17
|
+
{ "border-red-500 dark:border-red-400": props.invalid },
|
|
18
|
+
|
|
19
|
+
// Transitions
|
|
20
|
+
"transition-all",
|
|
21
|
+
"duration-200",
|
|
22
|
+
|
|
23
|
+
// States
|
|
24
|
+
{
|
|
25
|
+
"hover:border-primary-500 dark:hover:border-primary-300":
|
|
26
|
+
!props.invalid,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50":
|
|
30
|
+
state.focused,
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
// Misc
|
|
34
|
+
"cursor-pointer",
|
|
35
|
+
"select-none",
|
|
36
|
+
{
|
|
37
|
+
"opacity-60": props.disabled,
|
|
38
|
+
"pointer-events-none": props.disabled,
|
|
39
|
+
"cursor-default": props.disabled,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
}),
|
|
43
|
+
labelContainer: {
|
|
44
|
+
class: ["overflow-hidden flex flex-auto cursor-pointer"],
|
|
45
|
+
},
|
|
46
|
+
label: {
|
|
47
|
+
class: [
|
|
48
|
+
"block leading-5",
|
|
49
|
+
|
|
50
|
+
// Space
|
|
51
|
+
"p-3",
|
|
52
|
+
|
|
53
|
+
// Color
|
|
54
|
+
"text-surface-800 dark:text-white/80",
|
|
55
|
+
|
|
56
|
+
// Transition
|
|
57
|
+
"transition duration-200",
|
|
58
|
+
|
|
59
|
+
// Misc
|
|
60
|
+
"overflow-hidden whitespace-nowrap cursor-pointer overflow-ellipsis",
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
trigger: {
|
|
64
|
+
class: [
|
|
65
|
+
// Flexbox
|
|
66
|
+
"flex items-center justify-center",
|
|
67
|
+
"shrink-0",
|
|
68
|
+
|
|
69
|
+
// Color and Background
|
|
70
|
+
"bg-transparent",
|
|
71
|
+
"text-surface-500",
|
|
72
|
+
|
|
73
|
+
// Size
|
|
74
|
+
"w-12",
|
|
75
|
+
|
|
76
|
+
// Shape
|
|
77
|
+
"rounded-tr-md",
|
|
78
|
+
"rounded-br-md",
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
panel: {
|
|
82
|
+
class: [
|
|
83
|
+
// Position
|
|
84
|
+
"absolute top-0 left-0",
|
|
85
|
+
|
|
86
|
+
// Shape
|
|
87
|
+
"border-0 dark:border",
|
|
88
|
+
"rounded-md",
|
|
89
|
+
"shadow-md",
|
|
90
|
+
|
|
91
|
+
// Color
|
|
92
|
+
"bg-surface-0 dark:bg-surface-800",
|
|
93
|
+
"text-surface-800 dark:text-white/80",
|
|
94
|
+
"dark:border-surface-700",
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
wrapper: {
|
|
98
|
+
class: [
|
|
99
|
+
// Sizing
|
|
100
|
+
"max-h-[200px]",
|
|
101
|
+
|
|
102
|
+
// Misc
|
|
103
|
+
"overflow-auto",
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
tree: {
|
|
107
|
+
root: {
|
|
108
|
+
class: [
|
|
109
|
+
// Space
|
|
110
|
+
"p-5",
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
wrapper: {
|
|
114
|
+
class: ["overflow-auto"],
|
|
115
|
+
},
|
|
116
|
+
container: {
|
|
117
|
+
class: [
|
|
118
|
+
// Spacing
|
|
119
|
+
"m-0 p-0",
|
|
120
|
+
|
|
121
|
+
// Misc
|
|
122
|
+
"list-none overflow-auto",
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
node: {
|
|
126
|
+
class: [
|
|
127
|
+
"p-1",
|
|
128
|
+
"rounded-md",
|
|
129
|
+
"focus:outline-none focus:outline-offset-0 focus:ring focus:ring-inset focus:ring-primary-400/50 dark:focus:ring-primary-300/50",
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
content: ({ context, props }) => ({
|
|
133
|
+
class: [
|
|
134
|
+
// Flex and Alignment
|
|
135
|
+
"flex items-center",
|
|
136
|
+
|
|
137
|
+
// Shape
|
|
138
|
+
"rounded-md",
|
|
139
|
+
|
|
140
|
+
// Spacing
|
|
141
|
+
"p-2",
|
|
142
|
+
|
|
143
|
+
// Colors
|
|
144
|
+
"text-surface-600 dark:text-white/70",
|
|
145
|
+
{
|
|
146
|
+
"bg-primary-50 dark:bg-primary-400/30 text-primary-600 dark:text-surface-0":
|
|
147
|
+
context.selected,
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
// States
|
|
151
|
+
{
|
|
152
|
+
"hover:bg-surface-50 dark:hover:bg-surface-700/40":
|
|
153
|
+
(props.selectionMode == "single" ||
|
|
154
|
+
props.selectionMode == "multiple") &&
|
|
155
|
+
!context.selected,
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
// Transition
|
|
159
|
+
"transition-shadow duration-200",
|
|
160
|
+
|
|
161
|
+
{
|
|
162
|
+
"cursor-pointer select-none":
|
|
163
|
+
props.selectionMode == "single" ||
|
|
164
|
+
props.selectionMode == "multiple",
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
}),
|
|
168
|
+
toggler: ({ context }) => ({
|
|
169
|
+
class: [
|
|
170
|
+
// Flex and Alignment
|
|
171
|
+
"inline-flex items-center justify-center",
|
|
172
|
+
|
|
173
|
+
// Shape
|
|
174
|
+
"border-0 rounded-full",
|
|
175
|
+
|
|
176
|
+
// Size
|
|
177
|
+
"w-8 h-8",
|
|
178
|
+
|
|
179
|
+
// Spacing
|
|
180
|
+
"mr-2",
|
|
181
|
+
|
|
182
|
+
// Colors
|
|
183
|
+
"bg-transparent",
|
|
184
|
+
{
|
|
185
|
+
"text-surface-500 dark:text-white": !context.selected,
|
|
186
|
+
"text-primary-600 dark:text-white": context.selected,
|
|
187
|
+
invisible: context.leaf,
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
// States
|
|
191
|
+
"hover:bg-surface-200/20 dark:hover:bg-surface-500/20",
|
|
192
|
+
"focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50",
|
|
193
|
+
|
|
194
|
+
// Transition
|
|
195
|
+
"transition duration-200",
|
|
196
|
+
|
|
197
|
+
// Misc
|
|
198
|
+
"cursor-pointer select-none",
|
|
199
|
+
],
|
|
200
|
+
}),
|
|
201
|
+
nodeCheckbox: ({ props, context, instance }) => ({
|
|
202
|
+
root: {
|
|
203
|
+
class: [
|
|
204
|
+
"relative",
|
|
205
|
+
|
|
206
|
+
// Alignment
|
|
207
|
+
"inline-flex",
|
|
208
|
+
"align-bottom",
|
|
209
|
+
|
|
210
|
+
// Size
|
|
211
|
+
"w-6",
|
|
212
|
+
"h-6",
|
|
213
|
+
|
|
214
|
+
// Spacing
|
|
215
|
+
"mr-2",
|
|
216
|
+
|
|
217
|
+
// Misc
|
|
218
|
+
"cursor-pointer",
|
|
219
|
+
"select-none",
|
|
220
|
+
],
|
|
221
|
+
},
|
|
222
|
+
box: {
|
|
223
|
+
class: [
|
|
224
|
+
// Alignment
|
|
225
|
+
"flex",
|
|
226
|
+
"items-center",
|
|
227
|
+
"justify-center",
|
|
228
|
+
|
|
229
|
+
// Size
|
|
230
|
+
"w-6",
|
|
231
|
+
"h-6",
|
|
232
|
+
|
|
233
|
+
// Shape
|
|
234
|
+
"rounded-md",
|
|
235
|
+
"border-2",
|
|
236
|
+
|
|
237
|
+
// Colors
|
|
238
|
+
{
|
|
239
|
+
"border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-900":
|
|
240
|
+
!context.checked,
|
|
241
|
+
"border-primary-500 bg-primary-500 dark:border-primary-400 dark:bg-primary-400":
|
|
242
|
+
context.checked,
|
|
243
|
+
},
|
|
244
|
+
|
|
245
|
+
// States
|
|
246
|
+
{
|
|
247
|
+
"peer-hover:border-primary-500 dark:peer-hover:border-primary-400":
|
|
248
|
+
!props.disabled && !context.checked,
|
|
249
|
+
"peer-hover:bg-primary-600 dark:peer-hover:bg-primary-300 peer-hover:border-primary-700 dark:peer-hover:border-primary-300":
|
|
250
|
+
!props.disabled && context.checked,
|
|
251
|
+
"peer-focus-visible:border-primary-500 dark:peer-focus-visible:border-primary-400 peer-focus-visible:ring-2 peer-focus-visible:ring-primary-400/20 dark:peer-focus-visible:ring-primary-300/20":
|
|
252
|
+
!props.disabled,
|
|
253
|
+
"cursor-default opacity-60": props.disabled,
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
// Transitions
|
|
257
|
+
"transition-colors",
|
|
258
|
+
"duration-200",
|
|
259
|
+
],
|
|
260
|
+
},
|
|
261
|
+
input: {
|
|
262
|
+
class: [
|
|
263
|
+
"peer",
|
|
264
|
+
|
|
265
|
+
// Size
|
|
266
|
+
"w-full ",
|
|
267
|
+
"h-full",
|
|
268
|
+
|
|
269
|
+
// Position
|
|
270
|
+
"absolute",
|
|
271
|
+
"top-0 left-0",
|
|
272
|
+
"z-10",
|
|
273
|
+
|
|
274
|
+
// Spacing
|
|
275
|
+
"p-0",
|
|
276
|
+
"m-0",
|
|
277
|
+
|
|
278
|
+
// Shape
|
|
279
|
+
"opacity-0",
|
|
280
|
+
"rounded-md",
|
|
281
|
+
"outline-none",
|
|
282
|
+
"border-2 border-surface-200 dark:border-surface-700",
|
|
283
|
+
|
|
284
|
+
// Misc
|
|
285
|
+
"appearance-none",
|
|
286
|
+
"cursor-pointer",
|
|
287
|
+
],
|
|
288
|
+
},
|
|
289
|
+
icon: {
|
|
290
|
+
class: [
|
|
291
|
+
// Font
|
|
292
|
+
"text-base leading-none",
|
|
293
|
+
|
|
294
|
+
// Size
|
|
295
|
+
"w-4",
|
|
296
|
+
"h-4",
|
|
297
|
+
|
|
298
|
+
// Colors
|
|
299
|
+
{
|
|
300
|
+
"text-white dark:text-surface-900": !instance.partialChecked,
|
|
301
|
+
"text-gray dark:text-white": instance.partialChecked,
|
|
302
|
+
},
|
|
303
|
+
|
|
304
|
+
// Transitions
|
|
305
|
+
"transition-all",
|
|
306
|
+
"duration-200",
|
|
307
|
+
],
|
|
308
|
+
},
|
|
309
|
+
}),
|
|
310
|
+
nodeicon: {
|
|
311
|
+
class: [
|
|
312
|
+
// Space
|
|
313
|
+
"mr-2",
|
|
314
|
+
|
|
315
|
+
// Color
|
|
316
|
+
"text-surface-600 dark:text-white/70",
|
|
317
|
+
],
|
|
318
|
+
},
|
|
319
|
+
subgroup: {
|
|
320
|
+
class: ["m-0 list-none p-0 pl-2 mt-1"],
|
|
321
|
+
},
|
|
322
|
+
filtercontainer: {
|
|
323
|
+
class: [
|
|
324
|
+
"relative block",
|
|
325
|
+
|
|
326
|
+
// Space
|
|
327
|
+
"mb-2",
|
|
328
|
+
|
|
329
|
+
// Size
|
|
330
|
+
"w-full",
|
|
331
|
+
],
|
|
332
|
+
},
|
|
333
|
+
input: {
|
|
334
|
+
class: [
|
|
335
|
+
"relative",
|
|
336
|
+
// Font
|
|
337
|
+
"font-sans leading-none",
|
|
338
|
+
|
|
339
|
+
// Spacing
|
|
340
|
+
"m-0",
|
|
341
|
+
"p-3 pr-10",
|
|
342
|
+
|
|
343
|
+
// Size
|
|
344
|
+
"w-full",
|
|
345
|
+
|
|
346
|
+
// Shape
|
|
347
|
+
"rounded-md",
|
|
348
|
+
|
|
349
|
+
// Colors
|
|
350
|
+
"text-surface-600 dark:text-surface-200",
|
|
351
|
+
"placeholder:text-surface-400 dark:placeholder:text-surface-500",
|
|
352
|
+
"bg-surface-0 dark:bg-surface-900",
|
|
353
|
+
"border border-surface-300 dark:border-surface-600",
|
|
354
|
+
|
|
355
|
+
// States
|
|
356
|
+
"hover:border-primary-500 dark:hover:border-primary-400",
|
|
357
|
+
"focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-500/50 dark:focus:ring-primary-400/50",
|
|
358
|
+
|
|
359
|
+
// Transition & Misc
|
|
360
|
+
"appearance-none",
|
|
361
|
+
"transition-colors duration-200",
|
|
362
|
+
],
|
|
363
|
+
},
|
|
364
|
+
loadingicon: {
|
|
365
|
+
class: [
|
|
366
|
+
"text-surface-500 dark:text-surface-0/70",
|
|
367
|
+
"absolute top-[50%] right-[50%] -mt-2 -mr-2 animate-spin",
|
|
368
|
+
],
|
|
369
|
+
},
|
|
370
|
+
searchicon: {
|
|
371
|
+
class: [
|
|
372
|
+
// Position
|
|
373
|
+
"absolute top-1/2 -mt-2 right-3",
|
|
374
|
+
|
|
375
|
+
// Color
|
|
376
|
+
"text-surface-600 dark:hover:text-white/70",
|
|
377
|
+
],
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
transition: {
|
|
381
|
+
enterFromClass: "opacity-0 scale-y-[0.8]",
|
|
382
|
+
enterActiveClass:
|
|
383
|
+
"transition-[transform,opacity] duration-[120ms] ease-[cubic-bezier(0,0,0.2,1)]",
|
|
384
|
+
leaveActiveClass: "transition-opacity duration-100 ease-linear",
|
|
385
|
+
leaveToClass: "opacity-0",
|
|
386
|
+
},
|
|
387
|
+
};
|