@pgcorp/ui-kit 0.11.0 → 0.13.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 (72) hide show
  1. package/README.md +198 -11
  2. package/dist/assets/src/components/shared/_internal/SDialogSurface.css_vue_type_style_index_0_src_d1b65adf_scoped_d1b65adf_lang.css +1 -1
  3. package/dist/assets/src/components/shared/_internal/SMenuItem.css_vue_type_style_index_0_src_af485607_scoped_af485607_lang.css +2 -0
  4. package/dist/assets/src/components/shared/containers/{SCollapsiblePanel.css_vue_type_style_index_0_src_4882f962_scoped_4882f962_lang.css → SCollapsiblePanel.css_vue_type_style_index_0_src_71824088_scoped_71824088_lang.css} +1 -1
  5. package/dist/assets/src/components/shared/containers/{SModal.css_vue_type_style_index_0_src_23373daf_scoped_23373daf_lang.css → SModal.css_vue_type_style_index_0_src_0dc51b74_scoped_0dc51b74_lang.css} +1 -1
  6. package/dist/assets/src/components/shared/controls/SButton.css_vue_type_style_index_0_src_a5d8f7e0_scoped_a5d8f7e0_lang.css +2 -0
  7. package/dist/assets/src/components/shared/controls/SChoiceCards.css_vue_type_style_index_0_src_af9fa9d1_scoped_af9fa9d1_lang.css +2 -0
  8. package/dist/assets/src/components/shared/controls/{SDropdownMenu.css_vue_type_style_index_0_src_b854a89e_scoped_b854a89e_lang.css → SDropdownMenu.css_vue_type_style_index_0_src_1ccb9efc_scoped_1ccb9efc_lang.css} +1 -1
  9. package/dist/assets/src/components/shared/controls/{SInputText.css_vue_type_style_index_0_src_a9c5f1aa_scoped_a9c5f1aa_lang.css → SInputText.css_vue_type_style_index_0_src_023c25d0_scoped_023c25d0_lang.css} +1 -1
  10. package/dist/assets/src/components/shared/controls/SMenuSurface.css_vue_type_style_index_0_src_ddcc5fbb_scoped_ddcc5fbb_lang.css +2 -0
  11. 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
  12. package/dist/assets/src/components/shared/data-display/SStatus.css_vue_type_style_index_0_src_3ce41a12_scoped_3ce41a12_lang.css +2 -0
  13. package/dist/assets/src/components/shared/data-display/SVirtualList.css_vue_type_style_index_0_src_cee8c247_scoped_cee8c247_lang.css +2 -0
  14. package/dist/src/components/layout/SSideMenuButton.vue.d.ts +1 -1
  15. package/dist/src/components/shared/_internal/SMenuItem.vue.js +2 -2
  16. package/dist/src/components/shared/_internal/SMenuItem.vue_vue_type_script_setup_true_lang.js +88 -76
  17. package/dist/src/components/shared/_internal/dialogSurface.d.ts +1 -1
  18. package/dist/src/components/shared/_internal/dialogSurface.js +1 -0
  19. package/dist/src/components/shared/containers/SCollapsiblePanel.vue.d.ts +1 -1
  20. package/dist/src/components/shared/containers/SCollapsiblePanel.vue.js +2 -2
  21. package/dist/src/components/shared/containers/SCollapsiblePanel.vue_vue_type_script_setup_true_lang.js +60 -58
  22. package/dist/src/components/shared/containers/SModal.vue.js +2 -2
  23. package/dist/src/components/shared/containers/SModal.vue_vue_type_script_setup_true_lang.js +43 -37
  24. package/dist/src/components/shared/controls/SButton.vue.d.ts +3 -0
  25. package/dist/src/components/shared/controls/SButton.vue.js +2 -2
  26. package/dist/src/components/shared/controls/SButton.vue_vue_type_script_setup_true_lang.js +103 -99
  27. package/dist/src/components/shared/controls/SChoiceCards.vue.d.ts +1 -0
  28. package/dist/src/components/shared/controls/SChoiceCards.vue.js +2 -2
  29. package/dist/src/components/shared/controls/SChoiceCards.vue_vue_type_script_setup_true_lang.js +53 -49
  30. package/dist/src/components/shared/controls/SDropdownMenu.vue.d.ts +15 -4
  31. package/dist/src/components/shared/controls/SDropdownMenu.vue.js +2 -2
  32. package/dist/src/components/shared/controls/SDropdownMenu.vue_vue_type_script_setup_true_lang.js +98 -62
  33. package/dist/src/components/shared/controls/SInputText.vue.d.ts +2 -2
  34. package/dist/src/components/shared/controls/SInputText.vue.js +2 -2
  35. package/dist/src/components/shared/controls/SInputText.vue_vue_type_script_setup_true_lang.js +16 -25
  36. package/dist/src/components/shared/controls/SMenuSurface.vue.d.ts +2 -2
  37. package/dist/src/components/shared/controls/SMenuSurface.vue.js +2 -2
  38. package/dist/src/components/shared/controls/SMenuSurface.vue_vue_type_script_setup_true_lang.js +132 -110
  39. package/dist/src/components/shared/controls/STextarea.vue.d.ts +8 -0
  40. package/dist/src/components/shared/controls/STextarea.vue_vue_type_script_setup_true_lang.js +156 -145
  41. package/dist/src/components/shared/controls/menu.d.ts +9 -1
  42. package/dist/src/components/shared/controls/menu.js +43 -28
  43. package/dist/src/components/shared/data-display/SCodeEditor.vue.d.ts +90 -7
  44. package/dist/src/components/shared/data-display/SCodeEditor.vue.js +2 -2
  45. package/dist/src/components/shared/data-display/SStatus.vue.d.ts +7 -0
  46. package/dist/src/components/shared/data-display/SStatus.vue.js +2 -2
  47. package/dist/src/components/shared/data-display/SStatus.vue_vue_type_script_setup_true_lang.js +28 -21
  48. package/dist/src/components/shared/data-display/SVirtualList.vue.d.ts +2 -0
  49. package/dist/src/components/shared/data-display/SVirtualList.vue.js +2 -2
  50. package/dist/src/components/shared/data-display/SVirtualList.vue_vue_type_script_setup_true_lang.js +317 -210
  51. package/dist/src/composables/useDialogOverlay.d.ts +1 -0
  52. package/dist/src/composables/useDialogOverlay.js +5 -2
  53. package/dist/src/internal/textLengthConstraints.d.ts +9 -0
  54. package/dist/src/internal/textLengthConstraints.js +18 -0
  55. package/dist/src/internal/useBinaryInput.js +3 -2
  56. package/dist/src/internal/useMenuLayer.d.ts +2 -1
  57. package/dist/src/internal/useMenuLayer.js +20 -14
  58. package/docs/public-api.md +14 -2
  59. package/package.json +1 -1
  60. package/src/components/shared/_internal/SDialogSurface.css +4 -0
  61. package/src/components/shared/_internal/SMenuItem.css +22 -1
  62. package/src/components/shared/controls/SButton.css +28 -0
  63. package/src/components/shared/controls/SChoiceCards.css +10 -3
  64. package/src/components/shared/controls/SMenuSurface.css +20 -0
  65. package/src/components/shared/data-display/SStatus.css +4 -0
  66. package/src/components/shared/data-display/SVirtualList.css +12 -0
  67. package/dist/assets/src/components/shared/_internal/SMenuItem.css_vue_type_style_index_0_src_e5bd192e_scoped_e5bd192e_lang.css +0 -2
  68. package/dist/assets/src/components/shared/controls/SButton.css_vue_type_style_index_0_src_52ad38b1_scoped_52ad38b1_lang.css +0 -2
  69. package/dist/assets/src/components/shared/controls/SChoiceCards.css_vue_type_style_index_0_src_627a8628_scoped_627a8628_lang.css +0 -2
  70. package/dist/assets/src/components/shared/controls/SMenuSurface.css_vue_type_style_index_0_src_bc7c7be4_scoped_bc7c7be4_lang.css +0 -2
  71. package/dist/assets/src/components/shared/data-display/SStatus.css_vue_type_style_index_0_src_c76fa058_scoped_c76fa058_lang.css +0 -2
  72. package/dist/assets/src/components/shared/data-display/SVirtualList.css_vue_type_style_index_0_src_1717877d_scoped_1717877d_lang.css +0 -2
