vueless 0.0.309 → 0.0.311

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.309",
3
+ "version": "0.0.311",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -152,6 +152,7 @@ export default /*tw*/ {
152
152
  variant: "primary",
153
153
  tag: "button",
154
154
  size: "md",
155
+ tabindex: 0,
155
156
  round: false,
156
157
  block: false,
157
158
  square: false,
@@ -5,7 +5,7 @@
5
5
  ref="buttonRef"
6
6
  :disabled="disabled"
7
7
  v-bind="buttonAttrs"
8
- :tabindex="loading && '-1'"
8
+ :tabindex="!loading ? tabindex : -1"
9
9
  :data-test="dataTest"
10
10
  >
11
11
  <template v-if="loading">
@@ -161,6 +161,14 @@ const props = defineProps({
161
161
  default: "",
162
162
  },
163
163
 
164
+ /**
165
+ * Controls the keyboard “Tab” focus order of elements.
166
+ */
167
+ tabindex: {
168
+ type: String,
169
+ default: getDefault(defaultConfig, UButton).tabindex,
170
+ },
171
+
164
172
  /**
165
173
  * Fill the background for thirdary variant.
166
174
  */
@@ -7,6 +7,7 @@ export default /*tw*/ {
7
7
  size: "md",
8
8
  labelAlign: "topInside",
9
9
  debounce: 300,
10
+ minLength: 0,
10
11
  disabled: false,
11
12
  readonly: false,
12
13
  searchButton: false,
@@ -59,6 +59,9 @@ Default.args = {};
59
59
  export const searchButton = DefaultTemplate.bind({});
60
60
  searchButton.args = { searchButtonLabel: "Search" };
61
61
 
62
+ export const minLength = DefaultTemplate.bind({});
63
+ minLength.args = { minLength: 4 };
64
+
62
65
  export const sizes = EnumVariantTemplate.bind({});
63
66
  sizes.args = { enum: "size" };
64
67
 
@@ -168,6 +168,14 @@ const props = defineProps({
168
168
  default: "",
169
169
  },
170
170
 
171
+ /**
172
+ * Minimum character length for search.
173
+ */
174
+ minLength: {
175
+ type: [String, Number],
176
+ default: getDefault(defaultConfig, UInputSearch).minLength,
177
+ },
178
+
171
179
  /**
172
180
  * Search button label.
173
181
  */
@@ -250,7 +258,10 @@ const search = computed({
250
258
  get: () => props.modelValue,
251
259
  set: debounceMethod((value) => {
252
260
  localValue.value = value;
253
- emit("update:modelValue", value);
261
+
262
+ if (localValue.value.length >= Number(props.minLength)) {
263
+ emit("update:modelValue", value);
264
+ }
254
265
  }, props.debounce),
255
266
  });
256
267
 
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.309",
4
+ "version": "0.0.311",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -942,6 +942,15 @@
942
942
  },
943
943
  "default": "\"\""
944
944
  },
945
+ {
946
+ "name": "tabindex",
947
+ "description": "Controls the keyboard “Tab” focus order of elements.",
948
+ "value": {
949
+ "kind": "expression",
950
+ "type": "string"
951
+ },
952
+ "default": "0"
953
+ },
945
954
  {
946
955
  "name": "filled",
947
956
  "description": "Fill the background for thirdary variant.",
@@ -5193,6 +5202,15 @@
5193
5202
  },
5194
5203
  "default": "\"\""
5195
5204
  },
5205
+ {
5206
+ "name": "minLength",
5207
+ "description": "Minimum character length for search.",
5208
+ "value": {
5209
+ "kind": "expression",
5210
+ "type": "string|number"
5211
+ },
5212
+ "default": "0"
5213
+ },
5196
5214
  {
5197
5215
  "name": "searchButtonLabel",
5198
5216
  "description": "Search button label.",