vueless 0.0.402 → 0.0.404

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.402",
3
+ "version": "0.0.404",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -57,14 +57,13 @@
57
57
  <slot name="header-right" />
58
58
  </div>
59
59
 
60
- <div v-bind="closeIconAttrs">
60
+ <div v-if="closeOnCross" v-bind="closeIconAttrs">
61
61
  <!--
62
62
  @slot Use it to add something instead of the close button.
63
63
  @binding {string} icon-name
64
64
  -->
65
65
  <slot name="close-button" :icon-name="config.defaults.closeIcon">
66
66
  <UIcon
67
- v-if="closeOnCross"
68
67
  internal
69
68
  interactive
70
69
  size="sm"
@@ -25,7 +25,7 @@
25
25
  />
26
26
 
27
27
  <!--
28
- @slot Use it to add action buttons instead of table row when some rows are selected.
28
+ @slot Use it to add action buttons within the actions header, which appear when rows are selected.
29
29
  @binding {array} selected-rows
30
30
  -->
31
31
  <slot name="header-actions" :selected-rows="selectedRows" />
@@ -57,7 +57,7 @@
57
57
  >
58
58
  <template v-if="hasSlotContent($slots[`header-${column.key}`])">
59
59
  <!--
60
- @slot Use it to customise table column.
60
+ @slot Use it to customise needed header cell.
61
61
  @binding {string} name
62
62
  @binding {number} column
63
63
  -->
@@ -69,7 +69,7 @@
69
69
  </template>
70
70
 
71
71
  <!--
72
- @slot Use it to add something after the table column.
72
+ @slot Use it to add something after the needed header cell.
73
73
  @binding {string} name
74
74
  @binding {number} column
75
75
  -->
@@ -127,7 +127,7 @@
127
127
  :class="cx([headerCellBaseAttrs.class, column.thClass])"
128
128
  >
129
129
  <!--
130
- @slot Use it to customise table column.
130
+ @slot Use it to customise needed header cell.
131
131
  @binding {string} name
132
132
  @binding {number} column
133
133
  -->
@@ -142,7 +142,7 @@
142
142
  </template>
143
143
 
144
144
  <!--
145
- @slot Use it to add something after the table column.
145
+ @slot Use it to add something after the needed header cell.
146
146
  @binding {string} name
147
147
  @binding {number} column
148
148
  -->
@@ -301,7 +301,7 @@ defineOptions({ inheritAttrs: false });
301
301
 
