@threadlabs/looma 0.32.1 → 0.33.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 +15 -0
- package/bin/looma-docs.mjs +3 -0
- package/components/shared/icons.js +1 -0
- package/components/shared/overlay.js +1 -1
- package/components/ui-action-bar/ui-action-bar.html +11 -11
- package/components/ui-affordance-scope/ui-affordance-scope.html +2 -2
- package/components/ui-avatar/ui-avatar.html +8 -8
- package/components/ui-avatar-group/ui-avatar-group.html +14 -14
- package/components/ui-avatar-group/ui-avatar-group.js +3 -2
- package/components/ui-badge/ui-badge.html +43 -43
- package/components/ui-breadcrumb-item/ui-breadcrumb-item.html +13 -13
- package/components/ui-breadcrumbs/ui-breadcrumbs.html +8 -8
- package/components/ui-button/ui-button.html +32 -29
- package/components/ui-callout/ui-callout.html +9 -9
- package/components/ui-card/ui-card.html +11 -11
- package/components/ui-checkbox/ui-checkbox.html +52 -33
- package/components/ui-cluster/ui-cluster.html +21 -21
- package/components/ui-color-picker/ui-color-picker.html +135 -0
- package/components/ui-color-picker/ui-color-picker.js +76 -0
- package/components/ui-combobox/ui-combobox.html +43 -43
- package/components/ui-container/ui-container.html +7 -7
- package/components/ui-context-menu/ui-context-menu.html +9 -9
- package/components/ui-cover/ui-cover.html +8 -8
- package/components/ui-description-item/ui-description-item.html +7 -7
- package/components/ui-description-list/ui-description-list.html +4 -4
- package/components/ui-dialog/ui-dialog.html +26 -26
- package/components/ui-disclosure/ui-disclosure.html +23 -23
- package/components/ui-editable/ui-editable.html +16 -16
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +9 -9
- package/components/ui-editor-link-form/ui-editor-link-form.html +1 -2
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +23 -23
- package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +10 -10
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +29 -29
- package/components/ui-editor-slash-menu-group/ui-editor-slash-menu-group.html +5 -5
- package/components/ui-editor-slash-menu-item/ui-editor-slash-menu-item.html +11 -11
- package/components/ui-editor-surface/ui-editor-surface.html +2 -2
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +25 -25
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +13 -13
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +31 -31
- package/components/ui-editor-toolbar/ui-editor-toolbar.html +13 -13
- package/components/ui-floating-action-button/ui-floating-action-button.html +8 -8
- package/components/ui-form-field/ui-form-field.html +15 -15
- package/components/ui-form-field/ui-form-field.js +12 -4
- package/components/ui-grid/ui-grid.html +4 -4
- package/components/ui-icon/ui-icon.html +3 -2
- package/components/ui-icon-button/ui-icon-button.html +15 -14
- package/components/ui-image/ui-image.html +14 -14
- package/components/ui-input/ui-input.html +8 -8
- package/components/ui-input-group/ui-input-group.html +18 -18
- package/components/ui-list/ui-list.html +11 -11
- package/components/ui-list-item/ui-list-item.html +18 -18
- package/components/ui-listbox/ui-listbox.html +10 -10
- package/components/ui-menu/ui-menu.html +18 -17
- package/components/ui-menu-group/ui-menu-group.html +4 -4
- package/components/ui-menu-item/ui-menu-item.html +20 -20
- package/components/ui-meter/ui-meter.html +5 -5
- package/components/ui-nav-item/ui-nav-item.html +20 -20
- package/components/ui-page-header/ui-page-header.html +18 -17
- package/components/ui-popover/ui-popover.html +8 -8
- package/components/ui-radio/ui-radio.html +25 -17
- package/components/ui-radio-group/ui-radio-group.html +10 -10
- package/components/ui-reel/ui-reel.html +5 -5
- package/components/ui-scroll-area/ui-scroll-area.html +10 -10
- package/components/ui-search-result-row/ui-search-result-row.html +19 -19
- package/components/ui-search-shell/ui-search-shell.html +22 -22
- package/components/ui-section/ui-section.html +24 -23
- package/components/ui-select/ui-select.html +10 -10
- package/components/ui-separator/ui-separator.html +2 -2
- package/components/ui-sidebar/ui-sidebar.html +8 -8
- package/components/ui-spinner/ui-spinner.html +6 -6
- package/components/ui-stack/ui-stack.html +12 -12
- package/components/ui-status-message/ui-status-message.html +17 -17
- package/components/ui-swatch/ui-swatch.html +2 -2
- package/components/ui-switch/ui-switch.html +36 -26
- package/components/ui-switcher/ui-switcher.html +7 -7
- package/components/ui-table/ui-table.html +6 -6
- package/components/ui-tabs/ui-tabs.html +16 -15
- package/components/ui-text/ui-text.html +3 -2
- package/components/ui-textarea/ui-textarea.html +10 -10
- package/components/ui-toast/ui-toast.html +9 -9
- package/components/ui-toast-region/ui-toast-region.html +12 -12
- package/components/ui-tooltip/ui-tooltip.html +15 -15
- package/components/ui-top-bar/ui-top-bar.html +11 -11
- package/components/ui-tree/ui-tree.html +5 -5
- package/components/ui-tree-item/ui-tree-item.html +36 -36
- package/dist/index.js +46 -45
- package/docs/README.md +116 -0
- package/docs/card.html +63 -0
- package/docs/card.js +32 -0
- package/docs/catalog-view.js +18 -0
- package/docs/catalog-view.mjs +11 -0
- package/docs/catalog.json +22974 -0
- package/docs/catalog.mjs +131 -0
- package/docs/cli.mjs +26 -0
- package/docs/commands.mjs +94 -0
- package/docs/customizer-render.mjs +40 -0
- package/docs/customizer.js +118 -0
- package/docs/documentation.css +8 -0
- package/docs/examples/ui-action-bar/examples/01-form-footer.behavior.js +7 -0
- package/docs/examples/ui-button/examples/08-loading.behavior.js +21 -0
- package/docs/examples/ui-checkbox/examples/02-checked-indeterminate-and-disabled.behavior.js +30 -0
- package/docs/examples/ui-combobox/examples/06-selected-values.behavior.js +11 -0
- package/docs/examples/ui-search-shell/examples/02-label-dismissible-status-and-footer.behavior.js +34 -0
- package/docs/examples/ui-toast/examples/01-authored.behavior.js +15 -0
- package/docs/examples/ui-toast/examples/02-danger.behavior.js +2 -0
- package/docs/examples/ui-tree/examples/03-max-depth-2-and-hover-expand-delay-300.behavior.js +30 -0
- package/docs/examples/ui-tree/examples/06-move-without-dragging.behavior.js +2 -0
- package/docs/examples/ui-tree/examples/07-multiple-selection.behavior.js +16 -0
- package/docs/examples/ui-tree-item/examples/02-container.behavior.js +1 -0
- package/docs/index.d.ts +54 -0
- package/docs/index.mjs +4 -0
- package/docs/local-server.mjs +68 -0
- package/docs/preview.js +20 -0
- package/docs/reference.html +1 -0
- package/docs/reference.js +36 -0
- package/docs/render.mjs +84 -0
- package/docs/site.mjs +198 -0
- package/docs/store.mjs +92 -0
- package/docs/theme.mjs +100 -0
- package/docs/workspace.mjs +32 -0
- package/package.json +28 -3
- package/styles/ui-action-bar.css +11 -11
- package/styles/ui-affordance-scope.css +2 -2
- package/styles/ui-avatar-group.css +14 -14
- package/styles/ui-avatar.css +8 -8
- package/styles/ui-badge.css +41 -41
- package/styles/ui-breadcrumb-item.css +13 -13
- package/styles/ui-breadcrumbs.css +8 -8
- package/styles/ui-button.css +30 -28
- package/styles/ui-callout.css +9 -9
- package/styles/ui-card.css +11 -11
- package/styles/ui-checkbox.css +52 -33
- package/styles/ui-cluster.css +21 -21
- package/styles/ui-color-picker.css +120 -0
- package/styles/ui-combobox.css +86 -86
- package/styles/ui-container.css +7 -7
- package/styles/ui-context-menu.css +9 -9
- package/styles/ui-cover.css +8 -8
- package/styles/ui-description-item.css +7 -7
- package/styles/ui-description-list.css +4 -4
- package/styles/ui-dialog.css +52 -52
- package/styles/ui-disclosure.css +23 -23
- package/styles/ui-editable.css +16 -16
- package/styles/ui-editor-insert-table-grid.css +9 -9
- package/styles/ui-editor-mention-menu-item.css +10 -10
- package/styles/ui-editor-mention-menu.css +23 -23
- package/styles/ui-editor-slash-menu-group.css +5 -5
- package/styles/ui-editor-slash-menu-item.css +11 -11
- package/styles/ui-editor-slash-menu.css +29 -29
- package/styles/ui-editor-surface.css +2 -2
- package/styles/ui-editor-table-context-menu.css +25 -25
- package/styles/ui-editor-table-overlay.css +13 -13
- package/styles/ui-editor-table-toolbar.css +31 -31
- package/styles/ui-editor-toolbar.css +13 -13
- package/styles/ui-floating-action-button.css +8 -8
- package/styles/ui-form-field.css +13 -13
- package/styles/ui-grid.css +4 -4
- package/styles/ui-icon-button.css +13 -13
- package/styles/ui-icon.css +2 -2
- package/styles/ui-image.css +14 -14
- package/styles/ui-input-group.css +18 -18
- package/styles/ui-input.css +8 -8
- package/styles/ui-list-item.css +18 -18
- package/styles/ui-list.css +11 -11
- package/styles/ui-listbox.css +20 -20
- package/styles/ui-menu-group.css +4 -4
- package/styles/ui-menu-item.css +20 -20
- package/styles/ui-menu.css +16 -16
- package/styles/ui-meter.css +5 -5
- package/styles/ui-nav-item.css +20 -20
- package/styles/ui-page-header.css +18 -17
- package/styles/ui-popover.css +8 -8
- package/styles/ui-radio-group.css +10 -10
- package/styles/ui-radio.css +26 -18
- package/styles/ui-reel.css +5 -5
- package/styles/ui-scroll-area.css +10 -10
- package/styles/ui-search-result-row.css +19 -19
- package/styles/ui-search-shell.css +22 -22
- package/styles/ui-section.css +24 -23
- package/styles/ui-select.css +10 -10
- package/styles/ui-separator.css +2 -2
- package/styles/ui-sidebar.css +8 -8
- package/styles/ui-spinner.css +6 -6
- package/styles/ui-stack.css +12 -12
- package/styles/ui-status-message.css +17 -17
- package/styles/ui-swatch.css +2 -2
- package/styles/ui-switch.css +36 -28
- package/styles/ui-switcher.css +7 -7
- package/styles/ui-table.css +6 -6
- package/styles/ui-tabs.css +11 -11
- package/styles/ui-text.css +3 -2
- package/styles/ui-textarea.css +10 -10
- package/styles/ui-toast-region.css +24 -24
- package/styles/ui-toast.css +18 -18
- package/styles/ui-tooltip.css +15 -15
- package/styles/ui-top-bar.css +11 -11
- package/styles/ui-tree-item.css +71 -71
- package/styles/ui-tree.css +5 -5
- package/theme-system.css +80 -0
- package/tokens.css +14 -3
- package/vanilla/UiColorPicker.d.ts +30 -0
- package/vanilla/UiColorPicker.js +77 -0
- package/vanilla/UiIcon.js +1 -1
- package/vanilla/index.js +1 -0
- package/vue/UiActionBar.vue +11 -11
- package/vue/UiAffordanceScope.vue +2 -2
- package/vue/UiAvatar.vue +8 -8
- package/vue/UiAvatarGroup.vue +14 -14
- package/vue/UiBadge.vue +43 -42
- package/vue/UiBreadcrumbItem.vue +13 -13
- package/vue/UiBreadcrumbs.vue +8 -8
- package/vue/UiButton.vue +34 -29
- package/vue/UiCallout.vue +9 -9
- package/vue/UiCard.vue +11 -11
- package/vue/UiCheckbox.vue +57 -34
- package/vue/UiCluster.vue +21 -21
- package/vue/UiColorPicker.d.ts +65 -0
- package/vue/UiColorPicker.js +2 -0
- package/vue/UiColorPicker.vue +422 -0
- package/vue/UiCombobox.vue +86 -86
- package/vue/UiContainer.vue +7 -7
- package/vue/UiContextMenu.vue +9 -9
- package/vue/UiCover.vue +8 -8
- package/vue/UiDescriptionItem.vue +7 -7
- package/vue/UiDescriptionList.vue +4 -4
- package/vue/UiDialog.vue +52 -52
- package/vue/UiDisclosure.vue +23 -23
- package/vue/UiEditable.vue +16 -16
- package/vue/UiEditorInsertTableGrid.vue +9 -9
- package/vue/UiEditorMentionMenu.vue +23 -23
- package/vue/UiEditorMentionMenuItem.vue +10 -10
- package/vue/UiEditorSlashMenu.vue +29 -29
- package/vue/UiEditorSlashMenuGroup.vue +5 -5
- package/vue/UiEditorSlashMenuItem.vue +11 -11
- package/vue/UiEditorSurface.vue +2 -2
- package/vue/UiEditorTableContextMenu.vue +25 -25
- package/vue/UiEditorTableOverlay.vue +13 -13
- package/vue/UiEditorTableToolbar.vue +31 -31
- package/vue/UiEditorToolbar.vue +13 -13
- package/vue/UiFloatingActionButton.vue +8 -8
- package/vue/UiFormField.vue +14 -14
- package/vue/UiGrid.vue +4 -4
- package/vue/UiIcon.vue +6 -2
- package/vue/UiIconButton.vue +14 -14
- package/vue/UiImage.vue +14 -14
- package/vue/UiInput.vue +9 -8
- package/vue/UiInputGroup.vue +18 -18
- package/vue/UiList.vue +11 -11
- package/vue/UiListItem.vue +18 -18
- package/vue/UiListbox.vue +20 -20
- package/vue/UiMenu.vue +16 -16
- package/vue/UiMenuGroup.vue +4 -4
- package/vue/UiMenuItem.vue +20 -20
- package/vue/UiMeter.vue +5 -5
- package/vue/UiNavItem.vue +20 -20
- package/vue/UiPageHeader.vue +18 -17
- package/vue/UiPopover.vue +8 -8
- package/vue/UiRadio.vue +28 -17
- package/vue/UiRadioGroup.vue +10 -10
- package/vue/UiReel.vue +5 -5
- package/vue/UiScrollArea.vue +10 -10
- package/vue/UiSearchResultRow.vue +19 -19
- package/vue/UiSearchShell.vue +22 -22
- package/vue/UiSection.vue +24 -23
- package/vue/UiSelect.vue +11 -10
- package/vue/UiSeparator.vue +2 -2
- package/vue/UiSidebar.vue +8 -8
- package/vue/UiSpinner.vue +6 -6
- package/vue/UiStack.vue +12 -12
- package/vue/UiStatusMessage.vue +17 -17
- package/vue/UiSwatch.vue +2 -2
- package/vue/UiSwitch.vue +38 -25
- package/vue/UiSwitcher.vue +7 -7
- package/vue/UiTable.vue +6 -6
- package/vue/UiTabs.vue +13 -13
- package/vue/UiText.vue +3 -2
- package/vue/UiTextarea.vue +10 -10
- package/vue/UiToast.vue +18 -18
- package/vue/UiToastRegion.vue +24 -24
- package/vue/UiTooltip.vue +15 -15
- package/vue/UiTopBar.vue +11 -11
- package/vue/UiTree.vue +5 -5
- package/vue/UiTreeItem.vue +73 -71
- package/vue/chunks/UiActionBar.js +1 -1
- package/vue/chunks/UiAffordanceScope.js +1 -1
- package/vue/chunks/UiAvatar.js +1 -1
- package/vue/chunks/UiAvatarGroup.js +1 -1
- package/vue/chunks/UiBadge.js +2 -2
- package/vue/chunks/UiBreadcrumbItem.js +1 -1
- package/vue/chunks/UiBreadcrumbs.js +1 -1
- package/vue/chunks/UiButton.js +2 -2
- package/vue/chunks/UiCallout.js +1 -1
- package/vue/chunks/UiCard.js +1 -1
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiCluster.js +1 -1
- package/vue/chunks/UiColorPicker.js +326 -0
- package/vue/chunks/UiCombobox.js +1 -1
- package/vue/chunks/UiContainer.js +1 -1
- package/vue/chunks/UiContextMenu.js +1 -1
- package/vue/chunks/UiCover.js +1 -1
- package/vue/chunks/UiDescriptionItem.js +1 -1
- package/vue/chunks/UiDescriptionList.js +1 -1
- package/vue/chunks/UiDialog.js +1 -1
- package/vue/chunks/UiDisclosure.js +1 -1
- package/vue/chunks/UiEditable.js +1 -1
- package/vue/chunks/UiEditorImageToolbar.js +1 -1
- package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
- package/vue/chunks/UiEditorLinkForm.js +1 -1
- package/vue/chunks/UiEditorMentionMenu.js +1 -1
- package/vue/chunks/UiEditorMentionMenuItem.js +1 -1
- package/vue/chunks/UiEditorSlashMenu.js +1 -1
- package/vue/chunks/UiEditorSlashMenuGroup.js +1 -1
- package/vue/chunks/UiEditorSlashMenuItem.js +1 -1
- package/vue/chunks/UiEditorSurface.js +1 -1
- package/vue/chunks/UiEditorTableContextMenu.js +1 -1
- package/vue/chunks/UiEditorTableOverlay.js +1 -1
- package/vue/chunks/UiEditorTableToolbar.js +1 -1
- package/vue/chunks/UiEditorToolbar.js +1 -1
- package/vue/chunks/UiFloatingActionButton.js +1 -1
- package/vue/chunks/UiFormField.js +2 -2
- package/vue/chunks/UiGrid.js +1 -1
- package/vue/chunks/UiIcon.js +5 -1
- package/vue/chunks/UiIconButton.js +2 -2
- package/vue/chunks/UiImage.js +1 -1
- package/vue/chunks/UiInput.js +1 -1
- package/vue/chunks/UiInputGroup.js +1 -1
- package/vue/chunks/UiList.js +1 -1
- package/vue/chunks/UiListItem.js +1 -1
- package/vue/chunks/UiListbox.js +1 -1
- package/vue/chunks/UiMenu.js +1 -1
- package/vue/chunks/UiMenuGroup.js +1 -1
- package/vue/chunks/UiMenuItem.js +1 -1
- package/vue/chunks/UiMeter.js +1 -1
- package/vue/chunks/UiNavItem.js +1 -1
- package/vue/chunks/UiPageHeader.js +1 -1
- package/vue/chunks/UiPopover.js +1 -1
- package/vue/chunks/UiRadio.js +1 -1
- package/vue/chunks/UiRadioGroup.js +1 -1
- package/vue/chunks/UiReel.js +1 -1
- package/vue/chunks/UiScrollArea.js +1 -1
- package/vue/chunks/UiSearchResultRow.js +1 -1
- package/vue/chunks/UiSearchShell.js +1 -1
- package/vue/chunks/UiSection.js +1 -1
- package/vue/chunks/UiSelect.js +1 -1
- package/vue/chunks/UiSeparator.js +1 -1
- package/vue/chunks/UiSidebar.js +1 -1
- package/vue/chunks/UiSpinner.js +1 -1
- package/vue/chunks/UiStack.js +1 -1
- package/vue/chunks/UiStatusMessage.js +1 -1
- package/vue/chunks/UiSwatch.js +1 -1
- package/vue/chunks/UiSwitch.js +1 -1
- package/vue/chunks/UiSwitcher.js +1 -1
- package/vue/chunks/UiTable.js +1 -1
- package/vue/chunks/UiTabs.js +3 -3
- package/vue/chunks/UiText.js +1 -1
- package/vue/chunks/UiTextarea.js +1 -1
- package/vue/chunks/UiToast.js +1 -1
- package/vue/chunks/UiToastRegion.js +1 -1
- package/vue/chunks/UiTooltip.js +1 -1
- package/vue/chunks/UiTopBar.js +1 -1
- package/vue/chunks/UiTree.js +1 -1
- package/vue/chunks/UiTreeItem.js +1 -1
- package/vue/components.css +1857 -1654
- package/vue/editor/index.js +28 -11
- package/vue/index.d.ts +1 -0
- package/vue/index.js +3 -2
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
>rounded uses the theme's action radius; pill rounds the ends fully, for a compact choice such as a status or a person.</prop>
|
|
16
16
|
<prop name="tone" type="keyword" values="accent, neutral, danger, success, warning, info" default="accent"
|
|
17
17
|
>Which colour the button speaks in. It applies to every variant, so an outline, a ghost, and a solid in the same tone are the same action at three volumes:
|
|
18
|
-
tone="danger" variant="outline" is a destructive secondary action. neutral is the quiet one, for a button that should not claim a colour. The field
|
|
18
|
+
tone="danger" variant="outline" is a destructive secondary action. neutral is the quiet one, for a button that should not claim a colour. The field
|
|
19
|
+
variant always uses neutral field colors.</prop>
|
|
19
20
|
<prop name="disabled" type="boolean" default="false"
|
|
20
21
|
>Makes the button unavailable: it cannot be pressed, uses a flat neutral palette, and loses its raised look. A disabled link (as="a" with href) drops its
|
|
21
22
|
href and states aria-disabled="true" instead, because a link has no native disabled state.</prop>
|
|
@@ -191,10 +192,10 @@
|
|
|
191
192
|
--_tone-text: var(--_hue-text);
|
|
192
193
|
--_on-tone: var(--_on-hue);
|
|
193
194
|
|
|
194
|
-
display: inline-flex;
|
|
195
|
-
align-items: center;
|
|
196
|
-
justify-content: center;
|
|
197
|
-
column-gap: var(--ui-space-2);
|
|
195
|
+
display: inline-flex !important;
|
|
196
|
+
align-items: center !important;
|
|
197
|
+
justify-content: center !important;
|
|
198
|
+
column-gap: var(--ui-space-2) !important;
|
|
198
199
|
vertical-align: middle;
|
|
199
200
|
color: var(--_tone-text);
|
|
200
201
|
}
|
|
@@ -204,12 +205,12 @@
|
|
|
204
205
|
}
|
|
205
206
|
|
|
206
207
|
:host([align="start"]) {
|
|
207
|
-
justify-content: flex-start;
|
|
208
|
+
justify-content: flex-start !important;
|
|
208
209
|
text-align: start;
|
|
209
210
|
}
|
|
210
211
|
|
|
211
212
|
:host([stretch]) {
|
|
212
|
-
display: flex;
|
|
213
|
+
display: flex !important;
|
|
213
214
|
inline-size: 100%;
|
|
214
215
|
}
|
|
215
216
|
|
|
@@ -228,16 +229,17 @@
|
|
|
228
229
|
/* Unset, a button wraps as its container does. */
|
|
229
230
|
white-space: var(--ui-button-white-space, inherit);
|
|
230
231
|
line-height: var(--ui-line-height-tight);
|
|
231
|
-
padding: var(--ui-space-2) var(--ui-space-3);
|
|
232
|
+
padding: var(--ui-control-inset-block-md, var(--ui-space-2)) var(--ui-action-inset-md, var(--ui-space-3)) !important;
|
|
232
233
|
background-image: none;
|
|
233
234
|
box-shadow: var(--ui-button-shadow, var(--ui-action-shadow, var(--_ui-action-shadow)));
|
|
234
235
|
cursor: pointer;
|
|
235
236
|
transition:
|
|
237
|
+
scale var(--ui-motion-press, var(--ui-motion-fast)) var(--ui-motion-ease),
|
|
236
238
|
background-color var(--ui-motion-fast) var(--ui-motion-ease),
|
|
237
239
|
border-color var(--ui-motion-fast) var(--ui-motion-ease),
|
|
238
240
|
color var(--ui-motion-fast) var(--ui-motion-ease),
|
|
239
241
|
box-shadow var(--ui-motion-base) var(--ui-motion-ease);
|
|
240
|
-
margin: 0;
|
|
242
|
+
margin: 0 !important;
|
|
241
243
|
}
|
|
242
244
|
|
|
243
245
|
/* An anchor keeps the boxed button look even when an app styles ordinary links. */
|
|
@@ -246,7 +248,7 @@
|
|
|
246
248
|
}
|
|
247
249
|
|
|
248
250
|
.spinner-wrap {
|
|
249
|
-
display: inline-flex;
|
|
251
|
+
display: inline-flex !important;
|
|
250
252
|
flex: none;
|
|
251
253
|
vertical-align: middle;
|
|
252
254
|
}
|
|
@@ -254,17 +256,17 @@
|
|
|
254
256
|
/* A count is an adornment, not another line of label text. Keep the standard control height
|
|
255
257
|
with enough inset for a 24px mark; large content can still grow the button naturally. */
|
|
256
258
|
:host:not([variant="link"]):has(.badge:not(:empty)) {
|
|
257
|
-
padding-block: var(--ui-space-0-5);
|
|
259
|
+
padding-block: var(--ui-space-0-5) !important;
|
|
258
260
|
}
|
|
259
261
|
|
|
260
262
|
.badge {
|
|
261
|
-
display: inline-flex;
|
|
262
|
-
align-items: center;
|
|
263
|
+
display: inline-flex !important;
|
|
264
|
+
align-items: center !important;
|
|
263
265
|
flex: none;
|
|
264
266
|
}
|
|
265
267
|
|
|
266
268
|
.badge:empty {
|
|
267
|
-
display: none;
|
|
269
|
+
display: none !important;
|
|
268
270
|
}
|
|
269
271
|
|
|
270
272
|
@supports (text-box-trim: trim-both) {
|
|
@@ -276,7 +278,7 @@
|
|
|
276
278
|
|
|
277
279
|
:host([size="xs"]) {
|
|
278
280
|
min-block-size: 1.5rem;
|
|
279
|
-
padding: calc(var(--ui-space-0-5) * 1.5) calc(var(--ui-space-1) * 1.25);
|
|
281
|
+
padding: calc(var(--ui-space-0-5) * 1.5) calc(var(--ui-space-1) * 1.25) !important;
|
|
280
282
|
font-size: var(--ui-font-size-xs);
|
|
281
283
|
}
|
|
282
284
|
|
|
@@ -286,24 +288,24 @@
|
|
|
286
288
|
|
|
287
289
|
:host([size="sm"]) {
|
|
288
290
|
min-block-size: var(--ui-control-size-sm);
|
|
289
|
-
padding: var(--ui-space-1) var(--ui-space-2);
|
|
291
|
+
padding: var(--ui-control-inset-block-sm, var(--ui-space-1)) var(--ui-action-inset-sm, var(--ui-space-2)) !important;
|
|
290
292
|
font-size: var(--ui-font-size-sm);
|
|
291
293
|
}
|
|
292
294
|
|
|
293
295
|
:host([size="lg"]) {
|
|
294
296
|
min-block-size: var(--ui-control-size-lg);
|
|
295
|
-
padding: var(--ui-space-3) var(--ui-space-4);
|
|
297
|
+
padding: var(--ui-control-inset-block-lg, var(--ui-space-3)) var(--ui-action-inset-lg, var(--ui-space-4)) !important;
|
|
296
298
|
font-size: var(--ui-font-size-md);
|
|
297
299
|
}
|
|
298
300
|
|
|
299
301
|
/* Card actions inherit Button's palette and behavior; only their shared layout changes.
|
|
300
302
|
The icon may contain any decorative composition. Empty icons remove their column. */
|
|
301
303
|
:host([variant="card"]) {
|
|
302
|
-
display: grid;
|
|
304
|
+
display: grid !important;
|
|
303
305
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
304
|
-
align-content: center;
|
|
305
|
-
align-items: start;
|
|
306
|
-
gap: var(--ui-space-3);
|
|
306
|
+
align-content: center !important;
|
|
307
|
+
align-items: start !important;
|
|
308
|
+
gap: var(--ui-space-3) !important;
|
|
307
309
|
inline-size: 100%;
|
|
308
310
|
min-block-size: max(var(--ui-control-min-block-size), var(--ui-control-size-md));
|
|
309
311
|
text-align: start;
|
|
@@ -318,18 +320,18 @@
|
|
|
318
320
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
319
321
|
}
|
|
320
322
|
.card-icon {
|
|
321
|
-
display: flex;
|
|
322
|
-
align-items: flex-start;
|
|
323
|
+
display: flex !important;
|
|
324
|
+
align-items: flex-start !important;
|
|
323
325
|
}
|
|
324
326
|
.card-icon:empty {
|
|
325
|
-
display: none;
|
|
327
|
+
display: none !important;
|
|
326
328
|
}
|
|
327
329
|
.card-content {
|
|
328
330
|
min-inline-size: 0;
|
|
329
331
|
}
|
|
330
332
|
.card-action {
|
|
331
|
-
display: flex;
|
|
332
|
-
align-items: center;
|
|
333
|
+
display: flex !important;
|
|
334
|
+
align-items: center !important;
|
|
333
335
|
align-self: center;
|
|
334
336
|
}
|
|
335
337
|
|
|
@@ -351,6 +353,7 @@
|
|
|
351
353
|
|
|
352
354
|
/* Pressed reads as pressed in: the highlight goes, and the shadow moves inside. */
|
|
353
355
|
:host:active:not(:disabled, [aria-disabled="true"]) {
|
|
356
|
+
scale: var(--ui-press-scale, 1);
|
|
354
357
|
background-color: var(--ui-button-active-surface, oklch(from var(--_tone) l c h / 18%));
|
|
355
358
|
background-image: none;
|
|
356
359
|
box-shadow: var(--ui-pressed);
|
|
@@ -536,9 +539,9 @@
|
|
|
536
539
|
/* Link: an inline text action. No box, padding, or minimum height (inline targets are exempt under
|
|
537
540
|
WCAG 2.5.8); the inherited font; an underline that strengthens on hover; a visible focus ring. */
|
|
538
541
|
:host([variant="link"]) {
|
|
539
|
-
display: inline;
|
|
542
|
+
display: inline !important;
|
|
540
543
|
min-block-size: 0;
|
|
541
|
-
padding: 0;
|
|
544
|
+
padding: 0 !important;
|
|
542
545
|
border: 0;
|
|
543
546
|
border-radius: var(--ui-radius-sm);
|
|
544
547
|
background: none;
|
|
@@ -578,7 +581,7 @@
|
|
|
578
581
|
|
|
579
582
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
580
583
|
:host[hidden] {
|
|
581
|
-
display: none;
|
|
584
|
+
display: none !important;
|
|
582
585
|
}
|
|
583
586
|
</style>
|
|
584
587
|
</template>
|
|
@@ -132,14 +132,14 @@
|
|
|
132
132
|
--_callout-border: var(--ui-info-solid);
|
|
133
133
|
--_callout-icon: var(--ui-info-solid);
|
|
134
134
|
|
|
135
|
-
display: grid;
|
|
135
|
+
display: grid !important;
|
|
136
136
|
grid-template-columns: var(--ui-callout-icon-column, 1.125rem) minmax(0, 1fr);
|
|
137
|
-
gap: var(--ui-callout-gap, calc(var(--ui-space-2) * 0.75));
|
|
138
|
-
align-items: start;
|
|
137
|
+
gap: var(--ui-callout-gap, calc(var(--ui-space-2) * 0.75)) !important;
|
|
138
|
+
align-items: start !important;
|
|
139
139
|
max-width: 100%;
|
|
140
|
-
padding-block: var(--ui-callout-padding-block, var(--ui-space-2));
|
|
141
|
-
padding-inline-start: var(--ui-callout-padding-inline, var(--ui-space-2));
|
|
142
|
-
padding-inline-end: var(--ui-callout-padding-inline, var(--ui-space-3));
|
|
140
|
+
padding-block: var(--ui-callout-padding-block, var(--ui-space-2)) !important;
|
|
141
|
+
padding-inline-start: var(--ui-callout-padding-inline, var(--ui-space-2)) !important;
|
|
142
|
+
padding-inline-end: var(--ui-callout-padding-inline, var(--ui-space-3)) !important;
|
|
143
143
|
border: var(--ui-callout-border-width, var(--ui-border-width)) solid
|
|
144
144
|
color-mix(in srgb, var(--ui-callout-border, var(--_callout-border)) 35%, transparent);
|
|
145
145
|
border-inline-start: var(--ui-callout-leading-border-width, var(--ui-callout-border-width, var(--ui-border-width))) solid
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
|
|
156
156
|
/* One line box tall, so the icon centres on the first line of text. */
|
|
157
157
|
.icon {
|
|
158
|
-
display: grid;
|
|
158
|
+
display: grid !important;
|
|
159
159
|
place-items: center;
|
|
160
160
|
inline-size: var(--_ui-callout-icon-column, 1.125rem);
|
|
161
161
|
block-size: 1lh;
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
.heading {
|
|
175
|
-
display: block;
|
|
175
|
+
display: block !important;
|
|
176
176
|
font-weight: var(--ui-font-semibold);
|
|
177
177
|
}
|
|
178
178
|
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
|
|
226
226
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
227
227
|
:host[hidden] {
|
|
228
|
-
display: none;
|
|
228
|
+
display: none !important;
|
|
229
229
|
}
|
|
230
230
|
</style>
|
|
231
231
|
</template>
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
--_ui-selection-context-surface: initial;
|
|
28
28
|
--_ui-selection-context-border: initial;
|
|
29
29
|
--_ui-selection-context-text: initial;
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
gap: var(--ui-space-4);
|
|
33
|
-
box-sizing: border-box;
|
|
30
|
+
display: flex !important;
|
|
31
|
+
flex-direction: column !important;
|
|
32
|
+
gap: var(--ui-space-4) !important;
|
|
33
|
+
box-sizing: border-box !important;
|
|
34
34
|
min-inline-size: 0;
|
|
35
|
-
padding: var(--ui-space-5);
|
|
35
|
+
padding: var(--ui-space-5) !important;
|
|
36
36
|
border: var(--ui-border-width) solid var(--ui-border-strong);
|
|
37
37
|
border-radius: var(--ui-radius-lg);
|
|
38
38
|
background: var(--_ui-card-surface);
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
:host([padding="xs"]) {
|
|
43
|
-
gap: var(--ui-space-1);
|
|
44
|
-
padding: var(--ui-space-2);
|
|
43
|
+
gap: var(--ui-space-1) !important;
|
|
44
|
+
padding: var(--ui-space-2) !important;
|
|
45
45
|
}
|
|
46
46
|
:host([padding="sm"]) {
|
|
47
|
-
gap: var(--ui-space-2);
|
|
48
|
-
padding: var(--ui-space-3);
|
|
47
|
+
gap: var(--ui-space-2) !important;
|
|
48
|
+
padding: var(--ui-space-3) !important;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
:host([padding="lg"]) {
|
|
52
|
-
padding: var(--ui-space-6);
|
|
52
|
+
padding: var(--ui-space-6) !important;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
:host([variant="subtle"]) {
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
|
|
124
124
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
125
125
|
:host[hidden] {
|
|
126
|
-
display: none;
|
|
126
|
+
display: none !important;
|
|
127
127
|
}
|
|
128
128
|
</style>
|
|
129
129
|
</template>
|
|
@@ -62,28 +62,46 @@
|
|
|
62
62
|
|
|
63
63
|
:host {
|
|
64
64
|
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
65
|
-
--_ui-checkbox-size: var(--ui-checkbox-size);
|
|
65
|
+
--_ui-checkbox-size: var(--ui-checkbox-size, var(--ui-choice-mark-size));
|
|
66
66
|
--_ui-checkbox-invalid-border: var(--ui-checkbox-invalid-border, var(--ui-field-danger, var(--ui-danger-solid)));
|
|
67
67
|
|
|
68
|
-
display: inline-flex;
|
|
69
|
-
align-items: flex-start;
|
|
70
|
-
|
|
68
|
+
display: inline-flex !important;
|
|
69
|
+
align-items: flex-start !important;
|
|
70
|
+
flex-direction: row !important;
|
|
71
|
+
flex-wrap: nowrap !important;
|
|
72
|
+
justify-content: flex-start !important;
|
|
73
|
+
padding: 0 !important;
|
|
74
|
+
gap: var(--ui-checkbox-gap, var(--ui-space-2)) !important;
|
|
71
75
|
max-inline-size: 100%;
|
|
72
76
|
color: var(--ui-text-primary);
|
|
77
|
+
line-height: var(--ui-line-height-md) !important;
|
|
73
78
|
cursor: pointer;
|
|
74
79
|
}
|
|
75
80
|
|
|
76
81
|
/* The label, and under it an optional line saying what the choice means. */
|
|
77
82
|
.text {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
83
|
+
font: inherit !important;
|
|
84
|
+
align-self: auto !important;
|
|
85
|
+
order: 1 !important;
|
|
86
|
+
position: static !important;
|
|
87
|
+
transform: none !important;
|
|
88
|
+
padding: 0 !important;
|
|
89
|
+
margin: 0 !important;
|
|
90
|
+
display: flex !important;
|
|
91
|
+
flex-direction: column !important;
|
|
92
|
+
gap: var(--ui-space-1) !important;
|
|
81
93
|
min-inline-size: 0;
|
|
82
94
|
}
|
|
83
95
|
|
|
84
96
|
.label {
|
|
97
|
+
position: static !important;
|
|
98
|
+
transform: none !important;
|
|
99
|
+
margin: 0 !important;
|
|
100
|
+
padding-inline: 0 !important;
|
|
101
|
+
font: inherit !important;
|
|
85
102
|
min-inline-size: 0;
|
|
86
|
-
line-height: var(--ui-line-height-md);
|
|
103
|
+
line-height: var(--ui-line-height-md) !important;
|
|
104
|
+
padding-block: max(0px, calc((var(--_ui-checkbox-size, 1.125rem) - 1lh) / 2)) !important;
|
|
87
105
|
}
|
|
88
106
|
|
|
89
107
|
.description {
|
|
@@ -93,19 +111,25 @@
|
|
|
93
111
|
}
|
|
94
112
|
|
|
95
113
|
.description:empty {
|
|
96
|
-
display: none;
|
|
114
|
+
display: none !important;
|
|
97
115
|
}
|
|
98
116
|
|
|
99
117
|
input {
|
|
100
118
|
appearance: none;
|
|
101
119
|
-webkit-appearance: none;
|
|
102
|
-
position: relative;
|
|
120
|
+
position: relative !important;
|
|
121
|
+
transform: none !important;
|
|
122
|
+
order: 0 !important;
|
|
123
|
+
box-sizing: border-box !important;
|
|
124
|
+
padding: 0 !important;
|
|
103
125
|
flex: 0 0 auto;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
126
|
+
align-self: auto !important;
|
|
127
|
+
inline-size: var(--_ui-checkbox-size, 1.125rem) !important;
|
|
128
|
+
block-size: var(--_ui-checkbox-size, 1.125rem) !important;
|
|
129
|
+
font: inherit !important;
|
|
130
|
+
margin: max(0px, calc((1lh - var(--_ui-checkbox-size, 1.125rem)) / 2)) 0 0 !important;
|
|
107
131
|
border: var(--ui-border-width) solid var(--ui-control-border, var(--ui-border-strong));
|
|
108
|
-
border-radius: var(--ui-radius-sm);
|
|
132
|
+
border-radius: min(var(--ui-radius-sm), calc(var(--_ui-checkbox-size, 1.125rem) / 4));
|
|
109
133
|
background: var(--ui-control-surface, var(--ui-surface-default));
|
|
110
134
|
box-shadow: var(--ui-control-inset);
|
|
111
135
|
cursor: pointer;
|
|
@@ -119,7 +143,7 @@
|
|
|
119
143
|
content: "";
|
|
120
144
|
position: absolute;
|
|
121
145
|
opacity: 0;
|
|
122
|
-
transition: opacity
|
|
146
|
+
transition: opacity var(--ui-motion-fast) var(--ui-motion-ease);
|
|
123
147
|
}
|
|
124
148
|
|
|
125
149
|
input:checked,
|
|
@@ -132,22 +156,22 @@
|
|
|
132
156
|
/* Centre the tick's box and lift it slightly for the rotated check shape. */
|
|
133
157
|
input:checked::after {
|
|
134
158
|
inset: 0;
|
|
135
|
-
margin: auto;
|
|
136
|
-
inline-size: 0.
|
|
137
|
-
block-size: 0.
|
|
159
|
+
margin: auto !important;
|
|
160
|
+
inline-size: calc(var(--_ui-checkbox-size) * 0.28 / 1.125);
|
|
161
|
+
block-size: calc(var(--_ui-checkbox-size) * 0.5 / 1.125);
|
|
138
162
|
/* Longhands, not `border: solid var(...)`: lowering drops a shorthand that omits a
|
|
139
163
|
component, which left the tick with no style and no colour. */
|
|
140
164
|
border-style: solid;
|
|
141
165
|
border-color: var(--ui-text-on-accent);
|
|
142
|
-
border-width: 0 0.
|
|
166
|
+
border-width: 0 calc(var(--_ui-checkbox-size) * 0.125 / 1.125) calc(var(--_ui-checkbox-size) * 0.125 / 1.125) 0;
|
|
143
167
|
opacity: 1;
|
|
144
|
-
transform: translateY(-0.
|
|
145
|
-
animation: ui-checkbox-check
|
|
168
|
+
transform: translateY(calc(var(--_ui-checkbox-size) * -0.09 / 1.125)) rotate(45deg);
|
|
169
|
+
animation: ui-checkbox-check var(--ui-motion-base) var(--ui-motion-ease-out, cubic-bezier(0.16, 1, 0.3, 1)) both;
|
|
146
170
|
}
|
|
147
171
|
|
|
148
172
|
input:indeterminate::after {
|
|
149
|
-
inset: 50% 0.
|
|
150
|
-
block-size: 0.
|
|
173
|
+
inset: 50% calc(var(--_ui-checkbox-size) * 0.23 / 1.125) auto;
|
|
174
|
+
block-size: calc(var(--_ui-checkbox-size) * 0.125 / 1.125);
|
|
151
175
|
border-radius: var(--ui-radius-round);
|
|
152
176
|
background: var(--ui-text-on-accent);
|
|
153
177
|
opacity: 1;
|
|
@@ -157,15 +181,15 @@
|
|
|
157
181
|
@keyframes ui-checkbox-check {
|
|
158
182
|
from {
|
|
159
183
|
opacity: 0;
|
|
160
|
-
transform: translateY(-0.
|
|
184
|
+
transform: translateY(calc(var(--_ui-checkbox-size) * -0.09 / 1.125)) rotate(45deg) scale(0.55);
|
|
161
185
|
}
|
|
162
186
|
65% {
|
|
163
187
|
opacity: 1;
|
|
164
|
-
transform: translateY(-0.
|
|
188
|
+
transform: translateY(calc(var(--_ui-checkbox-size) * -0.09 / 1.125)) rotate(45deg) scale(1.12);
|
|
165
189
|
}
|
|
166
190
|
to {
|
|
167
191
|
opacity: 1;
|
|
168
|
-
transform: translateY(-0.
|
|
192
|
+
transform: translateY(calc(var(--_ui-checkbox-size) * -0.09 / 1.125)) rotate(45deg) scale(1);
|
|
169
193
|
}
|
|
170
194
|
}
|
|
171
195
|
|
|
@@ -220,12 +244,7 @@
|
|
|
220
244
|
:host([size="lg"]) {
|
|
221
245
|
--_line: calc(var(--_font) * var(--ui-line-height-md));
|
|
222
246
|
font-size: var(--_font);
|
|
223
|
-
padding-block: calc((var(--_row) - var(--_line)) / 2);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
:host([size="sm"]) input,
|
|
227
|
-
:host([size="lg"]) input {
|
|
228
|
-
margin-top: calc((var(--_line) - var(--_ui-checkbox-size, 1.125rem)) / 2);
|
|
247
|
+
padding-block: max(0px, calc((var(--_row) - max(var(--_line), var(--_ui-checkbox-size, 1.125rem))) / 2)) !important;
|
|
229
248
|
}
|
|
230
249
|
|
|
231
250
|
@media (pointer: coarse) {
|
|
@@ -236,7 +255,7 @@
|
|
|
236
255
|
|
|
237
256
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
238
257
|
:host[hidden] {
|
|
239
|
-
display: none;
|
|
258
|
+
display: none !important;
|
|
240
259
|
}
|
|
241
260
|
</style>
|
|
242
261
|
</template>
|
|
@@ -29,38 +29,38 @@
|
|
|
29
29
|
|
|
30
30
|
:host {
|
|
31
31
|
--_layout-gap: var(--ui-space-3);
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-wrap: wrap;
|
|
34
|
-
align-items: center;
|
|
35
|
-
gap: var(--ui-cluster-gap, var(--_layout-gap));
|
|
32
|
+
display: flex !important;
|
|
33
|
+
flex-wrap: wrap !important;
|
|
34
|
+
align-items: center !important;
|
|
35
|
+
gap: var(--ui-cluster-gap, var(--_layout-gap)) !important;
|
|
36
36
|
min-inline-size: 0;
|
|
37
37
|
max-inline-size: 100%;
|
|
38
|
-
margin: 0;
|
|
38
|
+
margin: 0 !important;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
:host([fixed]) {
|
|
42
42
|
flex: none;
|
|
43
43
|
}
|
|
44
44
|
:host([padding="s"]) {
|
|
45
|
-
padding: var(--ui-space-2);
|
|
45
|
+
padding: var(--ui-space-2) !important;
|
|
46
46
|
}
|
|
47
47
|
:host([padding="m"]) {
|
|
48
|
-
padding: var(--ui-space-3);
|
|
48
|
+
padding: var(--ui-space-3) !important;
|
|
49
49
|
}
|
|
50
50
|
:host([padding="l"]) {
|
|
51
|
-
padding: var(--ui-space-4);
|
|
51
|
+
padding: var(--ui-space-4) !important;
|
|
52
52
|
}
|
|
53
53
|
:host([paddingEnd="s"]) {
|
|
54
|
-
padding-inline-end: var(--ui-space-2);
|
|
54
|
+
padding-inline-end: var(--ui-space-2) !important;
|
|
55
55
|
}
|
|
56
56
|
:host([paddingEnd="m"]) {
|
|
57
|
-
padding-inline-end: var(--ui-space-3);
|
|
57
|
+
padding-inline-end: var(--ui-space-3) !important;
|
|
58
58
|
}
|
|
59
59
|
:host([paddingEnd="l"]) {
|
|
60
|
-
padding-inline-end: var(--ui-space-4);
|
|
60
|
+
padding-inline-end: var(--ui-space-4) !important;
|
|
61
61
|
}
|
|
62
62
|
:host([paddingEnd="xl"]) {
|
|
63
|
-
padding-inline-end: calc(var(--ui-space-4) * 4);
|
|
63
|
+
padding-inline-end: calc(var(--ui-space-4) * 4) !important;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
:host([gap="xs"]) {
|
|
@@ -79,33 +79,33 @@
|
|
|
79
79
|
--_layout-gap: var(--ui-space-6);
|
|
80
80
|
}
|
|
81
81
|
:host([align="start"]) {
|
|
82
|
-
align-items: flex-start;
|
|
82
|
+
align-items: flex-start !important;
|
|
83
83
|
}
|
|
84
84
|
:host([align="end"]) {
|
|
85
|
-
align-items: flex-end;
|
|
85
|
+
align-items: flex-end !important;
|
|
86
86
|
}
|
|
87
87
|
:host([align="baseline"]) {
|
|
88
|
-
align-items: baseline;
|
|
88
|
+
align-items: baseline !important;
|
|
89
89
|
}
|
|
90
90
|
:host([align="stretch"]) {
|
|
91
|
-
align-items: stretch;
|
|
91
|
+
align-items: stretch !important;
|
|
92
92
|
}
|
|
93
93
|
:host([justify="center"]) {
|
|
94
|
-
justify-content: center;
|
|
94
|
+
justify-content: center !important;
|
|
95
95
|
}
|
|
96
96
|
:host([justify="end"]) {
|
|
97
|
-
justify-content: flex-end;
|
|
97
|
+
justify-content: flex-end !important;
|
|
98
98
|
}
|
|
99
99
|
:host([justify="between"]) {
|
|
100
|
-
justify-content: space-between;
|
|
100
|
+
justify-content: space-between !important;
|
|
101
101
|
}
|
|
102
102
|
:host([wrap="nowrap"]) {
|
|
103
|
-
flex-wrap: nowrap;
|
|
103
|
+
flex-wrap: nowrap !important;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
107
107
|
:host[hidden] {
|
|
108
|
-
display: none;
|
|
108
|
+
display: none !important;
|
|
109
109
|
}
|
|
110
110
|
</style>
|
|
111
111
|
</template>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<link rel="component" href="../ui-input/ui-input.html">
|
|
2
|
+
<template component="ui-color-picker" module="./ui-color-picker.js">
|
|
3
|
+
<defs>
|
|
4
|
+
<prop name="value" type="string" default="#000000"
|
|
5
|
+
>An opaque sRGB colour as six hexadecimal digits prefixed with #. User edits emit input and change with detail.value. Invalid values are ignored. This
|
|
6
|
+
control does not submit a named form value.</prop>
|
|
7
|
+
<prop name="name" type="string" default="">The form field name. Leave empty to omit the colour from form submission. A form reset restores value.</prop>
|
|
8
|
+
<prop name="label" type="string" default="Choose colour">Accessible name for the swatch button and editor.</prop>
|
|
9
|
+
<prop name="size" type="keyword" values="sm, md, lg" default="md">Shared control height, matching Input and Button of the same size.</prop>
|
|
10
|
+
<prop name="round" type="boolean" default="false">Makes the square swatch circular.</prop>
|
|
11
|
+
<prop name="disabled" type="boolean" default="false">Prevents opening and editing.</prop>
|
|
12
|
+
<event name="input" type="object"><prop name="value" type="string" required></prop></event>
|
|
13
|
+
<event name="change" type="object"><prop name="value" type="string" required></prop></event>
|
|
14
|
+
</defs>
|
|
15
|
+
<span>
|
|
16
|
+
<input $ref="field" type="hidden" data-ui-field-value from:name="$name" from:disabled="$disabled">
|
|
17
|
+
<button data-ui-field-control $ref="trigger" type="button" from:aria-label="$label" from:disabled="$disabled" aria-haspopup="dialog" aria-expanded="false">
|
|
18
|
+
<span class="colour" $ref="colour"></span>
|
|
19
|
+
</button>
|
|
20
|
+
<span class="editor" $ref="editor" hidden role="dialog" from:aria-label="$label">
|
|
21
|
+
<label class="channel">Red<input $ref="red" type="range" min="0" max="255" aria-label="Red"></label>
|
|
22
|
+
<label class="channel">Green<input $ref="green" type="range" min="0" max="255" aria-label="Green"></label>
|
|
23
|
+
<label class="channel">Blue<input $ref="blue" type="range" min="0" max="255" aria-label="Blue"></label>
|
|
24
|
+
<ui-input $ref="hex" size="sm" aria-label="Hex colour" maxlength="7" spellcheck="false"></ui-input>
|
|
25
|
+
</span>
|
|
26
|
+
</span>
|
|
27
|
+
<style>
|
|
28
|
+
:host {
|
|
29
|
+
display: inline-flex !important;
|
|
30
|
+
flex: 0 0 auto;
|
|
31
|
+
margin: 0 !important;
|
|
32
|
+
padding: 0 !important;
|
|
33
|
+
--_size: var(--ui-control-size-md);
|
|
34
|
+
--_font: 1em;
|
|
35
|
+
--_padding: var(--ui-control-inset-block-md, var(--ui-space-2));
|
|
36
|
+
}
|
|
37
|
+
:host([size="sm"]) {
|
|
38
|
+
--_size: var(--ui-control-size-sm);
|
|
39
|
+
--_font: var(--ui-font-size-sm);
|
|
40
|
+
--_padding: var(--ui-control-inset-block-sm, var(--ui-space-1));
|
|
41
|
+
}
|
|
42
|
+
:host([size="lg"]) {
|
|
43
|
+
--_size: var(--ui-control-size-lg);
|
|
44
|
+
--_font: var(--ui-font-size-md);
|
|
45
|
+
--_padding: var(--ui-control-inset-block-lg, var(--ui-space-3));
|
|
46
|
+
}
|
|
47
|
+
button {
|
|
48
|
+
--_radius: min(var(--ui-field-radius, var(--ui-radius-md)), calc(var(--_size) / 4));
|
|
49
|
+
--_inset: min(calc(var(--ui-space-1) * 1.5), calc(var(--_size) / 5));
|
|
50
|
+
box-sizing: border-box !important;
|
|
51
|
+
display: inline-grid !important;
|
|
52
|
+
place-items: center;
|
|
53
|
+
margin: 0 !important;
|
|
54
|
+
padding: var(--_inset) !important;
|
|
55
|
+
inline-size: max(var(--_size), calc(var(--_font) * var(--ui-line-height-tight) + var(--_padding) * 2 + var(--ui-border-width) * 2));
|
|
56
|
+
aspect-ratio: 1;
|
|
57
|
+
flex: 0 0 auto;
|
|
58
|
+
border: var(--ui-border-width) solid var(--ui-control-border, var(--ui-border-strong));
|
|
59
|
+
border-radius: var(--_radius);
|
|
60
|
+
background: var(--ui-control-surface, var(--ui-surface-elevated));
|
|
61
|
+
box-shadow: var(--ui-control-inset);
|
|
62
|
+
font: inherit;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
transition: background-color var(--ui-motion-fast) var(--ui-motion-ease), scale var(--ui-motion-press, var(--ui-motion-fast)) var(--ui-motion-ease);
|
|
65
|
+
}
|
|
66
|
+
button:hover:not(:disabled) {
|
|
67
|
+
background: var(--ui-surface-subtle);
|
|
68
|
+
}
|
|
69
|
+
button:active:not(:disabled) {
|
|
70
|
+
scale: var(--ui-press-scale, 0.96);
|
|
71
|
+
}
|
|
72
|
+
button:focus-visible {
|
|
73
|
+
outline: var(--ui-focus-width) solid var(--ui-focus-ring, var(--ui-accent-solid));
|
|
74
|
+
outline-offset: var(--ui-focus-width);
|
|
75
|
+
}
|
|
76
|
+
button:disabled {
|
|
77
|
+
opacity: 0.5;
|
|
78
|
+
cursor: not-allowed;
|
|
79
|
+
}
|
|
80
|
+
.colour {
|
|
81
|
+
display: block !important;
|
|
82
|
+
inline-size: 100%;
|
|
83
|
+
block-size: 100%;
|
|
84
|
+
border-radius: max(0px, calc(var(--_radius) - var(--_inset) - var(--ui-border-width)));
|
|
85
|
+
box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12);
|
|
86
|
+
}
|
|
87
|
+
:host([round]) button {
|
|
88
|
+
border-radius: 50%;
|
|
89
|
+
}
|
|
90
|
+
:host([round]) .colour {
|
|
91
|
+
border-radius: 50%;
|
|
92
|
+
}
|
|
93
|
+
.editor {
|
|
94
|
+
box-sizing: border-box !important;
|
|
95
|
+
display: grid !important;
|
|
96
|
+
gap: var(--ui-space-3) !important;
|
|
97
|
+
padding: var(--ui-space-4) !important;
|
|
98
|
+
margin: 0 !important;
|
|
99
|
+
inline-size: min(18rem, calc(100vw - 1rem));
|
|
100
|
+
border: var(--ui-border-width) solid var(--ui-border-strong);
|
|
101
|
+
border-radius: var(--ui-radius-md);
|
|
102
|
+
background: var(--ui-surface-elevated);
|
|
103
|
+
color: var(--ui-text-primary);
|
|
104
|
+
box-shadow: var(--ui-shadow-lg);
|
|
105
|
+
font: inherit;
|
|
106
|
+
}
|
|
107
|
+
.editor[hidden] {
|
|
108
|
+
display: none !important;
|
|
109
|
+
}
|
|
110
|
+
.channel {
|
|
111
|
+
display: grid !important;
|
|
112
|
+
grid-template-columns: 3.5em 1fr;
|
|
113
|
+
align-items: center !important;
|
|
114
|
+
gap: var(--ui-space-2) !important;
|
|
115
|
+
padding: 0 !important;
|
|
116
|
+
margin: 0 !important;
|
|
117
|
+
}
|
|
118
|
+
input[type="range"] {
|
|
119
|
+
inline-size: 100%;
|
|
120
|
+
min-inline-size: 0;
|
|
121
|
+
margin: 0 !important;
|
|
122
|
+
padding: 0 !important;
|
|
123
|
+
accent-color: var(--ui-accent-solid);
|
|
124
|
+
}
|
|
125
|
+
@media (pointer: coarse) {
|
|
126
|
+
:host {
|
|
127
|
+
--_size: max(var(--ui-control-size-md), var(--ui-control-min-block-size));
|
|
128
|
+
}
|
|
129
|
+
:host([size="sm"]) {
|
|
130
|
+
--_size: var(--ui-control-min-block-size);
|
|
131
|
+
--_font: var(--ui-font-size-md);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
</style>
|
|
135
|
+
</template>
|