@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
@@ -1,23 +1,24 @@
1
1
  import { lastItem as e } from "../../../internal/es2020.js";
2
2
  import { findRelativeTabTarget as t, getFocusableElements as n } from "../../../internal/focusNavigation.js";
3
- import { registerLayer as r } from "../../../internal/layerStack.js";
4
- import { useOverlayAdmission as i } from "../../../internal/overlayHost.js";
5
- import { useFloatingPosition as a } from "../../../composables/useFloatingPosition.js";
6
- import { useUiKitLocale as o } from "../../../composables/useUiKitLocale.js";
7
- import { useOwnedAttrs as s } from "../../../internal/ownedAttrs.js";
8
- import { useInteractiveLeafRegistration as c } from "../../../internal/passiveContentContract.js";
3
+ import { captureLayerFocusAdmission as r, registerLayer as i } from "../../../internal/layerStack.js";
4
+ import { useOverlayAdmission as a } from "../../../internal/overlayHost.js";
5
+ import { useOverlayPortalTarget as o } from "../../../internal/overlayPortal.js";
6
+ import { useFloatingPosition as s } from "../../../composables/useFloatingPosition.js";
7
+ import { useUiKitLocale as c } from "../../../composables/useUiKitLocale.js";
8
+ import { useOwnedAttrs as ee } from "../../../internal/ownedAttrs.js";
9
+ import { useInteractiveLeafRegistration as te } from "../../../internal/passiveContentContract.js";
9
10
  import l from "../controls/SButton.vue.js";
10
- import { resolveInteractiveElement as ee } from "../../../internal/interactiveElement.js";
11
- import { Teleport as u, Transition as te, computed as d, createBlock as ne, createCommentVNode as re, createElementBlock as ie, createElementVNode as ae, createVNode as oe, defineComponent as f, mergeProps as se, nextTick as p, normalizeStyle as ce, onBeforeUnmount as le, onMounted as ue, onUpdated as de, openBlock as m, ref as h, renderSlot as g, shallowRef as fe, unref as _, useId as pe, useSlots as me, watch as v, withCtx as y, withKeys as he } from "vue";
11
+ import { resolveInteractiveElement as ne } from "../../../internal/interactiveElement.js";
12
+ import { Teleport as re, Transition as ie, computed as u, createBlock as ae, createCommentVNode as oe, createElementBlock as se, createElementVNode as ce, createVNode as le, defineComponent as d, mergeProps as ue, nextTick as f, normalizeStyle as de, onBeforeUnmount as fe, onMounted as pe, onUpdated as me, openBlock as p, ref as m, renderSlot as h, shallowRef as he, unref as g, useId as ge, useSlots as _e, watch as _, withCtx as ve, withKeys as ye } from "vue";
12
13
  //#region src/components/shared/containers/SPopover.vue?vue&type=script&setup=true&lang.ts
