vueless 0.0.346 → 0.0.348

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.346",
3
+ "version": "0.0.348",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -223,7 +223,7 @@ const props = defineProps({
223
223
  */
224
224
  dateTimeFormat: {
225
225
  type: String,
226
- default: getDefault(defaultConfig, UCalendar).dateTimeFormat,
226
+ default: getDefault(defaultConfig, UDatePicker).dateTimeFormat,
227
227
  },
228
228
 
229
229
  /**
@@ -239,7 +239,7 @@ const props = defineProps({
239
239
  */
240
240
  userDateTimeFormat: {
241
241
  type: String,
242
- default: getDefault(defaultConfig, UCalendar).userDateTimeFormat,
242
+ default: getDefault(defaultConfig, UDatePicker).userDateTimeFormat,
243
243
  },
244
244
 
245
245
  /**
@@ -7,7 +7,7 @@ export default /*tw*/ {
7
7
  },
8
8
  calendar: {
9
9
  component: "{UCalendar}",
10
- base: "absolute z-40 my-2",
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 my-2 w-80 overflow-hidden rounded-dynamic
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 mt-2 w-full border-none shadow-none",
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"
@@ -38,6 +38,8 @@ export default function useAttrs(props, { isShownMenu, isTop, isRight, isPeriod
38
38
  if (isCVA(value)) {
39
39
  value = cva(value)({
40
40
  ...props,
41
+ error: Boolean(props.error),
42
+ description: Boolean(props.description),
41
43
  });
42
44
  }
43
45
 
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.346",
4
+ "version": "0.0.348",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",