@threadlabs/looma 0.21.6 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ui-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/host.ts +6 -6
package/vue/UiAvatar.vue
CHANGED
|
@@ -1,13 +1,81 @@
|
|
|
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 UiIcon from './UiIcon.vue'
|
|
8
8
|
|
|
9
9
|
defineOptions({ inheritAttrs: false })
|
|
10
10
|
|
|
11
|
+
const propValidityContract = {
|
|
12
|
+
props: {
|
|
13
|
+
active: {
|
|
14
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
15
|
+
required: false,
|
|
16
|
+
target: { attribute: 'active' },
|
|
17
|
+
description:
|
|
18
|
+
'Marks the person as active now, such as editing the same page: a fine accent ring around the avatar. The ring is not announced, so say what it means in alt\n ("Ada Lovelace, editing").',
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
alt: {
|
|
22
|
+
type: { kind: 'terminal', name: 'string' },
|
|
23
|
+
required: false,
|
|
24
|
+
target: { attribute: 'alt' },
|
|
25
|
+
description:
|
|
26
|
+
'The avatar\'s accessible name, announced for it as an image. When empty, name is used, then "Avatar". Initials come from name first, so alt supplies them\n only when name is empty. An authored img carries its own alt instead.',
|
|
27
|
+
default: '',
|
|
28
|
+
},
|
|
29
|
+
decorative: {
|
|
30
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
31
|
+
required: false,
|
|
32
|
+
target: { attribute: 'decorative' },
|
|
33
|
+
description:
|
|
34
|
+
'Hides the avatar from assistive technology when adjacent text already identifies the person.',
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
37
|
+
fallback: {
|
|
38
|
+
type: { kind: 'terminal', name: 'string' },
|
|
39
|
+
required: false,
|
|
40
|
+
target: { attribute: 'fallback' },
|
|
41
|
+
description:
|
|
42
|
+
'Text shown instead of the initials derived from name or alt, whenever there is no image. It is uppercased; keep it to a couple of characters, because the\n circle clips anything wider.',
|
|
43
|
+
default: '',
|
|
44
|
+
},
|
|
45
|
+
name: {
|
|
46
|
+
type: { kind: 'terminal', name: 'string' },
|
|
47
|
+
required: false,
|
|
48
|
+
target: { attribute: 'name' },
|
|
49
|
+
description:
|
|
50
|
+
'The person\'s name. The initials are drawn from it: the first letters of the first two words, or the first two letters of a single word. It is also the\n accessible name when alt is empty.',
|
|
51
|
+
default: '',
|
|
52
|
+
},
|
|
53
|
+
shape: {
|
|
54
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
55
|
+
required: false,
|
|
56
|
+
target: { attribute: 'shape' },
|
|
57
|
+
description: 'Circle by default; square uses the theme\'s medium radius.',
|
|
58
|
+
values: ['circle', 'square'],
|
|
59
|
+
default: 'circle',
|
|
60
|
+
},
|
|
61
|
+
size: {
|
|
62
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
63
|
+
required: false,
|
|
64
|
+
target: { attribute: 'size' },
|
|
65
|
+
description:
|
|
66
|
+
'md is 2.5rem, for a person on their own (a profile, a comment); sm is 1.75rem with smaller initials, for a row of people in a toolbar or header; xs is\n 1.25rem with small initials, for a person named inline in a line of small text.',
|
|
67
|
+
values: ['xs', 'sm', 'md'],
|
|
68
|
+
default: 'md',
|
|
69
|
+
},
|
|
70
|
+
src: {
|
|
71
|
+
type: { kind: 'terminal', name: 'string' },
|
|
72
|
+
required: false,
|
|
73
|
+
target: { attribute: 'src' },
|
|
74
|
+
description:
|
|
75
|
+
'The image to show, cropped to fill the circle. Until it loads, or if it fails, the avatar shows initials instead. An img element authored inside the avatar\n takes precedence over src.',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
}
|
|
11
79
|
const props = defineProps({
|
|
12
80
|
active: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
13
81
|
alt: { type: null as unknown as PropType<string | null>, default: '' },
|
|
@@ -24,65 +92,44 @@ const checkedProps = computed(() => ({
|
|
|
24
92
|
{ kind: 'terminal', name: 'boolean' },
|
|
25
93
|
false,
|
|
26
94
|
'active',
|
|
27
|
-
undefined,
|
|
28
|
-
undefined,
|
|
29
95
|
) as boolean,
|
|
30
96
|
alt: checkedProp<string>(
|
|
31
97
|
props['alt'],
|
|
32
98
|
{ kind: 'terminal', name: 'string' },
|
|
33
99
|
false,
|
|
34
100
|
'alt',
|
|
35
|
-
undefined,
|
|
36
|
-
undefined,
|
|
37
101
|
) as string,
|
|
38
102
|
decorative: checkedProp<boolean>(
|
|
39
103
|
props['decorative'],
|
|
40
104
|
{ kind: 'terminal', name: 'boolean' },
|
|
41
105
|
false,
|
|
42
106
|
'decorative',
|
|
43
|
-
undefined,
|
|
44
|
-
undefined,
|
|
45
107
|
) as boolean,
|
|
46
108
|
fallback: checkedProp<string>(
|
|
47
109
|
props['fallback'],
|
|
48
110
|
{ kind: 'terminal', name: 'string' },
|
|
49
111
|
false,
|
|
50
112
|
'fallback',
|
|
51
|
-
undefined,
|
|
52
|
-
undefined,
|
|
53
113
|
) as string,
|
|
54
114
|
name: checkedProp<string>(
|
|
55
115
|
props['name'],
|
|
56
116
|
{ kind: 'terminal', name: 'string' },
|
|
57
117
|
false,
|
|
58
118
|
'name',
|
|
59
|
-
undefined,
|
|
60
|
-
undefined,
|
|
61
119
|
) as string,
|
|
62
120
|
shape: checkedProp<'circle' | 'square'>(
|
|
63
121
|
props['shape'],
|
|
64
122
|
{ kind: 'terminal', name: 'keyword' },
|
|
65
123
|
false,
|
|
66
124
|
'shape',
|
|
67
|
-
undefined,
|
|
68
|
-
['circle', 'square'],
|
|
69
125
|
) as 'circle' | 'square',
|
|
70
126
|
size: checkedProp<'xs' | 'sm' | 'md'>(
|
|
71
127
|
props['size'],
|
|
72
128
|
{ kind: 'terminal', name: 'keyword' },
|
|
73
129
|
false,
|
|
74
130
|
'size',
|
|
75
|
-
undefined,
|
|
76
|
-
['xs', 'sm', 'md'],
|
|
77
131
|
) as 'xs' | 'sm' | 'md',
|
|
78
|
-
src: checkedProp<string>(
|
|
79
|
-
props['src'],
|
|
80
|
-
{ kind: 'terminal', name: 'string' },
|
|
81
|
-
false,
|
|
82
|
-
'src',
|
|
83
|
-
undefined,
|
|
84
|
-
undefined,
|
|
85
|
-
),
|
|
132
|
+
src: checkedProp<string>(props['src'], { kind: 'terminal', name: 'string' }, false, 'src'),
|
|
86
133
|
}))
|
|
87
134
|
void checkedProps.value
|
|
88
135
|
watchSyncEffect(() => {
|
|
@@ -128,6 +175,53 @@ const hasImage = ref(false)
|
|
|
128
175
|
const hasAuthoredImage = ref(false)
|
|
129
176
|
const initials = ref('?')
|
|
130
177
|
const showGlyph = ref(false)
|
|
178
|
+
let guardedPrevious: any
|
|
179
|
+
const guarded = computed(() => {
|
|
180
|
+
if (
|
|
181
|
+
!((hasAuthoredImage.value == null || typeof hasAuthoredImage.value === 'boolean')
|
|
182
|
+
&& (hasImage.value == null || typeof hasImage.value === 'boolean'))
|
|
183
|
+
) return guardedPrevious
|
|
184
|
+
return guardedPrevious = hasAuthoredImage.value || !hasImage.value
|
|
185
|
+
})
|
|
186
|
+
let guardedBindingPrevious: any
|
|
187
|
+
const guardedBinding = computed(() => {
|
|
188
|
+
if (!(hasImage.value == null || typeof hasImage.value === 'boolean')) {
|
|
189
|
+
return guardedBindingPrevious
|
|
190
|
+
}
|
|
191
|
+
return guardedBindingPrevious = hasImage.value
|
|
192
|
+
})
|
|
193
|
+
let guardedBinding2Previous: any
|
|
194
|
+
const guardedBinding2 = computed(() => {
|
|
195
|
+
if (!(hasImage.value == null || typeof hasImage.value === 'boolean')) {
|
|
196
|
+
return guardedBinding2Previous
|
|
197
|
+
}
|
|
198
|
+
return guardedBinding2Previous = hasImage.value
|
|
199
|
+
})
|
|
200
|
+
let guardedBinding3Previous: any
|
|
201
|
+
const guardedBinding3 = computed(() => {
|
|
202
|
+
if (!(showGlyph.value == null || typeof showGlyph.value === 'boolean')) {
|
|
203
|
+
return guardedBinding3Previous
|
|
204
|
+
}
|
|
205
|
+
return guardedBinding3Previous = showGlyph.value
|
|
206
|
+
})
|
|
207
|
+
let guardedBinding4Previous: any
|
|
208
|
+
const guardedBinding4 = computed(() => {
|
|
209
|
+
if (!(initials.value == null || typeof initials.value === 'string')) {
|
|
210
|
+
return guardedBinding4Previous
|
|
211
|
+
}
|
|
212
|
+
return guardedBinding4Previous = initials.value
|
|
213
|
+
})
|
|
214
|
+
let guardedBinding5Previous: any
|
|
215
|
+
const guardedBinding5 = computed(() => {
|
|
216
|
+
if (!(showGlyph.value == null || typeof showGlyph.value === 'boolean')) {
|
|
217
|
+
return guardedBinding5Previous
|
|
218
|
+
}
|
|
219
|
+
return guardedBinding5Previous = !showGlyph.value
|
|
220
|
+
})
|
|
221
|
+
provide('html-next:ui-avatar:hasImage', hasImage)
|
|
222
|
+
provide('html-next:ui-avatar:hasAuthoredImage', hasAuthoredImage)
|
|
223
|
+
provide('html-next:ui-avatar:initials', initials)
|
|
224
|
+
provide('html-next:ui-avatar:showGlyph', showGlyph)
|
|
131
225
|
const hydrationNode = hydrationInstance?.vnode.el
|
|
132
226
|
if (
|
|
133
227
|
typeof window !== 'undefined' && hydrationNode != null
|
|
@@ -173,6 +267,7 @@ useComponentHost(() => import('../components/ui-avatar/ui-avatar.js'), {
|
|
|
173
267
|
<span
|
|
174
268
|
data-component="ui-avatar"
|
|
175
269
|
v-bind="nativeAttrs($attrs)"
|
|
270
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
176
271
|
:data-active="reflectedProp('active', 'active', checkedProps.active, undefined, false)"
|
|
177
272
|
:data-alt="reflectedProp('alt', 'alt', checkedProps.alt, undefined, false)"
|
|
178
273
|
:data-decorative="reflectedProp('decorative', 'decorative', checkedProps.decorative, undefined, false)"
|
|
@@ -189,13 +284,13 @@ useComponentHost(() => import('../components/ui-avatar/ui-avatar.js'), {
|
|
|
189
284
|
alt=""
|
|
190
285
|
aria-hidden="true"
|
|
191
286
|
:src="checkedProps.src ?? undefined"
|
|
192
|
-
:hidden="
|
|
287
|
+
:hidden="guarded"
|
|
193
288
|
ref="image"
|
|
194
289
|
>
|
|
195
|
-
<span class="fallback" :aria-hidden="
|
|
196
|
-
|
|
197
|
-
}}</span>
|
|
198
|
-
<span :hidden="
|
|
290
|
+
<span class="fallback" :aria-hidden="guardedBinding" :hidden="guardedBinding2"><span
|
|
291
|
+
:hidden="guardedBinding3"
|
|
292
|
+
>{{ guardedBinding4 }}</span>
|
|
293
|
+
<span :hidden="guardedBinding5"><UiIcon name="user-round" /></span></span></span>
|
|
199
294
|
</template>
|
|
200
295
|
|
|
201
296
|
<style scoped>
|
package/vue/UiAvatarGroup.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
49
49
|
label: string | null;
|
|
50
50
|
size: "xs" | "sm" | "md" | null;
|
|
51
51
|
max: number | null;
|
|
52
|
-
overflowLabel: string | null;
|
|
53
52
|
total: number | null;
|
|
53
|
+
overflowLabel: string | null;
|
|
54
54
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
55
55
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
56
56
|
declare const _default: typeof __VLS_export;
|
package/vue/UiAvatarGroup.vue
CHANGED
|
@@ -1,12 +1,56 @@
|
|
|
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
|
+
label: {
|
|
13
|
+
type: { kind: 'terminal', name: 'string' },
|
|
14
|
+
required: false,
|
|
15
|
+
target: { attribute: 'aria-label' },
|
|
16
|
+
description:
|
|
17
|
+
'The group\'s accessible name, announced for the set of avatars as a whole. Name who they are rather than repeating the default.',
|
|
18
|
+
default: 'People',
|
|
19
|
+
},
|
|
20
|
+
max: {
|
|
21
|
+
type: { kind: 'terminal', name: 'number' },
|
|
22
|
+
required: false,
|
|
23
|
+
target: { attribute: 'max' },
|
|
24
|
+
description:
|
|
25
|
+
'How many avatars to show. The rest are hidden and counted in a +N badge after the last visible one. Fractions round down, and 0 hides every avatar behind\n the badge.',
|
|
26
|
+
default: 5,
|
|
27
|
+
},
|
|
28
|
+
overflowLabel: {
|
|
29
|
+
type: { kind: 'terminal', name: 'string' },
|
|
30
|
+
required: false,
|
|
31
|
+
target: { attribute: 'overflowlabel' },
|
|
32
|
+
description:
|
|
33
|
+
'Accessible label for the overflow badge. Replace {count} with the number of people beyond the visible avatars.',
|
|
34
|
+
default: '{count} more',
|
|
35
|
+
},
|
|
36
|
+
size: {
|
|
37
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
38
|
+
required: false,
|
|
39
|
+
target: { attribute: 'size' },
|
|
40
|
+
description:
|
|
41
|
+
'The size of the avatars inside, matched by the +N badge and the overlap. Give each Avatar the same size. xs suits a group inside a line of small text, such\n as the people listed under a title.',
|
|
42
|
+
values: ['xs', 'sm', 'md'],
|
|
43
|
+
default: 'md',
|
|
44
|
+
},
|
|
45
|
+
total: {
|
|
46
|
+
type: { kind: 'terminal', name: 'integer' },
|
|
47
|
+
required: false,
|
|
48
|
+
target: { attribute: 'total' },
|
|
49
|
+
description:
|
|
50
|
+
'The true number of people when only some avatars are authored. The overflow badge counts the people beyond the visible avatars; it never counts fewer than\n the authored avatars.',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
}
|
|
10
54
|
const props = defineProps({
|
|
11
55
|
label: { type: null as unknown as PropType<string | null>, default: 'People' },
|
|
12
56
|
max: { type: null as unknown as PropType<number | null>, default: 5 },
|
|
@@ -20,41 +64,26 @@ const checkedProps = computed(() => ({
|
|
|
20
64
|
{ kind: 'terminal', name: 'string' },
|
|
21
65
|
false,
|
|
22
66
|
'label',
|
|
23
|
-
undefined,
|
|
24
|
-
undefined,
|
|
25
67
|
) as string,
|
|
26
68
|
max: checkedProp<number>(
|
|
27
69
|
props['max'],
|
|
28
70
|
{ kind: 'terminal', name: 'number' },
|
|
29
71
|
false,
|
|
30
72
|
'max',
|
|
31
|
-
undefined,
|
|
32
|
-
undefined,
|
|
33
73
|
) as number,
|
|
34
74
|
overflowLabel: checkedProp<string>(
|
|
35
75
|
props['overflowLabel'],
|
|
36
76
|
{ kind: 'terminal', name: 'string' },
|
|
37
77
|
false,
|
|
38
78
|
'overflowLabel',
|
|
39
|
-
undefined,
|
|
40
|
-
undefined,
|
|
41
79
|
) as string,
|
|
42
80
|
size: checkedProp<'xs' | 'sm' | 'md'>(
|
|
43
81
|
props['size'],
|
|
44
82
|
{ kind: 'terminal', name: 'keyword' },
|
|
45
83
|
false,
|
|
46
84
|
'size',
|
|
47
|
-
undefined,
|
|
48
|
-
['xs', 'sm', 'md'],
|
|
49
85
|
) as 'xs' | 'sm' | 'md',
|
|
50
|
-
total: checkedProp<number>(
|
|
51
|
-
props['total'],
|
|
52
|
-
{ kind: 'terminal', name: 'integer' },
|
|
53
|
-
false,
|
|
54
|
-
'total',
|
|
55
|
-
undefined,
|
|
56
|
-
undefined,
|
|
57
|
-
),
|
|
86
|
+
total: checkedProp<number>(props['total'], { kind: 'terminal', name: 'integer' }, false, 'total'),
|
|
58
87
|
}))
|
|
59
88
|
void checkedProps.value
|
|
60
89
|
watchSyncEffect(() => {
|
|
@@ -98,6 +127,22 @@ const root = ref<HTMLElement | null>(null)
|
|
|
98
127
|
const overflowElement = useTemplateRef<HTMLElement>('overflow')
|
|
99
128
|
const overflowCount = ref(0)
|
|
100
129
|
const overflowAnnouncement = ref('')
|
|
130
|
+
let guardedPrevious: any
|
|
131
|
+
const guarded = computed(() => {
|
|
132
|
+
if (!(overflowCount.value == null || Number.isInteger(overflowCount.value))) {
|
|
133
|
+
return guardedPrevious
|
|
134
|
+
}
|
|
135
|
+
return guardedPrevious = !overflowCount.value
|
|
136
|
+
})
|
|
137
|
+
let guardedBindingPrevious: any
|
|
138
|
+
const guardedBinding = computed(() => {
|
|
139
|
+
if (!(overflowAnnouncement.value == null || typeof overflowAnnouncement.value === 'string')) {
|
|
140
|
+
return guardedBindingPrevious
|
|
141
|
+
}
|
|
142
|
+
return guardedBindingPrevious = overflowAnnouncement.value
|
|
143
|
+
})
|
|
144
|
+
provide('html-next:ui-avatar-group:overflowCount', overflowCount)
|
|
145
|
+
provide('html-next:ui-avatar-group:overflowAnnouncement', overflowAnnouncement)
|
|
101
146
|
const hydrationNode = hydrationInstance?.vnode.el
|
|
102
147
|
if (
|
|
103
148
|
typeof window !== 'undefined' && hydrationNode != null
|
|
@@ -144,6 +189,7 @@ useComponentHost(() => import('../components/ui-avatar-group/ui-avatar-group.js'
|
|
|
144
189
|
role="group"
|
|
145
190
|
v-bind="nativeAttrs($attrs)"
|
|
146
191
|
:aria-label="checkedProps.label ?? undefined"
|
|
192
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
147
193
|
:data-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
|
|
148
194
|
:data-max="reflectedProp('max', 'max', checkedProps.max, undefined, false)"
|
|
149
195
|
:data-overflow-label="reflectedProp('overflowLabel', 'overflow-label', checkedProps.overflowLabel, undefined, false)"
|
|
@@ -156,8 +202,8 @@ useComponentHost(() => import('../components/ui-avatar-group/ui-avatar-group.js'
|
|
|
156
202
|
<span
|
|
157
203
|
class="overflow"
|
|
158
204
|
role="img"
|
|
159
|
-
:hidden="
|
|
160
|
-
:aria-label="
|
|
205
|
+
:hidden="guarded"
|
|
206
|
+
:aria-label="guardedBinding"
|
|
161
207
|
ref="overflow"
|
|
162
208
|
>{{ `+${overflowCount}` }}</span>
|
|
163
209
|
</div>
|
package/vue/UiBadge.vue
CHANGED
|
@@ -1,11 +1,42 @@
|
|
|
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
|
+
shape: {
|
|
12
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
13
|
+
required: false,
|
|
14
|
+
target: { attribute: 'shape' },
|
|
15
|
+
description:
|
|
16
|
+
'Silhouette. pill is rounded at both ends; tag is a label: flat at the start and coming to a point at the end, for a tag or a chosen chip.',
|
|
17
|
+
values: ['pill', 'tag'],
|
|
18
|
+
default: 'pill',
|
|
19
|
+
},
|
|
20
|
+
tone: {
|
|
21
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
22
|
+
required: false,
|
|
23
|
+
target: { attribute: 'tone' },
|
|
24
|
+
description:
|
|
25
|
+
'Which colour the badge speaks in. neutral is a quiet grey for plain labels; accent draws the eye in the accent colour; info, success, warning, and danger\n mark a status, so match the tone to what the badge says. For a category rather than a status, set the --ui-badge-color hook on the badge instead: any CSS\n colour, which overrides the tone.',
|
|
26
|
+
values: ['neutral', 'accent', 'info', 'success', 'warning', 'danger'],
|
|
27
|
+
default: 'neutral',
|
|
28
|
+
},
|
|
29
|
+
variant: {
|
|
30
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
31
|
+
required: false,
|
|
32
|
+
target: { attribute: 'variant' },
|
|
33
|
+
description:
|
|
34
|
+
'Emphasis. subtle sets toned text over a soft wash; solid fills with the tone and uses contrasting text; outline keeps the surface with a toned edge.\n Neutral looks the same in solid and subtle.',
|
|
35
|
+
values: ['solid', 'subtle', 'outline'],
|
|
36
|
+
default: 'subtle',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
}
|
|
9
40
|
const props = defineProps({
|
|
10
41
|
shape: { type: null as unknown as PropType<'pill' | 'tag' | null>, default: 'pill' },
|
|
11
42
|
tone: {
|
|
@@ -25,24 +56,18 @@ const checkedProps = computed(() => ({
|
|
|
25
56
|
{ kind: 'terminal', name: 'keyword' },
|
|
26
57
|
false,
|
|
27
58
|
'shape',
|
|
28
|
-
undefined,
|
|
29
|
-
['pill', 'tag'],
|
|
30
59
|
) as 'pill' | 'tag',
|
|
31
60
|
tone: checkedProp<'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger'>(
|
|
32
61
|
props['tone'],
|
|
33
62
|
{ kind: 'terminal', name: 'keyword' },
|
|
34
63
|
false,
|
|
35
64
|
'tone',
|
|
36
|
-
undefined,
|
|
37
|
-
['neutral', 'accent', 'info', 'success', 'warning', 'danger'],
|
|
38
65
|
) as 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger',
|
|
39
66
|
variant: checkedProp<'solid' | 'subtle' | 'outline'>(
|
|
40
67
|
props['variant'],
|
|
41
68
|
{ kind: 'terminal', name: 'keyword' },
|
|
42
69
|
false,
|
|
43
70
|
'variant',
|
|
44
|
-
undefined,
|
|
45
|
-
['solid', 'subtle', 'outline'],
|
|
46
71
|
) as 'solid' | 'subtle' | 'outline',
|
|
47
72
|
}))
|
|
48
73
|
void checkedProps.value
|
|
@@ -115,6 +140,7 @@ const hostState = computed(() =>
|
|
|
115
140
|
<span
|
|
116
141
|
data-component="ui-badge"
|
|
117
142
|
v-bind="nativeAttrs($attrs)"
|
|
143
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
118
144
|
:data-shape="reflectedProp('shape', 'shape', checkedProps.shape, undefined, false)"
|
|
119
145
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
120
146
|
:data-variant="reflectedProp('variant', 'variant', checkedProps.variant, undefined, false)"
|
package/vue/UiBreadcrumbItem.vue
CHANGED
|
@@ -1,12 +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
|
import UiIcon from './UiIcon.vue'
|
|
7
7
|
|
|
8
8
|
defineOptions({ inheritAttrs: false })
|
|
9
9
|
|
|
10
|
+
const propValidityContract = {
|
|
11
|
+
props: {
|
|
12
|
+
current: {
|
|
13
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
14
|
+
required: false,
|
|
15
|
+
target: { attribute: 'current' },
|
|
16
|
+
description:
|
|
17
|
+
'Marks the step as the view you are on: it is plain text with aria-current="page". Every other step holds a link.',
|
|
18
|
+
default: false,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
}
|
|
10
22
|
const props = defineProps({
|
|
11
23
|
current: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
12
24
|
})
|
|
@@ -16,8 +28,6 @@ const checkedProps = computed(() => ({
|
|
|
16
28
|
{ kind: 'terminal', name: 'boolean' },
|
|
17
29
|
false,
|
|
18
30
|
'current',
|
|
19
|
-
undefined,
|
|
20
|
-
undefined,
|
|
21
31
|
) as boolean,
|
|
22
32
|
}))
|
|
23
33
|
void checkedProps.value
|
|
@@ -108,6 +118,7 @@ function attribute(value: unknown): any {
|
|
|
108
118
|
: attribute(
|
|
109
119
|
(({ true: 'page', false: null }) as Record<string, any>)[`${checkedProps.current ?? ''}`],
|
|
110
120
|
)"
|
|
121
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
111
122
|
:data-current="reflectedProp('current', 'current', checkedProps.current, undefined, false)"
|
|
112
123
|
:data-ui-breadcrumb-item-state="hostState || undefined"
|
|
113
124
|
>
|
package/vue/UiBreadcrumbs.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: 'The navigation landmark\'s accessible name.',
|
|
16
|
+
default: 'Breadcrumb',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
}
|
|
9
20
|
const props = defineProps({
|
|
10
21
|
label: { type: null as unknown as PropType<string | null>, default: 'Breadcrumb' },
|
|
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
|
|
@@ -80,6 +89,7 @@ if (
|
|
|
80
89
|
data-component="ui-breadcrumbs"
|
|
81
90
|
v-bind="nativeAttrs($attrs)"
|
|
82
91
|
:aria-label="checkedProps.label ?? undefined"
|
|
92
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
83
93
|
:data-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
|
|
84
94
|
>
|
|
85
95
|
<ol role="list"><slot /></ol>
|