@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,123 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/brand-mark/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
|
+
<BrandMark /> — xmesh logo lockup.
|
|
12
|
+
|
|
13
|
+
Owns the canonical brand glyph (three nodes routing to a single
|
|
14
|
+
hub) and the wordmark. Three sizes:
|
|
15
|
+
sm — 28px chip · sidebar header
|
|
16
|
+
md — 40px chip · generic placement
|
|
17
|
+
lg — 96px chip · brand showcase / about pages
|
|
18
|
+
|
|
19
|
+
Pairs with components/brand-mark/index.jsx. The glyph is a single SVG
|
|
20
|
+
that renders at any size — only the chip dimensions change.
|
|
21
|
+
============================================================ */
|
|
22
|
+
|
|
23
|
+
.brand-mark {
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
gap: var(--s-2-5);
|
|
27
|
+
min-width: 0;
|
|
28
|
+
color: var(--md-sys-color-on-surface);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.brand-mark__chip {
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
border-radius: 7px;
|
|
34
|
+
background: transparent;
|
|
35
|
+
color: var(--md-sys-color-on-surface);
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.brand-mark__info {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: var(--s-1);
|
|
45
|
+
min-width: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.brand-mark__wordmark {
|
|
49
|
+
font: 500 15px/1 var(--md-sys-typescale-display-large-font);
|
|
50
|
+
letter-spacing: -0.01em;
|
|
51
|
+
text-transform: uppercase;
|
|
52
|
+
color: var(--md-sys-color-on-surface);
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.brand-mark__tagline {
|
|
59
|
+
font: 400 13px/1.5 var(--md-sys-typescale-body-large-font);
|
|
60
|
+
color: var(--xm-color-on-surface-soft);
|
|
61
|
+
max-width: 360px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* ---------- Sizes ---------- */
|
|
65
|
+
.brand-mark--sm {
|
|
66
|
+
gap: var(--s-1);
|
|
67
|
+
}
|
|
68
|
+
.brand-mark--sm .brand-mark__chip {
|
|
69
|
+
width: 24px; height: 24px;
|
|
70
|
+
border-radius: 6px;
|
|
71
|
+
}
|
|
72
|
+
.brand-mark--sm .brand-mark__chip svg { width: 20px; height: 20px; }
|
|
73
|
+
|
|
74
|
+
.brand-mark--md {
|
|
75
|
+
gap: var(--s-3-5);
|
|
76
|
+
}
|
|
77
|
+
.brand-mark--md .brand-mark__chip {
|
|
78
|
+
width: 40px; height: 40px;
|
|
79
|
+
border-radius: 10px;
|
|
80
|
+
}
|
|
81
|
+
.brand-mark--md .brand-mark__chip svg { width: 24px; height: 24px; }
|
|
82
|
+
.brand-mark--md .brand-mark__wordmark { font-size: 20px; }
|
|
83
|
+
|
|
84
|
+
.brand-mark--lg {
|
|
85
|
+
gap: var(--s-8);
|
|
86
|
+
}
|
|
87
|
+
.brand-mark--lg .brand-mark__chip {
|
|
88
|
+
width: 96px; height: 96px;
|
|
89
|
+
border-radius: 22px;
|
|
90
|
+
}
|
|
91
|
+
.brand-mark--lg .brand-mark__chip svg { width: 60px; height: 60px; }
|
|
92
|
+
.brand-mark--lg .brand-mark__wordmark {
|
|
93
|
+
font: 600 34px/1 var(--md-sys-typescale-body-large-font);
|
|
94
|
+
letter-spacing: -0.02em;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* ---------- Wordmark-only (no glyph) ----------
|
|
98
|
+
The serif-driven brand wordmark used in the chat sidebar header
|
|
99
|
+
and editorial brand placements. Display family + medium weight.
|
|
100
|
+
Sizes scale with the wrapper modifier (--sm | --md | --lg). */
|
|
101
|
+
.brand-mark--wordmark-only { gap: 0; }
|
|
102
|
+
.brand-mark--wordmark-only .brand-mark__wordmark {
|
|
103
|
+
font:
|
|
104
|
+
var(--xm-typescale-wordmark-weight)
|
|
105
|
+
var(--xm-typescale-wordmark-size) /
|
|
106
|
+
var(--xm-typescale-wordmark-line-height)
|
|
107
|
+
var(--xm-typescale-wordmark-font);
|
|
108
|
+
letter-spacing: var(--xm-typescale-wordmark-tracking);
|
|
109
|
+
text-transform: none;
|
|
110
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
111
|
+
}
|
|
112
|
+
.brand-mark--wordmark-only.brand-mark--sm .brand-mark__wordmark { font-size: 16px; }
|
|
113
|
+
.brand-mark--wordmark-only.brand-mark--md .brand-mark__wordmark { font-size: 18px; }
|
|
114
|
+
.brand-mark--wordmark-only.brand-mark--lg .brand-mark__wordmark {
|
|
115
|
+
font-size: 28px;
|
|
116
|
+
font-weight: 400;
|
|
117
|
+
letter-spacing: -0.02em;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
}`);
|
|
121
|
+
sheets = [sheet];
|
|
122
|
+
}
|
|
123
|
+
export default sheets;
|
|
@@ -5,7 +5,8 @@ export interface BreadcrumbItem {
|
|
|
5
5
|
href?: string;
|
|
6
6
|
}
|
|
7
7
|
type BreadcrumbSeparator = "chevron" | "slash";
|
|
8
|
-
declare class XmBreadcrumbs extends LitElement {
|
|
8
|
+
export declare class XmBreadcrumbs extends LitElement {
|
|
9
|
+
static styles: CSSStyleSheet[];
|
|
9
10
|
items: BreadcrumbItem[];
|
|
10
11
|
separator: BreadcrumbSeparator;
|
|
11
12
|
render(): TemplateResult;
|
|
@@ -36,22 +36,23 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
36
36
|
};
|
|
37
37
|
import { LitElement, html, nothing } from "lit";
|
|
38
38
|
import { customElement, property } from "lit/decorators.js";
|
|
39
|
+
import primitivesSheets from "../primitives/index.styles.js";
|
|
40
|
+
import breadcrumbsSheets from "./index.styles.js";
|
|
39
41
|
// Resolve CSS relative to the *built* file:
|
|
40
42
|
// lit/build/components/breadcrumbs/index.js → ../...
|
|
41
|
-
const BREADCRUMBS_CSS = new URL("../breadcrumbs/index.css", import.meta.url).href;
|
|
42
|
-
const PRIMITIVES_CSS = new URL("../primitives/index.css", import.meta.url).href;
|
|
43
43
|
let XmBreadcrumbs = class XmBreadcrumbs extends LitElement {
|
|
44
44
|
constructor() {
|
|
45
45
|
super(...arguments);
|
|
46
46
|
this.items = [];
|
|
47
47
|
this.separator = "chevron";
|
|
48
48
|
}
|
|
49
|
+
// Adopted from the build-generated sheets (scripts/gen-styles.mjs) — no
|
|
50
|
+
// runtime URL fetch (ADR 0012). Cascade order preserved from the old <link>s.
|
|
51
|
+
static { this.styles = [...primitivesSheets, ...breadcrumbsSheets]; }
|
|
49
52
|
render() {
|
|
50
53
|
const items = Array.isArray(this.items) ? this.items : [];
|
|
51
54
|
const lastIndex = items.length - 1;
|
|
52
55
|
return html `
|
|
53
|
-
<link rel="stylesheet" href="${PRIMITIVES_CSS}" />
|
|
54
|
-
<link rel="stylesheet" href="${BREADCRUMBS_CSS}" />
|
|
55
56
|
<style>
|
|
56
57
|
:host {
|
|
57
58
|
display: block;
|
|
@@ -102,3 +103,4 @@ __decorate([
|
|
|
102
103
|
XmBreadcrumbs = __decorate([
|
|
103
104
|
customElement("xm-breadcrumbs")
|
|
104
105
|
], XmBreadcrumbs);
|
|
106
|
+
export { XmBreadcrumbs };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/breadcrumbs/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-breadcrumbs> — location trail.
|
|
12
|
+
|
|
13
|
+
Surface / ink (AD-13): a transparent trail that traces its host surface.
|
|
14
|
+
On the desk family: link ink var(--md-sys-color-on-surface-variant), hover
|
|
15
|
+
var(--md-sys-color-on-surface); the CURRENT (last) item is coral
|
|
16
|
+
var(--md-sys-color-primary) — the page indicator. The divider glyph is a
|
|
17
|
+
muted neutral, never a status hue.
|
|
18
|
+
|
|
19
|
+
BEM: block \`breadcrumbs\`; elements \`__item\` \`__link\` \`__current\`
|
|
20
|
+
\`__separator\` \`__slash\`.
|
|
21
|
+
============================================ */
|
|
22
|
+
|
|
23
|
+
.breadcrumbs {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-wrap: wrap;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: var(--s-1);
|
|
28
|
+
margin: 0;
|
|
29
|
+
padding: 0;
|
|
30
|
+
list-style: none;
|
|
31
|
+
font-family: var(--md-sys-typescale-body-medium-font);
|
|
32
|
+
font-size: var(--md-sys-typescale-body-medium-size);
|
|
33
|
+
line-height: var(--md-sys-typescale-body-medium-line-height);
|
|
34
|
+
letter-spacing: var(--md-sys-typescale-body-medium-tracking);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.breadcrumbs__item {
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
gap: var(--s-1);
|
|
41
|
+
min-width: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.breadcrumbs__link {
|
|
45
|
+
display: inline-block;
|
|
46
|
+
padding: var(--s-1) var(--s-2);
|
|
47
|
+
border-radius: var(--md-sys-shape-corner-small);
|
|
48
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
49
|
+
text-decoration: none;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
transition:
|
|
52
|
+
color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
53
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
54
|
+
}
|
|
55
|
+
.breadcrumbs__link:hover {
|
|
56
|
+
color: var(--md-sys-color-on-surface);
|
|
57
|
+
background: color-mix(
|
|
58
|
+
in oklab,
|
|
59
|
+
var(--md-sys-color-on-surface) var(--md-sys-state-hover-state-layer-opacity),
|
|
60
|
+
transparent
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
.breadcrumbs__link:focus {
|
|
64
|
+
outline: none;
|
|
65
|
+
}
|
|
66
|
+
.breadcrumbs__link:focus-visible {
|
|
67
|
+
outline: none;
|
|
68
|
+
color: var(--md-sys-color-on-surface);
|
|
69
|
+
box-shadow: var(--xm-state-focus-ring);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.breadcrumbs__current {
|
|
73
|
+
display: inline-block;
|
|
74
|
+
padding: var(--s-1) var(--s-2);
|
|
75
|
+
color: var(--md-sys-color-primary);
|
|
76
|
+
font-weight: 600;
|
|
77
|
+
white-space: nowrap;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* A non-last item with no href: plain, non-interactive text — NOT the coral
|
|
81
|
+
current-page treatment (only the last item is the current page). */
|
|
82
|
+
.breadcrumbs__text {
|
|
83
|
+
display: inline-block;
|
|
84
|
+
padding: var(--s-1) var(--s-2);
|
|
85
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
86
|
+
white-space: nowrap;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.breadcrumbs__separator {
|
|
90
|
+
display: inline-flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
93
|
+
opacity: 0.7;
|
|
94
|
+
flex-shrink: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.breadcrumbs__slash {
|
|
98
|
+
font-size: var(--md-sys-typescale-body-medium-size);
|
|
99
|
+
line-height: 1;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
}`);
|
|
103
|
+
sheets = [sheet];
|
|
104
|
+
}
|
|
105
|
+
export default sheets;
|
|
@@ -16,14 +16,18 @@ export interface BubbleArtifact {
|
|
|
16
16
|
declare class LightElement extends LitElement {
|
|
17
17
|
createRenderRoot(): HTMLElement | DocumentFragment;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* @fires artifact-download - Fired when an artifact download is requested.
|
|
21
|
+
* @fires artifact-open - Fired when an artifact is opened.
|
|
22
|
+
*/
|
|
23
|
+
export declare class XmBubbleGroup extends LightElement {
|
|
20
24
|
variant: BubbleVariant;
|
|
21
25
|
private _authoredChildren;
|
|
22
26
|
connectedCallback(): void;
|
|
23
27
|
render(): TemplateResult;
|
|
24
28
|
updated(): void;
|
|
25
29
|
}
|
|
26
|
-
declare class XmBubble extends LightElement {
|
|
30
|
+
export declare class XmBubble extends LightElement {
|
|
27
31
|
variant: BubbleVariant;
|
|
28
32
|
attachments: BubbleAttachment[];
|
|
29
33
|
artifact: BubbleArtifact | null;
|
|
@@ -39,7 +43,7 @@ declare class XmBubble extends LightElement {
|
|
|
39
43
|
render(): TemplateResult;
|
|
40
44
|
updated(): void;
|
|
41
45
|
}
|
|
42
|
-
declare class XmBubbleActions extends LightElement {
|
|
46
|
+
export declare class XmBubbleActions extends LightElement {
|
|
43
47
|
ts: string;
|
|
44
48
|
ariaLabel: string;
|
|
45
49
|
private _authored;
|
|
@@ -54,7 +58,7 @@ declare class XmBubbleActions extends LightElement {
|
|
|
54
58
|
render(): TemplateResult;
|
|
55
59
|
updated(): void;
|
|
56
60
|
}
|
|
57
|
-
declare class XmArtifactChip extends LightElement {
|
|
61
|
+
export declare class XmArtifactChip extends LightElement {
|
|
58
62
|
artifact: BubbleArtifact | null;
|
|
59
63
|
download: boolean;
|
|
60
64
|
private _open;
|
|
@@ -36,6 +36,19 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
|
36
36
|
import { customElement, property } from "lit/decorators.js";
|
|
37
37
|
// Register <xm-button> for the artifact "Download" action below.
|
|
38
38
|
import "../button/index.js";
|
|
39
|
+
import bubbleSheets from "./index.styles.js";
|
|
40
|
+
import composerSheets from "../composer/index.styles.js";
|
|
41
|
+
import primitivesSheets from "../primitives/index.styles.js";
|
|
42
|
+
// Light DOM: adopt the build-generated sheets into the document — no runtime
|
|
43
|
+
// URL fetch (ADR 0012). Deduped by sheet identity (the generated modules are
|
|
44
|
+
// singletons); the CSS is wrapped in @layer components (spine AD-2).
|
|
45
|
+
if (typeof document !== "undefined") {
|
|
46
|
+
for (const sheet of [...bubbleSheets, ...composerSheets, ...primitivesSheets]) {
|
|
47
|
+
if (!document.adoptedStyleSheets.includes(sheet)) {
|
|
48
|
+
document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
39
52
|
class LightElement extends LitElement {
|
|
40
53
|
createRenderRoot() {
|
|
41
54
|
return this;
|
|
@@ -108,6 +121,10 @@ function applyBubbleClasses(root) {
|
|
|
108
121
|
Authors put bubble + actions inside it; the group anchors the
|
|
109
122
|
layout edge and reveals .bubble-actions on hover via CSS only.
|
|
110
123
|
─────────────────────────────────────────────────────────────*/
|
|
124
|
+
/**
|
|
125
|
+
* @fires artifact-download - Fired when an artifact download is requested.
|
|
126
|
+
* @fires artifact-open - Fired when an artifact is opened.
|
|
127
|
+
*/
|
|
111
128
|
let XmBubbleGroup = class XmBubbleGroup extends LightElement {
|
|
112
129
|
constructor() {
|
|
113
130
|
super(...arguments);
|
|
@@ -143,6 +160,7 @@ __decorate([
|
|
|
143
160
|
XmBubbleGroup = __decorate([
|
|
144
161
|
customElement("xm-bubble-group")
|
|
145
162
|
], XmBubbleGroup);
|
|
163
|
+
export { XmBubbleGroup };
|
|
146
164
|
/* ─────────────────────────────────────────────────────────────
|
|
147
165
|
<xm-bubble> — the message body.
|
|
148
166
|
|
|
@@ -349,6 +367,7 @@ __decorate([
|
|
|
349
367
|
XmBubble = __decorate([
|
|
350
368
|
customElement("xm-bubble")
|
|
351
369
|
], XmBubble);
|
|
370
|
+
export { XmBubble };
|
|
352
371
|
/* ─────────────────────────────────────────────────────────────
|
|
353
372
|
<xm-bubble-actions> — hover-reveal toolbar.
|
|
354
373
|
|
|
@@ -530,6 +549,7 @@ __decorate([
|
|
|
530
549
|
XmBubbleActions = __decorate([
|
|
531
550
|
customElement("xm-bubble-actions")
|
|
532
551
|
], XmBubbleActions);
|
|
552
|
+
export { XmBubbleActions };
|
|
533
553
|
/* ─────────────────────────────────────────────────────────────
|
|
534
554
|
<xm-artifact-chip> — standalone chip for surfaces other than
|
|
535
555
|
xm-bubble (e.g. snackbar, drawer). xm-bubble renders the same
|
|
@@ -615,3 +635,4 @@ __decorate([
|
|
|
615
635
|
XmArtifactChip = __decorate([
|
|
616
636
|
customElement("xm-artifact-chip")
|
|
617
637
|
], XmArtifactChip);
|
|
638
|
+
export { XmArtifactChip };
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/bubble/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
|
+
<Bubble /> — chat message vocabulary
|
|
12
|
+
|
|
13
|
+
Three exported components share this stylesheet:
|
|
14
|
+
• .bubble — the message body itself (--user | --bot)
|
|
15
|
+
• .bubble-group — column wrapping bubble + actions, anchored
|
|
16
|
+
left for bot, right for user
|
|
17
|
+
• .bubble-actions — hover-reveal toolbar (timestamp + icons)
|
|
18
|
+
|
|
19
|
+
Pairs with components/bubble/index.jsx. Loaded directly by every preview
|
|
20
|
+
page that renders a chat thread (bubbles.html, chat.html). No tag
|
|
21
|
+
selectors — paragraph, list, strong, code content is wrapped by the
|
|
22
|
+
JSX <BubbleBody> walker into .bubble__paragraph / .bubble__list / etc.
|
|
23
|
+
============================================================ */
|
|
24
|
+
|
|
25
|
+
/* ---------- Bubble body ---------- */
|
|
26
|
+
.bubble {
|
|
27
|
+
max-width: 640px;
|
|
28
|
+
font:
|
|
29
|
+
var(--md-sys-typescale-body-large-weight)
|
|
30
|
+
var(--md-sys-typescale-body-large-size) /
|
|
31
|
+
var(--md-sys-typescale-body-large-line-height)
|
|
32
|
+
var(--md-sys-typescale-body-large-font);
|
|
33
|
+
}
|
|
34
|
+
/* User bubble shares the composer's raised family (surface-container-high)
|
|
35
|
+
so "your voice" reads as one surface across input and thread.
|
|
36
|
+
surface-container-lowest was ~black in dark and vanished into the desk;
|
|
37
|
+
the high container sits a clear step above \`surface\` in both themes. */
|
|
38
|
+
.bubble--user {
|
|
39
|
+
padding: 11px var(--s-4-5);
|
|
40
|
+
border-radius: var(--md-sys-shape-corner-large);
|
|
41
|
+
background: var(--md-sys-color-surface-container-high);
|
|
42
|
+
color: var(--md-sys-color-on-surface);
|
|
43
|
+
}
|
|
44
|
+
/* Bot bubble has no surface of its own — it rides whatever's behind it.
|
|
45
|
+
In the xmesh chat the thread sits on \`surface\` (the warm dark "desk"
|
|
46
|
+
in dark theme, cream in light), so the bot bubble uses on-surface. The
|
|
47
|
+
primitives flip per theme — a single rule covers both. If a host page
|
|
48
|
+
puts the thread on \`inverse-surface\` (a card) instead, override with
|
|
49
|
+
.bubble--bot { color: var(--md-sys-color-inverse-on-surface) } at the
|
|
50
|
+
page level. */
|
|
51
|
+
.bubble--bot {
|
|
52
|
+
padding: 0 var(--s-0-5);
|
|
53
|
+
color: var(--md-sys-color-on-surface);
|
|
54
|
+
max-width: 720px;
|
|
55
|
+
background: transparent;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* ---------- Bubble body content (BEM-wrapped by <BubbleBody>) ---------- */
|
|
59
|
+
.bubble__paragraph { margin: 0 0 0.75em; }
|
|
60
|
+
.bubble__paragraph:last-child { margin-bottom: 0; }
|
|
61
|
+
|
|
62
|
+
.bubble__list { margin: var(--s-1) 0 0; padding-left: var(--s-5-5); }
|
|
63
|
+
.bubble__list--ordered { list-style: decimal; }
|
|
64
|
+
.bubble__list--unordered { list-style: none; padding-left: var(--s-5-5); }
|
|
65
|
+
.bubble__list-item { padding-left: var(--s-1-5); margin-bottom: var(--s-1-5); }
|
|
66
|
+
.bubble__list--ordered .bubble__list-item::marker {
|
|
67
|
+
color: var(--xm-color-on-surface-soft);
|
|
68
|
+
font-variant-numeric: tabular-nums;
|
|
69
|
+
}
|
|
70
|
+
.bubble__list--unordered .bubble__list-item {
|
|
71
|
+
position: relative;
|
|
72
|
+
padding-left: var(--s-3-5);
|
|
73
|
+
margin-bottom: var(--s-1);
|
|
74
|
+
}
|
|
75
|
+
.bubble__list--unordered .bubble__list-item::before {
|
|
76
|
+
content: "";
|
|
77
|
+
position: absolute;
|
|
78
|
+
left: 0; top: 0.7em;
|
|
79
|
+
width: 4px; height: 4px;
|
|
80
|
+
border-radius: 50%;
|
|
81
|
+
background: var(--xm-color-on-surface-soft);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.bubble__strong { font-weight: 600; color: var(--md-sys-color-on-surface); }
|
|
85
|
+
|
|
86
|
+
/* Inline code — flat: monospaced ink shift, no chip background.
|
|
87
|
+
The page can still override --xm-color-code-ink at :root for accent
|
|
88
|
+
variants (see bubbles.html for the canonical override). */
|
|
89
|
+
.bubble__code {
|
|
90
|
+
background: transparent;
|
|
91
|
+
color: var(--xm-color-code-ink, oklch(0.55 0.16 25));
|
|
92
|
+
padding: 0;
|
|
93
|
+
border-radius: 0;
|
|
94
|
+
font: 500 12.5px/1.4 var(--xm-typescale-mono-font);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* ---------- Bubble group (column wrapper) ---------- */
|
|
98
|
+
.bubble-group {
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-direction: column;
|
|
101
|
+
gap: var(--s-1-5);
|
|
102
|
+
max-width: 720px;
|
|
103
|
+
}
|
|
104
|
+
.bubble-group--user {
|
|
105
|
+
align-items: flex-end;
|
|
106
|
+
max-width: 640px;
|
|
107
|
+
}
|
|
108
|
+
.bubble-group--bot {
|
|
109
|
+
align-items: flex-start;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* ---------- Bubble actions (hover-reveal toolbar) ---------- */
|
|
113
|
+
.bubble-actions {
|
|
114
|
+
display: inline-flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
gap: var(--s-2-5);
|
|
117
|
+
padding: 0 var(--s-1);
|
|
118
|
+
background: transparent;
|
|
119
|
+
border: 0;
|
|
120
|
+
color: var(--xm-color-on-surface-soft);
|
|
121
|
+
opacity: 0;
|
|
122
|
+
transform: translateY(-1px);
|
|
123
|
+
transition:
|
|
124
|
+
opacity var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
125
|
+
transform var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
}
|
|
128
|
+
.bubble-group:hover .bubble-actions,
|
|
129
|
+
.bubble-group:focus-within .bubble-actions {
|
|
130
|
+
opacity: 1;
|
|
131
|
+
transform: none;
|
|
132
|
+
pointer-events: auto;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.bubble-actions__ts {
|
|
136
|
+
font: 400 12px/1 var(--xm-typescale-mono-font);
|
|
137
|
+
color: var(--xm-color-on-surface-soft);
|
|
138
|
+
letter-spacing: 0.02em;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.bubble-actions__btn {
|
|
142
|
+
appearance: none;
|
|
143
|
+
border: 0;
|
|
144
|
+
background: transparent;
|
|
145
|
+
color: var(--xm-color-on-surface-soft);
|
|
146
|
+
padding: var(--s-1);
|
|
147
|
+
border-radius: 6px;
|
|
148
|
+
display: inline-flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
justify-content: center;
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
transition:
|
|
153
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
154
|
+
color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
155
|
+
}
|
|
156
|
+
.bubble-actions__btn:hover {
|
|
157
|
+
background: color-mix(in oklch, currentColor 14%, transparent);
|
|
158
|
+
color: var(--md-sys-color-on-surface);
|
|
159
|
+
}
|
|
160
|
+
.bubble-actions__btn svg {
|
|
161
|
+
width: 16px; height: 16px;
|
|
162
|
+
stroke: currentColor;
|
|
163
|
+
fill: none;
|
|
164
|
+
stroke-width: 1.6;
|
|
165
|
+
stroke-linecap: round;
|
|
166
|
+
stroke-linejoin: round;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* ---------- Attachment chips (used when user bubble carries files) ---------- */
|
|
170
|
+
.bubble__atts {
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-wrap: wrap;
|
|
173
|
+
gap: var(--s-1-5);
|
|
174
|
+
margin-bottom: var(--s-1-5);
|
|
175
|
+
}
|
|
176
|
+
.bubble__att-mini {
|
|
177
|
+
display: inline-flex;
|
|
178
|
+
align-items: center;
|
|
179
|
+
gap: var(--s-1-5);
|
|
180
|
+
padding: var(--s-1) var(--s-2);
|
|
181
|
+
border-radius: 6px;
|
|
182
|
+
background: color-mix(in oklab, currentColor 12%, transparent);
|
|
183
|
+
font: 500 11px/1 var(--xm-typescale-mono-font);
|
|
184
|
+
}
|
|
185
|
+
.bubble__att-thumb {
|
|
186
|
+
width: 14px; height: 14px;
|
|
187
|
+
border-radius: 3px;
|
|
188
|
+
background-size: cover;
|
|
189
|
+
background-position: center;
|
|
190
|
+
flex-shrink: 0;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
}`);
|
|
194
|
+
sheets = [sheet];
|
|
195
|
+
}
|
|
196
|
+
export default sheets;
|
|
@@ -4,7 +4,8 @@ type ButtonVariant = "primary" | "secondary" | "outline" | "ghost" | "ghost-acce
|
|
|
4
4
|
type ButtonSize = "xs" | "sm" | "md" | "lg";
|
|
5
5
|
type ButtonType = "button" | "submit" | "reset";
|
|
6
6
|
type ForceState = "hover" | "active" | "focus" | null;
|
|
7
|
-
declare class XmButton extends LitElement {
|
|
7
|
+
export declare class XmButton extends LitElement {
|
|
8
|
+
static styles: CSSStyleSheet[];
|
|
8
9
|
static shadowRootOptions: ShadowRootInit;
|
|
9
10
|
variant: ButtonVariant;
|
|
10
11
|
size: ButtonSize;
|
|
@@ -37,6 +37,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
37
37
|
};
|
|
38
38
|
import { LitElement, html, nothing } from "lit";
|
|
39
39
|
import { customElement, property } from "lit/decorators.js";
|
|
40
|
+
import btnSheets from "./index.styles.js";
|
|
41
|
+
import primSheets from "../primitives/index.styles.js";
|
|
40
42
|
const VARIANT_CLASS = {
|
|
41
43
|
primary: "btn--primary",
|
|
42
44
|
secondary: "btn--secondary",
|
|
@@ -48,17 +50,6 @@ const VARIANT_CLASS = {
|
|
|
48
50
|
"ghost-canvas": "btn--ghost-canvas",
|
|
49
51
|
"ghost-accent-canvas": "btn--ghost-accent-canvas",
|
|
50
52
|
};
|
|
51
|
-
// Resolve CSS path relative to this module so the previews can sit at
|
|
52
|
-
// any depth without the component caring (e.g. lit/preview/buttons.html
|
|
53
|
-
// → ../components/button/index.css).
|
|
54
|
-
//
|
|
55
|
-
// Paths are computed from the *built* file location:
|
|
56
|
-
// `lit/build/components/button/index.js` — 3 levels of `..` to reach
|
|
57
|
-
// `lit/`, then into `components/`. The .ts source under
|
|
58
|
-
// `lit/components/button/` is never loaded by the browser; only the
|
|
59
|
-
// tsc-emitted .js is.
|
|
60
|
-
const BTN_CSS = new URL("../button/index.css", import.meta.url).href;
|
|
61
|
-
const PRIMITIVES_CSS = new URL("../primitives/index.css", import.meta.url).href;
|
|
62
53
|
let XmButton = class XmButton extends LitElement {
|
|
63
54
|
constructor() {
|
|
64
55
|
super(...arguments);
|
|
@@ -78,6 +69,10 @@ let XmButton = class XmButton extends LitElement {
|
|
|
78
69
|
this.requestUpdate();
|
|
79
70
|
};
|
|
80
71
|
}
|
|
72
|
+
// Component CSS is adopted from the build-generated constructable sheets
|
|
73
|
+
// (scripts/gen-styles.mjs) — no runtime URL fetch (ADR 0012). primitives
|
|
74
|
+
// first so the button's own rules win on overlap.
|
|
75
|
+
static { this.styles = [...primSheets, ...btnSheets]; }
|
|
81
76
|
// Forward focus to the inner native <button>. Required for Enter/Space
|
|
82
77
|
// to fire a click when the host is focused via tabindex (used by toggle
|
|
83
78
|
// and tab buttons that receive focus on the host element).
|
|
@@ -118,8 +113,6 @@ let XmButton = class XmButton extends LitElement {
|
|
|
118
113
|
`;
|
|
119
114
|
}
|
|
120
115
|
return html `
|
|
121
|
-
<link rel="stylesheet" href="${PRIMITIVES_CSS}">
|
|
122
|
-
<link rel="stylesheet" href="${BTN_CSS}">
|
|
123
116
|
<style>
|
|
124
117
|
:host { display: inline-block; }
|
|
125
118
|
:host([full-width]) { display: block; }
|
|
@@ -200,3 +193,4 @@ __decorate([
|
|
|
200
193
|
XmButton = __decorate([
|
|
201
194
|
customElement("xm-button")
|
|
202
195
|
], XmButton);
|
|
196
|
+
export { XmButton };
|