@fy-/fws-vue 0.1.2 → 0.1.4
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 +21 -0
- 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
|
@@ -8,6 +8,7 @@ import Textarea from "primevue/textarea";
|
|
|
8
8
|
import Calendar from "primevue/calendar";
|
|
9
9
|
import Password from "primevue/password";
|
|
10
10
|
import Checkbox from "primevue/checkbox";
|
|
11
|
+
import Dropdown from "primevue/dropdown";
|
|
11
12
|
|
|
12
13
|
type modelValueType = string | number | string[] | number[] | undefined;
|
|
13
14
|
|
|
@@ -57,6 +58,12 @@ const checkErrors = computed(() => {
|
|
|
57
58
|
return null;
|
|
58
59
|
});
|
|
59
60
|
|
|
61
|
+
const formattedOptions = computed(() => {
|
|
62
|
+
return props.options.map((option) => {
|
|
63
|
+
return { optionLabel: option[0], optionValue: option[1] };
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
60
67
|
const focus = () => {
|
|
61
68
|
if (inputRef.value) inputRef.value.focus();
|
|
62
69
|
};
|
|
@@ -177,6 +184,20 @@ defineExpose({ focus, getInputRef });
|
|
|
177
184
|
toggleMask
|
|
178
185
|
v-if="type == 'password'"
|
|
179
186
|
/>
|
|
187
|
+
<!-- @vue-skip -->
|
|
188
|
+
<Dropdown
|
|
189
|
+
:id="id"
|
|
190
|
+
v-model="model"
|
|
191
|
+
:options="formattedOptions"
|
|
192
|
+
:placeholder="placeholder"
|
|
193
|
+
:invalid="checkErrors ? true : false"
|
|
194
|
+
:aria-describedby="
|
|
195
|
+
help && !['checkbox', 'radio'].includes(type)
|
|
196
|
+
? `${id}-help`
|
|
197
|
+
: undefined
|
|
198
|
+
"
|
|
199
|
+
v-if="type == 'select'"
|
|
200
|
+
/>
|
|
180
201
|
<small
|
|
181
202
|
:id="`${id}-help`"
|
|
182
203
|
v-if="help && !['checkbox', 'radio'].includes(type)"
|
package/index.ts
CHANGED
|
@@ -51,6 +51,7 @@ import CmsArticleSingle from "./components/fws/CmsArticleSingle.vue";
|
|
|
51
51
|
|
|
52
52
|
// Primevue
|
|
53
53
|
import Wind from "./presets/Wind";
|
|
54
|
+
import Lara from "./presets/Lara";
|
|
54
55
|
|
|
55
56
|
// Css
|
|
56
57
|
import "./style.css";
|
|
@@ -98,7 +99,9 @@ declare module "vue" {
|
|
|
98
99
|
|
|
99
100
|
const Primevue = {
|
|
100
101
|
Wind: Wind,
|
|
101
|
-
|
|
102
|
+
Lara: Lara,
|
|
103
|
+
} as Record<string, any>;
|
|
104
|
+
|
|
102
105
|
export {
|
|
103
106
|
i18nextPromise,
|
|
104
107
|
useTranslation,
|
package/package.json
CHANGED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
accordiontab: {
|
|
3
|
+
root: {
|
|
4
|
+
class: "mb-1",
|
|
5
|
+
},
|
|
6
|
+
header: ({ props }) => ({
|
|
7
|
+
class: [
|
|
8
|
+
// State
|
|
9
|
+
{
|
|
10
|
+
"select-none pointer-events-none cursor-default opacity-60":
|
|
11
|
+
props?.disabled,
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
}),
|
|
15
|
+
headerAction: ({ context }) => ({
|
|
16
|
+
class: [
|
|
17
|
+
// Font
|
|
18
|
+
"font-bold",
|
|
19
|
+
"leading-none",
|
|
20
|
+
|
|
21
|
+
// Alignments
|
|
22
|
+
"flex items-center",
|
|
23
|
+
"relative",
|
|
24
|
+
|
|
25
|
+
// Sizing
|
|
26
|
+
"p-5",
|
|
27
|
+
|
|
28
|
+
// Shape
|
|
29
|
+
"rounded-t-md",
|
|
30
|
+
{
|
|
31
|
+
"rounded-br-md rounded-bl-md": !context.active,
|
|
32
|
+
"rounded-br-0 rounded-bl-0": context.active,
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
// Color
|
|
36
|
+
"border border-surface-200 dark:border-surface-700",
|
|
37
|
+
"bg-surface-50 dark:bg-surface-800",
|
|
38
|
+
"text-surface-600 dark:text-surface-0/80",
|
|
39
|
+
{ "text-surface-900": context.active },
|
|
40
|
+
|
|
41
|
+
// Transition
|
|
42
|
+
"transition duration-200 ease-in-out",
|
|
43
|
+
"transition-shadow duration-200",
|
|
44
|
+
|
|
45
|
+
// States
|
|
46
|
+
"hover:bg-surface-100 dark:hover:bg-surface-700/40",
|
|
47
|
+
"hover:text-surface-900",
|
|
48
|
+
"focus:outline-none focus:outline-offset-0 focus-visible:ring focus-visible:ring-primary-400/50 ring-inset dark:focus-visible:ring-primary-300/50", // Focus
|
|
49
|
+
|
|
50
|
+
// Misc
|
|
51
|
+
"cursor-pointer no-underline select-none",
|
|
52
|
+
],
|
|
53
|
+
}),
|
|
54
|
+
headerIcon: {
|
|
55
|
+
class: "inline-block mr-2",
|
|
56
|
+
},
|
|
57
|
+
headerTitle: {
|
|
58
|
+
class: "leading-none",
|
|
59
|
+
},
|
|
60
|
+
content: {
|
|
61
|
+
class: [
|
|
62
|
+
// Spacing
|
|
63
|
+
"p-5",
|
|
64
|
+
|
|
65
|
+
// Shape
|
|
66
|
+
"rounded-tl-none rounded-tr-none rounded-br-lg rounded-bl-lg",
|
|
67
|
+
"border-t-0",
|
|
68
|
+
|
|
69
|
+
// Color
|
|
70
|
+
"bg-surface-0 dark:bg-surface-800",
|
|
71
|
+
"border border-surface-200 dark:border-surface-700",
|
|
72
|
+
"text-surface-700 dark:text-surface-0/80",
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
transition: {
|
|
76
|
+
enterFromClass: "max-h-0",
|
|
77
|
+
enterActiveClass:
|
|
78
|
+
"overflow-hidden transition-[max-height] duration-1000 ease-[cubic-bezier(0.42,0,0.58,1)]",
|
|
79
|
+
enterToClass: "max-h-[1000px]",
|
|
80
|
+
leaveFromClass: "max-h-[1000px]",
|
|
81
|
+
leaveActiveClass:
|
|
82
|
+
"overflow-hidden transition-[max-height] duration-[450ms] ease-[cubic-bezier(0,1,0,1)]",
|
|
83
|
+
leaveToClass: "max-h-0",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
"relative",
|
|
5
|
+
|
|
6
|
+
// Flex
|
|
7
|
+
"inline-flex",
|
|
8
|
+
|
|
9
|
+
// Size
|
|
10
|
+
{ "w-full": props.multiple },
|
|
11
|
+
|
|
12
|
+
// Color
|
|
13
|
+
"text-surface-900 dark:text-surface-0",
|
|
14
|
+
|
|
15
|
+
// States
|
|
16
|
+
{
|
|
17
|
+
"opacity-60 select-none pointer-events-none cursor-default":
|
|
18
|
+
props.disabled,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
}),
|
|
22
|
+
container: ({ props, state }) => ({
|
|
23
|
+
class: [
|
|
24
|
+
// Font
|
|
25
|
+
"font-sans text-base leading-none",
|
|
26
|
+
|
|
27
|
+
// Flex
|
|
28
|
+
"flex items-center flex-wrap",
|
|
29
|
+
"gap-2",
|
|
30
|
+
|
|
31
|
+
// Spacing
|
|
32
|
+
"m-0 list-none",
|
|
33
|
+
"px-3 py-1.5",
|
|
34
|
+
|
|
35
|
+
// Size
|
|
36
|
+
"w-full",
|
|
37
|
+
"min-h-[2.877rem]",
|
|
38
|
+
|
|
39
|
+
// Shape
|
|
40
|
+
"appearance-none rounded-md",
|
|
41
|
+
|
|
42
|
+
// Color
|
|
43
|
+
"text-surface-700 dark:text-white/80",
|
|
44
|
+
"placeholder:text-surface-400 dark:placeholder:text-surface-500",
|
|
45
|
+
"bg-surface-0 dark:bg-surface-900",
|
|
46
|
+
"border",
|
|
47
|
+
{ "border-surface-300 dark:border-surface-600": !props.invalid },
|
|
48
|
+
|
|
49
|
+
// Invalid State
|
|
50
|
+
{ "border-red-500 dark:border-red-400": props.invalid },
|
|
51
|
+
|
|
52
|
+
// States
|
|
53
|
+
{
|
|
54
|
+
"hover:border-primary-500 dark:hover:border-primary-400":
|
|
55
|
+
!props.invalid,
|
|
56
|
+
},
|
|
57
|
+
"focus:outline-none focus:outline-offset-0",
|
|
58
|
+
{ "ring ring-primary-400/50 dark:ring-primary-300/50": state.focused },
|
|
59
|
+
{ "ring ring-primary-400/50 dark:ring-primary-300/50": state.hovered },
|
|
60
|
+
// Transition
|
|
61
|
+
"transition duration-200 ease-in-out",
|
|
62
|
+
|
|
63
|
+
// Misc
|
|
64
|
+
"cursor-text overflow-hidden",
|
|
65
|
+
],
|
|
66
|
+
}),
|
|
67
|
+
inputtoken: {
|
|
68
|
+
class: ["py-1.5 px-0", "inline-flex flex-auto"],
|
|
69
|
+
},
|
|
70
|
+
input: ({ props }) => ({
|
|
71
|
+
class: [
|
|
72
|
+
// Font
|
|
73
|
+
"font-sans text-base leading-none",
|
|
74
|
+
|
|
75
|
+
// Shape
|
|
76
|
+
"appearance-none rounded-md",
|
|
77
|
+
{ "rounded-tr-none rounded-br-none": props.dropdown },
|
|
78
|
+
{ "outline-none shadow-none rounded-none": props.multiple },
|
|
79
|
+
|
|
80
|
+
// Size
|
|
81
|
+
{ "w-full": props.multiple },
|
|
82
|
+
|
|
83
|
+
// Spacing
|
|
84
|
+
"m-0",
|
|
85
|
+
{ "p-3": !props.multiple, "p-0": props.multiple },
|
|
86
|
+
|
|
87
|
+
// Colors
|
|
88
|
+
"text-surface-700 dark:text-white/80",
|
|
89
|
+
"border",
|
|
90
|
+
{
|
|
91
|
+
"bg-surface-0 dark:bg-surface-900": !props.multiple,
|
|
92
|
+
" border-surface-300 dark:border-surface-700":
|
|
93
|
+
!props.multiple && !props.invalid,
|
|
94
|
+
"border-0 bg-transparent": props.multiple,
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
// Invalid State
|
|
98
|
+
{ "border-red-500 dark:border-red-400": props.invalid },
|
|
99
|
+
|
|
100
|
+
// States
|
|
101
|
+
{
|
|
102
|
+
"focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50":
|
|
103
|
+
!props.multiple,
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
// Transition
|
|
107
|
+
"transition-colors duration-200",
|
|
108
|
+
],
|
|
109
|
+
}),
|
|
110
|
+
token: {
|
|
111
|
+
class: [
|
|
112
|
+
// Flex
|
|
113
|
+
"inline-flex items-center",
|
|
114
|
+
|
|
115
|
+
// Spacings
|
|
116
|
+
"py-1.5 px-3",
|
|
117
|
+
|
|
118
|
+
// Shape
|
|
119
|
+
"rounded-[1.14rem]",
|
|
120
|
+
|
|
121
|
+
// Colors
|
|
122
|
+
"bg-surface-200 dark:bg-surface-700",
|
|
123
|
+
"text-surface-700 dark:text-white/70",
|
|
124
|
+
|
|
125
|
+
// Misc
|
|
126
|
+
"cursor-default",
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
label: {
|
|
130
|
+
class: "leading-5",
|
|
131
|
+
},
|
|
132
|
+
removeTokenIcon: {
|
|
133
|
+
class: [
|
|
134
|
+
// Shape
|
|
135
|
+
"rounded-md leading-6",
|
|
136
|
+
|
|
137
|
+
// Spacing
|
|
138
|
+
"ml-2",
|
|
139
|
+
|
|
140
|
+
// Size
|
|
141
|
+
"w-4 h-4",
|
|
142
|
+
|
|
143
|
+
// Transition
|
|
144
|
+
"transition duration-200 ease-in-out",
|
|
145
|
+
|
|
146
|
+
// Misc
|
|
147
|
+
"cursor-pointer",
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
dropdownbutton: {
|
|
151
|
+
root: {
|
|
152
|
+
class: [
|
|
153
|
+
"relative",
|
|
154
|
+
|
|
155
|
+
// Alignments
|
|
156
|
+
"items-center inline-flex text-center align-bottom",
|
|
157
|
+
|
|
158
|
+
// Shape
|
|
159
|
+
"rounded-r-md",
|
|
160
|
+
|
|
161
|
+
// Size
|
|
162
|
+
"px-4 py-3 leading-none",
|
|
163
|
+
|
|
164
|
+
// Colors
|
|
165
|
+
"text-white dark:text-surface-900",
|
|
166
|
+
"bg-primary-500 dark:bg-primary-400",
|
|
167
|
+
"border border-primary-500 dark:border-primary-400",
|
|
168
|
+
|
|
169
|
+
// States
|
|
170
|
+
"focus:outline-none focus:outline-offset-0 focus:ring",
|
|
171
|
+
"hover:bg-primary-600 dark:hover:bg-primary-300 hover:border-primary-600 dark:hover:border-primary-300",
|
|
172
|
+
"focus:ring-primary-400/50 dark:focus:ring-primary-300/50",
|
|
173
|
+
],
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
loadingicon: {
|
|
177
|
+
class: [
|
|
178
|
+
"text-surface-500 dark:text-surface-0/70",
|
|
179
|
+
"absolute top-[50%] right-[0.5rem] -mt-2 animate-spin",
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
panel: {
|
|
183
|
+
class: [
|
|
184
|
+
// Colors
|
|
185
|
+
"bg-surface-0 dark:bg-surface-800",
|
|
186
|
+
"text-surface-700 dark:text-white/80",
|
|
187
|
+
|
|
188
|
+
// Shape
|
|
189
|
+
"border-0",
|
|
190
|
+
"rounded-md",
|
|
191
|
+
"shadow-md",
|
|
192
|
+
|
|
193
|
+
// Size
|
|
194
|
+
"max-h-[200px] overflow-auto",
|
|
195
|
+
],
|
|
196
|
+
},
|
|
197
|
+
list: {
|
|
198
|
+
class: "py-3 px-0 list-none m-0",
|
|
199
|
+
},
|
|
200
|
+
item: ({ context }) => ({
|
|
201
|
+
class: [
|
|
202
|
+
"relative",
|
|
203
|
+
|
|
204
|
+
// Font
|
|
205
|
+
"font-normal text-base leading-none",
|
|
206
|
+
|
|
207
|
+
// Spacing
|
|
208
|
+
"m-0 px-5 py-3",
|
|
209
|
+
|
|
210
|
+
// Shape
|
|
211
|
+
"border-0 rounded-none",
|
|
212
|
+
|
|
213
|
+
// Colors
|
|
214
|
+
{
|
|
215
|
+
"text-surface-700 dark:text-white/80":
|
|
216
|
+
!context.focused && !context.selected,
|
|
217
|
+
"bg-surface-200 dark:bg-surface-600/60":
|
|
218
|
+
context.focused && !context.selected,
|
|
219
|
+
"text-surface-700 dark:text-white/80":
|
|
220
|
+
context.focused && !context.selected,
|
|
221
|
+
|
|
222
|
+
"text-primary-700 dark:text-white/80":
|
|
223
|
+
context.focused && context.selected,
|
|
224
|
+
"bg-primary-100 dark:bg-primary-400":
|
|
225
|
+
context.focused && context.selected,
|
|
226
|
+
"text-primary-700 dark:text-white/80":
|
|
227
|
+
!context.focused && context.selected,
|
|
228
|
+
"bg-primary-50 dark:bg-primary-300":
|
|
229
|
+
!context.focused && context.selected,
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
// States
|
|
233
|
+
{
|
|
234
|
+
"hover:bg-surface-100 dark:hover:bg-surface-600/80":
|
|
235
|
+
!context.focused && !context.selected,
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"hover:text-surface-700 hover:bg-surface-100 dark:hover:text-white dark:hover:bg-surface-600/80":
|
|
239
|
+
context.focused && !context.selected,
|
|
240
|
+
},
|
|
241
|
+
|
|
242
|
+
// Transition
|
|
243
|
+
"transition-shadow duration-200",
|
|
244
|
+
|
|
245
|
+
// Misc
|
|
246
|
+
"cursor-pointer overflow-hidden whitespace-nowrap",
|
|
247
|
+
],
|
|
248
|
+
}),
|
|
249
|
+
itemgroup: {
|
|
250
|
+
class: [
|
|
251
|
+
"font-bold",
|
|
252
|
+
|
|
253
|
+
// Spacing
|
|
254
|
+
"m-0 p-3",
|
|
255
|
+
|
|
256
|
+
// Colors
|
|
257
|
+
"bg-surface-0 dark:bg-surface-700",
|
|
258
|
+
"text-surface-800 dark:text-white/80",
|
|
259
|
+
|
|
260
|
+
// Misc
|
|
261
|
+
"cursor-auto",
|
|
262
|
+
],
|
|
263
|
+
},
|
|
264
|
+
emptymessage: {
|
|
265
|
+
class: [
|
|
266
|
+
// Font
|
|
267
|
+
"leading-none",
|
|
268
|
+
|
|
269
|
+
// Spacing
|
|
270
|
+
"py-3 px-5",
|
|
271
|
+
|
|
272
|
+
// Color
|
|
273
|
+
"text-surface-800 dark:text-white/80",
|
|
274
|
+
"bg-transparent",
|
|
275
|
+
],
|
|
276
|
+
},
|
|
277
|
+
transition: {
|
|
278
|
+
enterFromClass: "opacity-0 scale-y-[0.8]",
|
|
279
|
+
enterActiveClass:
|
|
280
|
+
"transition-[transform,opacity] duration-[120ms] ease-[cubic-bezier(0,0,0.2,1)]",
|
|
281
|
+
leaveActiveClass: "transition-opacity duration-100 ease-linear",
|
|
282
|
+
leaveToClass: "opacity-0",
|
|
283
|
+
},
|
|
284
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props, parent }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
// Font
|
|
5
|
+
{
|
|
6
|
+
"text-xl": props.size == "large",
|
|
7
|
+
"text-2xl": props.size == "xlarge",
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
// Alignments
|
|
11
|
+
"inline-flex items-center justify-center",
|
|
12
|
+
"relative",
|
|
13
|
+
|
|
14
|
+
// Sizes
|
|
15
|
+
{
|
|
16
|
+
"h-8 w-8": props.size == null || props.size == "normal",
|
|
17
|
+
"w-12 h-12": props.size == "large",
|
|
18
|
+
"w-16 h-16": props.size == "xlarge",
|
|
19
|
+
},
|
|
20
|
+
{ "-ml-4": parent.instance.$style?.name == "avatargroup" },
|
|
21
|
+
|
|
22
|
+
// Shapes
|
|
23
|
+
{
|
|
24
|
+
"rounded-lg": props.shape == "square",
|
|
25
|
+
"rounded-full": props.shape == "circle",
|
|
26
|
+
},
|
|
27
|
+
{ "border-2": parent.instance.$style?.name == "avatargroup" },
|
|
28
|
+
|
|
29
|
+
// Colors
|
|
30
|
+
"bg-surface-300 dark:bg-surface-700",
|
|
31
|
+
{
|
|
32
|
+
"border-white dark:border-surface-800":
|
|
33
|
+
parent.instance.$style?.name == "avatargroup",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
}),
|
|
37
|
+
image: ({ props }) => ({
|
|
38
|
+
class: [
|
|
39
|
+
"h-full w-full",
|
|
40
|
+
{
|
|
41
|
+
"rounded-lg": props.shape == "square",
|
|
42
|
+
"rounded-full": props.shape == "circle",
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
}),
|
|
46
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ props }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
// Font
|
|
5
|
+
"font-bold",
|
|
6
|
+
|
|
7
|
+
{
|
|
8
|
+
"text-xs leading-[1.5rem]": props.size == null,
|
|
9
|
+
"text-lg leading-[2.25rem]": props.size == "large",
|
|
10
|
+
"text-2xl leading-[3rem]": props.size == "xlarge",
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
// Alignment
|
|
14
|
+
"text-center inline-block",
|
|
15
|
+
|
|
16
|
+
// Size
|
|
17
|
+
"p-0 px-1",
|
|
18
|
+
{
|
|
19
|
+
"min-w-[1.5rem] h-[1.5rem]": props.size == null,
|
|
20
|
+
"min-w-[2.25rem] h-[2.25rem]": props.size == "large",
|
|
21
|
+
"min-w-[3rem] h-[3rem]": props.size == "xlarge",
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
// Shape
|
|
25
|
+
{
|
|
26
|
+
"rounded-full": props.value.length == 1,
|
|
27
|
+
"rounded-[0.71rem]": props.value.length !== 1,
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
// Color
|
|
31
|
+
"text-white dark:text-surface-900",
|
|
32
|
+
{
|
|
33
|
+
"bg-primary-500 dark:bg-primary-400":
|
|
34
|
+
props.severity == null || props.severity == "primary",
|
|
35
|
+
"bg-surface-500 dark:bg-surface-400": props.severity == "secondary",
|
|
36
|
+
"bg-green-500 dark:bg-green-400": props.severity == "success",
|
|
37
|
+
"bg-blue-500 dark:bg-blue-400": props.severity == "info",
|
|
38
|
+
"bg-orange-500 dark:bg-orange-400": props.severity == "warning",
|
|
39
|
+
"bg-purple-500 dark:bg-purple-400": props.severity == "help",
|
|
40
|
+
"bg-red-500 dark:bg-red-400": props.severity == "danger",
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
}),
|
|
44
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: ({ context }) => ({
|
|
3
|
+
class: [
|
|
4
|
+
// Font
|
|
5
|
+
"font-bold font-sans",
|
|
6
|
+
"text-xs leading-5",
|
|
7
|
+
|
|
8
|
+
// Alignment
|
|
9
|
+
"flex items-center justify-center",
|
|
10
|
+
"text-center",
|
|
11
|
+
|
|
12
|
+
// Position
|
|
13
|
+
"absolute top-0 right-0 transform translate-x-1/2 -translate-y-1/2 origin-top-right",
|
|
14
|
+
|
|
15
|
+
// Size
|
|
16
|
+
"m-0",
|
|
17
|
+
{
|
|
18
|
+
"p-0": context.nogutter || context.dot,
|
|
19
|
+
"px-2": !context.nogutter && !context.dot,
|
|
20
|
+
"min-w-[0.5rem] w-2 h-2": context.dot,
|
|
21
|
+
"min-w-[1.5rem] h-6": !context.dot,
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
// Shape
|
|
25
|
+
{
|
|
26
|
+
"rounded-full": context.nogutter || context.dot,
|
|
27
|
+
"rounded-[10px]": !context.nogutter && !context.dot,
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
// Color
|
|
31
|
+
"text-white dark:text-surface-900",
|
|
32
|
+
{
|
|
33
|
+
"bg-primary-500 dark:bg-primary-400":
|
|
34
|
+
!context.info &&
|
|
35
|
+
!context.success &&
|
|
36
|
+
!context.warning &&
|
|
37
|
+
!context.danger &&
|
|
38
|
+
!context.help &&
|
|
39
|
+
!context.secondary,
|
|
40
|
+
"bg-surface-500 dark:bg-surface-400": context.secondary,
|
|
41
|
+
"bg-green-500 dark:bg-green-400": context.success,
|
|
42
|
+
"bg-blue-500 dark:bg-blue-400": context.info,
|
|
43
|
+
"bg-orange-500 dark:bg-orange-400": context.warning,
|
|
44
|
+
"bg-purple-500 dark:bg-purple-400": context.help,
|
|
45
|
+
"bg-red-500 dark:bg-red-400": context.danger,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
}),
|
|
49
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
root: {
|
|
3
|
+
class: [
|
|
4
|
+
// Shape
|
|
5
|
+
"rounded-md",
|
|
6
|
+
|
|
7
|
+
// Spacing
|
|
8
|
+
"p-4",
|
|
9
|
+
|
|
10
|
+
// Color
|
|
11
|
+
"bg-surface-0 dark:bg-surface-700",
|
|
12
|
+
"border border-surface-200 dark:border-surface-700",
|
|
13
|
+
|
|
14
|
+
// Misc
|
|
15
|
+
"overflow-x-auto",
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
menu: {
|
|
19
|
+
class: [
|
|
20
|
+
// Flex & Alignment
|
|
21
|
+
"flex items-center flex-nowrap",
|
|
22
|
+
|
|
23
|
+
// Spacing
|
|
24
|
+
"m-0 p-0 list-none leading-none",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
action: {
|
|
28
|
+
class: [
|
|
29
|
+
// Flex & Alignment
|
|
30
|
+
"flex items-center",
|
|
31
|
+
|
|
32
|
+
// Shape
|
|
33
|
+
"rounded-md",
|
|
34
|
+
|
|
35
|
+
// Color
|
|
36
|
+
"text-surface-600 dark:text-white/70",
|
|
37
|
+
|
|
38
|
+
// States
|
|
39
|
+
"focus-visible:outline-none focus-visible:outline-offset-0",
|
|
40
|
+
"focus-visible:ring focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50",
|
|
41
|
+
|
|
42
|
+
// Transitions
|
|
43
|
+
"transition-shadow duration-200",
|
|
44
|
+
|
|
45
|
+
// Misc
|
|
46
|
+
"text-decoration-none",
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
icon: {
|
|
50
|
+
class: "text-surface-600 dark:text-white/70",
|
|
51
|
+
},
|
|
52
|
+
separator: {
|
|
53
|
+
class: [
|
|
54
|
+
// Flex & Alignment
|
|
55
|
+
"flex items-center",
|
|
56
|
+
|
|
57
|
+
// Spacing
|
|
58
|
+
" mx-2",
|
|
59
|
+
|
|
60
|
+
// Color
|
|
61
|
+
"text-surface-600 dark:text-white/70",
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
};
|