vueless 0.0.160 → 0.0.161

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.
@@ -58,8 +58,8 @@ export default function useUI(defaultConfig = {}, propsConfigGetter = null, topL
58
58
 
59
59
  const commonAttrs = {
60
60
  ...attrs,
61
- component: isDev && (attrs.component || componentName || null),
62
- "config-key": isDev && (attrs["config-key"] || configKey || null),
61
+ component: isDev ? attrs.component || componentName || null : null,
62
+ "config-key": isDev ? attrs["config-key"] || configKey || null : null,
63
63
  "child-component": isDev && attrs.component ? componentName : null,
64
64
  "child-config-key": isDev && attrs.component ? configKey : null,
65
65
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.160",
3
+ "version": "0.0.161",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -39,20 +39,22 @@ export function useAttrs(
39
39
 
40
40
  const wrapperClasses = computed(() => cvaWrapper({ compact: props.compact }));
41
41
 
42
- const customHeaderItemClasses = computed(() => cvaCustomHeaderItem({ compact: props.compact }));
42
+ const stickyHeaderColumnClasses = computed(() => cvaCustomHeaderItem({ compact: props.compact }));
43
43
 
44
44
  const headerCellClasses = computed(() => cvaHeaderCell({ compact: props.compact }));
45
45
 
46
46
  const wrapperAttrs = getAttrs("wrapper", { classes: wrapperClasses });
47
- const customHeaderItemAttrsRaw = getAttrs("stickyHeaderColumn", {
48
- classes: customHeaderItemClasses,
47
+ const stickyHeaderAttrsRaw = getAttrs("stickyHeader");
48
+ const stickyHeaderColumnAttrsRaw = getAttrs("stickyHeaderColumn", {
49
+ classes: stickyHeaderColumnClasses,
49
50
  });
50
51
  const selectedRowsCountAttrs = getAttrs("selectedRowsCount");
51
52
  const selectAllCheckboxAttrs = getAttrs("selectAllCheckbox", { isComponent: true });
52
53
  const stickyHeaderLoaderAttrs = getAttrs("stickyHeaderLoader", { isComponent: true });
54
+ const tableWrapperAttrsRaw = getAttrs("tableWrapper");
53
55
  const tableAttrs = getAttrs("table");
54
56
  const headerAttrs = getAttrs("header");
55
- const headerRowAttrs = getAttrs("headerRow");
57
+ const headerRowAttrsRaw = getAttrs("headerRow");
56
58
  const headerCellAttrsRaw = getAttrs("headerCell", { classes: headerCellClasses });
57
59
  const headerSelectAllCheckboxAttrs = getAttrs("headerSelectAllCheckbox", { isComponent: true });
58
60
  const tableLoaderAttrs = getAttrs("tableLoader", { isComponent: true });
@@ -66,6 +68,7 @@ export function useAttrs(
66
68
  const toggleItemButtonAttrs = getAttrs("toggleItemButton");
67
69
  const secondaryRowAttrs = getAttrs("secondaryRow");
68
70
  const secondaryRowEmptyAttrs = getAttrs("secondaryRowEmpty");
71
+ const footerAttrsRaw = getAttrs("footer");
69
72
  const footerRowAttrs = getAttrs("footerRow");
70
73
  const footerCellAttrs = getAttrs("footerCell", { isComponent: true });
71
74
  const footerStickyRowAttrs = getAttrs("footerStickyRow");
@@ -74,6 +77,7 @@ export function useAttrs(
74
77
  const beforeFirstRowCellAttrs = getAttrs("beforeFirstRowCell", { isComponent: true });
75
78
  const afterLastRowAttrsRaw = getAttrs("afterLastRow");
76
79
  const afterLastRowCellAttrs = getAttrs("afterLastRowCell", { isComponent: true });
80
+ const toggleButtonWrapperAttrsRaw = getAttrs("toggleButtonWrapper");
77
81
 
78
82
  const bodyRowAttrsRaw = getAttrs("bodyRow");
79
83
 
@@ -101,35 +105,35 @@ export function useAttrs(
101
105
  }));
102
106
 
103
107
  const tableWrapperAttrs = computed(() => ({
108
+ ...tableWrapperAttrsRaw.value,
104
109
  class: cx([
105
- config.value.innerWrapper,
106
- selectedRows.value.length && config.value.innerWrapperSelected,
110
+ tableWrapperAttrsRaw.value.class,
111
+ selectedRows.value.length && config.value.tableWrapperSelected,
107
112
  ]),
108
113
  }));
109
114
 
110
- const headerRowCellAttrs = computed(() => ({
115
+ const headerRowAttrs = computed(() => ({
116
+ ...headerRowAttrsRaw.value,
111
117
  class: cx([
112
- config.value.headerRow,
118
+ headerRowAttrsRaw.value.class,
113
119
  selectedRows.value.length && !isHeaderSticky.value && config.value.stickyHeaderHidden,
114
120
  ]),
115
121
  }));
116
122
 
117
- const stickyHeaderAttrs = computed(() => {
118
- // console.log("hasSlotContentTheadActions", hasSlotContentTheadActions.value);
119
-
120
- return {
121
- class: cx([
122
- config.value.stickyHeader,
123
- selectedRows.value.length &&
124
- hasSlotContentTheadActions.value &&
125
- config.value.stickyHeaderActions,
126
- isHeaderSticky.value && props.stickyHeader && config.value.stickyHeaderActive,
127
- ]),
128
- };
129
- });
123
+ const stickyHeaderAttrs = computed(() => ({
124
+ ...stickyHeaderAttrsRaw.value,
125
+ class: cx([
126
+ stickyHeaderAttrsRaw.value.class,
127
+ selectedRows.value.length &&
128
+ hasSlotContentTheadActions.value &&
129
+ config.value.stickyHeaderActions,
130
+ isHeaderSticky.value && props.stickyHeader && config.value.stickyHeaderActive,
131
+ ]),
132
+ }));
130
133
 
131
134
  const footerClassesAttrs = computed(() => ({
132
- class: cx([config.value.footer, isFooterSticky.value && config.value.footerSticky]),
135
+ ...footerAttrsRaw.value,
136
+ class: cx([footerAttrsRaw.value.class, isFooterSticky.value && config.value.footerSticky]),
133
137
  }));
134
138
 
135
139
  const afterLastRowAttrs = computed(() => ({
@@ -141,8 +145,8 @@ export function useAttrs(
141
145
  }));
142
146
 
143
147
  const stickyHeaderColumnAttrs = computed(() => (thClass) => ({
144
- ...customHeaderItemAttrsRaw.value,
145
- class: cx([customHeaderItemAttrsRaw.value.class, thClass]),
148
+ ...stickyHeaderColumnAttrsRaw.value,
149
+ class: cx([stickyHeaderColumnAttrsRaw.value.class, thClass]),
146
150
  }));
147
151
 
148
152
  const dateSeparatorRowAttrs = (rowIndex) => {
@@ -158,6 +162,7 @@ export function useAttrs(
158
162
  };
159
163
 
160
164
  const toggleButtonWrapperAttrs = computed(() => (index) => ({
165
+ ...toggleButtonWrapperAttrsRaw.value,
161
166
  class: index === 0 && isNesting.value ? config.value.toggleButtonWrapper : "",
162
167
  }));
163
168
 
@@ -167,7 +172,8 @@ export function useAttrs(
167
172
  stickyHeaderColumnAttrs,
168
173
  stickyHeaderAttrs,
169
174
  tableWrapperAttrs,
170
- headerRowCellAttrs,
175
+ headerCellAttrs,
176
+ headerRowAttrs,
171
177
  bodyRowAttrs,
172
178
  footerClassesAttrs,
173
179
  afterLastRowAttrs,
@@ -176,7 +182,6 @@ export function useAttrs(
176
182
  beforeFirstRowCellAttrs,
177
183
  dateSeparatorRowAttrs,
178
184
  toggleButtonWrapperAttrs,
179
- headerCellAttrs,
180
185
  bodyCellAttrs,
181
186
  checkboxBodyWrapperCellAttrs,
182
187
  footerCellAttrs,
@@ -190,7 +195,6 @@ export function useAttrs(
190
195
  selectedRowsCountAttrs,
191
196
  stickyHeaderLoaderAttrs,
192
197
  tableAttrs,
193
- headerRowAttrs,
194
198
  tableLoaderAttrs,
195
199
  bodyAttrs,
196
200
  toggleItemButtonAttrs,
@@ -20,8 +20,8 @@ export default /*tw*/ {
20
20
  stickyHeaderColumn: "flex-none text-sm font-normal text-gray-500 p-4 whitespace-nowrap",
21
21
  selectedRowsCount: "absolute left-11 pr-2 font-medium text-sm text-gray-900 bg-gradient-to-r from-white from-80%",
22
22
  selectAllCheckbox: "flex-none text-sm font-normal text-gray-500 pr-[1.125rem] pl-4 py-4 group-[]/table-compact:!px-4",
23
- innerWrapper: "!overflow-x-auto rounded-lg border border-gray-200",
24
- innerWrapperSelected: "!rounded-t-none border-t-0",
23
+ tableWrapper: "!overflow-x-auto rounded-lg border border-gray-200",
24
+ tableWrapperSelected: "!rounded-t-none border-t-0",
25
25
  table: "min-w-full border-none text-sm w-full",
26
26
  tableLoader: "absolute !top-auto",
27
27
  moreRow: "!px-0 !py-4 first:mx-auto",
@@ -492,7 +492,7 @@ const {
492
492
  stickyHeaderColumnAttrs,
493
493
  stickyHeaderAttrs,
494
494
  tableWrapperAttrs,
495
- headerRowCellAttrs,
495
+ headerRowAttrs,
496
496
  afterLastRowAttrs,
497
497
  afterLastRowCellAttrs,
498
498
  beforeFirstRowAttrs,
@@ -515,7 +515,6 @@ const {
515
515
  selectedRowsCountAttrs,
516
516
  stickyHeaderLoaderAttrs,
517
517
  tableAttrs,
518
- headerRowAttrs,
519
518
  tableLoaderAttrs,
520
519
  bodyAttrs,
521
520
  toggleItemButtonAttrs,
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.160",
4
+ "version": "0.0.161",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",