vueless 0.0.452 → 0.0.454

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.452",
3
+ "version": "0.0.454",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -181,10 +181,10 @@ defineOptions({ inheritAttrs: false });
181
181
 
182
182
  const props = defineProps({
183
183
  /**
184
- * Calendar value (JavaScript Date object or string formatted in given `dateFormat`).
184
+ * Calendar value (JavaScript Date object or string formatted in given `dateFormat` or object when `range` enabled).
185
185
  */
186
186
  modelValue: {
187
- type: [String, Object],
187
+ type: [Date, String, Object],
188
188
  default: null,
189
189
  },
190
190
 
@@ -29,43 +29,38 @@ const DefaultTemplate = (args) => ({
29
29
 
30
30
  return { args, slots };
31
31
  },
32
- data() {
33
- return {
34
- value: this.args.value,
35
- };
36
- },
37
32
  template: `
38
- <UCalendar v-bind="args" v-model="value">
33
+ <UCalendar v-bind="args" v-model="args.modelValue">
39
34
  ${args.slotTemplate || getSlotsFragment()}
40
35
  </UCalendar>
41
36
 
42
37
  <div class="mt-4">
43
- {{ value }}
38
+ {{ args.modelValue }}
44
39
  </div>
45
40
  `,
46
41
  });
47
42
 
48
43
  export const Default = DefaultTemplate.bind({});
49
- Default.args = { value: new Date() };
44
+ Default.args = {};
50
45
 
51
46
  export const Range = DefaultTemplate.bind({});
52
47
  Range.args = {
53
48
  range: true,
54
- value: {
49
+ modelValue: {
55
50
  from: new Date(new Date().setDate(new Date().getDate() - new Date().getDay())),
56
51
  to: new Date(new Date().setDate(new Date().getDate() + (6 - new Date().getDay()))),
57
52
  },
58
53
  };
59
54
 
60
55
  export const Timepicker = DefaultTemplate.bind({});
61
- Timepicker.args = { value: new Date(2024, 2, 14, 12, 24, 14), timepicker: true };
56
+ Timepicker.args = { modelValue: new Date(2024, 2, 14, 12, 24, 14), timepicker: true };
62
57
 
63
58
  export const MinMax = DefaultTemplate.bind({});
64
59
  MinMax.args = {
65
60
  minDate: new Date(2022, 2, 22),
66
61
  maxDate: new Date(2022, 2, 26),
67
- value: new Date(2022, 2, 24),
62
+ modelValue: new Date(2022, 2, 24),
68
63
  };
69
64
 
70
65
  export const DateFormat = DefaultTemplate.bind({});
71
- DateFormat.args = { dateFormat: "d.m.Y", userDateFormat: "d.m.Y", value: "28.06.2024" };
66
+ DateFormat.args = { dateFormat: "d.m.Y", userDateFormat: "d.m.Y", modelValue: "28.06.2024" };
@@ -101,7 +101,7 @@ const props = defineProps({
101
101
  * Datepicker value (JavaScript Date object or string formatted in given `dateFormat`).
102
102
  */
103
103
  modelValue: {
104
- type: [Object, String],
104
+ type: [Date, String],
105
105
  default: null,
106
106
  },
107
107
 
@@ -177,7 +177,7 @@ const props = defineProps({
177
177
  * Min date (JavaScript Date object or string formatted in given `dateFormat`).
178
178
  */
179
179
  minDate: {
180
- type: [String, Date],
180
+ type: [Date, String],
181
181
  default: getDefault(defaultConfig, UDatePicker).minDate,
182
182
  },
183
183
 
@@ -185,7 +185,7 @@ const props = defineProps({
185
185
  * Max date (JavaScript Date object or string formatted in given `dateFormat`).
186
186
  */
187
187
  maxDate: {
188
- type: [String, Date],
188
+ type: [Date, String],
189
189
  default: getDefault(defaultConfig, UDatePicker).maxDate,
190
190
  },
191
191
 
@@ -206,7 +206,7 @@ defineOptions({ inheritAttrs: false });
206
206
 
207
207
  const props = defineProps({
208
208
  /**
209
- * Datepicker value (JavaScript Date object or string formatted in given `dateFormat`).
209
+ * Datepicker range value (JavaScript Date objects or strings formatted in given `dateFormat`).
210
210
  */
211
211
  modelValue: {
212
212
  type: Object,
@@ -259,7 +259,7 @@ const props = defineProps({
259
259
  * Min date (JavaScript Date object or string formatted in given `dateFormat`).
260
260
  */
261
261
  minDate: {
262
- type: [String, Date],
262
+ type: [Date, String],
263
263
  default: getDefault(defaultConfig, UDatePickerRange).minDate,
264
264
  },
265
265
 
@@ -267,7 +267,7 @@ const props = defineProps({
267
267
  * Max date (JavaScript Date object or string formatted in given `dateFormat`).
268
268
  */
269
269
  maxDate: {
270
- type: [String, Date],
270
+ type: [Date, String],
271
271
  default: getDefault(defaultConfig, UDatePickerRange).maxDate,
272
272
  },
273
273
 
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.452",
4
+ "version": "0.0.454",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -899,10 +899,10 @@
899
899
  "attributes": [
900
900
  {
901
901
  "name": "modelValue",
902
- "description": "Calendar value (JavaScript Date object or string formatted in given `dateFormat`).",
902
+ "description": "Calendar value (JavaScript Date object or string formatted in given `dateFormat` or object when `range` enabled).",
903
903
  "value": {
904
904
  "kind": "expression",
905
- "type": "string|object"
905
+ "type": "date|string|object"
906
906
  },
907
907
  "default": "null"
908
908
  },
@@ -2342,7 +2342,7 @@
2342
2342
  "description": "Datepicker value (JavaScript Date object or string formatted in given `dateFormat`).",
2343
2343
  "value": {
2344
2344
  "kind": "expression",
2345
- "type": "object|string"
2345
+ "type": "date|string"
2346
2346
  },
2347
2347
  "default": "null"
2348
2348
  },
@@ -2423,7 +2423,7 @@
2423
2423
  "description": "Min date (JavaScript Date object or string formatted in given `dateFormat`).",
2424
2424
  "value": {
2425
2425
  "kind": "expression",
2426
- "type": "string|date"
2426
+ "type": "date|string"
2427
2427
  }
2428
2428
  },
2429
2429
  {
@@ -2431,7 +2431,7 @@
2431
2431
  "description": "Max date (JavaScript Date object or string formatted in given `dateFormat`).",
2432
2432
  "value": {
2433
2433
  "kind": "expression",
2434
- "type": "string|date"
2434
+ "type": "date|string"
2435
2435
  }
2436
2436
  },
2437
2437
  {
@@ -2616,7 +2616,7 @@
2616
2616
  "attributes": [
2617
2617
  {
2618
2618
  "name": "modelValue",
2619
- "description": "Datepicker value (JavaScript Date object or string formatted in given `dateFormat`).",
2619
+ "description": "Datepicker range value (JavaScript Date objects or strings formatted in given `dateFormat`).",
2620
2620
  "value": {
2621
2621
  "kind": "expression",
2622
2622
  "type": "object"
@@ -2664,7 +2664,7 @@
2664
2664
  "description": "Min date (JavaScript Date object or string formatted in given `dateFormat`).",
2665
2665
  "value": {
2666
2666
  "kind": "expression",
2667
- "type": "string|date"
2667
+ "type": "date|string"
2668
2668
  }
2669
2669
  },
2670
2670
  {
@@ -2672,7 +2672,7 @@
2672
2672
  "description": "Max date (JavaScript Date object or string formatted in given `dateFormat`).",
2673
2673
  "value": {
2674
2674
  "kind": "expression",
2675
- "type": "string|date"
2675
+ "type": "date|string"
2676
2676
  }
2677
2677
  },
2678
2678
  {