@threadlabs/looma 0.12.7 → 0.13.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-action-bar/ui-action-bar.html +10 -1
- package/components/ui-avatar/ui-avatar.html +18 -0
- package/components/ui-avatar-group/ui-avatar-group.html +24 -2
- package/components/ui-avatar-group/ui-avatar-group.js +3 -1
- package/components/ui-badge/ui-badge.html +42 -0
- package/components/ui-button/ui-button.html +70 -0
- package/components/ui-callout/ui-callout.html +55 -4
- package/components/ui-checkbox/ui-checkbox.html +15 -2
- package/components/ui-cluster/ui-cluster.html +7 -1
- package/components/ui-combobox/ui-combobox.html +64 -10
- package/components/ui-container/ui-container.html +12 -1
- package/components/ui-context-menu/ui-context-menu.html +10 -1
- package/components/ui-dialog/ui-dialog.html +21 -4
- package/components/ui-disclosure/ui-disclosure.html +22 -3
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +2 -2
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +2 -2
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +8 -8
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +3 -3
- package/components/ui-floating-action-button/ui-floating-action-button.html +14 -0
- package/components/ui-form-field/ui-form-field.html +10 -1
- package/components/ui-grid/ui-grid.html +11 -1
- package/components/ui-icon/ui-icon.html +17 -3
- package/components/ui-icon-button/ui-icon-button.html +81 -3
- package/components/ui-input/ui-input.html +67 -12
- package/components/ui-input-group/ui-input-group.html +14 -13
- package/components/ui-list/ui-list.html +10 -0
- package/components/ui-list-item/ui-list-item.html +22 -1
- package/components/ui-menu/ui-menu.html +17 -5
- package/components/ui-menu-item/ui-menu-item.html +30 -3
- package/components/ui-nav-item/ui-nav-item.html +14 -0
- package/components/ui-popover/ui-popover.html +6 -0
- package/components/ui-radio/ui-radio.html +15 -2
- package/components/ui-reel/ui-reel.html +15 -2
- package/components/ui-search-result-row/ui-search-result-row.html +34 -0
- package/components/ui-search-shell/ui-search-shell.html +65 -11
- package/components/ui-select/ui-select.html +14 -0
- package/components/ui-separator/ui-separator.html +9 -2
- package/components/ui-sidebar/ui-sidebar.html +22 -1
- package/components/ui-stack/ui-stack.html +7 -1
- package/components/ui-switch/ui-switch.html +20 -2
- package/components/ui-switcher/ui-switcher.html +18 -5
- package/components/ui-tabs/ui-tabs.html +21 -2
- package/components/ui-textarea/ui-textarea.html +14 -0
- package/components/ui-toast-region/ui-toast-region.html +16 -2
- package/components/ui-tooltip/ui-tooltip.html +62 -13
- package/components/ui-top-bar/ui-top-bar.html +34 -1
- package/components/ui-tree/ui-tree.html +27 -4
- package/components/ui-tree-item/ui-tree-item.html +39 -10
- package/components/ui-tree-item/ui-tree-item.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-action-bar.css +14 -3
- package/styles/ui-avatar-group.css +26 -4
- package/styles/ui-avatar.css +22 -2
- package/styles/ui-badge.css +46 -2
- package/styles/ui-button.css +74 -2
- package/styles/ui-callout.css +59 -6
- package/styles/ui-checkbox.css +19 -4
- package/styles/ui-cluster.css +10 -2
- package/styles/ui-combobox.css +67 -12
- package/styles/ui-container.css +14 -2
- package/styles/ui-context-menu.css +14 -3
- package/styles/ui-dialog.css +25 -6
- package/styles/ui-disclosure.css +26 -5
- package/styles/ui-editor-slash-menu.css +2 -2
- package/styles/ui-editor-table-context-menu.css +2 -2
- package/styles/ui-editor-table-overlay.css +8 -8
- package/styles/ui-editor-table-toolbar.css +3 -3
- package/styles/ui-floating-action-button.css +18 -2
- package/styles/ui-form-field.css +14 -3
- package/styles/ui-grid.css +14 -2
- package/styles/ui-icon-button.css +85 -5
- package/styles/ui-icon.css +21 -5
- package/styles/ui-input-group.css +14 -13
- package/styles/ui-input.css +72 -14
- package/styles/ui-list-item.css +26 -3
- package/styles/ui-list.css +14 -2
- package/styles/ui-menu-item.css +34 -5
- package/styles/ui-menu.css +21 -6
- package/styles/ui-nav-item.css +18 -2
- package/styles/ui-popover.css +10 -2
- package/styles/ui-radio.css +19 -4
- package/styles/ui-reel.css +18 -3
- package/styles/ui-search-result-row.css +38 -2
- package/styles/ui-search-shell.css +69 -13
- package/styles/ui-select.css +18 -2
- package/styles/ui-separator.css +14 -2
- package/styles/ui-sidebar.css +26 -3
- package/styles/ui-stack.css +10 -2
- package/styles/ui-switch.css +24 -4
- package/styles/ui-switcher.css +21 -6
- package/styles/ui-tabs.css +25 -4
- package/styles/ui-textarea.css +18 -2
- package/styles/ui-toast-region.css +20 -4
- package/styles/ui-tooltip.css +66 -15
- package/styles/ui-top-bar.css +38 -3
- package/styles/ui-tree-item.css +43 -12
- package/styles/ui-tree.css +33 -6
- package/vanilla/UiAvatarGroup.d.ts +1 -0
- package/vanilla/UiAvatarGroup.js +1 -1
- package/vue/UiActionBar.vue +12 -3
- package/vue/UiAvatar.vue +18 -0
- package/vue/UiAvatarGroup.d.ts +2 -0
- package/vue/UiAvatarGroup.vue +40 -4
- package/vue/UiBadge.vue +42 -0
- package/vue/UiButton.vue +70 -0
- package/vue/UiCallout.vue +55 -4
- package/vue/UiCheckbox.vue +15 -2
- package/vue/UiCluster.vue +6 -0
- package/vue/UiCombobox.vue +64 -10
- package/vue/UiContainer.vue +10 -0
- package/vue/UiContextMenu.vue +10 -1
- package/vue/UiDialog.vue +21 -4
- package/vue/UiDisclosure.vue +22 -3
- package/vue/UiEditorSlashMenu.vue +2 -2
- package/vue/UiEditorTableContextMenu.vue +2 -2
- package/vue/UiEditorTableOverlay.vue +8 -8
- package/vue/UiEditorTableToolbar.vue +3 -3
- package/vue/UiFloatingActionButton.vue +14 -0
- package/vue/UiFormField.vue +10 -1
- package/vue/UiGrid.vue +10 -0
- package/vue/UiIcon.vue +17 -3
- package/vue/UiIconButton.vue +81 -3
- package/vue/UiInput.vue +89 -14
- package/vue/UiInputGroup.vue +14 -13
- package/vue/UiList.vue +12 -2
- package/vue/UiListItem.vue +30 -9
- package/vue/UiMenu.vue +17 -5
- package/vue/UiMenuItem.vue +42 -4
- package/vue/UiNavItem.vue +17 -3
- package/vue/UiPopover.vue +6 -0
- package/vue/UiRadio.vue +15 -2
- package/vue/UiReel.vue +14 -1
- package/vue/UiSearchResultRow.vue +34 -0
- package/vue/UiSearchShell.vue +66 -12
- package/vue/UiSelect.vue +14 -0
- package/vue/UiSeparator.vue +9 -2
- package/vue/UiSidebar.vue +22 -1
- package/vue/UiStack.vue +6 -0
- package/vue/UiSwitch.vue +20 -2
- package/vue/UiSwitcher.vue +17 -4
- package/vue/UiTabs.vue +22 -3
- package/vue/UiTextarea.vue +14 -0
- package/vue/UiToastRegion.vue +16 -2
- package/vue/UiTooltip.vue +62 -13
- package/vue/UiTopBar.vue +34 -1
- package/vue/UiTree.vue +28 -5
- package/vue/UiTreeItem.vue +46 -11
- package/vue/chunks/UiActionBar.js +1 -1
- package/vue/chunks/UiAvatar.js +1 -1
- package/vue/chunks/UiAvatarGroup.js +8 -4
- package/vue/chunks/UiBadge.js +1 -1
- package/vue/chunks/UiButton.js +1 -1
- package/vue/chunks/UiCallout.js +1 -1
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiCluster.js +1 -1
- package/vue/chunks/UiCombobox.js +1 -1
- package/vue/chunks/UiContainer.js +1 -1
- package/vue/chunks/UiContextMenu.js +1 -1
- package/vue/chunks/UiDialog.js +1 -1
- package/vue/chunks/UiDisclosure.js +1 -1
- package/vue/chunks/UiEditorSlashMenu.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 +1 -1
- package/vue/chunks/UiIcon.js +1 -1
- package/vue/chunks/UiIconButton.js +1 -1
- package/vue/chunks/UiInput.js +1 -1
- package/vue/chunks/UiInputGroup.js +1 -1
- package/vue/chunks/UiList.js +1 -1
- package/vue/chunks/UiListItem.js +1 -1
- package/vue/chunks/UiMenu.js +1 -1
- package/vue/chunks/UiMenuItem.js +1 -1
- package/vue/chunks/UiNavItem.js +1 -1
- package/vue/chunks/UiPopover.js +1 -1
- package/vue/chunks/UiRadio.js +1 -1
- package/vue/chunks/UiReel.js +1 -1
- package/vue/chunks/UiSearchResultRow.js +1 -1
- package/vue/chunks/UiSearchShell.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/UiStack.js +1 -1
- package/vue/chunks/UiSwitch.js +1 -1
- package/vue/chunks/UiSwitcher.js +1 -1
- package/vue/chunks/UiTabs.js +1 -1
- package/vue/chunks/UiTextarea.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 +1934 -897
|
@@ -9,10 +9,19 @@
|
|
|
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
|
+
|
|
12
18
|
/* The action row of a form or dialog. Tertiary actions (Back, Cancel, Discard) sit at the start
|
|
13
19
|
edge; secondary actions (Save as draft, Preview) sit just before the primary one, which ends the
|
|
14
20
|
row. The bar arranges its actions and leaves their look to them. */
|
|
15
21
|
:host {
|
|
22
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
23
|
+
--_ui-action-bar-gap: var(--ui-action-bar-gap);
|
|
24
|
+
|
|
16
25
|
--_gap: var(--ui-space-2);
|
|
17
26
|
display: block;
|
|
18
27
|
/* A size container sizes itself from its container, never its content. */
|
|
@@ -28,7 +37,7 @@
|
|
|
28
37
|
display: flex;
|
|
29
38
|
flex-wrap: wrap;
|
|
30
39
|
align-items: center;
|
|
31
|
-
gap: var(--
|
|
40
|
+
gap: var(--_ui-action-bar-gap, var(--_gap));
|
|
32
41
|
}
|
|
33
42
|
|
|
34
43
|
/* The tertiary group takes the spare space, pushing the rest to the end edge; without it, the
|
|
@@ -27,6 +27,24 @@
|
|
|
27
27
|
<span class="fallback" :aria-hidden="hasImage" :hidden="hasImage" $value="initials"></span>
|
|
28
28
|
</span>
|
|
29
29
|
<style>
|
|
30
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
31
|
+
@property --ui-avatar-border {
|
|
32
|
+
syntax: "*";
|
|
33
|
+
inherits: false;
|
|
34
|
+
}
|
|
35
|
+
@property --ui-avatar-surface {
|
|
36
|
+
syntax: "*";
|
|
37
|
+
inherits: false;
|
|
38
|
+
}
|
|
39
|
+
@property --ui-avatar-text {
|
|
40
|
+
syntax: "*";
|
|
41
|
+
inherits: false;
|
|
42
|
+
}
|
|
43
|
+
@property --ui-avatar-active-ring {
|
|
44
|
+
syntax: "*";
|
|
45
|
+
inherits: false;
|
|
46
|
+
}
|
|
47
|
+
|
|
30
48
|
:host {
|
|
31
49
|
display: inline-grid;
|
|
32
50
|
place-items: center;
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
the badge.</prop>
|
|
6
6
|
<prop name="label" type="string" default="People"
|
|
7
7
|
>The group's accessible name, announced for the set of avatars as a whole. Name who they are rather than repeating the default.</prop>
|
|
8
|
+
<prop name="size" type="sm | md" default="md"
|
|
9
|
+
>The size of the avatars inside, matched by the +N badge and the overlap. Give each Avatar the same size.</prop>
|
|
8
10
|
<state name="overflowCount" :value="0"></state>
|
|
9
11
|
</defs>
|
|
10
12
|
<div role="group" :aria-label="label">
|
|
@@ -14,7 +16,21 @@
|
|
|
14
16
|
></template></span>
|
|
15
17
|
</div>
|
|
16
18
|
<style>
|
|
19
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
20
|
+
@property --ui-avatar-group-edge-ring {
|
|
21
|
+
syntax: "*";
|
|
22
|
+
inherits: false;
|
|
23
|
+
}
|
|
24
|
+
@property --ui-avatar-group-overlap-shadow {
|
|
25
|
+
syntax: "*";
|
|
26
|
+
inherits: false;
|
|
27
|
+
}
|
|
28
|
+
|
|
17
29
|
:host {
|
|
30
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
31
|
+
--_ui-avatar-group-overlap-shadow: var(--ui-avatar-group-overlap-shadow);
|
|
32
|
+
--_ui-avatar-group-edge-ring: var(--ui-avatar-group-edge-ring);
|
|
33
|
+
|
|
18
34
|
/* Each avatar is ringed in the surface colour, so where one overlaps the next it reads as a
|
|
19
35
|
* whole circle set on top, not a shape cut into the one beneath. */
|
|
20
36
|
--_overlap-shadow: 0 0 0 0 transparent;
|
|
@@ -50,14 +66,20 @@
|
|
|
50
66
|
background: var(--ui-surface-elevated);
|
|
51
67
|
color: var(--ui-text-primary);
|
|
52
68
|
box-shadow:
|
|
53
|
-
var(--
|
|
54
|
-
var(--
|
|
69
|
+
var(--_ui-avatar-group-overlap-shadow, var(--_overlap-shadow)),
|
|
70
|
+
var(--_ui-avatar-group-edge-ring, var(--_edge-ring));
|
|
55
71
|
font: inherit;
|
|
56
72
|
font-size: var(--ui-font-size-xs);
|
|
57
73
|
font-weight: 600;
|
|
58
74
|
flex-shrink: 0;
|
|
59
75
|
}
|
|
60
76
|
|
|
77
|
+
:host-state([size="sm"]) .overflow {
|
|
78
|
+
margin-inline-start: -0.25rem;
|
|
79
|
+
inline-size: 1.75rem;
|
|
80
|
+
block-size: 1.75rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
61
83
|
.overflow[hidden] {
|
|
62
84
|
display: none;
|
|
63
85
|
}
|
|
@@ -6,9 +6,11 @@ export default function controller(host) {
|
|
|
6
6
|
const max = Number(host.state.max);
|
|
7
7
|
const visible = Number.isFinite(max) ? Math.max(0, Math.floor(max)) : 0;
|
|
8
8
|
const avatars = Array.from(element.children).filter((child) => child !== host.refs.overflow);
|
|
9
|
+
// Small avatars overlap less, so their initials stay clear of the next one.
|
|
10
|
+
const overlap = host.state.size === "sm" ? "-0.25rem" : "-0.5rem";
|
|
9
11
|
avatars.forEach((avatar, index) => {
|
|
10
12
|
avatar.style.display = index >= visible ? "none" : "";
|
|
11
|
-
avatar.style.marginInlineStart = index === 0 ? "0px" :
|
|
13
|
+
avatar.style.marginInlineStart = index === 0 ? "0px" : overlap;
|
|
12
14
|
avatar.style.borderRadius = "999px";
|
|
13
15
|
// Later avatars cast a crisp shadow back onto the one they overlap; the first overlaps nothing.
|
|
14
16
|
avatar.style.boxShadow = index === 0
|
|
@@ -11,6 +11,48 @@
|
|
|
11
11
|
</defs>
|
|
12
12
|
<span><slot></slot></span>
|
|
13
13
|
<style>
|
|
14
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
15
|
+
@property --ui-badge-border {
|
|
16
|
+
syntax: "*";
|
|
17
|
+
inherits: false;
|
|
18
|
+
}
|
|
19
|
+
@property --ui-badge-font-size {
|
|
20
|
+
syntax: "*";
|
|
21
|
+
inherits: false;
|
|
22
|
+
}
|
|
23
|
+
@property --ui-badge-font-weight {
|
|
24
|
+
syntax: "*";
|
|
25
|
+
inherits: false;
|
|
26
|
+
}
|
|
27
|
+
@property --ui-badge-line-height {
|
|
28
|
+
syntax: "*";
|
|
29
|
+
inherits: false;
|
|
30
|
+
}
|
|
31
|
+
@property --ui-badge-min-block-size {
|
|
32
|
+
syntax: "*";
|
|
33
|
+
inherits: false;
|
|
34
|
+
}
|
|
35
|
+
@property --ui-badge-padding-block {
|
|
36
|
+
syntax: "*";
|
|
37
|
+
inherits: false;
|
|
38
|
+
}
|
|
39
|
+
@property --ui-badge-padding-inline {
|
|
40
|
+
syntax: "*";
|
|
41
|
+
inherits: false;
|
|
42
|
+
}
|
|
43
|
+
@property --ui-badge-point {
|
|
44
|
+
syntax: "*";
|
|
45
|
+
inherits: false;
|
|
46
|
+
}
|
|
47
|
+
@property --ui-badge-surface {
|
|
48
|
+
syntax: "*";
|
|
49
|
+
inherits: false;
|
|
50
|
+
}
|
|
51
|
+
@property --ui-badge-text {
|
|
52
|
+
syntax: "*";
|
|
53
|
+
inherits: false;
|
|
54
|
+
}
|
|
55
|
+
|
|
14
56
|
:host {
|
|
15
57
|
--_badge-surface: var(--ui-surface-subtle);
|
|
16
58
|
--_badge-text: var(--ui-text-secondary);
|
|
@@ -38,6 +38,76 @@
|
|
|
38
38
|
<slot></slot>
|
|
39
39
|
</button>
|
|
40
40
|
<style>
|
|
41
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
42
|
+
@property --ui-button-active-surface {
|
|
43
|
+
syntax: "*";
|
|
44
|
+
inherits: false;
|
|
45
|
+
}
|
|
46
|
+
@property --ui-button-border {
|
|
47
|
+
syntax: "*";
|
|
48
|
+
inherits: false;
|
|
49
|
+
}
|
|
50
|
+
@property --ui-button-disabled-filter {
|
|
51
|
+
syntax: "*";
|
|
52
|
+
inherits: false;
|
|
53
|
+
}
|
|
54
|
+
@property --ui-button-disabled-opacity {
|
|
55
|
+
syntax: "*";
|
|
56
|
+
inherits: false;
|
|
57
|
+
}
|
|
58
|
+
@property --ui-button-ghost-active-surface {
|
|
59
|
+
syntax: "*";
|
|
60
|
+
inherits: false;
|
|
61
|
+
}
|
|
62
|
+
@property --ui-button-ghost-hover-surface {
|
|
63
|
+
syntax: "*";
|
|
64
|
+
inherits: false;
|
|
65
|
+
}
|
|
66
|
+
@property --ui-button-ghost-text {
|
|
67
|
+
syntax: "*";
|
|
68
|
+
inherits: false;
|
|
69
|
+
}
|
|
70
|
+
@property --ui-button-hover-border {
|
|
71
|
+
syntax: "*";
|
|
72
|
+
inherits: false;
|
|
73
|
+
}
|
|
74
|
+
@property --ui-button-hover-surface {
|
|
75
|
+
syntax: "*";
|
|
76
|
+
inherits: false;
|
|
77
|
+
}
|
|
78
|
+
@property --ui-button-link-hover-text {
|
|
79
|
+
syntax: "*";
|
|
80
|
+
inherits: false;
|
|
81
|
+
}
|
|
82
|
+
@property --ui-button-link-text {
|
|
83
|
+
syntax: "*";
|
|
84
|
+
inherits: false;
|
|
85
|
+
}
|
|
86
|
+
@property --ui-button-min-block-size {
|
|
87
|
+
syntax: "*";
|
|
88
|
+
inherits: false;
|
|
89
|
+
}
|
|
90
|
+
@property --ui-button-radius {
|
|
91
|
+
syntax: "*";
|
|
92
|
+
inherits: false;
|
|
93
|
+
}
|
|
94
|
+
@property --ui-button-shadow {
|
|
95
|
+
syntax: "*";
|
|
96
|
+
inherits: false;
|
|
97
|
+
}
|
|
98
|
+
@property --ui-button-solid-shadow {
|
|
99
|
+
syntax: "*";
|
|
100
|
+
inherits: false;
|
|
101
|
+
}
|
|
102
|
+
@property --ui-button-surface {
|
|
103
|
+
syntax: "*";
|
|
104
|
+
inherits: false;
|
|
105
|
+
}
|
|
106
|
+
@property --ui-button-text {
|
|
107
|
+
syntax: "*";
|
|
108
|
+
inherits: false;
|
|
109
|
+
}
|
|
110
|
+
|
|
41
111
|
:host {
|
|
42
112
|
--_hue: var(--ui-accent);
|
|
43
113
|
--_hue-hover: var(--ui-accent-hover);
|
|
@@ -34,7 +34,58 @@
|
|
|
34
34
|
<div class="content"><slot></slot></div>
|
|
35
35
|
</div>
|
|
36
36
|
<style>
|
|
37
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
38
|
+
@property --ui-callout-border {
|
|
39
|
+
syntax: "*";
|
|
40
|
+
inherits: false;
|
|
41
|
+
}
|
|
42
|
+
@property --ui-callout-border-width {
|
|
43
|
+
syntax: "*";
|
|
44
|
+
inherits: false;
|
|
45
|
+
}
|
|
46
|
+
@property --ui-callout-gap {
|
|
47
|
+
syntax: "*";
|
|
48
|
+
inherits: false;
|
|
49
|
+
}
|
|
50
|
+
@property --ui-callout-icon {
|
|
51
|
+
syntax: "*";
|
|
52
|
+
inherits: false;
|
|
53
|
+
}
|
|
54
|
+
@property --ui-callout-icon-column {
|
|
55
|
+
syntax: "*";
|
|
56
|
+
inherits: false;
|
|
57
|
+
}
|
|
58
|
+
@property --ui-callout-icon-size {
|
|
59
|
+
syntax: "*";
|
|
60
|
+
inherits: false;
|
|
61
|
+
}
|
|
62
|
+
@property --ui-callout-leading-border-width {
|
|
63
|
+
syntax: "*";
|
|
64
|
+
inherits: false;
|
|
65
|
+
}
|
|
66
|
+
@property --ui-callout-padding-block {
|
|
67
|
+
syntax: "*";
|
|
68
|
+
inherits: false;
|
|
69
|
+
}
|
|
70
|
+
@property --ui-callout-padding-inline {
|
|
71
|
+
syntax: "*";
|
|
72
|
+
inherits: false;
|
|
73
|
+
}
|
|
74
|
+
@property --ui-callout-surface {
|
|
75
|
+
syntax: "*";
|
|
76
|
+
inherits: false;
|
|
77
|
+
}
|
|
78
|
+
@property --ui-callout-text {
|
|
79
|
+
syntax: "*";
|
|
80
|
+
inherits: false;
|
|
81
|
+
}
|
|
82
|
+
|
|
37
83
|
:host {
|
|
84
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
85
|
+
--_ui-callout-icon-column: var(--ui-callout-icon-column);
|
|
86
|
+
--_ui-callout-icon: var(--ui-callout-icon);
|
|
87
|
+
--_ui-callout-icon-size: var(--ui-callout-icon-size);
|
|
88
|
+
|
|
38
89
|
--_callout-surface: var(--ui-info-soft);
|
|
39
90
|
--_callout-border: var(--ui-info-solid);
|
|
40
91
|
--_callout-icon: var(--ui-info-solid);
|
|
@@ -60,14 +111,14 @@
|
|
|
60
111
|
.icon {
|
|
61
112
|
display: grid;
|
|
62
113
|
place-items: center;
|
|
63
|
-
inline-size: var(--
|
|
114
|
+
inline-size: var(--_ui-callout-icon-column, 1.125rem);
|
|
64
115
|
block-size: 1lh;
|
|
65
|
-
color: var(--
|
|
116
|
+
color: var(--_ui-callout-icon, var(--_callout-icon));
|
|
66
117
|
}
|
|
67
118
|
|
|
68
119
|
.icon svg {
|
|
69
|
-
inline-size: var(--
|
|
70
|
-
block-size: var(--
|
|
120
|
+
inline-size: var(--_ui-callout-icon-size, 1.125rem);
|
|
121
|
+
block-size: var(--_ui-callout-icon-size, 1.125rem);
|
|
71
122
|
}
|
|
72
123
|
|
|
73
124
|
.content {
|
|
@@ -34,7 +34,20 @@
|
|
|
34
34
|
</span>
|
|
35
35
|
</label>
|
|
36
36
|
<style>
|
|
37
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
38
|
+
@property --ui-checkbox-gap {
|
|
39
|
+
syntax: "*";
|
|
40
|
+
inherits: false;
|
|
41
|
+
}
|
|
42
|
+
@property --ui-checkbox-size {
|
|
43
|
+
syntax: "*";
|
|
44
|
+
inherits: false;
|
|
45
|
+
}
|
|
46
|
+
|
|
37
47
|
:host {
|
|
48
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
49
|
+
--_ui-checkbox-size: var(--ui-checkbox-size);
|
|
50
|
+
|
|
38
51
|
display: inline-flex;
|
|
39
52
|
align-items: flex-start;
|
|
40
53
|
gap: var(--ui-checkbox-gap, var(--ui-space-2));
|
|
@@ -71,8 +84,8 @@
|
|
|
71
84
|
-webkit-appearance: none;
|
|
72
85
|
position: relative;
|
|
73
86
|
flex: 0 0 auto;
|
|
74
|
-
inline-size: var(--
|
|
75
|
-
block-size: var(--
|
|
87
|
+
inline-size: var(--_ui-checkbox-size, 1.125rem);
|
|
88
|
+
block-size: var(--_ui-checkbox-size, 1.125rem);
|
|
76
89
|
margin: 0.125em 0 0;
|
|
77
90
|
border: 1px solid var(--ui-control-border-hover, var(--ui-border-strong));
|
|
78
91
|
border-radius: var(--ui-radius-sm);
|
|
@@ -2,13 +2,19 @@
|
|
|
2
2
|
<defs>
|
|
3
3
|
<prop name="gap" type="xs | s | m | l | xl"
|
|
4
4
|
>Space between items, on the spacing scale: xs is 0.5rem, s 0.75rem (also the default), m 1rem, l 1.5rem, and xl 2rem. The --ui-cluster-gap custom property,
|
|
5
|
-
|
|
5
|
+
set on the cluster itself, overrides it; set on an ancestor, it does nothing.</prop>
|
|
6
6
|
<prop name="align" type="start | center | end | stretch"
|
|
7
7
|
>How items line up within each row: center (the default) aligns their middles, start their tops, end their bottoms, and stretch makes every item as tall as
|
|
8
8
|
its row.</prop>
|
|
9
9
|
</defs>
|
|
10
10
|
<div><slot></slot></div>
|
|
11
11
|
<style>
|
|
12
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
13
|
+
@property --ui-cluster-gap {
|
|
14
|
+
syntax: "*";
|
|
15
|
+
inherits: false;
|
|
16
|
+
}
|
|
17
|
+
|
|
12
18
|
:host {
|
|
13
19
|
--_layout-gap: var(--ui-space-3);
|
|
14
20
|
display: flex;
|
|
@@ -239,7 +239,61 @@
|
|
|
239
239
|
<div class="authored-options" $ref="options" hidden aria-hidden="true"><slot></slot></div>
|
|
240
240
|
</div>
|
|
241
241
|
<style>
|
|
242
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
243
|
+
@property --ui-combobox-affordance-text {
|
|
244
|
+
syntax: "*";
|
|
245
|
+
inherits: false;
|
|
246
|
+
}
|
|
247
|
+
@property --ui-combobox-item-input-min-inline-size {
|
|
248
|
+
syntax: "*";
|
|
249
|
+
inherits: false;
|
|
250
|
+
}
|
|
251
|
+
@property --ui-combobox-item-item-max-inline-size {
|
|
252
|
+
syntax: "*";
|
|
253
|
+
inherits: false;
|
|
254
|
+
}
|
|
255
|
+
@property --ui-combobox-item-min-block-size {
|
|
256
|
+
syntax: "*";
|
|
257
|
+
inherits: false;
|
|
258
|
+
}
|
|
259
|
+
@property --ui-combobox-label-font-size {
|
|
260
|
+
syntax: "*";
|
|
261
|
+
inherits: false;
|
|
262
|
+
}
|
|
263
|
+
@property --ui-combobox-label-text {
|
|
264
|
+
syntax: "*";
|
|
265
|
+
inherits: false;
|
|
266
|
+
}
|
|
267
|
+
@property --ui-combobox-max-block-size {
|
|
268
|
+
syntax: "*";
|
|
269
|
+
inherits: false;
|
|
270
|
+
}
|
|
271
|
+
@property --ui-combobox-message-text {
|
|
272
|
+
syntax: "*";
|
|
273
|
+
inherits: false;
|
|
274
|
+
}
|
|
275
|
+
@property --ui-combobox-option-check {
|
|
276
|
+
syntax: "*";
|
|
277
|
+
inherits: false;
|
|
278
|
+
}
|
|
279
|
+
@property --ui-combobox-option-text {
|
|
280
|
+
syntax: "*";
|
|
281
|
+
inherits: false;
|
|
282
|
+
}
|
|
283
|
+
|
|
242
284
|
:host {
|
|
285
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
286
|
+
--_ui-combobox-label-text: var(--ui-combobox-label-text);
|
|
287
|
+
--_ui-combobox-label-font-size: var(--ui-combobox-label-font-size);
|
|
288
|
+
--_ui-combobox-affordance-text: var(--ui-combobox-affordance-text);
|
|
289
|
+
--_ui-combobox-max-block-size: var(--ui-combobox-max-block-size);
|
|
290
|
+
--_ui-combobox-option-text: var(--ui-combobox-option-text);
|
|
291
|
+
--_ui-combobox-message-text: var(--ui-combobox-message-text);
|
|
292
|
+
--_ui-combobox-option-check: var(--ui-combobox-option-check);
|
|
293
|
+
--_ui-combobox-item-min-block-size: var(--ui-combobox-item-min-block-size);
|
|
294
|
+
--_ui-combobox-item-input-min-inline-size: var(--ui-combobox-item-input-min-inline-size);
|
|
295
|
+
--_ui-combobox-item-item-max-inline-size: var(--ui-combobox-item-item-max-inline-size);
|
|
296
|
+
|
|
243
297
|
display: grid;
|
|
244
298
|
gap: var(--ui-space-1);
|
|
245
299
|
min-inline-size: 0;
|
|
@@ -247,8 +301,8 @@
|
|
|
247
301
|
font: inherit;
|
|
248
302
|
}
|
|
249
303
|
label {
|
|
250
|
-
color: var(--
|
|
251
|
-
font-size: var(--
|
|
304
|
+
color: var(--_ui-combobox-label-text, var(--ui-text-primary));
|
|
305
|
+
font-size: var(--_ui-combobox-label-font-size, var(--ui-font-size-sm));
|
|
252
306
|
font-weight: 500;
|
|
253
307
|
}
|
|
254
308
|
/* The field and anything that annotates it sit on one row; the help button is beside the box,
|
|
@@ -346,7 +400,7 @@
|
|
|
346
400
|
border: 0;
|
|
347
401
|
border-radius: var(--ui-radius-md);
|
|
348
402
|
background: transparent;
|
|
349
|
-
color: var(--
|
|
403
|
+
color: var(--_ui-combobox-affordance-text, var(--ui-text-secondary));
|
|
350
404
|
font: inherit;
|
|
351
405
|
font-weight: 400;
|
|
352
406
|
min-inline-size: 2rem;
|
|
@@ -381,7 +435,7 @@
|
|
|
381
435
|
box-sizing: border-box;
|
|
382
436
|
min-inline-size: 12rem;
|
|
383
437
|
max-inline-size: calc(100vw - 1rem);
|
|
384
|
-
max-block-size: var(--
|
|
438
|
+
max-block-size: var(--_ui-combobox-max-block-size, 18rem);
|
|
385
439
|
overflow: auto;
|
|
386
440
|
margin: 0;
|
|
387
441
|
padding: var(--ui-space-1);
|
|
@@ -411,11 +465,11 @@
|
|
|
411
465
|
}
|
|
412
466
|
.primary {
|
|
413
467
|
display: block;
|
|
414
|
-
color: var(--
|
|
468
|
+
color: var(--_ui-combobox-option-text, var(--ui-text-primary));
|
|
415
469
|
font-weight: 500;
|
|
416
470
|
}
|
|
417
471
|
.message, .group {
|
|
418
|
-
color: var(--
|
|
472
|
+
color: var(--_ui-combobox-message-text, var(--ui-text-secondary));
|
|
419
473
|
font-weight: 400;
|
|
420
474
|
font-size: var(--ui-font-size-sm);
|
|
421
475
|
line-height: var(--ui-line-height-md);
|
|
@@ -475,7 +529,7 @@
|
|
|
475
529
|
border-color: var(--ui-accent-solid);
|
|
476
530
|
background-color: var(--ui-accent-solid);
|
|
477
531
|
background-image: var(
|
|
478
|
-
--
|
|
532
|
+
--_ui-combobox-option-check,
|
|
479
533
|
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-9'/%3E%3C/svg%3E")
|
|
480
534
|
);
|
|
481
535
|
}
|
|
@@ -485,11 +539,11 @@
|
|
|
485
539
|
flex-wrap: wrap;
|
|
486
540
|
align-items: center;
|
|
487
541
|
gap: var(--ui-space-1);
|
|
488
|
-
min-block-size: var(--
|
|
542
|
+
min-block-size: var(--_ui-combobox-item-min-block-size, 2.5rem);
|
|
489
543
|
padding: var(--ui-space-1);
|
|
490
544
|
}
|
|
491
545
|
:host-state([multiple]) input {
|
|
492
|
-
flex: 1 0 var(--
|
|
546
|
+
flex: 1 0 var(--_ui-combobox-item-input-min-inline-size, 5rem);
|
|
493
547
|
width: auto;
|
|
494
548
|
min-block-size: 1.75rem;
|
|
495
549
|
padding: var(--ui-space-0-5) var(--ui-space-1);
|
|
@@ -498,7 +552,7 @@
|
|
|
498
552
|
appearance: none;
|
|
499
553
|
display: inline-flex;
|
|
500
554
|
min-inline-size: 0;
|
|
501
|
-
max-inline-size: min(100%, var(--
|
|
555
|
+
max-inline-size: min(100%, var(--_ui-combobox-item-item-max-inline-size, 12rem));
|
|
502
556
|
overflow: hidden;
|
|
503
557
|
padding: 0;
|
|
504
558
|
border: 0;
|
|
@@ -2,12 +2,23 @@
|
|
|
2
2
|
<defs>
|
|
3
3
|
<prop name="measure" type="narrow | wide"
|
|
4
4
|
>The container's maximum width, in characters of the current font: narrow is 45ch, wide is 80ch, and unset is 65ch, a comfortable reading line. The
|
|
5
|
-
container centres itself when its parent is wider. The --ui-container-measure custom property,
|
|
5
|
+
container centres itself when its parent is wider. The --ui-container-measure custom property, set on the container itself, overrides it; set on an
|
|
6
|
+
ancestor, it does nothing.</prop>
|
|
6
7
|
<prop name="gutters" type="s | m | l"
|
|
7
8
|
>Inline padding on both sides, which keeps content off the edges of a narrow screen: s is 0.75rem, m is 1rem (also the default), and l is 1.5rem.</prop>
|
|
8
9
|
</defs>
|
|
9
10
|
<div><slot></slot></div>
|
|
10
11
|
<style>
|
|
12
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
13
|
+
@property --ui-container-gutters {
|
|
14
|
+
syntax: "*";
|
|
15
|
+
inherits: false;
|
|
16
|
+
}
|
|
17
|
+
@property --ui-container-measure {
|
|
18
|
+
syntax: "*";
|
|
19
|
+
inherits: false;
|
|
20
|
+
}
|
|
21
|
+
|
|
11
22
|
:host {
|
|
12
23
|
--_container-measure: 65ch;
|
|
13
24
|
--_container-gutters: var(--ui-space-4);
|
|
@@ -15,7 +15,16 @@
|
|
|
15
15
|
</defs>
|
|
16
16
|
<span><div class="menu" $ref="menu" role="menu" aria-orientation="vertical"><slot></slot></div></span>
|
|
17
17
|
<style>
|
|
18
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
19
|
+
@property --ui-context-menu-z-index {
|
|
20
|
+
syntax: "*";
|
|
21
|
+
inherits: false;
|
|
22
|
+
}
|
|
23
|
+
|
|
18
24
|
:host {
|
|
25
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
26
|
+
--_ui-context-menu-z-index: var(--ui-context-menu-z-index);
|
|
27
|
+
|
|
19
28
|
display: contents;
|
|
20
29
|
}
|
|
21
30
|
|
|
@@ -33,7 +42,7 @@
|
|
|
33
42
|
box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
|
|
34
43
|
outline: 0;
|
|
35
44
|
overflow: auto;
|
|
36
|
-
z-index: var(--
|
|
45
|
+
z-index: var(--_ui-context-menu-z-index, 1000);
|
|
37
46
|
min-width: 12rem;
|
|
38
47
|
opacity: 0;
|
|
39
48
|
transform: translateY(-4px) scale(0.99);
|
|
@@ -22,7 +22,24 @@
|
|
|
22
22
|
<footer><slot name="actions"></slot></footer>
|
|
23
23
|
</dialog>
|
|
24
24
|
<style>
|
|
25
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
26
|
+
@property --ui-dialog-duration {
|
|
27
|
+
syntax: "*";
|
|
28
|
+
inherits: false;
|
|
29
|
+
}
|
|
30
|
+
@property --ui-dialog-max-width {
|
|
31
|
+
syntax: "*";
|
|
32
|
+
inherits: false;
|
|
33
|
+
}
|
|
34
|
+
@property --ui-dialog-viewport-gap {
|
|
35
|
+
syntax: "*";
|
|
36
|
+
inherits: false;
|
|
37
|
+
}
|
|
38
|
+
|
|
25
39
|
:host {
|
|
40
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
41
|
+
--_ui-dialog-duration: var(--ui-dialog-duration);
|
|
42
|
+
|
|
26
43
|
position: fixed;
|
|
27
44
|
inset: 0;
|
|
28
45
|
box-sizing: border-box;
|
|
@@ -189,14 +206,14 @@
|
|
|
189
206
|
:host::backdrop {
|
|
190
207
|
background-color: transparent;
|
|
191
208
|
transition:
|
|
192
|
-
background-color var(--
|
|
193
|
-
display var(--
|
|
194
|
-
overlay var(--
|
|
209
|
+
background-color var(--_ui-dialog-duration, var(--ui-motion-base)) var(--ui-motion-ease),
|
|
210
|
+
display var(--_ui-dialog-duration, var(--ui-motion-base)) var(--ui-motion-ease) allow-discrete,
|
|
211
|
+
overlay var(--_ui-dialog-duration, var(--ui-motion-base)) var(--ui-motion-ease) allow-discrete;
|
|
195
212
|
}
|
|
196
213
|
|
|
197
214
|
:host[open]::backdrop {
|
|
198
215
|
background-color: var(--ui-overlay-backdrop);
|
|
199
|
-
animation: ui-dialog-backdrop-enter var(--
|
|
216
|
+
animation: ui-dialog-backdrop-enter var(--_ui-dialog-duration, var(--ui-motion-base)) var(--ui-motion-ease);
|
|
200
217
|
}
|
|
201
218
|
|
|
202
219
|
@keyframes ui-dialog-backdrop-enter {
|
|
@@ -26,8 +26,27 @@
|
|
|
26
26
|
<div class="panel" :id="contentId" :inert="not internalOpen"><div class="panel-inner"><slot></slot></div></div>
|
|
27
27
|
</div>
|
|
28
28
|
<style>
|
|
29
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
30
|
+
@property --ui-disclosure-trigger-min-block-size {
|
|
31
|
+
syntax: "*";
|
|
32
|
+
inherits: false;
|
|
33
|
+
}
|
|
34
|
+
@property --ui-disclosure-trigger-padding-block {
|
|
35
|
+
syntax: "*";
|
|
36
|
+
inherits: false;
|
|
37
|
+
}
|
|
38
|
+
@property --ui-disclosure-trigger-padding-inline {
|
|
39
|
+
syntax: "*";
|
|
40
|
+
inherits: false;
|
|
41
|
+
}
|
|
42
|
+
|
|
29
43
|
/* Density resolves into the summary row's own values; the public tokens still override them. */
|
|
30
44
|
:host {
|
|
45
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
46
|
+
--_ui-disclosure-trigger-min-block-size: var(--ui-disclosure-trigger-min-block-size);
|
|
47
|
+
--_ui-disclosure-trigger-padding-block: var(--ui-disclosure-trigger-padding-block);
|
|
48
|
+
--_ui-disclosure-trigger-padding-inline: var(--ui-disclosure-trigger-padding-inline);
|
|
49
|
+
|
|
31
50
|
--_trigger-min-block-size: var(--ui-control-size);
|
|
32
51
|
--_trigger-padding-block: var(--ui-space-2);
|
|
33
52
|
--_trigger-padding-inline: var(--ui-space-3);
|
|
@@ -55,9 +74,9 @@
|
|
|
55
74
|
gap: var(--ui-space-3);
|
|
56
75
|
align-items: center;
|
|
57
76
|
inline-size: 100%;
|
|
58
|
-
min-block-size: var(--
|
|
59
|
-
padding: var(--
|
|
60
|
-
var(--
|
|
77
|
+
min-block-size: var(--_ui-disclosure-trigger-min-block-size, var(--_trigger-min-block-size));
|
|
78
|
+
padding: var(--_ui-disclosure-trigger-padding-block, var(--_trigger-padding-block))
|
|
79
|
+
var(--_ui-disclosure-trigger-padding-inline, var(--_trigger-padding-inline));
|
|
61
80
|
border: 0;
|
|
62
81
|
background: transparent;
|
|
63
82
|
color: inherit;
|
|
@@ -154,8 +154,8 @@
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
.icon {
|
|
157
|
-
--
|
|
158
|
-
--
|
|
157
|
+
--_ui-default-icon-size: 1rem;
|
|
158
|
+
--_ui-default-icon-stroke-width: var(--ui-editor-toolbar-icon-stroke-width, 1.75);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
.body {
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
:host button {
|
|
94
|
-
--
|
|
95
|
-
--
|
|
94
|
+
--_ui-default-icon-size: 1rem;
|
|
95
|
+
--_ui-default-icon-stroke-width: var(--ui-editor-toolbar-icon-stroke-width, 1.75);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
:host button:hover:not(:disabled) {
|