vueless 0.0.170 → 0.0.172

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.170",
3
+ "version": "0.0.172",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -8,7 +8,13 @@ export function useAttrs(
8
8
  { tableRows, isNesting, isShownActionsHeader, isHeaderSticky, isFooterSticky },
9
9
  ) {
10
10
  const { config, getAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
11
- const { stickyHeaderCell, headerCell } = config.value;
11
+ const { stickyHeaderCell, headerCell, footerRow, bodyCell, headerCellGeneral } = config.value;
12
+
13
+ const cvaHeaderCellGeneral = cva({
14
+ base: headerCellGeneral.base,
15
+ variants: headerCellGeneral.variants,
16
+ compoundVariants: headerCellGeneral.compoundVariants,
17
+ });
12
18
 
13
19
  const cvaCustomHeaderItem = cva({
14
20
  base: stickyHeaderCell.base,
@@ -22,9 +28,23 @@ export function useAttrs(
22
28
  compoundVariants: headerCell.compoundVariants,
23
29
  });
24
30
 
25
- const stickyHeaderCellClasses = computed(() => cvaCustomHeaderItem({ compact: props.compact }));
31
+ const cvaFooterRow = cva({
32
+ base: footerRow.base,
33
+ variants: footerRow.variants,
34
+ compoundVariants: footerRow.compoundVariants,
35
+ });
36
+
37
+ const cvaBodyCell = cva({
38
+ base: bodyCell.base,
39
+ variants: bodyCell.variants,
40
+ compoundVariants: bodyCell.compoundVariants,
41
+ });
26
42
 
43
+ const stickyHeaderCellClasses = computed(() => cvaCustomHeaderItem({ compact: props.compact }));
27
44
  const headerCellClasses = computed(() => cvaHeaderCell({ compact: props.compact }));
45
+ const footerRowClasses = computed(() => cvaFooterRow({ compact: props.compact }));
46
+ const bodyCellClasses = computed(() => cvaBodyCell({ compact: props.compact }));
47
+ const headerCellGeneralClasses = computed(() => cvaHeaderCellGeneral({ compact: props.compact }));
28
48
 
29
49
  const wrapperAttrs = getAttrs("wrapper");
30
50
  const stickyHeaderAttrsRaw = getAttrs("stickyHeader");
@@ -53,7 +73,7 @@ export function useAttrs(
53
73
  isComponent: true,
54
74
  });
55
75
  const bodyAttrs = getAttrs("body");
56
- const bodyCellAttrsRaw = getAttrs("bodyCell", { isComponent: true });
76
+ const bodyCellAttrsRaw = getAttrs("bodyCell", { classes: bodyCellClasses });
57
77
  const bodyCheckboxAttrs = getAttrs("bodyCheckbox", { isComponent: true });
58
78
  const bodyCellDateSeparatorAttrs = getAttrs("bodyCellDateSeparator");
59
79
  const bodyDateSeparatorAttrs = getAttrs("bodyDateSeparator", { isComponent: true });
@@ -61,14 +81,13 @@ export function useAttrs(
61
81
  const bodyCellSecondaryAttrs = getAttrs("bodyCellSecondary");
62
82
  const bodyCellSecondaryEmptyAttrs = getAttrs("bodyCellSecondaryEmpty");
63
83
  const footerAttrsRaw = getAttrs("footer");
64
- const footerRowAttrs = getAttrs("footerRow");
65
- const footerCellAttrs = getAttrs("footerCell", { isComponent: true });
84
+ const footerRowAttrs = getAttrs("footerRow", { classes: footerRowClasses });
66
85
  const stickyFooterRowAttrs = getAttrs("stickyFooterRow");
67
86
  const bodyEmptyStateAttrs = getAttrs("bodyEmptyState", { isComponent: true });
68
87
  const bodyRowBeforeAttrsRaw = getAttrs("bodyRowBefore");
69
- const bodyRowBeforeCellAttrs = getAttrs("bodyRowBeforeCell", { isComponent: true });
88
+ const bodyRowBeforeCellAttrsRaw = getAttrs("bodyRowBeforeCell");
70
89
  const bodyRowAfterAttrs = getAttrs("bodyRowAfter");
71
- const bodyRowAfterCellAttrs = getAttrs("bodyRowAfterCell", { isComponent: true });
90
+ const bodyRowAfterCellAttrsRaw = getAttrs("bodyRowAfterCell");
72
91
  const bodyCellNestedWrapperAttrsRaw = getAttrs("bodyCellNestedWrapper");
73
92
 
74
93
  const bodyRowAttrsRaw = getAttrs("bodyRow");
@@ -78,6 +97,16 @@ export function useAttrs(
78
97
  class: cx([bodyCellAttrsRaw.value.class, classes || ""]),
79
98
  }));
80
99
 
100
+ const bodyRowBeforeCellAttrs = computed(() => ({
101
+ ...bodyRowBeforeAttrsRaw.value,
102
+ class: cx([bodyCellAttrs.value().class, bodyRowBeforeCellAttrsRaw.value.class]),
103
+ }));
104
+
105
+ const bodyRowAfterCellAttrs = computed(() => ({
106
+ ...bodyRowAfterCellAttrsRaw.value,
107
+ class: cx([bodyCellAttrs.value().class, bodyRowAfterCellAttrsRaw.value.class]),
108
+ }));
109
+
81
110
  const bodyRowAttrs = computed(() => (row) => ({
82
111
  ...bodyRowAttrsRaw.value,
83
112
  class: cx([bodyRowAttrsRaw.value.class, row]),
@@ -85,7 +114,7 @@ export function useAttrs(
85
114
 
86
115
  const headerCellAttrs = computed(() => (classes) => ({
87
116
  ...headerCellAttrsRaw.value,
88
- class: cx([config.value.headerCellGeneral, headerCellAttrsRaw.value.class, classes]),
117
+ class: cx([headerCellGeneralClasses.value, headerCellAttrsRaw.value.class, classes]),
89
118
  }));
90
119
 
91
120
  const stickyHeaderActionsCounterAttrs = computed(() => ({
@@ -151,7 +180,7 @@ export function useAttrs(
151
180
 
152
181
  const stickyHeaderCellAttrs = computed(() => (classes) => ({
153
182
  ...stickyHeaderCellAttrsRaw.value,
154
- class: cx([config.value.headerCellGeneral, stickyHeaderCellAttrsRaw.value.class, classes]),
183
+ class: cx([headerCellGeneralClasses.value, stickyHeaderCellAttrsRaw.value.class, classes]),
155
184
  }));
156
185
 
157
186
  const bodyRowDateSeparatorAttrs = (rowIndex) => {
@@ -188,7 +217,6 @@ export function useAttrs(
188
217
  bodyRowDateSeparatorAttrs,
189
218
  bodyCellNestedWrapperAttrs,
190
219
  bodyCellAttrs,
191
- footerCellAttrs,
192
220
  stickyHeaderCounterAttrs,
193
221
  stickyHeaderActionsCounterAttrs,
194
222
  headerCounterAttrs,
@@ -1,6 +1,13 @@
1
1
  export default /*tw*/ {
2
2
  wrapper: "relative",
3
- headerCellGeneral: "p-4 text-sm font-normal text-gray-500 text-left",
3
+ headerCellGeneral: {
4
+ base: "p-4 first:p-5 text-sm font-normal text-gray-500 text-left",
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
+ },
4
11
  headerCounterGeneral: "mr-3 font-medium text-sm text-gray-900",
5
12
  stickyHeader: "fixed top-0 flex items-center z-30 overflow-hidden rounded-none border",
6
13
  stickyHeaderRow: "border-gray-200 bg-white",
@@ -28,7 +35,14 @@ export default /*tw*/ {
28
35
  bodyRowAfter: "!p-0",
29
36
  bodyRowAfterCell: "py-1",
30
37
  bodyRowDateSeparator: "",
31
- bodyCell: "",
38
+ bodyCell: {
39
+ base: "p-[1.125rem] py-5 first:p-5 truncate align-top last:p-5",
40
+ variants: {
41
+ compact: {
42
+ true: "px-4 py-3 last:px-4 last:py-3 first:px-4 first:py-3",
43
+ },
44
+ },
45
+ },
32
46
  bodyCellSecondary: "mt-1 text-xs text-gray-500",
33
47
  bodyCellSecondaryEmpty: "inline-block",
34
48
  bodyCellCheckbox: "first:px-4", // try to remove first
@@ -43,8 +57,14 @@ export default /*tw*/ {
43
57
  bodyDateSeparator: "",
44
58
  bodyEmptyState: "my-8",
45
59
  footer: "group/footer border-t border-solid border-gray-200",
46
- footerRow: "",
47
- footerCell: "",
60
+ footerRow: {
61
+ base: "[&_td]:p-[1.125rem] [&_td]:py-5 first:[&_td]:p-5",
62
+ variants: {
63
+ compact: {
64
+ true: "[&_td]:p-4",
65
+ },
66
+ },
67
+ },
48
68
  stickyFooter: "relative group/footer-fixed",
49
69
  stickyFooterRow: `
50
70
  fixed bottom-0 -ml-px border border-b border-gray-200 bg-white
@@ -2,7 +2,6 @@ import { getArgTypes, getSlotNames } from "../service.storybook";
2
2
  import { getRandomId } from "../service.ui";
3
3
 
4
4
  import UTable from "../ui.data-table";
5
- import UTableCell from "../ui.data-table-cell";
6
5
  import UButton from "../ui.button";
7
6
  import ULink from "../ui.button-link";
8
7
  import UMoney from "../ui.text-money";
@@ -110,7 +109,7 @@ const EmptyTemplate = (args) => ({
110
109
  });
111
110
 
112
111
  const SlotTemplate = (args) => ({
113
- components: { UTable, UButton, UTableCell, ULink, UMoney, UBadge, URow },
112
+ components: { UTable, UButton, ULink, UMoney, UBadge, URow },
114
113
  setup() {
115
114
  return { args };
116
115
  },
@@ -166,12 +165,12 @@ stickyFooter.args = {
166
165
  stickyFooter: true,
167
166
  slotTemplate: `
168
167
  <template #footer>
169
- <UTableCell>
168
+ <td>
170
169
  <p>
171
170
  🤘🤘🤘
172
171
  Lorem ipsum dolor sit amet.
173
172
  </p>
174
- </UTableCell>
173
+ </td>
175
174
  </template>
176
175
  `,
177
176
  };
@@ -201,8 +200,8 @@ slotDefault.args = {
201
200
  `,
202
201
  };
203
202
 
204
- export const slotTheadActions = SlotTemplate.bind({});
205
- slotTheadActions.args = {
203
+ export const slotHeaderActions = SlotTemplate.bind({});
204
+ slotHeaderActions.args = {
206
205
  numberOfRows: 50,
207
206
  stickyHeader: true,
208
207
  selectable: true,
@@ -227,8 +226,8 @@ slotTheadActions.args = {
227
226
  `,
228
227
  };
229
228
 
230
- export const slotbodyRowBefore = SlotTemplate.bind({});
231
- slotbodyRowBefore.args = {
229
+ export const slotBeforeFirstRow = SlotTemplate.bind({});
230
+ slotBeforeFirstRow.args = {
232
231
  slotTemplate: `
233
232
  <template #before-first-row>
234
233
  <p>
@@ -241,8 +240,8 @@ slotbodyRowBefore.args = {
241
240
  `,
242
241
  };
243
242
 
244
- export const slotbodyRowAfter = SlotTemplate.bind({});
245
- slotbodyRowAfter.args = {
243
+ export const slotAfterLastRow = SlotTemplate.bind({});
244
+ slotAfterLastRow.args = {
246
245
  slotTemplate: `
247
246
  <template #after-last-row>
248
247
  <p>
@@ -255,18 +254,18 @@ slotbodyRowAfter.args = {
255
254
  `,
256
255
  };
257
256
 
258
- export const slotTfoot = SlotTemplate.bind({});
259
- slotTfoot.args = {
257
+ export const slotFooter = SlotTemplate.bind({});
258
+ slotFooter.args = {
260
259
  slotTemplate: `
261
- <template #tfoot>
262
- <UTableCell>
260
+ <template #footer>
261
+ <td>
263
262
  <p>
264
263
  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
265
264
  sed do eiusmod tempor incididunt ut labore et dolore magna
266
265
  aliqua. Ut enim ad minim veniam, quis nostrud exercitation
267
266
  ullamco laboris nisi ut aliquip ex ea commodo consequat.
268
267
  </p>
269
- </UTableCell>
268
+ </td>
270
269
  </template>
271
270
  `,
272
271
  };
@@ -76,15 +76,14 @@
76
76
  <table v-bind="tableAttrs">
77
77
  <thead v-bind="headerAttrs" :style="tableRowWidthStyle">
78
78
  <tr v-if="hasSlotContent($slots['before-header'])" v-bind="headerRowAttrs">
79
- <UTableCell
79
+ <td
80
80
  v-if="hasSlotContent($slots['before-header'])"
81
81
  :colspan="colsCount"
82
- :compact="compact"
83
82
  v-bind="headerCellAttrs()"
84
83
  >
85
84
  <!-- @slot Use it to add something before header row. -->
86
85
  <slot name="before-header" :cols-count="colsCount" />
87
- </UTableCell>
86
+ </td>
88
87
  </tr>
89
88
 
90
89
  <tr v-if="hasSlotContent($slots['before-header'])" v-bind="headerRowAttrs"></tr>
@@ -132,18 +131,14 @@
132
131
 
133
132
  <tbody v-if="tableRows.length" v-bind="bodyAttrs">
134
133
  <template v-for="(row, rowIndex) in tableRows" :key="row.id">
135
- <tr v-if="rowIndex === firstRow" v-bind="bodyRowBeforeAttrs">
136
- <UTableCell
137
- v-if="hasSlotContent($slots['before-first-row'])"
138
- :colspan="colsCount"
139
- :compact="compact"
140
- v-bind="bodyRowBeforeCellAttrs"
141
- >
134
+ <tr
135
+ v-if="rowIndex === firstRow && hasSlotContent($slots['before-first-row'])"
136
+ v-bind="bodyRowBeforeAttrs"
137
+ >
138
+ <td :colspan="colsCount" v-bind="bodyRowBeforeCellAttrs">
142
139
  <!-- @slot Use it to add something before first row. -->
143
140
  <slot name="before-first-row" />
144
- </UTableCell>
145
-
146
- <td v-else :colspan="colsCount" v-bind="bodyRowBeforeCellAttrs" />
141
+ </td>
147
142
  </tr>
148
143
 
149
144
  <tr
@@ -165,11 +160,7 @@
165
160
  :data-cy="`${dataCy}-row`"
166
161
  @click="onClickRow(row)"
167
162
  >
168
- <UTableCell
169
- v-if="selectable"
170
- :compact="compact"
171
- v-bind="bodyCellAttrs(config.bodyCellCheckbox)"
172
- >
163
+ <td v-if="selectable" v-bind="bodyCellAttrs(config.bodyCellCheckbox)">
173
164
  <UCheckbox
174
165
  v-model="selectedRows"
175
166
  :data-id="row.id"
@@ -179,12 +170,11 @@
179
170
  v-bind="bodyCheckboxAttrs"
180
171
  @click.stop
181
172
  />
182
- </UTableCell>
173
+ </td>
183
174
 
184
- <UTableCell
175
+ <td
185
176
  v-for="(value, key, index) in TableService.getFilteredRow(row, columns)"
186
177
  :key="index"
187
- :compact="compact"
188
178
  v-bind="bodyCellAttrs(getCellClasses(key))"
189
179
  >
190
180
  <template v-if="hasSlotContent($slots[`cell-${key}`])">
@@ -245,21 +235,17 @@
245
235
  {{ value || HYPHEN_SYMBOL }}
246
236
  </div>
247
237
  </template>
248
- </UTableCell>
238
+ </td>
249
239
  </tr>
250
240
 
251
- <tr v-if="rowIndex === lastRow" v-bind="bodyRowAfterAttrs">
252
- <UTableCell
253
- v-if="hasSlotContent($slots['after-last-row'])"
254
- :compact="compact"
255
- :colspan="colsCount"
256
- v-bind="bodyRowAfterCellAttrs"
257
- >
241
+ <tr
242
+ v-if="rowIndex === lastRow && hasSlotContent($slots['after-last-row'])"
243
+ v-bind="bodyRowAfterAttrs"
244
+ >
245
+ <td :colspan="colsCount" v-bind="bodyRowAfterCellAttrs">
258
246
  <!-- @slot Use it to add something after last row. -->
259
247
  <slot name="after-last-row" />
260
- </UTableCell>
261
-
262
- <td v-else :colspan="colsCount" v-bind="bodyRowAfterCellAttrs" />
248
+ </td>
263
249
  </tr>
264
250
  </template>
265
251
  </tbody>
@@ -282,14 +268,14 @@
282
268
 
283
269
  <tfoot v-if="hasSlotContent($slots['footer'])" v-bind="footerClassesAttrs">
284
270
  <tr ref="footerRowRef" v-bind="footerRowAttrs">
285
- <UTableCell v-if="selectable" :compact="compact" v-bind="footerCellAttrs" />
271
+ <td v-if="selectable" />
286
272
 
287
273
  <!-- @slot Use it to add something in table footer. -->
288
274
  <slot name="footer" :cols-count="colsCount" />
289
275
  </tr>
290
276
 
291
277
  <tr ref="stickyFooterRowRef" :style="tableRowWidthStyle" v-bind="stickyFooterRowAttrs">
292
- <UTableCell v-if="selectable" :compact="compact" v-bind="footerCellAttrs" />
278
+ <td v-if="selectable" />
293
279
 
294
280
  <!-- @slot Use it to add something in table footer. -->
295
281
  <slot name="footer" :cols-count="colsCount" />
@@ -319,7 +305,6 @@ import UEmpty from "../ui.text-empty";
319
305
  import UDivider from "../ui.container-divider";
320
306
  import UCheckbox from "../ui.form-checkbox";
321
307
  import ULoaderTop from "../ui.loader-top";
322
- import UTableCell from "../ui.data-table-cell";
323
308
 
324
309
  import UIService from "../service.ui";
325
310
 
@@ -523,7 +508,6 @@ const {
523
508
  bodyCellNestedWrapperAttrs,
524
509
  headerCellAttrs,
525
510
  bodyCellAttrs,
526
- footerCellAttrs,
527
511
  stickyHeaderActionsCheckboxAttrs,
528
512
  stickyHeaderCheckboxAttrs,
529
513
  headerCheckboxAttrs,
@@ -595,7 +579,7 @@ onBeforeUnmount(() => {
595
579
  });
596
580
 
597
581
  function onWindowResize() {
598
- tableWidth.value = tableWrapperRef.value.offsetWidth;
582
+ tableWidth.value = tableWrapperRef.value?.offsetWidth || 0;
599
583
 
600
584
  setHeaderCellWidth();
601
585
  setFooterCellWidth();
@@ -35,7 +35,7 @@ export default /*tw*/ {
35
35
  },
36
36
  },
37
37
  placeholder: {
38
- base: "pr-4 text-gray-700 flex-grow",
38
+ base: "pr-4 text-gray-700 flex-grow w-full",
39
39
  variants: {
40
40
  size: {
41
41
  sm: "text-sm",
@@ -49,12 +49,13 @@ export default /*tw*/ {
49
49
  chooseFileIconName: "attach_file",
50
50
  clearIcon: "",
51
51
  clearIconName: "close",
52
- removeItemIcon: "",
52
+ removeItemIcon: "ml-2",
53
53
  removeItemIconName: "close",
54
54
  dropzoneWrapperHover: "border-gray-400 border-dashed",
55
55
  dropzoneWrapperError: "hover:border-red-400 border-dashed border-red-300",
56
56
  input: "sr-only pointer-events-none size-0 opacity-0",
57
57
  buttonWrapper: "flex gap-4 items-center",
58
+ fileList: "w-full",
58
59
  i18n: {
59
60
  sizeError: "File size is too big.",
60
61
  formatError: "Format is not supported.",
@@ -40,6 +40,28 @@ const DefaultTemplate = (args) => ({
40
40
  `,
41
41
  });
42
42
 
43
+ const SlotTemplate = (args) => ({
44
+ components: { UInputFile },
45
+ setup() {
46
+ return { args };
47
+ },
48
+ data() {
49
+ return {
50
+ files: [],
51
+ error: args.error || "",
52
+ };
53
+ },
54
+ template: `
55
+ <UInputFile
56
+ v-bind="args"
57
+ v-model="files"
58
+ v-model:error="error"
59
+ >
60
+ ${args.slotTemplate}
61
+ </UInputFile>
62
+ `,
63
+ });
64
+
43
65
  const LabelAlignTemplate = (args, { argTypes } = {}) => ({
44
66
  components: { UInputFile, URow },
45
67
  setup() {
@@ -98,3 +120,12 @@ sizes.args = {};
98
120
 
99
121
  export const labelAlign = LabelAlignTemplate.bind({});
100
122
  labelAlign.args = {};
123
+
124
+ export const slotLeft = SlotTemplate.bind({});
125
+ slotLeft.args = {
126
+ slotTemplate: `
127
+ <template #left>
128
+ 🥸
129
+ </template>
130
+ `,
131
+ };
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.170",
4
+ "version": "0.0.172",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -6730,48 +6730,6 @@
6730
6730
  "symbol": "default"
6731
6731
  }
6732
6732
  },
6733
- {
6734
- "name": "UTableCell",
6735
- "description": "",
6736
- "attributes": [
6737
- {
6738
- "name": "compact",
6739
- "description": "Makes the cell more narrow.",
6740
- "value": {
6741
- "kind": "expression",
6742
- "type": "boolean"
6743
- },
6744
- "default": "false"
6745
- },
6746
- {
6747
- "name": "config",
6748
- "description": "Sets component ui config object.",
6749
- "value": {
6750
- "kind": "expression",
6751
- "type": "object"
6752
- },
6753
- "default": "{}"
6754
- },
6755
- {
6756
- "name": "dataCy",
6757
- "description": "Sets data-cy attribute for automated testing.",
6758
- "value": {
6759
- "kind": "expression",
6760
- "type": "string"
6761
- },
6762
- "default": "\"\""
6763
- }
6764
- ],
6765
- "slots": [
6766
- {
6767
- "name": "default"
6768
- }
6769
- ],
6770
- "source": {
6771
- "module": "./src/ui.data-table-cell/index.vue",
6772
- "symbol": "default"
6773
- }
6774
- },
6775
6733
  {
6776
6734
  "name": "UTabs",
6777
6735
  "description": "",
@@ -1,24 +0,0 @@
1
- import useUI from "../../composable.ui";
2
- import { cva } from "../../service.ui";
3
-
4
- import defaultConfig from "../configs/default.config";
5
- import { computed } from "vue";
6
-
7
- export function useAttrs(props) {
8
- const { config, getAttrs } = useUI(defaultConfig, () => props.config);
9
- const { tableCell } = config.value;
10
-
11
- const cvaTableCell = cva({
12
- base: tableCell.base,
13
- variants: tableCell.variants,
14
- compoundVariants: tableCell.compoundVariants,
15
- });
16
-
17
- const tableCellClasses = computed(() => cvaTableCell({ compact: props.compact }));
18
-
19
- const tableCellAttrs = getAttrs("tableCell", { classes: tableCellClasses });
20
-
21
- return {
22
- tableCellAttrs,
23
- };
24
- }
@@ -1,19 +0,0 @@
1
- export default /*tw*/ {
2
- tableCell: {
3
- base: `
4
- p-[1.125rem] py-5 first:p-5 group-[]/body:truncate group-[]/body:align-top
5
- group-[]/body:last:p-5 !overflow-visible
6
- `,
7
- variants: {
8
- compact: {
9
- true: `
10
- group-[]/body:px-4 group-[]/body:py-3 group-[]/body:last:px-4 group-[]/body:last:py-3
11
- group-[]/body:first:px-4 group-[]/body:first:py-3 group-[]/footer:p-4:
12
- `,
13
- },
14
- },
15
- },
16
- defaultVariants: {
17
- compact: false,
18
- },
19
- };
@@ -1,5 +0,0 @@
1
- /*
2
- This const is needed to prevent the issue in script setup:
3
- `defineProps` is referencing locally declared variables. (vue/valid-define-props)
4
- */
5
- export const UTableCell = "UTableCell";
@@ -1,44 +0,0 @@
1
- <template>
2
- <td :data-cy="dataCy" v-bind="tableCellAttrs">
3
- <slot />
4
- </td>
5
- </template>
6
-
7
- <script setup>
8
- import UIService from "../service.ui";
9
-
10
- import { UTableCell } from "./constants";
11
- import defaultConfig from "./configs/default.config";
12
- import { useAttrs } from "./composables/attrs.composable";
13
-
14
- /* Should be a string for correct web-types gen */
15
- defineOptions({ name: "UTableCell", inheritAttrs: false });
16
-
17
- const props = defineProps({
18
- /**
19
- * Makes the cell more narrow.
20
- */
21
- compact: {
22
- type: Boolean,
23
- default: UIService.get(defaultConfig, UTableCell).default.compact,
24
- },
25
-
26
- /**
27
- * Sets component ui config object.
28
- */
29
- config: {
30
- type: Object,
31
- default: () => ({}),
32
- },
33
-
34
- /**
35
- * Sets data-cy attribute for automated testing.
36
- */
37
- dataCy: {
38
- type: String,
39
- default: "",
40
- },
41
- });
42
-
43
- const { tableCellAttrs } = useAttrs(props);
44
- </script>