vueless 0.0.472 → 0.0.473

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.472",
3
+ "version": "0.0.473",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -1,5 +1,14 @@
1
1
  <template>
2
- <div :data-test="dataTest" v-bind="wrapperAttrs">
2
+ <ULabel
3
+ :label="label"
4
+ :description="description"
5
+ :disabled="disabled"
6
+ :error="error"
7
+ :size="size"
8
+ :align="labelAlign"
9
+ :data-test="dataTest"
10
+ v-bind="labelAttrs"
11
+ >
3
12
  <UButton
4
13
  variant="thirdary"
5
14
  size="sm"
@@ -22,7 +31,6 @@
22
31
 
23
32
  <div v-bind="numberAttrs">
24
33
  <div v-bind="valueAttrs" v-text="count" />
25
- <div v-bind="labelAttrs" v-text="label" />
26
34
  </div>
27
35
 
28
36
  <UButton
@@ -44,7 +52,7 @@
44
52
  v-bind="addIconAttrs"
45
53
  />
46
54
  </UButton>
47
- </div>
55
+ </ULabel>
48
56
  </template>
49
57
 
50
58
  <script setup>
@@ -52,6 +60,7 @@ import { computed } from "vue";
52
60
 
53
61
  import UIcon from "../ui.image-icon/UIcon.vue";
54
62
  import UButton from "../ui.button/UButton.vue";
63
+ import ULabel from "../ui.form-label/ULabel.vue";
55
64
  import { getDefault } from "../utils/utilUI.js";
56
65
 
57
66
  import defaultConfig from "./config.js";
@@ -74,7 +83,7 @@ const props = defineProps({
74
83
  */
75
84
  step: {
76
85
  type: Number,
77
- default: 1,
86
+ default: getDefault(defaultConfig, UInputNumber).step,
78
87
  },
79
88
 
80
89
  /**
@@ -82,7 +91,7 @@ const props = defineProps({
82
91
  */
83
92
  min: {
84
93
  type: Number,
85
- default: 1,
94
+ default: getDefault(defaultConfig, UInputNumber).min,
86
95
  },
87
96
 
88
97
  /**
@@ -90,7 +99,7 @@ const props = defineProps({
90
99
  */
91
100
  max: {
92
101
  type: Number,
93
- default: 999,
102
+ default: getDefault(defaultConfig, UInputNumber).max,
94
103
  },
95
104
 
96
105
  /**
@@ -176,7 +185,6 @@ const {
176
185
  removeIconAttrs,
177
186
  addButtonAttrs,
178
187
  addIconAttrs,
179
- wrapperAttrs,
180
188
  numberAttrs,
181
189
  } = useAttrs(props);
182
190
 
@@ -1,6 +1,9 @@
1
1
  export default /*tw*/ {
2
- wrapper: "flex items-center space-x-6",
3
- number: "flex items-center flex-col",
2
+ label: {
3
+ component: "{ULabel}",
4
+ content: "gap-6 items-center",
5
+ },
6
+ number: "",
4
7
  removeButton: "{UButton}",
5
8
  removeIcon: "{UIcon}",
6
9
  addButton: "{UButton}",
@@ -13,20 +16,18 @@ export default /*tw*/ {
13
16
  md: "text-base",
14
17
  lg: "text-lg",
15
18
  },
16
- },
17
- },
18
- label: {
19
- base: "pt-1 !leading-none text-gray-500",
20
- variants: {
21
- size: {
22
- sm: "text-xs",
23
- md: "text-sm",
24
- lg: "text-base",
19
+ disabled: {
20
+ true: "focus-within:ring-0 focus-within:ring-offset-0 pointer-events-none",
25
21
  },
26
22
  },
27
23
  },
28
24
  defaults: {
29
25
  size: "md",
26
+ labelAlign: "topWithDesc",
27
+ disabled: false,
28
+ step: 1,
29
+ min: 1,
30
+ max: 999,
30
31
  /* icons */
31
32
  removeIcon: "remove",
32
33
  addIcon: "add",
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.472",
4
+ "version": "0.0.473",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -5351,7 +5351,7 @@
5351
5351
  "kind": "expression",
5352
5352
  "type": "'top' | 'topWithDesc' | 'left' | 'right'"
5353
5353
  },
5354
- "default": "getDefault(defaultConfig, UInputNumber).labelAlign"
5354
+ "default": "topWithDesc"
5355
5355
  },
5356
5356
  {
5357
5357
  "name": "description",
@@ -5387,7 +5387,7 @@
5387
5387
  "kind": "expression",
5388
5388
  "type": "boolean"
5389
5389
  },
5390
- "default": "getDefault(defaultConfig, UInputNumber).disabled"
5390
+ "default": "false"
5391
5391
  },
5392
5392
  {
5393
5393
  "name": "config",