@threadlabs/looma 0.47.1 → 0.47.2
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-combobox/ui-combobox.html +23 -4
- package/components/ui-combobox/ui-combobox.js +6 -0
- package/components/ui-top-bar/ui-top-bar.html +32 -2
- package/components/ui-top-bar/ui-top-bar.js +60 -0
- package/dist/index.js +4 -3
- package/docs/catalog.json +66 -3
- package/package.json +1 -1
- package/styles/ui-combobox.css +40 -6
- package/styles/ui-top-bar.css +24 -1
- package/vanilla/UiCombobox.d.ts +1 -0
- package/vanilla/UiCombobox.js +88 -82
- package/vanilla/UiTopBar.d.ts +1 -0
- package/vanilla/UiTopBar.js +50 -13
- package/vue/UiCombobox.d.ts +6 -0
- package/vue/UiCombobox.vue +76 -9
- package/vue/UiTopBar.d.ts +17 -1
- package/vue/UiTopBar.vue +171 -3
- 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 +1 -1
- package/vue/chunks/UiBreadcrumbItem.js +1 -1
- package/vue/chunks/UiBreadcrumbs.js +1 -1
- package/vue/chunks/UiButton.js +1 -1
- package/vue/chunks/UiCallout.js +1 -1
- package/vue/chunks/UiCard.js +1 -1
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiCluster.js +1 -1
- package/vue/chunks/UiColorPicker.js +1 -1
- package/vue/chunks/UiCombobox.js +74 -53
- package/vue/chunks/UiContainer.js +1 -1
- package/vue/chunks/UiContextMenu.js +1 -1
- package/vue/chunks/UiCover.js +1 -1
- package/vue/chunks/UiCurveEditor.js +1 -1
- package/vue/chunks/UiCycleButton.js +1 -1
- package/vue/chunks/UiDescriptionItem.js +1 -1
- package/vue/chunks/UiDescriptionList.js +1 -1
- package/vue/chunks/UiDialog.js +1 -1
- package/vue/chunks/UiDisclosure.js +1 -1
- package/vue/chunks/UiEditable.js +1 -1
- package/vue/chunks/UiEditorBlockActions.js +1 -1
- package/vue/chunks/UiEditorChipEditor.js +1 -1
- package/vue/chunks/UiEditorCodeLanguage.js +1 -1
- package/vue/chunks/UiEditorFootnoteEditor.js +1 -1
- package/vue/chunks/UiEditorImageToolbar.js +1 -1
- package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
- package/vue/chunks/UiEditorLinkCard.js +1 -1
- package/vue/chunks/UiEditorLinkForm.js +1 -1
- package/vue/chunks/UiEditorMentionMenu.js +1 -1
- package/vue/chunks/UiEditorMentionMenuItem.js +1 -1
- package/vue/chunks/UiEditorSlashMenu.js +1 -1
- package/vue/chunks/UiEditorSlashMenuGroup.js +1 -1
- package/vue/chunks/UiEditorSlashMenuItem.js +1 -1
- package/vue/chunks/UiEditorSurface.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/UiEditorToolbar.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/UiImage.js +1 -1
- 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/UiMenuGroup.js +1 -1
- package/vue/chunks/UiMenuItem.js +1 -1
- package/vue/chunks/UiMeter.js +1 -1
- package/vue/chunks/UiNavItem.js +1 -1
- package/vue/chunks/UiNumberInput.js +1 -1
- package/vue/chunks/UiPageHeader.js +1 -1
- package/vue/chunks/UiPagination.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 +1 -1
- package/vue/chunks/UiScrollArea.js +1 -1
- 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/UiSlider.js +1 -1
- package/vue/chunks/UiSpinner.js +1 -1
- package/vue/chunks/UiStack.js +1 -1
- 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 +1 -1
- package/vue/chunks/UiTable.js +1 -1
- package/vue/chunks/UiTabs.js +1 -1
- package/vue/chunks/UiText.js +1 -1
- 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 +105 -17
- package/vue/chunks/UiTree.js +1 -1
- package/vue/chunks/UiTreeItem.js +1 -1
- package/vue/chunks/props.js +1 -1
- package/vue/components.css +65 -8
package/vue/UiCombobox.vue
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
isInteger,
|
|
11
11
|
KeyedBoundary,
|
|
12
12
|
nativeAttrs,
|
|
13
|
+
number,
|
|
13
14
|
uniqueKeys,
|
|
14
15
|
useComponentHost,
|
|
15
16
|
useReflectedProp,
|
|
@@ -184,6 +185,14 @@ const propValidityContract = {
|
|
|
184
185
|
'Marks the suggestion list busy while the consumer loads options. It announces loading and suppresses the empty state and create offer until cleared.',
|
|
185
186
|
default: false,
|
|
186
187
|
},
|
|
188
|
+
maxRows: {
|
|
189
|
+
type: { kind: 'terminal', name: 'integer' },
|
|
190
|
+
required: false,
|
|
191
|
+
target: { attribute: 'maxrows' },
|
|
192
|
+
description:
|
|
193
|
+
'Visible rows of selected items and typing space in multiple mode. More than one lets the field grow and wrap before extra rows scroll vertically inside it.\n One or less keeps the single horizontally scrolling row; single-selection fields are unchanged.',
|
|
194
|
+
default: 1,
|
|
195
|
+
},
|
|
187
196
|
multiple: {
|
|
188
197
|
type: { kind: 'terminal', name: 'boolean' },
|
|
189
198
|
required: false,
|
|
@@ -318,6 +327,7 @@ const props = defineProps({
|
|
|
318
327
|
label: { type: null as unknown as PropType<string | null> },
|
|
319
328
|
labelVisibility: { type: null as unknown as PropType<'visible' | 'sr-only' | null> },
|
|
320
329
|
loading: { type: null as unknown as PropType<boolean | null> },
|
|
330
|
+
maxRows: { type: null as unknown as PropType<number | null> },
|
|
321
331
|
multiple: { type: null as unknown as PropType<boolean | null> },
|
|
322
332
|
muted: { type: null as unknown as PropType<boolean | null> },
|
|
323
333
|
name: { type: null as unknown as PropType<string | null> },
|
|
@@ -348,6 +358,7 @@ const acceptedProps: Record<string, unknown> = {
|
|
|
348
358
|
label: '',
|
|
349
359
|
labelVisibility: 'visible',
|
|
350
360
|
loading: false,
|
|
361
|
+
maxRows: 1,
|
|
351
362
|
multiple: false,
|
|
352
363
|
muted: false,
|
|
353
364
|
name: '',
|
|
@@ -376,6 +387,7 @@ const inputTracking = vuePropInputs(acceptedProps, {
|
|
|
376
387
|
label: '',
|
|
377
388
|
labelVisibility: 'visible',
|
|
378
389
|
loading: false,
|
|
390
|
+
maxRows: 1,
|
|
379
391
|
multiple: false,
|
|
380
392
|
muted: false,
|
|
381
393
|
name: '',
|
|
@@ -455,6 +467,8 @@ const inputTracking = vuePropInputs(acceptedProps, {
|
|
|
455
467
|
return checkPropInput(value, { kind: 'terminal', name: 'keyword' }, true, true)
|
|
456
468
|
case 'loading':
|
|
457
469
|
return checkPropInput(value, { kind: 'terminal', name: 'boolean' }, true, true)
|
|
470
|
+
case 'maxRows':
|
|
471
|
+
return checkPropInput(value, { kind: 'terminal', name: 'integer' }, true, true)
|
|
458
472
|
case 'multiple':
|
|
459
473
|
return checkPropInput(value, { kind: 'terminal', name: 'boolean' }, true, true)
|
|
460
474
|
case 'muted':
|
|
@@ -581,6 +595,11 @@ const checkedProps = computed(() => {
|
|
|
581
595
|
props['loading'],
|
|
582
596
|
props[BINDING_INPUTS_PROP],
|
|
583
597
|
) as boolean,
|
|
598
|
+
maxRows: propInputs.value<number | null>(
|
|
599
|
+
'maxRows',
|
|
600
|
+
props['maxRows'],
|
|
601
|
+
props[BINDING_INPUTS_PROP],
|
|
602
|
+
) as number,
|
|
584
603
|
multiple: propInputs.value<boolean | null>(
|
|
585
604
|
'multiple',
|
|
586
605
|
props['multiple'],
|
|
@@ -1730,6 +1749,7 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
|
|
|
1730
1749
|
'label',
|
|
1731
1750
|
'labelVisibility',
|
|
1732
1751
|
'loading',
|
|
1752
|
+
'maxRows',
|
|
1733
1753
|
'multiple',
|
|
1734
1754
|
'muted',
|
|
1735
1755
|
'name',
|
|
@@ -1803,6 +1823,7 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
|
|
|
1803
1823
|
:data-ui-combobox-prop-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
|
|
1804
1824
|
:data-ui-combobox-prop-label-visibility="reflectedProp('labelVisibility', 'label-visibility', checkedProps.labelVisibility, undefined, false)"
|
|
1805
1825
|
:data-ui-combobox-prop-loading="reflectedProp('loading', 'loading', checkedProps.loading, undefined, false)"
|
|
1826
|
+
:data-ui-combobox-prop-max-rows="reflectedProp('maxRows', 'max-rows', checkedProps.maxRows, undefined, false)"
|
|
1806
1827
|
:data-ui-combobox-prop-multiple="reflectedProp('multiple', 'multiple', checkedProps.multiple, undefined, false)"
|
|
1807
1828
|
:data-ui-combobox-prop-muted="reflectedProp('muted', 'muted', checkedProps.muted, undefined, false)"
|
|
1808
1829
|
:data-ui-combobox-prop-name="reflectedProp('name', 'name', checkedProps.name, undefined, false)"
|
|
@@ -1827,7 +1848,17 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
|
|
|
1827
1848
|
*</template></label>
|
|
1828
1849
|
<div class="control" data-hn-ui-combobox>
|
|
1829
1850
|
<div class="field" data-hn-ui-combobox ref="fieldElement">
|
|
1830
|
-
<div
|
|
1851
|
+
<div
|
|
1852
|
+
class="entry"
|
|
1853
|
+
data-hn-ui-combobox
|
|
1854
|
+
:class="{
|
|
1855
|
+
multiline: checkedProps.multiple
|
|
1856
|
+
&& (number(checkedProps.maxRows) === undefined || number(1) === undefined
|
|
1857
|
+
? undefined
|
|
1858
|
+
: number(checkedProps.maxRows)! > number(1)!),
|
|
1859
|
+
}"
|
|
1860
|
+
:style="{ '--_max-rows': checkedProps.maxRows?.toString() }"
|
|
1861
|
+
>
|
|
1831
1862
|
<span class="start" data-hn-ui-combobox><slot name="start" /></span>{{ ' ' }}<template
|
|
1832
1863
|
v-if="checkedProps.multiple"
|
|
1833
1864
|
>{{ ' ' }}<KeyedBoundary><button
|
|
@@ -2080,6 +2111,8 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
|
|
|
2080
2111
|
while the clear and disclosure controls remain fixed at the end of the field. */
|
|
2081
2112
|
/* Size variants keep their control height as selections are added. */
|
|
2082
2113
|
/* A large multiple field starts at the large control height, as sm starts at the small one. */
|
|
2114
|
+
/* Grow through the requested rows, then keep the typing row in a bounded field.
|
|
2115
|
+
The entry owns its scroll; clear/disclosure actions remain outside it. */
|
|
2083
2116
|
|
|
2084
2117
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
2085
2118
|
|
|
@@ -2378,6 +2411,7 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
|
|
|
2378
2411
|
}
|
|
2379
2412
|
}
|
|
2380
2413
|
:global(:scope[data-ui-combobox-state~="multiple"] .field:where([data-hn-ui-combobox])) {
|
|
2414
|
+
--_item-row: 1.75rem;
|
|
2381
2415
|
align-items: center !important;
|
|
2382
2416
|
min-block-size: var(--_ui-combobox-item-min-block-size, var(--_row));
|
|
2383
2417
|
padding: var(--ui-space-1) !important;
|
|
@@ -2396,28 +2430,44 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
|
|
|
2396
2430
|
max-block-size: none;
|
|
2397
2431
|
flex: 1 0 var(--_ui-combobox-item-input-min-inline-size, 5rem);
|
|
2398
2432
|
width: auto;
|
|
2399
|
-
min-block-size:
|
|
2433
|
+
min-block-size: var(--_item-row);
|
|
2400
2434
|
padding: var(--ui-space-0-5) var(--ui-space-1) !important;
|
|
2401
2435
|
}
|
|
2402
2436
|
:global(:scope[data-ui-combobox-state~="multiple"]:scope[data-ui-combobox-state~="size=sm"]
|
|
2403
2437
|
.field:where([data-hn-ui-combobox])) {
|
|
2438
|
+
--_item-row: calc(var(--_row) - 2 * var(--ui-border-width) - 2 * var(--ui-space-0-5));
|
|
2404
2439
|
min-block-size: 0;
|
|
2405
2440
|
padding: var(--ui-space-0-5) !important;
|
|
2406
2441
|
}
|
|
2407
2442
|
:global(:scope[data-ui-combobox-state~="multiple"]:scope[data-ui-combobox-state~="size=sm"]
|
|
2408
2443
|
input:where([data-hn-ui-combobox])) {
|
|
2409
|
-
min-block-size:
|
|
2444
|
+
min-block-size: var(--_item-row);
|
|
2410
2445
|
padding: 0 var(--ui-space-1) !important;
|
|
2411
2446
|
}
|
|
2412
2447
|
:global(:scope[data-ui-combobox-state~="multiple"]:scope[data-ui-combobox-state~="size=lg"]
|
|
2413
2448
|
.field:where([data-hn-ui-combobox])) {
|
|
2449
|
+
--_item-row: calc(
|
|
2450
|
+
var(--ui-control-size-lg) - 2 * var(--ui-border-width) - 2 * var(--ui-space-1)
|
|
2451
|
+
);
|
|
2414
2452
|
min-block-size: 0;
|
|
2415
2453
|
}
|
|
2416
2454
|
:global(:scope[data-ui-combobox-state~="multiple"]:scope[data-ui-combobox-state~="size=lg"]
|
|
2417
2455
|
input:where([data-hn-ui-combobox])) {
|
|
2418
|
-
min-block-size:
|
|
2419
|
-
|
|
2456
|
+
min-block-size: var(--_item-row);
|
|
2457
|
+
}
|
|
2458
|
+
:global(:scope[data-ui-combobox-state~="multiple"]
|
|
2459
|
+
.entry.multiline:where([data-hn-ui-combobox])) {
|
|
2460
|
+
--_entry-row: max(var(--ui-badge-min-block-size, 1.5rem), var(--_item-row));
|
|
2461
|
+
flex-wrap: wrap !important;
|
|
2462
|
+
align-content: flex-start !important;
|
|
2463
|
+
max-block-size: calc(
|
|
2464
|
+
var(--_max-rows) * var(--_entry-row) + (var(--_max-rows) - 1) * var(--ui-space-1)
|
|
2420
2465
|
);
|
|
2466
|
+
overflow-x: hidden;
|
|
2467
|
+
overflow-y: auto;
|
|
2468
|
+
}
|
|
2469
|
+
:global(.entry.multiline .item:where([data-hn-ui-combobox])) {
|
|
2470
|
+
min-block-size: var(--_entry-row);
|
|
2421
2471
|
}
|
|
2422
2472
|
:global(.item:where([data-hn-ui-combobox])) {
|
|
2423
2473
|
appearance: none;
|
|
@@ -2753,6 +2803,7 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
|
|
|
2753
2803
|
}
|
|
2754
2804
|
:global(:where(.ui-combobox)[data-ui-combobox-state~="multiple"]
|
|
2755
2805
|
.field:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-combobox"]))):where([data-hn-ui-combobox])) {
|
|
2806
|
+
--_item-row: 1.75rem;
|
|
2756
2807
|
align-items: center !important;
|
|
2757
2808
|
min-block-size: var(--_ui-combobox-item-min-block-size, var(--_row));
|
|
2758
2809
|
padding: var(--ui-space-1) !important;
|
|
@@ -2773,28 +2824,44 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
|
|
|
2773
2824
|
max-block-size: none;
|
|
2774
2825
|
flex: 1 0 var(--_ui-combobox-item-input-min-inline-size, 5rem);
|
|
2775
2826
|
width: auto;
|
|
2776
|
-
min-block-size:
|
|
2827
|
+
min-block-size: var(--_item-row);
|
|
2777
2828
|
padding: var(--ui-space-0-5) var(--ui-space-1) !important;
|
|
2778
2829
|
}
|
|
2779
2830
|
:global(:where(.ui-combobox)[data-ui-combobox-state~="multiple"]:where(.ui-combobox)[data-ui-combobox-state~="size=sm"]
|
|
2780
2831
|
.field:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-combobox"]))):where([data-hn-ui-combobox])) {
|
|
2832
|
+
--_item-row: calc(var(--_row) - 2 * var(--ui-border-width) - 2 * var(--ui-space-0-5));
|
|
2781
2833
|
min-block-size: 0;
|
|
2782
2834
|
padding: var(--ui-space-0-5) !important;
|
|
2783
2835
|
}
|
|
2784
2836
|
:global(:where(.ui-combobox)[data-ui-combobox-state~="multiple"]:where(.ui-combobox)[data-ui-combobox-state~="size=sm"]
|
|
2785
2837
|
input:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-combobox"]))):where([data-hn-ui-combobox])) {
|
|
2786
|
-
min-block-size:
|
|
2838
|
+
min-block-size: var(--_item-row);
|
|
2787
2839
|
padding: 0 var(--ui-space-1) !important;
|
|
2788
2840
|
}
|
|
2789
2841
|
:global(:where(.ui-combobox)[data-ui-combobox-state~="multiple"]:where(.ui-combobox)[data-ui-combobox-state~="size=lg"]
|
|
2790
2842
|
.field:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-combobox"]))):where([data-hn-ui-combobox])) {
|
|
2843
|
+
--_item-row: calc(
|
|
2844
|
+
var(--ui-control-size-lg) - 2 * var(--ui-border-width) - 2 * var(--ui-space-1)
|
|
2845
|
+
);
|
|
2791
2846
|
min-block-size: 0;
|
|
2792
2847
|
}
|
|
2793
2848
|
:global(:where(.ui-combobox)[data-ui-combobox-state~="multiple"]:where(.ui-combobox)[data-ui-combobox-state~="size=lg"]
|
|
2794
2849
|
input:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-combobox"]))):where([data-hn-ui-combobox])) {
|
|
2795
|
-
min-block-size:
|
|
2796
|
-
|
|
2850
|
+
min-block-size: var(--_item-row);
|
|
2851
|
+
}
|
|
2852
|
+
:global(:where(.ui-combobox)[data-ui-combobox-state~="multiple"]
|
|
2853
|
+
.entry.multiline:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-combobox"]))):where([data-hn-ui-combobox])) {
|
|
2854
|
+
--_entry-row: max(var(--ui-badge-min-block-size, 1.5rem), var(--_item-row));
|
|
2855
|
+
flex-wrap: wrap !important;
|
|
2856
|
+
align-content: flex-start !important;
|
|
2857
|
+
max-block-size: calc(
|
|
2858
|
+
var(--_max-rows) * var(--_entry-row) + (var(--_max-rows) - 1) * var(--ui-space-1)
|
|
2797
2859
|
);
|
|
2860
|
+
overflow-x: hidden;
|
|
2861
|
+
overflow-y: auto;
|
|
2862
|
+
}
|
|
2863
|
+
:global(.entry.multiline:where(:scope, :scope *) .item:where([data-hn-ui-combobox])) {
|
|
2864
|
+
min-block-size: var(--_entry-row);
|
|
2798
2865
|
}
|
|
2799
2866
|
:global(.item:where(:scope, :scope *):where([data-hn-ui-combobox])) {
|
|
2800
2867
|
appearance: none;
|
package/vue/UiTopBar.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import { type InputBindings } from './props.js';
|
|
1
3
|
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
|
|
2
4
|
type __VLS_Slots = {} & {
|
|
3
5
|
leading?: (props: typeof __VLS_1) => any;
|
|
@@ -8,7 +10,21 @@ type __VLS_Slots = {} & {
|
|
|
8
10
|
} & {
|
|
9
11
|
actions?: (props: typeof __VLS_7) => any;
|
|
10
12
|
};
|
|
11
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
14
|
+
titleFor: {
|
|
15
|
+
type: PropType<string | null>;
|
|
16
|
+
};
|
|
17
|
+
"\0htmlNextInputStatus": {
|
|
18
|
+
type: PropType<InputBindings>;
|
|
19
|
+
};
|
|
20
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
titleFor: {
|
|
22
|
+
type: PropType<string | null>;
|
|
23
|
+
};
|
|
24
|
+
"\0htmlNextInputStatus": {
|
|
25
|
+
type: PropType<InputBindings>;
|
|
26
|
+
};
|
|
27
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
29
|
declare const _default: typeof __VLS_export;
|
|
14
30
|
export default _default;
|
package/vue/UiTopBar.vue
CHANGED
|
@@ -1,16 +1,162 @@
|
|
|
1
1
|
<!-- Generated by HTML Next 1.0.0-alpha.69 for Vue 3.5. Do not edit. -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
|
-
import {
|
|
3
|
+
import { computed, getCurrentInstance, provide, ref, watchSyncEffect } from 'vue'
|
|
4
|
+
import type { PropType } from 'vue'
|
|
5
|
+
import {
|
|
6
|
+
checkHydratedRoot,
|
|
7
|
+
createDispatch,
|
|
8
|
+
cycleCheckedComputed,
|
|
9
|
+
nativeAttrs,
|
|
10
|
+
useComponentHost,
|
|
11
|
+
useReflectedProp,
|
|
12
|
+
} from './host'
|
|
13
|
+
import { acceptsControllerWrite } from './props'
|
|
14
|
+
import {
|
|
15
|
+
BINDING_INPUTS_PROP,
|
|
16
|
+
checkedProp,
|
|
17
|
+
checkPropInput,
|
|
18
|
+
type InputBindings,
|
|
19
|
+
inputComputed,
|
|
20
|
+
inputDefault,
|
|
21
|
+
inputRead,
|
|
22
|
+
propValidityState,
|
|
23
|
+
READY_INPUT,
|
|
24
|
+
requireInputStatus,
|
|
25
|
+
UNRESOLVED_INPUT,
|
|
26
|
+
vPropValidity,
|
|
27
|
+
vuePropInputs,
|
|
28
|
+
} from './props'
|
|
4
29
|
|
|
5
30
|
defineOptions({ inheritAttrs: false })
|
|
6
31
|
|
|
32
|
+
const propValidityContract = {
|
|
33
|
+
props: {
|
|
34
|
+
titleFor: {
|
|
35
|
+
type: { kind: 'terminal', name: 'string' },
|
|
36
|
+
required: false,
|
|
37
|
+
target: { attribute: 'titlefor' },
|
|
38
|
+
description:
|
|
39
|
+
'The ID of the page heading represented by the default title slot. While that heading is visible below the sticky bar, its duplicate title is concealed.\n After the heading scrolls above the bar, the single-line title slides up and fades in. Leading and action slots stay available, and the bar keeps its\n size. Omit it for an always-visible title. Reduced motion removes the transition.',
|
|
40
|
+
default: '',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
} as const
|
|
44
|
+
const props = defineProps({
|
|
45
|
+
titleFor: { type: null as unknown as PropType<string | null> },
|
|
46
|
+
[BINDING_INPUTS_PROP]: { type: null as unknown as PropType<InputBindings> },
|
|
47
|
+
})
|
|
48
|
+
const acceptedProps: Record<string, unknown> = { titleFor: '' }
|
|
49
|
+
const inputTracking = vuePropInputs(
|
|
50
|
+
acceptedProps,
|
|
51
|
+
{ titleFor: '' },
|
|
52
|
+
(name, value, source, values) => {
|
|
53
|
+
switch (name) {
|
|
54
|
+
case 'titleFor':
|
|
55
|
+
return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
|
|
56
|
+
default:
|
|
57
|
+
return { ok: false }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
() => {
|
|
61
|
+
void checkedProps.value
|
|
62
|
+
},
|
|
63
|
+
)
|
|
64
|
+
const propInputs = inputTracking.inputs
|
|
65
|
+
const checkedProps = computed(() => {
|
|
66
|
+
void inputTracking.version.value
|
|
67
|
+
return ({
|
|
68
|
+
titleFor: propInputs.value<string | null>(
|
|
69
|
+
'titleFor',
|
|
70
|
+
props['titleFor'],
|
|
71
|
+
props[BINDING_INPUTS_PROP],
|
|
72
|
+
) as string,
|
|
73
|
+
})
|
|
74
|
+
})
|
|
75
|
+
const inputStatus = (name: string, handlesError: boolean) => {
|
|
76
|
+
void checkedProps.value
|
|
77
|
+
void inputTracking.version.value
|
|
78
|
+
return requireInputStatus(propInputs.status(name), handlesError)
|
|
79
|
+
}
|
|
80
|
+
void checkedProps.value
|
|
81
|
+
watchSyncEffect(() => {
|
|
82
|
+
void checkedProps.value
|
|
83
|
+
})
|
|
84
|
+
const reflectedProp = useReflectedProp()
|
|
85
|
+
const hydrationInstance = getCurrentInstance()
|
|
86
|
+
|
|
87
|
+
const root = ref<HTMLElement | null>(null)
|
|
88
|
+
const titleOutOfView = ref(false)
|
|
89
|
+
const titleHidden: ReturnType<typeof inputComputed<boolean | null>> = inputComputed<boolean | null>(
|
|
90
|
+
() =>
|
|
91
|
+
inputRead(checkedProps.value.titleFor, propInputs.status('titleFor')) !== ''
|
|
92
|
+
&& !inputRead(
|
|
93
|
+
titleOutOfView.value,
|
|
94
|
+
(titleOutOfView.value) === undefined ? UNRESOLVED_INPUT : READY_INPUT,
|
|
95
|
+
) as any,
|
|
96
|
+
(read) => {
|
|
97
|
+
const value = cycleCheckedComputed(read)
|
|
98
|
+
return { get: () => value.value }
|
|
99
|
+
},
|
|
100
|
+
)
|
|
101
|
+
provide('html-next:ui-top-bar:titleOutOfView', titleOutOfView)
|
|
7
102
|
checkHydratedRoot('header', 'ui-top-bar')
|
|
103
|
+
|
|
104
|
+
const dispatch = createDispatch(root)
|
|
105
|
+
|
|
106
|
+
useComponentHost(() => import('../components/ui-top-bar/ui-top-bar.js'), {
|
|
107
|
+
root,
|
|
108
|
+
module: true,
|
|
109
|
+
dispatch,
|
|
110
|
+
acceptsState: (name: string, keys: readonly string[], value: unknown) =>
|
|
111
|
+
acceptsControllerWrite(
|
|
112
|
+
value,
|
|
113
|
+
({ titleOutOfView: { kind: 'terminal', name: 'boolean' } } as Record<string, any>)[name],
|
|
114
|
+
keys,
|
|
115
|
+
),
|
|
116
|
+
initials: { titleOutOfView: false },
|
|
117
|
+
controllerSource: {
|
|
118
|
+
specifier: '../components/ui-top-bar/ui-top-bar.js',
|
|
119
|
+
definition: './components/ui-top-bar/ui-top-bar.html',
|
|
120
|
+
},
|
|
121
|
+
props: checkedProps,
|
|
122
|
+
inputs: propInputs,
|
|
123
|
+
inputTracking,
|
|
124
|
+
propInputs: (name: string) => {
|
|
125
|
+
const incoming = hydrationInstance?.vnode.props
|
|
126
|
+
const kebab = name.replace(/[A-Z]/g, (letter) => '-' + letter.toLowerCase())
|
|
127
|
+
return incoming !== null && incoming !== undefined
|
|
128
|
+
? (incoming[name] ?? incoming[kebab] ?? null)
|
|
129
|
+
: null
|
|
130
|
+
},
|
|
131
|
+
propNames: ['titleFor'],
|
|
132
|
+
propValidity: (name: string) =>
|
|
133
|
+
propValidityState({ contract: propValidityContract, values: { ...props } }, name),
|
|
134
|
+
state: { titleOutOfView },
|
|
135
|
+
computed: { titleHidden },
|
|
136
|
+
availability: { titleHidden: () => titleHidden.status() },
|
|
137
|
+
})
|
|
8
138
|
</script>
|
|
9
139
|
|
|
10
140
|
<template>
|
|
11
|
-
<header
|
|
141
|
+
<header
|
|
142
|
+
class="ui-top-bar"
|
|
143
|
+
v-bind="nativeAttrs($attrs)"
|
|
144
|
+
data-hn
|
|
145
|
+
data-hn-ui-top-bar
|
|
146
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
|
|
147
|
+
:data-ui-top-bar-prop-title-for="reflectedProp('titleFor', 'title-for', checkedProps.titleFor, undefined, false)"
|
|
148
|
+
ref="root"
|
|
149
|
+
>
|
|
12
150
|
<div class="leading" data-hn-ui-top-bar><slot name="leading" /></div>
|
|
13
|
-
<div
|
|
151
|
+
<div
|
|
152
|
+
class="title"
|
|
153
|
+
data-hn-ui-top-bar
|
|
154
|
+
:aria-hidden="titleHidden.get() ?? undefined"
|
|
155
|
+
:inert="titleHidden.get() ?? undefined"
|
|
156
|
+
:class="{ 'scroll-title': checkedProps.titleFor !== '', concealed: titleHidden.get() }"
|
|
157
|
+
>
|
|
158
|
+
<slot />
|
|
159
|
+
</div>
|
|
14
160
|
<div class="search" data-hn-ui-top-bar><slot name="search" /></div>
|
|
15
161
|
<div class="actions" data-hn-ui-top-bar><slot name="actions" /></div>
|
|
16
162
|
</header>
|
|
@@ -60,6 +206,28 @@ checkHydratedRoot('header', 'ui-top-bar')
|
|
|
60
206
|
min-inline-size: 0;
|
|
61
207
|
flex: 1;
|
|
62
208
|
}
|
|
209
|
+
:global(.title.scroll-title:where([data-hn-ui-top-bar])) {
|
|
210
|
+
overflow: hidden;
|
|
211
|
+
white-space: nowrap;
|
|
212
|
+
text-overflow: ellipsis;
|
|
213
|
+
opacity: 1;
|
|
214
|
+
transform: translateY(0);
|
|
215
|
+
transition:
|
|
216
|
+
opacity var(--ui-motion-fast) var(--ui-motion-ease),
|
|
217
|
+
transform var(--ui-motion-fast) var(--ui-motion-ease);
|
|
218
|
+
}
|
|
219
|
+
:global(.title.scroll-title.concealed:where([data-hn-ui-top-bar])) {
|
|
220
|
+
opacity: 0;
|
|
221
|
+
transform: translateY(var(--ui-space-2));
|
|
222
|
+
pointer-events: none;
|
|
223
|
+
}
|
|
224
|
+
@media (prefers-reduced-motion: reduce) {
|
|
225
|
+
:global(.title.scroll-title:where([data-hn-ui-top-bar])),
|
|
226
|
+
:global(.title.scroll-title.concealed:where([data-hn-ui-top-bar])) {
|
|
227
|
+
transition: none;
|
|
228
|
+
transform: none;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
63
231
|
:global(.leading:empty:where([data-hn-ui-top-bar])),
|
|
64
232
|
:global(.search:empty:where([data-hn-ui-top-bar])),
|
|
65
233
|
:global(.actions:empty:where([data-hn-ui-top-bar])) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as useReflectedProp, S as useComponentHost, _ as nativeAttrs, a as checkHydratedRoot, s as createDispatch, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as checkPropInput, f as propValidityState, g as vuePropInputs, h as vPropValidity, i as acceptsControllerWrite, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
3
|
import { computed, createElementBlock, defineComponent, getCurrentInstance, mergeProps, openBlock, provide, ref, renderSlot, unref, watchSyncEffect, withDirectives } from "vue";
|
|
4
4
|
//#region .build/vue/UiAffordanceScope.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = [
|
package/vue/chunks/UiAvatar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as useReflectedProp, S as useComponentHost, _ as nativeAttrs, a as checkHydratedRoot, s as createDispatch, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as checkPropInput, f as propValidityState, g as vuePropInputs, h as vPropValidity, i as acceptsControllerWrite, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
3
|
import { t as UiIcon_default } from "./UiIcon.js";
|
|
4
4
|
import { computed, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, provide, ref, renderSlot, toDisplayString, unref, useTemplateRef, watchSyncEffect, withDirectives } from "vue";
|
|
5
5
|
//#region .build/vue/UiAvatar.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as useReflectedProp, S as useComponentHost, _ as nativeAttrs, a as checkHydratedRoot, s as createDispatch, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as checkPropInput, f as propValidityState, g as vuePropInputs, h as vPropValidity, i as acceptsControllerWrite, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
3
|
import { computed, createElementBlock, createElementVNode, createTextVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, provide, ref, renderSlot, toDisplayString, unref, useTemplateRef, watchSyncEffect, withDirectives } from "vue";
|
|
4
4
|
//#region .build/vue/UiAvatarGroup.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = [
|
package/vue/chunks/UiBadge.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as useReflectedProp, _ as nativeAttrs, a as checkHydratedRoot, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as checkPropInput, g as vuePropInputs, h as vPropValidity, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
3
|
import { computed, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeProps, openBlock, renderSlot, toDisplayString, unref, watchSyncEffect, withDirectives } from "vue";
|
|
4
4
|
//#region .build/vue/UiBadge.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as useReflectedProp, _ as nativeAttrs, a as checkHydratedRoot, i as attribute, o as concat, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as checkPropInput, g as vuePropInputs, h as vPropValidity, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
3
|
import { t as UiIcon_default } from "./UiIcon.js";
|
|
4
4
|
import { computed, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, openBlock, renderSlot, toDisplayString, unref, watchSyncEffect, withDirectives } from "vue";
|
|
5
5
|
//#region .build/vue/UiBreadcrumbItem.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as useReflectedProp, _ as nativeAttrs, a as checkHydratedRoot, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as checkPropInput, g as vuePropInputs, h as vPropValidity, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
3
|
import { computed, createElementBlock, createElementVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, watchSyncEffect, withDirectives } from "vue";
|
|
4
4
|
//#region .build/vue/UiBreadcrumbs.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = ["aria-label", "data-ui-breadcrumbs-prop-label"];
|
package/vue/chunks/UiButton.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as useReflectedProp, S as useComponentHost, _ as nativeAttrs, a as checkHydratedRoot, c as cycleCheckedComputed, i as attribute, o as concat, s as createDispatch, t as _plugin_vue_export_helper_default, y as preserveRootFocus } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as checkPropInput, d as inputRead, f as propValidityState, g as vuePropInputs, h as vPropValidity, l as inputComputed, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
3
|
import { t as UiIcon_default } from "./UiIcon.js";
|
|
4
4
|
import { t as UiSpinner_default } from "./UiSpinner.js";
|
|
5
5
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, renderSlot, toDisplayString, unref, useTemplateRef, watchSyncEffect, withDirectives } from "vue";
|
package/vue/chunks/UiCallout.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as useReflectedProp, _ as nativeAttrs, a as checkHydratedRoot, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as checkPropInput, g as vuePropInputs, h as vPropValidity, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
3
|
import { computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeProps, openBlock, renderSlot, toDisplayString, unref, watchSyncEffect, withDirectives } from "vue";
|
|
4
4
|
//#region .build/vue/UiCallout.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = [
|
package/vue/chunks/UiCard.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as useReflectedProp, _ as nativeAttrs, a as checkHydratedRoot, t as _plugin_vue_export_helper_default, y as preserveRootFocus } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as checkPropInput, g as vuePropInputs, h as vPropValidity, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
3
|
import { computed, createElementBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, useTemplateRef, watchSyncEffect, withDirectives } from "vue";
|
|
4
4
|
//#region .build/vue/UiCard.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = [
|
package/vue/chunks/UiCheckbox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as useReflectedProp, S as useComponentHost, _ as nativeAttrs, a as checkHydratedRoot, s as createDispatch, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as checkPropInput, f as propValidityState, g as vuePropInputs, h as vPropValidity, i as acceptsControllerWrite, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
3
|
import { r as vBindControl } from "./control.js";
|
|
4
4
|
import { computed, createElementBlock, createElementVNode, createTextVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, provide, ref, renderSlot, toDisplayString, unref, useTemplateRef, watchSyncEffect, withDirectives } from "vue";
|
|
5
5
|
//#region .build/vue/UiCheckbox.vue?vue&type=script&setup=true&lang.ts
|
package/vue/chunks/UiCluster.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as useReflectedProp, _ as nativeAttrs, a as checkHydratedRoot, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as checkPropInput, g as vuePropInputs, h as vPropValidity, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
3
|
import { computed, createElementBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, watchSyncEffect, withDirectives } from "vue";
|
|
4
4
|
//#region .build/vue/UiCluster.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as useReflectedProp, S as useComponentHost, _ as nativeAttrs, a as checkHydratedRoot, s as createDispatch, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as checkPropInput, f as propValidityState, g as vuePropInputs, h as vPropValidity, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
3
|
import { t as UiIcon_default } from "./UiIcon.js";
|
|
4
4
|
import { t as UiButton_default } from "./UiButton.js";
|
|
5
5
|
import { t as UiInput_default } from "./UiInput.js";
|