@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.
Files changed (117) hide show
  1. package/README.md +330 -12
  2. 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
  3. package/dist/assets/src/components/shared/_internal/SDialogSurface.css_vue_type_style_index_0_src_a108e8f1_scoped_a108e8f1_lang.css +2 -0
  4. 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
  5. 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
  6. 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
  7. package/dist/assets/src/components/shared/containers/SSidebarSection.css_vue_type_style_index_0_src_52396e42_scoped_52396e42_lang.css +2 -0
  8. package/dist/assets/src/components/shared/controls/SButton.css_vue_type_style_index_0_src_7a5acda9_scoped_7a5acda9_lang.css +1 -1
  9. package/dist/assets/src/components/shared/controls/SCheckbox.css_vue_type_style_index_0_src_2562f916_scoped_2562f916_lang.css +2 -0
  10. package/dist/assets/src/components/shared/controls/SCombobox.css_vue_type_style_index_0_src_d630c922_scoped_d630c922_lang.css +2 -0
  11. package/dist/assets/src/components/shared/controls/SContextMenu.css_vue_type_style_index_0_src_43b6e378_scoped_43b6e378_lang.css +1 -0
  12. 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
  13. 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
  14. package/dist/assets/src/components/shared/controls/SSelect.css_vue_type_style_index_0_src_d1ead6c0_scoped_d1ead6c0_lang.css +2 -0
  15. package/dist/assets/src/components/shared/data-display/SControlledToastViewport.css_vue_type_style_index_0_src_a69aa84b_scoped_a69aa84b_lang.css +2 -0
  16. package/dist/assets/src/components/shared/data-display/SScrollViewport.css_vue_type_style_index_0_src_d94fcf8c_scoped_d94fcf8c_lang.css +2 -0
  17. package/dist/assets/src/components/shared/data-display/STooltip.css_vue_type_style_index_0_src_true_lang.css +1 -1
  18. package/dist/assets/src/components/shared/data-display/_internal/STableFrame.css_vue_type_style_index_0_src_914bad28_scoped_914bad28_lang.css +2 -0
  19. 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
  20. package/dist/src/components/layout/SResizeHandle.vue.js +2 -2
  21. package/dist/src/components/layout/SResizeHandle.vue_vue_type_script_setup_true_lang.js +4 -2
  22. package/dist/src/components/shared/_internal/SDialogSurface.vue.d.ts +9 -1
  23. package/dist/src/components/shared/_internal/SDialogSurface.vue.js +2 -2
  24. package/dist/src/components/shared/_internal/SDialogSurface.vue_vue_type_script_setup_true_lang.js +174 -82
  25. package/dist/src/components/shared/_internal/dialogSurface.d.ts +2 -0
  26. package/dist/src/components/shared/_internal/dialogSurface.js +30 -27
  27. package/dist/src/components/shared/_internal/dialogSurfaceMotion.d.ts +14 -0
  28. package/dist/src/components/shared/_internal/dialogSurfaceMotion.js +84 -0
  29. package/dist/src/components/shared/_internal/focusTrap.js +15 -13
  30. package/dist/src/components/shared/containers/SCollapsiblePanel.vue.d.ts +5 -0
  31. package/dist/src/components/shared/containers/SCollapsiblePanel.vue.js +2 -2
  32. package/dist/src/components/shared/containers/SCollapsiblePanel.vue_vue_type_script_setup_true_lang.js +123 -121
  33. package/dist/src/components/shared/containers/SDrawer.vue.d.ts +4 -4
  34. package/dist/src/components/shared/containers/SDrawer.vue.js +3 -6
  35. package/dist/src/components/shared/containers/SDrawer.vue_vue_type_script_setup_true_lang.js +104 -128
  36. package/dist/src/components/shared/containers/SModal.vue.d.ts +8 -8
  37. package/dist/src/components/shared/containers/SModal.vue.js +3 -6
  38. package/dist/src/components/shared/containers/SModal.vue_vue_type_script_setup_true_lang.js +87 -103
  39. package/dist/src/components/shared/containers/SOverlayHost.vue.js +2 -2
  40. package/dist/src/components/shared/containers/SOverlayHost.vue_vue_type_script_setup_true_lang.js +32 -31
  41. package/dist/src/components/shared/containers/SPanel.vue.d.ts +1 -1
  42. package/dist/src/components/shared/containers/SPopover.vue.js +2 -2
  43. package/dist/src/components/shared/containers/SPopover.vue_vue_type_script_setup_true_lang.js +225 -200
  44. package/dist/src/components/shared/containers/SSidebarSection.vue.js +2 -2
  45. package/dist/src/components/shared/containers/SSidebarSection.vue_vue_type_script_setup_true_lang.js +4 -3
  46. package/dist/src/components/shared/controls/SCheckbox.vue.js +2 -2
  47. package/dist/src/components/shared/controls/SCheckbox.vue_vue_type_script_setup_true_lang.js +13 -7
  48. package/dist/src/components/shared/controls/SCombobox.vue.js +2 -2
  49. package/dist/src/components/shared/controls/SCombobox.vue_vue_type_script_setup_true_lang.js +104 -94
  50. package/dist/src/components/shared/controls/SContextMenu.vue.js +2 -2
  51. package/dist/src/components/shared/controls/SContextMenu.vue_vue_type_script_setup_true_lang.js +86 -81
  52. package/dist/src/components/shared/controls/SDropdownMenu.vue.js +2 -2
  53. package/dist/src/components/shared/controls/SDropdownMenu.vue_vue_type_script_setup_true_lang.js +77 -72
  54. package/dist/src/components/shared/controls/SMenuSurface.vue.js +2 -2
  55. package/dist/src/components/shared/controls/SMenuSurface.vue_vue_type_script_setup_true_lang.js +81 -77
  56. package/dist/src/components/shared/controls/SSelect.vue.js +2 -2
  57. package/dist/src/components/shared/controls/SSelect.vue_vue_type_script_setup_true_lang.js +85 -77
  58. package/dist/src/components/shared/data-display/SControlledToastViewport.vue.js +2 -2
  59. package/dist/src/components/shared/data-display/SControlledToastViewport.vue_vue_type_script_setup_true_lang.js +58 -49
  60. package/dist/src/components/shared/data-display/SScrollViewport.vue.d.ts +10 -5
  61. package/dist/src/components/shared/data-display/SScrollViewport.vue.js +2 -2
  62. package/dist/src/components/shared/data-display/SScrollViewport.vue_vue_type_script_setup_true_lang.js +162 -111
  63. package/dist/src/components/shared/data-display/STooltip.vue_vue_type_script_setup_true_lang.js +276 -224
  64. package/dist/src/components/shared/data-display/_internal/STableFrame.vue.d.ts +3 -3
  65. package/dist/src/components/shared/data-display/_internal/STableFrame.vue.js +2 -2
  66. package/dist/src/components/shared/data-display/_internal/STableFrame.vue_vue_type_script_setup_true_lang.js +62 -46
  67. package/dist/src/components/shared/data-display/scrollViewport.d.ts +2 -0
  68. package/dist/src/components/shared/navigation/SBottomNav.vue.js +2 -2
  69. package/dist/src/components/shared/navigation/SBottomNav.vue_vue_type_script_setup_true_lang.js +3 -1
  70. package/dist/src/components/shared/navigation/STabList.vue.d.ts +1 -1
  71. package/dist/src/composables/useDialogOverlay.d.ts +12 -2
  72. package/dist/src/composables/useDialogOverlay.js +192 -119
  73. package/dist/src/internal/flatTree.d.ts +8 -0
  74. package/dist/src/internal/flatTree.js +23 -0
  75. package/dist/src/internal/focusNavigation.d.ts +3 -0
  76. package/dist/src/internal/focusNavigation.js +28 -15
  77. package/dist/src/internal/inertLease.d.ts +8 -0
  78. package/dist/src/internal/inertLease.js +33 -0
  79. package/dist/src/internal/layerStack.d.ts +40 -0
  80. package/dist/src/internal/layerStack.js +301 -94
  81. package/dist/src/internal/nativeFocus.d.ts +4 -0
  82. package/dist/src/internal/nativeFocus.js +12 -0
  83. package/dist/src/internal/overlayPortal.d.ts +17 -0
  84. package/dist/src/internal/overlayPortal.js +23 -0
  85. package/dist/src/internal/semanticSizing.d.ts +2 -2
  86. package/dist/src/internal/semanticSizing.js +2 -1
  87. package/dist/src/internal/useMenuLayer.d.ts +1 -0
  88. package/dist/src/internal/useMenuLayer.js +63 -57
  89. package/dist/src/internal/viewportModality.d.ts +27 -0
  90. package/dist/src/internal/viewportModality.js +132 -0
  91. package/dist/typography.js +17 -62
  92. package/docs/overlay-lifecycle.md +195 -0
  93. package/docs/public-api.md +141 -4
  94. package/docs/resize.md +34 -5
  95. package/docs/scroll-viewport.md +30 -10
  96. package/docs/theming.md +42 -8
  97. package/package.json +1 -1
  98. package/src/components/shared/_internal/SDialogSurface.css +185 -40
  99. package/src/components/shared/controls/SButton.css +0 -3
  100. package/src/components/shared/controls/SCheckbox.css +19 -7
  101. package/src/components/shared/data-display/SControlledToastViewport.css +2 -10
  102. package/src/components/shared/data-display/SScrollViewport.css +17 -1
  103. package/src/components/shared/data-display/STooltip.css +1 -1
  104. package/src/components/shared/data-display/_internal/STableFrame.css +1 -5
  105. package/dist/assets/src/components/shared/_internal/SDialogSurface.css_vue_type_style_index_0_src_0e58afdc_scoped_0e58afdc_lang.css +0 -2
  106. package/dist/assets/src/components/shared/containers/SDrawer.css_vue_type_style_index_0_src_61cf20dd_scoped_61cf20dd_lang.css +0 -2
  107. package/dist/assets/src/components/shared/containers/SModal.css_vue_type_style_index_0_src_42e1bd5f_scoped_42e1bd5f_lang.css +0 -2
  108. package/dist/assets/src/components/shared/containers/SSidebarSection.css_vue_type_style_index_0_src_21f71ae8_scoped_21f71ae8_lang.css +0 -2
  109. package/dist/assets/src/components/shared/controls/SCheckbox.css_vue_type_style_index_0_src_55d4826e_scoped_55d4826e_lang.css +0 -2
  110. package/dist/assets/src/components/shared/controls/SCombobox.css_vue_type_style_index_0_src_537f5744_scoped_537f5744_lang.css +0 -2
  111. package/dist/assets/src/components/shared/controls/SContextMenu.css_vue_type_style_index_0_src_03921269_scoped_03921269_lang.css +0 -1
  112. package/dist/assets/src/components/shared/controls/SSelect.css_vue_type_style_index_0_src_df3d6688_scoped_df3d6688_lang.css +0 -2
  113. package/dist/assets/src/components/shared/data-display/SControlledToastViewport.css_vue_type_style_index_0_src_5864b6c6_scoped_5864b6c6_lang.css +0 -2
  114. package/dist/assets/src/components/shared/data-display/SScrollViewport.css_vue_type_style_index_0_src_e5d11342_scoped_e5d11342_lang.css +0 -2
  115. package/dist/assets/src/components/shared/data-display/_internal/STableFrame.css_vue_type_style_index_0_src_52b5825e_scoped_52b5825e_lang.css +0 -2
  116. package/src/components/shared/containers/SDrawer.css +0 -87
  117. package/src/components/shared/containers/SModal.css +0 -27
