@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.
Files changed (55) hide show
  1. package/README.md +185 -11
  2. 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
  3. package/dist/assets/src/components/shared/containers/SDrawer.css_vue_type_style_index_0_src_091d7325_scoped_091d7325_lang.css +2 -0
  4. 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
  5. package/dist/assets/src/components/shared/controls/SButton.css_vue_type_style_index_0_src_a5d8f7e0_scoped_a5d8f7e0_lang.css +2 -0
  6. package/dist/assets/src/components/shared/controls/SChoiceCards.css_vue_type_style_index_0_src_af9fa9d1_scoped_af9fa9d1_lang.css +2 -0
  7. 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
  8. 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
  9. package/dist/assets/src/components/shared/data-display/SStatus.css_vue_type_style_index_0_src_3ce41a12_scoped_3ce41a12_lang.css +2 -0
  10. package/dist/assets/src/components/shared/data-display/SVirtualList.css_vue_type_style_index_0_src_cee8c247_scoped_cee8c247_lang.css +2 -0
  11. package/dist/src/components/layout/SSideMenuButton.vue.d.ts +1 -1
  12. package/dist/src/components/shared/_internal/SDialogSurface.vue.d.ts +2 -1
  13. package/dist/src/components/shared/_internal/SDialogSurface.vue.js +2 -2
  14. package/dist/src/components/shared/_internal/SDialogSurface.vue_vue_type_script_setup_true_lang.js +37 -36
  15. package/dist/src/components/shared/_internal/dialogSurface.d.ts +3 -0
  16. package/dist/src/components/shared/_internal/dialogSurface.js +23 -19
  17. package/dist/src/components/shared/containers/SDrawer.vue.d.ts +5 -1
  18. package/dist/src/components/shared/containers/SDrawer.vue.js +2 -2
  19. package/dist/src/components/shared/containers/SDrawer.vue_vue_type_script_setup_true_lang.js +48 -44
  20. package/dist/src/components/shared/containers/SModal.vue.d.ts +5 -1
  21. package/dist/src/components/shared/containers/SModal.vue.js +2 -2
  22. package/dist/src/components/shared/containers/SModal.vue_vue_type_script_setup_true_lang.js +47 -41
  23. package/dist/src/components/shared/controls/SButton.vue.d.ts +3 -0
  24. package/dist/src/components/shared/controls/SButton.vue.js +2 -2
  25. package/dist/src/components/shared/controls/SButton.vue_vue_type_script_setup_true_lang.js +103 -99
  26. package/dist/src/components/shared/controls/SChoiceCards.vue.d.ts +1 -0
  27. package/dist/src/components/shared/controls/SChoiceCards.vue.js +2 -2
  28. package/dist/src/components/shared/controls/SChoiceCards.vue_vue_type_script_setup_true_lang.js +53 -49
  29. package/dist/src/components/shared/controls/SInputText.vue.d.ts +6 -0
  30. package/dist/src/components/shared/controls/SInputText.vue.js +2 -2
  31. package/dist/src/components/shared/controls/SInputText.vue_vue_type_script_setup_true_lang.js +117 -97
  32. package/dist/src/components/shared/controls/SMenuSurface.vue.d.ts +2 -2
  33. package/dist/src/components/shared/controls/STextarea.vue.d.ts +4 -0
  34. package/dist/src/components/shared/controls/STextarea.vue_vue_type_script_setup_true_lang.js +5 -1
  35. package/dist/src/components/shared/data-display/SCodeEditor.vue.d.ts +90 -7
  36. package/dist/src/components/shared/data-display/SCodeEditor.vue.js +2 -2
  37. package/dist/src/components/shared/data-display/SStatus.vue.d.ts +7 -0
  38. package/dist/src/components/shared/data-display/SStatus.vue.js +2 -2
  39. package/dist/src/components/shared/data-display/SStatus.vue_vue_type_script_setup_true_lang.js +28 -21
  40. package/dist/src/components/shared/data-display/SVirtualList.vue.d.ts +2 -0
  41. package/dist/src/components/shared/data-display/SVirtualList.vue.js +2 -2
  42. package/dist/src/components/shared/data-display/SVirtualList.vue_vue_type_script_setup_true_lang.js +317 -210
  43. package/dist/src/internal/useBinaryInput.js +3 -2
  44. package/docs/accessibility.md +10 -0
  45. package/docs/public-api.md +12 -0
  46. package/package.json +1 -1
  47. package/src/components/shared/controls/SButton.css +28 -0
  48. package/src/components/shared/controls/SChoiceCards.css +10 -3
  49. package/src/components/shared/data-display/SStatus.css +4 -0
  50. package/src/components/shared/data-display/SVirtualList.css +12 -0
  51. package/dist/assets/src/components/shared/containers/SDrawer.css_vue_type_style_index_0_src_d0cace23_scoped_d0cace23_lang.css +0 -2
  52. package/dist/assets/src/components/shared/controls/SButton.css_vue_type_style_index_0_src_52ad38b1_scoped_52ad38b1_lang.css +0 -2
  53. package/dist/assets/src/components/shared/controls/SChoiceCards.css_vue_type_style_index_0_src_627a8628_scoped_627a8628_lang.css +0 -2
  54. package/dist/assets/src/components/shared/data-display/SStatus.css_vue_type_style_index_0_src_c76fa058_scoped_c76fa058_lang.css +0 -2
  55. package/dist/assets/src/components/shared/data-display/SVirtualList.css_vue_type_style_index_0_src_1717877d_scoped_1717877d_lang.css +0 -2
