@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,51 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: {
|
|
3
|
+
class: [
|
|
4
|
+
// Position
|
|
5
|
+
"relative",
|
|
6
|
+
"mx-auto",
|
|
7
|
+
|
|
8
|
+
// Sizing
|
|
9
|
+
"w-28",
|
|
10
|
+
"h-28",
|
|
11
|
+
|
|
12
|
+
// Flexbox
|
|
13
|
+
"inline-block",
|
|
14
|
+
|
|
15
|
+
// Pseudo-Elements
|
|
16
|
+
"before:block",
|
|
17
|
+
"before:pt-full",
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
spinner: {
|
|
21
|
+
class: [
|
|
22
|
+
// Position
|
|
23
|
+
"absolute",
|
|
24
|
+
"top-0",
|
|
25
|
+
"bottom-0",
|
|
26
|
+
"left-0",
|
|
27
|
+
"right-0",
|
|
28
|
+
"m-auto",
|
|
29
|
+
|
|
30
|
+
// Sizing
|
|
31
|
+
"w-full",
|
|
32
|
+
"h-full",
|
|
33
|
+
|
|
34
|
+
// Transformations
|
|
35
|
+
"transform",
|
|
36
|
+
"origin-center",
|
|
37
|
+
|
|
38
|
+
// Animations
|
|
39
|
+
"animate-spin",
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
circle: {
|
|
43
|
+
class: [
|
|
44
|
+
// Colors
|
|
45
|
+
"text-red-500",
|
|
46
|
+
|
|
47
|
+
// Misc
|
|
48
|
+
"progress-spinner-circle",
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: {
|
|
3
|
+
class: [
|
|
4
|
+
"relative",
|
|
5
|
+
|
|
6
|
+
// Flexbox & Alignment
|
|
7
|
+
"inline-flex",
|
|
8
|
+
"align-bottom",
|
|
9
|
+
|
|
10
|
+
// Size
|
|
11
|
+
"w-[1.571rem] h-[1.571rem]",
|
|
12
|
+
|
|
13
|
+
// Misc
|
|
14
|
+
"cursor-pointer",
|
|
15
|
+
"select-none",
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
box: ({ props }) => ({
|
|
19
|
+
class: [
|
|
20
|
+
// Flexbox
|
|
21
|
+
"flex justify-center items-center",
|
|
22
|
+
|
|
23
|
+
// Size
|
|
24
|
+
"w-[1.571rem] h-[1.571rem]",
|
|
25
|
+
|
|
26
|
+
// Shape
|
|
27
|
+
"border-2",
|
|
28
|
+
"rounded-full",
|
|
29
|
+
|
|
30
|
+
// Transition
|
|
31
|
+
"transition duration-200 ease-in-out",
|
|
32
|
+
|
|
33
|
+
// Colors
|
|
34
|
+
{
|
|
35
|
+
"text-surface-700 dark:text-white/80":
|
|
36
|
+
props.value !== props.modelValue && props.value !== undefined,
|
|
37
|
+
"bg-surface-0 dark:bg-surface-900":
|
|
38
|
+
props.value !== props.modelValue && props.value !== undefined,
|
|
39
|
+
"border-surface-300 dark:border-surface-700":
|
|
40
|
+
props.value !== props.modelValue &&
|
|
41
|
+
props.value !== undefined &&
|
|
42
|
+
!props.invalid,
|
|
43
|
+
"border-primary-500 dark:border-primary-400":
|
|
44
|
+
props.value == props.modelValue && props.value !== undefined,
|
|
45
|
+
"bg-primary-500 dark:bg-primary-400":
|
|
46
|
+
props.value == props.modelValue && props.value !== undefined,
|
|
47
|
+
},
|
|
48
|
+
// Invalid State
|
|
49
|
+
{ "border-red-500 dark:border-red-400": props.invalid },
|
|
50
|
+
|
|
51
|
+
// States
|
|
52
|
+
{
|
|
53
|
+
"peer-hover:border-primary-500 dark:peer-hover:border-primary-400":
|
|
54
|
+
!props.disabled && !props.invalid,
|
|
55
|
+
"peer-hover:border-primary-600 dark:peer-hover:border-primary-300 peer-hover:bg-primary-600 dark:peer-hover:bg-primary-300":
|
|
56
|
+
!props.disabled &&
|
|
57
|
+
props.value == props.modelValue &&
|
|
58
|
+
props.value !== undefined,
|
|
59
|
+
"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":
|
|
60
|
+
!props.disabled,
|
|
61
|
+
"opacity-60 cursor-default": props.disabled,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
}),
|
|
65
|
+
input: {
|
|
66
|
+
class: [
|
|
67
|
+
"peer",
|
|
68
|
+
|
|
69
|
+
// Size
|
|
70
|
+
"w-full ",
|
|
71
|
+
"h-full",
|
|
72
|
+
|
|
73
|
+
// Position
|
|
74
|
+
"absolute",
|
|
75
|
+
"top-0 left-0",
|
|
76
|
+
"z-10",
|
|
77
|
+
|
|
78
|
+
// Spacing
|
|
79
|
+
"p-0",
|
|
80
|
+
"m-0",
|
|
81
|
+
|
|
82
|
+
// Shape
|
|
83
|
+
"opacity-0",
|
|
84
|
+
"rounded-md",
|
|
85
|
+
"outline-none",
|
|
86
|
+
"border-2 border-surface-200 dark:border-surface-700",
|
|
87
|
+
|
|
88
|
+
// Misc
|
|
89
|
+
"appearance-none",
|
|
90
|
+
"cursor-pointer",
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
icon: ({ props }) => ({
|
|
94
|
+
class: [
|
|
95
|
+
"block",
|
|
96
|
+
|
|
97
|
+
// Shape
|
|
98
|
+
"rounded-full",
|
|
99
|
+
|
|
100
|
+
// Size
|
|
101
|
+
"w-[0.857rem] h-[0.857rem]",
|
|
102
|
+
|
|
103
|
+
// Colors
|
|
104
|
+
"bg-surface-0 dark:bg-surface-900",
|
|
105
|
+
|
|
106
|
+
// Conditions
|
|
107
|
+
{
|
|
108
|
+
"backface-hidden scale-10 invisible": props.value !== props.modelValue,
|
|
109
|
+
"transform visible scale-[1.1]": props.value == props.modelValue,
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
// Transition
|
|
113
|
+
"transition duration-200",
|
|
114
|
+
],
|
|
115
|
+
}),
|
|
116
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
"relative",
|
|
5
|
+
|
|
6
|
+
// Flex & Alignment
|
|
7
|
+
"flex items-center",
|
|
8
|
+
"gap-2",
|
|
9
|
+
|
|
10
|
+
// Misc
|
|
11
|
+
{
|
|
12
|
+
"opacity-60 select-none pointer-events-none cursor-default":
|
|
13
|
+
props.disabled,
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
}),
|
|
17
|
+
cancelitem: ({ context }) => ({
|
|
18
|
+
class: [
|
|
19
|
+
// Flex & Alignment
|
|
20
|
+
"inline-flex items-center",
|
|
21
|
+
|
|
22
|
+
// State
|
|
23
|
+
{
|
|
24
|
+
"outline-none ring ring-primary-500/50 dark:ring-primary-400/50":
|
|
25
|
+
context.focused,
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
// Misc
|
|
29
|
+
"cursor-pointer",
|
|
30
|
+
],
|
|
31
|
+
}),
|
|
32
|
+
cancelicon: {
|
|
33
|
+
class: [
|
|
34
|
+
// Size
|
|
35
|
+
"w-5 h-5",
|
|
36
|
+
|
|
37
|
+
// Color
|
|
38
|
+
"text-red-500 dark:text-red-400",
|
|
39
|
+
|
|
40
|
+
// State
|
|
41
|
+
"hover:text-red-600 dark:hover:text-red-300",
|
|
42
|
+
|
|
43
|
+
// Transition
|
|
44
|
+
"transition duration-200 ease-in",
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
item: ({ props, context }) => ({
|
|
48
|
+
class: [
|
|
49
|
+
// Flex & Alignment
|
|
50
|
+
"inline-flex items-center",
|
|
51
|
+
|
|
52
|
+
// State
|
|
53
|
+
{
|
|
54
|
+
"outline-none ring ring-primary-500/50 dark:ring-primary-400/50":
|
|
55
|
+
context.focused,
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
// Misc
|
|
59
|
+
{
|
|
60
|
+
"cursor-pointer": !props.readonly,
|
|
61
|
+
"cursor-default": props.readonly,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
}),
|
|
65
|
+
officon: ({ props }) => ({
|
|
66
|
+
class: [
|
|
67
|
+
// Size
|
|
68
|
+
"w-5 h-5",
|
|
69
|
+
|
|
70
|
+
// Color
|
|
71
|
+
"text-surface-700 dark:text-surface-0/80",
|
|
72
|
+
|
|
73
|
+
// State
|
|
74
|
+
{ "hover:text-primary-500 dark:hover:text-primary-400": !props.readonly },
|
|
75
|
+
|
|
76
|
+
// Transition
|
|
77
|
+
"transition duration-200 ease-in",
|
|
78
|
+
],
|
|
79
|
+
}),
|
|
80
|
+
onicon: ({ props }) => ({
|
|
81
|
+
class: [
|
|
82
|
+
// Size
|
|
83
|
+
"w-5 h-5",
|
|
84
|
+
|
|
85
|
+
// Color
|
|
86
|
+
"text-primary-500 dark:text-primary-400",
|
|
87
|
+
|
|
88
|
+
// State
|
|
89
|
+
{ "hover:text-primary-600 dark:hover:text-primary-300": !props.readonly },
|
|
90
|
+
|
|
91
|
+
// Transition
|
|
92
|
+
"transition duration-200 ease-in",
|
|
93
|
+
],
|
|
94
|
+
}),
|
|
95
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
wrapper: {
|
|
3
|
+
class: [
|
|
4
|
+
// Size & Position
|
|
5
|
+
"h-full w-full",
|
|
6
|
+
|
|
7
|
+
// Layering
|
|
8
|
+
"z-[1]",
|
|
9
|
+
|
|
10
|
+
// Spacing
|
|
11
|
+
"overflow-hidden",
|
|
12
|
+
|
|
13
|
+
// Misc
|
|
14
|
+
"relative float-left",
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
content: {
|
|
18
|
+
class: [
|
|
19
|
+
// Size & Spacing
|
|
20
|
+
"h-[calc(100%+18px)] w-[calc(100%+18px)] pr-[18px] pb-[18px] pl-0 pt-0",
|
|
21
|
+
|
|
22
|
+
// Overflow & Scrollbar
|
|
23
|
+
"overflow-scroll scrollbar-none",
|
|
24
|
+
|
|
25
|
+
// Box Model
|
|
26
|
+
"box-border",
|
|
27
|
+
|
|
28
|
+
// Position
|
|
29
|
+
"relative",
|
|
30
|
+
|
|
31
|
+
// Webkit Specific
|
|
32
|
+
"[&::-webkit-scrollbar]:hidden",
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
barX: {
|
|
36
|
+
class: [
|
|
37
|
+
// Size & Position
|
|
38
|
+
"h-[9px] bottom-0",
|
|
39
|
+
|
|
40
|
+
// Appearance
|
|
41
|
+
"bg-surface-50 dark:bg-surface-700 rounded",
|
|
42
|
+
|
|
43
|
+
// Interactivity
|
|
44
|
+
"cursor-pointer",
|
|
45
|
+
|
|
46
|
+
// Visibility & Layering
|
|
47
|
+
"invisible z-20",
|
|
48
|
+
|
|
49
|
+
// Transition
|
|
50
|
+
"transition duration-[250ms] ease-linear",
|
|
51
|
+
|
|
52
|
+
// Misc
|
|
53
|
+
"relative",
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
barY: {
|
|
57
|
+
class: [
|
|
58
|
+
// Size & Position
|
|
59
|
+
"w-[9px] top-0",
|
|
60
|
+
|
|
61
|
+
// Appearance
|
|
62
|
+
"bg-surface-50 dark:bg-surface-700 rounded",
|
|
63
|
+
|
|
64
|
+
// Interactivity
|
|
65
|
+
"cursor-pointer",
|
|
66
|
+
|
|
67
|
+
// Visibility & Layering
|
|
68
|
+
"z-20",
|
|
69
|
+
|
|
70
|
+
// Transition
|
|
71
|
+
"transition duration-[250ms] ease-linear",
|
|
72
|
+
|
|
73
|
+
// Misc
|
|
74
|
+
"relative",
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
// Flex & Alignment
|
|
5
|
+
"flex items-center justify-center",
|
|
6
|
+
|
|
7
|
+
// Positioning
|
|
8
|
+
{
|
|
9
|
+
sticky: props.target === "parent",
|
|
10
|
+
fixed: props.target === "window",
|
|
11
|
+
},
|
|
12
|
+
"bottom-[20px] right-[20px]",
|
|
13
|
+
"ml-auto",
|
|
14
|
+
|
|
15
|
+
// Shape & Size
|
|
16
|
+
{
|
|
17
|
+
"rounded-md h-8 w-8": props.target === "parent",
|
|
18
|
+
"h-12 w-12 rounded-full shadow-md": props.target === "window",
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
// Color
|
|
22
|
+
"text-white dark:text-surface-900",
|
|
23
|
+
{
|
|
24
|
+
"bg-primary-500 dark:bg-primary-400 hover:bg-primary-600 dark:hover:bg-primary-300":
|
|
25
|
+
props.target === "parent",
|
|
26
|
+
"bg-surface-500 dark:bg-surface-400 hover:bg-surface-600 dark:hover:bg-surface-300":
|
|
27
|
+
props.target === "window",
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
// States
|
|
31
|
+
{
|
|
32
|
+
"hover:bg-primary-600 dark:hover:bg-primary-300":
|
|
33
|
+
props.target === "parent",
|
|
34
|
+
"hover:bg-surface-600 dark:hover:bg-surface-300":
|
|
35
|
+
props.target === "window",
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
}),
|
|
39
|
+
transition: {
|
|
40
|
+
enterFromClass: "opacity-0",
|
|
41
|
+
enterActiveClass: "transition-opacity duration-150",
|
|
42
|
+
leaveActiveClass: "transition-opacity duration-150",
|
|
43
|
+
leaveToClass: "opacity-0",
|
|
44
|
+
},
|
|
45
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
{
|
|
5
|
+
"opacity-60 select-none pointer-events-none cursor-default":
|
|
6
|
+
props.disabled,
|
|
7
|
+
},
|
|
8
|
+
],
|
|
9
|
+
}),
|
|
10
|
+
button: ({ context, props }) => ({
|
|
11
|
+
class: [
|
|
12
|
+
"relative",
|
|
13
|
+
// Font
|
|
14
|
+
"leading-none",
|
|
15
|
+
|
|
16
|
+
// Flex Alignment
|
|
17
|
+
"inline-flex items-center align-bottom text-center",
|
|
18
|
+
|
|
19
|
+
// Spacing
|
|
20
|
+
"px-4 py-3",
|
|
21
|
+
|
|
22
|
+
// Shape
|
|
23
|
+
"border border-r-0",
|
|
24
|
+
"first:rounded-l-md first:rounded-tr-none first:rounded-br-none",
|
|
25
|
+
"last:border-r last:rounded-tl-none last:rounded-bl-none last:rounded-r-md",
|
|
26
|
+
|
|
27
|
+
// Color
|
|
28
|
+
{
|
|
29
|
+
"bg-surface-0 dark:bg-surface-900": !context.active,
|
|
30
|
+
"text-surface-700 dark:text-white/80": !context.active,
|
|
31
|
+
"border-surface-200 dark:border-surface-700":
|
|
32
|
+
!context.active && !props.invalid,
|
|
33
|
+
"bg-primary-500 dark:bg-primary-400 border-primary-500 dark:border-primary-400 text-white dark:text-surface-900":
|
|
34
|
+
context.active,
|
|
35
|
+
},
|
|
36
|
+
// Invalid State
|
|
37
|
+
{ "border-red-500 dark:border-red-400": props.invalid },
|
|
38
|
+
|
|
39
|
+
// States
|
|
40
|
+
"focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50 focus:z-10",
|
|
41
|
+
{
|
|
42
|
+
"hover:bg-surface-50 dark:hover:bg-surface-800/80":
|
|
43
|
+
!context.active && !props.invalid,
|
|
44
|
+
"hover:bg-primary-600 dark:hover:bg-primary-300": context.active,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"opacity-60 select-none pointer-events-none cursor-default":
|
|
48
|
+
context.disabled,
|
|
49
|
+
},
|
|
50
|
+
// Transition
|
|
51
|
+
"transition duration-200",
|
|
52
|
+
|
|
53
|
+
// Misc
|
|
54
|
+
"cursor-pointer select-none overflow-hidden",
|
|
55
|
+
],
|
|
56
|
+
}),
|
|
57
|
+
label: {
|
|
58
|
+
class: "font-bold",
|
|
59
|
+
},
|
|
60
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
// Flexbox
|
|
5
|
+
"flex flex-col",
|
|
6
|
+
|
|
7
|
+
// Position
|
|
8
|
+
"relative",
|
|
9
|
+
{
|
|
10
|
+
"!transition-none !transform-none !w-screen !h-screen !max-h-full !top-0 !left-0":
|
|
11
|
+
props.position == "full",
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
// Size
|
|
15
|
+
{
|
|
16
|
+
"h-full w-80": props.position == "left" || props.position == "right",
|
|
17
|
+
"h-auto w-full": props.position == "top" || props.position == "bottom",
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
// Shape
|
|
21
|
+
"border-0 dark:border",
|
|
22
|
+
"shadow-lg",
|
|
23
|
+
|
|
24
|
+
// Colors
|
|
25
|
+
"bg-surface-0 dark:bg-surface-800",
|
|
26
|
+
"text-surface-700 dark:text-white/80",
|
|
27
|
+
"dark:border-surface-700",
|
|
28
|
+
|
|
29
|
+
// Transitions
|
|
30
|
+
"transition-transform",
|
|
31
|
+
"duration-300",
|
|
32
|
+
|
|
33
|
+
// Misc
|
|
34
|
+
"pointer-events-auto",
|
|
35
|
+
],
|
|
36
|
+
}),
|
|
37
|
+
header: {
|
|
38
|
+
class: [
|
|
39
|
+
// Flexbox and Alignment
|
|
40
|
+
"flex items-center justify-between",
|
|
41
|
+
"shrink-0",
|
|
42
|
+
|
|
43
|
+
// Spacing
|
|
44
|
+
"p-5",
|
|
45
|
+
|
|
46
|
+
// Colors
|
|
47
|
+
"bg-surface-0 dark:bg-surface-800",
|
|
48
|
+
"text-surface-700 dark:text-surface-0/80",
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
title: {
|
|
52
|
+
class: ["font-bold text-lg"],
|
|
53
|
+
},
|
|
54
|
+
icons: {
|
|
55
|
+
class: ["flex items-center"],
|
|
56
|
+
},
|
|
57
|
+
closeButton: {
|
|
58
|
+
class: [
|
|
59
|
+
"relative",
|
|
60
|
+
|
|
61
|
+
// Flexbox and Alignment
|
|
62
|
+
"flex items-center justify-center",
|
|
63
|
+
|
|
64
|
+
// Size and Spacing
|
|
65
|
+
"mr-2",
|
|
66
|
+
"last:mr-0",
|
|
67
|
+
"w-8 h-8",
|
|
68
|
+
|
|
69
|
+
// Shape
|
|
70
|
+
"border-0",
|
|
71
|
+
"rounded-full",
|
|
72
|
+
|
|
73
|
+
// Colors
|
|
74
|
+
"text-surface-500",
|
|
75
|
+
"bg-transparent",
|
|
76
|
+
|
|
77
|
+
// Transitions
|
|
78
|
+
"transition duration-200 ease-in-out",
|
|
79
|
+
|
|
80
|
+
// States
|
|
81
|
+
"hover:text-surface-700 dark:hover:text-white/80",
|
|
82
|
+
"hover:bg-surface-100 dark:hover:bg-surface-800/80",
|
|
83
|
+
"focus:outline-none focus:outline-offset-0 focus:ring focus:ring-inset",
|
|
84
|
+
"focus:ring-primary-400/50 dark:focus:ring-primary-300/50",
|
|
85
|
+
|
|
86
|
+
// Misc
|
|
87
|
+
"overflow-hidden",
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
closeButtonIcon: {
|
|
91
|
+
class: [
|
|
92
|
+
// Display
|
|
93
|
+
"inline-block",
|
|
94
|
+
|
|
95
|
+
// Size
|
|
96
|
+
"w-4",
|
|
97
|
+
"h-4",
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
content: {
|
|
101
|
+
class: [
|
|
102
|
+
// Spacing and Size
|
|
103
|
+
"p-5",
|
|
104
|
+
"pt-0",
|
|
105
|
+
"h-full",
|
|
106
|
+
"w-full",
|
|
107
|
+
|
|
108
|
+
// Growth and Overflow
|
|
109
|
+
"grow",
|
|
110
|
+
"overflow-y-auto",
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
mask: ({ props }) => ({
|
|
114
|
+
class: [
|
|
115
|
+
// Transitions
|
|
116
|
+
"transition-all",
|
|
117
|
+
"duration-300",
|
|
118
|
+
{ "p-5": !props.position == "full" },
|
|
119
|
+
|
|
120
|
+
// Background and Effects
|
|
121
|
+
{
|
|
122
|
+
"has-[.mask-active]:bg-transparent bg-black/40": props.modal,
|
|
123
|
+
"has-[.mask-active]:backdrop-blur-none backdrop-blur-sm": props.modal,
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
}),
|
|
127
|
+
transition: ({ props }) => {
|
|
128
|
+
return props.position === "top"
|
|
129
|
+
? {
|
|
130
|
+
enterFromClass:
|
|
131
|
+
"translate-x-0 -translate-y-full translate-z-0 mask-active",
|
|
132
|
+
leaveToClass:
|
|
133
|
+
"translate-x-0 -translate-y-full translate-z-0 mask-active",
|
|
134
|
+
}
|
|
135
|
+
: props.position === "bottom"
|
|
136
|
+
? {
|
|
137
|
+
enterFromClass:
|
|
138
|
+
"translate-x-0 translate-y-full translate-z-0 mask-active",
|
|
139
|
+
leaveToClass:
|
|
140
|
+
"translate-x-0 translate-y-full translate-z-0 mask-active",
|
|
141
|
+
}
|
|
142
|
+
: props.position === "left"
|
|
143
|
+
? {
|
|
144
|
+
enterFromClass:
|
|
145
|
+
"-translate-x-full translate-y-0 translate-z-0 mask-active",
|
|
146
|
+
leaveToClass:
|
|
147
|
+
"-translate-x-full translate-y-0 translate-z-0 mask-active",
|
|
148
|
+
}
|
|
149
|
+
: props.position === "right"
|
|
150
|
+
? {
|
|
151
|
+
enterFromClass:
|
|
152
|
+
"translate-x-full translate-y-0 translate-z-0 mask-active",
|
|
153
|
+
leaveToClass:
|
|
154
|
+
"translate-x-full translate-y-0 translate-z-0 mask-active",
|
|
155
|
+
}
|
|
156
|
+
: {
|
|
157
|
+
enterFromClass: "opacity-0 mask-active",
|
|
158
|
+
enterActiveClass: "transition-opacity duration-400 ease-in",
|
|
159
|
+
leaveActiveClass: "transition-opacity duration-400 ease-in",
|
|
160
|
+
leaveToClass: "opacity-0 mask-active",
|
|
161
|
+
};
|
|
162
|
+
},
|
|
163
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
"overflow-hidden",
|
|
5
|
+
{
|
|
6
|
+
"animate-pulse": props.animation !== "none",
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
// Round
|
|
10
|
+
{
|
|
11
|
+
"rounded-full": props.shape === "circle",
|
|
12
|
+
"rounded-md": props.shape !== "circle",
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
// Colors
|
|
16
|
+
"bg-surface-200 dark:bg-surface-700",
|
|
17
|
+
],
|
|
18
|
+
}),
|
|
19
|
+
};
|