@xmesh/system-design 0.0.4 → 0.0.6
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/README.md +2 -1
- package/custom-elements.json +18382 -0
- package/dist/lit/components/alert/index.d.ts +5 -0
- package/dist/lit/components/alert/index.js +8 -2
- package/dist/lit/components/alert/index.styles.js +215 -0
- package/dist/lit/components/app-bar/index.d.ts +1 -0
- package/dist/lit/components/app-bar/index.js +4 -2
- package/dist/lit/components/app-bar/index.styles.js +94 -0
- package/dist/lit/components/artifact/index.d.ts +5 -0
- package/dist/lit/components/artifact/index.js +14 -10
- package/dist/lit/components/artifact/index.styles.js +180 -0
- package/dist/lit/components/autocomplete/index.d.ts +5 -0
- package/dist/lit/components/autocomplete/index.js +11 -2
- package/dist/lit/components/autocomplete/index.styles.js +185 -0
- package/dist/lit/components/avatar/index.d.ts +1 -0
- package/dist/lit/components/avatar/index.js +4 -2
- package/dist/lit/components/avatar/index.styles.js +76 -0
- package/dist/lit/components/avatar-group/index.d.ts +1 -0
- package/dist/lit/components/avatar-group/index.js +4 -2
- package/dist/lit/components/avatar-group/index.styles.js +74 -0
- package/dist/lit/components/badge/index.d.ts +1 -0
- package/dist/lit/components/badge/index.js +4 -2
- package/dist/lit/components/badge/index.styles.js +86 -0
- package/dist/lit/components/brand-mark/index.js +8 -9
- package/dist/lit/components/brand-mark/index.styles.js +123 -0
- package/dist/lit/components/breadcrumbs/index.d.ts +1 -0
- package/dist/lit/components/breadcrumbs/index.js +5 -4
- package/dist/lit/components/breadcrumbs/index.styles.js +105 -0
- package/dist/lit/components/bubble/index.d.ts +4 -0
- package/dist/lit/components/bubble/index.js +14 -11
- package/dist/lit/components/bubble/index.styles.js +196 -0
- package/dist/lit/components/button/index.d.ts +1 -0
- package/dist/lit/components/button/index.js +6 -13
- package/dist/lit/components/button/index.styles.js +356 -0
- package/dist/lit/components/card/index.d.ts +1 -0
- package/dist/lit/components/card/index.js +4 -2
- package/dist/lit/components/card/index.styles.js +113 -0
- package/dist/lit/components/chat/index.d.ts +6 -0
- package/dist/lit/components/chat/index.js +15 -10
- package/dist/lit/components/chat/index.styles.js +306 -0
- package/dist/lit/components/checkbox/index.d.ts +1 -0
- package/dist/lit/components/checkbox/index.js +7 -4
- package/dist/lit/components/checkbox/index.styles.js +140 -0
- package/dist/lit/components/chip/index.d.ts +5 -0
- package/dist/lit/components/chip/index.js +8 -2
- package/dist/lit/components/chip/index.styles.js +159 -0
- package/dist/lit/components/chip-group/index.d.ts +4 -0
- package/dist/lit/components/chip-group/index.js +7 -2
- package/dist/lit/components/chip-group/index.styles.js +33 -0
- package/dist/lit/components/code/index.d.ts +1 -0
- package/dist/lit/components/code/index.js +4 -3
- package/dist/lit/components/code/index.styles.js +56 -0
- package/dist/lit/components/composer/index.d.ts +6 -0
- package/dist/lit/components/composer/index.js +15 -10
- package/dist/lit/components/composer/index.styles.js +562 -0
- package/dist/lit/components/data-table/index.css +18 -0
- package/dist/lit/components/data-table/index.d.ts +30 -0
- package/dist/lit/components/data-table/index.js +120 -34
- package/dist/lit/components/data-table/index.styles.js +198 -0
- package/dist/lit/components/date-range/index.d.ts +4 -0
- package/dist/lit/components/date-range/index.js +7 -2
- package/dist/lit/components/date-range/index.styles.js +338 -0
- package/dist/lit/components/dialog/index.d.ts +4 -0
- package/dist/lit/components/dialog/index.js +7 -2
- package/dist/lit/components/dialog/index.styles.js +138 -0
- package/dist/lit/components/divider/index.d.ts +1 -0
- package/dist/lit/components/divider/index.js +4 -2
- package/dist/lit/components/divider/index.styles.js +41 -0
- package/dist/lit/components/empty-state/index.d.ts +1 -0
- package/dist/lit/components/empty-state/index.js +4 -2
- package/dist/lit/components/empty-state/index.styles.js +83 -0
- package/dist/lit/components/expansion-panel/index.d.ts +5 -0
- package/dist/lit/components/expansion-panel/index.js +8 -2
- package/dist/lit/components/expansion-panel/index.styles.js +134 -0
- package/dist/lit/components/field/index.d.ts +4 -0
- package/dist/lit/components/field/index.js +9 -4
- package/dist/lit/components/field/index.styles.js +237 -0
- package/dist/lit/components/file-input/index.d.ts +4 -0
- package/dist/lit/components/file-input/index.js +10 -4
- package/dist/lit/components/file-input/index.styles.js +271 -0
- package/dist/lit/components/form/index.d.ts +4 -0
- package/dist/lit/components/form/index.js +7 -2
- package/dist/lit/components/form/index.styles.js +43 -0
- package/dist/lit/components/grid/index.d.ts +1 -0
- package/dist/lit/components/grid/index.js +4 -2
- package/dist/lit/components/grid/index.styles.js +67 -0
- package/dist/lit/components/kbd/index.d.ts +1 -0
- package/dist/lit/components/kbd/index.js +4 -2
- package/dist/lit/components/kbd/index.styles.js +49 -0
- package/dist/lit/components/list/index.d.ts +4 -0
- package/dist/lit/components/list/index.js +7 -2
- package/dist/lit/components/list/index.styles.js +29 -0
- package/dist/lit/components/list-item/index.d.ts +1 -0
- package/dist/lit/components/list-item/index.js +4 -2
- package/dist/lit/components/list-item/index.styles.js +133 -0
- package/dist/lit/components/menu/index.d.ts +8 -0
- package/dist/lit/components/menu/index.js +11 -3
- package/dist/lit/components/menu/index.styles.js +108 -0
- package/dist/lit/components/multi-select/index.css +156 -0
- package/dist/lit/components/multi-select/index.d.ts +70 -0
- package/dist/lit/components/multi-select/index.js +497 -0
- package/dist/lit/components/multi-select/index.styles.js +170 -0
- package/dist/lit/components/navigation-drawer/index.d.ts +4 -0
- package/dist/lit/components/navigation-drawer/index.js +7 -2
- package/dist/lit/components/navigation-drawer/index.styles.js +128 -0
- package/dist/lit/components/overlay/index.d.ts +5 -0
- package/dist/lit/components/overlay/index.js +8 -2
- package/dist/lit/components/overlay/index.styles.js +185 -0
- package/dist/lit/components/pagination/index.d.ts +17 -0
- package/dist/lit/components/pagination/index.js +53 -8
- package/dist/lit/components/pagination/index.styles.js +116 -0
- package/dist/lit/components/popover/index.d.ts +5 -0
- package/dist/lit/components/popover/index.js +8 -2
- package/dist/lit/components/popover/index.styles.js +48 -0
- package/dist/lit/components/primitives/index.js +8 -9
- package/dist/lit/components/primitives/index.styles.js +518 -0
- package/dist/lit/components/progress/index.d.ts +1 -0
- package/dist/lit/components/progress/index.js +4 -2
- package/dist/lit/components/progress/index.styles.js +157 -0
- package/dist/lit/components/radio-group/index.d.ts +5 -0
- package/dist/lit/components/radio-group/index.js +10 -6
- package/dist/lit/components/radio-group/index.styles.js +192 -0
- package/dist/lit/components/select/index.d.ts +4 -0
- package/dist/lit/components/select/index.js +10 -2
- package/dist/lit/components/select/index.styles.js +165 -0
- package/dist/lit/components/sidebar-item/index.js +8 -9
- package/dist/lit/components/sidebar-item/index.styles.js +147 -0
- package/dist/lit/components/skeleton/index.d.ts +1 -0
- package/dist/lit/components/skeleton/index.js +4 -2
- package/dist/lit/components/skeleton/index.styles.js +95 -0
- package/dist/lit/components/slider/index.d.ts +5 -0
- package/dist/lit/components/slider/index.js +11 -4
- package/dist/lit/components/slider/index.styles.js +185 -0
- package/dist/lit/components/snackbar/index.d.ts +4 -0
- package/dist/lit/components/snackbar/index.js +14 -10
- package/dist/lit/components/snackbar/index.styles.js +293 -0
- package/dist/lit/components/stack/index.d.ts +1 -0
- package/dist/lit/components/stack/index.js +4 -2
- package/dist/lit/components/stack/index.styles.js +55 -0
- package/dist/lit/components/switch/index.d.ts +1 -0
- package/dist/lit/components/switch/index.js +7 -4
- package/dist/lit/components/switch/index.styles.js +140 -0
- package/dist/lit/components/table/index.d.ts +1 -0
- package/dist/lit/components/table/index.js +4 -2
- package/dist/lit/components/table/index.styles.js +99 -0
- package/dist/lit/components/tabs/index.d.ts +4 -0
- package/dist/lit/components/tabs/index.js +8 -4
- package/dist/lit/components/tabs/index.styles.js +130 -0
- package/dist/lit/components/text-field/index.d.ts +1 -0
- package/dist/lit/components/text-field/index.js +7 -2
- package/dist/lit/components/text-field/index.styles.js +104 -0
- package/dist/lit/components/textarea/index.d.ts +1 -0
- package/dist/lit/components/textarea/index.js +7 -2
- package/dist/lit/components/textarea/index.styles.js +69 -0
- package/dist/lit/components/tooltip/index.d.ts +1 -0
- package/dist/lit/components/tooltip/index.js +4 -2
- package/dist/lit/components/tooltip/index.styles.js +51 -0
- package/dist/lit/components/validation/index.d.ts +6 -0
- package/dist/lit/components/validation/index.js +15 -10
- package/dist/lit/components/validation/index.styles.js +400 -0
- package/dist/lit/index.d.ts +1 -0
- package/dist/lit/index.js +1 -0
- package/dist/react/XmAlert.d.ts +99 -0
- package/dist/react/XmAlert.js +47 -0
- package/dist/react/XmAppBar.d.ts +59 -0
- package/dist/react/XmAppBar.js +34 -0
- package/dist/react/XmArtifact.d.ts +113 -0
- package/dist/react/XmArtifact.js +48 -0
- package/dist/react/XmArtifactChip.d.ts +56 -0
- package/dist/react/XmArtifactChip.js +32 -0
- package/dist/react/XmAutocomplete.d.ts +153 -0
- package/dist/react/XmAutocomplete.js +70 -0
- package/dist/react/XmAvatar.d.ts +71 -0
- package/dist/react/XmAvatar.js +40 -0
- package/dist/react/XmAvatarGroup.d.ts +59 -0
- package/dist/react/XmAvatarGroup.js +34 -0
- package/dist/react/XmBadge.d.ts +67 -0
- package/dist/react/XmBadge.js +38 -0
- package/dist/react/XmBrandGlyph.d.ts +46 -0
- package/dist/react/XmBrandGlyph.js +24 -0
- package/dist/react/XmBrandMark.d.ts +71 -0
- package/dist/react/XmBrandMark.js +40 -0
- package/dist/react/XmBreadcrumbs.d.ts +56 -0
- package/dist/react/XmBreadcrumbs.js +32 -0
- package/dist/react/XmBubble.d.ts +69 -0
- package/dist/react/XmBubble.js +38 -0
- package/dist/react/XmBubbleActions.d.ts +59 -0
- package/dist/react/XmBubbleActions.js +34 -0
- package/dist/react/XmBubbleGroup.d.ts +82 -0
- package/dist/react/XmBubbleGroup.js +38 -0
- package/dist/react/XmButton.d.ts +89 -0
- package/dist/react/XmButton.js +48 -0
- package/dist/react/XmCard.d.ts +59 -0
- package/dist/react/XmCard.js +34 -0
- package/dist/react/XmChatShell.d.ts +110 -0
- package/dist/react/XmChatShell.js +48 -0
- package/dist/react/XmCheckbox.d.ts +145 -0
- package/dist/react/XmCheckbox.js +60 -0
- package/dist/react/XmChip.d.ts +99 -0
- package/dist/react/XmChip.js +48 -0
- package/dist/react/XmChipGroup.d.ts +79 -0
- package/dist/react/XmChipGroup.js +36 -0
- package/dist/react/XmCode.d.ts +55 -0
- package/dist/react/XmCode.js +32 -0
- package/dist/react/XmComposer.d.ts +123 -0
- package/dist/react/XmComposer.js +56 -0
- package/dist/react/XmDataTable.d.ts +125 -0
- package/dist/react/XmDataTable.js +66 -0
- package/dist/react/XmDateRange.d.ts +93 -0
- package/dist/react/XmDateRange.js +42 -0
- package/dist/react/XmDialog.d.ts +87 -0
- package/dist/react/XmDialog.js +41 -0
- package/dist/react/XmDivider.d.ts +55 -0
- package/dist/react/XmDivider.js +32 -0
- package/dist/react/XmEmptyState.d.ts +61 -0
- package/dist/react/XmEmptyState.js +34 -0
- package/dist/react/XmExpansionPanel.d.ts +101 -0
- package/dist/react/XmExpansionPanel.js +49 -0
- package/dist/react/XmFileInput.d.ts +151 -0
- package/dist/react/XmFileInput.js +70 -0
- package/dist/react/XmFileValidationBlock.d.ts +111 -0
- package/dist/react/XmFileValidationBlock.js +50 -0
- package/dist/react/XmForm.d.ts +91 -0
- package/dist/react/XmForm.js +38 -0
- package/dist/react/XmGrid.d.ts +59 -0
- package/dist/react/XmGrid.js +34 -0
- package/dist/react/XmKbd.d.ts +46 -0
- package/dist/react/XmKbd.js +24 -0
- package/dist/react/XmList.d.ts +83 -0
- package/dist/react/XmList.js +38 -0
- package/dist/react/XmListItem.d.ts +67 -0
- package/dist/react/XmListItem.js +38 -0
- package/dist/react/XmMenu.d.ts +98 -0
- package/dist/react/XmMenu.js +46 -0
- package/dist/react/XmMenuItem.d.ts +63 -0
- package/dist/react/XmMenuItem.js +36 -0
- package/dist/react/XmMultiSelect.d.ts +161 -0
- package/dist/react/XmMultiSelect.js +74 -0
- package/dist/react/XmNavigationDrawer.d.ts +93 -0
- package/dist/react/XmNavigationDrawer.js +42 -0
- package/dist/react/XmOverlay.d.ts +120 -0
- package/dist/react/XmOverlay.js +56 -0
- package/dist/react/XmPagination.d.ts +117 -0
- package/dist/react/XmPagination.js +58 -0
- package/dist/react/XmPopover.d.ts +90 -0
- package/dist/react/XmPopover.js +42 -0
- package/dist/react/XmProgress.d.ts +75 -0
- package/dist/react/XmProgress.js +42 -0
- package/dist/react/XmRadio.d.ts +88 -0
- package/dist/react/XmRadio.js +42 -0
- package/dist/react/XmRadioGroup.d.ts +139 -0
- package/dist/react/XmRadioGroup.js +58 -0
- package/dist/react/XmSelect.d.ts +152 -0
- package/dist/react/XmSelect.js +70 -0
- package/dist/react/XmSidebarItem.d.ts +75 -0
- package/dist/react/XmSidebarItem.js +42 -0
- package/dist/react/XmSkeleton.d.ts +71 -0
- package/dist/react/XmSkeleton.js +40 -0
- package/dist/react/XmSlider.d.ts +160 -0
- package/dist/react/XmSlider.js +76 -0
- package/dist/react/XmSnackbar.d.ts +110 -0
- package/dist/react/XmSnackbar.js +51 -0
- package/dist/react/XmStack.d.ts +71 -0
- package/dist/react/XmStack.js +40 -0
- package/dist/react/XmSwitch.d.ts +136 -0
- package/dist/react/XmSwitch.js +58 -0
- package/dist/react/XmTab.d.ts +79 -0
- package/dist/react/XmTab.js +38 -0
- package/dist/react/XmTabPanel.d.ts +55 -0
- package/dist/react/XmTabPanel.js +32 -0
- package/dist/react/XmTable.d.ts +57 -0
- package/dist/react/XmTable.js +32 -0
- package/dist/react/XmTabs.d.ts +82 -0
- package/dist/react/XmTabs.js +38 -0
- package/dist/react/XmTextField.d.ts +147 -0
- package/dist/react/XmTextField.js +62 -0
- package/dist/react/XmTextarea.d.ts +155 -0
- package/dist/react/XmTextarea.js +66 -0
- package/dist/react/XmTooltip.d.ts +67 -0
- package/dist/react/XmTooltip.js +38 -0
- package/dist/react/index.d.ts +59 -0
- package/dist/react/index.js +59 -0
- package/dist/react/react-utils.js +67 -0
- package/package.json +37 -9
- package/styles/_base-typography.css +86 -0
- package/styles/_primitives.css +54 -0
- package/styles/_reset.css +58 -0
- package/styles/base.css +23 -0
- package/vscode.css-custom-data.json +6 -0
- package/vscode.html-custom-data.json +979 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/snackbar/index.css
|
|
2
|
+
// SSR-safe: constructable stylesheets need the DOM, so in a non-DOM context
|
|
3
|
+
// (Node/SSR import) this exports [] instead of throwing. The CSS self-declares
|
|
4
|
+
// the @layer order so the override contract holds even without ./base (AD-2).
|
|
5
|
+
let sheets = [];
|
|
6
|
+
if (typeof CSSStyleSheet !== "undefined") {
|
|
7
|
+
const sheet = new CSSStyleSheet();
|
|
8
|
+
sheet.replaceSync(`@layer reset, base, tokens, components, utilities;
|
|
9
|
+
@layer components {
|
|
10
|
+
/* ============================================
|
|
11
|
+
Snackbar — backend error surface
|
|
12
|
+
|
|
13
|
+
Styles for <Snackbar /> (components/snackbar/index.jsx). Lives at the bottom
|
|
14
|
+
of the chat pane, above the composer. The host owns placement (an
|
|
15
|
+
absolute container inside .chat-main); this rule set styles the card
|
|
16
|
+
itself, its severity variants, the dim backdrop overlay, and the entry
|
|
17
|
+
animation. The card is neutral; the gradient overlay uses the
|
|
18
|
+
neutral \`--xm-snackbar-scrim*\` tokens (no severity hue).
|
|
19
|
+
|
|
20
|
+
Note: the .failmode-* picker classes used by chat-shell.jsx are NOT
|
|
21
|
+
part of this component — they live in ../styles.css as prototype
|
|
22
|
+
chrome.
|
|
23
|
+
============================================ */
|
|
24
|
+
|
|
25
|
+
.snackbar-stack {
|
|
26
|
+
position: absolute;
|
|
27
|
+
inset: 0;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: flex-end;
|
|
32
|
+
gap: var(--s-2);
|
|
33
|
+
pointer-events: none;
|
|
34
|
+
padding: 0 var(--s-6) 116px; /* sits clearly above the chat-shell__composer */
|
|
35
|
+
z-index: 40;
|
|
36
|
+
}
|
|
37
|
+
.snackbar-stack > * { pointer-events: auto; }
|
|
38
|
+
|
|
39
|
+
/* Dim backdrop behind the snackbar so the error reads as a focused
|
|
40
|
+
modal-ish surface, not a passive notification. Sits below the snackbar
|
|
41
|
+
in the same stack and fades in with the same easing.
|
|
42
|
+
|
|
43
|
+
We do NOT use backdrop-filter here — a full-pane blur is expensive on
|
|
44
|
+
every paint, and the chat behind contains a virtualized scroll list, so
|
|
45
|
+
it would regress scrolling. Instead we use a denser overlay color
|
|
46
|
+
(theme-aware) plus a faint vertical gradient so the snackbar still feels
|
|
47
|
+
"lifted" without any GPU filter work. */
|
|
48
|
+
.snackbar-overlay {
|
|
49
|
+
position: absolute;
|
|
50
|
+
inset: 0;
|
|
51
|
+
background:
|
|
52
|
+
linear-gradient(
|
|
53
|
+
to top,
|
|
54
|
+
var(--xm-snackbar-scrim-strong) 0%,
|
|
55
|
+
var(--xm-snackbar-scrim) 60%,
|
|
56
|
+
var(--xm-snackbar-scrim-soft) 100%
|
|
57
|
+
);
|
|
58
|
+
animation: snackbar-overlay-in var(--md-sys-motion-duration-medium1) cubic-bezier(0.32, 0.72, 0.24, 1) both;
|
|
59
|
+
pointer-events: auto; /* clicks land on the overlay, not the chat behind */
|
|
60
|
+
}
|
|
61
|
+
@keyframes snackbar-overlay-in {
|
|
62
|
+
from { opacity: 0; }
|
|
63
|
+
to { opacity: 1; }
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.snackbar {
|
|
67
|
+
/* Component-local vars — single neutral surface for all severities.
|
|
68
|
+
Severity is communicated by the icon and body copy, not by hue. */
|
|
69
|
+
/* The card rides the surface family (--snk-bg = surface-container-high),
|
|
70
|
+
so ink must come from the on-surface family, not inverse-on-surface —
|
|
71
|
+
pairing inverse ink (a dark ink) on this dark surface reads dark-on-dark
|
|
72
|
+
and fails AA (POLICIES 7a). --snk-accent stays the brightest on-surface
|
|
73
|
+
tone so the reversed primary button keeps high contrast. */
|
|
74
|
+
--snk-bg: var(--md-sys-color-surface-container-high);
|
|
75
|
+
--snk-border: var(--md-sys-color-outline-variant);
|
|
76
|
+
--snk-accent: var(--md-sys-color-on-surface);
|
|
77
|
+
--snk-ink: var(--md-sys-color-on-surface);
|
|
78
|
+
--snk-ink-soft: var(--md-sys-color-on-surface-variant);
|
|
79
|
+
|
|
80
|
+
position: relative;
|
|
81
|
+
display: grid;
|
|
82
|
+
grid-template-columns: auto 1fr auto auto;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: var(--s-3-5);
|
|
85
|
+
width: 100%;
|
|
86
|
+
max-width: 620px;
|
|
87
|
+
padding: var(--s-3-5) var(--s-3-5) var(--s-3-5) var(--s-4);
|
|
88
|
+
background: var(--snk-bg);
|
|
89
|
+
border: 1px solid var(--snk-border);
|
|
90
|
+
border-radius: var(--md-sys-shape-corner-medium);
|
|
91
|
+
box-shadow: var(--xm-elevation-snackbar);
|
|
92
|
+
color: var(--snk-ink);
|
|
93
|
+
font-family: var(--md-sys-typescale-body-large-font);
|
|
94
|
+
animation: snackbar-in 280ms cubic-bezier(0.32, 0.72, 0.24, 1) both;
|
|
95
|
+
}
|
|
96
|
+
.snackbar--static { animation: none; }
|
|
97
|
+
|
|
98
|
+
@keyframes snackbar-in {
|
|
99
|
+
from {
|
|
100
|
+
opacity: 0;
|
|
101
|
+
transform: translateY(8px) scale(0.985);
|
|
102
|
+
}
|
|
103
|
+
to {
|
|
104
|
+
opacity: 1;
|
|
105
|
+
transform: translateY(0) scale(1);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Severity variants — class hooks kept for JSX/markup compatibility, but
|
|
110
|
+
they no longer swap colors. The icon and body copy carry the severity. */
|
|
111
|
+
|
|
112
|
+
.snackbar__icon {
|
|
113
|
+
display: inline-flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
width: 36px;
|
|
117
|
+
height: 36px;
|
|
118
|
+
border-radius: 10px;
|
|
119
|
+
/* Soft on-card highlight chip: stronger contrast in dark, softer in light. */
|
|
120
|
+
background: color-mix(in oklch, var(--snk-accent) 18%, transparent);
|
|
121
|
+
color: var(--snk-accent);
|
|
122
|
+
flex-shrink: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.snackbar__body {
|
|
126
|
+
min-width: 0;
|
|
127
|
+
display: flex;
|
|
128
|
+
flex-direction: column;
|
|
129
|
+
gap: 3px;
|
|
130
|
+
}
|
|
131
|
+
.snackbar__head {
|
|
132
|
+
display: inline-flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
gap: var(--s-2);
|
|
135
|
+
font-size: 13.5px;
|
|
136
|
+
font-weight: 600;
|
|
137
|
+
letter-spacing: -0.005em;
|
|
138
|
+
color: var(--snk-ink);
|
|
139
|
+
}
|
|
140
|
+
.snackbar__code {
|
|
141
|
+
font-family: var(--xm-typescale-mono-font);
|
|
142
|
+
font-size: 10.5px;
|
|
143
|
+
font-weight: 700;
|
|
144
|
+
letter-spacing: 0.04em;
|
|
145
|
+
padding: 0;
|
|
146
|
+
background: transparent;
|
|
147
|
+
color: var(--snk-accent);
|
|
148
|
+
flex-shrink: 0;
|
|
149
|
+
}
|
|
150
|
+
.snackbar__title {
|
|
151
|
+
white-space: nowrap;
|
|
152
|
+
overflow: hidden;
|
|
153
|
+
text-overflow: ellipsis;
|
|
154
|
+
}
|
|
155
|
+
.snackbar__msg {
|
|
156
|
+
font-size: 13px;
|
|
157
|
+
color: var(--snk-ink-soft);
|
|
158
|
+
line-height: 1.45;
|
|
159
|
+
text-wrap: pretty;
|
|
160
|
+
}
|
|
161
|
+
.snackbar__meta {
|
|
162
|
+
display: inline-flex;
|
|
163
|
+
align-items: baseline;
|
|
164
|
+
gap: var(--s-1-5);
|
|
165
|
+
margin-top: var(--s-1);
|
|
166
|
+
font-size: 11px;
|
|
167
|
+
}
|
|
168
|
+
.snackbar__meta-label {
|
|
169
|
+
text-transform: uppercase;
|
|
170
|
+
letter-spacing: 0.08em;
|
|
171
|
+
color: var(--snk-ink-soft);
|
|
172
|
+
font-weight: 500;
|
|
173
|
+
opacity: 0.8;
|
|
174
|
+
}
|
|
175
|
+
.snackbar__meta-id {
|
|
176
|
+
font-family: var(--xm-typescale-mono-font);
|
|
177
|
+
color: var(--snk-ink);
|
|
178
|
+
background: transparent;
|
|
179
|
+
border: 0;
|
|
180
|
+
padding: 0;
|
|
181
|
+
font-size: 11px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.snackbar__actions {
|
|
185
|
+
display: inline-flex;
|
|
186
|
+
align-items: center;
|
|
187
|
+
gap: var(--s-1-5);
|
|
188
|
+
flex-shrink: 0;
|
|
189
|
+
}
|
|
190
|
+
.snackbar__btn {
|
|
191
|
+
appearance: none;
|
|
192
|
+
border: 1px solid transparent;
|
|
193
|
+
background: transparent;
|
|
194
|
+
font: inherit;
|
|
195
|
+
font-size: 12.5px;
|
|
196
|
+
font-weight: 600;
|
|
197
|
+
padding: 7px 11px;
|
|
198
|
+
border-radius: 8px;
|
|
199
|
+
cursor: pointer;
|
|
200
|
+
display: inline-flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
gap: var(--s-1-5);
|
|
203
|
+
transition:
|
|
204
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
205
|
+
border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
206
|
+
color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
207
|
+
white-space: nowrap;
|
|
208
|
+
color: var(--snk-ink);
|
|
209
|
+
}
|
|
210
|
+
.snackbar__btn--primary {
|
|
211
|
+
background: var(--snk-accent);
|
|
212
|
+
color: var(--snk-bg); /* high-contrast inverse against the accent */
|
|
213
|
+
border-color: var(--snk-accent);
|
|
214
|
+
}
|
|
215
|
+
.snackbar__btn--primary:hover {
|
|
216
|
+
background: color-mix(in oklab, var(--snk-bg) var(--md-sys-state-hover-state-layer-opacity), var(--snk-accent));
|
|
217
|
+
}
|
|
218
|
+
.snackbar__btn--primary:active { transform: translateY(1px); }
|
|
219
|
+
.snackbar__btn--primary svg { opacity: 0.9; }
|
|
220
|
+
|
|
221
|
+
.snackbar__btn--ghost {
|
|
222
|
+
color: var(--snk-ink-soft);
|
|
223
|
+
border-color: transparent;
|
|
224
|
+
}
|
|
225
|
+
.snackbar__btn--ghost:hover {
|
|
226
|
+
color: var(--snk-ink);
|
|
227
|
+
background: color-mix(in oklch, var(--snk-accent) 14%, transparent);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.snackbar__close {
|
|
231
|
+
appearance: none;
|
|
232
|
+
border: none;
|
|
233
|
+
background: transparent;
|
|
234
|
+
color: var(--snk-ink-soft);
|
|
235
|
+
width: 28px;
|
|
236
|
+
height: 28px;
|
|
237
|
+
border-radius: 6px;
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
display: inline-flex;
|
|
240
|
+
align-items: center;
|
|
241
|
+
justify-content: center;
|
|
242
|
+
transition:
|
|
243
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
244
|
+
color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
245
|
+
flex-shrink: 0;
|
|
246
|
+
}
|
|
247
|
+
.snackbar__close:hover {
|
|
248
|
+
background: color-mix(in oklch, var(--snk-accent) 14%, transparent);
|
|
249
|
+
color: var(--snk-ink);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* When sitting in the bare canvas (state cards on the design surface), the
|
|
253
|
+
card needs a touch more contrast against the warm canvas background. */
|
|
254
|
+
.snackbar-card-frame {
|
|
255
|
+
background: var(--md-sys-color-surface);
|
|
256
|
+
padding: 30px var(--s-7);
|
|
257
|
+
display: flex;
|
|
258
|
+
align-items: center;
|
|
259
|
+
justify-content: center;
|
|
260
|
+
width: 100%;
|
|
261
|
+
height: 100%;
|
|
262
|
+
position: relative;
|
|
263
|
+
}
|
|
264
|
+
.snackbar-card-frame .frame-label {
|
|
265
|
+
position: absolute;
|
|
266
|
+
top: var(--s-4);
|
|
267
|
+
left: var(--s-6);
|
|
268
|
+
margin: 0;
|
|
269
|
+
}
|
|
270
|
+
.snackbar-card-frame .snackbar {
|
|
271
|
+
max-width: 580px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/* Compact variant: when the chat shell is narrow, drop the right-side actions
|
|
275
|
+
below the body so nothing gets cut off. The 640px literal mirrors
|
|
276
|
+
--xm-breakpoint-md (styles/_layout.css) — @media can't read the token
|
|
277
|
+
(docs/adr/0001), so the literal is the source-of-truth's echo. */
|
|
278
|
+
@media (max-width: 640px) {
|
|
279
|
+
.snackbar {
|
|
280
|
+
grid-template-columns: auto 1fr auto;
|
|
281
|
+
grid-template-rows: auto auto;
|
|
282
|
+
row-gap: var(--s-2);
|
|
283
|
+
}
|
|
284
|
+
.snackbar__actions {
|
|
285
|
+
grid-column: 1 / -2;
|
|
286
|
+
justify-content: flex-end;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
}`);
|
|
291
|
+
sheets = [sheet];
|
|
292
|
+
}
|
|
293
|
+
export default sheets;
|
|
@@ -5,6 +5,7 @@ type StackGap = "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
|
5
5
|
type StackAlign = "start" | "center" | "end" | "stretch";
|
|
6
6
|
type StackJustify = "start" | "center" | "end" | "between";
|
|
7
7
|
export declare class XmStack extends LitElement {
|
|
8
|
+
static styles: CSSStyleSheet[];
|
|
8
9
|
direction: StackDirection;
|
|
9
10
|
gap: StackGap;
|
|
10
11
|
align: StackAlign;
|
|
@@ -38,9 +38,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
38
38
|
};
|
|
39
39
|
import { LitElement, html } from "lit";
|
|
40
40
|
import { customElement, property } from "lit/decorators.js";
|
|
41
|
+
import stackSheets from "./index.styles.js";
|
|
41
42
|
// Resolve CSS relative to the *built* file:
|
|
42
43
|
// lit/build/components/stack/index.js → ../stack/index.css.
|
|
43
|
-
const STACK_CSS = new URL("../stack/index.css", import.meta.url).href;
|
|
44
44
|
const DIRECTIONS = ["vertical", "horizontal"];
|
|
45
45
|
const GAPS = ["none", "xs", "sm", "md", "lg", "xl"];
|
|
46
46
|
const ALIGNS = ["start", "center", "end", "stretch"];
|
|
@@ -54,6 +54,9 @@ let XmStack = class XmStack extends LitElement {
|
|
|
54
54
|
this.justify = "start";
|
|
55
55
|
this.wrap = false;
|
|
56
56
|
}
|
|
57
|
+
// Adopted from the build-generated sheets (scripts/gen-styles.mjs) — no
|
|
58
|
+
// runtime URL fetch (ADR 0012). Cascade order preserved from the old <link>s.
|
|
59
|
+
static { this.styles = [...stackSheets]; }
|
|
57
60
|
render() {
|
|
58
61
|
const direction = DIRECTIONS.includes(this.direction)
|
|
59
62
|
? this.direction
|
|
@@ -66,7 +69,6 @@ let XmStack = class XmStack extends LitElement {
|
|
|
66
69
|
? this.justify
|
|
67
70
|
: "start";
|
|
68
71
|
return html `
|
|
69
|
-
<link rel="stylesheet" href="${STACK_CSS}" />
|
|
70
72
|
<style>
|
|
71
73
|
:host {
|
|
72
74
|
display: block;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/stack/index.css
|
|
2
|
+
// SSR-safe: constructable stylesheets need the DOM, so in a non-DOM context
|
|
3
|
+
// (Node/SSR import) this exports [] instead of throwing. The CSS self-declares
|
|
4
|
+
// the @layer order so the override contract holds even without ./base (AD-2).
|
|
5
|
+
let sheets = [];
|
|
6
|
+
if (typeof CSSStyleSheet !== "undefined") {
|
|
7
|
+
const sheet = new CSSStyleSheet();
|
|
8
|
+
sheet.replaceSync(`@layer reset, base, tokens, components, utilities;
|
|
9
|
+
@layer components {
|
|
10
|
+
/* ============================================
|
|
11
|
+
<xm-stack> — 1-D flex layout (vertical default).
|
|
12
|
+
|
|
13
|
+
The flex-stack primitive behind forms, sidebars, and action rows.
|
|
14
|
+
Slotted children are flex items (the <slot> is layout-transparent).
|
|
15
|
+
Gutter via gap="…" → --xm-gutter-* (the --s-N-aliased layout tier).
|
|
16
|
+
|
|
17
|
+
BEM block \`stack\`; modifiers --vertical / --horizontal, --gap-*,
|
|
18
|
+
--align-*, --justify-*. Registered in scripts/check-bem.sh
|
|
19
|
+
STRICT_BLOCKS.
|
|
20
|
+
============================================ */
|
|
21
|
+
|
|
22
|
+
.stack {
|
|
23
|
+
display: flex;
|
|
24
|
+
gap: var(--xm-gutter-md);
|
|
25
|
+
/* Inherited ink so currentColor in slotted content reads on the desk
|
|
26
|
+
surface (AD-13) — also satisfies the --md-sys-* token gate. */
|
|
27
|
+
color: var(--md-sys-color-on-surface);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.stack--vertical { flex-direction: column; }
|
|
31
|
+
.stack--horizontal { flex-direction: row; flex-wrap: nowrap; }
|
|
32
|
+
|
|
33
|
+
:host([wrap]) .stack--horizontal { flex-wrap: wrap; }
|
|
34
|
+
|
|
35
|
+
.stack--gap-none { gap: var(--xm-gutter-none); }
|
|
36
|
+
.stack--gap-xs { gap: var(--xm-gutter-xs); }
|
|
37
|
+
.stack--gap-sm { gap: var(--xm-gutter-sm); }
|
|
38
|
+
.stack--gap-md { gap: var(--xm-gutter-md); }
|
|
39
|
+
.stack--gap-lg { gap: var(--xm-gutter-lg); }
|
|
40
|
+
.stack--gap-xl { gap: var(--xm-gutter-xl); }
|
|
41
|
+
|
|
42
|
+
.stack--align-start { align-items: flex-start; }
|
|
43
|
+
.stack--align-center { align-items: center; }
|
|
44
|
+
.stack--align-end { align-items: flex-end; }
|
|
45
|
+
.stack--align-stretch { align-items: stretch; }
|
|
46
|
+
|
|
47
|
+
.stack--justify-start { justify-content: flex-start; }
|
|
48
|
+
.stack--justify-center { justify-content: center; }
|
|
49
|
+
.stack--justify-end { justify-content: flex-end; }
|
|
50
|
+
.stack--justify-between { justify-content: space-between; }
|
|
51
|
+
|
|
52
|
+
}`);
|
|
53
|
+
sheets = [sheet];
|
|
54
|
+
}
|
|
55
|
+
export default sheets;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TemplateResult } from "lit";
|
|
2
2
|
import { XmField } from "../field/index.js";
|
|
3
3
|
export declare class XmSwitch extends XmField {
|
|
4
|
+
static styles: CSSStyleSheet[];
|
|
4
5
|
/** A switch submits checked-state ("on"/null), not text — declare it a toggle
|
|
5
6
|
so the form value is correct from first paint, before any user interaction
|
|
6
7
|
(the base seeds `_checked` from the `checked` attribute and `isToggle`
|
|
@@ -29,8 +29,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
29
29
|
import { html, nothing } from "lit";
|
|
30
30
|
import { customElement } from "lit/decorators.js";
|
|
31
31
|
import { XmField } from "../field/index.js";
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
import primitivesSheets from "../primitives/index.styles.js";
|
|
33
|
+
import fieldSheets from "../field/index.styles.js";
|
|
34
|
+
import switchSheets from "./index.styles.js";
|
|
34
35
|
let XmSwitch = class XmSwitch extends XmField {
|
|
35
36
|
constructor() {
|
|
36
37
|
super(...arguments);
|
|
@@ -46,6 +47,10 @@ let XmSwitch = class XmSwitch extends XmField {
|
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
49
|
}
|
|
50
|
+
// Adopted from build-generated sheets (gen-styles.mjs) — no runtime URL
|
|
51
|
+
// fetch (ADR 0012). Lit static styles don't merge on override, so subclasses
|
|
52
|
+
// re-include the chrome (primitives + field) sheets.
|
|
53
|
+
static { this.styles = [...primitivesSheets, ...fieldSheets, ...switchSheets]; }
|
|
49
54
|
/** A switch submits checked-state ("on"/null), not text — declare it a toggle
|
|
50
55
|
so the form value is correct from first paint, before any user interaction
|
|
51
56
|
(the base seeds `_checked` from the `checked` attribute and `isToggle`
|
|
@@ -65,8 +70,6 @@ let XmSwitch = class XmSwitch extends XmField {
|
|
|
65
70
|
const helperText = this.isError ? this.error : this.helper;
|
|
66
71
|
const ctrl = this.controlAria;
|
|
67
72
|
return html `
|
|
68
|
-
<link rel="stylesheet" href="${PRIMITIVES_CSS}" />
|
|
69
|
-
<link rel="stylesheet" href="${SWITCH_CSS}" />
|
|
70
73
|
<style>
|
|
71
74
|
:host {
|
|
72
75
|
display: inline-block;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/switch/index.css
|
|
2
|
+
// SSR-safe: constructable stylesheets need the DOM, so in a non-DOM context
|
|
3
|
+
// (Node/SSR import) this exports [] instead of throwing. The CSS self-declares
|
|
4
|
+
// the @layer order so the override contract holds even without ./base (AD-2).
|
|
5
|
+
let sheets = [];
|
|
6
|
+
if (typeof CSSStyleSheet !== "undefined") {
|
|
7
|
+
const sheet = new CSSStyleSheet();
|
|
8
|
+
sheet.replaceSync(`@layer reset, base, tokens, components, utilities;
|
|
9
|
+
@layer components {
|
|
10
|
+
/* ============================================
|
|
11
|
+
xm-switch — binary on/off toggle on XmField (Story 2.7).
|
|
12
|
+
|
|
13
|
+
Like xm-checkbox, this is a TOGGLE field: the track sits BESIDE the label, not
|
|
14
|
+
above it on the bordered text-field chrome. State machinery (disabled / focus /
|
|
15
|
+
form-association / change) is inherited from XmField; this file styles only the
|
|
16
|
+
track, the thumb, and the label row.
|
|
17
|
+
|
|
18
|
+
Surface & ink (AD-13): the switch rides the inverse-surface card tier shared by
|
|
19
|
+
every XmField sibling — the label is inverse-on-surface ink. The OFF-track is a
|
|
20
|
+
muted neutral (--xm-switch-track-off, AD-10 extension); the thumb is the MD3
|
|
21
|
+
outline ink (legible on the off-track). When ON, the track fills with the
|
|
22
|
+
single coral accent (--md-sys-color-primary) and the thumb flips to on-primary
|
|
23
|
+
ink. Coral = on, never severity (AD-11).
|
|
24
|
+
|
|
25
|
+
Motion (NFR-19 / UX-DR10): the thumb slides on translateX only — short4
|
|
26
|
+
standard easing, NO bounce / spring / scale.
|
|
27
|
+
|
|
28
|
+
BEM block: \`switch\`. Registered in scripts/check-bem.sh STRICT_BLOCKS.
|
|
29
|
+
(Distinct from the legacy \`ds-switch\` CSS block.)
|
|
30
|
+
============================================ */
|
|
31
|
+
|
|
32
|
+
.switch {
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
gap: var(--s-1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* ---------- Control row — track + label, the focusable target ---------- */
|
|
39
|
+
.switch__control {
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: var(--s-2);
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
user-select: none;
|
|
45
|
+
outline: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* ---------- Track ---------- */
|
|
49
|
+
.switch__track {
|
|
50
|
+
position: relative;
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
width: 36px;
|
|
54
|
+
height: 20px;
|
|
55
|
+
flex-shrink: 0;
|
|
56
|
+
box-sizing: border-box;
|
|
57
|
+
padding: var(--s-0-5);
|
|
58
|
+
border-radius: var(--md-sys-shape-corner-full);
|
|
59
|
+
background: var(--xm-switch-track-off);
|
|
60
|
+
transition:
|
|
61
|
+
background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
|
|
62
|
+
box-shadow var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Focus ring — the canonical 3px coral halo on the track. */
|
|
66
|
+
.switch__control:focus-visible .switch__track {
|
|
67
|
+
box-shadow: var(--xm-state-focus-ring);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* ---------- Thumb — slides on translateX only ---------- */
|
|
71
|
+
.switch__thumb {
|
|
72
|
+
width: 16px;
|
|
73
|
+
height: 16px;
|
|
74
|
+
border-radius: var(--md-sys-shape-corner-full);
|
|
75
|
+
background: var(--md-sys-color-outline);
|
|
76
|
+
box-shadow: var(--xm-switch-thumb-shadow);
|
|
77
|
+
transform: translateX(0);
|
|
78
|
+
transition: transform var(--md-sys-motion-duration-short4)
|
|
79
|
+
var(--md-sys-motion-easing-standard),
|
|
80
|
+
background var(--md-sys-motion-duration-short4)
|
|
81
|
+
var(--md-sys-motion-easing-standard);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* ---------- On — coral track, thumb slides + flips to on-primary ink ---------- */
|
|
85
|
+
.switch--on .switch__track {
|
|
86
|
+
background: var(--md-sys-color-primary);
|
|
87
|
+
}
|
|
88
|
+
.switch--on .switch__thumb {
|
|
89
|
+
transform: translateX(16px);
|
|
90
|
+
background: var(--md-sys-color-on-primary);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* ---------- Label ---------- */
|
|
94
|
+
.switch__label {
|
|
95
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
96
|
+
font:
|
|
97
|
+
var(--md-sys-typescale-body-medium-weight)
|
|
98
|
+
var(--md-sys-typescale-body-medium-size) /
|
|
99
|
+
var(--md-sys-typescale-body-medium-line-height)
|
|
100
|
+
var(--md-sys-typescale-body-medium-font);
|
|
101
|
+
letter-spacing: 0;
|
|
102
|
+
}
|
|
103
|
+
/* Collapse the label gap when no label is slotted. */
|
|
104
|
+
.switch__label:empty {
|
|
105
|
+
display: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* ---------- Disabled — shared reduced emphasis, no pointer ---------- */
|
|
109
|
+
.switch--disabled .switch__control {
|
|
110
|
+
cursor: not-allowed;
|
|
111
|
+
}
|
|
112
|
+
.switch--disabled .switch__track {
|
|
113
|
+
opacity: 0.45;
|
|
114
|
+
box-shadow: none;
|
|
115
|
+
}
|
|
116
|
+
.switch--disabled .switch__label {
|
|
117
|
+
color: var(--xm-color-inverse-on-surface-disabled);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* ---------- Helper / error message row ----------
|
|
121
|
+
Severity is copy, not color — the error keeps the helper ink (rule 3a). */
|
|
122
|
+
.switch__message {
|
|
123
|
+
padding-left: calc(var(--s-9) + var(--s-2));
|
|
124
|
+
font:
|
|
125
|
+
var(--md-sys-typescale-body-small-weight)
|
|
126
|
+
var(--md-sys-typescale-body-small-size) /
|
|
127
|
+
var(--md-sys-typescale-body-small-line-height)
|
|
128
|
+
var(--md-sys-typescale-body-small-font);
|
|
129
|
+
}
|
|
130
|
+
.switch__message--helper {
|
|
131
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
132
|
+
}
|
|
133
|
+
.switch__message--error {
|
|
134
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
}`);
|
|
138
|
+
sheets = [sheet];
|
|
139
|
+
}
|
|
140
|
+
export default sheets;
|
|
@@ -34,7 +34,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
34
34
|
};
|
|
35
35
|
import { LitElement, html, nothing } from "lit";
|
|
36
36
|
import { customElement, property } from "lit/decorators.js";
|
|
37
|
-
|
|
37
|
+
import tableSheets from "./index.styles.js";
|
|
38
38
|
let XmTable = class XmTable extends LitElement {
|
|
39
39
|
constructor() {
|
|
40
40
|
super(...arguments);
|
|
@@ -42,6 +42,9 @@ let XmTable = class XmTable extends LitElement {
|
|
|
42
42
|
this.rows = [];
|
|
43
43
|
this.caption = "";
|
|
44
44
|
}
|
|
45
|
+
// Adopted from the build-generated sheets (scripts/gen-styles.mjs) — no
|
|
46
|
+
// runtime URL fetch (ADR 0012). Cascade order preserved from the old <link>s.
|
|
47
|
+
static { this.styles = [...tableSheets]; }
|
|
45
48
|
willUpdate(changed) {
|
|
46
49
|
// Allow declarative JSON in attributes for static HTML authoring. A malformed
|
|
47
50
|
// string must not throw out of the reactive update and break render — keep
|
|
@@ -72,7 +75,6 @@ let XmTable = class XmTable extends LitElement {
|
|
|
72
75
|
}
|
|
73
76
|
render() {
|
|
74
77
|
return html `
|
|
75
|
-
<link rel="stylesheet" href="${TABLE_CSS}" />
|
|
76
78
|
<style>
|
|
77
79
|
:host {
|
|
78
80
|
display: block;
|