vueless 0.0.347 → 0.0.349
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/package.json +1 -1
- package/preset.tailwind.js +12 -8
- package/ui.form-date-picker/config.js +4 -1
- package/ui.form-date-picker/storybook/stories.js +2 -1
- package/ui.form-date-picker/useAttrs.js +2 -0
- package/ui.form-date-picker-range/config.js +10 -2
- package/ui.form-date-picker-range/storybook/stories.js +2 -1
- package/ui.form-date-picker-range/useAttrs.js +2 -0
- package/web-types.json +1 -1
package/package.json
CHANGED
package/preset.tailwind.js
CHANGED
|
@@ -16,15 +16,22 @@ const isStrategyOverride = process.env.VUELESS_STRATEGY === "override";
|
|
|
16
16
|
* Use it to extend project Tailwind CSS `content` config.
|
|
17
17
|
*/
|
|
18
18
|
export const vuelessContent = [
|
|
19
|
-
"./index.html",
|
|
20
|
-
"./src/**/*.{js,ts,jsx,tsx,vue}",
|
|
21
19
|
"./vueless.config.{js,ts}",
|
|
22
20
|
"./node_modules/vueless/**/*.{js,ts,vue}",
|
|
23
|
-
...(isStrategyOverride ? ["!./src/**/ui.*/config.js"] : []),
|
|
21
|
+
...(isStrategyOverride ? ["!./src/**/ui.*/config.js"] : []), // only for vueless env
|
|
24
22
|
...(isStrategyOverride ? ["!./node_modules/vueless/**/ui.*/config.js"] : []),
|
|
25
23
|
];
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Vue.js default Tailwind CSS `content` config.
|
|
27
|
+
* Use it to extend project Tailwind CSS `content` config.
|
|
28
|
+
*/
|
|
29
|
+
export const vuelessContentVue = ["./index.html", "./src/**/*.{js,ts,jsx,tsx,vue}"];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Nuxt.js default Tailwind CSS `content` config.
|
|
33
|
+
* Use it to extend project Tailwind CSS `content` config.
|
|
34
|
+
*/
|
|
28
35
|
export const vuelessContentNuxt = [
|
|
29
36
|
"./composables/**/*.{js,ts}",
|
|
30
37
|
"./components/**/*.{js,vue,ts}",
|
|
@@ -33,9 +40,6 @@ export const vuelessContentNuxt = [
|
|
|
33
40
|
"./plugins/**/*.{js,ts}",
|
|
34
41
|
"./app.vue",
|
|
35
42
|
"./error.vue",
|
|
36
|
-
"./vueless.config.{js,ts}",
|
|
37
|
-
"./node_modules/vueless/**/*.{js,ts,vue}",
|
|
38
|
-
...(isStrategyOverride ? ["!./node_modules/vueless/**/ui.*/**/config.js"] : []),
|
|
39
43
|
];
|
|
40
44
|
|
|
41
45
|
/**
|
|
@@ -45,7 +49,7 @@ export const vuelessContentNuxt = [
|
|
|
45
49
|
export function vuelessPreset() {
|
|
46
50
|
return {
|
|
47
51
|
darkMode: DARK_MODE_SELECTOR,
|
|
48
|
-
content: vuelessContent,
|
|
52
|
+
content: [...vuelessContent, ...vuelessContentVue, ...vuelessContentNuxt],
|
|
49
53
|
safelist,
|
|
50
54
|
theme: {
|
|
51
55
|
extend: {
|
|
@@ -7,7 +7,7 @@ export default /*tw*/ {
|
|
|
7
7
|
},
|
|
8
8
|
calendar: {
|
|
9
9
|
component: "{UCalendar}",
|
|
10
|
-
base: "absolute z-40
|
|
10
|
+
base: "absolute mb-3 z-40",
|
|
11
11
|
variants: {
|
|
12
12
|
openDirectionX: {
|
|
13
13
|
left: "right-0",
|
|
@@ -17,7 +17,10 @@ export default /*tw*/ {
|
|
|
17
17
|
top: "bottom-full mt-0",
|
|
18
18
|
bottom: "top-full mb-0",
|
|
19
19
|
},
|
|
20
|
+
error: { true: "-mt-3" },
|
|
21
|
+
description: { true: "-mt-3" },
|
|
20
22
|
},
|
|
23
|
+
compoundVariants: [{ description: false, error: false, class: "mt-2" }],
|
|
21
24
|
},
|
|
22
25
|
calendarTransition: {
|
|
23
26
|
enterFromClass: "opacity-0 scale-95",
|
|
@@ -35,7 +35,7 @@ const DefaultTemplate = (args) => ({
|
|
|
35
35
|
return { args, slots };
|
|
36
36
|
},
|
|
37
37
|
template: `
|
|
38
|
-
<UDatePicker v-bind="args" v-model="args.modelValue">
|
|
38
|
+
<UDatePicker open-direction-y="bottom" v-bind="args" v-model="args.modelValue">
|
|
39
39
|
${args.slotTemplate || getSlotsFragment()}
|
|
40
40
|
</UDatePicker>
|
|
41
41
|
|
|
@@ -57,6 +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
61
|
:key="index"
|
|
61
62
|
v-bind="args"
|
|
62
63
|
:[args.enum]="option"
|
|
@@ -23,6 +23,8 @@ export default function useAttrs(props, { isShownCalendar, isTop, isRight }) {
|
|
|
23
23
|
...props,
|
|
24
24
|
openDirectionY: isTop.value ? POSITION.top : POSITION.bottom,
|
|
25
25
|
openDirectionX: isRight.value ? POSITION.right : POSITION.left,
|
|
26
|
+
error: Boolean(props.error),
|
|
27
|
+
description: Boolean(props.description),
|
|
26
28
|
});
|
|
27
29
|
}
|
|
28
30
|
|
|
@@ -14,7 +14,7 @@ export default /*tw*/ {
|
|
|
14
14
|
`,
|
|
15
15
|
menu: {
|
|
16
16
|
base: `
|
|
17
|
-
absolute z-40
|
|
17
|
+
absolute z-40 mb-3 w-80 overflow-hidden rounded-dynamic
|
|
18
18
|
border border-brand-300 bg-white p-2 shadow focus:outline-none
|
|
19
19
|
`,
|
|
20
20
|
variants: {
|
|
@@ -26,6 +26,14 @@ export default /*tw*/ {
|
|
|
26
26
|
top: "bottom-full mt-0",
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
|
+
compoundVariants: [
|
|
30
|
+
{ error: true, variant: "input", class: "-mt-3" },
|
|
31
|
+
{ description: true, variant: "input", class: "-mt-3" },
|
|
32
|
+
{ description: false, error: false, variant: "input", class: "mt-2" },
|
|
33
|
+
{ error: true, variant: "button", class: "-mt-2" },
|
|
34
|
+
{ description: true, variant: "button", class: "-mt-2" },
|
|
35
|
+
{ description: false, error: false, variant: "button", class: "mt-3" },
|
|
36
|
+
],
|
|
29
37
|
},
|
|
30
38
|
menuTransition: {
|
|
31
39
|
enterFromClass: "opacity-0 scale-95",
|
|
@@ -74,7 +82,7 @@ export default /*tw*/ {
|
|
|
74
82
|
inputRangeError: "text-xs font-normal leading-none mt-2 text-center text-red-500",
|
|
75
83
|
calendar: {
|
|
76
84
|
component: "{UCalendar}",
|
|
77
|
-
wrapper: "p-0
|
|
85
|
+
wrapper: "p-0 w-full border-none shadow-none",
|
|
78
86
|
navigation: "mb-0 border-none",
|
|
79
87
|
viewSwitchButton: {
|
|
80
88
|
base: "rounded-dynamic px-4",
|
|
@@ -45,7 +45,7 @@ const DefaultTemplate = (args) => ({
|
|
|
45
45
|
};
|
|
46
46
|
},
|
|
47
47
|
template: `
|
|
48
|
-
<UDatePickerRange v-bind="args" v-model="value">
|
|
48
|
+
<UDatePickerRange open-direction-y="bottom" v-bind="args" v-model="value">
|
|
49
49
|
${args.slotTemplate || getSlotsFragment()}
|
|
50
50
|
</UDatePickerRange>
|
|
51
51
|
|
|
@@ -68,6 +68,7 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
|
68
68
|
<UDatePickerRange
|
|
69
69
|
v-for="(option, index) in options"
|
|
70
70
|
:key="index"
|
|
71
|
+
open-direction-y="bottom"
|
|
71
72
|
v-bind="args"
|
|
72
73
|
v-model="args.value"
|
|
73
74
|
:[args.enum]="option"
|