@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/containers/SDrawer.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import { Teleport as u,
|
|
1
|
+
import { assertDialogSurfacePresentation as e, validateDialogSurfaceHeadingLevel as t, validateDrawerExtent as n } from "../_internal/dialogSurface.js";
|
|
2
|
+
import { useOverlayHost as r } from "../../../internal/overlayHost.js";
|
|
3
|
+
import { validateBoolean as i, validateExactString as a } from "../../../internal/runtimeContract.js";
|
|
4
|
+
import { useDialogOverlay as o } from "../../../composables/useDialogOverlay.js";
|
|
5
|
+
import { useUiKitLocale as s } from "../../../composables/useUiKitLocale.js";
|
|
6
|
+
import { useOwnedAttrs as c } from "../../../internal/ownedAttrs.js";
|
|
7
|
+
import l from "../_internal/SDialogSurface.vue.js";
|
|
8
|
+
import { Teleport as u, computed as d, createBlock as f, createCommentVNode as p, createSlots as m, createVNode as h, defineComponent as g, mergeProps as _, onErrorCaptured as v, openBlock as y, renderSlot as b, unref as x, watch as S, withCtx as C } from "vue";
|
|
9
9
|
//#region src/components/shared/containers/SDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var
|
|
10
|
+
var w = /*@__PURE__*/ g({
|
|
11
11
|
inheritAttrs: !1,
|
|
12
12
|
__name: "SDrawer",
|
|
13
13
|
props: {
|
|
@@ -30,174 +30,150 @@ var re = ["data-scope"], ie = ["data-scope", "data-placement"], D = ["data-place
|
|
|
30
30
|
scrollBehavior: { default: "body" }
|
|
31
31
|
},
|
|
32
32
|
emits: ["update:open", "opened"],
|
|
33
|
-
setup(
|
|
34
|
-
let
|
|
33
|
+
setup(g, { emit: w }) {
|
|
34
|
+
let T = g, { t: E } = s(), D = w, O = c({
|
|
35
35
|
component: "SDrawer",
|
|
36
36
|
owner: "drawer dialog surface"
|
|
37
|
-
}),
|
|
37
|
+
}), k = r("SDrawer", !1), A = {
|
|
38
38
|
sm: 50,
|
|
39
39
|
md: 70,
|
|
40
40
|
lg: 90
|
|
41
|
-
},
|
|
42
|
-
let e =
|
|
43
|
-
if (
|
|
41
|
+
}, j = a("SDrawer", "scope", T.scope, ["viewport", "contained"]), M = d(() => {
|
|
42
|
+
let e = a("SDrawer", "scope", T.scope, ["viewport", "contained"]);
|
|
43
|
+
if (T.open && e !== j) throw TypeError("SDrawer: scope may change only while open=false");
|
|
44
44
|
return e;
|
|
45
|
-
}),
|
|
45
|
+
}), N = d(() => a("SDrawer", "scrollBehavior", T.scrollBehavior, ["body", "content"])), P = d(() => T.ariaLabel ?? E("dialog.drawer")), F = d(() => t("SDrawer", T.headingLevel)), I = d(() => a("SDrawer", "placement", T.placement, [
|
|
46
46
|
"left",
|
|
47
47
|
"right",
|
|
48
48
|
"bottom"
|
|
49
|
-
])),
|
|
49
|
+
])), L = d(() => a("SDrawer", "size", T.size, [
|
|
50
50
|
"sm",
|
|
51
51
|
"md",
|
|
52
52
|
"lg"
|
|
53
|
-
])),
|
|
54
|
-
if (
|
|
55
|
-
if (
|
|
53
|
+
])), R = d(() => i("SDrawer", "open", T.open)), z = d(() => i("SDrawer", "closable", T.closable)), B = d(() => i("SDrawer", "mobileFullScreen", T.mobileFullScreen)), V = d(() => {
|
|
54
|
+
if (M.value === "viewport") {
|
|
55
|
+
if (T.extent !== void 0) throw TypeError("SDrawer: extent requires scope=\"contained\"");
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
return
|
|
59
|
-
}),
|
|
58
|
+
return n("SDrawer", T.extent === void 0 ? A[L.value] : T.extent);
|
|
59
|
+
}), H = d(() => {
|
|
60
60
|
let e = {
|
|
61
61
|
kind: "drawer",
|
|
62
|
-
size:
|
|
63
|
-
placement:
|
|
64
|
-
mobileFullScreen:
|
|
65
|
-
scrollBehavior:
|
|
62
|
+
size: L.value,
|
|
63
|
+
placement: I.value,
|
|
64
|
+
mobileFullScreen: B.value,
|
|
65
|
+
scrollBehavior: N.value
|
|
66
66
|
};
|
|
67
|
-
if (
|
|
68
|
-
if (!
|
|
67
|
+
if (M.value === "contained") {
|
|
68
|
+
if (!k) throw TypeError("SDrawer: scope=\"contained\" requires a parent SOverlayHost");
|
|
69
69
|
return {
|
|
70
70
|
...e,
|
|
71
71
|
scope: "contained",
|
|
72
|
-
extent:
|
|
72
|
+
extent: n("SDrawer", V.value)
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
return
|
|
75
|
+
return V.value, {
|
|
76
76
|
...e,
|
|
77
77
|
scope: "viewport"
|
|
78
78
|
};
|
|
79
|
-
}),
|
|
80
|
-
function
|
|
81
|
-
let
|
|
82
|
-
|
|
83
|
-
let
|
|
84
|
-
if (
|
|
85
|
-
let
|
|
79
|
+
}), U = d(() => M.value === "contained" ? k?.portal.value : "body");
|
|
80
|
+
function W() {
|
|
81
|
+
let r = i("SDrawer", "open", T.open);
|
|
82
|
+
i("SDrawer", "closable", T.closable), t("SDrawer", T.headingLevel);
|
|
83
|
+
let o = a("SDrawer", "scope", T.scope, ["viewport", "contained"]);
|
|
84
|
+
if (r && o !== j) throw TypeError("SDrawer: scope may change only while open=false");
|
|
85
|
+
let s = a("SDrawer", "size", T.size, [
|
|
86
86
|
"sm",
|
|
87
87
|
"md",
|
|
88
88
|
"lg"
|
|
89
|
-
]),
|
|
89
|
+
]), c = {
|
|
90
90
|
kind: "drawer",
|
|
91
|
-
size:
|
|
92
|
-
placement:
|
|
91
|
+
size: s,
|
|
92
|
+
placement: a("SDrawer", "placement", T.placement, [
|
|
93
93
|
"left",
|
|
94
94
|
"right",
|
|
95
95
|
"bottom"
|
|
96
96
|
]),
|
|
97
|
-
mobileFullScreen:
|
|
98
|
-
scrollBehavior:
|
|
97
|
+
mobileFullScreen: i("SDrawer", "mobileFullScreen", T.mobileFullScreen),
|
|
98
|
+
scrollBehavior: a("SDrawer", "scrollBehavior", T.scrollBehavior, ["body", "content"])
|
|
99
99
|
};
|
|
100
|
-
if (
|
|
101
|
-
if (!
|
|
102
|
-
|
|
103
|
-
...
|
|
104
|
-
scope:
|
|
105
|
-
extent:
|
|
100
|
+
if (o === "contained") {
|
|
101
|
+
if (!k) throw TypeError("SDrawer: scope=\"contained\" requires a parent SOverlayHost");
|
|
102
|
+
e({
|
|
103
|
+
...c,
|
|
104
|
+
scope: o,
|
|
105
|
+
extent: n("SDrawer", T.extent === void 0 ? A[s] : T.extent)
|
|
106
106
|
});
|
|
107
107
|
} else {
|
|
108
|
-
if (
|
|
109
|
-
|
|
110
|
-
...
|
|
111
|
-
scope:
|
|
108
|
+
if (T.extent !== void 0) throw TypeError("SDrawer: extent requires scope=\"contained\"");
|
|
109
|
+
e({
|
|
110
|
+
...c,
|
|
111
|
+
scope: o
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
|
|
116
|
-
t || (
|
|
115
|
+
W(), S([M, R], ([e, t]) => {
|
|
116
|
+
t || (j = e);
|
|
117
117
|
}, { flush: "sync" });
|
|
118
|
-
function
|
|
119
|
-
|
|
118
|
+
function G() {
|
|
119
|
+
D("update:open", !1);
|
|
120
120
|
}
|
|
121
|
-
let
|
|
122
|
-
open:
|
|
123
|
-
closable:
|
|
124
|
-
requestClose:
|
|
125
|
-
opened: () =>
|
|
126
|
-
scope:
|
|
127
|
-
host:
|
|
128
|
-
validate:
|
|
121
|
+
let { setPanelElement: K, setPortalElement: q, setDismissalElement: J, panelRef: Y, layerIndex: X, renderOpen: Z, dispose: Q } = o({
|
|
122
|
+
open: R,
|
|
123
|
+
closable: z,
|
|
124
|
+
requestClose: G,
|
|
125
|
+
opened: () => D("opened"),
|
|
126
|
+
scope: M,
|
|
127
|
+
host: k,
|
|
128
|
+
validate: W
|
|
129
129
|
});
|
|
130
130
|
function $() {
|
|
131
|
-
|
|
131
|
+
Y.value?.remove();
|
|
132
132
|
}
|
|
133
|
-
return
|
|
133
|
+
return v(() => {
|
|
134
134
|
try {
|
|
135
|
-
|
|
135
|
+
Q();
|
|
136
136
|
} finally {
|
|
137
137
|
$(), queueMicrotask($);
|
|
138
138
|
}
|
|
139
|
-
}), (e, t) =>
|
|
139
|
+
}), (e, t) => U.value ? (y(), f(u, {
|
|
140
140
|
key: 0,
|
|
141
|
-
to:
|
|
142
|
-
}, [_(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
_:
|
|
156
|
-
},
|
|
157
|
-
name: "
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
closable: U.value,
|
|
177
|
-
"set-surface-element": w(oe),
|
|
178
|
-
onRequestClose: Y
|
|
179
|
-
}), g({
|
|
180
|
-
default: E(() => [S(e.$slots, "default", {}, void 0, !0)]),
|
|
181
|
-
_: 2
|
|
182
|
-
}, [e.$slots.header ? {
|
|
183
|
-
name: "header",
|
|
184
|
-
fn: E(() => [S(e.$slots, "header", {}, void 0, !0)]),
|
|
185
|
-
key: "0"
|
|
186
|
-
} : void 0, e.$slots.footer ? {
|
|
187
|
-
name: "footer",
|
|
188
|
-
fn: E(({ close: t }) => [S(e.$slots, "footer", { close: t }, void 0, !0)]),
|
|
189
|
-
key: "1"
|
|
190
|
-
} : void 0]), 1040, [
|
|
191
|
-
"presentation",
|
|
192
|
-
"title",
|
|
193
|
-
"accessible-name",
|
|
194
|
-
"heading-level",
|
|
195
|
-
"closable",
|
|
196
|
-
"set-surface-element"
|
|
197
|
-
])], 8, D)], 12, ie)) : p("", !0)]),
|
|
198
|
-
_: 3
|
|
199
|
-
}, 8, ["css"])], 8, ["to"])) : p("", !0);
|
|
141
|
+
to: U.value
|
|
142
|
+
}, [h(l, _({ open: x(Z) }, x(O).bindings(), {
|
|
143
|
+
presentation: H.value,
|
|
144
|
+
title: g.title,
|
|
145
|
+
"accessible-name": P.value,
|
|
146
|
+
"heading-level": F.value,
|
|
147
|
+
closable: z.value,
|
|
148
|
+
"set-surface-element": x(K),
|
|
149
|
+
"set-portal-element": x(q),
|
|
150
|
+
"set-dismissal-element": x(J),
|
|
151
|
+
"layer-index": x(X),
|
|
152
|
+
onRequestClose: G
|
|
153
|
+
}), m({
|
|
154
|
+
default: C(() => [b(e.$slots, "default")]),
|
|
155
|
+
_: 2
|
|
156
|
+
}, [e.$slots.header ? {
|
|
157
|
+
name: "header",
|
|
158
|
+
fn: C(() => [b(e.$slots, "header")]),
|
|
159
|
+
key: "0"
|
|
160
|
+
} : void 0, e.$slots.footer ? {
|
|
161
|
+
name: "footer",
|
|
162
|
+
fn: C(({ close: t }) => [b(e.$slots, "footer", { close: t })]),
|
|
163
|
+
key: "1"
|
|
164
|
+
} : void 0]), 1040, [
|
|
165
|
+
"open",
|
|
166
|
+
"presentation",
|
|
167
|
+
"title",
|
|
168
|
+
"accessible-name",
|
|
169
|
+
"heading-level",
|
|
170
|
+
"closable",
|
|
171
|
+
"set-surface-element",
|
|
172
|
+
"set-portal-element",
|
|
173
|
+
"set-dismissal-element",
|
|
174
|
+
"layer-index"
|
|
175
|
+
])], 8, ["to"])) : p("", !0);
|
|
200
176
|
}
|
|
201
177
|
});
|
|
202
178
|
//#endregion
|
|
203
|
-
export {
|
|
179
|
+
export { w as default };
|
|
@@ -16,23 +16,23 @@ export interface Props {
|
|
|
16
16
|
/** Уровень видимого заголовка в document outline. / Visible title level in the document outline. */
|
|
17
17
|
headingLevel?: ModalHeadingLevel;
|
|
18
18
|
}
|
|
19
|
-
declare var
|
|
19
|
+
declare var __VLS_17: {}, __VLS_19: {}, __VLS_22: {
|
|
20
20
|
close: () => void;
|
|
21
|
-
},
|
|
21
|
+
}, __VLS_25: {
|
|
22
22
|
close: () => void;
|
|
23
|
-
},
|
|
23
|
+
}, __VLS_28: {
|
|
24
24
|
close: () => void;
|
|
25
25
|
};
|
|
26
26
|
type __VLS_Slots = {} & {
|
|
27
|
-
header?: (props: typeof
|
|
27
|
+
header?: (props: typeof __VLS_17) => any;
|
|
28
28
|
} & {
|
|
29
|
-
default?: (props: typeof
|
|
29
|
+
default?: (props: typeof __VLS_19) => any;
|
|
30
30
|
} & {
|
|
31
|
-
footer?: (props: typeof
|
|
31
|
+
footer?: (props: typeof __VLS_22) => any;
|
|
32
32
|
} & {
|
|
33
|
-
'footer-start'?: (props: typeof
|
|
33
|
+
'footer-start'?: (props: typeof __VLS_25) => any;
|
|
34
34
|
} & {
|
|
35
|
-
'footer-end'?: (props: typeof
|
|
35
|
+
'footer-end'?: (props: typeof __VLS_28) => any;
|
|
36
36
|
};
|
|
37
37
|
declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
38
38
|
"update:open": (value: boolean) => any;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
import t from "./SModal.vue_vue_type_script_setup_true_lang.js";
|
|
4
|
-
/* empty css */
|
|
1
|
+
import e from "./SModal.vue_vue_type_script_setup_true_lang.js";
|
|
5
2
|
//#region src/components/shared/containers/SModal.vue
|
|
6
|
-
var
|
|
3
|
+
var t = e;
|
|
7
4
|
//#endregion
|
|
8
|
-
export {
|
|
5
|
+
export { t as default };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { validateBoolean as
|
|
3
|
-
import { useDialogOverlay as
|
|
4
|
-
import { useUiKitLocale as
|
|
5
|
-
import { useOwnedAttrs as
|
|
6
|
-
import
|
|
7
|
-
import c from "
|
|
8
|
-
import { Teleport as l, Transition as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createSlots as g, createVNode as _, defineComponent as v, mergeProps as y, normalizeClass as b, normalizeStyle as x, onErrorCaptured as S, openBlock as C, renderSlot as w, unref as T, useId as E, withCtx as D } from "vue";
|
|
1
|
+
import { assertDialogSurfacePresentation as e, validateDialogSurfaceHeadingLevel as t } from "../_internal/dialogSurface.js";
|
|
2
|
+
import { validateBoolean as n, validateExactString as r } from "../../../internal/runtimeContract.js";
|
|
3
|
+
import { useDialogOverlay as i } from "../../../composables/useDialogOverlay.js";
|
|
4
|
+
import { useUiKitLocale as a } from "../../../composables/useUiKitLocale.js";
|
|
5
|
+
import { useOwnedAttrs as o } from "../../../internal/ownedAttrs.js";
|
|
6
|
+
import s from "../_internal/SDialogSurface.vue.js";
|
|
7
|
+
import { Teleport as c, computed as l, createBlock as u, createSlots as d, createVNode as f, defineComponent as p, mergeProps as m, onErrorCaptured as h, openBlock as g, renderSlot as _, unref as v, useId as y, withCtx as b } from "vue";
|
|
9
8
|
//#region src/components/shared/containers/SModal.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var
|
|
9
|
+
var x = /*@__PURE__*/ p({
|
|
11
10
|
inheritAttrs: !1,
|
|
12
11
|
__name: "SModal",
|
|
13
12
|
props: {
|
|
@@ -29,112 +28,97 @@ var O = /*@__PURE__*/ v({
|
|
|
29
28
|
headingLevel: { default: 2 }
|
|
30
29
|
},
|
|
31
30
|
emits: ["update:open", "opened"],
|
|
32
|
-
setup(
|
|
33
|
-
let
|
|
34
|
-
function
|
|
35
|
-
|
|
31
|
+
setup(p, { emit: x }) {
|
|
32
|
+
let S = p, { t: C } = a(), w = `s-modal-${y()}`, T = x;
|
|
33
|
+
function E() {
|
|
34
|
+
T("update:open", !1);
|
|
36
35
|
}
|
|
37
|
-
let
|
|
36
|
+
let D = l(() => n("SModal", "open", S.open)), O = l(() => n("SModal", "closable", S.closable)), k = l(() => n("SModal", "fullScreen", S.fullScreen)), A = l(() => r("SModal", "layout", S.layout, ["desktop", "mobile-fullscreen"])), j = l(() => k.value || A.value === "mobile-fullscreen"), M = o({
|
|
38
37
|
component: "SModal",
|
|
39
38
|
owner: "modal dialog surface"
|
|
40
|
-
}),
|
|
39
|
+
}), N = l(() => S.ariaLabel ?? C("dialog.modal")), P = l(() => t("SModal", S.headingLevel)), F = l(() => ({
|
|
41
40
|
kind: "modal",
|
|
42
|
-
size:
|
|
43
|
-
fullscreen:
|
|
44
|
-
surface:
|
|
45
|
-
scrollBehavior:
|
|
41
|
+
size: S.size,
|
|
42
|
+
fullscreen: j.value,
|
|
43
|
+
surface: S.surface,
|
|
44
|
+
scrollBehavior: S.scrollBehavior
|
|
46
45
|
}));
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
let
|
|
50
|
-
|
|
46
|
+
function I() {
|
|
47
|
+
n("SModal", "open", S.open), n("SModal", "closable", S.closable);
|
|
48
|
+
let i = n("SModal", "fullScreen", S.fullScreen), a = r("SModal", "layout", S.layout, ["desktop", "mobile-fullscreen"]);
|
|
49
|
+
t("SModal", S.headingLevel), e({
|
|
51
50
|
kind: "modal",
|
|
52
|
-
size:
|
|
53
|
-
fullscreen:
|
|
54
|
-
surface:
|
|
55
|
-
scrollBehavior:
|
|
51
|
+
size: S.size,
|
|
52
|
+
fullscreen: i || a === "mobile-fullscreen",
|
|
53
|
+
surface: S.surface,
|
|
54
|
+
scrollBehavior: S.scrollBehavior
|
|
56
55
|
});
|
|
57
56
|
}
|
|
58
|
-
|
|
59
|
-
let { setPanelElement:
|
|
60
|
-
open:
|
|
61
|
-
closable:
|
|
62
|
-
requestClose:
|
|
63
|
-
opened: () =>
|
|
64
|
-
validate:
|
|
65
|
-
}),
|
|
66
|
-
if (typeof document < "u") for (let e of document.querySelectorAll("[data-s-modal-owner]")) e.dataset.sModalOwner ===
|
|
57
|
+
I();
|
|
58
|
+
let { setPanelElement: L, setPortalElement: R, setDismissalElement: z, layerIndex: B, renderOpen: V, dispose: H } = i({
|
|
59
|
+
open: D,
|
|
60
|
+
closable: O,
|
|
61
|
+
requestClose: E,
|
|
62
|
+
opened: () => T("opened"),
|
|
63
|
+
validate: I
|
|
64
|
+
}), U = () => {
|
|
65
|
+
if (typeof document < "u") for (let e of document.querySelectorAll("[data-s-modal-owner]")) e.dataset.sModalOwner === w && e.remove();
|
|
67
66
|
};
|
|
68
|
-
return
|
|
67
|
+
return h(() => {
|
|
69
68
|
try {
|
|
70
|
-
|
|
69
|
+
H();
|
|
71
70
|
} finally {
|
|
72
|
-
|
|
71
|
+
U(), queueMicrotask(U);
|
|
73
72
|
}
|
|
74
|
-
}), (e, t) => (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
e.$slots
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
e.$slots["footer-end"] ? {
|
|
123
|
-
name: "footer-end",
|
|
124
|
-
fn: D(({ close: t }) => [w(e.$slots, "footer-end", { close: t }, void 0, !0)]),
|
|
125
|
-
key: "3"
|
|
126
|
-
} : void 0
|
|
127
|
-
]), 1040, [
|
|
128
|
-
"presentation",
|
|
129
|
-
"title",
|
|
130
|
-
"accessible-name",
|
|
131
|
-
"heading-level",
|
|
132
|
-
"closable",
|
|
133
|
-
"set-surface-element"
|
|
134
|
-
])], 2)], 4)) : p("", !0)]),
|
|
135
|
-
_: 3
|
|
136
|
-
}, 8, ["css"])]));
|
|
73
|
+
}), (e, t) => (g(), u(c, { to: "body" }, [f(s, m({ open: v(V) }, v(M).bindings(), {
|
|
74
|
+
"owner-id": w,
|
|
75
|
+
presentation: F.value,
|
|
76
|
+
title: p.title,
|
|
77
|
+
"accessible-name": N.value,
|
|
78
|
+
"heading-level": P.value,
|
|
79
|
+
closable: O.value,
|
|
80
|
+
"set-surface-element": v(L),
|
|
81
|
+
"set-portal-element": v(R),
|
|
82
|
+
"set-dismissal-element": v(z),
|
|
83
|
+
"layer-index": v(B),
|
|
84
|
+
onRequestClose: E
|
|
85
|
+
}), d({
|
|
86
|
+
default: b(() => [_(e.$slots, "default")]),
|
|
87
|
+
_: 2
|
|
88
|
+
}, [
|
|
89
|
+
e.$slots.header ? {
|
|
90
|
+
name: "header",
|
|
91
|
+
fn: b(() => [_(e.$slots, "header")]),
|
|
92
|
+
key: "0"
|
|
93
|
+
} : void 0,
|
|
94
|
+
e.$slots.footer ? {
|
|
95
|
+
name: "footer",
|
|
96
|
+
fn: b(({ close: t }) => [_(e.$slots, "footer", { close: t })]),
|
|
97
|
+
key: "1"
|
|
98
|
+
} : void 0,
|
|
99
|
+
e.$slots["footer-start"] ? {
|
|
100
|
+
name: "footer-start",
|
|
101
|
+
fn: b(({ close: t }) => [_(e.$slots, "footer-start", { close: t })]),
|
|
102
|
+
key: "2"
|
|
103
|
+
} : void 0,
|
|
104
|
+
e.$slots["footer-end"] ? {
|
|
105
|
+
name: "footer-end",
|
|
106
|
+
fn: b(({ close: t }) => [_(e.$slots, "footer-end", { close: t })]),
|
|
107
|
+
key: "3"
|
|
108
|
+
} : void 0
|
|
109
|
+
]), 1040, [
|
|
110
|
+
"open",
|
|
111
|
+
"presentation",
|
|
112
|
+
"title",
|
|
113
|
+
"accessible-name",
|
|
114
|
+
"heading-level",
|
|
115
|
+
"closable",
|
|
116
|
+
"set-surface-element",
|
|
117
|
+
"set-portal-element",
|
|
118
|
+
"set-dismissal-element",
|
|
119
|
+
"layer-index"
|
|
120
|
+
])]));
|
|
137
121
|
}
|
|
138
122
|
});
|
|
139
123
|
//#endregion
|
|
140
|
-
export {
|
|
124
|
+
export { x as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../../assets/src/components/shared/containers/SOverlayHost.
|
|
1
|
+
import "../../../../assets/src/components/shared/containers/SOverlayHost.css_vue_type_style_index_0_src_09215628_scoped_09215628_lang.css";
|
|
2
2
|
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
import t from "./SOverlayHost.vue_vue_type_script_setup_true_lang.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/components/shared/containers/SOverlayHost.vue
|
|
6
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
6
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-09215628"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as default };
|