@pgcorp/ui-kit 0.10.2 → 0.12.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 +185 -11
- package/dist/assets/src/components/shared/_internal/{SDialogSurface.css_vue_type_style_index_0_src_979bf586_scoped_979bf586_lang.css → SDialogSurface.css_vue_type_style_index_0_src_d1b65adf_scoped_d1b65adf_lang.css} +1 -1
- package/dist/assets/src/components/shared/containers/SDrawer.css_vue_type_style_index_0_src_091d7325_scoped_091d7325_lang.css +2 -0
- package/dist/assets/src/components/shared/containers/{SModal.css_vue_type_style_index_0_src_dc3c799e_scoped_dc3c799e_lang.css → SModal.css_vue_type_style_index_0_src_23373daf_scoped_23373daf_lang.css} +1 -1
- package/dist/assets/src/components/shared/controls/SButton.css_vue_type_style_index_0_src_a5d8f7e0_scoped_a5d8f7e0_lang.css +2 -0
- package/dist/assets/src/components/shared/controls/SChoiceCards.css_vue_type_style_index_0_src_af9fa9d1_scoped_af9fa9d1_lang.css +2 -0
- package/dist/assets/src/components/shared/controls/{SInputText.css_vue_type_style_index_0_src_6d42d245_scoped_6d42d245_lang.css → SInputText.css_vue_type_style_index_0_src_a9c5f1aa_scoped_a9c5f1aa_lang.css} +1 -1
- package/dist/assets/src/components/shared/data-display/{SCodeEditor.css_vue_type_style_index_0_src_124ca461_scoped_124ca461_lang.css → SCodeEditor.css_vue_type_style_index_0_src_3ad533d9_scoped_3ad533d9_lang.css} +1 -1
- package/dist/assets/src/components/shared/data-display/SStatus.css_vue_type_style_index_0_src_3ce41a12_scoped_3ce41a12_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/SVirtualList.css_vue_type_style_index_0_src_cee8c247_scoped_cee8c247_lang.css +2 -0
- package/dist/src/components/layout/SSideMenuButton.vue.d.ts +1 -1
- package/dist/src/components/shared/_internal/SDialogSurface.vue.d.ts +2 -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 +37 -36
- package/dist/src/components/shared/_internal/dialogSurface.d.ts +3 -0
- package/dist/src/components/shared/_internal/dialogSurface.js +23 -19
- package/dist/src/components/shared/containers/SDrawer.vue.d.ts +5 -1
- package/dist/src/components/shared/containers/SDrawer.vue.js +2 -2
- package/dist/src/components/shared/containers/SDrawer.vue_vue_type_script_setup_true_lang.js +48 -44
- package/dist/src/components/shared/containers/SModal.vue.d.ts +5 -1
- package/dist/src/components/shared/containers/SModal.vue.js +2 -2
- package/dist/src/components/shared/containers/SModal.vue_vue_type_script_setup_true_lang.js +47 -41
- package/dist/src/components/shared/controls/SButton.vue.d.ts +3 -0
- package/dist/src/components/shared/controls/SButton.vue.js +2 -2
- package/dist/src/components/shared/controls/SButton.vue_vue_type_script_setup_true_lang.js +103 -99
- package/dist/src/components/shared/controls/SChoiceCards.vue.d.ts +1 -0
- package/dist/src/components/shared/controls/SChoiceCards.vue.js +2 -2
- package/dist/src/components/shared/controls/SChoiceCards.vue_vue_type_script_setup_true_lang.js +53 -49
- package/dist/src/components/shared/controls/SInputText.vue.d.ts +6 -0
- package/dist/src/components/shared/controls/SInputText.vue.js +2 -2
- package/dist/src/components/shared/controls/SInputText.vue_vue_type_script_setup_true_lang.js +117 -97
- package/dist/src/components/shared/controls/SMenuSurface.vue.d.ts +2 -2
- package/dist/src/components/shared/controls/STextarea.vue.d.ts +4 -0
- package/dist/src/components/shared/controls/STextarea.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/src/components/shared/data-display/SCodeEditor.vue.d.ts +90 -7
- package/dist/src/components/shared/data-display/SCodeEditor.vue.js +2 -2
- package/dist/src/components/shared/data-display/SStatus.vue.d.ts +7 -0
- package/dist/src/components/shared/data-display/SStatus.vue.js +2 -2
- package/dist/src/components/shared/data-display/SStatus.vue_vue_type_script_setup_true_lang.js +28 -21
- package/dist/src/components/shared/data-display/SVirtualList.vue.d.ts +2 -0
- package/dist/src/components/shared/data-display/SVirtualList.vue.js +2 -2
- package/dist/src/components/shared/data-display/SVirtualList.vue_vue_type_script_setup_true_lang.js +317 -210
- package/dist/src/internal/useBinaryInput.js +3 -2
- package/docs/accessibility.md +10 -0
- package/docs/public-api.md +12 -0
- package/package.json +1 -1
- package/src/components/shared/controls/SButton.css +28 -0
- package/src/components/shared/controls/SChoiceCards.css +10 -3
- package/src/components/shared/data-display/SStatus.css +4 -0
- package/src/components/shared/data-display/SVirtualList.css +12 -0
- package/dist/assets/src/components/shared/containers/SDrawer.css_vue_type_style_index_0_src_d0cace23_scoped_d0cace23_lang.css +0 -2
- package/dist/assets/src/components/shared/controls/SButton.css_vue_type_style_index_0_src_52ad38b1_scoped_52ad38b1_lang.css +0 -2
- package/dist/assets/src/components/shared/controls/SChoiceCards.css_vue_type_style_index_0_src_627a8628_scoped_627a8628_lang.css +0 -2
- package/dist/assets/src/components/shared/data-display/SStatus.css_vue_type_style_index_0_src_c76fa058_scoped_c76fa058_lang.css +0 -2
- package/dist/assets/src/components/shared/data-display/SVirtualList.css_vue_type_style_index_0_src_1717877d_scoped_1717877d_lang.css +0 -2
package/dist/src/components/shared/_internal/SDialogSurface.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -2,75 +2,76 @@ import { X as e } from "../../icons/_internal/generatedSputnigUiIconComponents.j
|
|
|
2
2
|
import { useUiKitLocale as t } from "../../../composables/useUiKitLocale.js";
|
|
3
3
|
import { useInteractiveLeafRegistration as n } from "../../../internal/passiveContentContract.js";
|
|
4
4
|
import r from "../controls/SButton.vue.js";
|
|
5
|
-
import { assertDialogSurfacePresentation as i } from "./dialogSurface.js";
|
|
6
|
-
import { Fragment as
|
|
5
|
+
import { assertDialogSurfacePresentation as i, validateDialogSurfaceHeadingLevel as a } from "./dialogSurface.js";
|
|
6
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, defineComponent as p, mergeProps as m, openBlock as h, renderSlot as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, useId as b, useSlots as x, withCtx as S } from "vue";
|
|
7
7
|
//#region src/components/shared/_internal/SDialogSurface.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var C = { class: "s-dialog-surface__body" }, w = ["data-layout"], T = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "s-dialog-surface__footer-start"
|
|
11
|
-
},
|
|
11
|
+
}, E = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "s-dialog-surface__footer-end"
|
|
14
|
-
},
|
|
14
|
+
}, D = "div", O = /*@__PURE__*/ p({
|
|
15
15
|
inheritAttrs: !1,
|
|
16
16
|
__name: "SDialogSurface",
|
|
17
17
|
props: {
|
|
18
18
|
presentation: {},
|
|
19
19
|
title: {},
|
|
20
20
|
accessibleName: {},
|
|
21
|
+
headingLevel: {},
|
|
21
22
|
closable: { type: Boolean },
|
|
22
23
|
setSurfaceElement: { type: Function }
|
|
23
24
|
},
|
|
24
25
|
emits: ["request-close"],
|
|
25
|
-
setup(
|
|
26
|
-
let
|
|
27
|
-
i(
|
|
28
|
-
let
|
|
29
|
-
let e =
|
|
26
|
+
setup(p, { emit: O }) {
|
|
27
|
+
let k = p, A = O, { t: j } = t();
|
|
28
|
+
i(k.presentation), n({ owner: "SDialogSurface" });
|
|
29
|
+
let M = x(), N = `s-dialog-title-${b()}`, P = s(() => k.presentation.kind === "modal"), F = s(() => k.presentation.kind === "modal" ? k.presentation : null), I = s(() => k.presentation.kind === "drawer" ? k.presentation : null), L = s(() => !!(k.title || M.header)), R = s(() => P.value && !!(M["footer-start"] || M["footer-end"])), z = s(() => R.value || !!M.footer), B = s(() => P.value ? "div" : "header"), V = s(() => a("SDialogSurface", k.headingLevel)), H = s(() => `h${V.value}`), U = s(() => {
|
|
30
|
+
let e = k.presentation;
|
|
30
31
|
return e.kind === "drawer" ? e.placement === "bottom" ? "bottom-sheet" : e.mobileFullScreen ? "mobile-fullscreen" : "side-panel" : e.fullscreen || e.size === "full" ? "fullscreen" : "contained";
|
|
31
|
-
}),
|
|
32
|
-
return (t, n) => (
|
|
32
|
+
}), W = () => A("request-close");
|
|
33
|
+
return (t, n) => (h(), c(_(D), m({ ref: p.setSurfaceElement }, t.$attrs, {
|
|
33
34
|
class: "s-dialog-surface",
|
|
34
|
-
"data-presentation":
|
|
35
|
-
"data-layout":
|
|
36
|
-
"data-size":
|
|
37
|
-
"data-placement":
|
|
38
|
-
"data-surface":
|
|
39
|
-
"data-scroll":
|
|
35
|
+
"data-presentation": p.presentation.kind,
|
|
36
|
+
"data-layout": U.value,
|
|
37
|
+
"data-size": p.presentation.size,
|
|
38
|
+
"data-placement": I.value?.placement,
|
|
39
|
+
"data-surface": F.value?.surface,
|
|
40
|
+
"data-scroll": F.value?.scrollBehavior,
|
|
40
41
|
tabindex: "-1",
|
|
41
42
|
role: "dialog",
|
|
42
43
|
"aria-modal": "true",
|
|
43
|
-
"aria-labelledby":
|
|
44
|
-
"aria-label":
|
|
44
|
+
"aria-labelledby": L.value ? N : void 0,
|
|
45
|
+
"aria-label": L.value ? void 0 : p.accessibleName
|
|
45
46
|
}), {
|
|
46
|
-
default:
|
|
47
|
-
|
|
47
|
+
default: S(() => [
|
|
48
|
+
L.value ? (h(), c(_(B.value), {
|
|
48
49
|
key: 0,
|
|
49
50
|
class: "s-dialog-surface__header"
|
|
50
51
|
}, {
|
|
51
|
-
default:
|
|
52
|
-
id:
|
|
52
|
+
default: S(() => [(h(), c(_(H.value), {
|
|
53
|
+
id: N,
|
|
53
54
|
class: "s-dialog-surface__title"
|
|
54
55
|
}, {
|
|
55
|
-
default:
|
|
56
|
+
default: S(() => [g(t.$slots, "header", {}, () => [f(v(p.title), 1)], !0)]),
|
|
56
57
|
_: 3
|
|
57
|
-
})),
|
|
58
|
+
})), p.closable ? (h(), c(r, {
|
|
58
59
|
key: 0,
|
|
59
|
-
"leading-icon":
|
|
60
|
+
"leading-icon": y(e),
|
|
60
61
|
"icon-only": "",
|
|
61
62
|
appearance: "text",
|
|
62
63
|
size: "sm",
|
|
63
|
-
"aria-label":
|
|
64
|
-
onClick:
|
|
65
|
-
}, null, 8, ["leading-icon", "aria-label"])) :
|
|
64
|
+
"aria-label": y(j)("dialog.close"),
|
|
65
|
+
onClick: W
|
|
66
|
+
}, null, 8, ["leading-icon", "aria-label"])) : l("", !0)]),
|
|
66
67
|
_: 3
|
|
67
|
-
})) :
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
})) : l("", !0),
|
|
69
|
+
d("div", C, [g(t.$slots, "default", {}, void 0, !0)]),
|
|
70
|
+
z.value ? (h(), u("div", {
|
|
70
71
|
key: 1,
|
|
71
72
|
class: "s-dialog-surface__footer",
|
|
72
|
-
"data-layout":
|
|
73
|
-
}, [
|
|
73
|
+
"data-layout": R.value ? "split" : "end"
|
|
74
|
+
}, [R.value ? (h(), u(o, { key: 0 }, [t.$slots["footer-start"] ? (h(), u("div", T, [g(t.$slots, "footer-start", { close: W }, void 0, !0)])) : l("", !0), t.$slots["footer-end"] ? (h(), u("div", E, [g(t.$slots, "footer-end", { close: W }, void 0, !0)])) : l("", !0)], 64)) : g(t.$slots, "footer", { close: W }, void 0, !0, 1)], 8, w)) : l("", !0)
|
|
74
75
|
]),
|
|
75
76
|
_: 3
|
|
76
77
|
}, 16, [
|
|
@@ -86,4 +87,4 @@ var S = { class: "s-dialog-surface__body" }, C = ["data-layout"], w = {
|
|
|
86
87
|
}
|
|
87
88
|
});
|
|
88
89
|
//#endregion
|
|
89
|
-
export {
|
|
90
|
+
export { O as default };
|
|
@@ -3,6 +3,9 @@ export type DialogSurfaceDrawerSize = 'sm' | 'md' | 'lg';
|
|
|
3
3
|
export type DialogSurfaceDrawerPlacement = 'right' | 'bottom';
|
|
4
4
|
export type DialogSurfaceTone = 'default' | 'subtle';
|
|
5
5
|
export type DialogSurfaceScrollBehavior = 'page' | 'body';
|
|
6
|
+
export type DialogSurfaceHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
|
+
/** Проверяет уровень native heading без числового coercion. / Validates a native heading level without numeric coercion. */
|
|
8
|
+
export declare function validateDialogSurfaceHeadingLevel(owner: string, value: unknown): DialogSurfaceHeadingLevel;
|
|
6
9
|
export interface ModalDialogSurfacePresentation {
|
|
7
10
|
kind: 'modal';
|
|
8
11
|
size: DialogSurfaceModalSize;
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
//#region src/components/shared/_internal/dialogSurface.ts
|
|
2
|
-
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
if (t === 1 || t === 2 || t === 3 || t === 4 || t === 5 || t === 6) return t;
|
|
4
|
+
throw TypeError(`${e}: headingLevel должен быть целым числом от 1 до 6; получено ${String(t)}. / ${e}: headingLevel must be an integer from 1 to 6; received ${String(t)}.`);
|
|
5
|
+
}
|
|
6
|
+
var t = class extends Error {
|
|
3
7
|
constructor(e, t) {
|
|
4
8
|
super(t), this.name = "DialogSurfaceContractError", this.code = e;
|
|
5
9
|
}
|
|
6
|
-
},
|
|
10
|
+
}, n = /* @__PURE__ */ new Set([
|
|
7
11
|
"kind",
|
|
8
12
|
"size",
|
|
9
13
|
"fullscreen",
|
|
10
14
|
"surface",
|
|
11
15
|
"scrollBehavior"
|
|
12
|
-
]),
|
|
16
|
+
]), r = /* @__PURE__ */ new Set([
|
|
13
17
|
"kind",
|
|
14
18
|
"size",
|
|
15
19
|
"placement",
|
|
16
20
|
"mobileFullScreen"
|
|
17
|
-
]),
|
|
21
|
+
]), i = /* @__PURE__ */ new Set([
|
|
18
22
|
"sm",
|
|
19
23
|
"md",
|
|
20
24
|
"lg",
|
|
@@ -23,30 +27,30 @@ var e = class extends Error {
|
|
|
23
27
|
"3xl",
|
|
24
28
|
"wide",
|
|
25
29
|
"full"
|
|
26
|
-
]),
|
|
30
|
+
]), a = /* @__PURE__ */ new Set([
|
|
27
31
|
"sm",
|
|
28
32
|
"md",
|
|
29
33
|
"lg"
|
|
30
|
-
]),
|
|
31
|
-
let i = Object.keys(
|
|
32
|
-
if (i) throw new
|
|
34
|
+
]), o = /* @__PURE__ */ new Set(["right", "bottom"]), s = /* @__PURE__ */ new Set(["default", "subtle"]), c = /* @__PURE__ */ new Set(["page", "body"]), l = (e, n, r) => {
|
|
35
|
+
let i = Object.keys(e).find((e) => !r.has(e));
|
|
36
|
+
if (i) throw new t("invalid-presentation", `SDialogSurface presentation kind="${n}" содержит недопустимое поле ${i}`);
|
|
33
37
|
};
|
|
34
|
-
function
|
|
35
|
-
let u =
|
|
38
|
+
function u(e) {
|
|
39
|
+
let u = e;
|
|
36
40
|
if (u.kind === "modal") {
|
|
37
|
-
if (
|
|
38
|
-
if (typeof u.fullscreen != "boolean") throw new
|
|
39
|
-
if (!
|
|
40
|
-
if (!
|
|
41
|
+
if (l(u, "modal", n), !i.has(u.size)) throw new t("invalid-size", `Недопустимый размер SModal: ${String(u.size)}`);
|
|
42
|
+
if (typeof u.fullscreen != "boolean") throw new t("invalid-presentation", "SModal presentation требует boolean fullscreen");
|
|
43
|
+
if (!s.has(u.surface)) throw new t("invalid-surface", `Недопустимая поверхность SModal: ${String(u.surface)}`);
|
|
44
|
+
if (!c.has(u.scrollBehavior)) throw new t("invalid-scroll-behavior", `Недопустимый scroll behavior SModal: ${String(u.scrollBehavior)}`);
|
|
41
45
|
return;
|
|
42
46
|
}
|
|
43
47
|
if (u.kind === "drawer") {
|
|
44
|
-
if (
|
|
45
|
-
if (!
|
|
46
|
-
if (typeof u.mobileFullScreen != "boolean") throw new
|
|
48
|
+
if (l(u, "drawer", r), !a.has(u.size)) throw new t("invalid-size", `Недопустимый размер SDrawer: ${String(u.size)}`);
|
|
49
|
+
if (!o.has(u.placement)) throw new t("invalid-presentation", `Недопустимое размещение SDrawer: ${String(u.placement)}`);
|
|
50
|
+
if (typeof u.mobileFullScreen != "boolean") throw new t("invalid-presentation", "SDrawer presentation требует boolean mobileFullScreen");
|
|
47
51
|
return;
|
|
48
52
|
}
|
|
49
|
-
throw new
|
|
53
|
+
throw new t("invalid-presentation", `Неизвестный kind SDialogSurface: ${String(u.kind)}`);
|
|
50
54
|
}
|
|
51
55
|
//#endregion
|
|
52
|
-
export {
|
|
56
|
+
export { t as DialogSurfaceContractError, u as assertDialogSurfacePresentation, e as validateDialogSurfaceHeadingLevel };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DialogSurfaceDrawerPlacement, DialogSurfaceDrawerSize } from '../_internal/dialogSurface';
|
|
1
|
+
import { DialogSurfaceDrawerPlacement, DialogSurfaceDrawerSize, DialogSurfaceHeadingLevel } from '../_internal/dialogSurface';
|
|
2
2
|
export type DrawerSize = DialogSurfaceDrawerSize;
|
|
3
3
|
export type DrawerPlacement = DialogSurfaceDrawerPlacement;
|
|
4
|
+
export type DrawerHeadingLevel = DialogSurfaceHeadingLevel;
|
|
4
5
|
export interface Props {
|
|
5
6
|
open: boolean;
|
|
6
7
|
title?: string;
|
|
@@ -9,6 +10,8 @@ export interface Props {
|
|
|
9
10
|
placement?: DrawerPlacement;
|
|
10
11
|
mobileFullScreen?: boolean;
|
|
11
12
|
ariaLabel?: string;
|
|
13
|
+
/** Уровень видимого заголовка в document outline. / Visible title level in the document outline. */
|
|
14
|
+
headingLevel?: DrawerHeadingLevel;
|
|
12
15
|
}
|
|
13
16
|
declare var __VLS_28: {}, __VLS_30: {}, __VLS_33: {
|
|
14
17
|
close: () => void;
|
|
@@ -33,6 +36,7 @@ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
33
36
|
ariaLabel: string;
|
|
34
37
|
placement: DrawerPlacement;
|
|
35
38
|
mobileFullScreen: boolean;
|
|
39
|
+
headingLevel: DrawerHeadingLevel;
|
|
36
40
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
37
41
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
38
42
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../../assets/src/components/shared/containers/SDrawer.
|
|
1
|
+
import "../../../../assets/src/components/shared/containers/SDrawer.css_vue_type_style_index_0_src_091d7325_scoped_091d7325_lang.css";
|
|
2
2
|
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
import t from "./SDrawer.vue_vue_type_script_setup_true_lang.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/components/shared/containers/SDrawer.vue
|
|
6
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
6
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-091d7325"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as default };
|
package/dist/src/components/shared/containers/SDrawer.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -2,10 +2,11 @@ import { useDialogOverlay as e } from "../../../composables/useDialogOverlay.js"
|
|
|
2
2
|
import { useUiKitLocale as t } from "../../../composables/useUiKitLocale.js";
|
|
3
3
|
import { useOwnedAttrs as n } from "../../../internal/ownedAttrs.js";
|
|
4
4
|
import { validateBoolean as r, validateExactString as i } from "../../../internal/runtimeContract.js";
|
|
5
|
-
import a from "../_internal/
|
|
6
|
-
import
|
|
5
|
+
import { validateDialogSurfaceHeadingLevel as a } from "../_internal/dialogSurface.js";
|
|
6
|
+
import o from "../_internal/SDialogSurface.vue.js";
|
|
7
|
+
import { Teleport as s, Transition as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createVNode as h, defineComponent as g, mergeProps as _, normalizeStyle as v, openBlock as y, renderSlot as b, unref as x, withCtx as S } from "vue";
|
|
7
8
|
//#region src/components/shared/containers/SDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
9
|
+
var C = ["data-placement"], w = ["data-placement"], T = /*@__PURE__*/ g({
|
|
9
10
|
inheritAttrs: !1,
|
|
10
11
|
__name: "SDrawer",
|
|
11
12
|
props: {
|
|
@@ -21,81 +22,84 @@ var S = ["data-placement"], C = ["data-placement"], w = /*@__PURE__*/ h({
|
|
|
21
22
|
type: Boolean,
|
|
22
23
|
default: !0
|
|
23
24
|
},
|
|
24
|
-
ariaLabel: { default: void 0 }
|
|
25
|
+
ariaLabel: { default: void 0 },
|
|
26
|
+
headingLevel: { default: 2 }
|
|
25
27
|
},
|
|
26
28
|
emits: ["update:open", "opened"],
|
|
27
|
-
setup(
|
|
28
|
-
let
|
|
29
|
+
setup(g, { emit: T }) {
|
|
30
|
+
let E = g, { t: D } = t(), O = T, k = n({
|
|
29
31
|
component: "SDrawer",
|
|
30
32
|
owner: "drawer dialog surface"
|
|
31
|
-
}),
|
|
33
|
+
}), A = l(() => E.ariaLabel ?? D("dialog.drawer")), j = l(() => a("SDrawer", E.headingLevel)), M = l(() => i("SDrawer", "placement", E.placement, ["right", "bottom"])), N = l(() => i("SDrawer", "size", E.size, [
|
|
32
34
|
"sm",
|
|
33
35
|
"md",
|
|
34
36
|
"lg"
|
|
35
|
-
])),
|
|
37
|
+
])), P = l(() => r("SDrawer", "open", E.open)), F = l(() => r("SDrawer", "closable", E.closable)), I = l(() => r("SDrawer", "mobileFullScreen", E.mobileFullScreen)), L = l(() => ({
|
|
36
38
|
kind: "drawer",
|
|
37
|
-
size:
|
|
38
|
-
placement:
|
|
39
|
-
mobileFullScreen:
|
|
39
|
+
size: N.value,
|
|
40
|
+
placement: M.value,
|
|
41
|
+
mobileFullScreen: I.value
|
|
40
42
|
}));
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
+
function R() {
|
|
44
|
+
M.value, N.value, P.value, F.value, I.value, j.value;
|
|
43
45
|
}
|
|
44
|
-
|
|
45
|
-
function
|
|
46
|
-
|
|
46
|
+
R();
|
|
47
|
+
function z() {
|
|
48
|
+
O("update:open", !1);
|
|
47
49
|
}
|
|
48
|
-
let { setPanelElement:
|
|
49
|
-
open:
|
|
50
|
-
closable:
|
|
51
|
-
requestClose:
|
|
52
|
-
opened: () =>
|
|
50
|
+
let { setPanelElement: B, backdropStyle: V, surfaceStyle: H } = e({
|
|
51
|
+
open: P,
|
|
52
|
+
closable: F,
|
|
53
|
+
requestClose: z,
|
|
54
|
+
opened: () => O("opened")
|
|
53
55
|
});
|
|
54
|
-
return (e, t) => (
|
|
55
|
-
default:
|
|
56
|
+
return (e, t) => (y(), u(s, { to: "body" }, [h(c, { name: "s-drawer-backdrop" }, {
|
|
57
|
+
default: S(() => [g.open ? (y(), f("div", {
|
|
56
58
|
key: 0,
|
|
57
59
|
class: "s-drawer-backdrop",
|
|
58
|
-
style:
|
|
60
|
+
style: v(x(V)),
|
|
59
61
|
"aria-hidden": "true"
|
|
60
|
-
}, null, 4)) :
|
|
62
|
+
}, null, 4)) : d("", !0)]),
|
|
61
63
|
_: 1
|
|
62
|
-
}),
|
|
63
|
-
default:
|
|
64
|
+
}), h(c, { name: "s-drawer-panel" }, {
|
|
65
|
+
default: S(() => [g.open ? (y(), f("div", {
|
|
64
66
|
key: 0,
|
|
65
67
|
class: "s-drawer-shell",
|
|
66
|
-
"data-placement":
|
|
67
|
-
style:
|
|
68
|
-
}, [
|
|
68
|
+
"data-placement": M.value,
|
|
69
|
+
style: v(x(H))
|
|
70
|
+
}, [p("div", {
|
|
69
71
|
class: "s-drawer-positioner",
|
|
70
|
-
"data-placement":
|
|
71
|
-
}, [
|
|
72
|
-
presentation:
|
|
73
|
-
title:
|
|
74
|
-
"accessible-name":
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
"data-placement": M.value
|
|
73
|
+
}, [h(o, _(x(k).bindings(), {
|
|
74
|
+
presentation: L.value,
|
|
75
|
+
title: g.title,
|
|
76
|
+
"accessible-name": A.value,
|
|
77
|
+
"heading-level": j.value,
|
|
78
|
+
closable: g.closable,
|
|
79
|
+
"set-surface-element": x(B),
|
|
80
|
+
onRequestClose: z
|
|
81
|
+
}), m({
|
|
82
|
+
default: S(() => [b(e.$slots, "default", {}, void 0, !0)]),
|
|
80
83
|
_: 2
|
|
81
84
|
}, [e.$slots.header ? {
|
|
82
85
|
name: "header",
|
|
83
|
-
fn:
|
|
86
|
+
fn: S(() => [b(e.$slots, "header", {}, void 0, !0)]),
|
|
84
87
|
key: "0"
|
|
85
88
|
} : void 0, e.$slots.footer ? {
|
|
86
89
|
name: "footer",
|
|
87
|
-
fn:
|
|
90
|
+
fn: S(({ close: t }) => [b(e.$slots, "footer", { close: t }, void 0, !0)]),
|
|
88
91
|
key: "1"
|
|
89
92
|
} : void 0]), 1040, [
|
|
90
93
|
"presentation",
|
|
91
94
|
"title",
|
|
92
95
|
"accessible-name",
|
|
96
|
+
"heading-level",
|
|
93
97
|
"closable",
|
|
94
98
|
"set-surface-element"
|
|
95
|
-
])], 8,
|
|
99
|
+
])], 8, w)], 12, C)) : d("", !0)]),
|
|
96
100
|
_: 3
|
|
97
101
|
})]));
|
|
98
102
|
}
|
|
99
103
|
});
|
|
100
104
|
//#endregion
|
|
101
|
-
export {
|
|
105
|
+
export { T as default };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { DialogSurfaceModalSize, DialogSurfaceScrollBehavior, DialogSurfaceTone } from '../_internal/dialogSurface';
|
|
1
|
+
import { DialogSurfaceHeadingLevel, DialogSurfaceModalSize, DialogSurfaceScrollBehavior, DialogSurfaceTone } from '../_internal/dialogSurface';
|
|
2
2
|
export type ModalSize = DialogSurfaceModalSize;
|
|
3
3
|
export type ModalSurface = DialogSurfaceTone;
|
|
4
4
|
export type ModalScrollBehavior = DialogSurfaceScrollBehavior;
|
|
5
|
+
export type ModalHeadingLevel = DialogSurfaceHeadingLevel;
|
|
5
6
|
export interface Props {
|
|
6
7
|
open: boolean;
|
|
7
8
|
title?: string;
|
|
@@ -12,6 +13,8 @@ export interface Props {
|
|
|
12
13
|
surface?: ModalSurface;
|
|
13
14
|
scrollBehavior?: ModalScrollBehavior;
|
|
14
15
|
ariaLabel?: string;
|
|
16
|
+
/** Уровень видимого заголовка в document outline. / Visible title level in the document outline. */
|
|
17
|
+
headingLevel?: ModalHeadingLevel;
|
|
15
18
|
}
|
|
16
19
|
declare var __VLS_28: {}, __VLS_30: {}, __VLS_33: {
|
|
17
20
|
close: () => void;
|
|
@@ -45,6 +48,7 @@ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
45
48
|
ariaLabel: string;
|
|
46
49
|
surface: ModalSurface;
|
|
47
50
|
scrollBehavior: ModalScrollBehavior;
|
|
51
|
+
headingLevel: ModalHeadingLevel;
|
|
48
52
|
fullScreen: boolean;
|
|
49
53
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
50
54
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../../assets/src/components/shared/containers/SModal.
|
|
1
|
+
import "../../../../assets/src/components/shared/containers/SModal.css_vue_type_style_index_0_src_23373daf_scoped_23373daf_lang.css";
|
|
2
2
|
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
import t from "./SModal.vue_vue_type_script_setup_true_lang.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/components/shared/containers/SModal.vue
|
|
6
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
6
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-23373daf"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as default };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useDialogOverlay as e } from "../../../composables/useDialogOverlay.js";
|
|
2
2
|
import { useUiKitLocale as t } from "../../../composables/useUiKitLocale.js";
|
|
3
3
|
import { useOwnedAttrs as n } from "../../../internal/ownedAttrs.js";
|
|
4
|
-
import r from "../_internal/
|
|
5
|
-
import
|
|
4
|
+
import { validateDialogSurfaceHeadingLevel as r } from "../_internal/dialogSurface.js";
|
|
5
|
+
import i from "../_internal/SDialogSurface.vue.js";
|
|
6
|
+
import { Teleport as a, Transition as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as f, createVNode as p, defineComponent as m, mergeProps as h, normalizeClass as g, normalizeStyle as _, openBlock as v, renderSlot as y, toRef as b, unref as x, withCtx as S } from "vue";
|
|
6
7
|
//#region src/components/shared/containers/SModal.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
8
|
+
var C = /*@__PURE__*/ m({
|
|
8
9
|
inheritAttrs: !1,
|
|
9
10
|
__name: "SModal",
|
|
10
11
|
props: {
|
|
@@ -22,83 +23,88 @@ var S = /*@__PURE__*/ p({
|
|
|
22
23
|
layout: { default: "desktop" },
|
|
23
24
|
surface: { default: "default" },
|
|
24
25
|
scrollBehavior: { default: "page" },
|
|
25
|
-
ariaLabel: { default: void 0 }
|
|
26
|
+
ariaLabel: { default: void 0 },
|
|
27
|
+
headingLevel: { default: 2 }
|
|
26
28
|
},
|
|
27
29
|
emits: ["update:open", "opened"],
|
|
28
|
-
setup(
|
|
29
|
-
let
|
|
30
|
-
function
|
|
31
|
-
|
|
30
|
+
setup(m, { emit: C }) {
|
|
31
|
+
let w = m, { t: T } = t(), E = C;
|
|
32
|
+
function D() {
|
|
33
|
+
E("update:open", !1);
|
|
32
34
|
}
|
|
33
|
-
let
|
|
35
|
+
let O = s(() => w.fullScreen || w.layout === "mobile-fullscreen"), k = n({
|
|
34
36
|
component: "SModal",
|
|
35
37
|
owner: "modal dialog surface"
|
|
36
|
-
}),
|
|
38
|
+
}), A = s(() => w.ariaLabel ?? T("dialog.modal")), j = s(() => r("SModal", w.headingLevel));
|
|
39
|
+
j.value;
|
|
40
|
+
let M = s(() => ({
|
|
37
41
|
kind: "modal",
|
|
38
|
-
size:
|
|
39
|
-
fullscreen:
|
|
40
|
-
surface:
|
|
41
|
-
scrollBehavior:
|
|
42
|
-
})), { setPanelElement:
|
|
43
|
-
open:
|
|
44
|
-
closable:
|
|
45
|
-
requestClose:
|
|
46
|
-
opened: () =>
|
|
42
|
+
size: w.size,
|
|
43
|
+
fullscreen: O.value,
|
|
44
|
+
surface: w.surface,
|
|
45
|
+
scrollBehavior: w.scrollBehavior
|
|
46
|
+
})), { setPanelElement: N, backdropStyle: P, surfaceStyle: F } = e({
|
|
47
|
+
open: b(w, "open"),
|
|
48
|
+
closable: b(w, "closable"),
|
|
49
|
+
requestClose: D,
|
|
50
|
+
opened: () => E("opened")
|
|
47
51
|
});
|
|
48
|
-
return (e, t) => (
|
|
49
|
-
default:
|
|
52
|
+
return (e, t) => (v(), c(a, { to: "body" }, [p(o, { name: "s-modal-backdrop" }, {
|
|
53
|
+
default: S(() => [m.open ? (v(), u("div", {
|
|
50
54
|
key: 0,
|
|
51
55
|
class: "s-modal-backdrop",
|
|
52
|
-
style:
|
|
56
|
+
style: _(x(P)),
|
|
53
57
|
"aria-hidden": "true"
|
|
54
|
-
}, null, 4)) :
|
|
58
|
+
}, null, 4)) : l("", !0)]),
|
|
55
59
|
_: 1
|
|
56
|
-
}),
|
|
57
|
-
default:
|
|
60
|
+
}), p(o, { name: "s-modal-panel" }, {
|
|
61
|
+
default: S(() => [m.open ? (v(), u("div", {
|
|
58
62
|
key: 0,
|
|
59
63
|
class: "s-modal-container",
|
|
60
|
-
style:
|
|
61
|
-
}, [
|
|
62
|
-
presentation:
|
|
63
|
-
title:
|
|
64
|
-
"accessible-name":
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
style: _(x(F))
|
|
65
|
+
}, [d("div", { class: g(["s-modal-panel-container", { "s-modal-panel-container--fullscreen": O.value }]) }, [p(i, h(x(k).bindings(), {
|
|
66
|
+
presentation: M.value,
|
|
67
|
+
title: m.title,
|
|
68
|
+
"accessible-name": A.value,
|
|
69
|
+
"heading-level": j.value,
|
|
70
|
+
closable: m.closable,
|
|
71
|
+
"set-surface-element": x(N),
|
|
72
|
+
onRequestClose: D
|
|
73
|
+
}), f({
|
|
74
|
+
default: S(() => [y(e.$slots, "default", {}, void 0, !0)]),
|
|
70
75
|
_: 2
|
|
71
76
|
}, [
|
|
72
77
|
e.$slots.header ? {
|
|
73
78
|
name: "header",
|
|
74
|
-
fn:
|
|
79
|
+
fn: S(() => [y(e.$slots, "header", {}, void 0, !0)]),
|
|
75
80
|
key: "0"
|
|
76
81
|
} : void 0,
|
|
77
82
|
e.$slots.footer ? {
|
|
78
83
|
name: "footer",
|
|
79
|
-
fn:
|
|
84
|
+
fn: S(({ close: t }) => [y(e.$slots, "footer", { close: t }, void 0, !0)]),
|
|
80
85
|
key: "1"
|
|
81
86
|
} : void 0,
|
|
82
87
|
e.$slots["footer-start"] ? {
|
|
83
88
|
name: "footer-start",
|
|
84
|
-
fn:
|
|
89
|
+
fn: S(({ close: t }) => [y(e.$slots, "footer-start", { close: t }, void 0, !0)]),
|
|
85
90
|
key: "2"
|
|
86
91
|
} : void 0,
|
|
87
92
|
e.$slots["footer-end"] ? {
|
|
88
93
|
name: "footer-end",
|
|
89
|
-
fn:
|
|
94
|
+
fn: S(({ close: t }) => [y(e.$slots, "footer-end", { close: t }, void 0, !0)]),
|
|
90
95
|
key: "3"
|
|
91
96
|
} : void 0
|
|
92
97
|
]), 1040, [
|
|
93
98
|
"presentation",
|
|
94
99
|
"title",
|
|
95
100
|
"accessible-name",
|
|
101
|
+
"heading-level",
|
|
96
102
|
"closable",
|
|
97
103
|
"set-surface-element"
|
|
98
|
-
])], 2)], 4)) :
|
|
104
|
+
])], 2)], 4)) : l("", !0)]),
|
|
99
105
|
_: 3
|
|
100
106
|
})]));
|
|
101
107
|
}
|
|
102
108
|
});
|
|
103
109
|
//#endregion
|
|
104
|
-
export {
|
|
110
|
+
export { C as default };
|
|
@@ -12,6 +12,7 @@ export type SButtonWidth = 'auto' | 'fit' | 'full';
|
|
|
12
12
|
export type SButtonContentAlign = 'center' | 'start' | 'end' | 'between';
|
|
13
13
|
export type SButtonAppearance = 'solid' | 'soft' | 'outline' | 'ghost' | 'text';
|
|
14
14
|
export type SButtonShape = 'default' | 'pill' | 'square' | 'circle' | 'row';
|
|
15
|
+
export type SButtonLabelOverflow = 'truncate' | 'wrap';
|
|
15
16
|
export type SButtonNativeType = 'button' | 'reset' | 'submit';
|
|
16
17
|
export interface SButtonDisclosure {
|
|
17
18
|
expanded: boolean;
|
|
@@ -41,6 +42,8 @@ interface SButtonPresentationProps {
|
|
|
41
42
|
contentAlign?: SButtonContentAlign;
|
|
42
43
|
appearance?: SButtonAppearance;
|
|
43
44
|
shape?: SButtonShape;
|
|
45
|
+
/** Visual overflow policy for the text label; wrap preserves the semantic hitbox as a minimum. */
|
|
46
|
+
labelOverflow?: SButtonLabelOverflow;
|
|
44
47
|
pressed?: boolean | 'mixed';
|
|
45
48
|
busy?: boolean;
|
|
46
49
|
disclosure?: SButtonDisclosure;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../../assets/src/components/shared/controls/SButton.
|
|
1
|
+
import "../../../../assets/src/components/shared/controls/SButton.css_vue_type_style_index_0_src_a5d8f7e0_scoped_a5d8f7e0_lang.css";
|
|
2
2
|
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
import t from "./SButton.vue_vue_type_script_setup_true_lang.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/components/shared/controls/SButton.vue
|
|
6
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
6
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-a5d8f7e0"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as default };
|