vueless 0.0.478-beta.3 → 0.0.479
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/composables/useBreakpoint.js +1 -1
- package/composables/useUI.js +1 -204
- package/constants.js +1 -2
- package/directives/clickOutside/vClickOutside.js +2 -2
- package/directives/tooltip/storybook/stories.js +5 -5
- package/{index.ts → index.js} +7 -10
- package/package.json +18 -28
- package/preset.tailwind.js +7 -16
- package/ui.button/config.js +0 -12
- package/ui.button/storybook/stories.js +2 -2
- package/ui.button-link/ULink.vue +1 -1
- package/ui.button-link/config.js +0 -9
- package/ui.button-link/storybook/stories.js +1 -1
- package/ui.button-toggle/storybook/stories.js +1 -1
- package/ui.container-divider/storybook/stories.js +1 -1
- package/ui.container-modal/storybook/stories.js +1 -1
- package/ui.container-modal-confirm/storybook/stories.js +1 -1
- package/ui.container-row/storybook/stories.js +1 -1
- package/ui.data-list/UDataList.vue +4 -4
- package/ui.data-table/UTable.vue +1 -1
- package/ui.dropdown-badge/config.js +0 -1
- package/ui.dropdown-badge/storybook/stories.js +1 -1
- package/ui.dropdown-button/config.js +0 -1
- package/ui.dropdown-button/storybook/stories.js +2 -2
- package/ui.dropdown-link/storybook/stories.js +1 -1
- package/ui.dropdown-list/storybook/stories.js +1 -1
- package/ui.form-checkbox/config.js +0 -9
- package/ui.form-checkbox/storybook/stories.js +1 -1
- package/ui.form-checkbox-group/storybook/stories.js +1 -1
- package/ui.form-checkbox-multi-state/storybook/stories.js +1 -1
- package/ui.form-color-picker/config.js +0 -7
- package/ui.form-color-picker/storybook/stories.js +1 -1
- package/ui.form-date-picker/storybook/stories.js +2 -2
- package/ui.form-date-picker-range/storybook/stories.js +1 -1
- package/ui.form-input/UInput.vue +1 -1
- package/ui.form-input/storybook/stories.js +1 -1
- package/ui.form-input-file/storybook/stories.js +1 -1
- package/ui.form-input-money/storybook/stories.js +1 -1
- package/ui.form-input-money/useFormatCurrency.js +1 -1
- package/ui.form-input-number/UInputNumber.vue +3 -4
- package/ui.form-input-number/storybook/stories.js +1 -1
- package/ui.form-input-rating/storybook/stories.js +1 -1
- package/ui.form-input-search/storybook/stories.js +1 -1
- package/ui.form-label/config.js +2 -2
- package/ui.form-label/storybook/stories.js +1 -1
- package/ui.form-radio/config.js +0 -6
- package/ui.form-radio-group/storybook/stories.js +1 -1
- package/ui.form-select/storybook/stories.js +1 -1
- package/ui.form-switch/config.js +0 -6
- package/ui.form-switch/storybook/stories.js +1 -1
- package/ui.form-textarea/storybook/stories.js +1 -1
- package/ui.image-avatar/config.js +0 -5
- package/ui.image-avatar/storybook/stories.js +1 -1
- package/ui.image-icon/UIcon.vue +14 -5
- package/ui.image-icon/config.js +0 -5
- package/ui.image-icon/storybook/stories.js +1 -1
- package/ui.loader/config.js +0 -1
- package/ui.loader/storybook/stories.js +1 -1
- package/ui.loader-overlay/config.js +0 -1
- package/ui.loader-progress/config.js +0 -1
- package/ui.loader-progress/storybook/stories.js +1 -1
- package/ui.navigation-progress/config.js +0 -9
- package/ui.navigation-progress/storybook/stories.js +1 -1
- package/ui.navigation-tabs/storybook/stories.js +1 -1
- package/ui.other-dot/config.js +0 -1
- package/ui.other-dot/storybook/stories.js +1 -1
- package/ui.text-alert/config.js +0 -7
- package/ui.text-alert/storybook/stories.js +1 -1
- package/ui.text-badge/config.js +0 -8
- package/ui.text-badge/storybook/stories.js +2 -10
- package/ui.text-block/UText.vue +62 -18
- package/ui.text-block/storybook/Docs.mdx +3 -3
- package/ui.text-block/storybook/{stories.ts → stories.js} +8 -13
- package/ui.text-block/useAttrs.js +15 -0
- package/ui.text-empty/storybook/stories.js +1 -1
- package/ui.text-file/UFile.vue +15 -12
- package/ui.text-file/config.js +2 -12
- package/ui.text-files/config.js +1 -1
- package/ui.text-header/config.js +0 -1
- package/ui.text-header/storybook/stories.js +1 -1
- package/ui.text-money/config.js +0 -1
- package/ui.text-money/storybook/stories.js +1 -1
- package/ui.text-money/utilMoney.js +2 -2
- package/{utilsTs/utilTheme.ts → utils/utilTheme.js} +27 -31
- package/utils/utilUI.js +205 -1
- package/web-types.json +9580 -0
- package/composablesTs/useAutoPosition.ts +0 -115
- package/composablesTs/useBreakpoint.ts +0 -106
- package/composablesTs/useLocale.ts +0 -25
- package/composablesTs/useMutationObserver.ts +0 -50
- package/composablesTs/useUI.ts +0 -557
- package/constants.ts +0 -73
- package/types.ts +0 -223
- package/ui.text-block/types.ts +0 -33
- package/ui.text-block/useAttrs.ts +0 -20
- package/utilsTs/utilHelper.ts +0 -68
- package/utilsTs/utilPlatform.ts +0 -53
- package/utilsTs/utilStorybook.ts +0 -296
- package/utilsTs/utilTailwind.ts +0 -38
- package/utilsTs/utilUI.ts +0 -143
- /package/ui.text-block/{config.ts → config.js} +0 -0
- /package/ui.text-block/{constants.ts → constants.js} +0 -0
|
@@ -51,13 +51,4 @@ export default /*tw*/ {
|
|
|
51
51
|
partiallyCheckedIcon: "remove",
|
|
52
52
|
checkedIcon: "check",
|
|
53
53
|
},
|
|
54
|
-
safelist: (colors) => [
|
|
55
|
-
{ pattern: `bg-(${colors})-600` },
|
|
56
|
-
{ pattern: `bg-(${colors})-700`, variants: ["hover"] },
|
|
57
|
-
{ pattern: `bg-(${colors})-800`, variants: ["active"] },
|
|
58
|
-
{ pattern: `border-(${colors})-500`, variants: ["focus"] },
|
|
59
|
-
{ pattern: `border-(${colors})-800`, variants: ["active"] },
|
|
60
|
-
{ pattern: `text-(${colors})-600`, variants: ["checked"] },
|
|
61
|
-
{ pattern: `ring-(${colors})-700`, variants: ["focus"] },
|
|
62
|
-
],
|
|
63
54
|
};
|
|
@@ -49,11 +49,4 @@ export default /*tw*/ {
|
|
|
49
49
|
/* icons */
|
|
50
50
|
unselectedIcon: "close",
|
|
51
51
|
},
|
|
52
|
-
safelist: (colors) => [
|
|
53
|
-
{ pattern: `bg-(${colors})-400`, variants: ["disabled"] },
|
|
54
|
-
{ pattern: `bg-(${colors})-600` },
|
|
55
|
-
{ pattern: `bg-(${colors})-800`, variants: ["active"] },
|
|
56
|
-
{ pattern: `border-(${colors})-400`, variants: ["disabled"] },
|
|
57
|
-
{ pattern: `border-(${colors})-600`, variants: ["hover"] },
|
|
58
|
-
],
|
|
59
52
|
};
|
|
@@ -45,7 +45,7 @@ const DefaultTemplate = (args) => ({
|
|
|
45
45
|
`,
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
-
const EnumVariantTemplate = (args, { argTypes }) => ({
|
|
48
|
+
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
49
49
|
components: { UDatePicker, URow },
|
|
50
50
|
setup() {
|
|
51
51
|
return {
|
|
@@ -57,7 +57,7 @@ const EnumVariantTemplate = (args, { argTypes }) => ({
|
|
|
57
57
|
<URow>
|
|
58
58
|
<UDatePicker
|
|
59
59
|
v-for="(option, index) in options"
|
|
60
|
-
open-direction-y="bottom"
|
|
60
|
+
open-direction-y="bottom"
|
|
61
61
|
:key="index"
|
|
62
62
|
v-bind="args"
|
|
63
63
|
:[args.enum]="option"
|
package/ui.form-input/UInput.vue
CHANGED
|
@@ -459,7 +459,7 @@ function setLabelPosition() {
|
|
|
459
459
|
return;
|
|
460
460
|
}
|
|
461
461
|
|
|
462
|
-
|
|
462
|
+
let leftSlotOrIconWidth = leftSlotWrapperRef.value.getBoundingClientRect().width;
|
|
463
463
|
|
|
464
464
|
const leftPaddingValue = parseFloat(getComputedStyle(inputRef.value).paddingLeft);
|
|
465
465
|
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
:error="error"
|
|
7
7
|
:size="size"
|
|
8
8
|
:align="labelAlign"
|
|
9
|
-
centred
|
|
10
|
-
v-bind="labelAttrs"
|
|
11
9
|
:data-test="dataTest"
|
|
10
|
+
v-bind="labelAttrs"
|
|
12
11
|
>
|
|
13
12
|
<UButton
|
|
14
13
|
variant="thirdary"
|
|
@@ -18,7 +17,6 @@
|
|
|
18
17
|
round
|
|
19
18
|
:disabled="isRemoveButtonDisabled || disabled"
|
|
20
19
|
v-bind="removeButtonAttrs"
|
|
21
|
-
:data-test="`${dataTest}-remove`"
|
|
22
20
|
@click="onClickRemove"
|
|
23
21
|
>
|
|
24
22
|
<UIcon
|
|
@@ -26,6 +24,7 @@
|
|
|
26
24
|
:size="size"
|
|
27
25
|
:name="config.defaults.removeIcon"
|
|
28
26
|
:color="isRemoveButtonDisabled ? 'gray' : 'grayscale'"
|
|
27
|
+
:data-test="`${dataTest}-remove`"
|
|
29
28
|
v-bind="removeIconAttrs"
|
|
30
29
|
/>
|
|
31
30
|
</UButton>
|
|
@@ -42,7 +41,6 @@
|
|
|
42
41
|
round
|
|
43
42
|
:disabled="isAddButtonDisabled || disabled"
|
|
44
43
|
v-bind="addButtonAttrs"
|
|
45
|
-
:data-test="`${dataTest}-add`"
|
|
46
44
|
@click="onClickAdd"
|
|
47
45
|
>
|
|
48
46
|
<UIcon
|
|
@@ -50,6 +48,7 @@
|
|
|
50
48
|
:size="size"
|
|
51
49
|
:name="config.defaults.addIcon"
|
|
52
50
|
:color="isAddButtonDisabled ? 'gray' : 'grayscale'"
|
|
51
|
+
:data-test="`${dataTest}-add`"
|
|
53
52
|
v-bind="addIconAttrs"
|
|
54
53
|
/>
|
|
55
54
|
</UButton>
|
package/ui.form-label/config.js
CHANGED
|
@@ -20,8 +20,8 @@ export default /*tw*/ {
|
|
|
20
20
|
{ align: "right", size: "sm", class: "gap-2.5" },
|
|
21
21
|
{ align: "right", size: "md", class: "gap-3" },
|
|
22
22
|
{ align: "right", size: "lg", class: "gap-3.5" },
|
|
23
|
-
{ align: "left", centred: true, class: "items-center
|
|
24
|
-
{ align: "right", centred: true, class: "items-center
|
|
23
|
+
{ align: "left", centred: true, class: "items-center w-auto" },
|
|
24
|
+
{ align: "right", centred: true, class: "items-center w-auto" },
|
|
25
25
|
],
|
|
26
26
|
},
|
|
27
27
|
content: {
|
|
@@ -38,7 +38,7 @@ const DefaultTemplate = (args) => ({
|
|
|
38
38
|
`,
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
const EnumVariantTemplate = (args, { argTypes }) => ({
|
|
41
|
+
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
42
42
|
components: { ULabel, UCol, UText },
|
|
43
43
|
setup() {
|
|
44
44
|
function getText(value, name) {
|
package/ui.form-radio/config.js
CHANGED
|
@@ -26,10 +26,4 @@ export default /*tw*/ {
|
|
|
26
26
|
checked: false,
|
|
27
27
|
disabled: false,
|
|
28
28
|
},
|
|
29
|
-
safelist: (colors) => [
|
|
30
|
-
{ pattern: `border-(${colors})-500`, variants: ["focus"] },
|
|
31
|
-
{ pattern: `border-(${colors})-800`, variants: ["active"] },
|
|
32
|
-
{ pattern: `text-(${colors})-600`, variants: ["checked"] },
|
|
33
|
-
{ pattern: `ring-(${colors})-700`, variants: ["focus"] },
|
|
34
|
-
],
|
|
35
29
|
};
|
package/ui.form-switch/config.js
CHANGED
|
@@ -79,10 +79,4 @@ export default /*tw*/ {
|
|
|
79
79
|
onIcon: "check",
|
|
80
80
|
offIcon: "close",
|
|
81
81
|
},
|
|
82
|
-
safelist: (colors) => [
|
|
83
|
-
{ pattern: `ring-(${colors})-700` },
|
|
84
|
-
{ pattern: `bg-(${colors})-600` },
|
|
85
|
-
{ pattern: `bg-(${colors})-700`, variants: ["hover"] },
|
|
86
|
-
{ pattern: `bg-(${colors})-800`, variants: ["active"] },
|
|
87
|
-
],
|
|
88
82
|
};
|
package/ui.image-icon/UIcon.vue
CHANGED
|
@@ -127,6 +127,12 @@ const emit = defineEmits([
|
|
|
127
127
|
const { config, iconAttrs } = useAttrs(props);
|
|
128
128
|
|
|
129
129
|
const generatedIcons = computed(() => {
|
|
130
|
+
if (isSSR) {
|
|
131
|
+
Object.entries(
|
|
132
|
+
import.meta.glob(`/assets/.vueless/icons/**/*.svg`, { eager: true, query: "?component" }),
|
|
133
|
+
) || [];
|
|
134
|
+
}
|
|
135
|
+
|
|
130
136
|
return (
|
|
131
137
|
Object.entries(
|
|
132
138
|
import.meta.glob(`../assets/icons/**/*.svg`, { eager: true, query: "?component" }),
|
|
@@ -157,14 +163,17 @@ const dynamicComponent = computed(() => {
|
|
|
157
163
|
if (!name) return "";
|
|
158
164
|
|
|
159
165
|
function getIcon(params) {
|
|
160
|
-
const [, component] =
|
|
161
|
-
|
|
162
|
-
|
|
166
|
+
const [, component] =
|
|
167
|
+
generatedIcons.value.find(([path]) =>
|
|
168
|
+
params.every(
|
|
169
|
+
(param) => (isFill || !path.includes(FILL_SUFFIX)) && path.includes(String(param)),
|
|
170
|
+
),
|
|
171
|
+
) || [];
|
|
163
172
|
|
|
164
173
|
return component;
|
|
165
174
|
}
|
|
166
175
|
|
|
167
|
-
/* eslint-disable prettier/prettier */
|
|
176
|
+
/* eslint-disable vue/max-len, prettier/prettier */
|
|
168
177
|
const libraries = {
|
|
169
178
|
"vueless": async () => {
|
|
170
179
|
return import.meta.env.PROD
|
|
@@ -197,7 +206,7 @@ const dynamicComponent = computed(() => {
|
|
|
197
206
|
: import(/* @vite-ignore */ `/node_modules/${library}/24/${fillType}/${name}.svg?component`);
|
|
198
207
|
},
|
|
199
208
|
};
|
|
200
|
-
/* eslint-enable prettier/prettier */
|
|
209
|
+
/* eslint-enable vue/max-len, prettier/prettier */
|
|
201
210
|
|
|
202
211
|
return defineAsyncComponent(libraries[library]);
|
|
203
212
|
});
|
package/ui.image-icon/config.js
CHANGED
package/ui.loader/config.js
CHANGED
|
@@ -40,7 +40,7 @@ const DefaultTemplate = (args) => ({
|
|
|
40
40
|
`,
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
const EnumVariantTemplate = (args, { argTypes }) => ({
|
|
43
|
+
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
44
44
|
components: { ULoaderProgress, UButton, UCol, URow, UBadge },
|
|
45
45
|
setup() {
|
|
46
46
|
return {
|
|
@@ -107,13 +107,4 @@ export default /*tw*/ {
|
|
|
107
107
|
variant: "progress",
|
|
108
108
|
indicator: false,
|
|
109
109
|
},
|
|
110
|
-
safelist: (colors) => [
|
|
111
|
-
{ pattern: `text-(${colors})-600` },
|
|
112
|
-
{ pattern: `text-(${colors})-100` },
|
|
113
|
-
{ pattern: `stroke-(${colors})-100` },
|
|
114
|
-
{
|
|
115
|
-
pattern: `bg-(${colors})-50`,
|
|
116
|
-
variants: ["[&::-webkit-progress-bar]", "[@supports(selector(&::-moz-progress-bar))]"],
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
110
|
};
|
package/ui.other-dot/config.js
CHANGED
package/ui.text-alert/config.js
CHANGED
|
@@ -54,11 +54,4 @@ export default /*tw*/ {
|
|
|
54
54
|
/* icons */
|
|
55
55
|
closeIcon: "close",
|
|
56
56
|
},
|
|
57
|
-
safelist: (colors) => [
|
|
58
|
-
{ pattern: `bg-(${colors})-50` },
|
|
59
|
-
{ pattern: `bg-(${colors})-600` },
|
|
60
|
-
{ pattern: `text-(${colors})-600` },
|
|
61
|
-
{ pattern: `border-(${colors})-100` },
|
|
62
|
-
{ pattern: `border-(${colors})-600` },
|
|
63
|
-
],
|
|
64
57
|
};
|
package/ui.text-badge/config.js
CHANGED
|
@@ -63,12 +63,4 @@ export default /*tw*/ {
|
|
|
63
63
|
round: false,
|
|
64
64
|
bordered: false,
|
|
65
65
|
},
|
|
66
|
-
safelist: (colors) => [
|
|
67
|
-
{ pattern: `bg-(${colors})-50` },
|
|
68
|
-
{ pattern: `bg-(${colors})-600` },
|
|
69
|
-
{ pattern: `border-(${colors})-100` },
|
|
70
|
-
{ pattern: `border-(${colors})-600` },
|
|
71
|
-
{ pattern: `text-(${colors})-600` },
|
|
72
|
-
{ pattern: `ring-(${colors})-700`, variants: ["focus", "focus-within"] },
|
|
73
|
-
],
|
|
74
66
|
};
|
|
@@ -34,7 +34,7 @@ const DefaultTemplate = (args) => ({
|
|
|
34
34
|
`,
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
const ColorsTemplate = (args, { argTypes }) => ({
|
|
37
|
+
const ColorsTemplate = (args, { argTypes } = {}) => ({
|
|
38
38
|
components: { UBadge, URow, UCol },
|
|
39
39
|
setup() {
|
|
40
40
|
return {
|
|
@@ -59,7 +59,7 @@ const ColorsTemplate = (args, { argTypes }) => ({
|
|
|
59
59
|
`,
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
-
const EnumVariantTemplate = (args, { argTypes }) => ({
|
|
62
|
+
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
63
63
|
components: { UBadge, URow },
|
|
64
64
|
setup() {
|
|
65
65
|
function getText(value) {
|
|
@@ -70,14 +70,6 @@ const EnumVariantTemplate = (args, { argTypes }) => ({
|
|
|
70
70
|
},
|
|
71
71
|
template: `
|
|
72
72
|
<URow>
|
|
73
|
-
<UDropdownButton
|
|
74
|
-
label="Dropdown"
|
|
75
|
-
:options='[{"label":"option 1"},{"label":"option 2"},{"label":"option 3"}]'
|
|
76
|
-
variant="thirdary"
|
|
77
|
-
filled
|
|
78
|
-
>
|
|
79
|
-
fff
|
|
80
|
-
</UDropdownButton>
|
|
81
73
|
<UBadge
|
|
82
74
|
v-for="(option, index) in options"
|
|
83
75
|
:key="index"
|