@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,159 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/chip/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
|
+
Chip — compact label pill (tag / filter / category).
|
|
12
|
+
|
|
13
|
+
<xm-chip> is a transparent pill that sits on a surface* host, so
|
|
14
|
+
default ink is --md-sys-color-on-surface (AD-13). Selected flips
|
|
15
|
+
to the coral primary-container fill + on-primary-container ink —
|
|
16
|
+
the selected-pill pattern (UX-DR3), never a status hue (AD-11).
|
|
17
|
+
Removable chips carry a trailing x. A category chip may take a
|
|
18
|
+
saturated background ONLY via the --xm-method-* / --xm-ext-* sets
|
|
19
|
+
(category, never severity); --md-sys-color-error* is forbidden.
|
|
20
|
+
|
|
21
|
+
Sizes share the canonical xs|sm|md|lg axis (AD-9).
|
|
22
|
+
============================================ */
|
|
23
|
+
|
|
24
|
+
.chip {
|
|
25
|
+
--chip-height: 28px;
|
|
26
|
+
--chip-pad-x: var(--s-3);
|
|
27
|
+
--chip-font: var(--md-sys-typescale-label-medium-size);
|
|
28
|
+
--chip-gap: var(--s-1);
|
|
29
|
+
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: var(--chip-gap);
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
height: var(--chip-height);
|
|
35
|
+
padding: 0 var(--chip-pad-x);
|
|
36
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
37
|
+
border-radius: var(--md-sys-shape-corner-full);
|
|
38
|
+
background: transparent;
|
|
39
|
+
color: var(--md-sys-color-on-surface);
|
|
40
|
+
font-family: var(--md-sys-typescale-label-medium-font);
|
|
41
|
+
font-size: var(--chip-font);
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
line-height: 1;
|
|
44
|
+
letter-spacing: 0;
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
user-select: none;
|
|
48
|
+
transition:
|
|
49
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
50
|
+
color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
51
|
+
border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
52
|
+
}
|
|
53
|
+
/* The host element owns focus (role=button + tabindex on <xm-chip>) so the
|
|
54
|
+
3px ring is applied via :host(:focus-visible) .chip in the component's
|
|
55
|
+
inline <style>. The forced-state helper still previews it. */
|
|
56
|
+
.chip.is-focus {
|
|
57
|
+
box-shadow: var(--xm-state-focus-ring);
|
|
58
|
+
}
|
|
59
|
+
.chip:hover,
|
|
60
|
+
.chip.is-hover {
|
|
61
|
+
background: color-mix(in oklab, var(--md-sys-color-on-surface) var(--md-sys-state-hover-state-layer-opacity), transparent);
|
|
62
|
+
border-color: var(--md-sys-color-outline);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* ---------- Selected — coral selected-pill ---------- */
|
|
66
|
+
.chip--selected {
|
|
67
|
+
border-color: color-mix(in oklab, var(--md-sys-color-primary) 60%, transparent);
|
|
68
|
+
background: var(--md-sys-color-primary-container);
|
|
69
|
+
color: var(--md-sys-color-on-primary-container);
|
|
70
|
+
}
|
|
71
|
+
.chip--selected:hover,
|
|
72
|
+
.chip--selected.is-hover {
|
|
73
|
+
background: var(--md-sys-color-primary-container);
|
|
74
|
+
border-color: var(--md-sys-color-primary);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* ---------- Category — saturated ONLY for category (AD-11) ---------- */
|
|
78
|
+
.chip--category-get { background: var(--xm-method-get-bg); color: var(--xm-method-get-ink); border-color: transparent; }
|
|
79
|
+
.chip--category-post { background: var(--xm-method-post-bg); color: var(--xm-method-post-ink); border-color: transparent; }
|
|
80
|
+
.chip--category-put { background: var(--xm-method-put-bg); color: var(--xm-method-put-ink); border-color: transparent; }
|
|
81
|
+
.chip--category-delete { background: var(--xm-method-delete-bg); color: var(--xm-method-delete-ink); border-color: transparent; }
|
|
82
|
+
.chip--category-patch { background: var(--xm-method-patch-bg); color: var(--xm-method-patch-ink); border-color: transparent; }
|
|
83
|
+
.chip--category-yml { background: var(--xm-ext-yml-bg); color: var(--xm-ext-yml-ink); border-color: transparent; }
|
|
84
|
+
.chip--category-json { background: var(--xm-ext-json-bg); color: var(--xm-ext-json-ink); border-color: transparent; }
|
|
85
|
+
/* Category chips don't change hue on hover — the hue IS the meaning. */
|
|
86
|
+
.chip--category-get:hover, .chip--category-get.is-hover,
|
|
87
|
+
.chip--category-post:hover, .chip--category-post.is-hover,
|
|
88
|
+
.chip--category-put:hover, .chip--category-put.is-hover,
|
|
89
|
+
.chip--category-delete:hover, .chip--category-delete.is-hover,
|
|
90
|
+
.chip--category-patch:hover, .chip--category-patch.is-hover,
|
|
91
|
+
.chip--category-yml:hover, .chip--category-yml.is-hover,
|
|
92
|
+
.chip--category-json:hover, .chip--category-json.is-hover {
|
|
93
|
+
filter: none;
|
|
94
|
+
border-color: transparent;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* ---------- Disabled — shared reduced-emphasis ---------- */
|
|
98
|
+
.chip--disabled {
|
|
99
|
+
cursor: not-allowed;
|
|
100
|
+
color: var(--xm-color-on-surface-disabled);
|
|
101
|
+
border-color: var(--md-sys-color-outline-variant);
|
|
102
|
+
}
|
|
103
|
+
.chip--disabled:hover,
|
|
104
|
+
.chip--disabled.is-hover {
|
|
105
|
+
background: transparent;
|
|
106
|
+
border-color: var(--md-sys-color-outline-variant);
|
|
107
|
+
}
|
|
108
|
+
.chip--selected.chip--disabled:hover {
|
|
109
|
+
background: var(--md-sys-color-primary-container);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* ---------- Sizes ---------- */
|
|
113
|
+
.chip--xs { --chip-height: 22px; --chip-pad-x: var(--s-2); --chip-font: var(--md-sys-typescale-label-small-size); --chip-gap: 3px; }
|
|
114
|
+
.chip--sm { --chip-height: 24px; --chip-pad-x: var(--s-2); --chip-font: var(--md-sys-typescale-label-small-size); }
|
|
115
|
+
.chip--md { --chip-height: 28px; --chip-pad-x: var(--s-3); --chip-font: var(--md-sys-typescale-label-medium-size); }
|
|
116
|
+
.chip--lg { --chip-height: 34px; --chip-pad-x: var(--s-4); --chip-font: var(--md-sys-typescale-label-large-size); }
|
|
117
|
+
|
|
118
|
+
/* ---------- Inner elements ---------- */
|
|
119
|
+
.chip__icon {
|
|
120
|
+
display: inline-flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
flex-shrink: 0;
|
|
123
|
+
}
|
|
124
|
+
.chip__icon.is-empty { display: none; }
|
|
125
|
+
|
|
126
|
+
.chip__label {
|
|
127
|
+
display: inline-block;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.chip__remove {
|
|
131
|
+
appearance: none;
|
|
132
|
+
display: inline-flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
flex-shrink: 0;
|
|
136
|
+
width: 16px;
|
|
137
|
+
height: 16px;
|
|
138
|
+
margin-left: var(--s-0-5);
|
|
139
|
+
margin-right: -2px;
|
|
140
|
+
padding: 0;
|
|
141
|
+
border: none;
|
|
142
|
+
border-radius: var(--md-sys-shape-corner-full);
|
|
143
|
+
background: transparent;
|
|
144
|
+
color: currentColor;
|
|
145
|
+
cursor: pointer;
|
|
146
|
+
transition: background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
147
|
+
}
|
|
148
|
+
.chip__remove:hover {
|
|
149
|
+
background: color-mix(in oklab, currentColor 18%, transparent);
|
|
150
|
+
}
|
|
151
|
+
.chip__remove:focus-visible {
|
|
152
|
+
outline: none;
|
|
153
|
+
box-shadow: var(--xm-state-focus-ring);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
}`);
|
|
157
|
+
sheets = [sheet];
|
|
158
|
+
}
|
|
159
|
+
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 XmChipGroup extends LitElement {
|
|
8
|
+
static styles: CSSStyleSheet[];
|
|
5
9
|
multiple: boolean;
|
|
6
10
|
value: Primitive | Primitive[] | null;
|
|
7
11
|
connectedCallback(): void;
|
|
@@ -39,7 +39,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
39
39
|
};
|
|
40
40
|
import { LitElement, html } from "lit";
|
|
41
41
|
import { customElement, property } from "lit/decorators.js";
|
|
42
|
-
|
|
42
|
+
import chipGroupSheets from "./index.styles.js";
|
|
43
|
+
/**
|
|
44
|
+
* @fires change - Fired on commit with the new value in `detail`.
|
|
45
|
+
*/
|
|
43
46
|
let XmChipGroup = class XmChipGroup extends LitElement {
|
|
44
47
|
constructor() {
|
|
45
48
|
super(...arguments);
|
|
@@ -100,6 +103,9 @@ let XmChipGroup = class XmChipGroup extends LitElement {
|
|
|
100
103
|
this._updateRovingTabindex();
|
|
101
104
|
};
|
|
102
105
|
}
|
|
106
|
+
// Adopted from the build-generated sheets (scripts/gen-styles.mjs) — no
|
|
107
|
+
// runtime URL fetch (ADR 0012). Cascade order preserved from the old <link>s.
|
|
108
|
+
static { this.styles = [...chipGroupSheets]; }
|
|
103
109
|
connectedCallback() {
|
|
104
110
|
super.connectedCallback();
|
|
105
111
|
this.addEventListener("xm-chip-activate", this._onChipActivate);
|
|
@@ -145,7 +151,6 @@ let XmChipGroup = class XmChipGroup extends LitElement {
|
|
|
145
151
|
}
|
|
146
152
|
render() {
|
|
147
153
|
return html `
|
|
148
|
-
<link rel="stylesheet" href="${GROUP_CSS}" />
|
|
149
154
|
<style>
|
|
150
155
|
:host {
|
|
151
156
|
display: block;
|
|
@@ -169,3 +174,4 @@ __decorate([
|
|
|
169
174
|
XmChipGroup = __decorate([
|
|
170
175
|
customElement("xm-chip-group")
|
|
171
176
|
], XmChipGroup);
|
|
177
|
+
export { XmChipGroup };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/chip-group/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
|
+
Chip group — selection container for chips.
|
|
12
|
+
|
|
13
|
+
<xm-chip-group> lays slotted <xm-chip> children in a wrapping
|
|
14
|
+
row and owns selection (single by default, multi with \`multiple\`).
|
|
15
|
+
Layout only — the chips own all chrome. Sits on a surface* host,
|
|
16
|
+
so it adds no surface of its own.
|
|
17
|
+
============================================ */
|
|
18
|
+
|
|
19
|
+
.chip-group {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-wrap: wrap;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: var(--s-2);
|
|
24
|
+
/* The group sits on a surface* host; establish on-surface as the
|
|
25
|
+
inherited ink so any chip that resolves currentColor against the
|
|
26
|
+
group reads correctly on the desk (AD-13). */
|
|
27
|
+
color: var(--md-sys-color-on-surface);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
}`);
|
|
31
|
+
sheets = [sheet];
|
|
32
|
+
}
|
|
33
|
+
export default sheets;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import type { TemplateResult } from "lit";
|
|
3
|
-
declare class XmCode extends LitElement {
|
|
3
|
+
export declare class XmCode extends LitElement {
|
|
4
|
+
static styles: CSSStyleSheet[];
|
|
4
5
|
block: boolean;
|
|
5
6
|
render(): TemplateResult;
|
|
6
7
|
}
|
|
@@ -9,4 +10,3 @@ declare global {
|
|
|
9
10
|
"xm-code": XmCode;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
|
-
export {};
|
|
@@ -28,12 +28,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
28
28
|
};
|
|
29
29
|
import { LitElement, html } from "lit";
|
|
30
30
|
import { customElement, property } from "lit/decorators.js";
|
|
31
|
-
|
|
31
|
+
import codeSheets from "./index.styles.js";
|
|
32
32
|
let XmCode = class XmCode extends LitElement {
|
|
33
33
|
constructor() {
|
|
34
34
|
super(...arguments);
|
|
35
35
|
this.block = false;
|
|
36
36
|
}
|
|
37
|
+
// Adopted from the build-generated sheets (scripts/gen-styles.mjs) — no
|
|
38
|
+
// runtime URL fetch (ADR 0012). Cascade order preserved from the old <link>s.
|
|
39
|
+
static { this.styles = [...codeSheets]; }
|
|
37
40
|
render() {
|
|
38
41
|
const styleHost = html `
|
|
39
42
|
<style>
|
|
@@ -48,13 +51,11 @@ let XmCode = class XmCode extends LitElement {
|
|
|
48
51
|
`;
|
|
49
52
|
if (this.block) {
|
|
50
53
|
return html `
|
|
51
|
-
<link rel="stylesheet" href="${CODE_CSS}" />
|
|
52
54
|
${styleHost}
|
|
53
55
|
<pre class="code code--block"><code><slot></slot></code></pre>
|
|
54
56
|
`;
|
|
55
57
|
}
|
|
56
58
|
return html `
|
|
57
|
-
<link rel="stylesheet" href="${CODE_CSS}" />
|
|
58
59
|
${styleHost}
|
|
59
60
|
<code class="code"><slot></slot></code>
|
|
60
61
|
`;
|
|
@@ -66,3 +67,4 @@ __decorate([
|
|
|
66
67
|
XmCode = __decorate([
|
|
67
68
|
customElement("xm-code")
|
|
68
69
|
], XmCode);
|
|
70
|
+
export { XmCode };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/code/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
|
+
Code — inline / block code display primitive.
|
|
12
|
+
|
|
13
|
+
<xm-code> presents code verbatim using the JetBrains Mono
|
|
14
|
+
typescale (--xm-typescale-mono-*). Inline by default; the
|
|
15
|
+
\`block\` modifier wraps it in a <pre> for a small code block.
|
|
16
|
+
|
|
17
|
+
A recessed surface-container-* backplate raised off the host,
|
|
18
|
+
a hairline 1px outline-variant border, ink --md-sys-color-on-surface
|
|
19
|
+
matched to the backplate (AD-13). Presentational chrome — never a
|
|
20
|
+
status hue (AD-11).
|
|
21
|
+
============================================ */
|
|
22
|
+
|
|
23
|
+
.code {
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
padding: 1px var(--s-2);
|
|
26
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
27
|
+
border-radius: var(--md-sys-shape-corner-extra-small);
|
|
28
|
+
background: var(--md-sys-color-surface-container-low);
|
|
29
|
+
color: var(--md-sys-color-on-surface);
|
|
30
|
+
font-family: var(--xm-typescale-mono-font);
|
|
31
|
+
font-size: var(--xm-typescale-mono-size);
|
|
32
|
+
font-weight: var(--xm-typescale-mono-weight);
|
|
33
|
+
line-height: var(--xm-typescale-mono-line-height);
|
|
34
|
+
letter-spacing: var(--xm-typescale-mono-tracking);
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
vertical-align: baseline;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Block — recessed code panel. Wraps, scrolls horizontally if needed,
|
|
40
|
+
and uses the small corner + more padding of a panel rather than an
|
|
41
|
+
inline token. */
|
|
42
|
+
.code--block {
|
|
43
|
+
display: block;
|
|
44
|
+
margin: 0;
|
|
45
|
+
padding: var(--s-3) var(--s-4);
|
|
46
|
+
border-radius: var(--md-sys-shape-corner-small);
|
|
47
|
+
background: var(--md-sys-color-surface-container-low);
|
|
48
|
+
white-space: pre;
|
|
49
|
+
overflow-x: auto;
|
|
50
|
+
tab-size: 2;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
}`);
|
|
54
|
+
sheets = [sheet];
|
|
55
|
+
}
|
|
56
|
+
export default sheets;
|
|
@@ -12,7 +12,13 @@ export interface ComposerAttachment {
|
|
|
12
12
|
pages?: number;
|
|
13
13
|
dims?: string;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* @fires attachments-change - Fired when the attachment set changes.
|
|
17
|
+
* @fires cancel - Fired when the action is cancelled.
|
|
18
|
+
* @fires send - Fired when the user sends the composed content.
|
|
19
|
+
* @fires value-change - Fired when the value changes (`detail.value`).
|
|
20
|
+
*/
|
|
21
|
+
export declare class XmComposer extends LitElement {
|
|
16
22
|
initialValue: string;
|
|
17
23
|
initialFocus: boolean;
|
|
18
24
|
processing: boolean;
|
|
@@ -64,4 +70,3 @@ declare global {
|
|
|
64
70
|
"xm-composer": XmComposer;
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
|
-
export {};
|
|
@@ -36,6 +36,18 @@ import { LitElement, html, svg, nothing } from "lit";
|
|
|
36
36
|
import { customElement, property, state } from "lit/decorators.js";
|
|
37
37
|
// Side-effect import: registers <xm-button> for use in the toolbar.
|
|
38
38
|
import "../button/index.js";
|
|
39
|
+
import composerSheets from "./index.styles.js";
|
|
40
|
+
import primitivesSheets from "../primitives/index.styles.js";
|
|
41
|
+
// Light DOM: adopt the build-generated sheets into the document — no runtime
|
|
42
|
+
// URL fetch (ADR 0012). Deduped by sheet identity (the generated modules are
|
|
43
|
+
// singletons); the CSS is wrapped in @layer components (spine AD-2).
|
|
44
|
+
if (typeof document !== "undefined") {
|
|
45
|
+
for (const sheet of [...composerSheets, ...primitivesSheets]) {
|
|
46
|
+
if (!document.adoptedStyleSheets.includes(sheet)) {
|
|
47
|
+
document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
39
51
|
/* ---------- attachment helpers (verbatim from JSX) ---------- */
|
|
40
52
|
const STRIP_LIMIT = 10;
|
|
41
53
|
const HARD_CAP = 50;
|
|
@@ -107,6 +119,12 @@ const I_CARET = (size = 12) => svg `
|
|
|
107
119
|
<polyline points="6 9 12 15 18 9" />
|
|
108
120
|
</svg>
|
|
109
121
|
`;
|
|
122
|
+
/**
|
|
123
|
+
* @fires attachments-change - Fired when the attachment set changes.
|
|
124
|
+
* @fires cancel - Fired when the action is cancelled.
|
|
125
|
+
* @fires send - Fired when the user sends the composed content.
|
|
126
|
+
* @fires value-change - Fired when the value changes (`detail.value`).
|
|
127
|
+
*/
|
|
110
128
|
let XmComposer = class XmComposer extends LitElement {
|
|
111
129
|
constructor() {
|
|
112
130
|
super(...arguments);
|
|
@@ -711,3 +729,4 @@ __decorate([
|
|
|
711
729
|
XmComposer = __decorate([
|
|
712
730
|
customElement("xm-composer")
|
|
713
731
|
], XmComposer);
|
|
732
|
+
export { XmComposer };
|