@threadlabs/looma 0.14.8 → 0.15.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/shared/icons.js +5 -0
- package/components/shared/menu-navigation.js +49 -0
- package/components/shared/overlay.js +33 -60
- package/components/ui-avatar/ui-avatar.html +19 -2
- package/components/ui-avatar/ui-avatar.js +7 -1
- package/components/ui-avatar-group/ui-avatar-group.html +8 -3
- package/components/ui-avatar-group/ui-avatar-group.js +6 -2
- package/components/ui-badge/ui-badge.html +70 -4
- package/components/ui-button/ui-button.html +21 -5
- package/components/ui-button/ui-button.js +10 -0
- package/components/ui-callout/ui-callout.html +13 -5
- package/components/ui-checkbox/ui-checkbox.html +11 -0
- package/components/ui-cluster/ui-cluster.html +7 -0
- package/components/ui-combobox/ui-combobox.html +46 -10
- package/components/ui-combobox/ui-combobox.js +5 -5
- package/components/ui-context-menu/ui-context-menu.html +33 -5
- package/components/ui-context-menu/ui-context-menu.js +26 -17
- package/components/ui-dialog/ui-dialog.html +51 -8
- package/components/ui-dialog/ui-dialog.js +28 -7
- package/components/ui-disclosure/ui-disclosure.html +14 -5
- package/components/ui-disclosure/ui-disclosure.js +51 -4
- package/components/ui-editable/ui-editable.html +17 -3
- package/components/ui-editable/ui-editable.js +7 -0
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +48 -14
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.js +40 -6
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +22 -9
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.js +33 -11
- package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +67 -0
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +33 -30
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.js +42 -8
- package/components/ui-editor-slash-menu-group/ui-editor-slash-menu-group.html +31 -0
- package/components/ui-editor-slash-menu-item/ui-editor-slash-menu-item.html +75 -0
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +16 -5
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.js +10 -2
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +5 -5
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.js +5 -2
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +14 -4
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.js +2 -2
- package/components/ui-editor-toolbar/ui-editor-toolbar.html +1 -1
- package/components/ui-editor-toolbar/ui-editor-toolbar.js +46 -0
- package/components/ui-floating-action-button/ui-floating-action-button.html +1 -1
- package/components/ui-form-field/ui-form-field.html +16 -3
- package/components/ui-form-field/ui-form-field.js +1 -1
- package/components/ui-grid/ui-grid.html +17 -2
- package/components/ui-icon/ui-icon.html +5 -0
- package/components/ui-icon-button/ui-icon-button.html +25 -6
- package/components/ui-icon-button/ui-icon-button.js +11 -1
- package/components/ui-input/ui-input.html +3 -3
- package/components/ui-input-group/ui-input-group.html +18 -4
- package/components/ui-listbox/ui-listbox.html +81 -0
- package/components/ui-listbox/ui-listbox.js +27 -0
- package/components/ui-menu/ui-menu.html +33 -5
- package/components/ui-menu/ui-menu.js +18 -12
- package/components/ui-menu-group/ui-menu-group.html +27 -0
- package/components/ui-menu-item/ui-menu-item.html +80 -8
- package/components/ui-menu-item/ui-menu-item.js +47 -0
- package/components/ui-popover/ui-popover.html +33 -5
- package/components/ui-popover/ui-popover.js +9 -1
- package/components/ui-radio-group/ui-radio-group.html +13 -1
- package/components/ui-search-shell/ui-search-shell.html +6 -6
- package/components/ui-search-shell/ui-search-shell.js +21 -5
- package/components/ui-select/ui-select.html +14 -4
- package/components/ui-switch/ui-switch.html +2 -2
- package/components/ui-switcher/ui-switcher.html +8 -1
- package/components/ui-switcher/ui-switcher.js +15 -0
- package/components/ui-tabs/ui-tabs.html +17 -12
- package/components/ui-tabs/ui-tabs.js +43 -7
- package/components/ui-textarea/ui-textarea.html +28 -5
- package/components/ui-toast/ui-toast.html +88 -0
- package/components/ui-toast/ui-toast.js +68 -0
- package/components/ui-toast-region/ui-toast-region.html +102 -19
- package/components/ui-toast-region/ui-toast-region.js +10 -18
- package/components/ui-tooltip/ui-tooltip.html +51 -7
- package/components/ui-tooltip/ui-tooltip.js +29 -3
- package/components/ui-tree/ui-tree.html +12 -0
- package/components/ui-tree/ui-tree.js +191 -12
- package/components/ui-tree-item/ui-tree-item.html +87 -8
- package/components/ui-tree-item/ui-tree-item.js +3 -1
- package/dist/index.js +38 -32
- package/editor/chunks/extensions.js +82 -2
- package/editor/extensions/table-commands.d.ts +8 -0
- package/editor/icons.d.ts +5 -0
- package/editor/index.js +7 -2
- package/editor/insert-table-grid.d.ts +1 -1
- package/editor/mention-menu.d.ts +2 -0
- package/editor/slash-menu.d.ts +3 -0
- package/editor/table-context-menu.d.ts +1 -1
- package/editor/table-overlay.d.ts +2 -2
- package/package.json +1 -1
- package/styles/ui-avatar-group.css +1 -2
- package/styles/ui-avatar.css +11 -1
- package/styles/ui-badge.css +73 -1
- package/styles/ui-button.css +9 -1
- package/styles/ui-callout.css +1 -1
- package/styles/ui-checkbox.css +9 -0
- package/styles/ui-cluster.css +3 -0
- package/styles/ui-combobox.css +38 -7
- package/styles/ui-context-menu.css +32 -4
- package/styles/ui-dialog.css +42 -5
- package/styles/ui-editor-insert-table-grid.css +48 -11
- package/styles/ui-editor-mention-menu-item.css +57 -0
- package/styles/ui-editor-mention-menu.css +11 -1
- package/styles/ui-editor-slash-menu-group.css +21 -0
- package/styles/ui-editor-slash-menu-item.css +62 -0
- package/styles/ui-editor-slash-menu.css +10 -21
- package/styles/ui-editor-table-context-menu.css +1 -1
- package/styles/ui-floating-action-button.css +1 -1
- package/styles/ui-form-field.css +14 -1
- package/styles/ui-grid.css +14 -1
- package/styles/ui-icon-button.css +17 -5
- package/styles/ui-input-group.css +18 -4
- package/styles/ui-input.css +3 -3
- package/styles/ui-listbox.css +69 -0
- package/styles/ui-menu-group.css +19 -0
- package/styles/ui-menu-item.css +48 -9
- package/styles/ui-menu.css +32 -4
- package/styles/ui-popover.css +28 -4
- package/styles/ui-radio-group.css +9 -0
- package/styles/ui-search-shell.css +5 -5
- package/styles/ui-select.css +14 -4
- package/styles/ui-switch.css +2 -2
- package/styles/ui-switcher.css +4 -0
- package/styles/ui-textarea.css +27 -4
- package/styles/ui-toast-region.css +88 -4
- package/styles/ui-toast.css +74 -0
- package/styles/ui-tooltip.css +46 -6
- package/styles/ui-tree-item.css +72 -4
- package/styles/ui-tree.css +8 -0
- package/tokens.css +3 -0
- package/vanilla/UiAvatar.d.ts +2 -0
- package/vanilla/UiAvatar.js +8 -1
- package/vanilla/UiAvatarGroup.d.ts +2 -0
- package/vanilla/UiAvatarGroup.js +1 -1
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +1 -1
- package/vanilla/UiButton.d.ts +1 -0
- package/vanilla/UiButton.js +22 -6
- package/vanilla/UiCallout.d.ts +1 -1
- package/vanilla/UiCallout.js +1 -1
- package/vanilla/UiCheckbox.d.ts +1 -0
- package/vanilla/UiCheckbox.js +12 -9
- package/vanilla/UiCluster.d.ts +1 -0
- package/vanilla/UiCluster.js +2 -0
- package/vanilla/UiCombobox.d.ts +3 -0
- package/vanilla/UiCombobox.js +30 -15
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +1 -1
- package/vanilla/UiDialog.d.ts +5 -2
- package/vanilla/UiDialog.js +1 -1
- package/vanilla/UiDisclosure.d.ts +2 -0
- package/vanilla/UiDisclosure.js +32 -18
- package/vanilla/UiEditable.d.ts +5 -0
- package/vanilla/UiEditable.js +7 -3
- package/vanilla/UiEditorInsertTableGrid.js +1 -6
- package/vanilla/UiEditorMentionMenu.d.ts +4 -2
- package/vanilla/UiEditorMentionMenu.js +49 -31
- package/vanilla/UiEditorMentionMenuItem.d.ts +16 -0
- package/vanilla/UiEditorMentionMenuItem.js +56 -0
- package/vanilla/UiEditorSlashMenu.d.ts +4 -3
- package/vanilla/UiEditorSlashMenu.js +59 -46
- package/vanilla/UiEditorSlashMenuGroup.d.ts +14 -0
- package/vanilla/UiEditorSlashMenuGroup.js +48 -0
- package/vanilla/UiEditorSlashMenuItem.d.ts +18 -0
- package/vanilla/UiEditorSlashMenuItem.js +57 -0
- package/vanilla/UiEditorTableContextMenu.d.ts +5 -2
- package/vanilla/UiEditorTableContextMenu.js +1 -2
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +5 -5
- package/vanilla/UiEditorTableToolbar.d.ts +4 -2
- package/vanilla/UiEditorTableToolbar.js +1 -2
- package/vanilla/UiEditorToolbar.js +2 -0
- package/vanilla/UiGrid.d.ts +1 -0
- package/vanilla/UiGrid.js +8 -7
- package/vanilla/UiIcon.js +1 -1
- package/vanilla/UiIconButton.d.ts +1 -0
- package/vanilla/UiIconButton.js +11 -2
- package/vanilla/UiListbox.d.ts +20 -0
- package/vanilla/UiListbox.js +45 -0
- package/vanilla/UiMenu.d.ts +1 -1
- package/vanilla/UiMenu.js +1 -1
- package/vanilla/UiMenuGroup.d.ts +14 -0
- package/vanilla/UiMenuGroup.js +35 -0
- package/vanilla/UiMenuItem.d.ts +5 -1
- package/vanilla/UiMenuItem.js +91 -30
- package/vanilla/UiPopover.d.ts +1 -1
- package/vanilla/UiPopover.js +1 -1
- package/vanilla/UiRadioGroup.d.ts +1 -0
- package/vanilla/UiRadioGroup.js +6 -3
- package/vanilla/UiSwitcher.d.ts +1 -0
- package/vanilla/UiSwitcher.js +7 -9
- package/vanilla/UiTabs.d.ts +1 -0
- package/vanilla/UiTabs.js +9 -1
- package/vanilla/UiTextarea.d.ts +1 -0
- package/vanilla/UiTextarea.js +4 -1
- package/vanilla/UiToast.d.ts +16 -0
- package/vanilla/UiToast.js +53 -0
- package/vanilla/UiToastRegion.d.ts +1 -4
- package/vanilla/UiToastRegion.js +3 -11
- package/vanilla/UiTooltip.d.ts +1 -1
- package/vanilla/UiTooltip.js +1 -1
- package/vanilla/UiTree.d.ts +2 -0
- package/vanilla/UiTree.js +1 -1
- package/vanilla/UiTreeItem.d.ts +1 -0
- package/vanilla/UiTreeItem.js +45 -31
- package/vanilla/index.js +6 -0
- package/vue/UiAvatar.d.ts +4 -0
- package/vue/UiAvatar.vue +23 -3
- package/vue/UiAvatarGroup.d.ts +3 -0
- package/vue/UiAvatarGroup.vue +7 -4
- package/vue/UiBadge.d.ts +2 -2
- package/vue/UiBadge.vue +74 -2
- package/vue/UiButton.d.ts +5 -3
- package/vue/UiButton.vue +41 -7
- package/vue/UiCallout.d.ts +2 -2
- package/vue/UiCallout.vue +3 -2
- package/vue/UiCheckbox.d.ts +2 -0
- package/vue/UiCheckbox.vue +16 -0
- package/vue/UiCluster.d.ts +1 -0
- package/vue/UiCluster.vue +5 -0
- package/vue/UiCombobox.d.ts +11 -3
- package/vue/UiCombobox.vue +60 -11
- package/vue/UiContextMenu.d.ts +2 -0
- package/vue/UiContextMenu.vue +47 -6
- package/vue/UiDialog.d.ts +18 -4
- package/vue/UiDialog.vue +86 -11
- package/vue/UiDisclosure.d.ts +8 -2
- package/vue/UiDisclosure.vue +38 -14
- package/vue/UiEditable.d.ts +10 -0
- package/vue/UiEditable.vue +14 -2
- package/vue/UiEditorInsertTableGrid.vue +52 -15
- package/vue/UiEditorMentionMenu.d.ts +24 -2
- package/vue/UiEditorMentionMenu.vue +27 -11
- package/vue/UiEditorMentionMenuItem.d.ts +24 -0
- package/vue/UiEditorMentionMenuItem.js +2 -0
- package/vue/UiEditorMentionMenuItem.vue +88 -0
- package/vue/UiEditorSlashMenu.d.ts +24 -1
- package/vue/UiEditorSlashMenu.vue +33 -33
- package/vue/UiEditorSlashMenuGroup.d.ts +18 -0
- package/vue/UiEditorSlashMenuGroup.js +2 -0
- package/vue/UiEditorSlashMenuGroup.vue +43 -0
- package/vue/UiEditorSlashMenuItem.d.ts +26 -0
- package/vue/UiEditorSlashMenuItem.js +2 -0
- package/vue/UiEditorSlashMenuItem.vue +101 -0
- package/vue/UiEditorTableContextMenu.d.ts +9 -3
- package/vue/UiEditorTableContextMenu.vue +53 -3
- package/vue/UiEditorTableOverlay.d.ts +2 -2
- package/vue/UiEditorTableOverlay.vue +8 -6
- package/vue/UiEditorTableToolbar.d.ts +7 -3
- package/vue/UiEditorTableToolbar.vue +50 -2
- package/vue/UiEditorToolbar.vue +14 -1
- package/vue/UiFloatingActionButton.vue +1 -1
- package/vue/UiFormField.vue +28 -3
- package/vue/UiGrid.d.ts +1 -0
- package/vue/UiGrid.vue +26 -2
- package/vue/UiIcon.vue +16 -0
- package/vue/UiIconButton.d.ts +5 -3
- package/vue/UiIconButton.vue +40 -6
- package/vue/UiInput.vue +10 -3
- package/vue/UiInputGroup.vue +32 -11
- package/vue/UiListbox.d.ts +33 -0
- package/vue/UiListbox.js +2 -0
- package/vue/UiListbox.vue +131 -0
- package/vue/UiMenu.d.ts +2 -0
- package/vue/UiMenu.vue +43 -6
- package/vue/UiMenuGroup.d.ts +18 -0
- package/vue/UiMenuGroup.js +2 -0
- package/vue/UiMenuGroup.vue +39 -0
- package/vue/UiMenuItem.d.ts +34 -2
- package/vue/UiMenuItem.vue +145 -9
- package/vue/UiPopover.d.ts +2 -2
- package/vue/UiPopover.vue +44 -5
- package/vue/UiRadioGroup.d.ts +2 -0
- package/vue/UiRadioGroup.vue +17 -0
- package/vue/UiSearchShell.vue +12 -5
- package/vue/UiSelect.vue +18 -4
- package/vue/UiSwitch.vue +2 -2
- package/vue/UiSwitcher.d.ts +1 -0
- package/vue/UiSwitcher.vue +22 -1
- package/vue/UiTabs.d.ts +6 -2
- package/vue/UiTabs.vue +14 -12
- package/vue/UiTextarea.d.ts +2 -0
- package/vue/UiTextarea.vue +32 -4
- package/vue/UiToast.d.ts +34 -0
- package/vue/UiToast.js +2 -0
- package/vue/UiToast.vue +173 -0
- package/vue/UiToastRegion.d.ts +2 -18
- package/vue/UiToastRegion.vue +123 -48
- package/vue/UiTooltip.d.ts +2 -2
- package/vue/UiTooltip.vue +67 -12
- package/vue/UiTree.d.ts +10 -0
- package/vue/UiTree.vue +27 -0
- package/vue/UiTreeItem.d.ts +2 -0
- package/vue/UiTreeItem.vue +96 -4
- package/vue/chunks/UiAvatar.js +19 -5
- package/vue/chunks/UiAvatarGroup.js +10 -4
- package/vue/chunks/UiBadge.js +1 -1
- package/vue/chunks/UiButton.js +58 -11
- package/vue/chunks/UiCallout.js +2 -2
- package/vue/chunks/UiCheckbox.js +12 -2
- package/vue/chunks/UiCluster.js +5 -3
- package/vue/chunks/UiCombobox.js +29 -13
- package/vue/chunks/UiContextMenu.js +6 -2
- package/vue/chunks/UiDialog.js +25 -8
- package/vue/chunks/UiDisclosure.js +36 -12
- package/vue/chunks/UiEditable.js +22 -8
- package/vue/chunks/UiEditorInsertTableGrid.js +11 -14
- package/vue/chunks/UiEditorMentionMenu.js +30 -19
- package/vue/chunks/UiEditorMentionMenuItem.js +36 -0
- package/vue/chunks/UiEditorSlashMenu.js +33 -35
- package/vue/chunks/UiEditorSlashMenuGroup.js +26 -0
- package/vue/chunks/UiEditorSlashMenuItem.js +51 -0
- package/vue/chunks/UiEditorTableContextMenu.js +39 -5
- package/vue/chunks/UiEditorTableOverlay.js +6 -6
- package/vue/chunks/UiEditorTableToolbar.js +37 -4
- package/vue/chunks/UiEditorToolbar.js +18 -4
- package/vue/chunks/UiFloatingActionButton.js +1 -1
- package/vue/chunks/UiFormField.js +13 -9
- package/vue/chunks/UiGrid.js +6 -2
- package/vue/chunks/UiIcon.js +40 -2
- package/vue/chunks/UiIconButton.js +35 -4
- package/vue/chunks/UiInput.js +1 -1
- package/vue/chunks/UiInputGroup.js +1 -1
- package/vue/chunks/UiListbox.js +70 -0
- package/vue/chunks/UiMenu.js +6 -2
- package/vue/chunks/UiMenuGroup.js +25 -0
- package/vue/chunks/UiMenuItem.js +128 -7
- package/vue/chunks/UiPopover.js +1 -1
- package/vue/chunks/UiRadioGroup.js +8 -2
- package/vue/chunks/UiSearchShell.js +1 -1
- package/vue/chunks/UiSelect.js +1 -1
- package/vue/chunks/UiSwitch.js +1 -1
- package/vue/chunks/UiSwitcher.js +20 -3
- package/vue/chunks/UiTabs.js +4 -3
- package/vue/chunks/UiTextarea.js +7 -2
- package/vue/chunks/UiToast.js +81 -0
- package/vue/chunks/UiToastRegion.js +25 -49
- package/vue/chunks/UiTooltip.js +3 -7
- package/vue/chunks/UiTree.js +8 -4
- package/vue/chunks/UiTreeItem.js +28 -10
- package/vue/components.css +1856 -864
- package/vue/editor/index.js +263 -2
- package/vue/index.d.ts +6 -0
- package/vue/index.js +9 -3
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.7 for Vue 3.5. Do not edit. -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
defineOptions({ inheritAttrs: false })
|
|
4
|
+
|
|
5
|
+
withDefaults(
|
|
6
|
+
defineProps<{
|
|
7
|
+
label?: string
|
|
8
|
+
}>(),
|
|
9
|
+
{
|
|
10
|
+
label: '',
|
|
11
|
+
},
|
|
12
|
+
)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div data-component="ui-menu-group" role="group" v-bind="$attrs" :aria-label="label">
|
|
17
|
+
<div v-if="label" class="heading">{{ label }}</div>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<style scoped>
|
|
23
|
+
[data-component~="ui-menu-group"] {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
min-inline-size: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.heading {
|
|
30
|
+
padding: var(--ui-space-2) var(--ui-space-3) var(--ui-space-1);
|
|
31
|
+
color: var(--ui-text-muted);
|
|
32
|
+
font-size: var(--ui-font-size-sm);
|
|
33
|
+
font-weight: var(--ui-font-semibold);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-component~="ui-menu-group"][hidden] {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
</style>
|
package/vue/UiMenuItem.d.ts
CHANGED
|
@@ -1,14 +1,46 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
+
checked?: boolean;
|
|
2
3
|
disabled?: boolean;
|
|
4
|
+
href?: string;
|
|
5
|
+
type?: 'action' | 'checkbox' | 'radio';
|
|
3
6
|
value?: string;
|
|
4
7
|
};
|
|
5
|
-
declare var __VLS_1: {};
|
|
8
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_15: {}, __VLS_17: {};
|
|
6
9
|
type __VLS_Slots = {} & {
|
|
7
10
|
default?: (props: typeof __VLS_1) => any;
|
|
11
|
+
} & {
|
|
12
|
+
shortcut?: (props: typeof __VLS_3) => any;
|
|
13
|
+
} & {
|
|
14
|
+
default?: (props: typeof __VLS_15) => any;
|
|
15
|
+
} & {
|
|
16
|
+
shortcut?: (props: typeof __VLS_17) => any;
|
|
8
17
|
};
|
|
9
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
change: (detail: {
|
|
20
|
+
readonly checked: boolean;
|
|
21
|
+
readonly value: string;
|
|
22
|
+
readonly type: "checkbox" | "radio";
|
|
23
|
+
readonly trigger: "keyboard" | "pointer" | "programmatic";
|
|
24
|
+
}) => any;
|
|
25
|
+
"update:checked": (value: boolean) => any;
|
|
26
|
+
"update:value": (value: string) => any;
|
|
27
|
+
"update:type": (value: "checkbox" | "radio" | "action") => any;
|
|
28
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
29
|
+
onChange?: ((detail: {
|
|
30
|
+
readonly checked: boolean;
|
|
31
|
+
readonly value: string;
|
|
32
|
+
readonly type: "checkbox" | "radio";
|
|
33
|
+
readonly trigger: "keyboard" | "pointer" | "programmatic";
|
|
34
|
+
}) => any) | undefined;
|
|
35
|
+
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
|
36
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
37
|
+
"onUpdate:type"?: ((value: "checkbox" | "radio" | "action") => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
type: "action" | "checkbox" | "radio";
|
|
10
40
|
value: string;
|
|
11
41
|
disabled: boolean;
|
|
42
|
+
href: string;
|
|
43
|
+
checked: boolean;
|
|
12
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
45
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
46
|
declare const _default: typeof __VLS_export;
|
package/vue/UiMenuItem.vue
CHANGED
|
@@ -1,29 +1,127 @@
|
|
|
1
1
|
<!-- Generated by HTML Next 1.0.0-alpha.7 for Vue 3.5. Do not edit. -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
|
+
import { computed, ref } from 'vue'
|
|
4
|
+
import * as controllerModule from '../components/ui-menu-item/ui-menu-item.js'
|
|
5
|
+
import { createDispatch, useComponentHost } from './host'
|
|
6
|
+
import UiIcon from './UiIcon.vue'
|
|
7
|
+
|
|
3
8
|
defineOptions({ inheritAttrs: false })
|
|
4
9
|
|
|
5
|
-
withDefaults(
|
|
10
|
+
const props = withDefaults(
|
|
6
11
|
defineProps<{
|
|
12
|
+
checked?: boolean
|
|
7
13
|
disabled?: boolean
|
|
14
|
+
href?: string
|
|
15
|
+
type?: 'action' | 'checkbox' | 'radio'
|
|
8
16
|
value?: string
|
|
9
17
|
}>(),
|
|
10
18
|
{
|
|
19
|
+
checked: false,
|
|
11
20
|
disabled: false,
|
|
21
|
+
href: '',
|
|
22
|
+
type: 'action',
|
|
12
23
|
value: '',
|
|
13
24
|
},
|
|
14
25
|
)
|
|
26
|
+
const emit = defineEmits<{
|
|
27
|
+
'update:checked': [value: boolean]
|
|
28
|
+
'update:type': [value: 'action' | 'checkbox' | 'radio']
|
|
29
|
+
'update:value': [value: string]
|
|
30
|
+
change: [
|
|
31
|
+
detail: {
|
|
32
|
+
readonly checked: boolean
|
|
33
|
+
readonly value: string
|
|
34
|
+
readonly type: 'checkbox' | 'radio'
|
|
35
|
+
readonly trigger: 'keyboard' | 'pointer' | 'programmatic'
|
|
36
|
+
},
|
|
37
|
+
]
|
|
38
|
+
}>()
|
|
39
|
+
|
|
40
|
+
const root = ref<HTMLElement | null>(null)
|
|
41
|
+
const internalChecked = ref(false)
|
|
42
|
+
|
|
43
|
+
/** The values the styles' :host-state() rules test. */
|
|
44
|
+
const hostState = computed(() =>
|
|
45
|
+
[
|
|
46
|
+
props.type && `type type=${props.type}`,
|
|
47
|
+
].filter(Boolean).join(' ')
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
const isChangeDetail = (detail: unknown): boolean =>
|
|
51
|
+
detail !== null && typeof detail === 'object' && !Array.isArray(detail)
|
|
52
|
+
&& typeof (detail as Record<string, unknown>)['checked'] === 'boolean'
|
|
53
|
+
&& typeof (detail as Record<string, unknown>)['value'] === 'string'
|
|
54
|
+
&& ((detail as Record<string, unknown>)['type'] === 'checkbox'
|
|
55
|
+
|| (detail as Record<string, unknown>)['type'] === 'radio')
|
|
56
|
+
&& ((detail as Record<string, unknown>)['trigger'] === 'keyboard'
|
|
57
|
+
|| (detail as Record<string, unknown>)['trigger'] === 'pointer'
|
|
58
|
+
|| (detail as Record<string, unknown>)['trigger'] === 'programmatic')
|
|
59
|
+
&& Object.keys(detail as object).every((key) =>
|
|
60
|
+
['checked', 'value', 'type', 'trigger'].includes(key)
|
|
61
|
+
)
|
|
62
|
+
const dispatch = createDispatch(root, emit as (name: string, detail: unknown) => void, {
|
|
63
|
+
checks: {
|
|
64
|
+
change: isChangeDetail,
|
|
65
|
+
},
|
|
66
|
+
modeled: ['checked', 'type', 'value'],
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
useComponentHost(controllerModule.default, {
|
|
70
|
+
root,
|
|
71
|
+
dispatch,
|
|
72
|
+
props,
|
|
73
|
+
state: { internalChecked },
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
function text(value: unknown): string {
|
|
77
|
+
if (Array.isArray(value)) return value.map(text).join(' ')
|
|
78
|
+
return value === null || value === undefined || typeof value === 'object' ? '' : String(value)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function attribute(value: unknown): any {
|
|
82
|
+
if (
|
|
83
|
+
value === null || value === undefined || value === false
|
|
84
|
+
|| (typeof value === 'object' && !Array.isArray(value))
|
|
85
|
+
) return undefined
|
|
86
|
+
return value === true ? '' : text(value)
|
|
87
|
+
}
|
|
15
88
|
</script>
|
|
16
89
|
|
|
17
90
|
<template>
|
|
18
|
-
<
|
|
91
|
+
<a
|
|
92
|
+
v-if="href && type === 'action'"
|
|
19
93
|
data-component="ui-menu-item"
|
|
20
94
|
role="menuitem"
|
|
21
95
|
tabindex="-1"
|
|
22
96
|
v-bind="$attrs"
|
|
23
97
|
:aria-disabled="disabled"
|
|
24
98
|
:data-value="value"
|
|
99
|
+
:href="attribute(({ true: null, false: href })[`${disabled}`])"
|
|
100
|
+
:data-ui-menu-item-state="hostState || undefined"
|
|
101
|
+
ref="root"
|
|
102
|
+
><span class="label"><slot /></span>
|
|
103
|
+
<span class="shortcut" aria-hidden="true"><slot name="shortcut" /></span></a>
|
|
104
|
+
<div
|
|
105
|
+
v-else
|
|
106
|
+
data-component="ui-menu-item"
|
|
107
|
+
tabindex="-1"
|
|
108
|
+
v-bind="$attrs"
|
|
109
|
+
:role="attribute(({ action: 'menuitem', checkbox: 'menuitemcheckbox', radio: 'menuitemradio' })[type])"
|
|
110
|
+
:aria-checked="typeof (({ action: null, checkbox: internalChecked, radio: internalChecked })[type]) === 'boolean'
|
|
111
|
+
? String(({ action: null, checkbox: internalChecked, radio: internalChecked })[type])
|
|
112
|
+
: attribute(({ action: null, checkbox: internalChecked, radio: internalChecked })[type])"
|
|
113
|
+
:aria-disabled="disabled"
|
|
114
|
+
:data-value="value"
|
|
115
|
+
:data-ui-menu-item-state="hostState || undefined"
|
|
116
|
+
ref="root"
|
|
25
117
|
>
|
|
26
|
-
<
|
|
118
|
+
<span class="indicator" aria-hidden="true"><UiIcon
|
|
119
|
+
v-if="type === 'checkbox' && internalChecked"
|
|
120
|
+
name="check"
|
|
121
|
+
/>
|
|
122
|
+
<UiIcon v-if="type === 'radio' && internalChecked" name="circle-dot" /></span>
|
|
123
|
+
<span class="label"><slot /></span>
|
|
124
|
+
<span class="shortcut" aria-hidden="true"><slot name="shortcut" /></span>
|
|
27
125
|
</div>
|
|
28
126
|
</template>
|
|
29
127
|
|
|
@@ -55,7 +153,9 @@ withDefaults(
|
|
|
55
153
|
}
|
|
56
154
|
|
|
57
155
|
[data-component~="ui-menu-item"] {
|
|
58
|
-
display:
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
gap: var(--ui-space-5);
|
|
59
159
|
box-sizing: border-box;
|
|
60
160
|
width: 100%;
|
|
61
161
|
padding: var(
|
|
@@ -77,6 +177,7 @@ withDefaults(
|
|
|
77
177
|
var(--_ui-default-menu-item-font-size, var(--ui-font-size-md))
|
|
78
178
|
);
|
|
79
179
|
font-weight: var(--ui-font-medium);
|
|
180
|
+
text-decoration: none;
|
|
80
181
|
cursor: pointer;
|
|
81
182
|
outline: none;
|
|
82
183
|
transition:
|
|
@@ -84,14 +185,38 @@ withDefaults(
|
|
|
84
185
|
color var(--ui-motion-fast) var(--ui-motion-ease);
|
|
85
186
|
}
|
|
86
187
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
188
|
+
.label {
|
|
189
|
+
flex: 1;
|
|
190
|
+
min-inline-size: 0;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.indicator {
|
|
194
|
+
display: inline-flex;
|
|
195
|
+
place-items: center;
|
|
196
|
+
flex: none;
|
|
197
|
+
inline-size: var(--ui-icon-size-md);
|
|
198
|
+
color: var(--ui-accent-solid);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
[data-component~="ui-menu-item"][data-ui-menu-item-state~="type=action"] .indicator {
|
|
202
|
+
display: none;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.shortcut {
|
|
206
|
+
margin-inline-start: auto;
|
|
207
|
+
color: var(--ui-text-secondary);
|
|
208
|
+
font-size: var(--ui-font-size-sm);
|
|
209
|
+
font-weight: var(--ui-font-normal);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.shortcut:empty {
|
|
213
|
+
display: none;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Keep the text row at the shared control height where cap trimming is available. */
|
|
90
217
|
@supports (text-box-trim: trim-both) {
|
|
91
218
|
[data-component~="ui-menu-item"] {
|
|
92
|
-
display: block;
|
|
93
219
|
min-block-size: var(--ui-menu-item-min-block-size, var(--ui-control-size-md, 2.5rem));
|
|
94
|
-
align-content: center;
|
|
95
220
|
text-box-trim: trim-both;
|
|
96
221
|
text-box-edge: cap alphabetic;
|
|
97
222
|
}
|
|
@@ -101,11 +226,22 @@ withDefaults(
|
|
|
101
226
|
background: var(--ui-menu-item-hover-surface, var(--ui-surface-subtle));
|
|
102
227
|
}
|
|
103
228
|
|
|
229
|
+
[data-component~="ui-menu-item"]:focus-visible {
|
|
230
|
+
outline: 2px solid var(--ui-focus-ring);
|
|
231
|
+
outline-offset: -2px;
|
|
232
|
+
}
|
|
233
|
+
|
|
104
234
|
[data-component~="ui-menu-item"][aria-disabled="true"] {
|
|
105
235
|
opacity: 0.6;
|
|
106
236
|
cursor: not-allowed;
|
|
107
237
|
}
|
|
108
238
|
|
|
239
|
+
@media (forced-colors: active) {
|
|
240
|
+
[data-component~="ui-menu-item"]:focus-visible {
|
|
241
|
+
outline-color: Highlight;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
109
245
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
110
246
|
[data-component~="ui-menu-item"][hidden] {
|
|
111
247
|
display: none;
|
package/vue/UiPopover.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
for?: string;
|
|
3
3
|
open?: boolean;
|
|
4
|
-
placement?:
|
|
4
|
+
placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
5
5
|
};
|
|
6
6
|
declare var __VLS_1: {};
|
|
7
7
|
type __VLS_Slots = {} & {
|
|
@@ -34,7 +34,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
34
34
|
}>, {
|
|
35
35
|
for: string;
|
|
36
36
|
open: boolean;
|
|
37
|
-
placement:
|
|
37
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
38
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
39
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
40
|
declare const _default: typeof __VLS_export;
|
package/vue/UiPopover.vue
CHANGED
|
@@ -10,7 +10,19 @@ const props = withDefaults(
|
|
|
10
10
|
defineProps<{
|
|
11
11
|
for?: string
|
|
12
12
|
open?: boolean
|
|
13
|
-
placement?:
|
|
13
|
+
placement?:
|
|
14
|
+
| 'top'
|
|
15
|
+
| 'top-start'
|
|
16
|
+
| 'top-end'
|
|
17
|
+
| 'bottom'
|
|
18
|
+
| 'bottom-start'
|
|
19
|
+
| 'bottom-end'
|
|
20
|
+
| 'left'
|
|
21
|
+
| 'left-start'
|
|
22
|
+
| 'left-end'
|
|
23
|
+
| 'right'
|
|
24
|
+
| 'right-start'
|
|
25
|
+
| 'right-end'
|
|
14
26
|
}>(),
|
|
15
27
|
{
|
|
16
28
|
for: '',
|
|
@@ -84,12 +96,36 @@ useComponentHost(controllerModule.default, {
|
|
|
84
96
|
|
|
85
97
|
<style scoped>
|
|
86
98
|
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
99
|
+
@property --ui-popover-surface {
|
|
100
|
+
syntax: "*";
|
|
101
|
+
inherits: false;
|
|
102
|
+
}
|
|
103
|
+
@property --ui-popover-border {
|
|
104
|
+
syntax: "*";
|
|
105
|
+
inherits: false;
|
|
106
|
+
}
|
|
107
|
+
@property --ui-popover-radius {
|
|
108
|
+
syntax: "*";
|
|
109
|
+
inherits: false;
|
|
110
|
+
}
|
|
111
|
+
@property --ui-popover-shadow {
|
|
112
|
+
syntax: "*";
|
|
113
|
+
inherits: false;
|
|
114
|
+
}
|
|
87
115
|
@property --ui-popover-viewport-gap {
|
|
88
116
|
syntax: "*";
|
|
89
117
|
inherits: false;
|
|
90
118
|
}
|
|
119
|
+
@property --ui-popover-offset {
|
|
120
|
+
syntax: "*";
|
|
121
|
+
inherits: false;
|
|
122
|
+
}
|
|
91
123
|
|
|
92
124
|
[data-component~="ui-popover"] {
|
|
125
|
+
--_ui-popover-surface: var(--ui-popover-surface);
|
|
126
|
+
--_ui-popover-border: var(--ui-popover-border);
|
|
127
|
+
--_ui-popover-radius: var(--ui-popover-radius);
|
|
128
|
+
--_ui-popover-shadow: var(--ui-popover-shadow);
|
|
93
129
|
box-sizing: border-box;
|
|
94
130
|
max-inline-size: min(
|
|
95
131
|
20rem,
|
|
@@ -111,10 +147,13 @@ useComponentHost(controllerModule.default, {
|
|
|
111
147
|
max-block-size: inherit;
|
|
112
148
|
overflow: auto;
|
|
113
149
|
padding: var(--ui-space-3);
|
|
114
|
-
background: var(--ui-surface-elevated);
|
|
115
|
-
border: 1px solid var(--ui-border-default);
|
|
116
|
-
border-radius: var(--ui-radius-lg);
|
|
117
|
-
box-shadow: var(
|
|
150
|
+
background: var(--_ui-popover-surface, var(--ui-overlay-surface, var(--ui-surface-elevated)));
|
|
151
|
+
border: 1px solid var(--_ui-popover-border, var(--ui-overlay-border, var(--ui-border-default)));
|
|
152
|
+
border-radius: var(--_ui-popover-radius, var(--ui-overlay-radius, var(--ui-radius-lg)));
|
|
153
|
+
box-shadow: var(
|
|
154
|
+
--_ui-popover-shadow,
|
|
155
|
+
var(--ui-overlay-shadow, var(--ui-elevation-overlay, var(--ui-shadow-lg)))
|
|
156
|
+
);
|
|
118
157
|
}
|
|
119
158
|
|
|
120
159
|
[data-component~="ui-popover"]:not([data-component~="ui-popover"][data-ui-popover-state~="internalOpen"]) {
|
package/vue/UiRadioGroup.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
disabled?: boolean;
|
|
3
|
+
invalid?: boolean;
|
|
3
4
|
label?: string;
|
|
4
5
|
name?: string;
|
|
5
6
|
orientation?: 'horizontal' | 'vertical';
|
|
@@ -37,6 +38,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
37
38
|
}>, {
|
|
38
39
|
label: string;
|
|
39
40
|
name: string;
|
|
41
|
+
invalid: boolean;
|
|
40
42
|
value: string;
|
|
41
43
|
disabled: boolean;
|
|
42
44
|
required: boolean;
|
package/vue/UiRadioGroup.vue
CHANGED
|
@@ -9,6 +9,7 @@ defineOptions({ inheritAttrs: false })
|
|
|
9
9
|
const props = withDefaults(
|
|
10
10
|
defineProps<{
|
|
11
11
|
disabled?: boolean
|
|
12
|
+
invalid?: boolean
|
|
12
13
|
label?: string
|
|
13
14
|
name?: string
|
|
14
15
|
orientation?: 'horizontal' | 'vertical'
|
|
@@ -17,6 +18,7 @@ const props = withDefaults(
|
|
|
17
18
|
}>(),
|
|
18
19
|
{
|
|
19
20
|
disabled: false,
|
|
21
|
+
invalid: false,
|
|
20
22
|
label: 'Options',
|
|
21
23
|
name: '',
|
|
22
24
|
orientation: 'horizontal',
|
|
@@ -48,6 +50,7 @@ const internalValue = ref('')
|
|
|
48
50
|
/** The values the styles' :host-state() rules test. */
|
|
49
51
|
const hostState = computed(() =>
|
|
50
52
|
[
|
|
53
|
+
props.invalid && 'invalid',
|
|
51
54
|
props.orientation && `orientation orientation=${props.orientation}`,
|
|
52
55
|
].filter(Boolean).join(' ')
|
|
53
56
|
)
|
|
@@ -92,6 +95,7 @@ useComponentHost(controllerModule.default, {
|
|
|
92
95
|
role="radiogroup"
|
|
93
96
|
v-bind="$attrs"
|
|
94
97
|
:aria-required="required"
|
|
98
|
+
:aria-invalid="invalid"
|
|
95
99
|
:disabled="disabled"
|
|
96
100
|
:data-ui-radio-group-state="hostState || undefined"
|
|
97
101
|
ref="root"
|
|
@@ -102,7 +106,16 @@ useComponentHost(controllerModule.default, {
|
|
|
102
106
|
</template>
|
|
103
107
|
|
|
104
108
|
<style scoped>
|
|
109
|
+
@property --ui-radio-group-invalid-text {
|
|
110
|
+
syntax: "*";
|
|
111
|
+
inherits: false;
|
|
112
|
+
}
|
|
113
|
+
|
|
105
114
|
[data-component~="ui-radio-group"] {
|
|
115
|
+
--_ui-radio-group-invalid-text: var(
|
|
116
|
+
--ui-radio-group-invalid-text,
|
|
117
|
+
var(--ui-field-danger, var(--ui-danger-solid))
|
|
118
|
+
);
|
|
106
119
|
display: inline-flex;
|
|
107
120
|
align-items: center;
|
|
108
121
|
gap: var(--ui-space-2);
|
|
@@ -125,6 +138,10 @@ legend + * {
|
|
|
125
138
|
clear: both;
|
|
126
139
|
}
|
|
127
140
|
|
|
141
|
+
[data-component~="ui-radio-group"][data-ui-radio-group-state~="invalid"] legend {
|
|
142
|
+
color: var(--_ui-radio-group-invalid-text);
|
|
143
|
+
}
|
|
144
|
+
|
|
128
145
|
[data-component~="ui-radio-group"][data-ui-radio-group-state~="orientation=vertical"] {
|
|
129
146
|
display: inline-grid;
|
|
130
147
|
justify-items: start;
|
package/vue/UiSearchShell.vue
CHANGED
|
@@ -165,10 +165,17 @@ dialog::backdrop {
|
|
|
165
165
|
max-block-size: var(--_ui-search-shell-max-height, 80vh);
|
|
166
166
|
margin-inline: auto;
|
|
167
167
|
overflow: hidden;
|
|
168
|
-
background: var(
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
background: var(
|
|
169
|
+
--_ui-search-shell-surface,
|
|
170
|
+
var(--ui-overlay-surface, var(--ui-surface-elevated))
|
|
171
|
+
);
|
|
172
|
+
border: 1px solid
|
|
173
|
+
var(--_ui-search-shell-border, var(--ui-overlay-border, var(--ui-border-default)));
|
|
174
|
+
border-radius: var(--_ui-search-shell-radius, var(--ui-overlay-radius, var(--ui-radius-dialog)));
|
|
175
|
+
box-shadow: var(
|
|
176
|
+
--_ui-search-shell-shadow,
|
|
177
|
+
var(--ui-overlay-shadow, var(--ui-elevation-dialog, var(--ui-shadow-xl)))
|
|
178
|
+
);
|
|
172
179
|
}
|
|
173
180
|
|
|
174
181
|
.search {
|
|
@@ -191,7 +198,7 @@ dialog::backdrop {
|
|
|
191
198
|
min-block-size: var(--ui-control-min-block-size);
|
|
192
199
|
padding: var(--ui-space-2) var(--ui-space-3);
|
|
193
200
|
border: 1px solid var(--ui-control-border);
|
|
194
|
-
border-radius: var(--ui-radius-md);
|
|
201
|
+
border-radius: var(--ui-field-radius, var(--ui-radius-md));
|
|
195
202
|
background: var(--ui-control-surface);
|
|
196
203
|
color: var(--ui-text-primary);
|
|
197
204
|
font: inherit;
|
package/vue/UiSelect.vue
CHANGED
|
@@ -69,6 +69,14 @@ useComponentHost(controllerModule.default, {
|
|
|
69
69
|
syntax: "*";
|
|
70
70
|
inherits: false;
|
|
71
71
|
}
|
|
72
|
+
@property --ui-select-invalid-border {
|
|
73
|
+
syntax: "*";
|
|
74
|
+
inherits: false;
|
|
75
|
+
}
|
|
76
|
+
@property --ui-select-invalid-focus-shadow {
|
|
77
|
+
syntax: "*";
|
|
78
|
+
inherits: false;
|
|
79
|
+
}
|
|
72
80
|
@property --ui-select-radius {
|
|
73
81
|
syntax: "*";
|
|
74
82
|
inherits: false;
|
|
@@ -87,7 +95,7 @@ useComponentHost(controllerModule.default, {
|
|
|
87
95
|
margin: 0;
|
|
88
96
|
padding: var(--ui-space-2) var(--ui-space-3);
|
|
89
97
|
border: 1px solid var(--ui-control-border, var(--ui-border-strong));
|
|
90
|
-
border-radius: var(--ui-select-radius, var(--ui-radius-md));
|
|
98
|
+
border-radius: var(--ui-select-radius, var(--ui-field-radius, var(--ui-radius-md)));
|
|
91
99
|
background-color: var(--ui-control-surface, var(--ui-surface-elevated));
|
|
92
100
|
color: var(--ui-text-primary);
|
|
93
101
|
color-scheme: light dark;
|
|
@@ -131,13 +139,19 @@ useComponentHost(controllerModule.default, {
|
|
|
131
139
|
/* The app's invalid flag, or the browser's own verdict once the user has left an invalid field. */
|
|
132
140
|
[data-component~="ui-select"][aria-invalid="true"],
|
|
133
141
|
[data-component~="ui-select"]:is(:user-invalid, [data-user-invalid]) {
|
|
134
|
-
border-color: var(--ui-danger-solid);
|
|
142
|
+
border-color: var(--ui-select-invalid-border, var(--ui-field-danger, var(--ui-danger-solid)));
|
|
135
143
|
}
|
|
136
144
|
|
|
137
145
|
[data-component~="ui-select"]:is([aria-invalid="true"], :is(:user-invalid, [data-user-invalid])):focus-visible {
|
|
138
|
-
box-shadow:
|
|
146
|
+
box-shadow: var(
|
|
147
|
+
--ui-select-invalid-focus-shadow,
|
|
139
148
|
var(--ui-control-inset),
|
|
140
|
-
0 0 0 3px color-mix(
|
|
149
|
+
0 0 0 3px color-mix(
|
|
150
|
+
in srgb,
|
|
151
|
+
var(--ui-select-invalid-border, var(--ui-field-danger, var(--ui-danger-solid))) 22%,
|
|
152
|
+
transparent
|
|
153
|
+
)
|
|
154
|
+
);
|
|
141
155
|
}
|
|
142
156
|
|
|
143
157
|
[data-component~="ui-select"]:disabled {
|
package/vue/UiSwitch.vue
CHANGED
|
@@ -155,7 +155,7 @@ input {
|
|
|
155
155
|
height: var(--_ui-switch-track-height, 1.5rem);
|
|
156
156
|
padding: 0;
|
|
157
157
|
border: 1px solid var(--ui-control-border-hover, var(--ui-border-strong));
|
|
158
|
-
border-radius:
|
|
158
|
+
border-radius: var(--ui-radius-round);
|
|
159
159
|
background: var(--ui-control-surface, var(--ui-surface-default));
|
|
160
160
|
box-shadow: inset 0 1px 2px color-mix(in srgb, var(--ui-text-primary) 10%, transparent);
|
|
161
161
|
cursor: pointer;
|
|
@@ -172,7 +172,7 @@ input::after {
|
|
|
172
172
|
left: 3px;
|
|
173
173
|
width: 1rem;
|
|
174
174
|
height: 1rem;
|
|
175
|
-
border-radius:
|
|
175
|
+
border-radius: var(--ui-radius-round);
|
|
176
176
|
background: var(--ui-text-secondary);
|
|
177
177
|
box-shadow: var(--ui-shadow-xs);
|
|
178
178
|
transition: transform var(--ui-motion-fast) var(--ui-motion-ease);
|
package/vue/UiSwitcher.d.ts
CHANGED
package/vue/UiSwitcher.vue
CHANGED
|
@@ -1,23 +1,39 @@
|
|
|
1
1
|
<!-- Generated by HTML Next 1.0.0-alpha.7 for Vue 3.5. Do not edit. -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
|
-
import { computed } from 'vue'
|
|
3
|
+
import { computed, ref } from 'vue'
|
|
4
|
+
import * as controllerModule from '../components/ui-switcher/ui-switcher.js'
|
|
5
|
+
import { createDispatch, useComponentHost } from './host'
|
|
4
6
|
|
|
5
7
|
defineOptions({ inheritAttrs: false })
|
|
6
8
|
|
|
7
9
|
const props = defineProps<{
|
|
8
10
|
align?: 'start' | 'center' | 'end' | 'stretch'
|
|
9
11
|
gap?: 'xs' | 's' | 'm' | 'l' | 'xl'
|
|
12
|
+
limit?: number
|
|
10
13
|
threshold?: 'xs' | 'sm' | 'md' | 'lg'
|
|
11
14
|
}>()
|
|
12
15
|
|
|
16
|
+
const root = ref<HTMLElement | null>(null)
|
|
17
|
+
const overLimit = ref(false)
|
|
18
|
+
|
|
13
19
|
/** The values the styles' :host-state() rules test. */
|
|
14
20
|
const hostState = computed(() =>
|
|
15
21
|
[
|
|
22
|
+
overLimit.value && 'overLimit',
|
|
16
23
|
props.gap && `gap gap=${props.gap}`,
|
|
17
24
|
props.threshold && `threshold threshold=${props.threshold}`,
|
|
18
25
|
props.align && `align align=${props.align}`,
|
|
19
26
|
].filter(Boolean).join(' ')
|
|
20
27
|
)
|
|
28
|
+
|
|
29
|
+
const dispatch = createDispatch(root)
|
|
30
|
+
|
|
31
|
+
useComponentHost(controllerModule.default, {
|
|
32
|
+
root,
|
|
33
|
+
dispatch,
|
|
34
|
+
props,
|
|
35
|
+
state: { overLimit },
|
|
36
|
+
})
|
|
21
37
|
</script>
|
|
22
38
|
|
|
23
39
|
<template>
|
|
@@ -25,6 +41,7 @@ const hostState = computed(() =>
|
|
|
25
41
|
data-component="ui-switcher"
|
|
26
42
|
v-bind="$attrs"
|
|
27
43
|
:data-ui-switcher-state="hostState || undefined"
|
|
44
|
+
ref="root"
|
|
28
45
|
>
|
|
29
46
|
<slot />
|
|
30
47
|
</div>
|
|
@@ -61,6 +78,10 @@ const hostState = computed(() =>
|
|
|
61
78
|
flex-basis: calc((var(--_ui-switcher-threshold, 30rem) - 100%) * 999);
|
|
62
79
|
}
|
|
63
80
|
|
|
81
|
+
[data-component~="ui-switcher"][data-ui-switcher-state~="overLimit"] > :slotted(*) {
|
|
82
|
+
flex-basis: 100%;
|
|
83
|
+
}
|
|
84
|
+
|
|
64
85
|
[data-component~="ui-switcher"][data-ui-switcher-state~="gap=xs"] {
|
|
65
86
|
--_switcher-gap: var(--ui-space-2);
|
|
66
87
|
}
|
package/vue/UiTabs.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
+
activation?: 'auto' | 'manual';
|
|
2
3
|
density?: 'comfortable' | 'compact';
|
|
3
4
|
label?: string;
|
|
4
5
|
orientation?: 'horizontal' | 'vertical';
|
|
5
6
|
stretch?: boolean;
|
|
6
7
|
value?: string;
|
|
7
8
|
};
|
|
8
|
-
declare var __VLS_1: {};
|
|
9
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
9
10
|
type __VLS_Slots = {} & {
|
|
10
|
-
|
|
11
|
+
tab?: (props: typeof __VLS_1) => any;
|
|
12
|
+
} & {
|
|
13
|
+
default?: (props: typeof __VLS_3) => any;
|
|
11
14
|
};
|
|
12
15
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
16
|
select: (detail: {
|
|
@@ -29,6 +32,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
29
32
|
stretch: boolean;
|
|
30
33
|
density: "comfortable" | "compact";
|
|
31
34
|
orientation: "horizontal" | "vertical";
|
|
35
|
+
activation: "auto" | "manual";
|
|
32
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
37
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
38
|
declare const _default: typeof __VLS_export;
|