@swiftwc/ui 0.0.0-dev.50 → 0.0.0-dev.52
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/generated/components/h-stack.d.ts +10 -0
- package/generated/components/h-stack.js +19 -0
- package/generated/components/index.d.ts +1 -0
- package/generated/components/index.js +1 -0
- package/generated/components/table-view.d.ts +2 -0
- package/generated/components/table-view.js +16 -40
- package/generated/components/v-stack.d.ts +3 -0
- package/generated/components/v-stack.js +3 -0
- package/generated/css/index.css +137 -55
- package/package.json +1 -1
- package/scss/components/_table-column.scss +2 -0
- package/scss/components/_table-row.scss +36 -0
- package/scss/components/_table-view.scss +15 -7
- package/scss/utils/_stacks.scss +2 -1
- package/web-components.html-data/en.json +63 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { devFlags } from '../internal/utils';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @attr {@spacingSet} spacing - The gap between the primary axis
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export class HStack extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
}
|
|
11
|
+
connectedCallback() {
|
|
12
|
+
if (devFlags.debug)
|
|
13
|
+
console.debug(`${HStack.name} ⚡️ connect`);
|
|
14
|
+
}
|
|
15
|
+
disconnectedCallback() {
|
|
16
|
+
if (devFlags.debug)
|
|
17
|
+
console.debug(`${HStack.name} ⚡️ disconnect`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -11,6 +11,7 @@ export * from './fine-tooltip';
|
|
|
11
11
|
export * from './form-view';
|
|
12
12
|
export * from './glass-button';
|
|
13
13
|
export * from './glass-prominent-button';
|
|
14
|
+
export * from './h-stack';
|
|
14
15
|
export * from './image-view';
|
|
15
16
|
export * from './label-view';
|
|
16
17
|
export * from './list-view';
|
|
@@ -11,6 +11,7 @@ export * from './fine-tooltip';
|
|
|
11
11
|
export * from './form-view';
|
|
12
12
|
export * from './glass-button';
|
|
13
13
|
export * from './glass-prominent-button';
|
|
14
|
+
export * from './h-stack';
|
|
14
15
|
export * from './image-view';
|
|
15
16
|
export * from './label-view';
|
|
16
17
|
export * from './list-view';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @summary Display selectable, sortable data arranged in rows and columns.
|
|
3
|
+
*
|
|
4
|
+
* @attr {title:trailing:subtitle|trailing:title:subtitle|title:subtitle:trailing|*} preferred-compact-template - Sets the template areas when the table is in compact mode
|
|
3
5
|
*/
|
|
4
6
|
export declare class TableView extends HTMLElement {
|
|
5
7
|
#private;
|
|
@@ -2,10 +2,12 @@ var _a;
|
|
|
2
2
|
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
3
3
|
import { CSSStyleObserver } from '../internal/class/css-style-observer';
|
|
4
4
|
import { MutationObserverSet } from '../internal/class/mutation-observer-set';
|
|
5
|
-
import { $, devFlags, listActive, onoff } from '../internal/utils';
|
|
5
|
+
import { $, devFlags, listActive, onoff, renderLabelTitle } from '../internal/utils';
|
|
6
6
|
import { Snapshot } from '../snapshot';
|
|
7
7
|
/**
|
|
8
8
|
* @summary Display selectable, sortable data arranged in rows and columns.
|
|
9
|
+
*
|
|
10
|
+
* @attr {title:trailing:subtitle|trailing:title:subtitle|title:subtitle:trailing|*} preferred-compact-template - Sets the template areas when the table is in compact mode
|
|
9
11
|
*/
|
|
10
12
|
export class TableView extends HTMLElement {
|
|
11
13
|
#styleObserver;
|
|
@@ -54,35 +56,6 @@ export class TableView extends HTMLElement {
|
|
|
54
56
|
this.#slots = new Map();
|
|
55
57
|
});
|
|
56
58
|
this.#slots?.get('column')?.addEventListener('slotchange', this.#handleColumnSlotchange);
|
|
57
|
-
// this.append(
|
|
58
|
-
// document.createRange().createContextualFragment(`<menu-view slot="header-trailing">
|
|
59
|
-
// <label-view slot="label" title="Delete"></label-view>
|
|
60
|
-
// <button type="button" tabindex="0">
|
|
61
|
-
// <label-view system-image="dots-three" title="Scan Documents"></label-view>
|
|
62
|
-
// </button>
|
|
63
|
-
// <button type="button" tabindex="0">
|
|
64
|
-
// <label-view system-image="dots-three" title="Connect to Server"></label-view>
|
|
65
|
-
// </button>
|
|
66
|
-
// <button type="button" tabindex="0">
|
|
67
|
-
// <label-view title="Edit Sidebar"></label-view>
|
|
68
|
-
// </button>
|
|
69
|
-
// </menu-view>
|
|
70
|
-
// `)
|
|
71
|
-
// $(`<menu-view slot="header-trailing">
|
|
72
|
-
// <label-view slot="label" title="Delete"></label-view>
|
|
73
|
-
// <button type="button" tabindex="0">
|
|
74
|
-
// <label-view system-image="dots-three" title="Scan Documents"></label-view>
|
|
75
|
-
// </button>
|
|
76
|
-
// <button type="button" tabindex="0">
|
|
77
|
-
// <label-view system-image="dots-three" title="Connect to Server"></label-view>
|
|
78
|
-
// </button>
|
|
79
|
-
// <button type="button" tabindex="0">
|
|
80
|
-
// <label-view title="Edit Sidebar"></label-view>
|
|
81
|
-
// </button>
|
|
82
|
-
// </menu-view>
|
|
83
|
-
// <div slot="footer-leading">22</div>
|
|
84
|
-
// <div slot="footer-trailing"><button><</button> <button>></button></div>`)
|
|
85
|
-
// )
|
|
86
59
|
}
|
|
87
60
|
disconnectedCallback() {
|
|
88
61
|
if (devFlags.debug)
|
|
@@ -96,7 +69,6 @@ export class TableView extends HTMLElement {
|
|
|
96
69
|
if (devFlags.debug)
|
|
97
70
|
console.debug(`${_a.name} ⚡️ connect`);
|
|
98
71
|
CleanupRegistry.register(this, onoff(listActive(this), this).on());
|
|
99
|
-
// console.log(999, this.#shadowRoot.querySelector('[part*=table-column-stack]'))
|
|
100
72
|
this.#styleObserver = new CSSStyleObserver({
|
|
101
73
|
properties: ['--adaptable-table-style-index'],
|
|
102
74
|
});
|
|
@@ -134,8 +106,10 @@ export class TableView extends HTMLElement {
|
|
|
134
106
|
<label-view font="callout" foreground="secondary"></label-view>
|
|
135
107
|
</v-stack>
|
|
136
108
|
</button>`, '>1'), title = btn.querySelector('label-view:first-child'), subTitle = btn.querySelector('label-view:last-child');
|
|
137
|
-
|
|
138
|
-
|
|
109
|
+
if (title)
|
|
110
|
+
renderLabelTitle(title, node.textContent.trim()); //title?.setAttribute('title', node.textContent.trim())
|
|
111
|
+
if (subTitle)
|
|
112
|
+
renderLabelTitle(subTitle, node.ariaSort ?? ''); //subTitle?.setAttribute('title', node.ariaSort ?? '')
|
|
139
113
|
this.#compactToolbarItem.appendChild(btn);
|
|
140
114
|
}
|
|
141
115
|
};
|
|
@@ -150,16 +124,19 @@ export class TableView extends HTMLElement {
|
|
|
150
124
|
const adaptableTableStyle = style.getPropertyValue('--adaptable-table-style') || 'compact';
|
|
151
125
|
switch (adaptableTableStyle) {
|
|
152
126
|
case 'expanded':
|
|
153
|
-
if (
|
|
154
|
-
|
|
155
|
-
this.#compactToolbarItem?.remove();
|
|
127
|
+
if (this.#compactToolbarItem?.isConnected)
|
|
128
|
+
this.#compactToolbarItem?.remove();
|
|
156
129
|
break;
|
|
157
130
|
default:
|
|
158
131
|
if (!this.#compactToolbarItem)
|
|
159
132
|
break;
|
|
160
|
-
if (this.#
|
|
133
|
+
if (!this.#slots
|
|
134
|
+
?.get('column')
|
|
135
|
+
?.assignedElements()
|
|
136
|
+
.filter((el) => el.matches(':is(button[is=table-column])')).length)
|
|
161
137
|
break;
|
|
162
|
-
|
|
138
|
+
if (!this.#compactToolbarItem?.isConnected)
|
|
139
|
+
this.insertAdjacentElement('beforeend', this.#compactToolbarItem);
|
|
163
140
|
break;
|
|
164
141
|
}
|
|
165
142
|
};
|
|
@@ -169,8 +146,7 @@ export class TableView extends HTMLElement {
|
|
|
169
146
|
const btn = target.closest('button');
|
|
170
147
|
if (!btn)
|
|
171
148
|
return;
|
|
172
|
-
const siblings = [...(btn.parentNode?.querySelectorAll(':scope>button') ?? [])];
|
|
173
|
-
const index = siblings.indexOf(btn);
|
|
149
|
+
const siblings = [...(btn.parentNode?.querySelectorAll(':scope>button') ?? [])], index = siblings.indexOf(btn);
|
|
174
150
|
this.querySelector(`:scope>[slot=column]:nth-of-type(${index + 1})`)?.click();
|
|
175
151
|
};
|
|
176
152
|
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* @attr {leading|"leading fill"|center|trailing|fill|space-between} distribution - The distribution of cols
|
|
3
3
|
*
|
|
4
4
|
* @attr {"auto spacer"|"auto auto spacer"|"auto auto auto spacer"} template
|
|
5
|
+
*
|
|
6
|
+
* @attr {@spacingSet} spacing - The gap between the primary axis
|
|
7
|
+
*
|
|
5
8
|
*/
|
|
6
9
|
export declare class VStack extends HTMLElement {
|
|
7
10
|
constructor();
|
|
@@ -3,6 +3,9 @@ import { devFlags } from '../internal/utils';
|
|
|
3
3
|
* @attr {leading|"leading fill"|center|trailing|fill|space-between} distribution - The distribution of cols
|
|
4
4
|
*
|
|
5
5
|
* @attr {"auto spacer"|"auto auto spacer"|"auto auto auto spacer"} template
|
|
6
|
+
*
|
|
7
|
+
* @attr {@spacingSet} spacing - The gap between the primary axis
|
|
8
|
+
*
|
|
6
9
|
*/
|
|
7
10
|
export class VStack extends HTMLElement {
|
|
8
11
|
constructor() {
|
package/generated/css/index.css
CHANGED
|
@@ -4248,7 +4248,8 @@
|
|
|
4248
4248
|
column-gap: var(--table-col-gap);
|
|
4249
4249
|
padding-inline: var(--list--host-padding-inline, 0px);
|
|
4250
4250
|
padding-block: var(--table-row-gap);
|
|
4251
|
-
|
|
4251
|
+
font-size: 0.875rem;
|
|
4252
|
+
font-weight: 600;
|
|
4252
4253
|
background-color: var(--separator);
|
|
4253
4254
|
}
|
|
4254
4255
|
:where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) > [slot^=header],
|
|
@@ -4280,12 +4281,21 @@
|
|
|
4280
4281
|
:where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view)) {
|
|
4281
4282
|
--table--expanded-columns: 1;
|
|
4282
4283
|
}
|
|
4283
|
-
:where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view):has(> [slot=column]:nth-
|
|
4284
|
+
:where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view)):has(> [slot=column]:nth-child(2 of [slot=column])) {
|
|
4284
4285
|
--table--expanded-columns: 2;
|
|
4285
4286
|
}
|
|
4286
|
-
:where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view):has(> [slot=column]:nth-
|
|
4287
|
+
:where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view)):has(> [slot=column]:nth-child(3 of [slot=column])) {
|
|
4287
4288
|
--table--expanded-columns: 3;
|
|
4288
4289
|
}
|
|
4290
|
+
:where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view)):has(> [slot=column]:nth-child(4 of [slot=column])) {
|
|
4291
|
+
--table--expanded-columns: 4;
|
|
4292
|
+
}
|
|
4293
|
+
:where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view)):has(> [slot=column]:nth-child(5 of [slot=column])) {
|
|
4294
|
+
--table--expanded-columns: 5;
|
|
4295
|
+
}
|
|
4296
|
+
:where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view)):has(> [slot=column]:nth-child(6 of [slot=column])) {
|
|
4297
|
+
--table--expanded-columns: 6;
|
|
4298
|
+
}
|
|
4289
4299
|
:where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view)) {
|
|
4290
4300
|
--list--host-background-color: var(--list-background-color, );
|
|
4291
4301
|
--list--highlighteditem-background-color: var(--list-highlighteditem-background-color, );
|
|
@@ -4484,6 +4494,25 @@
|
|
|
4484
4494
|
grid-area: subtitle;
|
|
4485
4495
|
grid-column: 1/-1;
|
|
4486
4496
|
}
|
|
4497
|
+
:where(table-view[preferred-compact-template="title:subtitle:trailing"] > [is=table-row]) {
|
|
4498
|
+
grid-template-columns: 1fr 1fr;
|
|
4499
|
+
grid-template-rows: repeat(2, auto);
|
|
4500
|
+
grid-template-areas: "title trailing" "subtitle _";
|
|
4501
|
+
}
|
|
4502
|
+
:where(table-view[preferred-compact-template="title:subtitle:trailing"] > [is=table-row] > :nth-child(-n+3)) {
|
|
4503
|
+
display: grid;
|
|
4504
|
+
}
|
|
4505
|
+
:where(table-view[preferred-compact-template="title:subtitle:trailing"] > [is=table-row] > :nth-child(1)) {
|
|
4506
|
+
grid-area: title;
|
|
4507
|
+
}
|
|
4508
|
+
:where(table-view[preferred-compact-template="title:subtitle:trailing"] > [is=table-row] > :nth-child(2)) {
|
|
4509
|
+
grid-area: subtitle;
|
|
4510
|
+
}
|
|
4511
|
+
:where(table-view[preferred-compact-template="title:subtitle:trailing"] > [is=table-row] > :nth-child(3)) {
|
|
4512
|
+
grid-area: trailing;
|
|
4513
|
+
place-self: end;
|
|
4514
|
+
grid-column: 1/-1;
|
|
4515
|
+
}
|
|
4487
4516
|
:where(table-view[preferred-compact-template="*"] > [is=table-row] > :nth-child(n+2)) {
|
|
4488
4517
|
display: grid;
|
|
4489
4518
|
}
|
|
@@ -4496,6 +4525,7 @@
|
|
|
4496
4525
|
grid-template-columns: auto var(--table-accessory-size);
|
|
4497
4526
|
place-content: start;
|
|
4498
4527
|
place-items: center;
|
|
4528
|
+
color: var(--blue);
|
|
4499
4529
|
}
|
|
4500
4530
|
:where([is=table-column][aria-sort])::after {
|
|
4501
4531
|
pointer-events: none;
|
|
@@ -6171,160 +6201,212 @@
|
|
|
6171
6201
|
justify-items: stretch ;
|
|
6172
6202
|
justify-content: stretch ;
|
|
6173
6203
|
}
|
|
6174
|
-
:where(v-stack[spacing="0"]
|
|
6204
|
+
:where(v-stack[spacing="0"],
|
|
6205
|
+
h-stack[spacing="0"]) {
|
|
6175
6206
|
gap: 0rem;
|
|
6176
6207
|
}
|
|
6177
|
-
:where(v-stack[spacing="1"]
|
|
6208
|
+
:where(v-stack[spacing="1"],
|
|
6209
|
+
h-stack[spacing="1"]) {
|
|
6178
6210
|
gap: 0.1rem;
|
|
6179
6211
|
}
|
|
6180
|
-
:where(v-stack[spacing="2"]
|
|
6212
|
+
:where(v-stack[spacing="2"],
|
|
6213
|
+
h-stack[spacing="2"]) {
|
|
6181
6214
|
gap: 0.2rem;
|
|
6182
6215
|
}
|
|
6183
|
-
:where(v-stack[spacing="3"]
|
|
6216
|
+
:where(v-stack[spacing="3"],
|
|
6217
|
+
h-stack[spacing="3"]) {
|
|
6184
6218
|
gap: 0.3rem;
|
|
6185
6219
|
}
|
|
6186
|
-
:where(v-stack[spacing="4"]
|
|
6220
|
+
:where(v-stack[spacing="4"],
|
|
6221
|
+
h-stack[spacing="4"]) {
|
|
6187
6222
|
gap: 0.4rem;
|
|
6188
6223
|
}
|
|
6189
|
-
:where(v-stack[spacing="5"]
|
|
6224
|
+
:where(v-stack[spacing="5"],
|
|
6225
|
+
h-stack[spacing="5"]) {
|
|
6190
6226
|
gap: 0.5rem;
|
|
6191
6227
|
}
|
|
6192
|
-
:where(v-stack[spacing="6"]
|
|
6228
|
+
:where(v-stack[spacing="6"],
|
|
6229
|
+
h-stack[spacing="6"]) {
|
|
6193
6230
|
gap: 0.6rem;
|
|
6194
6231
|
}
|
|
6195
|
-
:where(v-stack[spacing="7"]
|
|
6232
|
+
:where(v-stack[spacing="7"],
|
|
6233
|
+
h-stack[spacing="7"]) {
|
|
6196
6234
|
gap: 0.7rem;
|
|
6197
6235
|
}
|
|
6198
|
-
:where(v-stack[spacing="8"]
|
|
6236
|
+
:where(v-stack[spacing="8"],
|
|
6237
|
+
h-stack[spacing="8"]) {
|
|
6199
6238
|
gap: 0.8rem;
|
|
6200
6239
|
}
|
|
6201
|
-
:where(v-stack[spacing="9"]
|
|
6240
|
+
:where(v-stack[spacing="9"],
|
|
6241
|
+
h-stack[spacing="9"]) {
|
|
6202
6242
|
gap: 0.9rem;
|
|
6203
6243
|
}
|
|
6204
|
-
:where(v-stack[spacing="10"]
|
|
6244
|
+
:where(v-stack[spacing="10"],
|
|
6245
|
+
h-stack[spacing="10"]) {
|
|
6205
6246
|
gap: 1rem;
|
|
6206
6247
|
}
|
|
6207
|
-
:where(v-stack[spacing="11"]
|
|
6248
|
+
:where(v-stack[spacing="11"],
|
|
6249
|
+
h-stack[spacing="11"]) {
|
|
6208
6250
|
gap: 1.1rem;
|
|
6209
6251
|
}
|
|
6210
|
-
:where(v-stack[spacing="12"]
|
|
6252
|
+
:where(v-stack[spacing="12"],
|
|
6253
|
+
h-stack[spacing="12"]) {
|
|
6211
6254
|
gap: 1.2rem;
|
|
6212
6255
|
}
|
|
6213
|
-
:where(v-stack[spacing="13"]
|
|
6256
|
+
:where(v-stack[spacing="13"],
|
|
6257
|
+
h-stack[spacing="13"]) {
|
|
6214
6258
|
gap: 1.3rem;
|
|
6215
6259
|
}
|
|
6216
|
-
:where(v-stack[spacing="14"]
|
|
6260
|
+
:where(v-stack[spacing="14"],
|
|
6261
|
+
h-stack[spacing="14"]) {
|
|
6217
6262
|
gap: 1.4rem;
|
|
6218
6263
|
}
|
|
6219
|
-
:where(v-stack[spacing="15"]
|
|
6264
|
+
:where(v-stack[spacing="15"],
|
|
6265
|
+
h-stack[spacing="15"]) {
|
|
6220
6266
|
gap: 1.5rem;
|
|
6221
6267
|
}
|
|
6222
|
-
:where(v-stack[spacing="16"]
|
|
6268
|
+
:where(v-stack[spacing="16"],
|
|
6269
|
+
h-stack[spacing="16"]) {
|
|
6223
6270
|
gap: 1.6rem;
|
|
6224
6271
|
}
|
|
6225
|
-
:where(v-stack[spacing="17"]
|
|
6272
|
+
:where(v-stack[spacing="17"],
|
|
6273
|
+
h-stack[spacing="17"]) {
|
|
6226
6274
|
gap: 1.7rem;
|
|
6227
6275
|
}
|
|
6228
|
-
:where(v-stack[spacing="18"]
|
|
6276
|
+
:where(v-stack[spacing="18"],
|
|
6277
|
+
h-stack[spacing="18"]) {
|
|
6229
6278
|
gap: 1.8rem;
|
|
6230
6279
|
}
|
|
6231
|
-
:where(v-stack[spacing="19"]
|
|
6280
|
+
:where(v-stack[spacing="19"],
|
|
6281
|
+
h-stack[spacing="19"]) {
|
|
6232
6282
|
gap: 1.9rem;
|
|
6233
6283
|
}
|
|
6234
|
-
:where(v-stack[spacing="20"]
|
|
6284
|
+
:where(v-stack[spacing="20"],
|
|
6285
|
+
h-stack[spacing="20"]) {
|
|
6235
6286
|
gap: 2rem;
|
|
6236
6287
|
}
|
|
6237
|
-
:where(v-stack[spacing="21"]
|
|
6288
|
+
:where(v-stack[spacing="21"],
|
|
6289
|
+
h-stack[spacing="21"]) {
|
|
6238
6290
|
gap: 2.1rem;
|
|
6239
6291
|
}
|
|
6240
|
-
:where(v-stack[spacing="22"]
|
|
6292
|
+
:where(v-stack[spacing="22"],
|
|
6293
|
+
h-stack[spacing="22"]) {
|
|
6241
6294
|
gap: 2.2rem;
|
|
6242
6295
|
}
|
|
6243
|
-
:where(v-stack[spacing="23"]
|
|
6296
|
+
:where(v-stack[spacing="23"],
|
|
6297
|
+
h-stack[spacing="23"]) {
|
|
6244
6298
|
gap: 2.3rem;
|
|
6245
6299
|
}
|
|
6246
|
-
:where(v-stack[spacing="24"]
|
|
6300
|
+
:where(v-stack[spacing="24"],
|
|
6301
|
+
h-stack[spacing="24"]) {
|
|
6247
6302
|
gap: 2.4rem;
|
|
6248
6303
|
}
|
|
6249
|
-
:where(v-stack[spacing="25"]
|
|
6304
|
+
:where(v-stack[spacing="25"],
|
|
6305
|
+
h-stack[spacing="25"]) {
|
|
6250
6306
|
gap: 2.5rem;
|
|
6251
6307
|
}
|
|
6252
|
-
:where(v-stack[spacing="26"]
|
|
6308
|
+
:where(v-stack[spacing="26"],
|
|
6309
|
+
h-stack[spacing="26"]) {
|
|
6253
6310
|
gap: 2.6rem;
|
|
6254
6311
|
}
|
|
6255
|
-
:where(v-stack[spacing="27"]
|
|
6312
|
+
:where(v-stack[spacing="27"],
|
|
6313
|
+
h-stack[spacing="27"]) {
|
|
6256
6314
|
gap: 2.7rem;
|
|
6257
6315
|
}
|
|
6258
|
-
:where(v-stack[spacing="28"]
|
|
6316
|
+
:where(v-stack[spacing="28"],
|
|
6317
|
+
h-stack[spacing="28"]) {
|
|
6259
6318
|
gap: 2.8rem;
|
|
6260
6319
|
}
|
|
6261
|
-
:where(v-stack[spacing="29"]
|
|
6320
|
+
:where(v-stack[spacing="29"],
|
|
6321
|
+
h-stack[spacing="29"]) {
|
|
6262
6322
|
gap: 2.9rem;
|
|
6263
6323
|
}
|
|
6264
|
-
:where(v-stack[spacing="30"]
|
|
6324
|
+
:where(v-stack[spacing="30"],
|
|
6325
|
+
h-stack[spacing="30"]) {
|
|
6265
6326
|
gap: 3rem;
|
|
6266
6327
|
}
|
|
6267
|
-
:where(v-stack[spacing="31"]
|
|
6328
|
+
:where(v-stack[spacing="31"],
|
|
6329
|
+
h-stack[spacing="31"]) {
|
|
6268
6330
|
gap: 3.1rem;
|
|
6269
6331
|
}
|
|
6270
|
-
:where(v-stack[spacing="32"]
|
|
6332
|
+
:where(v-stack[spacing="32"],
|
|
6333
|
+
h-stack[spacing="32"]) {
|
|
6271
6334
|
gap: 3.2rem;
|
|
6272
6335
|
}
|
|
6273
|
-
:where(v-stack[spacing="33"]
|
|
6336
|
+
:where(v-stack[spacing="33"],
|
|
6337
|
+
h-stack[spacing="33"]) {
|
|
6274
6338
|
gap: 3.3rem;
|
|
6275
6339
|
}
|
|
6276
|
-
:where(v-stack[spacing="34"]
|
|
6340
|
+
:where(v-stack[spacing="34"],
|
|
6341
|
+
h-stack[spacing="34"]) {
|
|
6277
6342
|
gap: 3.4rem;
|
|
6278
6343
|
}
|
|
6279
|
-
:where(v-stack[spacing="35"]
|
|
6344
|
+
:where(v-stack[spacing="35"],
|
|
6345
|
+
h-stack[spacing="35"]) {
|
|
6280
6346
|
gap: 3.5rem;
|
|
6281
6347
|
}
|
|
6282
|
-
:where(v-stack[spacing="36"]
|
|
6348
|
+
:where(v-stack[spacing="36"],
|
|
6349
|
+
h-stack[spacing="36"]) {
|
|
6283
6350
|
gap: 3.6rem;
|
|
6284
6351
|
}
|
|
6285
|
-
:where(v-stack[spacing="37"]
|
|
6352
|
+
:where(v-stack[spacing="37"],
|
|
6353
|
+
h-stack[spacing="37"]) {
|
|
6286
6354
|
gap: 3.7rem;
|
|
6287
6355
|
}
|
|
6288
|
-
:where(v-stack[spacing="38"]
|
|
6356
|
+
:where(v-stack[spacing="38"],
|
|
6357
|
+
h-stack[spacing="38"]) {
|
|
6289
6358
|
gap: 3.8rem;
|
|
6290
6359
|
}
|
|
6291
|
-
:where(v-stack[spacing="39"]
|
|
6360
|
+
:where(v-stack[spacing="39"],
|
|
6361
|
+
h-stack[spacing="39"]) {
|
|
6292
6362
|
gap: 3.9rem;
|
|
6293
6363
|
}
|
|
6294
|
-
:where(v-stack[spacing="40"]
|
|
6364
|
+
:where(v-stack[spacing="40"],
|
|
6365
|
+
h-stack[spacing="40"]) {
|
|
6295
6366
|
gap: 4rem;
|
|
6296
6367
|
}
|
|
6297
|
-
:where(v-stack[spacing="41"]
|
|
6368
|
+
:where(v-stack[spacing="41"],
|
|
6369
|
+
h-stack[spacing="41"]) {
|
|
6298
6370
|
gap: 4.1rem;
|
|
6299
6371
|
}
|
|
6300
|
-
:where(v-stack[spacing="42"]
|
|
6372
|
+
:where(v-stack[spacing="42"],
|
|
6373
|
+
h-stack[spacing="42"]) {
|
|
6301
6374
|
gap: 4.2rem;
|
|
6302
6375
|
}
|
|
6303
|
-
:where(v-stack[spacing="43"]
|
|
6376
|
+
:where(v-stack[spacing="43"],
|
|
6377
|
+
h-stack[spacing="43"]) {
|
|
6304
6378
|
gap: 4.3rem;
|
|
6305
6379
|
}
|
|
6306
|
-
:where(v-stack[spacing="44"]
|
|
6380
|
+
:where(v-stack[spacing="44"],
|
|
6381
|
+
h-stack[spacing="44"]) {
|
|
6307
6382
|
gap: 4.4rem;
|
|
6308
6383
|
}
|
|
6309
|
-
:where(v-stack[spacing="45"]
|
|
6384
|
+
:where(v-stack[spacing="45"],
|
|
6385
|
+
h-stack[spacing="45"]) {
|
|
6310
6386
|
gap: 4.5rem;
|
|
6311
6387
|
}
|
|
6312
|
-
:where(v-stack[spacing="46"]
|
|
6388
|
+
:where(v-stack[spacing="46"],
|
|
6389
|
+
h-stack[spacing="46"]) {
|
|
6313
6390
|
gap: 4.6rem;
|
|
6314
6391
|
}
|
|
6315
|
-
:where(v-stack[spacing="47"]
|
|
6392
|
+
:where(v-stack[spacing="47"],
|
|
6393
|
+
h-stack[spacing="47"]) {
|
|
6316
6394
|
gap: 4.7rem;
|
|
6317
6395
|
}
|
|
6318
|
-
:where(v-stack[spacing="48"]
|
|
6396
|
+
:where(v-stack[spacing="48"],
|
|
6397
|
+
h-stack[spacing="48"]) {
|
|
6319
6398
|
gap: 4.8rem;
|
|
6320
6399
|
}
|
|
6321
|
-
:where(v-stack[spacing="49"]
|
|
6400
|
+
:where(v-stack[spacing="49"],
|
|
6401
|
+
h-stack[spacing="49"]) {
|
|
6322
6402
|
gap: 4.9rem;
|
|
6323
6403
|
}
|
|
6324
|
-
:where(v-stack[spacing="50"]
|
|
6404
|
+
:where(v-stack[spacing="50"],
|
|
6405
|
+
h-stack[spacing="50"]) {
|
|
6325
6406
|
gap: 5rem;
|
|
6326
6407
|
}
|
|
6327
|
-
:where(v-stack[frame\:alignment=center]
|
|
6408
|
+
:where(v-stack[frame\:alignment=center],
|
|
6409
|
+
h-stack[frame\:alignment=center]) {
|
|
6328
6410
|
justify-self: center;
|
|
6329
6411
|
}
|
|
6330
6412
|
:where(v-stack[padding],
|
package/package.json
CHANGED
|
@@ -138,6 +138,42 @@
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
+
table-view[preferred-compact-template='title:subtitle:trailing'] > & {
|
|
142
|
+
:where(&) {
|
|
143
|
+
grid-template-columns: 1fr 1fr;
|
|
144
|
+
grid-template-rows: repeat(2, auto);
|
|
145
|
+
grid-template-areas:
|
|
146
|
+
'title trailing'
|
|
147
|
+
'subtitle _';
|
|
148
|
+
// grid-template-rows: repeat(3, auto); /* 3 rows for first 6 items */
|
|
149
|
+
// grid-template-areas:
|
|
150
|
+
// 'a b'
|
|
151
|
+
// 'c d'
|
|
152
|
+
// 'e f';
|
|
153
|
+
}
|
|
154
|
+
> :nth-child(-n + 3) {
|
|
155
|
+
:where(&) {
|
|
156
|
+
display: grid;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
> :nth-child(1) {
|
|
160
|
+
:where(&) {
|
|
161
|
+
grid-area: title;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
> :nth-child(2) {
|
|
165
|
+
:where(&) {
|
|
166
|
+
grid-area: subtitle;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
> :nth-child(3) {
|
|
170
|
+
:where(&) {
|
|
171
|
+
grid-area: trailing;
|
|
172
|
+
place-self: end;
|
|
173
|
+
grid-column: 1 / -1;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
141
177
|
table-view[preferred-compact-template='*'] > & {
|
|
142
178
|
> :nth-child(n + 2) {
|
|
143
179
|
:where(&) {
|
|
@@ -107,6 +107,7 @@ $table-elses: (
|
|
|
107
107
|
|
|
108
108
|
&::part(table-column-stack) {
|
|
109
109
|
grid-auto-flow: column;
|
|
110
|
+
|
|
110
111
|
grid-auto-columns: minmax(0, 1fr);
|
|
111
112
|
|
|
112
113
|
column-gap: var(--table-col-gap);
|
|
@@ -115,7 +116,9 @@ $table-elses: (
|
|
|
115
116
|
|
|
116
117
|
padding-block: var(--table-row-gap);
|
|
117
118
|
|
|
118
|
-
color: var(--blue);
|
|
119
|
+
// color: var(--blue);
|
|
120
|
+
font-size: 0.875rem;
|
|
121
|
+
font-weight: 600;
|
|
119
122
|
|
|
120
123
|
background-color: var(--separator);
|
|
121
124
|
}
|
|
@@ -165,14 +168,19 @@ $table-elses: (
|
|
|
165
168
|
// SECTION: Columns counter
|
|
166
169
|
:where(&) {
|
|
167
170
|
--table--expanded-columns: 1;
|
|
168
|
-
}
|
|
169
171
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
@for $i from 2 through 6 {
|
|
173
|
+
&:has(> [slot='column']:nth-child(#{$i} of [slot='column'])) {
|
|
174
|
+
--table--expanded-columns: #{$i};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
175
177
|
}
|
|
178
|
+
// :where(&:has(> [slot='column']:nth-of-type(2)):not(:has(> [slot='column']:nth-of-type(3)))) {
|
|
179
|
+
// --table--expanded-columns: 2;
|
|
180
|
+
// }
|
|
181
|
+
// :where(&:has(> [slot='column']:nth-of-type(3)):not(:has(> [slot='column']:nth-of-type(4)))) {
|
|
182
|
+
// --table--expanded-columns: 3;
|
|
183
|
+
// }
|
|
176
184
|
|
|
177
185
|
// // @include mixins.center-toolbar-elements('&');
|
|
178
186
|
// :where(& > button[slot^='header'], & > button[slot^='footer']),
|
package/scss/utils/_stacks.scss
CHANGED
|
@@ -166,6 +166,17 @@
|
|
|
166
166
|
}
|
|
167
167
|
]
|
|
168
168
|
},
|
|
169
|
+
{
|
|
170
|
+
"name": "hstack",
|
|
171
|
+
"description": "",
|
|
172
|
+
"attributes": [
|
|
173
|
+
{
|
|
174
|
+
"name": "spacing",
|
|
175
|
+
"description": "\nDescription: The gap between the primary axis",
|
|
176
|
+
"valueSet": "spacingSet"
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
169
180
|
{
|
|
170
181
|
"name": "image-view",
|
|
171
182
|
"attributes": [
|
|
@@ -331,7 +342,27 @@
|
|
|
331
342
|
},
|
|
332
343
|
{
|
|
333
344
|
"name": "table-view",
|
|
334
|
-
"description": "Display selectable, sortable data arranged in rows and columns."
|
|
345
|
+
"description": "Display selectable, sortable data arranged in rows and columns.",
|
|
346
|
+
"attributes": [
|
|
347
|
+
{
|
|
348
|
+
"name": "preferred-compact-template",
|
|
349
|
+
"description": "Value Type: “title:trailing:subtitle” | “trailing:title:subtitle” | “title:subtitle:trailing” | “*”\n\nDescription: Sets the template areas when the table is in compact mode",
|
|
350
|
+
"values": [
|
|
351
|
+
{
|
|
352
|
+
"name": "title:trailing:subtitle"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "trailing:title:subtitle"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"name": "title:subtitle:trailing"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"name": "*"
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
}
|
|
365
|
+
]
|
|
335
366
|
},
|
|
336
367
|
{
|
|
337
368
|
"name": "text-field",
|
|
@@ -443,7 +474,7 @@
|
|
|
443
474
|
]
|
|
444
475
|
},
|
|
445
476
|
{
|
|
446
|
-
"name": "
|
|
477
|
+
"name": "template",
|
|
447
478
|
"description": "Value Type: “auto spacer” | “auto auto spacer” | “auto auto auto spacer”",
|
|
448
479
|
"values": [
|
|
449
480
|
{
|
|
@@ -456,6 +487,11 @@
|
|
|
456
487
|
"name": "auto auto auto spacer"
|
|
457
488
|
}
|
|
458
489
|
]
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"name": "spacing",
|
|
493
|
+
"description": "\nDescription: The gap between the primary axis",
|
|
494
|
+
"valueSet": "spacingSet"
|
|
459
495
|
}
|
|
460
496
|
]
|
|
461
497
|
}
|
|
@@ -488,6 +524,31 @@
|
|
|
488
524
|
}
|
|
489
525
|
],
|
|
490
526
|
"valueSets": [
|
|
527
|
+
{
|
|
528
|
+
"name": "spacingSet",
|
|
529
|
+
"values": [
|
|
530
|
+
{
|
|
531
|
+
"name": "0",
|
|
532
|
+
"description": "0rem"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"name": "1",
|
|
536
|
+
"description": "0.1rem"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"name": "2",
|
|
540
|
+
"description": "0.2rem"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"name": "3",
|
|
544
|
+
"description": "0.3rem"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"name": "4",
|
|
548
|
+
"description": "0.4rem"
|
|
549
|
+
}
|
|
550
|
+
]
|
|
551
|
+
},
|
|
491
552
|
{
|
|
492
553
|
"name": "tintSet",
|
|
493
554
|
"values": [
|