@threadlabs/looma 0.41.2 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ui-action-bar/ui-action-bar.html +1 -7
- package/components/ui-affordance-scope/ui-affordance-scope.html +4 -4
- package/components/ui-avatar/ui-avatar.html +0 -22
- package/components/ui-avatar-group/ui-avatar-group.html +1 -11
- package/components/ui-badge/ui-badge.html +57 -78
- package/components/ui-button/ui-button.html +66 -90
- package/components/ui-button/ui-button.js +2 -2
- package/components/ui-callout/ui-callout.html +31 -69
- package/components/ui-card/ui-card.html +47 -21
- package/components/ui-checkbox/ui-checkbox.html +2 -16
- package/components/ui-cluster/ui-cluster.html +1 -7
- package/components/ui-combobox/ui-combobox.html +7 -70
- package/components/ui-container/ui-container.html +2 -12
- package/components/ui-context-menu/ui-context-menu.html +1 -23
- package/components/ui-dialog/ui-dialog.html +9 -41
- package/components/ui-disclosure/ui-disclosure.html +1 -15
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +1 -1
- package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +1 -1
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +1 -1
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +2 -2
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +2 -2
- package/components/ui-floating-action-button/ui-floating-action-button.html +0 -14
- package/components/ui-form-field/ui-form-field.html +2 -32
- package/components/ui-grid/ui-grid.html +1 -11
- package/components/ui-icon/ui-icon.html +1 -12
- package/components/ui-icon-button/ui-icon-button.html +94 -94
- package/components/ui-input/ui-input.html +5 -55
- package/components/ui-input-group/ui-input-group.html +1 -13
- package/components/ui-light-editor/ui-light-editor.html +1 -1
- package/components/ui-list/ui-list.html +0 -10
- package/components/ui-list-item/ui-list-item.html +1 -19
- package/components/ui-listbox/ui-listbox.html +0 -21
- package/components/ui-menu/ui-menu.html +8 -32
- package/components/ui-menu-item/ui-menu-item.html +1 -27
- package/components/ui-meter/ui-meter.html +11 -6
- package/components/ui-nav-item/ui-nav-item.html +0 -18
- package/components/ui-popover/ui-popover.html +9 -41
- package/components/ui-radio/ui-radio.html +58 -12
- package/components/ui-radio-group/ui-radio-group.html +0 -5
- package/components/ui-reel/ui-reel.html +1 -11
- package/components/ui-search-result-row/ui-search-result-row.html +0 -34
- package/components/ui-search-shell/ui-search-shell.html +1 -43
- package/components/ui-section/ui-section.html +1 -1
- package/components/ui-select/ui-select.html +0 -42
- package/components/ui-separator/ui-separator.html +0 -6
- package/components/ui-sidebar/ui-sidebar.html +2 -24
- package/components/ui-site-header/ui-site-header.html +0 -25
- package/components/ui-skeleton/ui-skeleton.html +0 -9
- package/components/ui-stack/ui-stack.html +6 -11
- package/components/ui-status-message/ui-status-message.html +1 -1
- package/components/ui-swatch/ui-swatch.html +0 -5
- package/components/ui-switch/ui-switch.html +6 -17
- package/components/ui-switcher/ui-switcher.html +1 -11
- package/components/ui-tabs/ui-tabs.html +4 -22
- package/components/ui-text/ui-text.html +20 -7
- package/components/ui-textarea/ui-textarea.html +0 -50
- package/components/ui-toast/ui-toast.html +12 -27
- package/components/ui-toast-region/ui-toast-region.html +13 -34
- package/components/ui-tooltip/ui-tooltip.html +9 -53
- package/components/ui-top-bar/ui-top-bar.html +1 -31
- package/components/ui-tree/ui-tree.html +1 -16
- package/components/ui-tree-item/ui-tree-item.html +1 -23
- package/components/ui-tree-item/ui-tree-item.js +0 -1
- package/dist/index.js +1 -1
- package/docs/README.md +15 -9
- package/docs/catalog.json +973 -186
- package/docs/customizer-render.mjs +25 -9
- package/docs/customizer.js +42 -2
- package/docs/fonts.mjs +1 -1
- package/docs/palette.mjs +5 -4
- package/docs/theme.mjs +214 -51
- package/docs/value-editors.mjs +2 -1
- package/package.json +2 -2
- package/styles/ui-action-bar.css +3 -11
- package/styles/ui-affordance-scope.css +4 -4
- package/styles/ui-avatar-group.css +3 -15
- package/styles/ui-avatar.css +2 -26
- package/styles/ui-badge.css +56 -80
- package/styles/ui-button.css +65 -92
- package/styles/ui-callout.css +33 -73
- package/styles/ui-card.css +42 -18
- package/styles/ui-checkbox.css +4 -20
- package/styles/ui-cluster.css +2 -10
- package/styles/ui-combobox.css +7 -140
- package/styles/ui-container.css +2 -14
- package/styles/ui-context-menu.css +3 -27
- package/styles/ui-dialog.css +22 -88
- package/styles/ui-disclosure.css +3 -19
- package/styles/ui-editor-mention-menu-item.css +1 -1
- package/styles/ui-editor-mention-menu.css +1 -1
- package/styles/ui-editor-table-context-menu.css +1 -1
- package/styles/ui-editor-table-overlay.css +2 -2
- package/styles/ui-editor-table-toolbar.css +2 -2
- package/styles/ui-floating-action-button.css +2 -18
- package/styles/ui-form-field.css +4 -36
- package/styles/ui-grid.css +2 -14
- package/styles/ui-icon-button.css +93 -96
- package/styles/ui-icon.css +3 -16
- package/styles/ui-input-group.css +2 -14
- package/styles/ui-input.css +6 -57
- package/styles/ui-light-editor.css +2 -2
- package/styles/ui-list-item.css +3 -23
- package/styles/ui-list.css +2 -14
- package/styles/ui-listbox.css +2 -44
- package/styles/ui-menu-item.css +3 -31
- package/styles/ui-menu.css +11 -37
- package/styles/ui-meter.css +8 -4
- package/styles/ui-nav-item.css +2 -22
- package/styles/ui-popover.css +12 -46
- package/styles/ui-radio-group.css +1 -6
- package/styles/ui-radio.css +68 -15
- package/styles/ui-reel.css +2 -14
- package/styles/ui-search-result-row.css +2 -38
- package/styles/ui-search-shell.css +3 -47
- package/styles/ui-section.css +1 -1
- package/styles/ui-select.css +2 -46
- package/styles/ui-separator.css +2 -10
- package/styles/ui-sidebar.css +4 -28
- package/styles/ui-site-header.css +1 -26
- package/styles/ui-skeleton.css +2 -12
- package/styles/ui-stack.css +4 -12
- package/styles/ui-status-message.css +1 -1
- package/styles/ui-swatch.css +1 -6
- package/styles/ui-switch.css +8 -21
- package/styles/ui-switcher.css +2 -14
- package/styles/ui-tabs.css +6 -26
- package/styles/ui-text.css +11 -3
- package/styles/ui-textarea.css +2 -54
- package/styles/ui-toast-region.css +29 -73
- package/styles/ui-toast.css +24 -54
- package/styles/ui-tooltip.css +12 -58
- package/styles/ui-top-bar.css +3 -35
- package/styles/ui-tree-item.css +5 -51
- package/styles/ui-tree.css +3 -20
- package/theme-system.css +16 -10
- package/tokens.css +75 -18
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +1 -1
- package/vanilla/UiButton.d.ts +1 -1
- package/vanilla/UiButton.js +1 -1
- package/vanilla/UiCard.d.ts +1 -1
- package/vanilla/UiCard.js +1 -1
- package/vanilla/UiIconButton.d.ts +1 -1
- package/vanilla/UiIconButton.js +1 -1
- package/vanilla/UiMeter.d.ts +1 -1
- package/vanilla/UiMeter.js +1 -1
- package/vanilla/UiStack.js +1 -1
- package/vanilla/UiText.d.ts +1 -1
- package/vanilla/UiText.js +1 -1
- package/vue/UiActionBar.vue +3 -9
- package/vue/UiAffordanceScope.vue +4 -4
- package/vue/UiAvatar.vue +1 -28
- package/vue/UiAvatarGroup.vue +1 -11
- package/vue/UiBadge.d.ts +2 -2
- package/vue/UiBadge.vue +84 -81
- package/vue/UiButton.d.ts +2 -2
- package/vue/UiButton.vue +120 -106
- package/vue/UiCallout.vue +31 -72
- package/vue/UiCard.d.ts +2 -2
- package/vue/UiCard.vue +77 -32
- package/vue/UiCheckbox.vue +2 -16
- package/vue/UiCluster.vue +1 -10
- package/vue/UiCombobox.vue +13 -72
- package/vue/UiContainer.vue +1 -13
- package/vue/UiContextMenu.vue +1 -30
- package/vue/UiDialog.vue +23 -77
- package/vue/UiDisclosure.vue +1 -15
- package/vue/UiEditorMentionMenu.vue +1 -1
- package/vue/UiEditorMentionMenuItem.vue +1 -1
- package/vue/UiEditorTableContextMenu.vue +1 -1
- package/vue/UiEditorTableOverlay.vue +2 -2
- package/vue/UiEditorTableToolbar.vue +2 -2
- package/vue/UiFloatingActionButton.vue +0 -22
- package/vue/UiFormField.vue +6 -33
- package/vue/UiGrid.vue +1 -13
- package/vue/UiIcon.vue +1 -16
- package/vue/UiIconButton.d.ts +2 -2
- package/vue/UiIconButton.vue +145 -106
- package/vue/UiInput.vue +1 -54
- package/vue/UiInputGroup.vue +8 -20
- package/vue/UiLightEditor.vue +2 -2
- package/vue/UiList.vue +2 -12
- package/vue/UiListItem.vue +8 -26
- package/vue/UiListbox.vue +0 -23
- package/vue/UiMenu.vue +12 -44
- package/vue/UiMenuItem.vue +1 -27
- package/vue/UiMeter.d.ts +2 -2
- package/vue/UiMeter.vue +47 -12
- package/vue/UiNavItem.vue +3 -21
- package/vue/UiPopover.vue +12 -53
- package/vue/UiRadio.vue +58 -12
- package/vue/UiRadioGroup.vue +0 -11
- package/vue/UiReel.vue +1 -11
- package/vue/UiSearchResultRow.vue +0 -35
- package/vue/UiSearchShell.vue +1 -53
- package/vue/UiSection.vue +1 -1
- package/vue/UiSelect.vue +0 -42
- package/vue/UiSeparator.vue +0 -7
- package/vue/UiSidebar.vue +3 -26
- package/vue/UiSiteHeader.vue +0 -24
- package/vue/UiSkeleton.vue +0 -9
- package/vue/UiStack.vue +6 -11
- package/vue/UiStatusMessage.vue +1 -1
- package/vue/UiSwatch.vue +1 -6
- package/vue/UiSwitch.vue +6 -17
- package/vue/UiSwitcher.vue +1 -14
- package/vue/UiTabs.vue +4 -22
- package/vue/UiText.d.ts +2 -2
- package/vue/UiText.vue +30 -5
- package/vue/UiTextarea.vue +0 -50
- package/vue/UiToast.vue +26 -34
- package/vue/UiToastRegion.vue +26 -55
- package/vue/UiTooltip.vue +12 -64
- package/vue/UiTopBar.vue +1 -34
- package/vue/UiTree.vue +2 -17
- package/vue/UiTreeItem.vue +2 -28
- package/vue/chunks/UiActionBar.js +1 -1
- package/vue/chunks/UiAffordanceScope.js +1 -1
- package/vue/chunks/UiAvatar.js +1 -1
- package/vue/chunks/UiAvatarGroup.js +1 -1
- package/vue/chunks/UiBadge.js +4 -2
- package/vue/chunks/UiButton.js +4 -2
- package/vue/chunks/UiCallout.js +1 -1
- package/vue/chunks/UiCard.js +5 -3
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiCluster.js +2 -2
- package/vue/chunks/UiCombobox.js +3 -3
- package/vue/chunks/UiContainer.js +2 -2
- package/vue/chunks/UiContextMenu.js +1 -1
- package/vue/chunks/UiDialog.js +1 -1
- package/vue/chunks/UiDisclosure.js +1 -1
- package/vue/chunks/UiEditorMentionMenu.js +1 -1
- package/vue/chunks/UiEditorMentionMenuItem.js +1 -1
- package/vue/chunks/UiEditorTableContextMenu.js +1 -1
- package/vue/chunks/UiEditorTableOverlay.js +1 -1
- package/vue/chunks/UiEditorTableToolbar.js +1 -1
- package/vue/chunks/UiFloatingActionButton.js +1 -1
- package/vue/chunks/UiFormField.js +1 -1
- package/vue/chunks/UiGrid.js +2 -2
- package/vue/chunks/UiIcon.js +1 -1
- package/vue/chunks/UiIconButton.js +4 -2
- package/vue/chunks/UiInput.js +1 -1
- package/vue/chunks/UiInputGroup.js +1 -1
- package/vue/chunks/UiLightEditor.js +1 -1
- package/vue/chunks/UiList.js +1 -1
- package/vue/chunks/UiListItem.js +1 -1
- package/vue/chunks/UiListbox.js +1 -1
- package/vue/chunks/UiMenu.js +1 -1
- package/vue/chunks/UiMenuItem.js +1 -1
- package/vue/chunks/UiMeter.js +4 -2
- package/vue/chunks/UiNavItem.js +1 -1
- package/vue/chunks/UiPopover.js +1 -1
- package/vue/chunks/UiRadio.js +1 -1
- package/vue/chunks/UiRadioGroup.js +1 -1
- package/vue/chunks/UiReel.js +2 -2
- package/vue/chunks/UiSearchResultRow.js +1 -1
- package/vue/chunks/UiSearchShell.js +1 -1
- package/vue/chunks/UiSection.js +1 -1
- package/vue/chunks/UiSelect.js +1 -1
- package/vue/chunks/UiSeparator.js +1 -1
- package/vue/chunks/UiSidebar.js +1 -1
- package/vue/chunks/UiSiteHeader.js +1 -1
- package/vue/chunks/UiSkeleton.js +1 -1
- package/vue/chunks/UiStack.js +3 -3
- package/vue/chunks/UiStatusMessage.js +1 -1
- package/vue/chunks/UiSwatch.js +1 -1
- package/vue/chunks/UiSwitch.js +1 -1
- package/vue/chunks/UiSwitcher.js +2 -2
- package/vue/chunks/UiTabs.js +1 -1
- package/vue/chunks/UiText.js +4 -2
- package/vue/chunks/UiTextarea.js +1 -1
- package/vue/chunks/UiToast.js +1 -1
- package/vue/chunks/UiToastRegion.js +1 -1
- package/vue/chunks/UiTooltip.js +1 -1
- package/vue/chunks/UiTopBar.js +1 -1
- package/vue/chunks/UiTree.js +1 -1
- package/vue/chunks/UiTreeItem.js +1 -1
- package/vue/components.css +857 -2184
- package/vue/editor/index.js +8 -2
|
@@ -166,14 +166,14 @@ useComponentHost(() => import('../components/ui-affordance-scope/ui-affordance-s
|
|
|
166
166
|
@scope (.ui-affordance-scope) to ([data-hn]) {
|
|
167
167
|
:global(:scope:where([data-hn-ui-affordance-scope])) {
|
|
168
168
|
display: contents !important;
|
|
169
|
-
--
|
|
170
|
-
--
|
|
169
|
+
--_ui-affordance-scope-engaged: 0;
|
|
170
|
+
--_ui-affordance-scope-guide: 1;
|
|
171
171
|
}
|
|
172
172
|
:global(:scope[data-ui-affordance-scope-state~="engaged"]:where([data-hn-ui-affordance-scope])) {
|
|
173
|
-
--
|
|
173
|
+
--_ui-affordance-scope-engaged: 1;
|
|
174
174
|
}
|
|
175
175
|
:global(:scope[data-ui-affordance-scope-state~="guide=none"]:where([data-hn-ui-affordance-scope])) {
|
|
176
|
-
--
|
|
176
|
+
--_ui-affordance-scope-guide: 0;
|
|
177
177
|
}
|
|
178
178
|
:global(:scope[hidden]:where([data-hn-ui-affordance-scope])) {
|
|
179
179
|
display: none !important;
|
package/vue/UiAvatar.vue
CHANGED
|
@@ -299,30 +299,8 @@ useComponentHost(() => import('../components/ui-avatar/ui-avatar.js'), {
|
|
|
299
299
|
</template>
|
|
300
300
|
|
|
301
301
|
<style scoped>
|
|
302
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
303
|
-
@property --ui-avatar-border {
|
|
304
|
-
syntax: "*";
|
|
305
|
-
inherits: false;
|
|
306
|
-
}
|
|
307
|
-
@property --ui-avatar-radius {
|
|
308
|
-
syntax: "*";
|
|
309
|
-
inherits: false;
|
|
310
|
-
}
|
|
311
|
-
@property --ui-avatar-surface {
|
|
312
|
-
syntax: "*";
|
|
313
|
-
inherits: false;
|
|
314
|
-
}
|
|
315
|
-
@property --ui-avatar-text {
|
|
316
|
-
syntax: "*";
|
|
317
|
-
inherits: false;
|
|
318
|
-
}
|
|
319
|
-
@property --ui-avatar-active-ring {
|
|
320
|
-
syntax: "*";
|
|
321
|
-
inherits: false;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
302
|
/* An outline, not a dot: the avatar clips its content to the circle, and an outline is drawn
|
|
325
|
-
|
|
303
|
+
outside the box, so the ring survives the clip and the overlap in an Avatar Group. */
|
|
326
304
|
|
|
327
305
|
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high. */
|
|
328
306
|
/* Centre the glyphs, not the line box: a label without descenders otherwise reads high.
|
|
@@ -353,14 +331,12 @@ useComponentHost(() => import('../components/ui-avatar/ui-avatar.js'), {
|
|
|
353
331
|
line-height: 1;
|
|
354
332
|
text-transform: uppercase;
|
|
355
333
|
}
|
|
356
|
-
|
|
357
334
|
:global(:scope[data-ui-avatar-state~="size=sm"]:where([data-hn-ui-avatar])) {
|
|
358
335
|
--_ui-default-icon-size: 1rem;
|
|
359
336
|
inline-size: 1.75rem;
|
|
360
337
|
block-size: 1.75rem;
|
|
361
338
|
font-size: var(--ui-font-size-xs);
|
|
362
339
|
}
|
|
363
|
-
|
|
364
340
|
:global(:scope[data-ui-avatar-state~="size=xs"]:where([data-hn-ui-avatar])) {
|
|
365
341
|
--_ui-default-icon-size: 0.75rem;
|
|
366
342
|
inline-size: 1.25rem;
|
|
@@ -369,15 +345,12 @@ useComponentHost(() => import('../components/ui-avatar/ui-avatar.js'), {
|
|
|
369
345
|
font-size: calc(var(--ui-font-size-md) * 0.5625);
|
|
370
346
|
letter-spacing: 0.02em;
|
|
371
347
|
}
|
|
372
|
-
|
|
373
348
|
:global(:scope[data-ui-avatar-state~="hasImage"]:where([data-hn-ui-avatar])) {
|
|
374
349
|
border-color: var(--ui-avatar-border, var(--ui-border-strong));
|
|
375
350
|
}
|
|
376
|
-
|
|
377
351
|
:global(:scope[data-ui-avatar-state~="shape=circle"]:where([data-hn-ui-avatar])) {
|
|
378
352
|
box-shadow: var(--ui-shadow-sm);
|
|
379
353
|
}
|
|
380
|
-
|
|
381
354
|
:global(:scope[data-ui-avatar-state~="shape=square"]:where([data-hn-ui-avatar])) {
|
|
382
355
|
border-radius: var(--ui-avatar-radius, var(--ui-radius-md));
|
|
383
356
|
}
|
package/vue/UiAvatarGroup.vue
CHANGED
|
@@ -225,16 +225,6 @@ useComponentHost(() => import('../components/ui-avatar-group/ui-avatar-group.js'
|
|
|
225
225
|
</template>
|
|
226
226
|
|
|
227
227
|
<style scoped>
|
|
228
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
229
|
-
@property --ui-avatar-group-edge-ring {
|
|
230
|
-
syntax: "*";
|
|
231
|
-
inherits: false;
|
|
232
|
-
}
|
|
233
|
-
@property --ui-avatar-group-overlap-shadow {
|
|
234
|
-
syntax: "*";
|
|
235
|
-
inherits: false;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
228
|
/* Overlap and the separating shadow are applied by the controller: slotted avatars are nested
|
|
239
229
|
* component roots outside this style scope. */
|
|
240
230
|
|
|
@@ -242,7 +232,7 @@ useComponentHost(() => import('../components/ui-avatar-group/ui-avatar-group.js'
|
|
|
242
232
|
|
|
243
233
|
@scope (.ui-avatar-group) to ([data-hn]) {
|
|
244
234
|
:global(:scope:where([data-hn-ui-avatar-group])) {
|
|
245
|
-
/*
|
|
235
|
+
/* Resolve shared part values at the component root. */
|
|
246
236
|
--_ui-avatar-group-overlap-shadow: var(--ui-avatar-group-overlap-shadow);
|
|
247
237
|
--_ui-avatar-group-edge-ring: var(--ui-avatar-group-edge-ring);
|
|
248
238
|
|
package/vue/UiBadge.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
14
14
|
type: PropType<"xs" | "sm" | "md" | "lg" | null>;
|
|
15
15
|
};
|
|
16
16
|
tone: {
|
|
17
|
-
type: PropType<"neutral" | "accent" | "info" | "success" | "warning" | "danger" | null>;
|
|
17
|
+
type: PropType<"neutral" | "accent" | "accent-secondary" | "accent-tertiary" | "info" | "success" | "warning" | "danger" | null>;
|
|
18
18
|
};
|
|
19
19
|
variant: {
|
|
20
20
|
type: PropType<"solid" | "subtle" | "outline" | "inverse" | "overlay" | null>;
|
|
@@ -30,7 +30,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
30
30
|
type: PropType<"xs" | "sm" | "md" | "lg" | null>;
|
|
31
31
|
};
|
|
32
32
|
tone: {
|
|
33
|
-
type: PropType<"neutral" | "accent" | "info" | "success" | "warning" | "danger" | null>;
|
|
33
|
+
type: PropType<"neutral" | "accent" | "accent-secondary" | "accent-tertiary" | "info" | "success" | "warning" | "danger" | null>;
|
|
34
34
|
};
|
|
35
35
|
variant: {
|
|
36
36
|
type: PropType<"solid" | "subtle" | "outline" | "inverse" | "overlay" | null>;
|
package/vue/UiBadge.vue
CHANGED
|
@@ -42,8 +42,17 @@ const propValidityContract = {
|
|
|
42
42
|
required: false,
|
|
43
43
|
target: { attribute: 'tone' },
|
|
44
44
|
description:
|
|
45
|
-
'Which colour the badge speaks in. neutral is a quiet grey for plain labels; accent draws the eye in the accent colour; info, success, warning, and danger\n mark a status, so match the tone to what the badge says. For a category rather than a status, set the --ui-badge-color hook on the badge instead: any CSS\n colour, which overrides the tone.',
|
|
46
|
-
values: [
|
|
45
|
+
'Which colour the badge speaks in. neutral is a quiet grey for plain labels; accent draws the eye in the accent colour; info, success, warning, and danger\n mark a status, so match the tone to what the badge says. For a category rather than a status, set the --ui-badge-color hook on the badge instead: any CSS\n colour, which overrides the tone. Supporting brand families use accent-secondary and accent-tertiary; their usable colors derive from the theme, and unset\n families follow the primary accent.',
|
|
46
|
+
values: [
|
|
47
|
+
'neutral',
|
|
48
|
+
'accent',
|
|
49
|
+
'accent-secondary',
|
|
50
|
+
'accent-tertiary',
|
|
51
|
+
'info',
|
|
52
|
+
'success',
|
|
53
|
+
'warning',
|
|
54
|
+
'danger',
|
|
55
|
+
],
|
|
47
56
|
default: 'neutral',
|
|
48
57
|
},
|
|
49
58
|
variant: {
|
|
@@ -62,7 +71,15 @@ const props = defineProps({
|
|
|
62
71
|
size: { type: null as unknown as PropType<'xs' | 'sm' | 'md' | 'lg' | null> },
|
|
63
72
|
tone: {
|
|
64
73
|
type: null as unknown as PropType<
|
|
65
|
-
|
|
74
|
+
| 'neutral'
|
|
75
|
+
| 'accent'
|
|
76
|
+
| 'accent-secondary'
|
|
77
|
+
| 'accent-tertiary'
|
|
78
|
+
| 'info'
|
|
79
|
+
| 'success'
|
|
80
|
+
| 'warning'
|
|
81
|
+
| 'danger'
|
|
82
|
+
| null
|
|
66
83
|
>,
|
|
67
84
|
},
|
|
68
85
|
variant: {
|
|
@@ -113,11 +130,25 @@ const checkedProps = computed(() => {
|
|
|
113
130
|
props['size'],
|
|
114
131
|
props[BINDING_INPUTS_PROP],
|
|
115
132
|
) as 'xs' | 'sm' | 'md' | 'lg',
|
|
116
|
-
tone: propInputs.value<
|
|
117
|
-
'
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
133
|
+
tone: propInputs.value<
|
|
134
|
+
| 'neutral'
|
|
135
|
+
| 'accent'
|
|
136
|
+
| 'accent-secondary'
|
|
137
|
+
| 'accent-tertiary'
|
|
138
|
+
| 'info'
|
|
139
|
+
| 'success'
|
|
140
|
+
| 'warning'
|
|
141
|
+
| 'danger'
|
|
142
|
+
| null
|
|
143
|
+
>('tone', props['tone'], props[BINDING_INPUTS_PROP]) as
|
|
144
|
+
| 'neutral'
|
|
145
|
+
| 'accent'
|
|
146
|
+
| 'accent-secondary'
|
|
147
|
+
| 'accent-tertiary'
|
|
148
|
+
| 'info'
|
|
149
|
+
| 'success'
|
|
150
|
+
| 'warning'
|
|
151
|
+
| 'danger',
|
|
121
152
|
variant: propInputs.value<'solid' | 'subtle' | 'outline' | 'inverse' | 'overlay' | null>(
|
|
122
153
|
'variant',
|
|
123
154
|
props['variant'],
|
|
@@ -173,70 +204,8 @@ const hostState = computed(() =>
|
|
|
173
204
|
</template>
|
|
174
205
|
|
|
175
206
|
<style scoped>
|
|
176
|
-
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
177
|
-
@property --ui-badge-border {
|
|
178
|
-
syntax: "*";
|
|
179
|
-
inherits: false;
|
|
180
|
-
}
|
|
181
|
-
@property --ui-badge-square-size {
|
|
182
|
-
syntax: "*";
|
|
183
|
-
inherits: false;
|
|
184
|
-
}
|
|
185
|
-
@property --ui-badge-circle-size {
|
|
186
|
-
syntax: "*";
|
|
187
|
-
inherits: false;
|
|
188
|
-
}
|
|
189
|
-
@property --ui-badge-circle-opacity {
|
|
190
|
-
syntax: "*";
|
|
191
|
-
inherits: false;
|
|
192
|
-
}
|
|
193
|
-
@property --ui-badge-dot-size {
|
|
194
|
-
syntax: "*";
|
|
195
|
-
inherits: false;
|
|
196
|
-
}
|
|
197
|
-
@property --ui-badge-color {
|
|
198
|
-
syntax: "*";
|
|
199
|
-
inherits: false;
|
|
200
|
-
}
|
|
201
|
-
@property --ui-badge-font-size {
|
|
202
|
-
syntax: "*";
|
|
203
|
-
inherits: false;
|
|
204
|
-
}
|
|
205
|
-
@property --ui-badge-font-weight {
|
|
206
|
-
syntax: "*";
|
|
207
|
-
inherits: false;
|
|
208
|
-
}
|
|
209
|
-
@property --ui-badge-line-height {
|
|
210
|
-
syntax: "*";
|
|
211
|
-
inherits: false;
|
|
212
|
-
}
|
|
213
|
-
@property --ui-badge-min-block-size {
|
|
214
|
-
syntax: "*";
|
|
215
|
-
inherits: false;
|
|
216
|
-
}
|
|
217
|
-
@property --ui-badge-padding-block {
|
|
218
|
-
syntax: "*";
|
|
219
|
-
inherits: false;
|
|
220
|
-
}
|
|
221
|
-
@property --ui-badge-padding-inline {
|
|
222
|
-
syntax: "*";
|
|
223
|
-
inherits: false;
|
|
224
|
-
}
|
|
225
|
-
@property --ui-badge-point {
|
|
226
|
-
syntax: "*";
|
|
227
|
-
inherits: false;
|
|
228
|
-
}
|
|
229
|
-
@property --ui-badge-surface {
|
|
230
|
-
syntax: "*";
|
|
231
|
-
inherits: false;
|
|
232
|
-
}
|
|
233
|
-
@property --ui-badge-text {
|
|
234
|
-
syntax: "*";
|
|
235
|
-
inherits: false;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
207
|
/* A constrained badge keeps its surface intact and ellipsizes only its label. The full
|
|
239
|
-
|
|
208
|
+
text stays in the DOM for accessible names and consumers' selected values. */
|
|
240
209
|
|
|
241
210
|
/* Icon content has its own flex item so label ellipsis never clips its strokes. */
|
|
242
211
|
|
|
@@ -390,6 +359,40 @@ const hostState = computed(() =>
|
|
|
390
359
|
line-height: var(--ui-badge-line-height, 1);
|
|
391
360
|
}
|
|
392
361
|
|
|
362
|
+
:global(:scope[data-ui-badge-state~="tone=accent-secondary"]:where([data-hn-ui-badge])) {
|
|
363
|
+
--_badge-surface: var(--ui-accent-secondary-strong-surface, var(--ui-accent-secondary-solid));
|
|
364
|
+
--_badge-border: var(--ui-accent-secondary-strong-surface, var(--ui-accent-secondary-solid));
|
|
365
|
+
--_badge-text: var(--ui-accent-secondary-on-strong, var(--ui-text-on-accent));
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
:global(:scope[data-ui-badge-state~="tone=accent-tertiary"]:where([data-hn-ui-badge])) {
|
|
369
|
+
--_badge-surface: var(--ui-accent-tertiary-strong-surface, var(--ui-accent-tertiary-solid));
|
|
370
|
+
--_badge-border: var(--ui-accent-tertiary-strong-surface, var(--ui-accent-tertiary-solid));
|
|
371
|
+
--_badge-text: var(--ui-accent-tertiary-on-strong, var(--ui-text-on-accent));
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
:global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=accent-secondary"]:where([data-hn-ui-badge])) {
|
|
375
|
+
--_badge-surface: var(--ui-accent-secondary-soft);
|
|
376
|
+
--_badge-border: var(--ui-accent-secondary-soft-border);
|
|
377
|
+
--_badge-text: var(--ui-accent-secondary-subtle-text, var(--ui-accent-secondary-solid));
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
:global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=accent-tertiary"]:where([data-hn-ui-badge])) {
|
|
381
|
+
--_badge-surface: var(--ui-accent-tertiary-soft);
|
|
382
|
+
--_badge-border: var(--ui-accent-tertiary-soft-border);
|
|
383
|
+
--_badge-text: var(--ui-accent-tertiary-subtle-text, var(--ui-accent-tertiary-solid));
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
:global(:scope[data-ui-badge-state~="variant=outline"][data-ui-badge-state~="tone=accent-secondary"]:where([data-hn-ui-badge])) {
|
|
387
|
+
--_badge-border: var(--ui-accent-secondary-solid);
|
|
388
|
+
--_badge-text: var(--ui-accent-secondary-subtle-text, var(--ui-accent-secondary-solid));
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
:global(:scope[data-ui-badge-state~="variant=outline"][data-ui-badge-state~="tone=accent-tertiary"]:where([data-hn-ui-badge])) {
|
|
392
|
+
--_badge-border: var(--ui-accent-tertiary-solid);
|
|
393
|
+
--_badge-text: var(--ui-accent-tertiary-subtle-text, var(--ui-accent-tertiary-solid));
|
|
394
|
+
}
|
|
395
|
+
|
|
393
396
|
:global(:scope[data-ui-badge-state~="tone=accent"]:where([data-hn-ui-badge])) {
|
|
394
397
|
--_badge-surface: var(--ui-accent-strong-surface, var(--ui-accent-solid));
|
|
395
398
|
--_badge-border: var(--ui-accent-strong-surface, var(--ui-accent-solid));
|
|
@@ -421,32 +424,32 @@ const hostState = computed(() =>
|
|
|
421
424
|
}
|
|
422
425
|
|
|
423
426
|
:global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=accent"]:where([data-hn-ui-badge])) {
|
|
424
|
-
--_badge-surface:
|
|
425
|
-
--_badge-border:
|
|
427
|
+
--_badge-surface: var(--ui-accent-soft);
|
|
428
|
+
--_badge-border: var(--ui-accent-soft-border);
|
|
426
429
|
--_badge-text: var(--ui-accent-subtle-text, var(--ui-accent-solid));
|
|
427
430
|
}
|
|
428
431
|
|
|
429
432
|
:global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=danger"]:where([data-hn-ui-badge])) {
|
|
430
|
-
--_badge-surface:
|
|
431
|
-
--_badge-border:
|
|
433
|
+
--_badge-surface: var(--ui-danger-soft);
|
|
434
|
+
--_badge-border: var(--ui-danger-soft-border);
|
|
432
435
|
--_badge-text: var(--ui-danger-subtle-text, var(--ui-danger-solid));
|
|
433
436
|
}
|
|
434
437
|
|
|
435
438
|
:global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=success"]:where([data-hn-ui-badge])) {
|
|
436
|
-
--_badge-surface:
|
|
437
|
-
--_badge-border:
|
|
439
|
+
--_badge-surface: var(--ui-success-soft);
|
|
440
|
+
--_badge-border: var(--ui-success-soft-border);
|
|
438
441
|
--_badge-text: var(--ui-success-subtle-text, var(--ui-success-solid));
|
|
439
442
|
}
|
|
440
443
|
|
|
441
444
|
:global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=warning"]:where([data-hn-ui-badge])) {
|
|
442
|
-
--_badge-surface:
|
|
443
|
-
--_badge-border:
|
|
445
|
+
--_badge-surface: var(--ui-warning-soft);
|
|
446
|
+
--_badge-border: var(--ui-warning-soft-border);
|
|
444
447
|
--_badge-text: var(--ui-warning-subtle-text, var(--ui-warning-solid));
|
|
445
448
|
}
|
|
446
449
|
|
|
447
450
|
:global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=info"]:where([data-hn-ui-badge])) {
|
|
448
|
-
--_badge-surface:
|
|
449
|
-
--_badge-border:
|
|
451
|
+
--_badge-surface: var(--ui-info-soft);
|
|
452
|
+
--_badge-border: var(--ui-info-soft-border);
|
|
450
453
|
--_badge-text: var(--ui-info-subtle-text, var(--ui-info-solid));
|
|
451
454
|
}
|
|
452
455
|
:global(:scope[data-ui-badge-state~="variant=solid"]:where([data-hn-ui-badge])) {
|
package/vue/UiButton.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
60
60
|
type: PropType<string | null>;
|
|
61
61
|
};
|
|
62
62
|
tone: {
|
|
63
|
-
type: PropType<"accent" | "neutral" | "danger" | "success" | "warning" | "info" | null>;
|
|
63
|
+
type: PropType<"accent" | "accent-secondary" | "accent-tertiary" | "neutral" | "danger" | "success" | "warning" | "info" | null>;
|
|
64
64
|
};
|
|
65
65
|
type: {
|
|
66
66
|
type: PropType<"button" | "submit" | "reset" | null>;
|
|
@@ -109,7 +109,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
109
109
|
type: PropType<string | null>;
|
|
110
110
|
};
|
|
111
111
|
tone: {
|
|
112
|
-
type: PropType<"accent" | "neutral" | "danger" | "success" | "warning" | "info" | null>;
|
|
112
|
+
type: PropType<"accent" | "accent-secondary" | "accent-tertiary" | "neutral" | "danger" | "success" | "warning" | "info" | null>;
|
|
113
113
|
};
|
|
114
114
|
type: {
|
|
115
115
|
type: PropType<"button" | "submit" | "reset" | null>;
|