@threadlabs/looma 0.21.6 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ui-affordance-scope/ui-affordance-scope.html +1 -1
- package/components/ui-avatar/ui-avatar.html +4 -4
- package/components/ui-avatar-group/ui-avatar-group.html +2 -2
- package/components/ui-checkbox/ui-checkbox.html +1 -1
- package/components/ui-combobox/ui-combobox.html +18 -18
- package/components/ui-context-menu/ui-context-menu.html +1 -1
- package/components/ui-dialog/ui-dialog.html +2 -2
- package/components/ui-disclosure/ui-disclosure.html +4 -4
- package/components/ui-editable/ui-editable.html +3 -3
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +5 -5
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +5 -5
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +3 -3
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +2 -2
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +3 -7
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +6 -6
- package/components/ui-listbox/ui-listbox.html +6 -6
- package/components/ui-menu/ui-menu.html +1 -1
- package/components/ui-menu-item/ui-menu-item.html +1 -1
- package/components/ui-popover/ui-popover.html +1 -1
- package/components/ui-radio/ui-radio.html +1 -1
- package/components/ui-radio-group/ui-radio-group.html +1 -1
- package/components/ui-search-shell/ui-search-shell.html +1 -1
- package/components/ui-sidebar/ui-sidebar.html +2 -2
- package/components/ui-switch/ui-switch.html +1 -1
- package/components/ui-switcher/ui-switcher.html +1 -1
- package/components/ui-tabs/ui-tabs.html +2 -2
- package/components/ui-toast-region/ui-toast-region.html +1 -1
- package/components/ui-tooltip/ui-tooltip.html +1 -1
- package/components/ui-tree-item/ui-tree-item.html +4 -4
- 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 +1 -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 +2 -2
- package/vanilla/UiAvatar.d.ts +1 -1
- package/vanilla/UiAvatar.js +2 -2
- package/vanilla/UiAvatarGroup.d.ts +1 -1
- package/vanilla/UiAvatarGroup.js +2 -2
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +1 -1
- package/vanilla/UiBreadcrumbItem.d.ts +1 -1
- package/vanilla/UiBreadcrumbItem.js +1 -1
- package/vanilla/UiBreadcrumbs.d.ts +1 -1
- package/vanilla/UiBreadcrumbs.js +1 -1
- package/vanilla/UiButton.d.ts +1 -1
- package/vanilla/UiButton.js +1 -1
- 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 +2 -2
- package/vanilla/UiCluster.d.ts +1 -1
- package/vanilla/UiCluster.js +1 -1
- package/vanilla/UiCombobox.d.ts +1 -1
- package/vanilla/UiCombobox.js +2 -2
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +1 -1
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +2 -2
- package/vanilla/UiCover.d.ts +1 -1
- package/vanilla/UiCover.js +1 -1
- package/vanilla/UiDescriptionItem.d.ts +1 -1
- package/vanilla/UiDescriptionItem.js +1 -1
- package/vanilla/UiDescriptionList.d.ts +1 -1
- package/vanilla/UiDescriptionList.js +1 -1
- package/vanilla/UiDialog.d.ts +1 -1
- package/vanilla/UiDialog.js +2 -2
- package/vanilla/UiDisclosure.d.ts +1 -1
- package/vanilla/UiDisclosure.js +2 -2
- package/vanilla/UiEditable.d.ts +1 -1
- package/vanilla/UiEditable.js +2 -2
- package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
- package/vanilla/UiEditorInsertTableGrid.js +2 -2
- package/vanilla/UiEditorMentionMenu.d.ts +1 -1
- package/vanilla/UiEditorMentionMenu.js +2 -2
- package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
- package/vanilla/UiEditorMentionMenuItem.js +1 -1
- package/vanilla/UiEditorSlashMenu.d.ts +1 -1
- package/vanilla/UiEditorSlashMenu.js +2 -2
- package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuGroup.js +1 -1
- package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuItem.js +1 -1
- package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +2 -2
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +2 -2
- 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 +1 -1
- package/vanilla/UiIconButton.js +1 -1
- 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 +2 -2
- package/vanilla/UiMenuGroup.d.ts +1 -1
- package/vanilla/UiMenuGroup.js +1 -1
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +2 -2
- package/vanilla/UiMeter.d.ts +1 -1
- package/vanilla/UiMeter.js +1 -1
- package/vanilla/UiNavItem.d.ts +1 -1
- package/vanilla/UiNavItem.js +1 -1
- package/vanilla/UiPageHeader.d.ts +1 -1
- package/vanilla/UiPageHeader.js +1 -1
- package/vanilla/UiPopover.d.ts +1 -1
- package/vanilla/UiPopover.js +2 -2
- package/vanilla/UiRadio.d.ts +1 -1
- package/vanilla/UiRadio.js +2 -2
- package/vanilla/UiRadioGroup.d.ts +1 -1
- package/vanilla/UiRadioGroup.js +2 -2
- 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 +2 -2
- package/vanilla/UiSection.d.ts +1 -1
- package/vanilla/UiSection.js +1 -1
- 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 +2 -2
- package/vanilla/UiSpinner.d.ts +1 -1
- package/vanilla/UiSpinner.js +1 -1
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +1 -1
- package/vanilla/UiStatusMessage.d.ts +1 -1
- package/vanilla/UiStatusMessage.js +1 -1
- package/vanilla/UiSwitch.d.ts +1 -1
- package/vanilla/UiSwitch.js +2 -2
- package/vanilla/UiSwitcher.d.ts +1 -1
- package/vanilla/UiSwitcher.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/vue/UiActionBar.vue +1 -1
- package/vue/UiAffordanceScope.vue +25 -7
- package/vue/UiAvatar.vue +125 -30
- package/vue/UiAvatarGroup.d.ts +1 -1
- package/vue/UiAvatarGroup.vue +67 -21
- package/vue/UiBadge.vue +34 -8
- package/vue/UiBreadcrumbItem.vue +15 -4
- package/vue/UiBreadcrumbs.vue +14 -4
- package/vue/UiButton.vue +123 -42
- package/vue/UiCallout.vue +16 -4
- package/vue/UiCard.vue +46 -10
- package/vue/UiCheckbox.d.ts +5 -5
- package/vue/UiCheckbox.vue +73 -19
- package/vue/UiCluster.vue +39 -10
- package/vue/UiCombobox.d.ts +5 -5
- package/vue/UiCombobox.vue +317 -78
- package/vue/UiContainer.vue +23 -6
- package/vue/UiContextMenu.vue +24 -7
- package/vue/UiCover.vue +16 -4
- package/vue/UiDescriptionItem.vue +14 -4
- package/vue/UiDescriptionList.vue +33 -8
- package/vue/UiDialog.vue +79 -26
- package/vue/UiDisclosure.vue +101 -38
- package/vue/UiEditable.d.ts +3 -3
- package/vue/UiEditable.vue +107 -27
- package/vue/UiEditorInsertTableGrid.vue +47 -11
- package/vue/UiEditorMentionMenu.vue +99 -20
- package/vue/UiEditorMentionMenuItem.vue +29 -8
- package/vue/UiEditorSlashMenu.vue +85 -16
- package/vue/UiEditorSlashMenuGroup.vue +14 -4
- package/vue/UiEditorSlashMenuItem.vue +43 -12
- package/vue/UiEditorTableContextMenu.d.ts +1 -1
- package/vue/UiEditorTableContextMenu.vue +95 -19
- package/vue/UiEditorTableOverlay.vue +91 -7
- package/vue/UiEditorTableToolbar.vue +105 -16
- package/vue/UiEditorToolbar.vue +15 -4
- package/vue/UiFloatingActionButton.vue +31 -8
- package/vue/UiFormField.d.ts +1 -1
- package/vue/UiFormField.vue +31 -8
- package/vue/UiGrid.vue +30 -8
- package/vue/UiIcon.vue +15 -4
- package/vue/UiIconButton.vue +70 -24
- package/vue/UiInput.vue +114 -39
- package/vue/UiInputGroup.vue +15 -4
- package/vue/UiList.vue +47 -16
- package/vue/UiListItem.vue +24 -6
- package/vue/UiListbox.d.ts +3 -3
- package/vue/UiListbox.vue +72 -24
- package/vue/UiMenu.vue +55 -15
- package/vue/UiMenuGroup.vue +14 -4
- package/vue/UiMenuItem.d.ts +4 -4
- package/vue/UiMenuItem.vue +77 -27
- package/vue/UiMeter.vue +65 -16
- package/vue/UiNavItem.vue +48 -24
- package/vue/UiPageHeader.vue +16 -4
- package/vue/UiPopover.vue +46 -21
- package/vue/UiRadio.d.ts +4 -4
- package/vue/UiRadio.vue +58 -15
- package/vue/UiRadioGroup.d.ts +3 -3
- package/vue/UiRadioGroup.vue +66 -17
- package/vue/UiReel.d.ts +1 -1
- package/vue/UiReel.vue +31 -8
- package/vue/UiScrollArea.vue +16 -4
- package/vue/UiSearchResultRow.vue +23 -6
- package/vue/UiSearchShell.vue +38 -11
- package/vue/UiSection.vue +33 -8
- package/vue/UiSelect.d.ts +1 -1
- package/vue/UiSelect.vue +45 -20
- package/vue/UiSeparator.vue +16 -4
- package/vue/UiSidebar.d.ts +2 -2
- package/vue/UiSidebar.vue +86 -22
- package/vue/UiSpinner.vue +23 -6
- package/vue/UiStack.vue +31 -8
- package/vue/UiStatusMessage.vue +32 -8
- package/vue/UiSwitch.d.ts +4 -4
- package/vue/UiSwitch.vue +57 -15
- package/vue/UiSwitcher.vue +41 -17
- package/vue/UiTable.vue +24 -6
- package/vue/UiTabs.vue +60 -14
- package/vue/UiText.vue +98 -35
- package/vue/UiTextarea.d.ts +1 -1
- package/vue/UiTextarea.vue +67 -26
- package/vue/UiToast.vue +24 -6
- package/vue/UiToastRegion.vue +41 -13
- package/vue/UiTooltip.d.ts +1 -1
- package/vue/UiTooltip.vue +85 -30
- package/vue/UiTopBar.vue +1 -1
- package/vue/UiTree.vue +56 -14
- package/vue/UiTreeItem.d.ts +3 -3
- package/vue/UiTreeItem.vue +147 -36
- package/vue/chunks/UiActionBar.js +1 -1
- package/vue/chunks/UiAffordanceScope.js +34 -7
- package/vue/chunks/UiAvatar.js +141 -21
- package/vue/chunks/UiAvatarGroup.js +83 -16
- package/vue/chunks/UiBadge.js +57 -19
- package/vue/chunks/UiBreadcrumbItem.js +19 -6
- package/vue/chunks/UiBreadcrumbs.js +19 -6
- package/vue/chunks/UiButton.js +194 -42
- package/vue/chunks/UiCallout.js +27 -13
- package/vue/chunks/UiCard.js +83 -25
- package/vue/chunks/UiCheckbox.js +104 -17
- package/vue/chunks/UiCluster.js +70 -25
- package/vue/chunks/UiCombobox.js +441 -46
- package/vue/chunks/UiContainer.js +36 -11
- package/vue/chunks/UiContextMenu.js +33 -7
- package/vue/chunks/UiCover.js +20 -6
- package/vue/chunks/UiDescriptionItem.js +18 -5
- package/vue/chunks/UiDescriptionList.js +54 -17
- package/vue/chunks/UiDialog.js +115 -23
- package/vue/chunks/UiDisclosure.js +110 -24
- package/vue/chunks/UiEditable.js +146 -18
- package/vue/chunks/UiEditorInsertTableGrid.js +65 -10
- package/vue/chunks/UiEditorMentionMenu.js +210 -14
- package/vue/chunks/UiEditorMentionMenuItem.js +43 -8
- package/vue/chunks/UiEditorSlashMenu.js +186 -12
- package/vue/chunks/UiEditorSlashMenuGroup.js +19 -6
- package/vue/chunks/UiEditorSlashMenuItem.js +65 -10
- package/vue/chunks/UiEditorTableContextMenu.js +116 -16
- package/vue/chunks/UiEditorTableOverlay.js +188 -7
- package/vue/chunks/UiEditorTableToolbar.js +125 -16
- package/vue/chunks/UiEditorToolbar.js +19 -6
- package/vue/chunks/UiFloatingActionButton.js +43 -8
- package/vue/chunks/UiFormField.js +43 -8
- package/vue/chunks/UiGrid.js +52 -18
- package/vue/chunks/UiIcon.js +19 -6
- package/vue/chunks/UiIconButton.js +107 -21
- package/vue/chunks/UiInput.js +309 -30
- package/vue/chunks/UiInputGroup.js +19 -6
- package/vue/chunks/UiList.js +62 -10
- package/vue/chunks/UiListItem.js +33 -7
- package/vue/chunks/UiListbox.js +105 -13
- package/vue/chunks/UiMenu.js +79 -11
- package/vue/chunks/UiMenuGroup.js +19 -6
- package/vue/chunks/UiMenuItem.js +93 -28
- package/vue/chunks/UiMeter.js +96 -19
- package/vue/chunks/UiNavItem.js +74 -17
- package/vue/chunks/UiPageHeader.js +20 -6
- package/vue/chunks/UiPopover.js +58 -21
- package/vue/chunks/UiRadio.js +82 -15
- package/vue/chunks/UiRadioGroup.js +89 -12
- package/vue/chunks/UiReel.js +53 -18
- package/vue/chunks/UiScrollArea.js +20 -6
- package/vue/chunks/UiSearchResultRow.js +32 -7
- package/vue/chunks/UiSearchShell.js +55 -9
- package/vue/chunks/UiSection.js +49 -12
- package/vue/chunks/UiSelect.js +68 -13
- package/vue/chunks/UiSeparator.js +20 -6
- package/vue/chunks/UiSidebar.js +123 -19
- package/vue/chunks/UiSpinner.js +33 -7
- package/vue/chunks/UiStack.js +59 -24
- package/vue/chunks/UiStatusMessage.js +53 -16
- package/vue/chunks/UiSwitch.js +82 -15
- package/vue/chunks/UiSwitcher.js +70 -25
- package/vue/chunks/UiTable.js +33 -7
- package/vue/chunks/UiTabs.js +81 -11
- package/vue/chunks/UiText.js +169 -58
- package/vue/chunks/UiTextarea.js +101 -16
- package/vue/chunks/UiToast.js +39 -13
- package/vue/chunks/UiToastRegion.js +41 -14
- package/vue/chunks/UiTooltip.js +113 -30
- package/vue/chunks/UiTopBar.js +1 -1
- package/vue/chunks/UiTree.js +82 -15
- package/vue/chunks/UiTreeItem.js +184 -22
- package/vue/chunks/props.js +271 -35
- package/vue/components.css +1197 -1197
- package/vue/editor/index.js +5 -2
- package/vue/editor/primitives.d.ts +4 -1
- package/vue/host.ts +6 -6
package/vue/UiMenu.vue
CHANGED
|
@@ -1,12 +1,62 @@
|
|
|
1
|
-
<!-- Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.15 for Vue 3.5. Do not edit. -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
|
-
import { computed, getCurrentInstance, ref, watchSyncEffect } from 'vue'
|
|
3
|
+
import { computed, getCurrentInstance, provide, ref, watchSyncEffect } from 'vue'
|
|
4
4
|
import type { PropType } from 'vue'
|
|
5
5
|
import { createDispatch, useComponentHost } from './host'
|
|
6
|
-
import { checkedProp } from './props'
|
|
6
|
+
import { checkedProp, vPropValidity } from './props'
|
|
7
7
|
|
|
8
8
|
defineOptions({ inheritAttrs: false })
|
|
9
9
|
|
|
10
|
+
const propValidityContract = {
|
|
11
|
+
props: {
|
|
12
|
+
density: {
|
|
13
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
14
|
+
required: false,
|
|
15
|
+
target: { attribute: 'density' },
|
|
16
|
+
description: 'Compact trades padding and type size for rows that fit more on screen.',
|
|
17
|
+
values: ['comfortable', 'compact'],
|
|
18
|
+
default: 'comfortable',
|
|
19
|
+
},
|
|
20
|
+
for: {
|
|
21
|
+
type: { kind: 'terminal', name: 'string' },
|
|
22
|
+
required: false,
|
|
23
|
+
target: { attribute: 'for' },
|
|
24
|
+
description: 'ID of the control that toggles and anchors the menu.',
|
|
25
|
+
default: '',
|
|
26
|
+
},
|
|
27
|
+
inline: {
|
|
28
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
29
|
+
required: false,
|
|
30
|
+
target: { attribute: 'inline' },
|
|
31
|
+
description:
|
|
32
|
+
'Displays the menu in the page flow without an overlay or trigger, for an embedded list of actions.',
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
open: {
|
|
36
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
37
|
+
required: false,
|
|
38
|
+
target: { attribute: 'open' },
|
|
39
|
+
description: 'Whether the menu is open initially or when set externally.',
|
|
40
|
+
default: false,
|
|
41
|
+
},
|
|
42
|
+
placement: {
|
|
43
|
+
type: { kind: 'terminal', name: 'string' },
|
|
44
|
+
required: false,
|
|
45
|
+
target: { attribute: 'placement' },
|
|
46
|
+
description: 'Positions an associated menu relative to its trigger.',
|
|
47
|
+
default: 'bottom-start',
|
|
48
|
+
},
|
|
49
|
+
size: {
|
|
50
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
51
|
+
required: false,
|
|
52
|
+
target: { attribute: 'size' },
|
|
53
|
+
description:
|
|
54
|
+
'sm sizes the menu to a small trigger, such as an xs or sm button: smallest text, short rows, a small check, and a narrower minimum width. md is the\n standard size.',
|
|
55
|
+
values: ['sm', 'md'],
|
|
56
|
+
default: 'md',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
}
|
|
10
60
|
const props = defineProps({
|
|
11
61
|
density: {
|
|
12
62
|
type: null as unknown as PropType<'comfortable' | 'compact' | null>,
|
|
@@ -24,48 +74,36 @@ const checkedProps = computed(() => ({
|
|
|
24
74
|
{ kind: 'terminal', name: 'keyword' },
|
|
25
75
|
false,
|
|
26
76
|
'density',
|
|
27
|
-
undefined,
|
|
28
|
-
['comfortable', 'compact'],
|
|
29
77
|
) as 'comfortable' | 'compact',
|
|
30
78
|
for: checkedProp<string>(
|
|
31
79
|
props['for'],
|
|
32
80
|
{ kind: 'terminal', name: 'string' },
|
|
33
81
|
false,
|
|
34
82
|
'for',
|
|
35
|
-
undefined,
|
|
36
|
-
undefined,
|
|
37
83
|
) as string,
|
|
38
84
|
inline: checkedProp<boolean>(
|
|
39
85
|
props['inline'],
|
|
40
86
|
{ kind: 'terminal', name: 'boolean' },
|
|
41
87
|
false,
|
|
42
88
|
'inline',
|
|
43
|
-
undefined,
|
|
44
|
-
undefined,
|
|
45
89
|
) as boolean,
|
|
46
90
|
open: checkedProp<boolean>(
|
|
47
91
|
props['open'],
|
|
48
92
|
{ kind: 'terminal', name: 'boolean' },
|
|
49
93
|
false,
|
|
50
94
|
'open',
|
|
51
|
-
undefined,
|
|
52
|
-
undefined,
|
|
53
95
|
) as boolean,
|
|
54
96
|
placement: checkedProp<string>(
|
|
55
97
|
props['placement'],
|
|
56
98
|
{ kind: 'terminal', name: 'string' },
|
|
57
99
|
false,
|
|
58
100
|
'placement',
|
|
59
|
-
undefined,
|
|
60
|
-
undefined,
|
|
61
101
|
) as string,
|
|
62
102
|
size: checkedProp<'sm' | 'md'>(
|
|
63
103
|
props['size'],
|
|
64
104
|
{ kind: 'terminal', name: 'keyword' },
|
|
65
105
|
false,
|
|
66
106
|
'size',
|
|
67
|
-
undefined,
|
|
68
|
-
['sm', 'md'],
|
|
69
107
|
) as 'sm' | 'md',
|
|
70
108
|
}))
|
|
71
109
|
void checkedProps.value
|
|
@@ -138,6 +176,7 @@ const emit = defineEmits<{
|
|
|
138
176
|
|
|
139
177
|
const root = ref<HTMLElement | null>(null)
|
|
140
178
|
const internalOpen = ref(false)
|
|
179
|
+
provide('html-next:ui-menu:internalOpen', internalOpen)
|
|
141
180
|
const hydrationNode = hydrationInstance?.vnode.el
|
|
142
181
|
if (
|
|
143
182
|
typeof window !== 'undefined' && hydrationNode != null
|
|
@@ -221,6 +260,7 @@ useComponentHost(() => import('../components/ui-menu/ui-menu.js'), {
|
|
|
221
260
|
role="menu"
|
|
222
261
|
aria-orientation="vertical"
|
|
223
262
|
v-bind="nativeAttrs($attrs)"
|
|
263
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
224
264
|
:data-density="reflectedProp('density', 'density', checkedProps.density, undefined, false)"
|
|
225
265
|
:data-for="reflectedProp('for', 'for', checkedProps.for, undefined, false)"
|
|
226
266
|
:data-inline="reflectedProp('inline', 'inline', checkedProps.inline, undefined, false)"
|
package/vue/UiMenuGroup.vue
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
<!-- Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.15 for Vue 3.5. Do not edit. -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
3
|
import { computed, getCurrentInstance, watchSyncEffect } from 'vue'
|
|
4
4
|
import type { PropType } from 'vue'
|
|
5
|
-
import { checkedProp } from './props'
|
|
5
|
+
import { checkedProp, vPropValidity } from './props'
|
|
6
6
|
|
|
7
7
|
defineOptions({ inheritAttrs: false })
|
|
8
8
|
|
|
9
|
+
const propValidityContract = {
|
|
10
|
+
props: {
|
|
11
|
+
label: {
|
|
12
|
+
type: { kind: 'terminal', name: 'string' },
|
|
13
|
+
required: false,
|
|
14
|
+
target: { attribute: 'aria-label' },
|
|
15
|
+
description: 'Visible heading and accessible name for this group of menu items.',
|
|
16
|
+
default: '',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
}
|
|
9
20
|
const props = defineProps({
|
|
10
21
|
label: { type: null as unknown as PropType<string | null>, default: '' },
|
|
11
22
|
})
|
|
@@ -15,8 +26,6 @@ const checkedProps = computed(() => ({
|
|
|
15
26
|
{ kind: 'terminal', name: 'string' },
|
|
16
27
|
false,
|
|
17
28
|
'label',
|
|
18
|
-
undefined,
|
|
19
|
-
undefined,
|
|
20
29
|
) as string,
|
|
21
30
|
}))
|
|
22
31
|
void checkedProps.value
|
|
@@ -81,6 +90,7 @@ if (
|
|
|
81
90
|
role="group"
|
|
82
91
|
v-bind="nativeAttrs($attrs)"
|
|
83
92
|
:aria-label="checkedProps.label ?? undefined"
|
|
93
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
84
94
|
:data-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
|
|
85
95
|
>
|
|
86
96
|
<div v-if="checkedProps.label" class="heading">{{ checkedProps.label }}</div>
|
package/vue/UiMenuItem.d.ts
CHANGED
|
@@ -31,14 +31,14 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
31
31
|
default: string;
|
|
32
32
|
};
|
|
33
33
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
34
|
-
"update:checked": (value: boolean) => any;
|
|
35
|
-
"update:value": (value: string) => any;
|
|
36
34
|
change: (event: CustomEvent<{
|
|
37
35
|
readonly checked: boolean;
|
|
38
36
|
readonly value: string;
|
|
39
37
|
readonly type: "checkbox" | "radio";
|
|
40
38
|
readonly trigger: "keyboard" | "pointer" | "programmatic";
|
|
41
39
|
}>) => any;
|
|
40
|
+
"update:checked": (value: boolean) => any;
|
|
41
|
+
"update:value": (value: string) => any;
|
|
42
42
|
"update:type": (value: string) => any;
|
|
43
43
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
44
44
|
checked: {
|
|
@@ -62,14 +62,14 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
62
62
|
default: string;
|
|
63
63
|
};
|
|
64
64
|
}>> & Readonly<{
|
|
65
|
-
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
|
66
|
-
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
67
65
|
onChange?: ((event: CustomEvent<{
|
|
68
66
|
readonly checked: boolean;
|
|
69
67
|
readonly value: string;
|
|
70
68
|
readonly type: "checkbox" | "radio";
|
|
71
69
|
readonly trigger: "keyboard" | "pointer" | "programmatic";
|
|
72
70
|
}>) => any) | undefined;
|
|
71
|
+
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
|
72
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
73
73
|
"onUpdate:type"?: ((value: string) => any) | undefined;
|
|
74
74
|
}>, {
|
|
75
75
|
value: string | null;
|
package/vue/UiMenuItem.vue
CHANGED
|
@@ -1,13 +1,57 @@
|
|
|
1
|
-
<!-- Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.15 for Vue 3.5. Do not edit. -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
|
-
import { computed, getCurrentInstance, ref, useTemplateRef, watchSyncEffect } from 'vue'
|
|
3
|
+
import { computed, getCurrentInstance, provide, ref, useTemplateRef, watchSyncEffect } from 'vue'
|
|
4
4
|
import type { PropType } from 'vue'
|
|
5
5
|
import { createDispatch, preserveRootFocus, useComponentHost } from './host'
|
|
6
|
-
import { checkedProp } from './props'
|
|
6
|
+
import { checkedProp, vPropValidity } from './props'
|
|
7
7
|
import UiIcon from './UiIcon.vue'
|
|
8
8
|
|
|
9
9
|
defineOptions({ inheritAttrs: false })
|
|
10
10
|
|
|
11
|
+
const propValidityContract = {
|
|
12
|
+
props: {
|
|
13
|
+
checked: {
|
|
14
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
15
|
+
required: false,
|
|
16
|
+
target: { attribute: 'checked' },
|
|
17
|
+
description: 'Initial or externally controlled checked state of a checkbox or radio item.',
|
|
18
|
+
default: false,
|
|
19
|
+
},
|
|
20
|
+
disabled: {
|
|
21
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
22
|
+
required: false,
|
|
23
|
+
target: { attribute: 'aria-disabled' },
|
|
24
|
+
description:
|
|
25
|
+
'Makes the item unavailable: it is faded, skipped by the arrow keys, and choosing it does nothing. It stays visible and is announced as disabled.',
|
|
26
|
+
default: false,
|
|
27
|
+
},
|
|
28
|
+
href: {
|
|
29
|
+
type: { kind: 'terminal', name: 'string' },
|
|
30
|
+
required: false,
|
|
31
|
+
target: { attribute: 'href' },
|
|
32
|
+
description:
|
|
33
|
+
'A destination makes an action item a real link, with native navigation and link context actions.',
|
|
34
|
+
default: '',
|
|
35
|
+
},
|
|
36
|
+
type: {
|
|
37
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
38
|
+
required: false,
|
|
39
|
+
target: { attribute: 'type' },
|
|
40
|
+
description:
|
|
41
|
+
'An action closes its menu; a checkbox toggles, and a radio chooses one item within its nearest Menu Group. Checkable items keep the menu open.',
|
|
42
|
+
values: ['action', 'checkbox', 'radio'],
|
|
43
|
+
default: 'action',
|
|
44
|
+
},
|
|
45
|
+
value: {
|
|
46
|
+
type: { kind: 'terminal', name: 'string' },
|
|
47
|
+
required: false,
|
|
48
|
+
target: { attribute: 'data-value' },
|
|
49
|
+
description:
|
|
50
|
+
'The value the enclosing menu reports in its select event when this item is chosen. Give each item a distinct value so one handler can tell them\n apart.',
|
|
51
|
+
default: '',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
}
|
|
11
55
|
const props = defineProps({
|
|
12
56
|
checked: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
13
57
|
disabled: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
@@ -24,40 +68,30 @@ const checkedProps = computed(() => ({
|
|
|
24
68
|
{ kind: 'terminal', name: 'boolean' },
|
|
25
69
|
false,
|
|
26
70
|
'checked',
|
|
27
|
-
undefined,
|
|
28
|
-
undefined,
|
|
29
71
|
) as boolean,
|
|
30
72
|
disabled: checkedProp<boolean>(
|
|
31
73
|
props['disabled'],
|
|
32
74
|
{ kind: 'terminal', name: 'boolean' },
|
|
33
75
|
false,
|
|
34
76
|
'disabled',
|
|
35
|
-
undefined,
|
|
36
|
-
undefined,
|
|
37
77
|
) as boolean,
|
|
38
78
|
href: checkedProp<string>(
|
|
39
79
|
props['href'],
|
|
40
80
|
{ kind: 'terminal', name: 'string' },
|
|
41
81
|
false,
|
|
42
82
|
'href',
|
|
43
|
-
undefined,
|
|
44
|
-
undefined,
|
|
45
83
|
) as string,
|
|
46
84
|
type: checkedProp<'action' | 'checkbox' | 'radio'>(
|
|
47
85
|
props['type'],
|
|
48
86
|
{ kind: 'terminal', name: 'keyword' },
|
|
49
87
|
false,
|
|
50
88
|
'type',
|
|
51
|
-
undefined,
|
|
52
|
-
['action', 'checkbox', 'radio'],
|
|
53
89
|
) as 'action' | 'checkbox' | 'radio',
|
|
54
90
|
value: checkedProp<string>(
|
|
55
91
|
props['value'],
|
|
56
92
|
{ kind: 'terminal', name: 'string' },
|
|
57
93
|
false,
|
|
58
94
|
'value',
|
|
59
|
-
undefined,
|
|
60
|
-
undefined,
|
|
61
95
|
) as string,
|
|
62
96
|
}))
|
|
63
97
|
void checkedProps.value
|
|
@@ -117,6 +151,33 @@ const rootArmElement = useTemplateRef<HTMLElement>('@html-next/root')
|
|
|
117
151
|
const root = rootArmElement
|
|
118
152
|
preserveRootFocus(root)
|
|
119
153
|
const internalChecked = ref(false)
|
|
154
|
+
let guardedPrevious: any
|
|
155
|
+
const guarded = computed(() => {
|
|
156
|
+
if (!(internalChecked.value == null || typeof internalChecked.value === 'boolean')) {
|
|
157
|
+
return guardedPrevious
|
|
158
|
+
}
|
|
159
|
+
return guardedPrevious =
|
|
160
|
+
typeof ((({
|
|
161
|
+
action: null,
|
|
162
|
+
checkbox: internalChecked.value,
|
|
163
|
+
radio: internalChecked.value,
|
|
164
|
+
}) as Record<string, any>)[checkedProps.value.type]) === 'boolean'
|
|
165
|
+
? String(
|
|
166
|
+
(({
|
|
167
|
+
action: null,
|
|
168
|
+
checkbox: internalChecked.value,
|
|
169
|
+
radio: internalChecked.value,
|
|
170
|
+
}) as Record<string, any>)[checkedProps.value.type],
|
|
171
|
+
)
|
|
172
|
+
: attribute(
|
|
173
|
+
(({
|
|
174
|
+
action: null,
|
|
175
|
+
checkbox: internalChecked.value,
|
|
176
|
+
radio: internalChecked.value,
|
|
177
|
+
}) as Record<string, any>)[checkedProps.value.type],
|
|
178
|
+
)
|
|
179
|
+
})
|
|
180
|
+
provide('html-next:ui-menu-item:internalChecked', internalChecked)
|
|
120
181
|
const hydrationNode = hydrationInstance?.vnode.el
|
|
121
182
|
if (
|
|
122
183
|
typeof window !== 'undefined' && hydrationNode != null
|
|
@@ -201,6 +262,7 @@ function attribute(value: unknown): any {
|
|
|
201
262
|
`${checkedProps.disabled ?? ''}`
|
|
202
263
|
],
|
|
203
264
|
)"
|
|
265
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
204
266
|
:data-checked="reflectedProp('checked', 'checked', checkedProps.checked, undefined, false)"
|
|
205
267
|
:data-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
|
|
206
268
|
:data-href="reflectedProp('href', 'href', checkedProps.href, undefined, false)"
|
|
@@ -221,21 +283,9 @@ function attribute(value: unknown): any {
|
|
|
221
283
|
any
|
|
222
284
|
>)[checkedProps.type],
|
|
223
285
|
)"
|
|
224
|
-
:aria-checked="
|
|
225
|
-
string,
|
|
226
|
-
any
|
|
227
|
-
>)[checkedProps.type]) === 'boolean'
|
|
228
|
-
? String(
|
|
229
|
-
(({ action: null, checkbox: internalChecked, radio: internalChecked }) as Record<string, any>)[
|
|
230
|
-
checkedProps.type
|
|
231
|
-
],
|
|
232
|
-
)
|
|
233
|
-
: attribute(
|
|
234
|
-
(({ action: null, checkbox: internalChecked, radio: internalChecked }) as Record<string, any>)[
|
|
235
|
-
checkedProps.type
|
|
236
|
-
],
|
|
237
|
-
)"
|
|
286
|
+
:aria-checked="guarded"
|
|
238
287
|
:aria-disabled="checkedProps.disabled ?? undefined"
|
|
288
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
239
289
|
:data-checked="reflectedProp('checked', 'checked', checkedProps.checked, undefined, false)"
|
|
240
290
|
:data-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
|
|
241
291
|
:data-href="reflectedProp('href', 'href', checkedProps.href, undefined, false)"
|
package/vue/UiMeter.vue
CHANGED
|
@@ -1,11 +1,73 @@
|
|
|
1
|
-
<!-- Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.15 for Vue 3.5. Do not edit. -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
3
|
import { computed, getCurrentInstance, watchSyncEffect } from 'vue'
|
|
4
4
|
import type { PropType } from 'vue'
|
|
5
|
-
import { checkedProp } from './props'
|
|
5
|
+
import { checkedProp, vPropValidity } from './props'
|
|
6
6
|
|
|
7
7
|
defineOptions({ inheritAttrs: false })
|
|
8
8
|
|
|
9
|
+
const propValidityContract = {
|
|
10
|
+
props: {
|
|
11
|
+
label: {
|
|
12
|
+
type: { kind: 'terminal', name: 'string' },
|
|
13
|
+
required: false,
|
|
14
|
+
target: { attribute: 'label' },
|
|
15
|
+
description:
|
|
16
|
+
'What the meter measures, as its accessible name ("Collected"). Leave it empty only when aria-labelledby names the meter from visible text.',
|
|
17
|
+
default: '',
|
|
18
|
+
},
|
|
19
|
+
max: {
|
|
20
|
+
type: { kind: 'terminal', name: 'number' },
|
|
21
|
+
required: false,
|
|
22
|
+
target: { attribute: 'aria-valuemax' },
|
|
23
|
+
description:
|
|
24
|
+
'The value of a full bar, as on a native meter: 1 for a fraction, or the whole amount (a total, a count of items) with value as the part of it. Must be\n above 0; otherwise the bar is empty.',
|
|
25
|
+
default: 1,
|
|
26
|
+
},
|
|
27
|
+
segments: {
|
|
28
|
+
type: { kind: 'terminal', name: 'number' },
|
|
29
|
+
required: false,
|
|
30
|
+
target: { attribute: 'segments' },
|
|
31
|
+
description:
|
|
32
|
+
'How many equal segments to draw the bar as, from 2 to 12, for a count of steps: set max to the same number and value to the steps done, so whole segments\n fill, and say the step in valueText ("Shipped, step 4 of 6"). A value between steps fills part of a segment. 0 draws one continuous bar, as does any other\n number.',
|
|
33
|
+
default: 0,
|
|
34
|
+
},
|
|
35
|
+
size: {
|
|
36
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
37
|
+
required: false,
|
|
38
|
+
target: { attribute: 'size' },
|
|
39
|
+
description:
|
|
40
|
+
'Thickness. sm is a thin bar that sits in a line of text, such as a table cell beside an amount; md stands on its own.',
|
|
41
|
+
values: ['sm', 'md'],
|
|
42
|
+
default: 'md',
|
|
43
|
+
},
|
|
44
|
+
tone: {
|
|
45
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
46
|
+
required: false,
|
|
47
|
+
target: { attribute: 'tone' },
|
|
48
|
+
description:
|
|
49
|
+
'Which colour the filled part speaks in, as on Badge: neutral is a quiet grey, accent draws the eye, and info, success, warning, and danger mark a state\n (such as nothing yet, partial, complete, or needs attention). Colour alone says nothing to assistive technology or in forced colours, so say the state in\n valueText or in text beside the meter too.',
|
|
50
|
+
values: ['neutral', 'accent', 'info', 'success', 'warning', 'danger'],
|
|
51
|
+
default: 'neutral',
|
|
52
|
+
},
|
|
53
|
+
value: {
|
|
54
|
+
type: { kind: 'terminal', name: 'number' },
|
|
55
|
+
required: false,
|
|
56
|
+
target: { attribute: 'value' },
|
|
57
|
+
description:
|
|
58
|
+
'How far along, from 0 to max. A value outside that range draws at the nearer end: below 0 is an empty track, above max a full bar.',
|
|
59
|
+
default: 0,
|
|
60
|
+
},
|
|
61
|
+
valueText: {
|
|
62
|
+
type: { kind: 'terminal', name: 'string' },
|
|
63
|
+
required: false,
|
|
64
|
+
target: { attribute: 'valuetext' },
|
|
65
|
+
description:
|
|
66
|
+
'The value as assistive technology reads it ("$750 of $1,240 collected", "3 of 5 done, overdue"). Empty reads the percentage.',
|
|
67
|
+
default: '',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
}
|
|
9
71
|
const props = defineProps({
|
|
10
72
|
label: { type: null as unknown as PropType<string | null>, default: '' },
|
|
11
73
|
max: { type: null as unknown as PropType<number | null>, default: 1 },
|
|
@@ -26,56 +88,42 @@ const checkedProps = computed(() => ({
|
|
|
26
88
|
{ kind: 'terminal', name: 'string' },
|
|
27
89
|
false,
|
|
28
90
|
'label',
|
|
29
|
-
undefined,
|
|
30
|
-
undefined,
|
|
31
91
|
) as string,
|
|
32
92
|
max: checkedProp<number>(
|
|
33
93
|
props['max'],
|
|
34
94
|
{ kind: 'terminal', name: 'number' },
|
|
35
95
|
false,
|
|
36
96
|
'max',
|
|
37
|
-
undefined,
|
|
38
|
-
undefined,
|
|
39
97
|
) as number,
|
|
40
98
|
segments: checkedProp<number>(
|
|
41
99
|
props['segments'],
|
|
42
100
|
{ kind: 'terminal', name: 'number' },
|
|
43
101
|
false,
|
|
44
102
|
'segments',
|
|
45
|
-
undefined,
|
|
46
|
-
undefined,
|
|
47
103
|
) as number,
|
|
48
104
|
size: checkedProp<'sm' | 'md'>(
|
|
49
105
|
props['size'],
|
|
50
106
|
{ kind: 'terminal', name: 'keyword' },
|
|
51
107
|
false,
|
|
52
108
|
'size',
|
|
53
|
-
undefined,
|
|
54
|
-
['sm', 'md'],
|
|
55
109
|
) as 'sm' | 'md',
|
|
56
110
|
tone: checkedProp<'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger'>(
|
|
57
111
|
props['tone'],
|
|
58
112
|
{ kind: 'terminal', name: 'keyword' },
|
|
59
113
|
false,
|
|
60
114
|
'tone',
|
|
61
|
-
undefined,
|
|
62
|
-
['neutral', 'accent', 'info', 'success', 'warning', 'danger'],
|
|
63
115
|
) as 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger',
|
|
64
116
|
value: checkedProp<number>(
|
|
65
117
|
props['value'],
|
|
66
118
|
{ kind: 'terminal', name: 'number' },
|
|
67
119
|
false,
|
|
68
120
|
'value',
|
|
69
|
-
undefined,
|
|
70
|
-
undefined,
|
|
71
121
|
) as number,
|
|
72
122
|
valueText: checkedProp<string>(
|
|
73
123
|
props['valueText'],
|
|
74
124
|
{ kind: 'terminal', name: 'string' },
|
|
75
125
|
false,
|
|
76
126
|
'valueText',
|
|
77
|
-
undefined,
|
|
78
|
-
undefined,
|
|
79
127
|
) as string,
|
|
80
128
|
}))
|
|
81
129
|
void checkedProps.value
|
|
@@ -289,6 +337,7 @@ function number(value: unknown): number | undefined {
|
|
|
289
337
|
: number(checkedProps.segments)! > number(1)!)}`
|
|
290
338
|
],
|
|
291
339
|
)"
|
|
340
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
292
341
|
:data-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
|
|
293
342
|
:data-max="reflectedProp('max', 'max', checkedProps.max, undefined, false)"
|
|
294
343
|
:data-segments="reflectedProp('segments', 'segments', checkedProps.segments, undefined, false)"
|
package/vue/UiNavItem.vue
CHANGED
|
@@ -1,12 +1,54 @@
|
|
|
1
|
-
<!-- Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.15 for Vue 3.5. Do not edit. -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
3
|
import { computed, getCurrentInstance, useTemplateRef, watchSyncEffect } from 'vue'
|
|
4
4
|
import type { PropType } from 'vue'
|
|
5
5
|
import { preserveRootFocus } from './host'
|
|
6
|
-
import { checkedProp } from './props'
|
|
6
|
+
import { checkedProp, vPropValidity } from './props'
|
|
7
7
|
|
|
8
8
|
defineOptions({ inheritAttrs: false })
|
|
9
9
|
|
|
10
|
+
const propValidityContract = {
|
|
11
|
+
props: {
|
|
12
|
+
as: {
|
|
13
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
14
|
+
required: false,
|
|
15
|
+
target: { attribute: 'as' },
|
|
16
|
+
description:
|
|
17
|
+
'The native element the item renders: a button, or a link (a) that navigates to href.',
|
|
18
|
+
values: ['button', 'a'],
|
|
19
|
+
default: 'button',
|
|
20
|
+
},
|
|
21
|
+
current: {
|
|
22
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
23
|
+
required: false,
|
|
24
|
+
target: { attribute: 'current' },
|
|
25
|
+
description:
|
|
26
|
+
'Marks the item as where you are: it takes the selected surface, a stronger label, and a bar on its start edge, and states aria-current, which assistive\n technology announces. "true" means the current page (aria-current="page"); "step" marks the current step of a process, and "location" the current place in\n a set, such as a section of a record. Set it on one item at a time.',
|
|
27
|
+
values: ['true', 'false', 'page', 'step', 'location'],
|
|
28
|
+
default: 'false',
|
|
29
|
+
},
|
|
30
|
+
href: {
|
|
31
|
+
type: { kind: 'terminal', name: 'string' },
|
|
32
|
+
required: false,
|
|
33
|
+
target: { attribute: 'href' },
|
|
34
|
+
description:
|
|
35
|
+
'The link\'s destination. Pair it with as="a" so the item renders as a real link: a router, a modified click, and "open in new tab" all work. Without it the\n item is a button, for switching views inside the app.',
|
|
36
|
+
},
|
|
37
|
+
rel: {
|
|
38
|
+
type: { kind: 'terminal', name: 'string' },
|
|
39
|
+
required: false,
|
|
40
|
+
target: { attribute: 'rel' },
|
|
41
|
+
description:
|
|
42
|
+
'The link\'s relationship to its destination, as on a native link. Only meaningful with as="a".',
|
|
43
|
+
},
|
|
44
|
+
target: {
|
|
45
|
+
type: { kind: 'terminal', name: 'string' },
|
|
46
|
+
required: false,
|
|
47
|
+
target: { attribute: 'target' },
|
|
48
|
+
description: 'Where a link opens, as on a native link. Only meaningful with as="a".',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
}
|
|
10
52
|
const props = defineProps({
|
|
11
53
|
as: { type: null as unknown as PropType<'button' | 'a' | null>, default: 'button' },
|
|
12
54
|
current: {
|
|
@@ -23,40 +65,20 @@ const checkedProps = computed(() => ({
|
|
|
23
65
|
{ kind: 'terminal', name: 'keyword' },
|
|
24
66
|
false,
|
|
25
67
|
'as',
|
|
26
|
-
undefined,
|
|
27
|
-
['button', 'a'],
|
|
28
68
|
) as 'button' | 'a',
|
|
29
69
|
current: checkedProp<'true' | 'false' | 'page' | 'step' | 'location'>(
|
|
30
70
|
props['current'],
|
|
31
71
|
{ kind: 'terminal', name: 'keyword' },
|
|
32
72
|
false,
|
|
33
73
|
'current',
|
|
34
|
-
undefined,
|
|
35
|
-
['true', 'false', 'page', 'step', 'location'],
|
|
36
74
|
) as 'true' | 'false' | 'page' | 'step' | 'location',
|
|
37
|
-
href: checkedProp<string>(
|
|
38
|
-
|
|
39
|
-
{ kind: 'terminal', name: 'string' },
|
|
40
|
-
false,
|
|
41
|
-
'href',
|
|
42
|
-
undefined,
|
|
43
|
-
undefined,
|
|
44
|
-
),
|
|
45
|
-
rel: checkedProp<string>(
|
|
46
|
-
props['rel'],
|
|
47
|
-
{ kind: 'terminal', name: 'string' },
|
|
48
|
-
false,
|
|
49
|
-
'rel',
|
|
50
|
-
undefined,
|
|
51
|
-
undefined,
|
|
52
|
-
),
|
|
75
|
+
href: checkedProp<string>(props['href'], { kind: 'terminal', name: 'string' }, false, 'href'),
|
|
76
|
+
rel: checkedProp<string>(props['rel'], { kind: 'terminal', name: 'string' }, false, 'rel'),
|
|
53
77
|
target: checkedProp<string>(
|
|
54
78
|
props['target'],
|
|
55
79
|
{ kind: 'terminal', name: 'string' },
|
|
56
80
|
false,
|
|
57
81
|
'target',
|
|
58
|
-
undefined,
|
|
59
|
-
undefined,
|
|
60
82
|
),
|
|
61
83
|
}))
|
|
62
84
|
void checkedProps.value
|
|
@@ -159,6 +181,7 @@ function attribute(value: unknown): any {
|
|
|
159
181
|
any
|
|
160
182
|
>)[`${checkedProps.current ?? ''}`],
|
|
161
183
|
)"
|
|
184
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
162
185
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
163
186
|
:data-current="reflectedProp('current', 'current', checkedProps.current, undefined, false)"
|
|
164
187
|
:data-href="reflectedProp('href', 'href', checkedProps.href, undefined, false)"
|
|
@@ -193,6 +216,7 @@ function attribute(value: unknown): any {
|
|
|
193
216
|
any
|
|
194
217
|
>)[`${checkedProps.current ?? ''}`],
|
|
195
218
|
)"
|
|
219
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
196
220
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
197
221
|
:data-current="reflectedProp('current', 'current', checkedProps.current, undefined, false)"
|
|
198
222
|
:data-href="reflectedProp('href', 'href', checkedProps.href, undefined, false)"
|
package/vue/UiPageHeader.vue
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
|
-
<!-- Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.15 for Vue 3.5. Do not edit. -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
3
|
import { computed, getCurrentInstance, watchSyncEffect } from 'vue'
|
|
4
4
|
import type { PropType } from 'vue'
|
|
5
|
-
import { checkedProp } from './props'
|
|
5
|
+
import { checkedProp, vPropValidity } from './props'
|
|
6
6
|
|
|
7
7
|
defineOptions({ inheritAttrs: false })
|
|
8
8
|
|
|
9
|
+
const propValidityContract = {
|
|
10
|
+
props: {
|
|
11
|
+
align: {
|
|
12
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
13
|
+
required: false,
|
|
14
|
+
target: { attribute: 'align' },
|
|
15
|
+
description:
|
|
16
|
+
'Where the header sits. start runs along the page\'s start edge with actions at the end; center stacks everything centred, for a standalone card such as\n sign-in.',
|
|
17
|
+
values: ['start', 'center'],
|
|
18
|
+
default: 'start',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
}
|
|
9
22
|
const props = defineProps({
|
|
10
23
|
align: { type: null as unknown as PropType<'start' | 'center' | null>, default: 'start' },
|
|
11
24
|
})
|
|
@@ -15,8 +28,6 @@ const checkedProps = computed(() => ({
|
|
|
15
28
|
{ kind: 'terminal', name: 'keyword' },
|
|
16
29
|
false,
|
|
17
30
|
'align',
|
|
18
|
-
undefined,
|
|
19
|
-
['start', 'center'],
|
|
20
31
|
) as 'start' | 'center',
|
|
21
32
|
}))
|
|
22
33
|
void checkedProps.value
|
|
@@ -87,6 +98,7 @@ const hostState = computed(() =>
|
|
|
87
98
|
<header
|
|
88
99
|
data-component="ui-page-header"
|
|
89
100
|
v-bind="nativeAttrs($attrs)"
|
|
101
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
90
102
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
91
103
|
:data-ui-page-header-state="hostState || undefined"
|
|
92
104
|
>
|