@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,149 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
"relative",
|
|
5
|
+
|
|
6
|
+
// Size
|
|
7
|
+
{
|
|
8
|
+
"h-1 w-60": props.orientation == "horizontal",
|
|
9
|
+
"w-1 h-56": props.orientation == "vertical",
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
// Shape
|
|
13
|
+
"border-0",
|
|
14
|
+
|
|
15
|
+
// Colors
|
|
16
|
+
"bg-surface-100 dark:bg-surface-700",
|
|
17
|
+
|
|
18
|
+
// States
|
|
19
|
+
{
|
|
20
|
+
"opacity-60 select-none pointer-events-none cursor-default":
|
|
21
|
+
props.disabled,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
}),
|
|
25
|
+
range: ({ props }) => ({
|
|
26
|
+
class: [
|
|
27
|
+
// Position
|
|
28
|
+
"block absolute",
|
|
29
|
+
{
|
|
30
|
+
"top-0 left-0": props.orientation == "horizontal",
|
|
31
|
+
"bottom-0 left-0": props.orientation == "vertical",
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
// Size
|
|
35
|
+
{
|
|
36
|
+
"h-full": props.orientation == "horizontal",
|
|
37
|
+
"w-full": props.orientation == "vertical",
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
// Colors
|
|
41
|
+
"bg-primary-500 dark:bg-primary-400",
|
|
42
|
+
],
|
|
43
|
+
}),
|
|
44
|
+
handle: ({ props }) => ({
|
|
45
|
+
class: [
|
|
46
|
+
"block",
|
|
47
|
+
|
|
48
|
+
// Size
|
|
49
|
+
"h-[1.143rem]",
|
|
50
|
+
"w-[1.143rem]",
|
|
51
|
+
{
|
|
52
|
+
"top-[50%] mt-[-0.5715rem] ml-[-0.5715rem]":
|
|
53
|
+
props.orientation == "horizontal",
|
|
54
|
+
"left-[50%] mb-[-0.5715rem] ml-[-0.5715rem]":
|
|
55
|
+
props.orientation == "vertical",
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
// Shape
|
|
59
|
+
"rounded-full",
|
|
60
|
+
"border-2",
|
|
61
|
+
|
|
62
|
+
// Colors
|
|
63
|
+
"bg-surface-0 dark:bg-surface-600",
|
|
64
|
+
"border-primary-500 dark:border-primary-400",
|
|
65
|
+
|
|
66
|
+
// States
|
|
67
|
+
"hover:bg-primary-500 hover:border-primary-500",
|
|
68
|
+
"focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring",
|
|
69
|
+
"ring-primary-400/50 dark:ring-primary-300/50",
|
|
70
|
+
|
|
71
|
+
// Transitions
|
|
72
|
+
"transition duration-200",
|
|
73
|
+
|
|
74
|
+
// Misc
|
|
75
|
+
"cursor-grab",
|
|
76
|
+
"touch-action-none",
|
|
77
|
+
],
|
|
78
|
+
}),
|
|
79
|
+
starthandler: ({ props }) => ({
|
|
80
|
+
class: [
|
|
81
|
+
"block",
|
|
82
|
+
|
|
83
|
+
// Size
|
|
84
|
+
"h-[1.143rem]",
|
|
85
|
+
"w-[1.143rem]",
|
|
86
|
+
{
|
|
87
|
+
"top-[50%] mt-[-0.5715rem] ml-[-0.5715rem]":
|
|
88
|
+
props.orientation == "horizontal",
|
|
89
|
+
"left-[50%] mb-[-0.5715rem] ml-[-0.4715rem]":
|
|
90
|
+
props.orientation == "vertical",
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
// Shape
|
|
94
|
+
"rounded-full",
|
|
95
|
+
"border-2",
|
|
96
|
+
|
|
97
|
+
// Colors
|
|
98
|
+
"bg-surface-0 dark:bg-surface-600",
|
|
99
|
+
"border-primary-500 dark:border-primary-400",
|
|
100
|
+
|
|
101
|
+
// States
|
|
102
|
+
"hover:bg-primary-500 hover:border-primary-500",
|
|
103
|
+
"focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring",
|
|
104
|
+
"focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50",
|
|
105
|
+
|
|
106
|
+
// Transitions
|
|
107
|
+
"transition duration-200",
|
|
108
|
+
|
|
109
|
+
// Misc
|
|
110
|
+
"cursor-grab",
|
|
111
|
+
"touch-action-none",
|
|
112
|
+
],
|
|
113
|
+
}),
|
|
114
|
+
endhandler: ({ props }) => ({
|
|
115
|
+
class: [
|
|
116
|
+
"block",
|
|
117
|
+
|
|
118
|
+
// Size
|
|
119
|
+
"h-[1.143rem]",
|
|
120
|
+
"w-[1.143rem]",
|
|
121
|
+
{
|
|
122
|
+
"top-[50%] mt-[-0.5715rem] ml-[-0.5715rem]":
|
|
123
|
+
props.orientation == "horizontal",
|
|
124
|
+
"left-[50%] mb-[-0.5715rem] ml-[-0.4715rem]":
|
|
125
|
+
props.orientation == "vertical",
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
// Shape
|
|
129
|
+
"rounded-full",
|
|
130
|
+
"border-2",
|
|
131
|
+
|
|
132
|
+
// Colors
|
|
133
|
+
"bg-surface-0 dark:bg-surface-600",
|
|
134
|
+
"border-primary-500 dark:border-primary-400",
|
|
135
|
+
|
|
136
|
+
// States
|
|
137
|
+
"hover:bg-primary-500 hover:border-primary-500",
|
|
138
|
+
"focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring",
|
|
139
|
+
"focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50",
|
|
140
|
+
|
|
141
|
+
// Transitions
|
|
142
|
+
"transition duration-200",
|
|
143
|
+
|
|
144
|
+
// Misc
|
|
145
|
+
"cursor-grab",
|
|
146
|
+
"touch-action-none",
|
|
147
|
+
],
|
|
148
|
+
}),
|
|
149
|
+
};
|
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: {
|
|
3
|
+
class: "absolute flex",
|
|
4
|
+
},
|
|
5
|
+
button: {
|
|
6
|
+
root: ({ props, context, parent }) => ({
|
|
7
|
+
class: [
|
|
8
|
+
"relative",
|
|
9
|
+
"z-20",
|
|
10
|
+
|
|
11
|
+
// Alignments
|
|
12
|
+
"items-center inline-flex text-center align-bottom justify-center",
|
|
13
|
+
|
|
14
|
+
// Sizes & Spacing
|
|
15
|
+
"leading-[normal]",
|
|
16
|
+
"w-16 h-16 p-0 py-3",
|
|
17
|
+
|
|
18
|
+
// Shapes
|
|
19
|
+
"rounded-full",
|
|
20
|
+
"shadow-md",
|
|
21
|
+
|
|
22
|
+
// Link Button
|
|
23
|
+
{ "text-primary-600 bg-transparent border-transparent": props.link },
|
|
24
|
+
|
|
25
|
+
// Plain Button
|
|
26
|
+
{
|
|
27
|
+
"text-white bg-gray-500 border border-gray-500":
|
|
28
|
+
props.plain && !props.outlined && !props.text,
|
|
29
|
+
},
|
|
30
|
+
// Plain Text Button
|
|
31
|
+
{ "text-surface-500": props.plain && props.text },
|
|
32
|
+
// Plain Outlined Button
|
|
33
|
+
{
|
|
34
|
+
"text-surface-500 border border-gray-500":
|
|
35
|
+
props.plain && props.outlined,
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
// Text Button
|
|
39
|
+
{ "bg-transparent border-transparent": props.text && !props.plain },
|
|
40
|
+
|
|
41
|
+
// Outlined Button
|
|
42
|
+
{ "bg-transparent border": props.outlined && !props.plain },
|
|
43
|
+
|
|
44
|
+
// --- Severity Buttons ---
|
|
45
|
+
|
|
46
|
+
// Primary Button
|
|
47
|
+
{
|
|
48
|
+
"text-white dark:text-surface-900":
|
|
49
|
+
!props.link &&
|
|
50
|
+
props.severity === null &&
|
|
51
|
+
!props.text &&
|
|
52
|
+
!props.outlined &&
|
|
53
|
+
!props.plain,
|
|
54
|
+
"bg-primary-500 dark:bg-primary-400":
|
|
55
|
+
!props.link &&
|
|
56
|
+
props.severity === null &&
|
|
57
|
+
!props.text &&
|
|
58
|
+
!props.outlined &&
|
|
59
|
+
!props.plain,
|
|
60
|
+
"border border-primary-500 dark:border-primary-400":
|
|
61
|
+
!props.link &&
|
|
62
|
+
props.severity === null &&
|
|
63
|
+
!props.text &&
|
|
64
|
+
!props.outlined &&
|
|
65
|
+
!props.plain,
|
|
66
|
+
},
|
|
67
|
+
// Primary Text Button
|
|
68
|
+
{
|
|
69
|
+
"text-primary-500 dark:text-primary-400":
|
|
70
|
+
props.text && props.severity === null && !props.plain,
|
|
71
|
+
},
|
|
72
|
+
// Primary Outlined Button
|
|
73
|
+
{
|
|
74
|
+
"text-primary-500 border border-primary-500 hover:bg-primary-300/20":
|
|
75
|
+
props.outlined && props.severity === null && !props.plain,
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
// Secondary Button
|
|
79
|
+
{
|
|
80
|
+
"text-white dark:text-surface-900":
|
|
81
|
+
props.severity === "secondary" &&
|
|
82
|
+
!props.text &&
|
|
83
|
+
!props.outlined &&
|
|
84
|
+
!props.plain,
|
|
85
|
+
"bg-surface-500 dark:bg-surface-400":
|
|
86
|
+
props.severity === "secondary" &&
|
|
87
|
+
!props.text &&
|
|
88
|
+
!props.outlined &&
|
|
89
|
+
!props.plain,
|
|
90
|
+
"border border-surface-500 dark:border-surface-400":
|
|
91
|
+
props.severity === "secondary" &&
|
|
92
|
+
!props.text &&
|
|
93
|
+
!props.outlined &&
|
|
94
|
+
!props.plain,
|
|
95
|
+
},
|
|
96
|
+
// Secondary Text Button
|
|
97
|
+
{
|
|
98
|
+
"text-surface-500 dark:text-surface-300":
|
|
99
|
+
props.text && props.severity === "secondary" && !props.plain,
|
|
100
|
+
},
|
|
101
|
+
// Secondary Outlined Button
|
|
102
|
+
{
|
|
103
|
+
"text-surface-500 dark:text-surface-300 border border-surface-500 hover:bg-surface-300/20":
|
|
104
|
+
props.outlined && props.severity === "secondary" && !props.plain,
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
// Success Button
|
|
108
|
+
{
|
|
109
|
+
"text-white dark:text-green-900":
|
|
110
|
+
props.severity === "success" &&
|
|
111
|
+
!props.text &&
|
|
112
|
+
!props.outlined &&
|
|
113
|
+
!props.plain,
|
|
114
|
+
"bg-green-500 dark:bg-green-400":
|
|
115
|
+
props.severity === "success" &&
|
|
116
|
+
!props.text &&
|
|
117
|
+
!props.outlined &&
|
|
118
|
+
!props.plain,
|
|
119
|
+
"border border-green-500 dark:border-green-400":
|
|
120
|
+
props.severity === "success" &&
|
|
121
|
+
!props.text &&
|
|
122
|
+
!props.outlined &&
|
|
123
|
+
!props.plain,
|
|
124
|
+
},
|
|
125
|
+
// Success Text Button
|
|
126
|
+
{
|
|
127
|
+
"text-green-500 dark:text-green-400":
|
|
128
|
+
props.text && props.severity === "success" && !props.plain,
|
|
129
|
+
},
|
|
130
|
+
// Success Outlined Button
|
|
131
|
+
{
|
|
132
|
+
"text-green-500 border border-green-500 hover:bg-green-300/20":
|
|
133
|
+
props.outlined && props.severity === "success" && !props.plain,
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
// Info Button
|
|
137
|
+
{
|
|
138
|
+
"text-white dark:text-surface-900":
|
|
139
|
+
props.severity === "info" &&
|
|
140
|
+
!props.text &&
|
|
141
|
+
!props.outlined &&
|
|
142
|
+
!props.plain,
|
|
143
|
+
"bg-blue-500 dark:bg-blue-400":
|
|
144
|
+
props.severity === "info" &&
|
|
145
|
+
!props.text &&
|
|
146
|
+
!props.outlined &&
|
|
147
|
+
!props.plain,
|
|
148
|
+
"border border-blue-500 dark:border-blue-400":
|
|
149
|
+
props.severity === "info" &&
|
|
150
|
+
!props.text &&
|
|
151
|
+
!props.outlined &&
|
|
152
|
+
!props.plain,
|
|
153
|
+
},
|
|
154
|
+
// Info Text Button
|
|
155
|
+
{
|
|
156
|
+
"text-blue-500 dark:text-blue-400":
|
|
157
|
+
props.text && props.severity === "info" && !props.plain,
|
|
158
|
+
},
|
|
159
|
+
// Info Outlined Button
|
|
160
|
+
{
|
|
161
|
+
"text-blue-500 border border-blue-500 hover:bg-blue-300/20 ":
|
|
162
|
+
props.outlined && props.severity === "info" && !props.plain,
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
// Warning Button
|
|
166
|
+
{
|
|
167
|
+
"text-white dark:text-surface-900":
|
|
168
|
+
props.severity === "warning" &&
|
|
169
|
+
!props.text &&
|
|
170
|
+
!props.outlined &&
|
|
171
|
+
!props.plain,
|
|
172
|
+
"bg-orange-500 dark:bg-orange-400":
|
|
173
|
+
props.severity === "warning" &&
|
|
174
|
+
!props.text &&
|
|
175
|
+
!props.outlined &&
|
|
176
|
+
!props.plain,
|
|
177
|
+
"border border-orange-500 dark:border-orange-400":
|
|
178
|
+
props.severity === "warning" &&
|
|
179
|
+
!props.text &&
|
|
180
|
+
!props.outlined &&
|
|
181
|
+
!props.plain,
|
|
182
|
+
},
|
|
183
|
+
// Warning Text Button
|
|
184
|
+
{
|
|
185
|
+
"text-orange-500 dark:text-orange-400":
|
|
186
|
+
props.text && props.severity === "warning" && !props.plain,
|
|
187
|
+
},
|
|
188
|
+
// Warning Outlined Button
|
|
189
|
+
{
|
|
190
|
+
"text-orange-500 border border-orange-500 hover:bg-orange-300/20":
|
|
191
|
+
props.outlined && props.severity === "warning" && !props.plain,
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
// Help Button
|
|
195
|
+
{
|
|
196
|
+
"text-white dark:text-surface-900":
|
|
197
|
+
props.severity === "help" &&
|
|
198
|
+
!props.text &&
|
|
199
|
+
!props.outlined &&
|
|
200
|
+
!props.plain,
|
|
201
|
+
"bg-purple-500 dark:bg-purple-400":
|
|
202
|
+
props.severity === "help" &&
|
|
203
|
+
!props.text &&
|
|
204
|
+
!props.outlined &&
|
|
205
|
+
!props.plain,
|
|
206
|
+
"border border-purple-500 dark:border-purple-400":
|
|
207
|
+
props.severity === "help" &&
|
|
208
|
+
!props.text &&
|
|
209
|
+
!props.outlined &&
|
|
210
|
+
!props.plain,
|
|
211
|
+
},
|
|
212
|
+
// Help Text Button
|
|
213
|
+
{
|
|
214
|
+
"text-purple-500 dark:text-purple-400":
|
|
215
|
+
props.text && props.severity === "help" && !props.plain,
|
|
216
|
+
},
|
|
217
|
+
// Help Outlined Button
|
|
218
|
+
{
|
|
219
|
+
"text-purple-500 border border-purple-500 hover:bg-purple-300/20":
|
|
220
|
+
props.outlined && props.severity === "help" && !props.plain,
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
// Danger Button
|
|
224
|
+
{
|
|
225
|
+
"text-white dark:text-surface-900":
|
|
226
|
+
props.severity === "danger" &&
|
|
227
|
+
!props.text &&
|
|
228
|
+
!props.outlined &&
|
|
229
|
+
!props.plain,
|
|
230
|
+
"bg-red-500 dark:bg-red-400":
|
|
231
|
+
props.severity === "danger" &&
|
|
232
|
+
!props.text &&
|
|
233
|
+
!props.outlined &&
|
|
234
|
+
!props.plain,
|
|
235
|
+
"border border-red-500 dark:border-red-400":
|
|
236
|
+
props.severity === "danger" &&
|
|
237
|
+
!props.text &&
|
|
238
|
+
!props.outlined &&
|
|
239
|
+
!props.plain,
|
|
240
|
+
},
|
|
241
|
+
// Danger Text Button
|
|
242
|
+
{
|
|
243
|
+
"text-red-500 dark:text-red-400":
|
|
244
|
+
props.text && props.severity === "danger" && !props.plain,
|
|
245
|
+
},
|
|
246
|
+
// Danger Outlined Button
|
|
247
|
+
{
|
|
248
|
+
"text-red-500 border border-red-500 hover:bg-red-300/20":
|
|
249
|
+
props.outlined && props.severity === "danger" && !props.plain,
|
|
250
|
+
},
|
|
251
|
+
|
|
252
|
+
// --- Severity Button States ---
|
|
253
|
+
"focus:outline-none focus:outline-offset-0 focus:ring",
|
|
254
|
+
|
|
255
|
+
// Link
|
|
256
|
+
{
|
|
257
|
+
"focus:ring-primary-400/50 dark:focus:ring-primary-300/50":
|
|
258
|
+
props.link,
|
|
259
|
+
},
|
|
260
|
+
|
|
261
|
+
// Plain
|
|
262
|
+
{
|
|
263
|
+
"hover:bg-gray-600 hover:border-gray-600":
|
|
264
|
+
props.plain && !props.outlined && !props.text,
|
|
265
|
+
},
|
|
266
|
+
// Text & Outlined Button
|
|
267
|
+
{
|
|
268
|
+
"hover:bg-surface-300/20":
|
|
269
|
+
props.plain && (props.text || props.outlined),
|
|
270
|
+
},
|
|
271
|
+
|
|
272
|
+
// Primary
|
|
273
|
+
{
|
|
274
|
+
"hover:bg-primary-600 dark:hover:bg-primary-300 hover:border-primary-600 dark:hover:border-primary-300":
|
|
275
|
+
!props.link &&
|
|
276
|
+
props.severity === null &&
|
|
277
|
+
!props.text &&
|
|
278
|
+
!props.outlined &&
|
|
279
|
+
!props.plain,
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"focus:ring-primary-400/50 dark:focus:ring-primary-300/50":
|
|
283
|
+
props.severity === null,
|
|
284
|
+
},
|
|
285
|
+
// Text & Outlined Button
|
|
286
|
+
{
|
|
287
|
+
"hover:bg-primary-300/20":
|
|
288
|
+
(props.text || props.outlined) &&
|
|
289
|
+
props.severity === null &&
|
|
290
|
+
!props.plain,
|
|
291
|
+
},
|
|
292
|
+
|
|
293
|
+
// Secondary
|
|
294
|
+
{
|
|
295
|
+
"hover:bg-surface-600 dark:hover:bg-surface-300 hover:border-surface-600 dark:hover:border-surface-300":
|
|
296
|
+
props.severity === "secondary" &&
|
|
297
|
+
!props.text &&
|
|
298
|
+
!props.outlined &&
|
|
299
|
+
!props.plain,
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"focus:ring-surface-400/50 dark:focus:ring-surface-300/50":
|
|
303
|
+
props.severity === "secondary",
|
|
304
|
+
},
|
|
305
|
+
// Text & Outlined Button
|
|
306
|
+
{
|
|
307
|
+
"hover:bg-surface-300/20":
|
|
308
|
+
(props.text || props.outlined) &&
|
|
309
|
+
props.severity === "secondary" &&
|
|
310
|
+
!props.plain,
|
|
311
|
+
},
|
|
312
|
+
|
|
313
|
+
// Success
|
|
314
|
+
{
|
|
315
|
+
"hover:bg-green-600 dark:hover:bg-green-300 hover:border-green-600 dark:hover:border-green-300":
|
|
316
|
+
props.severity === "success" &&
|
|
317
|
+
!props.text &&
|
|
318
|
+
!props.outlined &&
|
|
319
|
+
!props.plain,
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"focus:ring-green-400/50 dark:focus:ring-green-300/50":
|
|
323
|
+
props.severity === "success",
|
|
324
|
+
},
|
|
325
|
+
// Text & Outlined Button
|
|
326
|
+
{
|
|
327
|
+
"hover:bg-green-300/20":
|
|
328
|
+
(props.text || props.outlined) &&
|
|
329
|
+
props.severity === "success" &&
|
|
330
|
+
!props.plain,
|
|
331
|
+
},
|
|
332
|
+
|
|
333
|
+
// Info
|
|
334
|
+
{
|
|
335
|
+
"hover:bg-blue-600 dark:hover:bg-blue-300 hover:border-blue-600 dark:hover:border-blue-300":
|
|
336
|
+
props.severity === "info" &&
|
|
337
|
+
!props.text &&
|
|
338
|
+
!props.outlined &&
|
|
339
|
+
!props.plain,
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"focus:ring-blue-400/50 dark:focus:ring-blue-300/50":
|
|
343
|
+
props.severity === "info",
|
|
344
|
+
},
|
|
345
|
+
// Text & Outlined Button
|
|
346
|
+
{
|
|
347
|
+
"hover:bg-blue-300/20":
|
|
348
|
+
(props.text || props.outlined) &&
|
|
349
|
+
props.severity === "info" &&
|
|
350
|
+
!props.plain,
|
|
351
|
+
},
|
|
352
|
+
|
|
353
|
+
// Warning
|
|
354
|
+
{
|
|
355
|
+
"hover:bg-orange-600 dark:hover:bg-orange-300 hover:border-orange-600 dark:hover:border-orange-300":
|
|
356
|
+
props.severity === "warning" &&
|
|
357
|
+
!props.text &&
|
|
358
|
+
!props.outlined &&
|
|
359
|
+
!props.plain,
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"focus:ring-orange-400/50 dark:focus:ring-orange-300/50":
|
|
363
|
+
props.severity === "warning",
|
|
364
|
+
},
|
|
365
|
+
// Text & Outlined Button
|
|
366
|
+
{
|
|
367
|
+
"hover:bg-orange-300/20":
|
|
368
|
+
(props.text || props.outlined) &&
|
|
369
|
+
props.severity === "warning" &&
|
|
370
|
+
!props.plain,
|
|
371
|
+
},
|
|
372
|
+
|
|
373
|
+
// Help
|
|
374
|
+
{
|
|
375
|
+
"hover:bg-purple-600 dark:hover:bg-purple-300 hover:border-purple-600 dark:hover:border-purple-300":
|
|
376
|
+
props.severity === "help" &&
|
|
377
|
+
!props.text &&
|
|
378
|
+
!props.outlined &&
|
|
379
|
+
!props.plain,
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"focus:ring-purple-400/50 dark:focus:ring-purple-300/50":
|
|
383
|
+
props.severity === "help",
|
|
384
|
+
},
|
|
385
|
+
// Text & Outlined Button
|
|
386
|
+
{
|
|
387
|
+
"hover:bg-purple-300/20":
|
|
388
|
+
(props.text || props.outlined) &&
|
|
389
|
+
props.severity === "help" &&
|
|
390
|
+
!props.plain,
|
|
391
|
+
},
|
|
392
|
+
|
|
393
|
+
// Danger
|
|
394
|
+
{
|
|
395
|
+
"hover:bg-red-600 dark:hover:bg-red-300 hover:border-red-600 dark:hover:border-red-300":
|
|
396
|
+
props.severity === "danger" &&
|
|
397
|
+
!props.text &&
|
|
398
|
+
!props.outlined &&
|
|
399
|
+
!props.plain,
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"focus:ring-red-400/50 dark:focus:ring-red-300/50":
|
|
403
|
+
props.severity === "danger",
|
|
404
|
+
},
|
|
405
|
+
// Text & Outlined Button
|
|
406
|
+
{
|
|
407
|
+
"hover:bg-red-300/20":
|
|
408
|
+
(props.text || props.outlined) &&
|
|
409
|
+
props.severity === "danger" &&
|
|
410
|
+
!props.plain,
|
|
411
|
+
},
|
|
412
|
+
|
|
413
|
+
// Disabled
|
|
414
|
+
{ "opacity-60 pointer-events-none cursor-default": context.disabled },
|
|
415
|
+
|
|
416
|
+
// Transitions
|
|
417
|
+
"transition duration-200 ease-in-out",
|
|
418
|
+
parent.state.d_visible ? "rotate-45" : "rotate-0",
|
|
419
|
+
|
|
420
|
+
// Misc
|
|
421
|
+
"cursor-pointer overflow-hidden select-none",
|
|
422
|
+
],
|
|
423
|
+
}),
|
|
424
|
+
label: ({ props }) => ({
|
|
425
|
+
class: [
|
|
426
|
+
"duration-200",
|
|
427
|
+
"font-bold",
|
|
428
|
+
{
|
|
429
|
+
"hover:underline": props.link,
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"flex-1": props.label !== null,
|
|
433
|
+
"invisible w-0": props.label == null,
|
|
434
|
+
},
|
|
435
|
+
],
|
|
436
|
+
}),
|
|
437
|
+
icon: ({ props }) => ({
|
|
438
|
+
class: [
|
|
439
|
+
"mx-0",
|
|
440
|
+
{
|
|
441
|
+
"mr-2": props.iconPos == "left" && props.label != null,
|
|
442
|
+
"ml-2 order-1": props.iconPos == "right" && props.label != null,
|
|
443
|
+
"mb-2": props.iconPos == "top" && props.label != null,
|
|
444
|
+
"mt-2": props.iconPos == "bottom" && props.label != null,
|
|
445
|
+
},
|
|
446
|
+
],
|
|
447
|
+
}),
|
|
448
|
+
loadingicon: ({ props }) => ({
|
|
449
|
+
class: [
|
|
450
|
+
"h-4 w-4",
|
|
451
|
+
"mx-0",
|
|
452
|
+
{
|
|
453
|
+
"mr-2": props.iconPos == "left" && props.label != null,
|
|
454
|
+
"ml-2 order-1": props.iconPos == "right" && props.label != null,
|
|
455
|
+
"mb-2": props.iconPos == "top" && props.label != null,
|
|
456
|
+
"mt-2": props.iconPos == "bottom" && props.label != null,
|
|
457
|
+
},
|
|
458
|
+
"animate-spin",
|
|
459
|
+
],
|
|
460
|
+
}),
|
|
461
|
+
badge: ({ props }) => ({
|
|
462
|
+
class: [
|
|
463
|
+
{
|
|
464
|
+
"ml-2 w-4 h-4 leading-none flex items-center justify-center":
|
|
465
|
+
props.badge,
|
|
466
|
+
},
|
|
467
|
+
],
|
|
468
|
+
}),
|
|
469
|
+
},
|
|
470
|
+
menu: {
|
|
471
|
+
class: [
|
|
472
|
+
// Spacing
|
|
473
|
+
"m-0 p-0",
|
|
474
|
+
|
|
475
|
+
// Layout & Flexbox
|
|
476
|
+
"list-none flex items-center justify-center",
|
|
477
|
+
|
|
478
|
+
// Transitions
|
|
479
|
+
"transition delay-200",
|
|
480
|
+
|
|
481
|
+
// Z-Index (Positioning)
|
|
482
|
+
"z-20",
|
|
483
|
+
],
|
|
484
|
+
},
|
|
485
|
+
menuitem: ({ props, context }) => ({
|
|
486
|
+
class: [
|
|
487
|
+
"transform transition-transform duration-200 ease-out transition-opacity duration-800",
|
|
488
|
+
|
|
489
|
+
// Conditional Appearance
|
|
490
|
+
context.hidden ? "opacity-0 scale-0" : "opacity-100 scale-100",
|
|
491
|
+
|
|
492
|
+
// Conditional Spacing
|
|
493
|
+
{
|
|
494
|
+
"my-1 first:mb-2": props.direction == "up" && props.type == "linear",
|
|
495
|
+
"my-1 first:mt-2": props.direction == "down" && props.type == "linear",
|
|
496
|
+
"mx-1 first:mr-2": props.direction == "left" && props.type == "linear",
|
|
497
|
+
"mx-1 first:ml-2": props.direction == "right" && props.type == "linear",
|
|
498
|
+
},
|
|
499
|
+
|
|
500
|
+
// Conditional Positioning
|
|
501
|
+
{ absolute: props.type !== "linear" },
|
|
502
|
+
],
|
|
503
|
+
}),
|
|
504
|
+
action: {
|
|
505
|
+
class: [
|
|
506
|
+
// Flexbox & Alignment
|
|
507
|
+
"flex items-center justify-center",
|
|
508
|
+
|
|
509
|
+
// Size
|
|
510
|
+
"w-12 h-12",
|
|
511
|
+
|
|
512
|
+
// Shape
|
|
513
|
+
"rounded-full relative overflow-hidden",
|
|
514
|
+
|
|
515
|
+
// Appearance
|
|
516
|
+
"bg-surface-600 dark:bg-surface-0/80 text-white dark:text-surface-900/80",
|
|
517
|
+
|
|
518
|
+
// Hover Effects
|
|
519
|
+
"hover:bg-surface-700 dark:hover:bg-surface-200/80",
|
|
520
|
+
],
|
|
521
|
+
},
|
|
522
|
+
mask: ({ state }) => ({
|
|
523
|
+
class: [
|
|
524
|
+
// Base Styles
|
|
525
|
+
"absolute left-0 top-0 w-full h-full transition-opacity duration-250 ease-in-out bg-black/40 z-0",
|
|
526
|
+
|
|
527
|
+
// Conditional Appearance
|
|
528
|
+
{
|
|
529
|
+
"opacity-0 pointer-events-none": !state.d_visible,
|
|
530
|
+
"opacity-100 transition-opacity duration-400 ease-in-out":
|
|
531
|
+
state.d_visible,
|
|
532
|
+
},
|
|
533
|
+
],
|
|
534
|
+
}),
|
|
535
|
+
};
|