vueless 0.0.403 → 0.0.405

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.403",
3
+ "version": "0.0.405",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -2,12 +2,23 @@
2
2
  <div v-bind="wrapperAttrs">
3
3
  <UDivider v-if="upperlined" size="xl" padding="after" v-bind="dividerAttrs" />
4
4
 
5
- <UEmpty
5
+ <!--
6
+ @slot Use it to add something instead of the drag icon.
7
+ @binding {string} empty-title
8
+ @binding {string} empty-description
9
+ -->
10
+ <slot
6
11
  v-if="!hideEmptyStateForNesting && !list?.length"
7
- :title="emptyTitle || currentLocale.emptyTitle"
8
- :description="emptyDescription || currentLocale.emptyDescription"
9
- v-bind="emptyAttrs"
10
- />
12
+ name="empty"
13
+ :empty-title="emptyTitle"
14
+ :empty-description="emptyDescription"
15
+ >
16
+ <UEmpty
17
+ :title="emptyTitle || currentLocale.emptyTitle"
18
+ :description="emptyDescription || currentLocale.emptyDescription"
19
+ v-bind="emptyAttrs"
20
+ />
21
+ </slot>
11
22
 
12
23
  <draggable
13
24
  v-else
@@ -27,6 +38,7 @@
27
38
  <div :data-test="`${dataTest}-item-${element[valueKey]}`" v-bind="itemAttrs">
28
39
  <!--
29
40
  @slot Use it to add something instead of the drag icon.
41
+ @binding {string} icon-name
30
42
  @binding {string} icon-size
31
43
  -->
32
44
  <slot name="drag" :icon-name="config.defaults.dragIcon" :icon-size="iconSize">
@@ -43,6 +55,7 @@
43
55
  <!--
44
56
  @slot Use it to modify label.
45
57
  @binding {object} item
58
+ @binding {boolean} active
46
59
  -->
47
60
  <slot name="label" :item="element" :active="isActive(element)">
48
61
  {{ element[labelKey] }}
@@ -63,6 +76,7 @@
63
76
 
64
77
  <!--
65
78
  @slot Use it to add something instead of the delete icon.
79
+ @binding {string} icon-name
66
80
  @binding {string} icon-size
67
81
  -->
68
82
  <slot name="delete" :icon-name="config.defaults.deleteIcon" :icon-size="iconSize">
@@ -82,6 +96,7 @@
82
96
 
83
97
  <!--
84
98
  @slot Use it to add something instead of the edit icon.
99
+ @binding {string} icon-name
85
100
  @binding {string} icon-size
86
101
  -->
87
102
  <slot name="edit" :icon-name="config.defaults.editIcon" :icon-size="iconSize">
@@ -114,6 +129,11 @@
114
129
  @drag-sort="onDragEnd"
115
130
  >
116
131
  <template #label="{ item, active }">
132
+ <!--
133
+ @slot Use it to modify label.
134
+ @binding {object} item
135
+ @binding {boolean} active
136
+ -->
117
137
  <slot name="label" :item="item" :active="active">
118
138
  <div v-bind="active ? labelCrossedAttrs : labelAttrs" v-text="item[labelKey]" />
119
139
  </slot>
@@ -152,7 +172,7 @@ defineOptions({ inheritAttrs: false });
152
172
 