302
302
  const props = defineProps({
303
303
  /**
304
- * Table columns.
304
+ * Table columns (headers).
305
305
  */
306
306
  columns: {
307
307
  type: Array,
@@ -317,15 +317,15 @@ const props = defineProps({
317
317
  },
318
318
 
319
319
  /**
320
- * Show date divider label.
320
+ * Show date divider line between dates.
321
321
  */
322
322
  dateDivider: {
323
323
  type: [Array, Boolean],
324
- default: false,
324
+ default: getDefault(defaultConfig, UTable).dateDivider,
325
325
  },
326
326
 
327
327
  /**
328
- * Enable selecting table rows.
328
+ * Allow rows selecting.
329
329
  */
330
330
  selectable: {
331
331
  type: Boolean,
@@ -357,7 +357,7 @@ const props = defineProps({
357
357
  },
358
358
 
359
359
  /**
360
- * Set loader resource name to activate table top loader exact for that resource.
360
+ * Set loader resource name to activate table progress loader exact for that resource (deprecated).
361
361
  */
362
362
  resource: {
363
363
  type: String,
@@ -389,7 +389,7 @@ const emit = defineEmits([
389
389
  "clickRow",
390
390
 
391
391
  /**
392
- * Triggers when table rows are updated.
392
+ * Triggers when table rows are selected (updated).
393
393
  * @property {array} tableRows
394
394
  */
395
395
  "update:rows",
@@ -1,13 +1,5 @@
1
1
  export default /*tw*/ {
2
2
  wrapper: "relative",
3
- headerCellBase: {
4
- base: "p-4 first:p-5 text-sm font-normal text-gray-500 text-left text-nowrap",
5
- variants: {
6
- compact: {
7
- true: "px-4 py-3 last:px-4 last:py-3 first:px-4 first:py-3",
8
- },
9
- },
10
- },
11
3
  headerCounterBase: "mr-1.5 pr-1.5 font-medium text-sm text-gray-900",
12
4
  stickyHeader: "fixed top-0 flex items-center z-30 overflow-hidden rounded-none border",
13
5
  stickyHeaderRow: "border-gray-200 bg-white",
@@ -21,7 +13,7 @@ export default /*tw*/ {
21
13
  },
22
14
  },
23
15
  },
24
- stickyHeaderLoader: "{ULoader}",
16
+ stickyHeaderLoader: "{ULoaderProgress}",
25
17
  stickyHeaderActions: "absolute rounded-t-lg border-blue-200 bg-blue-50",
26
18
  stickyHeaderActionsCheckbox: "{UCheckbox}",
27
19
  stickyHeaderActionsCounter: "-ml-2",
@@ -29,6 +21,14 @@ export default /*tw*/ {
29
21
  table: "min-w-full border-none text-sm w-full table-fixed",
30
22
  header: "border-b border-gray-200",
31
23
  headerRow: "",
24
+ headerCellBase: {
25
+ base: "p-4 first:p-5 text-sm font-normal text-gray-500 text-left text-nowrap",
26
+ variants: {
27
+ compact: {
28
+ true: "px-4 py-3 last:px-4 last:py-3 first:px-4 first:py-3",
29
+ },
30
+ },
31
+ },
32
32
  headerCellCheckbox: "w-10",
33
33
  headerCheckbox: "{UCheckbox}",
34
34
  headerCounter: {
@@ -39,7 +39,7 @@ export default /*tw*/ {
39
39
  },
40
40
  },
41
41
  },
42
- headerLoader: "{ULoader} absolute !top-auto",
42
+ headerLoader: "{ULoaderProgress} absolute !top-auto",
43
43
  body: "group/body divide-none",
44
44
  bodyRow: "hover:bg-gray-50",
45
45
  bodyRowChecked: "bg-gray-100 transition",
@@ -97,6 +97,7 @@ export default /*tw*/ {
97
97
  nesting: false,
98
98
  compact: false,
99
99
  selectable: false,
100
+ dateDivider: false,
100
101
  stickyHeader: false,
101
102
  stickyFooter: false,
102
103
  /* icons */
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <UInput
3
3
  :id="elementId"
4
+ ref="inputRef"
4
5
  :model-value="localValue"
5
6
  :size="size"
6
7
  :disabled="disabled"
@@ -253,6 +254,9 @@ let updateValueWithDebounce = createDebounce((value) => {
253
254
  }, Number(props.debounce));
254
255
 
255
256
  const localValue = ref("");
257
+ const inputRef = ref(null);
258
+
259
+ defineExpose({ inputRef });
256
260
 
257
261
  const elementId = props.id || useId();
258
262
 
@@ -677,7 +677,7 @@ const isSelectedValueLabelVisible = computed(() => {
677
677
  });
678
678
 
679
679
  const filteredOptions = computed(() => {
680
- const normalizedSearch = search.value.toLowerCase().trim();
680
+ const normalizedSearch = search.value.toLowerCase().trim() || "";
681
681
 
682
682
  let options = props.multiple
683
683
  ? SelectService.removeSelectedValues(
@@ -688,10 +688,6 @@ const filteredOptions = computed(() => {
688
688
  )
689
689
  : [...props.options];
690
690
 
691
- if (!normalizedSearch) {
692
- return options.slice(0, props.optionsLimit || options.length);
693
- }
694
-
695
691
  options = props.groupValueKey
696
692
  ? filterAndFlat(options, normalizedSearch, props.labelKey)
697
693
  : SelectService.filterOptions(options, normalizedSearch, props.labelKey);
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.402",
4
+ "version": "0.0.404",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -8073,7 +8073,7 @@
8073
8073
  {
8074
8074
  "name": "columns",
8075
8075
  "required": true,
8076
- "description": "Table columns.",
8076
+ "description": "Table columns (headers).",
8077
8077
  "value": {
8078
8078
  "kind": "expression",
8079
8079
  "type": "array"
@@ -8090,7 +8090,7 @@
8090
8090
  },
8091
8091
  {
8092
8092
  "name": "dateDivider",
8093
- "description": "Show date divider label.",
8093
+ "description": "Show date divider line between dates.",
8094
8094
  "value": {
8095
8095
  "kind": "expression",
8096
8096
  "type": "array|boolean"
@@ -8099,7 +8099,7 @@
8099
8099
  },
8100
8100
  {
8101
8101
  "name": "selectable",
8102
- "description": "Enable selecting table rows.",
8102
+ "description": "Allow rows selecting.",
8103
8103
  "value": {
8104
8104
  "kind": "expression",
8105
8105
  "type": "boolean"
@@ -8135,7 +8135,7 @@
8135
8135
  },
8136
8136
  {
8137
8137
  "name": "resource",
8138
- "description": "Set loader resource name to activate table top loader exact for that resource.",
8138
+ "description": "Set loader resource name to activate table progress loader exact for that resource (deprecated).",
8139
8139
  "value": {
8140
8140
  "kind": "expression",
8141
8141
  "type": "string"
@@ -8176,7 +8176,7 @@
8176
8176
  },
8177
8177
  {
8178
8178
  "name": "update:rows",
8179
- "description": "Triggers when table rows are updated.",
8179
+ "description": "Triggers when table rows are selected (updated).",
8180
8180
  "properties": [
8181
8181
  {
8182
8182
  "type": [
@@ -8191,7 +8191,7 @@
8191
8191
  {
8192
8192
  "name": "header-actions",
8193
8193
  "scoped": true,
8194
- "description": "Use it to add action buttons instead of table row when some rows are selected.",
8194
+ "description": "Use it to add action buttons within the actions header, which appear when rows are selected.",
8195
8195
  "bindings": [
8196
8196
  {
8197
8197
  "type": "array",
@@ -8202,7 +8202,7 @@
8202
8202
  {
8203
8203
  "name": "`header-${column.key}`",
8204
8204
  "scoped": true,
8205
- "description": "Use it to customise table column.",
8205
+ "description": "Use it to customise needed header cell.",
8206
8206
  "bindings": [
8207
8207
  {
8208
8208
  "type": "string",
@@ -8217,7 +8217,7 @@
8217
8217
  {
8218
8218
  "name": "`header-${column.key}-after`",
8219
8219
  "scoped": true,
8220
- "description": "Use it to add something after the table column.",
8220
+ "description": "Use it to add something after the needed header cell.",
8221
8221
  "bindings": [
8222
8222
  {
8223
8223
  "type": "string",