@pgcorp/ui-kit 0.14.0 → 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/README.md +330 -12
- package/dist/assets/src/components/layout/{SResizeHandle.vue_vue_type_style_index_0_scoped_13b9b27a_lang.css → SResizeHandle.vue_vue_type_style_index_0_scoped_dc65aba1_lang.css} +1 -1
- package/dist/assets/src/components/shared/_internal/SDialogSurface.css_vue_type_style_index_0_src_a108e8f1_scoped_a108e8f1_lang.css +2 -0
- package/dist/assets/src/components/shared/containers/{SCollapsiblePanel.css_vue_type_style_index_0_src_71824088_scoped_71824088_lang.css → SCollapsiblePanel.css_vue_type_style_index_0_src_db85261d_scoped_db85261d_lang.css} +1 -1
- package/dist/assets/src/components/shared/containers/{SOverlayHost.css_vue_type_style_index_0_src_8f9be94e_scoped_8f9be94e_lang.css → SOverlayHost.css_vue_type_style_index_0_src_09215628_scoped_09215628_lang.css} +1 -1
- package/dist/assets/src/components/shared/containers/{SPopover.css_vue_type_style_index_0_src_4091d007_scoped_4091d007_lang.css → SPopover.css_vue_type_style_index_0_src_a4f1f64a_scoped_a4f1f64a_lang.css} +1 -1
- package/dist/assets/src/components/shared/containers/SSidebarSection.css_vue_type_style_index_0_src_52396e42_scoped_52396e42_lang.css +2 -0
- package/dist/assets/src/components/shared/controls/SButton.css_vue_type_style_index_0_src_7a5acda9_scoped_7a5acda9_lang.css +1 -1
- package/dist/assets/src/components/shared/controls/SCheckbox.css_vue_type_style_index_0_src_2562f916_scoped_2562f916_lang.css +2 -0
- package/dist/assets/src/components/shared/controls/SCombobox.css_vue_type_style_index_0_src_d630c922_scoped_d630c922_lang.css +2 -0
- package/dist/assets/src/components/shared/controls/SContextMenu.css_vue_type_style_index_0_src_43b6e378_scoped_43b6e378_lang.css +1 -0
- package/dist/assets/src/components/shared/controls/{SDropdownMenu.css_vue_type_style_index_0_src_857e2649_scoped_857e2649_lang.css → SDropdownMenu.css_vue_type_style_index_0_src_40040ae5_scoped_40040ae5_lang.css} +1 -1
- package/dist/assets/src/components/shared/controls/{SMenuSurface.css_vue_type_style_index_0_src_84109ad9_scoped_84109ad9_lang.css → SMenuSurface.css_vue_type_style_index_0_src_d2b7d71b_scoped_d2b7d71b_lang.css} +1 -1
- package/dist/assets/src/components/shared/controls/SSelect.css_vue_type_style_index_0_src_d1ead6c0_scoped_d1ead6c0_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/SControlledToastViewport.css_vue_type_style_index_0_src_a69aa84b_scoped_a69aa84b_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/SScrollViewport.css_vue_type_style_index_0_src_d94fcf8c_scoped_d94fcf8c_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/STooltip.css_vue_type_style_index_0_src_true_lang.css +1 -1
- package/dist/assets/src/components/shared/data-display/_internal/STableFrame.css_vue_type_style_index_0_src_914bad28_scoped_914bad28_lang.css +2 -0
- package/dist/assets/src/components/shared/navigation/{SBottomNav.vue_vue_type_style_index_0_scoped_24be0f2b_lang.css → SBottomNav.vue_vue_type_style_index_0_scoped_68cf84b3_lang.css} +1 -1
- package/dist/src/components/layout/SResizeHandle.vue.js +2 -2
- package/dist/src/components/layout/SResizeHandle.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/src/components/shared/_internal/SDialogSurface.vue.d.ts +9 -1
- package/dist/src/components/shared/_internal/SDialogSurface.vue.js +2 -2
- package/dist/src/components/shared/_internal/SDialogSurface.vue_vue_type_script_setup_true_lang.js +174 -82
- package/dist/src/components/shared/_internal/dialogSurface.d.ts +2 -0
- package/dist/src/components/shared/_internal/dialogSurface.js +30 -27
- package/dist/src/components/shared/_internal/dialogSurfaceMotion.d.ts +14 -0
- package/dist/src/components/shared/_internal/dialogSurfaceMotion.js +84 -0
- package/dist/src/components/shared/_internal/focusTrap.js +15 -13
- package/dist/src/components/shared/containers/SCollapsiblePanel.vue.d.ts +5 -0
- package/dist/src/components/shared/containers/SCollapsiblePanel.vue.js +2 -2
- package/dist/src/components/shared/containers/SCollapsiblePanel.vue_vue_type_script_setup_true_lang.js +123 -121
- package/dist/src/components/shared/containers/SDrawer.vue.d.ts +4 -4
- package/dist/src/components/shared/containers/SDrawer.vue.js +3 -6
- package/dist/src/components/shared/containers/SDrawer.vue_vue_type_script_setup_true_lang.js +104 -128
- package/dist/src/components/shared/containers/SModal.vue.d.ts +8 -8
- package/dist/src/components/shared/containers/SModal.vue.js +3 -6
- package/dist/src/components/shared/containers/SModal.vue_vue_type_script_setup_true_lang.js +87 -103
- package/dist/src/components/shared/containers/SOverlayHost.vue.js +2 -2
- package/dist/src/components/shared/containers/SOverlayHost.vue_vue_type_script_setup_true_lang.js +32 -31
- package/dist/src/components/shared/containers/SPanel.vue.d.ts +1 -1
- package/dist/src/components/shared/containers/SPopover.vue.js +2 -2
- package/dist/src/components/shared/containers/SPopover.vue_vue_type_script_setup_true_lang.js +225 -200
- package/dist/src/components/shared/containers/SSidebarSection.vue.js +2 -2
- package/dist/src/components/shared/containers/SSidebarSection.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/src/components/shared/controls/SCheckbox.vue.js +2 -2
- package/dist/src/components/shared/controls/SCheckbox.vue_vue_type_script_setup_true_lang.js +13 -7
- package/dist/src/components/shared/controls/SCombobox.vue.js +2 -2
- package/dist/src/components/shared/controls/SCombobox.vue_vue_type_script_setup_true_lang.js +104 -94
- package/dist/src/components/shared/controls/SContextMenu.vue.js +2 -2
- package/dist/src/components/shared/controls/SContextMenu.vue_vue_type_script_setup_true_lang.js +86 -81
- package/dist/src/components/shared/controls/SDropdownMenu.vue.js +2 -2
- package/dist/src/components/shared/controls/SDropdownMenu.vue_vue_type_script_setup_true_lang.js +77 -72
- package/dist/src/components/shared/controls/SMenuSurface.vue.js +2 -2
- package/dist/src/components/shared/controls/SMenuSurface.vue_vue_type_script_setup_true_lang.js +81 -77
- package/dist/src/components/shared/controls/SSelect.vue.js +2 -2
- package/dist/src/components/shared/controls/SSelect.vue_vue_type_script_setup_true_lang.js +85 -77
- package/dist/src/components/shared/data-display/SControlledToastViewport.vue.js +2 -2
- package/dist/src/components/shared/data-display/SControlledToastViewport.vue_vue_type_script_setup_true_lang.js +58 -49
- package/dist/src/components/shared/data-display/SScrollViewport.vue.d.ts +10 -5
- package/dist/src/components/shared/data-display/SScrollViewport.vue.js +2 -2
- package/dist/src/components/shared/data-display/SScrollViewport.vue_vue_type_script_setup_true_lang.js +162 -111
- package/dist/src/components/shared/data-display/STooltip.vue_vue_type_script_setup_true_lang.js +276 -224
- package/dist/src/components/shared/data-display/_internal/STableFrame.vue.d.ts +3 -3
- package/dist/src/components/shared/data-display/_internal/STableFrame.vue.js +2 -2
- package/dist/src/components/shared/data-display/_internal/STableFrame.vue_vue_type_script_setup_true_lang.js +62 -46
- package/dist/src/components/shared/data-display/scrollViewport.d.ts +2 -0
- package/dist/src/components/shared/navigation/SBottomNav.vue.js +2 -2
- package/dist/src/components/shared/navigation/SBottomNav.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/src/components/shared/navigation/STabList.vue.d.ts +1 -1
- package/dist/src/composables/useDialogOverlay.d.ts +12 -2
- package/dist/src/composables/useDialogOverlay.js +192 -119
- package/dist/src/internal/flatTree.d.ts +8 -0
- package/dist/src/internal/flatTree.js +23 -0
- package/dist/src/internal/focusNavigation.d.ts +3 -0
- package/dist/src/internal/focusNavigation.js +28 -15
- package/dist/src/internal/inertLease.d.ts +8 -0
- package/dist/src/internal/inertLease.js +33 -0
- package/dist/src/internal/layerStack.d.ts +40 -0
- package/dist/src/internal/layerStack.js +301 -94
- package/dist/src/internal/nativeFocus.d.ts +4 -0
- package/dist/src/internal/nativeFocus.js +12 -0
- package/dist/src/internal/overlayPortal.d.ts +17 -0
- package/dist/src/internal/overlayPortal.js +23 -0
- package/dist/src/internal/semanticSizing.d.ts +2 -2
- package/dist/src/internal/semanticSizing.js +2 -1
- package/dist/src/internal/useMenuLayer.d.ts +1 -0
- package/dist/src/internal/useMenuLayer.js +63 -57
- package/dist/src/internal/viewportModality.d.ts +27 -0
- package/dist/src/internal/viewportModality.js +132 -0
- package/dist/typography.js +17 -62
- package/docs/overlay-lifecycle.md +195 -0
- package/docs/public-api.md +141 -4
- package/docs/resize.md +34 -5
- package/docs/scroll-viewport.md +30 -10
- package/docs/theming.md +42 -8
- package/package.json +1 -1
- package/src/components/shared/_internal/SDialogSurface.css +185 -40
- package/src/components/shared/controls/SButton.css +0 -3
- package/src/components/shared/controls/SCheckbox.css +19 -7
- package/src/components/shared/data-display/SControlledToastViewport.css +2 -10
- package/src/components/shared/data-display/SScrollViewport.css +17 -1
- package/src/components/shared/data-display/STooltip.css +1 -1
- package/src/components/shared/data-display/_internal/STableFrame.css +1 -5
- package/dist/assets/src/components/shared/_internal/SDialogSurface.css_vue_type_style_index_0_src_0e58afdc_scoped_0e58afdc_lang.css +0 -2
- package/dist/assets/src/components/shared/containers/SDrawer.css_vue_type_style_index_0_src_61cf20dd_scoped_61cf20dd_lang.css +0 -2
- package/dist/assets/src/components/shared/containers/SModal.css_vue_type_style_index_0_src_42e1bd5f_scoped_42e1bd5f_lang.css +0 -2
- package/dist/assets/src/components/shared/containers/SSidebarSection.css_vue_type_style_index_0_src_21f71ae8_scoped_21f71ae8_lang.css +0 -2
- package/dist/assets/src/components/shared/controls/SCheckbox.css_vue_type_style_index_0_src_55d4826e_scoped_55d4826e_lang.css +0 -2
- package/dist/assets/src/components/shared/controls/SCombobox.css_vue_type_style_index_0_src_537f5744_scoped_537f5744_lang.css +0 -2
- package/dist/assets/src/components/shared/controls/SContextMenu.css_vue_type_style_index_0_src_03921269_scoped_03921269_lang.css +0 -1
- package/dist/assets/src/components/shared/controls/SSelect.css_vue_type_style_index_0_src_df3d6688_scoped_df3d6688_lang.css +0 -2
- package/dist/assets/src/components/shared/data-display/SControlledToastViewport.css_vue_type_style_index_0_src_5864b6c6_scoped_5864b6c6_lang.css +0 -2
- package/dist/assets/src/components/shared/data-display/SScrollViewport.css_vue_type_style_index_0_src_e5d11342_scoped_e5d11342_lang.css +0 -2
- package/dist/assets/src/components/shared/data-display/_internal/STableFrame.css_vue_type_style_index_0_src_52b5825e_scoped_52b5825e_lang.css +0 -2
- package/src/components/shared/containers/SDrawer.css +0 -87
- package/src/components/shared/containers/SModal.css +0 -27
package/dist/src/components/shared/controls/SCheckbox.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useBinaryInput as o } from "../../../internal/useBinaryInput.js";
|
|
|
6
6
|
import s from "./SField.vue.js";
|
|
7
7
|
import { computed as c, createBlock as l, createElementVNode as u, defineComponent as d, mergeProps as f, openBlock as p, resolveDynamicComponent as m, unref as h, withCtx as g, withModifiers as _ } from "vue";
|
|
8
8
|
//#region src/components/shared/controls/SCheckbox.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var v =
|
|
9
|
+
var v = ["data-presentation"], y = [
|
|
10
10
|
"id",
|
|
11
11
|
"checked",
|
|
12
12
|
"disabled",
|
|
@@ -14,7 +14,10 @@ var v = { class: "s-checkbox-control" }, y = [
|
|
|
14
14
|
"aria-invalid",
|
|
15
15
|
"aria-readonly",
|
|
16
16
|
"aria-describedby"
|
|
17
|
-
], b = {
|
|
17
|
+
], b = {
|
|
18
|
+
class: "s-checkbox-box",
|
|
19
|
+
"aria-hidden": "true"
|
|
20
|
+
}, x = /*@__PURE__*/ d({
|
|
18
21
|
inheritAttrs: !1,
|
|
19
22
|
__name: "SCheckbox",
|
|
20
23
|
props: {
|
|
@@ -59,7 +62,7 @@ var v = { class: "s-checkbox-control" }, y = [
|
|
|
59
62
|
indeterminate: () => S.indeterminate,
|
|
60
63
|
emitUpdate: (e) => C("update:modelValue", e),
|
|
61
64
|
emitClick: (e) => C("click", e)
|
|
62
|
-
});
|
|
65
|
+
}), j = c(() => S.indeterminate && !E.value);
|
|
63
66
|
return (n, i) => (p(), l(s, {
|
|
64
67
|
"control-id": h(D),
|
|
65
68
|
label: d.label,
|
|
@@ -72,7 +75,10 @@ var v = { class: "s-checkbox-control" }, y = [
|
|
|
72
75
|
layout: "inline",
|
|
73
76
|
"content-flow": T.value === "inline" ? "phrasing" : "flow"
|
|
74
77
|
}, {
|
|
75
|
-
default: g((n) => [u("span",
|
|
78
|
+
default: g((n) => [u("span", {
|
|
79
|
+
class: "s-checkbox-control",
|
|
80
|
+
"data-presentation": T.value
|
|
81
|
+
}, [u("input", f({ ref: h(A) }, h(w).bindings(), {
|
|
76
82
|
id: n.controlId,
|
|
77
83
|
type: "checkbox",
|
|
78
84
|
class: "s-checkbox-input",
|
|
@@ -84,13 +90,13 @@ var v = { class: "s-checkbox-control" }, y = [
|
|
|
84
90
|
"aria-describedby": h(r)(h(w).string("aria-describedby"), n.describedBy),
|
|
85
91
|
onClick: i[0] ||= _((...e) => h(k) && h(k)(...e), ["stop"]),
|
|
86
92
|
onChange: i[1] ||= (...e) => h(O) && h(O)(...e)
|
|
87
|
-
}), null, 16, y), u("span", b, [(p(), l(m(
|
|
93
|
+
}), null, 16, y), u("span", b, [(p(), l(m(j.value ? h(t) : h(e)), {
|
|
88
94
|
class: "s-checkbox-check",
|
|
89
95
|
"aria-hidden": "true",
|
|
90
|
-
"data-sputnig-ui-icon":
|
|
96
|
+
"data-sputnig-ui-icon": j.value ? "minus" : "check",
|
|
91
97
|
"data-sputnig-ui-icon-color-mode": "auto",
|
|
92
98
|
"data-sputnig-ui-icon-set": "classic"
|
|
93
|
-
}, null, 8, ["data-sputnig-ui-icon"]))])])]),
|
|
99
|
+
}, null, 8, ["data-sputnig-ui-icon"]))])], 8, v)]),
|
|
94
100
|
_: 1
|
|
95
101
|
}, 8, [
|
|
96
102
|
"control-id",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../../assets/src/components/shared/controls/SCombobox.
|
|
1
|
+
import "../../../../assets/src/components/shared/controls/SCombobox.css_vue_type_style_index_0_src_d630c922_scoped_d630c922_lang.css";
|
|
2
2
|
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
import t from "./SCombobox.vue_vue_type_script_setup_true_lang.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/components/shared/controls/SCombobox.vue
|
|
6
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
6
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-d630c922"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as default };
|
package/dist/src/components/shared/controls/SCombobox.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { registerLayer as e } from "../../../internal/layerStack.js";
|
|
2
2
|
import { useOverlayAdmission as t } from "../../../internal/overlayHost.js";
|
|
3
3
|
import { validateBoolean as n, validateDomId as ee, validateExactString as r, validateNonEmptyString as i } from "../../../internal/runtimeContract.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useOverlayPortalTarget as te } from "../../../internal/overlayPortal.js";
|
|
5
|
+
import { useFloatingPosition as a } from "../../../composables/useFloatingPosition.js";
|
|
5
6
|
import { useUiKitLocale as ne } from "../../../composables/useUiKitLocale.js";
|
|
6
|
-
import { useOwnedAttrs as
|
|
7
|
+
import { useOwnedAttrs as re } from "../../../internal/ownedAttrs.js";
|
|
7
8
|
import { selectionKeyToken as o } from "../_internal/useSelectionRoving.js";
|
|
8
9
|
import { isSelectionModelList as s, resolveSelectionInventory as c, validateOptionalSelectionString as l, validateSelectionModel as u } from "../_internal/selectionContract.js";
|
|
9
10
|
import d from "./SListbox.vue.js";
|
|
10
|
-
import
|
|
11
|
-
import { Fragment as
|
|
11
|
+
import ie from "./SInputText.vue.js";
|
|
12
|
+
import { Fragment as ae, Teleport as oe, computed as f, createBlock as se, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, mergeProps as ce, nextTick as v, normalizeStyle as le, onBeforeUnmount as ue, openBlock as y, shallowRef as b, unref as x, useId as S, watch as C, watchEffect as de } from "vue";
|
|
12
13
|
//#region src/components/shared/controls/SCombobox.vue?vue&type=script&setup=true&lang.ts
|
|
13
|
-
var
|
|
14
|
+
var w = /*@__PURE__*/ _({
|
|
14
15
|
inheritAttrs: !1,
|
|
15
16
|
__name: "SCombobox",
|
|
16
17
|
props: {
|
|
@@ -47,35 +48,35 @@ var E = /*@__PURE__*/ _({
|
|
|
47
48
|
}
|
|
48
49
|
},
|
|
49
50
|
emits: ["update:modelValue", "update:search"],
|
|
50
|
-
setup(_, { emit:
|
|
51
|
-
let
|
|
51
|
+
setup(_, { emit: w }) {
|
|
52
|
+
let T = _, { t: E } = ne(), D = w, O = re({
|
|
52
53
|
component: "SCombobox",
|
|
53
54
|
owner: "editable combobox input"
|
|
54
|
-
}),
|
|
55
|
-
if (typeof
|
|
56
|
-
return
|
|
55
|
+
}), k = S(), A = b(null), j = b(null), M = b(!1), N = t(), P = te(), F = b(null), I = b("var(--s-layer-root-floating)"), L = null, R = 0, z = f(() => T.id === void 0 ? `s-combobox-${k}` : ee("SCombobox", "id", T.id)), B = f(() => `${z.value}-listbox`), V = f(() => {
|
|
56
|
+
if (typeof T.search != "string") throw TypeError("SCombobox: search must be a string");
|
|
57
|
+
return T.search;
|
|
57
58
|
}), H = f(() => ({
|
|
58
|
-
filterMode: r("SCombobox", "filterMode",
|
|
59
|
-
placeholder: i("SCombobox", "placeholder",
|
|
60
|
-
disabled: n("SCombobox", "disabled",
|
|
61
|
-
readonly: n("SCombobox", "readonly",
|
|
62
|
-
required: n("SCombobox", "required",
|
|
63
|
-
invalid: n("SCombobox", "invalid",
|
|
64
|
-
emptyLabel: i("SCombobox", "emptyLabel",
|
|
65
|
-
size: r("SCombobox", "size",
|
|
59
|
+
filterMode: r("SCombobox", "filterMode", T.filterMode, ["local", "manual"]),
|
|
60
|
+
placeholder: i("SCombobox", "placeholder", T.placeholder ?? E("forms.searchPlaceholder")),
|
|
61
|
+
disabled: n("SCombobox", "disabled", T.disabled),
|
|
62
|
+
readonly: n("SCombobox", "readonly", T.readonly),
|
|
63
|
+
required: n("SCombobox", "required", T.required),
|
|
64
|
+
invalid: n("SCombobox", "invalid", T.invalid),
|
|
65
|
+
emptyLabel: i("SCombobox", "emptyLabel", T.emptyLabel ?? E("forms.noOptions")),
|
|
66
|
+
size: r("SCombobox", "size", T.size, [
|
|
66
67
|
"sm",
|
|
67
68
|
"md",
|
|
68
69
|
"lg"
|
|
69
70
|
]),
|
|
70
|
-
allowCustomValue: n("SCombobox", "allowCustomValue",
|
|
71
|
-
label: l("SCombobox", "label",
|
|
72
|
-
helpText: l("SCombobox", "helpText",
|
|
73
|
-
errorMessage: l("SCombobox", "errorMessage",
|
|
71
|
+
allowCustomValue: n("SCombobox", "allowCustomValue", T.allowCustomValue),
|
|
72
|
+
label: l("SCombobox", "label", T.label),
|
|
73
|
+
helpText: l("SCombobox", "helpText", T.helpText),
|
|
74
|
+
errorMessage: l("SCombobox", "errorMessage", T.errorMessage)
|
|
74
75
|
})), U = f(() => {
|
|
75
|
-
let e = c("SCombobox",
|
|
76
|
-
return H.value.allowCustomValue && typeof
|
|
76
|
+
let e = c("SCombobox", T.options);
|
|
77
|
+
return H.value.allowCustomValue && typeof T.modelValue == "string" ? o("SCombobox", T.modelValue, "modelValue") : u("SCombobox", "single", T.modelValue, e), e;
|
|
77
78
|
});
|
|
78
|
-
|
|
79
|
+
de(() => {
|
|
79
80
|
U.value;
|
|
80
81
|
});
|
|
81
82
|
function W(e) {
|
|
@@ -98,82 +99,88 @@ var E = /*@__PURE__*/ _({
|
|
|
98
99
|
options: n.map((e) => e.option)
|
|
99
100
|
}];
|
|
100
101
|
});
|
|
101
|
-
}), K = f(() => c("SCombobox filtered options", G.value)),
|
|
102
|
-
if (
|
|
103
|
-
let e = o("SCombobox",
|
|
104
|
-
return K.value.optionsByToken.has(e) ?
|
|
105
|
-
}),
|
|
106
|
-
let e =
|
|
102
|
+
}), K = f(() => c("SCombobox filtered options", G.value)), fe = f(() => {
|
|
103
|
+
if (T.modelValue === null) return null;
|
|
104
|
+
let e = o("SCombobox", T.modelValue, "modelValue");
|
|
105
|
+
return K.value.optionsByToken.has(e) ? T.modelValue : null;
|
|
106
|
+
}), pe = f(() => {
|
|
107
|
+
let e = O.bindings()["aria-label"];
|
|
107
108
|
return typeof e == "string" ? i("SCombobox", "aria-label", e) : H.value.label ?? H.value.placeholder;
|
|
108
|
-
}),
|
|
109
|
-
if (!
|
|
109
|
+
}), me = f(() => {
|
|
110
|
+
if (!M.value || F.value === null) return;
|
|
110
111
|
let e = o("SCombobox", F.value, "activeValue");
|
|
111
112
|
if (K.value.optionsByToken.has(e)) return `${B.value}-option-${encodeURIComponent(e)}`;
|
|
112
113
|
});
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}, { flush: "sync" }),
|
|
116
|
-
e ||
|
|
114
|
+
C(V, () => {
|
|
115
|
+
$(), M.value && Q();
|
|
116
|
+
}, { flush: "sync" }), C(N, (e) => {
|
|
117
|
+
e || X("retire");
|
|
118
|
+
}, { flush: "sync" }), C(P, (e) => {
|
|
119
|
+
e === null && X("retire");
|
|
117
120
|
}, { flush: "sync" });
|
|
118
|
-
let { anchorRef: q, panelRef: J, floatingStyle:
|
|
119
|
-
active:
|
|
121
|
+
let { anchorRef: q, panelRef: J, floatingStyle: he } = a({
|
|
122
|
+
active: M,
|
|
120
123
|
placement: () => "bottom-start",
|
|
121
124
|
widthMatch: () => "exact",
|
|
122
125
|
zIndex: () => I.value
|
|
123
126
|
});
|
|
124
|
-
function
|
|
127
|
+
function ge() {
|
|
125
128
|
if (!H.value.allowCustomValue) return null;
|
|
126
129
|
let e = V.value.trim();
|
|
127
130
|
if (e.length === 0) return null;
|
|
128
|
-
if (
|
|
129
|
-
let t = o("SCombobox",
|
|
130
|
-
if (U.value.optionsByToken.get(t)?.option.label.trim() === e || typeof
|
|
131
|
+
if (T.modelValue !== null) {
|
|
132
|
+
let t = o("SCombobox", T.modelValue, "modelValue");
|
|
133
|
+
if (U.value.optionsByToken.get(t)?.option.label.trim() === e || typeof T.modelValue == "string" && T.modelValue === e) return null;
|
|
131
134
|
}
|
|
132
135
|
return e;
|
|
133
136
|
}
|
|
134
|
-
function
|
|
135
|
-
let e =
|
|
136
|
-
return e !== null && (
|
|
137
|
+
function Y() {
|
|
138
|
+
let e = ge();
|
|
139
|
+
return e !== null && (D("update:modelValue", e), D("update:search", String(e)), !0);
|
|
137
140
|
}
|
|
138
|
-
function
|
|
139
|
-
let e =
|
|
141
|
+
function _e() {
|
|
142
|
+
let e = A.value;
|
|
140
143
|
if (!e) throw Error("SCombobox: SInputText API is unavailable");
|
|
141
144
|
return e.getElement();
|
|
142
145
|
}
|
|
143
|
-
function
|
|
144
|
-
R += 1,
|
|
146
|
+
function X(e) {
|
|
147
|
+
R += 1, M.value && ((e === "tab" || e === "outside") && Y(), M.value = !1, F.value = null, L?.unregister({ restoreFocus: !1 }), L = null, I.value = "var(--s-layer-root-floating)");
|
|
145
148
|
}
|
|
146
|
-
async function
|
|
147
|
-
if (U.value, H.value.disabled || H.value.readonly || N.value ||
|
|
148
|
-
let t =
|
|
149
|
-
|
|
149
|
+
async function Z() {
|
|
150
|
+
if (U.value, H.value.disabled || H.value.readonly || M.value || !N.value || P.value === null) return;
|
|
151
|
+
let t = _e(), n = ++R;
|
|
152
|
+
M.value = !0, L = e({
|
|
150
153
|
kind: "listbox",
|
|
151
154
|
root: () => J.value,
|
|
152
155
|
anchor: () => q.value,
|
|
153
156
|
restoreTarget: t,
|
|
154
|
-
requestDismiss: (e) =>
|
|
155
|
-
onRetire: () =>
|
|
156
|
-
}), I.value = L.zIndex, await
|
|
157
|
+
requestDismiss: (e) => X(e === "escape" ? "escape" : "outside"),
|
|
158
|
+
onRetire: () => X("retire")
|
|
159
|
+
}), I.value = L.zIndex, await v(), M.value && N.value && R === n && j.value?.initializeActive();
|
|
157
160
|
}
|
|
158
|
-
|
|
161
|
+
C(J, () => L?.refreshModality(), { flush: "sync" });
|
|
162
|
+
function Q() {
|
|
159
163
|
let e = R;
|
|
160
|
-
|
|
161
|
-
|
|
164
|
+
v(() => {
|
|
165
|
+
M.value && N.value && R === e && j.value?.initializeActive();
|
|
162
166
|
});
|
|
163
167
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
168
|
+
function $() {
|
|
169
|
+
j.value?.resetActive(), F.value = null;
|
|
170
|
+
}
|
|
171
|
+
function ve(e) {
|
|
172
|
+
$(), D("update:search", e), M.value ? Q() : Z();
|
|
166
173
|
}
|
|
167
|
-
function
|
|
174
|
+
function ye(e) {
|
|
168
175
|
if (s(e)) throw TypeError("SCombobox: selection update must be a single key or null");
|
|
169
|
-
if (u("SCombobox update", "single", e, U.value),
|
|
176
|
+
if (u("SCombobox update", "single", e, U.value), D("update:modelValue", e), e !== null) {
|
|
170
177
|
let t = o("SCombobox", e, "selected value"), n = U.value.optionsByToken.get(t);
|
|
171
178
|
if (!n) throw Error("SCombobox: selected option identity is stale");
|
|
172
|
-
|
|
179
|
+
D("update:search", n.option.label);
|
|
173
180
|
}
|
|
174
|
-
|
|
181
|
+
X("selection");
|
|
175
182
|
}
|
|
176
|
-
async function
|
|
183
|
+
async function be(e) {
|
|
177
184
|
let t = {
|
|
178
185
|
ArrowDown: "next",
|
|
179
186
|
ArrowUp: "previous",
|
|
@@ -181,32 +188,32 @@ var E = /*@__PURE__*/ _({
|
|
|
181
188
|
End: "last"
|
|
182
189
|
}[e.key];
|
|
183
190
|
if (t) {
|
|
184
|
-
if (e.preventDefault(),
|
|
185
|
-
|
|
191
|
+
if (e.preventDefault(), M.value && j.value !== null) {
|
|
192
|
+
j.value.moveActive(t);
|
|
186
193
|
return;
|
|
187
194
|
}
|
|
188
|
-
if (await
|
|
189
|
-
|
|
195
|
+
if (await Z(), await v(), !M.value || !N.value || t === "next" || t === "previous") return;
|
|
196
|
+
j.value?.moveActive(t);
|
|
190
197
|
return;
|
|
191
198
|
}
|
|
192
|
-
if (e.key === "Enter" &&
|
|
193
|
-
e.preventDefault(), F.value === null ?
|
|
199
|
+
if (e.key === "Enter" && M.value) {
|
|
200
|
+
e.preventDefault(), F.value === null ? Y() && X("selection") : j.value?.selectActive();
|
|
194
201
|
return;
|
|
195
202
|
}
|
|
196
|
-
if (e.key === "Escape" &&
|
|
197
|
-
e.preventDefault(),
|
|
203
|
+
if (e.key === "Escape" && M.value) {
|
|
204
|
+
e.preventDefault(), X("escape");
|
|
198
205
|
return;
|
|
199
206
|
}
|
|
200
|
-
e.key === "Tab" &&
|
|
207
|
+
e.key === "Tab" && X("tab");
|
|
201
208
|
}
|
|
202
|
-
return
|
|
209
|
+
return ue(() => X("retire")), (e, t) => (y(), m(ae, null, [h("div", {
|
|
203
210
|
ref_key: "anchorRef",
|
|
204
211
|
ref: q,
|
|
205
212
|
class: "s-combobox-anchor"
|
|
206
|
-
}, [g(
|
|
213
|
+
}, [g(ie, ce({
|
|
207
214
|
ref_key: "inputRef",
|
|
208
|
-
ref:
|
|
209
|
-
},
|
|
215
|
+
ref: A
|
|
216
|
+
}, x(O).bindings(), {
|
|
210
217
|
id: z.value,
|
|
211
218
|
"model-value": V.value,
|
|
212
219
|
label: _.label,
|
|
@@ -223,13 +230,13 @@ var E = /*@__PURE__*/ _({
|
|
|
223
230
|
role: "combobox",
|
|
224
231
|
"aria-haspopup": "listbox",
|
|
225
232
|
"aria-autocomplete": "list",
|
|
226
|
-
"aria-expanded":
|
|
233
|
+
"aria-expanded": M.value,
|
|
227
234
|
"aria-controls": B.value,
|
|
228
|
-
"aria-activedescendant":
|
|
229
|
-
"onUpdate:modelValue":
|
|
230
|
-
onFocus:
|
|
231
|
-
onClick:
|
|
232
|
-
onKeydown:
|
|
235
|
+
"aria-activedescendant": me.value,
|
|
236
|
+
"onUpdate:modelValue": ve,
|
|
237
|
+
onFocus: Z,
|
|
238
|
+
onClick: Z,
|
|
239
|
+
onKeydown: be
|
|
233
240
|
}), null, 16, [
|
|
234
241
|
"id",
|
|
235
242
|
"model-value",
|
|
@@ -245,26 +252,29 @@ var E = /*@__PURE__*/ _({
|
|
|
245
252
|
"aria-expanded",
|
|
246
253
|
"aria-controls",
|
|
247
254
|
"aria-activedescendant"
|
|
248
|
-
])], 512), (
|
|
255
|
+
])], 512), x(P) ? (y(), se(oe, {
|
|
256
|
+
key: 0,
|
|
257
|
+
to: x(P)
|
|
258
|
+
}, [M.value && x(N) ? (y(), m("div", {
|
|
249
259
|
key: 0,
|
|
250
260
|
ref_key: "panelRef",
|
|
251
261
|
ref: J,
|
|
252
|
-
style:
|
|
262
|
+
style: le(x(he)),
|
|
253
263
|
class: "s-combobox-layer"
|
|
254
264
|
}, [g(d, {
|
|
255
265
|
ref_key: "listboxRef",
|
|
256
|
-
ref:
|
|
266
|
+
ref: j,
|
|
257
267
|
id: B.value,
|
|
258
|
-
"model-value":
|
|
268
|
+
"model-value": fe.value,
|
|
259
269
|
options: G.value,
|
|
260
|
-
label:
|
|
270
|
+
label: pe.value,
|
|
261
271
|
disabled: _.disabled,
|
|
262
272
|
readonly: _.readonly,
|
|
263
273
|
invalid: _.invalid,
|
|
264
274
|
"empty-label": H.value.emptyLabel,
|
|
265
275
|
"focus-mode": "activedescendant",
|
|
266
276
|
"active-value": F.value,
|
|
267
|
-
"onUpdate:modelValue":
|
|
277
|
+
"onUpdate:modelValue": ye,
|
|
268
278
|
"onUpdate:activeValue": t[0] ||= (e) => F.value = e
|
|
269
279
|
}, null, 8, [
|
|
270
280
|
"id",
|
|
@@ -276,8 +286,8 @@ var E = /*@__PURE__*/ _({
|
|
|
276
286
|
"invalid",
|
|
277
287
|
"empty-label",
|
|
278
288
|
"active-value"
|
|
279
|
-
])], 4)) : p("", !0)]))], 64));
|
|
289
|
+
])], 4)) : p("", !0)], 8, ["to"])) : p("", !0)], 64));
|
|
280
290
|
}
|
|
281
291
|
});
|
|
282
292
|
//#endregion
|
|
283
|
-
export {
|
|
293
|
+
export { w as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../../assets/src/components/shared/controls/SContextMenu.
|
|
1
|
+
import "../../../../assets/src/components/shared/controls/SContextMenu.css_vue_type_style_index_0_src_43b6e378_scoped_43b6e378_lang.css";
|
|
2
2
|
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
import t from "./SContextMenu.vue_vue_type_script_setup_true_lang.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/components/shared/controls/SContextMenu.vue
|
|
6
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
6
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-43b6e378"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as default };
|