@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
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
height: var(--ui-affordance-guide-size);
|
|
341
341
|
border-radius: var(--ui-radius-round);
|
|
342
342
|
background: var(--ui-affordance-guide-color, var(--ui-border-strong));
|
|
343
|
-
opacity: calc(var(--ui-affordance-guide-opacity) * var(--
|
|
343
|
+
opacity: calc(var(--ui-affordance-guide-opacity) * var(--_ui-affordance-scope-guide, 1));
|
|
344
344
|
transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
|
|
345
345
|
}
|
|
346
346
|
|
|
@@ -435,7 +435,7 @@
|
|
|
435
435
|
inset: 50% auto auto 50%;
|
|
436
436
|
border-radius: var(--ui-radius-round);
|
|
437
437
|
background: var(--ui-affordance-guide-color, var(--ui-border-strong));
|
|
438
|
-
opacity: calc(var(--ui-affordance-guide-opacity) * var(--
|
|
438
|
+
opacity: calc(var(--ui-affordance-guide-opacity) * var(--_ui-affordance-scope-guide, 1));
|
|
439
439
|
transform: translate(-50%, -50%);
|
|
440
440
|
transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
|
|
441
441
|
pointer-events: none;
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
|
|
194
194
|
:host button.active {
|
|
195
195
|
background: var(--ui-accent-soft, var(--ui-accent-subtle));
|
|
196
|
-
color: var(--ui-accent-
|
|
196
|
+
color: var(--ui-accent-subtle-text);
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
.group button {
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
:host button.danger {
|
|
213
|
-
color: var(--ui-danger);
|
|
213
|
+
color: var(--ui-danger-subtle-text);
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
:host {
|
|
@@ -8,20 +8,6 @@
|
|
|
8
8
|
</defs>
|
|
9
9
|
<button type="button" from:aria-label="$label" from:disabled="$disabled"><slot></slot></button>
|
|
10
10
|
<style>
|
|
11
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
12
|
-
@property --ui-floating-action-button-inset-block-end {
|
|
13
|
-
syntax: "*";
|
|
14
|
-
inherits: false;
|
|
15
|
-
}
|
|
16
|
-
@property --ui-floating-action-button-inset-inline-end {
|
|
17
|
-
syntax: "*";
|
|
18
|
-
inherits: false;
|
|
19
|
-
}
|
|
20
|
-
@property --ui-floating-action-button-z-index {
|
|
21
|
-
syntax: "*";
|
|
22
|
-
inherits: false;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
11
|
:host {
|
|
26
12
|
position: fixed;
|
|
27
13
|
inset-block-end: calc(var(--ui-floating-action-button-inset-block-end, var(--ui-space-6)) + env(safe-area-inset-bottom));
|
|
@@ -20,38 +20,8 @@
|
|
|
20
20
|
<div class="error"><slot name="error"></slot></div>
|
|
21
21
|
</div>
|
|
22
22
|
<style>
|
|
23
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
24
|
-
@property --ui-form-field-danger {
|
|
25
|
-
syntax: "*";
|
|
26
|
-
inherits: false;
|
|
27
|
-
}
|
|
28
|
-
@property --ui-form-field-help-font-size {
|
|
29
|
-
syntax: "*";
|
|
30
|
-
inherits: false;
|
|
31
|
-
}
|
|
32
|
-
@property --ui-form-field-help-min-block-size {
|
|
33
|
-
syntax: "*";
|
|
34
|
-
inherits: false;
|
|
35
|
-
}
|
|
36
|
-
@property --ui-form-field-help-text {
|
|
37
|
-
syntax: "*";
|
|
38
|
-
inherits: false;
|
|
39
|
-
}
|
|
40
|
-
@property --ui-form-field-label-font-size {
|
|
41
|
-
syntax: "*";
|
|
42
|
-
inherits: false;
|
|
43
|
-
}
|
|
44
|
-
@property --ui-form-field-label-text {
|
|
45
|
-
syntax: "*";
|
|
46
|
-
inherits: false;
|
|
47
|
-
}
|
|
48
|
-
@property --ui-form-field-min-inline-size {
|
|
49
|
-
syntax: "*";
|
|
50
|
-
inherits: false;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
23
|
:host {
|
|
54
|
-
/*
|
|
24
|
+
/* Resolve shared part values at the component root. */
|
|
55
25
|
--_ui-form-field-danger: var(--ui-form-field-danger);
|
|
56
26
|
--_ui-form-field-help-min-block-size: var(--ui-form-field-help-min-block-size);
|
|
57
27
|
--_ui-form-field-label-text: var(--ui-form-field-label-text);
|
|
@@ -76,7 +46,7 @@
|
|
|
76
46
|
|
|
77
47
|
.label {
|
|
78
48
|
color: var(--_ui-form-field-label-text, var(--ui-text-secondary));
|
|
79
|
-
font-size: var(--_ui-form-field-label-font-size, var(--ui-font-size-
|
|
49
|
+
font-size: var(--_ui-form-field-label-font-size, var(--ui-field-label-font-size, var(--ui-font-size-md)));
|
|
80
50
|
}
|
|
81
51
|
|
|
82
52
|
/* A label action, such as a small help button, sits after the label text in a box one line
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<defs>
|
|
3
3
|
<prop name="gap" type="keyword" values="xs, s, m, l, xl"
|
|
4
4
|
>Space between cells, on the spacing scale: xs is 0.5rem, s 0.75rem, m 1rem (also the default), l 1.5rem, and xl 2rem. The --ui-grid-gap custom property,
|
|
5
|
-
set on
|
|
5
|
+
set on :root, an ancestor, or the component itself, overrides it.</prop>
|
|
6
6
|
<prop name="min" type="keyword" values="sm, md, lg"
|
|
7
7
|
>The narrowest a column may get before the grid drops to fewer columns: sm is 12rem (also the default), md is 16rem, and lg is 20rem. The grid fits as many
|
|
8
8
|
equal columns as its width allows, and a single column never overflows a narrower container.</prop>
|
|
@@ -11,16 +11,6 @@
|
|
|
11
11
|
</defs>
|
|
12
12
|
<div style:--_grid-column-cap="$columns"><slot></slot></div>
|
|
13
13
|
<style>
|
|
14
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
15
|
-
@property --ui-grid-gap {
|
|
16
|
-
syntax: "*";
|
|
17
|
-
inherits: false;
|
|
18
|
-
}
|
|
19
|
-
@property --ui-grid-min {
|
|
20
|
-
syntax: "*";
|
|
21
|
-
inherits: false;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
14
|
:host {
|
|
25
15
|
--_grid-gap: var(--ui-space-4);
|
|
26
16
|
--_grid-min: 12rem;
|
|
@@ -111,19 +111,8 @@
|
|
|
111
111
|
</svg>
|
|
112
112
|
</span>
|
|
113
113
|
<style>
|
|
114
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
115
|
-
@property --ui-icon-size {
|
|
116
|
-
syntax: "*";
|
|
117
|
-
inherits: false;
|
|
118
|
-
}
|
|
119
|
-
@property --ui-icon-stroke-width {
|
|
120
|
-
syntax: "*";
|
|
121
|
-
inherits: false;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
114
|
:host {
|
|
125
|
-
/*
|
|
126
|
-
sizes the icons it renders sets --_ui-default-icon-*, which the icon's own hooks override. */
|
|
115
|
+
/* Resolve the SVG stroke at the root. A Looma component that sizes its icons sets --_ui-default-icon-*, which the icon's own hooks override. */
|
|
127
116
|
--_ui-icon-stroke-width: var(--ui-icon-stroke-width, var(--_ui-default-icon-stroke-width));
|
|
128
117
|
|
|
129
118
|
display: inline-flex !important;
|
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
<prop name="variant" type="keyword" values="ghost, outline, solid" default="ghost"
|
|
23
23
|
>Emphasis. ghost shows only the icon until it is hovered, for toolbars and dense rows; outline adds a border on the default surface; solid fills with its
|
|
24
24
|
chosen tone.</prop>
|
|
25
|
-
<prop name="tone" type="keyword" values="accent, neutral, danger, success, warning, info" default="neutral"
|
|
25
|
+
<prop name="tone" type="keyword" values="accent, accent-secondary, accent-tertiary, neutral, danger, success, warning, info" default="neutral"
|
|
26
26
|
>Colour for every variant. The default neutral shares the quiet control family with fields and text buttons. Choose accent explicitly for a coloured action,
|
|
27
27
|
or primary for solid accent. danger, success, warning and info share Button's intent colors. Native aria-pressed="true" keeps an outline toggle visibly
|
|
28
|
-
pressed; the consumer owns that state
|
|
28
|
+
pressed; the consumer owns that state. Supporting brand families use accent-secondary and accent-tertiary; their usable colors derive from the theme, and
|
|
29
|
+
unset families follow the primary accent.</prop>
|
|
29
30
|
<prop name="anticipatory" type="boolean" default="false"
|
|
30
31
|
>Keeps the button out of sight until it is wanted: at rest a fine pointer sees only a small guide dot, and the button appears on hover, on focus, or when
|
|
31
32
|
the pointer comes near inside a ui-affordance-scope. Touch devices and the solid variant always show it.</prop>
|
|
@@ -51,88 +52,14 @@
|
|
|
51
52
|
<span class="content"><slot></slot></span>
|
|
52
53
|
</button>
|
|
53
54
|
<style>
|
|
54
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
55
|
-
@property --ui-icon-button-active-scale {
|
|
56
|
-
syntax: "*";
|
|
57
|
-
inherits: false;
|
|
58
|
-
}
|
|
59
|
-
@property --ui-icon-button-active-surface {
|
|
60
|
-
syntax: "*";
|
|
61
|
-
inherits: false;
|
|
62
|
-
}
|
|
63
|
-
@property --ui-icon-button-border {
|
|
64
|
-
syntax: "*";
|
|
65
|
-
inherits: false;
|
|
66
|
-
}
|
|
67
|
-
@property --ui-icon-button-disabled-filter {
|
|
68
|
-
syntax: "*";
|
|
69
|
-
inherits: false;
|
|
70
|
-
}
|
|
71
|
-
@property --ui-icon-button-disabled-opacity {
|
|
72
|
-
syntax: "*";
|
|
73
|
-
inherits: false;
|
|
74
|
-
}
|
|
75
|
-
@property --ui-icon-button-hover-border {
|
|
76
|
-
syntax: "*";
|
|
77
|
-
inherits: false;
|
|
78
|
-
}
|
|
79
|
-
@property --ui-icon-button-hover-surface {
|
|
80
|
-
syntax: "*";
|
|
81
|
-
inherits: false;
|
|
82
|
-
}
|
|
83
|
-
@property --ui-icon-button-hover-text {
|
|
84
|
-
syntax: "*";
|
|
85
|
-
inherits: false;
|
|
86
|
-
}
|
|
87
|
-
@property --ui-icon-button-icon-size {
|
|
88
|
-
syntax: "*";
|
|
89
|
-
inherits: false;
|
|
90
|
-
}
|
|
91
|
-
@property --ui-icon-button-icon-stroke-width {
|
|
92
|
-
syntax: "*";
|
|
93
|
-
inherits: false;
|
|
94
|
-
}
|
|
95
|
-
@property --ui-icon-button-outline-surface {
|
|
96
|
-
syntax: "*";
|
|
97
|
-
inherits: false;
|
|
98
|
-
}
|
|
99
|
-
@property --ui-icon-button-outline-text {
|
|
100
|
-
syntax: "*";
|
|
101
|
-
inherits: false;
|
|
102
|
-
}
|
|
103
|
-
@property --ui-icon-button-radius {
|
|
104
|
-
syntax: "*";
|
|
105
|
-
inherits: false;
|
|
106
|
-
}
|
|
107
|
-
@property --ui-icon-button-size {
|
|
108
|
-
syntax: "*";
|
|
109
|
-
inherits: false;
|
|
110
|
-
}
|
|
111
|
-
@property --ui-icon-button-solid-hover-surface {
|
|
112
|
-
syntax: "*";
|
|
113
|
-
inherits: false;
|
|
114
|
-
}
|
|
115
|
-
@property --ui-icon-button-solid-shadow {
|
|
116
|
-
syntax: "*";
|
|
117
|
-
inherits: false;
|
|
118
|
-
}
|
|
119
|
-
@property --ui-icon-button-solid-surface {
|
|
120
|
-
syntax: "*";
|
|
121
|
-
inherits: false;
|
|
122
|
-
}
|
|
123
|
-
@property --ui-icon-button-solid-text {
|
|
124
|
-
syntax: "*";
|
|
125
|
-
inherits: false;
|
|
126
|
-
}
|
|
127
|
-
@property --ui-icon-button-surface {
|
|
128
|
-
syntax: "*";
|
|
129
|
-
inherits: false;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
55
|
:host {
|
|
133
56
|
/* Optional inherited action-group values keep text and icon actions under the same light.
|
|
134
57
|
One fine top/start highlight follows the bottom/end lowlight at a joined action seam.
|
|
135
58
|
The shared theme supplies reflections and glow independently of the resting lift. */
|
|
59
|
+
--_solid-border: var(--ui-accent-border, var(--ui-accent-solid));
|
|
60
|
+
--_solid-hover-border: var(--ui-accent-hover-border, var(--ui-accent-hover));
|
|
61
|
+
--_solid-active-border: var(--ui-accent-active-border, var(--ui-accent-active));
|
|
62
|
+
--_solid-active-surface: var(--ui-accent-active, var(--ui-accent-hover));
|
|
136
63
|
--_tone-highlight: var(--ui-accent-highlight, none);
|
|
137
64
|
--_tone-glow: var(--ui-accent-glow, 0 0 transparent);
|
|
138
65
|
--_ui-action-start: 1px;
|
|
@@ -142,7 +69,7 @@
|
|
|
142
69
|
inset calc(-1 * var(--_ui-action-start)) -1px 0 light-dark(rgb(0 0 0 / 0.08), rgb(0 0 0 / 0.08))
|
|
143
70
|
);
|
|
144
71
|
--_ui-action-shadow: var(--_ui-action-edge), 0 1px 2px light-dark(rgb(0 0 0 / 0.10), rgb(0 0 0 / 0.20));
|
|
145
|
-
/*
|
|
72
|
+
/* Resolve shared part values at the component root. */
|
|
146
73
|
--_ui-icon-button-icon-size: var(--ui-icon-button-icon-size);
|
|
147
74
|
--_ui-icon-button-icon-stroke-width: var(--ui-icon-button-icon-stroke-width);
|
|
148
75
|
|
|
@@ -154,21 +81,63 @@
|
|
|
154
81
|
--_ui-action-start: -1px;
|
|
155
82
|
}
|
|
156
83
|
|
|
84
|
+
:host[data-tone="accent-secondary"] {
|
|
85
|
+
--_solid-border: var(--ui-accent-secondary-border, var(--ui-accent-secondary));
|
|
86
|
+
--_solid-hover-border: var(--ui-accent-secondary-hover-border, var(--ui-accent-secondary-hover));
|
|
87
|
+
--_solid-active-border: var(--ui-accent-secondary-active-border, var(--ui-accent-secondary-active));
|
|
88
|
+
--_solid-active-surface: var(--ui-accent-secondary-active, var(--ui-accent-secondary-hover));
|
|
89
|
+
--_tone-highlight: var(--ui-accent-secondary-highlight, none);
|
|
90
|
+
--_tone-glow: var(--ui-accent-secondary-glow, 0 0 transparent);
|
|
91
|
+
--_icon-button-border: var(--ui-accent-secondary-subtle-text);
|
|
92
|
+
--_icon-button-hover-border: var(--ui-accent-secondary-subtle-text);
|
|
93
|
+
--_icon-button-text: var(--ui-accent-secondary-subtle-text, var(--ui-accent-secondary-solid));
|
|
94
|
+
--_icon-button-outline-surface: color-mix(in srgb, var(--ui-accent-secondary-solid) 5%, var(--ui-surface-default));
|
|
95
|
+
--_icon-button-solid-surface: var(--ui-accent-secondary);
|
|
96
|
+
--_icon-button-solid-hover-surface: var(--ui-accent-secondary-hover);
|
|
97
|
+
--_icon-button-solid-text: var(--ui-on-accent-secondary);
|
|
98
|
+
color: var(--_icon-button-text);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:host[data-tone="accent-tertiary"] {
|
|
102
|
+
--_solid-border: var(--ui-accent-tertiary-border, var(--ui-accent-tertiary));
|
|
103
|
+
--_solid-hover-border: var(--ui-accent-tertiary-hover-border, var(--ui-accent-tertiary-hover));
|
|
104
|
+
--_solid-active-border: var(--ui-accent-tertiary-active-border, var(--ui-accent-tertiary-active));
|
|
105
|
+
--_solid-active-surface: var(--ui-accent-tertiary-active, var(--ui-accent-tertiary-hover));
|
|
106
|
+
--_tone-highlight: var(--ui-accent-tertiary-highlight, none);
|
|
107
|
+
--_tone-glow: var(--ui-accent-tertiary-glow, 0 0 transparent);
|
|
108
|
+
--_icon-button-border: var(--ui-accent-tertiary-subtle-text);
|
|
109
|
+
--_icon-button-hover-border: var(--ui-accent-tertiary-subtle-text);
|
|
110
|
+
--_icon-button-text: var(--ui-accent-tertiary-subtle-text, var(--ui-accent-tertiary-solid));
|
|
111
|
+
--_icon-button-outline-surface: color-mix(in srgb, var(--ui-accent-tertiary-solid) 5%, var(--ui-surface-default));
|
|
112
|
+
--_icon-button-solid-surface: var(--ui-accent-tertiary);
|
|
113
|
+
--_icon-button-solid-hover-surface: var(--ui-accent-tertiary-hover);
|
|
114
|
+
--_icon-button-solid-text: var(--ui-on-accent-tertiary);
|
|
115
|
+
color: var(--_icon-button-text);
|
|
116
|
+
}
|
|
117
|
+
|
|
157
118
|
:host[data-tone="accent"] {
|
|
119
|
+
--_solid-border: var(--ui-accent-border, var(--ui-accent));
|
|
120
|
+
--_solid-hover-border: var(--ui-accent-hover-border, var(--ui-accent-hover));
|
|
121
|
+
--_solid-active-border: var(--ui-accent-active-border, var(--ui-accent-active));
|
|
122
|
+
--_solid-active-surface: var(--ui-accent-active, var(--ui-accent-hover));
|
|
158
123
|
--_tone-highlight: var(--ui-accent-highlight, none);
|
|
159
124
|
--_tone-glow: var(--ui-accent-glow, 0 0 transparent);
|
|
160
|
-
--_icon-button-border: var(--ui-accent-
|
|
161
|
-
--_icon-button-hover-border: var(--ui-accent-
|
|
125
|
+
--_icon-button-border: var(--ui-accent-subtle-text);
|
|
126
|
+
--_icon-button-hover-border: var(--ui-accent-subtle-text);
|
|
162
127
|
--_icon-button-text: var(--ui-accent-subtle-text, var(--ui-accent-solid));
|
|
163
128
|
--_icon-button-outline-surface: color-mix(in srgb, var(--ui-accent-solid) 5%, var(--ui-surface-default));
|
|
164
129
|
color: var(--_icon-button-text);
|
|
165
130
|
}
|
|
166
131
|
|
|
167
132
|
:host[data-tone="danger"] {
|
|
133
|
+
--_solid-border: var(--ui-danger-border, var(--ui-danger));
|
|
134
|
+
--_solid-hover-border: var(--ui-danger-hover-border, var(--ui-danger-hover));
|
|
135
|
+
--_solid-active-border: var(--ui-danger-active-border, var(--ui-danger-active));
|
|
136
|
+
--_solid-active-surface: var(--ui-danger-active, var(--ui-danger-hover));
|
|
168
137
|
--_tone-highlight: var(--ui-danger-highlight, none);
|
|
169
138
|
--_tone-glow: var(--ui-danger-glow, 0 0 transparent);
|
|
170
|
-
--_icon-button-border: var(--ui-danger);
|
|
171
|
-
--_icon-button-hover-border: var(--ui-danger-
|
|
139
|
+
--_icon-button-border: var(--ui-danger-subtle-text);
|
|
140
|
+
--_icon-button-hover-border: var(--ui-danger-subtle-text);
|
|
172
141
|
--_icon-button-text: var(--ui-danger-subtle-text);
|
|
173
142
|
--_icon-button-outline-surface: color-mix(in srgb, var(--ui-danger) 5%, var(--ui-surface-default));
|
|
174
143
|
--_icon-button-solid-surface: var(--ui-danger);
|
|
@@ -178,10 +147,14 @@
|
|
|
178
147
|
}
|
|
179
148
|
|
|
180
149
|
:host[data-tone="success"] {
|
|
150
|
+
--_solid-border: var(--ui-success-border, var(--ui-success));
|
|
151
|
+
--_solid-hover-border: var(--ui-success-hover-border, var(--ui-success-hover));
|
|
152
|
+
--_solid-active-border: var(--ui-success-active-border, var(--ui-success-active));
|
|
153
|
+
--_solid-active-surface: var(--ui-success-active, var(--ui-success-hover));
|
|
181
154
|
--_tone-highlight: var(--ui-success-highlight, none);
|
|
182
155
|
--_tone-glow: var(--ui-success-glow, 0 0 transparent);
|
|
183
|
-
--_icon-button-border: var(--ui-success);
|
|
184
|
-
--_icon-button-hover-border: var(--ui-success-
|
|
156
|
+
--_icon-button-border: var(--ui-success-subtle-text);
|
|
157
|
+
--_icon-button-hover-border: var(--ui-success-subtle-text);
|
|
185
158
|
--_icon-button-text: var(--ui-success-subtle-text);
|
|
186
159
|
--_icon-button-outline-surface: color-mix(in srgb, var(--ui-success) 5%, var(--ui-surface-default));
|
|
187
160
|
--_icon-button-solid-surface: var(--ui-success);
|
|
@@ -191,10 +164,14 @@
|
|
|
191
164
|
}
|
|
192
165
|
|
|
193
166
|
:host[data-tone="warning"] {
|
|
167
|
+
--_solid-border: var(--ui-warning-border, var(--ui-warning));
|
|
168
|
+
--_solid-hover-border: var(--ui-warning-hover-border, var(--ui-warning-hover));
|
|
169
|
+
--_solid-active-border: var(--ui-warning-active-border, var(--ui-warning-active));
|
|
170
|
+
--_solid-active-surface: var(--ui-warning-active, var(--ui-warning-hover));
|
|
194
171
|
--_tone-highlight: var(--ui-warning-highlight, none);
|
|
195
172
|
--_tone-glow: var(--ui-warning-glow, 0 0 transparent);
|
|
196
|
-
--_icon-button-border: var(--ui-warning);
|
|
197
|
-
--_icon-button-hover-border: var(--ui-warning-
|
|
173
|
+
--_icon-button-border: var(--ui-warning-subtle-text);
|
|
174
|
+
--_icon-button-hover-border: var(--ui-warning-subtle-text);
|
|
198
175
|
--_icon-button-text: var(--ui-warning-subtle-text);
|
|
199
176
|
--_icon-button-outline-surface: color-mix(in srgb, var(--ui-warning) 5%, var(--ui-surface-default));
|
|
200
177
|
--_icon-button-solid-surface: var(--ui-warning);
|
|
@@ -204,10 +181,14 @@
|
|
|
204
181
|
}
|
|
205
182
|
|
|
206
183
|
:host[data-tone="info"] {
|
|
184
|
+
--_solid-border: var(--ui-info-border, var(--ui-info));
|
|
185
|
+
--_solid-hover-border: var(--ui-info-hover-border, var(--ui-info-hover));
|
|
186
|
+
--_solid-active-border: var(--ui-info-active-border, var(--ui-info-active));
|
|
187
|
+
--_solid-active-surface: var(--ui-info-active, var(--ui-info-hover));
|
|
207
188
|
--_tone-highlight: var(--ui-info-highlight, none);
|
|
208
189
|
--_tone-glow: var(--ui-info-glow, 0 0 transparent);
|
|
209
|
-
--_icon-button-border: var(--ui-info);
|
|
210
|
-
--_icon-button-hover-border: var(--ui-info-
|
|
190
|
+
--_icon-button-border: var(--ui-info-subtle-text);
|
|
191
|
+
--_icon-button-hover-border: var(--ui-info-subtle-text);
|
|
211
192
|
--_icon-button-text: var(--ui-info-subtle-text);
|
|
212
193
|
--_icon-button-outline-surface: color-mix(in srgb, var(--ui-info) 5%, var(--ui-surface-default));
|
|
213
194
|
--_icon-button-solid-surface: var(--ui-info);
|
|
@@ -216,13 +197,17 @@
|
|
|
216
197
|
color: var(--_icon-button-text);
|
|
217
198
|
}
|
|
218
199
|
|
|
219
|
-
/* Neutral actions
|
|
200
|
+
/* Neutral actions and form fields share the control boundary. */
|
|
220
201
|
:host[data-tone="neutral"] {
|
|
202
|
+
--_solid-border: var(--ui-control-border, var(--ui-neutral-surface));
|
|
203
|
+
--_solid-hover-border: var(--ui-control-border-hover, var(--ui-neutral-hover));
|
|
204
|
+
--_solid-active-border: var(--ui-control-border-hover, var(--ui-neutral-active));
|
|
205
|
+
--_solid-active-surface: var(--ui-neutral-active, var(--ui-neutral-hover));
|
|
221
206
|
--_tone-highlight: var(--ui-neutral-highlight, none);
|
|
222
207
|
--_tone-glow: var(--ui-neutral-glow, 0 0 transparent);
|
|
223
208
|
--_icon-button-outline-surface: transparent;
|
|
224
209
|
--_icon-button-border: var(--ui-control-border);
|
|
225
|
-
--_icon-button-hover-border: var(--ui-control-border-hover
|
|
210
|
+
--_icon-button-hover-border: var(--ui-control-border-hover);
|
|
226
211
|
--_icon-button-text: var(--ui-text);
|
|
227
212
|
--_icon-button-solid-surface: var(--ui-neutral-surface);
|
|
228
213
|
--_icon-button-solid-hover-surface: var(--ui-neutral-hover);
|
|
@@ -242,7 +227,7 @@
|
|
|
242
227
|
block-size: var(--ui-affordance-guide-size);
|
|
243
228
|
border-radius: var(--ui-radius-round);
|
|
244
229
|
background: var(--ui-affordance-guide-color, var(--ui-border-strong));
|
|
245
|
-
opacity: calc(var(--ui-affordance-guide-opacity) * var(--
|
|
230
|
+
opacity: calc(var(--ui-affordance-guide-opacity) * var(--_ui-affordance-scope-guide, 1));
|
|
246
231
|
transform: translate(-50%, -50%);
|
|
247
232
|
transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
|
|
248
233
|
pointer-events: none;
|
|
@@ -394,6 +379,7 @@
|
|
|
394
379
|
}
|
|
395
380
|
|
|
396
381
|
:host[data-appearance="solid"] {
|
|
382
|
+
border-color: var(--ui-icon-button-border, var(--_solid-border));
|
|
397
383
|
background-color: var(--ui-icon-button-solid-surface, var(--_icon-button-solid-surface, var(--ui-accent-solid)));
|
|
398
384
|
background-image: var(--_tone-highlight);
|
|
399
385
|
color: var(--ui-icon-button-solid-text, var(--_icon-button-solid-text, var(--ui-text-on-accent)));
|
|
@@ -402,6 +388,14 @@
|
|
|
402
388
|
var(--_tone-glow);
|
|
403
389
|
}
|
|
404
390
|
|
|
391
|
+
:host[data-tone="neutral"][data-appearance="outline"] {
|
|
392
|
+
box-shadow: var(--ui-neutral-shadow);
|
|
393
|
+
}
|
|
394
|
+
:host[data-tone="neutral"][data-appearance="solid"] {
|
|
395
|
+
border-color: var(--ui-icon-button-border, var(--ui-control-border));
|
|
396
|
+
box-shadow: var(--ui-icon-button-solid-shadow, var(--ui-neutral-shadow));
|
|
397
|
+
}
|
|
398
|
+
|
|
405
399
|
:host:hover:enabled:not([aria-disabled="true"]) {
|
|
406
400
|
/* Derived from the text colour so the ghost hover shows on any background. */
|
|
407
401
|
background-color: var(--ui-icon-button-hover-surface, color-mix(in srgb, currentColor 8%, transparent));
|
|
@@ -419,6 +413,7 @@
|
|
|
419
413
|
}
|
|
420
414
|
|
|
421
415
|
:host[data-appearance="solid"]:hover:enabled:not([aria-disabled="true"]) {
|
|
416
|
+
border-color: var(--ui-icon-button-hover-border, var(--_solid-hover-border));
|
|
422
417
|
background-color: var(--ui-icon-button-solid-hover-surface, var(--_icon-button-solid-hover-surface, var(--ui-accent-hover)));
|
|
423
418
|
}
|
|
424
419
|
|
|
@@ -480,6 +475,11 @@
|
|
|
480
475
|
var(--ui-focus-halo);
|
|
481
476
|
}
|
|
482
477
|
|
|
478
|
+
:host[data-appearance="solid"]:active:enabled:not([aria-disabled="true"]) {
|
|
479
|
+
background-color: var(--ui-icon-button-active-surface, var(--_solid-active-surface));
|
|
480
|
+
border-color: var(--_solid-active-border);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
483
|
:host:is(:host[data-appearance="outline"], :host[data-appearance="solid"]):active:enabled:not([aria-disabled="true"]) {
|
|
484
484
|
background-image: none;
|
|
485
485
|
box-shadow: var(--ui-pressed);
|
|
@@ -40,60 +40,7 @@
|
|
|
40
40
|
</defs>
|
|
41
41
|
<input from:type="$type" from:value="$value" from:disabled="$disabled" from:readonly="$readonly" from:required="$required" from:aria-invalid="$invalid">
|
|
42
42
|
<style>
|
|
43
|
-
/*
|
|
44
|
-
Group sets --_ui-default-input-* for the input inside it, below the input's own hooks. */
|
|
45
|
-
@property --ui-input-border {
|
|
46
|
-
syntax: "*";
|
|
47
|
-
inherits: false;
|
|
48
|
-
}
|
|
49
|
-
@property --ui-input-border-hover {
|
|
50
|
-
syntax: "*";
|
|
51
|
-
inherits: false;
|
|
52
|
-
}
|
|
53
|
-
@property --ui-input-border-width {
|
|
54
|
-
syntax: "*";
|
|
55
|
-
inherits: false;
|
|
56
|
-
}
|
|
57
|
-
@property --ui-input-focus-border {
|
|
58
|
-
syntax: "*";
|
|
59
|
-
inherits: false;
|
|
60
|
-
}
|
|
61
|
-
@property --ui-input-focus-outline {
|
|
62
|
-
syntax: "*";
|
|
63
|
-
inherits: false;
|
|
64
|
-
}
|
|
65
|
-
@property --ui-input-focus-shadow {
|
|
66
|
-
syntax: "*";
|
|
67
|
-
inherits: false;
|
|
68
|
-
}
|
|
69
|
-
@property --ui-input-inline-size {
|
|
70
|
-
syntax: "*";
|
|
71
|
-
inherits: false;
|
|
72
|
-
}
|
|
73
|
-
@property --ui-input-invalid-border {
|
|
74
|
-
syntax: "*";
|
|
75
|
-
inherits: false;
|
|
76
|
-
}
|
|
77
|
-
@property --ui-input-invalid-focus-shadow {
|
|
78
|
-
syntax: "*";
|
|
79
|
-
inherits: false;
|
|
80
|
-
}
|
|
81
|
-
@property --ui-input-min-block-size {
|
|
82
|
-
syntax: "*";
|
|
83
|
-
inherits: false;
|
|
84
|
-
}
|
|
85
|
-
@property --ui-input-radius {
|
|
86
|
-
syntax: "*";
|
|
87
|
-
inherits: false;
|
|
88
|
-
}
|
|
89
|
-
@property --ui-input-shadow {
|
|
90
|
-
syntax: "*";
|
|
91
|
-
inherits: false;
|
|
92
|
-
}
|
|
93
|
-
@property --ui-input-surface {
|
|
94
|
-
syntax: "*";
|
|
95
|
-
inherits: false;
|
|
96
|
-
}
|
|
43
|
+
/* An Input Group sets --_ui-default-input-* for the input inside it, below the input's own hooks. */
|
|
97
44
|
/* Normalize a unitless zero border to a length before the box calculation. */
|
|
98
45
|
@property --_ui-input-stroke {
|
|
99
46
|
syntax: "<length>";
|
|
@@ -131,7 +78,10 @@
|
|
|
131
78
|
|
|
132
79
|
/* Cap Safari's excess text metrics without changing native date, file, color or range widgets. */
|
|
133
80
|
:host:is([type="text"], [type="search"], [type="tel"], [type="url"], [type="email"], [type="password"], [type="number"]) {
|
|
134
|
-
max-block-size: max(
|
|
81
|
+
max-block-size: max(
|
|
82
|
+
calc(var(--_ui-input-size) - var(--_ui-default-input-frame-width, 0px)),
|
|
83
|
+
calc(1em * var(--ui-line-height-tight) + 2 * var(--_ui-input-inset-block) + 2 * var(--_ui-input-stroke))
|
|
84
|
+
);
|
|
135
85
|
}
|
|
136
86
|
|
|
137
87
|
/* Each size reads the hook and then an Input Group's default first, so a group, which draws the frame, can zero it. */
|
|
@@ -18,18 +18,6 @@
|
|
|
18
18
|
<span class="action"><slot name="action"></slot></span>
|
|
19
19
|
</div>
|
|
20
20
|
<style>
|
|
21
|
-
@property --ui-input-group-radius {
|
|
22
|
-
syntax: "*";
|
|
23
|
-
inherits: false;
|
|
24
|
-
}
|
|
25
|
-
@property --ui-input-group-invalid-border {
|
|
26
|
-
syntax: "*";
|
|
27
|
-
inherits: false;
|
|
28
|
-
}
|
|
29
|
-
@property --ui-input-group-invalid-focus-shadow {
|
|
30
|
-
syntax: "*";
|
|
31
|
-
inherits: false;
|
|
32
|
-
}
|
|
33
21
|
/* An input with fixed text before or after it, such as a domain after a site's name
|
|
34
22
|
("acme" + ".example.com") or slashes around a path. The group draws the field's border and
|
|
35
23
|
focus ring around the input and its affixes together; the input inside drops its own through
|
|
@@ -40,7 +28,7 @@
|
|
|
40
28
|
and not the form's. */
|
|
41
29
|
:host {
|
|
42
30
|
/* The group's own border and height stand for the input's, so the group is a lone Input's height.
|
|
43
|
-
|
|
31
|
+
These are defaults for the input; public hooks still win. */
|
|
44
32
|
--_ui-default-input-border-width: 0;
|
|
45
33
|
--_ui-default-input-min-block-size: 0;
|
|
46
34
|
--_ui-default-input-frame-width: calc(2 * var(--ui-border-width));
|
|
@@ -15,16 +15,6 @@
|
|
|
15
15
|
<ul $else role="list"><slot></slot></ul>
|
|
16
16
|
</template>
|
|
17
17
|
<style>
|
|
18
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
19
|
-
@property --ui-list-gap {
|
|
20
|
-
syntax: "*";
|
|
21
|
-
inherits: false;
|
|
22
|
-
}
|
|
23
|
-
@property --ui-list-min-item-width {
|
|
24
|
-
syntax: "*";
|
|
25
|
-
inherits: false;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
18
|
/* A list of native li elements or structured ui-list-item components. It owns the spacing between them, so a view never sets it. The
|
|
29
19
|
explicit list role keeps the list announced as one: some browsers drop it from a list with no
|
|
30
20
|
markers. */
|
|
@@ -27,24 +27,6 @@
|
|
|
27
27
|
<span class="trailing"><slot name="trailing"></slot></span>
|
|
28
28
|
</li>
|
|
29
29
|
<style>
|
|
30
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
31
|
-
@property --ui-list-item-gap {
|
|
32
|
-
syntax: "*";
|
|
33
|
-
inherits: false;
|
|
34
|
-
}
|
|
35
|
-
@property --ui-list-item-icon-size {
|
|
36
|
-
syntax: "*";
|
|
37
|
-
inherits: false;
|
|
38
|
-
}
|
|
39
|
-
@property --ui-list-item-padding-block {
|
|
40
|
-
syntax: "*";
|
|
41
|
-
inherits: false;
|
|
42
|
-
}
|
|
43
|
-
@property --ui-list-item-padding-inline {
|
|
44
|
-
syntax: "*";
|
|
45
|
-
inherits: false;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
30
|
/* One entry in a list: something to recognise (leading, usually an icon), its name (the default
|
|
49
31
|
slot), one line about it (description), and what it offers (trailing, such as a button or a
|
|
50
32
|
badge). The title and description are one line each and end in an ellipsis, so every item in a
|
|
@@ -55,7 +37,7 @@
|
|
|
55
37
|
a router, a modified click, and "open in new tab" all work. Trailing controls sit above it and
|
|
56
38
|
stay their own. */
|
|
57
39
|
:host {
|
|
58
|
-
/*
|
|
40
|
+
/* Resolve shared part values at the component root. */
|
|
59
41
|
--_ui-list-item-icon-size: var(--ui-list-item-icon-size);
|
|
60
42
|
|
|
61
43
|
position: relative;
|
|
@@ -78,27 +78,6 @@
|
|
|
78
78
|
>
|
|
79
79
|
</div>
|
|
80
80
|
<style>
|
|
81
|
-
@property --ui-listbox-radius {
|
|
82
|
-
syntax: "*";
|
|
83
|
-
inherits: false;
|
|
84
|
-
}
|
|
85
|
-
@property --ui-listbox-border {
|
|
86
|
-
syntax: "*";
|
|
87
|
-
inherits: false;
|
|
88
|
-
}
|
|
89
|
-
@property --ui-listbox-surface {
|
|
90
|
-
syntax: "*";
|
|
91
|
-
inherits: false;
|
|
92
|
-
}
|
|
93
|
-
@property --ui-listbox-focus-shadow {
|
|
94
|
-
syntax: "*";
|
|
95
|
-
inherits: false;
|
|
96
|
-
}
|
|
97
|
-
@property --ui-listbox-invalid-border {
|
|
98
|
-
syntax: "*";
|
|
99
|
-
inherits: false;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
81
|
:host {
|
|
103
82
|
position: relative;
|
|
104
83
|
box-sizing: border-box !important;
|