@threadlabs/looma 0.14.7 → 0.15.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/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-combobox/ui-combobox.html +50 -10
- package/components/ui-combobox/ui-combobox.js +11 -8
- 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-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/UiCombobox.d.ts +4 -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/UiCombobox.d.ts +13 -3
- package/vue/UiCombobox.vue +62 -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/UiCombobox.js +30 -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 +1840 -851
- package/vue/editor/index.js +263 -2
- package/vue/index.d.ts +6 -0
- package/vue/index.js +9 -3
package/vue/chunks/UiMenu.js
CHANGED
|
@@ -32,7 +32,11 @@ var UiMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
32
32
|
const internalOpen = ref(false);
|
|
33
33
|
/** The values the styles' :host-state() rules test. */
|
|
34
34
|
const hostState = computed(() => [props.density && `density density=${props.density}`, internalOpen.value && "internalOpen"].filter(Boolean).join(" "));
|
|
35
|
-
const isSelectDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["value"] === "string" && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
|
|
35
|
+
const isSelectDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["value"] === "string" && (detail["checked"] === void 0 || typeof detail["checked"] === "boolean") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
|
|
36
|
+
"value",
|
|
37
|
+
"checked",
|
|
38
|
+
"trigger"
|
|
39
|
+
].includes(key));
|
|
36
40
|
const isOpenDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["open"] === "boolean" && (detail["reason"] === "action" || detail["reason"] === "programmatic") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
|
|
37
41
|
"open",
|
|
38
42
|
"reason",
|
|
@@ -69,6 +73,6 @@ var UiMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
69
73
|
}), [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])], 16, _hoisted_1);
|
|
70
74
|
};
|
|
71
75
|
}
|
|
72
|
-
}), [["__scopeId", "data-v-
|
|
76
|
+
}), [["__scopeId", "data-v-2007b7d0"]]);
|
|
73
77
|
//#endregion
|
|
74
78
|
export { UiMenu_default as t };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, renderSlot, toDisplayString } from "vue";
|
|
3
|
+
//#region .build/vue/UiMenuGroup.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _hoisted_1 = ["aria-label"];
|
|
5
|
+
var _hoisted_2 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "heading"
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region .build/vue/UiMenuGroup.vue
|
|
11
|
+
var UiMenuGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
12
|
+
inheritAttrs: false,
|
|
13
|
+
__name: "UiMenuGroup",
|
|
14
|
+
props: { label: { default: "" } },
|
|
15
|
+
setup(__props) {
|
|
16
|
+
return (_ctx, _cache) => {
|
|
17
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
18
|
+
"data-component": "ui-menu-group",
|
|
19
|
+
role: "group"
|
|
20
|
+
}, _ctx.$attrs, { "aria-label": __props.label }), [__props.label ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(__props.label), 1)) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}), [["__scopeId", "data-v-53e0d9bc"]]);
|
|
24
|
+
//#endregion
|
|
25
|
+
export { UiMenuGroup_default as t };
|
package/vue/chunks/UiMenuItem.js
CHANGED
|
@@ -1,31 +1,152 @@
|
|
|
1
1
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n as useComponentHost, t as createDispatch } from "./host.js";
|
|
3
|
+
import { t as UiIcon_default } from "./UiIcon.js";
|
|
4
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, openBlock, ref, renderSlot } from "vue";
|
|
5
|
+
import * as controllerModule from "@threadlabs/looma/components/ui-menu-item/ui-menu-item.js";
|
|
3
6
|
//#region .build/vue/UiMenuItem.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var _hoisted_1 = [
|
|
7
|
+
var _hoisted_1 = [
|
|
8
|
+
"aria-disabled",
|
|
9
|
+
"data-value",
|
|
10
|
+
"href",
|
|
11
|
+
"data-ui-menu-item-state"
|
|
12
|
+
];
|
|
13
|
+
var _hoisted_2 = { class: "label" };
|
|
14
|
+
var _hoisted_3 = {
|
|
15
|
+
class: "shortcut",
|
|
16
|
+
"aria-hidden": "true"
|
|
17
|
+
};
|
|
18
|
+
var _hoisted_4 = [
|
|
19
|
+
"role",
|
|
20
|
+
"aria-checked",
|
|
21
|
+
"aria-disabled",
|
|
22
|
+
"data-value",
|
|
23
|
+
"data-ui-menu-item-state"
|
|
24
|
+
];
|
|
25
|
+
var _hoisted_5 = {
|
|
26
|
+
class: "indicator",
|
|
27
|
+
"aria-hidden": "true"
|
|
28
|
+
};
|
|
29
|
+
var _hoisted_6 = { class: "label" };
|
|
30
|
+
var _hoisted_7 = {
|
|
31
|
+
class: "shortcut",
|
|
32
|
+
"aria-hidden": "true"
|
|
33
|
+
};
|
|
5
34
|
//#endregion
|
|
6
35
|
//#region .build/vue/UiMenuItem.vue
|
|
7
36
|
var UiMenuItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
8
37
|
inheritAttrs: false,
|
|
9
38
|
__name: "UiMenuItem",
|
|
10
39
|
props: {
|
|
40
|
+
checked: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
11
44
|
disabled: {
|
|
12
45
|
type: Boolean,
|
|
13
46
|
default: false
|
|
14
47
|
},
|
|
48
|
+
href: { default: "" },
|
|
49
|
+
type: { default: "action" },
|
|
15
50
|
value: { default: "" }
|
|
16
51
|
},
|
|
17
|
-
|
|
52
|
+
emits: [
|
|
53
|
+
"update:checked",
|
|
54
|
+
"update:type",
|
|
55
|
+
"update:value",
|
|
56
|
+
"change"
|
|
57
|
+
],
|
|
58
|
+
setup(__props, { emit: __emit }) {
|
|
59
|
+
const props = __props;
|
|
60
|
+
const emit = __emit;
|
|
61
|
+
const root = ref(null);
|
|
62
|
+
const internalChecked = ref(false);
|
|
63
|
+
/** The values the styles' :host-state() rules test. */
|
|
64
|
+
const hostState = computed(() => [props.type && `type type=${props.type}`].filter(Boolean).join(" "));
|
|
65
|
+
const isChangeDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["checked"] === "boolean" && typeof detail["value"] === "string" && (detail["type"] === "checkbox" || detail["type"] === "radio") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
|
|
66
|
+
"checked",
|
|
67
|
+
"value",
|
|
68
|
+
"type",
|
|
69
|
+
"trigger"
|
|
70
|
+
].includes(key));
|
|
71
|
+
const dispatch = createDispatch(root, emit, {
|
|
72
|
+
checks: { change: isChangeDetail },
|
|
73
|
+
modeled: [
|
|
74
|
+
"checked",
|
|
75
|
+
"type",
|
|
76
|
+
"value"
|
|
77
|
+
]
|
|
78
|
+
});
|
|
79
|
+
useComponentHost(controllerModule.default, {
|
|
80
|
+
root,
|
|
81
|
+
dispatch,
|
|
82
|
+
props,
|
|
83
|
+
state: { internalChecked }
|
|
84
|
+
});
|
|
85
|
+
function text(value) {
|
|
86
|
+
if (Array.isArray(value)) return value.map(text).join(" ");
|
|
87
|
+
return value === null || value === void 0 || typeof value === "object" ? "" : String(value);
|
|
88
|
+
}
|
|
89
|
+
function attribute(value) {
|
|
90
|
+
if (value === null || value === void 0 || value === false || typeof value === "object" && !Array.isArray(value)) return void 0;
|
|
91
|
+
return value === true ? "" : text(value);
|
|
92
|
+
}
|
|
18
93
|
return (_ctx, _cache) => {
|
|
19
|
-
return openBlock(), createElementBlock("
|
|
94
|
+
return __props.href && __props.type === "action" ? (openBlock(), createElementBlock("a", mergeProps({
|
|
95
|
+
key: 0,
|
|
20
96
|
"data-component": "ui-menu-item",
|
|
21
97
|
role: "menuitem",
|
|
22
98
|
tabindex: "-1"
|
|
23
99
|
}, _ctx.$attrs, {
|
|
24
100
|
"aria-disabled": __props.disabled,
|
|
25
|
-
"data-value": __props.value
|
|
26
|
-
|
|
101
|
+
"data-value": __props.value,
|
|
102
|
+
href: attribute({
|
|
103
|
+
true: null,
|
|
104
|
+
false: __props.href
|
|
105
|
+
}[`${__props.disabled}`]),
|
|
106
|
+
"data-ui-menu-item-state": hostState.value || void 0,
|
|
107
|
+
ref_key: "root",
|
|
108
|
+
ref: root
|
|
109
|
+
}), [createElementVNode("span", _hoisted_2, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]), createElementVNode("span", _hoisted_3, [renderSlot(_ctx.$slots, "shortcut", {}, void 0, true)])], 16, _hoisted_1)) : (openBlock(), createElementBlock("div", mergeProps({
|
|
110
|
+
key: 1,
|
|
111
|
+
"data-component": "ui-menu-item",
|
|
112
|
+
tabindex: "-1"
|
|
113
|
+
}, _ctx.$attrs, {
|
|
114
|
+
role: attribute({
|
|
115
|
+
action: "menuitem",
|
|
116
|
+
checkbox: "menuitemcheckbox",
|
|
117
|
+
radio: "menuitemradio"
|
|
118
|
+
}[__props.type]),
|
|
119
|
+
"aria-checked": typeof {
|
|
120
|
+
action: null,
|
|
121
|
+
checkbox: internalChecked.value,
|
|
122
|
+
radio: internalChecked.value
|
|
123
|
+
}[__props.type] === "boolean" ? String({
|
|
124
|
+
action: null,
|
|
125
|
+
checkbox: internalChecked.value,
|
|
126
|
+
radio: internalChecked.value
|
|
127
|
+
}[__props.type]) : attribute({
|
|
128
|
+
action: null,
|
|
129
|
+
checkbox: internalChecked.value,
|
|
130
|
+
radio: internalChecked.value
|
|
131
|
+
}[__props.type]),
|
|
132
|
+
"aria-disabled": __props.disabled,
|
|
133
|
+
"data-value": __props.value,
|
|
134
|
+
"data-ui-menu-item-state": hostState.value || void 0,
|
|
135
|
+
ref_key: "root",
|
|
136
|
+
ref: root
|
|
137
|
+
}), [
|
|
138
|
+
createElementVNode("span", _hoisted_5, [__props.type === "checkbox" && internalChecked.value ? (openBlock(), createBlock(UiIcon_default, {
|
|
139
|
+
key: 0,
|
|
140
|
+
name: "check"
|
|
141
|
+
})) : createCommentVNode("v-if", true), __props.type === "radio" && internalChecked.value ? (openBlock(), createBlock(UiIcon_default, {
|
|
142
|
+
key: 1,
|
|
143
|
+
name: "circle-dot"
|
|
144
|
+
})) : createCommentVNode("v-if", true)]),
|
|
145
|
+
createElementVNode("span", _hoisted_6, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
|
|
146
|
+
createElementVNode("span", _hoisted_7, [renderSlot(_ctx.$slots, "shortcut", {}, void 0, true)])
|
|
147
|
+
], 16, _hoisted_4));
|
|
27
148
|
};
|
|
28
149
|
}
|
|
29
|
-
}), [["__scopeId", "data-v-
|
|
150
|
+
}), [["__scopeId", "data-v-bbdeb8c5"]]);
|
|
30
151
|
//#endregion
|
|
31
152
|
export { UiMenuItem_default as t };
|
package/vue/chunks/UiPopover.js
CHANGED
|
@@ -56,6 +56,6 @@ var UiPopover_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
56
56
|
}), [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])], 16, _hoisted_1);
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
}), [["__scopeId", "data-v-
|
|
59
|
+
}), [["__scopeId", "data-v-bc4517c7"]]);
|
|
60
60
|
//#endregion
|
|
61
61
|
export { UiPopover_default as t };
|
|
@@ -5,6 +5,7 @@ import * as controllerModule from "@threadlabs/looma/components/ui-radio-group/u
|
|
|
5
5
|
//#region .build/vue/UiRadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var _hoisted_1 = [
|
|
7
7
|
"aria-required",
|
|
8
|
+
"aria-invalid",
|
|
8
9
|
"disabled",
|
|
9
10
|
"data-ui-radio-group-state"
|
|
10
11
|
];
|
|
@@ -18,6 +19,10 @@ var UiRadioGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
18
19
|
type: Boolean,
|
|
19
20
|
default: false
|
|
20
21
|
},
|
|
22
|
+
invalid: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
21
26
|
label: { default: "Options" },
|
|
22
27
|
name: { default: "" },
|
|
23
28
|
orientation: { default: "horizontal" },
|
|
@@ -38,7 +43,7 @@ var UiRadioGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
38
43
|
const root = ref(null);
|
|
39
44
|
const internalValue = ref("");
|
|
40
45
|
/** The values the styles' :host-state() rules test. */
|
|
41
|
-
const hostState = computed(() => [props.orientation && `orientation orientation=${props.orientation}`].filter(Boolean).join(" "));
|
|
46
|
+
const hostState = computed(() => [props.invalid && "invalid", props.orientation && `orientation orientation=${props.orientation}`].filter(Boolean).join(" "));
|
|
42
47
|
const isSelectDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["value"] === "string" && typeof detail["previousValue"] === "string" && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
|
|
43
48
|
"value",
|
|
44
49
|
"previousValue",
|
|
@@ -68,6 +73,7 @@ var UiRadioGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
68
73
|
role: "radiogroup"
|
|
69
74
|
}, _ctx.$attrs, {
|
|
70
75
|
"aria-required": __props.required,
|
|
76
|
+
"aria-invalid": __props.invalid,
|
|
71
77
|
disabled: __props.disabled,
|
|
72
78
|
"data-ui-radio-group-state": hostState.value || void 0,
|
|
73
79
|
ref_key: "root",
|
|
@@ -75,6 +81,6 @@ var UiRadioGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
75
81
|
}), [createElementVNode("legend", null, toDisplayString(__props.label), 1), renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1);
|
|
76
82
|
};
|
|
77
83
|
}
|
|
78
|
-
}), [["__scopeId", "data-v-
|
|
84
|
+
}), [["__scopeId", "data-v-3a85bfdd"]]);
|
|
79
85
|
//#endregion
|
|
80
86
|
export { UiRadioGroup_default as t };
|
|
@@ -67,6 +67,6 @@ var UiSearchShell_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
67
67
|
])], 8, _hoisted_1)], 16);
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
}), [["__scopeId", "data-v-
|
|
70
|
+
}), [["__scopeId", "data-v-20a7b8e3"]]);
|
|
71
71
|
//#endregion
|
|
72
72
|
export { UiSearchShell_default as t };
|
package/vue/chunks/UiSelect.js
CHANGED
|
@@ -60,6 +60,6 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
60
60
|
}), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1)), [[vModelSelect, model.value]]);
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
}), [["__scopeId", "data-v-
|
|
63
|
+
}), [["__scopeId", "data-v-981584d4"]]);
|
|
64
64
|
//#endregion
|
|
65
65
|
export { UiSelect_default as t };
|
package/vue/chunks/UiSwitch.js
CHANGED
|
@@ -90,6 +90,6 @@ var UiSwitch_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
90
90
|
}, null, 40, _hoisted_2), createElementVNode("span", _hoisted_3, [createElementVNode("span", _hoisted_4, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]), createElementVNode("span", _hoisted_5, [renderSlot(_ctx.$slots, "description", {}, void 0, true)], 512)])], 16, _hoisted_1);
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
}), [["__scopeId", "data-v-
|
|
93
|
+
}), [["__scopeId", "data-v-66d4f1f1"]]);
|
|
94
94
|
//#endregion
|
|
95
95
|
export { UiSwitch_default as t };
|
package/vue/chunks/UiSwitcher.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n as useComponentHost, t as createDispatch } from "./host.js";
|
|
3
|
+
import { computed, createElementBlock, defineComponent, mergeProps, openBlock, ref, renderSlot } from "vue";
|
|
4
|
+
import * as controllerModule from "@threadlabs/looma/components/ui-switcher/ui-switcher.js";
|
|
3
5
|
//#region .build/vue/UiSwitcher.vue?vue&type=script&setup=true&lang.ts
|
|
4
6
|
var _hoisted_1 = ["data-ui-switcher-state"];
|
|
5
7
|
//#endregion
|
|
@@ -10,20 +12,35 @@ var UiSwitcher_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
10
12
|
props: {
|
|
11
13
|
align: {},
|
|
12
14
|
gap: {},
|
|
15
|
+
limit: {},
|
|
13
16
|
threshold: {}
|
|
14
17
|
},
|
|
15
18
|
setup(__props) {
|
|
16
19
|
const props = __props;
|
|
20
|
+
const root = ref(null);
|
|
21
|
+
const overLimit = ref(false);
|
|
17
22
|
/** The values the styles' :host-state() rules test. */
|
|
18
23
|
const hostState = computed(() => [
|
|
24
|
+
overLimit.value && "overLimit",
|
|
19
25
|
props.gap && `gap gap=${props.gap}`,
|
|
20
26
|
props.threshold && `threshold threshold=${props.threshold}`,
|
|
21
27
|
props.align && `align align=${props.align}`
|
|
22
28
|
].filter(Boolean).join(" "));
|
|
29
|
+
const dispatch = createDispatch(root);
|
|
30
|
+
useComponentHost(controllerModule.default, {
|
|
31
|
+
root,
|
|
32
|
+
dispatch,
|
|
33
|
+
props,
|
|
34
|
+
state: { overLimit }
|
|
35
|
+
});
|
|
23
36
|
return (_ctx, _cache) => {
|
|
24
|
-
return openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-switcher" }, _ctx.$attrs, {
|
|
37
|
+
return openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-switcher" }, _ctx.$attrs, {
|
|
38
|
+
"data-ui-switcher-state": hostState.value || void 0,
|
|
39
|
+
ref_key: "root",
|
|
40
|
+
ref: root
|
|
41
|
+
}), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1);
|
|
25
42
|
};
|
|
26
43
|
}
|
|
27
|
-
}), [["__scopeId", "data-v-
|
|
44
|
+
}), [["__scopeId", "data-v-be049fb8"]]);
|
|
28
45
|
//#endregion
|
|
29
46
|
export { UiSwitcher_default as t };
|
package/vue/chunks/UiTabs.js
CHANGED
|
@@ -21,6 +21,7 @@ var UiTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
21
21
|
inheritAttrs: false,
|
|
22
22
|
__name: "UiTabs",
|
|
23
23
|
props: {
|
|
24
|
+
activation: { default: "auto" },
|
|
24
25
|
density: { default: "comfortable" },
|
|
25
26
|
label: { default: "Tabs" },
|
|
26
27
|
orientation: { default: "horizontal" },
|
|
@@ -78,7 +79,7 @@ var UiTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
78
79
|
"aria-label": __props.label,
|
|
79
80
|
"aria-orientation": __props.orientation,
|
|
80
81
|
ref: "list"
|
|
81
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (tab) => {
|
|
82
|
+
}, [renderSlot(_ctx.$slots, "tab", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (tab) => {
|
|
82
83
|
return openBlock(), createElementBlock("button", {
|
|
83
84
|
key: tab.id,
|
|
84
85
|
type: "button",
|
|
@@ -88,9 +89,9 @@ var UiTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
88
89
|
"aria-controls": tab.id,
|
|
89
90
|
"aria-selected": tab.id === internalValue.value
|
|
90
91
|
}, toDisplayString(tab.label), 9, _hoisted_3);
|
|
91
|
-
}), 128))], 8, _hoisted_2), createElementVNode("div", _hoisted_4, [renderSlot(_ctx.$slots, "default")], 512)], 16, _hoisted_1);
|
|
92
|
+
}), 128))])], 8, _hoisted_2), createElementVNode("div", _hoisted_4, [renderSlot(_ctx.$slots, "default")], 512)], 16, _hoisted_1);
|
|
92
93
|
};
|
|
93
94
|
}
|
|
94
|
-
}), [["__scopeId", "data-v-
|
|
95
|
+
}), [["__scopeId", "data-v-d1626838"]]);
|
|
95
96
|
//#endregion
|
|
96
97
|
export { UiTabs_default as t };
|
package/vue/chunks/UiTextarea.js
CHANGED
|
@@ -17,6 +17,10 @@ var UiTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
17
17
|
inheritAttrs: false,
|
|
18
18
|
__name: "UiTextarea",
|
|
19
19
|
props: {
|
|
20
|
+
autosize: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
20
24
|
disabled: {
|
|
21
25
|
type: Boolean,
|
|
22
26
|
default: false
|
|
@@ -48,7 +52,7 @@ var UiTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
48
52
|
});
|
|
49
53
|
const root = ref(null);
|
|
50
54
|
/** The values the styles' :host-state() rules test. */
|
|
51
|
-
const hostState = computed(() => [props.size && `size size=${props.size}
|
|
55
|
+
const hostState = computed(() => [props.size && `size size=${props.size}`, props.autosize && "autosize"].filter(Boolean).join(" "));
|
|
52
56
|
const dispatch = createDispatch(root);
|
|
53
57
|
useComponentHost(controllerModule.default, {
|
|
54
58
|
root,
|
|
@@ -62,6 +66,7 @@ var UiTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
62
66
|
required: __props.required,
|
|
63
67
|
"aria-invalid": __props.invalid,
|
|
64
68
|
rows: __props.rows,
|
|
69
|
+
style: { "--_rows": __props.rows },
|
|
65
70
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
66
71
|
"data-ui-textarea-state": hostState.value || void 0,
|
|
67
72
|
ref_key: "root",
|
|
@@ -69,6 +74,6 @@ var UiTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
69
74
|
}), null, 16, _hoisted_1)), [[vModelText, model.value]]);
|
|
70
75
|
};
|
|
71
76
|
}
|
|
72
|
-
}), [["__scopeId", "data-v-
|
|
77
|
+
}), [["__scopeId", "data-v-f371e58f"]]);
|
|
73
78
|
//#endregion
|
|
74
79
|
export { UiTextarea_default as t };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { n as useComponentHost, t as createDispatch } from "./host.js";
|
|
3
|
+
import { t as UiIcon_default } from "./UiIcon.js";
|
|
4
|
+
import { t as UiIconButton_default } from "./UiIconButton.js";
|
|
5
|
+
import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, openBlock, ref, renderSlot, useTemplateRef, withCtx } from "vue";
|
|
6
|
+
import * as controllerModule from "@threadlabs/looma/components/ui-toast/ui-toast.js";
|
|
7
|
+
//#region .build/vue/UiToast.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var _hoisted_1 = ["role", "data-ui-toast-state"];
|
|
9
|
+
var _hoisted_2 = { class: "message" };
|
|
10
|
+
var _hoisted_3 = {
|
|
11
|
+
class: "action",
|
|
12
|
+
ref: "action"
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region .build/vue/UiToast.vue
|
|
16
|
+
var UiToast_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
17
|
+
inheritAttrs: false,
|
|
18
|
+
__name: "UiToast",
|
|
19
|
+
props: {
|
|
20
|
+
duration: { default: 0 },
|
|
21
|
+
tone: { default: "neutral" }
|
|
22
|
+
},
|
|
23
|
+
emits: ["dismiss"],
|
|
24
|
+
setup(__props, { emit: __emit }) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const emit = __emit;
|
|
27
|
+
const root = ref(null);
|
|
28
|
+
const actionElement = useTemplateRef("action");
|
|
29
|
+
/** The values the styles' :host-state() rules test. */
|
|
30
|
+
const hostState = computed(() => [props.tone && `tone tone=${props.tone}`].filter(Boolean).join(" "));
|
|
31
|
+
const isDismissDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["id"] === "string" && (detail["reason"] === "action" || detail["reason"] === "timeout") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
|
|
32
|
+
"id",
|
|
33
|
+
"reason",
|
|
34
|
+
"trigger"
|
|
35
|
+
].includes(key));
|
|
36
|
+
const dispatch = createDispatch(root, emit, { checks: { dismiss: isDismissDetail } });
|
|
37
|
+
useComponentHost(controllerModule.default, {
|
|
38
|
+
root,
|
|
39
|
+
dispatch,
|
|
40
|
+
props,
|
|
41
|
+
refs: { action: actionElement }
|
|
42
|
+
});
|
|
43
|
+
function text(value) {
|
|
44
|
+
if (Array.isArray(value)) return value.map(text).join(" ");
|
|
45
|
+
return value === null || value === void 0 || typeof value === "object" ? "" : String(value);
|
|
46
|
+
}
|
|
47
|
+
function attribute(value) {
|
|
48
|
+
if (value === null || value === void 0 || value === false || typeof value === "object" && !Array.isArray(value)) return void 0;
|
|
49
|
+
return value === true ? "" : text(value);
|
|
50
|
+
}
|
|
51
|
+
return (_ctx, _cache) => {
|
|
52
|
+
return openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-toast" }, _ctx.$attrs, {
|
|
53
|
+
role: attribute({
|
|
54
|
+
neutral: "status",
|
|
55
|
+
info: "status",
|
|
56
|
+
success: "status",
|
|
57
|
+
warning: "status",
|
|
58
|
+
danger: "alert"
|
|
59
|
+
}[__props.tone]),
|
|
60
|
+
"data-ui-toast-state": hostState.value || void 0,
|
|
61
|
+
ref_key: "root",
|
|
62
|
+
ref: root
|
|
63
|
+
}), [
|
|
64
|
+
createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
|
|
65
|
+
createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "action", {}, void 0, true)], 512),
|
|
66
|
+
createVNode(UiIconButton_default, {
|
|
67
|
+
class: "dismiss",
|
|
68
|
+
size: "sm",
|
|
69
|
+
variant: "ghost",
|
|
70
|
+
label: "Dismiss notification",
|
|
71
|
+
round: true
|
|
72
|
+
}, {
|
|
73
|
+
default: withCtx(() => [createVNode(UiIcon_default, { name: "x" })]),
|
|
74
|
+
_: 1
|
|
75
|
+
})
|
|
76
|
+
], 16, _hoisted_1);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}), [["__scopeId", "data-v-fdef5729"]]);
|
|
80
|
+
//#endregion
|
|
81
|
+
export { UiToast_default as t };
|
|
@@ -1,65 +1,46 @@
|
|
|
1
1
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
2
|
import { n as useComponentHost, t as createDispatch } from "./host.js";
|
|
3
|
+
import { t as UiIcon_default } from "./UiIcon.js";
|
|
3
4
|
import { t as UiIconButton_default } from "./UiIconButton.js";
|
|
4
|
-
import { Fragment, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, withCtx } from "vue";
|
|
5
|
+
import { Fragment, computed, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, withCtx } from "vue";
|
|
5
6
|
import * as controllerModule from "@threadlabs/looma/components/ui-toast-region/ui-toast-region.js";
|
|
6
7
|
//#region .build/vue/UiToastRegion.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var _hoisted_1 = ["
|
|
8
|
-
var _hoisted_2 =
|
|
9
|
-
|
|
8
|
+
var _hoisted_1 = ["data-ui-toast-region-state"];
|
|
9
|
+
var _hoisted_2 = [
|
|
10
|
+
"id",
|
|
11
|
+
"role",
|
|
12
|
+
"data-tone"
|
|
13
|
+
];
|
|
14
|
+
var _hoisted_3 = { class: "message" };
|
|
15
|
+
var _hoisted_4 = ["data-toast"];
|
|
10
16
|
//#endregion
|
|
11
17
|
//#region .build/vue/UiToastRegion.vue
|
|
12
18
|
var UiToastRegion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
13
19
|
inheritAttrs: false,
|
|
14
20
|
__name: "UiToastRegion",
|
|
15
21
|
props: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
default: false
|
|
19
|
-
},
|
|
20
|
-
duration: { default: 5e3 },
|
|
21
|
-
message: { default: "Notification" },
|
|
22
|
-
open: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false
|
|
25
|
-
}
|
|
22
|
+
duration: { default: 0 },
|
|
23
|
+
placement: { default: "top" }
|
|
26
24
|
},
|
|
27
|
-
emits: [
|
|
28
|
-
"update:open",
|
|
29
|
-
"close",
|
|
30
|
-
"dismiss"
|
|
31
|
-
],
|
|
25
|
+
emits: ["dismiss"],
|
|
32
26
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
33
27
|
const props = __props;
|
|
34
28
|
const emit = __emit;
|
|
35
29
|
const root = ref(null);
|
|
36
|
-
const internalOpen = ref(false);
|
|
37
30
|
const toasts = ref([]);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"reason",
|
|
41
|
-
"trigger"
|
|
42
|
-
].includes(key));
|
|
31
|
+
/** The values the styles' :host-state() rules test. */
|
|
32
|
+
const hostState = computed(() => [props.placement && `placement placement=${props.placement}`].filter(Boolean).join(" "));
|
|
43
33
|
const isDismissDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["id"] === "string" && (detail["reason"] === "action" || detail["reason"] === "timeout") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
|
|
44
34
|
"id",
|
|
45
35
|
"reason",
|
|
46
36
|
"trigger"
|
|
47
37
|
].includes(key));
|
|
48
|
-
const dispatch = createDispatch(root, emit, {
|
|
49
|
-
checks: {
|
|
50
|
-
close: isCloseDetail,
|
|
51
|
-
dismiss: isDismissDetail
|
|
52
|
-
},
|
|
53
|
-
modeled: ["open"]
|
|
54
|
-
});
|
|
38
|
+
const dispatch = createDispatch(root, emit, { checks: { dismiss: isDismissDetail } });
|
|
55
39
|
const { host, ready } = useComponentHost(controllerModule.default, {
|
|
56
40
|
root,
|
|
57
41
|
dispatch,
|
|
58
42
|
props,
|
|
59
|
-
state: {
|
|
60
|
-
internalOpen,
|
|
61
|
-
toasts
|
|
62
|
-
}
|
|
43
|
+
state: { toasts }
|
|
63
44
|
});
|
|
64
45
|
__expose({ show: async (...args) => {
|
|
65
46
|
await ready();
|
|
@@ -73,6 +54,7 @@ var UiToastRegion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
73
54
|
"aria-live": "polite",
|
|
74
55
|
popover: "manual"
|
|
75
56
|
}, _ctx.$attrs, {
|
|
57
|
+
"data-ui-toast-region-state": hostState.value || void 0,
|
|
76
58
|
ref_key: "root",
|
|
77
59
|
ref: root
|
|
78
60
|
}), [renderSlot(_ctx.$slots, "default"), (openBlock(true), createElementBlock(Fragment, null, renderList(toasts.value, (toast) => {
|
|
@@ -80,8 +62,9 @@ var UiToastRegion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
80
62
|
key: toast.id,
|
|
81
63
|
class: normalizeClass(["toast", { closing: toast.closing }]),
|
|
82
64
|
id: toast.id,
|
|
83
|
-
role: toast.role
|
|
84
|
-
|
|
65
|
+
role: toast.role,
|
|
66
|
+
"data-tone": toast.tone
|
|
67
|
+
}, [createElementVNode("span", _hoisted_3, toDisplayString(toast.message), 1), createElementVNode("span", {
|
|
85
68
|
class: "dismiss",
|
|
86
69
|
"data-toast": toast.id
|
|
87
70
|
}, [createVNode(UiIconButton_default, {
|
|
@@ -90,19 +73,12 @@ var UiToastRegion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
90
73
|
round: true,
|
|
91
74
|
label: `Dismiss ${toast.message}`
|
|
92
75
|
}, {
|
|
93
|
-
default: withCtx(() => [
|
|
94
|
-
viewBox: "0 0 24 24",
|
|
95
|
-
fill: "none",
|
|
96
|
-
stroke: "currentColor",
|
|
97
|
-
"stroke-width": "2",
|
|
98
|
-
"stroke-linecap": "round",
|
|
99
|
-
"aria-hidden": "true"
|
|
100
|
-
}, [createElementVNode("path", { d: "M18 6 6 18M6 6l12 12" })], -1)])]),
|
|
76
|
+
default: withCtx(() => [createVNode(UiIcon_default, { name: "x" })]),
|
|
101
77
|
_: 1
|
|
102
|
-
}, 8, ["label"])], 8,
|
|
103
|
-
}), 128))], 16);
|
|
78
|
+
}, 8, ["label"])], 8, _hoisted_4)], 10, _hoisted_2);
|
|
79
|
+
}), 128))], 16, _hoisted_1);
|
|
104
80
|
};
|
|
105
81
|
}
|
|
106
|
-
}), [["__scopeId", "data-v-
|
|
82
|
+
}), [["__scopeId", "data-v-a4727935"]]);
|
|
107
83
|
//#endregion
|
|
108
84
|
export { UiToastRegion_default as t };
|
package/vue/chunks/UiTooltip.js
CHANGED
|
@@ -21,7 +21,7 @@ var UiTooltip_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
21
21
|
type: Boolean,
|
|
22
22
|
default: false
|
|
23
23
|
},
|
|
24
|
-
placement: { default: "top
|
|
24
|
+
placement: { default: "top" },
|
|
25
25
|
showDelay: { default: 500 },
|
|
26
26
|
trigger: { default: "hover" }
|
|
27
27
|
},
|
|
@@ -37,11 +37,7 @@ var UiTooltip_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
37
37
|
const root = ref(null);
|
|
38
38
|
const internalOpen = ref(false);
|
|
39
39
|
/** The values the styles' :host-state() rules test. */
|
|
40
|
-
const hostState = computed(() => [
|
|
41
|
-
props.inverse && "inverse",
|
|
42
|
-
props.placement && "placement",
|
|
43
|
-
`placement=${encodeURIComponent(props.placement)}`
|
|
44
|
-
].filter(Boolean).join(" "));
|
|
40
|
+
const hostState = computed(() => [props.inverse && "inverse"].filter(Boolean).join(" "));
|
|
45
41
|
const isOpenDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["open"] === "boolean" && (detail["reason"] === "action" || detail["reason"] === "programmatic" || detail["reason"] === "light-dismiss" || detail["reason"] === "escape") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
|
|
46
42
|
"open",
|
|
47
43
|
"reason",
|
|
@@ -72,6 +68,6 @@ var UiTooltip_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
72
68
|
}), [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])], 16, _hoisted_1);
|
|
73
69
|
};
|
|
74
70
|
}
|
|
75
|
-
}), [["__scopeId", "data-v-
|
|
71
|
+
}), [["__scopeId", "data-v-bb92970c"]]);
|
|
76
72
|
//#endregion
|
|
77
73
|
export { UiTooltip_default as t };
|