@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,93 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
"inline-block relative",
|
|
5
|
+
"w-12 h-7",
|
|
6
|
+
"rounded-2xl",
|
|
7
|
+
{
|
|
8
|
+
"opacity-60 select-none pointer-events-none cursor-default":
|
|
9
|
+
props.disabled,
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
}),
|
|
13
|
+
slider: ({ props }) => ({
|
|
14
|
+
class: [
|
|
15
|
+
// Position
|
|
16
|
+
"absolute top-0 left-0 right-0 bottom-0",
|
|
17
|
+
{
|
|
18
|
+
"before:transform before:translate-x-5":
|
|
19
|
+
props.modelValue == props.trueValue,
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
// Shape
|
|
23
|
+
"rounded-2xl",
|
|
24
|
+
|
|
25
|
+
// Before:
|
|
26
|
+
"before:absolute before:top-1/2 before:left-1",
|
|
27
|
+
"before:-mt-2.5",
|
|
28
|
+
"before:h-5 before:w-5",
|
|
29
|
+
"before:rounded-full",
|
|
30
|
+
"before:duration-200",
|
|
31
|
+
"before:bg-surface-0 before:dark:bg-surface-900",
|
|
32
|
+
|
|
33
|
+
// Colors
|
|
34
|
+
"border",
|
|
35
|
+
{
|
|
36
|
+
"bg-surface-200 dark:bg-surface-700": !(
|
|
37
|
+
props.modelValue == props.trueValue
|
|
38
|
+
),
|
|
39
|
+
"bg-primary-500 dark:bg-primary-400":
|
|
40
|
+
props.modelValue == props.trueValue,
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
{ "border-transparent": !props.invalid },
|
|
44
|
+
|
|
45
|
+
// Invalid State
|
|
46
|
+
{ "border-red-500 dark:border-red-400": props.invalid },
|
|
47
|
+
|
|
48
|
+
// States
|
|
49
|
+
{
|
|
50
|
+
"peer-hover:bg-surface-300 dark:peer-hover:bg-surface-600 ":
|
|
51
|
+
!(props.modelValue == props.trueValue) && !props.disabled,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"peer-hover:bg-primary-600 dark:peer-hover:bg-surface-300 ":
|
|
55
|
+
props.modelValue == props.trueValue && !props.disabled,
|
|
56
|
+
},
|
|
57
|
+
"peer-focus-visible:ring peer-focus-visible:ring-primary-400/50 dark:peer-focus-visible:ring-primary-300/50",
|
|
58
|
+
|
|
59
|
+
// Transition
|
|
60
|
+
"transition-colors duration-200",
|
|
61
|
+
|
|
62
|
+
// Misc
|
|
63
|
+
"cursor-pointer",
|
|
64
|
+
],
|
|
65
|
+
}),
|
|
66
|
+
input: {
|
|
67
|
+
class: [
|
|
68
|
+
"peer",
|
|
69
|
+
|
|
70
|
+
// Size
|
|
71
|
+
"w-full ",
|
|
72
|
+
"h-full",
|
|
73
|
+
|
|
74
|
+
// Position
|
|
75
|
+
"absolute",
|
|
76
|
+
"top-0 left-0",
|
|
77
|
+
"z-10",
|
|
78
|
+
|
|
79
|
+
// Spacing
|
|
80
|
+
"p-0",
|
|
81
|
+
"m-0",
|
|
82
|
+
|
|
83
|
+
// Shape
|
|
84
|
+
"opacity-0",
|
|
85
|
+
"rounded-[2.5rem]",
|
|
86
|
+
"outline-none",
|
|
87
|
+
|
|
88
|
+
// Misc
|
|
89
|
+
"appearance-none",
|
|
90
|
+
"cursor-pointer",
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props, context, parent }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
// Font
|
|
5
|
+
"font-sans leading-none",
|
|
6
|
+
|
|
7
|
+
// Flex
|
|
8
|
+
{ "flex-1 w-[1%]": parent.instance.$name == "InputGroup" },
|
|
9
|
+
|
|
10
|
+
// Spacing
|
|
11
|
+
"m-0",
|
|
12
|
+
{
|
|
13
|
+
"px-4 py-4": props.size == "large",
|
|
14
|
+
"px-2 py-2": props.size == "small",
|
|
15
|
+
"p-3": props.size == null,
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
// Shape
|
|
19
|
+
{ "rounded-md": parent.instance.$name !== "InputGroup" },
|
|
20
|
+
{
|
|
21
|
+
"first:rounded-l-md rounded-none last:rounded-r-md":
|
|
22
|
+
parent.instance.$name == "InputGroup",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"border-0 border-y border-l last:border-r":
|
|
26
|
+
parent.instance.$name == "InputGroup",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"first:ml-0 -ml-px":
|
|
30
|
+
parent.instance.$name == "InputGroup" && !props.showButtons,
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
// Colors
|
|
34
|
+
"text-surface-600 dark:text-surface-200",
|
|
35
|
+
"placeholder:text-surface-400 dark:placeholder:text-surface-500",
|
|
36
|
+
"bg-surface-0 dark:bg-surface-900",
|
|
37
|
+
"border",
|
|
38
|
+
{ "border-surface-300 dark:border-surface-600": !props.invalid },
|
|
39
|
+
|
|
40
|
+
// Invalid State
|
|
41
|
+
{ "border-red-500 dark:border-red-400": props.invalid },
|
|
42
|
+
|
|
43
|
+
// States
|
|
44
|
+
{
|
|
45
|
+
"hover:border-primary-500 dark:hover:border-primary-400":
|
|
46
|
+
!context.disabled && !props.invalid,
|
|
47
|
+
"focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-500/50 dark:focus:ring-primary-400/50 focus:z-10":
|
|
48
|
+
!context.disabled,
|
|
49
|
+
"opacity-60 select-none pointer-events-none cursor-default":
|
|
50
|
+
context.disabled,
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
// Filled State *for FloatLabel
|
|
54
|
+
{ filled: parent.instance?.$name == "FloatLabel" && context.filled },
|
|
55
|
+
|
|
56
|
+
// Misc
|
|
57
|
+
"appearance-none",
|
|
58
|
+
"transition-colors duration-200",
|
|
59
|
+
],
|
|
60
|
+
}),
|
|
61
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
// Misc
|
|
5
|
+
{
|
|
6
|
+
"opacity-60 select-none pointer-events-none cursor-default":
|
|
7
|
+
props.disabled,
|
|
8
|
+
},
|
|
9
|
+
],
|
|
10
|
+
}),
|
|
11
|
+
range: {
|
|
12
|
+
class: [
|
|
13
|
+
// Stroke
|
|
14
|
+
"stroke-current",
|
|
15
|
+
|
|
16
|
+
// Color
|
|
17
|
+
"stroke-surface-200 dark:stroke-surface-700",
|
|
18
|
+
|
|
19
|
+
// Fill
|
|
20
|
+
"fill-none",
|
|
21
|
+
|
|
22
|
+
// Transition
|
|
23
|
+
"transition duration-100 ease-in",
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
value: {
|
|
27
|
+
class: [
|
|
28
|
+
// Animation
|
|
29
|
+
"animate-dash-frame",
|
|
30
|
+
|
|
31
|
+
// Color
|
|
32
|
+
"stroke-primary-500 dark:stroke-primary-400",
|
|
33
|
+
|
|
34
|
+
// Fill
|
|
35
|
+
"fill-none",
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
label: {
|
|
39
|
+
class: [
|
|
40
|
+
// Text Style
|
|
41
|
+
"text-center text-xl",
|
|
42
|
+
|
|
43
|
+
// Color
|
|
44
|
+
"fill-surface-600 dark:fill-surface-200",
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
// Sizing and Shape
|
|
5
|
+
"min-w-[12rem]",
|
|
6
|
+
"rounded-md",
|
|
7
|
+
|
|
8
|
+
// Colors
|
|
9
|
+
"bg-surface-0 dark:bg-surface-800",
|
|
10
|
+
"text-surface-700 dark:text-white/80",
|
|
11
|
+
"border",
|
|
12
|
+
{ "border-surface-300 dark:border-surface-600": !props.invalid },
|
|
13
|
+
|
|
14
|
+
// Invalid State
|
|
15
|
+
{ "border-red-500 dark:border-red-400": props.invalid },
|
|
16
|
+
],
|
|
17
|
+
}),
|
|
18
|
+
wrapper: {
|
|
19
|
+
class: [
|
|
20
|
+
// Overflow
|
|
21
|
+
"overflow-auto",
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
list: {
|
|
25
|
+
class: "py-3 list-none m-0",
|
|
26
|
+
},
|
|
27
|
+
item: ({ context }) => ({
|
|
28
|
+
class: [
|
|
29
|
+
// Font
|
|
30
|
+
"font-normal",
|
|
31
|
+
"leading-none",
|
|
32
|
+
|
|
33
|
+
// Position
|
|
34
|
+
"relative",
|
|
35
|
+
|
|
36
|
+
// Shape
|
|
37
|
+
"border-0",
|
|
38
|
+
"rounded-none",
|
|
39
|
+
|
|
40
|
+
// Spacing
|
|
41
|
+
"m-0",
|
|
42
|
+
"py-3 px-5",
|
|
43
|
+
|
|
44
|
+
// Color
|
|
45
|
+
{
|
|
46
|
+
"text-surface-700 dark:text-white/80":
|
|
47
|
+
!context.focused && !context.selected,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"bg-surface-200 dark:bg-surface-600/60 text-surface-700 dark:text-white/80":
|
|
51
|
+
context.focused && !context.selected,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"bg-primary-100 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":
|
|
55
|
+
context.focused && context.selected,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"bg-primary-50 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":
|
|
59
|
+
!context.focused && context.selected,
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
// States
|
|
63
|
+
{
|
|
64
|
+
"hover:bg-surface-100 dark:hover:bg-surface-600/80":
|
|
65
|
+
!context.focused && !context.selected,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"hover:text-surface-700 hover:bg-surface-100 dark:hover:text-white dark:hover:bg-surface-600/80":
|
|
69
|
+
context.focused && !context.selected,
|
|
70
|
+
},
|
|
71
|
+
"focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring focus-visible:ring-inset focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50",
|
|
72
|
+
|
|
73
|
+
// Transitions
|
|
74
|
+
"transition-shadow",
|
|
75
|
+
"duration-200",
|
|
76
|
+
|
|
77
|
+
// Misc
|
|
78
|
+
"cursor-pointer",
|
|
79
|
+
"overflow-hidden",
|
|
80
|
+
"whitespace-nowrap",
|
|
81
|
+
],
|
|
82
|
+
}),
|
|
83
|
+
itemgroup: {
|
|
84
|
+
class: [
|
|
85
|
+
// Font
|
|
86
|
+
"font-bold",
|
|
87
|
+
|
|
88
|
+
// Spacing
|
|
89
|
+
"m-0",
|
|
90
|
+
"py-3 px-5",
|
|
91
|
+
|
|
92
|
+
// Color
|
|
93
|
+
"text-surface-800 dark:text-white/80",
|
|
94
|
+
"bg-surface-0 dark:bg-surface-600/80",
|
|
95
|
+
|
|
96
|
+
// Misc
|
|
97
|
+
"cursor-auto",
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
header: {
|
|
101
|
+
class: [
|
|
102
|
+
// Spacing
|
|
103
|
+
"py-3 px-5",
|
|
104
|
+
"m-0",
|
|
105
|
+
|
|
106
|
+
// Shape
|
|
107
|
+
"border-b",
|
|
108
|
+
"rounded-tl-md",
|
|
109
|
+
"rounded-tr-md",
|
|
110
|
+
|
|
111
|
+
// Color
|
|
112
|
+
"text-surface-700 dark:text-white/80",
|
|
113
|
+
"bg-surface-100 dark:bg-surface-800",
|
|
114
|
+
"border-surface-300 dark:border-surface-600",
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
filtercontainer: {
|
|
118
|
+
class: "relative",
|
|
119
|
+
},
|
|
120
|
+
filterinput: {
|
|
121
|
+
class: [
|
|
122
|
+
// Font
|
|
123
|
+
"font-sans",
|
|
124
|
+
"leading-none",
|
|
125
|
+
|
|
126
|
+
// Sizing
|
|
127
|
+
"pr-7 py-3 px-3",
|
|
128
|
+
"-mr-7",
|
|
129
|
+
"w-full",
|
|
130
|
+
|
|
131
|
+
// Color
|
|
132
|
+
"text-surface-700 dark:text-white/80",
|
|
133
|
+
"bg-surface-0 dark:bg-surface-900",
|
|
134
|
+
"border-surface-200 dark:border-surface-700",
|
|
135
|
+
|
|
136
|
+
// Shape
|
|
137
|
+
"border",
|
|
138
|
+
"rounded-lg",
|
|
139
|
+
"appearance-none",
|
|
140
|
+
|
|
141
|
+
// Transitions
|
|
142
|
+
"transition",
|
|
143
|
+
"duration-200",
|
|
144
|
+
|
|
145
|
+
// States
|
|
146
|
+
"hover:border-primary-500 dark:hover:border-primary-300",
|
|
147
|
+
"focus:ring focus:outline-none focus:outline-offset-0",
|
|
148
|
+
"focus:ring-primary-400/50 dark:focus:ring-primary-300/50",
|
|
149
|
+
|
|
150
|
+
// Misc
|
|
151
|
+
"appearance-none",
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
filtericon: {
|
|
155
|
+
class: ["absolute", "top-1/2 right-3", "-mt-2"],
|
|
156
|
+
},
|
|
157
|
+
emptymessage: {
|
|
158
|
+
class: [
|
|
159
|
+
// Font
|
|
160
|
+
"leading-none",
|
|
161
|
+
|
|
162
|
+
// Spacing
|
|
163
|
+
"py-3 px-5",
|
|
164
|
+
|
|
165
|
+
// Color
|
|
166
|
+
"text-surface-800 dark:text-white/80",
|
|
167
|
+
"bg-transparent",
|
|
168
|
+
],
|
|
169
|
+
},
|
|
170
|
+
};
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
"relative",
|
|
5
|
+
|
|
6
|
+
// Flexbox
|
|
7
|
+
"flex",
|
|
8
|
+
|
|
9
|
+
// Shape & Size
|
|
10
|
+
"rounded-md",
|
|
11
|
+
|
|
12
|
+
// Color
|
|
13
|
+
"bg-surface-50 dark:bg-surface-700",
|
|
14
|
+
"border border-surface-200 dark:border-surface-700",
|
|
15
|
+
{
|
|
16
|
+
"p-2 items-center": props.orientation == "horizontal",
|
|
17
|
+
"flex-col sm:w-48 p-0 py-1": props.orientation !== "horizontal",
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
}),
|
|
21
|
+
menu: ({ props }) => ({
|
|
22
|
+
class: [
|
|
23
|
+
// Flexbox
|
|
24
|
+
"sm:flex",
|
|
25
|
+
"items-center",
|
|
26
|
+
"flex-wrap",
|
|
27
|
+
"flex-col sm:flex-row",
|
|
28
|
+
{ hidden: !props?.mobileActive, flex: props?.mobileActive },
|
|
29
|
+
|
|
30
|
+
// Position
|
|
31
|
+
"absolute sm:relative",
|
|
32
|
+
"top-full left-0",
|
|
33
|
+
"sm:top-auto sm:left-auto",
|
|
34
|
+
|
|
35
|
+
// Size
|
|
36
|
+
"w-full sm:w-auto",
|
|
37
|
+
|
|
38
|
+
// Spacing
|
|
39
|
+
"m-0",
|
|
40
|
+
"py-1 sm:py-0 sm:p-0",
|
|
41
|
+
"list-none",
|
|
42
|
+
|
|
43
|
+
// Shape
|
|
44
|
+
"shadow-md sm:shadow-none",
|
|
45
|
+
"border-0",
|
|
46
|
+
|
|
47
|
+
// Color
|
|
48
|
+
"bg-surface-0 dark:bg-surface-700 sm:bg-transparent dark:sm:bg-transparent",
|
|
49
|
+
|
|
50
|
+
// Misc
|
|
51
|
+
"outline-none",
|
|
52
|
+
],
|
|
53
|
+
}),
|
|
54
|
+
menuitem: ({ props }) => ({
|
|
55
|
+
class: [
|
|
56
|
+
"sm:relative static",
|
|
57
|
+
{
|
|
58
|
+
"sm:w-auto w-full": props.horizontal,
|
|
59
|
+
"w-full": !props.horizontal,
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
}),
|
|
63
|
+
content: ({ props, context }) => ({
|
|
64
|
+
class: [
|
|
65
|
+
// Shape
|
|
66
|
+
{ "rounded-md": props.level < 1 && props.horizontal },
|
|
67
|
+
|
|
68
|
+
// Colors
|
|
69
|
+
{
|
|
70
|
+
"text-surface-500 dark:text-white/70":
|
|
71
|
+
!context.focused && !context.active,
|
|
72
|
+
"text-surface-500 dark:text-white/70 bg-surface-200 dark:bg-surface-600/90":
|
|
73
|
+
context.focused && !context.active,
|
|
74
|
+
"text-primary-700 dark:text-surface-0/80 bg-primary-50 dark:bg-primary-400/30":
|
|
75
|
+
context.focused && context.active,
|
|
76
|
+
"text-primary-700 dark:text-surface-0/80 bg-primary-50 dark:bg-primary-400/30":
|
|
77
|
+
!context.focused && context.active,
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
// Hover States
|
|
81
|
+
{
|
|
82
|
+
"hover:bg-surface-100 dark:hover:bg-surface-600/80": !context.active,
|
|
83
|
+
"hover:bg-primary-500/50 dark:hover:bg-primary-300/30 text-primary-700 dark:text-surface-0/80":
|
|
84
|
+
context.active,
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
// Transitions
|
|
88
|
+
"transition-all",
|
|
89
|
+
"duration-200",
|
|
90
|
+
],
|
|
91
|
+
}),
|
|
92
|
+
action: {
|
|
93
|
+
class: [
|
|
94
|
+
"relative",
|
|
95
|
+
|
|
96
|
+
// Flexbox
|
|
97
|
+
"flex",
|
|
98
|
+
"items-center",
|
|
99
|
+
|
|
100
|
+
// Spacing
|
|
101
|
+
"py-3",
|
|
102
|
+
"px-5",
|
|
103
|
+
|
|
104
|
+
// Size
|
|
105
|
+
"py-3 pr-5 pl-9 sm:pl-5",
|
|
106
|
+
"leading-none",
|
|
107
|
+
|
|
108
|
+
// Misc
|
|
109
|
+
"select-none",
|
|
110
|
+
"cursor-pointer",
|
|
111
|
+
"no-underline ",
|
|
112
|
+
"overflow-hidden",
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
icon: {
|
|
116
|
+
class: "mr-2",
|
|
117
|
+
},
|
|
118
|
+
submenuicon: ({ props }) => ({
|
|
119
|
+
class: [
|
|
120
|
+
{
|
|
121
|
+
"ml-auto sm:ml-2": props.horizontal,
|
|
122
|
+
"ml-auto": !props.horizontal,
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
}),
|
|
126
|
+
panel: ({ props }) => ({
|
|
127
|
+
class: [
|
|
128
|
+
// Size
|
|
129
|
+
"w-auto",
|
|
130
|
+
|
|
131
|
+
// Spacing
|
|
132
|
+
"py-1",
|
|
133
|
+
"m-0",
|
|
134
|
+
|
|
135
|
+
// Shape
|
|
136
|
+
"shadow-none sm:shadow-md",
|
|
137
|
+
"border-0",
|
|
138
|
+
|
|
139
|
+
// Color
|
|
140
|
+
"bg-surface-0 dark:bg-surface-700",
|
|
141
|
+
|
|
142
|
+
// Position
|
|
143
|
+
"static sm:absolute",
|
|
144
|
+
"z-10",
|
|
145
|
+
{
|
|
146
|
+
"sm:left-full top-0": !props.horizontal,
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
}),
|
|
150
|
+
grid: {
|
|
151
|
+
class: "flex flex-wrap sm:flex-nowrap",
|
|
152
|
+
},
|
|
153
|
+
column: {
|
|
154
|
+
class: "w-full sm:w-1/2",
|
|
155
|
+
},
|
|
156
|
+
submenu: {
|
|
157
|
+
class: ["m-0 list-none", "py-1 px-2 w-full sm:min-w-[14rem]"],
|
|
158
|
+
},
|
|
159
|
+
submenuheader: {
|
|
160
|
+
class: [
|
|
161
|
+
"font-semibold",
|
|
162
|
+
|
|
163
|
+
// Spacing
|
|
164
|
+
"py-3 px-5",
|
|
165
|
+
"m-0",
|
|
166
|
+
|
|
167
|
+
// Color
|
|
168
|
+
"text-surface-700 dark:text-white/80",
|
|
169
|
+
"bg-surface-0 dark:bg-surface-700",
|
|
170
|
+
],
|
|
171
|
+
},
|
|
172
|
+
separator: {
|
|
173
|
+
class: "border-t border-surface-200 dark:border-surface-600 my-1",
|
|
174
|
+
},
|
|
175
|
+
menubutton: {
|
|
176
|
+
class: [
|
|
177
|
+
// Flexbox
|
|
178
|
+
"flex sm:hidden",
|
|
179
|
+
"items-center justify-center",
|
|
180
|
+
|
|
181
|
+
// Size
|
|
182
|
+
"w-8",
|
|
183
|
+
"h-8",
|
|
184
|
+
|
|
185
|
+
// Shape
|
|
186
|
+
"rounded-full",
|
|
187
|
+
// Color
|
|
188
|
+
"text-surface-500 dark:text-white/80",
|
|
189
|
+
|
|
190
|
+
// States
|
|
191
|
+
"hover:text-surface-600 dark:hover:text-white/60",
|
|
192
|
+
"hover:bg-surface-100 dark:hover:bg-surface-600/80",
|
|
193
|
+
"focus:outline-none focus:outline-offset-0",
|
|
194
|
+
"focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50",
|
|
195
|
+
|
|
196
|
+
// Transitions
|
|
197
|
+
"transition duration-200 ease-in-out",
|
|
198
|
+
|
|
199
|
+
// Misc
|
|
200
|
+
"cursor-pointer",
|
|
201
|
+
"no-underline",
|
|
202
|
+
],
|
|
203
|
+
},
|
|
204
|
+
end: {
|
|
205
|
+
class: "ml-auto self-center",
|
|
206
|
+
},
|
|
207
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: {
|
|
3
|
+
class: [
|
|
4
|
+
// Sizing and Shape
|
|
5
|
+
"min-w-[12rem]",
|
|
6
|
+
"rounded-md",
|
|
7
|
+
// Spacing
|
|
8
|
+
"py-2",
|
|
9
|
+
// Colors
|
|
10
|
+
"bg-surface-0 dark:bg-surface-700",
|
|
11
|
+
"text-surface-700 dark:text-white/80",
|
|
12
|
+
"border border-surface-200 dark:border-surface-700",
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
menu: {
|
|
16
|
+
class: [
|
|
17
|
+
// Spacings and Shape
|
|
18
|
+
"list-none",
|
|
19
|
+
"m-0",
|
|
20
|
+
"p-0",
|
|
21
|
+
"outline-none",
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
content: ({ context }) => ({
|
|
25
|
+
class: [
|
|
26
|
+
// Shape
|
|
27
|
+
"rounded-none",
|
|
28
|
+
// Colors
|
|
29
|
+
"text-surface-700 dark:text-white/80",
|
|
30
|
+
{
|
|
31
|
+
"bg-surface-200 text-surface-700 dark:bg-surface-300/10 dark:text-white":
|
|
32
|
+
context.focused,
|
|
33
|
+
},
|
|
34
|
+
// Transitions
|
|
35
|
+
"transition-shadow",
|
|
36
|
+
"duration-200",
|
|
37
|
+
// States
|
|
38
|
+
"hover:text-surface-700 dark:hover:text-white/80",
|
|
39
|
+
"hover:bg-surface-100 dark:bg-surface-700 dark:hover:bg-surface-400/10",
|
|
40
|
+
],
|
|
41
|
+
}),
|
|
42
|
+
action: {
|
|
43
|
+
class: [
|
|
44
|
+
"relative",
|
|
45
|
+
// Flexbox
|
|
46
|
+
|
|
47
|
+
"flex",
|
|
48
|
+
"items-center",
|
|
49
|
+
|
|
50
|
+
// Spacing
|
|
51
|
+
"py-3",
|
|
52
|
+
"px-5",
|
|
53
|
+
|
|
54
|
+
// Color
|
|
55
|
+
"text-surface-700 dark:text-white/80",
|
|
56
|
+
|
|
57
|
+
// Misc
|
|
58
|
+
"no-underline",
|
|
59
|
+
"overflow-hidden",
|
|
60
|
+
"cursor-pointer",
|
|
61
|
+
"select-none",
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
icon: {
|
|
65
|
+
class: [
|
|
66
|
+
// Spacing
|
|
67
|
+
"mr-2",
|
|
68
|
+
|
|
69
|
+
// Color
|
|
70
|
+
"text-surface-600 dark:text-white/70",
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
label: {
|
|
74
|
+
class: ["leading-none"],
|
|
75
|
+
},
|
|
76
|
+
submenuheader: {
|
|
77
|
+
class: [
|
|
78
|
+
// Font
|
|
79
|
+
"font-bold",
|
|
80
|
+
// Spacing
|
|
81
|
+
"m-0",
|
|
82
|
+
"py-3 px-5",
|
|
83
|
+
// Shape
|
|
84
|
+
"rounded-tl-none",
|
|
85
|
+
"rounded-tr-none",
|
|
86
|
+
// Colors
|
|
87
|
+
"bg-surface-0 dark:bg-surface-700",
|
|
88
|
+
"text-surface-700 dark:text-white",
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
transition: {
|
|
92
|
+
enterFromClass: "opacity-0 scale-y-[0.8]",
|
|
93
|
+
enterActiveClass:
|
|
94
|
+
"transition-[transform,opacity] duration-[120ms] ease-[cubic-bezier(0,0,0.2,1)]",
|
|
95
|
+
leaveActiveClass: "transition-opacity duration-100 ease-linear",
|
|
96
|
+
leaveToClass: "opacity-0",
|
|
97
|
+
},
|
|
98
|
+
};
|