@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,562 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/composer/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
|
+
Composer — canonical chat composer
|
|
12
|
+
Visual + behavior matches preview/composer.html
|
|
13
|
+
Pairs with components/composer/index.jsx.
|
|
14
|
+
References --md-sys-* / --xm-* tokens only.
|
|
15
|
+
|
|
16
|
+
Two BEM blocks live here:
|
|
17
|
+
.composer — the input card (toolbar, field, send/stop)
|
|
18
|
+
.att — attachment system (chips, cards, tray, bundle)
|
|
19
|
+
kept as a separate block because the artifact
|
|
20
|
+
chip in <Bubble> reuses .att-card without the
|
|
21
|
+
composer chrome.
|
|
22
|
+
============================================ */
|
|
23
|
+
|
|
24
|
+
/* Outer wrap — stacks the composer card and the transparent
|
|
25
|
+
\`.composer-shell__bottom\` hint strip beneath it. */
|
|
26
|
+
.composer-shell {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
background: var(--md-sys-color-surface);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.composer {
|
|
33
|
+
background: var(--md-sys-color-surface-container-high);
|
|
34
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
35
|
+
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
36
|
+
padding: var(--s-5);
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: var(--s-3);
|
|
40
|
+
min-height: 88px;
|
|
41
|
+
transition:
|
|
42
|
+
border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
43
|
+
box-shadow var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
44
|
+
box-shadow: var(--md-sys-elevation-level0);
|
|
45
|
+
cursor: text;
|
|
46
|
+
}
|
|
47
|
+
.composer button,
|
|
48
|
+
.composer xm-button,
|
|
49
|
+
.composer a {
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
}
|
|
52
|
+
.composer button[disabled],
|
|
53
|
+
.composer xm-button[disabled] {
|
|
54
|
+
cursor: not-allowed;
|
|
55
|
+
}
|
|
56
|
+
.composer:hover {
|
|
57
|
+
border-color: var(--md-sys-color-outline);
|
|
58
|
+
}
|
|
59
|
+
.composer:focus-within {
|
|
60
|
+
border-color: var(--md-sys-color-outline);
|
|
61
|
+
box-shadow: var(--xm-state-focus-ring), var(--md-sys-elevation-level0);
|
|
62
|
+
}
|
|
63
|
+
.composer--dragging {
|
|
64
|
+
border-color: var(--md-sys-color-primary);
|
|
65
|
+
box-shadow:
|
|
66
|
+
0 0 0 3px color-mix(in oklab, var(--md-sys-color-primary) 22%, transparent),
|
|
67
|
+
var(--md-sys-elevation-level0);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.composer__field {
|
|
71
|
+
border: 0;
|
|
72
|
+
background: transparent;
|
|
73
|
+
color: var(--md-sys-color-on-surface);
|
|
74
|
+
font:
|
|
75
|
+
var(--md-sys-typescale-body-large-weight)
|
|
76
|
+
var(--md-sys-typescale-body-large-size) /
|
|
77
|
+
var(--md-sys-typescale-body-large-line-height)
|
|
78
|
+
var(--md-sys-typescale-body-large-font);
|
|
79
|
+
padding: var(--s-0-5) var(--s-0-5) 0;
|
|
80
|
+
min-height: 22px;
|
|
81
|
+
max-height: 240px;
|
|
82
|
+
outline: none;
|
|
83
|
+
resize: none;
|
|
84
|
+
width: 100%;
|
|
85
|
+
overflow-y: auto;
|
|
86
|
+
}
|
|
87
|
+
.composer__field::placeholder { color: var(--xm-color-on-surface-soft); }
|
|
88
|
+
|
|
89
|
+
.composer__toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-1-5); }
|
|
90
|
+
.composer__toolbar-left,
|
|
91
|
+
.composer__toolbar-right { display: flex; align-items: center; gap: var(--s-1-5); }
|
|
92
|
+
|
|
93
|
+
/* Inner shape used by the Stop xm-button — a 9px filled square that
|
|
94
|
+
reads as the universal "stop" affordance inside the button chip. */
|
|
95
|
+
.composer__stop-icon { display: inline-block; width: 9px; height: 9px; background: currentColor; border-radius: 1px; }
|
|
96
|
+
|
|
97
|
+
.composer__hint {
|
|
98
|
+
font: 500 10px/1 var(--xm-typescale-mono-font);
|
|
99
|
+
color: var(--md-sys-color-on-surface);
|
|
100
|
+
text-transform: uppercase;
|
|
101
|
+
letter-spacing: 0.06em;
|
|
102
|
+
display: inline-flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
gap: var(--s-1-5);
|
|
105
|
+
}
|
|
106
|
+
.composer__hint kbd {
|
|
107
|
+
display: inline-block;
|
|
108
|
+
padding: 1px var(--s-1);
|
|
109
|
+
font: 600 9px/1 var(--xm-typescale-mono-font);
|
|
110
|
+
color: var(--md-sys-color-on-surface);
|
|
111
|
+
background: var(--md-sys-color-surface-container);
|
|
112
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
113
|
+
border-bottom-width: 2px;
|
|
114
|
+
border-radius: 4px;
|
|
115
|
+
margin: 0 1px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Transparent strip that hosts the keyboard-shortcut hint below the
|
|
119
|
+
composer card. Sits inside the chat shell's \`.chat-shell__composer\`, but is
|
|
120
|
+
rendered by <Composer> so standalone previews get it too. */
|
|
121
|
+
.composer-shell__bottom {
|
|
122
|
+
background: transparent;
|
|
123
|
+
display: flex;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
padding: var(--s-2) var(--s-1) 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.composer__counter {
|
|
129
|
+
font: 500 11px/1 var(--xm-typescale-mono-font);
|
|
130
|
+
color: var(--xm-color-on-surface-soft);
|
|
131
|
+
font-feature-settings: "tnum";
|
|
132
|
+
}
|
|
133
|
+
.composer__counter--warn { color: var(--md-sys-color-on-surface); }
|
|
134
|
+
.composer__counter--over { color: var(--md-sys-color-on-surface); font-weight: 700; }
|
|
135
|
+
|
|
136
|
+
/* Thinking pill */
|
|
137
|
+
.composer__thinking {
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
gap: var(--s-3);
|
|
141
|
+
padding: var(--s-2-5) var(--s-3-5);
|
|
142
|
+
border-radius: 10px;
|
|
143
|
+
background: color-mix(in oklab, var(--md-sys-color-primary-container) 70%, var(--md-sys-color-surface-container-low) 30%);
|
|
144
|
+
color: var(--md-sys-color-on-primary-container);
|
|
145
|
+
font: 500 13px/1 var(--md-sys-typescale-body-large-font);
|
|
146
|
+
}
|
|
147
|
+
.composer__thinking-dots { display: inline-flex; gap: var(--s-1); flex-shrink: 0; }
|
|
148
|
+
.composer__thinking-dot {
|
|
149
|
+
width: 6px; height: 6px;
|
|
150
|
+
border-radius: 50%;
|
|
151
|
+
background: color-mix(in oklab, var(--md-sys-color-primary) 65%, var(--md-sys-color-surface-container-low) 35%);
|
|
152
|
+
animation: thinkingPulse 1.2s ease-in-out infinite;
|
|
153
|
+
}
|
|
154
|
+
.composer__thinking-dot:nth-child(2) { animation-delay: 0.18s; }
|
|
155
|
+
.composer__thinking-dot:nth-child(3) { animation-delay: 0.36s; }
|
|
156
|
+
@keyframes thinkingPulse {
|
|
157
|
+
0%, 80%, 100% { opacity: 0.35; transform: scale(0.85); }
|
|
158
|
+
40% { opacity: 1; transform: scale(1.1); }
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* ============================================
|
|
162
|
+
Attachments — block: .att
|
|
163
|
+
============================================ */
|
|
164
|
+
.att {
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
gap: var(--s-2);
|
|
168
|
+
padding: 0 var(--s-0-5) var(--s-0-5);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.att__header {
|
|
172
|
+
display: flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
justify-content: space-between;
|
|
175
|
+
gap: var(--s-3);
|
|
176
|
+
font: 500 11px/1 var(--xm-typescale-mono-font);
|
|
177
|
+
color: var(--xm-color-on-surface-soft);
|
|
178
|
+
text-transform: uppercase;
|
|
179
|
+
letter-spacing: 0.06em;
|
|
180
|
+
padding: 0 var(--s-0-5);
|
|
181
|
+
}
|
|
182
|
+
.att__header-left { display: inline-flex; align-items: center; gap: var(--s-2); font-feature-settings: "tnum"; }
|
|
183
|
+
.att__pip {
|
|
184
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
185
|
+
height: 18px; min-width: 18px; padding: 0 5px;
|
|
186
|
+
border-radius: 999px;
|
|
187
|
+
background: var(--md-sys-color-outline);
|
|
188
|
+
color: var(--md-sys-color-on-surface);
|
|
189
|
+
font: 600 10px/1 var(--xm-typescale-mono-font);
|
|
190
|
+
letter-spacing: 0.04em;
|
|
191
|
+
}
|
|
192
|
+
.att__header-right { display: inline-flex; align-items: center; gap: var(--s-3); }
|
|
193
|
+
|
|
194
|
+
.att__link {
|
|
195
|
+
background: none; border: 0; padding: 0;
|
|
196
|
+
font: 500 11px/1 var(--xm-typescale-mono-font);
|
|
197
|
+
color: var(--xm-color-on-surface-soft);
|
|
198
|
+
text-transform: uppercase;
|
|
199
|
+
letter-spacing: 0.06em;
|
|
200
|
+
cursor: pointer;
|
|
201
|
+
}
|
|
202
|
+
.att__link:hover { color: var(--md-sys-color-on-surface); }
|
|
203
|
+
|
|
204
|
+
/* Card grid */
|
|
205
|
+
.att__grid {
|
|
206
|
+
display: flex;
|
|
207
|
+
flex-direction: row;
|
|
208
|
+
gap: var(--s-2-5);
|
|
209
|
+
overflow-x: auto;
|
|
210
|
+
overflow-y: hidden;
|
|
211
|
+
padding: var(--s-0-5) var(--s-0-5) var(--s-2);
|
|
212
|
+
scrollbar-width: thin;
|
|
213
|
+
scroll-snap-type: x proximity;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.att-card {
|
|
217
|
+
position: relative;
|
|
218
|
+
flex-shrink: 0;
|
|
219
|
+
width: 150px;
|
|
220
|
+
height: 150px;
|
|
221
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
222
|
+
background: var(--md-sys-color-inverse-surface);
|
|
223
|
+
border-radius: 10px;
|
|
224
|
+
overflow: hidden;
|
|
225
|
+
display: flex;
|
|
226
|
+
flex-direction: column;
|
|
227
|
+
transition:
|
|
228
|
+
border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
229
|
+
box-shadow var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
230
|
+
scroll-snap-align: start;
|
|
231
|
+
}
|
|
232
|
+
.att-card:hover { border-color: var(--md-sys-color-outline); }
|
|
233
|
+
|
|
234
|
+
.att-card--media .att-card__media {
|
|
235
|
+
position: absolute; inset: 0;
|
|
236
|
+
background-size: cover;
|
|
237
|
+
background-position: top center;
|
|
238
|
+
background-color: var(--md-sys-color-surface-container-high);
|
|
239
|
+
}
|
|
240
|
+
.att-card--media .att-card__ext {
|
|
241
|
+
position: absolute;
|
|
242
|
+
left: var(--s-2); bottom: var(--s-2);
|
|
243
|
+
padding: 3px 7px;
|
|
244
|
+
border-radius: 4px;
|
|
245
|
+
background: var(--xm-photo-overlay);
|
|
246
|
+
color: var(--xm-photo-overlay-ink);
|
|
247
|
+
font: 600 10px/1 var(--xm-typescale-mono-font);
|
|
248
|
+
letter-spacing: 0.08em;
|
|
249
|
+
text-transform: uppercase;
|
|
250
|
+
backdrop-filter: blur(4px);
|
|
251
|
+
}
|
|
252
|
+
.att-card--media .att-card__meta {
|
|
253
|
+
position: absolute;
|
|
254
|
+
right: var(--s-2); bottom: var(--s-2);
|
|
255
|
+
padding: 3px 7px;
|
|
256
|
+
border-radius: 4px;
|
|
257
|
+
background: var(--xm-photo-overlay);
|
|
258
|
+
color: var(--xm-photo-overlay-ink);
|
|
259
|
+
font: 500 10px/1 var(--xm-typescale-mono-font);
|
|
260
|
+
letter-spacing: 0.04em;
|
|
261
|
+
backdrop-filter: blur(4px);
|
|
262
|
+
font-feature-settings: "tnum";
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.att-card--text {
|
|
266
|
+
background: var(--md-sys-color-surface-container-high);
|
|
267
|
+
padding: var(--s-3-5) var(--s-3) var(--s-3);
|
|
268
|
+
justify-content: flex-start;
|
|
269
|
+
}
|
|
270
|
+
.att-card--text .att-card__name {
|
|
271
|
+
font: 500 13px/1.3 var(--md-sys-typescale-body-large-font);
|
|
272
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
273
|
+
word-break: break-word;
|
|
274
|
+
display: -webkit-box;
|
|
275
|
+
-webkit-line-clamp: 3;
|
|
276
|
+
-webkit-box-orient: vertical;
|
|
277
|
+
overflow: hidden;
|
|
278
|
+
margin-right: var(--s-5-5);
|
|
279
|
+
}
|
|
280
|
+
.att-card--text .att-card__sub {
|
|
281
|
+
margin-top: var(--s-2);
|
|
282
|
+
display: flex;
|
|
283
|
+
flex-direction: column;
|
|
284
|
+
gap: var(--s-1-5);
|
|
285
|
+
font: 400 11px/1.2 var(--xm-typescale-mono-font);
|
|
286
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
287
|
+
font-feature-settings: "tnum";
|
|
288
|
+
}
|
|
289
|
+
.att-card--text .att-card__sub-primary { color: var(--md-sys-color-inverse-on-surface); font-weight: 500; }
|
|
290
|
+
.att-card--text .att-card__sub-secondary { color: var(--xm-color-inverse-on-surface-muted); font-size: 10.5px; }
|
|
291
|
+
.att-card--text .att-card__ext {
|
|
292
|
+
position: absolute;
|
|
293
|
+
left: var(--s-2-5); bottom: var(--s-2-5);
|
|
294
|
+
padding: 3px 7px;
|
|
295
|
+
border-radius: 4px;
|
|
296
|
+
background: color-mix(in oklab, var(--md-sys-color-inverse-on-surface) 8%, transparent);
|
|
297
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
298
|
+
font: 600 10px/1 var(--xm-typescale-mono-font);
|
|
299
|
+
letter-spacing: 0.08em;
|
|
300
|
+
text-transform: uppercase;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* ----- Row variant (used in bubbles to reference an artifact) -----
|
|
304
|
+
Lives inside a bot bubble that rides \`surface\`, so this variant
|
|
305
|
+
uses the on-surface family (POLICIES rule 7a) — not the inverse-on-
|
|
306
|
+
surface ink that .att-card--text uses inside the composer (which
|
|
307
|
+
sits on inverse-surface). The primitives flip in light theme via
|
|
308
|
+
_primitives.css, so a single rule covers both modes. */
|
|
309
|
+
.att-card--text-row {
|
|
310
|
+
width: 100%;
|
|
311
|
+
height: auto;
|
|
312
|
+
margin-top: var(--s-2-5);
|
|
313
|
+
flex-direction: row;
|
|
314
|
+
align-items: center;
|
|
315
|
+
gap: var(--s-3);
|
|
316
|
+
padding: var(--s-2-5) var(--s-3);
|
|
317
|
+
background: var(--md-sys-color-surface-container-low);
|
|
318
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
319
|
+
color: var(--md-sys-color-on-surface);
|
|
320
|
+
/* Reset native <button> chrome — the chip is rendered as a button
|
|
321
|
+
so it can be activated by keyboard, but it must not paint a UA
|
|
322
|
+
focus ring that fights the design system. */
|
|
323
|
+
appearance: none;
|
|
324
|
+
font: inherit;
|
|
325
|
+
text-align: left;
|
|
326
|
+
cursor: pointer;
|
|
327
|
+
outline: none;
|
|
328
|
+
transition:
|
|
329
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
330
|
+
border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
331
|
+
}
|
|
332
|
+
.att-card--text-row:hover {
|
|
333
|
+
background: var(--md-sys-color-surface-container);
|
|
334
|
+
border-color: var(--xm-color-on-surface-soft);
|
|
335
|
+
}
|
|
336
|
+
.att-card--text-row:focus-visible {
|
|
337
|
+
border-color: var(--xm-color-on-surface-soft);
|
|
338
|
+
box-shadow: var(--xm-state-focus-ring);
|
|
339
|
+
}
|
|
340
|
+
.att-card--text-row .att-card__name {
|
|
341
|
+
margin: 0;
|
|
342
|
+
-webkit-line-clamp: 1;
|
|
343
|
+
white-space: nowrap;
|
|
344
|
+
overflow: hidden;
|
|
345
|
+
text-overflow: ellipsis;
|
|
346
|
+
color: var(--md-sys-color-on-surface);
|
|
347
|
+
}
|
|
348
|
+
/* Folded-corner document tile — a tilted card with a clipped
|
|
349
|
+
top-right corner so the chip's leading slot reads as a doc icon
|
|
350
|
+
rather than a generic square. Uses tokens only; the corner is
|
|
351
|
+
carved with clip-path on the tile and a tiny pseudo-element fold.
|
|
352
|
+
The translucent on-surface wash auto-flips per theme: lighter than
|
|
353
|
+
the chip surface in dark, darker than it in light. */
|
|
354
|
+
.att-card--text-row .att-card__icon {
|
|
355
|
+
position: relative;
|
|
356
|
+
width: 40px; height: 44px;
|
|
357
|
+
flex-shrink: 0;
|
|
358
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
359
|
+
background: color-mix(in oklab, var(--md-sys-color-on-surface) 18%, transparent);
|
|
360
|
+
border: 1px solid color-mix(in oklab, var(--md-sys-color-on-surface) 26%, transparent);
|
|
361
|
+
border-radius: 4px;
|
|
362
|
+
color: var(--md-sys-color-on-surface);
|
|
363
|
+
transform: rotate(-4deg);
|
|
364
|
+
box-shadow: var(--md-sys-elevation-level0);
|
|
365
|
+
--fold: 10px;
|
|
366
|
+
clip-path: polygon(
|
|
367
|
+
0 0,
|
|
368
|
+
calc(100% - var(--fold)) 0,
|
|
369
|
+
100% var(--fold),
|
|
370
|
+
100% 100%,
|
|
371
|
+
0 100%
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
.att-card--text-row .att-card__icon::after {
|
|
375
|
+
content: "";
|
|
376
|
+
position: absolute;
|
|
377
|
+
top: 0; right: 0;
|
|
378
|
+
width: var(--fold);
|
|
379
|
+
height: var(--fold);
|
|
380
|
+
background: color-mix(in oklab, var(--md-sys-color-on-surface) 32%, transparent);
|
|
381
|
+
clip-path: polygon(0 0, 100% 100%, 0 100%);
|
|
382
|
+
}
|
|
383
|
+
.att-card--text-row .att-card__icon svg {
|
|
384
|
+
position: relative;
|
|
385
|
+
z-index: 1;
|
|
386
|
+
}
|
|
387
|
+
.att-card--text-row .att-card__body {
|
|
388
|
+
flex: 1;
|
|
389
|
+
min-width: 0;
|
|
390
|
+
display: flex;
|
|
391
|
+
flex-direction: column;
|
|
392
|
+
gap: var(--s-0-5);
|
|
393
|
+
}
|
|
394
|
+
.att-card--text-row .att-card__sub {
|
|
395
|
+
margin-top: 0;
|
|
396
|
+
flex-direction: row;
|
|
397
|
+
gap: var(--s-1-5);
|
|
398
|
+
align-items: center;
|
|
399
|
+
flex-wrap: nowrap;
|
|
400
|
+
white-space: nowrap;
|
|
401
|
+
color: var(--xm-color-on-surface-soft);
|
|
402
|
+
}
|
|
403
|
+
.att-card--text-row .att-card__sub .ds-sep { opacity: 0.5; }
|
|
404
|
+
.att-card--text-row .att-card__action {
|
|
405
|
+
flex-shrink: 0;
|
|
406
|
+
display: inline-flex;
|
|
407
|
+
align-items: center;
|
|
408
|
+
gap: var(--s-2);
|
|
409
|
+
}
|
|
410
|
+
.att-card__x {
|
|
411
|
+
position: absolute;
|
|
412
|
+
top: var(--s-1-5); right: var(--s-1-5);
|
|
413
|
+
width: 22px; height: 22px;
|
|
414
|
+
border-radius: 999px;
|
|
415
|
+
border: none;
|
|
416
|
+
background: color-mix(in oklab, var(--md-sys-color-inverse-surface) 88%, transparent);
|
|
417
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
418
|
+
cursor: pointer;
|
|
419
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
420
|
+
box-shadow: 0 0 0 1px var(--md-sys-color-outline-variant);
|
|
421
|
+
backdrop-filter: blur(4px);
|
|
422
|
+
transition:
|
|
423
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
424
|
+
color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
425
|
+
}
|
|
426
|
+
.att-card__x:hover { background: var(--md-sys-color-inverse-on-surface); color: var(--md-sys-color-inverse-surface); box-shadow: 0 0 0 1px var(--md-sys-color-inverse-on-surface); }
|
|
427
|
+
|
|
428
|
+
/* Bundle chip + tray */
|
|
429
|
+
.att__bundle {
|
|
430
|
+
display: inline-flex;
|
|
431
|
+
align-items: center;
|
|
432
|
+
gap: var(--s-2-5);
|
|
433
|
+
height: 44px;
|
|
434
|
+
padding: 0 var(--s-3);
|
|
435
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
436
|
+
background: var(--md-sys-color-surface-container-high);
|
|
437
|
+
border-radius: 8px;
|
|
438
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
439
|
+
font: 500 12px/1 var(--md-sys-typescale-body-large-font);
|
|
440
|
+
cursor: pointer;
|
|
441
|
+
transition: border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
442
|
+
align-self: flex-start;
|
|
443
|
+
}
|
|
444
|
+
.att__bundle:hover { border-color: var(--md-sys-color-outline); }
|
|
445
|
+
.att__bundle-stack { position: relative; width: 28px; height: 28px; flex-shrink: 0; }
|
|
446
|
+
.att__bundle-stack span {
|
|
447
|
+
position: absolute; inset: 0;
|
|
448
|
+
border-radius: 5px;
|
|
449
|
+
background: var(--md-sys-color-surface-container-high);
|
|
450
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
451
|
+
}
|
|
452
|
+
.att__bundle-stack span:nth-child(1) { transform: translate(4px, -3px) rotate(6deg); opacity: 0.5; }
|
|
453
|
+
.att__bundle-stack span:nth-child(2) { transform: translate(2px, -1px) rotate(3deg); opacity: 0.75; }
|
|
454
|
+
.att__bundle-stack span:nth-child(3) {
|
|
455
|
+
background: var(--md-sys-color-surface-container-high);
|
|
456
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
457
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
458
|
+
}
|
|
459
|
+
[data-theme="dark"] .att__bundle-stack span:nth-child(3) {
|
|
460
|
+
background: var(--md-sys-color-surface-container-low);
|
|
461
|
+
color: var(--md-sys-color-on-surface);
|
|
462
|
+
}
|
|
463
|
+
.att__bundle-meta { display: flex; flex-direction: column; gap: 3px; }
|
|
464
|
+
.att__bundle-name { font: 500 12px/1 var(--md-sys-typescale-body-large-font); color: var(--md-sys-color-inverse-on-surface); }
|
|
465
|
+
.att__bundle-sub { font: 400 10.5px/1 var(--xm-typescale-mono-font); color: var(--xm-color-inverse-on-surface-muted); font-feature-settings: "tnum"; }
|
|
466
|
+
.att__bundle-caret { color: var(--xm-color-inverse-on-surface-muted); margin-left: var(--s-1); display: inline-flex; }
|
|
467
|
+
.att__bundle[aria-expanded="true"] .att__bundle-caret { transform: rotate(180deg); }
|
|
468
|
+
|
|
469
|
+
.att__tray {
|
|
470
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
471
|
+
border-radius: 10px;
|
|
472
|
+
background: var(--md-sys-color-surface-container-high);
|
|
473
|
+
max-height: 260px;
|
|
474
|
+
overflow-y: auto;
|
|
475
|
+
scrollbar-width: thin;
|
|
476
|
+
animation: trayIn 180ms ease;
|
|
477
|
+
}
|
|
478
|
+
@keyframes trayIn {
|
|
479
|
+
from { opacity: 0; transform: translateY(-4px); }
|
|
480
|
+
to { opacity: 1; transform: translateY(0); }
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.att__row {
|
|
484
|
+
display: grid;
|
|
485
|
+
grid-template-columns: 28px 1fr auto auto;
|
|
486
|
+
align-items: center;
|
|
487
|
+
gap: var(--s-2-5);
|
|
488
|
+
padding: var(--s-2) var(--s-2-5);
|
|
489
|
+
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
490
|
+
font: 500 12px/1 var(--md-sys-typescale-body-large-font);
|
|
491
|
+
}
|
|
492
|
+
.att__row:last-child { border-bottom: 0; }
|
|
493
|
+
.att__row:hover { background: color-mix(in oklab, var(--md-sys-color-inverse-on-surface) 4%, transparent); }
|
|
494
|
+
.att__row-thumb {
|
|
495
|
+
width: 28px; height: 28px; border-radius: 5px;
|
|
496
|
+
background-size: cover; background-position: center;
|
|
497
|
+
background-color: var(--md-sys-color-primary-container);
|
|
498
|
+
}
|
|
499
|
+
.att__row-icon {
|
|
500
|
+
width: 28px; height: 28px; border-radius: 5px;
|
|
501
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
502
|
+
background: var(--md-sys-color-surface-container-high);
|
|
503
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
504
|
+
}
|
|
505
|
+
[data-theme="dark"] .att__row-icon {
|
|
506
|
+
background: var(--md-sys-color-surface-container-low);
|
|
507
|
+
color: var(--md-sys-color-on-surface);
|
|
508
|
+
}
|
|
509
|
+
.att__row-name {
|
|
510
|
+
min-width: 0;
|
|
511
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
512
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
513
|
+
}
|
|
514
|
+
.att__row-size {
|
|
515
|
+
font: 400 10.5px/1 var(--xm-typescale-mono-font);
|
|
516
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
517
|
+
font-feature-settings: "tnum";
|
|
518
|
+
}
|
|
519
|
+
.att__row-meta {
|
|
520
|
+
display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
|
|
521
|
+
font-feature-settings: "tnum"; text-align: right;
|
|
522
|
+
}
|
|
523
|
+
.att__row-meta-primary { font: 400 10.5px/1 var(--xm-typescale-mono-font); color: var(--md-sys-color-inverse-on-surface); }
|
|
524
|
+
.att__row-meta-secondary { font: 400 10.5px/1 var(--xm-typescale-mono-font); color: var(--xm-color-inverse-on-surface-muted); }
|
|
525
|
+
.att__row-x {
|
|
526
|
+
width: 22px; height: 22px;
|
|
527
|
+
border-radius: 999px;
|
|
528
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
529
|
+
background: var(--md-sys-color-inverse-surface);
|
|
530
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
531
|
+
cursor: pointer;
|
|
532
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
533
|
+
transition:
|
|
534
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
535
|
+
color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
536
|
+
}
|
|
537
|
+
.att__row-x:hover { background: var(--md-sys-color-inverse-on-surface); color: var(--md-sys-color-inverse-surface); border-color: var(--md-sys-color-inverse-on-surface); }
|
|
538
|
+
|
|
539
|
+
/* Inline warning — neutral surface, severity carried by <WarnIcon /> + bold label */
|
|
540
|
+
.att__warn {
|
|
541
|
+
display: flex;
|
|
542
|
+
align-items: center;
|
|
543
|
+
gap: var(--s-2);
|
|
544
|
+
padding: var(--s-1-5) var(--s-2-5);
|
|
545
|
+
border-radius: 8px;
|
|
546
|
+
background: var(--md-sys-color-surface-container-high);
|
|
547
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
548
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
549
|
+
font: 600 11px/1.3 var(--xm-typescale-mono-font);
|
|
550
|
+
letter-spacing: 0.02em;
|
|
551
|
+
}
|
|
552
|
+
[data-theme="dark"] .att__warn {
|
|
553
|
+
background: var(--md-sys-color-surface-container-low);
|
|
554
|
+
border-color: var(--md-sys-color-outline);
|
|
555
|
+
color: var(--md-sys-color-on-surface);
|
|
556
|
+
}
|
|
557
|
+
.att__warn svg { flex-shrink: 0; }
|
|
558
|
+
|
|
559
|
+
}`);
|
|
560
|
+
sheets = [sheet];
|
|
561
|
+
}
|
|
562
|
+
export default sheets;
|
|
@@ -127,6 +127,24 @@
|
|
|
127
127
|
color: var(--md-sys-color-on-surface-variant);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
/* Monospace/tabular cells (per-column `mono`) — IDs, hashes, code-like values. */
|
|
131
|
+
.data-table__cell--mono {
|
|
132
|
+
font-family: var(--xm-typescale-mono-font);
|
|
133
|
+
font-size: var(--xm-typescale-mono-size);
|
|
134
|
+
font-weight: var(--xm-typescale-mono-weight);
|
|
135
|
+
line-height: var(--xm-typescale-mono-line-height);
|
|
136
|
+
font-variant-numeric: tabular-nums;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Clickable rows (row-click, AD-15) — keyboard-focusable; pointer + focus ring. */
|
|
140
|
+
.data-table__row--clickable {
|
|
141
|
+
cursor: pointer;
|
|
142
|
+
}
|
|
143
|
+
.data-table__row--clickable:focus-visible {
|
|
144
|
+
outline: none;
|
|
145
|
+
box-shadow: var(--xm-state-focus-ring);
|
|
146
|
+
}
|
|
147
|
+
|
|
130
148
|
/* Numeric — right-aligned, tabular figures so digits line up; the unit carries
|
|
131
149
|
a space in the value ("412 KB"). Matches xm-table (NFR-22 / UX-DR4). */
|
|
132
150
|
.data-table__header-cell--end,
|
|
@@ -9,6 +9,12 @@ export interface DataTableColumn extends TableColumn {
|
|
|
9
9
|
for comparison; the displayed cell (`row[key]`) is unchanged. Without it,
|
|
10
10
|
number cells sort by magnitude and string cells sort lexically. */
|
|
11
11
|
sortValue?: (row: TableRow) => string | number | null | undefined;
|
|
12
|
+
/** Per-column formatter → the displayed cell TEXT (data-only, ADR 0008; the
|
|
13
|
+
output is rendered as text, never markup). The raw `row[key]` is unchanged
|
|
14
|
+
and still used for sorting (or `sortValue`). */
|
|
15
|
+
format?: (value: unknown, row: TableRow) => string;
|
|
16
|
+
/** Render this column's cells in the monospace/tabular typescale. */
|
|
17
|
+
mono?: boolean;
|
|
12
18
|
}
|
|
13
19
|
export type { TableRow };
|
|
14
20
|
export type SortDirection = "asc" | "desc";
|
|
@@ -19,13 +25,34 @@ export interface DataTableSortChangeDetail {
|
|
|
19
25
|
export interface DataTablePageChangeDetail {
|
|
20
26
|
page: number;
|
|
21
27
|
}
|
|
28
|
+
export interface DataTableRowClickDetail {
|
|
29
|
+
row: TableRow;
|
|
30
|
+
index: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @fires xm-data-table-page-change - Fired when the page changes (`detail.page`).
|
|
34
|
+
* @fires xm-data-table-sort-change - Fired when the sort changes (`detail.key`, `detail.direction`).
|
|
35
|
+
* @fires xm-data-table-row-click - Fired when a clickable row is activated (`detail.row`, `detail.index`).
|
|
36
|
+
*/
|
|
22
37
|
export declare class XmDataTable extends LitElement {
|
|
38
|
+
static styles: CSSStyleSheet[];
|
|
23
39
|
columns: DataTableColumn[];
|
|
24
40
|
rows: TableRow[];
|
|
25
41
|
loading: boolean;
|
|
26
42
|
pageSize: number;
|
|
27
43
|
emptyHeading: string;
|
|
28
44
|
emptyText: string;
|
|
45
|
+
/** Server/controlled mode (AD-14): the consumer owns sort + paging. The table
|
|
46
|
+
renders `rows` verbatim, never sorts/slices a copy, derives the page count
|
|
47
|
+
from `total-items` (not `rows.length`), and emits intents only. */
|
|
48
|
+
server: boolean;
|
|
49
|
+
/** Total item count for server-mode paging (pages = ceil(total-items/page-size)). */
|
|
50
|
+
totalItems: number;
|
|
51
|
+
/** Controlled sort indicator for server mode (`{ key, direction }`); reflected,
|
|
52
|
+
never reordered locally. */
|
|
53
|
+
sort: DataTableSortChangeDetail | null;
|
|
54
|
+
/** Make rows clickable — emits xm-data-table-row-click (AD-15). */
|
|
55
|
+
rowClick: boolean;
|
|
29
56
|
private _sortKey;
|
|
30
57
|
private _sortDirection;
|
|
31
58
|
private _currentPage;
|
|
@@ -45,6 +72,9 @@ export declare class XmDataTable extends LitElement {
|
|
|
45
72
|
private _pagedRows;
|
|
46
73
|
private _compare;
|
|
47
74
|
private _toggleSort;
|
|
75
|
+
private _onRowClick;
|
|
76
|
+
private _onRowKey;
|
|
77
|
+
private _emitRowClick;
|
|
48
78
|
private _onHeaderKey;
|
|
49
79
|
private _onPageChange;
|
|
50
80
|
}
|