@xmesh/system-design 0.0.3 → 0.0.5
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 +6 -1
- package/dist/lit/components/alert/index.js +9 -2
- package/dist/lit/components/alert/index.styles.js +215 -0
- package/dist/lit/components/app-bar/index.d.ts +2 -1
- package/dist/lit/components/app-bar/index.js +5 -2
- package/dist/lit/components/app-bar/index.styles.js +94 -0
- package/dist/lit/components/artifact/index.d.ts +6 -1
- package/dist/lit/components/artifact/index.js +20 -2
- 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 +2 -1
- package/dist/lit/components/avatar/index.js +5 -2
- package/dist/lit/components/avatar/index.styles.js +76 -0
- package/dist/lit/components/avatar-group/index.d.ts +2 -1
- package/dist/lit/components/avatar-group/index.js +5 -2
- package/dist/lit/components/avatar-group/index.styles.js +74 -0
- package/dist/lit/components/badge/index.d.ts +2 -2
- package/dist/lit/components/badge/index.js +5 -2
- package/dist/lit/components/badge/index.styles.js +86 -0
- package/dist/lit/components/brand-mark/index.d.ts +2 -2
- package/dist/lit/components/brand-mark/index.js +13 -0
- package/dist/lit/components/brand-mark/index.styles.js +123 -0
- package/dist/lit/components/breadcrumbs/index.d.ts +2 -1
- package/dist/lit/components/breadcrumbs/index.js +6 -4
- package/dist/lit/components/breadcrumbs/index.styles.js +105 -0
- package/dist/lit/components/bubble/index.d.ts +8 -4
- package/dist/lit/components/bubble/index.js +21 -0
- package/dist/lit/components/bubble/index.styles.js +196 -0
- package/dist/lit/components/button/index.d.ts +2 -1
- package/dist/lit/components/button/index.js +7 -13
- package/dist/lit/components/button/index.styles.js +356 -0
- package/dist/lit/components/card/index.d.ts +2 -1
- package/dist/lit/components/card/index.js +5 -2
- package/dist/lit/components/card/index.styles.js +113 -0
- package/dist/lit/components/chat/index.d.ts +7 -2
- package/dist/lit/components/chat/index.js +21 -2
- package/dist/lit/components/chat/index.styles.js +306 -0
- package/dist/lit/components/checkbox/index.d.ts +2 -2
- package/dist/lit/components/checkbox/index.js +8 -4
- package/dist/lit/components/checkbox/index.styles.js +140 -0
- package/dist/lit/components/chip/index.d.ts +6 -1
- package/dist/lit/components/chip/index.js +9 -2
- package/dist/lit/components/chip/index.styles.js +159 -0
- package/dist/lit/components/chip-group/index.d.ts +5 -1
- package/dist/lit/components/chip-group/index.js +8 -2
- package/dist/lit/components/chip-group/index.styles.js +33 -0
- package/dist/lit/components/code/index.d.ts +2 -2
- package/dist/lit/components/code/index.js +5 -3
- package/dist/lit/components/code/index.styles.js +56 -0
- package/dist/lit/components/composer/index.d.ts +7 -2
- package/dist/lit/components/composer/index.js +19 -0
- 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 +2 -1
- package/dist/lit/components/divider/index.js +5 -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 +6 -2
- package/dist/lit/components/expansion-panel/index.js +9 -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 +2 -1
- package/dist/lit/components/grid/index.js +5 -2
- package/dist/lit/components/grid/index.styles.js +67 -0
- package/dist/lit/components/kbd/index.d.ts +2 -2
- package/dist/lit/components/kbd/index.js +5 -2
- package/dist/lit/components/kbd/index.styles.js +49 -0
- package/dist/lit/components/list/index.d.ts +5 -1
- package/dist/lit/components/list/index.js +8 -2
- package/dist/lit/components/list/index.styles.js +29 -0
- package/dist/lit/components/list-item/index.d.ts +2 -2
- package/dist/lit/components/list-item/index.js +5 -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 +5 -2
- package/dist/lit/components/navigation-drawer/index.js +8 -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 +18 -1
- package/dist/lit/components/pagination/index.js +54 -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.d.ts +2 -2
- package/dist/lit/components/primitives/index.js +13 -0
- 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.d.ts +1 -1
- package/dist/lit/components/sidebar-item/index.js +12 -0
- 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 +5 -2
- package/dist/lit/components/snackbar/index.js +20 -2
- package/dist/lit/components/snackbar/index.styles.js +293 -0
- package/dist/lit/components/stack/index.d.ts +2 -1
- package/dist/lit/components/stack/index.js +5 -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 +2 -2
- package/dist/lit/components/table/index.js +5 -2
- package/dist/lit/components/table/index.styles.js +99 -0
- package/dist/lit/components/tabs/index.d.ts +7 -3
- package/dist/lit/components/tabs/index.js +11 -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 +7 -2
- package/dist/lit/components/validation/index.js +21 -1
- 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 +45 -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 +45 -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 +68 -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 +36 -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 +44 -0
- package/dist/react/XmCheckbox.d.ts +145 -0
- package/dist/react/XmCheckbox.js +58 -0
- package/dist/react/XmChip.d.ts +99 -0
- package/dist/react/XmChip.js +46 -0
- package/dist/react/XmChipGroup.d.ts +79 -0
- package/dist/react/XmChipGroup.js +35 -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 +52 -0
- package/dist/react/XmDataTable.d.ts +125 -0
- package/dist/react/XmDataTable.js +65 -0
- package/dist/react/XmDateRange.d.ts +93 -0
- package/dist/react/XmDateRange.js +41 -0
- package/dist/react/XmDialog.d.ts +87 -0
- package/dist/react/XmDialog.js +40 -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 +48 -0
- package/dist/react/XmFileInput.d.ts +151 -0
- package/dist/react/XmFileInput.js +68 -0
- package/dist/react/XmFileValidationBlock.d.ts +111 -0
- package/dist/react/XmFileValidationBlock.js +45 -0
- package/dist/react/XmForm.d.ts +91 -0
- package/dist/react/XmForm.js +37 -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 +37 -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 +42 -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 +72 -0
- package/dist/react/XmNavigationDrawer.d.ts +93 -0
- package/dist/react/XmNavigationDrawer.js +41 -0
- package/dist/react/XmOverlay.d.ts +120 -0
- package/dist/react/XmOverlay.js +54 -0
- package/dist/react/XmPagination.d.ts +117 -0
- package/dist/react/XmPagination.js +57 -0
- package/dist/react/XmPopover.d.ts +90 -0
- package/dist/react/XmPopover.js +40 -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 +41 -0
- package/dist/react/XmRadioGroup.d.ts +139 -0
- package/dist/react/XmRadioGroup.js +56 -0
- package/dist/react/XmSelect.d.ts +152 -0
- package/dist/react/XmSelect.js +68 -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 +74 -0
- package/dist/react/XmSnackbar.d.ts +110 -0
- package/dist/react/XmSnackbar.js +49 -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 +56 -0
- package/dist/react/XmTab.d.ts +79 -0
- package/dist/react/XmTab.js +37 -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 +37 -0
- package/dist/react/XmTextField.d.ts +147 -0
- package/dist/react/XmTextField.js +60 -0
- package/dist/react/XmTextarea.d.ts +155 -0
- package/dist/react/XmTextarea.js +64 -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,271 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/file-input/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-file-input — generic file picker / dropzone on XmField (Story 2.9).
|
|
12
|
+
|
|
13
|
+
Extends XmField for chrome but renders its own layout: a label row, a dropzone
|
|
14
|
+
surface (the focusable button), the selected-file rows, and the helper/error
|
|
15
|
+
row. State machinery (disabled / form-association / focus / ARIA) is inherited;
|
|
16
|
+
this file styles the dropzone, file rows, and the byte-size text.
|
|
17
|
+
|
|
18
|
+
Surface & ink (AD-13): the dropzone rides the inverse-surface card tier —
|
|
19
|
+
primary copy is inverse-on-surface, the secondary hint + size are the muted
|
|
20
|
+
tier. The icon takes the card ink.
|
|
21
|
+
|
|
22
|
+
Borders: the dropzone is a hairline 1px (outline-variant → outline on hover).
|
|
23
|
+
The DRAG-ACTIVE state is the ONE place a 2px border is allowed — 2px solid the
|
|
24
|
+
coral --md-sys-color-primary, with the focus-ring halo. Coral here signals the
|
|
25
|
+
live drop target, never severity (AD-11). Errors are the warn icon + copy.
|
|
26
|
+
|
|
27
|
+
BEM block: \`file-input\`. Registered in scripts/check-bem.sh STRICT_BLOCKS.
|
|
28
|
+
============================================ */
|
|
29
|
+
|
|
30
|
+
.file-input {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: var(--s-2);
|
|
34
|
+
width: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* ---------- Label ---------- */
|
|
38
|
+
.file-input__label {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: var(--s-1);
|
|
42
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
43
|
+
font:
|
|
44
|
+
var(--md-sys-typescale-label-large-weight)
|
|
45
|
+
var(--md-sys-typescale-label-large-size) /
|
|
46
|
+
var(--md-sys-typescale-label-large-line-height)
|
|
47
|
+
var(--md-sys-typescale-label-large-font);
|
|
48
|
+
}
|
|
49
|
+
.file-input__label-text {
|
|
50
|
+
letter-spacing: 0;
|
|
51
|
+
}
|
|
52
|
+
.file-input__required {
|
|
53
|
+
color: var(--md-sys-color-primary);
|
|
54
|
+
font-weight: 700;
|
|
55
|
+
line-height: 1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* ---------- Hidden native input — kept out of layout + tab order ---------- */
|
|
59
|
+
.file-input__native {
|
|
60
|
+
position: absolute;
|
|
61
|
+
width: 1px;
|
|
62
|
+
height: 1px;
|
|
63
|
+
padding: 0;
|
|
64
|
+
margin: -1px;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
clip: rect(0, 0, 0, 0);
|
|
67
|
+
white-space: nowrap;
|
|
68
|
+
border: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* ---------- Dropzone — the focusable button surface ---------- */
|
|
72
|
+
.file-input__dropzone {
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
gap: var(--s-3);
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
padding: var(--s-4) var(--s-4);
|
|
78
|
+
/* Hairline + a 1px transparent inset so the box does not jump when the
|
|
79
|
+
drag-active 2px border lands (the inset absorbs the extra 1px). */
|
|
80
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
81
|
+
outline: 1px solid transparent;
|
|
82
|
+
outline-offset: -2px;
|
|
83
|
+
border-radius: var(--md-sys-shape-corner-button);
|
|
84
|
+
background: var(--md-sys-color-inverse-surface);
|
|
85
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
transition:
|
|
88
|
+
border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
89
|
+
box-shadow var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
90
|
+
}
|
|
91
|
+
.file-input__dropzone:hover {
|
|
92
|
+
border-color: var(--md-sys-color-outline);
|
|
93
|
+
}
|
|
94
|
+
.file-input__dropzone:focus-visible {
|
|
95
|
+
outline: none;
|
|
96
|
+
border-color: var(--md-sys-color-primary);
|
|
97
|
+
box-shadow: var(--xm-state-focus-ring);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.file-input__icon {
|
|
101
|
+
display: inline-flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
flex-shrink: 0;
|
|
104
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
105
|
+
}
|
|
106
|
+
.file-input__copy {
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-direction: column;
|
|
109
|
+
gap: 1px;
|
|
110
|
+
min-width: 0;
|
|
111
|
+
}
|
|
112
|
+
.file-input__primary {
|
|
113
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
114
|
+
font:
|
|
115
|
+
var(--md-sys-typescale-body-medium-weight)
|
|
116
|
+
var(--md-sys-typescale-body-medium-size) /
|
|
117
|
+
var(--md-sys-typescale-body-medium-line-height)
|
|
118
|
+
var(--md-sys-typescale-body-medium-font);
|
|
119
|
+
}
|
|
120
|
+
.file-input__secondary {
|
|
121
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
122
|
+
font:
|
|
123
|
+
var(--md-sys-typescale-body-small-weight)
|
|
124
|
+
var(--md-sys-typescale-body-small-size) /
|
|
125
|
+
var(--md-sys-typescale-body-small-line-height)
|
|
126
|
+
var(--md-sys-typescale-body-small-font);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* ---------- Drag-active — the ONLY 2px border in the system ---------- */
|
|
130
|
+
.file-input--drag-active .file-input__dropzone {
|
|
131
|
+
border: 2px solid var(--md-sys-color-primary);
|
|
132
|
+
box-shadow: var(--xm-state-focus-ring);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* ---------- Selected-file rows — raised level1 cards ---------- */
|
|
136
|
+
.file-input__files {
|
|
137
|
+
list-style: none;
|
|
138
|
+
margin: 0;
|
|
139
|
+
padding: 0;
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
gap: var(--s-2);
|
|
143
|
+
}
|
|
144
|
+
.file-input__file {
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
gap: var(--s-2);
|
|
148
|
+
box-sizing: border-box;
|
|
149
|
+
padding: var(--s-2) var(--s-3);
|
|
150
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
151
|
+
border-radius: var(--md-sys-shape-corner-small);
|
|
152
|
+
background: var(--md-sys-color-inverse-surface);
|
|
153
|
+
box-shadow: var(--md-sys-elevation-level1);
|
|
154
|
+
}
|
|
155
|
+
.file-input__file-icon {
|
|
156
|
+
display: inline-flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
flex-shrink: 0;
|
|
159
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
160
|
+
}
|
|
161
|
+
.file-input__file-name {
|
|
162
|
+
flex: 1;
|
|
163
|
+
min-width: 0;
|
|
164
|
+
overflow: hidden;
|
|
165
|
+
white-space: nowrap;
|
|
166
|
+
text-overflow: ellipsis;
|
|
167
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
168
|
+
font:
|
|
169
|
+
var(--md-sys-typescale-body-medium-weight)
|
|
170
|
+
var(--md-sys-typescale-body-medium-size) /
|
|
171
|
+
var(--md-sys-typescale-body-medium-line-height)
|
|
172
|
+
var(--md-sys-typescale-body-medium-font);
|
|
173
|
+
}
|
|
174
|
+
.file-input__file-size {
|
|
175
|
+
flex-shrink: 0;
|
|
176
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
177
|
+
font:
|
|
178
|
+
var(--xm-typescale-mono-weight)
|
|
179
|
+
var(--xm-typescale-mono-size) /
|
|
180
|
+
var(--xm-typescale-mono-line-height)
|
|
181
|
+
var(--xm-typescale-mono-font);
|
|
182
|
+
}
|
|
183
|
+
.file-input__remove {
|
|
184
|
+
display: inline-flex;
|
|
185
|
+
align-items: center;
|
|
186
|
+
justify-content: center;
|
|
187
|
+
flex-shrink: 0;
|
|
188
|
+
width: 20px;
|
|
189
|
+
height: 20px;
|
|
190
|
+
padding: 0;
|
|
191
|
+
border: none;
|
|
192
|
+
border-radius: var(--md-sys-shape-corner-full);
|
|
193
|
+
background: transparent;
|
|
194
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
195
|
+
cursor: pointer;
|
|
196
|
+
transition: background var(--md-sys-motion-duration-short3)
|
|
197
|
+
var(--md-sys-motion-easing-standard);
|
|
198
|
+
}
|
|
199
|
+
.file-input__remove:hover {
|
|
200
|
+
background: color-mix(
|
|
201
|
+
in oklab,
|
|
202
|
+
var(--md-sys-color-inverse-on-surface)
|
|
203
|
+
var(--md-sys-state-hover-state-layer-opacity),
|
|
204
|
+
transparent
|
|
205
|
+
);
|
|
206
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
207
|
+
}
|
|
208
|
+
.file-input__remove:focus-visible {
|
|
209
|
+
outline: none;
|
|
210
|
+
box-shadow: var(--xm-state-focus-ring);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* ---------- Disabled — reduced emphasis ----------
|
|
214
|
+
No opacity (it would dim the copy below AA). The dropzone children
|
|
215
|
+
(__primary / __secondary / __icon) each set their own color, so the swap
|
|
216
|
+
must target them directly — they do NOT inherit a color set on __dropzone.
|
|
217
|
+
A muted container fill restores the visual "disabled" cue the opacity used
|
|
218
|
+
to give. */
|
|
219
|
+
.file-input--disabled .file-input__dropzone {
|
|
220
|
+
cursor: not-allowed;
|
|
221
|
+
background: color-mix(in oklab, var(--md-sys-color-inverse-on-surface) 5%, var(--md-sys-color-inverse-surface));
|
|
222
|
+
border-color: var(--md-sys-color-outline-variant);
|
|
223
|
+
}
|
|
224
|
+
.file-input--disabled .file-input__dropzone:hover {
|
|
225
|
+
border-color: var(--md-sys-color-outline-variant);
|
|
226
|
+
}
|
|
227
|
+
.file-input--disabled .file-input__primary,
|
|
228
|
+
.file-input--disabled .file-input__secondary,
|
|
229
|
+
.file-input--disabled .file-input__icon {
|
|
230
|
+
color: var(--xm-color-inverse-on-surface-disabled);
|
|
231
|
+
}
|
|
232
|
+
.file-input--disabled .file-input__label {
|
|
233
|
+
color: var(--xm-color-inverse-on-surface-disabled);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* ---------- Helper / error message row ----------
|
|
237
|
+
Severity is the warn icon + copy, not a color (rule 3a). */
|
|
238
|
+
.file-input__message {
|
|
239
|
+
display: flex;
|
|
240
|
+
align-items: flex-start;
|
|
241
|
+
gap: var(--s-1);
|
|
242
|
+
min-height: 1em;
|
|
243
|
+
font:
|
|
244
|
+
var(--md-sys-typescale-body-small-weight)
|
|
245
|
+
var(--md-sys-typescale-body-small-size) /
|
|
246
|
+
var(--md-sys-typescale-body-small-line-height)
|
|
247
|
+
var(--md-sys-typescale-body-small-font);
|
|
248
|
+
}
|
|
249
|
+
.file-input__message--helper {
|
|
250
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
251
|
+
}
|
|
252
|
+
.file-input__message--error {
|
|
253
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
254
|
+
}
|
|
255
|
+
.file-input__error-icon {
|
|
256
|
+
display: inline-flex;
|
|
257
|
+
align-items: center;
|
|
258
|
+
flex-shrink: 0;
|
|
259
|
+
margin-top: 1px;
|
|
260
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
261
|
+
}
|
|
262
|
+
.file-input__message-text {
|
|
263
|
+
flex: 1;
|
|
264
|
+
min-width: 0;
|
|
265
|
+
text-wrap: pretty;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
}`);
|
|
269
|
+
sheets = [sheet];
|
|
270
|
+
}
|
|
271
|
+
export default sheets;
|
|
@@ -4,7 +4,11 @@ export interface FormResult {
|
|
|
4
4
|
valid: boolean;
|
|
5
5
|
values: Record<string, unknown>;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* @fires submit - Fired when the form is submitted with its values in `detail`.
|
|
9
|
+
*/
|
|
7
10
|
export declare class XmForm extends LitElement {
|
|
11
|
+
static styles: CSSStyleSheet[];
|
|
8
12
|
disabled: boolean;
|
|
9
13
|
readonly: boolean;
|
|
10
14
|
/** Each touched child's OWN readonly, snapshotted before the form ever sets it,
|
|
@@ -32,7 +32,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
32
32
|
};
|
|
33
33
|
import { LitElement, html } from "lit";
|
|
34
34
|
import { customElement, property } from "lit/decorators.js";
|
|
35
|
-
|
|
35
|
+
import formSheets from "./index.styles.js";
|
|
36
|
+
/**
|
|
37
|
+
* @fires submit - Fired when the form is submitted with its values in `detail`.
|
|
38
|
+
*/
|
|
36
39
|
let XmForm = class XmForm extends LitElement {
|
|
37
40
|
constructor() {
|
|
38
41
|
super(...arguments);
|
|
@@ -68,6 +71,9 @@ let XmForm = class XmForm extends LitElement {
|
|
|
68
71
|
this.submit();
|
|
69
72
|
};
|
|
70
73
|
}
|
|
74
|
+
// Adopted from the build-generated sheets (scripts/gen-styles.mjs) — no
|
|
75
|
+
// runtime URL fetch (ADR 0012). Cascade order preserved from the old <link>s.
|
|
76
|
+
static { this.styles = [...formSheets]; }
|
|
71
77
|
connectedCallback() {
|
|
72
78
|
super.connectedCallback();
|
|
73
79
|
this.addEventListener("submit", this._onChildSubmit);
|
|
@@ -164,7 +170,6 @@ let XmForm = class XmForm extends LitElement {
|
|
|
164
170
|
}
|
|
165
171
|
render() {
|
|
166
172
|
return html `
|
|
167
|
-
<link rel="stylesheet" href="${FORM_CSS}" />
|
|
168
173
|
<style>
|
|
169
174
|
:host {
|
|
170
175
|
display: block;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/form/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-form — field aggregator / orchestrator (Story 2.10).
|
|
12
|
+
|
|
13
|
+
Layout-only chrome: a vertical stack of slotted fields with consistent --s-N
|
|
14
|
+
gaps so fields of the same \`size\` align (NFR-22). xm-form has NO surface of
|
|
15
|
+
its own and no bespoke color tokens — each child renders its own XmField
|
|
16
|
+
chrome, which the form must never restyle (AD-7 / AD-12).
|
|
17
|
+
|
|
18
|
+
BEM block: \`form\`. Registered in scripts/check-bem.sh STRICT_BLOCKS.
|
|
19
|
+
============================================ */
|
|
20
|
+
|
|
21
|
+
.form {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
gap: var(--s-5);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* The slotted action row (a button or button group) sits at the foot of the
|
|
28
|
+
stack; authors mark it with slot="actions" if they want it grouped + set off
|
|
29
|
+
from the fields by a single hairline (the system's 1px rule — no surface, just
|
|
30
|
+
a divider). Default flow already stacks it under the last field. */
|
|
31
|
+
.form ::slotted([slot="actions"]) {
|
|
32
|
+
display: flex;
|
|
33
|
+
gap: var(--s-3);
|
|
34
|
+
align-items: center;
|
|
35
|
+
margin-top: var(--s-2);
|
|
36
|
+
padding-top: var(--s-4);
|
|
37
|
+
border-top: 1px solid var(--md-sys-color-outline-variant);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}`);
|
|
41
|
+
sheets = [sheet];
|
|
42
|
+
}
|
|
43
|
+
export default sheets;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import type { TemplateResult } from "lit";
|
|
3
3
|
type GridGap = "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
|
-
declare class XmGrid extends LitElement {
|
|
4
|
+
export declare class XmGrid extends LitElement {
|
|
5
|
+
static styles: CSSStyleSheet[];
|
|
5
6
|
columns: number;
|
|
6
7
|
gap: GridGap;
|
|
7
8
|
render(): TemplateResult;
|
|
@@ -37,9 +37,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
37
37
|
};
|
|
38
38
|
import { LitElement, html } from "lit";
|
|
39
39
|
import { customElement, property } from "lit/decorators.js";
|
|
40
|
+
import gridSheets from "./index.styles.js";
|
|
40
41
|
// Resolve CSS relative to the *built* file:
|
|
41
42
|
// lit/build/components/grid/index.js → ../grid/index.css.
|
|
42
|
-
const GRID_CSS = new URL("../grid/index.css", import.meta.url).href;
|
|
43
43
|
const GAPS = ["none", "xs", "sm", "md", "lg", "xl"];
|
|
44
44
|
let XmGrid = class XmGrid extends LitElement {
|
|
45
45
|
constructor() {
|
|
@@ -47,13 +47,15 @@ let XmGrid = class XmGrid extends LitElement {
|
|
|
47
47
|
this.columns = 12;
|
|
48
48
|
this.gap = "md";
|
|
49
49
|
}
|
|
50
|
+
// Adopted from the build-generated sheets (scripts/gen-styles.mjs) — no
|
|
51
|
+
// runtime URL fetch (ADR 0012). Cascade order preserved from the old <link>s.
|
|
52
|
+
static { this.styles = [...gridSheets]; }
|
|
50
53
|
render() {
|
|
51
54
|
const gap = GAPS.includes(this.gap) ? this.gap : "md";
|
|
52
55
|
const columns = Number.isFinite(this.columns) && this.columns >= 1
|
|
53
56
|
? Math.floor(this.columns)
|
|
54
57
|
: 12;
|
|
55
58
|
return html `
|
|
56
|
-
<link rel="stylesheet" href="${GRID_CSS}" />
|
|
57
59
|
<style>
|
|
58
60
|
:host {
|
|
59
61
|
display: block;
|
|
@@ -80,3 +82,4 @@ __decorate([
|
|
|
80
82
|
XmGrid = __decorate([
|
|
81
83
|
customElement("xm-grid")
|
|
82
84
|
], XmGrid);
|
|
85
|
+
export { XmGrid };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/grid/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-grid> — N-column (default 12) layout grid.
|
|
12
|
+
|
|
13
|
+
Slotted children are grid items (the <slot> is layout-transparent,
|
|
14
|
+
like xm-chip-group). A child spans N columns by setting the inline
|
|
15
|
+
custom property --xm-col-span on itself; default span is 1.
|
|
16
|
+
Optional --xm-col-start for explicit placement. Gutter via
|
|
17
|
+
gap="…" → --xm-gutter-* (the --s-N-aliased layout tier).
|
|
18
|
+
|
|
19
|
+
Below --xm-breakpoint-sm (520px) the grid collapses to a single
|
|
20
|
+
column. NOTE: the 520px literal is repeated in the @media below
|
|
21
|
+
because @media cannot read var(--xm-breakpoint-sm); the token in
|
|
22
|
+
styles/_layout.css is the source of truth (docs/adr/0001).
|
|
23
|
+
|
|
24
|
+
BEM block \`grid\`; modifiers --gap-*. Registered in
|
|
25
|
+
scripts/check-bem.sh STRICT_BLOCKS.
|
|
26
|
+
============================================ */
|
|
27
|
+
|
|
28
|
+
.grid {
|
|
29
|
+
display: grid;
|
|
30
|
+
grid-template-columns: repeat(var(--xm-grid-columns, 12), minmax(0, 1fr));
|
|
31
|
+
gap: var(--xm-gutter-md);
|
|
32
|
+
/* Inherited ink so currentColor in slotted content reads on the desk
|
|
33
|
+
surface (AD-13) — also satisfies the --md-sys-* token gate. */
|
|
34
|
+
color: var(--md-sys-color-on-surface);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.grid--gap-none { gap: var(--xm-gutter-none); }
|
|
38
|
+
.grid--gap-xs { gap: var(--xm-gutter-xs); }
|
|
39
|
+
.grid--gap-sm { gap: var(--xm-gutter-sm); }
|
|
40
|
+
.grid--gap-md { gap: var(--xm-gutter-md); }
|
|
41
|
+
.grid--gap-lg { gap: var(--xm-gutter-lg); }
|
|
42
|
+
.grid--gap-xl { gap: var(--xm-gutter-xl); }
|
|
43
|
+
|
|
44
|
+
/* Per-child placement, authored as inline custom properties on the child.
|
|
45
|
+
minmax(0, 1fr) + min-width: 0 keeps a wide / unbreakable child from
|
|
46
|
+
blowing its track out instead of honouring the span. */
|
|
47
|
+
.grid ::slotted(*) {
|
|
48
|
+
grid-column: var(--xm-col-start, auto) / span var(--xm-col-span, 1);
|
|
49
|
+
min-width: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Compact: collapse to one column. The 520px literal mirrors
|
|
53
|
+
--xm-breakpoint-sm (styles/_layout.css); @media can't read the token
|
|
54
|
+
(docs/adr/0001). */
|
|
55
|
+
@media (max-width: 520px) {
|
|
56
|
+
.grid {
|
|
57
|
+
grid-template-columns: 1fr;
|
|
58
|
+
}
|
|
59
|
+
.grid ::slotted(*) {
|
|
60
|
+
grid-column: auto;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
}`);
|
|
65
|
+
sheets = [sheet];
|
|
66
|
+
}
|
|
67
|
+
export default sheets;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import type { TemplateResult } from "lit";
|
|
3
|
-
declare class XmKbd extends LitElement {
|
|
3
|
+
export declare class XmKbd extends LitElement {
|
|
4
|
+
static styles: CSSStyleSheet[];
|
|
4
5
|
render(): TemplateResult;
|
|
5
6
|
}
|
|
6
7
|
declare global {
|
|
@@ -8,4 +9,3 @@ declare global {
|
|
|
8
9
|
"xm-kbd": XmKbd;
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
|
-
export {};
|
|
@@ -20,11 +20,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
20
20
|
};
|
|
21
21
|
import { LitElement, html } from "lit";
|
|
22
22
|
import { customElement } from "lit/decorators.js";
|
|
23
|
-
|
|
23
|
+
import kbdSheets from "./index.styles.js";
|
|
24
24
|
let XmKbd = class XmKbd extends LitElement {
|
|
25
|
+
// Adopted from the build-generated sheets (scripts/gen-styles.mjs) — no
|
|
26
|
+
// runtime URL fetch (ADR 0012). Cascade order preserved from the old <link>s.
|
|
27
|
+
static { this.styles = [...kbdSheets]; }
|
|
25
28
|
render() {
|
|
26
29
|
return html `
|
|
27
|
-
<link rel="stylesheet" href="${KBD_CSS}" />
|
|
28
30
|
<style>
|
|
29
31
|
:host {
|
|
30
32
|
display: inline-flex;
|
|
@@ -41,3 +43,4 @@ let XmKbd = class XmKbd extends LitElement {
|
|
|
41
43
|
XmKbd = __decorate([
|
|
42
44
|
customElement("xm-kbd")
|
|
43
45
|
], XmKbd);
|
|
46
|
+
export { XmKbd };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/kbd/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
|
+
Kbd — inline keyboard-key token (key-cap).
|
|
12
|
+
|
|
13
|
+
<xm-kbd> presents a shortcut key (⌘, Enter, K) as a small
|
|
14
|
+
key-cap pill. Mono typescale (--xm-typescale-mono-*), a
|
|
15
|
+
surface-container-* backplate raised off the host surface, a
|
|
16
|
+
hairline 1px outline-variant border, and a subtle bottom edge
|
|
17
|
+
so it reads as a physical key. Ink is --md-sys-color-on-surface
|
|
18
|
+
to match the surface-container backplate (AD-13). Presentational
|
|
19
|
+
chrome — never a status hue (AD-11).
|
|
20
|
+
============================================ */
|
|
21
|
+
|
|
22
|
+
.kbd {
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
min-width: 20px;
|
|
28
|
+
padding: var(--s-0-5) var(--s-2);
|
|
29
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
30
|
+
/* Subtle bottom edge so the cap reads as a key, not a flat chip.
|
|
31
|
+
Hairline-respecting: the border stays 1px; this is an inset rim,
|
|
32
|
+
not a heavier border. */
|
|
33
|
+
border-bottom-width: 2px;
|
|
34
|
+
border-radius: var(--md-sys-shape-corner-extra-small);
|
|
35
|
+
background: var(--md-sys-color-surface-container-high);
|
|
36
|
+
color: var(--md-sys-color-on-surface);
|
|
37
|
+
font-family: var(--xm-typescale-mono-font);
|
|
38
|
+
font-size: var(--xm-typescale-mono-size);
|
|
39
|
+
font-weight: var(--xm-typescale-mono-weight);
|
|
40
|
+
line-height: var(--xm-typescale-mono-line-height);
|
|
41
|
+
letter-spacing: var(--xm-typescale-mono-tracking);
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
vertical-align: baseline;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}`);
|
|
47
|
+
sheets = [sheet];
|
|
48
|
+
}
|
|
49
|
+
export default sheets;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import type { TemplateResult } from "lit";
|
|
3
3
|
type Primitive = string | number;
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @fires change - Fired on commit with the new value in `detail`.
|
|
6
|
+
*/
|
|
7
|
+
export declare class XmList extends LitElement {
|
|
8
|
+
static styles: CSSStyleSheet[];
|
|
5
9
|
interactive: boolean;
|
|
6
10
|
selectable: boolean;
|
|
7
11
|
value: Primitive | null;
|
|
@@ -37,7 +37,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
37
37
|
};
|
|
38
38
|
import { LitElement, html } from "lit";
|
|
39
39
|
import { customElement, property } from "lit/decorators.js";
|
|
40
|
-
|
|
40
|
+
import listSheets from "./index.styles.js";
|
|
41
|
+
/**
|
|
42
|
+
* @fires change - Fired on commit with the new value in `detail`.
|
|
43
|
+
*/
|
|
41
44
|
let XmList = class XmList extends LitElement {
|
|
42
45
|
constructor() {
|
|
43
46
|
super(...arguments);
|
|
@@ -89,6 +92,9 @@ let XmList = class XmList extends LitElement {
|
|
|
89
92
|
this._applyItems();
|
|
90
93
|
};
|
|
91
94
|
}
|
|
95
|
+
// Adopted from the build-generated sheets (scripts/gen-styles.mjs) — no
|
|
96
|
+
// runtime URL fetch (ADR 0012). Cascade order preserved from the old <link>s.
|
|
97
|
+
static { this.styles = [...listSheets]; }
|
|
92
98
|
get _isInteractive() {
|
|
93
99
|
return this.interactive || this.selectable;
|
|
94
100
|
}
|
|
@@ -159,7 +165,6 @@ let XmList = class XmList extends LitElement {
|
|
|
159
165
|
}
|
|
160
166
|
render() {
|
|
161
167
|
return html `
|
|
162
|
-
<link rel="stylesheet" href="${LIST_CSS}" />
|
|
163
168
|
<style>
|
|
164
169
|
:host {
|
|
165
170
|
display: block;
|
|
@@ -186,3 +191,4 @@ __decorate([
|
|
|
186
191
|
XmList = __decorate([
|
|
187
192
|
customElement("xm-list")
|
|
188
193
|
], XmList);
|
|
194
|
+
export { XmList };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/list/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
|
+
List — vertical collection of <xm-list-item> rows.
|
|
12
|
+
|
|
13
|
+
Layout owner for a stack of rows. Sits on the surface* desk family
|
|
14
|
+
(AD-13) — establishes on-surface as the inherited ink so rows read
|
|
15
|
+
correctly on the desk. The rows own all chrome; the list owns the
|
|
16
|
+
rhythm, ARIA role, and (when interactive) keyboard selection.
|
|
17
|
+
============================================ */
|
|
18
|
+
|
|
19
|
+
.list {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: var(--s-1);
|
|
23
|
+
color: var(--md-sys-color-on-surface);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}`);
|
|
27
|
+
sheets = [sheet];
|
|
28
|
+
}
|
|
29
|
+
export default sheets;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import type { TemplateResult } from "lit";
|
|
3
|
-
declare class XmListItem extends LitElement {
|
|
3
|
+
export declare class XmListItem extends LitElement {
|
|
4
|
+
static styles: CSSStyleSheet[];
|
|
4
5
|
value: string;
|
|
5
6
|
selected: boolean;
|
|
6
7
|
disabled: boolean;
|
|
@@ -17,4 +18,3 @@ declare global {
|
|
|
17
18
|
"xm-list-item": XmListItem;
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
|
-
export {};
|
|
@@ -32,7 +32,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
32
32
|
};
|
|
33
33
|
import { LitElement, html } from "lit";
|
|
34
34
|
import { customElement, property } from "lit/decorators.js";
|
|
35
|
-
|
|
35
|
+
import listItemSheets from "./index.styles.js";
|
|
36
36
|
let XmListItem = class XmListItem extends LitElement {
|
|
37
37
|
constructor() {
|
|
38
38
|
super(...arguments);
|
|
@@ -45,6 +45,9 @@ let XmListItem = class XmListItem extends LitElement {
|
|
|
45
45
|
this.requestUpdate();
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
+
// Adopted from the build-generated sheets (scripts/gen-styles.mjs) — no
|
|
49
|
+
// runtime URL fetch (ADR 0012). Cascade order preserved from the old <link>s.
|
|
50
|
+
static { this.styles = [...listItemSheets]; }
|
|
48
51
|
_hasSlot(name) {
|
|
49
52
|
for (const node of this.childNodes) {
|
|
50
53
|
if (node.nodeType === Node.ELEMENT_NODE &&
|
|
@@ -78,7 +81,6 @@ let XmListItem = class XmListItem extends LitElement {
|
|
|
78
81
|
const hasTrailing = this._hasSlot("trailing");
|
|
79
82
|
const hasSecondary = this.secondary || this._hasSlot("secondary");
|
|
80
83
|
return html `
|
|
81
|
-
<link rel="stylesheet" href="${ITEM_CSS}" />
|
|
82
84
|
<style>
|
|
83
85
|
:host {
|
|
84
86
|
display: block;
|
|
@@ -125,3 +127,4 @@ __decorate([
|
|
|
125
127
|
XmListItem = __decorate([
|
|
126
128
|
customElement("xm-list-item")
|
|
127
129
|
], XmListItem);
|
|
130
|
+
export { XmListItem };
|