vueless 0.0.90 → 0.0.92
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 +5 -0
- package/package.json +2 -2
- package/ui.data-table/configs/default.config.js +2 -2
- package/ui.data-table/index.vue +1 -7
- package/ui.form-date-picker-range/index.vue +3 -1
- package/ui.form-select/configs/default.config.js +5 -0
- package/ui.loader-top/composables/attrs.composable.js +1 -7
- package/ui.loader-top/configs/default.config.js +0 -5
- package/ui.text-header/configs/default.config.js +5 -1
- package/ui.text-header/index.stories.js +7 -0
- package/ui.text-header/index.vue +8 -0
- package/web-types.json +10 -1
package/composable.ui/index.js
CHANGED
|
@@ -176,6 +176,11 @@ function mergeConfigs({
|
|
|
176
176
|
if (isGlobalConfig || isPropsConfig) {
|
|
177
177
|
if (key === "strategy") {
|
|
178
178
|
config[key] = propsConfig[key] || globalConfig[key] || defaultConfig[key];
|
|
179
|
+
} else if (key === "safelist") {
|
|
180
|
+
if (propsConfig[key]) {
|
|
181
|
+
// eslint-disable-next-line no-console
|
|
182
|
+
console.warn("Passing component safelist by `config` prop is not supported.");
|
|
183
|
+
}
|
|
179
184
|
} else if (key === "defaultVariants") {
|
|
180
185
|
config[key] = { ...defaultConfig[key], ...globalConfig[key], ...propsConfig[key] };
|
|
181
186
|
} else if (key === "compoundVariants") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.92",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Vue Styleless Component Framework.",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"sb:dev": "storybook dev -p 6006 --docs --no-open",
|
|
22
22
|
"sb:build": "storybook build --docs",
|
|
23
23
|
"sb:preview": "vite preview --host --outDir=storybook-static",
|
|
24
|
-
"package:prepare": "npx @vueless/web-types && node icons
|
|
24
|
+
"package:prepare": "npx @vueless/web-types && node prepare.icons && rm -rf dist && mkdir -p dist && cp -r src/. package.json LICENSE web-types.json README.md dist/ && node prepare.dist"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@tailwindcss/forms": "^0.5.7",
|
|
@@ -21,7 +21,7 @@ export default /*tw*/ {
|
|
|
21
21
|
},
|
|
22
22
|
selectedRowsCount: "flex items-center pr-4 font-medium text-gray-900",
|
|
23
23
|
selectAllCheckbox: "flex-none text-sm font-normal text-gray-500 pr-[1.125rem] pl-4 py-4 group-[]/table-compact:!px-4",
|
|
24
|
-
headerStickyLoader: "top-[3.75rem] group-[]/table-compact:!top-[3.25rem]",
|
|
24
|
+
headerStickyLoader: "absolute top-[3.75rem] group-[]/table-compact:!top-[3.25rem]",
|
|
25
25
|
innerWrapper: "overflow-auto rounded-lg border border-gray-200",
|
|
26
26
|
innerWrapperSelected: "!rounded-t-none border-t-0",
|
|
27
27
|
table: "min-w-full border-none bg-white text-sm w-full",
|
|
@@ -40,7 +40,7 @@ export default /*tw*/ {
|
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
42
|
headerSelectAllCheckbox: "",
|
|
43
|
-
tableLoader: "!top-auto",
|
|
43
|
+
tableLoader: "absolute !top-auto",
|
|
44
44
|
moreRow: "!px-0 !py-4 first:mx-auto",
|
|
45
45
|
moreRowHidden: "!p-0",
|
|
46
46
|
checkedRow: "transition duration-100 bg-gray-100",
|
package/ui.data-table/index.vue
CHANGED
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
<ULoaderTop
|
|
47
47
|
v-if="resource && isHeaderSticky"
|
|
48
48
|
:resource-names="resource"
|
|
49
|
-
position="absolute"
|
|
50
49
|
v-bind="headerStickyLoaderAttrs"
|
|
51
50
|
/>
|
|
52
51
|
</div>
|
|
@@ -89,12 +88,7 @@
|
|
|
89
88
|
</tr>
|
|
90
89
|
|
|
91
90
|
<!-- TODO: Change to loaders config after laoader refactoring -->
|
|
92
|
-
<ULoaderTop
|
|
93
|
-
v-if="resource"
|
|
94
|
-
:resource-names="resource"
|
|
95
|
-
position="absolute"
|
|
96
|
-
v-bind="tableLoaderAttrs"
|
|
97
|
-
/>
|
|
91
|
+
<ULoaderTop v-if="resource" :resource-names="resource" v-bind="tableLoaderAttrs" />
|
|
98
92
|
</thead>
|
|
99
93
|
|
|
100
94
|
<tbody v-if="tableRows.length" v-bind="bodyAttrs">
|
|
@@ -423,7 +423,9 @@ const rangeInputEndRef = ref(null);
|
|
|
423
423
|
const localValue = computed({
|
|
424
424
|
get: () => props.modelValue,
|
|
425
425
|
set: (value) => {
|
|
426
|
-
|
|
426
|
+
if (value.from && value.to) {
|
|
427
|
+
emit("update:modelValue", value);
|
|
428
|
+
}
|
|
427
429
|
|
|
428
430
|
activeDate.value = getDateFromUnixTimestamp(value.from || new Date());
|
|
429
431
|
},
|
|
@@ -8,6 +8,11 @@ export default /*tw*/ {
|
|
|
8
8
|
focus-within:border-brand-500 focus-within:ring-4 focus-within:ring-brand-600/[.15] focus-within:outline-none
|
|
9
9
|
`,
|
|
10
10
|
variants: {
|
|
11
|
+
size: {
|
|
12
|
+
sm: "pt-2 pb-2",
|
|
13
|
+
md: "pt-2.5 pb-2.5",
|
|
14
|
+
lg: "pt-3 pb-3",
|
|
15
|
+
},
|
|
11
16
|
error: {
|
|
12
17
|
true: `
|
|
13
18
|
border-red-300 hover:border-red-300
|
|
@@ -15,13 +15,7 @@ export function useAttrs(props) {
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
const progressClasses = computed(() =>
|
|
18
|
-
setColor(
|
|
19
|
-
cvaProgress({
|
|
20
|
-
position: props.position,
|
|
21
|
-
color: props.color,
|
|
22
|
-
}),
|
|
23
|
-
props.color,
|
|
24
|
-
),
|
|
18
|
+
setColor(cvaProgress({ color: props.color }), props.color),
|
|
25
19
|
);
|
|
26
20
|
|
|
27
21
|
const progressAttrs = getAttrs("progress", { classes: progressClasses.value });
|
|
@@ -2,10 +2,6 @@ export default /*tw*/ {
|
|
|
2
2
|
progress: {
|
|
3
3
|
base: "top-0 left-0 right-0 fixed h-[3px] transition-all ease-linear bg-{color}-500",
|
|
4
4
|
variants: {
|
|
5
|
-
position: {
|
|
6
|
-
fixed: "fixed",
|
|
7
|
-
absolute: "absolute",
|
|
8
|
-
},
|
|
9
5
|
error: {
|
|
10
6
|
true: "bg-red-500",
|
|
11
7
|
},
|
|
@@ -14,7 +10,6 @@ export default /*tw*/ {
|
|
|
14
10
|
progressMobile: "mt-safe-top mx-3 rounded max-w-[calc(100%-1.5rem)]",
|
|
15
11
|
defaultVariants: {
|
|
16
12
|
color: "blue",
|
|
17
|
-
position: "fixed",
|
|
18
13
|
},
|
|
19
14
|
safelist: (colors) => [{ pattern: `bg-(${colors})-500` }],
|
|
20
15
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
2
|
wrapper: {
|
|
3
|
-
base: "text-{color}-600
|
|
3
|
+
base: "text-{color}-600",
|
|
4
4
|
variants: {
|
|
5
5
|
size: {
|
|
6
6
|
xs: "text-lg",
|
|
@@ -20,6 +20,9 @@ export default /*tw*/ {
|
|
|
20
20
|
white: "text-white",
|
|
21
21
|
grayscale: "text-gray-900",
|
|
22
22
|
},
|
|
23
|
+
multiline: {
|
|
24
|
+
true: "!leading-none",
|
|
25
|
+
},
|
|
23
26
|
underlined: {
|
|
24
27
|
true: "border-b border-{color}-600",
|
|
25
28
|
},
|
|
@@ -39,6 +42,7 @@ export default /*tw*/ {
|
|
|
39
42
|
color: "grayscale",
|
|
40
43
|
weight: "medium",
|
|
41
44
|
size: "md",
|
|
45
|
+
multiline: false,
|
|
42
46
|
underlined: false,
|
|
43
47
|
},
|
|
44
48
|
safelist: (colors) => [{ pattern: `text-(${colors})-600` }, { pattern: `border-(${colors})-600` }],
|
|
@@ -102,5 +102,12 @@ Sizes.args = {};
|
|
|
102
102
|
export const Underlined = SizesTemplate.bind({});
|
|
103
103
|
Underlined.args = { underlined: true };
|
|
104
104
|
|
|
105
|
+
export const Multiline = SizesTemplate.bind({});
|
|
106
|
+
Multiline.args = {
|
|
107
|
+
size: "2xl",
|
|
108
|
+
multiline: true,
|
|
109
|
+
label: "Some very long header you ever may imagine in your whole long and beautiful life",
|
|
110
|
+
};
|
|
111
|
+
|
|
105
112
|
export const Colors = ColorsTemplate.bind({});
|
|
106
113
|
Colors.args = {};
|
package/ui.text-header/index.vue
CHANGED
|
@@ -54,6 +54,14 @@ const props = defineProps({
|
|
|
54
54
|
default: UIService.get(defaultConfig, UHeader).default.color,
|
|
55
55
|
},
|
|
56
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Return default line height to the component (it may be useful for multiline headers).
|
|
59
|
+
*/
|
|
60
|
+
multiline: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: UIService.get(defaultConfig, UHeader).default.multiline,
|
|
63
|
+
},
|
|
64
|
+
|
|
57
65
|
/**
|
|
58
66
|
* Show the underline.
|
|
59
67
|
*/
|
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.92",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -3044,6 +3044,15 @@
|
|
|
3044
3044
|
},
|
|
3045
3045
|
"default": "grayscale"
|
|
3046
3046
|
},
|
|
3047
|
+
{
|
|
3048
|
+
"name": "multiline",
|
|
3049
|
+
"description": "Return default line height to the component (it may be useful for multiline headers).",
|
|
3050
|
+
"value": {
|
|
3051
|
+
"kind": "expression",
|
|
3052
|
+
"type": "boolean"
|
|
3053
|
+
},
|
|
3054
|
+
"default": "false"
|
|
3055
|
+
},
|
|
3047
3056
|
{
|
|
3048
3057
|
"name": "underlined",
|
|
3049
3058
|
"description": "Show the underline.",
|