@threadlabs/looma 0.23.15 → 0.23.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ui-avatar/ui-avatar.html +1 -1
- package/components/ui-avatar-group/ui-avatar-group.html +1 -3
- package/components/ui-breadcrumb-item/ui-breadcrumb-item.html +1 -1
- package/components/ui-button/ui-button.html +4 -4
- package/components/ui-combobox/ui-combobox.html +19 -21
- package/components/ui-description-item/ui-description-item.html +1 -1
- package/components/ui-dialog/ui-dialog.html +1 -1
- package/components/ui-disclosure/ui-disclosure.html +1 -1
- package/components/ui-editable/ui-editable.html +4 -4
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +1 -1
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +2 -2
- package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +2 -2
- package/components/ui-editor-slash-menu-group/ui-editor-slash-menu-group.html +1 -1
- package/components/ui-editor-slash-menu-item/ui-editor-slash-menu-item.html +1 -1
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +2 -2
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +2 -2
- package/components/ui-icon-button/ui-icon-button.html +28 -1
- package/components/ui-listbox/ui-listbox.html +2 -2
- package/components/ui-menu-group/ui-menu-group.html +1 -1
- package/components/ui-menu-item/ui-menu-item.html +1 -1
- package/components/ui-meter/ui-meter.html +7 -8
- package/components/ui-nav-item/ui-nav-item.html +2 -2
- package/components/ui-radio-group/ui-radio-group.html +1 -1
- package/components/ui-section/ui-section.html +1 -1
- package/components/ui-spinner/ui-spinner.html +4 -4
- package/components/ui-status-message/ui-status-message.html +2 -2
- package/components/ui-tabs/ui-tabs.html +1 -1
- package/components/ui-toast-region/ui-toast-region.html +1 -1
- package/components/ui-tree-item/ui-tree-item.html +3 -3
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/styles/ui-action-bar.css +1 -1
- package/styles/ui-affordance-scope.css +1 -1
- package/styles/ui-avatar-group.css +1 -1
- package/styles/ui-avatar.css +1 -1
- package/styles/ui-badge.css +1 -1
- package/styles/ui-breadcrumb-item.css +1 -1
- package/styles/ui-breadcrumbs.css +1 -1
- package/styles/ui-button.css +1 -1
- package/styles/ui-callout.css +1 -1
- package/styles/ui-card.css +1 -1
- package/styles/ui-checkbox.css +1 -1
- package/styles/ui-cluster.css +1 -1
- package/styles/ui-combobox.css +1 -1
- package/styles/ui-container.css +1 -1
- package/styles/ui-context-menu.css +1 -1
- package/styles/ui-cover.css +1 -1
- package/styles/ui-description-item.css +1 -1
- package/styles/ui-description-list.css +1 -1
- package/styles/ui-dialog.css +1 -1
- package/styles/ui-disclosure.css +1 -1
- package/styles/ui-editable.css +1 -1
- package/styles/ui-editor-insert-table-grid.css +1 -1
- package/styles/ui-editor-mention-menu-item.css +1 -1
- package/styles/ui-editor-mention-menu.css +1 -1
- package/styles/ui-editor-slash-menu-group.css +1 -1
- package/styles/ui-editor-slash-menu-item.css +1 -1
- package/styles/ui-editor-slash-menu.css +1 -1
- package/styles/ui-editor-table-context-menu.css +1 -1
- package/styles/ui-editor-table-overlay.css +1 -1
- package/styles/ui-editor-table-toolbar.css +1 -1
- package/styles/ui-editor-toolbar.css +1 -1
- package/styles/ui-floating-action-button.css +1 -1
- package/styles/ui-form-field.css +1 -1
- package/styles/ui-grid.css +1 -1
- package/styles/ui-icon-button.css +29 -1
- package/styles/ui-icon.css +1 -1
- package/styles/ui-input-group.css +1 -1
- package/styles/ui-input.css +1 -1
- package/styles/ui-list-item.css +1 -1
- package/styles/ui-list.css +1 -1
- package/styles/ui-listbox.css +1 -1
- package/styles/ui-menu-group.css +1 -1
- package/styles/ui-menu-item.css +1 -1
- package/styles/ui-menu.css +1 -1
- package/styles/ui-meter.css +1 -1
- package/styles/ui-nav-item.css +1 -1
- package/styles/ui-page-header.css +1 -1
- package/styles/ui-popover.css +1 -1
- package/styles/ui-radio-group.css +1 -1
- package/styles/ui-radio.css +1 -1
- package/styles/ui-reel.css +1 -1
- package/styles/ui-scroll-area.css +1 -1
- package/styles/ui-search-result-row.css +1 -1
- package/styles/ui-search-shell.css +1 -1
- package/styles/ui-section.css +1 -1
- package/styles/ui-select.css +1 -1
- package/styles/ui-separator.css +1 -1
- package/styles/ui-sidebar.css +1 -1
- package/styles/ui-spinner.css +1 -1
- package/styles/ui-stack.css +1 -1
- package/styles/ui-status-message.css +1 -1
- package/styles/ui-switch.css +1 -1
- package/styles/ui-switcher.css +1 -1
- package/styles/ui-table.css +1 -1
- package/styles/ui-tabs.css +1 -1
- package/styles/ui-text.css +1 -1
- package/styles/ui-textarea.css +1 -1
- package/styles/ui-toast-region.css +1 -1
- package/styles/ui-toast.css +1 -1
- package/styles/ui-tooltip.css +1 -1
- package/styles/ui-top-bar.css +1 -1
- package/styles/ui-tree-item.css +1 -1
- package/styles/ui-tree.css +1 -1
- package/vanilla/UiActionBar.d.ts +1 -1
- package/vanilla/UiActionBar.js +1 -1
- package/vanilla/UiAffordanceScope.d.ts +1 -1
- package/vanilla/UiAffordanceScope.js +1 -1
- package/vanilla/UiAvatar.d.ts +1 -1
- package/vanilla/UiAvatar.js +9 -7
- package/vanilla/UiAvatarGroup.d.ts +1 -1
- package/vanilla/UiAvatarGroup.js +4 -4
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +1 -1
- package/vanilla/UiBreadcrumbItem.d.ts +1 -1
- package/vanilla/UiBreadcrumbItem.js +2 -2
- package/vanilla/UiBreadcrumbs.d.ts +1 -1
- package/vanilla/UiBreadcrumbs.js +1 -1
- package/vanilla/UiButton.d.ts +1 -1
- package/vanilla/UiButton.js +2 -2
- package/vanilla/UiCallout.d.ts +1 -1
- package/vanilla/UiCallout.js +1 -1
- package/vanilla/UiCard.d.ts +1 -1
- package/vanilla/UiCard.js +1 -1
- package/vanilla/UiCheckbox.d.ts +1 -1
- package/vanilla/UiCheckbox.js +1 -1
- package/vanilla/UiCluster.d.ts +1 -1
- package/vanilla/UiCluster.js +1 -1
- package/vanilla/UiCombobox.d.ts +1 -1
- package/vanilla/UiCombobox.js +29 -25
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +1 -1
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +1 -1
- package/vanilla/UiCover.d.ts +1 -1
- package/vanilla/UiCover.js +1 -1
- package/vanilla/UiDescriptionItem.d.ts +1 -1
- package/vanilla/UiDescriptionItem.js +5 -5
- package/vanilla/UiDescriptionList.d.ts +1 -1
- package/vanilla/UiDescriptionList.js +1 -1
- package/vanilla/UiDialog.d.ts +1 -1
- package/vanilla/UiDialog.js +16 -14
- package/vanilla/UiDisclosure.d.ts +1 -1
- package/vanilla/UiDisclosure.js +4 -4
- package/vanilla/UiEditable.d.ts +1 -1
- package/vanilla/UiEditable.js +35 -27
- package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
- package/vanilla/UiEditorInsertTableGrid.js +20 -18
- package/vanilla/UiEditorMentionMenu.d.ts +1 -1
- package/vanilla/UiEditorMentionMenu.js +27 -25
- package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
- package/vanilla/UiEditorMentionMenuItem.js +6 -4
- package/vanilla/UiEditorSlashMenu.d.ts +1 -1
- package/vanilla/UiEditorSlashMenu.js +1 -1
- package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuGroup.js +9 -7
- package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuItem.js +4 -2
- package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +2 -2
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +1 -1
- package/vanilla/UiEditorTableToolbar.d.ts +1 -1
- package/vanilla/UiEditorTableToolbar.js +2 -2
- package/vanilla/UiEditorToolbar.d.ts +1 -1
- package/vanilla/UiEditorToolbar.js +1 -1
- package/vanilla/UiFloatingActionButton.d.ts +1 -1
- package/vanilla/UiFloatingActionButton.js +1 -1
- package/vanilla/UiFormField.d.ts +1 -1
- package/vanilla/UiFormField.js +1 -1
- package/vanilla/UiGrid.d.ts +1 -1
- package/vanilla/UiGrid.js +1 -1
- package/vanilla/UiIcon.d.ts +1 -1
- package/vanilla/UiIcon.js +1 -1
- package/vanilla/UiIconButton.d.ts +2 -1
- package/vanilla/UiIconButton.js +5 -2
- package/vanilla/UiInput.d.ts +1 -1
- package/vanilla/UiInput.js +1 -1
- package/vanilla/UiInputGroup.d.ts +1 -1
- package/vanilla/UiInputGroup.js +1 -1
- package/vanilla/UiList.d.ts +1 -1
- package/vanilla/UiList.js +1 -1
- package/vanilla/UiListItem.d.ts +1 -1
- package/vanilla/UiListItem.js +1 -1
- package/vanilla/UiListbox.d.ts +1 -1
- package/vanilla/UiListbox.js +2 -2
- package/vanilla/UiMenu.d.ts +1 -1
- package/vanilla/UiMenu.js +1 -1
- package/vanilla/UiMenuGroup.d.ts +1 -1
- package/vanilla/UiMenuGroup.js +4 -2
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +2 -2
- package/vanilla/UiMeter.d.ts +1 -1
- package/vanilla/UiMeter.js +2 -2
- package/vanilla/UiNavItem.d.ts +1 -1
- package/vanilla/UiNavItem.js +2 -2
- package/vanilla/UiPageHeader.d.ts +1 -1
- package/vanilla/UiPageHeader.js +1 -1
- package/vanilla/UiPopover.d.ts +1 -1
- package/vanilla/UiPopover.js +1 -1
- package/vanilla/UiRadio.d.ts +1 -1
- package/vanilla/UiRadio.js +1 -1
- package/vanilla/UiRadioGroup.d.ts +1 -1
- package/vanilla/UiRadioGroup.js +4 -4
- package/vanilla/UiReel.d.ts +1 -1
- package/vanilla/UiReel.js +1 -1
- package/vanilla/UiScrollArea.d.ts +1 -1
- package/vanilla/UiScrollArea.js +1 -1
- package/vanilla/UiSearchResultRow.d.ts +1 -1
- package/vanilla/UiSearchResultRow.js +1 -1
- package/vanilla/UiSearchShell.d.ts +1 -1
- package/vanilla/UiSearchShell.js +1 -1
- package/vanilla/UiSection.d.ts +1 -1
- package/vanilla/UiSection.js +4 -4
- package/vanilla/UiSelect.d.ts +1 -1
- package/vanilla/UiSelect.js +1 -1
- package/vanilla/UiSeparator.d.ts +1 -1
- package/vanilla/UiSeparator.js +1 -1
- package/vanilla/UiSidebar.d.ts +1 -1
- package/vanilla/UiSidebar.js +1 -1
- package/vanilla/UiSpinner.d.ts +1 -1
- package/vanilla/UiSpinner.js +2 -2
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +1 -1
- package/vanilla/UiStatusMessage.d.ts +1 -1
- package/vanilla/UiStatusMessage.js +4 -4
- package/vanilla/UiSwitch.d.ts +1 -1
- package/vanilla/UiSwitch.js +1 -1
- package/vanilla/UiSwitcher.d.ts +1 -1
- package/vanilla/UiSwitcher.js +1 -1
- package/vanilla/UiTable.d.ts +1 -1
- package/vanilla/UiTable.js +1 -1
- package/vanilla/UiTabs.d.ts +1 -1
- package/vanilla/UiTabs.js +2 -2
- package/vanilla/UiText.d.ts +1 -1
- package/vanilla/UiText.js +1 -1
- package/vanilla/UiTextarea.d.ts +1 -1
- package/vanilla/UiTextarea.js +1 -1
- package/vanilla/UiToast.d.ts +1 -1
- package/vanilla/UiToast.js +1 -1
- package/vanilla/UiToastRegion.d.ts +1 -1
- package/vanilla/UiToastRegion.js +2 -2
- package/vanilla/UiTooltip.d.ts +1 -1
- package/vanilla/UiTooltip.js +1 -1
- package/vanilla/UiTopBar.d.ts +1 -1
- package/vanilla/UiTopBar.js +1 -1
- package/vanilla/UiTree.d.ts +1 -1
- package/vanilla/UiTree.js +1 -1
- package/vanilla/UiTreeItem.d.ts +1 -1
- package/vanilla/UiTreeItem.js +4 -4
- package/vue/UiActionBar.vue +1 -1
- package/vue/UiAffordanceScope.vue +1 -1
- package/vue/UiAvatar.vue +1 -1
- package/vue/UiAvatarGroup.vue +9 -2
- package/vue/UiBadge.vue +1 -1
- package/vue/UiBreadcrumbItem.vue +55 -9
- package/vue/UiBreadcrumbs.vue +1 -1
- package/vue/UiButton.vue +162 -37
- package/vue/UiCallout.vue +1 -1
- package/vue/UiCard.vue +1 -1
- package/vue/UiCheckbox.vue +8 -1
- package/vue/UiCluster.vue +1 -1
- package/vue/UiCombobox.d.ts +1 -1
- package/vue/UiCombobox.vue +190 -73
- package/vue/UiContainer.vue +1 -1
- package/vue/UiContextMenu.vue +1 -1
- package/vue/UiCover.vue +1 -1
- package/vue/UiDescriptionItem.vue +1 -1
- package/vue/UiDescriptionList.vue +1 -1
- package/vue/UiDialog.vue +1 -1
- package/vue/UiDisclosure.vue +1 -1
- package/vue/UiEditable.vue +9 -4
- package/vue/UiEditorInsertTableGrid.vue +19 -2
- package/vue/UiEditorMentionMenu.vue +20 -2
- package/vue/UiEditorMentionMenuItem.vue +1 -1
- package/vue/UiEditorSlashMenu.vue +1 -1
- package/vue/UiEditorSlashMenuGroup.vue +1 -1
- package/vue/UiEditorSlashMenuItem.vue +1 -1
- package/vue/UiEditorTableContextMenu.vue +46 -5
- package/vue/UiEditorTableOverlay.vue +55 -26
- package/vue/UiEditorTableToolbar.vue +46 -5
- package/vue/UiEditorToolbar.vue +1 -1
- package/vue/UiFloatingActionButton.vue +1 -1
- package/vue/UiFormField.vue +1 -1
- package/vue/UiGrid.vue +1 -1
- package/vue/UiIcon.vue +1 -1
- package/vue/UiIconButton.d.ts +9 -0
- package/vue/UiIconButton.vue +104 -14
- package/vue/UiInput.vue +1 -1
- package/vue/UiInputGroup.vue +1 -1
- package/vue/UiList.vue +1 -1
- package/vue/UiListItem.vue +1 -1
- package/vue/UiListbox.vue +47 -13
- package/vue/UiMenu.vue +1 -1
- package/vue/UiMenuGroup.vue +1 -1
- package/vue/UiMenuItem.vue +46 -10
- package/vue/UiMeter.d.ts +2 -2
- package/vue/UiMeter.vue +675 -97
- package/vue/UiNavItem.vue +97 -39
- package/vue/UiPageHeader.vue +1 -1
- package/vue/UiPopover.vue +1 -1
- package/vue/UiRadio.vue +8 -1
- package/vue/UiRadioGroup.vue +1 -1
- package/vue/UiReel.vue +1 -1
- package/vue/UiScrollArea.vue +1 -1
- package/vue/UiSearchResultRow.vue +1 -1
- package/vue/UiSearchShell.vue +1 -1
- package/vue/UiSection.vue +1 -1
- package/vue/UiSelect.vue +1 -1
- package/vue/UiSeparator.vue +1 -1
- package/vue/UiSidebar.vue +1 -1
- package/vue/UiSpinner.vue +159 -31
- package/vue/UiStack.vue +1 -1
- package/vue/UiStatusMessage.vue +42 -4
- package/vue/UiSwitch.vue +8 -1
- package/vue/UiSwitcher.vue +1 -1
- package/vue/UiTable.vue +1 -1
- package/vue/UiTabs.vue +20 -2
- package/vue/UiText.d.ts +1 -1
- package/vue/UiText.vue +1 -1
- package/vue/UiTextarea.vue +1 -1
- package/vue/UiToast.vue +1 -1
- package/vue/UiToastRegion.vue +20 -2
- package/vue/UiTooltip.vue +1 -1
- package/vue/UiTopBar.vue +1 -1
- package/vue/UiTree.vue +1 -1
- package/vue/UiTreeItem.vue +113 -25
- 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 +7 -2
- package/vue/chunks/UiBadge.js +1 -1
- package/vue/chunks/UiBreadcrumbItem.js +27 -12
- package/vue/chunks/UiBreadcrumbs.js +1 -1
- package/vue/chunks/UiButton.js +67 -29
- package/vue/chunks/UiCallout.js +1 -1
- package/vue/chunks/UiCard.js +1 -1
- package/vue/chunks/UiCheckbox.js +6 -1
- package/vue/chunks/UiCluster.js +1 -1
- package/vue/chunks/UiCombobox.js +155 -56
- package/vue/chunks/UiContainer.js +1 -1
- package/vue/chunks/UiContextMenu.js +1 -1
- package/vue/chunks/UiCover.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 +10 -5
- package/vue/chunks/UiEditorInsertTableGrid.js +18 -3
- package/vue/chunks/UiEditorMentionMenu.js +8 -2
- 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/UiEditorTableContextMenu.js +13 -7
- package/vue/chunks/UiEditorTableOverlay.js +43 -23
- package/vue/chunks/UiEditorTableToolbar.js +13 -7
- 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 +48 -11
- 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/UiListbox.js +29 -15
- package/vue/chunks/UiMenu.js +1 -1
- package/vue/chunks/UiMenuGroup.js +1 -1
- package/vue/chunks/UiMenuItem.js +23 -9
- package/vue/chunks/UiMeter.js +373 -37
- package/vue/chunks/UiNavItem.js +67 -39
- package/vue/chunks/UiPageHeader.js +1 -1
- package/vue/chunks/UiPopover.js +1 -1
- package/vue/chunks/UiRadio.js +6 -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/UiSpinner.js +75 -36
- package/vue/chunks/UiStack.js +1 -1
- package/vue/chunks/UiStatusMessage.js +21 -6
- package/vue/chunks/UiSwitch.js +6 -1
- package/vue/chunks/UiSwitcher.js +1 -1
- package/vue/chunks/UiTable.js +1 -1
- package/vue/chunks/UiTabs.js +8 -2
- 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 +8 -2
- 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 +52 -19
- package/vue/chunks/props.js +11 -6
- package/vue/components.css +1321 -1298
- package/vue/host.ts +15 -3
package/vue/chunks/UiMeter.js
CHANGED
|
@@ -17,6 +17,227 @@ var _hoisted_1 = [
|
|
|
17
17
|
"data-value-text",
|
|
18
18
|
"data-ui-meter-state"
|
|
19
19
|
];
|
|
20
|
+
function createFormatValue() {
|
|
21
|
+
const cache = /* @__PURE__ */ new Map();
|
|
22
|
+
function formatterFor(name, locale, options) {
|
|
23
|
+
const constructor = Reflect.get(Intl, name);
|
|
24
|
+
if (name === "DateTimeFormat" && options.timeZone === void 0) return new constructor(locale, options);
|
|
25
|
+
const entries = [];
|
|
26
|
+
for (const key of Object.keys(options).sort()) {
|
|
27
|
+
const value = options[key];
|
|
28
|
+
if (value === void 0) continue;
|
|
29
|
+
if (value !== null && typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number" || typeof value === "number" && !Number.isFinite(value)) return new constructor(locale, options);
|
|
30
|
+
entries.push([
|
|
31
|
+
key,
|
|
32
|
+
typeof value,
|
|
33
|
+
Object.is(value, -0) ? "-0" : value
|
|
34
|
+
]);
|
|
35
|
+
}
|
|
36
|
+
const language = locale === void 0 && typeof navigator !== "undefined" ? navigator.language : void 0;
|
|
37
|
+
const key = JSON.stringify([
|
|
38
|
+
name,
|
|
39
|
+
locale,
|
|
40
|
+
language,
|
|
41
|
+
entries
|
|
42
|
+
]);
|
|
43
|
+
if (key.length > 4096) return new constructor(locale, options);
|
|
44
|
+
const cached = cache.get(key);
|
|
45
|
+
if (cached !== void 0 && cached.constructor === constructor) return cached.value;
|
|
46
|
+
const value = new constructor(locale, options);
|
|
47
|
+
if (cache.size >= 128 && !cache.has(key)) cache.delete(cache.keys().next().value);
|
|
48
|
+
cache.set(key, {
|
|
49
|
+
constructor,
|
|
50
|
+
value
|
|
51
|
+
});
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The native Intl adapter. Self-contained so converters emit this same implementation only when
|
|
56
|
+
* authored expressions use formatting, without importing the live parser or interpreter.
|
|
57
|
+
* undefined is absence; the shared invalid-result symbol tells each target to retain its output.
|
|
58
|
+
*/
|
|
59
|
+
return function formatValue(value, inputType, operation, ...args) {
|
|
60
|
+
const invalid = Symbol.for("html-next.invalid-result");
|
|
61
|
+
if (value === invalid || args.includes(invalid)) return invalid;
|
|
62
|
+
if (value === void 0 || value === null || args.some((arg) => arg === void 0)) return;
|
|
63
|
+
const end = operation === "formatRange" ? args.shift() : void 0;
|
|
64
|
+
if (operation === "formatRange" && (end === null || end === void 0)) return;
|
|
65
|
+
const format = typeof args[0] === "string" ? args.shift() : Reflect.get({
|
|
66
|
+
number: "number",
|
|
67
|
+
integer: "number",
|
|
68
|
+
percentage: "percent",
|
|
69
|
+
date: "date",
|
|
70
|
+
time: "time",
|
|
71
|
+
datetime: "dateTime",
|
|
72
|
+
"datetime-local": "dateTime",
|
|
73
|
+
duration: "duration",
|
|
74
|
+
list: "list"
|
|
75
|
+
}, inputType ?? "");
|
|
76
|
+
const options = args.length > 0 ? args.shift() : {};
|
|
77
|
+
const locale = args.shift();
|
|
78
|
+
if (args.length > 0 || !format || options === null || typeof options !== "object" || Array.isArray(options) || locale !== void 0 && typeof locale !== "string") return invalid;
|
|
79
|
+
try {
|
|
80
|
+
const durationFields = [
|
|
81
|
+
"years",
|
|
82
|
+
"months",
|
|
83
|
+
"weeks",
|
|
84
|
+
"days",
|
|
85
|
+
"hours",
|
|
86
|
+
"minutes",
|
|
87
|
+
"seconds",
|
|
88
|
+
"milliseconds",
|
|
89
|
+
"microseconds",
|
|
90
|
+
"nanoseconds"
|
|
91
|
+
];
|
|
92
|
+
const settings = { ...options };
|
|
93
|
+
let formatter;
|
|
94
|
+
let input = value;
|
|
95
|
+
let last = end;
|
|
96
|
+
let zoneFree = false;
|
|
97
|
+
if ([
|
|
98
|
+
"number",
|
|
99
|
+
"currency",
|
|
100
|
+
"percent",
|
|
101
|
+
"unit"
|
|
102
|
+
].includes(format)) {
|
|
103
|
+
if (format !== "number") {
|
|
104
|
+
if (settings.style !== void 0 && settings.style !== format) return invalid;
|
|
105
|
+
settings.style = format;
|
|
106
|
+
}
|
|
107
|
+
const quantity = (candidate) => {
|
|
108
|
+
if (inputType === "percentage" && typeof candidate === "string" && /^-?(?:\d+(?:\.\d+)?|\.\d+)%$/.test(candidate)) return Number(candidate.slice(0, -1)) / 100;
|
|
109
|
+
return candidate;
|
|
110
|
+
};
|
|
111
|
+
input = quantity(input);
|
|
112
|
+
last = quantity(last);
|
|
113
|
+
if (typeof input !== "number" || !Number.isFinite(input) || operation === "formatRange" && (typeof last !== "number" || !Number.isFinite(last))) return invalid;
|
|
114
|
+
formatter = formatterFor("NumberFormat", locale, settings);
|
|
115
|
+
} else if ([
|
|
116
|
+
"date",
|
|
117
|
+
"time",
|
|
118
|
+
"dateTime"
|
|
119
|
+
].includes(format)) {
|
|
120
|
+
const civil = inputType === "date" || inputType === "time" || inputType === "datetime-local" || typeof input === "string" && !/(?:Z|[+-]\d\d:\d\d)$/.test(input);
|
|
121
|
+
zoneFree = civil;
|
|
122
|
+
if (civil && (settings.timeZone !== void 0 || settings.timeZoneName !== void 0)) return invalid;
|
|
123
|
+
if (format === "date" && (settings.timeStyle !== void 0 || [
|
|
124
|
+
"hour",
|
|
125
|
+
"minute",
|
|
126
|
+
"second",
|
|
127
|
+
"dayPeriod",
|
|
128
|
+
"fractionalSecondDigits"
|
|
129
|
+
].some((key) => settings[key] !== void 0)) || format === "time" && (settings.dateStyle !== void 0 || [
|
|
130
|
+
"year",
|
|
131
|
+
"month",
|
|
132
|
+
"day",
|
|
133
|
+
"weekday",
|
|
134
|
+
"era"
|
|
135
|
+
].some((key) => settings[key] !== void 0))) return invalid;
|
|
136
|
+
if (settings.dateStyle === void 0 && settings.timeStyle === void 0 && ![
|
|
137
|
+
"year",
|
|
138
|
+
"month",
|
|
139
|
+
"day",
|
|
140
|
+
"weekday",
|
|
141
|
+
"era",
|
|
142
|
+
"hour",
|
|
143
|
+
"minute",
|
|
144
|
+
"second",
|
|
145
|
+
"dayPeriod",
|
|
146
|
+
"fractionalSecondDigits"
|
|
147
|
+
].some((key) => settings[key] !== void 0)) {
|
|
148
|
+
if (format !== "time") settings.dateStyle = "medium";
|
|
149
|
+
if (format !== "date") settings.timeStyle = "medium";
|
|
150
|
+
}
|
|
151
|
+
if (civil) settings.timeZone = "UTC";
|
|
152
|
+
const asDate = (candidate) => {
|
|
153
|
+
if (typeof candidate === "number" && Number.isFinite(candidate)) return new Date(candidate);
|
|
154
|
+
if (typeof candidate !== "string") return;
|
|
155
|
+
let written = candidate.replace(" ", "T");
|
|
156
|
+
if (/^\d\d:\d\d(?::\d\d(?:\.\d{1,3})?)?$/.test(written)) {
|
|
157
|
+
if (format !== "time") return;
|
|
158
|
+
written = "1970-01-01T" + written + "Z";
|
|
159
|
+
} else if (/^\d{4,}-\d\d-\d\d$/.test(written)) {
|
|
160
|
+
if (format !== "date") return;
|
|
161
|
+
written += "T00:00:00Z";
|
|
162
|
+
} else if (/^\d{4,}-\d\d-\d\dT\d\d:\d\d(?::\d\d(?:\.\d{1,3})?)?$/.test(written)) written += "Z";
|
|
163
|
+
else if (!/^\d{4,}-\d\d-\d\dT\d\d:\d\d(?::\d\d(?:\.\d{1,3})?)?(?:Z|[+-]\d\d:\d\d)$/.test(written)) return;
|
|
164
|
+
const date = new Date(written.replace(/^(\d{5,})-/, (_match, year) => "+" + year.padStart(6, "0") + "-"));
|
|
165
|
+
if (!Number.isFinite(date.getTime())) return;
|
|
166
|
+
const match = /^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d))?/.exec(written);
|
|
167
|
+
if (!match) return;
|
|
168
|
+
const probe = /* @__PURE__ */ new Date(0);
|
|
169
|
+
probe.setUTCFullYear(Number(match[1]), Number(match[2]) - 1, Number(match[3]));
|
|
170
|
+
if (Number(match[1]) === 0 || probe.getUTCMonth() !== Number(match[2]) - 1 || probe.getUTCDate() !== Number(match[3]) || Number(match[4]) > 23 || Number(match[5]) > 59 || Number(match[6] ?? 0) > 59) return;
|
|
171
|
+
return date;
|
|
172
|
+
};
|
|
173
|
+
input = asDate(input);
|
|
174
|
+
last = operation === "formatRange" ? asDate(last) : void 0;
|
|
175
|
+
if (!input || operation === "formatRange" && !last) return invalid;
|
|
176
|
+
formatter = formatterFor("DateTimeFormat", locale, settings);
|
|
177
|
+
} else {
|
|
178
|
+
if (operation === "formatRange") return invalid;
|
|
179
|
+
if (format === "relativeTime") {
|
|
180
|
+
if (typeof input !== "number" || !Number.isFinite(input) || typeof settings.unit !== "string") return invalid;
|
|
181
|
+
const unit = settings.unit;
|
|
182
|
+
delete settings.unit;
|
|
183
|
+
formatter = formatterFor("RelativeTimeFormat", locale, settings);
|
|
184
|
+
return operation === "formatParts" ? formatter.formatToParts(input, unit) : formatter.format(input, unit);
|
|
185
|
+
}
|
|
186
|
+
if (format === "list") {
|
|
187
|
+
if (!Array.isArray(input) || input.some((item) => typeof item !== "string")) return invalid;
|
|
188
|
+
formatter = formatterFor("ListFormat", locale, settings);
|
|
189
|
+
} else if (format === "duration") {
|
|
190
|
+
if (inputType === "duration" && typeof input === "string") {
|
|
191
|
+
const match = /^(-?(?:\d+(?:\.\d+)?|\.\d+))(ms|s)$/.exec(input);
|
|
192
|
+
if (!match) return invalid;
|
|
193
|
+
const milliseconds = Number(match[1]) * (match[2] === "s" ? 1e3 : 1);
|
|
194
|
+
if (!Number.isFinite(milliseconds)) return invalid;
|
|
195
|
+
input = {
|
|
196
|
+
hours: Math.trunc(milliseconds / 36e5),
|
|
197
|
+
minutes: Math.trunc(milliseconds % 36e5 / 6e4),
|
|
198
|
+
seconds: Math.trunc(milliseconds % 6e4 / 1e3),
|
|
199
|
+
milliseconds: Math.trunc(milliseconds % 1e3),
|
|
200
|
+
microseconds: Math.trunc((milliseconds - Math.trunc(milliseconds)) * 1e3),
|
|
201
|
+
nanoseconds: Math.round((milliseconds * 1e3 - Math.trunc(milliseconds * 1e3)) * 1e3)
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
if (input === null || typeof input !== "object" || Array.isArray(input) || Object.keys(input).some((key) => !durationFields.includes(key))) return invalid;
|
|
205
|
+
if (!Reflect.get(Intl, "DurationFormat")) return invalid;
|
|
206
|
+
formatter = formatterFor("DurationFormat", locale, settings);
|
|
207
|
+
} else if (format === "displayName") {
|
|
208
|
+
if (typeof input !== "string" || operation === "formatParts") return invalid;
|
|
209
|
+
return formatterFor("DisplayNames", locale, settings).of(input);
|
|
210
|
+
} else if (format === "plural") {
|
|
211
|
+
if (typeof input !== "number" || !Number.isFinite(input) || operation === "formatParts") return invalid;
|
|
212
|
+
const forms = settings.forms;
|
|
213
|
+
if (!forms || typeof forms !== "object" || Array.isArray(forms) || typeof forms.other !== "string" || Object.entries(forms).some(([key, entry]) => ![
|
|
214
|
+
"zero",
|
|
215
|
+
"one",
|
|
216
|
+
"two",
|
|
217
|
+
"few",
|
|
218
|
+
"many",
|
|
219
|
+
"other"
|
|
220
|
+
].includes(key) || typeof entry !== "string")) return invalid;
|
|
221
|
+
delete settings.forms;
|
|
222
|
+
const message = forms[formatterFor("PluralRules", locale, settings).select(input)] ?? forms.other;
|
|
223
|
+
const numberOptions = { ...settings };
|
|
224
|
+
delete numberOptions.type;
|
|
225
|
+
delete numberOptions.forms;
|
|
226
|
+
const number = formatterFor("NumberFormat", locale, numberOptions).format(input);
|
|
227
|
+
return message.replace(/#/g, () => number);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
if (!zoneFree && operation !== "formatParts") return operation === "formatRange" ? formatter.formatRange(input, last) : formatter.format(input);
|
|
231
|
+
const parts = operation === "formatRange" ? formatter.formatRangeToParts(input, last) : formatter.formatToParts(input);
|
|
232
|
+
if (zoneFree && operation !== "formatParts" && !parts.some((part) => part.type === "timeZoneName")) return operation === "formatRange" ? formatter.formatRange(input, last) : formatter.format(input);
|
|
233
|
+
const visible = zoneFree ? parts.filter((part, index) => part.type !== "timeZoneName" && !(part.type === "literal" && /^[\s(),]*$/.test(part.value) && (parts[index - 1]?.type === "timeZoneName" || parts[index + 1]?.type === "timeZoneName"))) : parts;
|
|
234
|
+
return operation === "formatParts" ? visible : visible.map((part) => part.value).join("");
|
|
235
|
+
} catch {
|
|
236
|
+
return invalid;
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
var moduleFormatValue = createFormatValue();
|
|
20
241
|
//#endregion
|
|
21
242
|
//#region .build/vue/UiMeter.vue
|
|
22
243
|
var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -53,6 +274,7 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
53
274
|
}
|
|
54
275
|
},
|
|
55
276
|
setup(__props) {
|
|
277
|
+
const formatValue = moduleFormatValue;
|
|
56
278
|
const propValidityContract = { props: {
|
|
57
279
|
label: {
|
|
58
280
|
type: {
|
|
@@ -130,7 +352,7 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
130
352
|
},
|
|
131
353
|
required: false,
|
|
132
354
|
target: { attribute: "valuetext" },
|
|
133
|
-
description: "The value as assistive technology reads it (\"$750 of $1,240 collected\", \"3 of 5 done, overdue\"). Empty reads the percentage.",
|
|
355
|
+
description: "The value as assistive technology reads it (\"$750 of $1,240 collected\", \"3 of 5 done, overdue\"). Empty reads the whole percentage in the current\n locale.",
|
|
134
356
|
default: ""
|
|
135
357
|
}
|
|
136
358
|
} };
|
|
@@ -214,16 +436,92 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
214
436
|
}
|
|
215
437
|
} });
|
|
216
438
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
439
|
+
let amountPrevious = null;
|
|
440
|
+
const amount = cycleCheckedComputed(() => {
|
|
441
|
+
const next = math("clamp", [
|
|
442
|
+
"number",
|
|
443
|
+
"number",
|
|
444
|
+
"number"
|
|
445
|
+
], [
|
|
446
|
+
0,
|
|
447
|
+
checkedProps.value.value,
|
|
448
|
+
checkedProps.value.max
|
|
449
|
+
]);
|
|
450
|
+
if (next === Symbol.for("html-next.invalid-result")) return amountPrevious;
|
|
451
|
+
return amountPrevious = next;
|
|
452
|
+
});
|
|
453
|
+
let percentPrevious = null;
|
|
454
|
+
const percent = cycleCheckedComputed(() => {
|
|
455
|
+
const next = ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
456
|
+
true: number(number(amount.value) === void 0 || number(checkedProps.value.max) === void 0 ? void 0 : number(amount.value) / number(checkedProps.value.max)) === void 0 || number(100) === void 0 ? void 0 : number(number(amount.value) === void 0 || number(checkedProps.value.max) === void 0 ? void 0 : number(amount.value) / number(checkedProps.value.max)) * number(100),
|
|
457
|
+
false: 0
|
|
458
|
+
}, concat(number(checkedProps.value.max) === void 0 || number(0) === void 0 ? void 0 : number(checkedProps.value.max) > number(0)));
|
|
459
|
+
if (next === Symbol.for("html-next.invalid-result")) return percentPrevious;
|
|
460
|
+
return percentPrevious = next;
|
|
461
|
+
});
|
|
462
|
+
let guardedPrevious = null;
|
|
463
|
+
const guarded = computed(() => {
|
|
464
|
+
if (((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
|
|
465
|
+
const value = {
|
|
466
|
+
true: checkedProps.value.valueText,
|
|
467
|
+
false: formatValue(number(percent.value) === void 0 || number(100) === void 0 ? void 0 : number(percent.value) / number(100), "number", "format", "percent", { maximumFractionDigits: 0 })
|
|
468
|
+
};
|
|
469
|
+
return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
|
|
470
|
+
})(), concat(checkedProps.value.valueText !== "")) === Symbol.for("html-next.invalid-result")) return guardedPrevious;
|
|
471
|
+
return guardedPrevious = typeof ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
|
|
472
|
+
const value = {
|
|
473
|
+
true: checkedProps.value.valueText,
|
|
474
|
+
false: formatValue(number(percent.value) === void 0 || number(100) === void 0 ? void 0 : number(percent.value) / number(100), "number", "format", "percent", { maximumFractionDigits: 0 })
|
|
475
|
+
};
|
|
476
|
+
return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
|
|
477
|
+
})(), concat(checkedProps.value.valueText !== "")) === "boolean" ? String(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
|
|
478
|
+
const value = {
|
|
479
|
+
true: checkedProps.value.valueText,
|
|
480
|
+
false: formatValue(number(percent.value) === void 0 || number(100) === void 0 ? void 0 : number(percent.value) / number(100), "number", "format", "percent", { maximumFractionDigits: 0 })
|
|
481
|
+
};
|
|
482
|
+
return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
|
|
483
|
+
})(), concat(checkedProps.value.valueText !== ""))) : attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])((() => {
|
|
484
|
+
const value = {
|
|
485
|
+
true: checkedProps.value.valueText,
|
|
486
|
+
false: formatValue(number(percent.value) === void 0 || number(100) === void 0 ? void 0 : number(percent.value) / number(100), "number", "format", "percent", { maximumFractionDigits: 0 })
|
|
487
|
+
};
|
|
488
|
+
return Object.values(value).some((entry) => entry === Symbol.for("html-next.invalid-result")) ? Symbol.for("html-next.invalid-result") : value;
|
|
489
|
+
})(), concat(checkedProps.value.valueText !== "")));
|
|
490
|
+
});
|
|
491
|
+
let guardedBindingPrevious = null;
|
|
492
|
+
const guardedBinding = computed(() => {
|
|
493
|
+
if (((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
494
|
+
true: checkedProps.value.label,
|
|
495
|
+
false: null
|
|
496
|
+
}, concat(checkedProps.value.label !== "")) === Symbol.for("html-next.invalid-result")) return guardedBindingPrevious;
|
|
497
|
+
return guardedBindingPrevious = typeof ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
498
|
+
true: checkedProps.value.label,
|
|
499
|
+
false: null
|
|
500
|
+
}, concat(checkedProps.value.label !== "")) === "boolean" ? String(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
501
|
+
true: checkedProps.value.label,
|
|
502
|
+
false: null
|
|
503
|
+
}, concat(checkedProps.value.label !== ""))) : attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
504
|
+
true: checkedProps.value.label,
|
|
505
|
+
false: null
|
|
506
|
+
}, concat(checkedProps.value.label !== "")));
|
|
507
|
+
});
|
|
508
|
+
let guardedBinding2Previous = null;
|
|
509
|
+
const guardedBinding2 = computed(() => {
|
|
510
|
+
if (((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
511
|
+
true: checkedProps.value.segments,
|
|
512
|
+
false: null
|
|
513
|
+
}, concat(number(checkedProps.value.segments) === void 0 || number(1) === void 0 ? void 0 : number(checkedProps.value.segments) > number(1))) === Symbol.for("html-next.invalid-result")) return guardedBinding2Previous;
|
|
514
|
+
return guardedBinding2Previous = attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
515
|
+
true: checkedProps.value.segments,
|
|
516
|
+
false: null
|
|
517
|
+
}, concat(number(checkedProps.value.segments) === void 0 || number(1) === void 0 ? void 0 : number(checkedProps.value.segments) > number(1))));
|
|
518
|
+
});
|
|
519
|
+
let guardedBinding3Previous = null;
|
|
520
|
+
const guardedBinding3 = computed(() => {
|
|
521
|
+
const candidate = concat(percent.value, "%");
|
|
522
|
+
if (candidate === Symbol.for("html-next.invalid-result")) return guardedBinding3Previous;
|
|
523
|
+
return guardedBinding3Previous = candidate;
|
|
524
|
+
});
|
|
227
525
|
const hydrationNode = hydrationInstance?.vnode.el;
|
|
228
526
|
if (typeof window !== "undefined" && hydrationNode != null && (!(hydrationNode instanceof Element) || hydrationNode.localName !== "span")) throw Object.assign(/* @__PURE__ */ new Error("HR005: Server markup for <ui-meter> has an incompatible root."), {
|
|
229
527
|
name: "HtmlDiagnosticError",
|
|
@@ -250,6 +548,65 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
250
548
|
function number(value) {
|
|
251
549
|
return typeof value === "number" && !Number.isNaN(value) ? value : void 0;
|
|
252
550
|
}
|
|
551
|
+
function concat(...values) {
|
|
552
|
+
if (values.some((value) => value === Symbol.for("html-next.invalid-result"))) return Symbol.for("html-next.invalid-result");
|
|
553
|
+
if (values.some((value) => value === void 0)) return void 0;
|
|
554
|
+
if (values.length === 0 || values.some((value) => typeof value === "object" && value !== null)) return Symbol.for("html-next.invalid-result");
|
|
555
|
+
return values.map((value) => value === null ? "" : String(value)).join("");
|
|
556
|
+
}
|
|
557
|
+
function math(fn, kinds, values) {
|
|
558
|
+
if (values.includes(Symbol.for("html-next.invalid-result"))) return Symbol.for("html-next.invalid-result");
|
|
559
|
+
if (values.some((value) => value === void 0 || value === null)) return void 0;
|
|
560
|
+
if ((fn === "abs" || fn === "negate") && values.length !== 1 || fn === "round" && (values.length < 1 || values.length > 2) || (fn === "min" || fn === "max") && values.length === 0 || fn === "clamp" && values.length !== 3) return Symbol.for("html-next.invalid-result");
|
|
561
|
+
const kind = kinds[0];
|
|
562
|
+
const dimensional = kind === "length" || kind === "percentage" || kind === "duration";
|
|
563
|
+
if (!dimensional && kind !== "number") return Symbol.for("html-next.invalid-result");
|
|
564
|
+
let unit;
|
|
565
|
+
const numbers = [];
|
|
566
|
+
for (let index = 0; index < values.length; index++) {
|
|
567
|
+
if (kinds[index] !== kind) return Symbol.for("html-next.invalid-result");
|
|
568
|
+
const value = values[index];
|
|
569
|
+
if (!dimensional) {
|
|
570
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return Symbol.for("html-next.invalid-result");
|
|
571
|
+
numbers.push(value);
|
|
572
|
+
continue;
|
|
573
|
+
}
|
|
574
|
+
if (typeof value !== "string") return Symbol.for("html-next.invalid-result");
|
|
575
|
+
const match = /^(-?(?:\d+(?:\.\d+)?|\.\d+))(vmin|vmax|rem|px|em|vw|vh|ch|ex|cm|mm|in|pt|pc|q|ms|s|%)$/.exec(value);
|
|
576
|
+
if (match === null || unit !== void 0 && match[2] !== unit) return Symbol.for("html-next.invalid-result");
|
|
577
|
+
unit = match[2];
|
|
578
|
+
if ((unit === "%" ? "percentage" : unit === "ms" || unit === "s" ? "duration" : "length") !== kind) return Symbol.for("html-next.invalid-result");
|
|
579
|
+
const number = Number(match[1]);
|
|
580
|
+
if (!Number.isFinite(number)) return Symbol.for("html-next.invalid-result");
|
|
581
|
+
numbers.push(number);
|
|
582
|
+
}
|
|
583
|
+
let result;
|
|
584
|
+
switch (fn) {
|
|
585
|
+
case "abs":
|
|
586
|
+
result = Math.abs(numbers[0]);
|
|
587
|
+
break;
|
|
588
|
+
case "negate":
|
|
589
|
+
result = -numbers[0];
|
|
590
|
+
break;
|
|
591
|
+
case "round": {
|
|
592
|
+
const step = Math.abs(numbers[1] ?? 1);
|
|
593
|
+
if (step === 0) return Symbol.for("html-next.invalid-result");
|
|
594
|
+
result = Math.round(numbers[0] / step) * step;
|
|
595
|
+
break;
|
|
596
|
+
}
|
|
597
|
+
case "min":
|
|
598
|
+
result = Math.min(...numbers);
|
|
599
|
+
break;
|
|
600
|
+
case "max":
|
|
601
|
+
result = Math.max(...numbers);
|
|
602
|
+
break;
|
|
603
|
+
case "clamp":
|
|
604
|
+
result = Math.max(numbers[0], Math.min(numbers[1], numbers[2]));
|
|
605
|
+
break;
|
|
606
|
+
default: return Symbol.for("html-next.invalid-result");
|
|
607
|
+
}
|
|
608
|
+
return !Number.isFinite(result) ? Symbol.for("html-next.invalid-result") : unit === void 0 ? result : String(result) + unit;
|
|
609
|
+
}
|
|
253
610
|
return (_ctx, _cache) => {
|
|
254
611
|
return withDirectives((openBlock(), createElementBlock("span", mergeProps({
|
|
255
612
|
"data-component": "ui-meter",
|
|
@@ -258,30 +615,9 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
258
615
|
}, nativeAttrs(_ctx.$attrs), {
|
|
259
616
|
"aria-valuemax": checkedProps.value.max ?? void 0,
|
|
260
617
|
"aria-valuenow": unref(amount),
|
|
261
|
-
"aria-valuetext":
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}[`${checkedProps.value.valueText !== ""}`] === "boolean" ? String({
|
|
265
|
-
true: checkedProps.value.valueText,
|
|
266
|
-
false: `${unref(whole) ?? ""}%`
|
|
267
|
-
}[`${checkedProps.value.valueText !== ""}`]) : attribute({
|
|
268
|
-
true: checkedProps.value.valueText,
|
|
269
|
-
false: `${unref(whole) ?? ""}%`
|
|
270
|
-
}[`${checkedProps.value.valueText !== ""}`]),
|
|
271
|
-
"aria-label": typeof {
|
|
272
|
-
true: checkedProps.value.label,
|
|
273
|
-
false: null
|
|
274
|
-
}[`${checkedProps.value.label !== ""}`] === "boolean" ? String({
|
|
275
|
-
true: checkedProps.value.label,
|
|
276
|
-
false: null
|
|
277
|
-
}[`${checkedProps.value.label !== ""}`]) : attribute({
|
|
278
|
-
true: checkedProps.value.label,
|
|
279
|
-
false: null
|
|
280
|
-
}[`${checkedProps.value.label !== ""}`]),
|
|
281
|
-
"data-ui-meter-segments": attribute({
|
|
282
|
-
true: checkedProps.value.segments,
|
|
283
|
-
false: null
|
|
284
|
-
}[`${number(checkedProps.value.segments) === void 0 || number(1) === void 0 ? void 0 : number(checkedProps.value.segments) > number(1)}`]),
|
|
618
|
+
"aria-valuetext": guarded.value,
|
|
619
|
+
"aria-label": guardedBinding.value,
|
|
620
|
+
"data-ui-meter-segments": guardedBinding2.value,
|
|
285
621
|
"data-label": reflectedProp("label", "label", checkedProps.value.label, void 0, false),
|
|
286
622
|
"data-max": reflectedProp("max", "max", checkedProps.value.max, void 0, false),
|
|
287
623
|
"data-segments": reflectedProp("segments", "segments", checkedProps.value.segments, void 0, false),
|
|
@@ -292,13 +628,13 @@ var UiMeter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
292
628
|
"data-ui-meter-state": hostState.value || void 0
|
|
293
629
|
}), [createElementVNode("span", {
|
|
294
630
|
class: "fill",
|
|
295
|
-
style: normalizeStyle({ "inline-size":
|
|
631
|
+
style: normalizeStyle({ "inline-size": guardedBinding3.value })
|
|
296
632
|
}, null, 4)], 16, _hoisted_1)), [[unref(vPropValidity), {
|
|
297
633
|
contract: propValidityContract,
|
|
298
634
|
values: { ...props }
|
|
299
635
|
}]]);
|
|
300
636
|
};
|
|
301
637
|
}
|
|
302
|
-
}), [["__scopeId", "data-v-
|
|
638
|
+
}), [["__scopeId", "data-v-7327e0b4"]]);
|
|
303
639
|
//#endregion
|
|
304
640
|
export { UiMeter_default as t };
|
package/vue/chunks/UiNavItem.js
CHANGED
|
@@ -212,6 +212,64 @@ var UiNavItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
212
212
|
const hydrationInstance = getCurrentInstance();
|
|
213
213
|
const root = useTemplateRef("@html-next/root");
|
|
214
214
|
preserveRootFocus(root);
|
|
215
|
+
let guardedPrevious = null;
|
|
216
|
+
const guarded = computed(() => {
|
|
217
|
+
if (((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
218
|
+
true: "page",
|
|
219
|
+
false: null,
|
|
220
|
+
page: "page",
|
|
221
|
+
step: "step",
|
|
222
|
+
location: "location"
|
|
223
|
+
}, concat(checkedProps.value.current)) === Symbol.for("html-next.invalid-result")) return guardedPrevious;
|
|
224
|
+
return guardedPrevious = typeof ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
225
|
+
true: "page",
|
|
226
|
+
false: null,
|
|
227
|
+
page: "page",
|
|
228
|
+
step: "step",
|
|
229
|
+
location: "location"
|
|
230
|
+
}, concat(checkedProps.value.current)) === "boolean" ? String(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
231
|
+
true: "page",
|
|
232
|
+
false: null,
|
|
233
|
+
page: "page",
|
|
234
|
+
step: "step",
|
|
235
|
+
location: "location"
|
|
236
|
+
}, concat(checkedProps.value.current))) : attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
237
|
+
true: "page",
|
|
238
|
+
false: null,
|
|
239
|
+
page: "page",
|
|
240
|
+
step: "step",
|
|
241
|
+
location: "location"
|
|
242
|
+
}, concat(checkedProps.value.current)));
|
|
243
|
+
});
|
|
244
|
+
let guardedBindingPrevious = null;
|
|
245
|
+
const guardedBinding = computed(() => {
|
|
246
|
+
if (((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
247
|
+
true: "page",
|
|
248
|
+
false: null,
|
|
249
|
+
page: "page",
|
|
250
|
+
step: "step",
|
|
251
|
+
location: "location"
|
|
252
|
+
}, concat(checkedProps.value.current)) === Symbol.for("html-next.invalid-result")) return guardedBindingPrevious;
|
|
253
|
+
return guardedBindingPrevious = typeof ((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
254
|
+
true: "page",
|
|
255
|
+
false: null,
|
|
256
|
+
page: "page",
|
|
257
|
+
step: "step",
|
|
258
|
+
location: "location"
|
|
259
|
+
}, concat(checkedProps.value.current)) === "boolean" ? String(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
260
|
+
true: "page",
|
|
261
|
+
false: null,
|
|
262
|
+
page: "page",
|
|
263
|
+
step: "step",
|
|
264
|
+
location: "location"
|
|
265
|
+
}, concat(checkedProps.value.current))) : attribute(((objectValue, indexValue) => objectValue === Symbol.for("html-next.invalid-result") || indexValue === Symbol.for("html-next.invalid-result") ? Symbol.for("html-next.invalid-result") : objectValue[indexValue])({
|
|
266
|
+
true: "page",
|
|
267
|
+
false: null,
|
|
268
|
+
page: "page",
|
|
269
|
+
step: "step",
|
|
270
|
+
location: "location"
|
|
271
|
+
}, concat(checkedProps.value.current)));
|
|
272
|
+
});
|
|
215
273
|
const hydrationNode = hydrationInstance?.vnode.el;
|
|
216
274
|
if (typeof window !== "undefined" && hydrationNode != null && (!(hydrationNode instanceof Element) || hydrationNode.localName !== (checkedProps.value.as === "a" ? "a" : "button"))) throw Object.assign(/* @__PURE__ */ new Error("HR005: Server markup for <ui-nav-item> has an incompatible root."), {
|
|
217
275
|
name: "HtmlDiagnosticError",
|
|
@@ -235,6 +293,12 @@ var UiNavItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
235
293
|
if (value === null || value === void 0 || value === false || typeof value === "object" && !Array.isArray(value)) return void 0;
|
|
236
294
|
return value === true ? "" : text(value);
|
|
237
295
|
}
|
|
296
|
+
function concat(...values) {
|
|
297
|
+
if (values.some((value) => value === Symbol.for("html-next.invalid-result"))) return Symbol.for("html-next.invalid-result");
|
|
298
|
+
if (values.some((value) => value === void 0)) return void 0;
|
|
299
|
+
if (values.length === 0 || values.some((value) => typeof value === "object" && value !== null)) return Symbol.for("html-next.invalid-result");
|
|
300
|
+
return values.map((value) => value === null ? "" : String(value)).join("");
|
|
301
|
+
}
|
|
238
302
|
return (_ctx, _cache) => {
|
|
239
303
|
return checkedProps.value.as === "a" ? withDirectives((openBlock(), createElementBlock("a", mergeProps({
|
|
240
304
|
key: 0,
|
|
@@ -243,25 +307,7 @@ var UiNavItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
243
307
|
href: checkedProps.value.href ?? void 0,
|
|
244
308
|
target: checkedProps.value.target ?? void 0,
|
|
245
309
|
rel: checkedProps.value.rel ?? void 0,
|
|
246
|
-
"aria-current":
|
|
247
|
-
true: "page",
|
|
248
|
-
false: null,
|
|
249
|
-
page: "page",
|
|
250
|
-
step: "step",
|
|
251
|
-
location: "location"
|
|
252
|
-
}[`${checkedProps.value.current ?? ""}`] === "boolean" ? String({
|
|
253
|
-
true: "page",
|
|
254
|
-
false: null,
|
|
255
|
-
page: "page",
|
|
256
|
-
step: "step",
|
|
257
|
-
location: "location"
|
|
258
|
-
}[`${checkedProps.value.current ?? ""}`]) : attribute({
|
|
259
|
-
true: "page",
|
|
260
|
-
false: null,
|
|
261
|
-
page: "page",
|
|
262
|
-
step: "step",
|
|
263
|
-
location: "location"
|
|
264
|
-
}[`${checkedProps.value.current ?? ""}`]),
|
|
310
|
+
"aria-current": guarded.value,
|
|
265
311
|
"data-as": reflectedProp("as", "as", checkedProps.value.as, void 0, false),
|
|
266
312
|
"data-current": reflectedProp("current", "current", checkedProps.value.current, void 0, false),
|
|
267
313
|
"data-density": reflectedProp("density", "density", checkedProps.value.density, void 0, false),
|
|
@@ -287,25 +333,7 @@ var UiNavItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
287
333
|
"data-component": "ui-nav-item",
|
|
288
334
|
type: "button"
|
|
289
335
|
}, nativeAttrs(_ctx.$attrs), {
|
|
290
|
-
"aria-current":
|
|
291
|
-
true: "page",
|
|
292
|
-
false: null,
|
|
293
|
-
page: "page",
|
|
294
|
-
step: "step",
|
|
295
|
-
location: "location"
|
|
296
|
-
}[`${checkedProps.value.current ?? ""}`] === "boolean" ? String({
|
|
297
|
-
true: "page",
|
|
298
|
-
false: null,
|
|
299
|
-
page: "page",
|
|
300
|
-
step: "step",
|
|
301
|
-
location: "location"
|
|
302
|
-
}[`${checkedProps.value.current ?? ""}`]) : attribute({
|
|
303
|
-
true: "page",
|
|
304
|
-
false: null,
|
|
305
|
-
page: "page",
|
|
306
|
-
step: "step",
|
|
307
|
-
location: "location"
|
|
308
|
-
}[`${checkedProps.value.current ?? ""}`]),
|
|
336
|
+
"aria-current": guardedBinding.value,
|
|
309
337
|
"data-as": reflectedProp("as", "as", checkedProps.value.as, void 0, false),
|
|
310
338
|
"data-current": reflectedProp("current", "current", checkedProps.value.current, void 0, false),
|
|
311
339
|
"data-density": reflectedProp("density", "density", checkedProps.value.density, void 0, false),
|
|
@@ -329,6 +357,6 @@ var UiNavItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
329
357
|
}]]);
|
|
330
358
|
};
|
|
331
359
|
}
|
|
332
|
-
}), [["__scopeId", "data-v-
|
|
360
|
+
}), [["__scopeId", "data-v-b4e6f259"]]);
|
|
333
361
|
//#endregion
|
|
334
362
|
export { UiNavItem_default as t };
|
package/vue/chunks/UiPopover.js
CHANGED
package/vue/chunks/UiRadio.js
CHANGED
|
@@ -187,6 +187,11 @@ var UiRadio_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
187
187
|
const inputElement = useTemplateRef("input");
|
|
188
188
|
const descriptionElement = useTemplateRef("description");
|
|
189
189
|
const internalChecked = ref(false);
|
|
190
|
+
let guardedPrevious;
|
|
191
|
+
computed(() => {
|
|
192
|
+
if (!(internalChecked.value == null || typeof internalChecked.value === "boolean")) return guardedPrevious;
|
|
193
|
+
return guardedPrevious = internalChecked.value;
|
|
194
|
+
});
|
|
190
195
|
provide("html-next:ui-radio:internalChecked", internalChecked);
|
|
191
196
|
const hydrationNode = hydrationInstance?.vnode.el;
|
|
192
197
|
if (typeof window !== "undefined" && hydrationNode != null && (!(hydrationNode instanceof Element) || hydrationNode.localName !== "label")) throw Object.assign(/* @__PURE__ */ new Error("HR005: Server markup for <ui-radio> has an incompatible root."), {
|
|
@@ -272,6 +277,6 @@ var UiRadio_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
272
277
|
}]]);
|
|
273
278
|
};
|
|
274
279
|
}
|
|
275
|
-
}), [["__scopeId", "data-v-
|
|
280
|
+
}), [["__scopeId", "data-v-b8d72e91"]]);
|
|
276
281
|
//#endregion
|
|
277
282
|
export { UiRadio_default as t };
|
package/vue/chunks/UiReel.js
CHANGED