@commmerce/ui 1.3.0 → 1.5.0
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/THIRD_PARTY_NOTICES.txt +101 -0
- package/dist/calendar.js +15 -19
- package/dist/cdn.js +1669 -1193
- package/dist/components/accordion.js +9 -8
- package/dist/components/action-bar.js +15 -15
- package/dist/components/action-menu.js +10 -9
- package/dist/components/app-card.js +15 -14
- package/dist/components/app-frame.d.ts +15 -0
- package/dist/components/app-frame.js +22 -2
- package/dist/components/badge.d.ts +2 -1
- package/dist/components/badge.js +4 -3
- package/dist/components/banner.js +6 -5
- package/dist/components/board.js +18 -18
- package/dist/components/bottom-navigation.d.ts +1 -1
- package/dist/components/bottom-navigation.js +9 -7
- package/dist/components/bottom-sheet.d.ts +1 -1
- package/dist/components/bottom-sheet.js +9 -8
- package/dist/components/button.d.ts +3 -3
- package/dist/components/button.js +22 -19
- package/dist/components/calendar.d.ts +380 -0
- package/dist/components/calendar.js +1480 -0
- package/dist/components/card.d.ts +1 -1
- package/dist/components/card.js +18 -12
- package/dist/components/checkbox.js +8 -7
- package/dist/components/color-field.js +9 -13
- package/dist/components/combobox.d.ts +8 -0
- package/dist/components/combobox.js +18 -18
- package/dist/components/comment.d.ts +1 -1
- package/dist/components/comment.js +12 -13
- package/dist/components/data-table.js +12 -11
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +7 -7
- package/dist/components/empty-state.d.ts +1 -1
- package/dist/components/empty-state.js +16 -16
- package/dist/components/file-upload.js +18 -16
- package/dist/components/filter-panel.js +1 -1
- package/dist/components/flash-offer-bar.js +8 -7
- package/dist/components/global-search.d.ts +1 -1
- package/dist/components/global-search.js +12 -9
- package/dist/components/grid.d.ts +1 -1
- package/dist/components/grid.js +1 -1
- package/dist/components/header-bar.js +38 -31
- package/dist/components/info-panel.d.ts +1 -1
- package/dist/components/info-panel.js +11 -10
- package/dist/components/layout.d.ts +1 -1
- package/dist/components/layout.js +1 -1
- package/dist/components/link-tabs.js +8 -7
- package/dist/components/metric.js +4 -4
- package/dist/components/mobile-menu.js +16 -15
- package/dist/components/modal.js +2 -1
- package/dist/components/nested-list.d.ts +2 -2
- package/dist/components/nested-list.js +21 -22
- package/dist/components/notification-panel.js +12 -11
- package/dist/components/option-group.js +10 -11
- package/dist/components/page-header.js +16 -15
- package/dist/components/page.d.ts +18 -4
- package/dist/components/page.js +22 -7
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/pagination.js +16 -9
- package/dist/components/progress-bar.js +4 -3
- package/dist/components/radio.js +12 -12
- package/dist/components/report-tile.d.ts +2 -2
- package/dist/components/report-tile.js +18 -18
- package/dist/components/resource-list.d.ts +22 -6
- package/dist/components/resource-list.js +92 -52
- package/dist/components/save-bar.js +8 -8
- package/dist/components/search.d.ts +5 -2
- package/dist/components/search.js +20 -14
- package/dist/components/segmented-control.d.ts +67 -0
- package/dist/components/segmented-control.js +76 -0
- package/dist/components/select.d.ts +8 -0
- package/dist/components/select.js +18 -18
- package/dist/components/side-navigation.js +20 -17
- package/dist/components/side-panel.js +4 -3
- package/dist/components/signature-field.d.ts +153 -0
- package/dist/components/signature-field.js +728 -0
- package/dist/components/skeleton-display.js +4 -4
- package/dist/components/skeleton.d.ts +1 -1
- package/dist/components/skeleton.js +2 -2
- package/dist/components/smart-tip.d.ts +1 -1
- package/dist/components/smart-tip.js +16 -16
- package/dist/components/spinner.js +1 -1
- package/dist/components/stack.d.ts +1 -1
- package/dist/components/stack.js +1 -1
- package/dist/components/status-tabs.d.ts +4 -3
- package/dist/components/status-tabs.js +26 -12
- package/dist/components/table-header.d.ts +4 -3
- package/dist/components/table-header.js +22 -15
- package/dist/components/tag.js +3 -4
- package/dist/components/text-field.d.ts +1 -1
- package/dist/components/text-field.js +8 -15
- package/dist/components/thumbnail.js +1 -1
- package/dist/components/timeline.js +12 -11
- package/dist/components/toast.js +6 -6
- package/dist/components/toggle.js +12 -11
- package/dist/components/tooltip.js +4 -3
- package/dist/custom-elements.json +13655 -9770
- package/dist/field.d.ts +15 -0
- package/dist/field.js +47 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/overlay.js +5 -4
- package/dist/popover.js +8 -8
- package/dist/spacing.d.ts +14 -4
- package/dist/spacing.js +13 -4
- package/package.json +3 -3
|
@@ -42,13 +42,13 @@ CmSkeletonDisplay.styles = [
|
|
|
42
42
|
base,
|
|
43
43
|
css `
|
|
44
44
|
:host { display: block; }
|
|
45
|
-
.page { display: grid; grid-template-columns: 1fr; gap: var(--cm-space-
|
|
45
|
+
.page { display: grid; grid-template-columns: 1fr; gap: var(--cm-space-8); }
|
|
46
46
|
:host([navigation]) .page { grid-template-columns: 250px minmax(0, 1fr); }
|
|
47
|
-
.nav { grid-row: span 2; border-radius:
|
|
48
|
-
.body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: var(--cm-space-
|
|
47
|
+
.nav { grid-row: span 2; border-radius: var(--cm-radius-lg); min-height: 100%; }
|
|
48
|
+
.body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: var(--cm-space-8); align-items: start; }
|
|
49
49
|
:host([layout='one-column']) .body { grid-template-columns: minmax(0, 1fr); }
|
|
50
50
|
:host([layout='one-column']) .side { display: none; }
|
|
51
|
-
.col { display: grid; gap: var(--cm-space-
|
|
51
|
+
.col { display: grid; gap: var(--cm-space-8); }
|
|
52
52
|
.bone {
|
|
53
53
|
display: block; border-radius: var(--cm-radius-md); background: var(--cm-bg-input-filled);
|
|
54
54
|
animation: pulse 1.6s ease-in-out infinite;
|
|
@@ -27,7 +27,7 @@ export declare class CmSkeleton extends LitElement {
|
|
|
27
27
|
variant: 'text' | 'thumbnail' | 'block';
|
|
28
28
|
/** Number of text lines. The last of several lines is shorter, like a real paragraph. */
|
|
29
29
|
lines: number;
|
|
30
|
-
/** Thumbnail size
|
|
30
|
+
/** Thumbnail size: `small` 34px, `medium` 40px, `large` 50px, `xlarge` 186px. */
|
|
31
31
|
size: keyof typeof THUMB;
|
|
32
32
|
static styles: import("lit").CSSResult[];
|
|
33
33
|
connectedCallback(): void;
|
|
@@ -14,7 +14,7 @@ export class CmSkeleton extends LitElement {
|
|
|
14
14
|
this.variant = 'text';
|
|
15
15
|
/** Number of text lines. The last of several lines is shorter, like a real paragraph. */
|
|
16
16
|
this.lines = 1;
|
|
17
|
-
/** Thumbnail size
|
|
17
|
+
/** Thumbnail size: `small` 34px, `medium` 40px, `large` 50px, `xlarge` 186px. */
|
|
18
18
|
this.size = 'large';
|
|
19
19
|
}
|
|
20
20
|
connectedCallback() {
|
|
@@ -46,7 +46,7 @@ CmSkeleton.styles = [
|
|
|
46
46
|
display: block; border-radius: var(--cm-radius-md); background: var(--cm-bg-input-filled);
|
|
47
47
|
animation: pulse 1.6s ease-in-out infinite;
|
|
48
48
|
}
|
|
49
|
-
.line { height: 12px; margin:
|
|
49
|
+
.line { height: 12px; margin: var(--cm-space-8) 0; border-radius: var(--cm-radius-sm); }
|
|
50
50
|
.line.short { width: 60%; }
|
|
51
51
|
.block { height: var(--cm-skeleton-height); }
|
|
52
52
|
@keyframes pulse { 50% { background: var(--cm-thumb-bg); } }
|
|
@@ -61,7 +61,7 @@ export declare class CmSmartTips extends CmLocalizedElement {
|
|
|
61
61
|
attribute: string;
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
|
-
/** Title above the tips
|
|
64
|
+
/** Title above the tips. Default: the built-in string `heading` ("Smart tips"). */
|
|
65
65
|
heading: string;
|
|
66
66
|
/** Text of the dark tour banner ("Take a tour of Commmerce"). Leave empty for no banner. */
|
|
67
67
|
tourHeading: string;
|
|
@@ -55,17 +55,17 @@ CmSmartTip.styles = [
|
|
|
55
55
|
css `
|
|
56
56
|
:host { display: block; }
|
|
57
57
|
a {
|
|
58
|
-
display: flex; align-items: flex-start; gap: var(--cm-space-
|
|
59
|
-
min-height:
|
|
60
|
-
border: var(--cm-border-1) solid var(--cm-border-
|
|
58
|
+
display: flex; align-items: flex-start; gap: var(--cm-space-8); padding: var(--cm-space-16);
|
|
59
|
+
min-height: 88px; background: var(--cm-bg-surface); color: var(--cm-text-default); text-decoration: none;
|
|
60
|
+
border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-md);
|
|
61
61
|
}
|
|
62
62
|
a:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
|
|
63
63
|
.text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
|
|
64
|
-
.title { font-size:
|
|
65
|
-
.desc { font-size:
|
|
64
|
+
.title { font-size: var(--cm-font-size-14); font-weight: 600; line-height: var(--cm-line-height-14); }
|
|
65
|
+
.desc { font-size: var(--cm-font-size-13); line-height: var(--cm-line-height-13); color: var(--cm-text-tertiary); }
|
|
66
66
|
.go {
|
|
67
|
-
flex: none; display: inline-flex; align-items: center; justify-content: center; width:
|
|
68
|
-
margin-top: -
|
|
67
|
+
flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
|
|
68
|
+
margin-top: -4px; border-radius: var(--cm-radius-full); background: var(--cm-bg-icon); color: var(--cm-icon-selected);
|
|
69
69
|
}
|
|
70
70
|
a:hover .go, a:focus-visible .go { background: var(--cm-action-primary); color: var(--cm-action-primary-text); }
|
|
71
71
|
a:hover .title { text-decoration: underline; }
|
|
@@ -91,7 +91,8 @@ export class CmSmartTips extends CmLocalizedElement {
|
|
|
91
91
|
return html `<div class="card" part="smart-tips">
|
|
92
92
|
${this.tourHeading
|
|
93
93
|
? html `<div class="tour" part="tour">
|
|
94
|
-
<span class="tour-icon" aria-hidden="true"><cm-icon name="rocket" size="
|
|
94
|
+
<span class="tour-icon" aria-hidden="true"><cm-icon name="rocket" size="16"></cm-icon>
|
|
95
|
+
</span>
|
|
95
96
|
<span class="tour-text">${this.tourHeading}</span>
|
|
96
97
|
<cm-button size="medium" @click=${() => this.dispatchEvent(new CustomEvent('cm-tour', { bubbles: true, composed: true }))}>${this.tourAction}</cm-button>
|
|
97
98
|
</div>`
|
|
@@ -113,22 +114,21 @@ CmSmartTips.styles = [
|
|
|
113
114
|
base,
|
|
114
115
|
css `
|
|
115
116
|
:host { display: block; }
|
|
116
|
-
.card { display: flex; flex-direction: column; gap: var(--cm-space-
|
|
117
|
+
.card { display: flex; flex-direction: column; gap: var(--cm-space-8); }
|
|
117
118
|
.tour {
|
|
118
|
-
display: flex; align-items: center; gap: var(--cm-space-
|
|
119
|
+
display: flex; align-items: center; gap: var(--cm-space-8); min-height: 56px; padding-block: var(--cm-space-12); padding-inline: var(--cm-space-16) var(--cm-space-12);
|
|
119
120
|
border-radius: var(--cm-radius-md); background: var(--cm-bg-panel-header); color: var(--cm-text-on-dark);
|
|
120
121
|
}
|
|
121
122
|
.tour-icon {
|
|
122
|
-
flex: none; display: inline-flex; align-items: center; justify-content: center; width:
|
|
123
|
+
flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
|
|
123
124
|
border-radius: var(--cm-radius-full); background: var(--cm-nav-active); color: var(--cm-text-on-dark);
|
|
124
125
|
}
|
|
125
|
-
.tour-text { flex: 1; min-width: 0; font-size:
|
|
126
|
-
.panel { padding: var(--cm-space-
|
|
126
|
+
.tour-text { flex: 1; min-width: 0; font-size: var(--cm-font-size-14); font-weight: 500; line-height: var(--cm-line-height-14); }
|
|
127
|
+
.panel { padding: var(--cm-space-8); border-radius: var(--cm-radius-md); background: var(--cm-bg-surface); }
|
|
127
128
|
.title {
|
|
128
|
-
margin: var(--cm-space-
|
|
129
|
-
letter-spacing: var(--cm-tracking-caps); text-transform: uppercase;
|
|
129
|
+
margin: var(--cm-space-8) 0 var(--cm-space-16); text-align: center; font-size: var(--cm-type-heading-sm-size); line-height: var(--cm-type-heading-sm-line-height); font-weight: 600;
|
|
130
130
|
}
|
|
131
|
-
.list { display: flex; flex-direction: column; gap: var(--cm-space-
|
|
131
|
+
.list { display: flex; flex-direction: column; gap: var(--cm-space-8); }
|
|
132
132
|
`,
|
|
133
133
|
];
|
|
134
134
|
define('cm-smart-tips', CmSmartTips);
|
|
@@ -34,7 +34,7 @@ CmSpinner.styles = [
|
|
|
34
34
|
.spinner { display: inline-flex; }
|
|
35
35
|
svg { inline-size: 44px; block-size: 44px; animation: spin 0.8s linear infinite; }
|
|
36
36
|
:host([size='small']) svg { inline-size: 20px; block-size: 20px; }
|
|
37
|
-
.track { stroke: var(--cm-border-
|
|
37
|
+
.track { stroke: var(--cm-border-subtle); }
|
|
38
38
|
.arc { stroke: currentColor; }
|
|
39
39
|
.vh {
|
|
40
40
|
position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden;
|
|
@@ -27,7 +27,7 @@ export declare class CmStack extends LitElement {
|
|
|
27
27
|
};
|
|
28
28
|
/** `block` stacks top to bottom; `inline` lays items out in a row (right to left in RTL pages). */
|
|
29
29
|
direction: 'block' | 'inline';
|
|
30
|
-
/** Space between items: a spacing step (`0`, `
|
|
30
|
+
/** Space between items: a spacing step on the 4px grid (`0`, `4`, `8`, `12`, `16`, `20`, `24`, `32`, `40`, `48`, `64`; the pre-1.5 steps `10`, `15`, `22` and `30` still work and draw as 8, 16, 24 and 32). Default `20`, the gap between cards. */
|
|
31
31
|
gap: SpaceStep;
|
|
32
32
|
/** Cross-axis alignment. Default `stretch` in a column and `center` in a row. */
|
|
33
33
|
align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
package/dist/components/stack.js
CHANGED
|
@@ -12,7 +12,7 @@ export class CmStack extends LitElement {
|
|
|
12
12
|
super(...arguments);
|
|
13
13
|
/** `block` stacks top to bottom; `inline` lays items out in a row (right to left in RTL pages). */
|
|
14
14
|
this.direction = 'block';
|
|
15
|
-
/** Space between items: a spacing step (`0`, `
|
|
15
|
+
/** Space between items: a spacing step on the 4px grid (`0`, `4`, `8`, `12`, `16`, `20`, `24`, `32`, `40`, `48`, `64`; the pre-1.5 steps `10`, `15`, `22` and `30` still work and draw as 8, 16, 24 and 32). Default `20`, the gap between cards. */
|
|
16
16
|
this.gap = '20';
|
|
17
17
|
/** Lets a row wrap onto more lines when it runs out of space. */
|
|
18
18
|
this.wrap = false;
|
|
@@ -3,7 +3,7 @@ import { CmLocalizedElement } from '../localize.js';
|
|
|
3
3
|
export interface StatusTab {
|
|
4
4
|
value: string;
|
|
5
5
|
label: string;
|
|
6
|
-
/** Number shown in
|
|
6
|
+
/** Number shown in a small pill after the label, e.g. `All 233`. Screen readers hear "All, 233". */
|
|
7
7
|
count?: number;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
}
|
|
@@ -18,7 +18,8 @@ declare module '../localize.js' {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* A row of statuses that filters the list under it, such as All, Unprocessed, Processing, Fulfilled.
|
|
21
|
-
* The chosen status is black and underlined; the others are grey. Each label can carry a count
|
|
21
|
+
* The chosen status is black, semibold and underlined; the others are grey. Each label can carry a count, shown as a
|
|
22
|
+
* small neutral pill after it (read as "My tasks, 4").
|
|
22
23
|
* Works as ARIA tabs: one tab stop, arrow keys move and select, Home/End jump to the ends.
|
|
23
24
|
* Too many tabs for the width scroll sideways.
|
|
24
25
|
*
|
|
@@ -54,7 +55,7 @@ export declare class CmStatusTabs extends CmLocalizedElement {
|
|
|
54
55
|
* Browsers without element reflection skip the link.
|
|
55
56
|
*/
|
|
56
57
|
controls: string;
|
|
57
|
-
/** `large` (
|
|
58
|
+
/** `large` (the default: 14px labels, page-level statuses) or `small` (13px, tighter, inside a card, e.g. review sorting). */
|
|
58
59
|
size: 'large' | 'small';
|
|
59
60
|
_slotted: StatusTab[];
|
|
60
61
|
static styles: import("lit").CSSResult[];
|
|
@@ -13,7 +13,8 @@ const strings = defineStrings('statusTabs', {
|
|
|
13
13
|
});
|
|
14
14
|
/**
|
|
15
15
|
* A row of statuses that filters the list under it, such as All, Unprocessed, Processing, Fulfilled.
|
|
16
|
-
* The chosen status is black and underlined; the others are grey. Each label can carry a count
|
|
16
|
+
* The chosen status is black, semibold and underlined; the others are grey. Each label can carry a count, shown as a
|
|
17
|
+
* small neutral pill after it (read as "My tasks, 4").
|
|
17
18
|
* Works as ARIA tabs: one tab stop, arrow keys move and select, Home/End jump to the ends.
|
|
18
19
|
* Too many tabs for the width scroll sideways.
|
|
19
20
|
*
|
|
@@ -36,7 +37,7 @@ export class CmStatusTabs extends CmLocalizedElement {
|
|
|
36
37
|
* Browsers without element reflection skip the link.
|
|
37
38
|
*/
|
|
38
39
|
this.controls = '';
|
|
39
|
-
/** `large` (
|
|
40
|
+
/** `large` (the default: 14px labels, page-level statuses) or `small` (13px, tighter, inside a card, e.g. review sorting). */
|
|
40
41
|
this.size = 'large';
|
|
41
42
|
this._slotted = [];
|
|
42
43
|
_CmStatusTabs_observer.set(this, new MutationObserver(() => __classPrivateFieldGet(this, _CmStatusTabs_instances, "m", _CmStatusTabs_readChildren).call(this)));
|
|
@@ -75,8 +76,8 @@ export class CmStatusTabs extends CmLocalizedElement {
|
|
|
75
76
|
<div class="tabs" part="tabs" role="tablist" aria-label=${this.getAttribute('aria-label') || this.t('label')}>
|
|
76
77
|
${items.map((t, i) => html `<button type="button" role="tab" part="tab" aria-selected=${i === cur ? 'true' : 'false'}
|
|
77
78
|
tabindex=${i === cur ? '0' : '-1'} ?disabled=${!!t.disabled}
|
|
78
|
-
@click=${() => __classPrivateFieldGet(this, _CmStatusTabs_instances, "m", _CmStatusTabs_select).call(this, i)} @keydown=${(e) => __classPrivateFieldGet(this, _CmStatusTabs_instances, "m", _CmStatusTabs_onKeyDown).call(this, e, i)}>${t.label}
|
|
79
|
-
? html
|
|
79
|
+
@click=${() => __classPrivateFieldGet(this, _CmStatusTabs_instances, "m", _CmStatusTabs_select).call(this, i)} @keydown=${(e) => __classPrivateFieldGet(this, _CmStatusTabs_instances, "m", _CmStatusTabs_onKeyDown).call(this, e, i)}><span class="label" data-text=${t.label}>${t.label}</span>${t.count !== undefined && !Number.isNaN(t.count)
|
|
80
|
+
? html `<span class="sr">, </span><span class="count" part="count">${this.formatNumber(t.count)}</span>`
|
|
80
81
|
: nothing}</button>`)}
|
|
81
82
|
</div>
|
|
82
83
|
<slot></slot>
|
|
@@ -137,27 +138,40 @@ CmStatusTabs.styles = [
|
|
|
137
138
|
base,
|
|
138
139
|
css `
|
|
139
140
|
:host { display: block; }
|
|
141
|
+
/* A 40px row: 14px labels (medium; semibold when chosen) over a 2px underline on a hairline. */
|
|
140
142
|
.tabs {
|
|
141
|
-
display: flex; gap:
|
|
142
|
-
font-size:
|
|
143
|
+
display: flex; gap: var(--cm-space-24); overflow-x: auto; scrollbar-width: thin; padding: 2px 2px 0;
|
|
144
|
+
font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); font-weight: 500; white-space: nowrap;
|
|
145
|
+
box-shadow: inset 0 calc(-1 * var(--cm-border-1)) 0 var(--cm-border-subtle);
|
|
143
146
|
}
|
|
144
147
|
button {
|
|
145
|
-
position: relative; flex: none;
|
|
148
|
+
position: relative; flex: none; display: inline-flex; align-items: center; gap: var(--cm-space-8);
|
|
149
|
+
min-block-size: var(--cm-control-height-lg); padding: 0; font: inherit; color: var(--cm-text-tertiary);
|
|
146
150
|
background: none; border: 0; cursor: pointer;
|
|
147
151
|
}
|
|
148
152
|
button::after {
|
|
149
|
-
content: ''; position: absolute; inset-inline: 0; bottom:
|
|
153
|
+
content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 2px; border-radius: var(--cm-radius-full); background: transparent;
|
|
150
154
|
}
|
|
151
155
|
button:hover:not(:disabled) { color: var(--cm-text-default); }
|
|
152
|
-
button[aria-selected='true'] { color: var(--cm-text-default); }
|
|
156
|
+
button[aria-selected='true'] { color: var(--cm-text-default); font-weight: 600; }
|
|
153
157
|
button[aria-selected='true']::after { background: var(--cm-border-strong); }
|
|
158
|
+
/* The chosen tab's bold label takes no extra room: each label reserves the width of its bold version. */
|
|
159
|
+
.label { display: inline-grid; }
|
|
160
|
+
.label::after { content: attr(data-text); content: attr(data-text) / ''; font-weight: 600; block-size: 0; overflow: hidden; visibility: hidden; }
|
|
154
161
|
button:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; border-radius: var(--cm-radius-xs); }
|
|
155
162
|
button:disabled { color: var(--cm-text-secondary); cursor: not-allowed; }
|
|
156
|
-
.count {
|
|
157
|
-
|
|
163
|
+
.count {
|
|
164
|
+
display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
|
|
165
|
+
min-inline-size: var(--cm-space-20); block-size: var(--cm-space-20); padding: 0 var(--cm-space-4);
|
|
166
|
+
border-radius: var(--cm-radius-full); background: var(--cm-bg-tag); color: var(--cm-text-default);
|
|
167
|
+
font-size: var(--cm-font-size-12); line-height: var(--cm-line-height-12); font-weight: 500; font-variant-numeric: tabular-nums;
|
|
168
|
+
}
|
|
169
|
+
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
170
|
+
:host([size='small']) .tabs { gap: var(--cm-space-16); font-size: var(--cm-font-size-13); line-height: var(--cm-line-height-13); }
|
|
171
|
+
:host([size='small']) button { min-block-size: var(--cm-control-height-sm); gap: var(--cm-space-4); }
|
|
158
172
|
slot { display: none; }
|
|
159
173
|
@media (max-width: 640px) {
|
|
160
|
-
.tabs { gap:
|
|
174
|
+
.tabs { gap: var(--cm-space-16); }
|
|
161
175
|
}
|
|
162
176
|
`,
|
|
163
177
|
];
|
|
@@ -24,7 +24,7 @@ export interface TableColumn {
|
|
|
24
24
|
hidden?: boolean;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* The grey
|
|
27
|
+
* The grey 32px label bar at the top of a table or resource list: column names in 12px medium type,
|
|
28
28
|
* optional sort buttons and an optional "select all" checkbox.
|
|
29
29
|
*
|
|
30
30
|
* Columns come from `<option>` children or the `columns` property. Lay out the rows with the same
|
|
@@ -34,7 +34,8 @@ export interface TableColumn {
|
|
|
34
34
|
*
|
|
35
35
|
* In the `header` slot of a `cm-resource-list`, the list sets `resource-rows` so the column names line up with the
|
|
36
36
|
* cells of its `cm-resource-item` rows (including the rows' checkbox column when the list is `selectable`). The
|
|
37
|
-
* list
|
|
37
|
+
* list puts its select-all box in the header's checkbox column (and its selection status over the names while rows are
|
|
38
|
+
* selected): don't also set `selectable` on the header.
|
|
38
39
|
* @element cm-table-header
|
|
39
40
|
* @slot - `<option value="key" sortable align="end">Label</option>` elements.
|
|
40
41
|
* @fires cm-sort - `detail: { key, direction }` when a sortable column is clicked. Set `sort` and `direction` yourself.
|
|
@@ -82,7 +83,7 @@ export declare class CmTableHeader extends CmLocalizedElement {
|
|
|
82
83
|
sort: string;
|
|
83
84
|
/** Sort direction of the `sort` column. */
|
|
84
85
|
direction: 'ascending' | 'descending';
|
|
85
|
-
/** Adds a leading "select all" checkbox column
|
|
86
|
+
/** Adds a leading "select all" checkbox column. */
|
|
86
87
|
selectable: boolean;
|
|
87
88
|
/** Select-all box is ticked. */
|
|
88
89
|
checked: boolean;
|
|
@@ -16,7 +16,7 @@ const strings = defineStrings('tableHeader', {
|
|
|
16
16
|
sortable: ', sortable',
|
|
17
17
|
});
|
|
18
18
|
/**
|
|
19
|
-
* The grey
|
|
19
|
+
* The grey 32px label bar at the top of a table or resource list: column names in 12px medium type,
|
|
20
20
|
* optional sort buttons and an optional "select all" checkbox.
|
|
21
21
|
*
|
|
22
22
|
* Columns come from `<option>` children or the `columns` property. Lay out the rows with the same
|
|
@@ -26,7 +26,8 @@ const strings = defineStrings('tableHeader', {
|
|
|
26
26
|
*
|
|
27
27
|
* In the `header` slot of a `cm-resource-list`, the list sets `resource-rows` so the column names line up with the
|
|
28
28
|
* cells of its `cm-resource-item` rows (including the rows' checkbox column when the list is `selectable`). The
|
|
29
|
-
* list
|
|
29
|
+
* list puts its select-all box in the header's checkbox column (and its selection status over the names while rows are
|
|
30
|
+
* selected): don't also set `selectable` on the header.
|
|
30
31
|
* @element cm-table-header
|
|
31
32
|
* @slot - `<option value="key" sortable align="end">Label</option>` elements.
|
|
32
33
|
* @fires cm-sort - `detail: { key, direction }` when a sortable column is clicked. Set `sort` and `direction` yourself.
|
|
@@ -43,7 +44,7 @@ export class CmTableHeader extends CmLocalizedElement {
|
|
|
43
44
|
this.sort = '';
|
|
44
45
|
/** Sort direction of the `sort` column. */
|
|
45
46
|
this.direction = 'ascending';
|
|
46
|
-
/** Adds a leading "select all" checkbox column
|
|
47
|
+
/** Adds a leading "select all" checkbox column. */
|
|
47
48
|
this.selectable = false;
|
|
48
49
|
/** Select-all box is ticked. */
|
|
49
50
|
this.checked = false;
|
|
@@ -134,11 +135,12 @@ CmTableHeader.styles = [
|
|
|
134
135
|
slot { display: none; } /* <option> children are column data, not content */
|
|
135
136
|
.bar {
|
|
136
137
|
display: grid; grid-template-columns: var(--cm-table-columns, var(--_cols)); align-items: center; column-gap: var(--cm-space-20);
|
|
137
|
-
min-height:
|
|
138
|
+
min-height: var(--cm-control-height-sm); padding: 0 var(--cm-space-20); font-size: var(--cm-font-size-12); line-height: var(--cm-line-height-12);
|
|
139
|
+
font-weight: 500; color: var(--cm-text-tertiary);
|
|
138
140
|
background: var(--cm-bg-hover); border: var(--cm-border-1) solid var(--cm-border-subtle);
|
|
139
141
|
border-radius: var(--cm-radius-md) var(--cm-radius-md) 0 0;
|
|
140
142
|
}
|
|
141
|
-
.bar.sel { grid-template-columns: 20px var(--cm-table-columns, var(--_cols)); padding-inline-start: var(--cm-space-
|
|
143
|
+
.bar.sel { grid-template-columns: 20px var(--cm-table-columns, var(--_cols)); padding-inline-start: var(--cm-space-12); }
|
|
142
144
|
.cell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
143
145
|
.cell[data-align='center'] { text-align: center; }
|
|
144
146
|
.cell[data-align='end'] { text-align: end; }
|
|
@@ -160,20 +162,25 @@ CmTableHeader.styles = [
|
|
|
160
162
|
input:focus-visible + .box { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
|
|
161
163
|
slot { display: none; }
|
|
162
164
|
/* In a cm-resource-list (resource-rows): the bar's content box matches a row's content box, so the same
|
|
163
|
-
--cm-table-columns grid (with column-gap space-20) lands on the same x positions.
|
|
164
|
-
inline, start with a
|
|
165
|
-
(possibly empty) actions
|
|
166
|
-
The bar
|
|
165
|
+
--cm-table-columns grid (with column-gap space-20) lands on the same x positions. The list pads its rows
|
|
166
|
+
--_rl from its edges; rows pad --_rp inline, start with a 16px checkbox and a space-12 gap when selectable,
|
|
167
|
+
and end with the gap before their (possibly empty) actions. On phones: no row padding, a 20px checkbox, space-8 gaps.
|
|
168
|
+
The bar runs to the list's edges with hairlines above and below, and lies under the list's select-all box.
|
|
169
|
+
--_rl and --_rp are cm-resource-list's list padding (--_pad) and row padding: change both together. */
|
|
170
|
+
:host([resource-rows]) { --_rl: var(--cm-space-12); --_rp: var(--cm-space-8); }
|
|
167
171
|
:host([resource-rows]) .bar {
|
|
168
|
-
margin-inline: calc(-1 * var(--
|
|
169
|
-
|
|
172
|
+
margin-inline: calc(-1 * var(--_rl));
|
|
173
|
+
padding-inline: calc(var(--_rl) + var(--_rp)) calc(var(--_rl) + var(--_rp) + var(--cm-space-12));
|
|
174
|
+
border: 0; border-radius: 0;
|
|
175
|
+
box-shadow: inset 0 var(--cm-border-1) 0 var(--cm-border-subtle), inset 0 calc(-1 * var(--cm-border-1)) 0 var(--cm-border-subtle);
|
|
170
176
|
}
|
|
171
|
-
:host([resource-rows='selectable']) .bar:not(.sel) { padding-inline-start: calc(var(--
|
|
177
|
+
:host([resource-rows='selectable']) .bar:not(.sel) { padding-inline-start: calc(var(--_rl) + var(--_rp) + 16px + var(--cm-space-12)); }
|
|
178
|
+
:host([resource-rows]) .bar.sel { grid-template-columns: calc(16px + var(--cm-space-12) - var(--cm-space-20)) var(--cm-table-columns, var(--_cols)); }
|
|
172
179
|
:host([resource-rows]) .bar.sel > .cell:first-child { overflow: visible; }
|
|
173
180
|
@media (max-width: 640px) {
|
|
174
|
-
:host([resource-rows]) .bar { padding-inline: var(--
|
|
175
|
-
:host([resource-rows='selectable']) .bar:not(.sel) { padding-inline-start: calc(var(--
|
|
176
|
-
:host([resource-rows]) .bar.sel { grid-template-columns: calc(
|
|
181
|
+
:host([resource-rows]) .bar { padding-inline: var(--_rl) calc(var(--_rl) + var(--cm-space-8)); }
|
|
182
|
+
:host([resource-rows='selectable']) .bar:not(.sel) { padding-inline-start: calc(var(--_rl) + 20px + var(--cm-space-8)); }
|
|
183
|
+
:host([resource-rows]) .bar.sel { grid-template-columns: calc(20px + var(--cm-space-8) - var(--cm-space-20)) var(--cm-table-columns, var(--_cols)); }
|
|
177
184
|
}
|
|
178
185
|
`,
|
|
179
186
|
];
|
package/dist/components/tag.js
CHANGED
|
@@ -53,8 +53,8 @@ CmTag.styles = [
|
|
|
53
53
|
css `
|
|
54
54
|
:host { display: inline-flex; vertical-align: middle; max-width: 100%; }
|
|
55
55
|
.tag {
|
|
56
|
-
display: inline-flex; align-items: center; gap:
|
|
57
|
-
font-size:
|
|
56
|
+
display: inline-flex; align-items: center; gap: var(--cm-space-4); min-width: 0; height: 24px; padding: 0 var(--cm-space-8);
|
|
57
|
+
font-size: var(--cm-font-size-12); line-height: var(--cm-line-height-12); color: var(--cm-text-default); background: var(--cm-bg-tag);
|
|
58
58
|
border: var(--cm-border-1) solid var(--cm-border-strong); border-radius: var(--cm-radius-full);
|
|
59
59
|
}
|
|
60
60
|
:host([removable]) .tag { padding-inline-end: 4px; }
|
|
@@ -65,9 +65,8 @@ CmTag.styles = [
|
|
|
65
65
|
}
|
|
66
66
|
button:hover { background: var(--cm-bg-hover); }
|
|
67
67
|
button:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 0; }
|
|
68
|
-
:host([disabled]) .tag { color: var(--cm-text-secondary); border-color: var(--cm-border-
|
|
68
|
+
:host([disabled]) .tag { color: var(--cm-text-secondary); border-color: var(--cm-border-subtle); }
|
|
69
69
|
:host([disabled]) button { cursor: not-allowed; color: var(--cm-text-secondary); }
|
|
70
|
-
@media (max-width: 640px) { .tag { height: 22px; } button { width: 18px; height: 18px; } }
|
|
71
70
|
`,
|
|
72
71
|
];
|
|
73
72
|
define('cm-tag', CmTag);
|
|
@@ -111,7 +111,7 @@ export declare class CmTextField extends CmLocalizedElement {
|
|
|
111
111
|
readonly: boolean;
|
|
112
112
|
/** Native autocomplete hint, e.g. `email`, `postal-code`. */
|
|
113
113
|
autocomplete?: string;
|
|
114
|
-
/** `small`:
|
|
114
|
+
/** `small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 36px box. On touch screens both are 44px. */
|
|
115
115
|
size: 'default' | 'small';
|
|
116
116
|
/**
|
|
117
117
|
* Lowest allowed value for `number`, `date`, `time` and `datetime-local`, in the value's format (`2026-11-16T15:30`
|
|
@@ -13,6 +13,7 @@ var _CmTextField_instances, _CmTextField_internals, _CmTextField_id, _CmTextFiel
|
|
|
13
13
|
import { LitElement, html, css, nothing } from 'lit';
|
|
14
14
|
import { live } from 'lit/directives/live.js';
|
|
15
15
|
import { base, define, nextId } from '../base.js';
|
|
16
|
+
import { fieldStyles } from '../field.js';
|
|
16
17
|
import { CmLocalizedElement, defineStrings, formatDate } from '../localize.js';
|
|
17
18
|
const strings = defineStrings('textField', {
|
|
18
19
|
/** Validation message when `required` and empty. */
|
|
@@ -73,7 +74,7 @@ export class CmTextField extends CmLocalizedElement {
|
|
|
73
74
|
this.disabled = false;
|
|
74
75
|
/** Shows the value on the filled background; the value is still submitted. */
|
|
75
76
|
this.readonly = false;
|
|
76
|
-
/** `small`:
|
|
77
|
+
/** `small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 36px box. On touch screens both are 44px. */
|
|
77
78
|
this.size = 'default';
|
|
78
79
|
_CmTextField_internals.set(this, this.attachInternals());
|
|
79
80
|
_CmTextField_id.set(this, nextId('cm-tf'));
|
|
@@ -118,7 +119,7 @@ export class CmTextField extends CmLocalizedElement {
|
|
|
118
119
|
@input=${__classPrivateFieldGet(this, _CmTextField_instances, "m", _CmTextField_onInput)} @change=${__classPrivateFieldGet(this, _CmTextField_instances, "m", _CmTextField_onChange)} @blur=${__classPrivateFieldGet(this, _CmTextField_instances, "m", _CmTextField_onBlur)} />`;
|
|
119
120
|
return html `<div class="field">
|
|
120
121
|
${this.label
|
|
121
|
-
? html `<label for=${__classPrivateFieldGet(this, _CmTextField_id, "f")} part="label">${this.label}${this.required ? html `<span class="req" aria-hidden="true">*</span>` : nothing}${this.hint ? html `<span class="hint">[${this.hint}]</span>` : nothing}</label>`
|
|
122
|
+
? html `<label class="label" for=${__classPrivateFieldGet(this, _CmTextField_id, "f")} part="label">${this.label}${this.required ? html `<span class="req" aria-hidden="true">*</span>` : nothing}${this.hint ? html `<span class="hint">[${this.hint}]</span>` : nothing}</label>`
|
|
122
123
|
: nothing}
|
|
123
124
|
${control}
|
|
124
125
|
${this.error ? html `<p class="error" id="${__classPrivateFieldGet(this, _CmTextField_id, "f")}-err" role="alert">${this.error}</p>` : nothing}
|
|
@@ -211,29 +212,21 @@ CmTextField.properties = {
|
|
|
211
212
|
};
|
|
212
213
|
CmTextField.styles = [
|
|
213
214
|
base,
|
|
215
|
+
fieldStyles,
|
|
214
216
|
css `
|
|
215
217
|
:host { display: block; }
|
|
216
|
-
.field { display: flex; flex-direction: column; gap: var(--cm-space-10); }
|
|
217
|
-
label { font-size: var(--cm-type-label-size); color: var(--cm-text-default); }
|
|
218
|
-
.req { color: var(--cm-text-critical); margin-inline-start: 2px; }
|
|
219
|
-
.hint { margin-inline-start: var(--cm-space-10); font-size: 12px; color: var(--cm-text-tertiary); text-transform: lowercase; }
|
|
220
218
|
.input {
|
|
221
|
-
width: 100%; height:
|
|
222
|
-
font: inherit; font-size:
|
|
219
|
+
width: 100%; height: var(--_cm-field-h); padding: 0 var(--_cm-field-pad);
|
|
220
|
+
font: inherit; font-size: var(--_cm-field-font); line-height: var(--cm-line-height-14); color: var(--cm-text-default);
|
|
223
221
|
background: var(--cm-bg-surface); border: var(--cm-border-1) solid var(--cm-border-input);
|
|
224
222
|
border-radius: var(--cm-radius-sm); outline: none;
|
|
225
223
|
}
|
|
226
|
-
textarea.input { height: auto; padding: var(--cm-space-
|
|
224
|
+
textarea.input { height: auto; min-height: var(--_cm-field-h); padding: var(--cm-space-8) var(--_cm-field-pad); resize: vertical; }
|
|
227
225
|
.input::placeholder { color: var(--cm-text-tertiary); }
|
|
228
226
|
.input:focus { border-color: var(--cm-border-strong); box-shadow: 0 0 0 1px var(--cm-border-strong); }
|
|
229
227
|
.input:read-only, .input:disabled { background: var(--cm-bg-input-filled); }
|
|
230
|
-
.input:disabled { color: var(--cm-text-secondary); border-color: var(--cm-border-
|
|
228
|
+
.input:disabled { color: var(--cm-text-secondary); border-color: var(--cm-border-subtle); cursor: not-allowed; }
|
|
231
229
|
:host([error]:not([error=''])) .input { border-color: var(--cm-border-critical); }
|
|
232
|
-
.help { margin: 0; font-size: 12px; color: var(--cm-text-tertiary); }
|
|
233
|
-
.error { margin: 0; font-size: 12px; color: var(--cm-text-critical); }
|
|
234
|
-
:host([size='small']) .field { gap: 6px; }
|
|
235
|
-
:host([size='small']) label { font-size: 12px; }
|
|
236
|
-
:host([size='small']) .input { font-size: 14px; }
|
|
237
230
|
`,
|
|
238
231
|
];
|
|
239
232
|
define('cm-text-field', CmTextField);
|
|
@@ -57,7 +57,7 @@ CmThumbnail.styles = [
|
|
|
57
57
|
:host([size='large']) { --_size: var(--cm-thumbnail-size, 80px); }
|
|
58
58
|
.box {
|
|
59
59
|
display: grid; place-items: center; overflow: hidden; inline-size: var(--_size); block-size: var(--_size);
|
|
60
|
-
border: var(--cm-border-1) solid var(--cm-border-
|
|
60
|
+
border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-sm);
|
|
61
61
|
background: var(--cm-thumb-bg); color: var(--cm-icon-selected);
|
|
62
62
|
}
|
|
63
63
|
img { inline-size: 100%; block-size: 100%; object-fit: contain; display: block; }
|
|
@@ -219,27 +219,27 @@ CmTimelineItem.styles = [
|
|
|
219
219
|
base,
|
|
220
220
|
css `
|
|
221
221
|
:host { display: block; min-width: 0; font-size: 14px; line-height: 20px; }
|
|
222
|
-
.item { display: flex; gap: var(--cm-space-
|
|
222
|
+
.item { display: flex; gap: var(--cm-space-12); align-items: flex-start; }
|
|
223
223
|
.icon {
|
|
224
224
|
position: relative; z-index: 1; display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--cm-radius-full);
|
|
225
|
-
background: var(--cm-bg-inset); color: var(--cm-icon-default); border: var(--cm-border-1) solid var(--cm-border-
|
|
225
|
+
background: var(--cm-bg-inset); color: var(--cm-icon-default); border: var(--cm-border-1) solid var(--cm-border-subtle);
|
|
226
226
|
}
|
|
227
227
|
.icon.information { background: var(--cm-bg-information-soft); color: var(--cm-text-information); border-color: transparent; }
|
|
228
228
|
.icon.attention { background: var(--cm-bg-attention); color: var(--cm-text-attention); border-color: transparent; }
|
|
229
229
|
.icon.success { background: var(--cm-bg-success-soft); color: var(--cm-text-success); border-color: transparent; }
|
|
230
230
|
.icon.critical { background: var(--cm-bg-critical); color: var(--cm-text-critical); border-color: transparent; }
|
|
231
|
-
.dot { width:
|
|
232
|
-
.main { flex: 1; min-width: 0; padding-block-start:
|
|
233
|
-
.head { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--cm-space-
|
|
231
|
+
.dot { width: 8px; height: 8px; border-radius: var(--cm-radius-full); background: currentColor; }
|
|
232
|
+
.main { flex: 1; min-width: 0; padding-block-start: calc((32px - 20px) / 2); } /* the first line centred on the 32px icon */
|
|
233
|
+
.head { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--cm-space-8); row-gap: 4px; }
|
|
234
234
|
.title { min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
|
|
235
235
|
.when { margin-inline-start: auto; }
|
|
236
236
|
time {
|
|
237
|
-
position: relative; display: inline-block; font-size: 12px; line-height: 16px; color: var(--cm-text-tertiary); white-space: nowrap;
|
|
237
|
+
position: relative; display: inline-block; font-size: 12px; line-height: 16px; color: var(--cm-text-tertiary); white-space: nowrap; font-variant-numeric: tabular-nums;
|
|
238
238
|
border-radius: var(--cm-radius-xs);
|
|
239
239
|
}
|
|
240
240
|
time:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
|
|
241
241
|
.meta { margin-block-start: 2px; font-size: 12px; line-height: 16px; color: var(--cm-text-tertiary); overflow-wrap: anywhere; }
|
|
242
|
-
.body { margin-block-start: var(--cm-space-
|
|
242
|
+
.body { margin-block-start: var(--cm-space-8); overflow-wrap: anywhere; }
|
|
243
243
|
.body.clamp {
|
|
244
244
|
display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--_lines); overflow: hidden;
|
|
245
245
|
max-height: calc(var(--_lines) * 20px);
|
|
@@ -249,7 +249,7 @@ CmTimelineItem.styles = [
|
|
|
249
249
|
text-decoration: underline; background: none; border: 0; cursor: pointer; min-height: 24px;
|
|
250
250
|
}
|
|
251
251
|
.toggle:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; border-radius: var(--cm-radius-xs); }
|
|
252
|
-
.actions { display: flex; flex-wrap: wrap; gap: var(--cm-space-
|
|
252
|
+
.actions { display: flex; flex-wrap: wrap; gap: var(--cm-space-8); margin-block-start: var(--cm-space-8); }
|
|
253
253
|
[hidden] { display: none !important; }
|
|
254
254
|
.sr { position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
255
255
|
::slotted([slot='badge']) { flex: none; }
|
|
@@ -360,15 +360,16 @@ CmTimeline.styles = [
|
|
|
360
360
|
li { position: relative; padding-block-end: var(--cm-space-20); }
|
|
361
361
|
/* The line joining the icons (16px is half the 32px icon). Decorative: a pseudo-element, nothing to read. */
|
|
362
362
|
li::before {
|
|
363
|
-
content: ''; position: absolute; inset-inline-start: 15px; inset-block: 32px 0; width: 2px; background: var(--cm-border-
|
|
363
|
+
content: ''; position: absolute; inset-inline-start: 15px; inset-block: 32px 0; width: 2px; background: var(--cm-border-subtle);
|
|
364
364
|
}
|
|
365
365
|
li:last-child::before { display: none; }
|
|
366
366
|
:host([has-more]) li:last-child::before { display: block; }
|
|
367
367
|
li:last-child { padding-block-end: 0; }
|
|
368
368
|
:host([has-more]) li:last-child { padding-block-end: var(--cm-space-20); }
|
|
369
|
-
.more { display: flex; padding-inline-start:
|
|
369
|
+
.more { display: flex; padding-inline-start: calc(32px + var(--cm-space-12)); }
|
|
370
|
+
|
|
370
371
|
.loading { display: grid; gap: var(--cm-space-20); }
|
|
371
|
-
.sk { display: flex; gap: var(--cm-space-
|
|
372
|
+
.sk { display: flex; gap: var(--cm-space-12); align-items: flex-start; }
|
|
372
373
|
.sk .ic { flex: none; width: 32px; --cm-skeleton-height: 32px; }
|
|
373
374
|
.sk .tx { flex: 1; }
|
|
374
375
|
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
package/dist/components/toast.js
CHANGED
|
@@ -165,10 +165,10 @@ CmToast.styles = [
|
|
|
165
165
|
:host { display: block; pointer-events: auto; }
|
|
166
166
|
:host(:not([open])) { display: none; }
|
|
167
167
|
.toast {
|
|
168
|
-
display: flex; align-items: center; gap: var(--cm-space-
|
|
168
|
+
display: flex; align-items: center; gap: var(--cm-space-12);
|
|
169
169
|
min-block-size: 48px; max-inline-size: min(480px, calc(100vw - 32px));
|
|
170
|
-
padding-block: var(--cm-space-
|
|
171
|
-
border-radius: var(--cm-radius-md); box-shadow: var(--cm-shadow-
|
|
170
|
+
padding-block: var(--cm-space-8); padding-inline: var(--cm-space-20) var(--cm-space-8);
|
|
171
|
+
border-radius: var(--cm-radius-md); box-shadow: var(--cm-shadow-lg);
|
|
172
172
|
background: var(--cm-bg-dashboard); color: var(--cm-text-on-dark);
|
|
173
173
|
outline: 1px solid var(--cm-nav-divider); font-size: 14px; line-height: 20px;
|
|
174
174
|
}
|
|
@@ -177,7 +177,7 @@ CmToast.styles = [
|
|
|
177
177
|
.message { flex: 1; min-inline-size: 0; padding-block: 4px; }
|
|
178
178
|
button {
|
|
179
179
|
flex: none; display: inline-flex; align-items: center; justify-content: center; min-block-size: 32px;
|
|
180
|
-
padding: 0 var(--cm-space-
|
|
180
|
+
padding: 0 var(--cm-space-8); border: 0; border-radius: var(--cm-radius-sm); background: none;
|
|
181
181
|
color: inherit; font: inherit; font-weight: 600; cursor: pointer;
|
|
182
182
|
}
|
|
183
183
|
.action { text-decoration: underline; text-underline-offset: 3px; }
|
|
@@ -240,8 +240,8 @@ CmToastRegion.styles = [
|
|
|
240
240
|
css `
|
|
241
241
|
:host {
|
|
242
242
|
position: fixed; inset-block-end: var(--cm-space-20); inset-inline: 0; z-index: 1000;
|
|
243
|
-
display: flex; flex-direction: column; align-items: center; gap: var(--cm-space-
|
|
244
|
-
padding-inline: var(--cm-space-
|
|
243
|
+
display: flex; flex-direction: column; align-items: center; gap: var(--cm-space-8);
|
|
244
|
+
padding-inline: var(--cm-space-12); pointer-events: none;
|
|
245
245
|
}
|
|
246
246
|
`,
|
|
247
247
|
];
|