@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/UiContextMenu.vue
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
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, 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
|
+
for: {
|
|
13
|
+
type: { kind: 'terminal', name: 'string' },
|
|
14
|
+
required: false,
|
|
15
|
+
target: { attribute: 'for' },
|
|
16
|
+
description:
|
|
17
|
+
'ID of the element whose context click (right-click, long-press, Shift+F10, or the Menu key) opens the menu.',
|
|
18
|
+
default: '',
|
|
19
|
+
},
|
|
20
|
+
open: {
|
|
21
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
22
|
+
required: false,
|
|
23
|
+
target: { attribute: 'open' },
|
|
24
|
+
description: 'Whether the context menu is open initially or when set externally.',
|
|
25
|
+
default: false,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
}
|
|
10
29
|
const props = defineProps({
|
|
11
30
|
for: { type: null as unknown as PropType<string | null>, default: '' },
|
|
12
31
|
open: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
@@ -17,16 +36,12 @@ const checkedProps = computed(() => ({
|
|
|
17
36
|
{ kind: 'terminal', name: 'string' },
|
|
18
37
|
false,
|
|
19
38
|
'for',
|
|
20
|
-
undefined,
|
|
21
|
-
undefined,
|
|
22
39
|
) as string,
|
|
23
40
|
open: checkedProp<boolean>(
|
|
24
41
|
props['open'],
|
|
25
42
|
{ kind: 'terminal', name: 'boolean' },
|
|
26
43
|
false,
|
|
27
44
|
'open',
|
|
28
|
-
undefined,
|
|
29
|
-
undefined,
|
|
30
45
|
) as boolean,
|
|
31
46
|
}))
|
|
32
47
|
void checkedProps.value
|
|
@@ -100,6 +115,7 @@ const emit = defineEmits<{
|
|
|
100
115
|
const root = ref<HTMLElement | null>(null)
|
|
101
116
|
const menuElement = useTemplateRef<HTMLElement>('menu')
|
|
102
117
|
const internalOpen = ref(false)
|
|
118
|
+
provide('html-next:ui-context-menu:internalOpen', internalOpen)
|
|
103
119
|
const hydrationNode = hydrationInstance?.vnode.el
|
|
104
120
|
if (
|
|
105
121
|
typeof window !== 'undefined' && hydrationNode != null
|
|
@@ -163,6 +179,7 @@ useComponentHost(() => import('../components/ui-context-menu/ui-context-menu.js'
|
|
|
163
179
|
<span
|
|
164
180
|
data-component="ui-context-menu"
|
|
165
181
|
v-bind="nativeAttrs($attrs)"
|
|
182
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
166
183
|
:data-for="reflectedProp('for', 'for', checkedProps.for, undefined, false)"
|
|
167
184
|
:data-open="reflectedProp('open', 'open', checkedProps.open, undefined, false)"
|
|
168
185
|
ref="root"
|
package/vue/UiCover.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
|
+
size: {
|
|
12
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
13
|
+
required: false,
|
|
14
|
+
target: { attribute: 'size' },
|
|
15
|
+
description:
|
|
16
|
+
'How tall the cover is. screen is at least the viewport\'s height, for a view that is one centred card, such as sign-in; fill takes the space its parent\n gives it.',
|
|
17
|
+
values: ['screen', 'fill'],
|
|
18
|
+
default: 'screen',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
}
|
|
9
22
|
const props = defineProps({
|
|
10
23
|
size: { type: null as unknown as PropType<'screen' | 'fill' | null>, default: 'screen' },
|
|
11
24
|
})
|
|
@@ -15,8 +28,6 @@ const checkedProps = computed(() => ({
|
|
|
15
28
|
{ kind: 'terminal', name: 'keyword' },
|
|
16
29
|
false,
|
|
17
30
|
'size',
|
|
18
|
-
undefined,
|
|
19
|
-
['screen', 'fill'],
|
|
20
31
|
) as 'screen' | 'fill',
|
|
21
32
|
}))
|
|
22
33
|
void checkedProps.value
|
|
@@ -84,6 +95,7 @@ const hostState = computed(() =>
|
|
|
84
95
|
<div
|
|
85
96
|
data-component="ui-cover"
|
|
86
97
|
v-bind="nativeAttrs($attrs)"
|
|
98
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
87
99
|
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
88
100
|
:data-ui-cover-state="hostState || undefined"
|
|
89
101
|
>
|
|
@@ -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
|
+
term: {
|
|
12
|
+
type: { kind: 'terminal', name: 'string' },
|
|
13
|
+
required: false,
|
|
14
|
+
target: { attribute: 'term' },
|
|
15
|
+
description: 'What the value is, such as "Invited by". The value is the item\'s content.',
|
|
16
|
+
default: '',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
}
|
|
9
20
|
const props = defineProps({
|
|
10
21
|
term: { 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
|
'term',
|
|
18
|
-
undefined,
|
|
19
|
-
undefined,
|
|
20
29
|
) as string,
|
|
21
30
|
}))
|
|
22
31
|
void checkedProps.value
|
|
@@ -79,6 +88,7 @@ if (
|
|
|
79
88
|
<div
|
|
80
89
|
data-component="ui-description-item"
|
|
81
90
|
v-bind="nativeAttrs($attrs)"
|
|
91
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
82
92
|
:data-term="reflectedProp('term', 'term', checkedProps.term, undefined, false)"
|
|
83
93
|
>
|
|
84
94
|
<dt>{{ checkedProps.term }}</dt>
|
|
@@ -1,11 +1,41 @@
|
|
|
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
|
+
columns: {
|
|
12
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
13
|
+
required: false,
|
|
14
|
+
target: { attribute: 'columns' },
|
|
15
|
+
description:
|
|
16
|
+
'The most columns grid and tiles set on a wide list; a narrow list still drops to fewer. Left unset, they fit as many as the width allows.',
|
|
17
|
+
values: ['2', '3', '4'],
|
|
18
|
+
},
|
|
19
|
+
density: {
|
|
20
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
21
|
+
required: false,
|
|
22
|
+
target: { attribute: 'density' },
|
|
23
|
+
description:
|
|
24
|
+
'How much room each pair takes. comfortable spaces the pairs apart to read; compact sets them close together, for facts inside other content such as a card\n or a table\'s detail row.',
|
|
25
|
+
values: ['comfortable', 'compact'],
|
|
26
|
+
default: 'comfortable',
|
|
27
|
+
},
|
|
28
|
+
layout: {
|
|
29
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
30
|
+
required: false,
|
|
31
|
+
target: { attribute: 'layout' },
|
|
32
|
+
description:
|
|
33
|
+
'rows sets each term beside its value, one per line, for a short summary; stacked sets every term above its value, one pair per line, for a narrow space;\n grid sets the pairs, term above value, in as many columns as fit, for facts to scan across; tiles sets each pair on its own bordered tile in a grid, for\n figures to compare.',
|
|
34
|
+
values: ['rows', 'stacked', 'grid', 'tiles'],
|
|
35
|
+
default: 'rows',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
}
|
|
9
39
|
const props = defineProps({
|
|
10
40
|
columns: { type: null as unknown as PropType<'2' | '3' | '4' | null>, default: null },
|
|
11
41
|
density: {
|
|
@@ -23,24 +53,18 @@ const checkedProps = computed(() => ({
|
|
|
23
53
|
{ kind: 'terminal', name: 'keyword' },
|
|
24
54
|
false,
|
|
25
55
|
'columns',
|
|
26
|
-
undefined,
|
|
27
|
-
['2', '3', '4'],
|
|
28
56
|
),
|
|
29
57
|
density: checkedProp<'comfortable' | 'compact'>(
|
|
30
58
|
props['density'],
|
|
31
59
|
{ kind: 'terminal', name: 'keyword' },
|
|
32
60
|
false,
|
|
33
61
|
'density',
|
|
34
|
-
undefined,
|
|
35
|
-
['comfortable', 'compact'],
|
|
36
62
|
) as 'comfortable' | 'compact',
|
|
37
63
|
layout: checkedProp<'rows' | 'stacked' | 'grid' | 'tiles'>(
|
|
38
64
|
props['layout'],
|
|
39
65
|
{ kind: 'terminal', name: 'keyword' },
|
|
40
66
|
false,
|
|
41
67
|
'layout',
|
|
42
|
-
undefined,
|
|
43
|
-
['rows', 'stacked', 'grid', 'tiles'],
|
|
44
68
|
) as 'rows' | 'stacked' | 'grid' | 'tiles',
|
|
45
69
|
}))
|
|
46
70
|
void checkedProps.value
|
|
@@ -117,6 +141,7 @@ const hostState = computed(() =>
|
|
|
117
141
|
<dl
|
|
118
142
|
data-component="ui-description-list"
|
|
119
143
|
v-bind="nativeAttrs($attrs)"
|
|
144
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
120
145
|
:data-columns="reflectedProp('columns', 'columns', checkedProps.columns, undefined, false)"
|
|
121
146
|
:data-density="reflectedProp('density', 'density', checkedProps.density, undefined, false)"
|
|
122
147
|
:data-layout="reflectedProp('layout', 'layout', checkedProps.layout, undefined, false)"
|
package/vue/UiDialog.vue
CHANGED
|
@@ -1,13 +1,77 @@
|
|
|
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, useComponentHost } from './host'
|
|
6
|
-
import { checkedProp } from './props'
|
|
6
|
+
import { checkedProp, vPropValidity } from './props'
|
|
7
7
|
import UiScrollArea from './UiScrollArea.vue'
|
|
8
8
|
|
|
9
9
|
defineOptions({ inheritAttrs: false })
|
|
10
10
|
|
|
11
|
+
const propValidityContract = {
|
|
12
|
+
props: {
|
|
13
|
+
alert: {
|
|
14
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
15
|
+
required: false,
|
|
16
|
+
target: { attribute: 'alert' },
|
|
17
|
+
description:
|
|
18
|
+
'Use alert dialog semantics and require an explicit action instead of the header close button. An alert dialog is always modal.',
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
closedby: {
|
|
22
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
23
|
+
required: false,
|
|
24
|
+
target: { attribute: 'closedby' },
|
|
25
|
+
description:
|
|
26
|
+
'Which user close requests work: any includes outside presses, closerequest includes Escape, and none requires an action. Unset follows native dialog:\n closerequest when modal, none when not.',
|
|
27
|
+
values: ['any', 'closerequest', 'none'],
|
|
28
|
+
},
|
|
29
|
+
for: {
|
|
30
|
+
type: { kind: 'terminal', name: 'string' },
|
|
31
|
+
required: false,
|
|
32
|
+
target: { attribute: 'for' },
|
|
33
|
+
description: 'ID of the control that opens the dialog.',
|
|
34
|
+
default: '',
|
|
35
|
+
},
|
|
36
|
+
label: {
|
|
37
|
+
type: { kind: 'terminal', name: 'string' },
|
|
38
|
+
required: false,
|
|
39
|
+
target: { attribute: 'label' },
|
|
40
|
+
description: 'Visible title in the dialog header; also its accessible name.',
|
|
41
|
+
},
|
|
42
|
+
modal: {
|
|
43
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
44
|
+
required: false,
|
|
45
|
+
target: { attribute: 'modal' },
|
|
46
|
+
description:
|
|
47
|
+
'Open in the top layer with a backdrop and make the rest of the page inert until it closes, like native showModal(). Without it the dialog is non-modal,\n like native show().',
|
|
48
|
+
default: false,
|
|
49
|
+
},
|
|
50
|
+
modeless: {
|
|
51
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
52
|
+
required: false,
|
|
53
|
+
target: { attribute: 'modeless' },
|
|
54
|
+
description:
|
|
55
|
+
'Deprecated: does nothing, since dialogs are non-modal unless modal is set. Accepted so markup written for 0.15 keeps working; modal wins when both are\n set.',
|
|
56
|
+
default: false,
|
|
57
|
+
},
|
|
58
|
+
open: {
|
|
59
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
60
|
+
required: false,
|
|
61
|
+
target: { attribute: 'open' },
|
|
62
|
+
description: 'Whether the dialog is open initially or when set externally.',
|
|
63
|
+
default: false,
|
|
64
|
+
},
|
|
65
|
+
size: {
|
|
66
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
67
|
+
required: false,
|
|
68
|
+
target: { attribute: 'size' },
|
|
69
|
+
description: 'Choose a compact, standard, wide, or viewport-filling dialog.',
|
|
70
|
+
values: ['sm', 'md', 'lg', 'fullscreen'],
|
|
71
|
+
default: 'md',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
}
|
|
11
75
|
const props = defineProps({
|
|
12
76
|
alert: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
13
77
|
closedby: {
|
|
@@ -30,64 +94,43 @@ const checkedProps = computed(() => ({
|
|
|
30
94
|
{ kind: 'terminal', name: 'boolean' },
|
|
31
95
|
false,
|
|
32
96
|
'alert',
|
|
33
|
-
undefined,
|
|
34
|
-
undefined,
|
|
35
97
|
) as boolean,
|
|
36
98
|
closedby: checkedProp<'any' | 'closerequest' | 'none'>(
|
|
37
99
|
props['closedby'],
|
|
38
100
|
{ kind: 'terminal', name: 'keyword' },
|
|
39
101
|
false,
|
|
40
102
|
'closedby',
|
|
41
|
-
undefined,
|
|
42
|
-
['any', 'closerequest', 'none'],
|
|
43
103
|
),
|
|
44
104
|
for: checkedProp<string>(
|
|
45
105
|
props['for'],
|
|
46
106
|
{ kind: 'terminal', name: 'string' },
|
|
47
107
|
false,
|
|
48
108
|
'for',
|
|
49
|
-
undefined,
|
|
50
|
-
undefined,
|
|
51
109
|
) as string,
|
|
52
|
-
label: checkedProp<string>(
|
|
53
|
-
props['label'],
|
|
54
|
-
{ kind: 'terminal', name: 'string' },
|
|
55
|
-
false,
|
|
56
|
-
'label',
|
|
57
|
-
undefined,
|
|
58
|
-
undefined,
|
|
59
|
-
),
|
|
110
|
+
label: checkedProp<string>(props['label'], { kind: 'terminal', name: 'string' }, false, 'label'),
|
|
60
111
|
modal: checkedProp<boolean>(
|
|
61
112
|
props['modal'],
|
|
62
113
|
{ kind: 'terminal', name: 'boolean' },
|
|
63
114
|
false,
|
|
64
115
|
'modal',
|
|
65
|
-
undefined,
|
|
66
|
-
undefined,
|
|
67
116
|
) as boolean,
|
|
68
117
|
modeless: checkedProp<boolean>(
|
|
69
118
|
props['modeless'],
|
|
70
119
|
{ kind: 'terminal', name: 'boolean' },
|
|
71
120
|
false,
|
|
72
121
|
'modeless',
|
|
73
|
-
undefined,
|
|
74
|
-
undefined,
|
|
75
122
|
) as boolean,
|
|
76
123
|
open: checkedProp<boolean>(
|
|
77
124
|
props['open'],
|
|
78
125
|
{ kind: 'terminal', name: 'boolean' },
|
|
79
126
|
false,
|
|
80
127
|
'open',
|
|
81
|
-
undefined,
|
|
82
|
-
undefined,
|
|
83
128
|
) as boolean,
|
|
84
129
|
size: checkedProp<'sm' | 'md' | 'lg' | 'fullscreen'>(
|
|
85
130
|
props['size'],
|
|
86
131
|
{ kind: 'terminal', name: 'keyword' },
|
|
87
132
|
false,
|
|
88
133
|
'size',
|
|
89
|
-
undefined,
|
|
90
|
-
['sm', 'md', 'lg', 'fullscreen'],
|
|
91
134
|
) as 'sm' | 'md' | 'lg' | 'fullscreen',
|
|
92
135
|
}))
|
|
93
136
|
void checkedProps.value
|
|
@@ -153,6 +196,15 @@ const root = ref<HTMLElement | null>(null)
|
|
|
153
196
|
const closeElement = useTemplateRef<HTMLElement>('close')
|
|
154
197
|
const internalOpen = ref(false)
|
|
155
198
|
const accessibleLabel = ref('Dialog')
|
|
199
|
+
let guardedPrevious: any
|
|
200
|
+
const guarded = computed(() => {
|
|
201
|
+
if (!(accessibleLabel.value == null || typeof accessibleLabel.value === 'string')) {
|
|
202
|
+
return guardedPrevious
|
|
203
|
+
}
|
|
204
|
+
return guardedPrevious = accessibleLabel.value
|
|
205
|
+
})
|
|
206
|
+
provide('html-next:ui-dialog:internalOpen', internalOpen)
|
|
207
|
+
provide('html-next:ui-dialog:accessibleLabel', accessibleLabel)
|
|
156
208
|
const hydrationNode = hydrationInstance?.vnode.el
|
|
157
209
|
if (
|
|
158
210
|
typeof window !== 'undefined' && hydrationNode != null
|
|
@@ -221,7 +273,8 @@ useComponentHost(() => import('../components/ui-dialog/ui-dialog.js'), {
|
|
|
221
273
|
<dialog
|
|
222
274
|
data-component="ui-dialog"
|
|
223
275
|
v-bind="nativeAttrs($attrs)"
|
|
224
|
-
:aria-label="
|
|
276
|
+
:aria-label="guarded"
|
|
277
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
225
278
|
:data-alert="reflectedProp('alert', 'alert', checkedProps.alert, undefined, false)"
|
|
226
279
|
:data-closedby="reflectedProp('closedby', 'closedby', checkedProps.closedby, undefined, false)"
|
|
227
280
|
:data-for="reflectedProp('for', 'for', checkedProps.for, undefined, false)"
|
package/vue/UiDisclosure.vue
CHANGED
|
@@ -1,12 +1,64 @@
|
|
|
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, 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
|
+
disabled: {
|
|
21
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
22
|
+
required: false,
|
|
23
|
+
target: { attribute: 'disabled' },
|
|
24
|
+
description:
|
|
25
|
+
'Disables the trigger and mutes its text, so the disclosure keeps its current state and the user cannot toggle it.',
|
|
26
|
+
default: false,
|
|
27
|
+
},
|
|
28
|
+
headingLevel: {
|
|
29
|
+
type: { kind: 'terminal', name: 'integer' },
|
|
30
|
+
required: false,
|
|
31
|
+
target: { attribute: 'headinglevel' },
|
|
32
|
+
description:
|
|
33
|
+
'Adds heading semantics around the trigger at level 2 through 6. Zero leaves it a plain disclosure; choose a level that matches the page outline.',
|
|
34
|
+
default: 0,
|
|
35
|
+
},
|
|
36
|
+
name: {
|
|
37
|
+
type: { kind: 'terminal', name: 'string' },
|
|
38
|
+
required: false,
|
|
39
|
+
target: { attribute: 'name' },
|
|
40
|
+
description:
|
|
41
|
+
'Disclosures with the same nonempty name form an exclusive group in one document: opening one closes the others. An empty name allows multiple open\n items.',
|
|
42
|
+
default: '',
|
|
43
|
+
},
|
|
44
|
+
open: {
|
|
45
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
46
|
+
required: false,
|
|
47
|
+
target: { attribute: 'open' },
|
|
48
|
+
description:
|
|
49
|
+
'Whether the disclosure is open initially or when set externally. The trigger toggles it from there, reporting each change as an open or close event.',
|
|
50
|
+
default: false,
|
|
51
|
+
},
|
|
52
|
+
summary: {
|
|
53
|
+
type: { kind: 'terminal', name: 'string' },
|
|
54
|
+
required: false,
|
|
55
|
+
target: { attribute: 'summary' },
|
|
56
|
+
description:
|
|
57
|
+
'The text of the trigger row that opens and closes the disclosure. It is the trigger button\'s accessible name, so name what the content is.',
|
|
58
|
+
default: 'Details',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
}
|
|
10
62
|
const props = defineProps({
|
|
11
63
|
density: {
|
|
12
64
|
type: null as unknown as PropType<'comfortable' | 'compact' | null>,
|
|
@@ -24,48 +76,36 @@ const checkedProps = computed(() => ({
|
|
|
24
76
|
{ kind: 'terminal', name: 'keyword' },
|
|
25
77
|
false,
|
|
26
78
|
'density',
|
|
27
|
-
undefined,
|
|
28
|
-
['comfortable', 'compact'],
|
|
29
79
|
) as 'comfortable' | 'compact',
|
|
30
80
|
disabled: checkedProp<boolean>(
|
|
31
81
|
props['disabled'],
|
|
32
82
|
{ kind: 'terminal', name: 'boolean' },
|
|
33
83
|
false,
|
|
34
84
|
'disabled',
|
|
35
|
-
undefined,
|
|
36
|
-
undefined,
|
|
37
85
|
) as boolean,
|
|
38
86
|
headingLevel: checkedProp<number>(
|
|
39
87
|
props['headingLevel'],
|
|
40
88
|
{ kind: 'terminal', name: 'integer' },
|
|
41
89
|
false,
|
|
42
90
|
'headingLevel',
|
|
43
|
-
undefined,
|
|
44
|
-
undefined,
|
|
45
91
|
) as number,
|
|
46
92
|
name: checkedProp<string>(
|
|
47
93
|
props['name'],
|
|
48
94
|
{ kind: 'terminal', name: 'string' },
|
|
49
95
|
false,
|
|
50
96
|
'name',
|
|
51
|
-
undefined,
|
|
52
|
-
undefined,
|
|
53
97
|
) as string,
|
|
54
98
|
open: checkedProp<boolean>(
|
|
55
99
|
props['open'],
|
|
56
100
|
{ kind: 'terminal', name: 'boolean' },
|
|
57
101
|
false,
|
|
58
102
|
'open',
|
|
59
|
-
undefined,
|
|
60
|
-
undefined,
|
|
61
103
|
) as boolean,
|
|
62
104
|
summary: checkedProp<string>(
|
|
63
105
|
props['summary'],
|
|
64
106
|
{ kind: 'terminal', name: 'string' },
|
|
65
107
|
false,
|
|
66
108
|
'summary',
|
|
67
|
-
undefined,
|
|
68
|
-
undefined,
|
|
69
109
|
) as string,
|
|
70
110
|
}))
|
|
71
111
|
void checkedProps.value
|
|
@@ -132,8 +172,45 @@ const triggerElement = useTemplateRef<HTMLElement>('trigger')
|
|
|
132
172
|
const panelElement = useTemplateRef<HTMLElement>('panel')
|
|
133
173
|
const internalOpen = ref(false)
|
|
134
174
|
const contentId = ref('')
|
|
135
|
-
const headingRole = ref<
|
|
136
|
-
const headingAriaLevel = ref<
|
|
175
|
+
const headingRole = ref<string | null>(null)
|
|
176
|
+
const headingAriaLevel = ref<number | null>(null)
|
|
177
|
+
let guardedPrevious: any
|
|
178
|
+
const guarded = computed(() => {
|
|
179
|
+
if (!(headingRole.value == null || true)) return guardedPrevious
|
|
180
|
+
return guardedPrevious = headingRole.value ?? undefined
|
|
181
|
+
})
|
|
182
|
+
let guardedBindingPrevious: any
|
|
183
|
+
const guardedBinding = computed(() => {
|
|
184
|
+
if (!(headingAriaLevel.value == null || Number.isInteger(headingAriaLevel.value))) {
|
|
185
|
+
return guardedBindingPrevious
|
|
186
|
+
}
|
|
187
|
+
return guardedBindingPrevious = headingAriaLevel.value ?? undefined
|
|
188
|
+
})
|
|
189
|
+
let guardedBinding2Previous: any
|
|
190
|
+
const guardedBinding2 = computed(() => {
|
|
191
|
+
if (!(contentId.value == null || typeof contentId.value === 'string')) {
|
|
192
|
+
return guardedBinding2Previous
|
|
193
|
+
}
|
|
194
|
+
return guardedBinding2Previous = contentId.value
|
|
195
|
+
})
|
|
196
|
+
let guardedBinding3Previous: any
|
|
197
|
+
const guardedBinding3 = computed(() => {
|
|
198
|
+
if (!(internalOpen.value == null || typeof internalOpen.value === 'boolean')) {
|
|
199
|
+
return guardedBinding3Previous
|
|
200
|
+
}
|
|
201
|
+
return guardedBinding3Previous = internalOpen.value
|
|
202
|
+
})
|
|
203
|
+
let guardedBinding4Previous: any
|
|
204
|
+
const guardedBinding4 = computed(() => {
|
|
205
|
+
if (!(contentId.value == null || typeof contentId.value === 'string')) {
|
|
206
|
+
return guardedBinding4Previous
|
|
207
|
+
}
|
|
208
|
+
return guardedBinding4Previous = contentId.value
|
|
209
|
+
})
|
|
210
|
+
provide('html-next:ui-disclosure:internalOpen', internalOpen)
|
|
211
|
+
provide('html-next:ui-disclosure:contentId', contentId)
|
|
212
|
+
provide('html-next:ui-disclosure:headingRole', headingRole)
|
|
213
|
+
provide('html-next:ui-disclosure:headingAriaLevel', headingAriaLevel)
|
|
137
214
|
const hydrationNode = hydrationInstance?.vnode.el
|
|
138
215
|
if (
|
|
139
216
|
typeof window !== 'undefined' && hydrationNode != null
|
|
@@ -191,25 +268,13 @@ useComponentHost(() => import('../components/ui-disclosure/ui-disclosure.js'), {
|
|
|
191
268
|
refs: { trigger: triggerElement, panel: panelElement },
|
|
192
269
|
state: { internalOpen, contentId, headingRole, headingAriaLevel },
|
|
193
270
|
})
|
|
194
|
-
|
|
195
|
-
function text(value: unknown): string {
|
|
196
|
-
if (Array.isArray(value)) return value.map(text).join(' ')
|
|
197
|
-
return value === null || value === undefined || typeof value === 'object' ? '' : String(value)
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
function attribute(value: unknown): any {
|
|
201
|
-
if (
|
|
202
|
-
value === null || value === undefined || value === false
|
|
203
|
-
|| (typeof value === 'object' && !Array.isArray(value))
|
|
204
|
-
) return undefined
|
|
205
|
-
return value === true ? '' : text(value)
|
|
206
|
-
}
|
|
207
271
|
</script>
|
|
208
272
|
|
|
209
273
|
<template>
|
|
210
274
|
<div
|
|
211
275
|
data-component="ui-disclosure"
|
|
212
276
|
v-bind="nativeAttrs($attrs)"
|
|
277
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
213
278
|
:data-density="reflectedProp('density', 'density', checkedProps.density, undefined, false)"
|
|
214
279
|
:data-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
|
|
215
280
|
:data-heading-level="reflectedProp('headingLevel', 'heading-level', checkedProps.headingLevel, undefined, false)"
|
|
@@ -219,16 +284,12 @@ function attribute(value: unknown): any {
|
|
|
219
284
|
:data-ui-disclosure-state="hostState || undefined"
|
|
220
285
|
ref="root"
|
|
221
286
|
>
|
|
222
|
-
<div
|
|
223
|
-
class="heading"
|
|
224
|
-
:role="attribute(headingRole)"
|
|
225
|
-
:aria-level="typeof headingAriaLevel === 'boolean' ? String(headingAriaLevel) : attribute(headingAriaLevel)"
|
|
226
|
-
>
|
|
287
|
+
<div class="heading" :role="guarded" :aria-level="guardedBinding">
|
|
227
288
|
<button
|
|
228
289
|
class="trigger"
|
|
229
290
|
type="button"
|
|
230
|
-
:aria-controls="
|
|
231
|
-
:aria-expanded="
|
|
291
|
+
:aria-controls="guardedBinding2"
|
|
292
|
+
:aria-expanded="guardedBinding3"
|
|
232
293
|
:disabled="checkedProps.disabled ?? undefined"
|
|
233
294
|
ref="trigger"
|
|
234
295
|
>
|
|
@@ -236,7 +297,9 @@ function attribute(value: unknown): any {
|
|
|
236
297
|
<span class="chevron" aria-hidden="true"></span>
|
|
237
298
|
</button>
|
|
238
299
|
</div>
|
|
239
|
-
<div class="panel" :id="
|
|
300
|
+
<div class="panel" :id="guardedBinding4" ref="panel">
|
|
301
|
+
<div class="panel-inner"><slot /></div>
|
|
302
|
+
</div>
|
|
240
303
|
</div>
|
|
241
304
|
</template>
|
|
242
305
|
|
package/vue/UiEditable.d.ts
CHANGED
|
@@ -49,12 +49,12 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
49
49
|
readonly value: string;
|
|
50
50
|
readonly trigger: "keyboard" | "pointer" | "programmatic";
|
|
51
51
|
}>) => any;
|
|
52
|
-
"update:value": (value: string) => any;
|
|
53
52
|
change: (event: CustomEvent<{
|
|
54
53
|
readonly value: string;
|
|
55
54
|
readonly previousValue: string;
|
|
56
55
|
readonly trigger: "keyboard" | "pointer" | "programmatic";
|
|
57
56
|
}>) => any;
|
|
57
|
+
"update:value": (value: string) => any;
|
|
58
58
|
"update:edit": (value: boolean) => any;
|
|
59
59
|
"edit-change": (event: CustomEvent<{
|
|
60
60
|
readonly edit: boolean;
|
|
@@ -111,12 +111,12 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
111
111
|
readonly value: string;
|
|
112
112
|
readonly trigger: "keyboard" | "pointer" | "programmatic";
|
|
113
113
|
}>) => any) | undefined;
|
|
114
|
-
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
115
114
|
onChange?: ((event: CustomEvent<{
|
|
116
115
|
readonly value: string;
|
|
117
116
|
readonly previousValue: string;
|
|
118
117
|
readonly trigger: "keyboard" | "pointer" | "programmatic";
|
|
119
118
|
}>) => any) | undefined;
|
|
119
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
120
120
|
"onUpdate:edit"?: ((value: boolean) => any) | undefined;
|
|
121
121
|
"onEdit-change"?: ((event: CustomEvent<{
|
|
122
122
|
readonly edit: boolean;
|
|
@@ -130,9 +130,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
130
130
|
required: boolean | null;
|
|
131
131
|
placeholder: string | null;
|
|
132
132
|
actions: boolean | null;
|
|
133
|
-
cancelLabel: string | null;
|
|
134
133
|
edit: boolean | null;
|
|
135
134
|
hint: string | null;
|
|
135
|
+
cancelLabel: string | null;
|
|
136
136
|
maxLength: number | null;
|
|
137
137
|
saveLabel: string | null;
|
|
138
138
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|