@threadlabs/looma 0.5.1 → 0.6.0-rc.1
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 +1 -1
- package/components/shared/overlay.js +3 -0
- package/components/ui-button/ui-button.html +27 -14
- package/components/ui-callout/ui-callout.html +1 -1
- package/components/ui-checkbox/ui-checkbox.html +1 -1
- package/components/ui-cluster/ui-cluster.html +6 -6
- package/components/ui-combobox/ui-combobox.html +35 -27
- package/components/ui-container/ui-container.html +4 -4
- package/components/ui-context-menu/ui-context-menu.html +2 -2
- package/components/ui-dialog/ui-dialog.html +21 -8
- package/components/ui-disclosure/ui-disclosure.html +19 -4
- package/components/ui-editable/ui-editable.html +6 -6
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +21 -21
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +26 -26
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +39 -39
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +26 -22
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +68 -52
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +42 -38
- package/components/ui-editor-toolbar/ui-editor-toolbar.html +9 -9
- package/components/ui-floating-action-button/ui-floating-action-button.html +16 -22
- package/components/ui-form-field/ui-form-field.html +18 -7
- package/components/ui-grid/ui-grid.html +6 -6
- package/components/ui-icon/ui-icon.html +5 -1
- package/components/ui-icon-button/ui-icon-button.html +68 -34
- package/components/ui-input/ui-input.html +2 -2
- package/components/ui-menu/ui-menu.html +15 -4
- package/components/ui-menu-item/ui-menu-item.html +5 -5
- package/components/ui-popover/ui-popover.html +3 -3
- package/components/ui-popover/ui-popover.js +10 -2
- package/components/ui-reel/ui-reel.html +6 -6
- package/components/ui-search-result-row/ui-search-result-row.html +9 -9
- package/components/ui-search-shell/ui-search-shell.html +10 -3
- package/components/ui-search-shell/ui-search-shell.js +9 -0
- package/components/ui-select/ui-select.html +2 -2
- package/components/ui-sidebar/ui-sidebar.html +11 -11
- package/components/ui-stack/ui-stack.html +6 -6
- package/components/ui-switcher/ui-switcher.html +6 -6
- package/components/ui-tabs/ui-tabs.html +19 -5
- package/components/ui-textarea/ui-textarea.html +2 -2
- package/components/ui-toast-region/ui-toast-region.html +3 -3
- package/components/ui-tooltip/ui-tooltip.html +1 -1
- package/components/ui-top-bar/ui-top-bar.html +5 -5
- package/components/ui-tree/ui-tree.html +7 -0
- package/components/ui-tree-item/ui-tree-item.html +20 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/styles/ui-affordance-scope.css +1 -1
- package/styles/ui-avatar-group.css +1 -1
- package/styles/ui-avatar.css +1 -1
- package/styles/ui-badge.css +1 -1
- package/styles/ui-button.css +25 -15
- package/styles/ui-callout.css +2 -2
- package/styles/ui-checkbox.css +2 -2
- package/styles/ui-cluster.css +7 -7
- package/styles/ui-combobox.css +24 -24
- package/styles/ui-container.css +5 -5
- package/styles/ui-context-menu.css +3 -3
- package/styles/ui-dialog.css +26 -9
- package/styles/ui-disclosure.css +23 -7
- package/styles/ui-editable.css +7 -7
- package/styles/ui-editor-insert-table-grid.css +21 -21
- package/styles/ui-editor-mention-menu.css +26 -26
- package/styles/ui-editor-slash-menu.css +40 -40
- package/styles/ui-editor-table-context-menu.css +21 -21
- package/styles/ui-editor-table-overlay.css +49 -49
- package/styles/ui-editor-table-toolbar.css +35 -35
- package/styles/ui-editor-toolbar.css +10 -10
- package/styles/ui-floating-action-button.css +17 -23
- package/styles/ui-form-field.css +24 -10
- package/styles/ui-grid.css +7 -7
- package/styles/ui-icon-button.css +74 -35
- package/styles/ui-icon.css +1 -1
- package/styles/ui-input.css +3 -3
- package/styles/ui-menu-item.css +6 -6
- package/styles/ui-menu.css +19 -7
- package/styles/ui-popover.css +4 -4
- package/styles/ui-radio-group.css +1 -1
- package/styles/ui-radio.css +1 -1
- package/styles/ui-reel.css +7 -7
- package/styles/ui-search-result-row.css +10 -10
- package/styles/ui-search-shell.css +14 -5
- package/styles/ui-select.css +3 -3
- package/styles/ui-separator.css +1 -1
- package/styles/ui-sidebar.css +12 -12
- package/styles/ui-stack.css +7 -7
- package/styles/ui-switch.css +1 -1
- package/styles/ui-switcher.css +7 -7
- package/styles/ui-tabs.css +21 -7
- package/styles/ui-textarea.css +3 -3
- package/styles/ui-toast-region.css +3 -3
- package/styles/ui-tooltip.css +2 -2
- package/styles/ui-top-bar.css +6 -6
- package/styles/ui-tree-item.css +30 -9
- package/styles/ui-tree.css +8 -2
- package/theme-dark.css +42 -103
- package/theme-high-contrast.css +18 -22
- package/theme-light.css +15 -41
- package/tokens.css +149 -201
- package/vanilla/UiAffordanceScope.d.ts +1 -1
- package/vanilla/UiAffordanceScope.js +2 -2
- package/vanilla/UiAvatar.d.ts +1 -1
- package/vanilla/UiAvatar.js +2 -2
- package/vanilla/UiAvatarGroup.d.ts +1 -1
- package/vanilla/UiAvatarGroup.js +2 -2
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +2 -2
- package/vanilla/UiButton.d.ts +3 -1
- package/vanilla/UiButton.js +3 -3
- package/vanilla/UiCallout.d.ts +1 -1
- package/vanilla/UiCallout.js +2 -2
- package/vanilla/UiCheckbox.d.ts +1 -1
- package/vanilla/UiCheckbox.js +2 -2
- package/vanilla/UiCluster.d.ts +1 -1
- package/vanilla/UiCluster.js +2 -2
- package/vanilla/UiCombobox.d.ts +1 -1
- package/vanilla/UiCombobox.js +3 -3
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +2 -2
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +2 -2
- package/vanilla/UiDialog.d.ts +1 -1
- package/vanilla/UiDialog.js +2 -2
- package/vanilla/UiDisclosure.d.ts +2 -1
- package/vanilla/UiDisclosure.js +3 -3
- package/vanilla/UiEditable.d.ts +1 -1
- package/vanilla/UiEditable.js +2 -2
- package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
- package/vanilla/UiEditorInsertTableGrid.js +3 -3
- package/vanilla/UiEditorMentionMenu.d.ts +1 -1
- package/vanilla/UiEditorMentionMenu.js +3 -3
- package/vanilla/UiEditorSlashMenu.d.ts +1 -1
- package/vanilla/UiEditorSlashMenu.js +2 -2
- package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +3 -3
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +3 -3
- package/vanilla/UiEditorTableToolbar.d.ts +1 -1
- package/vanilla/UiEditorTableToolbar.js +3 -3
- package/vanilla/UiEditorToolbar.d.ts +1 -1
- package/vanilla/UiEditorToolbar.js +2 -2
- package/vanilla/UiFloatingActionButton.d.ts +1 -1
- package/vanilla/UiFloatingActionButton.js +2 -2
- package/vanilla/UiFormField.d.ts +1 -1
- package/vanilla/UiFormField.js +15 -6
- package/vanilla/UiGrid.d.ts +1 -1
- package/vanilla/UiGrid.js +2 -2
- package/vanilla/UiIcon.d.ts +1 -1
- package/vanilla/UiIcon.js +3 -3
- package/vanilla/UiIconButton.d.ts +1 -1
- package/vanilla/UiIconButton.js +2 -2
- package/vanilla/UiInput.d.ts +1 -1
- package/vanilla/UiInput.js +2 -2
- package/vanilla/UiMenu.d.ts +2 -1
- package/vanilla/UiMenu.js +3 -3
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +2 -2
- package/vanilla/UiPopover.d.ts +1 -1
- package/vanilla/UiPopover.js +2 -2
- package/vanilla/UiRadio.d.ts +1 -1
- package/vanilla/UiRadio.js +2 -2
- package/vanilla/UiRadioGroup.d.ts +1 -1
- package/vanilla/UiRadioGroup.js +2 -2
- package/vanilla/UiReel.d.ts +1 -1
- package/vanilla/UiReel.js +2 -2
- package/vanilla/UiSearchResultRow.d.ts +1 -1
- package/vanilla/UiSearchResultRow.js +2 -2
- package/vanilla/UiSearchShell.d.ts +1 -1
- package/vanilla/UiSearchShell.js +2 -2
- package/vanilla/UiSelect.d.ts +1 -1
- package/vanilla/UiSelect.js +2 -2
- package/vanilla/UiSeparator.d.ts +1 -1
- package/vanilla/UiSeparator.js +2 -2
- package/vanilla/UiSidebar.d.ts +1 -1
- package/vanilla/UiSidebar.js +2 -2
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +2 -2
- package/vanilla/UiSwitch.d.ts +1 -1
- package/vanilla/UiSwitch.js +2 -2
- package/vanilla/UiSwitcher.d.ts +1 -1
- package/vanilla/UiSwitcher.js +2 -2
- package/vanilla/UiTabs.d.ts +2 -1
- package/vanilla/UiTabs.js +3 -3
- package/vanilla/UiTextarea.d.ts +1 -1
- package/vanilla/UiTextarea.js +2 -2
- package/vanilla/UiToastRegion.d.ts +1 -1
- package/vanilla/UiToastRegion.js +3 -3
- package/vanilla/UiTooltip.d.ts +1 -1
- package/vanilla/UiTooltip.js +2 -2
- package/vanilla/UiTopBar.d.ts +1 -1
- package/vanilla/UiTopBar.js +1 -1
- package/vanilla/UiTree.d.ts +2 -1
- package/vanilla/UiTree.js +3 -3
- package/vanilla/UiTreeItem.d.ts +1 -1
- package/vanilla/UiTreeItem.js +2 -2
- package/vue/UiAffordanceScope.d.ts +2 -2
- package/vue/UiAffordanceScope.vue +92 -73
- package/vue/UiAvatar.d.ts +7 -7
- package/vue/UiAvatar.vue +145 -105
- package/vue/UiAvatarGroup.d.ts +4 -4
- package/vue/UiAvatarGroup.vue +134 -118
- package/vue/UiBadge.d.ts +4 -4
- package/vue/UiBadge.vue +113 -114
- package/vue/UiButton.d.ts +10 -6
- package/vue/UiButton.vue +295 -248
- package/vue/UiCallout.d.ts +2 -2
- package/vue/UiCallout.vue +154 -87
- package/vue/UiCheckbox.d.ts +14 -10
- package/vue/UiCheckbox.vue +228 -162
- package/vue/UiCluster.d.ts +2 -2
- package/vue/UiCluster.vue +53 -60
- package/vue/UiCombobox.d.ts +36 -32
- package/vue/UiCombobox.vue +1005 -416
- package/vue/UiContainer.d.ts +2 -2
- package/vue/UiContainer.vue +48 -51
- package/vue/UiContextMenu.d.ts +6 -4
- package/vue/UiContextMenu.vue +205 -116
- package/vue/UiDialog.d.ts +11 -9
- package/vue/UiDialog.vue +287 -212
- package/vue/UiDisclosure.d.ts +10 -6
- package/vue/UiDisclosure.vue +265 -159
- package/vue/UiEditable.d.ts +16 -12
- package/vue/UiEditable.vue +325 -205
- package/vue/UiEditorInsertTableGrid.d.ts +8 -8
- package/vue/UiEditorInsertTableGrid.vue +216 -157
- package/vue/UiEditorMentionMenu.d.ts +9 -9
- package/vue/UiEditorMentionMenu.vue +265 -222
- package/vue/UiEditorSlashMenu.d.ts +7 -7
- package/vue/UiEditorSlashMenu.vue +286 -240
- package/vue/UiEditorTableContextMenu.d.ts +5 -5
- package/vue/UiEditorTableContextMenu.vue +306 -193
- package/vue/UiEditorTableOverlay.d.ts +2 -2
- package/vue/UiEditorTableOverlay.vue +600 -369
- package/vue/UiEditorTableToolbar.d.ts +7 -7
- package/vue/UiEditorTableToolbar.vue +443 -268
- package/vue/UiEditorToolbar.d.ts +2 -2
- package/vue/UiEditorToolbar.vue +134 -121
- package/vue/UiFloatingActionButton.d.ts +6 -6
- package/vue/UiFloatingActionButton.vue +95 -99
- package/vue/UiFormField.d.ts +6 -6
- package/vue/UiFormField.vue +112 -80
- package/vue/UiGrid.d.ts +2 -2
- package/vue/UiGrid.vue +51 -57
- package/vue/UiIcon.d.ts +2 -2
- package/vue/UiIcon.vue +118 -89
- package/vue/UiIconButton.d.ts +11 -11
- package/vue/UiIconButton.vue +287 -217
- package/vue/UiInput.d.ts +9 -9
- package/vue/UiInput.vue +153 -127
- package/vue/UiMenu.d.ts +10 -6
- package/vue/UiMenu.vue +227 -143
- package/vue/UiMenuItem.d.ts +4 -4
- package/vue/UiMenuItem.vue +53 -46
- package/vue/UiPopover.d.ts +8 -6
- package/vue/UiPopover.vue +197 -137
- package/vue/UiRadio.d.ts +14 -10
- package/vue/UiRadio.vue +183 -117
- package/vue/UiRadioGroup.d.ts +14 -12
- package/vue/UiRadioGroup.vue +172 -111
- package/vue/UiReel.d.ts +3 -3
- package/vue/UiReel.vue +77 -77
- package/vue/UiSearchResultRow.d.ts +4 -4
- package/vue/UiSearchResultRow.vue +121 -115
- package/vue/UiSearchShell.d.ts +10 -8
- package/vue/UiSearchShell.vue +245 -176
- package/vue/UiSelect.d.ts +9 -9
- package/vue/UiSelect.vue +162 -134
- package/vue/UiSeparator.d.ts +2 -2
- package/vue/UiSeparator.vue +22 -27
- package/vue/UiSidebar.d.ts +20 -18
- package/vue/UiSidebar.vue +307 -224
- package/vue/UiStack.d.ts +3 -3
- package/vue/UiStack.vue +64 -70
- package/vue/UiSwitch.d.ts +12 -8
- package/vue/UiSwitch.vue +218 -150
- package/vue/UiSwitcher.d.ts +3 -3
- package/vue/UiSwitcher.vue +73 -75
- package/vue/UiTabs.d.ts +12 -8
- package/vue/UiTabs.vue +268 -210
- package/vue/UiTextarea.d.ts +11 -11
- package/vue/UiTextarea.vue +155 -128
- package/vue/UiToastRegion.d.ts +10 -8
- package/vue/UiToastRegion.vue +261 -198
- package/vue/UiTooltip.d.ts +14 -12
- package/vue/UiTooltip.vue +241 -177
- package/vue/UiTopBar.vue +51 -42
- package/vue/UiTree.d.ts +10 -6
- package/vue/UiTree.vue +180 -70
- package/vue/UiTreeItem.d.ts +24 -22
- package/vue/UiTreeItem.vue +464 -339
- package/vue/chunks/UiAffordanceScope.js +9 -16
- package/vue/chunks/UiAvatar.js +23 -29
- package/vue/chunks/UiAvatarGroup.js +16 -39
- package/vue/chunks/UiBadge.js +3 -12
- package/vue/chunks/UiButton.js +15 -18
- package/vue/chunks/UiCallout.js +8 -17
- package/vue/chunks/UiCheckbox.js +37 -40
- package/vue/chunks/UiCluster.js +3 -12
- package/vue/chunks/UiCombobox.js +224 -266
- package/vue/chunks/UiContainer.js +3 -12
- package/vue/chunks/UiContextMenu.js +39 -34
- package/vue/chunks/UiDialog.js +36 -39
- package/vue/chunks/UiDisclosure.js +44 -48
- package/vue/chunks/UiEditable.js +55 -57
- package/vue/chunks/UiEditorInsertTableGrid.js +55 -73
- package/vue/chunks/UiEditorMentionMenu.js +40 -81
- package/vue/chunks/UiEditorSlashMenu.js +28 -52
- package/vue/chunks/UiEditorTableContextMenu.js +32 -56
- package/vue/chunks/UiEditorTableOverlay.js +58 -82
- package/vue/chunks/UiEditorTableToolbar.js +61 -85
- package/vue/chunks/UiEditorToolbar.js +4 -13
- package/vue/chunks/UiFloatingActionButton.js +7 -21
- package/vue/chunks/UiFormField.js +15 -12
- package/vue/chunks/UiGrid.js +3 -12
- package/vue/chunks/UiIcon.js +20 -43
- package/vue/chunks/UiIconButton.js +16 -28
- package/vue/chunks/UiInput.js +20 -25
- package/vue/chunks/UiMenu.js +30 -33
- package/vue/chunks/UiMenuItem.js +4 -10
- package/vue/chunks/UiPopover.js +28 -29
- package/vue/chunks/UiRadio.js +36 -39
- package/vue/chunks/UiRadioGroup.js +30 -34
- package/vue/chunks/UiReel.js +6 -15
- package/vue/chunks/UiSearchResultRow.js +6 -19
- package/vue/chunks/UiSearchShell.js +25 -28
- package/vue/chunks/UiSelect.js +20 -23
- package/vue/chunks/UiSeparator.js +2 -8
- package/vue/chunks/UiSidebar.js +39 -44
- package/vue/chunks/UiStack.js +6 -15
- package/vue/chunks/UiSwitch.js +35 -38
- package/vue/chunks/UiSwitcher.js +6 -15
- package/vue/chunks/UiTabs.js +52 -85
- package/vue/chunks/UiTextarea.js +21 -26
- package/vue/chunks/UiToastRegion.js +38 -72
- package/vue/chunks/UiTooltip.js +34 -35
- package/vue/chunks/UiTopBar.js +1 -1
- package/vue/chunks/UiTree.js +27 -16
- package/vue/chunks/UiTreeItem.js +85 -102
- package/vue/components.css +4027 -3800
- package/vue/editor/LoomaEditor.d.ts +11 -0
- package/vue/editor/index.js +9 -0
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ The editor components' event and geometry types, without Tiptap, are in
|
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
Importing the package registers every component with the
|
|
45
|
-
[HTML Next runtime](https://www.npmjs.com/package/@nextwebwg/
|
|
45
|
+
[HTML Next runtime](https://www.npmjs.com/package/@nextwebwg/html-next), which turns
|
|
46
46
|
each `<ui-*>` element into its native root. Each component's styles are scoped to it; the token
|
|
47
47
|
stylesheet is the only stylesheet to include. Without a build, link components one by one from
|
|
48
48
|
`@threadlabs/looma/components/<tag>/<tag>.html`.
|
|
@@ -32,6 +32,9 @@ function ensureListeners(document, state) {
|
|
|
32
32
|
const top = state.records.at(-1);
|
|
33
33
|
if (!top || top.dismissible === false) return;
|
|
34
34
|
const boundary = [top.element, ...(top.relatedElements ?? [])];
|
|
35
|
+
// Light dismiss needs a press it can place: an activation with no pointer (assistive technology,
|
|
36
|
+
// or a synthetic event) reports 0,0 and would otherwise read as a press outside the overlay.
|
|
37
|
+
if (event.clientX === 0 && event.clientY === 0) return;
|
|
35
38
|
// A modal dialog's ::backdrop reports the dialog itself as the target; a press outside its box is outside.
|
|
36
39
|
const rect = top.element.getBoundingClientRect();
|
|
37
40
|
const onBackdrop = event.target === top.element
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
>Visual emphasis and semantic intent. link is an inline text action that reads as a link.</prop>
|
|
5
5
|
<prop name="size" type="sm | md | lg" default="md">Control size.</prop>
|
|
6
6
|
<prop name="disabled" type="boolean" default="false">disabled token.</prop>
|
|
7
|
+
<prop name="align" type="center | start" default="center"
|
|
8
|
+
>Content alignment. start lays the content out like a list option: from the start edge, with start-aligned text.</prop>
|
|
9
|
+
<prop name="stretch" type="boolean" default="false">Fills the inline size of its container.</prop>
|
|
7
10
|
</defs>
|
|
8
11
|
<button type="button" :disabled="disabled"><slot></slot></button>
|
|
9
12
|
<style>
|
|
@@ -19,18 +22,28 @@
|
|
|
19
22
|
color: var(--ui-action-primary-text, var(--ui-text-on-accent));
|
|
20
23
|
}
|
|
21
24
|
|
|
25
|
+
:host-state([align="start"]) {
|
|
26
|
+
justify-content: flex-start;
|
|
27
|
+
text-align: start;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host-state([stretch]) {
|
|
31
|
+
display: flex;
|
|
32
|
+
inline-size: 100%;
|
|
33
|
+
}
|
|
34
|
+
|
|
22
35
|
:host {
|
|
23
36
|
appearance: none;
|
|
24
|
-
min-block-size: var(--ui-button-min-block-size, var(--ui-control-size-md
|
|
37
|
+
min-block-size: var(--ui-button-min-block-size, var(--ui-control-size-md));
|
|
25
38
|
border: 1px solid var(--ui-button-border, var(--ui-border-strong));
|
|
26
|
-
border-radius: var(--ui-button-radius, var(--ui-radius-
|
|
39
|
+
border-radius: var(--ui-button-radius, var(--ui-radius-md));
|
|
27
40
|
background: var(--ui-button-surface, var(--ui-surface-elevated));
|
|
28
41
|
color: var(--ui-button-text, var(--ui-action-secondary-text, var(--ui-text-primary)));
|
|
29
42
|
font: inherit;
|
|
30
|
-
font-weight: var(--ui-font-medium
|
|
43
|
+
font-weight: var(--ui-font-medium);
|
|
31
44
|
line-height: var(--ui-line-height-tight);
|
|
32
45
|
padding: var(--ui-space-2) var(--ui-space-3);
|
|
33
|
-
background-image: var(--ui-raised-highlight
|
|
46
|
+
background-image: var(--ui-raised-highlight);
|
|
34
47
|
box-shadow: var(--ui-button-shadow, var(--ui-raised, var(--ui-shadow-xs)));
|
|
35
48
|
cursor: pointer;
|
|
36
49
|
transition:
|
|
@@ -50,13 +63,13 @@
|
|
|
50
63
|
}
|
|
51
64
|
|
|
52
65
|
:host-state([size="sm"]) {
|
|
53
|
-
min-block-size: var(--ui-control-size-sm
|
|
66
|
+
min-block-size: var(--ui-control-size-sm);
|
|
54
67
|
padding: var(--ui-space-1) var(--ui-space-2);
|
|
55
68
|
font-size: 0.875rem;
|
|
56
69
|
}
|
|
57
70
|
|
|
58
71
|
:host-state([size="lg"]) {
|
|
59
|
-
min-block-size: var(--ui-control-size-lg
|
|
72
|
+
min-block-size: var(--ui-control-size-lg);
|
|
60
73
|
padding: var(--ui-space-3) var(--ui-space-4);
|
|
61
74
|
font-size: 1rem;
|
|
62
75
|
}
|
|
@@ -119,12 +132,12 @@
|
|
|
119
132
|
|
|
120
133
|
/* Tints derive from the text colour, not a surface token, so hover and press show on any background. */
|
|
121
134
|
:host-state([variant="ghost"]):hover:enabled {
|
|
122
|
-
background: var(--ui-button-ghost-hover, color-mix(in srgb, currentColor 8%, transparent));
|
|
135
|
+
background: var(--ui-button-ghost-hover-surface, color-mix(in srgb, currentColor 8%, transparent));
|
|
123
136
|
border-color: transparent;
|
|
124
137
|
}
|
|
125
138
|
|
|
126
139
|
:host-state([variant="ghost"]):active:enabled {
|
|
127
|
-
background: var(--ui-button-ghost-active, color-mix(in srgb, currentColor 14%, transparent));
|
|
140
|
+
background: var(--ui-button-ghost-active-surface, color-mix(in srgb, currentColor 14%, transparent));
|
|
128
141
|
border-color: transparent;
|
|
129
142
|
}
|
|
130
143
|
|
|
@@ -171,7 +184,7 @@
|
|
|
171
184
|
|
|
172
185
|
@media (pointer: coarse) {
|
|
173
186
|
:host {
|
|
174
|
-
min-block-size: var(--ui-control-min-block-size
|
|
187
|
+
min-block-size: var(--ui-control-min-block-size);
|
|
175
188
|
}
|
|
176
189
|
}
|
|
177
190
|
|
|
@@ -182,11 +195,11 @@
|
|
|
182
195
|
min-block-size: 0;
|
|
183
196
|
padding: 0;
|
|
184
197
|
border: 0;
|
|
185
|
-
border-radius: var(--ui-radius-sm
|
|
198
|
+
border-radius: var(--ui-radius-sm);
|
|
186
199
|
background: none;
|
|
187
200
|
box-shadow: none;
|
|
188
201
|
font: inherit;
|
|
189
|
-
color: var(--ui-button-link-
|
|
202
|
+
color: var(--ui-button-link-text, var(--ui-text-secondary));
|
|
190
203
|
text-decoration-line: underline;
|
|
191
204
|
text-decoration-thickness: 1px;
|
|
192
205
|
text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
|
|
@@ -195,7 +208,7 @@
|
|
|
195
208
|
}
|
|
196
209
|
|
|
197
210
|
:host-state([variant="link"]):hover:enabled {
|
|
198
|
-
color: var(--ui-button-link-hover-
|
|
211
|
+
color: var(--ui-button-link-hover-text, var(--ui-text-primary));
|
|
199
212
|
text-decoration-color: currentColor;
|
|
200
213
|
background: none;
|
|
201
214
|
transform: none;
|
|
@@ -208,13 +221,13 @@
|
|
|
208
221
|
|
|
209
222
|
:host-state([variant="link"]):disabled {
|
|
210
223
|
background: none;
|
|
211
|
-
color: var(--ui-button-disabled-text, var(--ui-button-link-
|
|
224
|
+
color: var(--ui-button-disabled-text, var(--ui-button-link-text, var(--ui-text-secondary)));
|
|
212
225
|
}
|
|
213
226
|
|
|
214
227
|
:host-state([variant="link"]):focus-visible {
|
|
215
228
|
box-shadow: none;
|
|
216
229
|
/* Fallback keeps the ring if the token is missing: an unresolved var() would void the outline. */
|
|
217
|
-
outline: 2px solid var(--ui-focus-ring
|
|
230
|
+
outline: 2px solid var(--ui-focus-ring);
|
|
218
231
|
outline-offset: 2px;
|
|
219
232
|
}
|
|
220
233
|
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
padding: var(--ui-callout-padding-block, var(--ui-space-2)) var(--ui-callout-padding-inline, var(--ui-space-3));
|
|
46
46
|
border: var(--ui-callout-border-width, 1px) solid color-mix(in srgb, var(--ui-callout-border, var(--_callout-border)) 35%, transparent);
|
|
47
47
|
border-inline-start: var(--ui-callout-leading-border-width, 4px) solid var(--ui-callout-border, var(--_callout-border));
|
|
48
|
-
border-radius: var(--ui-radius-
|
|
48
|
+
border-radius: var(--ui-radius-md);
|
|
49
49
|
background: var(--ui-callout-surface, var(--_callout-surface));
|
|
50
50
|
color: var(--ui-callout-text, var(--ui-text-primary));
|
|
51
51
|
font-family: var(--ui-font-family-sans);
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
block-size: var(--ui-checkbox-size, 1.125rem);
|
|
37
37
|
margin: 0.125em 0 0;
|
|
38
38
|
border: 1px solid var(--ui-control-border-hover, var(--ui-border-strong));
|
|
39
|
-
border-radius: var(--ui-radius-
|
|
39
|
+
border-radius: var(--ui-radius-sm);
|
|
40
40
|
background: var(--ui-control-surface, var(--ui-surface-default));
|
|
41
41
|
box-shadow: inset 0 1px 2px color-mix(in srgb, var(--ui-text-primary) 8%, transparent);
|
|
42
42
|
cursor: pointer;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<div><slot></slot></div>
|
|
7
7
|
<style>
|
|
8
8
|
:host {
|
|
9
|
-
--_layout-gap: var(--ui-space-3
|
|
9
|
+
--_layout-gap: var(--ui-space-3);
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-wrap: wrap;
|
|
12
12
|
align-items: center;
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
:host-state([gap="xs"]) {
|
|
20
|
-
--_layout-gap: var(--ui-space-2
|
|
20
|
+
--_layout-gap: var(--ui-space-2);
|
|
21
21
|
}
|
|
22
22
|
:host-state([gap="s"]) {
|
|
23
|
-
--_layout-gap: var(--ui-space-3
|
|
23
|
+
--_layout-gap: var(--ui-space-3);
|
|
24
24
|
}
|
|
25
25
|
:host-state([gap="m"]) {
|
|
26
|
-
--_layout-gap: var(--ui-space-4
|
|
26
|
+
--_layout-gap: var(--ui-space-4);
|
|
27
27
|
}
|
|
28
28
|
:host-state([gap="l"]) {
|
|
29
|
-
--_layout-gap: var(--ui-space-5
|
|
29
|
+
--_layout-gap: var(--ui-space-5);
|
|
30
30
|
}
|
|
31
31
|
:host-state([gap="xl"]) {
|
|
32
|
-
--_layout-gap: var(--ui-space-6
|
|
32
|
+
--_layout-gap: var(--ui-space-6);
|
|
33
33
|
}
|
|
34
34
|
:host-state([align="start"]) {
|
|
35
35
|
align-items: flex-start;
|
|
@@ -23,16 +23,24 @@
|
|
|
23
23
|
<prop name="help" type="string" default="">help token.</prop>
|
|
24
24
|
<state name="raw" :value="''"></state>
|
|
25
25
|
<state name="display" :value="''"></state>
|
|
26
|
-
<state name="selected" :value="null"></state>
|
|
26
|
+
<state name="selected" type="string | null" :value="null"></state>
|
|
27
27
|
<state name="expanded" :value="false"></state>
|
|
28
|
-
<state name="rows" :value="[]"></state>
|
|
28
|
+
<state name="rows" type="list(object({ id: string, value: string, label: string, group?: string, disabled: boolean }))" :value="[]"></state>
|
|
29
29
|
<state name="active" :value="-1"></state>
|
|
30
30
|
<state name="loading" :value="false"></state>
|
|
31
31
|
<state name="helpOpen" :value="false"></state>
|
|
32
32
|
<state name="lookupError" :value="''"></state>
|
|
33
|
-
<state
|
|
33
|
+
<state
|
|
34
|
+
name="validation"
|
|
35
|
+
type="object({ status: pristine | pending | valid | warning | error, touched: boolean, dirty: boolean, issues: list(object({ message: string })), ... })"
|
|
36
|
+
:value="{ status: 'pristine', touched: false, dirty: false, issues: [] }"
|
|
37
|
+
></state>
|
|
34
38
|
<state name="uid" :value="''"></state>
|
|
35
|
-
<state
|
|
39
|
+
<state
|
|
40
|
+
name="groups"
|
|
41
|
+
type="list(object({ name: string, role: group | presentation, label: string | null, rows: list(object({ id: string, value: string, label: string, group?: string, disabled: boolean, index: integer })) }))"
|
|
42
|
+
:value="[]"
|
|
43
|
+
></state>
|
|
36
44
|
<state name="creatable" :value="false"></state>
|
|
37
45
|
<state name="createIndex" :value="0"></state>
|
|
38
46
|
<state name="message" :value="''"></state>
|
|
@@ -181,15 +189,15 @@
|
|
|
181
189
|
font: inherit;
|
|
182
190
|
}
|
|
183
191
|
label {
|
|
184
|
-
color: var(--ui-
|
|
185
|
-
font-size: var(--ui-
|
|
186
|
-
font-weight:
|
|
192
|
+
color: var(--ui-combobox-label-text, var(--ui-text-primary));
|
|
193
|
+
font-size: var(--ui-combobox-label-font-size, 0.875rem);
|
|
194
|
+
font-weight: 500;
|
|
187
195
|
}
|
|
188
196
|
.field {
|
|
189
197
|
display: flex;
|
|
190
198
|
min-inline-size: 0;
|
|
191
199
|
border: 1px solid var(--ui-control-border, var(--ui-border-default));
|
|
192
|
-
border-radius: var(--ui-radius-
|
|
200
|
+
border-radius: var(--ui-radius-md);
|
|
193
201
|
background: var(--ui-control-surface, var(--ui-surface-default));
|
|
194
202
|
box-shadow: var(--ui-control-inset);
|
|
195
203
|
transition: border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease);
|
|
@@ -208,7 +216,7 @@
|
|
|
208
216
|
appearance: none;
|
|
209
217
|
width: 100%;
|
|
210
218
|
min-inline-size: 0;
|
|
211
|
-
min-block-size: calc(var(--ui-control-size-md
|
|
219
|
+
min-block-size: calc(var(--ui-control-size-md) - 2px);
|
|
212
220
|
box-sizing: border-box;
|
|
213
221
|
border: 0;
|
|
214
222
|
border-radius: inherit;
|
|
@@ -221,7 +229,7 @@
|
|
|
221
229
|
outline: none;
|
|
222
230
|
}
|
|
223
231
|
:host-state([size="sm"]) input {
|
|
224
|
-
min-block-size: calc(var(--ui-
|
|
232
|
+
min-block-size: calc(var(--ui-control-size-sm) - 2px);
|
|
225
233
|
padding: var(--ui-space-1) var(--ui-space-2);
|
|
226
234
|
}
|
|
227
235
|
button {
|
|
@@ -230,19 +238,19 @@
|
|
|
230
238
|
place-items: center;
|
|
231
239
|
align-self: stretch;
|
|
232
240
|
border: 0;
|
|
233
|
-
border-radius: var(--ui-radius-
|
|
241
|
+
border-radius: var(--ui-radius-md);
|
|
234
242
|
background: transparent;
|
|
235
|
-
color: var(--ui-
|
|
243
|
+
color: var(--ui-combobox-affordance-text, var(--ui-text-secondary));
|
|
236
244
|
font: inherit;
|
|
237
|
-
font-weight:
|
|
245
|
+
font-weight: 400;
|
|
238
246
|
min-inline-size: 2rem;
|
|
239
247
|
padding: 0 var(--ui-space-1);
|
|
240
248
|
cursor: pointer;
|
|
241
249
|
}
|
|
242
250
|
.affordance-icon {
|
|
243
251
|
display: block;
|
|
244
|
-
inline-size: var(--ui-icon-size-sm
|
|
245
|
-
block-size: var(--ui-icon-size-sm
|
|
252
|
+
inline-size: var(--ui-icon-size-sm);
|
|
253
|
+
block-size: var(--ui-icon-size-sm);
|
|
246
254
|
}
|
|
247
255
|
button:hover:enabled {
|
|
248
256
|
background: var(--ui-surface-muted);
|
|
@@ -272,7 +280,7 @@
|
|
|
272
280
|
margin: 0;
|
|
273
281
|
padding: var(--ui-space-1);
|
|
274
282
|
border: 1px solid var(--ui-border-default);
|
|
275
|
-
border-radius: var(--ui-radius-
|
|
283
|
+
border-radius: var(--ui-radius-md);
|
|
276
284
|
background: var(--ui-surface-elevated);
|
|
277
285
|
color: var(--ui-text-primary);
|
|
278
286
|
box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
|
|
@@ -282,13 +290,13 @@
|
|
|
282
290
|
}
|
|
283
291
|
.option {
|
|
284
292
|
padding: var(--ui-space-2) var(--ui-space-3);
|
|
285
|
-
border-radius: var(--ui-radius-
|
|
293
|
+
border-radius: var(--ui-radius-sm);
|
|
286
294
|
cursor: pointer;
|
|
287
295
|
overflow-wrap: anywhere;
|
|
288
296
|
}
|
|
289
297
|
.option:hover, .option.active {
|
|
290
298
|
background: var(--ui-surface-muted);
|
|
291
|
-
outline: 1px solid var(--ui-focus-ring
|
|
299
|
+
outline: 1px solid var(--ui-focus-ring);
|
|
292
300
|
outline-offset: -1px;
|
|
293
301
|
}
|
|
294
302
|
.option[aria-disabled="true"] {
|
|
@@ -297,12 +305,12 @@
|
|
|
297
305
|
}
|
|
298
306
|
.primary {
|
|
299
307
|
display: block;
|
|
300
|
-
color: var(--ui-option-
|
|
301
|
-
font-weight:
|
|
308
|
+
color: var(--ui-combobox-option-text, var(--ui-text-primary));
|
|
309
|
+
font-weight: 500;
|
|
302
310
|
}
|
|
303
311
|
.message, .group {
|
|
304
|
-
color: var(--ui-
|
|
305
|
-
font-weight:
|
|
312
|
+
color: var(--ui-combobox-message-text, var(--ui-text-secondary));
|
|
313
|
+
font-weight: 400;
|
|
306
314
|
font-size: var(--ui-font-size-sm);
|
|
307
315
|
line-height: var(--ui-line-height-md);
|
|
308
316
|
overflow-wrap: anywhere;
|
|
@@ -338,11 +346,11 @@
|
|
|
338
346
|
flex-wrap: wrap;
|
|
339
347
|
align-items: center;
|
|
340
348
|
gap: var(--ui-space-1);
|
|
341
|
-
min-block-size: var(--ui-
|
|
349
|
+
min-block-size: var(--ui-combobox-item-min-block-size, 2.5rem);
|
|
342
350
|
padding: var(--ui-space-1);
|
|
343
351
|
}
|
|
344
352
|
:host-state([multiple]) input {
|
|
345
|
-
flex: 1 0 var(--ui-
|
|
353
|
+
flex: 1 0 var(--ui-combobox-item-input-min-inline-size, 5rem);
|
|
346
354
|
width: auto;
|
|
347
355
|
min-block-size: 1.75rem;
|
|
348
356
|
padding: var(--ui-space-0-5) var(--ui-space-1);
|
|
@@ -351,18 +359,18 @@
|
|
|
351
359
|
appearance: none;
|
|
352
360
|
display: inline-flex;
|
|
353
361
|
min-inline-size: 0;
|
|
354
|
-
max-inline-size: min(100%, var(--ui-
|
|
362
|
+
max-inline-size: min(100%, var(--ui-combobox-item-item-max-inline-size, 12rem));
|
|
355
363
|
overflow: hidden;
|
|
356
364
|
padding: 0;
|
|
357
365
|
border: 0;
|
|
358
|
-
border-radius: var(--ui-radius-
|
|
366
|
+
border-radius: var(--ui-radius-sm);
|
|
359
367
|
background: transparent;
|
|
360
368
|
color: inherit;
|
|
361
369
|
font: inherit;
|
|
362
370
|
cursor: default;
|
|
363
371
|
}
|
|
364
372
|
.item:focus-visible {
|
|
365
|
-
outline: 2px solid var(--ui-focus-ring
|
|
373
|
+
outline: 2px solid var(--ui-focus-ring);
|
|
366
374
|
outline-offset: 1px;
|
|
367
375
|
}
|
|
368
376
|
.item:disabled {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<style>
|
|
8
8
|
:host {
|
|
9
9
|
--_container-measure: 65ch;
|
|
10
|
-
--_container-gutters: var(--ui-space-4
|
|
10
|
+
--_container-gutters: var(--ui-space-4);
|
|
11
11
|
display: block;
|
|
12
12
|
inline-size: 100%;
|
|
13
13
|
max-inline-size: var(--ui-container-measure, var(--_container-measure));
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
--_container-measure: 80ch;
|
|
23
23
|
}
|
|
24
24
|
:host-state([gutters="s"]) {
|
|
25
|
-
--_container-gutters: var(--ui-space-3
|
|
25
|
+
--_container-gutters: var(--ui-space-3);
|
|
26
26
|
}
|
|
27
27
|
:host-state([gutters="m"]) {
|
|
28
|
-
--_container-gutters: var(--ui-space-4
|
|
28
|
+
--_container-gutters: var(--ui-space-4);
|
|
29
29
|
}
|
|
30
30
|
:host-state([gutters="l"]) {
|
|
31
|
-
--_container-gutters: var(--ui-space-5
|
|
31
|
+
--_container-gutters: var(--ui-space-5);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
padding: var(--ui-space-1);
|
|
30
30
|
background: var(--ui-surface-elevated);
|
|
31
31
|
border: 1px solid var(--ui-border-default);
|
|
32
|
-
border-radius: var(--ui-radius-
|
|
32
|
+
border-radius: var(--ui-radius-lg);
|
|
33
33
|
box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
|
|
34
34
|
outline: 0;
|
|
35
35
|
overflow: auto;
|
|
36
|
-
z-index: var(--ui-z-
|
|
36
|
+
z-index: var(--ui-context-menu-z-index, 1000);
|
|
37
37
|
min-width: 12rem;
|
|
38
38
|
opacity: 0;
|
|
39
39
|
transform: translateY(-4px) scale(0.99);
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
inset: 0;
|
|
28
28
|
box-sizing: border-box;
|
|
29
29
|
inline-size: min(
|
|
30
|
-
calc(100% - var(--ui-dialog-viewport-gap, var(--ui-space-4
|
|
30
|
+
calc(100% - var(--ui-dialog-viewport-gap, var(--ui-space-4)) * 2),
|
|
31
31
|
var(--ui-dialog-max-width, 440px)
|
|
32
32
|
);
|
|
33
33
|
max-inline-size: none;
|
|
34
|
-
max-block-size: calc(100dvh - var(--ui-dialog-viewport-gap, var(--ui-space-4
|
|
34
|
+
max-block-size: calc(100dvh - var(--ui-dialog-viewport-gap, var(--ui-space-4)) * 2);
|
|
35
35
|
margin: auto;
|
|
36
36
|
padding: 0;
|
|
37
37
|
overflow: hidden;
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
border: 0;
|
|
81
81
|
color: var(--ui-text-primary);
|
|
82
82
|
letter-spacing: normal;
|
|
83
|
-
font-size: var(--ui-font-size-lg
|
|
84
|
-
font-weight: var(--ui-font-semibold
|
|
83
|
+
font-size: var(--ui-font-size-lg);
|
|
84
|
+
font-weight: var(--ui-font-semibold);
|
|
85
85
|
line-height: var(--ui-line-height-tight);
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -90,11 +90,11 @@
|
|
|
90
90
|
place-items: center;
|
|
91
91
|
flex: none;
|
|
92
92
|
margin-inline-start: auto;
|
|
93
|
-
inline-size: var(--ui-control-size-sm
|
|
94
|
-
block-size: var(--ui-control-size-sm
|
|
93
|
+
inline-size: var(--ui-control-size-sm);
|
|
94
|
+
block-size: var(--ui-control-size-sm);
|
|
95
95
|
padding: 0;
|
|
96
96
|
border: 0;
|
|
97
|
-
border-radius: var(--ui-radius-round
|
|
97
|
+
border-radius: var(--ui-radius-round);
|
|
98
98
|
background: transparent;
|
|
99
99
|
color: var(--ui-text-secondary);
|
|
100
100
|
cursor: pointer;
|
|
@@ -123,10 +123,23 @@
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
.close:focus-visible {
|
|
126
|
-
outline: 2px solid var(--ui-focus-ring
|
|
126
|
+
outline: 2px solid var(--ui-focus-ring);
|
|
127
127
|
outline-offset: 2px;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
/* A touch target, like Button on coarse pointers. */
|
|
131
|
+
@media (pointer: coarse) {
|
|
132
|
+
.close {
|
|
133
|
+
inline-size: var(--ui-control-min-block-size);
|
|
134
|
+
block-size: var(--ui-control-min-block-size);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
html[data-ui-input-modality="touch"] :host .close {
|
|
139
|
+
inline-size: var(--ui-control-min-block-size);
|
|
140
|
+
block-size: var(--ui-control-min-block-size);
|
|
141
|
+
}
|
|
142
|
+
|
|
130
143
|
.body {
|
|
131
144
|
flex: 1 1 auto;
|
|
132
145
|
min-block-size: 0;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template component="ui-disclosure" controller="./ui-disclosure.js">
|
|
2
2
|
<defs>
|
|
3
|
+
<prop name="density" type="comfortable | compact" default="comfortable">Compact trades padding and type size for rows that fit more on screen.</prop>
|
|
3
4
|
<prop name="summary" type="string" default="Details">summary token.</prop>
|
|
4
5
|
<prop name="open" type="boolean" default="false">open token.</prop>
|
|
5
6
|
<prop name="disabled" type="boolean" default="false">disabled token.</prop>
|
|
@@ -22,6 +23,19 @@
|
|
|
22
23
|
<div class="panel" :id="contentId" :inert="not internalOpen"><div class="panel-inner"><slot></slot></div></div>
|
|
23
24
|
</div>
|
|
24
25
|
<style>
|
|
26
|
+
/* Density resolves into the summary row's own values; the public tokens still override them. */
|
|
27
|
+
:host {
|
|
28
|
+
--_trigger-min-block-size: var(--ui-control-size);
|
|
29
|
+
--_trigger-padding-block: var(--ui-space-2);
|
|
30
|
+
--_trigger-padding-inline: var(--ui-space-3);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host-state([density="compact"]) {
|
|
34
|
+
--_trigger-min-block-size: var(--ui-control-size-sm);
|
|
35
|
+
--_trigger-padding-block: var(--ui-space-1);
|
|
36
|
+
--_trigger-padding-inline: var(--ui-space-2);
|
|
37
|
+
}
|
|
38
|
+
|
|
25
39
|
/* An accordion row, not a field: no enclosing box, just a divider, so it never reads as a
|
|
26
40
|
* select or combobox. Stacked disclosures share their dividers. */
|
|
27
41
|
:host {
|
|
@@ -38,16 +52,17 @@
|
|
|
38
52
|
gap: var(--ui-space-3);
|
|
39
53
|
align-items: center;
|
|
40
54
|
inline-size: 100%;
|
|
41
|
-
min-block-size:
|
|
42
|
-
padding: var(--ui-
|
|
55
|
+
min-block-size: var(--ui-disclosure-trigger-min-block-size, var(--_trigger-min-block-size));
|
|
56
|
+
padding: var(--ui-disclosure-trigger-padding-block, var(--_trigger-padding-block))
|
|
57
|
+
var(--ui-disclosure-trigger-padding-inline, var(--_trigger-padding-inline));
|
|
43
58
|
border: 0;
|
|
44
59
|
background: transparent;
|
|
45
60
|
color: inherit;
|
|
46
61
|
font: inherit;
|
|
47
|
-
font-weight: var(--ui-font-semibold
|
|
62
|
+
font-weight: var(--ui-font-semibold);
|
|
48
63
|
text-align: start;
|
|
49
64
|
cursor: pointer;
|
|
50
|
-
border-radius: var(--ui-radius-
|
|
65
|
+
border-radius: var(--ui-radius-sm);
|
|
51
66
|
transition: background-color var(--ui-motion-fast) var(--ui-motion-ease);
|
|
52
67
|
}
|
|
53
68
|
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
.input {
|
|
53
53
|
grid-area: 1 / 1;
|
|
54
54
|
box-sizing: border-box;
|
|
55
|
-
min-block-size: var(--ui-control-size-sm
|
|
55
|
+
min-block-size: var(--ui-control-size-sm);
|
|
56
56
|
margin: 0;
|
|
57
57
|
padding: var(--ui-space-1) var(--ui-space-2);
|
|
58
58
|
border: 1px solid transparent;
|
|
59
|
-
border-radius: var(--ui-radius-
|
|
59
|
+
border-radius: var(--ui-radius-md);
|
|
60
60
|
font: inherit;
|
|
61
61
|
line-height: var(--ui-line-height-md);
|
|
62
62
|
color: inherit;
|
|
@@ -126,13 +126,13 @@
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
.actions button {
|
|
129
|
-
min-block-size: var(--ui-control-size-sm
|
|
129
|
+
min-block-size: var(--ui-control-size-sm);
|
|
130
130
|
padding: 0 var(--ui-space-3);
|
|
131
131
|
border: 1px solid var(--ui-border-strong);
|
|
132
|
-
border-radius: var(--ui-radius-
|
|
132
|
+
border-radius: var(--ui-radius-md);
|
|
133
133
|
background: var(--ui-surface-elevated);
|
|
134
|
-
background-image: var(--ui-raised-highlight
|
|
135
|
-
box-shadow: var(--ui-raised
|
|
134
|
+
background-image: var(--ui-raised-highlight);
|
|
135
|
+
box-shadow: var(--ui-raised);
|
|
136
136
|
color: inherit;
|
|
137
137
|
font: inherit;
|
|
138
138
|
font-size: var(--ui-font-size-sm);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<prop name="maxRows" type="integer" default="8">The most rows the grid offers (at most 10).</prop>
|
|
5
5
|
<prop name="maxCols" type="integer" default="8">The most columns the grid offers (at most 10).</prop>
|
|
6
6
|
<prop name="headerRow" type="boolean" default="false">Whether table insertion initially includes a header row.</prop>
|
|
7
|
-
<state name="cells" :value="[]"></state>
|
|
7
|
+
<state name="cells" type="list(object({ key: string, row: integer, col: integer, label: string, selected: boolean }))" :value="[]"></state>
|
|
8
8
|
<state name="rows" :value="8"></state>
|
|
9
9
|
<state name="cols" :value="8"></state>
|
|
10
10
|
<state name="hint" :value="''"></state>
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
</div>
|
|
33
33
|
<style>
|
|
34
34
|
:host {
|
|
35
|
-
padding: var(--ui-space-3
|
|
36
|
-
background: var(--ui-surface
|
|
37
|
-
border: 1px solid var(--ui-border
|
|
38
|
-
border-radius: var(--ui-radius-md
|
|
35
|
+
padding: var(--ui-space-3);
|
|
36
|
+
background: var(--ui-surface);
|
|
37
|
+
border: 1px solid var(--ui-border);
|
|
38
|
+
border-radius: var(--ui-radius-md);
|
|
39
39
|
box-shadow: var(--ui-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.hint {
|
|
43
|
-
margin: 0 0 var(--ui-space-2
|
|
44
|
-
font-size: var(--ui-
|
|
45
|
-
color: var(--ui-text-muted
|
|
43
|
+
margin: 0 0 var(--ui-space-2);
|
|
44
|
+
font-size: var(--ui-font-size-sm);
|
|
45
|
+
color: var(--ui-text-muted);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.grid {
|
|
@@ -50,39 +50,39 @@
|
|
|
50
50
|
grid-template-columns: repeat(var(--ui-editor-table-grid-cols, 8), 1.25rem);
|
|
51
51
|
grid-template-rows: repeat(var(--ui-editor-table-grid-rows, 8), 1.25rem);
|
|
52
52
|
gap: 2px;
|
|
53
|
-
margin-bottom: var(--ui-space-2
|
|
53
|
+
margin-bottom: var(--ui-space-2);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.cell {
|
|
57
57
|
width: 1.25rem;
|
|
58
58
|
height: 1.25rem;
|
|
59
59
|
padding: 0;
|
|
60
|
-
border: 1px solid var(--ui-border
|
|
60
|
+
border: 1px solid var(--ui-border);
|
|
61
61
|
border-radius: 2px;
|
|
62
|
-
background: var(--ui-surface
|
|
62
|
+
background: var(--ui-surface);
|
|
63
63
|
cursor: pointer;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.cell.selected {
|
|
67
|
-
background: var(--ui-accent-solid, var(--ui-accent
|
|
68
|
-
border-color: var(--ui-accent-solid, var(--ui-accent
|
|
67
|
+
background: var(--ui-accent-solid, var(--ui-accent));
|
|
68
|
+
border-color: var(--ui-accent-solid, var(--ui-accent));
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.header {
|
|
72
72
|
display: block;
|
|
73
|
-
margin-bottom: var(--ui-space-2
|
|
74
|
-
font-size: var(--ui-
|
|
73
|
+
margin-bottom: var(--ui-space-2);
|
|
74
|
+
font-size: var(--ui-font-size-sm);
|
|
75
75
|
cursor: pointer;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
:host .insert {
|
|
79
79
|
width: 100%;
|
|
80
|
-
padding: var(--ui-space-2
|
|
81
|
-
border: 1px solid var(--ui-border
|
|
82
|
-
border-radius: var(--ui-radius-sm
|
|
83
|
-
background: var(--ui-accent-solid, var(--ui-accent
|
|
84
|
-
color: var(--ui-accent-contrast
|
|
85
|
-
font-size: var(--ui-
|
|
80
|
+
padding: var(--ui-space-2) var(--ui-space-3);
|
|
81
|
+
border: 1px solid var(--ui-border);
|
|
82
|
+
border-radius: var(--ui-radius-sm);
|
|
83
|
+
background: var(--ui-accent-solid, var(--ui-accent));
|
|
84
|
+
color: var(--ui-accent-contrast);
|
|
85
|
+
font-size: var(--ui-font-size-sm);
|
|
86
86
|
cursor: pointer;
|
|
87
87
|
}
|
|
88
88
|
|