@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
|
@@ -8,10 +8,14 @@
|
|
|
8
8
|
name="actions"
|
|
9
9
|
type="list(align-left | align-center | align-right | background-none | background-gray | background-yellow | background-blue | background-green | background-red | add-row-before | add-row-after | add-column-before | add-column-after | clear-cells | merge-cells | split-cell | delete-row | delete-column | delete-table)"
|
|
10
10
|
>The complete set of commands the current selection permits.</prop>
|
|
11
|
-
<state name="alignments" :value="[]"></state>
|
|
12
|
-
<state name="structure" :value="[]"></state>
|
|
13
|
-
<state name="swatches" :value="[]"></state>
|
|
14
|
-
<state
|
|
11
|
+
<state name="alignments" type="list(object({ action: align-left | align-center | align-right, label: string, active: boolean }))" :value="[]"></state>
|
|
12
|
+
<state name="structure" type="list(object({ action: add-row-after | add-column-after, label: string, icon: string }))" :value="[]"></state>
|
|
13
|
+
<state name="swatches" type="list(object({ action: string, label: string, color: string, selected: boolean }))" :value="[]"></state>
|
|
14
|
+
<state
|
|
15
|
+
name="sections"
|
|
16
|
+
type="list(object({ heading: string, items: list(object({ action: string, label: string, icon: string, danger: boolean })) }))"
|
|
17
|
+
:value="[]"
|
|
18
|
+
></state>
|
|
15
19
|
<state name="hasOverflow" :value="false"></state>
|
|
16
20
|
<state name="overflowOpen" :value="false"></state>
|
|
17
21
|
<event
|
|
@@ -97,13 +101,13 @@
|
|
|
97
101
|
|
|
98
102
|
.looma-editor__mobile-toolbar-shell :host button.active,
|
|
99
103
|
.looma-editor__mobile-toolbar-shell :host button.selected {
|
|
100
|
-
background: var(--ui-accent-soft, var(--ui-accent-subtle
|
|
104
|
+
background: var(--ui-accent-soft, var(--ui-accent-subtle));
|
|
101
105
|
}
|
|
102
106
|
|
|
103
107
|
.looma-editor__mobile-toolbar-shell :host .menu {
|
|
104
108
|
top: auto;
|
|
105
109
|
right: 0;
|
|
106
|
-
bottom: calc(100% + var(--ui-space-2
|
|
110
|
+
bottom: calc(100% + var(--ui-space-2));
|
|
107
111
|
max-height: min(50dvh, 22rem);
|
|
108
112
|
overflow-y: auto;
|
|
109
113
|
overscroll-behavior: contain;
|
|
@@ -111,11 +115,11 @@
|
|
|
111
115
|
:host {
|
|
112
116
|
display: inline-flex;
|
|
113
117
|
align-items: center;
|
|
114
|
-
gap: var(--ui-space-1
|
|
115
|
-
padding: var(--ui-space-1
|
|
116
|
-
background: color-mix(in srgb, var(--ui-surface
|
|
117
|
-
border: 1px solid var(--ui-border
|
|
118
|
-
border-radius: calc(var(--ui-radius-md
|
|
118
|
+
gap: var(--ui-space-1);
|
|
119
|
+
padding: var(--ui-space-1);
|
|
120
|
+
background: color-mix(in srgb, var(--ui-surface) 94%, transparent);
|
|
121
|
+
border: 1px solid var(--ui-border);
|
|
122
|
+
border-radius: calc(var(--ui-radius-md) + 2px);
|
|
119
123
|
box-shadow: var(--ui-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
|
|
120
124
|
backdrop-filter: blur(10px);
|
|
121
125
|
}
|
|
@@ -130,7 +134,7 @@
|
|
|
130
134
|
.sep {
|
|
131
135
|
width: 1px;
|
|
132
136
|
align-self: stretch;
|
|
133
|
-
background: var(--ui-border
|
|
137
|
+
background: var(--ui-border);
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
.overflow {
|
|
@@ -141,31 +145,31 @@
|
|
|
141
145
|
display: inline-flex;
|
|
142
146
|
align-items: center;
|
|
143
147
|
justify-content: center;
|
|
144
|
-
gap: var(--ui-space-
|
|
148
|
+
gap: var(--ui-space-2);
|
|
145
149
|
min-height: 32px;
|
|
146
150
|
border: 0;
|
|
147
|
-
border-radius: var(--ui-radius-sm
|
|
151
|
+
border-radius: var(--ui-radius-sm);
|
|
148
152
|
background: transparent;
|
|
149
|
-
color: var(--ui-text-primary
|
|
153
|
+
color: var(--ui-text-primary);
|
|
150
154
|
cursor: pointer;
|
|
151
|
-
font-size: var(--ui-
|
|
155
|
+
font-size: var(--ui-font-size-sm);
|
|
152
156
|
font-weight: 500;
|
|
153
157
|
line-height: 1;
|
|
154
|
-
padding: var(--ui-space-
|
|
158
|
+
padding: var(--ui-space-2) var(--ui-space-2);
|
|
155
159
|
white-space: nowrap;
|
|
156
160
|
}
|
|
157
161
|
|
|
158
162
|
:host button:hover {
|
|
159
|
-
background: var(--ui-surface-hover
|
|
163
|
+
background: var(--ui-surface-hover);
|
|
160
164
|
}
|
|
161
165
|
|
|
162
166
|
:host button.active {
|
|
163
|
-
background: var(--ui-accent-soft, var(--ui-accent-subtle
|
|
164
|
-
color: var(--ui-accent-active
|
|
167
|
+
background: var(--ui-accent-soft, var(--ui-accent-subtle));
|
|
168
|
+
color: var(--ui-accent-active);
|
|
165
169
|
}
|
|
166
170
|
|
|
167
171
|
.group button {
|
|
168
|
-
border-radius: var(--ui-radius-sm
|
|
172
|
+
border-radius: var(--ui-radius-sm);
|
|
169
173
|
}
|
|
170
174
|
|
|
171
175
|
.group button + button {
|
|
@@ -174,11 +178,11 @@
|
|
|
174
178
|
|
|
175
179
|
:host .more {
|
|
176
180
|
border: 0;
|
|
177
|
-
border-radius: var(--ui-radius-sm
|
|
181
|
+
border-radius: var(--ui-radius-sm);
|
|
178
182
|
}
|
|
179
183
|
|
|
180
184
|
:host button.danger {
|
|
181
|
-
color: var(--ui-danger
|
|
185
|
+
color: var(--ui-danger);
|
|
182
186
|
}
|
|
183
187
|
|
|
184
188
|
:host {
|
|
@@ -198,13 +202,13 @@
|
|
|
198
202
|
|
|
199
203
|
.menu {
|
|
200
204
|
position: absolute;
|
|
201
|
-
top: calc(100% + var(--ui-space-2
|
|
205
|
+
top: calc(100% + var(--ui-space-2));
|
|
202
206
|
right: 0;
|
|
203
207
|
min-width: 12rem;
|
|
204
|
-
padding: var(--ui-space-1
|
|
205
|
-
background: var(--ui-surface
|
|
206
|
-
border: 1px solid var(--ui-border
|
|
207
|
-
border-radius: var(--ui-radius-md
|
|
208
|
+
padding: var(--ui-space-1);
|
|
209
|
+
background: var(--ui-surface);
|
|
210
|
+
border: 1px solid var(--ui-border);
|
|
211
|
+
border-radius: var(--ui-radius-md);
|
|
208
212
|
box-shadow: var(--ui-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
|
|
209
213
|
display: flex;
|
|
210
214
|
flex-direction: column;
|
|
@@ -213,18 +217,18 @@
|
|
|
213
217
|
}
|
|
214
218
|
|
|
215
219
|
.menu-section + .menu-section {
|
|
216
|
-
margin-top: var(--ui-space-1
|
|
217
|
-
padding-top: var(--ui-space-1
|
|
218
|
-
border-top: 1px solid color-mix(in srgb, var(--ui-border
|
|
220
|
+
margin-top: var(--ui-space-1);
|
|
221
|
+
padding-top: var(--ui-space-1);
|
|
222
|
+
border-top: 1px solid color-mix(in srgb, var(--ui-border) 80%, transparent);
|
|
219
223
|
}
|
|
220
224
|
|
|
221
225
|
.menu-heading {
|
|
222
|
-
padding: var(--ui-space-1
|
|
226
|
+
padding: var(--ui-space-1) var(--ui-space-2);
|
|
223
227
|
font-size: 0.6875rem;
|
|
224
228
|
font-weight: 700;
|
|
225
229
|
letter-spacing: 0.05em;
|
|
226
230
|
text-transform: uppercase;
|
|
227
|
-
color: var(--ui-text-muted
|
|
231
|
+
color: var(--ui-text-muted);
|
|
228
232
|
}
|
|
229
233
|
|
|
230
234
|
.menu button {
|
|
@@ -241,7 +245,7 @@
|
|
|
241
245
|
}
|
|
242
246
|
|
|
243
247
|
:host .swatch-button {
|
|
244
|
-
gap: var(--ui-space-1
|
|
248
|
+
gap: var(--ui-space-1);
|
|
245
249
|
justify-content: flex-start;
|
|
246
250
|
}
|
|
247
251
|
|
|
@@ -249,19 +253,19 @@
|
|
|
249
253
|
width: 14px;
|
|
250
254
|
height: 14px;
|
|
251
255
|
flex: 0 0 14px;
|
|
252
|
-
border: 1px solid color-mix(in srgb, var(--ui-border
|
|
256
|
+
border: 1px solid color-mix(in srgb, var(--ui-border) 80%, #000);
|
|
253
257
|
border-radius: 3px;
|
|
254
258
|
background: var(--ui-editor-table-toolbar-swatch);
|
|
255
259
|
}
|
|
256
260
|
|
|
257
261
|
.swatch.default {
|
|
258
262
|
background:
|
|
259
|
-
linear-gradient(135deg, transparent 44%, var(--ui-danger
|
|
260
|
-
var(--ui-surface
|
|
263
|
+
linear-gradient(135deg, transparent 44%, var(--ui-danger) 46% 54%, transparent 56%),
|
|
264
|
+
var(--ui-surface);
|
|
261
265
|
}
|
|
262
266
|
|
|
263
267
|
.swatch-button.selected {
|
|
264
|
-
background: var(--ui-accent-soft, var(--ui-accent-subtle
|
|
268
|
+
background: var(--ui-accent-soft, var(--ui-accent-subtle));
|
|
265
269
|
}
|
|
266
270
|
|
|
267
271
|
:host[hidden] {
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
overflow-x: auto;
|
|
18
18
|
scrollbar-width: none;
|
|
19
19
|
white-space: nowrap;
|
|
20
|
-
background: var(--ui-editor-toolbar-
|
|
21
|
-
border-bottom: 1px solid var(--ui-editor-toolbar-border, var(--ui-border
|
|
20
|
+
background: var(--ui-editor-toolbar-surface, var(--ui-surface));
|
|
21
|
+
border-bottom: 1px solid var(--ui-editor-toolbar-border, var(--ui-border));
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
:host::-webkit-scrollbar {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
:slotted(.divider) {
|
|
33
33
|
width: 1px;
|
|
34
34
|
height: 20px;
|
|
35
|
-
background: var(--ui-editor-toolbar-divider, var(--ui-border
|
|
35
|
+
background: var(--ui-editor-toolbar-divider, var(--ui-border));
|
|
36
36
|
flex-shrink: 0;
|
|
37
37
|
margin: 0 var(--ui-editor-toolbar-divider-margin, 4px);
|
|
38
38
|
}
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
min-height: auto;
|
|
46
46
|
padding: var(--ui-editor-toolbar-floating-padding, 4px);
|
|
47
47
|
overflow-x: visible;
|
|
48
|
-
background: color-mix(in srgb, var(--ui-editor-toolbar-
|
|
49
|
-
border: 1px solid var(--ui-editor-toolbar-border, var(--ui-border
|
|
50
|
-
border-radius: var(--ui-editor-toolbar-floating-radius, var(--ui-radius-lg
|
|
48
|
+
background: color-mix(in srgb, var(--ui-editor-toolbar-surface, var(--ui-surface)) 96%, transparent);
|
|
49
|
+
border: 1px solid var(--ui-editor-toolbar-border, var(--ui-border));
|
|
50
|
+
border-radius: var(--ui-editor-toolbar-floating-radius, var(--ui-radius-lg));
|
|
51
51
|
box-shadow: var(--ui-editor-toolbar-floating-shadow, var(--ui-shadow-lg, 0 10px 24px rgb(0 0 0 / 0.12)));
|
|
52
52
|
backdrop-filter: blur(10px);
|
|
53
53
|
}
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
left: 0;
|
|
61
61
|
right: 0;
|
|
62
62
|
min-height: var(--ui-editor-toolbar-mobile-min-height, 56px);
|
|
63
|
-
border-top: 1px solid var(--ui-editor-toolbar-border, var(--ui-border
|
|
63
|
+
border-top: 1px solid var(--ui-editor-toolbar-border, var(--ui-border));
|
|
64
64
|
border-bottom: none;
|
|
65
65
|
box-shadow: var(--ui-editor-toolbar-mobile-shadow, 0 -2px 8px rgb(0 0 0 / 0.06));
|
|
66
66
|
}
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
position: static;
|
|
70
70
|
inset: auto;
|
|
71
71
|
min-height: auto;
|
|
72
|
-
border: 1px solid var(--ui-editor-toolbar-border, var(--ui-border
|
|
73
|
-
border-radius: var(--ui-editor-toolbar-floating-radius, var(--ui-radius-lg
|
|
72
|
+
border: 1px solid var(--ui-editor-toolbar-border, var(--ui-border));
|
|
73
|
+
border-radius: var(--ui-editor-toolbar-floating-radius, var(--ui-radius-lg));
|
|
74
74
|
box-shadow: var(--ui-editor-toolbar-floating-shadow, var(--ui-shadow-lg, 0 10px 24px rgb(0 0 0 / 0.12)));
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
<style>
|
|
9
9
|
:host {
|
|
10
10
|
position: fixed;
|
|
11
|
-
inset-block-end: calc(var(--ui-floating-action-button-
|
|
11
|
+
inset-block-end: calc(var(--ui-floating-action-button-inset-block-end, var(--ui-space-6)) + env(safe-area-inset-bottom));
|
|
12
12
|
inset-inline-end: max(
|
|
13
|
-
var(--ui-floating-action-button-inline-end, var(--ui-space-5
|
|
13
|
+
var(--ui-floating-action-button-inset-inline-end, var(--ui-space-5)),
|
|
14
14
|
env(safe-area-inset-right)
|
|
15
15
|
);
|
|
16
|
-
inline-size: var(--ui-
|
|
17
|
-
block-size: var(--ui-
|
|
16
|
+
inline-size: var(--ui-control-min-block-size);
|
|
17
|
+
block-size: var(--ui-control-min-block-size);
|
|
18
18
|
display: inline-flex;
|
|
19
19
|
z-index: var(--ui-floating-action-button-z-index, 100);
|
|
20
20
|
}
|
|
@@ -28,33 +28,27 @@
|
|
|
28
28
|
display: inline-flex;
|
|
29
29
|
align-items: center;
|
|
30
30
|
justify-content: center;
|
|
31
|
-
background: var(--ui-
|
|
32
|
-
color: var(--ui-
|
|
33
|
-
box-shadow: var(
|
|
34
|
-
--ui-floating-action-button-shadow,
|
|
35
|
-
0 4px 12px color-mix(in srgb, var(--ui-accent-solid) 40%, transparent)
|
|
36
|
-
);
|
|
31
|
+
background: var(--ui-accent);
|
|
32
|
+
color: var(--ui-on-accent);
|
|
33
|
+
box-shadow: 0 4px 12px color-mix(in srgb, var(--ui-accent) 40%, transparent);
|
|
37
34
|
cursor: pointer;
|
|
38
35
|
transition:
|
|
39
|
-
background-color var(--ui-motion-fast
|
|
40
|
-
transform var(--ui-motion-fast
|
|
41
|
-
box-shadow var(--ui-motion-fast
|
|
36
|
+
background-color var(--ui-motion-fast) var(--ui-motion-ease),
|
|
37
|
+
transform var(--ui-motion-fast) var(--ui-motion-ease),
|
|
38
|
+
box-shadow var(--ui-motion-fast) var(--ui-motion-ease);
|
|
42
39
|
}
|
|
43
40
|
|
|
44
41
|
:host:hover:enabled {
|
|
45
|
-
background: var(--ui-
|
|
46
|
-
box-shadow: var(
|
|
47
|
-
--ui-floating-action-button-hover-shadow,
|
|
48
|
-
0 6px 16px color-mix(in srgb, var(--ui-accent-solid) 50%, transparent)
|
|
49
|
-
);
|
|
42
|
+
background: var(--ui-accent-hover);
|
|
43
|
+
box-shadow: 0 6px 16px color-mix(in srgb, var(--ui-accent) 50%, transparent);
|
|
50
44
|
}
|
|
51
45
|
|
|
52
46
|
:host:active:enabled {
|
|
53
|
-
transform: scale(
|
|
47
|
+
transform: scale(0.94);
|
|
54
48
|
}
|
|
55
49
|
|
|
56
50
|
:host:focus-visible {
|
|
57
|
-
outline: 2px solid var(--ui-focus-ring
|
|
51
|
+
outline: 2px solid var(--ui-focus-ring);
|
|
58
52
|
outline-offset: 2px;
|
|
59
53
|
}
|
|
60
54
|
|
|
@@ -64,8 +58,8 @@
|
|
|
64
58
|
}
|
|
65
59
|
|
|
66
60
|
:slotted(svg) {
|
|
67
|
-
inline-size: var(--ui-
|
|
68
|
-
block-size: var(--ui-
|
|
61
|
+
inline-size: var(--ui-icon-size-lg);
|
|
62
|
+
block-size: var(--ui-icon-size-lg);
|
|
69
63
|
flex-shrink: 0;
|
|
70
64
|
}
|
|
71
65
|
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
<prop name="required" type="boolean" default="false">required token.</prop>
|
|
6
6
|
</defs>
|
|
7
7
|
<div>
|
|
8
|
-
<slot name="label"></slot>
|
|
8
|
+
<div class="label"><slot name="label"></slot></div>
|
|
9
9
|
<slot></slot>
|
|
10
|
-
<slot name="help"></slot>
|
|
11
|
-
<slot name="error"></slot>
|
|
10
|
+
<div class="help"><slot name="help"></slot></div>
|
|
11
|
+
<div class="error"><slot name="error"></slot></div>
|
|
12
12
|
</div>
|
|
13
13
|
<style>
|
|
14
14
|
:host {
|
|
@@ -19,19 +19,30 @@
|
|
|
19
19
|
color: var(--ui-text-primary);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
/* Each named region styles whatever fills it, however it was slotted (slot="…" in HTML, #label
|
|
23
|
+
in Vue), and generates no box of its own, so an empty region adds no gap. */
|
|
24
|
+
.label,
|
|
25
|
+
.help,
|
|
26
|
+
.error {
|
|
27
|
+
display: contents;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.label {
|
|
23
31
|
color: var(--ui-text-secondary);
|
|
24
32
|
font-size: 0.95rem;
|
|
25
33
|
}
|
|
26
34
|
|
|
27
|
-
|
|
28
|
-
min-block-size: var(--ui-form-field-help-min-block-size, 0);
|
|
35
|
+
.help {
|
|
29
36
|
color: var(--ui-text-muted);
|
|
30
37
|
font-size: 0.875rem;
|
|
31
38
|
line-height: var(--ui-line-height-md);
|
|
32
39
|
}
|
|
33
40
|
|
|
34
|
-
:slotted(
|
|
41
|
+
.help > :slotted(*) {
|
|
42
|
+
min-block-size: var(--ui-form-field-help-min-block-size, 0);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.error,
|
|
35
46
|
:slotted([role="alert"]) {
|
|
36
47
|
color: var(--ui-accent-active);
|
|
37
48
|
font-size: 0.875rem;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<div><slot></slot></div>
|
|
7
7
|
<style>
|
|
8
8
|
:host {
|
|
9
|
-
--_grid-gap: var(--ui-space-4
|
|
9
|
+
--_grid-gap: var(--ui-space-4);
|
|
10
10
|
--_grid-min: 12rem;
|
|
11
11
|
display: grid;
|
|
12
12
|
gap: var(--ui-grid-gap, var(--_grid-gap));
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
:host-state([gap="xs"]) {
|
|
20
|
-
--_grid-gap: var(--ui-space-2
|
|
20
|
+
--_grid-gap: var(--ui-space-2);
|
|
21
21
|
}
|
|
22
22
|
:host-state([gap="s"]) {
|
|
23
|
-
--_grid-gap: var(--ui-space-3
|
|
23
|
+
--_grid-gap: var(--ui-space-3);
|
|
24
24
|
}
|
|
25
25
|
:host-state([gap="m"]) {
|
|
26
|
-
--_grid-gap: var(--ui-space-4
|
|
26
|
+
--_grid-gap: var(--ui-space-4);
|
|
27
27
|
}
|
|
28
28
|
:host-state([gap="l"]) {
|
|
29
|
-
--_grid-gap: var(--ui-space-5
|
|
29
|
+
--_grid-gap: var(--ui-space-5);
|
|
30
30
|
}
|
|
31
31
|
:host-state([gap="xl"]) {
|
|
32
|
-
--_grid-gap: var(--ui-space-6
|
|
32
|
+
--_grid-gap: var(--ui-space-6);
|
|
33
33
|
}
|
|
34
34
|
:host-state([min="md"]) {
|
|
35
35
|
--_grid-min: 16rem;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<template component="ui-icon" controller="./ui-icon.js">
|
|
2
2
|
<defs>
|
|
3
3
|
<prop name="name" type="string" default="">The icon's name.</prop>
|
|
4
|
-
<state
|
|
4
|
+
<state
|
|
5
|
+
name="shapes"
|
|
6
|
+
type="list(object({ tag: path | circle | rect, d?: string, cx?: string, cy?: string, r?: string, x?: string, y?: string, width?: string, height?: string, rx?: string }))"
|
|
7
|
+
:value="[]"
|
|
8
|
+
></state>
|
|
5
9
|
</defs>
|
|
6
10
|
<span aria-hidden="true">
|
|
7
11
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" focusable="false">
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
position: absolute;
|
|
24
24
|
inset: 50% auto auto 50%;
|
|
25
25
|
z-index: 1;
|
|
26
|
-
inline-size: var(--ui-affordance-guide-size
|
|
27
|
-
block-size: var(--ui-affordance-guide-size
|
|
28
|
-
border-radius: var(--ui-radius-round
|
|
26
|
+
inline-size: var(--ui-affordance-guide-size);
|
|
27
|
+
block-size: var(--ui-affordance-guide-size);
|
|
28
|
+
border-radius: var(--ui-radius-round);
|
|
29
29
|
background: var(--ui-affordance-guide-color, var(--ui-border-strong));
|
|
30
|
-
opacity: var(--ui-affordance-guide-opacity
|
|
30
|
+
opacity: var(--ui-affordance-guide-opacity);
|
|
31
31
|
transform: translate(-50%, -50%);
|
|
32
32
|
transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
|
|
33
33
|
pointer-events: none;
|
|
@@ -50,16 +50,18 @@
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
:host {
|
|
53
|
+
/* The size prop resolves here; --ui-icon-button-size overrides it on an element. */
|
|
54
|
+
--_size: 2rem;
|
|
53
55
|
appearance: none;
|
|
54
|
-
inline-size: var(--ui-icon-button-size,
|
|
55
|
-
block-size: var(--ui-icon-button-size,
|
|
56
|
-
min-inline-size: var(--ui-icon-button-size,
|
|
57
|
-
min-block-size: var(--ui-icon-button-size,
|
|
56
|
+
inline-size: var(--ui-icon-button-size, var(--_size));
|
|
57
|
+
block-size: var(--ui-icon-button-size, var(--_size));
|
|
58
|
+
min-inline-size: var(--ui-icon-button-size, var(--_size));
|
|
59
|
+
min-block-size: var(--ui-icon-button-size, var(--_size));
|
|
58
60
|
padding: 0;
|
|
59
61
|
margin: 0;
|
|
60
62
|
border: 1px solid transparent;
|
|
61
|
-
border-radius: var(--ui-icon-button-radius, var(--ui-radius-
|
|
62
|
-
background: var(--ui-icon-button-
|
|
63
|
+
border-radius: var(--ui-icon-button-radius, var(--ui-radius-md));
|
|
64
|
+
background: var(--ui-icon-button-surface, transparent);
|
|
63
65
|
color: inherit;
|
|
64
66
|
display: inline-flex;
|
|
65
67
|
align-items: center;
|
|
@@ -79,33 +81,65 @@
|
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
|
|
84
|
+
/* A touch target without a bigger button: an invisible hit area, at least the control
|
|
85
|
+
minimum, centred on the button (::before is the anticipatory guide). */
|
|
86
|
+
@media (pointer: coarse) {
|
|
87
|
+
:host {
|
|
88
|
+
position: relative;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host::after {
|
|
92
|
+
content: "";
|
|
93
|
+
position: absolute;
|
|
94
|
+
inset: 50% auto auto 50%;
|
|
95
|
+
inline-size: max(100%, var(--ui-control-min-block-size));
|
|
96
|
+
block-size: max(100%, var(--ui-control-min-block-size));
|
|
97
|
+
transform: translate(-50%, -50%);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
html[data-ui-input-modality="touch"] :host {
|
|
102
|
+
position: relative;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
html[data-ui-input-modality="touch"] :host::after {
|
|
106
|
+
content: "";
|
|
107
|
+
position: absolute;
|
|
108
|
+
inset: 50% auto auto 50%;
|
|
109
|
+
inline-size: max(100%, var(--ui-control-min-block-size));
|
|
110
|
+
block-size: max(100%, var(--ui-control-min-block-size));
|
|
111
|
+
transform: translate(-50%, -50%);
|
|
112
|
+
}
|
|
113
|
+
|
|
82
114
|
:host-state([size="sm"]) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
min-
|
|
115
|
+
--_size: 1.75rem;
|
|
116
|
+
inline-size: var(--ui-icon-button-size, var(--_size));
|
|
117
|
+
block-size: var(--ui-icon-button-size, var(--_size));
|
|
118
|
+
min-inline-size: var(--ui-icon-button-size, var(--_size));
|
|
119
|
+
min-block-size: var(--ui-icon-button-size, var(--_size));
|
|
87
120
|
}
|
|
88
121
|
|
|
89
122
|
:host-state([size="lg"]) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
min-
|
|
123
|
+
--_size: 2.5rem;
|
|
124
|
+
inline-size: var(--ui-icon-button-size, var(--_size));
|
|
125
|
+
block-size: var(--ui-icon-button-size, var(--_size));
|
|
126
|
+
min-inline-size: var(--ui-icon-button-size, var(--_size));
|
|
127
|
+
min-block-size: var(--ui-icon-button-size, var(--_size));
|
|
94
128
|
}
|
|
95
129
|
|
|
96
130
|
:host-state([round]) {
|
|
97
|
-
border-radius: var(--ui-radius-round
|
|
131
|
+
border-radius: var(--ui-radius-round);
|
|
98
132
|
}
|
|
99
133
|
|
|
100
134
|
:host-state([variant="outline"]) {
|
|
101
135
|
border-color: var(--ui-icon-button-border, var(--ui-border-default));
|
|
102
|
-
background: var(--ui-icon-button-outline-
|
|
103
|
-
color: var(--ui-icon-button-outline-
|
|
136
|
+
background: var(--ui-icon-button-outline-surface, var(--ui-surface-default));
|
|
137
|
+
color: var(--ui-icon-button-outline-text, var(--ui-text-primary));
|
|
104
138
|
}
|
|
105
139
|
|
|
106
140
|
:host-state([variant="solid"]) {
|
|
107
|
-
background: var(--ui-icon-button-solid-
|
|
108
|
-
color: var(--ui-icon-button-solid-
|
|
141
|
+
background: var(--ui-icon-button-solid-surface, var(--ui-accent-solid));
|
|
142
|
+
color: var(--ui-icon-button-solid-text, var(--ui-text-on-accent));
|
|
109
143
|
box-shadow: var(
|
|
110
144
|
--ui-icon-button-solid-shadow,
|
|
111
145
|
0 1px 2px color-mix(in srgb, var(--ui-accent-solid) 18%, transparent)
|
|
@@ -114,8 +148,8 @@
|
|
|
114
148
|
|
|
115
149
|
:host:hover:enabled {
|
|
116
150
|
/* Derived from the text colour so the ghost hover shows on any background. */
|
|
117
|
-
background: var(--ui-icon-button-hover-
|
|
118
|
-
color: var(--ui-icon-button-hover-
|
|
151
|
+
background: var(--ui-icon-button-hover-surface, color-mix(in srgb, currentColor 8%, transparent));
|
|
152
|
+
color: var(--ui-icon-button-hover-text, var(--ui-text-primary));
|
|
119
153
|
}
|
|
120
154
|
|
|
121
155
|
:host-state([variant="outline"]):hover:enabled {
|
|
@@ -123,7 +157,7 @@
|
|
|
123
157
|
}
|
|
124
158
|
|
|
125
159
|
:host-state([variant="solid"]):hover:enabled {
|
|
126
|
-
background: var(--ui-icon-button-solid-hover-
|
|
160
|
+
background: var(--ui-icon-button-solid-hover-surface, var(--ui-accent-hover));
|
|
127
161
|
}
|
|
128
162
|
|
|
129
163
|
:host:active:enabled {
|
|
@@ -138,31 +172,31 @@
|
|
|
138
172
|
/* Disabled colours fall back to each variant's own; ghost takes only the icon colour. */
|
|
139
173
|
:host:disabled {
|
|
140
174
|
opacity: var(--ui-icon-button-disabled-opacity, 0.6);
|
|
141
|
-
color: var(--ui-icon-button-disabled-
|
|
175
|
+
color: var(--ui-icon-button-disabled-text, inherit);
|
|
142
176
|
cursor: not-allowed;
|
|
143
177
|
}
|
|
144
178
|
|
|
145
179
|
:host-state([variant="outline"]):disabled {
|
|
146
180
|
border-color: var(--ui-icon-button-disabled-border, var(--ui-icon-button-border, var(--ui-border-default)));
|
|
147
|
-
background-color: var(--ui-icon-button-disabled-
|
|
148
|
-
color: var(--ui-icon-button-disabled-
|
|
181
|
+
background-color: var(--ui-icon-button-disabled-surface, var(--ui-icon-button-outline-surface, var(--ui-surface-default)));
|
|
182
|
+
color: var(--ui-icon-button-disabled-text, var(--ui-icon-button-outline-text, var(--ui-text-primary)));
|
|
149
183
|
}
|
|
150
184
|
|
|
151
185
|
:host-state([variant="solid"]):disabled {
|
|
152
|
-
background-color: var(--ui-icon-button-disabled-
|
|
153
|
-
color: var(--ui-icon-button-disabled-
|
|
186
|
+
background-color: var(--ui-icon-button-disabled-surface, var(--ui-icon-button-solid-surface, var(--ui-accent-solid)));
|
|
187
|
+
color: var(--ui-icon-button-disabled-text, var(--ui-icon-button-solid-text, var(--ui-text-on-accent)));
|
|
154
188
|
}
|
|
155
189
|
|
|
156
190
|
:host {
|
|
157
|
-
--_icon-button-icon-default: var(--ui-icon-size-md
|
|
191
|
+
--_icon-button-icon-default: var(--ui-icon-size-md);
|
|
158
192
|
}
|
|
159
193
|
|
|
160
194
|
:host-state([size="sm"]) {
|
|
161
|
-
--_icon-button-icon-default: var(--ui-icon-size-sm
|
|
195
|
+
--_icon-button-icon-default: var(--ui-icon-size-sm);
|
|
162
196
|
}
|
|
163
197
|
|
|
164
198
|
:host-state([size="lg"]) {
|
|
165
|
-
--_icon-button-icon-default: var(--ui-icon-size-lg
|
|
199
|
+
--_icon-button-icon-default: var(--ui-icon-size-lg);
|
|
166
200
|
}
|
|
167
201
|
|
|
168
202
|
:slotted(svg) {
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
display: inline-block;
|
|
14
14
|
inline-size: 100%;
|
|
15
15
|
min-inline-size: 0;
|
|
16
|
-
min-block-size: var(--ui-control-size-md
|
|
16
|
+
min-block-size: var(--ui-control-size-md);
|
|
17
17
|
margin: 0;
|
|
18
18
|
padding: var(--ui-space-2) var(--ui-space-3);
|
|
19
19
|
appearance: none;
|
|
20
20
|
border: 1px solid var(--ui-control-border, var(--ui-border-strong));
|
|
21
|
-
border-radius: var(--ui-input-radius, var(--ui-radius-
|
|
21
|
+
border-radius: var(--ui-input-radius, var(--ui-radius-md));
|
|
22
22
|
background: var(--ui-control-surface, var(--ui-surface-elevated));
|
|
23
23
|
color: var(--ui-text-primary);
|
|
24
24
|
font: inherit;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template component="ui-menu" controller="./ui-menu.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="open" type="boolean" default="false">Whether the menu is open initially or when set externally.</prop>
|
|
4
5
|
<prop name="for" type="string" default="">ID of the control that toggles and anchors the menu.</prop>
|
|
5
6
|
<prop name="placement" type="string" default="bottom-start">Positions an associated menu relative to its trigger.</prop>
|
|
@@ -13,13 +14,23 @@
|
|
|
13
14
|
</defs>
|
|
14
15
|
<div role="menu" aria-orientation="vertical"><div class="surface"><slot></slot></div></div>
|
|
15
16
|
<style>
|
|
17
|
+
/* Compact sets the part tokens its items read, so nothing has to rescale a global. */
|
|
18
|
+
:host-state([density="compact"]) {
|
|
19
|
+
--ui-menu-item-padding-block: var(--ui-space-1);
|
|
20
|
+
--ui-menu-item-padding-inline: var(--ui-space-2);
|
|
21
|
+
--ui-menu-item-font-size: var(--ui-font-size-sm);
|
|
22
|
+
--ui-menu-item-radius: var(--ui-radius-sm);
|
|
23
|
+
padding: var(--ui-space-1);
|
|
24
|
+
gap: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
16
27
|
:host {
|
|
17
28
|
display: flex;
|
|
18
29
|
flex-direction: column;
|
|
19
30
|
box-sizing: border-box;
|
|
20
31
|
inline-size: max-content;
|
|
21
|
-
min-inline-size: min(12rem, calc(100vw - var(--ui-menu-viewport-gap, var(--ui-space-2
|
|
22
|
-
max-inline-size: calc(100vw - var(--ui-menu-viewport-gap, var(--ui-space-2
|
|
32
|
+
min-inline-size: min(12rem, calc(100vw - var(--ui-menu-viewport-gap, var(--ui-space-2)) * 2));
|
|
33
|
+
max-inline-size: calc(100vw - var(--ui-menu-viewport-gap, var(--ui-space-2)) * 2);
|
|
23
34
|
padding: 0;
|
|
24
35
|
border: 0;
|
|
25
36
|
outline: 0;
|
|
@@ -37,7 +48,7 @@
|
|
|
37
48
|
padding: var(--ui-space-1);
|
|
38
49
|
background: var(--ui-surface-elevated);
|
|
39
50
|
border: 1px solid var(--ui-border-default);
|
|
40
|
-
border-radius: var(--ui-radius-
|
|
51
|
+
border-radius: var(--ui-radius-lg);
|
|
41
52
|
box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
|
|
42
53
|
max-block-size: inherit;
|
|
43
54
|
overflow: auto;
|
|
@@ -52,7 +63,7 @@
|
|
|
52
63
|
inset: auto;
|
|
53
64
|
margin: 0;
|
|
54
65
|
overflow: visible;
|
|
55
|
-
max-block-size: calc(100dvh - var(--ui-menu-viewport-gap, var(--ui-space-2
|
|
66
|
+
max-block-size: calc(100dvh - var(--ui-menu-viewport-gap, var(--ui-space-2)) * 2);
|
|
56
67
|
opacity: 0;
|
|
57
68
|
transform: translateY(-4px) scale(0.99);
|
|
58
69
|
transition:
|