@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
package/styles/ui-switch.css
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
/* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
|
|
2
|
+
@property --ui-switch-gap {
|
|
3
|
+
syntax: "*";
|
|
4
|
+
inherits: false;
|
|
5
|
+
}
|
|
6
|
+
@property --ui-switch-track-height {
|
|
7
|
+
syntax: "*";
|
|
8
|
+
inherits: false;
|
|
9
|
+
}
|
|
10
|
+
@property --ui-switch-track-width {
|
|
11
|
+
syntax: "*";
|
|
12
|
+
inherits: false;
|
|
13
|
+
}
|
|
2
14
|
@scope ([data-component~="ui-switch"]) to ([data-component], [data-slotted]) {
|
|
3
|
-
|
|
15
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
16
|
+
|
|
17
|
+
:scope {
|
|
18
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
19
|
+
--_ui-switch-track-width: var(--ui-switch-track-width);
|
|
20
|
+
--_ui-switch-track-height: var(--ui-switch-track-height);
|
|
21
|
+
|
|
4
22
|
display: inline-flex;
|
|
5
23
|
align-items: flex-start;
|
|
6
24
|
gap: var(--ui-switch-gap, var(--ui-space-2));
|
|
@@ -37,8 +55,8 @@
|
|
|
37
55
|
-webkit-appearance: none;
|
|
38
56
|
position: relative;
|
|
39
57
|
flex: 0 0 auto;
|
|
40
|
-
width: var(--
|
|
41
|
-
height: var(--
|
|
58
|
+
width: var(--_ui-switch-track-width, 2.5rem);
|
|
59
|
+
height: var(--_ui-switch-track-height, 1.5rem);
|
|
42
60
|
padding: 0;
|
|
43
61
|
border: 1px solid var(--ui-control-border-hover, var(--ui-border-strong));
|
|
44
62
|
border-radius: 999px;
|
|
@@ -99,7 +117,9 @@
|
|
|
99
117
|
}
|
|
100
118
|
}
|
|
101
119
|
@scope ([data-component~="ui-switch"]) to ([data-component]) {
|
|
102
|
-
/*
|
|
120
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
121
|
+
|
|
122
|
+
/* The label, and under it an optional line saying what the choice means. */
|
|
103
123
|
|
|
104
124
|
@media (prefers-reduced-motion: reduce) {
|
|
105
125
|
}
|
package/styles/ui-switcher.css
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
/* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
|
|
2
|
+
@property --ui-switcher-gap {
|
|
3
|
+
syntax: "*";
|
|
4
|
+
inherits: false;
|
|
5
|
+
}
|
|
6
|
+
@property --ui-switcher-threshold {
|
|
7
|
+
syntax: "*";
|
|
8
|
+
inherits: false;
|
|
9
|
+
}
|
|
2
10
|
@scope ([data-component~="ui-switcher"]) to ([data-component], [data-slotted]) {
|
|
3
|
-
|
|
11
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
12
|
+
|
|
13
|
+
:scope {
|
|
14
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
15
|
+
--_ui-switcher-threshold: var(--ui-switcher-threshold);
|
|
16
|
+
|
|
4
17
|
--_switcher-gap: var(--ui-space-4);
|
|
5
18
|
display: flex;
|
|
6
19
|
flex-wrap: wrap;
|
|
@@ -41,20 +54,22 @@
|
|
|
41
54
|
}
|
|
42
55
|
}
|
|
43
56
|
@scope ([data-component~="ui-switcher"]) to ([data-component]) {
|
|
44
|
-
|
|
57
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
58
|
+
|
|
59
|
+
:scope > :where([data-slotted], [data-slotted] *):is(*) {
|
|
45
60
|
min-inline-size: 0;
|
|
46
61
|
flex-grow: 1;
|
|
47
62
|
/* The large multiplier makes the basis flip as a group at the intrinsic threshold. */
|
|
48
|
-
flex-basis: calc((var(--
|
|
63
|
+
flex-basis: calc((var(--_ui-switcher-threshold, 30rem) - 100%) * 999);
|
|
49
64
|
}
|
|
50
65
|
:scope[data-ui-switcher-state~="threshold=xs"] > :where([data-slotted], [data-slotted] *):is(*) {
|
|
51
|
-
flex-basis: calc((var(--
|
|
66
|
+
flex-basis: calc((var(--_ui-switcher-threshold, 20rem) - 100%) * 999);
|
|
52
67
|
}
|
|
53
68
|
:scope[data-ui-switcher-state~="threshold=md"] > :where([data-slotted], [data-slotted] *):is(*) {
|
|
54
|
-
flex-basis: calc((var(--
|
|
69
|
+
flex-basis: calc((var(--_ui-switcher-threshold, 45rem) - 100%) * 999);
|
|
55
70
|
}
|
|
56
71
|
:scope[data-ui-switcher-state~="threshold=lg"] > :where([data-slotted], [data-slotted] *):is(*) {
|
|
57
|
-
flex-basis: calc((var(--
|
|
72
|
+
flex-basis: calc((var(--_ui-switcher-threshold, 60rem) - 100%) * 999);
|
|
58
73
|
}
|
|
59
74
|
|
|
60
75
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
package/styles/ui-tabs.css
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
/* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
|
|
2
|
+
@property --ui-tabs-tab-min-block-size {
|
|
3
|
+
syntax: "*";
|
|
4
|
+
inherits: false;
|
|
5
|
+
}
|
|
6
|
+
@property --ui-tabs-tab-padding-block {
|
|
7
|
+
syntax: "*";
|
|
8
|
+
inherits: false;
|
|
9
|
+
}
|
|
10
|
+
@property --ui-tabs-tab-padding-inline {
|
|
11
|
+
syntax: "*";
|
|
12
|
+
inherits: false;
|
|
13
|
+
}
|
|
2
14
|
@scope ([data-component~="ui-tabs"]) to ([data-component], [data-slotted]) {
|
|
3
|
-
/*
|
|
15
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
16
|
+
|
|
17
|
+
/* Density resolves into the tab row's own values; the public tokens still override them. */
|
|
4
18
|
:scope {
|
|
19
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
20
|
+
--_ui-tabs-tab-min-block-size: var(--ui-tabs-tab-min-block-size);
|
|
21
|
+
--_ui-tabs-tab-padding-block: var(--ui-tabs-tab-padding-block);
|
|
22
|
+
--_ui-tabs-tab-padding-inline: var(--ui-tabs-tab-padding-inline);
|
|
23
|
+
|
|
5
24
|
--_tab-min-block-size: var(--ui-control-size);
|
|
6
25
|
--_tab-padding-block: var(--ui-space-2);
|
|
7
26
|
--_tab-padding-inline: var(--ui-space-3);
|
|
@@ -37,9 +56,9 @@
|
|
|
37
56
|
}
|
|
38
57
|
|
|
39
58
|
.list button {
|
|
40
|
-
min-block-size: var(--
|
|
59
|
+
min-block-size: var(--_ui-tabs-tab-min-block-size, var(--_tab-min-block-size));
|
|
41
60
|
margin: 0 0 -1px;
|
|
42
|
-
padding: var(--
|
|
61
|
+
padding: var(--_ui-tabs-tab-padding-block, var(--_tab-padding-block)) var(--_ui-tabs-tab-padding-inline, var(--_tab-padding-inline));
|
|
43
62
|
border: 0;
|
|
44
63
|
border-block-end: 2px solid transparent;
|
|
45
64
|
background: transparent;
|
|
@@ -129,7 +148,9 @@
|
|
|
129
148
|
}
|
|
130
149
|
}
|
|
131
150
|
@scope ([data-component~="ui-tabs"]) to ([data-component]) {
|
|
132
|
-
/*
|
|
151
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
152
|
+
|
|
153
|
+
/* Density resolves into the tab row's own values; the public tokens still override them. */
|
|
133
154
|
|
|
134
155
|
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high. */
|
|
135
156
|
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high.
|
package/styles/ui-textarea.css
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
/* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
|
|
2
|
+
@property --ui-textarea-focus-shadow {
|
|
3
|
+
syntax: "*";
|
|
4
|
+
inherits: false;
|
|
5
|
+
}
|
|
6
|
+
@property --ui-textarea-radius {
|
|
7
|
+
syntax: "*";
|
|
8
|
+
inherits: false;
|
|
9
|
+
}
|
|
10
|
+
@property --ui-textarea-shadow {
|
|
11
|
+
syntax: "*";
|
|
12
|
+
inherits: false;
|
|
13
|
+
}
|
|
2
14
|
@scope ([data-component~="ui-textarea"]) to ([data-component], [data-slotted]) {
|
|
3
|
-
|
|
15
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
16
|
+
|
|
17
|
+
:scope {
|
|
4
18
|
box-sizing: border-box;
|
|
5
19
|
display: inline-block;
|
|
6
20
|
inline-size: 100%;
|
|
@@ -69,7 +83,9 @@
|
|
|
69
83
|
}
|
|
70
84
|
}
|
|
71
85
|
@scope ([data-component~="ui-textarea"]) to ([data-component]) {
|
|
72
|
-
/*
|
|
86
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
87
|
+
|
|
88
|
+
/* Tabbing into a field selects its text; tint that selection softly instead of the page highlight. */
|
|
73
89
|
|
|
74
90
|
/* The app's invalid flag, or the browser's own verdict once the user has left an invalid field. */
|
|
75
91
|
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
/* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
|
|
2
|
+
@property --ui-toast-region-enter-duration {
|
|
3
|
+
syntax: "*";
|
|
4
|
+
inherits: false;
|
|
5
|
+
}
|
|
6
|
+
@property --ui-toast-region-exit-duration {
|
|
7
|
+
syntax: "*";
|
|
8
|
+
inherits: false;
|
|
9
|
+
}
|
|
2
10
|
@keyframes ui-toast-enter {
|
|
3
11
|
from {
|
|
4
12
|
opacity: 0;
|
|
@@ -20,7 +28,13 @@
|
|
|
20
28
|
}
|
|
21
29
|
}
|
|
22
30
|
@scope ([data-component~="ui-toast-region"]) to ([data-component], [data-slotted]) {
|
|
23
|
-
|
|
31
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
32
|
+
|
|
33
|
+
:scope {
|
|
34
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
35
|
+
--_ui-toast-region-enter-duration: var(--ui-toast-region-enter-duration);
|
|
36
|
+
--_ui-toast-region-exit-duration: var(--ui-toast-region-exit-duration);
|
|
37
|
+
|
|
24
38
|
position: fixed;
|
|
25
39
|
top: calc(var(--ui-space-4) + env(safe-area-inset-top));
|
|
26
40
|
right: auto;
|
|
@@ -58,12 +72,12 @@
|
|
|
58
72
|
background: var(--ui-surface-elevated);
|
|
59
73
|
color: var(--ui-text-primary);
|
|
60
74
|
box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
|
|
61
|
-
animation: ui-toast-enter var(--
|
|
75
|
+
animation: ui-toast-enter var(--_ui-toast-region-enter-duration, 0.32s) var(--ui-motion-ease-out, cubic-bezier(0.16, 1, 0.3, 1)) both;
|
|
62
76
|
}
|
|
63
77
|
|
|
64
78
|
/* Leaving slides on down and fades; the controller removes the toast when this ends. */
|
|
65
79
|
.toast.closing {
|
|
66
|
-
animation: ui-toast-exit var(--
|
|
80
|
+
animation: ui-toast-exit var(--_ui-toast-region-exit-duration, 0.22s) var(--ui-motion-ease) both;
|
|
67
81
|
pointer-events: none;
|
|
68
82
|
}
|
|
69
83
|
|
|
@@ -89,7 +103,9 @@
|
|
|
89
103
|
}
|
|
90
104
|
}
|
|
91
105
|
@scope ([data-component~="ui-toast-region"]) to ([data-component]) {
|
|
92
|
-
|
|
106
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
107
|
+
|
|
108
|
+
:scope > .toast,
|
|
93
109
|
:scope > :where([data-slotted], [data-slotted] *):is(*) {
|
|
94
110
|
pointer-events: auto;
|
|
95
111
|
}
|
package/styles/ui-tooltip.css
CHANGED
|
@@ -1,6 +1,55 @@
|
|
|
1
1
|
/* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
|
|
2
|
+
@property --ui-tooltip-arrow-size {
|
|
3
|
+
syntax: "*";
|
|
4
|
+
inherits: false;
|
|
5
|
+
}
|
|
6
|
+
@property --ui-tooltip-border {
|
|
7
|
+
syntax: "*";
|
|
8
|
+
inherits: false;
|
|
9
|
+
}
|
|
10
|
+
@property --ui-tooltip-inverse-surface {
|
|
11
|
+
syntax: "*";
|
|
12
|
+
inherits: false;
|
|
13
|
+
}
|
|
14
|
+
@property --ui-tooltip-inverse-text {
|
|
15
|
+
syntax: "*";
|
|
16
|
+
inherits: false;
|
|
17
|
+
}
|
|
18
|
+
@property --ui-tooltip-max-inline-size {
|
|
19
|
+
syntax: "*";
|
|
20
|
+
inherits: false;
|
|
21
|
+
}
|
|
22
|
+
@property --ui-tooltip-radius {
|
|
23
|
+
syntax: "*";
|
|
24
|
+
inherits: false;
|
|
25
|
+
}
|
|
26
|
+
@property --ui-tooltip-shadow {
|
|
27
|
+
syntax: "*";
|
|
28
|
+
inherits: false;
|
|
29
|
+
}
|
|
30
|
+
@property --ui-tooltip-surface {
|
|
31
|
+
syntax: "*";
|
|
32
|
+
inherits: false;
|
|
33
|
+
}
|
|
34
|
+
@property --ui-tooltip-text {
|
|
35
|
+
syntax: "*";
|
|
36
|
+
inherits: false;
|
|
37
|
+
}
|
|
2
38
|
@scope ([data-component~="ui-tooltip"]) to ([data-component], [data-slotted]) {
|
|
3
|
-
|
|
39
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
40
|
+
|
|
41
|
+
:scope {
|
|
42
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
43
|
+
--_ui-tooltip-border: var(--ui-tooltip-border);
|
|
44
|
+
--_ui-tooltip-max-inline-size: var(--ui-tooltip-max-inline-size);
|
|
45
|
+
--_ui-tooltip-radius: var(--ui-tooltip-radius);
|
|
46
|
+
--_ui-tooltip-surface: var(--ui-tooltip-surface);
|
|
47
|
+
--_ui-tooltip-text: var(--ui-tooltip-text);
|
|
48
|
+
--_ui-tooltip-shadow: var(--ui-tooltip-shadow);
|
|
49
|
+
--_ui-tooltip-inverse-surface: var(--ui-tooltip-inverse-surface);
|
|
50
|
+
--_ui-tooltip-inverse-text: var(--ui-tooltip-inverse-text);
|
|
51
|
+
--_ui-tooltip-arrow-size: var(--ui-tooltip-arrow-size);
|
|
52
|
+
|
|
4
53
|
position: fixed;
|
|
5
54
|
inset: auto;
|
|
6
55
|
margin: 0;
|
|
@@ -23,25 +72,25 @@
|
|
|
23
72
|
}
|
|
24
73
|
|
|
25
74
|
.surface {
|
|
26
|
-
--_tooltip-line: var(--
|
|
75
|
+
--_tooltip-line: var(--_ui-tooltip-border, var(--ui-border-default));
|
|
27
76
|
position: relative;
|
|
28
77
|
box-sizing: border-box;
|
|
29
|
-
max-inline-size: var(--
|
|
78
|
+
max-inline-size: var(--_ui-tooltip-max-inline-size, 18rem);
|
|
30
79
|
border: 1px solid var(--_tooltip-line);
|
|
31
|
-
border-radius: var(--
|
|
32
|
-
background: var(--
|
|
33
|
-
color: var(--
|
|
80
|
+
border-radius: var(--_ui-tooltip-radius, var(--ui-radius-sm));
|
|
81
|
+
background: var(--_ui-tooltip-surface, var(--ui-surface-elevated));
|
|
82
|
+
color: var(--_ui-tooltip-text, var(--ui-text-primary));
|
|
34
83
|
padding: var(--ui-space-1) var(--ui-space-2);
|
|
35
84
|
font-family: var(--ui-font-family-sans);
|
|
36
85
|
font-size: var(--ui-font-size-sm);
|
|
37
86
|
line-height: var(--ui-line-height-tight);
|
|
38
|
-
box-shadow: var(--
|
|
87
|
+
box-shadow: var(--_ui-tooltip-shadow, var(--ui-elevation-tooltip, var(--ui-shadow-md)));
|
|
39
88
|
}
|
|
40
89
|
|
|
41
90
|
:scope[data-ui-tooltip-state~="inverse"] .surface {
|
|
42
|
-
--_tooltip-line: var(--
|
|
43
|
-
background: var(--
|
|
44
|
-
color: var(--
|
|
91
|
+
--_tooltip-line: var(--_ui-tooltip-inverse-surface, var(--ui-text-primary));
|
|
92
|
+
background: var(--_ui-tooltip-inverse-surface, var(--ui-text-primary));
|
|
93
|
+
color: var(--_ui-tooltip-inverse-text, var(--ui-surface-default));
|
|
45
94
|
}
|
|
46
95
|
|
|
47
96
|
/* A rotated square shares the surface fill and draws the two outward border edges. Its centre sits on
|
|
@@ -51,9 +100,9 @@
|
|
|
51
100
|
position: absolute;
|
|
52
101
|
z-index: 1;
|
|
53
102
|
inset-inline-start: var(--ui-space-3);
|
|
54
|
-
inset-block-end: calc(var(--
|
|
55
|
-
inline-size: var(--
|
|
56
|
-
block-size: var(--
|
|
103
|
+
inset-block-end: calc(var(--_ui-tooltip-arrow-size, 0.5rem) / -2 - 0.5px);
|
|
104
|
+
inline-size: var(--_ui-tooltip-arrow-size, 0.5rem);
|
|
105
|
+
block-size: var(--_ui-tooltip-arrow-size, 0.5rem);
|
|
57
106
|
box-sizing: border-box;
|
|
58
107
|
background: inherit;
|
|
59
108
|
border: 0 solid var(--_tooltip-line);
|
|
@@ -64,7 +113,7 @@
|
|
|
64
113
|
}
|
|
65
114
|
|
|
66
115
|
:is(:scope[data-ui-tooltip-state~="placement=bottom"], :scope[data-ui-tooltip-state~="placement=bottom-start"], :scope[data-ui-tooltip-state~="placement=bottom-end"]) .surface::after {
|
|
67
|
-
inset-block-start: calc(var(--
|
|
116
|
+
inset-block-start: calc(var(--_ui-tooltip-arrow-size, 0.5rem) / -2 - 0.5px);
|
|
68
117
|
inset-block-end: auto;
|
|
69
118
|
border-inline-end-width: 0;
|
|
70
119
|
border-block-end-width: 0;
|
|
@@ -102,7 +151,9 @@
|
|
|
102
151
|
}
|
|
103
152
|
}
|
|
104
153
|
@scope ([data-component~="ui-tooltip"]) to ([data-component]) {
|
|
105
|
-
/*
|
|
154
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
155
|
+
|
|
156
|
+
/* A rotated square shares the surface fill and draws the two outward border edges. Its centre sits on
|
|
106
157
|
* the surface border line, so the fill covers that stretch of border and the outline runs unbroken. */
|
|
107
158
|
|
|
108
159
|
@starting-style {
|
package/styles/ui-top-bar.css
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
/* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
|
|
2
|
+
@property --ui-top-bar-actions-gap {
|
|
3
|
+
syntax: "*";
|
|
4
|
+
inherits: false;
|
|
5
|
+
}
|
|
6
|
+
@property --ui-top-bar-border {
|
|
7
|
+
syntax: "*";
|
|
8
|
+
inherits: false;
|
|
9
|
+
}
|
|
10
|
+
@property --ui-top-bar-gap {
|
|
11
|
+
syntax: "*";
|
|
12
|
+
inherits: false;
|
|
13
|
+
}
|
|
14
|
+
@property --ui-top-bar-height {
|
|
15
|
+
syntax: "*";
|
|
16
|
+
inherits: false;
|
|
17
|
+
}
|
|
18
|
+
@property --ui-top-bar-padding-inline {
|
|
19
|
+
syntax: "*";
|
|
20
|
+
inherits: false;
|
|
21
|
+
}
|
|
22
|
+
@property --ui-top-bar-surface {
|
|
23
|
+
syntax: "*";
|
|
24
|
+
inherits: false;
|
|
25
|
+
}
|
|
26
|
+
@property --ui-top-bar-z-index {
|
|
27
|
+
syntax: "*";
|
|
28
|
+
inherits: false;
|
|
29
|
+
}
|
|
2
30
|
@scope ([data-component~="ui-top-bar"]) to ([data-component], [data-slotted]) {
|
|
3
|
-
|
|
31
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
32
|
+
|
|
33
|
+
:scope {
|
|
34
|
+
/* Hooks do not inherit, so the parts below read them from the root. */
|
|
35
|
+
--_ui-top-bar-actions-gap: var(--ui-top-bar-actions-gap);
|
|
36
|
+
|
|
4
37
|
position: sticky;
|
|
5
38
|
inset-block-start: 0;
|
|
6
39
|
z-index: var(--ui-top-bar-z-index, 100);
|
|
@@ -24,7 +57,7 @@
|
|
|
24
57
|
}
|
|
25
58
|
|
|
26
59
|
.actions {
|
|
27
|
-
gap: var(--
|
|
60
|
+
gap: var(--_ui-top-bar-actions-gap, var(--ui-space-1));
|
|
28
61
|
}
|
|
29
62
|
|
|
30
63
|
.title {
|
|
@@ -45,7 +78,9 @@
|
|
|
45
78
|
}
|
|
46
79
|
}
|
|
47
80
|
@scope ([data-component~="ui-top-bar"]) to ([data-component]) {
|
|
48
|
-
/*
|
|
81
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
82
|
+
|
|
83
|
+
/* An unused region takes no space, so it adds no gap. */
|
|
49
84
|
|
|
50
85
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
51
86
|
}
|
package/styles/ui-tree-item.css
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
/* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
|
|
2
|
+
@property --ui-tree-item-depth {
|
|
3
|
+
syntax: "*";
|
|
4
|
+
inherits: false;
|
|
5
|
+
}
|
|
6
|
+
@property --ui-tree-item-font-size {
|
|
7
|
+
syntax: "*";
|
|
8
|
+
inherits: false;
|
|
9
|
+
}
|
|
10
|
+
@property --ui-tree-item-label-padding-block {
|
|
11
|
+
syntax: "*";
|
|
12
|
+
inherits: false;
|
|
13
|
+
}
|
|
14
|
+
@property --ui-tree-item-label-padding-inline {
|
|
15
|
+
syntax: "*";
|
|
16
|
+
inherits: false;
|
|
17
|
+
}
|
|
18
|
+
@property --ui-tree-item-min-block-size {
|
|
19
|
+
syntax: "*";
|
|
20
|
+
inherits: false;
|
|
21
|
+
}
|
|
2
22
|
@keyframes ui-tree-item-marquee {
|
|
3
23
|
from {
|
|
4
24
|
transform: translateX(0);
|
|
@@ -9,14 +29,23 @@
|
|
|
9
29
|
}
|
|
10
30
|
}
|
|
11
31
|
@scope ([data-component~="ui-tree-item"]) to ([data-component], [data-slotted]) {
|
|
12
|
-
|
|
32
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
33
|
+
|
|
34
|
+
:scope {
|
|
35
|
+
/* Hooks do not inherit, so the parts below read them from the root. The tree's density
|
|
36
|
+
sets the defaults, in --_ui-default-*. */
|
|
37
|
+
--_ui-tree-item-min-block-size: var(--ui-tree-item-min-block-size, var(--_ui-default-tree-item-min-block-size));
|
|
38
|
+
--_ui-tree-item-font-size: var(--ui-tree-item-font-size, var(--_ui-default-tree-item-font-size));
|
|
39
|
+
--_ui-tree-item-label-padding-block: var(--ui-tree-item-label-padding-block, var(--_ui-default-tree-item-label-padding-block));
|
|
40
|
+
--_ui-tree-item-label-padding-inline: var(--ui-tree-item-label-padding-inline);
|
|
41
|
+
|
|
13
42
|
--_tree-row-min-height: 32px;
|
|
14
43
|
--_tree-disclosure-size: 16px;
|
|
15
44
|
|
|
16
45
|
position: relative;
|
|
17
46
|
display: block;
|
|
18
47
|
min-inline-size: 0;
|
|
19
|
-
margin-inline-start: calc(var(--ui-tree-item-depth, 0) * var(--
|
|
48
|
+
margin-inline-start: calc(var(--ui-tree-item-depth, 0) * var(--_ui-tree-indent, 16px));
|
|
20
49
|
}
|
|
21
50
|
|
|
22
51
|
.row {
|
|
@@ -24,9 +53,9 @@
|
|
|
24
53
|
display: grid;
|
|
25
54
|
grid-template-columns: var(--_tree-disclosure-size) auto minmax(0, 1fr);
|
|
26
55
|
align-items: center;
|
|
27
|
-
min-block-size: var(--
|
|
56
|
+
min-block-size: var(--_ui-tree-item-min-block-size, var(--_tree-row-min-height));
|
|
28
57
|
min-inline-size: 0;
|
|
29
|
-
font-size: var(--
|
|
58
|
+
font-size: var(--_ui-tree-item-font-size, var(--ui-font-size-sm));
|
|
30
59
|
border-radius: var(--ui-radius-md);
|
|
31
60
|
color: var(--ui-text-secondary);
|
|
32
61
|
transition:
|
|
@@ -63,7 +92,7 @@
|
|
|
63
92
|
/* Child combinators: drop feedback belongs to this item's own row, not the rows nested in it. */
|
|
64
93
|
:scope[data-drop-position="inside"] > .row {
|
|
65
94
|
background: var(--ui-accent-subtle);
|
|
66
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
95
|
+
box-shadow: inset 0 0 0 1px var(--_ui-tree-drop-color, var(--ui-accent-solid));
|
|
67
96
|
}
|
|
68
97
|
|
|
69
98
|
.disclosure,
|
|
@@ -158,7 +187,7 @@
|
|
|
158
187
|
min-inline-size: 0;
|
|
159
188
|
/* The cell clips: a name longer than the row slides inside it rather than over its icons. */
|
|
160
189
|
overflow: hidden;
|
|
161
|
-
padding: var(--
|
|
190
|
+
padding: var(--_ui-tree-item-label-padding-block, var(--ui-space-1)) var(--_ui-tree-item-label-padding-inline, var(--ui-space-2));
|
|
162
191
|
/* The length of the fade before the controls. The label's one flex child lays out no gap; this
|
|
163
192
|
is where the controller reads the length in pixels to stop a sliding name before the fade. */
|
|
164
193
|
column-gap: var(--ui-space-3);
|
|
@@ -215,11 +244,11 @@
|
|
|
215
244
|
under the icon rather than stopping at a hard edge beside it. */
|
|
216
245
|
.row[data-ui-marquee] > .label {
|
|
217
246
|
margin-inline-start: calc(-1 * var(--_marquee-lead, 0px));
|
|
218
|
-
padding-inline-start: calc(var(--_marquee-lead, 0px) + var(--
|
|
247
|
+
padding-inline-start: calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2)));
|
|
219
248
|
mask-image: linear-gradient(
|
|
220
249
|
to right,
|
|
221
250
|
transparent calc(var(--_marquee-lead, 0px) / 2),
|
|
222
|
-
#000 calc(var(--_marquee-lead, 0px) + var(--
|
|
251
|
+
#000 calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2))),
|
|
223
252
|
#000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
|
|
224
253
|
transparent calc(100% - var(--_tree-actions-width, 1.75rem))
|
|
225
254
|
);
|
|
@@ -229,7 +258,7 @@
|
|
|
229
258
|
mask-image: linear-gradient(
|
|
230
259
|
to left,
|
|
231
260
|
transparent calc(var(--_marquee-lead, 0px) / 2),
|
|
232
|
-
#000 calc(var(--_marquee-lead, 0px) + var(--
|
|
261
|
+
#000 calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2))),
|
|
233
262
|
#000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
|
|
234
263
|
transparent calc(100% - var(--_tree-actions-width, 1.75rem))
|
|
235
264
|
);
|
|
@@ -332,7 +361,7 @@
|
|
|
332
361
|
display: none;
|
|
333
362
|
block-size: 2px;
|
|
334
363
|
border-radius: 999px;
|
|
335
|
-
background: var(--
|
|
364
|
+
background: var(--_ui-tree-drop-color, var(--ui-accent-solid));
|
|
336
365
|
pointer-events: none;
|
|
337
366
|
}
|
|
338
367
|
|
|
@@ -343,7 +372,7 @@
|
|
|
343
372
|
inset-block-start: 50%;
|
|
344
373
|
inline-size: 7px;
|
|
345
374
|
block-size: 7px;
|
|
346
|
-
border: 2px solid var(--
|
|
375
|
+
border: 2px solid var(--_ui-tree-drop-color, var(--ui-accent-solid));
|
|
347
376
|
border-radius: 999px;
|
|
348
377
|
background: var(--ui-surface-elevated);
|
|
349
378
|
transform: translateY(-50%);
|
|
@@ -392,7 +421,9 @@
|
|
|
392
421
|
}
|
|
393
422
|
}
|
|
394
423
|
@scope ([data-component~="ui-tree-item"]) to ([data-component]) {
|
|
395
|
-
/*
|
|
424
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
425
|
+
|
|
426
|
+
/* Child combinators: drop feedback belongs to this item's own row, not the rows nested in it. */
|
|
396
427
|
|
|
397
428
|
/* Lucide grip-vertical, filling the handle as in Looma 0.2. */
|
|
398
429
|
|
package/styles/ui-tree.css
CHANGED
|
@@ -1,18 +1,41 @@
|
|
|
1
1
|
/* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
|
|
2
|
+
@property --ui-tree-drop-color {
|
|
3
|
+
syntax: "*";
|
|
4
|
+
inherits: false;
|
|
5
|
+
}
|
|
6
|
+
@property --ui-tree-gutter {
|
|
7
|
+
syntax: "*";
|
|
8
|
+
inherits: false;
|
|
9
|
+
}
|
|
10
|
+
@property --ui-tree-indent {
|
|
11
|
+
syntax: "*";
|
|
12
|
+
inherits: false;
|
|
13
|
+
}
|
|
2
14
|
@scope ([data-component~="ui-tree"]) to ([data-component], [data-slotted]) {
|
|
3
|
-
/*
|
|
15
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
16
|
+
|
|
17
|
+
/* Reaches the items the way density does, so the setting lives on the tree the way a reader
|
|
4
18
|
thinks about it: this list scrolls its long names. */
|
|
5
19
|
:scope[data-ui-tree-state~="marquee"] {
|
|
6
|
-
--
|
|
20
|
+
--_ui-default-tree-item-marquee: 1;
|
|
7
21
|
}
|
|
8
22
|
|
|
23
|
+
/* The items' defaults for this density: an item's own hook still wins. */
|
|
9
24
|
:scope[data-ui-tree-state~="density=compact"] {
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
25
|
+
--_ui-default-tree-item-min-block-size: var(--ui-control-size-sm);
|
|
26
|
+
--_ui-default-tree-item-font-size: var(--ui-font-size-sm);
|
|
27
|
+
--_ui-default-tree-item-label-padding-block: 0;
|
|
13
28
|
}
|
|
14
29
|
|
|
15
30
|
:scope {
|
|
31
|
+
/* Hooks do not inherit: the tree hands its own to its items here, and a tree nested in an item
|
|
32
|
+
starts again from its own settings. */
|
|
33
|
+
--_ui-tree-indent: var(--ui-tree-indent);
|
|
34
|
+
--_ui-tree-drop-color: var(--ui-tree-drop-color);
|
|
35
|
+
--_ui-default-tree-item-marquee: initial;
|
|
36
|
+
--_ui-default-tree-item-min-block-size: initial;
|
|
37
|
+
--_ui-default-tree-item-font-size: initial;
|
|
38
|
+
--_ui-default-tree-item-label-padding-block: initial;
|
|
16
39
|
display: block;
|
|
17
40
|
min-inline-size: 0;
|
|
18
41
|
padding-inline-start: var(--ui-tree-gutter, 0px);
|
|
@@ -24,8 +47,12 @@
|
|
|
24
47
|
}
|
|
25
48
|
}
|
|
26
49
|
@scope ([data-component~="ui-tree"]) to ([data-component]) {
|
|
27
|
-
/*
|
|
50
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
51
|
+
|
|
52
|
+
/* Reaches the items the way density does, so the setting lives on the tree the way a reader
|
|
28
53
|
thinks about it: this list scrolls its long names. */
|
|
29
54
|
|
|
55
|
+
/* The items' defaults for this density: an item's own hook still wins. */
|
|
56
|
+
|
|
30
57
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
31
58
|
}
|
|
@@ -8,6 +8,7 @@ export interface UiAvatarGroupElement extends HTMLDivElement {
|
|
|
8
8
|
export interface UiAvatarGroupProps {
|
|
9
9
|
label?: string | null;
|
|
10
10
|
max?: number | null;
|
|
11
|
+
size?: "sm" | "md" | null;
|
|
11
12
|
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
12
13
|
children?: readonly (string | Node)[];
|
|
13
14
|
slots?: Readonly<Record<string, readonly (string | Node)[]>>;
|
package/vanilla/UiAvatarGroup.js
CHANGED
|
@@ -3,7 +3,7 @@ import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
|
|
|
3
3
|
import * as controller from "../components/ui-avatar-group/ui-avatar-group.js";
|
|
4
4
|
import "../styles/ui-avatar-group.css";
|
|
5
5
|
|
|
6
|
-
const definition = {...{"contract":{"tag":"ui-avatar-group","props":{"label":{"type":"string","required":false,"target":{"attribute":"aria-label"},"default":"People"},"max":{"type":"number","required":false,"target":{"attribute":"max"},"default":5}}},"template":{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"role","value":"group"},{"kind":"attribute","name":"aria-label","expression":"label","expressionPlan":{"source":"label","ast":{"kind":"id","name":"label"},"dependencies":["label"]}}],"children":[{"kind":"slot"},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"overflow"},{"kind":"literal","name":"role","value":"img"},{"kind":"attribute","name":"hidden","expression":"not overflowCount","expressionPlan":{"source":"not overflowCount","ast":{"kind":"unary","op":"not","operand":{"kind":"id","name":"overflowCount"}},"dependencies":["overflowCount"]}},{"kind":"attribute","name":"aria-label","expression":"format('%s more', overflowCount)","expressionPlan":{"source":"format('%s more', overflowCount)","ast":{"kind":"call","fn":"format","args":[{"kind":"literal","value":"%s more"},{"kind":"id","name":"overflowCount"}]},"dependencies":["overflowCount"]}}],"children":[{"kind":"element","name":"template","attributes":[{"kind":"directive","name":"value","expression":"format('+%s', overflowCount)","expressionPlan":{"source":"format('+%s', overflowCount)","ast":{"kind":"call","fn":"format","args":[{"kind":"literal","value":"+%s"},{"kind":"id","name":"overflowCount"}]},"dependencies":["overflowCount"]}}],"children":[]}],"ref":"overflow"}]},"declarations":[{"kind":"state","name":"overflowCount","expression":{"source":"0","ast":{"kind":"literal","value":0},"dependencies":[]}}],"root":{"kind":"native","element":"div","choices":["div"]}},source:{file:import.meta.url},css:""};
|
|
6
|
+
const definition = {...{"contract":{"tag":"ui-avatar-group","props":{"label":{"type":"string","required":false,"target":{"attribute":"aria-label"},"default":"People"},"max":{"type":"number","required":false,"target":{"attribute":"max"},"default":5},"size":{"type":{"enum":["sm","md"]},"required":false,"target":{"attribute":"size"},"default":"md"}}},"template":{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"role","value":"group"},{"kind":"attribute","name":"aria-label","expression":"label","expressionPlan":{"source":"label","ast":{"kind":"id","name":"label"},"dependencies":["label"]}}],"children":[{"kind":"slot"},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"overflow"},{"kind":"literal","name":"role","value":"img"},{"kind":"attribute","name":"hidden","expression":"not overflowCount","expressionPlan":{"source":"not overflowCount","ast":{"kind":"unary","op":"not","operand":{"kind":"id","name":"overflowCount"}},"dependencies":["overflowCount"]}},{"kind":"attribute","name":"aria-label","expression":"format('%s more', overflowCount)","expressionPlan":{"source":"format('%s more', overflowCount)","ast":{"kind":"call","fn":"format","args":[{"kind":"literal","value":"%s more"},{"kind":"id","name":"overflowCount"}]},"dependencies":["overflowCount"]}}],"children":[{"kind":"element","name":"template","attributes":[{"kind":"directive","name":"value","expression":"format('+%s', overflowCount)","expressionPlan":{"source":"format('+%s', overflowCount)","ast":{"kind":"call","fn":"format","args":[{"kind":"literal","value":"+%s"},{"kind":"id","name":"overflowCount"}]},"dependencies":["overflowCount"]}}],"children":[]}],"ref":"overflow"}]},"declarations":[{"kind":"state","name":"overflowCount","expression":{"source":"0","ast":{"kind":"literal","value":0},"dependencies":[]}}],"root":{"kind":"native","element":"div","choices":["div"]}},source:{file:import.meta.url},css:""};
|
|
7
7
|
|
|
8
8
|
export function createUiAvatarGroup(options = {}) {
|
|
9
9
|
const { attributes = {}, children = [], slots = {}, as, ...componentProps } = options;
|