@@ -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 = { class: "s-checkbox-control" }, y = [
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 = { class: "s-checkbox-box" }, x = /*@__PURE__*/ d({
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", v, [u("input", f({ ref: h(A) }, h(w).bindings(), {
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(d.indeterminate ? h(t) : h(e)), {
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": d.indeterminate ? "minus" : "check",
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.css_vue_type_style_index_0_src_537f5744_scoped_537f5744_lang.css";
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-537f5744"]]);
6
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-d630c922"]]);
7
7
  //#endregion
8
8
  export { n as default };
@@ -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 { useFloatingPosition as te } from "../../../composables/useFloatingPosition.js";
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 a } from "../../../internal/ownedAttrs.js";
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 re from "./SInputText.vue.js";
11
- import { Fragment as ie, Teleport as ae, computed as f, createBlock as oe, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, mergeProps as v, nextTick as y, normalizeStyle as se, onBeforeUnmount as ce, openBlock as b, shallowRef as x, unref as S, useId as C, watch as w, watchEffect as T } from "vue";
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 E = /*@__PURE__*/ _({
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: E }) {
51
- let D = _, { t: O } = ne(), k = E, A = a({
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
- }), le = C(), j = x(null), M = x(null), N = x(!1), P = t(), F = x(null), I = x("var(--s-layer-root-floating)"), L = null, R = 0, z = f(() => D.id === void 0 ? `s-combobox-${le}` : ee("SCombobox", "id", D.id)), B = f(() => `${z.value}-listbox`), V = f(() => {
55
- if (typeof D.search != "string") throw TypeError("SCombobox: search must be a string");
56
- return D.search;
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", D.filterMode, ["local", "manual"]),
59
- placeholder: i("SCombobox", "placeholder", D.placeholder ?? O("forms.searchPlaceholder")),
60
- disabled: n("SCombobox", "disabled", D.disabled),
61
- readonly: n("SCombobox", "readonly", D.readonly),
62
- required: n("SCombobox", "required", D.required),
63
- invalid: n("SCombobox", "invalid", D.invalid),
64
- emptyLabel: i("SCombobox", "emptyLabel", D.emptyLabel ?? O("forms.noOptions")),
65
- size: r("SCombobox", "size", D.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", D.allowCustomValue),
71
- label: l("SCombobox", "label", D.label),
72
- helpText: l("SCombobox", "helpText", D.helpText),
73
- errorMessage: l("SCombobox", "errorMessage", D.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", D.options);
76
- return H.value.allowCustomValue && typeof D.modelValue == "string" ? o("SCombobox", D.modelValue, "modelValue") : u("SCombobox", "single", D.modelValue, e), e;
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
- T(() => {
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)), ue = f(() => {
102
- if (D.modelValue === null) return null;
103
- let e = o("SCombobox", D.modelValue, "modelValue");
104
- return K.value.optionsByToken.has(e) ? D.modelValue : null;
105
- }), de = f(() => {
106
- let e = A.bindings()["aria-label"];
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
- }), fe = f(() => {
109
- if (!N.value || F.value === null) return;
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
- w(V, () => {
114
- F.value = null, N.value && $();
115
- }, { flush: "sync" }), w(P, (e) => {
116
- e || Z("retire");
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: pe } = te({
119
- active: N,
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 Y() {
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 (D.modelValue !== null) {
129
- let t = o("SCombobox", D.modelValue, "modelValue");
130
- if (U.value.optionsByToken.get(t)?.option.label.trim() === e || typeof D.modelValue == "string" && D.modelValue === e) return null;
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 X() {
135
- let e = Y();
136
- return e !== null && (k("update:modelValue", e), k("update:search", String(e)), !0);
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 me() {
139
- let e = j.value;
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 Z(e) {
144
- R += 1, N.value && ((e === "tab" || e === "outside") && X(), N.value = !1, F.value = null, L?.unregister({ restoreFocus: !1 }), L = null, I.value = "var(--s-layer-root-floating)");
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 Q() {
147
- if (U.value, H.value.disabled || H.value.readonly || N.value || !P.value) return;
148
- let t = me(), n = ++R;
149
- N.value = !0, L = e({
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) => Z(e === "escape" ? "escape" : "outside"),
155
- onRetire: () => Z("retire")
156
- }), I.value = L.zIndex, await y(), N.value && P.value && R === n && M.value?.initializeActive();
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
- function $() {
161
+ C(J, () => L?.refreshModality(), { flush: "sync" });
162
+ function Q() {
159
163
  let e = R;
160
- y(() => {
161
- N.value && P.value && R === e && M.value?.initializeActive();
164
+ v(() => {
165
+ M.value && N.value && R === e && j.value?.initializeActive();
162
166
  });
163
167
  }
164
- function he(e) {
165
- k("update:search", e), F.value = null, N.value ? $() : Q();
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 ge(e) {
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), k("update:modelValue", e), e !== null) {
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
- k("update:search", n.option.label);
179
+ D("update:search", n.option.label);
173
180
  }
174
- Z("selection");
181
+ X("selection");
175
182
  }
176
- async function _e(e) {
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(), N.value && M.value !== null) {
185
- M.value.moveActive(t);
191
+ if (e.preventDefault(), M.value && j.value !== null) {
192
+ j.value.moveActive(t);
186
193
  return;
187
194
  }
188
- if (await Q(), await y(), !N.value || !P.value || t === "next" || t === "previous") return;
189
- M.value?.moveActive(t);
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" && N.value) {
193
- e.preventDefault(), F.value === null ? X() && Z("selection") : M.value?.selectActive();
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" && N.value) {
197
- e.preventDefault(), Z("escape");
203
+ if (e.key === "Escape" && M.value) {
204
+ e.preventDefault(), X("escape");
198
205
  return;
199
206
  }
200
- e.key === "Tab" && Z("tab");
207
+ e.key === "Tab" && X("tab");
201
208
  }
202
- return ce(() => Z("retire")), (e, t) => (b(), m(ie, null, [h("div", {
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(re, v({
213
+ }, [g(ie, ce({
207
214
  ref_key: "inputRef",
208
- ref: j
209
- }, S(A).bindings(), {
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": N.value,
233
+ "aria-expanded": M.value,
227
234
  "aria-controls": B.value,
228
- "aria-activedescendant": fe.value,
229
- "onUpdate:modelValue": he,
230
- onFocus: Q,
231
- onClick: Q,
232
- onKeydown: _e
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), (b(), oe(ae, { to: "body" }, [N.value && S(P) ? (b(), m("div", {
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: se(S(pe)),
262
+ style: le(x(he)),
253
263
  class: "s-combobox-layer"
254
264
  }, [g(d, {
255
265
  ref_key: "listboxRef",
256
- ref: M,
266
+ ref: j,
257
267
  id: B.value,
258
- "model-value": ue.value,
268
+ "model-value": fe.value,
259
269
  options: G.value,
260
- label: de.value,
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": ge,
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 { E as default };
293
+ export { w as default };
@@ -1,8 +1,8 @@
1
- import "../../../../assets/src/components/shared/controls/SContextMenu.css_vue_type_style_index_0_src_03921269_scoped_03921269_lang.css";
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-03921269"]]);
6
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-43b6e378"]]);
7
7
  //#endregion
8
8
  export { n as default };