vueless 0.0.107 → 0.0.108

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.107",
3
+ "version": "0.0.108",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -22,7 +22,7 @@ export function getArgTypes(componentName) {
22
22
  component.attributes?.forEach((attribute) => {
23
23
  const type = attribute.value.type;
24
24
 
25
- if (type === "string") {
25
+ if (type === "string" || type.includes("string")) {
26
26
  types[attribute.name] = {
27
27
  control: "text",
28
28
  table: {
@@ -49,6 +49,15 @@ export function getArgTypes(componentName) {
49
49
  };
50
50
  }
51
51
 
52
+ if (type === "array") {
53
+ types[attribute.name] = {
54
+ control: "array",
55
+ table: {
56
+ defaultValue: { summary: attribute.default || [] },
57
+ },
58
+ };
59
+ }
60
+
52
61
  if (type.includes("|")) {
53
62
  const options = attribute.value.type.replace(/['|]/g, "").split(/\s+/);
54
63
 
@@ -5,6 +5,9 @@ import UIcon from "../ui.image-icon";
5
5
  import URow from "../ui.container-row";
6
6
  import UGroup from "../ui.container-group";
7
7
 
8
+ /**
9
+ * The `UButton` component. | [ view on GitHub](https://github.com/vuelessjs/vueless/tree/main/src/ui.button)
10
+ */
8
11
  export default {
9
12
  id: "1010",
10
13
  title: "Buttons & Links / Button",
@@ -56,7 +56,7 @@ export default /*tw*/ {
56
56
  },
57
57
  },
58
58
  defaultVariants: {
59
- color: "brand",
59
+ titleColor: "brand",
60
60
  width: "sm",
61
61
  inner: false,
62
62
  closeIcon: true,
@@ -143,7 +143,7 @@ const props = defineProps({
143
143
  */
144
144
  titleColor: {
145
145
  type: String,
146
- default: UIService.get(defaultConfig, UModal).default.color,
146
+ default: UIService.get(defaultConfig, UModal).default.titleColor,
147
147
  },
148
148
 
149
149
  /**
@@ -183,7 +183,7 @@ const props = defineProps({
183
183
  * List max height in pixels.
184
184
  */
185
185
  maxHeight: {
186
- type: [Number, String],
186
+ type: Number,
187
187
  default: UIService.get(defaultConfig, UDropdownList).default.maxHeight,
188
188
  },
189
189
 
@@ -2,4 +2,7 @@ export default /*tw*/ {
2
2
  label: "",
3
3
  list: "ml-4 flex flex-col gap-4 relative",
4
4
  checkbox: "",
5
+ defaultVariants: {
6
+ disabled: false,
7
+ },
5
8
  };
@@ -116,7 +116,7 @@ const props = defineProps({
116
116
  */
117
117
  dataCy: {
118
118
  type: String,
119
- default: "checkbox",
119
+ default: "",
120
120
  },
121
121
  });
122
122
 
@@ -56,7 +56,7 @@ import { computed } from "vue";
56
56
  import UIcon from "../ui.image-icon";
57
57
  import URadio from "../ui.form-radio";
58
58
  import ULabel from "../ui.form-label";
59
- import UIService, { getRandomId } from "../service.ui";
59
+ import UIService from "../service.ui";
60
60
 
61
61
  import { UColorPicker } from "./constants";
62
62
  import defaultConfig from "./configs/default.config";
@@ -120,7 +120,8 @@ const props = defineProps({
120
120
  */
121
121
  name: {
122
122
  type: String,
123
- default: () => getRandomId(),
123
+ required: true,
124
+ default: "",
124
125
  },
125
126
 
126
127
  /**
@@ -185,14 +185,6 @@ export default /*tw*/ {
185
185
  defaultVariants: {
186
186
  size: "md",
187
187
  variant: "button",
188
- customRangeButton: {
189
- range: {
190
- from: 0,
191
- to: 0,
192
- },
193
- label: "",
194
- description: "",
195
- },
196
188
  timepicker: false,
197
189
  disabled: false,
198
190
  dateFormat: "d.m.Y",
@@ -265,7 +265,11 @@ const props = defineProps({
265
265
  */
266
266
  customRangeButton: {
267
267
  type: Object,
268
- default: () => UIService.get(defaultConfig, UDatePickerRange).default.customRangeButton,
268
+ default: () => ({
269
+ range: { from: 0, to: 0 },
270
+ label: "",
271
+ description: "",
272
+ }),
269
273
  },
270
274
 
271
275
  /**
@@ -31,6 +31,7 @@ export default /*tw*/ {
31
31
  defaultVariants: {
32
32
  size: "md",
33
33
  color: "brand",
34
+ labelAlign: "left",
34
35
  disabled: false,
35
36
  checked: false,
36
37
  },
@@ -78,7 +78,7 @@ export default /*tw*/ {
78
78
  size: "md",
79
79
  variant: "default",
80
80
  interactive: false,
81
- fill: false,
81
+ pill: false,
82
82
  },
83
83
  safelist: (colors) => [
84
84
  { pattern: `text-(${colors})-400` },
@@ -46,14 +46,6 @@ const props = defineProps({
46
46
  default: "",
47
47
  },
48
48
 
49
- /**
50
- * Change icon variant from outline to filled.
51
- */
52
- fill: {
53
- type: Boolean,
54
- default: UIService.get(defaultConfig, UIcon).default.fill,
55
- },
56
-
57
49
  /**
58
50
  * Icon color.
59
51
  * @values brand, grayscale, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose, white
@@ -41,7 +41,7 @@ export default /*tw*/ {
41
41
  timeout: 0,
42
42
  html: undefined,
43
43
  bordered: false,
44
- closeButton: false,
44
+ closeIcon: false,
45
45
  },
46
46
  safelist: (colors) => [
47
47
  { pattern: `bg-(${colors})-50` },
@@ -31,5 +31,6 @@ export default /*tw*/ {
31
31
  defaultVariants: {
32
32
  size: "md",
33
33
  align: "left",
34
+ line: false,
34
35
  },
35
36
  };
@@ -59,7 +59,7 @@ export default /*tw*/ {
59
59
  align: "right",
60
60
  symbolAlign: "right",
61
61
  weight: "regular",
62
- decimalPlaces: 2,
62
+ decimalScale: 2,
63
63
  delimiter: ",",
64
64
  planned: false,
65
65
  integer: false,
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.107",
4
+ "version": "0.0.108",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -306,7 +306,7 @@
306
306
  "kind": "expression",
307
307
  "type": "boolean"
308
308
  },
309
- "default": "UIService.get(defaultConfig, UAlert).default.closeIcon"
309
+ "default": "false"
310
310
  },
311
311
  {
312
312
  "name": "config",
@@ -1116,7 +1116,7 @@
1116
1116
  "kind": "expression",
1117
1117
  "type": "boolean"
1118
1118
  },
1119
- "default": "UIService.get(defaultConfig, UCheckboxGroup).default.disabled"
1119
+ "default": "false"
1120
1120
  },
1121
1121
  {
1122
1122
  "name": "id",
@@ -1143,7 +1143,7 @@
1143
1143
  "kind": "expression",
1144
1144
  "type": "string"
1145
1145
  },
1146
- "default": "\"checkbox\""
1146
+ "default": "\"\""
1147
1147
  }
1148
1148
  ],
1149
1149
  "events": [
@@ -1317,12 +1317,13 @@
1317
1317
  },
1318
1318
  {
1319
1319
  "name": "name",
1320
+ "required": true,
1320
1321
  "description": "Color picker name.",
1321
1322
  "value": {
1322
1323
  "kind": "expression",
1323
1324
  "type": "string"
1324
1325
  },
1325
- "default": "() => getRandomId()"
1326
+ "default": "\"\""
1326
1327
  },
1327
1328
  {
1328
1329
  "name": "disabled",
@@ -1666,7 +1667,7 @@
1666
1667
  "kind": "expression",
1667
1668
  "type": "object"
1668
1669
  },
1669
- "default": "[object Object]"
1670
+ "default": "{\n range: { from: 0, to: 0 },\n label: \"\",\n description: \"\"\n}"
1670
1671
  },
1671
1672
  {
1672
1673
  "name": "variant",
@@ -2630,7 +2631,7 @@
2630
2631
  "description": "List max height in pixels.",
2631
2632
  "value": {
2632
2633
  "kind": "expression",
2633
- "type": "number|string"
2634
+ "type": "number"
2634
2635
  },
2635
2636
  "default": "undefined"
2636
2637
  },
@@ -3121,15 +3122,6 @@
3121
3122
  },
3122
3123
  "default": ""
3123
3124
  },
3124
- {
3125
- "name": "fill",
3126
- "description": "Change icon variant from outline to filled.",
3127
- "value": {
3128
- "kind": "expression",
3129
- "type": "boolean"
3130
- },
3131
- "default": "false"
3132
- },
3133
3125
  {
3134
3126
  "name": "color",
3135
3127
  "description": "Icon color.",
@@ -3155,7 +3147,7 @@
3155
3147
  "kind": "expression",
3156
3148
  "type": "boolean"
3157
3149
  },
3158
- "default": "UIService.get(defaultConfig, UIcon).default.pill"
3150
+ "default": "false"
3159
3151
  },
3160
3152
  {
3161
3153
  "name": "variant",
@@ -4645,7 +4637,7 @@
4645
4637
  "kind": "expression",
4646
4638
  "type": "'brand' | 'grayscale' | 'gray' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose'"
4647
4639
  },
4648
- "default": "UIService.get(defaultConfig, UModal).default.color"
4640
+ "default": "brand"
4649
4641
  },
4650
4642
  {
4651
4643
  "name": "description",
@@ -5025,7 +5017,7 @@
5025
5017
  "kind": "expression",
5026
5018
  "type": "number"
5027
5019
  },
5028
- "default": "UIService.get(defaultConfig, UMoney).default.decimalScale"
5020
+ "default": "2"
5029
5021
  },
5030
5022
  {
5031
5023
  "name": "delimiter",
@@ -5542,7 +5534,7 @@
5542
5534
  "kind": "expression",
5543
5535
  "type": "'top' | 'topInside' | 'topWithDesc' | 'bottom' | 'left' | 'right'"
5544
5536
  },
5545
- "default": "UIService.get(defaultConfig, URadio).default.labelAlign"
5537
+ "default": "left"
5546
5538
  },
5547
5539
  {
5548
5540
  "name": "disabled",
@@ -6732,7 +6724,7 @@
6732
6724
  "kind": "expression",
6733
6725
  "type": "boolean"
6734
6726
  },
6735
- "default": "UIService.get(defaultConfig, UText).default.line"
6727
+ "default": "false"
6736
6728
  },
6737
6729
  {
6738
6730
  "name": "config",