vueless 0.0.218 → 0.0.220
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/composable.ui/index.js +15 -5
- package/package.json +1 -1
- package/ui.button/configs/default.config.js +6 -6
- package/ui.button/index.vue +14 -2
- package/ui.form-color-picker/configs/default.config.js +12 -20
- package/ui.form-color-picker/index.vue +2 -2
- package/ui.form-date-picker-range/composables/attrs.composable.js +0 -9
- package/ui.form-date-picker-range/configs/default.config.js +18 -27
- package/ui.form-date-picker-range/index.vue +48 -64
- package/ui.form-input/configs/default.config.js +2 -2
- package/ui.form-input/index.vue +2 -2
- package/ui.form-radio/index.vue +1 -1
- package/ui.form-select/index.vue +2 -2
- package/web-types.json +5 -5
package/composable.ui/index.js
CHANGED
|
@@ -31,6 +31,7 @@ const SYSTEM_CONFIG_KEY = {
|
|
|
31
31
|
i18n: "i18n",
|
|
32
32
|
strategy: "strategy",
|
|
33
33
|
safelist: "safelist",
|
|
34
|
+
component: "component",
|
|
34
35
|
safelistColors: "safelistColors",
|
|
35
36
|
defaultVariants: "defaultVariants",
|
|
36
37
|
compoundVariants: "compoundVariants",
|
|
@@ -71,7 +72,7 @@ export default function useUI(defaultConfig = {}, propsConfigGetter = null, topL
|
|
|
71
72
|
});
|
|
72
73
|
|
|
73
74
|
function getAttrs(configKey, options) {
|
|
74
|
-
const nestedComponent =
|
|
75
|
+
const nestedComponent = getNestedComponent(defaultConfig[configKey]);
|
|
75
76
|
|
|
76
77
|
const attrs = useAttrs();
|
|
77
78
|
const isDev = import.meta.env.DEV;
|
|
@@ -206,6 +207,7 @@ function mergeConfigs({
|
|
|
206
207
|
i18n,
|
|
207
208
|
strategy,
|
|
208
209
|
safelist,
|
|
210
|
+
component,
|
|
209
211
|
safelistColors,
|
|
210
212
|
defaultVariants,
|
|
211
213
|
compoundVariants,
|
|
@@ -215,13 +217,20 @@ function mergeConfigs({
|
|
|
215
217
|
|
|
216
218
|
for (let key in composedConfig) {
|
|
217
219
|
if (isGlobalConfig || isPropsConfig) {
|
|
218
|
-
if (key ===
|
|
219
|
-
config[key] = propsConfig[key] || globalConfig[key] || defaultConfig[key];
|
|
220
|
-
} else if (key === safelist || key === safelistColors) {
|
|
220
|
+
if (key === safelist || key === safelistColors) {
|
|
221
221
|
if (propsConfig[key]) {
|
|
222
222
|
// eslint-disable-next-line no-console
|
|
223
223
|
console.warn(`Passing '${key}' key in 'config' prop is not allowed.`);
|
|
224
224
|
}
|
|
225
|
+
} else if (key === component) {
|
|
226
|
+
config[key] = propsConfig[key] || defaultConfig[key];
|
|
227
|
+
|
|
228
|
+
if (globalConfig[key]) {
|
|
229
|
+
// eslint-disable-next-line no-console
|
|
230
|
+
console.warn(`Passing '${key}' key in 'config' prop or by global config is not allowed.`);
|
|
231
|
+
}
|
|
232
|
+
} else if (key === strategy) {
|
|
233
|
+
config[key] = propsConfig[key] || globalConfig[key] || defaultConfig[key];
|
|
225
234
|
} else if (key === defaultVariants) {
|
|
226
235
|
config[key] = { ...defaultConfig[key], ...globalConfig[key], ...propsConfig[key] };
|
|
227
236
|
} else if (key === compoundVariants) {
|
|
@@ -391,7 +400,8 @@ function getBaseClasses(value) {
|
|
|
391
400
|
*/
|
|
392
401
|
function getNestedComponent(value) {
|
|
393
402
|
const classes = getBaseClasses(value);
|
|
394
|
-
const
|
|
403
|
+
const component = value?.component || "";
|
|
404
|
+
const match = classes.match(nestedComponentRegEx) || component.match(nestedComponentRegEx);
|
|
395
405
|
|
|
396
406
|
return match ? match[1] : "";
|
|
397
407
|
}
|
package/package.json
CHANGED
|
@@ -130,12 +130,6 @@ export default /*tw*/ {
|
|
|
130
130
|
class: "bg-gray-800 bg-opacity-10 hover:bg-opacity-15 focus:bg-opacity-15 active:bg-opacity-20",
|
|
131
131
|
},
|
|
132
132
|
{ filled: true, variant: "thirdary", color: "white", class: "bg-gray-50" },
|
|
133
|
-
{ square: true, size: "2xs", class: "p-1" },
|
|
134
|
-
{ square: true, size: "xs", class: "p-1.5" },
|
|
135
|
-
{ square: true, size: "sm", class: "p-2" },
|
|
136
|
-
{ square: true, size: "md", class: "p-3" },
|
|
137
|
-
{ square: true, size: "lg", class: "p-3.5" },
|
|
138
|
-
{ square: true, size: "xl", class: "p-4" },
|
|
139
133
|
{ iconLeft: true, size: "2xs", class: "pl-1" },
|
|
140
134
|
{ iconLeft: true, size: "xs", class: "pl-1.5" },
|
|
141
135
|
{ iconLeft: true, size: "sm", class: "pl-2" },
|
|
@@ -148,6 +142,12 @@ export default /*tw*/ {
|
|
|
148
142
|
{ iconRight: true, size: "md", class: "pr-4" },
|
|
149
143
|
{ iconRight: true, size: "lg", class: "pr-5" },
|
|
150
144
|
{ iconRight: true, size: "xl", class: "pr-6" },
|
|
145
|
+
{ square: true, size: "2xs", class: "p-1" },
|
|
146
|
+
{ square: true, size: "xs", class: "p-1.5" },
|
|
147
|
+
{ square: true, size: "sm", class: "p-2" },
|
|
148
|
+
{ square: true, size: "md", class: "p-3" },
|
|
149
|
+
{ square: true, size: "lg", class: "p-3.5" },
|
|
150
|
+
{ square: true, size: "xl", class: "p-4" },
|
|
151
151
|
],
|
|
152
152
|
},
|
|
153
153
|
text: "whitespace-nowrap focus-visible:outline-none",
|
package/ui.button/index.vue
CHANGED
|
@@ -27,7 +27,13 @@
|
|
|
27
27
|
:icon-size="iconSize"
|
|
28
28
|
:icon-color="componentColor"
|
|
29
29
|
>
|
|
30
|
-
<UIcon
|
|
30
|
+
<UIcon
|
|
31
|
+
v-if="iconLeft"
|
|
32
|
+
:name="iconLeft"
|
|
33
|
+
:size="iconSize"
|
|
34
|
+
:color="componentColor"
|
|
35
|
+
internal
|
|
36
|
+
/>
|
|
31
37
|
</slot>
|
|
32
38
|
</div>
|
|
33
39
|
|
|
@@ -59,7 +65,13 @@
|
|
|
59
65
|
:icon-size="iconSize"
|
|
60
66
|
:icon-color="componentColor"
|
|
61
67
|
>
|
|
62
|
-
<UIcon
|
|
68
|
+
<UIcon
|
|
69
|
+
v-if="iconRight"
|
|
70
|
+
:name="iconRight"
|
|
71
|
+
:size="iconSize"
|
|
72
|
+
:color="componentColor"
|
|
73
|
+
internal
|
|
74
|
+
/>
|
|
63
75
|
</slot>
|
|
64
76
|
</div>
|
|
65
77
|
</template>
|
|
@@ -4,34 +4,26 @@ export default /*tw*/ {
|
|
|
4
4
|
base: "flex flex-wrap",
|
|
5
5
|
variants: {
|
|
6
6
|
size: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
lg: "gap-3",
|
|
11
|
-
xl: "gap-4",
|
|
7
|
+
sm: "gap-2 mt-px",
|
|
8
|
+
md: "gap-3 mt-0.5",
|
|
9
|
+
lg: "gap-3 mt-1",
|
|
12
10
|
},
|
|
13
11
|
},
|
|
14
12
|
},
|
|
15
|
-
radio: {
|
|
16
|
-
radio: "{URadio} cursor-pointer bg-{color}-500 border-{color}-500 hover:border-{color}-500",
|
|
17
|
-
},
|
|
18
13
|
unselected: "relative flex",
|
|
19
|
-
unselectedRadio: {
|
|
20
|
-
radio: {
|
|
21
|
-
base: "{URadio}",
|
|
22
|
-
compoundVariants: [
|
|
23
|
-
{
|
|
24
|
-
color: "grayscale",
|
|
25
|
-
class: "text-white !border-gray-300 hover:!border-gray-400 focus:!border-gray-400 active:!border-gray-500",
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
14
|
unselectedIcon: "{UIcon} absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
31
15
|
unselectedIconName: "close",
|
|
16
|
+
unselectedRadio: {
|
|
17
|
+
component: "{URadio}",
|
|
18
|
+
radio: "!text-white !border-gray-300 hover:!border-gray-400 focus:!border-gray-400 active:!border-gray-500",
|
|
19
|
+
},
|
|
20
|
+
radio: {
|
|
21
|
+
component: "{URadio}",
|
|
22
|
+
radio: "bg-{color}-500 border-{color}-500 hover:border-{color}-500",
|
|
23
|
+
},
|
|
32
24
|
defaultVariants: {
|
|
33
|
-
name: "UColorPicker",
|
|
34
25
|
size: "md",
|
|
26
|
+
name: "colorPicker",
|
|
35
27
|
disabled: false,
|
|
36
28
|
colorOptions: [
|
|
37
29
|
"red",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
:id="id"
|
|
16
16
|
:name="name"
|
|
17
17
|
:size="size"
|
|
18
|
-
color="
|
|
18
|
+
color="gray"
|
|
19
19
|
:checked="selectedItem === ''"
|
|
20
20
|
:disabled="disabled"
|
|
21
21
|
v-bind="unselectedRadioAttrs"
|
|
@@ -108,7 +108,7 @@ const props = defineProps({
|
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
110
|
* Color picker size.
|
|
111
|
-
* @values
|
|
111
|
+
* @values sm, md, lg
|
|
112
112
|
*/
|
|
113
113
|
size: {
|
|
114
114
|
type: String,
|
|
@@ -42,15 +42,6 @@ export default function useAttrs(props, { isShownMenu, isTop, isRight }) {
|
|
|
42
42
|
}));
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
if (key === "input") {
|
|
46
|
-
const inputAttrs = attrs[`${key}Attrs`];
|
|
47
|
-
|
|
48
|
-
attrs[`${key}Attrs`] = computed(() => ({
|
|
49
|
-
...inputAttrs.value,
|
|
50
|
-
class: cx([inputAttrs.value.class, isShownMenu.value && config.value.inputFocus]),
|
|
51
|
-
}));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
45
|
if (key === "buttonWrapper") {
|
|
55
46
|
const buttonWrapperAttrs = attrs[`${key}Attrs`];
|
|
56
47
|
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
2
|
wrapper: "relative",
|
|
3
3
|
input: "{UInput}",
|
|
4
|
-
inputFocus: {
|
|
5
|
-
block: "ring-4 ring-brand-700 ring-opacity-20 border-brand-500 hover:border-brand-500",
|
|
6
|
-
},
|
|
7
4
|
buttonWrapper: `
|
|
8
5
|
flex rounded-lg max-md:justify-between
|
|
9
6
|
focus-within:ring-4 focus-within:ring-brand-700 focus-within:ring-opacity-20
|
|
10
7
|
`,
|
|
11
|
-
button: "{UButton} shrink-0 grow rounded-none
|
|
8
|
+
button: "{UButton} shrink-0 grow rounded-none !ring-0",
|
|
12
9
|
buttonActive: "ring-0",
|
|
13
10
|
buttonWrapperActive: "ring-4 ring-brand-700 ring-opacity-20",
|
|
14
11
|
shiftRangeButton: "focus:ring-0 last:rounded-l-none last:rounded-r-lg first:rounded-l-lg first:rounded-r-none",
|
|
12
|
+
nextIconName: "keyboard_arrow_right",
|
|
13
|
+
prevIconName: "keyboard_arrow_left",
|
|
15
14
|
menu: {
|
|
16
15
|
base: "absolute z-40 my-2 w-80 overflow-hidden rounded-lg border border-brand-300 bg-white p-2 shadow focus:outline-none",
|
|
17
16
|
variants: {
|
|
@@ -33,19 +32,12 @@ export default /*tw*/ {
|
|
|
33
32
|
leaveToClass: "opacity-0 scale-95",
|
|
34
33
|
},
|
|
35
34
|
periodsRow: "mb-1 flex min-w-64 gap-1",
|
|
36
|
-
periodButton:
|
|
37
|
-
{UButton} h-[3.125rem] w-full flex flex-col items-center justify-center
|
|
38
|
-
[&_span]:block [&_span]:font-normal [&_span]:text-brand-500
|
|
39
|
-
`,
|
|
40
|
-
periodButtonIcon: "{UIcon}",
|
|
35
|
+
periodButton: "{UButton} h-[3.125rem] w-full !ring-0",
|
|
41
36
|
periodButtonIconName: "apps",
|
|
42
|
-
periodButtonActive: "bg-
|
|
37
|
+
periodButtonActive: "!bg-opacity-20",
|
|
43
38
|
rangeSwitchWrapper: "flex items-center justify-between py-2",
|
|
39
|
+
rangeSwitchButton: "{UButton}",
|
|
44
40
|
rangeSwitchTitle: "font-medium text-sm",
|
|
45
|
-
nextIcon: "{UIcon}",
|
|
46
|
-
nextIconName: "keyboard_arrow_right",
|
|
47
|
-
prevIcon: "{UIcon}",
|
|
48
|
-
prevIconName: "keyboard_arrow_left",
|
|
49
41
|
periodDateList: "",
|
|
50
42
|
periodDateMonthList: "grid grid-cols-3 grid-rows-1 gap-0.5",
|
|
51
43
|
periodDateWeekList: "",
|
|
@@ -53,25 +45,24 @@ export default /*tw*/ {
|
|
|
53
45
|
periodDateQuarterList: "",
|
|
54
46
|
periodDate: "w-full",
|
|
55
47
|
periodDateActive: "bg-gray-100",
|
|
56
|
-
rangeInputWrapper: "flex mt-4",
|
|
48
|
+
rangeInputWrapper: "flex mt-4 -space-x-px",
|
|
57
49
|
rangeInput: {
|
|
58
|
-
|
|
50
|
+
component: "{UInput}",
|
|
59
51
|
label: {
|
|
60
|
-
|
|
52
|
+
component: "{ULabel}",
|
|
53
|
+
wrapper: "group/range-input-wrapper w-full hover:z-10 focus:z-10",
|
|
61
54
|
description: "hidden",
|
|
62
55
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
},
|
|
56
|
+
block: `
|
|
57
|
+
focus-within:z-10 focus-within:ring-0
|
|
58
|
+
group-first/range-input-wrapper:rounded-r-none group-last/range-input-wrapper:rounded-l-none
|
|
59
|
+
`,
|
|
60
|
+
input: "group-first/range-input-wrapper:rounded-r-none group-last/range-input-wrapper:rounded-l-none",
|
|
71
61
|
},
|
|
72
|
-
inputRangeError: "text-xs font-normal
|
|
62
|
+
inputRangeError: "text-xs font-normal leading-none mt-2 text-center text-red-500",
|
|
73
63
|
calendar: {
|
|
74
|
-
|
|
64
|
+
component: "{UCalendar}",
|
|
65
|
+
wrapper: "p-0 mt-2 w-full border-none shadow-none",
|
|
75
66
|
navigation: "mb-0 border-none",
|
|
76
67
|
navigationSwitchViewButton: "rounded-lg px-3",
|
|
77
68
|
day: "w-full h-10 mb-0.5",
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
:id="id"
|
|
6
6
|
ref="inputRef"
|
|
7
7
|
v-model="userFormatDate"
|
|
8
|
+
:size="size"
|
|
8
9
|
:label="label"
|
|
10
|
+
:disabled="disabled"
|
|
9
11
|
:placeholder="placeholder"
|
|
10
|
-
:error="error"
|
|
11
12
|
:description="description"
|
|
13
|
+
:error="error"
|
|
12
14
|
readonly
|
|
13
|
-
:disabled="disabled"
|
|
14
|
-
:size="size"
|
|
15
15
|
v-bind="inputAttrs"
|
|
16
16
|
@focus="activate"
|
|
17
17
|
>
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
<slot name="left" />
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
|
-
<template #right
|
|
23
|
-
<slot name="right
|
|
22
|
+
<template #icon-right>
|
|
23
|
+
<slot name="icon-right" />
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<template #right>
|
|
@@ -36,21 +36,20 @@
|
|
|
36
36
|
:disabled="disabled"
|
|
37
37
|
variant="thirdary"
|
|
38
38
|
filled
|
|
39
|
+
:icon-left="config.prevIconName"
|
|
39
40
|
v-bind="shiftRangeButtonAttrs"
|
|
40
41
|
@click="onClickShiftRange('prev')"
|
|
41
|
-
|
|
42
|
-
<UIcon internal interactive size="sm" :name="config.prevIconName" v-bind="prevIconAttrs" />
|
|
43
|
-
</UButton>
|
|
42
|
+
/>
|
|
44
43
|
|
|
45
44
|
<UButton
|
|
46
45
|
:id="id"
|
|
47
46
|
ref="buttonRef"
|
|
48
47
|
square
|
|
48
|
+
filled
|
|
49
49
|
:size="size"
|
|
50
50
|
:disabled="disabled"
|
|
51
51
|
:label="userFormatDate"
|
|
52
52
|
variant="thirdary"
|
|
53
|
-
filled
|
|
54
53
|
v-bind="buttonAttrs"
|
|
55
54
|
@click="activate"
|
|
56
55
|
/>
|
|
@@ -58,15 +57,14 @@
|
|
|
58
57
|
<UButton
|
|
59
58
|
ref="buttonNextRef"
|
|
60
59
|
square
|
|
60
|
+
filled
|
|
61
61
|
:size="size"
|
|
62
62
|
:disabled="disabled"
|
|
63
63
|
variant="thirdary"
|
|
64
|
-
|
|
64
|
+
:icon-left="config.nextIconName"
|
|
65
65
|
v-bind="shiftRangeButtonAttrs"
|
|
66
66
|
@click="onClickShiftRange('next')"
|
|
67
|
-
|
|
68
|
-
<UIcon internal interactive size="sm" :name="config.nextIconName" v-bind="nextIconAttrs" />
|
|
69
|
-
</UButton>
|
|
67
|
+
/>
|
|
70
68
|
</div>
|
|
71
69
|
|
|
72
70
|
<Transition v-bind="config.menuTransition">
|
|
@@ -82,12 +80,11 @@
|
|
|
82
80
|
<UButton
|
|
83
81
|
v-for="periodButton in periods"
|
|
84
82
|
:key="periodButton.name"
|
|
85
|
-
:label="periodButton.title"
|
|
86
|
-
variant="thirdary"
|
|
87
|
-
size="xs"
|
|
88
83
|
square
|
|
89
84
|
filled
|
|
90
|
-
|
|
85
|
+
size="xs"
|
|
86
|
+
variant="thirdary"
|
|
87
|
+
:label="periodButton.title"
|
|
91
88
|
v-bind="periodButtonAttrs(getPeriodButtonsClasses(periodButton.name))"
|
|
92
89
|
@click="onClickPeriodButton(periodButton.name)"
|
|
93
90
|
/>
|
|
@@ -96,9 +93,10 @@
|
|
|
96
93
|
<div v-bind="periodsRowAttrs">
|
|
97
94
|
<UButton
|
|
98
95
|
v-if="customRangeButton.range.to && customRangeButton.range.from"
|
|
99
|
-
|
|
96
|
+
square
|
|
100
97
|
filled
|
|
101
|
-
|
|
98
|
+
size="xs"
|
|
99
|
+
variant="thirdary"
|
|
102
100
|
v-bind="periodButtonAttrs(getPeriodButtonsClasses(PERIOD.custom))"
|
|
103
101
|
@click="onClickCustomRangeButton"
|
|
104
102
|
>
|
|
@@ -107,62 +105,51 @@
|
|
|
107
105
|
</UButton>
|
|
108
106
|
|
|
109
107
|
<UButton
|
|
110
|
-
|
|
111
|
-
size="xs"
|
|
108
|
+
square
|
|
112
109
|
filled
|
|
113
|
-
|
|
110
|
+
size="xs"
|
|
111
|
+
variant="thirdary"
|
|
112
|
+
:label="locale.ownRange"
|
|
113
|
+
:icon-left="config.periodButtonIconName"
|
|
114
114
|
v-bind="periodButtonAttrs(getPeriodButtonsClasses(PERIOD.ownRange))"
|
|
115
115
|
@click="onClickOwnRange"
|
|
116
|
-
|
|
117
|
-
<UIcon
|
|
118
|
-
internal
|
|
119
|
-
:name="config.periodButtonIconName"
|
|
120
|
-
size="xs"
|
|
121
|
-
v-bind="periodButtonIconAttrs"
|
|
122
|
-
/>
|
|
123
|
-
{{ locale.ownRange }}
|
|
124
|
-
</UButton>
|
|
116
|
+
/>
|
|
125
117
|
</div>
|
|
126
118
|
|
|
127
119
|
<template v-if="!isPeriod.ownRange && !isPeriod.custom">
|
|
128
120
|
<div v-bind="rangeSwitchWrapperAttrs">
|
|
129
|
-
<UButton
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
/>
|
|
139
|
-
</UButton>
|
|
121
|
+
<UButton
|
|
122
|
+
square
|
|
123
|
+
size="xs"
|
|
124
|
+
color="gray"
|
|
125
|
+
variant="thirdary"
|
|
126
|
+
:icon-left="config.prevIconName"
|
|
127
|
+
v-bind="rangeSwitchButtonAttrs"
|
|
128
|
+
@click="onClickShiftDatesList('prev')"
|
|
129
|
+
/>
|
|
140
130
|
|
|
141
131
|
<div v-bind="rangeSwitchTitleAttrs">
|
|
142
132
|
{{ rangeSwitchTitle }}
|
|
143
133
|
</div>
|
|
144
134
|
|
|
145
|
-
<UButton
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
/>
|
|
155
|
-
</UButton>
|
|
135
|
+
<UButton
|
|
136
|
+
square
|
|
137
|
+
size="xs"
|
|
138
|
+
color="gray"
|
|
139
|
+
variant="thirdary"
|
|
140
|
+
:icon-left="config.nextIconName"
|
|
141
|
+
v-bind="rangeSwitchButtonAttrs"
|
|
142
|
+
@click="onClickShiftDatesList('next')"
|
|
143
|
+
/>
|
|
156
144
|
</div>
|
|
157
145
|
|
|
158
146
|
<div v-bind="periodDateListAttrs(getPeriodDateListClasses())">
|
|
159
147
|
<UButton
|
|
160
148
|
v-for="date in periodDateList"
|
|
161
149
|
:key="date.title"
|
|
162
|
-
:disabled="isDatePeriodOutOfRange(date)"
|
|
163
|
-
variant="thirdary"
|
|
164
|
-
color="brand"
|
|
165
150
|
size="sm"
|
|
151
|
+
variant="thirdary"
|
|
152
|
+
:disabled="isDatePeriodOutOfRange(date)"
|
|
166
153
|
v-bind="periodDateAttrs(getPeriodDateClasses(date))"
|
|
167
154
|
:label="String(date.title)"
|
|
168
155
|
@click="selectDate(date), toggleMenu()"
|
|
@@ -175,7 +162,7 @@
|
|
|
175
162
|
ref="rangeInputStartRef"
|
|
176
163
|
v-model="rangeStart"
|
|
177
164
|
:error="inputRangeFromError"
|
|
178
|
-
size="
|
|
165
|
+
size="md"
|
|
179
166
|
v-bind="rangeInputAttrs"
|
|
180
167
|
:name="rangeInputName"
|
|
181
168
|
@input="onInputRangeInput($event, INPUT_RANGE_TYPE.start)"
|
|
@@ -185,14 +172,14 @@
|
|
|
185
172
|
ref="rangeInputEndRef"
|
|
186
173
|
v-model="rangeEnd"
|
|
187
174
|
:error="inputRangeToError"
|
|
188
|
-
size="
|
|
175
|
+
size="md"
|
|
189
176
|
v-bind="rangeInputAttrs"
|
|
190
177
|
:name="rangeInputName"
|
|
191
178
|
@input="onInputRangeInput($event, INPUT_RANGE_TYPE.end)"
|
|
192
179
|
/>
|
|
193
180
|
</div>
|
|
194
181
|
|
|
195
|
-
<div v-bind="inputRangeErrorAttrs">
|
|
182
|
+
<div v-if="inputRangeToError || inputRangeFromError" v-bind="inputRangeErrorAttrs">
|
|
196
183
|
{{ inputRangeToError || inputRangeFromError }}
|
|
197
184
|
</div>
|
|
198
185
|
|
|
@@ -216,7 +203,6 @@
|
|
|
216
203
|
import { computed, watch, ref, nextTick } from "vue";
|
|
217
204
|
import { merge } from "lodash-es";
|
|
218
205
|
|
|
219
|
-
import UIcon from "../ui.image-icon";
|
|
220
206
|
import UInput from "../ui.form-input";
|
|
221
207
|
import UButton from "../ui.button";
|
|
222
208
|
import UCalendar from "../ui.form-calendar";
|
|
@@ -469,12 +455,10 @@ const {
|
|
|
469
455
|
menuAttrs,
|
|
470
456
|
periodsRowAttrs,
|
|
471
457
|
periodButtonAttrs,
|
|
472
|
-
periodButtonIconAttrs,
|
|
473
|
-
rangeSwitchWrapperAttrs,
|
|
474
|
-
nextIconAttrs,
|
|
475
|
-
prevIconAttrs,
|
|
476
458
|
periodDateAttrs,
|
|
477
459
|
periodDateListAttrs,
|
|
460
|
+
rangeSwitchWrapperAttrs,
|
|
461
|
+
rangeSwitchButtonAttrs,
|
|
478
462
|
rangeSwitchTitleAttrs,
|
|
479
463
|
buttonWrapperAttrs,
|
|
480
464
|
buttonAttrs,
|
|
@@ -22,7 +22,7 @@ export default /*tw*/ {
|
|
|
22
22
|
},
|
|
23
23
|
error: {
|
|
24
24
|
true: `
|
|
25
|
-
|
|
25
|
+
border-red-300
|
|
26
26
|
hover:border-red-400 hover:focus-within:border-red-500
|
|
27
27
|
focus-within:border-red-500 focus-within:ring-red-100
|
|
28
28
|
`,
|
|
@@ -47,7 +47,7 @@ export default /*tw*/ {
|
|
|
47
47
|
},
|
|
48
48
|
error: {
|
|
49
49
|
true: `
|
|
50
|
-
bg-red-50
|
|
50
|
+
bg-red-50 hover:border-red-400 focus:border-red-500 focus:ring-red-100
|
|
51
51
|
focus-within:border-red-500 focus-within:ring-red-100
|
|
52
52
|
`,
|
|
53
53
|
},
|
package/ui.form-input/index.vue
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
@binding {string} icon-size
|
|
24
24
|
-->
|
|
25
25
|
<slot name="icon-left" :icon-name="iconLeft" :icon-size="iconSize">
|
|
26
|
-
<UIcon v-if="iconLeft" :name="iconLeft" :size="iconSize" />
|
|
26
|
+
<UIcon v-if="iconLeft" :name="iconLeft" :size="iconSize" internal />
|
|
27
27
|
</slot>
|
|
28
28
|
</span>
|
|
29
29
|
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
@binding {string} icon-size
|
|
78
78
|
-->
|
|
79
79
|
<slot name="icon-right" :icon-name="iconLeft" :icon-size="iconSize">
|
|
80
|
-
<UIcon v-if="iconRight" :name="iconRight" :size="iconSize" />
|
|
80
|
+
<UIcon v-if="iconRight" :name="iconRight" :size="iconSize" internal />
|
|
81
81
|
</slot>
|
|
82
82
|
</span>
|
|
83
83
|
</label>
|
package/ui.form-radio/index.vue
CHANGED
|
@@ -100,7 +100,7 @@ const props = defineProps({
|
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
* Radio color.
|
|
103
|
-
* @values brand, grayscale, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose
|
|
103
|
+
* @values brand, grayscale, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose
|
|
104
104
|
*/
|
|
105
105
|
color: {
|
|
106
106
|
type: String,
|
package/ui.form-select/index.vue
CHANGED
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
@binding {string} icon-size
|
|
86
86
|
-->
|
|
87
87
|
<slot name="icon-left" :icon-name="iconLeft" :icon-size="iconSize">
|
|
88
|
-
<UIcon v-if="iconLeft" :name="iconLeft" :size="iconSize" />
|
|
88
|
+
<UIcon v-if="iconLeft" :name="iconLeft" :size="iconSize" internal />
|
|
89
89
|
</slot>
|
|
90
90
|
</span>
|
|
91
91
|
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
@binding {string} icon-size
|
|
197
197
|
-->
|
|
198
198
|
<slot name="icon-right" :icon-name="iconRight" :icon-size="iconSize">
|
|
199
|
-
<UIcon v-if="iconRight" :name="iconRight" :size="iconSize" />
|
|
199
|
+
<UIcon v-if="iconRight" :name="iconRight" :size="iconSize" internal />
|
|
200
200
|
</slot>
|
|
201
201
|
</span>
|
|
202
202
|
</div>
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.220",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -1681,7 +1681,7 @@
|
|
|
1681
1681
|
"kind": "expression",
|
|
1682
1682
|
"type": "string"
|
|
1683
1683
|
},
|
|
1684
|
-
"default": "
|
|
1684
|
+
"default": "colorPicker"
|
|
1685
1685
|
},
|
|
1686
1686
|
{
|
|
1687
1687
|
"name": "label",
|
|
@@ -1715,7 +1715,7 @@
|
|
|
1715
1715
|
"description": "Color picker size.",
|
|
1716
1716
|
"value": {
|
|
1717
1717
|
"kind": "expression",
|
|
1718
|
-
"type": "'
|
|
1718
|
+
"type": "'sm' | 'md' | 'lg'"
|
|
1719
1719
|
},
|
|
1720
1720
|
"default": "md"
|
|
1721
1721
|
},
|
|
@@ -2349,7 +2349,7 @@
|
|
|
2349
2349
|
"name": "left"
|
|
2350
2350
|
},
|
|
2351
2351
|
{
|
|
2352
|
-
"name": "right
|
|
2352
|
+
"name": "icon-right"
|
|
2353
2353
|
},
|
|
2354
2354
|
{
|
|
2355
2355
|
"name": "right"
|
|
@@ -6499,7 +6499,7 @@
|
|
|
6499
6499
|
"description": "Radio color.",
|
|
6500
6500
|
"value": {
|
|
6501
6501
|
"kind": "expression",
|
|
6502
|
-
"type": "'brand' | 'grayscale' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose'"
|
|
6502
|
+
"type": "'brand' | 'grayscale' | 'gray' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose'"
|
|
6503
6503
|
},
|
|
6504
6504
|
"default": "brand"
|
|
6505
6505
|
},
|