@threadlabs/looma 0.41.2 → 0.43.0
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/components/ui-action-bar/ui-action-bar.html +1 -7
- package/components/ui-affordance-scope/ui-affordance-scope.html +4 -4
- package/components/ui-avatar/ui-avatar.html +0 -22
- package/components/ui-avatar-group/ui-avatar-group.html +1 -11
- package/components/ui-badge/ui-badge.html +57 -78
- package/components/ui-button/ui-button.html +66 -90
- package/components/ui-button/ui-button.js +2 -2
- package/components/ui-callout/ui-callout.html +31 -69
- package/components/ui-card/ui-card.html +47 -21
- package/components/ui-checkbox/ui-checkbox.html +2 -16
- package/components/ui-cluster/ui-cluster.html +1 -7
- package/components/ui-combobox/ui-combobox.html +7 -70
- package/components/ui-container/ui-container.html +2 -12
- package/components/ui-context-menu/ui-context-menu.html +1 -23
- package/components/ui-dialog/ui-dialog.html +9 -41
- package/components/ui-disclosure/ui-disclosure.html +1 -15
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +1 -1
- package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +1 -1
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +1 -1
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +2 -2
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +2 -2
- package/components/ui-floating-action-button/ui-floating-action-button.html +0 -14
- package/components/ui-form-field/ui-form-field.html +2 -32
- package/components/ui-grid/ui-grid.html +1 -11
- package/components/ui-icon/ui-icon.html +1 -12
- package/components/ui-icon-button/ui-icon-button.html +94 -94
- package/components/ui-input/ui-input.html +5 -55
- package/components/ui-input-group/ui-input-group.html +1 -13
- package/components/ui-light-editor/ui-light-editor.html +1 -1
- package/components/ui-list/ui-list.html +0 -10
- package/components/ui-list-item/ui-list-item.html +1 -19
- package/components/ui-listbox/ui-listbox.html +0 -21
- package/components/ui-menu/ui-menu.html +8 -32
- package/components/ui-menu-item/ui-menu-item.html +1 -27
- package/components/ui-meter/ui-meter.html +11 -6
- package/components/ui-nav-item/ui-nav-item.html +0 -18
- package/components/ui-popover/ui-popover.html +9 -41
- package/components/ui-radio/ui-radio.html +58 -12
- package/components/ui-radio-group/ui-radio-group.html +0 -5
- package/components/ui-reel/ui-reel.html +1 -11
- package/components/ui-search-result-row/ui-search-result-row.html +0 -34
- package/components/ui-search-shell/ui-search-shell.html +1 -43
- package/components/ui-section/ui-section.html +1 -1
- package/components/ui-select/ui-select.html +0 -42
- package/components/ui-separator/ui-separator.html +0 -6
- package/components/ui-sidebar/ui-sidebar.html +2 -24
- package/components/ui-site-header/ui-site-header.html +0 -25
- package/components/ui-skeleton/ui-skeleton.html +0 -9
- package/components/ui-stack/ui-stack.html +6 -11
- package/components/ui-status-message/ui-status-message.html +1 -1
- package/components/ui-swatch/ui-swatch.html +0 -5
- package/components/ui-switch/ui-switch.html +6 -17
- package/components/ui-switcher/ui-switcher.html +1 -11
- package/components/ui-tabs/ui-tabs.html +4 -22
- package/components/ui-text/ui-text.html +20 -7
- package/components/ui-textarea/ui-textarea.html +0 -50
- package/components/ui-toast/ui-toast.html +12 -27
- package/components/ui-toast-region/ui-toast-region.html +13 -34
- package/components/ui-tooltip/ui-tooltip.html +9 -53
- package/components/ui-top-bar/ui-top-bar.html +1 -31
- package/components/ui-tree/ui-tree.html +1 -16
- package/components/ui-tree-item/ui-tree-item.html +1 -23
- package/components/ui-tree-item/ui-tree-item.js +0 -1
- package/dist/index.js +1 -1
- package/docs/README.md +15 -9
- package/docs/catalog.json +973 -186
- package/docs/customizer-render.mjs +25 -9
- package/docs/customizer.js +42 -2
- package/docs/fonts.mjs +1 -1
- package/docs/palette.mjs +5 -4
- package/docs/theme.mjs +214 -51
- package/docs/value-editors.mjs +2 -1
- package/package.json +2 -2
- package/styles/ui-action-bar.css +3 -11
- package/styles/ui-affordance-scope.css +4 -4
- package/styles/ui-avatar-group.css +3 -15
- package/styles/ui-avatar.css +2 -26
- package/styles/ui-badge.css +56 -80
- package/styles/ui-button.css +65 -92
- package/styles/ui-callout.css +33 -73
- package/styles/ui-card.css +42 -18
- package/styles/ui-checkbox.css +4 -20
- package/styles/ui-cluster.css +2 -10
- package/styles/ui-combobox.css +7 -140
- package/styles/ui-container.css +2 -14
- package/styles/ui-context-menu.css +3 -27
- package/styles/ui-dialog.css +22 -88
- package/styles/ui-disclosure.css +3 -19
- package/styles/ui-editor-mention-menu-item.css +1 -1
- package/styles/ui-editor-mention-menu.css +1 -1
- package/styles/ui-editor-table-context-menu.css +1 -1
- package/styles/ui-editor-table-overlay.css +2 -2
- package/styles/ui-editor-table-toolbar.css +2 -2
- package/styles/ui-floating-action-button.css +2 -18
- package/styles/ui-form-field.css +4 -36
- package/styles/ui-grid.css +2 -14
- package/styles/ui-icon-button.css +93 -96
- package/styles/ui-icon.css +3 -16
- package/styles/ui-input-group.css +2 -14
- package/styles/ui-input.css +6 -57
- package/styles/ui-light-editor.css +2 -2
- package/styles/ui-list-item.css +3 -23
- package/styles/ui-list.css +2 -14
- package/styles/ui-listbox.css +2 -44
- package/styles/ui-menu-item.css +3 -31
- package/styles/ui-menu.css +11 -37
- package/styles/ui-meter.css +8 -4
- package/styles/ui-nav-item.css +2 -22
- package/styles/ui-popover.css +12 -46
- package/styles/ui-radio-group.css +1 -6
- package/styles/ui-radio.css +68 -15
- package/styles/ui-reel.css +2 -14
- package/styles/ui-search-result-row.css +2 -38
- package/styles/ui-search-shell.css +3 -47
- package/styles/ui-section.css +1 -1
- package/styles/ui-select.css +2 -46
- package/styles/ui-separator.css +2 -10
- package/styles/ui-sidebar.css +4 -28
- package/styles/ui-site-header.css +1 -26
- package/styles/ui-skeleton.css +2 -12
- package/styles/ui-stack.css +4 -12
- package/styles/ui-status-message.css +1 -1
- package/styles/ui-swatch.css +1 -6
- package/styles/ui-switch.css +8 -21
- package/styles/ui-switcher.css +2 -14
- package/styles/ui-tabs.css +6 -26
- package/styles/ui-text.css +11 -3
- package/styles/ui-textarea.css +2 -54
- package/styles/ui-toast-region.css +29 -73
- package/styles/ui-toast.css +24 -54
- package/styles/ui-tooltip.css +12 -58
- package/styles/ui-top-bar.css +3 -35
- package/styles/ui-tree-item.css +5 -51
- package/styles/ui-tree.css +3 -20
- package/theme-system.css +16 -10
- package/tokens.css +75 -18
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +1 -1
- package/vanilla/UiButton.d.ts +1 -1
- package/vanilla/UiButton.js +1 -1
- package/vanilla/UiCard.d.ts +1 -1
- package/vanilla/UiCard.js +1 -1
- package/vanilla/UiIconButton.d.ts +1 -1
- package/vanilla/UiIconButton.js +1 -1
- package/vanilla/UiMeter.d.ts +1 -1
- package/vanilla/UiMeter.js +1 -1
- package/vanilla/UiStack.js +1 -1
- package/vanilla/UiText.d.ts +1 -1
- package/vanilla/UiText.js +1 -1
- package/vue/UiActionBar.vue +3 -9
- package/vue/UiAffordanceScope.vue +4 -4
- package/vue/UiAvatar.vue +1 -28
- package/vue/UiAvatarGroup.vue +1 -11
- package/vue/UiBadge.d.ts +2 -2
- package/vue/UiBadge.vue +84 -81
- package/vue/UiButton.d.ts +2 -2
- package/vue/UiButton.vue +120 -106
- package/vue/UiCallout.vue +31 -72
- package/vue/UiCard.d.ts +2 -2
- package/vue/UiCard.vue +77 -32
- package/vue/UiCheckbox.vue +2 -16
- package/vue/UiCluster.vue +1 -10
- package/vue/UiCombobox.vue +13 -72
- package/vue/UiContainer.vue +1 -13
- package/vue/UiContextMenu.vue +1 -30
- package/vue/UiDialog.vue +23 -77
- package/vue/UiDisclosure.vue +1 -15
- package/vue/UiEditorMentionMenu.vue +1 -1
- package/vue/UiEditorMentionMenuItem.vue +1 -1
- package/vue/UiEditorTableContextMenu.vue +1 -1
- package/vue/UiEditorTableOverlay.vue +2 -2
- package/vue/UiEditorTableToolbar.vue +2 -2
- package/vue/UiFloatingActionButton.vue +0 -22
- package/vue/UiFormField.vue +6 -33
- package/vue/UiGrid.vue +1 -13
- package/vue/UiIcon.vue +1 -16
- package/vue/UiIconButton.d.ts +2 -2
- package/vue/UiIconButton.vue +145 -106
- package/vue/UiInput.vue +1 -54
- package/vue/UiInputGroup.vue +8 -20
- package/vue/UiLightEditor.vue +2 -2
- package/vue/UiList.vue +2 -12
- package/vue/UiListItem.vue +8 -26
- package/vue/UiListbox.vue +0 -23
- package/vue/UiMenu.vue +12 -44
- package/vue/UiMenuItem.vue +1 -27
- package/vue/UiMeter.d.ts +2 -2
- package/vue/UiMeter.vue +47 -12
- package/vue/UiNavItem.vue +3 -21
- package/vue/UiPopover.vue +12 -53
- package/vue/UiRadio.vue +58 -12
- package/vue/UiRadioGroup.vue +0 -11
- package/vue/UiReel.vue +1 -11
- package/vue/UiSearchResultRow.vue +0 -35
- package/vue/UiSearchShell.vue +1 -53
- package/vue/UiSection.vue +1 -1
- package/vue/UiSelect.vue +0 -42
- package/vue/UiSeparator.vue +0 -7
- package/vue/UiSidebar.vue +3 -26
- package/vue/UiSiteHeader.vue +0 -24
- package/vue/UiSkeleton.vue +0 -9
- package/vue/UiStack.vue +6 -11
- package/vue/UiStatusMessage.vue +1 -1
- package/vue/UiSwatch.vue +1 -6
- package/vue/UiSwitch.vue +6 -17
- package/vue/UiSwitcher.vue +1 -14
- package/vue/UiTabs.vue +4 -22
- package/vue/UiText.d.ts +2 -2
- package/vue/UiText.vue +30 -5
- package/vue/UiTextarea.vue +0 -50
- package/vue/UiToast.vue +26 -34
- package/vue/UiToastRegion.vue +26 -55
- package/vue/UiTooltip.vue +12 -64
- package/vue/UiTopBar.vue +1 -34
- package/vue/UiTree.vue +2 -17
- package/vue/UiTreeItem.vue +2 -28
- 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 +4 -2
- package/vue/chunks/UiButton.js +4 -2
- package/vue/chunks/UiCallout.js +1 -1
- package/vue/chunks/UiCard.js +5 -3
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiCluster.js +2 -2
- package/vue/chunks/UiCombobox.js +3 -3
- package/vue/chunks/UiContainer.js +2 -2
- package/vue/chunks/UiContextMenu.js +1 -1
- package/vue/chunks/UiDialog.js +1 -1
- package/vue/chunks/UiDisclosure.js +1 -1
- package/vue/chunks/UiEditorMentionMenu.js +1 -1
- package/vue/chunks/UiEditorMentionMenuItem.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/UiFloatingActionButton.js +1 -1
- package/vue/chunks/UiFormField.js +1 -1
- package/vue/chunks/UiGrid.js +2 -2
- package/vue/chunks/UiIcon.js +1 -1
- package/vue/chunks/UiIconButton.js +4 -2
- package/vue/chunks/UiInput.js +1 -1
- package/vue/chunks/UiInputGroup.js +1 -1
- package/vue/chunks/UiLightEditor.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/UiMenuItem.js +1 -1
- package/vue/chunks/UiMeter.js +4 -2
- package/vue/chunks/UiNavItem.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 +2 -2
- 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/UiSiteHeader.js +1 -1
- package/vue/chunks/UiSkeleton.js +1 -1
- package/vue/chunks/UiStack.js +3 -3
- 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 +2 -2
- package/vue/chunks/UiTabs.js +1 -1
- package/vue/chunks/UiText.js +4 -2
- 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 +857 -2184
- package/vue/editor/index.js +8 -2
|
@@ -9,17 +9,11 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
|
11
11
|
<style>
|
|
12
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
13
|
-
@property --ui-action-bar-gap {
|
|
14
|
-
syntax: "*";
|
|
15
|
-
inherits: false;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
12
|
/* The action row of a form or dialog. Tertiary actions (Back, Cancel, Discard) sit at the start
|
|
19
13
|
edge; secondary actions (Save as draft, Preview) sit just before the primary one, which ends the
|
|
20
14
|
row. The bar arranges its actions and leaves their look to them. */
|
|
21
15
|
:host {
|
|
22
|
-
/*
|
|
16
|
+
/* Resolve shared part values at the component root. */
|
|
23
17
|
--_ui-action-bar-gap: var(--ui-action-bar-gap);
|
|
24
18
|
|
|
25
19
|
--_gap: var(--ui-space-2);
|
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
<style>
|
|
11
11
|
:host {
|
|
12
12
|
display: contents !important;
|
|
13
|
-
--
|
|
14
|
-
--
|
|
13
|
+
--_ui-affordance-scope-engaged: 0;
|
|
14
|
+
--_ui-affordance-scope-guide: 1;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
:host(:state(engaged)) {
|
|
18
|
-
--
|
|
18
|
+
--_ui-affordance-scope-engaged: 1;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/* Published to descendants: each guide multiplies its opacity by it, so none reaches them all. */
|
|
22
22
|
:host([guide="none"]) {
|
|
23
|
-
--
|
|
23
|
+
--_ui-affordance-scope-guide: 0;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
@@ -36,28 +36,6 @@
|
|
|
36
36
|
</span>
|
|
37
37
|
</span>
|
|
38
38
|
<style>
|
|
39
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
40
|
-
@property --ui-avatar-border {
|
|
41
|
-
syntax: "*";
|
|
42
|
-
inherits: false;
|
|
43
|
-
}
|
|
44
|
-
@property --ui-avatar-radius {
|
|
45
|
-
syntax: "*";
|
|
46
|
-
inherits: false;
|
|
47
|
-
}
|
|
48
|
-
@property --ui-avatar-surface {
|
|
49
|
-
syntax: "*";
|
|
50
|
-
inherits: false;
|
|
51
|
-
}
|
|
52
|
-
@property --ui-avatar-text {
|
|
53
|
-
syntax: "*";
|
|
54
|
-
inherits: false;
|
|
55
|
-
}
|
|
56
|
-
@property --ui-avatar-active-ring {
|
|
57
|
-
syntax: "*";
|
|
58
|
-
inherits: false;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
39
|
:host {
|
|
62
40
|
--_ui-default-icon-size: 1.25rem;
|
|
63
41
|
display: inline-grid !important;
|
|
@@ -21,18 +21,8 @@
|
|
|
21
21
|
<span class="overflow" $ref="overflow" role="img" from:hidden="not $overflowCount" from:aria-label="$overflowAnnouncement">+{$overflowCount}</span>
|
|
22
22
|
</div>
|
|
23
23
|
<style>
|
|
24
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
25
|
-
@property --ui-avatar-group-edge-ring {
|
|
26
|
-
syntax: "*";
|
|
27
|
-
inherits: false;
|
|
28
|
-
}
|
|
29
|
-
@property --ui-avatar-group-overlap-shadow {
|
|
30
|
-
syntax: "*";
|
|
31
|
-
inherits: false;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
24
|
:host {
|
|
35
|
-
/*
|
|
25
|
+
/* Resolve shared part values at the component root. */
|
|
36
26
|
--_ui-avatar-group-overlap-shadow: var(--ui-avatar-group-overlap-shadow);
|
|
37
27
|
--_ui-avatar-group-edge-ring: var(--ui-avatar-group-edge-ring);
|
|
38
28
|
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
inverse uses a translucent contrasting surface and toned ink for a count or label on a filled control of that tone. Neutral looks the same in solid and
|
|
6
6
|
subtle. overlay inherits the containing filled control's text colour on a faint translucent fill, with a quiet single-pixel boundary and no shadow. Its
|
|
7
7
|
small circle is 20px. When space is constrained, the label truncates with an ellipsis while its full text remains available.</prop>
|
|
8
|
-
<prop name="tone" type="keyword" values="neutral, accent, info, success, warning, danger" default="neutral"
|
|
8
|
+
<prop name="tone" type="keyword" values="neutral, accent, accent-secondary, accent-tertiary, info, success, warning, danger" default="neutral"
|
|
9
9
|
>Which colour the badge speaks in. neutral is a quiet grey for plain labels; accent draws the eye in the accent colour; info, success, warning, and danger
|
|
10
10
|
mark a status, so match the tone to what the badge says. For a category rather than a status, set the --ui-badge-color hook on the badge instead: any CSS
|
|
11
|
-
colour, which overrides the tone
|
|
11
|
+
colour, which overrides the tone. Supporting brand families use accent-secondary and accent-tertiary; their usable colors derive from the theme, and unset
|
|
12
|
+
families follow the primary accent.</prop>
|
|
12
13
|
<prop name="shape" type="keyword" values="pill, tag, dot, square, circle" default="pill"
|
|
13
14
|
>Silhouette. pill is rounded at both ends; tag is a pointed label. dot is a compact circular signal with visually hidden text: include a state label, or set
|
|
14
15
|
aria-hidden when the surrounding control already names that state. square is a fixed rounded square for an icon or single glyph beside a heading; hide a
|
|
@@ -24,68 +25,6 @@
|
|
|
24
25
|
<span class="label"><slot></slot></span>
|
|
25
26
|
</span>
|
|
26
27
|
<style>
|
|
27
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
28
|
-
@property --ui-badge-border {
|
|
29
|
-
syntax: "*";
|
|
30
|
-
inherits: false;
|
|
31
|
-
}
|
|
32
|
-
@property --ui-badge-square-size {
|
|
33
|
-
syntax: "*";
|
|
34
|
-
inherits: false;
|
|
35
|
-
}
|
|
36
|
-
@property --ui-badge-circle-size {
|
|
37
|
-
syntax: "*";
|
|
38
|
-
inherits: false;
|
|
39
|
-
}
|
|
40
|
-
@property --ui-badge-circle-opacity {
|
|
41
|
-
syntax: "*";
|
|
42
|
-
inherits: false;
|
|
43
|
-
}
|
|
44
|
-
@property --ui-badge-dot-size {
|
|
45
|
-
syntax: "*";
|
|
46
|
-
inherits: false;
|
|
47
|
-
}
|
|
48
|
-
@property --ui-badge-color {
|
|
49
|
-
syntax: "*";
|
|
50
|
-
inherits: false;
|
|
51
|
-
}
|
|
52
|
-
@property --ui-badge-font-size {
|
|
53
|
-
syntax: "*";
|
|
54
|
-
inherits: false;
|
|
55
|
-
}
|
|
56
|
-
@property --ui-badge-font-weight {
|
|
57
|
-
syntax: "*";
|
|
58
|
-
inherits: false;
|
|
59
|
-
}
|
|
60
|
-
@property --ui-badge-line-height {
|
|
61
|
-
syntax: "*";
|
|
62
|
-
inherits: false;
|
|
63
|
-
}
|
|
64
|
-
@property --ui-badge-min-block-size {
|
|
65
|
-
syntax: "*";
|
|
66
|
-
inherits: false;
|
|
67
|
-
}
|
|
68
|
-
@property --ui-badge-padding-block {
|
|
69
|
-
syntax: "*";
|
|
70
|
-
inherits: false;
|
|
71
|
-
}
|
|
72
|
-
@property --ui-badge-padding-inline {
|
|
73
|
-
syntax: "*";
|
|
74
|
-
inherits: false;
|
|
75
|
-
}
|
|
76
|
-
@property --ui-badge-point {
|
|
77
|
-
syntax: "*";
|
|
78
|
-
inherits: false;
|
|
79
|
-
}
|
|
80
|
-
@property --ui-badge-surface {
|
|
81
|
-
syntax: "*";
|
|
82
|
-
inherits: false;
|
|
83
|
-
}
|
|
84
|
-
@property --ui-badge-text {
|
|
85
|
-
syntax: "*";
|
|
86
|
-
inherits: false;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
28
|
:host {
|
|
90
29
|
--_badge-surface: color-mix(in srgb, var(--ui-surface-subtle) 80%, var(--ui-surface-default));
|
|
91
30
|
--_badge-text: var(--ui-text-secondary);
|
|
@@ -204,6 +143,40 @@
|
|
|
204
143
|
line-height: var(--ui-badge-line-height, 1);
|
|
205
144
|
}
|
|
206
145
|
|
|
146
|
+
:host([tone="accent-secondary"]) {
|
|
147
|
+
--_badge-surface: var(--ui-accent-secondary-strong-surface, var(--ui-accent-secondary-solid));
|
|
148
|
+
--_badge-border: var(--ui-accent-secondary-strong-surface, var(--ui-accent-secondary-solid));
|
|
149
|
+
--_badge-text: var(--ui-accent-secondary-on-strong, var(--ui-text-on-accent));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:host([tone="accent-tertiary"]) {
|
|
153
|
+
--_badge-surface: var(--ui-accent-tertiary-strong-surface, var(--ui-accent-tertiary-solid));
|
|
154
|
+
--_badge-border: var(--ui-accent-tertiary-strong-surface, var(--ui-accent-tertiary-solid));
|
|
155
|
+
--_badge-text: var(--ui-accent-tertiary-on-strong, var(--ui-text-on-accent));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:host([variant="subtle"][tone="accent-secondary"]) {
|
|
159
|
+
--_badge-surface: var(--ui-accent-secondary-soft);
|
|
160
|
+
--_badge-border: var(--ui-accent-secondary-soft-border);
|
|
161
|
+
--_badge-text: var(--ui-accent-secondary-subtle-text, var(--ui-accent-secondary-solid));
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:host([variant="subtle"][tone="accent-tertiary"]) {
|
|
165
|
+
--_badge-surface: var(--ui-accent-tertiary-soft);
|
|
166
|
+
--_badge-border: var(--ui-accent-tertiary-soft-border);
|
|
167
|
+
--_badge-text: var(--ui-accent-tertiary-subtle-text, var(--ui-accent-tertiary-solid));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:host([variant="outline"][tone="accent-secondary"]) {
|
|
171
|
+
--_badge-border: var(--ui-accent-secondary-solid);
|
|
172
|
+
--_badge-text: var(--ui-accent-secondary-subtle-text, var(--ui-accent-secondary-solid));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:host([variant="outline"][tone="accent-tertiary"]) {
|
|
176
|
+
--_badge-border: var(--ui-accent-tertiary-solid);
|
|
177
|
+
--_badge-text: var(--ui-accent-tertiary-subtle-text, var(--ui-accent-tertiary-solid));
|
|
178
|
+
}
|
|
179
|
+
|
|
207
180
|
:host([tone="accent"]) {
|
|
208
181
|
--_badge-surface: var(--ui-accent-strong-surface, var(--ui-accent-solid));
|
|
209
182
|
--_badge-border: var(--ui-accent-strong-surface, var(--ui-accent-solid));
|
|
@@ -235,32 +208,32 @@
|
|
|
235
208
|
}
|
|
236
209
|
|
|
237
210
|
:host([variant="subtle"][tone="accent"]) {
|
|
238
|
-
--_badge-surface:
|
|
239
|
-
--_badge-border:
|
|
211
|
+
--_badge-surface: var(--ui-accent-soft);
|
|
212
|
+
--_badge-border: var(--ui-accent-soft-border);
|
|
240
213
|
--_badge-text: var(--ui-accent-subtle-text, var(--ui-accent-solid));
|
|
241
214
|
}
|
|
242
215
|
|
|
243
216
|
:host([variant="subtle"][tone="danger"]) {
|
|
244
|
-
--_badge-surface:
|
|
245
|
-
--_badge-border:
|
|
217
|
+
--_badge-surface: var(--ui-danger-soft);
|
|
218
|
+
--_badge-border: var(--ui-danger-soft-border);
|
|
246
219
|
--_badge-text: var(--ui-danger-subtle-text, var(--ui-danger-solid));
|
|
247
220
|
}
|
|
248
221
|
|
|
249
222
|
:host([variant="subtle"][tone="success"]) {
|
|
250
|
-
--_badge-surface:
|
|
251
|
-
--_badge-border:
|
|
223
|
+
--_badge-surface: var(--ui-success-soft);
|
|
224
|
+
--_badge-border: var(--ui-success-soft-border);
|
|
252
225
|
--_badge-text: var(--ui-success-subtle-text, var(--ui-success-solid));
|
|
253
226
|
}
|
|
254
227
|
|
|
255
228
|
:host([variant="subtle"][tone="warning"]) {
|
|
256
|
-
--_badge-surface:
|
|
257
|
-
--_badge-border:
|
|
229
|
+
--_badge-surface: var(--ui-warning-soft);
|
|
230
|
+
--_badge-border: var(--ui-warning-soft-border);
|
|
258
231
|
--_badge-text: var(--ui-warning-subtle-text, var(--ui-warning-solid));
|
|
259
232
|
}
|
|
260
233
|
|
|
261
234
|
:host([variant="subtle"][tone="info"]) {
|
|
262
|
-
--_badge-surface:
|
|
263
|
-
--_badge-border:
|
|
235
|
+
--_badge-surface: var(--ui-info-soft);
|
|
236
|
+
--_badge-border: var(--ui-info-soft-border);
|
|
264
237
|
--_badge-text: var(--ui-info-subtle-text, var(--ui-info-solid));
|
|
265
238
|
}
|
|
266
239
|
|
|
@@ -333,10 +306,16 @@
|
|
|
333
306
|
border-color: var(--ui-badge-border, var(--_badge-color-border, var(--_badge-outline-surface)));
|
|
334
307
|
}
|
|
335
308
|
:host([variant="inverse"][tone="neutral"][shape="circle"]) {
|
|
336
|
-
--_badge-outline-surface: var(
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
309
|
+
--_badge-outline-surface: var(
|
|
310
|
+
--ui-badge-surface,
|
|
311
|
+
var(
|
|
312
|
+
--_badge-color-surface,
|
|
313
|
+
light-dark(
|
|
314
|
+
color-mix(in srgb, var(--ui-surface-raised) var(--ui-badge-circle-opacity, 66%), transparent),
|
|
315
|
+
color-mix(in srgb, var(--ui-surface-raised) var(--ui-badge-circle-opacity, 56%), transparent)
|
|
316
|
+
)
|
|
317
|
+
)
|
|
318
|
+
);
|
|
340
319
|
}
|
|
341
320
|
|
|
342
321
|
:host([variant="outline"]) {
|
|
@@ -24,10 +24,11 @@
|
|
|
24
24
|
keep their normal layout.</prop>
|
|
25
25
|
<prop name="shape" type="keyword" values="rounded, pill" default="rounded"
|
|
26
26
|
>rounded uses the theme's action radius; pill rounds the ends fully, for a compact choice such as a status or a person.</prop>
|
|
27
|
-
<prop name="tone" type="keyword" values="accent, neutral, danger, success, warning, info" default="neutral"
|
|
27
|
+
<prop name="tone" type="keyword" values="accent, accent-secondary, accent-tertiary, neutral, danger, success, warning, info" default="neutral"
|
|
28
28
|
>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:
|
|
29
29
|
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
|
|
30
|
-
variant always uses neutral field colors
|
|
30
|
+
variant always uses neutral field colors. Supporting brand families use accent-secondary and accent-tertiary; their usable colors derive from the theme,
|
|
31
|
+
and unset families follow the primary accent.</prop>
|
|
31
32
|
<prop name="disabled" type="boolean" default="false"
|
|
32
33
|
>Makes the button unavailable: it cannot be pressed, uses a flat neutral palette, and loses its raised look. A disabled link (with href) drops its href and
|
|
33
34
|
states aria-disabled="true" instead, because a link has no native disabled state.</prop>
|
|
@@ -112,80 +113,6 @@
|
|
|
112
113
|
</button>
|
|
113
114
|
</template>
|
|
114
115
|
<style>
|
|
115
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
116
|
-
@property --ui-button-active-surface {
|
|
117
|
-
syntax: "*";
|
|
118
|
-
inherits: false;
|
|
119
|
-
}
|
|
120
|
-
@property --ui-button-border {
|
|
121
|
-
syntax: "*";
|
|
122
|
-
inherits: false;
|
|
123
|
-
}
|
|
124
|
-
@property --ui-button-disabled-filter {
|
|
125
|
-
syntax: "*";
|
|
126
|
-
inherits: false;
|
|
127
|
-
}
|
|
128
|
-
@property --ui-button-disabled-opacity {
|
|
129
|
-
syntax: "*";
|
|
130
|
-
inherits: false;
|
|
131
|
-
}
|
|
132
|
-
@property --ui-button-ghost-active-surface {
|
|
133
|
-
syntax: "*";
|
|
134
|
-
inherits: false;
|
|
135
|
-
}
|
|
136
|
-
@property --ui-button-ghost-hover-surface {
|
|
137
|
-
syntax: "*";
|
|
138
|
-
inherits: false;
|
|
139
|
-
}
|
|
140
|
-
@property --ui-button-ghost-text {
|
|
141
|
-
syntax: "*";
|
|
142
|
-
inherits: false;
|
|
143
|
-
}
|
|
144
|
-
@property --ui-button-hover-border {
|
|
145
|
-
syntax: "*";
|
|
146
|
-
inherits: false;
|
|
147
|
-
}
|
|
148
|
-
@property --ui-button-hover-surface {
|
|
149
|
-
syntax: "*";
|
|
150
|
-
inherits: false;
|
|
151
|
-
}
|
|
152
|
-
@property --ui-button-link-hover-text {
|
|
153
|
-
syntax: "*";
|
|
154
|
-
inherits: false;
|
|
155
|
-
}
|
|
156
|
-
@property --ui-button-link-text {
|
|
157
|
-
syntax: "*";
|
|
158
|
-
inherits: false;
|
|
159
|
-
}
|
|
160
|
-
@property --ui-button-min-block-size {
|
|
161
|
-
syntax: "*";
|
|
162
|
-
inherits: false;
|
|
163
|
-
}
|
|
164
|
-
@property --ui-button-radius {
|
|
165
|
-
syntax: "*";
|
|
166
|
-
inherits: false;
|
|
167
|
-
}
|
|
168
|
-
@property --ui-button-shadow {
|
|
169
|
-
syntax: "*";
|
|
170
|
-
inherits: false;
|
|
171
|
-
}
|
|
172
|
-
@property --ui-button-solid-shadow {
|
|
173
|
-
syntax: "*";
|
|
174
|
-
inherits: false;
|
|
175
|
-
}
|
|
176
|
-
@property --ui-button-surface {
|
|
177
|
-
syntax: "*";
|
|
178
|
-
inherits: false;
|
|
179
|
-
}
|
|
180
|
-
@property --ui-button-text {
|
|
181
|
-
syntax: "*";
|
|
182
|
-
inherits: false;
|
|
183
|
-
}
|
|
184
|
-
@property --ui-button-white-space {
|
|
185
|
-
syntax: "*";
|
|
186
|
-
inherits: false;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
116
|
:host {
|
|
190
117
|
/* Optional inherited action-group values keep text and icon actions under the same light.
|
|
191
118
|
One fine top/start highlight follows the bottom/end lowlight at a joined action seam.
|
|
@@ -197,12 +124,15 @@
|
|
|
197
124
|
inset calc(-1 * var(--_ui-action-start)) -1px 0 light-dark(rgb(0 0 0 / 0.08), rgb(0 0 0 / 0.08))
|
|
198
125
|
);
|
|
199
126
|
--_ui-action-shadow: var(--_ui-action-edge), 0 1px 2px light-dark(rgb(0 0 0 / 0.10), rgb(0 0 0 / 0.20));
|
|
127
|
+
--_tone-border: var(--ui-accent-border, var(--ui-accent));
|
|
128
|
+
--_tone-hover-border: var(--ui-accent-hover-border, var(--ui-accent-hover));
|
|
129
|
+
--_tone-active-border: var(--ui-accent-active-border, var(--ui-accent-active));
|
|
200
130
|
--_tone-highlight: var(--ui-accent-highlight, none);
|
|
201
131
|
--_tone-glow: var(--ui-accent-glow, 0 0 transparent);
|
|
202
132
|
--_hue: var(--ui-accent);
|
|
203
133
|
--_hue-hover: var(--ui-accent-hover);
|
|
204
134
|
--_hue-active: var(--ui-accent-active);
|
|
205
|
-
--_hue-text: var(--ui-accent-
|
|
135
|
+
--_hue-text: var(--ui-accent-subtle-text);
|
|
206
136
|
--_on-hue: var(--ui-on-accent);
|
|
207
137
|
|
|
208
138
|
--_tone: var(--_hue);
|
|
@@ -240,9 +170,9 @@
|
|
|
240
170
|
min-block-size: var(--ui-button-min-block-size, var(--ui-control-size-md));
|
|
241
171
|
border-style: solid;
|
|
242
172
|
border-width: var(--ui-border-width);
|
|
243
|
-
border-color: var(--ui-button-border, var(--_tone));
|
|
173
|
+
border-color: var(--ui-button-border, var(--_tone-text));
|
|
244
174
|
border-radius: var(--ui-button-radius, var(--ui-action-radius, var(--ui-radius-md)));
|
|
245
|
-
background-color: var(--ui-button-surface, oklch(from var(--_tone) l c h / 5%));
|
|
175
|
+
background-color: var(--ui-button-surface, oklch(from var(--_tone) l c h / calc(5% * var(--ui-tonal-opacity, 1))));
|
|
246
176
|
color: var(--ui-button-text, var(--_tone-text));
|
|
247
177
|
font: inherit;
|
|
248
178
|
font-weight: var(--ui-font-medium);
|
|
@@ -385,8 +315,8 @@
|
|
|
385
315
|
/* A link is never :enabled, so interactive states test "not unavailable" instead: for a button that
|
|
386
316
|
is exactly :enabled, at the same specificity, and it also matches a link that can be followed. */
|
|
387
317
|
:host:hover:not(:disabled, [aria-disabled="true"]) {
|
|
388
|
-
border-color: var(--ui-button-hover-border, var(--_tone-
|
|
389
|
-
background-color: var(--ui-button-hover-surface, oklch(from var(--_tone) l c h / 12%));
|
|
318
|
+
border-color: var(--ui-button-hover-border, var(--_tone-text));
|
|
319
|
+
background-color: var(--ui-button-hover-surface, oklch(from var(--_tone) l c h / calc(12% * var(--ui-tonal-opacity, 1))));
|
|
390
320
|
}
|
|
391
321
|
|
|
392
322
|
:host[data-appearance="card"][data-tone="neutral"] {
|
|
@@ -406,13 +336,13 @@
|
|
|
406
336
|
/* Pressed reads as pressed in: the highlight goes, and the shadow moves inside. */
|
|
407
337
|
:host:active:not(:disabled, [aria-disabled="true"]) {
|
|
408
338
|
scale: var(--ui-press-scale, 1);
|
|
409
|
-
background-color: var(--ui-button-active-surface, oklch(from var(--_tone) l c h / 18%));
|
|
339
|
+
background-color: var(--ui-button-active-surface, oklch(from var(--_tone) l c h / calc(18% * var(--ui-tonal-opacity, 1))));
|
|
410
340
|
background-image: none;
|
|
411
341
|
box-shadow: var(--ui-pressed);
|
|
412
342
|
}
|
|
413
343
|
|
|
414
344
|
:host[data-appearance="solid"], :host[data-appearance="danger"] {
|
|
415
|
-
border-color: var(--_tone);
|
|
345
|
+
border-color: var(--ui-button-border, var(--_tone-border));
|
|
416
346
|
background-color: var(--_tone);
|
|
417
347
|
color: var(--_on-tone);
|
|
418
348
|
background-image: var(--_tone-highlight);
|
|
@@ -421,21 +351,51 @@
|
|
|
421
351
|
var(--_tone-glow);
|
|
422
352
|
}
|
|
423
353
|
|
|
424
|
-
:
|
|
354
|
+
:host[data-appearance="solid"]:hover:not(:disabled, [aria-disabled="true"]),
|
|
355
|
+
:host[data-appearance="danger"]:hover:not(:disabled, [aria-disabled="true"]) {
|
|
425
356
|
background-color: var(--_tone-hover);
|
|
426
|
-
border-color: var(--_tone-hover);
|
|
357
|
+
border-color: var(--ui-button-hover-border, var(--_tone-hover-border));
|
|
427
358
|
}
|
|
428
359
|
|
|
429
360
|
:is(:host[data-appearance="solid"], :host[data-appearance="danger"]):active:not(:disabled, [aria-disabled="true"]) {
|
|
430
361
|
background-color: var(--_tone-active);
|
|
431
|
-
border-color: var(--_tone-active);
|
|
362
|
+
border-color: var(--_tone-active-border);
|
|
432
363
|
background-image: none;
|
|
433
364
|
box-shadow: var(--ui-pressed);
|
|
434
365
|
}
|
|
435
366
|
|
|
436
367
|
/* Tone is the colour, variant is the volume. Every pairing works: a danger outline is a
|
|
437
368
|
destructive secondary action, not a special case. */
|
|
369
|
+
:host[data-tone="accent-secondary"] {
|
|
370
|
+
--_tone-border: var(--ui-accent-secondary-border, var(--ui-accent-secondary));
|
|
371
|
+
--_tone-hover-border: var(--ui-accent-secondary-hover-border, var(--ui-accent-secondary-hover));
|
|
372
|
+
--_tone-active-border: var(--ui-accent-secondary-active-border, var(--ui-accent-secondary-active));
|
|
373
|
+
--_tone-highlight: var(--ui-accent-secondary-highlight, none);
|
|
374
|
+
--_tone-glow: var(--ui-accent-secondary-glow, 0 0 transparent);
|
|
375
|
+
--_hue: var(--ui-accent-secondary);
|
|
376
|
+
--_hue-hover: var(--ui-accent-secondary-hover);
|
|
377
|
+
--_hue-active: var(--ui-accent-secondary-active);
|
|
378
|
+
--_hue-text: var(--ui-accent-secondary-subtle-text);
|
|
379
|
+
--_on-hue: var(--ui-accent-secondary-on-strong);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
:host[data-tone="accent-tertiary"] {
|
|
383
|
+
--_tone-border: var(--ui-accent-tertiary-border, var(--ui-accent-tertiary));
|
|
384
|
+
--_tone-hover-border: var(--ui-accent-tertiary-hover-border, var(--ui-accent-tertiary-hover));
|
|
385
|
+
--_tone-active-border: var(--ui-accent-tertiary-active-border, var(--ui-accent-tertiary-active));
|
|
386
|
+
--_tone-highlight: var(--ui-accent-tertiary-highlight, none);
|
|
387
|
+
--_tone-glow: var(--ui-accent-tertiary-glow, 0 0 transparent);
|
|
388
|
+
--_hue: var(--ui-accent-tertiary);
|
|
389
|
+
--_hue-hover: var(--ui-accent-tertiary-hover);
|
|
390
|
+
--_hue-active: var(--ui-accent-tertiary-active);
|
|
391
|
+
--_hue-text: var(--ui-accent-tertiary-subtle-text);
|
|
392
|
+
--_on-hue: var(--ui-accent-tertiary-on-strong);
|
|
393
|
+
}
|
|
394
|
+
|
|
438
395
|
:host[data-tone="neutral"] {
|
|
396
|
+
--_tone-border: var(--ui-control-border, var(--ui-neutral-surface));
|
|
397
|
+
--_tone-hover-border: var(--ui-control-border-hover, var(--ui-neutral-hover));
|
|
398
|
+
--_tone-active-border: var(--ui-control-border-hover, var(--ui-neutral-active));
|
|
439
399
|
--_tone-highlight: var(--ui-neutral-highlight, none);
|
|
440
400
|
--_tone-glow: var(--ui-neutral-glow, 0 0 transparent);
|
|
441
401
|
--_hue: var(--ui-text);
|
|
@@ -446,30 +406,37 @@
|
|
|
446
406
|
}
|
|
447
407
|
|
|
448
408
|
:host[data-tone="neutral"][data-appearance="solid"] {
|
|
449
|
-
border-color: var(--ui-button-border, var(--
|
|
409
|
+
border-color: var(--ui-button-border, var(--_tone-border));
|
|
450
410
|
background-color: var(--ui-button-surface, var(--ui-neutral-surface));
|
|
411
|
+
box-shadow: var(--ui-button-solid-shadow, var(--ui-button-shadow, var(--ui-neutral-shadow)));
|
|
451
412
|
color: var(--ui-button-text, var(--ui-text));
|
|
452
413
|
}
|
|
453
414
|
:host[data-tone="neutral"][data-appearance="outline"] {
|
|
454
415
|
border-color: var(--ui-button-border, var(--ui-control-border));
|
|
455
416
|
background-color: var(--ui-button-surface, transparent);
|
|
417
|
+
box-shadow: var(--ui-button-shadow, var(--ui-neutral-shadow));
|
|
456
418
|
}
|
|
457
419
|
:host[data-tone="neutral"][data-appearance="outline"]:hover:not(:disabled, [aria-disabled="true"]) {
|
|
458
|
-
border-color: var(--ui-button-hover-border, var(--ui-control-border-hover
|
|
420
|
+
border-color: var(--ui-button-hover-border, var(--ui-control-border-hover));
|
|
459
421
|
background-color: var(--ui-button-hover-surface, var(--ui-neutral-hover));
|
|
460
422
|
}
|
|
461
423
|
:host[data-tone="neutral"][data-appearance="outline"]:active:not(:disabled, [aria-disabled="true"]) {
|
|
462
|
-
border-color: var(--ui-button-hover-border, var(--ui-control-border-hover
|
|
424
|
+
border-color: var(--ui-button-hover-border, var(--ui-control-border-hover));
|
|
463
425
|
background-color: var(--ui-button-active-surface, var(--ui-neutral-active));
|
|
464
426
|
}
|
|
465
427
|
:host[data-tone="neutral"][data-appearance="solid"]:hover:not(:disabled, [aria-disabled="true"]) {
|
|
428
|
+
border-color: var(--ui-button-hover-border, var(--_tone-hover-border));
|
|
466
429
|
background-color: var(--ui-button-hover-surface, var(--ui-neutral-hover));
|
|
467
430
|
}
|
|
468
431
|
:host[data-tone="neutral"][data-appearance="solid"]:active:not(:disabled, [aria-disabled="true"]) {
|
|
432
|
+
border-color: var(--_tone-active-border);
|
|
469
433
|
background-color: var(--ui-button-active-surface, var(--ui-neutral-active));
|
|
470
434
|
}
|
|
471
435
|
|
|
472
436
|
:host[data-tone="danger"], :host[data-appearance="danger"] {
|
|
437
|
+
--_tone-border: var(--ui-danger-border, var(--ui-danger));
|
|
438
|
+
--_tone-hover-border: var(--ui-danger-hover-border, var(--ui-danger-hover));
|
|
439
|
+
--_tone-active-border: var(--ui-danger-active-border, var(--ui-danger-active));
|
|
473
440
|
--_tone-highlight: var(--ui-danger-highlight, none);
|
|
474
441
|
--_tone-glow: var(--ui-danger-glow, 0 0 transparent);
|
|
475
442
|
--_hue: var(--ui-danger);
|
|
@@ -480,6 +447,9 @@
|
|
|
480
447
|
}
|
|
481
448
|
|
|
482
449
|
:host[data-tone="success"] {
|
|
450
|
+
--_tone-border: var(--ui-success-border, var(--ui-success));
|
|
451
|
+
--_tone-hover-border: var(--ui-success-hover-border, var(--ui-success-hover));
|
|
452
|
+
--_tone-active-border: var(--ui-success-active-border, var(--ui-success-active));
|
|
483
453
|
--_tone-highlight: var(--ui-success-highlight, none);
|
|
484
454
|
--_tone-glow: var(--ui-success-glow, 0 0 transparent);
|
|
485
455
|
--_hue: var(--ui-success);
|
|
@@ -490,6 +460,9 @@
|
|
|
490
460
|
}
|
|
491
461
|
|
|
492
462
|
:host[data-tone="warning"] {
|
|
463
|
+
--_tone-border: var(--ui-warning-border, var(--ui-warning));
|
|
464
|
+
--_tone-hover-border: var(--ui-warning-hover-border, var(--ui-warning-hover));
|
|
465
|
+
--_tone-active-border: var(--ui-warning-active-border, var(--ui-warning-active));
|
|
493
466
|
--_tone-highlight: var(--ui-warning-highlight, none);
|
|
494
467
|
--_tone-glow: var(--ui-warning-glow, 0 0 transparent);
|
|
495
468
|
--_hue: var(--ui-warning);
|
|
@@ -500,6 +473,9 @@
|
|
|
500
473
|
}
|
|
501
474
|
|
|
502
475
|
:host[data-tone="info"] {
|
|
476
|
+
--_tone-border: var(--ui-info-border, var(--ui-info));
|
|
477
|
+
--_tone-hover-border: var(--ui-info-hover-border, var(--ui-info-hover));
|
|
478
|
+
--_tone-active-border: var(--ui-info-active-border, var(--ui-info-active));
|
|
503
479
|
--_tone-highlight: var(--ui-info-highlight, none);
|
|
504
480
|
--_tone-glow: var(--ui-info-glow, 0 0 transparent);
|
|
505
481
|
--_hue: var(--ui-info);
|
|
@@ -545,7 +521,7 @@
|
|
|
545
521
|
|
|
546
522
|
/* Tints derive from the text colour, not a surface token, so hover and press show on any background. */
|
|
547
523
|
:host[data-appearance="ghost"]:hover:not(:disabled, [aria-disabled="true"]) {
|
|
548
|
-
background-color: var(--ui-button-ghost-hover-surface, oklch(from var(--_tone) l c h / 10%));
|
|
524
|
+
background-color: var(--ui-button-ghost-hover-surface, oklch(from var(--_tone) l c h / calc(10% * var(--ui-tonal-opacity, 1))));
|
|
549
525
|
border-color: transparent;
|
|
550
526
|
}
|
|
551
527
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Disabled or loading actions cannot activate, navigate, submit, or notify click consumers.
|
|
2
2
|
export function connect(host) {
|
|
3
3
|
const onClick = (event) => {
|
|
4
|
-
if (!host.props.loading.value && !host.props.pending.value) return;
|
|
4
|
+
if (!host.props.disabled.value && !host.props.loading.value && !host.props.pending.value) return;
|
|
5
5
|
event.preventDefault();
|
|
6
6
|
event.stopImmediatePropagation();
|
|
7
7
|
};
|