@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.
- package/README.md +198 -11
- package/dist/assets/src/components/shared/_internal/SDialogSurface.css_vue_type_style_index_0_src_d1b65adf_scoped_d1b65adf_lang.css +1 -1
- package/dist/assets/src/components/shared/_internal/SMenuItem.css_vue_type_style_index_0_src_af485607_scoped_af485607_lang.css +2 -0
- 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
- 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
- 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/{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
- 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
- package/dist/assets/src/components/shared/controls/SMenuSurface.css_vue_type_style_index_0_src_ddcc5fbb_scoped_ddcc5fbb_lang.css +2 -0
- 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/SMenuItem.vue.js +2 -2
- package/dist/src/components/shared/_internal/SMenuItem.vue_vue_type_script_setup_true_lang.js +88 -76
- package/dist/src/components/shared/_internal/dialogSurface.d.ts +1 -1
- package/dist/src/components/shared/_internal/dialogSurface.js +1 -0
- package/dist/src/components/shared/containers/SCollapsiblePanel.vue.d.ts +1 -1
- package/dist/src/components/shared/containers/SCollapsiblePanel.vue.js +2 -2
- package/dist/src/components/shared/containers/SCollapsiblePanel.vue_vue_type_script_setup_true_lang.js +60 -58
- 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 +43 -37
- 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/SDropdownMenu.vue.d.ts +15 -4
- package/dist/src/components/shared/controls/SDropdownMenu.vue.js +2 -2
- package/dist/src/components/shared/controls/SDropdownMenu.vue_vue_type_script_setup_true_lang.js +98 -62
- package/dist/src/components/shared/controls/SInputText.vue.d.ts +2 -2
- 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 +16 -25
- package/dist/src/components/shared/controls/SMenuSurface.vue.d.ts +2 -2
- package/dist/src/components/shared/controls/SMenuSurface.vue.js +2 -2
- package/dist/src/components/shared/controls/SMenuSurface.vue_vue_type_script_setup_true_lang.js +132 -110
- package/dist/src/components/shared/controls/STextarea.vue.d.ts +8 -0
- package/dist/src/components/shared/controls/STextarea.vue_vue_type_script_setup_true_lang.js +156 -145
- package/dist/src/components/shared/controls/menu.d.ts +9 -1
- package/dist/src/components/shared/controls/menu.js +43 -28
- 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/composables/useDialogOverlay.d.ts +1 -0
- package/dist/src/composables/useDialogOverlay.js +5 -2
- package/dist/src/internal/textLengthConstraints.d.ts +9 -0
- package/dist/src/internal/textLengthConstraints.js +18 -0
- package/dist/src/internal/useBinaryInput.js +3 -2
- package/dist/src/internal/useMenuLayer.d.ts +2 -1
- package/dist/src/internal/useMenuLayer.js +20 -14
- package/docs/public-api.md +14 -2
- package/package.json +1 -1
- package/src/components/shared/_internal/SDialogSurface.css +4 -0
- package/src/components/shared/_internal/SMenuItem.css +22 -1
- package/src/components/shared/controls/SButton.css +28 -0
- package/src/components/shared/controls/SChoiceCards.css +10 -3
- package/src/components/shared/controls/SMenuSurface.css +20 -0
- 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/_internal/SMenuItem.css_vue_type_style_index_0_src_e5bd192e_scoped_e5bd192e_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/controls/SMenuSurface.css_vue_type_style_index_0_src_bc7c7be4_scoped_bc7c7be4_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
|
@@ -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 _,
|
|
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
|
|
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:
|
|
31
|
-
let
|
|
32
|
-
function
|
|
33
|
-
|
|
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
|
|
35
|
+
let j = s(() => E.fullScreen || E.layout === "mobile-fullscreen"), M = n({
|
|
36
36
|
component: "SModal",
|
|
37
37
|
owner: "modal dialog surface"
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
-
let
|
|
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:
|
|
43
|
-
fullscreen:
|
|
44
|
-
surface:
|
|
45
|
-
scrollBehavior:
|
|
46
|
-
})), { setPanelElement:
|
|
47
|
-
open:
|
|
48
|
-
closable:
|
|
49
|
-
requestClose:
|
|
50
|
-
opened: () =>
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
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:
|
|
66
|
+
default: w(() => [m.open ? (y(), u("div", {
|
|
62
67
|
key: 0,
|
|
63
68
|
class: "s-modal-container",
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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":
|
|
69
|
-
"heading-level":
|
|
74
|
+
"accessible-name": N.value,
|
|
75
|
+
"heading-level": P.value,
|
|
70
76
|
closable: m.closable,
|
|
71
|
-
"set-surface-element":
|
|
72
|
-
onRequestClose:
|
|
77
|
+
"set-surface-element": S(I),
|
|
78
|
+
onRequestClose: A
|
|
73
79
|
}), f({
|
|
74
|
-
default:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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 {
|
|
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.
|
|
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 };
|
|
@@ -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 {
|
|
4
|
-
import r from "
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import c from "../
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
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
|
|
13
|
+
var D = {
|
|
13
14
|
key: 0,
|
|
14
15
|
class: "s-button__loader",
|
|
15
16
|
"aria-hidden": "true"
|
|
16
|
-
},
|
|
17
|
+
}, O = { class: "s-button__content" }, k = ["data-expanded"], A = {
|
|
17
18
|
key: 2,
|
|
18
19
|
class: "s-button__label"
|
|
19
|
-
},
|
|
20
|
+
}, j = {
|
|
20
21
|
key: 4,
|
|
21
22
|
class: "s-button__badge-slot"
|
|
22
|
-
},
|
|
23
|
+
}, M = {
|
|
23
24
|
key: 5,
|
|
24
25
|
class: "s-button__shortcut",
|
|
25
26
|
"aria-hidden": "true"
|
|
26
|
-
},
|
|
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(
|
|
76
|
-
let
|
|
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
|
-
],
|
|
86
|
+
], L = F, R = ee(), z = () => R.default?.() ?? [], B = b(null), V = t({
|
|
85
87
|
component: "SButton",
|
|
86
88
|
owner: "native button"
|
|
87
|
-
}),
|
|
89
|
+
}), H = u(() => r("SButton", "severity", _.severity, I)), U = u(() => n("SButton", "labelOverflow", _.labelOverflow, ["truncate", "wrap"])), W = c({
|
|
88
90
|
owner: "SButton",
|
|
89
|
-
element:
|
|
90
|
-
disabled: () =>
|
|
91
|
+
element: B,
|
|
92
|
+
disabled: () => _.disabled || _.loading
|
|
91
93
|
});
|
|
92
|
-
|
|
93
|
-
let
|
|
94
|
-
let e =
|
|
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 (
|
|
98
|
-
return
|
|
99
|
-
href:
|
|
100
|
-
to:
|
|
101
|
-
target:
|
|
102
|
-
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
|
-
}),
|
|
106
|
-
let e =
|
|
107
|
-
return !e ||
|
|
108
|
-
}),
|
|
109
|
-
let e =
|
|
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 =
|
|
114
|
+
} : e, n = _.disclosure ? {
|
|
113
115
|
...t,
|
|
114
|
-
"aria-expanded":
|
|
115
|
-
"aria-controls":
|
|
116
|
-
} : t, r =
|
|
116
|
+
"aria-expanded": _.disclosure.expanded,
|
|
117
|
+
"aria-controls": _.disclosure.controls
|
|
118
|
+
} : t, r = G.value, i = r === null ? {
|
|
117
119
|
...n,
|
|
118
|
-
disabled:
|
|
119
|
-
type:
|
|
120
|
-
} :
|
|
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 (!
|
|
130
|
+
if (!_.loading) return i;
|
|
129
131
|
let a = i["aria-label"], o = [
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
_.loadingLabel,
|
|
133
|
+
_.label,
|
|
132
134
|
a
|
|
133
135
|
].find((e) => typeof e == "string" && e.trim().length > 0);
|
|
134
|
-
if (!o && !
|
|
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
|
-
}),
|
|
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
|
-
|
|
145
|
-
let e =
|
|
146
|
-
if (e &&
|
|
147
|
-
if (e &&
|
|
148
|
-
if (
|
|
149
|
-
let t =
|
|
150
|
-
if (
|
|
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
|
|
153
|
-
function
|
|
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
|
-
|
|
157
|
+
B.value = null;
|
|
156
158
|
return;
|
|
157
159
|
}
|
|
158
160
|
if (e instanceof HTMLButtonElement || e instanceof HTMLAnchorElement) {
|
|
159
|
-
|
|
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
|
-
|
|
166
|
+
B.value = t;
|
|
165
167
|
}
|
|
166
|
-
function
|
|
167
|
-
if (
|
|
168
|
+
function ne(e) {
|
|
169
|
+
if (G.value && K.value) {
|
|
168
170
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
169
171
|
return;
|
|
170
172
|
}
|
|
171
|
-
|
|
173
|
+
L("click", e);
|
|
172
174
|
}
|
|
173
175
|
let $ = () => {
|
|
174
|
-
let e =
|
|
176
|
+
let e = B.value;
|
|
175
177
|
if (!e) throw Error("SButton: interactive element is unavailable");
|
|
176
178
|
return e;
|
|
177
179
|
};
|
|
178
|
-
return
|
|
180
|
+
return P({
|
|
179
181
|
getElement: $,
|
|
180
182
|
focus: (e) => $().focus(e)
|
|
181
|
-
}), (t, n) => (
|
|
182
|
-
"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":
|
|
185
|
-
"data-width":
|
|
186
|
-
"data-content-align":
|
|
187
|
-
"data-density":
|
|
188
|
-
"data-spacing":
|
|
189
|
-
"data-hover-surface":
|
|
190
|
-
"data-icon-only":
|
|
191
|
-
"data-icon-size":
|
|
192
|
-
"data-appearance":
|
|
193
|
-
"data-shape":
|
|
194
|
-
"data-
|
|
195
|
-
"
|
|
196
|
-
"aria-
|
|
197
|
-
|
|
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:
|
|
202
|
+
default: T(() => [_.loading ? (y(), p("span", D, [g(l, {
|
|
200
203
|
accessibility: { mode: "decorative" },
|
|
201
|
-
size:
|
|
202
|
-
}, null, 8, ["size"])])) :
|
|
203
|
-
|
|
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":
|
|
209
|
+
"data-expanded": _.disclosure.expanded,
|
|
207
210
|
"data-disclosure-icon": "",
|
|
208
211
|
"aria-hidden": "true"
|
|
209
|
-
}, [
|
|
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
|
-
})) :
|
|
214
|
-
|
|
215
|
-
|
|
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:
|
|
220
|
+
contract: Y
|
|
218
221
|
}, {
|
|
219
|
-
default:
|
|
222
|
+
default: T(() => [(y(), d(x(z)))]),
|
|
220
223
|
_: 1
|
|
221
|
-
})) :
|
|
222
|
-
|
|
223
|
-
severity:
|
|
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:
|
|
229
|
+
default: T(() => [h(S(_.badge), 1)]),
|
|
227
230
|
_: 1
|
|
228
231
|
}, 8, ["severity"])])),
|
|
229
|
-
|
|
230
|
-
|
|
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":
|
|
236
|
+
"data-expanded": _.disclosure.expanded,
|
|
234
237
|
"data-disclosure-icon": "",
|
|
235
238
|
"aria-hidden": "true"
|
|
236
|
-
}, [
|
|
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
|
-
})) :
|
|
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 {
|
|
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.
|
|
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-
|
|
6
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-af9fa9d1"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as default };
|