@@ -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 a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, defineComponent as f, mergeProps as p, openBlock as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, useId as y, useSlots as b, withCtx as x } from "vue";
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 S = { class: "s-dialog-surface__body" }, C = ["data-layout"], w = {
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
- }, T = {
11
+ }, E = {
12
12
  key: 1,
13
13
  class: "s-dialog-surface__footer-end"
14
- }, E = "div", D = /*@__PURE__*/ f({
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(f, { emit: D }) {
26
- let O = f, k = D, { t: A } = t();
27
- i(O.presentation), n({ owner: "SDialogSurface" });
28
- let j = b(), M = `s-dialog-title-${y()}`, N = o(() => O.presentation.kind === "modal"), P = o(() => O.presentation.kind === "modal" ? O.presentation : null), F = o(() => O.presentation.kind === "drawer" ? O.presentation : null), I = o(() => !!(O.title || j.header)), L = o(() => N.value && !!(j["footer-start"] || j["footer-end"])), R = o(() => L.value || !!j.footer), z = o(() => N.value ? "div" : "header"), B = o(() => N.value ? "h3" : "h2"), V = o(() => {
29
- let e = O.presentation;
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
- }), H = () => k("request-close");
32
- return (t, n) => (m(), s(g(E), p({ ref: f.setSurfaceElement }, t.$attrs, {
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": f.presentation.kind,
35
- "data-layout": V.value,
36
- "data-size": f.presentation.size,
37
- "data-placement": F.value?.placement,
38
- "data-surface": P.value?.surface,
39
- "data-scroll": P.value?.scrollBehavior,
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": I.value ? M : void 0,
44
- "aria-label": I.value ? void 0 : f.accessibleName
44
+ "aria-labelledby": L.value ? N : void 0,
45
+ "aria-label": L.value ? void 0 : p.accessibleName
45
46
  }), {
46
- default: x(() => [
47
- I.value ? (m(), s(g(z.value), {
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: x(() => [(m(), s(g(B.value), {
52
- id: M,
52
+ default: S(() => [(h(), c(_(H.value), {
53
+ id: N,
53
54
  class: "s-dialog-surface__title"
54
55
  }, {
55
- default: x(() => [h(t.$slots, "header", {}, () => [d(_(f.title), 1)], !0)]),
56
+ default: S(() => [g(t.$slots, "header", {}, () => [f(v(p.title), 1)], !0)]),
56
57
  _: 3
57
- })), f.closable ? (m(), s(r, {
58
+ })), p.closable ? (h(), c(r, {
58
59
  key: 0,
59
- "leading-icon": v(e),
60
+ "leading-icon": y(e),
60
61
  "icon-only": "",
61
62
  appearance: "text",
62
63
  size: "sm",
63
- "aria-label": v(A)("dialog.close"),
64
- onClick: H
65
- }, null, 8, ["leading-icon", "aria-label"])) : c("", !0)]),
64
+ "aria-label": y(j)("dialog.close"),
65
+ onClick: W
66
+ }, null, 8, ["leading-icon", "aria-label"])) : l("", !0)]),
66
67
  _: 3
67
- })) : c("", !0),
68
- u("div", S, [h(t.$slots, "default", {}, void 0, !0)]),
69
- R.value ? (m(), l("div", {
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": L.value ? "split" : "end"
73
- }, [L.value ? (m(), l(a, { key: 0 }, [t.$slots["footer-start"] ? (m(), l("div", w, [h(t.$slots, "footer-start", { close: H }, void 0, !0)])) : c("", !0), t.$slots["footer-end"] ? (m(), l("div", T, [h(t.$slots, "footer-end", { close: H }, void 0, !0)])) : c("", !0)], 64)) : h(t.$slots, "footer", { close: H }, void 0, !0, 1)], 8, C)) : c("", !0)
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 { D as default };
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
- var e = class extends Error {
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
- }, t = /* @__PURE__ */ new Set([
10
+ }, n = /* @__PURE__ */ new Set([
7
11
  "kind",
8
12
  "size",
9
13
  "fullscreen",
10
14
  "surface",
11
15
  "scrollBehavior"
12
- ]), n = /* @__PURE__ */ new Set([
16
+ ]), r = /* @__PURE__ */ new Set([
13
17
  "kind",
14
18
  "size",
15
19
  "placement",
16
20
  "mobileFullScreen"
17
- ]), r = /* @__PURE__ */ new Set([
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
- ]), i = /* @__PURE__ */ new Set([
30
+ ]), a = /* @__PURE__ */ new Set([
27
31
  "sm",
28
32
  "md",
29
33
  "lg"
30
- ]), a = /* @__PURE__ */ new Set(["right", "bottom"]), o = /* @__PURE__ */ new Set(["default", "subtle"]), s = /* @__PURE__ */ new Set(["page", "body"]), c = (t, n, r) => {
31
- let i = Object.keys(t).find((e) => !r.has(e));
32
- if (i) throw new e("invalid-presentation", `SDialogSurface presentation kind="${n}" содержит недопустимое поле ${i}`);
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 l(l) {
35
- let u = l;
38
+ function u(e) {
39
+ let u = e;
36
40
  if (u.kind === "modal") {
37
- if (c(u, "modal", t), !r.has(u.size)) throw new e("invalid-size", `Недопустимый размер SModal: ${String(u.size)}`);
38
- if (typeof u.fullscreen != "boolean") throw new e("invalid-presentation", "SModal presentation требует boolean fullscreen");
39
- if (!o.has(u.surface)) throw new e("invalid-surface", `Недопустимая поверхность SModal: ${String(u.surface)}`);
40
- if (!s.has(u.scrollBehavior)) throw new e("invalid-scroll-behavior", `Недопустимый scroll behavior SModal: ${String(u.scrollBehavior)}`);
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 (c(u, "drawer", n), !i.has(u.size)) throw new e("invalid-size", `Недопустимый размер SDrawer: ${String(u.size)}`);
45
- if (!a.has(u.placement)) throw new e("invalid-presentation", `Недопустимое размещение SDrawer: ${String(u.placement)}`);
46
- if (typeof u.mobileFullScreen != "boolean") throw new e("invalid-presentation", "SDrawer presentation требует boolean mobileFullScreen");
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 e("invalid-presentation", `Неизвестный kind SDialogSurface: ${String(u.kind)}`);
53
+ throw new t("invalid-presentation", `Неизвестный kind SDialogSurface: ${String(u.kind)}`);
50
54
  }
51
55
  //#endregion
52
- export { e as DialogSurfaceContractError, l as assertDialogSurfacePresentation };
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.css_vue_type_style_index_0_src_d0cace23_scoped_d0cace23_lang.css";
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-d0cace23"]]);
6
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-091d7325"]]);
7
7
  //#endregion
8
8
  export { n as default };
@@ -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/SDialogSurface.vue.js";
6
- import { Teleport as o, Transition as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, createVNode as m, defineComponent as h, mergeProps as g, normalizeStyle as _, openBlock as v, renderSlot as y, unref as b, withCtx as x } from "vue";
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 S = ["data-placement"], C = ["data-placement"], w = /*@__PURE__*/ h({
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(h, { emit: w }) {
28
- let T = h, { t: E } = t(), D = w, O = n({
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
- }), k = c(() => T.ariaLabel ?? E("dialog.drawer")), A = c(() => i("SDrawer", "placement", T.placement, ["right", "bottom"])), j = c(() => i("SDrawer", "size", T.size, [
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
- ])), M = c(() => r("SDrawer", "open", T.open)), N = c(() => r("SDrawer", "closable", T.closable)), P = c(() => r("SDrawer", "mobileFullScreen", T.mobileFullScreen)), F = c(() => ({
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: j.value,
38
- placement: A.value,
39
- mobileFullScreen: P.value
39
+ size: N.value,
40
+ placement: M.value,
41
+ mobileFullScreen: I.value
40
42
  }));
41
- function I() {
42
- A.value, j.value, M.value, N.value, P.value;
43
+ function R() {
44
+ M.value, N.value, P.value, F.value, I.value, j.value;
43
45
  }
44
- I();
45
- function L() {
46
- D("update:open", !1);
46
+ R();
47
+ function z() {
48
+ O("update:open", !1);
47
49
  }
48
- let { setPanelElement: R, backdropStyle: z, surfaceStyle: B } = e({
49
- open: M,
50
- closable: N,
51
- requestClose: L,
52
- opened: () => D("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) => (v(), l(o, { to: "body" }, [m(s, { name: "s-drawer-backdrop" }, {
55
- default: x(() => [h.open ? (v(), d("div", {
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: _(b(z)),
60
+ style: v(x(V)),
59
61
  "aria-hidden": "true"
60
- }, null, 4)) : u("", !0)]),
62
+ }, null, 4)) : d("", !0)]),
61
63
  _: 1
62
- }), m(s, { name: "s-drawer-panel" }, {
63
- default: x(() => [h.open ? (v(), d("div", {
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": A.value,
67
- style: _(b(B))
68
- }, [f("div", {
68
+ "data-placement": M.value,
69
+ style: v(x(H))
70
+ }, [p("div", {
69
71
  class: "s-drawer-positioner",
70
- "data-placement": A.value
71
- }, [m(a, g(b(O).bindings(), {
72
- presentation: F.value,
73
- title: h.title,
74
- "accessible-name": k.value,
75
- closable: h.closable,
76
- "set-surface-element": b(R),
77
- onRequestClose: L
78
- }), p({
79
- default: x(() => [y(e.$slots, "default", {}, void 0, !0)]),
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: x(() => [y(e.$slots, "header", {}, void 0, !0)]),
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: x(({ close: t }) => [y(e.$slots, "footer", { close: t }, void 0, !0)]),
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, C)], 12, S)) : u("", !0)]),
99
+ ])], 8, w)], 12, C)) : d("", !0)]),
96
100
  _: 3
97
101
  })]));
98
102
  }
99
103
  });
100
104
  //#endregion
101
- export { w as default };
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.css_vue_type_style_index_0_src_dc3c799e_scoped_dc3c799e_lang.css";
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-dc3c799e"]]);
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/SDialogSurface.vue.js";
5
- import { Teleport as i, Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createVNode as f, defineComponent as p, mergeProps as m, normalizeClass as h, normalizeStyle as g, openBlock as _, renderSlot as v, toRef as y, unref as b, withCtx as x } from "vue";
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 S = /*@__PURE__*/ p({
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(p, { emit: S }) {
29
- let C = p, { t: w } = t(), T = S;
30
- function E() {
31
- T("update:open", !1);
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 D = o(() => C.fullScreen || C.layout === "mobile-fullscreen"), O = n({
35
+ let O = s(() => w.fullScreen || w.layout === "mobile-fullscreen"), k = n({
34
36
  component: "SModal",
35
37
  owner: "modal dialog surface"
36
- }), k = o(() => C.ariaLabel ?? w("dialog.modal")), A = o(() => ({
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: C.size,
39
- fullscreen: D.value,
40
- surface: C.surface,
41
- scrollBehavior: C.scrollBehavior
42
- })), { setPanelElement: j, backdropStyle: M, surfaceStyle: N } = e({
43
- open: y(C, "open"),
44
- closable: y(C, "closable"),
45
- requestClose: E,
46
- opened: () => T("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) => (_(), s(i, { to: "body" }, [f(a, { name: "s-modal-backdrop" }, {
49
- default: x(() => [p.open ? (_(), l("div", {
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: g(b(M)),
56
+ style: _(x(P)),
53
57
  "aria-hidden": "true"
54
- }, null, 4)) : c("", !0)]),
58
+ }, null, 4)) : l("", !0)]),
55
59
  _: 1
56
- }), f(a, { name: "s-modal-panel" }, {
57
- default: x(() => [p.open ? (_(), l("div", {
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: g(b(N))
61
- }, [u("div", { class: h(["s-modal-panel-container", { "s-modal-panel-container--fullscreen": D.value }]) }, [f(r, m(b(O).bindings(), {
62
- presentation: A.value,
63
- title: p.title,
64
- "accessible-name": k.value,
65
- closable: p.closable,
66
- "set-surface-element": b(j),
67
- onRequestClose: E
68
- }), d({
69
- default: x(() => [v(e.$slots, "default", {}, void 0, !0)]),
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: x(() => [v(e.$slots, "header", {}, void 0, !0)]),
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: x(({ close: t }) => [v(e.$slots, "footer", { close: t }, void 0, !0)]),
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: x(({ close: t }) => [v(e.$slots, "footer-start", { close: t }, void 0, !0)]),
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: x(({ close: t }) => [v(e.$slots, "footer-end", { close: t }, void 0, !0)]),
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)) : c("", !0)]),
104
+ ])], 2)], 4)) : l("", !0)]),
99
105
  _: 3
100
106
  })]));
101
107
  }
102
108
  });
103
109
  //#endregion
104
- export { S as default };
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.css_vue_type_style_index_0_src_52ad38b1_scoped_52ad38b1_lang.css";
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-52ad38b1"]]);
6
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-a5d8f7e0"]]);
7
7
  //#endregion
8
8
  export { n as default };