vueless 0.0.411 → 0.0.413

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.
@@ -6,7 +6,7 @@
6
6
  @click="onClick"
7
7
  >
8
8
  <div v-bind="contentAttrs">
9
- <!-- @slot Use it to wrap something into the label. -->
9
+ <!-- @slot Use it to add label content. -->
10
10
  <slot />
11
11
  </div>
12
12
 
@@ -45,7 +45,7 @@
45
45
  />
46
46
 
47
47
  <div v-bind="contentAttrs">
48
- <!-- @slot Use it to wrap something into the label. -->
48
+ <!-- @slot Use it to add label content. -->
49
49
  <slot />
50
50
  </div>
51
51
 
@@ -83,7 +83,7 @@ const emit = defineEmits([
83
83
 
84
84
  const props = defineProps({
85
85
  /**
86
- * Set label value.
86
+ * Label text.
87
87
  */
88
88
  label: {
89
89
  type: String,
@@ -91,16 +91,23 @@ const props = defineProps({
91
91
  },
92
92
 
93
93
  /**
94
- * Set label size.
95
- * @values sm, md, lg
94
+ * Label description.
96
95
  */
97
- size: {
96
+ description: {
98
97
  type: String,
99
- default: getDefault(defaultConfig, ULabel).size,
98
+ default: "",
99
+ },
100
+
101
+ /**
102
+ * Label error message.
103
+ */
104
+ error: {
105
+ type: String,
106
+ default: "",
100
107
  },
101
108
 
102
109
  /**
103
- * Label placement.
110
+ * Label align.
104
111
  * @values top, topInside, topWithDesc, left, right
105
112
  */
106
113
  align: {
@@ -109,46 +116,38 @@ const props = defineProps({
109
116
  },
110
117
 
111
118
  /**
112
- * Centre label.
119
+ * Label size.
120
+ * @values sm, md, lg
113
121
  */
114
- centred: {
115
- type: Boolean,
116
- default: getDefault(defaultConfig, ULabel).centred,
122
+ size: {
123
+ type: String,
124
+ default: getDefault(defaultConfig, ULabel).size,
117
125
  },
118
126
 
119
127
  /**
120
- * Set error message.
128
+ * Make label disabled.
121
129
  */
122
- error: {
123
- type: String,
124
- default: "",
130
+ disabled: {
131
+ type: Boolean,
132
+ default: getDefault(defaultConfig, ULabel).disabled,
125
133
  },
126
134
 
127
135
  /**
128
- * Set description text.
136
+ * Centre label horizontally.
129
137
  */
130
- description: {
131
- type: String,
132
- default: "",
138
+ centred: {
139
+ type: Boolean,
140
+ default: getDefault(defaultConfig, ULabel).centred,
133
141
  },
134
142
 
135
143
  /**
136
- * Set id label for.
137
- * @ignore
144
+ * Set input id for label `for` attribute.
138
145
  */
139
146
  for: {
140
147
  type: String,
141
148
  default: "",
142
149
  },
143
150
 
144
- /**
145
- * Make label disabled.
146
- */
147
- disabled: {
148
- type: Boolean,
149
- default: getDefault(defaultConfig, ULabel).disabled,
150
- },
151
-
152
151
  /**
153
152
  * Component config object.
154
153
  */
@@ -171,14 +170,21 @@ const wrapperRef = ref(null);
171
170
 
172
171
  const { wrapperAttrs, contentAttrs, labelAttrs, descriptionAttrs } = useAttrs(props);
173
172
 
174
- const isHorizontalPlacement = computed(
175
- () => props.align === PLACEMENT.left || props.align === PLACEMENT.right,
176
- );
173
+ const isHorizontalPlacement = computed(() => {
174
+ return props.align === PLACEMENT.left || props.align === PLACEMENT.right;
175
+ });
177
176
 
178
- const isTopWithDescPlacement = computed(() => props.align === PLACEMENT.topWithDesc);
177
+ const isTopWithDescPlacement = computed(() => {
178
+ return props.align === PLACEMENT.topWithDesc;
179
+ });
179
180
 
180
- const labelElement = computed(() => labelRef.value);
181
- const wrapperElement = computed(() => wrapperRef.value);
181
+ const labelElement = computed(() => {
182
+ return labelRef.value;
183
+ });
184
+
185
+ const wrapperElement = computed(() => {
186
+ return wrapperRef.value;
187
+ });
182
188
 
183
189
  function onClick(event) {
184
190
  emit("click", event);
@@ -22,8 +22,9 @@
22
22
  @change="onChange"
23
23
  />
24
24
 
25
- <template #footer>
26
- <slot name="footer" />
25
+ <template #bottom>
26
+ <!-- @slot Use it to add something below the radio. -->
27
+ <slot name="bottom" />
27
28
  </template>
28
29
  </ULabel>
29
30
  </template>
@@ -48,7 +49,7 @@ const getRadioGroupSelectedItem = inject("getRadioGroupSelectedItem", null);
48
49
 
49
50
  const props = defineProps({
50
51
  /**
51
- * Native value attribute.
52
+ * Radio value.
52
53
  */
53
54
  modelValue: {
54
55
  type: [Boolean, String, Number, Array, Object],
@@ -10,6 +10,7 @@
10
10
  :data-test="dataTest"
11
11
  >
12
12
  <div v-bind="listAttrs">
13
+ <!-- @slot Use it to add URadio directly. -->
13
14
  <slot>
14
15
  <URadio
15
16
  v-for="(option, index) in options"
@@ -128,7 +129,7 @@ const props = defineProps({
128
129
  */
129
130
  dataTest: {
130
131
  type: String,
131
- default: "radio",
132
+ default: "",
132
133
  },
133
134
  });
134
135
 
@@ -355,7 +355,7 @@ const props = defineProps({
355
355
  },
356
356
 
357
357
  /**
358
- * Set label placement related from the default slot.
358
+ * Label placement.
359
359
  * @values top, topInside, topWithDesc, left, right
360
360
  */
361
361
  labelAlign: {
@@ -54,7 +54,7 @@ defineOptions({ inheritAttrs: false });
54
54
 
55
55
  const props = defineProps({
56
56
  /**
57
- * Set switch value.
57
+ * Switch value.
58
58
  */
59
59
  modelValue: {
60
60
  type: Boolean,
@@ -71,7 +71,7 @@ const props = defineProps({
71
71
  },
72
72
 
73
73
  /**
74
- * Set label.
74
+ * Switch label.
75
75
  */
76
76
  label: {
77
77
  type: String,
@@ -79,7 +79,7 @@ const props = defineProps({
79
79
  },
80
80
 
81
81
  /**
82
- * Set description.
82
+ * Switch description.
83
83
  */
84
84
  description: {
85
85
  type: String,
@@ -87,7 +87,7 @@ const props = defineProps({
87
87
  },
88
88
 
89
89
  /**
90
- * The size of the switch.
90
+ * Switch size.
91
91
  * @values sm, md, lg
92
92
  */
93
93
  size: {
@@ -96,7 +96,7 @@ const props = defineProps({
96
96
  },
97
97
 
98
98
  /**
99
- * The color of the switch.
99
+ * Switch color.
100
100
  * @values brand, grayscale, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose, white */
101
101
  color: {
102
102
  type: String,
@@ -104,7 +104,7 @@ const props = defineProps({
104
104
  },
105
105
 
106
106
  /**
107
- * Show on / off icon inside circle.
107
+ * Show toggle icons inside the circle.
108
108
  */
109
109
  toggleIcon: {
110
110
  type: Boolean,
@@ -112,7 +112,7 @@ const props = defineProps({
112
112
  },
113
113
 
114
114
  /**
115
- * The label variant of the switch.
115
+ * Show toggle labels (on / off).
116
116
  */
117
117
  toggleLabel: {
118
118
  type: Boolean,
@@ -120,7 +120,7 @@ const props = defineProps({
120
120
  },
121
121
 
122
122
  /**
123
- * Show on / off icon inside circle.
123
+ * Set switch disabled.
124
124
  */
125
125
  disabled: {
126
126
  type: Boolean,
@@ -97,7 +97,7 @@ const props = defineProps({
97
97
  },
98
98
 
99
99
  /**
100
- * Set label placement related from the default slot.
100
+ * Label placement.
101
101
  * @values top, topInside, topWithDesc, left, right
102
102
  */
103
103
  labelAlign: {
@@ -73,6 +73,13 @@ export function getArgTypes(componentName) {
73
73
  defaultValue: { summary: attribute.default || "" },
74
74
  },
75
75
  };
76
+ } else {
77
+ types[attribute.name] = {
78
+ control: type.split("|")[0],
79
+ table: {
80
+ defaultValue: { summary: attribute.default || "" },
81
+ },
82
+ };
76
83
  }
77
84
  }
78
85