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