@@ -3,9 +3,9 @@ import { useUiKitLocale as t } from "../../../composables/useUiKitLocale.js";
3
3
  import { useOwnedAttrs as n } from "../../../internal/ownedAttrs.js";
4
4
  import { validateDialogSurfaceHeadingLevel as r } from "../_internal/dialogSurface.js";
5
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
+ 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 _, onErrorCaptured as v, openBlock as y, renderSlot as b, toRef as x, unref as S, useId as C, withCtx as w } from "vue";
7
7
  //#region src/components/shared/containers/SModal.vue?vue&type=script&setup=true&lang.ts
8
- var C = /*@__PURE__*/ m({
8
+ var T = /*@__PURE__*/ m({
9
9
  inheritAttrs: !1,
10
10
  __name: "SModal",
11
11
  props: {
@@ -27,71 +27,77 @@ var C = /*@__PURE__*/ m({
27
27
  headingLevel: { default: 2 }
28
28
  },
29
29
  emits: ["update:open", "opened"],
30
- setup(m, { emit: C }) {
31
- let w = m, { t: T } = t(), E = C;
32
- function D() {
33
- E("update:open", !1);
30
+ setup(m, { emit: T }) {
31
+ let E = m, { t: D } = t(), O = `s-modal-${C()}`, k = T;
32
+ function A() {
33
+ k("update:open", !1);
34
34
  }
35
- let O = s(() => w.fullScreen || w.layout === "mobile-fullscreen"), k = n({
35
+ let j = s(() => E.fullScreen || E.layout === "mobile-fullscreen"), M = n({
36
36
  component: "SModal",
37
37
  owner: "modal dialog surface"
38
- }), A = s(() => w.ariaLabel ?? T("dialog.modal")), j = s(() => r("SModal", w.headingLevel));
39
- j.value;
40
- let M = s(() => ({
38
+ }), N = s(() => E.ariaLabel ?? D("dialog.modal")), P = s(() => r("SModal", E.headingLevel));
39
+ P.value;
40
+ let F = s(() => ({
41
41
  kind: "modal",
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")
51
- });
52
- return (e, t) => (v(), c(a, { to: "body" }, [p(o, { name: "s-modal-backdrop" }, {
53
- default: S(() => [m.open ? (v(), u("div", {
42
+ size: E.size,
43
+ fullscreen: j.value,
44
+ surface: E.surface,
45
+ scrollBehavior: E.scrollBehavior
46
+ })), { setPanelElement: I, backdropStyle: L, surfaceStyle: R, dispose: z } = e({
47
+ open: x(E, "open"),
48
+ closable: x(E, "closable"),
49
+ requestClose: A,
50
+ opened: () => k("opened")
51
+ }), B = () => {
52
+ if (typeof document < "u") for (let e of document.querySelectorAll("[data-s-modal-owner]")) e.dataset.sModalOwner === O && e.remove();
53
+ };
54
+ return v(() => {
55
+ z(), B(), queueMicrotask(B);
56
+ }), (e, t) => (y(), c(a, { to: "body" }, [p(o, { name: "s-modal-backdrop" }, {
57
+ default: w(() => [m.open ? (y(), u("div", {
54
58
  key: 0,
55
59
  class: "s-modal-backdrop",
56
- style: _(x(P)),
60
+ "data-s-modal-owner": O,
61
+ style: _(S(L)),
57
62
  "aria-hidden": "true"
58
63
  }, null, 4)) : l("", !0)]),
59
64
  _: 1
60
65
  }), p(o, { name: "s-modal-panel" }, {
61
- default: S(() => [m.open ? (v(), u("div", {
66
+ default: w(() => [m.open ? (y(), u("div", {
62
67
  key: 0,
63
68
  class: "s-modal-container",
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,
69
+ "data-s-modal-owner": O,
70
+ style: _(S(R))
71
+ }, [d("div", { class: g(["s-modal-panel-container", { "s-modal-panel-container--fullscreen": j.value }]) }, [p(i, h(S(M).bindings(), {
72
+ presentation: F.value,
67
73
  title: m.title,
68
- "accessible-name": A.value,
69
- "heading-level": j.value,
74
+ "accessible-name": N.value,
75
+ "heading-level": P.value,
70
76
  closable: m.closable,
71
- "set-surface-element": x(N),
72
- onRequestClose: D
77
+ "set-surface-element": S(I),
78
+ onRequestClose: A
73
79
  }), f({
74
- default: S(() => [y(e.$slots, "default", {}, void 0, !0)]),
80
+ default: w(() => [b(e.$slots, "default", {}, void 0, !0)]),
75
81
  _: 2
76
82
  }, [
77
83
  e.$slots.header ? {
78
84
  name: "header",
79
- fn: S(() => [y(e.$slots, "header", {}, void 0, !0)]),
85
+ fn: w(() => [b(e.$slots, "header", {}, void 0, !0)]),
80
86
  key: "0"
81
87
  } : void 0,
82
88
  e.$slots.footer ? {
83
89
  name: "footer",
84
- fn: S(({ close: t }) => [y(e.$slots, "footer", { close: t }, void 0, !0)]),
90
+ fn: w(({ close: t }) => [b(e.$slots, "footer", { close: t }, void 0, !0)]),
85
91
  key: "1"
86
92
  } : void 0,
87
93
  e.$slots["footer-start"] ? {
88
94
  name: "footer-start",
89
- fn: S(({ close: t }) => [y(e.$slots, "footer-start", { close: t }, void 0, !0)]),
95
+ fn: w(({ close: t }) => [b(e.$slots, "footer-start", { close: t }, void 0, !0)]),
90
96
  key: "2"
91
97
  } : void 0,
92
98
  e.$slots["footer-end"] ? {
93
99
  name: "footer-end",
94
- fn: S(({ close: t }) => [y(e.$slots, "footer-end", { close: t }, void 0, !0)]),
100
+ fn: w(({ close: t }) => [b(e.$slots, "footer-end", { close: t }, void 0, !0)]),
95
101
  key: "3"
96
102
  } : void 0
97
103
  ]), 1040, [
@@ -107,4 +113,4 @@ var C = /*@__PURE__*/ m({
107
113
  }
108
114
  });
109
115
  //#endregion
110
- export { C as default };
116
+ export { T 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 };
@@ -1,29 +1,30 @@
1
1
  import { ChevronRight as e } from "../../icons/_internal/generatedSputnigUiIconComponents.js";
2
2
  import { useOwnedAttrs as t } from "../../../internal/ownedAttrs.js";
3
- import { resolveSemanticToneBinding as n } from "../../../internal/semanticTone.js";
4
- import r from "../data-display/SBadge.vue.js";
5
- import { PassiveContentBoundary as i, useInteractiveLeafRegistration as a } from "../../../internal/passiveContentContract.js";
6
- import { resolveLinkTarget as o } from "../../../internal/linkTarget.js";
7
- import { useTreeActionRegistration as s } from "../_internal/treeRuntime.js";
8
- import c from "../data-display/SProgressIndicator.vue.js";
9
- import { computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, mergeProps as _, openBlock as v, ref as y, resolveDynamicComponent as b, toDisplayString as x, unref as S, useSlots as C, watchEffect as ee, withCtx as w } from "vue";
10
- import { RouterLink as T } from "vue-router";
3
+ import { validateExactString as n } from "../../../internal/runtimeContract.js";
4
+ import { resolveSemanticToneBinding as r } from "../../../internal/semanticTone.js";
5
+ import i from "../data-display/SBadge.vue.js";
6
+ import { PassiveContentBoundary as a, useInteractiveLeafRegistration as o } from "../../../internal/passiveContentContract.js";
7
+ import { resolveLinkTarget as s } from "../../../internal/linkTarget.js";
8
+ import { useTreeActionRegistration as c } from "../_internal/treeRuntime.js";
9
+ import l from "../data-display/SProgressIndicator.vue.js";
10
+ import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, mergeProps as v, openBlock as y, ref as b, resolveDynamicComponent as x, toDisplayString as S, unref as C, useSlots as ee, watchEffect as w, withCtx as T } from "vue";
11
+ import { RouterLink as E } from "vue-router";
11
12
  //#region src/components/shared/controls/SButton.vue?vue&type=script&setup=true&lang.ts
12
- var E = {
13
+ var D = {
13
14
  key: 0,
14
15
  class: "s-button__loader",
15
16
  "aria-hidden": "true"
16
- }, D = { class: "s-button__content" }, O = ["data-expanded"], k = {
17
+ }, O = { class: "s-button__content" }, k = ["data-expanded"], A = {
17
18
  key: 2,
18
19
  class: "s-button__label"
19
- }, A = {
20
+ }, j = {
20
21
  key: 4,
21
22
  class: "s-button__badge-slot"
22
- }, j = {
23
+ }, M = {
23
24
  key: 5,
24
25
  class: "s-button__shortcut",
25
26
  "aria-hidden": "true"
26
- }, M = ["data-expanded"], N = /*@__PURE__*/ g({
27
+ }, N = ["data-expanded"], P = /*@__PURE__*/ _({
27
28
  inheritAttrs: !1,
28
29
  __name: "SButton",
29
30
  props: {
@@ -56,6 +57,7 @@ var E = {
56
57
  contentAlign: { default: "center" },
57
58
  appearance: { default: "solid" },
58
59
  shape: { default: "default" },
60
+ labelOverflow: { default: "truncate" },
59
61
  pressed: {
60
62
  type: [Boolean, String],
61
63
  default: () => void 0
@@ -72,8 +74,8 @@ var E = {
72
74
  type: {}
73
75
  },
74
76
  emits: ["click"],
75
- setup(g, { expose: N, emit: P }) {
76
- let F = [
77
+ setup(_, { expose: P, emit: F }) {
78
+ let I = [
77
79
  "primary",
78
80
  "secondary",
79
81
  "success",
@@ -81,43 +83,43 @@ var E = {
81
83
  "warn",
82
84
  "danger",
83
85
  "contrast"
84
- ], I = P, L = C(), R = () => L.default?.() ?? [], z = y(null), B = t({
86
+ ], L = F, R = ee(), z = () => R.default?.() ?? [], B = b(null), V = t({
85
87
  component: "SButton",
86
88
  owner: "native button"
87
- }), V = l(() => n("SButton", "severity", g.severity, F)), H = s({
89
+ }), H = u(() => r("SButton", "severity", _.severity, I)), U = u(() => n("SButton", "labelOverflow", _.labelOverflow, ["truncate", "wrap"])), W = c({
88
90
  owner: "SButton",
89
- element: z,
90
- disabled: () => g.disabled || g.loading
91
+ element: B,
92
+ disabled: () => _.disabled || _.loading
91
93
  });
92
- a({ owner: "SButton" });
93
- let U = l(() => {
94
- let e = g.href !== void 0, t = g.to !== void 0;
94
+ o({ owner: "SButton" });
95
+ let G = u(() => {
96
+ let e = _.href !== void 0, t = _.to !== void 0;
95
97
  if (e && t) throw TypeError("SButton: передайте не более одного navigation target — href или to");
96
98
  if (!e && !t) return null;
97
- if (g.type !== void 0) throw TypeError("SButton: navigation target несовместим с native button type");
98
- return o({
99
- href: g.href,
100
- to: g.to,
101
- target: g.target,
102
- rel: g.rel,
99
+ if (_.type !== void 0) throw TypeError("SButton: navigation target несовместим с native button type");
100
+ return s({
101
+ href: _.href,
102
+ to: _.to,
103
+ target: _.target,
104
+ rel: _.rel,
103
105
  owner: "SButton"
104
106
  });
105
- }), W = l(() => g.disabled || g.loading), G = l(() => {
106
- let e = U.value;
107
- return !e || W.value ? e ? "a" : "button" : e.kind === "router" ? T : "a";
108
- }), K = l(() => {
109
- let e = B.bindings(), t = H ? {
107
+ }), K = u(() => _.disabled || _.loading), q = u(() => {
108
+ let e = G.value;
109
+ return !e || K.value ? e ? "a" : "button" : e.kind === "router" ? E : "a";
110
+ }), J = u(() => {
111
+ let e = V.bindings(), t = W ? {
110
112
  ...e,
111
113
  tabindex: -1
112
- } : e, n = g.disclosure ? {
114
+ } : e, n = _.disclosure ? {
113
115
  ...t,
114
- "aria-expanded": g.disclosure.expanded,
115
- "aria-controls": g.disclosure.controls
116
- } : t, r = U.value, i = r === null ? {
116
+ "aria-expanded": _.disclosure.expanded,
117
+ "aria-controls": _.disclosure.controls
118
+ } : t, r = G.value, i = r === null ? {
117
119
  ...n,
118
- disabled: g.disabled || g.loading || void 0,
119
- type: g.type ?? "button"
120
- } : W.value ? {
120
+ disabled: _.disabled || _.loading || void 0,
121
+ type: _.type ?? "button"
122
+ } : K.value ? {
121
123
  ...n,
122
124
  "aria-disabled": !0,
123
125
  tabindex: -1
@@ -125,119 +127,120 @@ var E = {
125
127
  ...n,
126
128
  ...r.bindings
127
129
  };
128
- if (!g.loading) return i;
130
+ if (!_.loading) return i;
129
131
  let a = i["aria-label"], o = [
130
- g.loadingLabel,
131
- g.label,
132
+ _.loadingLabel,
133
+ _.label,
132
134
  a
133
135
  ].find((e) => typeof e == "string" && e.trim().length > 0);
134
- if (!o && !L.default) throw Error("SButton: loading action requires label, loadingLabel, or aria-label");
136
+ if (!o && !R.default) throw Error("SButton: loading action requires label, loadingLabel, or aria-label");
135
137
  return o ? {
136
138
  ...i,
137
139
  "aria-label": o
138
140
  } : i;
139
- }), q = {
141
+ }), Y = {
140
142
  owner: "SButton",
141
143
  region: "passive default content",
142
144
  guidance: "Вынесите независимое действие в соседний SButton. / Move the independent action to a sibling SButton."
143
145
  };
144
- ee(() => {
145
- let e = U.value;
146
- if (e && g.pressed !== void 0) throw Error("SButton: navigation target несовместим с pressed toggle semantics");
147
- if (e && g.disclosure !== void 0) throw Error("SButton: navigation target несовместим с disclosure trigger semantics");
148
- if (g.disclosure && g.disclosure.controls.trim().length === 0) throw Error("SButton: disclosure.controls must be a non-empty id");
149
- let t = g.disclosure?.iconPlacement ?? "trailing";
150
- if (g.disclosure && (t === "leading" && g.leadingIcon || t === "trailing" && g.trailingIcon)) throw Error(`SButton: disclosure ${t} icon conflicts with the matching icon prop`);
146
+ w(() => {
147
+ let e = G.value;
148
+ if (e && _.pressed !== void 0) throw Error("SButton: navigation target несовместим с pressed toggle semantics");
149
+ if (e && _.disclosure !== void 0) throw Error("SButton: navigation target несовместим с disclosure trigger semantics");
150
+ if (_.disclosure && _.disclosure.controls.trim().length === 0) throw Error("SButton: disclosure.controls must be a non-empty id");
151
+ let t = _.disclosure?.iconPlacement ?? "trailing";
152
+ if (_.disclosure && (t === "leading" && _.leadingIcon || t === "trailing" && _.trailingIcon)) throw Error(`SButton: disclosure ${t} icon conflicts with the matching icon prop`);
151
153
  });
152
- let J = l(() => g.iconOnly || g.label === "" && !!(g.leadingIcon || g.trailingIcon || L.default)), Y = l(() => g.label === void 0 || g.label === "" && !g.leadingIcon && !g.trailingIcon), X = l(() => g.size === "lg" ? "sm" : "xs");
153
- function Z(e) {
154
+ let X = u(() => _.iconOnly || _.label === "" && !!(_.leadingIcon || _.trailingIcon || R.default)), Z = u(() => _.label === void 0 || _.label === "" && !_.leadingIcon && !_.trailingIcon), Q = u(() => _.size === "lg" ? "sm" : "xs");
155
+ function te(e) {
154
156
  if (e === null) {
155
- z.value = null;
157
+ B.value = null;
156
158
  return;
157
159
  }
158
160
  if (e instanceof HTMLButtonElement || e instanceof HTMLAnchorElement) {
159
- z.value = e;
161
+ B.value = e;
160
162
  return;
161
163
  }
162
164
  let t = Reflect.get(e, "$el");
163
165
  if (!(t instanceof HTMLAnchorElement)) throw TypeError("SButton: RouterLink root must resolve to an HTMLAnchorElement");
164
- z.value = t;
166
+ B.value = t;
165
167
  }
166
- function Q(e) {
167
- if (U.value && W.value) {
168
+ function ne(e) {
169
+ if (G.value && K.value) {
168
170
  e.preventDefault(), e.stopImmediatePropagation();
169
171
  return;
170
172
  }
171
- I("click", e);
173
+ L("click", e);
172
174
  }
173
175
  let $ = () => {
174
- let e = z.value;
176
+ let e = B.value;
175
177
  if (!e) throw Error("SButton: interactive element is unavailable");
176
178
  return e;
177
179
  };
178
- return N({
180
+ return P({
179
181
  getElement: $,
180
182
  focus: (e) => $().focus(e)
181
- }), (t, n) => (v(), u(b(G.value), _({ ref: Z }, K.value, {
182
- "data-s-tone": V.value["data-s-tone"],
183
+ }), (t, n) => (y(), d(x(q.value), v({ ref: te }, J.value, {
184
+ "data-s-tone": H.value["data-s-tone"],
183
185
  class: "s-button",
184
- "data-size": g.size,
185
- "data-width": g.width,
186
- "data-content-align": g.contentAlign,
187
- "data-density": g.density,
188
- "data-spacing": g.spacing,
189
- "data-hover-surface": g.hoverSurface,
190
- "data-icon-only": J.value,
191
- "data-icon-size": g.iconSize,
192
- "data-appearance": g.appearance,
193
- "data-shape": g.shape,
194
- "data-loading": g.loading || void 0,
195
- "aria-pressed": g.pressed,
196
- "aria-busy": g.busy || g.loading || void 0,
197
- onClick: Q
186
+ "data-size": _.size,
187
+ "data-width": _.width,
188
+ "data-content-align": _.contentAlign,
189
+ "data-density": _.density,
190
+ "data-spacing": _.spacing,
191
+ "data-hover-surface": _.hoverSurface,
192
+ "data-icon-only": X.value,
193
+ "data-icon-size": _.iconSize,
194
+ "data-appearance": _.appearance,
195
+ "data-shape": _.shape,
196
+ "data-label-overflow": U.value,
197
+ "data-loading": _.loading || void 0,
198
+ "aria-pressed": _.pressed,
199
+ "aria-busy": _.busy || _.loading || void 0,
200
+ onClick: ne
198
201
  }), {
199
- default: w(() => [g.loading ? (v(), f("span", E, [h(c, {
202
+ default: T(() => [_.loading ? (y(), p("span", D, [g(l, {
200
203
  accessibility: { mode: "decorative" },
201
- size: X.value
202
- }, null, 8, ["size"])])) : d("", !0), p("span", D, [
203
- g.disclosure?.iconPlacement === "leading" ? (v(), f("span", {
204
+ size: Q.value
205
+ }, null, 8, ["size"])])) : f("", !0), m("span", O, [
206
+ _.disclosure?.iconPlacement === "leading" ? (y(), p("span", {
204
207
  key: 0,
205
208
  class: "s-button__disclosure-icon s-button__icon s-button__icon--leading",
206
- "data-expanded": g.disclosure.expanded,
209
+ "data-expanded": _.disclosure.expanded,
207
210
  "data-disclosure-icon": "",
208
211
  "aria-hidden": "true"
209
- }, [h(S(e))], 8, O)) : g.leadingIcon ? (v(), u(b(g.leadingIcon), {
212
+ }, [g(C(e))], 8, k)) : _.leadingIcon ? (y(), d(x(_.leadingIcon), {
210
213
  key: 1,
211
214
  class: "s-button__icon s-button__icon--leading",
212
215
  "aria-hidden": "true"
213
- })) : d("", !0),
214
- g.label ? (v(), f("span", k, x(g.label), 1)) : d("", !0),
215
- Y.value ? (v(), u(S(i), {
216
+ })) : f("", !0),
217
+ _.label ? (y(), p("span", A, S(_.label), 1)) : f("", !0),
218
+ Z.value ? (y(), d(C(a), {
216
219
  key: 3,
217
- contract: q
220
+ contract: Y
218
221
  }, {
219
- default: w(() => [(v(), u(b(R)))]),
222
+ default: T(() => [(y(), d(x(z)))]),
220
223
  _: 1
221
- })) : d("", !0),
222
- g.badge === void 0 ? d("", !0) : (v(), f("span", A, [h(r, {
223
- severity: g.badgeSeverity,
224
+ })) : f("", !0),
225
+ _.badge === void 0 ? f("", !0) : (y(), p("span", j, [g(i, {
226
+ severity: _.badgeSeverity,
224
227
  size: "xs"
225
228
  }, {
226
- default: w(() => [m(x(g.badge), 1)]),
229
+ default: T(() => [h(S(_.badge), 1)]),
227
230
  _: 1
228
231
  }, 8, ["severity"])])),
229
- g.shortcut ? (v(), f("span", j, x(g.shortcut), 1)) : d("", !0),
230
- g.disclosure && g.disclosure.iconPlacement !== "leading" && g.disclosure.iconPlacement !== "none" ? (v(), f("span", {
232
+ _.shortcut ? (y(), p("span", M, S(_.shortcut), 1)) : f("", !0),
233
+ _.disclosure && _.disclosure.iconPlacement !== "leading" && _.disclosure.iconPlacement !== "none" ? (y(), p("span", {
231
234
  key: 6,
232
235
  class: "s-button__disclosure-icon s-button__icon s-button__icon--trailing",
233
- "data-expanded": g.disclosure.expanded,
236
+ "data-expanded": _.disclosure.expanded,
234
237
  "data-disclosure-icon": "",
235
238
  "aria-hidden": "true"
236
- }, [h(S(e))], 8, M)) : g.trailingIcon ? (v(), u(b(g.trailingIcon), {
239
+ }, [g(C(e))], 8, N)) : _.trailingIcon ? (y(), d(x(_.trailingIcon), {
237
240
  key: 7,
238
241
  class: "s-button__icon s-button__icon--trailing",
239
242
  "aria-hidden": "true"
240
- })) : d("", !0)
243
+ })) : f("", !0)
241
244
  ])]),
242
245
  _: 1
243
246
  }, 16, [
@@ -252,6 +255,7 @@ var E = {
252
255
  "data-icon-size",
253
256
  "data-appearance",
254
257
  "data-shape",
258
+ "data-label-overflow",
255
259
  "data-loading",
256
260
  "aria-pressed",
257
261
  "aria-busy"
@@ -259,4 +263,4 @@ var E = {
259
263
  }
260
264
  });
261
265
  //#endregion
262
- export { N as default };
266
+ export { P as default };
@@ -21,6 +21,7 @@ export interface Props<T extends PublicSelectionKey = string> {
21
21
  invalid?: boolean;
22
22
  disabled?: boolean;
23
23
  readonly?: boolean;
24
+ appearance?: 'cards' | 'rows';
24
25
  columns?: 'auto' | '2' | '3';
25
26
  density?: 'default' | 'compact';
26
27
  selectionIndicator?: 'mark' | 'none';
@@ -1,8 +1,8 @@
1
- import "../../../../assets/src/components/shared/controls/SChoiceCards.css_vue_type_style_index_0_src_627a8628_scoped_627a8628_lang.css";
1
+ import "../../../../assets/src/components/shared/controls/SChoiceCards.css_vue_type_style_index_0_src_af9fa9d1_scoped_af9fa9d1_lang.css";
2
2
  import e from "../../../../_virtual/_plugin-vue_export-helper.js";
3
3
  import t from "./SChoiceCards.vue_vue_type_script_setup_true_lang.js";
4
4
  /* empty css */
5
5
  //#region src/components/shared/controls/SChoiceCards.vue
6
- var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-627a8628"]]);
6
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-af9fa9d1"]]);
7
7
  //#endregion
8
8
  export { n as default };