13
- var ge = { class: "s-popover relative block w-full" }, _e = [
14
+ var be = { class: "s-popover relative block w-full" }, xe = [
14
15
  "hidden",
15
16
  "^inert",
16
17
  "data-placement",
17
18
  "data-surface",
18
19
  "data-width",
19
20
  "aria-label"
20
- ], ve = { class: "s-popover-content" }, ye = "built-in", b = /*@__PURE__*/ f({
21
+ ], Se = { class: "s-popover-content" }, Ce = "built-in", we = /*@__PURE__*/ d({
21
22
  inheritAttrs: !1,
22
23
  __name: "SPopover",
23
24
  props: {
@@ -52,296 +53,317 @@ var ge = { class: "s-popover relative block w-full" }, _e = [
52
53
  }
53
54
  },
54
55
  emits: ["update:open"],
55
- setup(f, { expose: b, emit: be }) {
56
- let x = f, { t: xe } = o(), S = d(() => x.ariaLabel ?? xe("dialog.moreActions")), C = be, w = me(), Se = s({
56
+ setup(d, { expose: we, emit: Te }) {
57
+ let v = d, { t: Ee } = c(), De = u(() => v.ariaLabel ?? Ee("dialog.moreActions")), y = Te, b = _e(), Oe = ee({
57
58
  component: "SPopover",
58
59
  owner: "root wrapper"
59
60
  });
60
- if (w.trigger && w.default) throw Error("SPopover: default slot is reserved for built-in SButton content and cannot be combined with #trigger; move popover content to #panel");
61
- if (!w.panel) throw Error("SPopover: #panel slot is required");
62
- let T = x.open !== void 0, E = i(), D = h(!1), O = h(!1), k = fe(null), A = d(() => E.value && !O.value && (x.open ?? D.value));
63
- c({
61
+ if (b.trigger && b.default) throw Error("SPopover: default slot is reserved for built-in SButton content and cannot be combined with #trigger; move popover content to #panel");
62
+ if (!b.panel) throw Error("SPopover: #panel slot is required");
63
+ let x = v.open !== void 0, S = a(), C = o(), w = m(!1), T = m(!1), E = he(null), D = u(() => S.value && C.value !== null && !T.value && (v.open ?? w.value));
64
+ te({
64
65
  owner: "SPopover",
65
- active: () => A.value
66
+ active: () => D.value
66
67
  });
67
- let j = `s-popover-panel-${pe()}`, M = h(null), N = h("var(--s-layer-root-floating)"), Ce = d(() => x.triggerAriaLabel ?? (x.triggerIconOnly || !x.triggerLabel && !w.default ? S.value : void 0)), P = null, F = null, I = null, L = null, R = 0, z = null, we = d(() => x.align === "left" ? "bottom-start" : x.align === "center" ? "bottom-center" : "bottom-end"), { anchorRef: B, panelRef: V, floatingStyle: Te, resolvedPlacement: Ee, updatePosition: De } = a({
68
- active: A,
69
- placement: () => we.value,
68
+ let O = `s-popover-panel-${ge()}`, k = m(null), A = m("var(--s-layer-root-floating)"), ke = u(() => v.triggerAriaLabel ?? (v.triggerIconOnly || !v.triggerLabel && !b.default ? De.value : void 0)), j = null, M = null, N = null, P = null, F = null, I = 0, L = null, Ae = u(() => v.align === "left" ? "bottom-start" : v.align === "center" ? "bottom-center" : "bottom-end"), { anchorRef: R, panelRef: z, floatingStyle: je, resolvedPlacement: Me, updatePosition: B } = s({
69
+ active: D,
70
+ placement: () => Ae.value,
70
71
  offset: () => 6,
71
72
  boundaryPadding: () => 8,
72
73
  flip: () => !0,
73
74
  shift: () => !0,
74
75
  constrainMainAxis: () => !0,
75
- widthMatch: () => x.width === "trigger" ? "min" : "none",
76
- zIndex: () => N.value,
76
+ widthMatch: () => v.width === "trigger" ? "min" : "none",
77
+ zIndex: () => A.value,
77
78
  scrollStrategy: "reposition"
78
- }), Oe = d(() => !E.value || k.value !== null && k.value === V.value);
79
- function ke() {
80
- let e = V.value;
79
+ });
80
+ _(z, () => j?.refreshModality(), { flush: "sync" });
81
+ let Ne = u(() => !S.value || C.value === null || E.value !== null && E.value === z.value);
82
+ function Pe() {
83
+ let e = z.value;
81
84
  if (!e) return;
82
- k.value = e, e.hidden = !0, e.setAttribute("inert", "");
85
+ E.value = e, e.hidden = !0, e.setAttribute("inert", "");
83
86
  let t = e.ownerDocument.activeElement;
84
87
  t instanceof HTMLElement && e.contains(t) && t.blur();
85
88
  }
86
- class Ae {
89
+ class Fe {
87
90
  constructor(e, t) {
88
91
  this.id = e, this.activation = t, this.target = null, this.binding = {
89
- ref: (e) => Ne(this, e),
92
+ ref: (e) => Re(this, e),
90
93
  get "aria-expanded"() {
91
- return A.value && M.value === e;
94
+ return D.value && k.value === e;
92
95
  },
93
96
  get disclosure() {
94
97
  return {
95
- expanded: A.value && M.value === e,
96
- controls: j,
98
+ expanded: D.value && k.value === e,
99
+ controls: O,
97
100
  iconPlacement: "none"
98
101
  };
99
102
  },
100
103
  "aria-haspopup": "dialog",
101
- "aria-controls": j,
102
- onClick: (e) => He(this, e)
104
+ "aria-controls": O,
105
+ onClick: (e) => Ke(this, e)
103
106
  };
104
107
  }
105
108
  element() {
106
- return Me(this.target, this.id);
109
+ return Le(this.target, this.id);
107
110
  }
108
111
  }
109
- let H = /* @__PURE__ */ new Map();
110
- function je(e) {
112
+ let V = /* @__PURE__ */ new Map();
113
+ function Ie(e) {
111
114
  if (e.length === 0 || e.trim() !== e) throw Error("SPopover: trigger id must be a non-empty string without surrounding whitespace");
112
115
  }
113
- function Me(e, t) {
114
- return ee(`SPopover: trigger "${t}"`, e);
116
+ function Le(e, t) {
117
+ return ne(`SPopover: trigger "${t}"`, e);
115
118
  }
116
- function Ne(e, t) {
119
+ function Re(e, t) {
117
120
  if (t === null) {
118
121
  e.target = null;
119
122
  return;
120
123
  }
121
124
  if (e.target && e.target !== t) throw Error(`SPopover: trigger id "${e.id}" is bound to multiple elements`);
122
- for (let n of H.values()) if (n !== e && n.target === t) throw Error(`SPopover: one trigger element cannot use both "${n.id}" and "${e.id}" ids`);
125
+ for (let n of V.values()) if (n !== e && n.target === t) throw Error(`SPopover: one trigger element cannot use both "${n.id}" and "${e.id}" ids`);
123
126
  e.target = t;
124
127
  }
125
- function Pe(e, t = "toggle") {
126
- je(e);
127
- let n = H.get(e);
128
+ function ze(e, t = "toggle") {
129
+ Ie(e);
130
+ let n = V.get(e);
128
131
  if (n) {
129
132
  if (n.activation !== t) throw Error(`SPopover: trigger "${e}" activation cannot change from "${n.activation}" to "${t}"`);
130
133
  return n.binding;
131
134
  }
132
- let r = new Ae(e, t);
133
- return H.set(e, r), r.binding;
135
+ let r = new Fe(e, t);
136
+ return V.set(e, r), r.binding;
134
137
  }
135
- let Fe = w.trigger ? void 0 : Pe(ye);
136
- function Ie(e) {
138
+ let Be = b.trigger ? void 0 : ze(Ce);
139
+ function Ve(e) {
137
140
  return /* @__PURE__ */ Error(`SPopover: custom trigger "${e}" must apply the complete object returned by bindTrigger()`);
138
141
  }
139
- function U(e) {
142
+ function H(e) {
140
143
  let t = e.element();
141
- if (!t) throw Ie(e.id);
142
- if (w.trigger && !(t instanceof HTMLButtonElement)) throw Error(`SPopover: custom trigger "${e.id}" must bind directly to a button element, not to a wrapper`);
143
- if (t.getAttribute("aria-haspopup") !== "dialog" || t.getAttribute("aria-controls") !== j || t.getAttribute("aria-expanded") !== String(A.value && M.value === e.id)) throw Ie(e.id);
144
+ if (!t) throw Ve(e.id);
145
+ if (b.trigger && !(t instanceof HTMLButtonElement)) throw Error(`SPopover: custom trigger "${e.id}" must bind directly to a button element, not to a wrapper`);
146
+ if (t.getAttribute("aria-haspopup") !== "dialog" || t.getAttribute("aria-controls") !== O || t.getAttribute("aria-expanded") !== String(D.value && k.value === e.id)) throw Ve(e.id);
144
147
  return t;
145
148
  }
146
- function Le() {
147
- if (H.size === 0) throw Error("SPopover: #trigger must apply a binding returned by bindTrigger()");
148
- for (let e of H.values()) U(e);
149
+ function He() {
150
+ if (V.size === 0) throw Error("SPopover: #trigger must apply a binding returned by bindTrigger()");
151
+ for (let e of V.values()) H(e);
149
152
  }
150
- function Re() {
151
- return [...H.values()].filter((e) => e.element()?.isConnected).map((e) => e.id).sort((e, t) => e.localeCompare(t));
153
+ function Ue() {
154
+ return [...V.values()].filter((e) => e.element()?.isConnected).map((e) => e.id).sort((e, t) => e.localeCompare(t));
152
155
  }
153
- function W(e) {
156
+ function U(e) {
154
157
  if (e !== void 0) {
155
- je(e);
156
- let t = H.get(e);
158
+ Ie(e);
159
+ let t = V.get(e);
157
160
  if (!t?.element()?.isConnected) throw Error(`SPopover: programmatic open requires a registered trigger with id "${e}"`);
158
- return U(t), t;
161
+ return H(t), t;
159
162
  }
160
- let t = Re();
163
+ let t = Ue();
161
164
  if (t.length === 0) throw Error("SPopover: programmatic open requires one registered trigger anchor");
162
165
  if (t.length > 1) throw Error(`SPopover: programmatic open is ambiguous; pass one of the registered trigger ids: ${t.map((e) => `"${e}"`).join(", ")}`);
163
166
  let [n] = t;
164
167
  if (!n) throw Error("SPopover: registered trigger inventory is unexpectedly empty");
165
- let r = H.get(n);
168
+ let r = V.get(n);
166
169
  if (!r) throw Error("SPopover: registered trigger invariant failed");
167
- return U(r), r;
170
+ return H(r), r;
168
171
  }
169
- function G(e) {
170
- let t = U(e);
171
- return M.value = e.id, B.value = t, t;
172
+ function W(e) {
173
+ let t = H(e);
174
+ return k.value = e.id, R.value = t, t;
172
175
  }
173
- function K(e) {
174
- return H.get(e.trigger.id) === e.trigger && M.value === e.trigger.id && e.trigger.element() === e.anchor && e.anchor.isConnected;
176
+ function G(e) {
177
+ return V.get(e.trigger.id) === e.trigger && k.value === e.trigger.id && e.trigger.element() === e.anchor && e.anchor.isConnected;
175
178
  }
176
- function q() {
177
- if (O.value) return;
178
- let e = F === null;
179
- O.value = !0, D.value = !1, F = null, Y("outside"), e && C("update:open", !1);
179
+ function K() {
180
+ if (T.value) return;
181
+ let e = M === null;
182
+ T.value = !0, w.value = !1, M = null, Y("outside"), e && y("update:open", !1);
180
183
  }
181
- async function J(e, t = document.activeElement, n) {
182
- let i = ++R;
183
- if (L?.(), L = null, P?.unregister({ restoreFocus: !1 }), P = null, await p(), R !== i || !A.value) return;
184
- if (n && !K(n)) {
185
- q();
186
- return;
187
- }
188
- let a = V.value;
189
- if (!e.isConnected || !a?.isConnected) throw Error("SPopover: open layer requires connected native anchor and panel");
190
- if (P = r({
191
- kind: "popover",
192
- root: () => a,
193
- anchor: () => B.value,
194
- branches: () => [...H.values()].map((e) => e.element()).filter((e) => !!e?.isConnected),
195
- restoreTarget: e,
196
- requestDismiss: (e) => Q(e === "escape" ? "escape" : "outside"),
197
- onRetire: q
198
- }), N.value = P.zIndex, De(), await p(), R !== i || !A.value || !P?.isTopmost()) return;
199
- if (n && !K(n)) {
200
- q();
201
- return;
184
+ async function q(e, t = r(), n) {
185
+ let a = ++I;
186
+ F?.(), F = null, j?.unregister({ restoreFocus: !1 }), j = null, P?.cancel(), P = t;
187
+ try {
188
+ if (z.value?.isConnected || await f(), I !== a || !D.value) return;
189
+ if (n && !G(n)) {
190
+ K();
191
+ return;
192
+ }
193
+ let r = z.value;
194
+ if (!e.isConnected || !r?.isConnected) throw Error("SPopover: open layer requires connected native anchor and panel");
195
+ if (j = i({
196
+ kind: "popover",
197
+ root: () => z.value,
198
+ anchor: () => R.value,
199
+ branches: () => [...V.values()].map((e) => e.element()).filter((e) => !!e?.isConnected),
200
+ restoreTarget: e,
201
+ focusAdmission: t,
202
+ requestDismiss: (e) => Q(e === "escape" ? "escape" : "outside"),
203
+ onRetire: K
204
+ }), A.value = j.zIndex, B(), await f(), I !== a || !D.value || !j?.isTopmost()) return;
205
+ if (n && !G(n)) {
206
+ K();
207
+ return;
208
+ }
209
+ let o = z.value, s = L;
210
+ if (L = null, o !== r || !o.isConnected || s !== o) return;
211
+ j.claimFocus(o);
212
+ } finally {
213
+ t?.cancel(), P === t && (P = null);
202
214
  }
203
- let o = V.value, s = z;
204
- if (z = null, o !== a || !o.isConnected || s !== o) return;
205
- let c = document.activeElement, l = t instanceof HTMLElement && !t.isConnected && c === document.body;
206
- (c === t || l) && o.focus({ preventScroll: !0 });
207
215
  }
208
- function ze() {
209
- if (M.value !== null) {
210
- let e = H.get(M.value);
216
+ function We() {
217
+ if (k.value !== null) {
218
+ let e = V.get(k.value);
211
219
  if (e?.element()?.isConnected) return e;
212
220
  }
213
- return W();
221
+ return U();
214
222
  }
215
- function Be() {
216
- let e = I;
217
- if (I = null, e) {
218
- if (!K(e)) {
219
- q();
223
+ function J() {
224
+ let e = N;
225
+ if (N = null, e) {
226
+ if (!G(e)) {
227
+ e.focusAdmission?.cancel(), K();
220
228
  return;
221
229
  }
222
- G(e.trigger), J(e.anchor, e.focusOrigin, e);
230
+ W(e.trigger), q(e.anchor, e.focusAdmission, e);
223
231
  return;
224
232
  }
225
- J(G(ze()));
233
+ q(W(We()));
226
234
  }
227
- function Ve(e) {
235
+ function Ge(e) {
228
236
  if (!(e instanceof HTMLElement)) throw Error("SPopover: transition enter target must be an HTMLElement");
229
- A.value && e === V.value && e.isConnected && (z = e);
237
+ D.value && e === z.value && e.isConnected && (L = e);
230
238
  }
231
239
  function Y(e) {
232
- R += 1, I = null, z = null, e !== "tab" && (L?.(), L = null);
233
- let t = E.value && (e === "explicit" || e === "escape" || e === "trigger");
234
- P?.unregister({
240
+ I += 1, N?.focusAdmission?.cancel(), N = null, P?.cancel(), P = null, L = null, e !== "tab" && (F?.(), F = null);
241
+ let t = S.value && (e === "explicit" || e === "escape" || e === "trigger");
242
+ j?.unregister({
235
243
  restoreFocus: t,
236
244
  commitFocusHandoff: e === "tab"
237
- }), P = null, N.value = "var(--s-layer-root-floating)";
245
+ }), j = null, A.value = "var(--s-layer-root-floating)";
238
246
  }
239
247
  function X() {
240
- if (x.open !== void 0 !== T) throw Error("SPopover: open control mode cannot change after mount");
248
+ if (v.open !== void 0 !== x) throw Error("SPopover: open control mode cannot change after mount");
241
249
  }
242
- function He(e, t) {
250
+ function Ke(e, t) {
243
251
  if (e.activation === "manual") {
244
- G(e), A.value && p(De);
252
+ W(e), D.value && f(B);
245
253
  return;
246
254
  }
247
- if (A.value && M.value === e.id) {
255
+ if (D.value && k.value === e.id) {
248
256
  Q("trigger");
249
257
  return;
250
258
  }
251
- if (A.value) {
252
- J(G(e));
259
+ if (D.value) {
260
+ q(W(e));
253
261
  return;
254
262
  }
255
263
  Z(e.id);
256
264
  }
257
265
  function Z(e) {
258
- if (E.value && !(O.value && T)) {
259
- if (O.value = !1, !A.value && !x.disabled) {
260
- let t = W(e), n = G(t), r = document.activeElement;
261
- if (T && (I = {
266
+ if (S.value && C.value !== null && !(T.value && x)) {
267
+ if (T.value = !1, !D.value && !v.disabled) {
268
+ let t = U(e), n = W(t), i = r();
269
+ if (N?.focusAdmission?.cancel(), x && (N = {
262
270
  trigger: t,
263
271
  anchor: n,
264
- focusOrigin: r
265
- }), C("update:open", !0), T) return;
266
- D.value = !0, J(n, r);
272
+ focusAdmission: i
273
+ }), y("update:open", !0), x) return;
274
+ w.value = !0, q(n, i);
267
275
  return;
268
276
  }
269
- A.value && e !== void 0 && e !== M.value && J(G(W(e)));
277
+ D.value && e !== void 0 && e !== k.value && q(W(U(e)));
270
278
  }
271
279
  }
272
280
  function Q(e = "explicit") {
273
- let t = A.value, n = I;
274
- if (I = null, !t && n) {
275
- Y(e), C("update:open", !1);
281
+ let t = D.value, n = N;
282
+ if (n?.focusAdmission?.cancel(), N = null, !t && n) {
283
+ Y(e), y("update:open", !1);
276
284
  return;
277
285
  }
278
- if (t && F === null) {
279
- if (F = e, C("update:open", !1), T) return;
280
- D.value = !1, Y(e), F = null;
286
+ if (t && M === null) {
287
+ if (M = e, y("update:open", !1), x) return;
288
+ w.value = !1, Y(e), M = null;
281
289
  }
282
290
  }
283
291
  function $() {
284
292
  Q("explicit");
285
293
  }
286
- function Ue(r) {
287
- let i = V.value, a = B.value;
294
+ function qe(r) {
295
+ let i = z.value, a = R.value;
288
296
  if (!i || !a) return;
289
- let o = n(i), s = document.activeElement, c = o[0], l = e(o);
290
- if (!(o.length === 0 || (r.shiftKey ? s === i || s === c : s === l))) return;
291
- let ee = P?.focusScope() ?? document, u = t(a, ee, i, r.shiftKey);
292
- r.preventDefault(), L?.(), L = u && P ? P.handoffFocus(u) : null, Q("tab");
297
+ let o = n(i), s = document.activeElement, c = o[0], ee = e(o);
298
+ if (!(o.length === 0 || (r.shiftKey ? s === i || s === c : s === ee))) return;
299
+ let te = j?.focusScope() ?? document, l = t(a, te, i, r.shiftKey);
300
+ r.preventDefault(), F?.(), F = l && j ? j.handoffFocus(l) : null, Q("tab");
293
301
  }
294
- function We(e) {
295
- if (!A.value) return;
302
+ function Je(e) {
303
+ if (!D.value) return;
296
304
  let t = e.relatedTarget;
297
- t instanceof Node && (V.value?.contains(t) || [...H.values()].some((e) => e.element()?.contains(t))) || Q("outside");
305
+ if (t instanceof Node) {
306
+ if (j?.containsFocusTarget(t)) return;
307
+ Q("outside");
308
+ return;
309
+ }
310
+ let n = j, r = z.value, i = I, a = e.composedPath().find((e) => e instanceof Element), o = a instanceof Element ? n?.captureOwnedFocusLoss(a) : null;
311
+ queueMicrotask(() => {
312
+ if (!D.value || M !== null || I !== i || j !== n || z.value !== r || !r?.isConnected) return;
313
+ let e = document.activeElement;
314
+ e && n?.containsFocusTarget(e) || o?.isCurrentUnavailable() || Q("outside");
315
+ });
298
316
  }
299
- return ue(() => {
300
- Le(), A.value && Be();
301
- }), de(() => {
317
+ return pe(() => {
318
+ He(), D.value && J();
319
+ }), me(() => {
302
320
  X();
303
- }), v(() => x.open, (e) => {
304
- e === !1 && (X(), O.value = !1, Y(F ?? "explicit"), F = null);
305
- }, { flush: "pre" }), v(() => x.open, (e) => {
306
- if (X(), e && !E.value) {
307
- q();
321
+ }), _(() => v.open, (e) => {
322
+ e === !1 && (X(), T.value = !1, Y(M ?? "explicit"), M = null);
323
+ }, { flush: "pre" }), _(() => v.open, (e) => {
324
+ if (X(), e && !S.value) {
325
+ K();
308
326
  return;
309
327
  }
310
- O.value || e && Be();
311
- }, { flush: "post" }), v(E, (e) => {
312
- e || (ke(), (x.open === !0 || D.value || I || P) && q());
328
+ T.value || e && C.value !== null && J();
329
+ }, { flush: "post" }), _(S, (e) => {
330
+ e || (Pe(), (v.open === !0 || w.value || N || j) && K());
313
331
  }, {
314
332
  flush: "sync",
315
333
  immediate: !0
316
- }), le(() => {
317
- R += 1, I = null, z = null, L?.(), P?.unregister({ restoreFocus: !1 }), P = null;
318
- }), b({
334
+ }), _(C, (e, t) => {
335
+ e === null && t !== null && (Pe(), (v.open === !0 || w.value || N || j) && K());
336
+ }, { flush: "sync" }), _(C, (e, t) => {
337
+ e !== null && D.value && (t === null ? J() : (j?.refreshModality(), B()));
338
+ }, { flush: "post" }), fe(() => {
339
+ I += 1, N?.focusAdmission?.cancel(), N = null, P?.cancel(), P = null, L = null, F?.(), j?.unregister({ restoreFocus: !1 }), j = null;
340
+ }), we({
319
341
  open: Z,
320
342
  close: $
321
- }), (e, t) => (m(), ie("div", se(_(Se).bindings(), { class: "s-popover-wrapper" }), [ae("div", ge, [e.$slots.trigger ? g(e.$slots, "trigger", {
322
- bindTrigger: Pe,
343
+ }), (e, t) => (p(), se("div", ue(g(Oe).bindings(), { class: "s-popover-wrapper" }), [ce("div", be, [e.$slots.trigger ? h(e.$slots, "trigger", {
344
+ bindTrigger: ze,
323
345
  open: Z,
324
346
  close: $,
325
- isOpen: A.value
326
- }, void 0, !0, 0) : (m(), ne(l, se({ key: 1 }, _(Fe), {
347
+ isOpen: D.value
348
+ }, void 0, !0, 0) : (p(), ae(l, ue({ key: 1 }, g(Be), {
327
349
  "data-s-popover-trigger": "",
328
- label: f.triggerLabel,
329
- "leading-icon": f.triggerLeadingIcon,
330
- "trailing-icon": f.triggerTrailingIcon,
331
- "icon-only": f.triggerIconOnly,
332
- appearance: f.triggerAppearance,
333
- size: f.triggerSize,
334
- width: f.triggerWidth,
335
- "content-align": f.triggerContentAlign,
336
- shape: f.triggerShape,
337
- severity: f.triggerSeverity,
338
- badge: f.triggerBadge,
339
- disabled: f.disabled,
340
- title: f.triggerTitle,
341
- "aria-label": Ce.value,
342
- "data-testid": f.triggerTestId
350
+ label: d.triggerLabel,
351
+ "leading-icon": d.triggerLeadingIcon,
352
+ "trailing-icon": d.triggerTrailingIcon,
353
+ "icon-only": d.triggerIconOnly,
354
+ appearance: d.triggerAppearance,
355
+ size: d.triggerSize,
356
+ width: d.triggerWidth,
357
+ "content-align": d.triggerContentAlign,
358
+ shape: d.triggerShape,
359
+ severity: d.triggerSeverity,
360
+ badge: d.triggerBadge,
361
+ disabled: d.disabled,
362
+ title: d.triggerTitle,
363
+ "aria-label": ke.value,
364
+ "data-testid": d.triggerTestId
343
365
  }), {
344
- default: y(() => [g(e.$slots, "default", { isOpen: A.value }, void 0, !0)]),
366
+ default: ve(() => [h(e.$slots, "default", { isOpen: D.value }, void 0, !0)]),
345
367
  _: 3
346
368
  }, 16, [
347
369
  "label",
@@ -359,37 +381,40 @@ var ge = { class: "s-popover relative block w-full" }, _e = [
359
381
  "title",
360
382
  "aria-label",
361
383
  "data-testid"
362
- ])), oe(te, {
363
- css: _(E),
364
- "enter-active-class": "transition duration-[var(--s-motion-standard)] ease-out",
365
- "enter-from-class": "translate-y-1 opacity-0",
366
- "enter-to-class": "translate-y-0 opacity-100",
367
- "leave-active-class": "pointer-events-none transition duration-[var(--s-motion-fast)] ease-in",
368
- "leave-from-class": "translate-y-0 opacity-100",
369
- "leave-to-class": "translate-y-1 opacity-0",
370
- onEnter: Ve
384
+ ])), le(ie, {
385
+ css: g(S),
386
+ "enter-active-class": "transition-transform duration-[var(--s-motion-standard)] ease-out",
387
+ "enter-from-class": "translate-y-1",
388
+ "enter-to-class": "translate-y-0",
389
+ "leave-active-class": "pointer-events-none transition-transform duration-[var(--s-motion-fast)] ease-in",
390
+ "leave-from-class": "translate-y-0",
391
+ "leave-to-class": "translate-y-1",
392
+ onEnter: Ge
371
393
  }, {
372
- default: y(() => [(m(), ne(u, { to: "body" }, [A.value ? (m(), ie("div", {
394
+ default: ve(() => [g(C) ? (p(), ae(re, {
395
+ key: 0,
396
+ to: g(C)
397
+ }, [D.value ? (p(), se("div", {
373
398
  key: 0,
374
399
  ref_key: "panelRef",
375
- ref: V,
376
- hidden: Oe.value,
377
- "^inert": Oe.value ? !0 : void 0,
400
+ ref: z,
401
+ hidden: Ne.value,
402
+ "^inert": Ne.value ? !0 : void 0,
378
403
  class: "s-popover-panel",
379
- style: ce(_(Te)),
380
- "data-placement": _(Ee),
381
- "data-surface": f.surface,
382
- "data-width": f.width,
404
+ style: de(g(je)),
405
+ "data-placement": g(Me),
406
+ "data-surface": d.surface,
407
+ "data-width": d.width,
383
408
  tabindex: "-1",
384
409
  role: "dialog",
385
- id: j,
386
- "aria-label": S.value,
387
- onKeydown: he(Ue, ["tab"]),
388
- onFocusout: We
389
- }, [ae("div", ve, [g(e.$slots, "panel", { close: $ }, void 0, !0)])], 44, _e)) : re("", !0)]))]),
410
+ id: O,
411
+ "aria-label": De.value,
412
+ onKeydown: ye(qe, ["tab"]),
413
+ onFocusout: Je
414
+ }, [ce("div", Se, [h(e.$slots, "panel", { close: $ }, void 0, !0)])], 44, xe)) : oe("", !0)], 8, ["to"])) : oe("", !0)]),
390
415
  _: 3
391
416
  }, 8, ["css"])])], 16));
392
417
  }
393
418
  });
394
419
  //#endregion
395
- export { b as default };
420
+ export { we as default };
@@ -1,8 +1,8 @@
1
- import "../../../../assets/src/components/shared/containers/SSidebarSection.css_vue_type_style_index_0_src_21f71ae8_scoped_21f71ae8_lang.css";
1
+ import "../../../../assets/src/components/shared/containers/SSidebarSection.css_vue_type_style_index_0_src_52396e42_scoped_52396e42_lang.css";
2
2
  import e from "../../../../_virtual/_plugin-vue_export-helper.js";
3
3
  import t from "./SSidebarSection.vue_vue_type_script_setup_true_lang.js";
4
4
  /* empty css */
5
5
  //#region src/components/shared/containers/SSidebarSection.vue
6
- var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-21f71ae8"]]);
6
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-52396e42"]]);
7
7
  //#endregion
8
8
  export { n as default };
@@ -103,10 +103,11 @@ var E = { class: "s-sidebar-section" }, D = { class: "s-sidebar-section-trigger"
103
103
  let [t, n] = Z();
104
104
  I.resizeSections(t.key, n.key, e);
105
105
  }
106
- function ne() {
106
+ function ne(e, t) {
107
+ if (t === void 0) return;
107
108
  if (B === null) throw Error("SSidebarSection: resize completion has no active section pair");
108
- let e = B;
109
- B = null, I.finishResize(e[0], e[1]);
109
+ let n = B;
110
+ B = null, I.finishResize(n[0], n[1]);
110
111
  }
111
112
  function $() {
112
113
  let e = B;
@@ -1,8 +1,8 @@
1
- import "../../../../assets/src/components/shared/controls/SCheckbox.css_vue_type_style_index_0_src_55d4826e_scoped_55d4826e_lang.css";
1
+ import "../../../../assets/src/components/shared/controls/SCheckbox.css_vue_type_style_index_0_src_2562f916_scoped_2562f916_lang.css";
2
2
  import e from "../../../../_virtual/_plugin-vue_export-helper.js";
3
3
  import t from "./SCheckbox.vue_vue_type_script_setup_true_lang.js";
4
4
  /* empty css */
5
5
  //#region src/components/shared/controls/SCheckbox.vue
6
- var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-55d4826e"]]);
6
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-2562f916"]]);
7
7
  //#endregion
8
8
  export { n as default };