vueless 0.0.258 → 0.0.259
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 +1 -1
- package/package.json +1 -1
- package/ui.button/configs/default.config.js +10 -15
- package/ui.button-link/configs/default.config.js +15 -7
- package/ui.button-toggle/configs/default.config.js +4 -2
- package/ui.button-toggle-item/configs/default.config.js +4 -7
- package/ui.button-toggle-item/index.vue +3 -2
- package/ui.container-modal/configs/default.config.js +1 -1
- package/ui.data-list/configs/default.config.js +1 -1
- package/ui.form-date-picker-range/configs/default.config.js +1 -1
- package/ui.form-date-picker-range/index.vue +6 -6
- package/ui.form-input-search/configs/default.config.js +2 -9
- package/ui.form-input-search/index.vue +11 -0
- package/ui.form-switch/configs/default.config.js +3 -3
- package/ui.image-icon/configs/default.config.js +1 -1
- package/web-types.json +1 -1
package/composable.ui/index.js
CHANGED
|
@@ -89,7 +89,7 @@ export default function useUI(defaultConfig = {}, propsConfigGetter = null, topL
|
|
|
89
89
|
const isTopLevelClassKey = configKey === (topLevelClassKey || firstClassKey);
|
|
90
90
|
const attrClass = isTopLevelClassKey && !nestedComponent ? attrs.class : "";
|
|
91
91
|
|
|
92
|
-
// TODO: remove `getBaseClasses(configKeyValue)` after migration to
|
|
92
|
+
// TODO: remove `getBaseClasses(configKeyValue)` after migration of all composables to the new logic
|
|
93
93
|
vuelessAttrs.value = {
|
|
94
94
|
...commonAttrs,
|
|
95
95
|
class: cx([
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export default /*tw*/ {
|
|
|
6
6
|
border border-solid transition
|
|
7
7
|
focus:ring-{color}-700/15 focus:ring-dynamic focus:ring-offset-dynamic
|
|
8
8
|
focus-within:ring-{color}-700/15 focus-within:ring-dynamic focus-within:ring-offset-dynamic
|
|
9
|
-
disabled:ring-0 disabled:cursor-
|
|
9
|
+
disabled:ring-0 disabled:cursor-not-allowed
|
|
10
10
|
`,
|
|
11
11
|
variants: {
|
|
12
12
|
size: {
|
|
@@ -36,15 +36,15 @@ export default /*tw*/ {
|
|
|
36
36
|
thirdary: `
|
|
37
37
|
border-transparent
|
|
38
38
|
text-{color}-600
|
|
39
|
-
hover:text-{color}-700 hover:bg-{color}-700
|
|
40
|
-
focus:text-{color}-700 focus:bg-{color}-700
|
|
41
|
-
active:text-{color}-800 active:bg-{color}-800
|
|
39
|
+
hover:text-{color}-700 hover:bg-{color}-700/10
|
|
40
|
+
focus:text-{color}-700 focus:bg-{color}-700/10
|
|
41
|
+
active:text-{color}-800 active:bg-{color}-800/15
|
|
42
42
|
disabled:text-{color}-300
|
|
43
43
|
`,
|
|
44
44
|
},
|
|
45
45
|
color: {
|
|
46
46
|
grayscale: "focus:ring-gray-700/15 focus-within:ring-gray-700/15 disabled:text-gray-400",
|
|
47
|
-
white: "focus:ring-gray-
|
|
47
|
+
white: "focus:ring-gray-700/15 focus-within:ring-gray-700/15 disabled:text-gray-400",
|
|
48
48
|
},
|
|
49
49
|
loading: {
|
|
50
50
|
true: "pointer-events-none gap-0",
|
|
@@ -88,9 +88,9 @@ export default /*tw*/ {
|
|
|
88
88
|
variant: "thirdary",
|
|
89
89
|
class: `
|
|
90
90
|
text-gray-900
|
|
91
|
-
hover:text-gray-800 hover:bg-gray-800
|
|
92
|
-
focus:text-gray-800 focus:bg-gray-800
|
|
93
|
-
active:text-gray-700 active:bg-gray-700
|
|
91
|
+
hover:text-gray-800 hover:bg-gray-800/15
|
|
92
|
+
focus:text-gray-800 focus:bg-gray-800/15
|
|
93
|
+
active:text-gray-700 active:bg-gray-700/20
|
|
94
94
|
disabled:bg-transparent
|
|
95
95
|
`,
|
|
96
96
|
},
|
|
@@ -125,13 +125,8 @@ export default /*tw*/ {
|
|
|
125
125
|
disabled:bg-transparent
|
|
126
126
|
`,
|
|
127
127
|
},
|
|
128
|
-
{ filled: true, variant: "thirdary", class: "bg-{color}-700
|
|
129
|
-
{
|
|
130
|
-
filled: true,
|
|
131
|
-
variant: "thirdary",
|
|
132
|
-
color: "grayscale",
|
|
133
|
-
class: "bg-gray-800 bg-opacity-10 hover:bg-opacity-15 focus:bg-opacity-15 active:bg-opacity-20",
|
|
134
|
-
},
|
|
128
|
+
{ filled: true, variant: "thirdary", class: "bg-{color}-700/10" },
|
|
129
|
+
{ filled: true, variant: "thirdary", color: "grayscale", class: "bg-gray-900/10" },
|
|
135
130
|
{ filled: true, variant: "thirdary", color: "white", class: "bg-gray-50" },
|
|
136
131
|
{ iconLeft: true, size: "2xs", class: "pl-1" },
|
|
137
132
|
{ iconLeft: true, size: "xs", class: "pl-2" },
|
|
@@ -2,7 +2,7 @@ export default /*tw*/ {
|
|
|
2
2
|
wrapper: {
|
|
3
3
|
base: `
|
|
4
4
|
w-fit inline-flex rounded transition focus-visible:outline-none
|
|
5
|
-
focus-within:ring-dynamic focus-within:ring-offset-4 focus-within:ring-{color}-
|
|
5
|
+
focus-within:ring-dynamic focus-within:ring-offset-4 focus-within:ring-{color}-700/15
|
|
6
6
|
`,
|
|
7
7
|
variants: {
|
|
8
8
|
color: {
|
|
@@ -10,7 +10,7 @@ export default /*tw*/ {
|
|
|
10
10
|
white: "focus-within:ring-white/15",
|
|
11
11
|
},
|
|
12
12
|
disabled: {
|
|
13
|
-
true: "
|
|
13
|
+
true: "focus-within:ring-0 cursor-not-allowed",
|
|
14
14
|
},
|
|
15
15
|
block: {
|
|
16
16
|
true: "w-full",
|
|
@@ -23,10 +23,10 @@ export default /*tw*/ {
|
|
|
23
23
|
link: {
|
|
24
24
|
base: `
|
|
25
25
|
w-full inline-block cursor-pointer !leading-none transition
|
|
26
|
-
text-{color}-
|
|
27
|
-
hover:text-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
text-{color}-600 decoration-{color}-600 underline-offset-4
|
|
27
|
+
hover:text-{color}-700 hover:decoration-{color}-700
|
|
28
|
+
focus:text-{color}-700 focus:decoration-{color}-700 focus:ring-0 focus:ring-offset-0
|
|
29
|
+
active:text-{color}-800 active:decoration-{color}-800
|
|
30
30
|
`,
|
|
31
31
|
variants: {
|
|
32
32
|
size: {
|
|
@@ -40,12 +40,20 @@ export default /*tw*/ {
|
|
|
40
40
|
false: "no-underline",
|
|
41
41
|
},
|
|
42
42
|
color: {
|
|
43
|
-
grayscale:
|
|
43
|
+
grayscale: `
|
|
44
|
+
text-gray-900 decoration-gray-900
|
|
45
|
+
hover:text-gray-800 hover:decoration-gray-800
|
|
46
|
+
focus:text-gray-800 focus:decoration-gray-800
|
|
47
|
+
active:text-gray-700 active:decoration-gray-700
|
|
48
|
+
`,
|
|
44
49
|
white: "decoration-white text-white",
|
|
45
50
|
},
|
|
46
51
|
dashed: {
|
|
47
52
|
true: "hover:decoration-dashed decoration-dashed",
|
|
48
53
|
},
|
|
54
|
+
disabled: {
|
|
55
|
+
true: "text-gray-400 pointer-events-none",
|
|
56
|
+
},
|
|
49
57
|
},
|
|
50
58
|
},
|
|
51
59
|
text: "w-full",
|
|
@@ -9,7 +9,7 @@ export default /*tw*/ {
|
|
|
9
9
|
},
|
|
10
10
|
},
|
|
11
11
|
items: {
|
|
12
|
-
base: "
|
|
12
|
+
base: "",
|
|
13
13
|
variants: {
|
|
14
14
|
size: {
|
|
15
15
|
"2xs": "gap-1",
|
|
@@ -20,12 +20,14 @@ export default /*tw*/ {
|
|
|
20
20
|
xl: "gap-3",
|
|
21
21
|
},
|
|
22
22
|
separated: {
|
|
23
|
+
true: "flex flex-wrap",
|
|
23
24
|
false: `
|
|
24
|
-
flex-nowrap -space-x-px gap-0
|
|
25
|
+
flex flex-nowrap -space-x-px gap-0 rounded-dynamic transition w-fit
|
|
25
26
|
[&>:first-child]:rounded-dynamic [&>:first-child]:rounded-r-none
|
|
26
27
|
[&>:last-child]:rounded-dynamic [&>:last-child]:rounded-l-none
|
|
27
28
|
[&>:first-child>*>*]:rounded-dynamic [&>:first-child>*>*]:rounded-r-none
|
|
28
29
|
[&>:last-child>*>*]:rounded-dynamic [&>:last-child>*>*]:rounded-l-none
|
|
30
|
+
focus-within:ring-dynamic focus-within:ring-offset-dynamic focus-within:ring-brand-700/15
|
|
29
31
|
`,
|
|
30
32
|
},
|
|
31
33
|
},
|
|
@@ -14,11 +14,8 @@ export default /*tw*/ {
|
|
|
14
14
|
},
|
|
15
15
|
variant: {
|
|
16
16
|
thirdary: `
|
|
17
|
-
!text-gray-900 bg-brand-600
|
|
18
|
-
|
|
19
|
-
hover:border-transparent hover:bg-opacity-15
|
|
20
|
-
focus:border-transparent focus:bg-opacity-15
|
|
21
|
-
active:border-transparent active:bg-opacity-20
|
|
17
|
+
!text-gray-900 !border-transparent bg-brand-600/10
|
|
18
|
+
hover:bg-brand-600/15 focus:bg-brand-600/15 active:bg-brand-600/20
|
|
22
19
|
`,
|
|
23
20
|
},
|
|
24
21
|
},
|
|
@@ -35,12 +32,12 @@ export default /*tw*/ {
|
|
|
35
32
|
{
|
|
36
33
|
selected: true,
|
|
37
34
|
variant: "secondary",
|
|
38
|
-
class: "text-brand-600 border-brand-600 disabled:border-brand-600 bg-brand-600
|
|
35
|
+
class: "text-brand-600 border-brand-600 disabled:border-brand-600 bg-brand-600/10",
|
|
39
36
|
},
|
|
40
37
|
{
|
|
41
38
|
selected: true,
|
|
42
39
|
variant: "thirdary",
|
|
43
|
-
class: "bg-brand-600
|
|
40
|
+
class: "!bg-brand-600/20",
|
|
44
41
|
},
|
|
45
42
|
],
|
|
46
43
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<UButton
|
|
3
3
|
tabindex="0"
|
|
4
4
|
:for="id"
|
|
5
|
+
:no-ring="!getToggleSeparated()"
|
|
5
6
|
color="grayscale"
|
|
6
7
|
variant="secondary"
|
|
7
8
|
:label="label"
|
|
@@ -157,8 +158,8 @@ onMounted(() => {
|
|
|
157
158
|
});
|
|
158
159
|
|
|
159
160
|
function onClickSetValue() {
|
|
160
|
-
selectedItem.value = getToggleType() === TYPE_RADIO
|
|
161
|
-
? props.value
|
|
161
|
+
selectedItem.value = getToggleType() === TYPE_RADIO
|
|
162
|
+
? props.value
|
|
162
163
|
: selectedValue?.value?.includes(props.value) || selectedItem.value;
|
|
163
164
|
|
|
164
165
|
updateSelectedValue && updateSelectedValue(props.value, !selectedItem.value);
|
|
@@ -8,7 +8,7 @@ export default /*tw*/ {
|
|
|
8
8
|
leaveFromClass: "opacity-100 translate-y-0 transform sm:scale-100",
|
|
9
9
|
leaveToClass: "opacity-0 translate-y-4 sm:translate-y-0 transform sm:scale-95",
|
|
10
10
|
},
|
|
11
|
-
overlay: "fixed inset-0 z-40 bg-gray-900
|
|
11
|
+
overlay: "fixed inset-0 z-40 bg-gray-900/75",
|
|
12
12
|
overlayTransition: {
|
|
13
13
|
enterActiveClass: "ease-out duration-300",
|
|
14
14
|
enterFromClass: "opacity-0",
|
|
@@ -37,7 +37,7 @@ export default /*tw*/ {
|
|
|
37
37
|
periodsRow: "mb-1 flex min-w-64 gap-1",
|
|
38
38
|
periodButton: "{UButton} h-[3.125rem] w-full",
|
|
39
39
|
periodButtonIconName: "apps",
|
|
40
|
-
periodButtonActive: "!bg-
|
|
40
|
+
periodButtonActive: "!bg-gray-800/20",
|
|
41
41
|
rangeSwitchWrapper: "flex items-center justify-between py-2",
|
|
42
42
|
rangeSwitchButton: "{UButton}",
|
|
43
43
|
rangeSwitchTitle: "font-medium text-sm",
|
|
@@ -856,19 +856,19 @@ function onClickShiftDatesList(action) {
|
|
|
856
856
|
}
|
|
857
857
|
|
|
858
858
|
function getPeriodButtonsClasses(periodName) {
|
|
859
|
-
return period.value === periodName ?
|
|
859
|
+
return period.value === periodName ? config.value.periodButtonActive : "";
|
|
860
860
|
}
|
|
861
861
|
|
|
862
862
|
function getPeriodDateClasses(date) {
|
|
863
|
-
return localValue.value.from === date.startRange ?
|
|
863
|
+
return localValue.value.from === date.startRange ? config.value.periodDateActive : "";
|
|
864
864
|
}
|
|
865
865
|
|
|
866
866
|
function getPeriodDateListClasses() {
|
|
867
867
|
if (isPeriod.value.ownRange) return [];
|
|
868
|
-
if (isPeriod.value.week) return
|
|
869
|
-
if (isPeriod.value.month) return
|
|
870
|
-
if (isPeriod.value.quarter) return
|
|
871
|
-
if (isPeriod.value.year) return
|
|
868
|
+
if (isPeriod.value.week) return config.value.periodDateWeekList;
|
|
869
|
+
if (isPeriod.value.month) return config.value.periodDateMonthList;
|
|
870
|
+
if (isPeriod.value.quarter) return config.value.periodDateQuarterList;
|
|
871
|
+
if (isPeriod.value.year) return config.value.periodDateYearList;
|
|
872
872
|
}
|
|
873
873
|
|
|
874
874
|
function activate() {
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
input: {
|
|
3
|
-
|
|
4
|
-
wrapper: "relative flex items-center justify-between w-full rounded-dynamic bg-gray-900 bg-opacity-5",
|
|
5
|
-
input: "w-full",
|
|
6
|
-
label: "w-full",
|
|
7
|
-
rightSlot: "pr-0",
|
|
8
|
-
leftSlot: "pl-0",
|
|
9
|
-
},
|
|
10
|
-
clearIcon: "{UIcon} flex h-full items-center",
|
|
2
|
+
input: "{UInput}",
|
|
3
|
+
clearIcon: "{UIcon}",
|
|
11
4
|
clearIconName: "close",
|
|
12
5
|
searchIcon: "{UIcon}",
|
|
13
6
|
searchIconName: "search",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
<UButton
|
|
65
65
|
v-if="searchButtonLabel"
|
|
66
66
|
:label="searchButtonLabel"
|
|
67
|
+
:size="buttonSize"
|
|
67
68
|
no-ring
|
|
68
69
|
v-bind="buttonAttrs"
|
|
69
70
|
:data-cy="`${dataCy}-right`"
|
|
@@ -237,6 +238,16 @@ const iconSize = computed(() => {
|
|
|
237
238
|
return sizes[props.size];
|
|
238
239
|
});
|
|
239
240
|
|
|
241
|
+
const buttonSize = computed(() => {
|
|
242
|
+
const sizes = {
|
|
243
|
+
sm: "xs",
|
|
244
|
+
md: "md",
|
|
245
|
+
lg: "lg",
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
return sizes[props.size];
|
|
249
|
+
});
|
|
250
|
+
|
|
240
251
|
function onClickClear() {
|
|
241
252
|
search.value = "";
|
|
242
253
|
emit("clear");
|
|
@@ -20,9 +20,9 @@ export default /*tw*/ {
|
|
|
20
20
|
{ toggleLabel: true, size: "sm", class: "w-10" },
|
|
21
21
|
{ toggleLabel: true, size: "md", class: "w-12" },
|
|
22
22
|
{ toggleLabel: true, size: "lg", class: "w-14" },
|
|
23
|
-
{ disabled: true, checked:
|
|
24
|
-
{ disabled: true, checked:
|
|
25
|
-
{ color: "grayscale", checked: true, class: "bg-gray-900 ring-gray-700/15" },
|
|
23
|
+
{ disabled: true, checked: false, class: "bg-gray-300" },
|
|
24
|
+
{ disabled: true, checked: true, class: "bg-gray-400" },
|
|
25
|
+
{ color: "grayscale", disabled: false, checked: true, class: "bg-gray-900 ring-gray-700/15" },
|
|
26
26
|
],
|
|
27
27
|
},
|
|
28
28
|
input: "absolute size-0 opacity-0",
|