@xmesh/system-design 0.0.4 → 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 +5 -0
- package/dist/lit/components/alert/index.js +8 -2
- package/dist/lit/components/alert/index.styles.js +215 -0
- package/dist/lit/components/app-bar/index.d.ts +1 -0
- package/dist/lit/components/app-bar/index.js +4 -2
- package/dist/lit/components/app-bar/index.styles.js +94 -0
- package/dist/lit/components/artifact/index.d.ts +5 -0
- package/dist/lit/components/artifact/index.js +14 -10
- package/dist/lit/components/artifact/index.styles.js +180 -0
- package/dist/lit/components/autocomplete/index.d.ts +5 -0
- package/dist/lit/components/autocomplete/index.js +11 -2
- package/dist/lit/components/autocomplete/index.styles.js +185 -0
- package/dist/lit/components/avatar/index.d.ts +1 -0
- package/dist/lit/components/avatar/index.js +4 -2
- package/dist/lit/components/avatar/index.styles.js +76 -0
- package/dist/lit/components/avatar-group/index.d.ts +1 -0
- package/dist/lit/components/avatar-group/index.js +4 -2
- package/dist/lit/components/avatar-group/index.styles.js +74 -0
- package/dist/lit/components/badge/index.d.ts +1 -0
- package/dist/lit/components/badge/index.js +4 -2
- package/dist/lit/components/badge/index.styles.js +86 -0
- package/dist/lit/components/brand-mark/index.js +8 -9
- package/dist/lit/components/brand-mark/index.styles.js +123 -0
- package/dist/lit/components/breadcrumbs/index.d.ts +1 -0
- package/dist/lit/components/breadcrumbs/index.js +5 -4
- package/dist/lit/components/breadcrumbs/index.styles.js +105 -0
- package/dist/lit/components/bubble/index.d.ts +4 -0
- package/dist/lit/components/bubble/index.js +14 -11
- package/dist/lit/components/bubble/index.styles.js +196 -0
- package/dist/lit/components/button/index.d.ts +1 -0
- package/dist/lit/components/button/index.js +6 -13
- package/dist/lit/components/button/index.styles.js +356 -0
- package/dist/lit/components/card/index.d.ts +1 -0
- package/dist/lit/components/card/index.js +4 -2
- package/dist/lit/components/card/index.styles.js +113 -0
- package/dist/lit/components/chat/index.d.ts +6 -0
- package/dist/lit/components/chat/index.js +15 -10
- package/dist/lit/components/chat/index.styles.js +306 -0
- package/dist/lit/components/checkbox/index.d.ts +1 -0
- package/dist/lit/components/checkbox/index.js +7 -4
- package/dist/lit/components/checkbox/index.styles.js +140 -0
- package/dist/lit/components/chip/index.d.ts +5 -0
- package/dist/lit/components/chip/index.js +8 -2
- package/dist/lit/components/chip/index.styles.js +159 -0
- package/dist/lit/components/chip-group/index.d.ts +4 -0
- package/dist/lit/components/chip-group/index.js +7 -2
- package/dist/lit/components/chip-group/index.styles.js +33 -0
- package/dist/lit/components/code/index.d.ts +1 -0
- package/dist/lit/components/code/index.js +4 -3
- package/dist/lit/components/code/index.styles.js +56 -0
- package/dist/lit/components/composer/index.d.ts +6 -0
- package/dist/lit/components/composer/index.js +15 -10
- package/dist/lit/components/composer/index.styles.js +562 -0
- package/dist/lit/components/data-table/index.css +18 -0
- package/dist/lit/components/data-table/index.d.ts +30 -0
- package/dist/lit/components/data-table/index.js +120 -34
- package/dist/lit/components/data-table/index.styles.js +198 -0
- package/dist/lit/components/date-range/index.d.ts +4 -0
- package/dist/lit/components/date-range/index.js +7 -2
- package/dist/lit/components/date-range/index.styles.js +338 -0
- package/dist/lit/components/dialog/index.d.ts +4 -0
- package/dist/lit/components/dialog/index.js +7 -2
- package/dist/lit/components/dialog/index.styles.js +138 -0
- package/dist/lit/components/divider/index.d.ts +1 -0
- package/dist/lit/components/divider/index.js +4 -2
- package/dist/lit/components/divider/index.styles.js +41 -0
- package/dist/lit/components/empty-state/index.d.ts +1 -0
- package/dist/lit/components/empty-state/index.js +4 -2
- package/dist/lit/components/empty-state/index.styles.js +83 -0
- package/dist/lit/components/expansion-panel/index.d.ts +5 -0
- package/dist/lit/components/expansion-panel/index.js +8 -2
- package/dist/lit/components/expansion-panel/index.styles.js +134 -0
- package/dist/lit/components/field/index.d.ts +4 -0
- package/dist/lit/components/field/index.js +9 -4
- package/dist/lit/components/field/index.styles.js +237 -0
- package/dist/lit/components/file-input/index.d.ts +4 -0
- package/dist/lit/components/file-input/index.js +10 -4
- package/dist/lit/components/file-input/index.styles.js +271 -0
- package/dist/lit/components/form/index.d.ts +4 -0
- package/dist/lit/components/form/index.js +7 -2
- package/dist/lit/components/form/index.styles.js +43 -0
- package/dist/lit/components/grid/index.d.ts +1 -0
- package/dist/lit/components/grid/index.js +4 -2
- package/dist/lit/components/grid/index.styles.js +67 -0
- package/dist/lit/components/kbd/index.d.ts +1 -0
- package/dist/lit/components/kbd/index.js +4 -2
- package/dist/lit/components/kbd/index.styles.js +49 -0
- package/dist/lit/components/list/index.d.ts +4 -0
- package/dist/lit/components/list/index.js +7 -2
- package/dist/lit/components/list/index.styles.js +29 -0
- package/dist/lit/components/list-item/index.d.ts +1 -0
- package/dist/lit/components/list-item/index.js +4 -2
- package/dist/lit/components/list-item/index.styles.js +133 -0
- package/dist/lit/components/menu/index.d.ts +8 -0
- package/dist/lit/components/menu/index.js +11 -3
- package/dist/lit/components/menu/index.styles.js +108 -0
- package/dist/lit/components/multi-select/index.css +156 -0
- package/dist/lit/components/multi-select/index.d.ts +70 -0
- package/dist/lit/components/multi-select/index.js +497 -0
- package/dist/lit/components/multi-select/index.styles.js +170 -0
- package/dist/lit/components/navigation-drawer/index.d.ts +4 -0
- package/dist/lit/components/navigation-drawer/index.js +7 -2
- package/dist/lit/components/navigation-drawer/index.styles.js +128 -0
- package/dist/lit/components/overlay/index.d.ts +5 -0
- package/dist/lit/components/overlay/index.js +8 -2
- package/dist/lit/components/overlay/index.styles.js +185 -0
- package/dist/lit/components/pagination/index.d.ts +17 -0
- package/dist/lit/components/pagination/index.js +53 -8
- package/dist/lit/components/pagination/index.styles.js +116 -0
- package/dist/lit/components/popover/index.d.ts +5 -0
- package/dist/lit/components/popover/index.js +8 -2
- package/dist/lit/components/popover/index.styles.js +48 -0
- package/dist/lit/components/primitives/index.js +8 -9
- package/dist/lit/components/primitives/index.styles.js +518 -0
- package/dist/lit/components/progress/index.d.ts +1 -0
- package/dist/lit/components/progress/index.js +4 -2
- package/dist/lit/components/progress/index.styles.js +157 -0
- package/dist/lit/components/radio-group/index.d.ts +5 -0
- package/dist/lit/components/radio-group/index.js +10 -6
- package/dist/lit/components/radio-group/index.styles.js +192 -0
- package/dist/lit/components/select/index.d.ts +4 -0
- package/dist/lit/components/select/index.js +10 -2
- package/dist/lit/components/select/index.styles.js +165 -0
- package/dist/lit/components/sidebar-item/index.js +8 -9
- package/dist/lit/components/sidebar-item/index.styles.js +147 -0
- package/dist/lit/components/skeleton/index.d.ts +1 -0
- package/dist/lit/components/skeleton/index.js +4 -2
- package/dist/lit/components/skeleton/index.styles.js +95 -0
- package/dist/lit/components/slider/index.d.ts +5 -0
- package/dist/lit/components/slider/index.js +11 -4
- package/dist/lit/components/slider/index.styles.js +185 -0
- package/dist/lit/components/snackbar/index.d.ts +4 -0
- package/dist/lit/components/snackbar/index.js +14 -10
- package/dist/lit/components/snackbar/index.styles.js +293 -0
- package/dist/lit/components/stack/index.d.ts +1 -0
- package/dist/lit/components/stack/index.js +4 -2
- package/dist/lit/components/stack/index.styles.js +55 -0
- package/dist/lit/components/switch/index.d.ts +1 -0
- package/dist/lit/components/switch/index.js +7 -4
- package/dist/lit/components/switch/index.styles.js +140 -0
- package/dist/lit/components/table/index.d.ts +1 -0
- package/dist/lit/components/table/index.js +4 -2
- package/dist/lit/components/table/index.styles.js +99 -0
- package/dist/lit/components/tabs/index.d.ts +4 -0
- package/dist/lit/components/tabs/index.js +8 -4
- package/dist/lit/components/tabs/index.styles.js +130 -0
- package/dist/lit/components/text-field/index.d.ts +1 -0
- package/dist/lit/components/text-field/index.js +7 -2
- package/dist/lit/components/text-field/index.styles.js +104 -0
- package/dist/lit/components/textarea/index.d.ts +1 -0
- package/dist/lit/components/textarea/index.js +7 -2
- package/dist/lit/components/textarea/index.styles.js +69 -0
- package/dist/lit/components/tooltip/index.d.ts +1 -0
- package/dist/lit/components/tooltip/index.js +4 -2
- package/dist/lit/components/tooltip/index.styles.js +51 -0
- package/dist/lit/components/validation/index.d.ts +6 -0
- package/dist/lit/components/validation/index.js +15 -10
- package/dist/lit/components/validation/index.styles.js +400 -0
- package/dist/lit/index.d.ts +1 -0
- package/dist/lit/index.js +1 -0
- package/dist/react/XmAlert.d.ts +99 -0
- package/dist/react/XmAlert.js +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
|
@@ -42,8 +42,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
42
42
|
};
|
|
43
43
|
import { LitElement, html } from "lit";
|
|
44
44
|
import { customElement, property, query } from "lit/decorators.js";
|
|
45
|
-
|
|
45
|
+
import popoverSheets from "./index.styles.js";
|
|
46
46
|
let popoverSeq = 0;
|
|
47
|
+
/**
|
|
48
|
+
* @fires xm-popover-close - Fired when the popover closes.
|
|
49
|
+
* @fires xm-popover-open - Fired when the popover opens.
|
|
50
|
+
*/
|
|
47
51
|
let XmPopover = class XmPopover extends LitElement {
|
|
48
52
|
constructor() {
|
|
49
53
|
super(...arguments);
|
|
@@ -82,6 +86,9 @@ let XmPopover = class XmPopover extends LitElement {
|
|
|
82
86
|
}
|
|
83
87
|
};
|
|
84
88
|
}
|
|
89
|
+
// Adopted from the build-generated sheets (scripts/gen-styles.mjs) — no
|
|
90
|
+
// runtime URL fetch (ADR 0012). Cascade order preserved from the old <link>s.
|
|
91
|
+
static { this.styles = [...popoverSheets]; }
|
|
85
92
|
connectedCallback() {
|
|
86
93
|
super.connectedCallback();
|
|
87
94
|
document.addEventListener("pointerdown", this._onDocPointer, true);
|
|
@@ -92,7 +99,6 @@ let XmPopover = class XmPopover extends LitElement {
|
|
|
92
99
|
}
|
|
93
100
|
render() {
|
|
94
101
|
return html `
|
|
95
|
-
<link rel="stylesheet" href="${POPOVER_CSS}" />
|
|
96
102
|
<style>
|
|
97
103
|
:host { display: inline-flex; }
|
|
98
104
|
</style>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/popover/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
|
+
Popover — a click-triggered anchored panel of arbitrary content.
|
|
12
|
+
|
|
13
|
+
The popover surface chrome (inverse-surface fill, inverse-on-surface ink,
|
|
14
|
+
hairline border, level3 elevation, edge-flip, open/close motion) is owned by
|
|
15
|
+
the composed <xm-overlay> in the \`menu\` tier. This file styles only the
|
|
16
|
+
trigger wrapper and the content panel that rides inside the overlay body.
|
|
17
|
+
|
|
18
|
+
All ink is inverse-on-surface (AD-13) — the popover/card stack ink. The panel
|
|
19
|
+
is role="dialog" and receives initial focus, so its focus outline is
|
|
20
|
+
suppressed (the moved-in focus is the affordance, not a ring on the box).
|
|
21
|
+
|
|
22
|
+
BEM block: \`popover\`. Registered in scripts/check-bem.sh STRICT_BLOCKS.
|
|
23
|
+
Elements: popover__trigger, popover__panel.
|
|
24
|
+
============================================ */
|
|
25
|
+
|
|
26
|
+
.popover__trigger {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.popover__panel {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
gap: var(--s-2);
|
|
35
|
+
min-width: 180px;
|
|
36
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* role="dialog" + tabindex=-1: we move focus here on open, so the box itself
|
|
40
|
+
never shows a focus ring — interactive children own their own focus states. */
|
|
41
|
+
.popover__panel:focus {
|
|
42
|
+
outline: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
}`);
|
|
46
|
+
sheets = [sheet];
|
|
47
|
+
}
|
|
48
|
+
export default sheets;
|
|
@@ -22,16 +22,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
22
22
|
};
|
|
23
23
|
import { LitElement, html, svg, nothing } from "lit";
|
|
24
24
|
import { customElement, property } from "lit/decorators.js";
|
|
25
|
+
import primitivesSheets from "./index.styles.js";
|
|
26
|
+
// Light DOM: adopt the build-generated sheets into the document — no runtime
|
|
27
|
+
// URL fetch (ADR 0012). Deduped by sheet identity (the generated modules are
|
|
28
|
+
// singletons); the CSS is wrapped in @layer components (spine AD-2).
|
|
25
29
|
if (typeof document !== "undefined") {
|
|
26
|
-
for (const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
continue;
|
|
31
|
-
const link = document.createElement("link");
|
|
32
|
-
link.rel = "stylesheet";
|
|
33
|
-
link.href = href;
|
|
34
|
-
document.head.appendChild(link);
|
|
30
|
+
for (const sheet of [...primitivesSheets]) {
|
|
31
|
+
if (!document.adoptedStyleSheets.includes(sheet)) {
|
|
32
|
+
document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
|
|
33
|
+
}
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
class LightElement extends LitElement {
|
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/primitives/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
|
+
primitives.css — design system base components
|
|
12
|
+
|
|
13
|
+
Visual chrome for the primitives in components/primitives/index.jsx. Every
|
|
14
|
+
selector here references MD3 system tokens (\`var(--md-sys-*)\`) or xmesh
|
|
15
|
+
extensions (\`var(--xm-*)\`) only — never primitives, never raw colors.
|
|
16
|
+
Theme flipping (dark/light) happens automatically through the token layer.
|
|
17
|
+
|
|
18
|
+
Naming: the \`ds-\` prefix scopes these primitives so they don't collide
|
|
19
|
+
with the legacy class names that still live in styles.css and
|
|
20
|
+
chat-shell.jsx (e.g. \`.text-input\`, \`.icon-btn\`, \`.chip\`). The legacy
|
|
21
|
+
classes keep working; new code reaches for \`<Input />\`, \`<IconButton />\`
|
|
22
|
+
etc. instead.
|
|
23
|
+
============================================ */
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/* ---------- Icon ----------
|
|
27
|
+
Just a marker class; sizing is handled inline via width/height on the
|
|
28
|
+
svg so it stays predictable regardless of the surrounding font-size. */
|
|
29
|
+
.ds-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
/* ---------- Spinner ---------- */
|
|
33
|
+
.ds-spinner {
|
|
34
|
+
display: inline-block;
|
|
35
|
+
border: 2px solid currentColor;
|
|
36
|
+
border-right-color: transparent;
|
|
37
|
+
border-radius: 50%;
|
|
38
|
+
animation: ds-spin 0.7s linear infinite;
|
|
39
|
+
opacity: 0.85;
|
|
40
|
+
vertical-align: middle;
|
|
41
|
+
}
|
|
42
|
+
@keyframes ds-spin { to { transform: rotate(360deg); } }
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/* ---------- Label / Hint / Field ---------- */
|
|
46
|
+
.ds-label {
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: var(--s-1-5);
|
|
50
|
+
font-size: 13px;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
53
|
+
line-height: 1.4;
|
|
54
|
+
}
|
|
55
|
+
.ds-label__req {
|
|
56
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
57
|
+
font-weight: 700;
|
|
58
|
+
margin-left: var(--s-0-5);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ds-hint {
|
|
62
|
+
margin: 0;
|
|
63
|
+
font-size: 12.5px;
|
|
64
|
+
line-height: 1.5;
|
|
65
|
+
}
|
|
66
|
+
.ds-hint--muted { color: var(--xm-color-inverse-on-surface-muted); }
|
|
67
|
+
|
|
68
|
+
.ds-field { display: flex; flex-direction: column; gap: var(--s-1-5); }
|
|
69
|
+
.ds-field__control { display: flex; flex-direction: column; gap: var(--s-1-5); }
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/* ---------- Input / Textarea ----------
|
|
73
|
+
\`ds-input\` is the WRAPPER that owns the border + affix layout. The inner
|
|
74
|
+
<input>/<textarea> is borderless and inherits color so left/right adornments
|
|
75
|
+
sit flush. Two tones: \`card\` for light surfaces, \`on-canvas\` for the dark
|
|
76
|
+
sidebar/canvas surface. */
|
|
77
|
+
.ds-input {
|
|
78
|
+
position: relative;
|
|
79
|
+
display: inline-flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
width: 100%;
|
|
82
|
+
border: 1.5px solid var(--md-sys-color-outline);
|
|
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
|
+
transition:
|
|
87
|
+
border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
88
|
+
box-shadow var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
89
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
90
|
+
}
|
|
91
|
+
.ds-input--ta { align-items: flex-start; }
|
|
92
|
+
.ds-input:focus-within {
|
|
93
|
+
border-color: var(--md-sys-color-primary);
|
|
94
|
+
box-shadow: var(--xm-state-focus-ring);
|
|
95
|
+
}
|
|
96
|
+
.ds-input.is-invalid,
|
|
97
|
+
.ds-input.is-invalid:focus-within {
|
|
98
|
+
border-color: var(--md-sys-color-inverse-on-surface);
|
|
99
|
+
border-width: 2px;
|
|
100
|
+
box-shadow: var(--xm-state-focus-ring);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.ds-input__el {
|
|
104
|
+
flex: 1;
|
|
105
|
+
min-width: 0;
|
|
106
|
+
appearance: none;
|
|
107
|
+
background: transparent;
|
|
108
|
+
border: none;
|
|
109
|
+
outline: none;
|
|
110
|
+
font: inherit;
|
|
111
|
+
font-size: 13.5px;
|
|
112
|
+
color: inherit;
|
|
113
|
+
padding: 9px var(--s-3);
|
|
114
|
+
}
|
|
115
|
+
.ds-input__el::placeholder { color: var(--xm-color-inverse-on-surface-muted); }
|
|
116
|
+
.ds-input__el.mono { font-family: var(--xm-typescale-mono-font); letter-spacing: 0; }
|
|
117
|
+
|
|
118
|
+
.ds-input__el--ta {
|
|
119
|
+
resize: vertical;
|
|
120
|
+
min-height: 78px;
|
|
121
|
+
max-height: 220px;
|
|
122
|
+
line-height: 1.5;
|
|
123
|
+
word-break: break-word;
|
|
124
|
+
white-space: pre-wrap;
|
|
125
|
+
padding: var(--s-2-5) var(--s-3);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Affix slots — left/right buttons or icons inside the input chrome.
|
|
129
|
+
Padding is removed from the side that has an affix so the inner element
|
|
130
|
+
sits flush. */
|
|
131
|
+
.ds-input__affix {
|
|
132
|
+
display: inline-flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
136
|
+
flex-shrink: 0;
|
|
137
|
+
}
|
|
138
|
+
.ds-input__affix--left { padding-left: var(--s-2-5); }
|
|
139
|
+
.ds-input__affix--right { padding-right: var(--s-1-5); }
|
|
140
|
+
.ds-input__affix--ta { align-self: flex-start; padding-top: var(--s-1-5); }
|
|
141
|
+
.ds-input__affix > button {
|
|
142
|
+
appearance: none;
|
|
143
|
+
border: none;
|
|
144
|
+
background: transparent;
|
|
145
|
+
color: inherit;
|
|
146
|
+
width: 28px; height: 28px;
|
|
147
|
+
border-radius: 6px;
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
display: inline-flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
justify-content: center;
|
|
152
|
+
}
|
|
153
|
+
.ds-input__affix > button:hover { background: var(--md-sys-color-outline-variant); }
|
|
154
|
+
|
|
155
|
+
/* on-canvas tone — for the dark sidebar/canvas */
|
|
156
|
+
.ds-input--on-canvas {
|
|
157
|
+
background: var(--md-sys-color-surface-container-lowest);
|
|
158
|
+
border-color: var(--md-sys-color-outline);
|
|
159
|
+
color: var(--md-sys-color-on-surface);
|
|
160
|
+
}
|
|
161
|
+
.ds-input--on-canvas .ds-input__el::placeholder { color: var(--xm-color-on-surface-soft); }
|
|
162
|
+
.ds-input--on-canvas:focus-within { border-color: var(--md-sys-color-primary); box-shadow: none; }
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
/* ---------- SearchInput ----------
|
|
166
|
+
Visual sibling of \`.detail-search\` in styles.css but reusable. The default
|
|
167
|
+
\`card\` tone matches the inspector's bordered card; \`on-canvas\` matches the
|
|
168
|
+
sidebar. */
|
|
169
|
+
.ds-search {
|
|
170
|
+
position: relative;
|
|
171
|
+
display: inline-flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
gap: var(--s-2);
|
|
174
|
+
width: 100%;
|
|
175
|
+
padding: var(--s-1-5) var(--s-2-5);
|
|
176
|
+
border-radius: 8px;
|
|
177
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
178
|
+
background: var(--md-sys-color-inverse-surface);
|
|
179
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
180
|
+
transition:
|
|
181
|
+
border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
182
|
+
box-shadow var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
183
|
+
}
|
|
184
|
+
.ds-search:focus-within {
|
|
185
|
+
border-color: var(--md-sys-color-primary);
|
|
186
|
+
box-shadow: var(--xm-state-focus-ring);
|
|
187
|
+
}
|
|
188
|
+
.ds-search__icon { display: inline-flex; align-items: center; }
|
|
189
|
+
.ds-search__input {
|
|
190
|
+
flex: 1;
|
|
191
|
+
min-width: 0;
|
|
192
|
+
appearance: none;
|
|
193
|
+
border: none;
|
|
194
|
+
outline: none;
|
|
195
|
+
background: transparent;
|
|
196
|
+
font-size: 13px;
|
|
197
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
198
|
+
}
|
|
199
|
+
.ds-search__input::placeholder { color: var(--xm-color-inverse-on-surface-muted); }
|
|
200
|
+
.ds-search__clear {
|
|
201
|
+
appearance: none;
|
|
202
|
+
border: none;
|
|
203
|
+
background: transparent;
|
|
204
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
padding: var(--s-0-5) var(--s-1);
|
|
207
|
+
border-radius: 4px;
|
|
208
|
+
display: inline-flex;
|
|
209
|
+
align-items: center;
|
|
210
|
+
justify-content: center;
|
|
211
|
+
}
|
|
212
|
+
.ds-search__clear:hover { color: var(--md-sys-color-inverse-on-surface); background: var(--md-sys-color-outline-variant); }
|
|
213
|
+
|
|
214
|
+
.ds-search--on-canvas {
|
|
215
|
+
background: var(--md-sys-color-surface-container-lowest);
|
|
216
|
+
border-color: var(--md-sys-color-outline);
|
|
217
|
+
color: var(--xm-color-on-surface-soft);
|
|
218
|
+
}
|
|
219
|
+
.ds-search--on-canvas .ds-search__input { color: var(--md-sys-color-on-surface); }
|
|
220
|
+
.ds-search--on-canvas .ds-search__input::placeholder { color: var(--xm-color-on-surface-soft); }
|
|
221
|
+
.ds-search--on-canvas:focus-within { border-color: var(--md-sys-color-primary); box-shadow: none; }
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
/* ---------- Link ---------- */
|
|
225
|
+
.ds-link {
|
|
226
|
+
color: var(--xm-color-primary-pressed);
|
|
227
|
+
text-decoration: underline;
|
|
228
|
+
text-decoration-thickness: 1px;
|
|
229
|
+
text-underline-offset: 3px;
|
|
230
|
+
text-decoration-skip-ink: auto;
|
|
231
|
+
transition:
|
|
232
|
+
color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
233
|
+
text-decoration-thickness var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
234
|
+
}
|
|
235
|
+
.ds-link:hover { color: var(--md-sys-color-on-primary); text-decoration-thickness: 2px; }
|
|
236
|
+
.ds-link:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; border-radius: 2px; }
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
/* ---------- IconButton ---------- */
|
|
240
|
+
.ds-icon-btn {
|
|
241
|
+
appearance: none;
|
|
242
|
+
border: none;
|
|
243
|
+
background: transparent;
|
|
244
|
+
cursor: pointer;
|
|
245
|
+
border-radius: 8px;
|
|
246
|
+
display: inline-flex;
|
|
247
|
+
align-items: center;
|
|
248
|
+
justify-content: center;
|
|
249
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
250
|
+
transition:
|
|
251
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
252
|
+
color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
253
|
+
border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
254
|
+
flex-shrink: 0;
|
|
255
|
+
}
|
|
256
|
+
.ds-icon-btn--sm { width: 24px; height: 24px; border-radius: 6px; }
|
|
257
|
+
.ds-icon-btn--md { width: 32px; height: 32px; }
|
|
258
|
+
.ds-icon-btn--lg { width: 34px; height: 34px; }
|
|
259
|
+
|
|
260
|
+
.ds-icon-btn--ghost:hover { background: var(--md-sys-color-outline-variant); color: var(--md-sys-color-inverse-on-surface); }
|
|
261
|
+
|
|
262
|
+
.ds-icon-btn--raised {
|
|
263
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
264
|
+
background: var(--md-sys-color-surface-container-low);
|
|
265
|
+
color: var(--md-sys-color-on-surface);
|
|
266
|
+
}
|
|
267
|
+
.ds-icon-btn--raised:hover {
|
|
268
|
+
background: var(--md-sys-color-surface-container-highest);
|
|
269
|
+
color: var(--md-sys-color-on-surface);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.ds-icon-btn--soft-danger { color: var(--xm-color-on-surface-soft); }
|
|
273
|
+
.ds-icon-btn--soft-danger:hover { background: var(--md-sys-color-outline-variant); color: var(--md-sys-color-inverse-on-surface); }
|
|
274
|
+
|
|
275
|
+
.ds-icon-btn[disabled] { cursor: not-allowed; opacity: 0.6; }
|
|
276
|
+
.ds-icon-btn:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
/* ---------- Switch ---------- */
|
|
280
|
+
.ds-switch {
|
|
281
|
+
display: inline-flex;
|
|
282
|
+
align-items: center;
|
|
283
|
+
gap: var(--s-2-5);
|
|
284
|
+
cursor: pointer;
|
|
285
|
+
user-select: none;
|
|
286
|
+
}
|
|
287
|
+
.ds-switch input { display: none; }
|
|
288
|
+
.ds-switch__track {
|
|
289
|
+
width: 38px; height: 22px;
|
|
290
|
+
border-radius: 999px;
|
|
291
|
+
background: var(--md-sys-color-outline);
|
|
292
|
+
position: relative;
|
|
293
|
+
transition: background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
|
|
294
|
+
flex-shrink: 0;
|
|
295
|
+
}
|
|
296
|
+
.ds-switch__thumb {
|
|
297
|
+
position: absolute;
|
|
298
|
+
top: 2px; left: 2px;
|
|
299
|
+
width: 18px; height: 18px;
|
|
300
|
+
border-radius: 50%;
|
|
301
|
+
background: var(--md-sys-color-inverse-surface);
|
|
302
|
+
box-shadow: var(--md-sys-elevation-level1);
|
|
303
|
+
transition: transform var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
|
|
304
|
+
}
|
|
305
|
+
.ds-switch input:checked + .ds-switch__track { background: var(--md-sys-color-primary); }
|
|
306
|
+
.ds-switch input:checked + .ds-switch__track .ds-switch__thumb { transform: translateX(16px); }
|
|
307
|
+
.ds-switch__label {
|
|
308
|
+
font-size: 13px;
|
|
309
|
+
font-weight: 500;
|
|
310
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
311
|
+
}
|
|
312
|
+
.ds-switch:focus-within .ds-switch__track { box-shadow: 0 0 0 3px var(--md-sys-color-primary-container); }
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
/* ---------- Pill ---------- */
|
|
316
|
+
.ds-pill {
|
|
317
|
+
appearance: none;
|
|
318
|
+
display: inline-flex;
|
|
319
|
+
align-items: center;
|
|
320
|
+
gap: var(--s-1-5);
|
|
321
|
+
border: 1px solid transparent;
|
|
322
|
+
background: transparent;
|
|
323
|
+
color: var(--md-sys-color-on-surface);
|
|
324
|
+
border-radius: var(--md-sys-shape-corner-full);
|
|
325
|
+
cursor: pointer;
|
|
326
|
+
font: inherit;
|
|
327
|
+
line-height: 1;
|
|
328
|
+
white-space: nowrap;
|
|
329
|
+
transition:
|
|
330
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
331
|
+
color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
332
|
+
border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
333
|
+
}
|
|
334
|
+
.ds-pill--sm { font-size: 11.5px; padding: 5px var(--s-2-5); }
|
|
335
|
+
.ds-pill--md { font-size: 13px; padding: var(--s-2) var(--s-3-5); }
|
|
336
|
+
|
|
337
|
+
.ds-pill--neutral {
|
|
338
|
+
border-color: var(--md-sys-color-outline);
|
|
339
|
+
background: var(--md-sys-color-surface-container-lowest);
|
|
340
|
+
color: var(--md-sys-color-on-surface);
|
|
341
|
+
}
|
|
342
|
+
.ds-pill--neutral:hover {
|
|
343
|
+
background: var(--md-sys-color-surface-container-low);
|
|
344
|
+
border-color: var(--md-sys-color-outline);
|
|
345
|
+
}
|
|
346
|
+
.ds-pill--neutral.is-selected,
|
|
347
|
+
.ds-pill--accent {
|
|
348
|
+
border-color: var(--xm-color-primary-pressed);
|
|
349
|
+
background: var(--md-sys-color-primary-container);
|
|
350
|
+
color: var(--md-sys-color-on-primary);
|
|
351
|
+
}
|
|
352
|
+
.ds-pill--accent:hover { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
|
|
353
|
+
|
|
354
|
+
.ds-pill[disabled] { cursor: not-allowed; opacity: 0.55; }
|
|
355
|
+
.ds-pill:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
/* ---------- Badge ----------
|
|
359
|
+
Variant \`soft\` is the default tinted background, \`solid\` fills with the
|
|
360
|
+
tone color. \`method\` and \`ext\` use the existing method/ext token sets. */
|
|
361
|
+
.ds-badge {
|
|
362
|
+
display: inline-flex;
|
|
363
|
+
align-items: center;
|
|
364
|
+
gap: var(--s-1);
|
|
365
|
+
font-size: 10px;
|
|
366
|
+
font-weight: 600;
|
|
367
|
+
padding: var(--s-0-5) 7px;
|
|
368
|
+
border-radius: 4px;
|
|
369
|
+
letter-spacing: 0.04em;
|
|
370
|
+
flex-shrink: 0;
|
|
371
|
+
line-height: 1.4;
|
|
372
|
+
font-feature-settings: "tnum";
|
|
373
|
+
}
|
|
374
|
+
.ds-badge--sm { font-size: 9.5px; padding: var(--s-0-5) 5px; letter-spacing: 0.05em; }
|
|
375
|
+
.ds-badge--md { /* default */ }
|
|
376
|
+
.ds-badge--lg { font-size: 11.5px; padding: 3px var(--s-2); }
|
|
377
|
+
|
|
378
|
+
.ds-badge.mono { font-family: var(--xm-typescale-mono-font); }
|
|
379
|
+
|
|
380
|
+
/* soft variant */
|
|
381
|
+
.ds-badge--soft.ds-badge--neutral { background: var(--md-sys-color-outline-variant); color: var(--xm-color-inverse-on-surface-muted); }
|
|
382
|
+
.ds-badge--soft.ds-badge--accent { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary); }
|
|
383
|
+
|
|
384
|
+
/* solid variant */
|
|
385
|
+
.ds-badge--solid.ds-badge--neutral { background: var(--xm-color-inverse-on-surface-muted); color: var(--md-sys-color-inverse-surface); }
|
|
386
|
+
.ds-badge--solid.ds-badge--accent { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
|
|
387
|
+
|
|
388
|
+
/* method variant — children carry the lowercased method name; consumers
|
|
389
|
+
pass \`tone\` matching: get / post / put / delete / patch */
|
|
390
|
+
.ds-badge--method { font-family: var(--xm-typescale-mono-font); text-transform: uppercase; }
|
|
391
|
+
.ds-badge--method.ds-badge--get { background: var(--xm-method-get-bg); color: var(--xm-method-get-ink); }
|
|
392
|
+
.ds-badge--method.ds-badge--post { background: var(--xm-method-post-bg); color: var(--xm-method-post-ink); }
|
|
393
|
+
.ds-badge--method.ds-badge--put { background: var(--xm-method-put-bg); color: var(--xm-method-put-ink); }
|
|
394
|
+
.ds-badge--method.ds-badge--delete { background: var(--xm-method-delete-bg); color: var(--xm-method-delete-ink); }
|
|
395
|
+
.ds-badge--method.ds-badge--patch { background: var(--xm-method-patch-bg); color: var(--xm-method-patch-ink); }
|
|
396
|
+
|
|
397
|
+
/* ext variant */
|
|
398
|
+
.ds-badge--ext { font-family: var(--xm-typescale-mono-font); text-transform: uppercase; font-size: 9.5px; padding: 3px var(--s-1-5); letter-spacing: 0.05em; font-weight: 700; }
|
|
399
|
+
.ds-badge--ext.ds-badge--yml,
|
|
400
|
+
.ds-badge--ext.ds-badge--yaml { background: var(--xm-ext-yml-bg); color: var(--xm-ext-yml-ink); }
|
|
401
|
+
.ds-badge--ext.ds-badge--json { background: var(--xm-ext-json-bg); color: var(--xm-ext-json-ink); }
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
/* ---------- Kbd ---------- */
|
|
405
|
+
.ds-kbd {
|
|
406
|
+
display: inline-flex;
|
|
407
|
+
align-items: center;
|
|
408
|
+
font-family: var(--xm-typescale-mono-font);
|
|
409
|
+
font-size: 11px;
|
|
410
|
+
padding: var(--s-0-5) var(--s-1-5);
|
|
411
|
+
border-radius: 4px;
|
|
412
|
+
background: var(--md-sys-color-surface-container-high);
|
|
413
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
414
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
415
|
+
font-feature-settings: "tnum";
|
|
416
|
+
}
|
|
417
|
+
.ds-kbd--accent {
|
|
418
|
+
background: color-mix(in oklch, var(--md-sys-color-primary-container) 50%, transparent);
|
|
419
|
+
color: var(--md-sys-color-on-primary);
|
|
420
|
+
border-color: transparent;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
/* ---------- Divider ---------- */
|
|
425
|
+
.ds-divider { height: 1px; width: 100%; }
|
|
426
|
+
.ds-divider--card { background: var(--md-sys-color-outline-variant); }
|
|
427
|
+
.ds-divider--canvas { background: var(--md-sys-color-outline); }
|
|
428
|
+
.ds-divider--strong { background: var(--md-sys-color-outline); }
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
/* ---------- Dot ---------- */
|
|
432
|
+
.ds-dot { display: inline-block; border-radius: 50%; flex-shrink: 0; }
|
|
433
|
+
.ds-dot--accent { background: var(--md-sys-color-primary); }
|
|
434
|
+
.ds-dot--muted { background: var(--xm-color-inverse-on-surface-muted); }
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
/* ---------- Sep — middot inline metadata divider ----------
|
|
438
|
+
Used between inline metadata fragments, e.g. "Document · MD" or
|
|
439
|
+
"12:30 · 4 KB". The element renders as a styled middot character;
|
|
440
|
+
pass it the literal "·" as children. Opacity is applied so the
|
|
441
|
+
ink reads softer than its surrounding text on either surface. */
|
|
442
|
+
.ds-sep { opacity: 0.5; }
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
/* ---------- TabBar ---------- */
|
|
446
|
+
.ds-tabs {
|
|
447
|
+
display: flex;
|
|
448
|
+
gap: var(--s-0-5);
|
|
449
|
+
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
450
|
+
}
|
|
451
|
+
.ds-tab {
|
|
452
|
+
appearance: none;
|
|
453
|
+
background: transparent;
|
|
454
|
+
border: none;
|
|
455
|
+
padding: var(--s-2) var(--s-3) var(--s-2-5);
|
|
456
|
+
font-size: 13px;
|
|
457
|
+
font-weight: 500;
|
|
458
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
459
|
+
cursor: pointer;
|
|
460
|
+
border-bottom: 2px solid transparent;
|
|
461
|
+
margin-bottom: -1px;
|
|
462
|
+
display: inline-flex;
|
|
463
|
+
align-items: center;
|
|
464
|
+
gap: var(--s-1-5);
|
|
465
|
+
transition:
|
|
466
|
+
color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
467
|
+
border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
468
|
+
}
|
|
469
|
+
.ds-tab:hover { color: var(--md-sys-color-inverse-on-surface); }
|
|
470
|
+
.ds-tab.is-active {
|
|
471
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
472
|
+
border-bottom-color: var(--xm-color-primary-pressed);
|
|
473
|
+
}
|
|
474
|
+
.ds-tab__count {
|
|
475
|
+
font-size: 11px;
|
|
476
|
+
background: var(--md-sys-color-outline-variant);
|
|
477
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
478
|
+
padding: 1px var(--s-1-5);
|
|
479
|
+
border-radius: 99px;
|
|
480
|
+
font-feature-settings: "tnum";
|
|
481
|
+
}
|
|
482
|
+
.ds-tab.is-active .ds-tab__count { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary); }
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
/* ---------- Drawer / on-canvas overrides (applied where a primitive
|
|
486
|
+
lives on a dark surface — sidebar or settings drawer) ----------
|
|
487
|
+
Mirrors the existing drawer overrides in styles.css for the legacy
|
|
488
|
+
classes, so a \`<Field>\` or \`<Switch>\` dropped into the drawer reads
|
|
489
|
+
correctly in the dark theme. */
|
|
490
|
+
:root[data-theme="dark"] .drawer .ds-label,
|
|
491
|
+
:root[data-theme="dark"] .drawer .ds-hint--muted {
|
|
492
|
+
color: var(--md-sys-color-on-surface);
|
|
493
|
+
}
|
|
494
|
+
:root[data-theme="dark"] .drawer .ds-input--card {
|
|
495
|
+
background: var(--md-sys-color-surface-container-low);
|
|
496
|
+
border-color: var(--md-sys-color-outline);
|
|
497
|
+
color: var(--md-sys-color-on-surface);
|
|
498
|
+
}
|
|
499
|
+
:root[data-theme="dark"] .drawer .ds-input--card .ds-input__el::placeholder {
|
|
500
|
+
color: var(--xm-color-on-surface-soft);
|
|
501
|
+
}
|
|
502
|
+
:root[data-theme="dark"] .drawer .ds-input--card:focus-within {
|
|
503
|
+
border-color: var(--md-sys-color-primary);
|
|
504
|
+
box-shadow: none;
|
|
505
|
+
}
|
|
506
|
+
:root[data-theme="dark"] .drawer .ds-input__affix > button { color: var(--xm-color-on-surface-soft); }
|
|
507
|
+
:root[data-theme="dark"] .drawer .ds-input__affix > button:hover {
|
|
508
|
+
background: var(--md-sys-color-surface-container-highest);
|
|
509
|
+
color: var(--md-sys-color-on-surface);
|
|
510
|
+
}
|
|
511
|
+
:root[data-theme="dark"] .drawer .ds-switch__track { background: var(--md-sys-color-surface-container-highest); }
|
|
512
|
+
:root[data-theme="dark"] .drawer .ds-switch__label { color: var(--md-sys-color-on-surface); }
|
|
513
|
+
:root[data-theme="dark"] .drawer .ds-divider--card { background: var(--md-sys-color-outline); }
|
|
514
|
+
|
|
515
|
+
}`);
|
|
516
|
+
sheets = [sheet];
|
|
517
|
+
}
|
|
518
|
+
export default sheets;
|
|
@@ -3,6 +3,7 @@ import type { TemplateResult } from "lit";
|
|
|
3
3
|
export type ProgressVariant = "linear" | "circular";
|
|
4
4
|
export type ProgressSize = "xs" | "sm" | "md" | "lg";
|
|
5
5
|
export declare class XmProgress extends LitElement {
|
|
6
|
+
static styles: CSSStyleSheet[];
|
|
6
7
|
variant: ProgressVariant;
|
|
7
8
|
value: number;
|
|
8
9
|
indeterminate: boolean;
|
|
@@ -38,7 +38,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
38
38
|
};
|
|
39
39
|
import { LitElement, html, svg, nothing } from "lit";
|
|
40
40
|
import { customElement, property } from "lit/decorators.js";
|
|
41
|
-
|
|
41
|
+
import progressSheets from "./index.styles.js";
|
|
42
42
|
// SVG ring geometry per size — diameter and stroke. The viewBox is fixed at
|
|
43
43
|
// 24×24; the stroke + radius scale within it, and the host CSS sizes the svg.
|
|
44
44
|
const RING_STROKE = {
|
|
@@ -57,6 +57,9 @@ let XmProgress = class XmProgress extends LitElement {
|
|
|
57
57
|
this.label = "";
|
|
58
58
|
this.showLabel = false;
|
|
59
59
|
}
|
|
60
|
+
// Adopted from the build-generated sheets (scripts/gen-styles.mjs) — no
|
|
61
|
+
// runtime URL fetch (ADR 0012). Cascade order preserved from the old <link>s.
|
|
62
|
+
static { this.styles = [...progressSheets]; }
|
|
60
63
|
get _isDeterminate() {
|
|
61
64
|
return !this.indeterminate && Number.isFinite(this.value);
|
|
62
65
|
}
|
|
@@ -78,7 +81,6 @@ let XmProgress = class XmProgress extends LitElement {
|
|
|
78
81
|
}
|
|
79
82
|
: { "aria-busy": "true" };
|
|
80
83
|
return html `
|
|
81
|
-
<link rel="stylesheet" href="${PROGRESS_CSS}" />
|
|
82
84
|
<style>
|
|
83
85
|
:host { display: inline-flex; }
|
|
84
86
|
:host([variant="linear"]) { display: block; }
|