153
173
  const props = defineProps({
154
174
  /**
155
- * Data list array.
175
+ * Data item options.
156
176
  */
157
177
  list: {
158
178
  type: Array,
@@ -217,7 +237,7 @@ const props = defineProps({
217
237
  },
218
238
 
219
239
  /**
220
- * Enables nesting.
240
+ * Enable nesting.
221
241
  */
222
242
  nesting: {
223
243
  type: Boolean,
@@ -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 */
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.403",
4
+ "version": "0.0.405",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -2054,7 +2054,7 @@
2054
2054
  "attributes": [
2055
2055
  {
2056
2056
  "name": "list",
2057
- "description": "Data list array.",
2057
+ "description": "Data item options.",
2058
2058
  "value": {
2059
2059
  "kind": "expression",
2060
2060
  "type": "array"
@@ -2126,7 +2126,7 @@
2126
2126
  },
2127
2127
  {
2128
2128
  "name": "nesting",
2129
- "description": "Enables nesting.",
2129
+ "description": "Enable nesting.",
2130
2130
  "value": {
2131
2131
  "kind": "expression",
2132
2132
  "type": "boolean"
@@ -2221,12 +2221,28 @@
2221
2221
  }
2222
2222
  ],
2223
2223
  "slots": [
2224
+ {
2225
+ "name": "empty",
2226
+ "scoped": true,
2227
+ "description": "Use it to add something instead of the drag icon.",
2228
+ "bindings": [
2229
+ {
2230
+ "type": "string",
2231
+ "name": "empty-title"
2232
+ },
2233
+ {
2234
+ "type": "string",
2235
+ "name": "empty-description"
2236
+ }
2237
+ ]
2238
+ },
2224
2239
  {
2225
2240
  "name": "drag",
2226
2241
  "scoped": true,
2227
2242
  "description": "Use it to add something instead of the drag icon.",
2228
2243
  "bindings": [
2229
2244
  {
2245
+ "type": "string",
2230
2246
  "name": "icon-name"
2231
2247
  },
2232
2248
  {
@@ -2241,9 +2257,11 @@
2241
2257
  "description": "Use it to modify label.",
2242
2258
  "bindings": [
2243
2259
  {
2260
+ "type": "object",
2244
2261
  "name": "item"
2245
2262
  },
2246
2263
  {
2264
+ "type": "boolean",
2247
2265
  "name": "active"
2248
2266
  }
2249
2267
  ]
@@ -2265,6 +2283,7 @@
2265
2283
  "description": "Use it to add something instead of the delete icon.",
2266
2284
  "bindings": [
2267
2285
  {
2286
+ "type": "string",
2268
2287
  "name": "icon-name"
2269
2288
  },
2270
2289
  {
@@ -2279,6 +2298,7 @@
2279
2298
  "description": "Use it to add something instead of the edit icon.",
2280
2299
  "bindings": [
2281
2300
  {
2301
+ "type": "string",
2282
2302
  "name": "icon-name"
2283
2303
  },
2284
2304
  {
@@ -8073,7 +8093,7 @@
8073
8093
  {
8074
8094
  "name": "columns",
8075
8095
  "required": true,
8076
- "description": "Table columns.",
8096
+ "description": "Table columns (headers).",
8077
8097
  "value": {
8078
8098
  "kind": "expression",
8079
8099
  "type": "array"
@@ -8090,7 +8110,7 @@
8090
8110
  },
8091
8111
  {
8092
8112
  "name": "dateDivider",
8093
- "description": "Show date divider label.",
8113
+ "description": "Show date divider line between dates.",
8094
8114
  "value": {
8095
8115
  "kind": "expression",
8096
8116
  "type": "array|boolean"
@@ -8099,7 +8119,7 @@
8099
8119
  },
8100
8120
  {
8101
8121
  "name": "selectable",
8102
- "description": "Enable selecting table rows.",
8122
+ "description": "Allow rows selecting.",
8103
8123
  "value": {
8104
8124
  "kind": "expression",
8105
8125
  "type": "boolean"
@@ -8135,7 +8155,7 @@
8135
8155
  },
8136
8156
  {
8137
8157
  "name": "resource",
8138
- "description": "Set loader resource name to activate table top loader exact for that resource.",
8158
+ "description": "Set loader resource name to activate table progress loader exact for that resource (deprecated).",
8139
8159
  "value": {
8140
8160
  "kind": "expression",
8141
8161
  "type": "string"
@@ -8176,7 +8196,7 @@
8176
8196
  },
8177
8197
  {
8178
8198
  "name": "update:rows",
8179
- "description": "Triggers when table rows are updated.",
8199
+ "description": "Triggers when table rows are selected (updated).",
8180
8200
  "properties": [
8181
8201
  {
8182
8202
  "type": [
@@ -8191,7 +8211,7 @@
8191
8211
  {
8192
8212
  "name": "header-actions",
8193
8213
  "scoped": true,
8194
- "description": "Use it to add action buttons instead of table row when some rows are selected.",
8214
+ "description": "Use it to add action buttons within the actions header, which appear when rows are selected.",
8195
8215
  "bindings": [
8196
8216
  {
8197
8217
  "type": "array",
@@ -8202,7 +8222,7 @@
8202
8222
  {
8203
8223
  "name": "`header-${column.key}`",
8204
8224
  "scoped": true,
8205
- "description": "Use it to customise table column.",
8225
+ "description": "Use it to customise needed header cell.",
8206
8226
  "bindings": [
8207
8227
  {
8208
8228
  "type": "string",
@@ -8217,7 +8237,7 @@
8217
8237
  {
8218
8238
  "name": "`header-${column.key}-after`",
8219
8239
  "scoped": true,
8220
- "description": "Use it to add something after the table column.",
8240
+ "description": "Use it to add something after the needed header cell.",
8221
8241
  "bindings": [
8222
8242
  {
8223
8243
  "type": "string",