vueless 0.0.800 → 0.0.801

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.800",
3
+ "version": "0.0.801",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -49,7 +49,7 @@ export default /*tw*/ {
49
49
  bodyRowBeforeChecked: "{>bodyRowChecked} !p-0",
50
50
  bodyRowBeforeCell: "{>bodyCellBase} py-1",
51
51
  bodyRowAfter: "!p-0",
52
- bodyRowDateDivider: "",
52
+ bodyRowDateDivider: "first:hidden",
53
53
  bodyRowCheckedDateDivider: "{>bodyRowChecked} {>bodyRowChecked}",
54
54
  bodyCellBase: {
55
55
  base: "p-4 truncate align-top",
@@ -64,16 +64,30 @@ export default {
64
64
  },
65
65
  } as Meta;
66
66
 
67
- function getDateDividerRow() {
68
- return {
69
- id: getRandomId(),
70
- isChecked: false,
71
- rowDate: new Date().toString(),
72
- key_1: "Info",
73
- key_2: "Statistics",
74
- key_3: "Reports",
75
- key_4: "Discounts",
76
- };
67
+ function getDateDividerRow(rowAmount: number) {
68
+ return Array(rowAmount)
69
+ .fill({})
70
+ .map((_, index) => {
71
+ let rowDate = new Date().toString();
72
+
73
+ if (index > Math.round(rowAmount / 2)) {
74
+ const date = new Date();
75
+
76
+ date.setFullYear(date.getFullYear() + 1);
77
+
78
+ rowDate = date.toDateString();
79
+ }
80
+
81
+ return {
82
+ id: getRandomId(),
83
+ isChecked: false,
84
+ rowDate,
85
+ key_1: "Info",
86
+ key_2: "Statistics",
87
+ key_3: "Reports",
88
+ key_4: "Discounts",
89
+ };
90
+ });
77
91
  }
78
92
 
79
93
  function getNestedRow() {
@@ -327,16 +341,17 @@ export const Compact = DefaultTemplate.bind({});
327
341
  Compact.args = { compact: true };
328
342
 
329
343
  export const DateDivider = DefaultTemplate.bind({});
330
- DateDivider.args = { dateDivider: true, row: getDateDividerRow };
344
+ DateDivider.args = { dateDivider: true, rows: getDateDividerRow(10) };
331
345
 
332
346
  export const DateDividerCustomLabel = DefaultTemplate.bind({});
347
+
348
+ const dateDividerCustomLabelRows = getDateDividerRow(10);
349
+
333
350
  DateDividerCustomLabel.args = {
334
- rows: Array(10)
335
- .fill({})
336
- .map(() => getDateDividerRow()),
351
+ rows: dateDividerCustomLabelRows,
337
352
  dateDivider: [
338
353
  {
339
- date: new Date().toString(),
354
+ date: dateDividerCustomLabelRows.at(6)!.rowDate,
340
355
  label: "Custom label for specific date",
341
356
  config: { label: "!text-orange-400", divider: "!border-orange-300" },
342
357
  },