@shtabapp/ui-kit 1.60.1 → 1.62.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/CHANGELOG.md +17 -0
- package/dist/{SButton-DnU_XZ1C.js → SButton-6AL2ipRT.js} +2 -2
- package/dist/{SButton-C-z_q5CG.cjs → SButton-9dLbCJvh.cjs} +1 -1
- package/dist/{SButtonGroup-Cnuo4SzC.cjs → SButtonGroup-Co1AUbsm.cjs} +1 -1
- package/dist/{SButtonGroup-BOZQSxWY.js → SButtonGroup-DPq5g7bZ.js} +1 -1
- package/dist/{SChip-XCYvlpaS.js → SChip-DN8oicUv.js} +1 -1
- package/dist/{SChip-BL47yJ-i.cjs → SChip-nzYT9SEi.cjs} +1 -1
- package/dist/{SColorPalette-CqfVzhda.cjs → SColorPalette-CqIA4Qtp.cjs} +1 -1
- package/dist/{SColorPalette-D2WCADDX.js → SColorPalette-OCu-tgZ3.js} +1 -1
- package/dist/{SColorPicker-so_XNexn.js → SColorPicker-BL-zrskU.js} +3 -3
- package/dist/{SColorPicker-DZx0q55N.cjs → SColorPicker-CvhpJEj1.cjs} +1 -1
- package/dist/{SInput-Csy2uch7.js → SInput-BLxSis1f.js} +1 -1
- package/dist/{SInput-CRAegYKS.cjs → SInput-IfbP8zrv.cjs} +1 -1
- package/dist/{SList-By6TzeID.js → SList-C39LrsoS.js} +14 -4
- package/dist/SList-Du0gqyFs.cjs +1 -0
- package/dist/{SListItem-BYMbFs2A.js → SListItem-C1IeCv8M.js} +2 -2
- package/dist/{SListItem-3IpjaE9h.cjs → SListItem-cWTuQQY-.cjs} +1 -1
- package/dist/{SPhotoEdit-BJXa6mh4.js → SPhotoEdit-CTXpy4AE.js} +1 -1
- package/dist/{SPhotoEdit-vg58q6I7.cjs → SPhotoEdit-CxYaBC3u.cjs} +1 -1
- package/dist/{SSegmentControl-Dh_HmD4Z.cjs → SSegmentControl-B9jT8Axu.cjs} +1 -1
- package/dist/{SSegmentControl-hAAYltQR.js → SSegmentControl-CAoM03V6.js} +2 -2
- package/dist/{SSelect-BZFFs_lW.js → SSelect-BkX3VuCr.js} +5 -5
- package/dist/{SSelect-C48pqmeX.cjs → SSelect-CHWKMbB_.cjs} +1 -1
- package/dist/{STab-BbzowB-Y.cjs → STab-C06drUMG.cjs} +1 -1
- package/dist/{STab-DY1TGadw.js → STab-ltjZBvbK.js} +2 -2
- package/dist/{STabs-BUafXb2Q.js → STabs-CU1lSmcH.js} +3 -3
- package/dist/{STabs-h8sm-3do.cjs → STabs-g1pGWDkl.cjs} +1 -1
- package/dist/{STag-D1mmp1kd.cjs → STag-D8xdkjVR.cjs} +1 -1
- package/dist/{STag-CluIVRKi.js → STag-DwIU1Uje.js} +1 -1
- package/dist/{STagGroup-CF2TFkb3.cjs → STagGroup-D9hENgSo.cjs} +1 -1
- package/dist/{STagGroup-GzZhto7-.js → STagGroup-DWaTQbj6.js} +1 -1
- package/dist/components/SBanner/SBanner.types.d.ts +5 -0
- package/dist/components/SBanner/SBanner.types.d.ts.map +1 -1
- package/dist/components/SBanner/SBanner.vue.d.ts.map +1 -1
- package/dist/components/SList/SList.types.d.ts +2 -2
- package/dist/components/SList/SList.types.d.ts.map +1 -1
- package/dist/components/SList/SList.vue.d.ts +7 -0
- package/dist/components/SList/SList.vue.d.ts.map +1 -1
- package/dist/components/SList/utils/resolveListItemFields.d.ts +1 -1
- package/dist/components/SList/utils/resolveListItemFields.d.ts.map +1 -1
- package/dist/components/SNotification/SNotification.types.d.ts +6 -0
- package/dist/components/SNotification/SNotification.types.d.ts.map +1 -1
- package/dist/components/SNotification/SNotification.vue.d.ts.map +1 -1
- package/dist/components/SToast/SToast.types.d.ts +5 -0
- package/dist/components/SToast/SToast.types.d.ts.map +1 -1
- package/dist/components/SToast/SToast.vue.d.ts.map +1 -1
- package/dist/components/SToastProvider/SToastProvider.vue.d.ts.map +1 -1
- package/dist/composables/useSelectionGroup.d.ts.map +1 -1
- package/dist/entries/button-group.cjs +1 -1
- package/dist/entries/button-group.js +2 -2
- package/dist/entries/button.cjs +1 -1
- package/dist/entries/button.js +1 -1
- package/dist/entries/chip.cjs +1 -1
- package/dist/entries/chip.js +1 -1
- package/dist/entries/color-palette.cjs +1 -1
- package/dist/entries/color-palette.js +1 -1
- package/dist/entries/color-picker.cjs +1 -1
- package/dist/entries/color-picker.js +2 -2
- package/dist/entries/composables.cjs +1 -1
- package/dist/entries/composables.js +2 -2
- package/dist/entries/input.cjs +1 -1
- package/dist/entries/input.js +1 -1
- package/dist/entries/list-item.cjs +1 -1
- package/dist/entries/list-item.js +1 -1
- package/dist/entries/list.cjs +1 -1
- package/dist/entries/list.js +1 -1
- package/dist/entries/photo-edit.cjs +1 -1
- package/dist/entries/photo-edit.js +1 -1
- package/dist/entries/segment-control.cjs +1 -1
- package/dist/entries/segment-control.js +1 -1
- package/dist/entries/select.cjs +1 -1
- package/dist/entries/select.js +1 -1
- package/dist/entries/tab.cjs +1 -1
- package/dist/entries/tab.js +1 -1
- package/dist/entries/tabs.cjs +1 -1
- package/dist/entries/tabs.js +2 -2
- package/dist/entries/tag-group.cjs +1 -1
- package/dist/entries/tag-group.js +2 -2
- package/dist/entries/tag.cjs +1 -1
- package/dist/entries/tag.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +194 -176
- package/dist/uikit-components.css +1 -1
- package/dist/{useSelectLink-DClG5hGA.js → useSelectLink-2aCIYmF6.js} +1 -1
- package/dist/{useSelectLink-DDdMmsJB.cjs → useSelectLink-DZIAhQ2J.cjs} +1 -1
- package/dist/{useSelectionGroup-cKj38lEN.js → useSelectionGroup-BCAmPf3R.js} +34 -28
- package/dist/{useSelectionGroup-TaektE-I.cjs → useSelectionGroup-NJvi3hNo.cjs} +1 -1
- package/package.json +3 -3
- package/dist/SList-a88nA5Qh.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { n as e, r as t, t as n } from "./SBadge-BDxQJh6c.js";
|
|
2
2
|
import { a as r, i, n as a, o, r as s, t as c } from "./SAvatar-BK8cEzGY.js";
|
|
3
|
-
import { i as l, n as u, r as d, t as f } from "./SColorPicker-
|
|
4
|
-
import { a as p, i as m, n as h, o as g, r as _, t as v } from "./SColorPalette-
|
|
3
|
+
import { i as l, n as u, r as d, t as f } from "./SColorPicker-BL-zrskU.js";
|
|
4
|
+
import { a as p, i as m, n as h, o as g, r as _, t as v } from "./SColorPalette-OCu-tgZ3.js";
|
|
5
5
|
import { a as y, i as b, r as ee } from "./colorValue-CSh0chxp.js";
|
|
6
6
|
import { n as te, t as ne } from "./SAvatarGroup-F5w88NGf.js";
|
|
7
7
|
import { n as x, r as S, t as C } from "./SButton.types-CpdHQtyx.js";
|
|
8
|
-
import { t as w } from "./SButton-
|
|
9
|
-
import { a as re, n as ie, o as ae, r as oe, t as se } from "./useSelectionGroup-
|
|
10
|
-
import { n as ce } from "./useSelectLink-
|
|
11
|
-
import { i as le, n as ue, r as de, t as fe } from "./SButtonGroup-
|
|
8
|
+
import { t as w } from "./SButton-6AL2ipRT.js";
|
|
9
|
+
import { a as re, n as ie, o as ae, r as oe, t as se } from "./useSelectionGroup-BCAmPf3R.js";
|
|
10
|
+
import { n as ce } from "./useSelectLink-2aCIYmF6.js";
|
|
11
|
+
import { i as le, n as ue, r as de, t as fe } from "./SButtonGroup-DPq5g7bZ.js";
|
|
12
12
|
import { i as pe, n as me, r as he, t as ge } from "./SCheckbox-BMkOc5cn.js";
|
|
13
13
|
import { n as _e, t as ve } from "./SCard-DgGxjBUV.js";
|
|
14
|
-
import { t as ye } from "./SSegmentControl-
|
|
15
|
-
import { n as be, r as xe, t as Se } from "./STab-
|
|
16
|
-
import { t as Ce } from "./STabs-
|
|
14
|
+
import { t as ye } from "./SSegmentControl-CAoM03V6.js";
|
|
15
|
+
import { n as be, r as xe, t as Se } from "./STab-ltjZBvbK.js";
|
|
16
|
+
import { t as Ce } from "./STabs-CU1lSmcH.js";
|
|
17
17
|
import { i as we, n as Te, r as Ee, t as De } from "./useFloatingOverlay-QcumEYEq.js";
|
|
18
|
-
import { n as Oe, r as ke, t as Ae } from "./STag-
|
|
19
|
-
import { t as je } from "./STagGroup-
|
|
20
|
-
import { n as Me, r as Ne, t as Pe } from "./SChip-
|
|
18
|
+
import { n as Oe, r as ke, t as Ae } from "./STag-DwIU1Uje.js";
|
|
19
|
+
import { t as je } from "./STagGroup-DWaTQbj6.js";
|
|
20
|
+
import { n as Me, r as Ne, t as Pe } from "./SChip-DN8oicUv.js";
|
|
21
21
|
import { n as Fe, t as Ie } from "./SDropdown-LOTCtlCX.js";
|
|
22
|
-
import { n as Le, r as Re, t as ze } from "./SSelect-
|
|
23
|
-
import { n as Be, t as Ve } from "./SInput-
|
|
22
|
+
import { n as Le, r as Re, t as ze } from "./SSelect-BkX3VuCr.js";
|
|
23
|
+
import { n as Be, t as Ve } from "./SInput-BLxSis1f.js";
|
|
24
24
|
import { n as He, t as Ue } from "./SInlineMessage-Dirk5RwO.js";
|
|
25
25
|
import { n as We, r as Ge, t as Ke } from "./SLabel-FHHPlcKq.js";
|
|
26
|
-
import { a as qe, o as Je, s as Ye, t as Xe } from "./SList-
|
|
27
|
-
import { n as Ze, t as Qe } from "./SListItem-
|
|
26
|
+
import { a as qe, o as Je, s as Ye, t as Xe } from "./SList-C39LrsoS.js";
|
|
27
|
+
import { n as Ze, t as Qe } from "./SListItem-C1IeCv8M.js";
|
|
28
28
|
import { n as $e, t as et } from "./SRadio-D6_Pd6XX.js";
|
|
29
29
|
import { n as tt, r as nt, t as rt } from "./SToggle-sGw-LSNd.js";
|
|
30
30
|
import { n as it, t as at } from "./SInlineInput-DO_glYxP.js";
|
|
31
31
|
import { t as ot } from "./STextarea-BDyy7Ku5.js";
|
|
32
|
-
import { n as st, r as ct, t as lt } from "./SPhotoEdit-
|
|
32
|
+
import { n as st, r as ct, t as lt } from "./SPhotoEdit-CTXpy4AE.js";
|
|
33
33
|
import { a as ut, i as dt, n as ft, r as pt, t as mt, v as T, w as E } from "./SChartSkeletonHost-BT96eWSF.js";
|
|
34
34
|
import { t as ht } from "./SChartLine-DSQaezYq.js";
|
|
35
35
|
import { t as gt } from "./resolveSeriesPaletteColor-BdvGT-PI.js";
|
|
@@ -43,13 +43,13 @@ import { t as Ct } from "./SChartProgress-BtwqE4xL.js";
|
|
|
43
43
|
import { t as wt } from "./SChartLegend-oZoF8XK7.js";
|
|
44
44
|
import { t as Tt } from "./useHasListener-RSjlUyqH.js";
|
|
45
45
|
import { a as Et, c as Dt, i as Ot, l as kt, n as At, o as jt, r as Mt, s as Nt, t as Pt, u as Ft } from "./buildWorkTimeLegendItems-ChGHTwbn.js";
|
|
46
|
-
import { Fragment as It, Teleport as Lt, computed as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createSlots as
|
|
47
|
-
import { ESIconName as
|
|
48
|
-
import { useResizeObserver as
|
|
46
|
+
import { Fragment as It, Teleport as Lt, computed as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createSlots as M, createTextVNode as N, createVNode as Rt, defineComponent as P, mergeModels as zt, mergeProps as Bt, normalizeClass as F, normalizeStyle as I, onMounted as Vt, openBlock as L, ref as R, renderList as Ht, renderSlot as z, resolveDynamicComponent as Ut, shallowRef as B, toDisplayString as V, unref as H, useModel as Wt, useSlots as U, useTemplateRef as W, watch as Gt, withCtx as G } from "vue";
|
|
47
|
+
import { ESIconName as K, SIcon as Kt, createUiKit as qt, setUiKitLocale as Jt, uiKitLocaleEn as Yt, uiKitLocaleRu as Xt, useUiKitI18n as Zt, useUiKitI18n as Qt } from "@shtabapp/ui-kit-primitives";
|
|
48
|
+
import { useResizeObserver as $t } from "@vueuse/core";
|
|
49
49
|
export * from "@shtabapp/ui-kit-primitives";
|
|
50
50
|
export * from "@shtabapp/ui-kit-tokens";
|
|
51
51
|
//#region src/utils/chart/segmentedBar/resolveSegmentedBarSegmentColor.ts
|
|
52
|
-
var
|
|
52
|
+
var en = [
|
|
53
53
|
"--s-ui-chart-segmented-bar-palette-1",
|
|
54
54
|
"--s-ui-chart-segmented-bar-palette-2",
|
|
55
55
|
"--s-ui-chart-segmented-bar-palette-3",
|
|
@@ -58,7 +58,7 @@ var G = [
|
|
|
58
58
|
"--s-ui-chart-segmented-bar-palette-6",
|
|
59
59
|
"--s-ui-chart-segmented-bar-palette-7",
|
|
60
60
|
"--s-ui-chart-segmented-bar-palette-8"
|
|
61
|
-
],
|
|
61
|
+
], tn = [
|
|
62
62
|
"--s-ui-chart-segmented-bar-skeleton-palette-1",
|
|
63
63
|
"--s-ui-chart-segmented-bar-skeleton-palette-2",
|
|
64
64
|
"--s-ui-chart-segmented-bar-skeleton-palette-3",
|
|
@@ -68,10 +68,10 @@ var G = [
|
|
|
68
68
|
"--s-ui-chart-segmented-bar-skeleton-palette-7",
|
|
69
69
|
"--s-ui-chart-segmented-bar-skeleton-palette-8"
|
|
70
70
|
], nn = (e, t, n, r = !1) => gt(e, t, n, r, {
|
|
71
|
-
palette:
|
|
72
|
-
paletteFallback:
|
|
73
|
-
skeletonPalette:
|
|
74
|
-
skeletonFallback:
|
|
71
|
+
palette: en,
|
|
72
|
+
paletteFallback: en[0],
|
|
73
|
+
skeletonPalette: tn,
|
|
74
|
+
skeletonFallback: tn[0]
|
|
75
75
|
}), q = /* @__PURE__ */ function(e) {
|
|
76
76
|
return e.INFO_ACCENT = "info-accent", e.INFO_NORMAL = "info-normal", e.SUCCESS = "success", e.WARNING = "warning", e.DANGER = "danger", e.BILLING = "billing", e;
|
|
77
77
|
}({}), J = /* @__PURE__ */ function(e) {
|
|
@@ -81,31 +81,31 @@ var G = [
|
|
|
81
81
|
}({}), X = /* @__PURE__ */ function(e) {
|
|
82
82
|
return e.BANNER = "banner", e.TOAST = "toast", e;
|
|
83
83
|
}({}), rn = {
|
|
84
|
-
[q.INFO_ACCENT]:
|
|
85
|
-
[q.INFO_NORMAL]:
|
|
86
|
-
[q.SUCCESS]:
|
|
87
|
-
[q.WARNING]:
|
|
88
|
-
[q.DANGER]:
|
|
89
|
-
[q.BILLING]:
|
|
84
|
+
[q.INFO_ACCENT]: K.infoCircle,
|
|
85
|
+
[q.INFO_NORMAL]: K.infoCircle,
|
|
86
|
+
[q.SUCCESS]: K.checkCircle,
|
|
87
|
+
[q.WARNING]: K.alertCircle,
|
|
88
|
+
[q.DANGER]: K.dangerCircleFill,
|
|
89
|
+
[q.BILLING]: K.infoCircle
|
|
90
90
|
}, an = (e, t) => t || rn[e], on = ["role"], sn = { class: "s-ui-notification__body" }, cn = {
|
|
91
91
|
key: 0,
|
|
92
92
|
class: "s-ui-notification__leftside"
|
|
93
93
|
}, ln = {
|
|
94
94
|
key: 0,
|
|
95
95
|
class: "s-ui-notification__icon"
|
|
96
|
-
}, un = { class: "s-ui-notification__content" }, dn = { class: "s-ui-notification__title-row" }, fn = {
|
|
96
|
+
}, un = { class: "s-ui-notification__content" }, dn = { class: "s-ui-notification__title-row" }, fn = {
|
|
97
97
|
key: 0,
|
|
98
98
|
class: "s-ui-notification__description-block"
|
|
99
|
-
},
|
|
99
|
+
}, pn = {
|
|
100
100
|
key: 0,
|
|
101
101
|
class: "s-ui-notification__description s-ui-typography-label-12-medium"
|
|
102
|
-
},
|
|
102
|
+
}, mn = {
|
|
103
103
|
key: 1,
|
|
104
104
|
class: "s-ui-notification__actions-stack"
|
|
105
|
-
},
|
|
105
|
+
}, hn = {
|
|
106
106
|
key: 1,
|
|
107
107
|
class: "s-ui-notification__actions-row"
|
|
108
|
-
},
|
|
108
|
+
}, gn = /* @__PURE__ */ P({
|
|
109
109
|
__name: "SNotification",
|
|
110
110
|
props: {
|
|
111
111
|
type: { default: () => q.INFO_ACCENT },
|
|
@@ -129,7 +129,11 @@ var G = [
|
|
|
129
129
|
icon: {},
|
|
130
130
|
avatar: {},
|
|
131
131
|
width: {},
|
|
132
|
-
maxWidth: {}
|
|
132
|
+
maxWidth: {},
|
|
133
|
+
truncateTitle: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: !1
|
|
136
|
+
}
|
|
133
137
|
},
|
|
134
138
|
emits: [
|
|
135
139
|
"close",
|
|
@@ -138,7 +142,7 @@ var G = [
|
|
|
138
142
|
"secondaryAction"
|
|
139
143
|
],
|
|
140
144
|
setup(e, { emit: t }) {
|
|
141
|
-
let n = t, r =
|
|
145
|
+
let n = t, r = U(), i = D(() => [
|
|
142
146
|
`s-ui-notification--type-${e.type}`,
|
|
143
147
|
`s-ui-notification--layout-${e.layout}`,
|
|
144
148
|
`s-ui-notification--surface-${e.surface}`
|
|
@@ -154,21 +158,21 @@ var G = [
|
|
|
154
158
|
}, b = () => {
|
|
155
159
|
n("secondaryAction");
|
|
156
160
|
};
|
|
157
|
-
return (t, n) => (
|
|
158
|
-
class:
|
|
159
|
-
style:
|
|
161
|
+
return (t, n) => (L(), A("div", {
|
|
162
|
+
class: F(["s-ui-notification", i.value]),
|
|
163
|
+
style: I(a.value),
|
|
160
164
|
role: s.value
|
|
161
165
|
}, [j("div", sn, [
|
|
162
|
-
d.value ? (
|
|
166
|
+
d.value ? (L(), A("div", cn, [e.leftside === H(Y).ICON ? (L(), A("div", ln, [Rt(H(Kt), {
|
|
163
167
|
name: l.value,
|
|
164
168
|
size: 16,
|
|
165
169
|
billing: u.value
|
|
166
|
-
}, null, 8, ["name", "billing"])])) : e.leftside ===
|
|
170
|
+
}, null, 8, ["name", "billing"])])) : e.leftside === H(Y).AVATAR && e.avatar ? (L(), O(H(c), {
|
|
167
171
|
key: 1,
|
|
168
172
|
name: e.avatar.name,
|
|
169
173
|
src: e.avatar.src,
|
|
170
174
|
badge: e.avatar.badge,
|
|
171
|
-
size:
|
|
175
|
+
size: H(o).SIZE_20,
|
|
172
176
|
showName: !1
|
|
173
177
|
}, null, 8, [
|
|
174
178
|
"name",
|
|
@@ -177,12 +181,12 @@ var G = [
|
|
|
177
181
|
"size"
|
|
178
182
|
])) : k("", !0)])) : k("", !0),
|
|
179
183
|
j("div", un, [
|
|
180
|
-
j("div", dn, [j("span",
|
|
184
|
+
j("div", dn, [j("span", { class: F(["s-ui-notification__title s-ui-typography-label-14-medium", { "s-ui-notification__title--truncated": e.truncateTitle }]) }, [z(t.$slots, "title", {}, () => [N(V(e.title), 1)])], 2), e.layout === H(J).VERTICAL && e.closable ? (L(), O(H(w), {
|
|
181
185
|
key: 0,
|
|
182
186
|
class: "s-ui-notification__close",
|
|
183
|
-
appearance:
|
|
184
|
-
variant:
|
|
185
|
-
size:
|
|
187
|
+
appearance: H(C).BARE,
|
|
188
|
+
variant: H(S).NEUTRAL,
|
|
189
|
+
size: H(x).SMALL,
|
|
186
190
|
"aria-label": e.closeAriaLabel,
|
|
187
191
|
icon: "closeMini",
|
|
188
192
|
onClick: _
|
|
@@ -192,42 +196,42 @@ var G = [
|
|
|
192
196
|
"size",
|
|
193
197
|
"aria-label"
|
|
194
198
|
])) : k("", !0)]),
|
|
195
|
-
f.value ? (
|
|
199
|
+
f.value ? (L(), A("div", fn, [e.description || H(r).description ? (L(), A("span", pn, [z(t.$slots, "description", {}, () => [N(V(e.description), 1)])])) : k("", !0), e.linkText ? (L(), O(H(w), {
|
|
196
200
|
key: 1,
|
|
197
201
|
class: "s-ui-notification__link",
|
|
198
|
-
appearance:
|
|
199
|
-
variant:
|
|
200
|
-
size:
|
|
202
|
+
appearance: H(C).BARE,
|
|
203
|
+
variant: H(S).MAIN,
|
|
204
|
+
size: H(x).SMALL,
|
|
201
205
|
onClick: v
|
|
202
206
|
}, {
|
|
203
|
-
default:
|
|
207
|
+
default: G(() => [N(V(e.linkText), 1)]),
|
|
204
208
|
_: 1
|
|
205
209
|
}, 8, [
|
|
206
210
|
"appearance",
|
|
207
211
|
"variant",
|
|
208
212
|
"size"
|
|
209
213
|
])) : k("", !0)])) : k("", !0),
|
|
210
|
-
e.layout ===
|
|
214
|
+
e.layout === H(J).VERTICAL && p.value ? (L(), A("div", mn, [e.showPrimaryButton && e.primaryButtonText ? (L(), O(H(w), {
|
|
211
215
|
key: 0,
|
|
212
216
|
appearance: h.value,
|
|
213
217
|
variant: g.value,
|
|
214
|
-
size:
|
|
218
|
+
size: H(x).SMALL,
|
|
215
219
|
onClick: y
|
|
216
220
|
}, {
|
|
217
|
-
default:
|
|
221
|
+
default: G(() => [N(V(e.primaryButtonText), 1)]),
|
|
218
222
|
_: 1
|
|
219
223
|
}, 8, [
|
|
220
224
|
"appearance",
|
|
221
225
|
"variant",
|
|
222
226
|
"size"
|
|
223
|
-
])) : k("", !0), e.showPrimaryButton && e.secondaryButtonText ? (
|
|
227
|
+
])) : k("", !0), e.showPrimaryButton && e.secondaryButtonText ? (L(), O(H(w), {
|
|
224
228
|
key: 1,
|
|
225
|
-
appearance:
|
|
226
|
-
variant:
|
|
227
|
-
size:
|
|
229
|
+
appearance: H(C).BARE,
|
|
230
|
+
variant: H(S).NEUTRAL,
|
|
231
|
+
size: H(x).SMALL,
|
|
228
232
|
onClick: b
|
|
229
233
|
}, {
|
|
230
|
-
default:
|
|
234
|
+
default: G(() => [N(V(e.secondaryButtonText), 1)]),
|
|
231
235
|
_: 1
|
|
232
236
|
}, 8, [
|
|
233
237
|
"appearance",
|
|
@@ -235,25 +239,25 @@ var G = [
|
|
|
235
239
|
"size"
|
|
236
240
|
])) : k("", !0)])) : k("", !0)
|
|
237
241
|
]),
|
|
238
|
-
e.layout ===
|
|
242
|
+
e.layout === H(J).HORIZONTAL && m.value ? (L(), A("div", hn, [e.showPrimaryButton && e.primaryButtonText ? (L(), O(H(w), {
|
|
239
243
|
key: 0,
|
|
240
244
|
appearance: h.value,
|
|
241
245
|
variant: g.value,
|
|
242
|
-
size:
|
|
246
|
+
size: H(x).SMALL,
|
|
243
247
|
onClick: y
|
|
244
248
|
}, {
|
|
245
|
-
default:
|
|
249
|
+
default: G(() => [N(V(e.primaryButtonText), 1)]),
|
|
246
250
|
_: 1
|
|
247
251
|
}, 8, [
|
|
248
252
|
"appearance",
|
|
249
253
|
"variant",
|
|
250
254
|
"size"
|
|
251
|
-
])) : k("", !0), e.layout ===
|
|
255
|
+
])) : k("", !0), e.layout === H(J).HORIZONTAL && e.closable ? (L(), O(H(w), {
|
|
252
256
|
key: 1,
|
|
253
257
|
class: "s-ui-notification__close",
|
|
254
|
-
appearance:
|
|
255
|
-
variant:
|
|
256
|
-
size:
|
|
258
|
+
appearance: H(C).BARE,
|
|
259
|
+
variant: H(S).NEUTRAL,
|
|
260
|
+
size: H(x).SMALL,
|
|
257
261
|
"aria-label": e.closeAriaLabel,
|
|
258
262
|
icon: "closeMini",
|
|
259
263
|
onClick: _
|
|
@@ -265,7 +269,7 @@ var G = [
|
|
|
265
269
|
])) : k("", !0)])) : k("", !0)
|
|
266
270
|
])], 14, on));
|
|
267
271
|
}
|
|
268
|
-
}),
|
|
272
|
+
}), _n = /* @__PURE__ */ P({
|
|
269
273
|
__name: "SBanner",
|
|
270
274
|
props: {
|
|
271
275
|
type: { default: () => q.INFO_ACCENT },
|
|
@@ -287,7 +291,11 @@ var G = [
|
|
|
287
291
|
closeAriaLabel: { default: "" },
|
|
288
292
|
icon: {},
|
|
289
293
|
avatar: {},
|
|
290
|
-
maxWidth: {}
|
|
294
|
+
maxWidth: {},
|
|
295
|
+
truncateTitle: {
|
|
296
|
+
type: Boolean,
|
|
297
|
+
default: !1
|
|
298
|
+
}
|
|
291
299
|
},
|
|
292
300
|
emits: [
|
|
293
301
|
"close",
|
|
@@ -296,14 +304,14 @@ var G = [
|
|
|
296
304
|
"secondaryAction"
|
|
297
305
|
],
|
|
298
306
|
setup(e, { emit: t }) {
|
|
299
|
-
let n = t, r =
|
|
300
|
-
return (t, i) => (
|
|
307
|
+
let n = t, r = U();
|
|
308
|
+
return (t, i) => (L(), O(gn, {
|
|
301
309
|
class: "s-ui-banner",
|
|
302
310
|
"data-qa": "ui:banner",
|
|
303
311
|
type: e.type,
|
|
304
312
|
layout: e.layout,
|
|
305
313
|
leftside: e.leftside,
|
|
306
|
-
surface:
|
|
314
|
+
surface: H(X).BANNER,
|
|
307
315
|
title: e.title,
|
|
308
316
|
description: e.description,
|
|
309
317
|
linkText: e.linkText,
|
|
@@ -315,17 +323,18 @@ var G = [
|
|
|
315
323
|
icon: e.icon,
|
|
316
324
|
avatar: e.avatar,
|
|
317
325
|
maxWidth: e.maxWidth,
|
|
326
|
+
truncateTitle: e.truncateTitle,
|
|
318
327
|
onClose: i[0] ||= (e) => n("close"),
|
|
319
328
|
onLinkClick: i[1] ||= (e) => n("linkClick"),
|
|
320
329
|
onPrimaryAction: i[2] ||= (e) => n("primaryAction"),
|
|
321
330
|
onSecondaryAction: i[3] ||= (e) => n("secondaryAction")
|
|
322
|
-
},
|
|
331
|
+
}, M({ _: 2 }, [H(r).title ? {
|
|
323
332
|
name: "title",
|
|
324
|
-
fn:
|
|
333
|
+
fn: G(() => [z(t.$slots, "title")]),
|
|
325
334
|
key: "0"
|
|
326
|
-
} : void 0,
|
|
335
|
+
} : void 0, H(r).description ? {
|
|
327
336
|
name: "description",
|
|
328
|
-
fn:
|
|
337
|
+
fn: G(() => [z(t.$slots, "description")]),
|
|
329
338
|
key: "1"
|
|
330
339
|
} : void 0]), 1032, [
|
|
331
340
|
"type",
|
|
@@ -342,10 +351,11 @@ var G = [
|
|
|
342
351
|
"closeAriaLabel",
|
|
343
352
|
"icon",
|
|
344
353
|
"avatar",
|
|
345
|
-
"maxWidth"
|
|
354
|
+
"maxWidth",
|
|
355
|
+
"truncateTitle"
|
|
346
356
|
]));
|
|
347
357
|
}
|
|
348
|
-
}),
|
|
358
|
+
}), vn = /* @__PURE__ */ P({
|
|
349
359
|
__name: "SToast",
|
|
350
360
|
props: {
|
|
351
361
|
type: { default: () => q.INFO_ACCENT },
|
|
@@ -367,7 +377,11 @@ var G = [
|
|
|
367
377
|
closeAriaLabel: { default: "" },
|
|
368
378
|
icon: {},
|
|
369
379
|
avatar: {},
|
|
370
|
-
width: {}
|
|
380
|
+
width: {},
|
|
381
|
+
truncateTitle: {
|
|
382
|
+
type: Boolean,
|
|
383
|
+
default: !1
|
|
384
|
+
}
|
|
371
385
|
},
|
|
372
386
|
emits: [
|
|
373
387
|
"close",
|
|
@@ -376,14 +390,14 @@ var G = [
|
|
|
376
390
|
"secondaryAction"
|
|
377
391
|
],
|
|
378
392
|
setup(e, { emit: t }) {
|
|
379
|
-
let n = t, r =
|
|
380
|
-
return (t, a) => (
|
|
393
|
+
let n = t, r = U(), i = D(() => e.width ?? 360);
|
|
394
|
+
return (t, a) => (L(), O(gn, {
|
|
381
395
|
class: "s-ui-toast",
|
|
382
396
|
"data-qa": "ui:toast",
|
|
383
397
|
type: e.type,
|
|
384
398
|
layout: e.layout,
|
|
385
399
|
leftside: e.leftside,
|
|
386
|
-
surface:
|
|
400
|
+
surface: H(X).TOAST,
|
|
387
401
|
title: e.title,
|
|
388
402
|
description: e.description,
|
|
389
403
|
linkText: e.linkText,
|
|
@@ -395,17 +409,18 @@ var G = [
|
|
|
395
409
|
icon: e.icon,
|
|
396
410
|
avatar: e.avatar,
|
|
397
411
|
width: i.value,
|
|
412
|
+
truncateTitle: e.truncateTitle,
|
|
398
413
|
onClose: a[0] ||= (e) => n("close"),
|
|
399
414
|
onLinkClick: a[1] ||= (e) => n("linkClick"),
|
|
400
415
|
onPrimaryAction: a[2] ||= (e) => n("primaryAction"),
|
|
401
416
|
onSecondaryAction: a[3] ||= (e) => n("secondaryAction")
|
|
402
|
-
},
|
|
417
|
+
}, M({ _: 2 }, [H(r).title ? {
|
|
403
418
|
name: "title",
|
|
404
|
-
fn:
|
|
419
|
+
fn: G(() => [z(t.$slots, "title")]),
|
|
405
420
|
key: "0"
|
|
406
|
-
} : void 0,
|
|
421
|
+
} : void 0, H(r).description ? {
|
|
407
422
|
name: "description",
|
|
408
|
-
fn:
|
|
423
|
+
fn: G(() => [z(t.$slots, "description")]),
|
|
409
424
|
key: "1"
|
|
410
425
|
} : void 0]), 1032, [
|
|
411
426
|
"type",
|
|
@@ -422,16 +437,17 @@ var G = [
|
|
|
422
437
|
"closeAriaLabel",
|
|
423
438
|
"icon",
|
|
424
439
|
"avatar",
|
|
425
|
-
"width"
|
|
440
|
+
"width",
|
|
441
|
+
"truncateTitle"
|
|
426
442
|
]));
|
|
427
443
|
}
|
|
428
|
-
}),
|
|
444
|
+
}), yn = .05, bn = [
|
|
429
445
|
"data-mounted",
|
|
430
446
|
"data-front",
|
|
431
447
|
"data-expanded",
|
|
432
448
|
"data-removed",
|
|
433
449
|
"data-visible"
|
|
434
|
-
],
|
|
450
|
+
], xn = /* @__PURE__ */ P({
|
|
435
451
|
__name: "SToastProviderToast",
|
|
436
452
|
props: {
|
|
437
453
|
index: {},
|
|
@@ -444,7 +460,7 @@ var G = [
|
|
|
444
460
|
},
|
|
445
461
|
emits: ["heightChange"],
|
|
446
462
|
setup(e, { emit: t }) {
|
|
447
|
-
let n = t, r =
|
|
463
|
+
let n = t, r = R(null), i = R(0), a = R(!1), o = D(() => e.index === 0), s = D(() => 1 - e.index * yn), c = D(() => ({
|
|
448
464
|
"--s-ui-toast-provider-toasts-before": String(e.index),
|
|
449
465
|
"--s-ui-toast-provider-lift-amount": `${e.stackPeek * -1}px`,
|
|
450
466
|
"--s-ui-toast-provider-front-toast-height": `${e.frontToastHeight}px`,
|
|
@@ -453,71 +469,71 @@ var G = [
|
|
|
453
469
|
"--s-ui-toast-provider-stack-scale": String(s.value),
|
|
454
470
|
zIndex: String(1e3 - e.index)
|
|
455
471
|
}));
|
|
456
|
-
return
|
|
472
|
+
return $t(r, (e) => {
|
|
457
473
|
let t = e[0]?.contentRect.height ?? 0;
|
|
458
474
|
t !== i.value && (i.value = t, n("heightChange", t));
|
|
459
|
-
}),
|
|
475
|
+
}), Vt(() => {
|
|
460
476
|
requestAnimationFrame(() => {
|
|
461
477
|
requestAnimationFrame(() => {
|
|
462
478
|
a.value = !0;
|
|
463
479
|
});
|
|
464
480
|
});
|
|
465
|
-
}), (t, n) => (
|
|
481
|
+
}), (t, n) => (L(), A("div", {
|
|
466
482
|
class: "s-ui-toast-provider__toast",
|
|
467
483
|
"data-mounted": a.value,
|
|
468
484
|
"data-front": o.value,
|
|
469
485
|
"data-expanded": e.expanded,
|
|
470
486
|
"data-removed": e.removed,
|
|
471
487
|
"data-visible": e.visible,
|
|
472
|
-
style:
|
|
488
|
+
style: I(c.value)
|
|
473
489
|
}, [j("div", {
|
|
474
490
|
ref_key: "contentRef",
|
|
475
491
|
ref: r,
|
|
476
492
|
class: "s-ui-toast-provider__toast-content"
|
|
477
|
-
}, [
|
|
493
|
+
}, [z(t.$slots, "default")], 512)], 12, bn));
|
|
478
494
|
}
|
|
479
|
-
}),
|
|
480
|
-
let n =
|
|
481
|
-
return n > 1e4 ?
|
|
482
|
-
}, Z =
|
|
495
|
+
}), Sn = 4e3, Cn = 1e4, wn = 50, Tn = (e, t) => {
|
|
496
|
+
let n = Sn + (e.length + (t?.length ?? 0)) * 50;
|
|
497
|
+
return n > 1e4 ? Cn : n;
|
|
498
|
+
}, Z = B([]), Q = /* @__PURE__ */ new Map(), En = 0, Dn = {
|
|
483
499
|
type: q.INFO_ACCENT,
|
|
484
500
|
layout: J.HORIZONTAL,
|
|
485
501
|
leftside: Y.ICON,
|
|
486
502
|
showPrimaryButton: !1,
|
|
487
503
|
closable: !0
|
|
488
|
-
},
|
|
504
|
+
}, On = () => `toast-${Date.now()}-${++En}`, $ = (e) => {
|
|
489
505
|
let t = Q.get(e);
|
|
490
506
|
t && (window.clearTimeout(t), Q.delete(e));
|
|
491
|
-
},
|
|
507
|
+
}, kn = (e) => {
|
|
492
508
|
$(e.id);
|
|
493
|
-
let t = e.duration === void 0 ?
|
|
509
|
+
let t = e.duration === void 0 ? Tn(e.title, e.description) : e.duration;
|
|
494
510
|
if (t > 0) {
|
|
495
511
|
let n = window.setTimeout(() => {
|
|
496
|
-
|
|
512
|
+
An(e.id);
|
|
497
513
|
}, t);
|
|
498
514
|
Q.set(e.id, n);
|
|
499
515
|
}
|
|
500
|
-
},
|
|
516
|
+
}, An = (e) => {
|
|
501
517
|
let t = Z.value.findIndex((t) => t.id === e);
|
|
502
518
|
if (t === -1) return;
|
|
503
519
|
let n = Z.value[t];
|
|
504
520
|
n && ($(e), n.onClose && n.onClose(), Z.value = Z.value.filter((t) => t.id !== e));
|
|
505
|
-
},
|
|
521
|
+
}, jn = () => {
|
|
506
522
|
Q.forEach((e) => window.clearTimeout(e)), Q.clear(), Z.value = [];
|
|
507
|
-
},
|
|
523
|
+
}, Mn = (e) => e.length <= 3 ? e : (e.slice(3).forEach((e) => {
|
|
508
524
|
$(e.id);
|
|
509
|
-
}), e.slice(0, 3)),
|
|
510
|
-
let t = e.id ??
|
|
511
|
-
...
|
|
525
|
+
}), e.slice(0, 3)), Nn = (e) => {
|
|
526
|
+
let t = e.id ?? On(), n = {
|
|
527
|
+
...Dn,
|
|
512
528
|
...e,
|
|
513
529
|
id: t
|
|
514
530
|
}, r = Z.value.findIndex((e) => e.id === t);
|
|
515
531
|
if (r > -1) {
|
|
516
532
|
let e = [...Z.value];
|
|
517
|
-
e[r] = n, Z.value =
|
|
518
|
-
} else Z.value =
|
|
519
|
-
return
|
|
520
|
-
},
|
|
533
|
+
e[r] = n, Z.value = Mn(e);
|
|
534
|
+
} else Z.value = Mn([n, ...Z.value]);
|
|
535
|
+
return kn(n), t;
|
|
536
|
+
}, Pn = (e, t) => {
|
|
521
537
|
let n = Z.value.findIndex((t) => t.id === e);
|
|
522
538
|
if (n === -1) return;
|
|
523
539
|
let r = Z.value[n];
|
|
@@ -527,18 +543,18 @@ var G = [
|
|
|
527
543
|
...t,
|
|
528
544
|
id: r.id
|
|
529
545
|
}, a = [...Z.value];
|
|
530
|
-
a[n] = i, Z.value = a,
|
|
531
|
-
},
|
|
546
|
+
a[n] = i, Z.value = a, kn(i);
|
|
547
|
+
}, Fn = () => ({
|
|
532
548
|
toasts: Z,
|
|
533
|
-
show:
|
|
534
|
-
hide:
|
|
535
|
-
hideAll:
|
|
536
|
-
update:
|
|
537
|
-
}),
|
|
549
|
+
show: Nn,
|
|
550
|
+
hide: An,
|
|
551
|
+
hideAll: jn,
|
|
552
|
+
update: Pn
|
|
553
|
+
}), In = /* @__PURE__ */ P({
|
|
538
554
|
__name: "SToastProvider",
|
|
539
555
|
setup(e) {
|
|
540
|
-
let { toasts: t, hide: n } =
|
|
541
|
-
|
|
556
|
+
let { toasts: t, hide: n } = Fn(), r = D(() => t.value.slice(0, 3)), i = R(!1), a = B({}), o = R(/* @__PURE__ */ new Set()), s = D(() => t.value[0] ?? null), c = D(() => s.value ? a.value[s.value.id] ?? 0 : 0), l = R(0), u = D(() => c.value > 0 ? c.value : l.value);
|
|
557
|
+
Gt(c, (e) => {
|
|
542
558
|
e > 0 && (l.value = e);
|
|
543
559
|
});
|
|
544
560
|
let d = D(() => {
|
|
@@ -580,32 +596,32 @@ var G = [
|
|
|
580
596
|
}, b = (e) => {
|
|
581
597
|
e.onSecondaryAction && e.onSecondaryAction();
|
|
582
598
|
};
|
|
583
|
-
return (e, t) => (
|
|
599
|
+
return (e, t) => (L(), O(Lt, { to: "body" }, [j("div", {
|
|
584
600
|
class: "s-ui-toast-provider",
|
|
585
601
|
onMouseenter: m,
|
|
586
602
|
onMouseleave: h
|
|
587
|
-
}, [r.value.length > 0 ? (
|
|
603
|
+
}, [r.value.length > 0 ? (L(), A("div", {
|
|
588
604
|
key: 0,
|
|
589
605
|
class: "s-ui-toast-provider__list",
|
|
590
|
-
style:
|
|
591
|
-
}, [(
|
|
606
|
+
style: I(d.value)
|
|
607
|
+
}, [(L(!0), A(It, null, Ht(r.value, (t, n) => (L(), O(xn, {
|
|
592
608
|
key: t.id,
|
|
593
609
|
index: n,
|
|
594
610
|
expanded: i.value,
|
|
595
611
|
"front-toast-height": u.value,
|
|
596
|
-
"stack-peek":
|
|
612
|
+
"stack-peek": H(10),
|
|
597
613
|
removed: p(t.id),
|
|
598
|
-
visible: n <
|
|
614
|
+
visible: n < H(3),
|
|
599
615
|
"offset-y": f(n),
|
|
600
616
|
onHeightChange: (e) => g(t.id, e)
|
|
601
617
|
}, {
|
|
602
|
-
default:
|
|
618
|
+
default: G(() => [z(e.$slots, "toast", { toast: t }, () => [t.component ? (L(), O(Ut(t.component), Bt({
|
|
603
619
|
key: 0,
|
|
604
620
|
ref_for: !0
|
|
605
621
|
}, t.componentProps, {
|
|
606
622
|
toast: t,
|
|
607
623
|
onClose: (e) => _(t.id)
|
|
608
|
-
}), null, 16, ["toast", "onClose"])) : (
|
|
624
|
+
}), null, 16, ["toast", "onClose"])) : (L(), O(H(vn), {
|
|
609
625
|
key: 1,
|
|
610
626
|
type: t.type,
|
|
611
627
|
layout: t.layout,
|
|
@@ -621,6 +637,7 @@ var G = [
|
|
|
621
637
|
icon: t.icon,
|
|
622
638
|
avatar: t.avatar,
|
|
623
639
|
width: t.width,
|
|
640
|
+
truncateTitle: t.truncateTitle,
|
|
624
641
|
onClose: (e) => _(t.id),
|
|
625
642
|
onLinkClick: (e) => v(t),
|
|
626
643
|
onPrimaryAction: (e) => y(t),
|
|
@@ -640,6 +657,7 @@ var G = [
|
|
|
640
657
|
"icon",
|
|
641
658
|
"avatar",
|
|
642
659
|
"width",
|
|
660
|
+
"truncateTitle",
|
|
643
661
|
"onClose",
|
|
644
662
|
"onLinkClick",
|
|
645
663
|
"onPrimaryAction",
|
|
@@ -657,10 +675,10 @@ var G = [
|
|
|
657
675
|
"onHeightChange"
|
|
658
676
|
]))), 128))], 4)) : k("", !0)], 32)]));
|
|
659
677
|
}
|
|
660
|
-
}),
|
|
678
|
+
}), Ln = 4, Rn = 4, zn = 1, Bn = "400 12px var(--s-ui-font-family-label)", Vn = 4, Hn = (e, t, n, r, i, a) => {
|
|
661
679
|
let o = Math.min(a, r / 2, i / 2);
|
|
662
680
|
e.beginPath(), e.moveTo(t + o, n), e.lineTo(t + r - o, n), e.arcTo(t + r, n, t + r, n + o, o), e.lineTo(t + r, n + i - o), e.arcTo(t + r, n + i, t + r - o, n + i, o), e.lineTo(t + o, n + i), e.arcTo(t, n + i, t, n + i - o, o), e.lineTo(t, n + o), e.arcTo(t, n, t + o, n, o), e.closePath();
|
|
663
|
-
},
|
|
681
|
+
}, Un = (e) => {
|
|
664
682
|
let t = e.getProps([
|
|
665
683
|
"x",
|
|
666
684
|
"y",
|
|
@@ -671,14 +689,14 @@ var G = [
|
|
|
671
689
|
width: Math.abs(n - i),
|
|
672
690
|
centerY: r
|
|
673
691
|
};
|
|
674
|
-
},
|
|
675
|
-
let i =
|
|
692
|
+
}, Wn = (e, t, n, r) => {
|
|
693
|
+
let i = Un(t);
|
|
676
694
|
if (!i) return;
|
|
677
|
-
let a = `${n}`, o = e.measureText(a).width +
|
|
678
|
-
if (i.width < o +
|
|
695
|
+
let a = `${n}`, o = e.measureText(a).width + Ln * 2;
|
|
696
|
+
if (i.width < o + Vn * 2) return;
|
|
679
697
|
let s = i.left + i.width / 2;
|
|
680
|
-
|
|
681
|
-
},
|
|
698
|
+
Hn(e, s - o / 2, i.centerY - 20 / 2, o, 20, Rn), e.fillStyle = r.background, e.fill(), e.lineWidth = zn, e.strokeStyle = r.border, e.stroke(), e.fillStyle = r.text, e.fillText(a, s, i.centerY);
|
|
699
|
+
}, Gn = (e) => ({
|
|
682
700
|
id: "segmentedBarBadge",
|
|
683
701
|
afterDatasetsDraw(t) {
|
|
684
702
|
let n = {
|
|
@@ -686,18 +704,18 @@ var G = [
|
|
|
686
704
|
border: E(T.pieBadgeBorder, e),
|
|
687
705
|
text: E(T.pieBadgeText, e)
|
|
688
706
|
}, { ctx: r } = t;
|
|
689
|
-
r.save(), r.font =
|
|
707
|
+
r.save(), r.font = Bn, r.textAlign = "center", r.textBaseline = "middle", t.data.datasets.forEach((e, i) => {
|
|
690
708
|
let a = t.getDatasetMeta(i)?.data[0], o = e.data[0];
|
|
691
|
-
a && typeof o == "number" && o > 0 &&
|
|
709
|
+
a && typeof o == "number" && o > 0 && Wn(r, a, o, n);
|
|
692
710
|
}), r.restore();
|
|
693
711
|
}
|
|
694
|
-
}),
|
|
712
|
+
}), Kn = 40, qn = 4, Jn = 1, Yn = [
|
|
695
713
|
"mousemove",
|
|
696
714
|
"mouseout",
|
|
697
715
|
"click",
|
|
698
716
|
"touchstart",
|
|
699
717
|
"touchmove"
|
|
700
|
-
],
|
|
718
|
+
], Xn = ({ segments: e, segmentColors: t, colorHostElement: n, skeleton: r = !1, onSegmentClick: i }) => {
|
|
701
719
|
if (e.length === 0) return null;
|
|
702
720
|
let a = E("--s-ui-color-surface-primary", n), o = e.reduce((e, t) => e + t.value, 0), s = ut({
|
|
703
721
|
kind: "series",
|
|
@@ -716,12 +734,12 @@ var G = [
|
|
|
716
734
|
hoverBackgroundColor: t[n],
|
|
717
735
|
borderColor: a,
|
|
718
736
|
borderWidth: {
|
|
719
|
-
left:
|
|
720
|
-
right:
|
|
737
|
+
left: Jn,
|
|
738
|
+
right: Jn
|
|
721
739
|
},
|
|
722
740
|
borderSkipped: !1,
|
|
723
|
-
borderRadius:
|
|
724
|
-
barThickness:
|
|
741
|
+
borderRadius: qn,
|
|
742
|
+
barThickness: Kn,
|
|
725
743
|
stack: "track"
|
|
726
744
|
}))
|
|
727
745
|
},
|
|
@@ -730,7 +748,7 @@ var G = [
|
|
|
730
748
|
responsive: !0,
|
|
731
749
|
maintainAspectRatio: !1,
|
|
732
750
|
layout: { padding: 0 },
|
|
733
|
-
events: r ? [] :
|
|
751
|
+
events: r ? [] : Yn,
|
|
734
752
|
onHover: s.onHover,
|
|
735
753
|
onClick: s.onClick,
|
|
736
754
|
hover: r ? void 0 : {
|
|
@@ -755,9 +773,9 @@ var G = [
|
|
|
755
773
|
}
|
|
756
774
|
}
|
|
757
775
|
},
|
|
758
|
-
plugins: [...r ? [] : [
|
|
776
|
+
plugins: [...r ? [] : [Gn(n)], ...s.plugins]
|
|
759
777
|
};
|
|
760
|
-
},
|
|
778
|
+
}, Zn = [
|
|
761
779
|
4,
|
|
762
780
|
1,
|
|
763
781
|
2,
|
|
@@ -769,7 +787,7 @@ var G = [
|
|
|
769
787
|
].map((e, t) => ({
|
|
770
788
|
label: `Series ${t + 1}`,
|
|
771
789
|
value: e
|
|
772
|
-
})),
|
|
790
|
+
})), Qn = { class: "s-ui-chart-segmented-bar__canvas-wrap" }, $n = /* @__PURE__ */ P({
|
|
773
791
|
__name: "SChartSegmentedBar",
|
|
774
792
|
props: {
|
|
775
793
|
segments: { default: () => [] },
|
|
@@ -784,7 +802,7 @@ var G = [
|
|
|
784
802
|
},
|
|
785
803
|
emits: ["segmentClick"],
|
|
786
804
|
setup(e, { expose: t, emit: n }) {
|
|
787
|
-
let r = n, i = ft, a =
|
|
805
|
+
let r = n, i = ft, a = W("chartRootRef"), o = W("chartCanvasRef"), s = D(() => e.loading ? Zn : e.segments), c = D(() => s.value.map((t, n) => nn(n, a.value, t.fillColor, e.loading))), l = D(() => s.value.map((e, t) => ({
|
|
788
806
|
segment: e,
|
|
789
807
|
segmentIndex: t
|
|
790
808
|
})).filter(({ segment: e }) => e.value > 0)), u = D(() => l.value.map(({ segment: e }) => e)), d = D(() => l.value.map(({ segmentIndex: e }) => c.value[e] ?? "")), f = D(() => {
|
|
@@ -795,7 +813,7 @@ var G = [
|
|
|
795
813
|
}), p = (e) => {
|
|
796
814
|
let t = l.value[e];
|
|
797
815
|
t && r("segmentClick", t.segmentIndex, t.segment);
|
|
798
|
-
}, m = Tt("onSegmentClick"), h = D(() =>
|
|
816
|
+
}, m = Tt("onSegmentClick"), h = D(() => Xn({
|
|
799
817
|
segments: u.value,
|
|
800
818
|
segmentColors: d.value,
|
|
801
819
|
colorHostElement: a.value,
|
|
@@ -815,22 +833,22 @@ var G = [
|
|
|
815
833
|
}), b = (e) => {
|
|
816
834
|
y(e === null ? null : f.value.get(e) ?? null);
|
|
817
835
|
};
|
|
818
|
-
return t({ exportImage: v }), (t, n) => (
|
|
836
|
+
return t({ exportImage: v }), (t, n) => (L(), A("div", {
|
|
819
837
|
ref_key: "chartRootRef",
|
|
820
838
|
ref: a,
|
|
821
|
-
class:
|
|
839
|
+
class: F(["s-ui-chart-segmented-bar", { "s-ui-chart-segmented-bar--skeleton": e.loading }]),
|
|
822
840
|
"data-qa": "ui:chart-segmented-bar"
|
|
823
|
-
}, [j("div",
|
|
841
|
+
}, [j("div", Qn, [Rt(H(mt), {
|
|
824
842
|
loading: e.loading,
|
|
825
|
-
type:
|
|
843
|
+
type: H(i).CARTESIAN
|
|
826
844
|
}, {
|
|
827
|
-
default:
|
|
845
|
+
default: G(() => [j("canvas", {
|
|
828
846
|
ref_key: "chartCanvasRef",
|
|
829
847
|
ref: o,
|
|
830
848
|
class: "s-ui-chart-segmented-bar__canvas"
|
|
831
849
|
}, null, 512)]),
|
|
832
850
|
_: 1
|
|
833
|
-
}, 8, ["loading", "type"])]), e.showLegend && g.value.length ? (
|
|
851
|
+
}, 8, ["loading", "type"])]), e.showLegend && g.value.length ? (L(), O(H(wt), {
|
|
834
852
|
key: 0,
|
|
835
853
|
items: g.value,
|
|
836
854
|
disabled: e.loading,
|
|
@@ -842,22 +860,22 @@ var G = [
|
|
|
842
860
|
"interactive"
|
|
843
861
|
])) : k("", !0)], 2));
|
|
844
862
|
}
|
|
845
|
-
}),
|
|
863
|
+
}), er = {
|
|
846
864
|
key: 0,
|
|
847
865
|
class: "s-ui-chart-widget__header"
|
|
848
|
-
},
|
|
866
|
+
}, tr = {
|
|
849
867
|
key: 0,
|
|
850
868
|
class: "s-ui-chart-widget__title-skeleton",
|
|
851
869
|
"aria-hidden": "true"
|
|
852
|
-
},
|
|
870
|
+
}, nr = {
|
|
853
871
|
key: 1,
|
|
854
872
|
class: "s-ui-chart-widget__title s-ui-typography-label-16-medium"
|
|
855
|
-
},
|
|
873
|
+
}, rr = { class: "s-ui-chart-widget__controls" }, ir = {
|
|
856
874
|
key: 1,
|
|
857
875
|
class: "s-ui-chart-widget__content"
|
|
858
|
-
},
|
|
876
|
+
}, ar = /* @__PURE__ */ P({
|
|
859
877
|
__name: "SChartWidget",
|
|
860
|
-
props: /*@__PURE__*/
|
|
878
|
+
props: /*@__PURE__*/ zt({
|
|
861
879
|
title: { default: "" },
|
|
862
880
|
collapsible: {
|
|
863
881
|
type: Boolean,
|
|
@@ -880,16 +898,16 @@ var G = [
|
|
|
880
898
|
}),
|
|
881
899
|
emits: ["update:collapsed"],
|
|
882
900
|
setup(e) {
|
|
883
|
-
let t =
|
|
884
|
-
return (n, r) => (
|
|
885
|
-
class:
|
|
901
|
+
let t = Wt(e, "collapsed"), n = U(), { t: r } = Qt(), i = D(() => !!e.title || !!n.title || !!n.actions || e.collapsible), a = D(() => !t.value || !e.collapsible || !e.hideContentWhenCollapsed), o = D(() => r(t.value ? "chartWidget.expand" : "chartWidget.collapse"));
|
|
902
|
+
return (n, r) => (L(), A("div", {
|
|
903
|
+
class: F(["s-ui-chart-widget", { "s-ui-chart-widget--skeleton": e.loading }]),
|
|
886
904
|
"data-qa": "ui:chart-widget"
|
|
887
|
-
}, [i.value ? (
|
|
905
|
+
}, [i.value ? (L(), A("div", er, [e.loading ? (L(), A("span", tr)) : (L(), A("span", nr, [z(n.$slots, "title", {}, () => [N(V(e.title), 1)])])), j("div", rr, [z(n.$slots, "actions"), e.collapsible ? (L(), O(H(w), {
|
|
888
906
|
key: 0,
|
|
889
|
-
appearance:
|
|
890
|
-
variant:
|
|
891
|
-
size:
|
|
892
|
-
icon: t.value ?
|
|
907
|
+
appearance: H(C).OUTLINED,
|
|
908
|
+
variant: H(S).NEUTRAL,
|
|
909
|
+
size: H(x).SMALL,
|
|
910
|
+
icon: t.value ? H(K).chevronDown : H(K).chevronUp,
|
|
893
911
|
"aria-label": o.value,
|
|
894
912
|
"aria-expanded": !t.value,
|
|
895
913
|
onClick: r[0] ||= (e) => t.value = !t.value
|
|
@@ -900,8 +918,8 @@ var G = [
|
|
|
900
918
|
"icon",
|
|
901
919
|
"aria-label",
|
|
902
920
|
"aria-expanded"
|
|
903
|
-
])) : k("", !0)])])) : k("", !0), a.value ? (
|
|
921
|
+
])) : k("", !0)])])) : k("", !0), a.value ? (L(), A("div", ir, [z(n.$slots, "default")])) : k("", !0)], 2));
|
|
904
922
|
}
|
|
905
923
|
});
|
|
906
924
|
//#endregion
|
|
907
|
-
export { Et as CALENDAR_WEEK_SLOT_COUNT, Mt as DAY_TIMELINE_MINUTES, m as DEFAULT_COLOR_PALETTE, p as EAccentColor, C as EButtonAppearance, le as EButtonGroupLayout, x as EButtonSize, x as ESSegmentControlSize, S as EButtonVariant, g as EColorFormat, Ee as EConnectedPositionStrategy, J as ENotificationLayout, Y as ENotificationLeftside, q as ENotificationType, a as ESAvatarBadge, s as ESAvatarColor, te as ESAvatarGroupSize, i as ESAvatarIconBackground, r as ESAvatarShape, o as ESAvatarSize, e as ESBadgeColor, t as ESBadgePlacement, _e as ESCardLayout, me as ESCheckboxColor, he as ESCheckboxLabelPlacement, pe as ESCheckboxSize, Me as ESChipColor, Ne as ESChipSize, h as ESColorPaletteLayout, we as ESDropdownPlacement, de as ESInlineGroupOrientation, it as ESInlineInputAppearance, He as ESInlineMessageValidationStatus, Be as ESInputCustomize, We as ESLabelSize, Ge as ESLabelVariant, qe as ESListGap, Ze as ESListItemVariant, st as ESPhotoEditShape, ct as ESPhotoEditSize, $e as ESRadioLabelPlacement, Le as ESSelectSearchable, be as ESTabAppearance, xe as ESTabSize, Oe as ESTagColor, ke as ESTagSize, tt as ESToggleLabelPlacement, nt as ESToggleSize, se as ESelectionFocusMode, ie as ESelectionMode, oe as ESelectionOrientation, Dt as EWorkTimeSource, l as MAX_RECENT_COLORS, _ as RECOMMENDED_COLOR_PALETTE, c as SAvatar, ne as SAvatarGroup, n as SBadge,
|
|
925
|
+
export { Et as CALENDAR_WEEK_SLOT_COUNT, Mt as DAY_TIMELINE_MINUTES, m as DEFAULT_COLOR_PALETTE, p as EAccentColor, C as EButtonAppearance, le as EButtonGroupLayout, x as EButtonSize, x as ESSegmentControlSize, S as EButtonVariant, g as EColorFormat, Ee as EConnectedPositionStrategy, J as ENotificationLayout, Y as ENotificationLeftside, q as ENotificationType, a as ESAvatarBadge, s as ESAvatarColor, te as ESAvatarGroupSize, i as ESAvatarIconBackground, r as ESAvatarShape, o as ESAvatarSize, e as ESBadgeColor, t as ESBadgePlacement, _e as ESCardLayout, me as ESCheckboxColor, he as ESCheckboxLabelPlacement, pe as ESCheckboxSize, Me as ESChipColor, Ne as ESChipSize, h as ESColorPaletteLayout, we as ESDropdownPlacement, de as ESInlineGroupOrientation, it as ESInlineInputAppearance, He as ESInlineMessageValidationStatus, Be as ESInputCustomize, We as ESLabelSize, Ge as ESLabelVariant, qe as ESListGap, Ze as ESListItemVariant, st as ESPhotoEditShape, ct as ESPhotoEditSize, $e as ESRadioLabelPlacement, Le as ESSelectSearchable, be as ESTabAppearance, xe as ESTabSize, Oe as ESTagColor, ke as ESTagSize, tt as ESToggleLabelPlacement, nt as ESToggleSize, se as ESelectionFocusMode, ie as ESelectionMode, oe as ESelectionOrientation, Dt as EWorkTimeSource, l as MAX_RECENT_COLORS, _ as RECOMMENDED_COLOR_PALETTE, c as SAvatar, ne as SAvatarGroup, n as SBadge, _n as SBanner, w as SButton, fe as SButtonGroup, kt as SCalendarMonth, Ot as SCalendarWeekGrid, ve as SCard, St as SChartBurnup, yt as SChartHorizontalBar, wt as SChartLegend, ht as SChartLine, xt as SChartMultiLine, bt as SChartPie, Ct as SChartProgress, $n as SChartSegmentedBar, _t as SChartStackedArea, vt as SChartStackedBar, ar as SChartWidget, ge as SCheckbox, Pe as SChip, d as SColorArea, v as SColorPalette, f as SColorPicker, u as SColorValues, At as SDayTimeline, Ie as SDropdown, Re as SDropdownMenu, ue as SInlineGroup, at as SInlineInput, Ue as SInlineMessage, Ve as SInput, Ke as SLabel, Xe as SList, Qe as SListItem, lt as SPhotoEdit, et as SRadio, ye as SSegmentControl, ze as SSelect, Se as STab, Ce as STabs, Ae as STag, je as STagGroup, ot as STextarea, vn as SToast, In as SToastProvider, rt as SToggle, Fe as S_DROPDOWN_SHEET_BREAKPOINT, Cn as TOAST_AUTO_DURATION_MAX_MS, Sn as TOAST_AUTO_DURATION_MIN_MS, wn as TOAST_AUTO_DURATION_MS_PER_CHAR, jt as WORK_TIME_SOURCE_COLOR_VARS, Nt as WORK_TIME_SOURCE_ORDER, Pt as buildWorkTimeLegendItems, Tn as computeAutoDuration, Te as computeConnectedPosition, qt as createUiKit, Ft as formatDurationHM, ee as isSameColor, b as normalizeColorValue, y as resolveColorPreview, re as resolveOwnPropOrGroupedOrFallback, Jt as setUiKitLocale, Yt as uiKitLocaleEn, Xt as uiKitLocaleRu, Ye as useFlatTreeList, De as useFloatingOverlay, Je as useSListEndReached, ae as useSelectionGroup, ce as useSelectionGroupItem, Fn as useToast, Zt as useUiKitI18n };
|