@threadlabs/looma 0.17.0 → 0.17.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/components/ui-avatar-group/ui-avatar-group.html +8 -5
- package/components/ui-avatar-group/ui-avatar-group.js +3 -3
- package/components/ui-badge/ui-badge.html +10 -5
- package/components/ui-breadcrumb-item/ui-breadcrumb-item.html +2 -1
- package/components/ui-button/ui-button.html +33 -26
- package/components/ui-button/ui-button.js +2 -2
- package/components/ui-callout/ui-callout.html +3 -1
- package/components/ui-card/ui-card.html +5 -3
- package/components/ui-checkbox/ui-checkbox.html +36 -8
- package/components/ui-combobox/ui-combobox.html +72 -45
- package/components/ui-combobox/ui-combobox.js +7 -2
- package/components/ui-context-menu/ui-context-menu.html +2 -2
- package/components/ui-description-item/ui-description-item.html +1 -1
- package/components/ui-description-list/ui-description-list.html +2 -0
- package/components/ui-dialog/ui-dialog.html +3 -23
- package/components/ui-disclosure/ui-disclosure.html +2 -2
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +2 -2
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +3 -3
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +4 -4
- package/components/ui-editor-slash-menu-item/ui-editor-slash-menu-item.html +6 -1
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +2 -2
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +4 -4
- package/components/ui-editor-toolbar/ui-editor-toolbar.html +5 -5
- package/components/ui-floating-action-button/ui-floating-action-button.html +4 -2
- package/components/ui-icon-button/ui-icon-button.html +57 -17
- package/components/ui-icon-button/ui-icon-button.js +1 -1
- package/components/ui-list/ui-list.html +46 -6
- package/components/ui-list-item/ui-list-item.html +1 -1
- package/components/ui-menu/ui-menu.html +4 -3
- package/components/ui-menu/ui-menu.js +9 -3
- package/components/ui-menu-item/ui-menu-item.html +43 -6
- package/components/ui-meter/ui-meter.html +4 -1
- package/components/ui-nav-item/ui-nav-item.html +0 -1
- package/components/ui-page-header/ui-page-header.html +1 -0
- package/components/ui-popover/ui-popover.html +1 -1
- package/components/ui-radio/ui-radio.html +5 -2
- package/components/ui-scroll-area/ui-scroll-area.html +9 -14
- package/components/ui-scroll-area/ui-scroll-area.js +32 -0
- package/components/ui-search-result-row/ui-search-result-row.html +5 -3
- package/components/ui-search-shell/ui-search-shell.html +8 -8
- package/components/ui-section/ui-section.html +5 -3
- package/components/ui-separator/ui-separator.html +2 -2
- package/components/ui-sidebar/ui-sidebar.html +2 -2
- package/components/ui-spinner/ui-spinner.html +28 -8
- package/components/ui-status-message/ui-status-message.html +1 -1
- package/components/ui-switch/ui-switch.html +17 -8
- package/components/ui-table/ui-table.html +1 -1
- package/components/ui-tabs/ui-tabs.html +21 -12
- package/components/ui-toast/ui-toast.html +1 -1
- package/components/ui-toast-region/ui-toast-region.html +1 -1
- package/components/ui-tooltip/ui-tooltip.html +12 -12
- package/components/ui-tooltip/ui-tooltip.js +1 -1
- package/components/ui-top-bar/ui-top-bar.html +1 -1
- package/components/ui-tree/ui-tree.js +4 -1
- package/components/ui-tree-item/ui-tree-item.html +2 -1
- package/dist/index.js +15 -14
- package/package.json +1 -1
- package/styles/ui-avatar-group.css +8 -5
- package/styles/ui-badge.css +10 -5
- package/styles/ui-breadcrumb-item.css +2 -1
- package/styles/ui-button.css +19 -25
- package/styles/ui-callout.css +3 -1
- package/styles/ui-card.css +4 -2
- package/styles/ui-checkbox.css +38 -8
- package/styles/ui-combobox.css +27 -8
- package/styles/ui-context-menu.css +2 -2
- package/styles/ui-description-item.css +1 -1
- package/styles/ui-description-list.css +2 -0
- package/styles/ui-dialog.css +1 -22
- package/styles/ui-disclosure.css +2 -2
- package/styles/ui-editor-insert-table-grid.css +2 -2
- package/styles/ui-editor-mention-menu.css +3 -3
- package/styles/ui-editor-slash-menu-item.css +6 -1
- package/styles/ui-editor-slash-menu.css +4 -4
- package/styles/ui-editor-table-context-menu.css +2 -2
- package/styles/ui-editor-table-toolbar.css +4 -4
- package/styles/ui-editor-toolbar.css +5 -5
- package/styles/ui-floating-action-button.css +3 -1
- package/styles/ui-icon-button.css +53 -18
- package/styles/ui-list-item.css +1 -1
- package/styles/ui-list.css +41 -6
- package/styles/ui-menu-item.css +43 -5
- package/styles/ui-menu.css +3 -3
- package/styles/ui-meter.css +4 -1
- package/styles/ui-nav-item.css +0 -1
- package/styles/ui-page-header.css +1 -0
- package/styles/ui-popover.css +1 -1
- package/styles/ui-radio.css +5 -2
- package/styles/ui-scroll-area.css +10 -16
- package/styles/ui-search-result-row.css +3 -2
- package/styles/ui-search-shell.css +7 -7
- package/styles/ui-section.css +5 -3
- package/styles/ui-separator.css +2 -2
- package/styles/ui-sidebar.css +2 -2
- package/styles/ui-spinner.css +27 -6
- package/styles/ui-status-message.css +1 -1
- package/styles/ui-switch.css +17 -8
- package/styles/ui-table.css +1 -1
- package/styles/ui-tabs.css +60 -51
- package/styles/ui-toast-region.css +1 -1
- package/styles/ui-toast.css +1 -1
- package/styles/ui-tooltip.css +12 -12
- package/styles/ui-top-bar.css +1 -1
- package/styles/ui-tree-item.css +2 -1
- package/theme-dark.css +4 -4
- package/theme-light.css +3 -3
- package/tokens.css +9 -6
- package/vanilla/UiButton.d.ts +1 -0
- package/vanilla/UiButton.js +17 -19
- package/vanilla/UiCombobox.js +162 -159
- package/vanilla/UiDialog.js +2 -2
- package/vanilla/UiIconButton.d.ts +1 -0
- package/vanilla/UiIconButton.js +1 -4
- package/vanilla/UiList.d.ts +3 -1
- package/vanilla/UiList.js +36 -19
- package/vanilla/UiMenu.d.ts +1 -0
- package/vanilla/UiMenu.js +1 -1
- package/vanilla/UiMenuItem.js +10 -13
- package/vanilla/UiScrollArea.js +11 -6
- package/vanilla/UiSearchShell.js +2 -2
- package/vanilla/UiSpinner.js +2 -4
- package/vue/UiAvatarGroup.vue +8 -5
- package/vue/UiBadge.vue +10 -5
- package/vue/UiBreadcrumbItem.vue +2 -1
- package/vue/UiButton.d.ts +2 -0
- package/vue/UiButton.vue +31 -28
- package/vue/UiCallout.vue +3 -2
- package/vue/UiCard.vue +4 -2
- package/vue/UiCheckbox.vue +36 -8
- package/vue/UiCombobox.d.ts +1 -1
- package/vue/UiCombobox.vue +55 -35
- package/vue/UiContextMenu.vue +2 -2
- package/vue/UiDescriptionItem.vue +1 -1
- package/vue/UiDescriptionList.vue +2 -0
- package/vue/UiDialog.d.ts +3 -3
- package/vue/UiDialog.vue +3 -27
- package/vue/UiDisclosure.vue +2 -2
- package/vue/UiEditorInsertTableGrid.vue +2 -2
- package/vue/UiEditorMentionMenu.d.ts +1 -1
- package/vue/UiEditorMentionMenu.vue +4 -3
- package/vue/UiEditorSlashMenu.vue +6 -4
- package/vue/UiEditorSlashMenuItem.vue +6 -1
- package/vue/UiEditorTableContextMenu.vue +2 -2
- package/vue/UiEditorTableToolbar.vue +4 -4
- package/vue/UiEditorToolbar.vue +5 -5
- package/vue/UiFloatingActionButton.vue +3 -1
- package/vue/UiIconButton.d.ts +2 -0
- package/vue/UiIconButton.vue +61 -19
- package/vue/UiList.d.ts +7 -1
- package/vue/UiList.vue +57 -6
- package/vue/UiListItem.vue +1 -1
- package/vue/UiMenu.d.ts +2 -0
- package/vue/UiMenu.vue +6 -3
- package/vue/UiMenuItem.d.ts +3 -3
- package/vue/UiMenuItem.vue +47 -7
- package/vue/UiMeter.vue +4 -1
- package/vue/UiNavItem.vue +0 -1
- package/vue/UiPageHeader.vue +1 -0
- package/vue/UiPopover.vue +1 -1
- package/vue/UiRadio.vue +5 -2
- package/vue/UiScrollArea.vue +24 -18
- package/vue/UiSearchResultRow.vue +3 -2
- package/vue/UiSearchShell.vue +8 -8
- package/vue/UiSection.vue +5 -3
- package/vue/UiSeparator.vue +2 -2
- package/vue/UiSidebar.vue +2 -2
- package/vue/UiSpinner.vue +28 -7
- package/vue/UiStatusMessage.vue +1 -1
- package/vue/UiSwitch.vue +20 -9
- package/vue/UiTable.vue +1 -1
- package/vue/UiTabs.vue +25 -12
- package/vue/UiToast.vue +1 -1
- package/vue/UiToastRegion.vue +1 -1
- package/vue/UiTooltip.vue +12 -12
- package/vue/UiTopBar.vue +1 -1
- package/vue/UiTreeItem.vue +2 -1
- package/vue/chunks/UiAvatarGroup.js +1 -1
- package/vue/chunks/UiBadge.js +1 -1
- package/vue/chunks/UiBreadcrumbItem.js +1 -1
- package/vue/chunks/UiButton.js +28 -23
- package/vue/chunks/UiCallout.js +1 -1
- package/vue/chunks/UiCard.js +1 -1
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiCombobox.js +80 -77
- package/vue/chunks/UiContextMenu.js +1 -1
- package/vue/chunks/UiDescriptionItem.js +1 -1
- package/vue/chunks/UiDescriptionList.js +1 -1
- package/vue/chunks/UiDialog.js +7 -4
- package/vue/chunks/UiDisclosure.js +1 -1
- package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
- package/vue/chunks/UiEditorMentionMenu.js +1 -1
- package/vue/chunks/UiEditorSlashMenu.js +1 -1
- package/vue/chunks/UiEditorSlashMenuItem.js +1 -1
- package/vue/chunks/UiEditorTableContextMenu.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/UiIconButton.js +13 -8
- package/vue/chunks/UiList.js +17 -5
- package/vue/chunks/UiListItem.js +1 -1
- package/vue/chunks/UiMenu.js +10 -2
- package/vue/chunks/UiMenuItem.js +1 -4
- 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/UiScrollArea.js +22 -3
- package/vue/chunks/UiSearchResultRow.js +1 -1
- package/vue/chunks/UiSearchShell.js +2 -2
- package/vue/chunks/UiSection.js +1 -1
- package/vue/chunks/UiSeparator.js +1 -1
- package/vue/chunks/UiSidebar.js +1 -1
- package/vue/chunks/UiSpinner.js +7 -5
- package/vue/chunks/UiStatusMessage.js +1 -1
- package/vue/chunks/UiSwitch.js +1 -1
- package/vue/chunks/UiTable.js +1 -1
- package/vue/chunks/UiTabs.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/UiTreeItem.js +1 -1
- package/vue/components.css +1217 -1032
- package/vue/index.js +1 -1
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
>
|
|
36
36
|
<span class="indicator" aria-hidden="true">
|
|
37
37
|
<ui-icon $if="type = 'checkbox' and internalChecked" name="check"></ui-icon>
|
|
38
|
-
<ui-icon $if="type = 'radio' and internalChecked" name="circle-dot"></ui-icon>
|
|
39
38
|
</span>
|
|
40
39
|
<span class="label"><slot></slot></span>
|
|
41
40
|
<span class="shortcut" aria-hidden="true"><slot name="shortcut"></slot></span>
|
|
@@ -71,7 +70,7 @@
|
|
|
71
70
|
:host {
|
|
72
71
|
display: flex;
|
|
73
72
|
align-items: center;
|
|
74
|
-
gap: var(--ui-space-
|
|
73
|
+
gap: var(--ui-space-2);
|
|
75
74
|
box-sizing: border-box;
|
|
76
75
|
width: 100%;
|
|
77
76
|
padding: var(--ui-menu-item-padding-block, var(--_ui-default-menu-item-padding-block, var(--ui-space-2)))
|
|
@@ -94,16 +93,43 @@
|
|
|
94
93
|
|
|
95
94
|
.indicator {
|
|
96
95
|
display: inline-flex;
|
|
97
|
-
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
98
|
flex: none;
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
box-sizing: border-box;
|
|
100
|
+
inline-size: var(--ui-icon-size-sm);
|
|
101
|
+
block-size: var(--ui-icon-size-sm);
|
|
102
|
+
border: 1.5px solid var(--ui-control-border);
|
|
103
|
+
border-radius: var(--ui-radius-sm);
|
|
104
|
+
color: var(--ui-surface);
|
|
105
|
+
--_ui-default-icon-size: 0.75rem;
|
|
101
106
|
}
|
|
102
107
|
|
|
103
108
|
:host-state([type="action"]) .indicator {
|
|
104
109
|
display: none;
|
|
105
110
|
}
|
|
106
111
|
|
|
112
|
+
:host-state([type="checkbox"])[aria-checked="true"] .indicator {
|
|
113
|
+
border-color: var(--ui-accent);
|
|
114
|
+
background: var(--ui-accent);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:host-state([type="radio"]) .indicator {
|
|
118
|
+
border-radius: var(--ui-radius-round);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:host-state([type="radio"])[aria-checked="true"] .indicator {
|
|
122
|
+
border-color: var(--ui-accent);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:host-state([type="radio"])[aria-checked="true"] .indicator::after {
|
|
126
|
+
content: "";
|
|
127
|
+
inline-size: 0.375rem;
|
|
128
|
+
block-size: 0.375rem;
|
|
129
|
+
border-radius: var(--ui-radius-round);
|
|
130
|
+
background: var(--ui-accent);
|
|
131
|
+
}
|
|
132
|
+
|
|
107
133
|
.shortcut {
|
|
108
134
|
margin-inline-start: auto;
|
|
109
135
|
color: var(--ui-text-secondary);
|
|
@@ -134,10 +160,21 @@
|
|
|
134
160
|
}
|
|
135
161
|
|
|
136
162
|
:host[aria-disabled="true"] {
|
|
137
|
-
|
|
163
|
+
background: var(--ui-disabled-surface);
|
|
164
|
+
color: var(--ui-disabled-text);
|
|
138
165
|
cursor: not-allowed;
|
|
139
166
|
}
|
|
140
167
|
|
|
168
|
+
:host[aria-disabled="true"] .indicator {
|
|
169
|
+
border-color: var(--ui-disabled-border);
|
|
170
|
+
background: transparent;
|
|
171
|
+
color: var(--ui-disabled-text);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:host[aria-disabled="true"] .indicator::after {
|
|
175
|
+
background: var(--ui-disabled-text);
|
|
176
|
+
}
|
|
177
|
+
|
|
141
178
|
@media (forced-colors: active) {
|
|
142
179
|
:host:focus-visible {
|
|
143
180
|
outline-color: Highlight;
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
overflow: hidden;
|
|
58
58
|
border-radius: var(--ui-radius-round);
|
|
59
59
|
background: var(--ui-border);
|
|
60
|
+
box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.1), inset 0 -1px rgb(255 255 255 / 0.22);
|
|
60
61
|
/* Unseen until forced colours draw it, where the track's own colour is gone. */
|
|
61
62
|
outline: 1px solid transparent;
|
|
62
63
|
}
|
|
@@ -69,7 +70,9 @@
|
|
|
69
70
|
.fill {
|
|
70
71
|
display: block;
|
|
71
72
|
block-size: 100%;
|
|
72
|
-
background: var(--_meter-fill);
|
|
73
|
+
background-color: var(--_meter-fill);
|
|
74
|
+
background-image: linear-gradient(to bottom, rgb(255 255 255 / 0.26), transparent 70%);
|
|
75
|
+
box-shadow: inset 0 1px rgb(255 255 255 / 0.26), inset 0 -1px rgb(0 0 0 / 0.1);
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
:host-state([tone="accent"]) {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
overflow: auto;
|
|
73
73
|
padding: var(--ui-space-3);
|
|
74
74
|
background: var(--_ui-popover-surface, var(--ui-overlay-surface, var(--ui-surface-elevated)));
|
|
75
|
-
border: 1px solid var(--_ui-popover-border, var(--ui-overlay-border, var(--ui-border-
|
|
75
|
+
border: 1px solid var(--_ui-popover-border, var(--ui-overlay-border, var(--ui-border-strong)));
|
|
76
76
|
border-radius: var(--_ui-popover-radius, var(--ui-overlay-radius, var(--ui-radius-lg)));
|
|
77
77
|
box-shadow: var(--_ui-popover-shadow, var(--ui-overlay-shadow, var(--ui-elevation-overlay, var(--ui-shadow-lg))));
|
|
78
78
|
}
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
flex: 0 0 auto;
|
|
77
77
|
inline-size: var(--_ui-radio-size, 1.125rem);
|
|
78
78
|
block-size: var(--_ui-radio-size, 1.125rem);
|
|
79
|
-
margin: 0.125em 0 0;
|
|
79
|
+
margin: calc(0.125em + 1px) 0 0;
|
|
80
80
|
accent-color: var(--ui-accent-solid);
|
|
81
81
|
cursor: pointer;
|
|
82
82
|
}
|
|
@@ -90,6 +90,9 @@
|
|
|
90
90
|
color: var(--ui-disabled-text);
|
|
91
91
|
cursor: not-allowed;
|
|
92
92
|
}
|
|
93
|
+
:host-state([disabled]) .description {
|
|
94
|
+
color: var(--ui-disabled-text);
|
|
95
|
+
}
|
|
93
96
|
:host-state([disabled]) input {
|
|
94
97
|
cursor: not-allowed;
|
|
95
98
|
}
|
|
@@ -116,7 +119,7 @@
|
|
|
116
119
|
|
|
117
120
|
:host-state([size="sm"]) input,
|
|
118
121
|
:host-state([size="lg"]) input {
|
|
119
|
-
margin-top: calc((var(--_line) - var(--_ui-radio-size, 1.125rem)) / 2);
|
|
122
|
+
margin-top: calc((var(--_line) - var(--_ui-radio-size, 1.125rem)) / 2 + 1px);
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
@media (pointer: coarse) {
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
<template component="ui-scroll-area">
|
|
1
|
+
<template component="ui-scroll-area" controller="./ui-scroll-area.js">
|
|
2
2
|
<defs>
|
|
3
3
|
<prop name="orientation" type="vertical | horizontal" default="vertical"
|
|
4
4
|
>The direction the content scrolls. Vertical scrolls up and down and clips sideways overflow; horizontal scrolls sideways and clips vertical
|
|
5
5
|
overflow.</prop>
|
|
6
6
|
</defs>
|
|
7
|
-
<div><slot></slot></div>
|
|
7
|
+
<div><div class="content" $ref="content"><slot></slot></div></div>
|
|
8
8
|
<style>
|
|
9
|
-
/*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
fade is a mask, so it blends into whatever is behind the area without knowing its colour. */
|
|
9
|
+
/* The controller sets each fade length from overflow and scroll position. The mask blends
|
|
10
|
+
into whatever is behind the area without needing to know its colour. Before upgrade, its
|
|
11
|
+
zero-length defaults leave the authored scroll area fully visible. */
|
|
13
12
|
:host {
|
|
14
13
|
display: block;
|
|
15
14
|
box-sizing: border-box;
|
|
@@ -28,20 +27,16 @@
|
|
|
28
27
|
#000 calc(100% - var(--_ui-scroll-fade-end)),
|
|
29
28
|
transparent
|
|
30
29
|
);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var(--_ui-scroll-fade-size) calc(100% + 1px),
|
|
36
|
-
-1px calc(100% - var(--_ui-scroll-fade-size)),
|
|
37
|
-
calc(100% - var(--_ui-scroll-fade-size)) 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.content {
|
|
33
|
+
display: flow-root;
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
:host-state([orientation="horizontal"]) {
|
|
41
37
|
overflow-x: auto;
|
|
42
38
|
overflow-y: hidden;
|
|
43
39
|
--_ui-scroll-fade-direction: var(--_ui-scroll-fade-inline);
|
|
44
|
-
animation-timeline: scroll(self inline);
|
|
45
40
|
}
|
|
46
41
|
|
|
47
42
|
:host:dir(rtl) {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default function controller(host) {
|
|
2
|
+
const area = host.element;
|
|
3
|
+
let frame = 0;
|
|
4
|
+
|
|
5
|
+
const update = () => {
|
|
6
|
+
frame = 0;
|
|
7
|
+
const horizontal = host.state.orientation === "horizontal";
|
|
8
|
+
const extent = horizontal ? area.scrollWidth - area.clientWidth : area.scrollHeight - area.clientHeight;
|
|
9
|
+
const rtl = horizontal && getComputedStyle(area).direction === "rtl";
|
|
10
|
+
const position = horizontal ? (rtl ? -area.scrollLeft : area.scrollLeft) : area.scrollTop;
|
|
11
|
+
const start = Math.max(0, position);
|
|
12
|
+
const end = Math.max(0, extent - position);
|
|
13
|
+
area.style.setProperty("--_ui-scroll-fade-start", `min(var(--_ui-scroll-fade-size), ${start}px)`);
|
|
14
|
+
area.style.setProperty("--_ui-scroll-fade-end", `min(var(--_ui-scroll-fade-size), ${end}px)`);
|
|
15
|
+
};
|
|
16
|
+
const schedule = () => {
|
|
17
|
+
if (!frame) frame = requestAnimationFrame(update);
|
|
18
|
+
};
|
|
19
|
+
const observer = new ResizeObserver(schedule);
|
|
20
|
+
observer.observe(area);
|
|
21
|
+
observer.observe(host.refs.content);
|
|
22
|
+
area.addEventListener("scroll", schedule, { passive: true });
|
|
23
|
+
const stop = host.effect(schedule);
|
|
24
|
+
schedule();
|
|
25
|
+
|
|
26
|
+
return () => {
|
|
27
|
+
stop();
|
|
28
|
+
observer.disconnect();
|
|
29
|
+
area.removeEventListener("scroll", schedule);
|
|
30
|
+
if (frame) cancelAnimationFrame(frame);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template component="ui-search-result-row">
|
|
2
2
|
<defs>
|
|
3
|
-
<prop name="disabled" type="boolean" default="false"
|
|
3
|
+
<prop name="disabled" type="boolean" default="false"
|
|
4
|
+
>Disables the row's button, so it cannot be chosen or focused, and gives it a flat muted treatment.</prop>
|
|
4
5
|
<prop name="selected" type="boolean" default="false"
|
|
5
6
|
>Marks the row as the current result: it gets the hover surface and aria-current="true", which assistive technology announces as current. Set it on one row
|
|
6
7
|
at a time, such as the result the arrow keys have moved to.</prop>
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
gap: var(--ui-search-result-row-gap, var(--ui-space-3));
|
|
62
63
|
background: var(--ui-search-result-row-surface, transparent);
|
|
63
64
|
border: none;
|
|
64
|
-
border-block-end: 1px solid var(--ui-search-result-row-border, var(--ui-border));
|
|
65
|
+
border-block-end: 1px solid var(--ui-search-result-row-border, var(--ui-border-divider));
|
|
65
66
|
color: inherit;
|
|
66
67
|
cursor: pointer;
|
|
67
68
|
text-align: left;
|
|
@@ -89,7 +90,8 @@
|
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
:host:disabled {
|
|
92
|
-
|
|
93
|
+
background: var(--ui-disabled-surface);
|
|
94
|
+
color: var(--ui-disabled-text);
|
|
93
95
|
cursor: not-allowed;
|
|
94
96
|
}
|
|
95
97
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<div class="search"><slot name="search"></slot></div>
|
|
17
17
|
<div class="status"><slot name="status"></slot></div>
|
|
18
18
|
<div class="body"><slot name="body"></slot></div>
|
|
19
|
-
<div class="
|
|
19
|
+
<div class="actions"><slot name="footer"></slot></div>
|
|
20
20
|
</div>
|
|
21
21
|
</dialog>
|
|
22
22
|
</div>
|
|
@@ -110,14 +110,14 @@
|
|
|
110
110
|
margin-inline: auto;
|
|
111
111
|
overflow: hidden;
|
|
112
112
|
background: var(--_ui-search-shell-surface, var(--ui-overlay-surface, var(--ui-surface-elevated)));
|
|
113
|
-
border: 1px solid var(--_ui-search-shell-border, var(--ui-overlay-border, var(--ui-border-
|
|
113
|
+
border: 1px solid var(--_ui-search-shell-border, var(--ui-overlay-border, var(--ui-border-strong)));
|
|
114
114
|
border-radius: var(--_ui-search-shell-radius, var(--ui-overlay-radius, var(--ui-radius-dialog)));
|
|
115
115
|
box-shadow: var(--_ui-search-shell-shadow, var(--ui-overlay-shadow, var(--ui-elevation-dialog, var(--ui-shadow-xl))));
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
.search {
|
|
119
119
|
padding: var(--ui-space-3);
|
|
120
|
-
border-block-end: 1px solid var(--ui-border-
|
|
120
|
+
border-block-end: 1px solid var(--ui-border-divider);
|
|
121
121
|
transition: border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease);
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
.status,
|
|
150
|
-
.
|
|
150
|
+
.actions {
|
|
151
151
|
flex-shrink: 0;
|
|
152
152
|
padding: var(--ui-space-2) var(--ui-space-4);
|
|
153
153
|
color: var(--ui-text-secondary);
|
|
@@ -155,22 +155,22 @@
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
.status {
|
|
158
|
-
border-block-end: 1px solid var(--ui-border-
|
|
158
|
+
border-block-end: 1px solid var(--ui-border-divider);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
/* Laid out like the dialog's action row: actions right-aligned, spaced as buttons, no fill. */
|
|
162
|
-
.
|
|
162
|
+
.actions {
|
|
163
163
|
display: flex;
|
|
164
164
|
flex-wrap: wrap;
|
|
165
165
|
align-items: center;
|
|
166
166
|
justify-content: flex-end;
|
|
167
167
|
gap: var(--ui-space-2);
|
|
168
168
|
padding: var(--ui-space-3) var(--ui-space-4);
|
|
169
|
-
border-block-start: 1px solid var(--ui-border-
|
|
169
|
+
border-block-start: 1px solid var(--ui-border-divider);
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
.status:empty,
|
|
173
|
-
.
|
|
173
|
+
.actions:empty {
|
|
174
174
|
display: none;
|
|
175
175
|
}
|
|
176
176
|
|
|
@@ -30,18 +30,20 @@
|
|
|
30
30
|
|
|
31
31
|
:host-state([variant="card"]) {
|
|
32
32
|
padding: var(--ui-space-5);
|
|
33
|
-
border: 1px solid var(--ui-border-
|
|
33
|
+
border: 1px solid var(--ui-border-strong);
|
|
34
34
|
border-radius: var(--ui-radius-lg);
|
|
35
35
|
background: var(--ui-surface-raised);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
:host-state([variant="divided"]) {
|
|
39
39
|
padding-block-start: var(--ui-space-6);
|
|
40
|
-
border-block-start: 1px solid var(--ui-border-
|
|
40
|
+
border-block-start: 1px solid var(--ui-border-divider);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
:host-state([variant="card"][tone="danger"]) {
|
|
44
|
-
border-color: var(--ui-danger);
|
|
44
|
+
border-color: color-mix(in srgb, var(--ui-danger) 45%, var(--ui-border-default));
|
|
45
|
+
border-inline-start: 4px solid var(--ui-danger);
|
|
46
|
+
background: var(--ui-danger-soft);
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
.head {
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
align-self: stretch;
|
|
18
18
|
margin: 0;
|
|
19
19
|
border: 0;
|
|
20
|
-
border-block-start: 1px solid var(--ui-separator-color, var(--ui-border-
|
|
20
|
+
border-block-start: 1px solid var(--ui-separator-color, var(--ui-border-divider));
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
:host[aria-orientation="vertical"] {
|
|
24
24
|
block-size: auto;
|
|
25
25
|
border-block-start: 0;
|
|
26
|
-
border-inline-start: 1px solid var(--ui-separator-color, var(--ui-border-
|
|
26
|
+
border-inline-start: 1px solid var(--ui-separator-color, var(--ui-border-divider));
|
|
27
27
|
}
|
|
28
28
|
</style>
|
|
29
29
|
</template>
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
max-inline-size: 100%;
|
|
63
63
|
min-block-size: 0;
|
|
64
64
|
background: var(--ui-sidebar-surface, var(--ui-surface-default));
|
|
65
|
-
border-inline-end: 1px solid var(--ui-sidebar-border, var(--ui-border-
|
|
65
|
+
border-inline-end: 1px solid var(--ui-sidebar-border, var(--ui-border-divider));
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
:host-state([side="end"]) {
|
|
69
69
|
border-inline-end: 0;
|
|
70
|
-
border-inline-start: 1px solid var(--ui-sidebar-border, var(--ui-border-
|
|
70
|
+
border-inline-start: 1px solid var(--ui-sidebar-border, var(--ui-border-divider));
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
/* The panel's content scrolls, and each edge that hides content fades: the scroll fade every
|
|
@@ -6,36 +6,56 @@
|
|
|
6
6
|
<prop name="size" type="sm | md" default="md">sm fits inside a button or a line of small text; md sits beside body text.</prop>
|
|
7
7
|
</defs>
|
|
8
8
|
<span
|
|
9
|
+
class="ring"
|
|
9
10
|
:role="{ true: 'status', false: null }[format('%s', label != '')]"
|
|
10
11
|
:aria-label="{ true: label, false: null }[format('%s', label != '')]"
|
|
11
12
|
:aria-hidden="{ true: null, false: 'true' }[format('%s', label != '')]"
|
|
12
|
-
>
|
|
13
|
-
<ui-icon name="loader"></ui-icon>
|
|
14
|
-
</span>
|
|
13
|
+
></span>
|
|
15
14
|
<style>
|
|
16
|
-
/* Something is on its way.
|
|
15
|
+
/* Something is on its way. The ring chases in the current text colour; with reduced motion it holds still,
|
|
17
16
|
and the label (or the text beside it) still says what is happening. */
|
|
18
17
|
:host {
|
|
19
18
|
display: inline-flex;
|
|
20
19
|
flex: none;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
inline-size: 1em;
|
|
23
|
+
block-size: 1em;
|
|
21
24
|
color: currentColor;
|
|
22
25
|
font-size: var(--ui-font-size-lg);
|
|
23
26
|
line-height: 1;
|
|
24
|
-
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ring {
|
|
30
|
+
display: block;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
inline-size: 100%;
|
|
33
|
+
block-size: 100%;
|
|
34
|
+
border: 2px solid transparent;
|
|
35
|
+
border-block-start-color: currentColor;
|
|
36
|
+
border-inline-end-color: color-mix(in srgb, currentColor 52%, transparent);
|
|
37
|
+
border-radius: 50%;
|
|
38
|
+
animation: ui-spinner-chase 1s linear infinite;
|
|
25
39
|
}
|
|
26
40
|
|
|
27
41
|
:host-state([size="sm"]) {
|
|
28
42
|
font-size: var(--ui-font-size-md);
|
|
29
43
|
}
|
|
30
44
|
|
|
31
|
-
@keyframes ui-spinner-
|
|
32
|
-
|
|
45
|
+
@keyframes ui-spinner-chase {
|
|
46
|
+
0% {
|
|
47
|
+
transform: rotate(0);
|
|
48
|
+
}
|
|
49
|
+
70% {
|
|
50
|
+
transform: rotate(160deg);
|
|
51
|
+
}
|
|
52
|
+
100% {
|
|
33
53
|
transform: rotate(1turn);
|
|
34
54
|
}
|
|
35
55
|
}
|
|
36
56
|
|
|
37
57
|
@media (prefers-reduced-motion: reduce) {
|
|
38
|
-
|
|
58
|
+
.ring {
|
|
39
59
|
animation: none;
|
|
40
60
|
}
|
|
41
61
|
}
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
width: var(--_ui-switch-track-width, 2.5rem);
|
|
83
83
|
height: var(--_ui-switch-track-height, 1.5rem);
|
|
84
84
|
padding: 0;
|
|
85
|
-
border: 1px solid var(--ui-control-border
|
|
85
|
+
border: 1px solid var(--ui-control-border, var(--ui-border-strong));
|
|
86
86
|
border-radius: var(--ui-radius-round);
|
|
87
|
-
background: var(--ui-control-surface, var(--ui-surface-default));
|
|
88
|
-
box-shadow:
|
|
87
|
+
background-color: var(--ui-control-surface, var(--ui-surface-default));
|
|
88
|
+
box-shadow: var(--ui-control-inset);
|
|
89
89
|
cursor: pointer;
|
|
90
|
-
transition: background-color var(--ui-motion-
|
|
90
|
+
transition: background-color var(--ui-motion-base) var(--ui-motion-ease), border-color var(--ui-motion-base) var(--ui-motion-ease);
|
|
91
91
|
margin: 0;
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -101,11 +101,11 @@
|
|
|
101
101
|
border-radius: var(--ui-radius-round);
|
|
102
102
|
background: var(--ui-text-secondary);
|
|
103
103
|
box-shadow: var(--ui-shadow-xs);
|
|
104
|
-
transition: transform var(--ui-motion-
|
|
104
|
+
transition: transform var(--ui-motion-base) var(--ui-motion-ease), background-color var(--ui-motion-base) var(--ui-motion-ease);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
input:checked {
|
|
108
|
-
background: var(--ui-accent-solid);
|
|
108
|
+
background-color: var(--ui-accent-solid);
|
|
109
109
|
border-color: var(--ui-accent-solid);
|
|
110
110
|
}
|
|
111
111
|
|
|
@@ -123,12 +123,21 @@
|
|
|
123
123
|
color: var(--ui-disabled-text);
|
|
124
124
|
cursor: not-allowed;
|
|
125
125
|
}
|
|
126
|
+
:host-state([disabled]) .description {
|
|
127
|
+
color: var(--ui-disabled-text);
|
|
128
|
+
}
|
|
126
129
|
:host-state([disabled]) input {
|
|
127
|
-
border-color: var(--ui-border
|
|
128
|
-
background: var(--ui-
|
|
130
|
+
border-color: var(--ui-disabled-border);
|
|
131
|
+
background-color: var(--ui-disabled-surface);
|
|
132
|
+
box-shadow: none;
|
|
129
133
|
cursor: not-allowed;
|
|
130
134
|
}
|
|
131
135
|
|
|
136
|
+
:host-state([disabled]) input::after {
|
|
137
|
+
background-color: var(--ui-disabled-text);
|
|
138
|
+
box-shadow: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
132
141
|
@media (prefers-reduced-motion: reduce) {
|
|
133
142
|
input, input::after {
|
|
134
143
|
transition: none;
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
:slotted(thead th) {
|
|
94
94
|
block-size: auto;
|
|
95
95
|
padding-block: var(--ui-space-2);
|
|
96
|
-
border-block-end-color: var(--ui-border-
|
|
96
|
+
border-block-end-color: var(--ui-border-divider);
|
|
97
97
|
background: var(--ui-surface);
|
|
98
98
|
color: var(--ui-text-muted);
|
|
99
99
|
font-weight: var(--ui-font-medium);
|
|
@@ -89,10 +89,11 @@
|
|
|
89
89
|
overflow-y: hidden;
|
|
90
90
|
overscroll-behavior: contain;
|
|
91
91
|
scrollbar-width: thin;
|
|
92
|
-
border-block-end: 1px solid var(--ui-border-
|
|
92
|
+
border-block-end: 1px solid var(--ui-border-divider);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.list button
|
|
95
|
+
.list button,
|
|
96
|
+
.list > :slotted(button[slot="tab"]) {
|
|
96
97
|
min-block-size: var(--_ui-tabs-tab-min-block-size, var(--_tab-min-block-size));
|
|
97
98
|
margin: 0 0 -1px;
|
|
98
99
|
padding: var(--_ui-tabs-tab-padding-block, var(--_tab-padding-block)) var(--_ui-tabs-tab-padding-inline, var(--_tab-padding-inline));
|
|
@@ -114,7 +115,8 @@
|
|
|
114
115
|
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high.
|
|
115
116
|
* Trimming applies to block containers, so the box is a block with centred content. */
|
|
116
117
|
@supports (text-box-trim: trim-both) {
|
|
117
|
-
.list button
|
|
118
|
+
.list button,
|
|
119
|
+
.list > :slotted(button[slot="tab"]) {
|
|
118
120
|
display: block;
|
|
119
121
|
text-align: center;
|
|
120
122
|
align-content: center;
|
|
@@ -127,19 +129,23 @@
|
|
|
127
129
|
grid-auto-columns: minmax(max-content, 1fr);
|
|
128
130
|
}
|
|
129
131
|
|
|
130
|
-
.list button
|
|
132
|
+
.list button,
|
|
133
|
+
.list > :slotted(button[slot="tab"]) {
|
|
131
134
|
white-space: nowrap;
|
|
132
135
|
}
|
|
133
136
|
|
|
134
|
-
.list button:hover
|
|
137
|
+
.list button:hover,
|
|
138
|
+
.list > :slotted(button[slot="tab"]:hover) {
|
|
135
139
|
color: var(--ui-text-primary);
|
|
136
140
|
background: var(--ui-surface-muted);
|
|
137
141
|
}
|
|
138
|
-
.list button[aria-selected="true"]
|
|
142
|
+
.list button[aria-selected="true"],
|
|
143
|
+
.list > :slotted(button[slot="tab"][aria-selected="true"]) {
|
|
139
144
|
color: var(--ui-accent-solid);
|
|
140
145
|
border-block-end-color: var(--ui-accent-solid);
|
|
141
146
|
}
|
|
142
|
-
.list button:focus-visible
|
|
147
|
+
.list button:focus-visible,
|
|
148
|
+
.list > :slotted(button[slot="tab"]:focus-visible) {
|
|
143
149
|
position: relative;
|
|
144
150
|
outline: none;
|
|
145
151
|
box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ui-focus-ring) 45%, transparent);
|
|
@@ -149,7 +155,7 @@
|
|
|
149
155
|
.panels {
|
|
150
156
|
min-inline-size: 0;
|
|
151
157
|
}
|
|
152
|
-
:slotted(*) {
|
|
158
|
+
.panels > :slotted(*) {
|
|
153
159
|
padding: var(--ui-space-4);
|
|
154
160
|
}
|
|
155
161
|
|
|
@@ -162,22 +168,25 @@
|
|
|
162
168
|
grid-auto-flow: row;
|
|
163
169
|
grid-auto-columns: auto;
|
|
164
170
|
border-block-end: 0;
|
|
165
|
-
border-inline-end: 1px solid var(--ui-border-
|
|
171
|
+
border-inline-end: 1px solid var(--ui-border-divider);
|
|
166
172
|
}
|
|
167
173
|
|
|
168
|
-
:host-state([orientation="vertical"]) .list button
|
|
174
|
+
:host-state([orientation="vertical"]) .list button,
|
|
175
|
+
:host-state([orientation="vertical"]) .list > :slotted(button[slot="tab"]) {
|
|
169
176
|
margin: 0 -1px 0 0;
|
|
170
177
|
border-block-end: 0;
|
|
171
178
|
border-inline-end: 2px solid transparent;
|
|
172
179
|
text-align: start;
|
|
173
180
|
}
|
|
174
181
|
|
|
175
|
-
:host-state([orientation="vertical"]) .list button[aria-selected="true"]
|
|
182
|
+
:host-state([orientation="vertical"]) .list button[aria-selected="true"],
|
|
183
|
+
:host-state([orientation="vertical"]) .list > :slotted(button[slot="tab"][aria-selected="true"]) {
|
|
176
184
|
border-inline-end-color: var(--ui-accent-solid);
|
|
177
185
|
}
|
|
178
186
|
|
|
179
187
|
@media (prefers-reduced-motion: reduce) {
|
|
180
|
-
.list button
|
|
188
|
+
.list button,
|
|
189
|
+
.list > :slotted(button[slot="tab"]) {
|
|
181
190
|
transition: none;
|
|
182
191
|
}
|
|
183
192
|
}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
inline-size: 100%;
|
|
49
49
|
margin: 0;
|
|
50
50
|
padding: var(--ui-space-3) var(--ui-space-4);
|
|
51
|
-
border: 1px solid var(--ui-toast-border, var(--ui-overlay-border, var(--ui-border-
|
|
51
|
+
border: 1px solid var(--ui-toast-border, var(--ui-overlay-border, var(--ui-border-strong)));
|
|
52
52
|
border-inline-start: 3px solid var(--ui-toast-accent, var(--_ui-toast-accent));
|
|
53
53
|
border-radius: var(--ui-toast-radius, var(--ui-overlay-radius, var(--ui-radius-lg)));
|
|
54
54
|
background: var(--ui-toast-surface, var(--ui-overlay-surface, var(--ui-surface-elevated)));
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
grid-template-columns: 1fr auto;
|
|
121
121
|
gap: var(--ui-space-2);
|
|
122
122
|
align-items: start;
|
|
123
|
-
border: 1px solid var(--_ui-toast-region-border, var(--ui-overlay-border, var(--ui-border-
|
|
123
|
+
border: 1px solid var(--_ui-toast-region-border, var(--ui-overlay-border, var(--ui-border-strong)));
|
|
124
124
|
border-radius: var(--_ui-toast-region-radius, var(--ui-overlay-radius, var(--ui-radius-lg)));
|
|
125
125
|
padding: var(--ui-space-3) var(--ui-space-4);
|
|
126
126
|
background: var(--_ui-toast-region-surface, var(--ui-overlay-surface, var(--ui-surface-elevated)));
|