@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/UiButton.vue
CHANGED
|
@@ -1,13 +1,130 @@
|
|
|
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 { createDispatch, preserveRootFocus, useComponentHost } from './host'
|
|
6
|
-
import { checkedProp } from './props'
|
|
6
|
+
import { checkedProp, vPropValidity } from './props'
|
|
7
7
|
import UiSpinner from './UiSpinner.vue'
|
|
8
8
|
|
|
9
9
|
defineOptions({ inheritAttrs: false })
|
|
10
10
|
|
|
11
|
+
const propValidityContract = {
|
|
12
|
+
props: {
|
|
13
|
+
align: {
|
|
14
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
15
|
+
required: false,
|
|
16
|
+
target: { attribute: 'align' },
|
|
17
|
+
description:
|
|
18
|
+
'Content alignment. start lays the content out like a list option: from the start edge, with start-aligned text.',
|
|
19
|
+
values: ['center', 'start'],
|
|
20
|
+
default: 'center',
|
|
21
|
+
},
|
|
22
|
+
as: {
|
|
23
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
24
|
+
required: false,
|
|
25
|
+
target: { attribute: 'as' },
|
|
26
|
+
description:
|
|
27
|
+
'The native element the button renders: a button, or a link (a) that navigates to href.',
|
|
28
|
+
values: ['button', 'a'],
|
|
29
|
+
default: 'button',
|
|
30
|
+
},
|
|
31
|
+
disabled: {
|
|
32
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
33
|
+
required: false,
|
|
34
|
+
target: { attribute: 'disabled' },
|
|
35
|
+
description:
|
|
36
|
+
'Makes the button unavailable: it cannot be pressed, uses a flat neutral palette, and loses its raised look. A disabled link (as="a" with href) drops its\n href and states aria-disabled="true" instead, because a link has no native disabled state.',
|
|
37
|
+
default: false,
|
|
38
|
+
},
|
|
39
|
+
href: {
|
|
40
|
+
type: { kind: 'terminal', name: 'string' },
|
|
41
|
+
required: false,
|
|
42
|
+
target: { attribute: 'href' },
|
|
43
|
+
description:
|
|
44
|
+
'The link\'s destination. Pair it with as="a" so the button renders as a real link that navigates. A disabled link drops its href and states\n aria-disabled="true", so it cannot be followed.',
|
|
45
|
+
},
|
|
46
|
+
loading: {
|
|
47
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
48
|
+
required: false,
|
|
49
|
+
target: { attribute: 'loading' },
|
|
50
|
+
description:
|
|
51
|
+
'Keeps the action focusable and its label visible while work is in progress. It shows a decorative spinner, states aria-disabled and aria-busy, and prevents\n activation or form submission until cleared.',
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
54
|
+
pending: {
|
|
55
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
56
|
+
required: false,
|
|
57
|
+
target: { attribute: 'pending' },
|
|
58
|
+
description: 'Deprecated alias for loading.',
|
|
59
|
+
default: false,
|
|
60
|
+
},
|
|
61
|
+
rel: {
|
|
62
|
+
type: { kind: 'terminal', name: 'string' },
|
|
63
|
+
required: false,
|
|
64
|
+
target: { attribute: 'rel' },
|
|
65
|
+
description:
|
|
66
|
+
'The link\'s relationship to its destination, as on a native link. Only meaningful with as="a".',
|
|
67
|
+
},
|
|
68
|
+
shape: {
|
|
69
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
70
|
+
required: false,
|
|
71
|
+
target: { attribute: 'shape' },
|
|
72
|
+
description:
|
|
73
|
+
'rounded uses the theme\'s action radius; pill rounds the ends fully, for a compact choice such as a status or a person.',
|
|
74
|
+
values: ['rounded', 'pill'],
|
|
75
|
+
default: 'rounded',
|
|
76
|
+
},
|
|
77
|
+
size: {
|
|
78
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
79
|
+
required: false,
|
|
80
|
+
target: { attribute: 'size' },
|
|
81
|
+
description:
|
|
82
|
+
'Height, padding, and type size. xs is 1.5rem with the smallest text, for a control inside a line of small text; sm is the small control height (2rem by\n default) with tighter padding and smaller text, md is the standard control height (2.5rem), and lg is taller (3rem) with roomier padding. Under touch, sm\n grows to the touch minimum, while xs keeps its size inside its line and gains an invisible touch-sized hit area.',
|
|
83
|
+
values: ['xs', 'sm', 'md', 'lg'],
|
|
84
|
+
default: 'md',
|
|
85
|
+
},
|
|
86
|
+
stretch: {
|
|
87
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
88
|
+
required: false,
|
|
89
|
+
target: { attribute: 'stretch' },
|
|
90
|
+
description: 'Fills the inline size of its container.',
|
|
91
|
+
default: false,
|
|
92
|
+
},
|
|
93
|
+
target: {
|
|
94
|
+
type: { kind: 'terminal', name: 'string' },
|
|
95
|
+
required: false,
|
|
96
|
+
target: { attribute: 'target' },
|
|
97
|
+
description: 'Where a link opens, as on a native link. Only meaningful with as="a".',
|
|
98
|
+
},
|
|
99
|
+
tone: {
|
|
100
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
101
|
+
required: false,
|
|
102
|
+
target: { attribute: 'tone' },
|
|
103
|
+
description:
|
|
104
|
+
'Which colour the button speaks in. It applies to every variant, so an outline, a ghost, and a solid in the same tone are the same action at three volumes:\n tone="danger" variant="outline" is a destructive secondary action. neutral is the quiet one, for a button that should not claim a colour.',
|
|
105
|
+
values: ['accent', 'neutral', 'danger', 'success', 'warning', 'info'],
|
|
106
|
+
default: 'accent',
|
|
107
|
+
},
|
|
108
|
+
type: {
|
|
109
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
110
|
+
required: false,
|
|
111
|
+
target: { attribute: 'type' },
|
|
112
|
+
description:
|
|
113
|
+
'The button\'s type, as on a native button. button by default, so it never submits a form by accident. A link has no type.',
|
|
114
|
+
values: ['button', 'submit', 'reset'],
|
|
115
|
+
default: 'button',
|
|
116
|
+
},
|
|
117
|
+
variant: {
|
|
118
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
119
|
+
required: false,
|
|
120
|
+
target: { attribute: 'variant' },
|
|
121
|
+
description:
|
|
122
|
+
'Emphasis: how loudly the button asks. solid fills with its tone, outline draws its tone at the edge over a wash of it, ghost carries only text until it is\n hovered, and link is an inline text action that reads as a link. danger is solid in the danger tone, kept for the call sites that name it.',
|
|
123
|
+
values: ['outline', 'solid', 'danger', 'ghost', 'link'],
|
|
124
|
+
default: 'outline',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
}
|
|
11
128
|
const props = defineProps({
|
|
12
129
|
align: { type: null as unknown as PropType<'center' | 'start' | null>, default: 'center' },
|
|
13
130
|
as: { type: null as unknown as PropType<'button' | 'a' | null>, default: 'button' },
|
|
@@ -41,112 +158,74 @@ const checkedProps = computed(() => ({
|
|
|
41
158
|
{ kind: 'terminal', name: 'keyword' },
|
|
42
159
|
false,
|
|
43
160
|
'align',
|
|
44
|
-
undefined,
|
|
45
|
-
['center', 'start'],
|
|
46
161
|
) as 'center' | 'start',
|
|
47
162
|
as: checkedProp<'button' | 'a'>(
|
|
48
163
|
props['as'],
|
|
49
164
|
{ kind: 'terminal', name: 'keyword' },
|
|
50
165
|
false,
|
|
51
166
|
'as',
|
|
52
|
-
undefined,
|
|
53
|
-
['button', 'a'],
|
|
54
167
|
) as 'button' | 'a',
|
|
55
168
|
disabled: checkedProp<boolean>(
|
|
56
169
|
props['disabled'],
|
|
57
170
|
{ kind: 'terminal', name: 'boolean' },
|
|
58
171
|
false,
|
|
59
172
|
'disabled',
|
|
60
|
-
undefined,
|
|
61
|
-
undefined,
|
|
62
173
|
) as boolean,
|
|
63
|
-
href: checkedProp<string>(
|
|
64
|
-
props['href'],
|
|
65
|
-
{ kind: 'terminal', name: 'string' },
|
|
66
|
-
false,
|
|
67
|
-
'href',
|
|
68
|
-
undefined,
|
|
69
|
-
undefined,
|
|
70
|
-
),
|
|
174
|
+
href: checkedProp<string>(props['href'], { kind: 'terminal', name: 'string' }, false, 'href'),
|
|
71
175
|
loading: checkedProp<boolean>(
|
|
72
176
|
props['loading'],
|
|
73
177
|
{ kind: 'terminal', name: 'boolean' },
|
|
74
178
|
false,
|
|
75
179
|
'loading',
|
|
76
|
-
undefined,
|
|
77
|
-
undefined,
|
|
78
180
|
) as boolean,
|
|
79
181
|
pending: checkedProp<boolean>(
|
|
80
182
|
props['pending'],
|
|
81
183
|
{ kind: 'terminal', name: 'boolean' },
|
|
82
184
|
false,
|
|
83
185
|
'pending',
|
|
84
|
-
undefined,
|
|
85
|
-
undefined,
|
|
86
186
|
) as boolean,
|
|
87
|
-
rel: checkedProp<string>(
|
|
88
|
-
props['rel'],
|
|
89
|
-
{ kind: 'terminal', name: 'string' },
|
|
90
|
-
false,
|
|
91
|
-
'rel',
|
|
92
|
-
undefined,
|
|
93
|
-
undefined,
|
|
94
|
-
),
|
|
187
|
+
rel: checkedProp<string>(props['rel'], { kind: 'terminal', name: 'string' }, false, 'rel'),
|
|
95
188
|
shape: checkedProp<'rounded' | 'pill'>(
|
|
96
189
|
props['shape'],
|
|
97
190
|
{ kind: 'terminal', name: 'keyword' },
|
|
98
191
|
false,
|
|
99
192
|
'shape',
|
|
100
|
-
undefined,
|
|
101
|
-
['rounded', 'pill'],
|
|
102
193
|
) as 'rounded' | 'pill',
|
|
103
194
|
size: checkedProp<'xs' | 'sm' | 'md' | 'lg'>(
|
|
104
195
|
props['size'],
|
|
105
196
|
{ kind: 'terminal', name: 'keyword' },
|
|
106
197
|
false,
|
|
107
198
|
'size',
|
|
108
|
-
undefined,
|
|
109
|
-
['xs', 'sm', 'md', 'lg'],
|
|
110
199
|
) as 'xs' | 'sm' | 'md' | 'lg',
|
|
111
200
|
stretch: checkedProp<boolean>(
|
|
112
201
|
props['stretch'],
|
|
113
202
|
{ kind: 'terminal', name: 'boolean' },
|
|
114
203
|
false,
|
|
115
204
|
'stretch',
|
|
116
|
-
undefined,
|
|
117
|
-
undefined,
|
|
118
205
|
) as boolean,
|
|
119
206
|
target: checkedProp<string>(
|
|
120
207
|
props['target'],
|
|
121
208
|
{ kind: 'terminal', name: 'string' },
|
|
122
209
|
false,
|
|
123
210
|
'target',
|
|
124
|
-
undefined,
|
|
125
|
-
undefined,
|
|
126
211
|
),
|
|
127
212
|
tone: checkedProp<'accent' | 'neutral' | 'danger' | 'success' | 'warning' | 'info'>(
|
|
128
213
|
props['tone'],
|
|
129
214
|
{ kind: 'terminal', name: 'keyword' },
|
|
130
215
|
false,
|
|
131
216
|
'tone',
|
|
132
|
-
undefined,
|
|
133
|
-
['accent', 'neutral', 'danger', 'success', 'warning', 'info'],
|
|
134
217
|
) as 'accent' | 'neutral' | 'danger' | 'success' | 'warning' | 'info',
|
|
135
218
|
type: checkedProp<'button' | 'submit' | 'reset'>(
|
|
136
219
|
props['type'],
|
|
137
220
|
{ kind: 'terminal', name: 'keyword' },
|
|
138
221
|
false,
|
|
139
222
|
'type',
|
|
140
|
-
undefined,
|
|
141
|
-
['button', 'submit', 'reset'],
|
|
142
223
|
) as 'button' | 'submit' | 'reset',
|
|
143
224
|
variant: checkedProp<'outline' | 'solid' | 'danger' | 'ghost' | 'link'>(
|
|
144
225
|
props['variant'],
|
|
145
226
|
{ kind: 'terminal', name: 'keyword' },
|
|
146
227
|
false,
|
|
147
228
|
'variant',
|
|
148
|
-
undefined,
|
|
149
|
-
['outline', 'solid', 'danger', 'ghost', 'link'],
|
|
150
229
|
) as 'outline' | 'solid' | 'danger' | 'ghost' | 'link',
|
|
151
230
|
}))
|
|
152
231
|
void checkedProps.value
|
|
@@ -282,6 +361,7 @@ function attribute(value: unknown): any {
|
|
|
282
361
|
`${(checkedProps.loading || checkedProps.pending) && !checkedProps.disabled}`
|
|
283
362
|
],
|
|
284
363
|
)"
|
|
364
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
285
365
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
286
366
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
287
367
|
:data-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
|
|
@@ -322,6 +402,7 @@ function attribute(value: unknown): any {
|
|
|
322
402
|
],
|
|
323
403
|
)"
|
|
324
404
|
:aria-busy="checkedProps.loading || checkedProps.pending"
|
|
405
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
325
406
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
326
407
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
327
408
|
:data-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
|
package/vue/UiCallout.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
|
+
tone: {
|
|
12
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
13
|
+
required: false,
|
|
14
|
+
target: { attribute: 'tone' },
|
|
15
|
+
description:
|
|
16
|
+
'Which kind of message the callout carries, shown by its icon and colour: info (the default) for information, neutral for a muted aside, warning for a\n caution, success for a confirmation, and danger for a harmful consequence. note remains as an alias for neutral.',
|
|
17
|
+
values: ['info', 'neutral', 'note', 'warning', 'success', 'danger'],
|
|
18
|
+
default: 'info',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
}
|
|
9
22
|
const props = defineProps({
|
|
10
23
|
tone: {
|
|
11
24
|
type: null as unknown as PropType<
|
|
@@ -20,8 +33,6 @@ const checkedProps = computed(() => ({
|
|
|
20
33
|
{ kind: 'terminal', name: 'keyword' },
|
|
21
34
|
false,
|
|
22
35
|
'tone',
|
|
23
|
-
undefined,
|
|
24
|
-
['info', 'neutral', 'note', 'warning', 'success', 'danger'],
|
|
25
36
|
) as 'info' | 'neutral' | 'note' | 'warning' | 'success' | 'danger',
|
|
26
37
|
}))
|
|
27
38
|
void checkedProps.value
|
|
@@ -93,6 +104,7 @@ const hostState = computed(() =>
|
|
|
93
104
|
data-component="ui-callout"
|
|
94
105
|
role="note"
|
|
95
106
|
v-bind="nativeAttrs($attrs)"
|
|
107
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
96
108
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
97
109
|
:data-ui-callout-state="hostState || undefined"
|
|
98
110
|
>
|
package/vue/UiCard.vue
CHANGED
|
@@ -1,12 +1,52 @@
|
|
|
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 card renders. Choose the one that names the content: a section of a page, a self-contained article, or an aside.',
|
|
18
|
+
values: ['div', 'section', 'article', 'aside'],
|
|
19
|
+
default: 'div',
|
|
20
|
+
},
|
|
21
|
+
padding: {
|
|
22
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
23
|
+
required: false,
|
|
24
|
+
target: { attribute: 'padding' },
|
|
25
|
+
description:
|
|
26
|
+
'The space inside the card: sm is snug (0.75rem), md is the default (1.5rem), and lg is roomy (2rem).',
|
|
27
|
+
values: ['sm', 'md', 'lg'],
|
|
28
|
+
default: 'md',
|
|
29
|
+
},
|
|
30
|
+
tone: {
|
|
31
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
32
|
+
required: false,
|
|
33
|
+
target: { attribute: 'tone' },
|
|
34
|
+
description:
|
|
35
|
+
'danger adds a soft danger surface and a strong leading edge for consequential content.',
|
|
36
|
+
values: ['neutral', 'danger'],
|
|
37
|
+
default: 'neutral',
|
|
38
|
+
},
|
|
39
|
+
variant: {
|
|
40
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
41
|
+
required: false,
|
|
42
|
+
target: { attribute: 'variant' },
|
|
43
|
+
description:
|
|
44
|
+
'The surface. outlined is a bordered panel on the page; subtle is a quiet filled one with no border, for supporting details set apart from the flow;\n elevated floats above the page with a shadow, for a view\'s one card, such as sign-in.',
|
|
45
|
+
values: ['outlined', 'subtle', 'elevated'],
|
|
46
|
+
default: 'outlined',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
}
|
|
10
50
|
const props = defineProps({
|
|
11
51
|
as: {
|
|
12
52
|
type: null as unknown as PropType<'div' | 'section' | 'article' | 'aside' | null>,
|
|
@@ -25,32 +65,24 @@ const checkedProps = computed(() => ({
|
|
|
25
65
|
{ kind: 'terminal', name: 'keyword' },
|
|
26
66
|
false,
|
|
27
67
|
'as',
|
|
28
|
-
undefined,
|
|
29
|
-
['div', 'section', 'article', 'aside'],
|
|
30
68
|
) as 'div' | 'section' | 'article' | 'aside',
|
|
31
69
|
padding: checkedProp<'sm' | 'md' | 'lg'>(
|
|
32
70
|
props['padding'],
|
|
33
71
|
{ kind: 'terminal', name: 'keyword' },
|
|
34
72
|
false,
|
|
35
73
|
'padding',
|
|
36
|
-
undefined,
|
|
37
|
-
['sm', 'md', 'lg'],
|
|
38
74
|
) as 'sm' | 'md' | 'lg',
|
|
39
75
|
tone: checkedProp<'neutral' | 'danger'>(
|
|
40
76
|
props['tone'],
|
|
41
77
|
{ kind: 'terminal', name: 'keyword' },
|
|
42
78
|
false,
|
|
43
79
|
'tone',
|
|
44
|
-
undefined,
|
|
45
|
-
['neutral', 'danger'],
|
|
46
80
|
) as 'neutral' | 'danger',
|
|
47
81
|
variant: checkedProp<'outlined' | 'subtle' | 'elevated'>(
|
|
48
82
|
props['variant'],
|
|
49
83
|
{ kind: 'terminal', name: 'keyword' },
|
|
50
84
|
false,
|
|
51
85
|
'variant',
|
|
52
|
-
undefined,
|
|
53
|
-
['outlined', 'subtle', 'elevated'],
|
|
54
86
|
) as 'outlined' | 'subtle' | 'elevated',
|
|
55
87
|
}))
|
|
56
88
|
void checkedProps.value
|
|
@@ -133,6 +165,7 @@ const hostState = computed(() =>
|
|
|
133
165
|
v-if="checkedProps.as === 'section'"
|
|
134
166
|
data-component="ui-card"
|
|
135
167
|
v-bind="nativeAttrs($attrs)"
|
|
168
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
136
169
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
137
170
|
:data-padding="reflectedProp('padding', 'padding', checkedProps.padding, undefined, false)"
|
|
138
171
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
@@ -146,6 +179,7 @@ const hostState = computed(() =>
|
|
|
146
179
|
v-else-if="checkedProps.as === 'article'"
|
|
147
180
|
data-component="ui-card"
|
|
148
181
|
v-bind="nativeAttrs($attrs)"
|
|
182
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
149
183
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
150
184
|
:data-padding="reflectedProp('padding', 'padding', checkedProps.padding, undefined, false)"
|
|
151
185
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
@@ -159,6 +193,7 @@ const hostState = computed(() =>
|
|
|
159
193
|
v-else-if="checkedProps.as === 'aside'"
|
|
160
194
|
data-component="ui-card"
|
|
161
195
|
v-bind="nativeAttrs($attrs)"
|
|
196
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
162
197
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
163
198
|
:data-padding="reflectedProp('padding', 'padding', checkedProps.padding, undefined, false)"
|
|
164
199
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
@@ -172,6 +207,7 @@ const hostState = computed(() =>
|
|
|
172
207
|
v-else
|
|
173
208
|
data-component="ui-card"
|
|
174
209
|
v-bind="nativeAttrs($attrs)"
|
|
210
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
175
211
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
176
212
|
:data-padding="reflectedProp('padding', 'padding', checkedProps.padding, undefined, false)"
|
|
177
213
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
package/vue/UiCheckbox.d.ts
CHANGED
|
@@ -39,13 +39,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
39
39
|
default: string;
|
|
40
40
|
};
|
|
41
41
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
42
|
-
"update:checked": (value: boolean) => any;
|
|
43
|
-
"update:value": (value: string) => any;
|
|
44
42
|
change: (event: CustomEvent<{
|
|
45
43
|
readonly checked: boolean;
|
|
46
44
|
readonly value: string;
|
|
47
45
|
readonly trigger: "keyboard" | "pointer" | "programmatic";
|
|
48
46
|
}>) => any;
|
|
47
|
+
"update:checked": (value: boolean) => any;
|
|
48
|
+
"update:value": (value: string) => any;
|
|
49
49
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
50
50
|
checked: {
|
|
51
51
|
type: PropType<boolean | null>;
|
|
@@ -80,21 +80,21 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
80
80
|
default: string;
|
|
81
81
|
};
|
|
82
82
|
}>> & Readonly<{
|
|
83
|
-
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
|
84
|
-
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
85
83
|
onChange?: ((event: CustomEvent<{
|
|
86
84
|
readonly checked: boolean;
|
|
87
85
|
readonly value: string;
|
|
88
86
|
readonly trigger: "keyboard" | "pointer" | "programmatic";
|
|
89
87
|
}>) => any) | undefined;
|
|
88
|
+
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
|
89
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
90
90
|
}>, {
|
|
91
91
|
name: string | null;
|
|
92
92
|
value: string | null;
|
|
93
|
+
invalid: boolean | null;
|
|
93
94
|
size: "sm" | "md" | "lg" | null;
|
|
94
95
|
disabled: boolean | null;
|
|
95
96
|
checked: boolean | null;
|
|
96
97
|
indeterminate: boolean | null;
|
|
97
|
-
invalid: boolean | null;
|
|
98
98
|
required: boolean | null;
|
|
99
99
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
100
100
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
package/vue/UiCheckbox.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 { vBindControl } from './control'
|
|
6
6
|
import { createDispatch, useComponentHost } from './host'
|
|
7
|
-
import { checkedProp } from './props'
|
|
7
|
+
import { checkedProp, vPropValidity } from './props'
|
|
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:
|
|
18
|
+
'Whether the checkbox is checked initially or when set externally. A form reset returns it to this.',
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
disabled: {
|
|
22
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
23
|
+
required: false,
|
|
24
|
+
target: { attribute: 'disabled' },
|
|
25
|
+
description: 'Disables the native checkbox, so it cannot be toggled or focused.',
|
|
26
|
+
default: false,
|
|
27
|
+
},
|
|
28
|
+
indeterminate: {
|
|
29
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
30
|
+
required: false,
|
|
31
|
+
target: { property: 'indeterminate' },
|
|
32
|
+
description:
|
|
33
|
+
'Shows the mixed state, for a checkbox that summarises a group whose items are partly checked. It sets the native indeterminate property, which is\n independent of checked, so update it as the group changes.',
|
|
34
|
+
default: false,
|
|
35
|
+
},
|
|
36
|
+
invalid: {
|
|
37
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
38
|
+
required: false,
|
|
39
|
+
target: { attribute: 'aria-invalid' },
|
|
40
|
+
description:
|
|
41
|
+
'Exposes an externally validated error and styles the checkbox with the field danger colour.',
|
|
42
|
+
default: false,
|
|
43
|
+
},
|
|
44
|
+
name: {
|
|
45
|
+
type: { kind: 'terminal', name: 'string' },
|
|
46
|
+
required: false,
|
|
47
|
+
target: { attribute: 'name' },
|
|
48
|
+
description:
|
|
49
|
+
'The native name the checkbox submits under: a form that contains it sends name=value while it is checked, and nothing while it is unchecked, as a native\n checkbox does. Left empty, it takes no part in form submission.',
|
|
50
|
+
default: '',
|
|
51
|
+
},
|
|
52
|
+
required: {
|
|
53
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
54
|
+
required: false,
|
|
55
|
+
target: { attribute: 'required' },
|
|
56
|
+
description:
|
|
57
|
+
'Marks the native checkbox required, so native form validation treats it as invalid until it is checked.',
|
|
58
|
+
default: false,
|
|
59
|
+
},
|
|
60
|
+
size: {
|
|
61
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
62
|
+
required: false,
|
|
63
|
+
target: { attribute: 'size' },
|
|
64
|
+
description:
|
|
65
|
+
'Aligns the checkbox with fields and buttons of the same size. It keeps its box size; the label takes that size\'s field type size and its first line centres\n in that control height (sm 2rem, lg 3rem by default), so in a row of inputs, selects, and buttons of one size it shares their height and their text\n baseline. Under a coarse pointer an sm row grows to the 44px touch minimum, as they do. md is the standard layout.',
|
|
66
|
+
values: ['sm', 'md', 'lg'],
|
|
67
|
+
default: 'md',
|
|
68
|
+
},
|
|
69
|
+
value: {
|
|
70
|
+
type: { kind: 'terminal', name: 'string' },
|
|
71
|
+
required: false,
|
|
72
|
+
target: { attribute: 'value' },
|
|
73
|
+
description:
|
|
74
|
+
'The value a form submits under name while the checkbox is checked, also reported in the change event\'s detail so one handler can tell checkboxes apart. on\n by default, as on a native checkbox.',
|
|
75
|
+
default: 'on',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
}
|
|
11
79
|
const props = defineProps({
|
|
12
80
|
checked: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
13
81
|
disabled: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
@@ -24,64 +92,48 @@ const checkedProps = computed(() => ({
|
|
|
24
92
|
{ kind: 'terminal', name: 'boolean' },
|
|
25
93
|
false,
|
|
26
94
|
'checked',
|
|
27
|
-
undefined,
|
|
28
|
-
undefined,
|
|
29
95
|
) as boolean,
|
|
30
96
|
disabled: checkedProp<boolean>(
|
|
31
97
|
props['disabled'],
|
|
32
98
|
{ kind: 'terminal', name: 'boolean' },
|
|
33
99
|
false,
|
|
34
100
|
'disabled',
|
|
35
|
-
undefined,
|
|
36
|
-
undefined,
|
|
37
101
|
) as boolean,
|
|
38
102
|
indeterminate: checkedProp<boolean>(
|
|
39
103
|
props['indeterminate'],
|
|
40
104
|
{ kind: 'terminal', name: 'boolean' },
|
|
41
105
|
false,
|
|
42
106
|
'indeterminate',
|
|
43
|
-
undefined,
|
|
44
|
-
undefined,
|
|
45
107
|
) as boolean,
|
|
46
108
|
invalid: checkedProp<boolean>(
|
|
47
109
|
props['invalid'],
|
|
48
110
|
{ kind: 'terminal', name: 'boolean' },
|
|
49
111
|
false,
|
|
50
112
|
'invalid',
|
|
51
|
-
undefined,
|
|
52
|
-
undefined,
|
|
53
113
|
) as boolean,
|
|
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
|
required: checkedProp<boolean>(
|
|
63
121
|
props['required'],
|
|
64
122
|
{ kind: 'terminal', name: 'boolean' },
|
|
65
123
|
false,
|
|
66
124
|
'required',
|
|
67
|
-
undefined,
|
|
68
|
-
undefined,
|
|
69
125
|
) as boolean,
|
|
70
126
|
size: checkedProp<'sm' | 'md' | 'lg'>(
|
|
71
127
|
props['size'],
|
|
72
128
|
{ kind: 'terminal', name: 'keyword' },
|
|
73
129
|
false,
|
|
74
130
|
'size',
|
|
75
|
-
undefined,
|
|
76
|
-
['sm', 'md', 'lg'],
|
|
77
131
|
) as 'sm' | 'md' | 'lg',
|
|
78
132
|
value: checkedProp<string>(
|
|
79
133
|
props['value'],
|
|
80
134
|
{ kind: 'terminal', name: 'string' },
|
|
81
135
|
false,
|
|
82
136
|
'value',
|
|
83
|
-
undefined,
|
|
84
|
-
undefined,
|
|
85
137
|
) as string,
|
|
86
138
|
}))
|
|
87
139
|
void checkedProps.value
|
|
@@ -139,6 +191,7 @@ const root = ref<HTMLElement | null>(null)
|
|
|
139
191
|
const inputElement = useTemplateRef<HTMLElement>('input')
|
|
140
192
|
const descriptionElement = useTemplateRef<HTMLElement>('description')
|
|
141
193
|
const internalChecked = ref(false)
|
|
194
|
+
provide('html-next:ui-checkbox:internalChecked', internalChecked)
|
|
142
195
|
const hydrationNode = hydrationInstance?.vnode.el
|
|
143
196
|
if (
|
|
144
197
|
typeof window !== 'undefined' && hydrationNode != null
|
|
@@ -198,6 +251,7 @@ useComponentHost(() => import('../components/ui-checkbox/ui-checkbox.js'), {
|
|
|
198
251
|
<label
|
|
199
252
|
data-component="ui-checkbox"
|
|
200
253
|
v-bind="nativeAttrs($attrs)"
|
|
254
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
201
255
|
:data-checked="reflectedProp('checked', 'checked', checkedProps.checked, undefined, false)"
|
|
202
256
|
:data-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
|
|
203
257
|
:data-indeterminate="reflectedProp('indeterminate', 'indeterminate', checkedProps.indeterminate, undefined, false)"
|