@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
package/dist/src/components/shared/_internal/SMenuItem.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -3,20 +3,20 @@ import n from "../data-display/SBadge.vue.js";
|
|
|
3
3
|
import { useInteractiveLeafRegistration as r } from "../../../internal/passiveContentContract.js";
|
|
4
4
|
import { resolveLinkTarget as i } from "../../../internal/linkTarget.js";
|
|
5
5
|
import { menuContextKey as a } from "./menuContext.js";
|
|
6
|
-
import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, inject as m, mergeProps as h, openBlock as g, ref as _, resolveDynamicComponent as v, toDisplayString as y, unref as b,
|
|
7
|
-
import { RouterLink as
|
|
6
|
+
import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, inject as m, mergeProps as h, openBlock as g, ref as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, useId as x, withCtx as S } from "vue";
|
|
7
|
+
import { RouterLink as C } from "vue-router";
|
|
8
8
|
//#region src/components/shared/_internal/SMenuItem.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var w = { class: "s-menu-item__main" }, T = { class: "s-menu-item__text" }, E = { class: "s-menu-item__label" }, D = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "s-menu-item__meta"
|
|
12
|
-
},
|
|
12
|
+
}, O = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "s-menu-item__badge"
|
|
15
|
-
},
|
|
15
|
+
}, ee = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "s-menu-item__shortcut",
|
|
18
18
|
"aria-hidden": "true"
|
|
19
|
-
},
|
|
19
|
+
}, te = [
|
|
20
20
|
"role",
|
|
21
21
|
"data-layout",
|
|
22
22
|
"data-density",
|
|
@@ -26,12 +26,13 @@ var C = { class: "s-menu-item__main" }, w = { class: "s-menu-item__label" }, T =
|
|
|
26
26
|
"aria-current",
|
|
27
27
|
"aria-checked",
|
|
28
28
|
"aria-haspopup",
|
|
29
|
-
"aria-expanded"
|
|
30
|
-
|
|
29
|
+
"aria-expanded",
|
|
30
|
+
"aria-describedby"
|
|
31
|
+
], ne = { class: "s-menu-item__main" }, k = { class: "s-menu-item__state" }, A = {
|
|
31
32
|
key: 1,
|
|
32
33
|
class: "s-menu-item__radio-dot",
|
|
33
34
|
"aria-hidden": "true"
|
|
34
|
-
}, M = { class: "s-menu-item__label" }, N = {
|
|
35
|
+
}, j = { class: "s-menu-item__text" }, M = { class: "s-menu-item__label" }, N = {
|
|
35
36
|
key: 0,
|
|
36
37
|
class: "s-menu-item__meta"
|
|
37
38
|
}, P = {
|
|
@@ -59,76 +60,76 @@ var C = { class: "s-menu-item__main" }, w = { class: "s-menu-item__label" }, T =
|
|
|
59
60
|
setup(p, { emit: I }) {
|
|
60
61
|
let L = m(a);
|
|
61
62
|
if (!L) throw Error("SMenuItem must be used inside SMenuSurface");
|
|
62
|
-
let R = L, z = p,
|
|
63
|
+
let R = L, z = `s-menu-item-description-${x()}`, B = p, V = I, H = _(null);
|
|
63
64
|
r({ owner: "SMenuItem" });
|
|
64
|
-
let
|
|
65
|
-
href:
|
|
66
|
-
to:
|
|
67
|
-
target:
|
|
68
|
-
rel:
|
|
69
|
-
owner: `SMenuItem(${
|
|
70
|
-
}) : null),
|
|
71
|
-
function
|
|
72
|
-
let e =
|
|
65
|
+
let U, W = !1, G = o(() => B.entry.kind === "destination" ? i({
|
|
66
|
+
href: B.entry.href,
|
|
67
|
+
to: B.entry.to,
|
|
68
|
+
target: B.entry.target ?? "_self",
|
|
69
|
+
rel: B.entry.rel,
|
|
70
|
+
owner: `SMenuItem(${B.entry.id})`
|
|
71
|
+
}) : null), K = o(() => G.value?.kind === "router" ? C : "a"), q = o(() => G.value?.bindings ?? {}), J = o(() => B.entry.kind === "checkbox" ? "menuitemcheckbox" : B.entry.kind === "radio" ? "menuitemradio" : "menuitem"), Y = o(() => B.entry.kind === "checkbox" || B.entry.kind === "radio" ? B.entry.checked : void 0), X = o(() => (B.entry.kind === "action" || B.entry.kind === "destination") && !(!B.entry.current || B.entry.disabled));
|
|
72
|
+
function Z() {
|
|
73
|
+
let e = H.value;
|
|
73
74
|
if (!e) throw Error("SMenuItem: interactive element is unavailable");
|
|
74
75
|
return e;
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
+
function Q(e) {
|
|
77
78
|
if (!(e.el instanceof HTMLElement)) throw Error("SMenuItem: interactive component must render one HTMLElement root");
|
|
78
|
-
|
|
79
|
-
entryId:
|
|
80
|
-
label: () =>
|
|
81
|
-
hasSubmenu: () =>
|
|
82
|
-
element:
|
|
79
|
+
H.value !== e.el && (U?.(), H.value = e.el, U = R.register({
|
|
80
|
+
entryId: B.entry.id,
|
|
81
|
+
label: () => B.entry.label,
|
|
82
|
+
hasSubmenu: () => B.entry.kind === "submenu",
|
|
83
|
+
element: Z,
|
|
83
84
|
setTabStop: (e) => {
|
|
84
|
-
|
|
85
|
+
Z().tabIndex = e ? 0 : -1;
|
|
85
86
|
},
|
|
86
|
-
focus: () =>
|
|
87
|
-
isFocused: () => document.activeElement ===
|
|
88
|
-
ownsEventTarget: (e) => e instanceof Node && (e ===
|
|
89
|
-
activate:
|
|
87
|
+
focus: () => Z().focus(),
|
|
88
|
+
isFocused: () => document.activeElement === H.value,
|
|
89
|
+
ownsEventTarget: (e) => e instanceof Node && (e === H.value || Z().contains(e)),
|
|
90
|
+
activate: ae
|
|
90
91
|
}));
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
-
|
|
93
|
+
function $() {
|
|
94
|
+
U?.(), U = void 0, H.value = null;
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
-
if (
|
|
96
|
+
function re(e) {
|
|
97
|
+
if (B.entry.disabled) {
|
|
97
98
|
e.preventDefault(), e.stopPropagation();
|
|
98
99
|
return;
|
|
99
100
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
101
|
+
if (B.entry.kind === "submenu") {
|
|
102
|
+
V("open-submenu");
|
|
102
103
|
return;
|
|
103
104
|
}
|
|
104
|
-
|
|
105
|
+
V("select", e);
|
|
105
106
|
}
|
|
106
|
-
function
|
|
107
|
-
|
|
107
|
+
function ie(e) {
|
|
108
|
+
W && e.detail === 0 || (W = !1, V("select", e));
|
|
108
109
|
}
|
|
109
|
-
function
|
|
110
|
-
if (!
|
|
111
|
-
if (
|
|
112
|
-
e.preventDefault(),
|
|
110
|
+
function ae(e) {
|
|
111
|
+
if (!B.entry.disabled) {
|
|
112
|
+
if (B.entry.kind === "submenu") {
|
|
113
|
+
e.preventDefault(), V("open-submenu");
|
|
113
114
|
return;
|
|
114
115
|
}
|
|
115
|
-
if (
|
|
116
|
-
|
|
116
|
+
if (B.entry.kind === "destination") {
|
|
117
|
+
V("select", e);
|
|
117
118
|
let t = e.defaultPrevented;
|
|
118
119
|
if (e.preventDefault(), !t) {
|
|
119
|
-
|
|
120
|
+
W = !0;
|
|
120
121
|
try {
|
|
121
|
-
|
|
122
|
+
Z().click();
|
|
122
123
|
} finally {
|
|
123
|
-
|
|
124
|
+
W = !1;
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
return;
|
|
127
128
|
}
|
|
128
|
-
e.preventDefault(),
|
|
129
|
+
e.preventDefault(), V("select", e);
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
|
-
return (r, i) => p.entry.kind === "destination" && !p.entry.disabled ? (g(), s(v(
|
|
132
|
+
return (r, i) => p.entry.kind === "destination" && !p.entry.disabled ? (g(), s(v(K.value), h({ key: 0 }, q.value, {
|
|
132
133
|
class: "s-menu-item",
|
|
133
134
|
role: "menuitem",
|
|
134
135
|
"data-layout": p.entry.layout ?? "row",
|
|
@@ -137,72 +138,83 @@ var C = { class: "s-menu-item__main" }, w = { class: "s-menu-item__label" }, T =
|
|
|
137
138
|
"data-current": p.entry.current || void 0,
|
|
138
139
|
tabindex: "-1",
|
|
139
140
|
"aria-current": p.entry.current ? "page" : void 0,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
"aria-describedby": p.entry.description ? z : void 0,
|
|
142
|
+
onClick: ie,
|
|
143
|
+
onPointermove: i[0] ||= (e) => V("pointer-intent"),
|
|
144
|
+
onVnodeMounted: Q,
|
|
145
|
+
onVnodeUpdated: Q,
|
|
146
|
+
onVnodeBeforeUnmount: $
|
|
145
147
|
}), {
|
|
146
|
-
default:
|
|
148
|
+
default: S(() => [u("span", w, [
|
|
147
149
|
i[2] ||= u("span", { class: "s-menu-item__state" }, null, -1),
|
|
148
150
|
p.entry.icon ? (g(), s(v(p.entry.icon), {
|
|
149
151
|
key: 0,
|
|
150
152
|
class: "s-menu-item__icon",
|
|
151
153
|
"aria-hidden": "true"
|
|
152
154
|
})) : c("", !0),
|
|
153
|
-
u("span",
|
|
154
|
-
|
|
155
|
+
u("span", T, [u("span", E, y(p.entry.label), 1), p.entry.description ? (g(), l("span", {
|
|
156
|
+
key: 0,
|
|
157
|
+
id: z,
|
|
158
|
+
class: "s-menu-item__description"
|
|
159
|
+
}, y(p.entry.description), 1)) : c("", !0)])
|
|
160
|
+
]), p.entry.badge !== void 0 || p.entry.shortcut ? (g(), l("span", D, [p.entry.badge === void 0 ? c("", !0) : (g(), l("span", O, [f(n, {
|
|
155
161
|
severity: p.entry.badgeSeverity ?? "secondary",
|
|
156
162
|
size: "xs"
|
|
157
163
|
}, {
|
|
158
|
-
default:
|
|
164
|
+
default: S(() => [d(y(p.entry.badge), 1)]),
|
|
159
165
|
_: 1
|
|
160
|
-
}, 8, ["severity"])])), p.entry.shortcut ? (g(), l("span",
|
|
166
|
+
}, 8, ["severity"])])), p.entry.shortcut ? (g(), l("span", ee, y(p.entry.shortcut), 1)) : c("", !0)])) : c("", !0)]),
|
|
161
167
|
_: 1
|
|
162
168
|
}, 16, [
|
|
163
169
|
"data-layout",
|
|
164
170
|
"data-density",
|
|
165
171
|
"data-menu-entry-id",
|
|
166
172
|
"data-current",
|
|
167
|
-
"aria-current"
|
|
173
|
+
"aria-current",
|
|
174
|
+
"aria-describedby"
|
|
168
175
|
])) : (g(), l("button", {
|
|
169
176
|
key: 1,
|
|
170
177
|
class: "s-menu-item",
|
|
171
178
|
type: "button",
|
|
172
|
-
role:
|
|
179
|
+
role: J.value,
|
|
173
180
|
"data-layout": p.entry.layout ?? "row",
|
|
174
181
|
"data-density": b(R).density.value,
|
|
175
182
|
"data-menu-entry-id": p.entry.id,
|
|
176
|
-
"data-current":
|
|
183
|
+
"data-current": X.value || void 0,
|
|
177
184
|
tabindex: "-1",
|
|
178
185
|
"aria-disabled": p.entry.disabled || void 0,
|
|
179
|
-
"aria-current":
|
|
180
|
-
"aria-checked":
|
|
186
|
+
"aria-current": X.value ? "page" : void 0,
|
|
187
|
+
"aria-checked": Y.value,
|
|
181
188
|
"aria-haspopup": p.entry.kind === "submenu" ? "menu" : void 0,
|
|
182
189
|
"aria-expanded": p.entry.kind === "submenu" ? p.submenuOpen : void 0,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
+
"aria-describedby": p.entry.description ? z : void 0,
|
|
191
|
+
onClick: re,
|
|
192
|
+
onPointermove: i[1] ||= (e) => V("pointer-intent"),
|
|
193
|
+
onVnodeMounted: Q,
|
|
194
|
+
onVnodeUpdated: Q,
|
|
195
|
+
onVnodeBeforeUnmount: $
|
|
196
|
+
}, [u("span", ne, [
|
|
197
|
+
u("span", k, [p.entry.kind === "checkbox" && p.entry.checked !== !1 ? (g(), s(b(e), {
|
|
190
198
|
key: 0,
|
|
191
199
|
class: "s-menu-item__state-icon",
|
|
192
200
|
"aria-hidden": "true"
|
|
193
|
-
})) : p.entry.kind === "radio" && p.entry.checked ? (g(), l("span",
|
|
201
|
+
})) : p.entry.kind === "radio" && p.entry.checked ? (g(), l("span", A)) : c("", !0)]),
|
|
194
202
|
p.entry.icon ? (g(), s(v(p.entry.icon), {
|
|
195
203
|
key: 0,
|
|
196
204
|
class: "s-menu-item__icon",
|
|
197
205
|
"aria-hidden": "true"
|
|
198
206
|
})) : c("", !0),
|
|
199
|
-
u("span", M, y(p.entry.label), 1)
|
|
207
|
+
u("span", j, [u("span", M, y(p.entry.label), 1), p.entry.description ? (g(), l("span", {
|
|
208
|
+
key: 0,
|
|
209
|
+
id: z,
|
|
210
|
+
class: "s-menu-item__description"
|
|
211
|
+
}, y(p.entry.description), 1)) : c("", !0)])
|
|
200
212
|
]), p.entry.badge !== void 0 || p.entry.shortcut || p.entry.kind === "submenu" ? (g(), l("span", N, [
|
|
201
213
|
p.entry.badge === void 0 ? c("", !0) : (g(), l("span", P, [f(n, {
|
|
202
214
|
severity: p.entry.badgeSeverity ?? "secondary",
|
|
203
215
|
size: "xs"
|
|
204
216
|
}, {
|
|
205
|
-
default:
|
|
217
|
+
default: S(() => [d(y(p.entry.badge), 1)]),
|
|
206
218
|
_: 1
|
|
207
219
|
}, 8, ["severity"])])),
|
|
208
220
|
p.entry.shortcut ? (g(), l("span", F, y(p.entry.shortcut), 1)) : c("", !0),
|
|
@@ -211,7 +223,7 @@ var C = { class: "s-menu-item__main" }, w = { class: "s-menu-item__label" }, T =
|
|
|
211
223
|
class: "s-menu-item__submenu-icon",
|
|
212
224
|
"aria-hidden": "true"
|
|
213
225
|
})) : c("", !0)
|
|
214
|
-
])) : c("", !0)], 40,
|
|
226
|
+
])) : c("", !0)], 40, te));
|
|
215
227
|
}
|
|
216
228
|
});
|
|
217
229
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type DialogSurfaceModalSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'wide' | 'full';
|
|
1
|
+
export type DialogSurfaceModalSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | 'wide' | 'full';
|
|
2
2
|
export type DialogSurfaceDrawerSize = 'sm' | 'md' | 'lg';
|
|
3
3
|
export type DialogSurfaceDrawerPlacement = 'right' | 'bottom';
|
|
4
4
|
export type DialogSurfaceTone = 'default' | 'subtle';
|
|
@@ -35,13 +35,13 @@ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
35
35
|
density: "comfortable" | "compact" | "dense";
|
|
36
36
|
surface: "card" | "plain";
|
|
37
37
|
lazy: boolean;
|
|
38
|
+
defaultOpen: boolean;
|
|
38
39
|
summaryTypography: SDisclosureSummaryTypography;
|
|
39
40
|
summaryCase: SDisclosureSummaryCase;
|
|
40
41
|
summaryState: SDisclosureSummaryState;
|
|
41
42
|
summaryFacts: readonly SDisclosureSummaryFact[];
|
|
42
43
|
summaryBadges: readonly SDisclosureSummaryBadge[];
|
|
43
44
|
summaryStatus: SDisclosureSummaryStatus;
|
|
44
|
-
defaultOpen: boolean;
|
|
45
45
|
contentPadding: "density" | "none";
|
|
46
46
|
headerVariant: "default" | "minimal";
|
|
47
47
|
noAnimation: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../../assets/src/components/shared/containers/SCollapsiblePanel.
|
|
1
|
+
import "../../../../assets/src/components/shared/containers/SCollapsiblePanel.css_vue_type_style_index_0_src_71824088_scoped_71824088_lang.css";
|
|
2
2
|
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
import t from "./SCollapsiblePanel.vue_vue_type_script_setup_true_lang.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/components/shared/containers/SCollapsiblePanel.vue
|
|
6
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
6
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-71824088"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as default };
|
|
@@ -2,7 +2,7 @@ import { useDisclosure as e } from "../../../composables/useDisclosure.js";
|
|
|
2
2
|
import { useOwnedAttrs as t } from "../../../internal/ownedAttrs.js";
|
|
3
3
|
import n from "../controls/SButton.vue.js";
|
|
4
4
|
import r from "../_internal/SDisclosureSummary.vue.js";
|
|
5
|
-
import { computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, mergeProps as u, nextTick as d, normalizeClass as f, normalizeStyle as ee, onBeforeUnmount as
|
|
5
|
+
import { computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, mergeProps as u, nextTick as d, normalizeClass as f, normalizeStyle as ee, onBeforeUnmount as te, onMounted as p, openBlock as m, ref as h, renderSlot as g, unref as _, useSlots as v, vShow as y, watch as b, withCtx as x, withDirectives as S } from "vue";
|
|
6
6
|
//#region src/components/shared/containers/SCollapsiblePanel.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var C = [
|
|
8
8
|
"data-density",
|
|
@@ -58,117 +58,118 @@ var C = [
|
|
|
58
58
|
},
|
|
59
59
|
emits: ["update:open"],
|
|
60
60
|
setup(l, { emit: O }) {
|
|
61
|
-
let k = l, ne =
|
|
61
|
+
let k = l, ne = v(), A = O, j = i(() => !!ne.actions), M = t({
|
|
62
62
|
component: "SCollapsiblePanel",
|
|
63
63
|
owner: "collapsible panel root"
|
|
64
|
-
}), N = i(() => k.density === "comfortable" ? "md" : "sm"), P = i(() => k.open ?? !1),
|
|
64
|
+
}), N = i(() => k.density === "comfortable" ? "md" : "sm"), P = i(() => k.density === "comfortable" ? "default" : "compact"), F = i(() => k.open ?? !1), I = e({
|
|
65
65
|
id: k.id,
|
|
66
|
-
open: k.open === void 0 ? void 0 :
|
|
66
|
+
open: k.open === void 0 ? void 0 : F,
|
|
67
67
|
defaultOpen: k.open === void 0 ? k.defaultOpen : void 0,
|
|
68
68
|
disabled: () => k.disabled,
|
|
69
69
|
onUpdate: (e) => A("update:open", e)
|
|
70
|
-
}), { isOpen:
|
|
70
|
+
}), { isOpen: L, triggerId: R, panelId: z } = I, B = h(!1), V = i(() => L.value || B.value), H = h(!k.lazy || k.defaultOpen || k.open === !0);
|
|
71
71
|
b(() => k.open, (e) => {
|
|
72
|
-
e && (
|
|
72
|
+
e && (H.value = !0);
|
|
73
73
|
});
|
|
74
|
-
function
|
|
74
|
+
function U() {
|
|
75
75
|
if (k.disabled) return;
|
|
76
76
|
if (k.noAnimation) {
|
|
77
|
-
|
|
77
|
+
I.toggle();
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
|
-
let e =
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
let U = g(null), W = g(null), G = g(null), K = null, q = null;
|
|
84
|
-
function J() {
|
|
85
|
-
q !== null && (window.cancelAnimationFrame(q), q = null);
|
|
80
|
+
let e = K.value, t = W.value;
|
|
81
|
+
B.value = !0, e?.classList.add("is-animating"), e?.classList.remove("is-opened"), t?.classList.add("is-animating"), t?.classList.remove("is-opened"), I.toggle();
|
|
86
82
|
}
|
|
83
|
+
let W = h(null), G = h(null), K = h(null), q = null, J = null;
|
|
87
84
|
function Y() {
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
J !== null && (window.cancelAnimationFrame(J), J = null);
|
|
86
|
+
}
|
|
87
|
+
function X() {
|
|
88
|
+
let e = W.value, t = G.value;
|
|
89
|
+
if (!e || !t || !L.value || !B.value) return;
|
|
90
90
|
let n = `${t.scrollHeight}px`;
|
|
91
91
|
e.style.maxHeight !== n && (e.style.maxHeight = n);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
function re() {
|
|
94
|
+
Y(), J = window.requestAnimationFrame(() => {
|
|
95
|
+
J = null, X();
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
function Z() {
|
|
99
|
-
let e =
|
|
99
|
+
let e = W.value;
|
|
100
100
|
if (!e) return;
|
|
101
101
|
e.classList.remove("is-animating"), e.classList.add("is-opened"), e.style.overflow = "", e.style.maxHeight = "";
|
|
102
|
-
let t =
|
|
102
|
+
let t = K.value;
|
|
103
103
|
t && (t.classList.remove("is-animating"), t.classList.add("is-opened"));
|
|
104
104
|
}
|
|
105
105
|
function Q() {
|
|
106
|
-
let e =
|
|
106
|
+
let e = W.value;
|
|
107
107
|
if (!e) return;
|
|
108
108
|
e.classList.remove("is-animating"), e.classList.remove("is-opened"), e.style.maxHeight = "0px", e.style.overflow = "hidden";
|
|
109
|
-
let t =
|
|
109
|
+
let t = K.value;
|
|
110
110
|
t && (t.classList.remove("is-animating"), t.classList.remove("is-opened"));
|
|
111
111
|
}
|
|
112
112
|
async function $(e) {
|
|
113
|
-
e ? (await d(),
|
|
113
|
+
e ? (await d(), H.value = !0, Z()) : Q(), B.value = !1;
|
|
114
114
|
}
|
|
115
|
-
async function
|
|
116
|
-
let e =
|
|
115
|
+
async function ie() {
|
|
116
|
+
let e = W.value;
|
|
117
117
|
if (!e) return;
|
|
118
|
-
let t =
|
|
118
|
+
let t = K.value;
|
|
119
119
|
await d(), e.classList.remove("is-opened"), e.classList.add("is-animating"), t && (t.classList.add("is-animating"), t.classList.remove("is-opened")), e.style.overflow = "hidden", e.style.maxHeight = "0px", e.offsetHeight, e.style.maxHeight = e.scrollHeight + "px";
|
|
120
120
|
let n = () => {
|
|
121
|
-
e.removeEventListener("transitionend", n),
|
|
121
|
+
e.removeEventListener("transitionend", n), L.value && (Y(), e.style.maxHeight = "", e.style.overflow = "", e.classList.remove("is-animating"), e.classList.add("is-opened"), t && (t.classList.remove("is-animating"), t.classList.add("is-opened")), B.value = !1);
|
|
122
122
|
};
|
|
123
123
|
e.addEventListener("transitionend", n);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
let e =
|
|
125
|
+
function ae() {
|
|
126
|
+
let e = W.value;
|
|
127
127
|
if (!e) return;
|
|
128
|
-
let t =
|
|
129
|
-
|
|
128
|
+
let t = K.value;
|
|
129
|
+
B.value = !0, e.classList.add("is-animating"), e.classList.remove("is-opened"), t && (t.classList.add("is-animating"), t.classList.remove("is-opened")), (e.style.maxHeight === "" || e.style.maxHeight === "none") && (e.style.maxHeight = e.scrollHeight + "px", e.offsetHeight), e.style.overflow = "hidden", e.style.maxHeight = "0px";
|
|
130
130
|
let n = () => {
|
|
131
|
-
e.removeEventListener("transitionend", n), !
|
|
131
|
+
e.removeEventListener("transitionend", n), !L.value && (Y(), e.classList.remove("is-animating"), t && t.classList.remove("is-animating"), B.value = !1);
|
|
132
132
|
};
|
|
133
133
|
e.addEventListener("transitionend", n);
|
|
134
134
|
}
|
|
135
|
-
return
|
|
136
|
-
let e =
|
|
135
|
+
return p(() => {
|
|
136
|
+
let e = W.value;
|
|
137
137
|
if (!e) return;
|
|
138
|
-
e.style.willChange = "max-height", k.noAnimation ? $(
|
|
139
|
-
let t =
|
|
140
|
-
!k.noAnimation && "ResizeObserver" in window && t && (
|
|
141
|
-
|
|
142
|
-
}),
|
|
143
|
-
}),
|
|
144
|
-
|
|
145
|
-
}), b(
|
|
138
|
+
e.style.willChange = "max-height", k.noAnimation ? $(L.value) : L.value ? Z() : Q();
|
|
139
|
+
let t = G.value;
|
|
140
|
+
!k.noAnimation && "ResizeObserver" in window && t && (q = new ResizeObserver(() => {
|
|
141
|
+
re();
|
|
142
|
+
}), q.observe(t));
|
|
143
|
+
}), te(() => {
|
|
144
|
+
Y(), q &&= (q.disconnect(), null);
|
|
145
|
+
}), b(L, (e) => {
|
|
146
146
|
if (k.noAnimation) {
|
|
147
147
|
$(e);
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
|
-
e ?
|
|
151
|
-
}), (e, t) => (
|
|
150
|
+
e ? ie() : ae();
|
|
151
|
+
}), (e, t) => (m(), o("div", u({
|
|
152
152
|
class: "s-collapsible-panel",
|
|
153
153
|
ref_key: "rootEl",
|
|
154
|
-
ref:
|
|
154
|
+
ref: K,
|
|
155
155
|
"data-density": l.density,
|
|
156
156
|
"data-surface": l.surface,
|
|
157
157
|
"data-content-padding": l.contentPadding
|
|
158
|
-
},
|
|
159
|
-
id:
|
|
158
|
+
}, _(M).bindings()), [s("div", w, [s("div", T, [c(n, {
|
|
159
|
+
id: _(R),
|
|
160
160
|
appearance: l.headerVariant === "minimal" ? "ghost" : "soft",
|
|
161
161
|
severity: "secondary",
|
|
162
162
|
shape: "row",
|
|
163
163
|
size: N.value,
|
|
164
|
+
density: P.value,
|
|
164
165
|
width: "full",
|
|
165
166
|
"content-align": "between",
|
|
166
167
|
disabled: l.disabled,
|
|
167
168
|
disclosure: {
|
|
168
|
-
expanded:
|
|
169
|
-
controls:
|
|
169
|
+
expanded: _(L),
|
|
170
|
+
controls: _(z)
|
|
170
171
|
},
|
|
171
|
-
onClick:
|
|
172
|
+
onClick: U
|
|
172
173
|
}, {
|
|
173
174
|
default: x(() => [c(r, {
|
|
174
175
|
title: l.summary,
|
|
@@ -192,22 +193,23 @@ var C = [
|
|
|
192
193
|
"id",
|
|
193
194
|
"appearance",
|
|
194
195
|
"size",
|
|
196
|
+
"density",
|
|
195
197
|
"disabled",
|
|
196
198
|
"disclosure"
|
|
197
|
-
])]), j.value ? (
|
|
198
|
-
id:
|
|
199
|
-
"aria-labelledby":
|
|
199
|
+
])]), j.value ? (m(), o("div", E, [g(e.$slots, "actions", {}, void 0, !0)])) : a("", !0)]), S(s("div", {
|
|
200
|
+
id: _(z),
|
|
201
|
+
"aria-labelledby": _(R),
|
|
200
202
|
role: "region",
|
|
201
203
|
ref_key: "contentWrapEl",
|
|
202
|
-
ref:
|
|
204
|
+
ref: W,
|
|
203
205
|
class: f(["s-collapsible-panel-content w-full min-w-0", [{ "min-h-0 flex flex-col grow overflow-y-auto overflow-x-hidden": l.fill }, { "no-transition": l.noAnimation }]]),
|
|
204
|
-
"data-open":
|
|
206
|
+
"data-open": _(L),
|
|
205
207
|
style: ee({ ...l.noAnimation ? { transition: "none" } : {} })
|
|
206
208
|
}, [s("div", {
|
|
207
209
|
ref_key: "contentInnerEl",
|
|
208
|
-
ref:
|
|
210
|
+
ref: G,
|
|
209
211
|
class: "s-collapsible-panel-inner"
|
|
210
|
-
}, [
|
|
212
|
+
}, [H.value ? g(e.$slots, "default", {}, void 0, !0, 0) : a("", !0)], 512)], 14, D), [[y, V.value]])], 16, C));
|
|
211
213
|
}
|
|
212
214
|
});
|
|
213
215
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../../assets/src/components/shared/containers/SModal.
|
|
1
|
+
import "../../../../assets/src/components/shared/containers/SModal.css_vue_type_style_index_0_src_0dc51b74_scoped_0dc51b74_lang.css";
|
|
2
2
|
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
import t from "./SModal.vue_vue_type_script_setup_true_lang.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/components/shared/containers/SModal.vue
|
|
6
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
6
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-0dc51b74"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as default };
|