@shtabapp/ui-kit 1.64.1 → 1.65.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 +12 -0
- package/dist/SButton-BN-PppY7.cjs +1 -0
- package/dist/{SButton-6AL2ipRT.js → SButton-DQTSlo61.js} +58 -53
- package/dist/SChip-B6vcMlZD.cjs +1 -0
- package/dist/{SChip-DN8oicUv.js → SChip-DBlJ-4jv.js} +4 -5
- package/dist/{SColorPicker-Djr-R81h.js → SColorPicker-B8x6qO8A.js} +14 -15
- package/dist/SColorPicker-Z6lSlByI.cjs +1 -0
- package/dist/SInput-Be10IJ_E.cjs +1 -0
- package/dist/{SInput-BLxSis1f.js → SInput-CqC-jrCC.js} +7 -8
- package/dist/{SList-D0PDc8VN.cjs → SList-3YwWEhUU.cjs} +1 -1
- package/dist/{SList-D2K9dNsj.js → SList-Bxet9twB.js} +1 -1
- package/dist/SListItem-Chd81xY0.js +209 -0
- package/dist/SListItem-Rb59ZhEw.cjs +1 -0
- package/dist/SPhotoEdit-0grpjqZQ.cjs +1 -0
- package/dist/{SPhotoEdit-CTXpy4AE.js → SPhotoEdit-COkIQFxd.js} +4 -5
- package/dist/SSegmentControl-BaD9BK2s.cjs +1 -0
- package/dist/SSegmentControl-Bjech2v4.js +208 -0
- package/dist/{SSelect-D6taevzT.js → SSelect-BLc_92_w.js} +7 -8
- package/dist/SSelect-LaTTGKd1.cjs +1 -0
- package/dist/{STable-aS1eGuVB.js → STable-CfRGPFmm.js} +26 -27
- package/dist/STable-xMxOF84K.cjs +1 -0
- package/dist/{STabs-CU1lSmcH.js → STabs-BbABxzdN.js} +4 -5
- package/dist/STabs-a337ikYi.cjs +1 -0
- package/dist/STag-B68ch31f.cjs +1 -0
- package/dist/{STag-DwIU1Uje.js → STag-BJV5gtD6.js} +4 -5
- package/dist/{STagGroup-D9hENgSo.cjs → STagGroup-B4ktVLZ5.cjs} +1 -1
- package/dist/{STagGroup-DWaTQbj6.js → STagGroup-DnNdOCrX.js} +1 -1
- package/dist/components/SBanner/SBanner.types.d.ts +7 -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/SListItem/SListItem.types.d.ts +12 -2
- package/dist/components/SListItem/SListItem.types.d.ts.map +1 -1
- package/dist/components/SListItem/SListItem.vue.d.ts.map +1 -1
- package/dist/components/SListItem/index.d.ts +1 -1
- package/dist/components/SListItem/index.d.ts.map +1 -1
- package/dist/components/SNotification/SNotification.types.d.ts +2 -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/SSegmentControl/SSegmentControl.types.d.ts +9 -5
- package/dist/components/SSegmentControl/SSegmentControl.types.d.ts.map +1 -1
- package/dist/components/SSegmentControl/SSegmentControl.vue.d.ts +1 -1
- package/dist/components/SSegmentControl/SSegmentControl.vue.d.ts.map +1 -1
- package/dist/components/SSegmentControl/SSegmentControlItem.vue.d.ts +1 -1
- package/dist/components/SSegmentControl/SSegmentControlItem.vue.d.ts.map +1 -1
- package/dist/components/SSegmentControl/utils/context.d.ts +2 -2
- package/dist/components/SSegmentControl/utils/context.d.ts.map +1 -1
- package/dist/entries/button.cjs +1 -1
- package/dist/entries/button.js +2 -3
- package/dist/entries/chip.cjs +1 -1
- package/dist/entries/chip.js +1 -1
- package/dist/entries/color-picker.cjs +1 -1
- package/dist/entries/color-picker.js +1 -1
- 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.d.ts +1 -1
- package/dist/entries/list-item.d.ts.map +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 -2
- package/dist/entries/select.cjs +1 -1
- package/dist/entries/select.js +1 -1
- package/dist/entries/table.cjs +1 -1
- package/dist/entries/table.js +1 -1
- package/dist/entries/tabs.cjs +1 -1
- package/dist/entries/tabs.js +1 -1
- 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.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +193 -183
- package/dist/uikit-components.css +1 -1
- package/package.json +3 -3
- package/dist/SButton-9dLbCJvh.cjs +0 -1
- package/dist/SButton.types-CpdHQtyx.js +0 -10
- package/dist/SButton.types-UKroD-ev.cjs +0 -1
- package/dist/SChip-nzYT9SEi.cjs +0 -1
- package/dist/SColorPicker-BRSi0Xhm.cjs +0 -1
- package/dist/SInput-IfbP8zrv.cjs +0 -1
- package/dist/SListItem-C1IeCv8M.js +0 -184
- package/dist/SListItem-cWTuQQY-.cjs +0 -1
- package/dist/SPhotoEdit-CxYaBC3u.cjs +0 -1
- package/dist/SSegmentControl-B9KkAQiG.js +0 -204
- package/dist/SSegmentControl-OXTka86u.cjs +0 -1
- package/dist/SSelect-CRlkCLik.cjs +0 -1
- package/dist/STable-NbCfen0n.cjs +0 -1
- package/dist/STabs-g1pGWDkl.cjs +0 -1
- package/dist/STag-D8xdkjVR.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
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-hWbsODUa.js";
|
|
3
|
-
import { i as l, n as u, r as d, t as f } from "./SColorPicker-
|
|
3
|
+
import { i as l, n as u, r as d, t as f } from "./SColorPicker-B8x6qO8A.js";
|
|
4
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-CSSCQKdH.js";
|
|
7
|
-
import {
|
|
8
|
-
import { t as w } from "./SButton-6AL2ipRT.js";
|
|
7
|
+
import { i as x, n as S, r as C, t as w } from "./SButton-DQTSlo61.js";
|
|
9
8
|
import { a as re, n as ie, o as ae, r as oe, t as se } from "./useSelectionGroup-BCAmPf3R.js";
|
|
10
9
|
import { n as ce } from "./useSelectLink-2aCIYmF6.js";
|
|
11
10
|
import { i as le, n as ue, r as de, t as fe } from "./SButtonGroup-DPq5g7bZ.js";
|
|
12
11
|
import { i as pe, n as me, r as he, t as ge } from "./SCheckbox-BMkOc5cn.js";
|
|
13
12
|
import { n as _e, t as ve } from "./SCard-DgGxjBUV.js";
|
|
14
|
-
import {
|
|
15
|
-
import { n as
|
|
16
|
-
import { t as
|
|
17
|
-
import { i as
|
|
18
|
-
import { n as
|
|
19
|
-
import { t as
|
|
20
|
-
import { n as
|
|
21
|
-
import { n as
|
|
22
|
-
import { t as
|
|
23
|
-
import { n as
|
|
24
|
-
import { n as
|
|
25
|
-
import { n as
|
|
26
|
-
import { a as
|
|
27
|
-
import { n as
|
|
28
|
-
import { a as
|
|
29
|
-
import { n as
|
|
30
|
-
import { n as
|
|
31
|
-
import { n as
|
|
32
|
-
import { n as
|
|
33
|
-
import { t as
|
|
34
|
-
import { n as
|
|
35
|
-
import { t as
|
|
36
|
-
import { C as dt, S as
|
|
13
|
+
import { n as ye, t as be } from "./SSegmentControl-Bjech2v4.js";
|
|
14
|
+
import { n as xe, r as Se, t as Ce } from "./STab-ltjZBvbK.js";
|
|
15
|
+
import { t as we } from "./STabs-BbABxzdN.js";
|
|
16
|
+
import { i as Te, n as Ee, r as De, t as Oe } from "./useFloatingOverlay-QcumEYEq.js";
|
|
17
|
+
import { n as ke, r as Ae, t as je } from "./STag-BJV5gtD6.js";
|
|
18
|
+
import { t as Me } from "./STagGroup-DnNdOCrX.js";
|
|
19
|
+
import { n as Ne, r as Pe, t as Fe } from "./SChip-DBlJ-4jv.js";
|
|
20
|
+
import { n as Ie, t as Le } from "./SDropdown-LOTCtlCX.js";
|
|
21
|
+
import { t as Re } from "./SDropdownMenu-2koPU6IG.js";
|
|
22
|
+
import { n as ze, t as Be } from "./SInput-CqC-jrCC.js";
|
|
23
|
+
import { n as Ve, t as He } from "./SInlineMessage-Dirk5RwO.js";
|
|
24
|
+
import { n as Ue, r as We, t as Ge } from "./SLabel-FHHPlcKq.js";
|
|
25
|
+
import { a as Ke, s as qe } from "./treeKeyboardNavigation-SmxTdnDz.js";
|
|
26
|
+
import { n as Je, t as Ye } from "./SListItem-Chd81xY0.js";
|
|
27
|
+
import { a as Xe, t as Ze } from "./SList-Bxet9twB.js";
|
|
28
|
+
import { n as Qe, t as $e } from "./SSelect-BLc_92_w.js";
|
|
29
|
+
import { n as et, t as tt } from "./SRadio-D6_Pd6XX.js";
|
|
30
|
+
import { n as nt, r as rt, t as it } from "./SToggle-sGw-LSNd.js";
|
|
31
|
+
import { n as at, t as ot } from "./SInlineInput-DO_glYxP.js";
|
|
32
|
+
import { t as st } from "./STextarea-BDyy7Ku5.js";
|
|
33
|
+
import { n as ct, r as lt, t as ut } from "./SPhotoEdit-COkIQFxd.js";
|
|
34
|
+
import { t as T } from "./SChartLegend-oZoF8XK7.js";
|
|
35
|
+
import { C as dt, S as E, g as D, n as ft, r as pt, t as mt, w as ht } from "./useChartInteractivity-BATdT86l.js";
|
|
37
36
|
import { t as gt } from "./SChartLine-Cs1JzPEK.js";
|
|
38
37
|
import { t as _t } from "./resolveSeriesPaletteColor-DcLSyk-D.js";
|
|
39
38
|
import { t as vt } from "./SChartStackedArea-BQGnKp1i.js";
|
|
@@ -46,14 +45,14 @@ import { t as wt } from "./useHasListener-RSjlUyqH.js";
|
|
|
46
45
|
import { t as Tt } from "./SChartBar-BVgwPlYi.js";
|
|
47
46
|
import { t as Et } from "./SChartProgress-uMg4DBpS.js";
|
|
48
47
|
import { a as Dt, c as Ot, i as kt, l as At, n as jt, o as Mt, r as Nt, s as Pt, t as Ft, u as It } from "./buildWorkTimeLegendItems-ChGHTwbn.js";
|
|
49
|
-
import { a as Lt, c as Rt, d as zt, f as Bt, i as Vt, l as Ht, n as Ut, o as Wt, r as Gt, s as Kt, t as qt, u as Jt } from "./STable-
|
|
50
|
-
import { Fragment as Yt, Teleport as Xt, computed as
|
|
51
|
-
import { ESIconName as K, SIcon as
|
|
52
|
-
import { useResizeObserver as
|
|
48
|
+
import { a as Lt, c as Rt, d as zt, f as Bt, i as Vt, l as Ht, n as Ut, o as Wt, r as Gt, s as Kt, t as qt, u as Jt } from "./STable-CfRGPFmm.js";
|
|
49
|
+
import { Fragment as Yt, Teleport as Xt, computed as O, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createSlots as Zt, createTextVNode as N, createVNode as Qt, defineComponent as P, mergeModels as $t, mergeProps as en, normalizeClass as F, normalizeStyle as I, onMounted as tn, openBlock as L, ref as R, renderList as nn, renderSlot as z, resolveDynamicComponent as rn, shallowRef as B, toDisplayString as V, unref as H, useModel as an, useSlots as U, useTemplateRef as W, watch as on, withCtx as G } from "vue";
|
|
50
|
+
import { ESIconName as K, SIcon as sn, createUiKit as cn, setUiKitLocale as ln, uiKitLocaleEn as un, uiKitLocaleRu as dn, useUiKitI18n as fn, useUiKitI18n as pn } from "@shtabapp/ui-kit-primitives";
|
|
51
|
+
import { useResizeObserver as mn } from "@vueuse/core";
|
|
53
52
|
export * from "@shtabapp/ui-kit-primitives";
|
|
54
53
|
export * from "@shtabapp/ui-kit-tokens";
|
|
55
54
|
//#region src/utils/chart/segmentedBar/resolveSegmentedBarSegmentColor.ts
|
|
56
|
-
var
|
|
55
|
+
var hn = [
|
|
57
56
|
"--s-ui-chart-segmented-bar-palette-1",
|
|
58
57
|
"--s-ui-chart-segmented-bar-palette-2",
|
|
59
58
|
"--s-ui-chart-segmented-bar-palette-3",
|
|
@@ -62,7 +61,7 @@ var mn = [
|
|
|
62
61
|
"--s-ui-chart-segmented-bar-palette-6",
|
|
63
62
|
"--s-ui-chart-segmented-bar-palette-7",
|
|
64
63
|
"--s-ui-chart-segmented-bar-palette-8"
|
|
65
|
-
],
|
|
64
|
+
], gn = [
|
|
66
65
|
"--s-ui-chart-segmented-bar-skeleton-palette-1",
|
|
67
66
|
"--s-ui-chart-segmented-bar-skeleton-palette-2",
|
|
68
67
|
"--s-ui-chart-segmented-bar-skeleton-palette-3",
|
|
@@ -71,11 +70,11 @@ var mn = [
|
|
|
71
70
|
"--s-ui-chart-segmented-bar-skeleton-palette-6",
|
|
72
71
|
"--s-ui-chart-segmented-bar-skeleton-palette-7",
|
|
73
72
|
"--s-ui-chart-segmented-bar-skeleton-palette-8"
|
|
74
|
-
],
|
|
75
|
-
palette:
|
|
76
|
-
paletteFallback:
|
|
77
|
-
skeletonPalette:
|
|
78
|
-
skeletonFallback:
|
|
73
|
+
], _n = (e, t, n, r = !1) => _t(e, t, n, r, {
|
|
74
|
+
palette: hn,
|
|
75
|
+
paletteFallback: hn[0],
|
|
76
|
+
skeletonPalette: gn,
|
|
77
|
+
skeletonFallback: gn[0]
|
|
79
78
|
}), q = /* @__PURE__ */ function(e) {
|
|
80
79
|
return e.INFO_ACCENT = "info-accent", e.INFO_NORMAL = "info-normal", e.SUCCESS = "success", e.WARNING = "warning", e.DANGER = "danger", e.BILLING = "billing", e;
|
|
81
80
|
}({}), J = /* @__PURE__ */ function(e) {
|
|
@@ -84,32 +83,32 @@ var mn = [
|
|
|
84
83
|
return e.ICON = "icon", e.AVATAR = "avatar", e;
|
|
85
84
|
}({}), X = /* @__PURE__ */ function(e) {
|
|
86
85
|
return e.BANNER = "banner", e.TOAST = "toast", e;
|
|
87
|
-
}({}),
|
|
86
|
+
}({}), vn = {
|
|
88
87
|
[q.INFO_ACCENT]: K.infoCircle,
|
|
89
88
|
[q.INFO_NORMAL]: K.infoCircle,
|
|
90
89
|
[q.SUCCESS]: K.checkCircle,
|
|
91
90
|
[q.WARNING]: K.alertCircle,
|
|
92
91
|
[q.DANGER]: K.dangerCircleFill,
|
|
93
92
|
[q.BILLING]: K.infoCircle
|
|
94
|
-
},
|
|
93
|
+
}, yn = (e, t) => t || vn[e], bn = ["role"], xn = { class: "s-ui-notification__body" }, Sn = {
|
|
95
94
|
key: 0,
|
|
96
95
|
class: "s-ui-notification__leftside"
|
|
97
|
-
},
|
|
96
|
+
}, Cn = {
|
|
98
97
|
key: 0,
|
|
99
98
|
class: "s-ui-notification__icon"
|
|
100
|
-
},
|
|
99
|
+
}, wn = { class: "s-ui-notification__content" }, Tn = { class: "s-ui-notification__title-row" }, En = {
|
|
101
100
|
key: 0,
|
|
102
101
|
class: "s-ui-notification__description-block"
|
|
103
|
-
},
|
|
102
|
+
}, Dn = {
|
|
104
103
|
key: 0,
|
|
105
104
|
class: "s-ui-notification__description s-ui-typography-label-12-medium"
|
|
106
|
-
},
|
|
105
|
+
}, On = {
|
|
107
106
|
key: 1,
|
|
108
107
|
class: "s-ui-notification__actions-stack"
|
|
109
|
-
},
|
|
108
|
+
}, kn = {
|
|
110
109
|
key: 1,
|
|
111
110
|
class: "s-ui-notification__actions-row"
|
|
112
|
-
},
|
|
111
|
+
}, An = /* @__PURE__ */ P({
|
|
113
112
|
__name: "SNotification",
|
|
114
113
|
props: {
|
|
115
114
|
type: { default: () => q.INFO_ACCENT },
|
|
@@ -119,6 +118,7 @@ var mn = [
|
|
|
119
118
|
title: {},
|
|
120
119
|
description: {},
|
|
121
120
|
linkText: {},
|
|
121
|
+
linkIconRight: {},
|
|
122
122
|
primaryButtonText: {},
|
|
123
123
|
secondaryButtonText: {},
|
|
124
124
|
showPrimaryButton: {
|
|
@@ -146,14 +146,14 @@ var mn = [
|
|
|
146
146
|
"secondaryAction"
|
|
147
147
|
],
|
|
148
148
|
setup(e, { emit: t }) {
|
|
149
|
-
let n = t, r = U(), i =
|
|
149
|
+
let n = t, r = U(), i = O(() => [
|
|
150
150
|
`s-ui-notification--type-${e.type}`,
|
|
151
151
|
`s-ui-notification--layout-${e.layout}`,
|
|
152
152
|
`s-ui-notification--surface-${e.surface}`
|
|
153
|
-
]), a =
|
|
153
|
+
]), a = O(() => {
|
|
154
154
|
let t = {};
|
|
155
155
|
return e.width && (t.width = typeof e.width == "number" ? `${e.width}px` : e.width), e.maxWidth && (t.maxWidth = typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth), t;
|
|
156
|
-
}), s =
|
|
156
|
+
}), s = O(() => e.type === q.DANGER ? "alert" : "status"), l = O(() => yn(e.type, e.icon)), u = O(() => e.type === q.BILLING), d = O(() => !!(e.leftside === Y.AVATAR && e.avatar || e.leftside === Y.ICON)), f = O(() => !!(e.description || e.linkText || r.description)), p = O(() => e.showPrimaryButton && (e.primaryButtonText || e.secondaryButtonText)), m = O(() => e.showPrimaryButton && e.primaryButtonText || e.closable), h = O(() => e.type === q.BILLING ? S.MAJOR : S.OUTLINED), g = O(() => e.type === q.BILLING ? x.BILLING : x.MAIN), _ = () => {
|
|
157
157
|
n("close");
|
|
158
158
|
}, v = () => {
|
|
159
159
|
n("linkClick");
|
|
@@ -162,16 +162,16 @@ var mn = [
|
|
|
162
162
|
}, b = () => {
|
|
163
163
|
n("secondaryAction");
|
|
164
164
|
};
|
|
165
|
-
return (t, n) => (L(),
|
|
165
|
+
return (t, n) => (L(), j("div", {
|
|
166
166
|
class: F(["s-ui-notification", i.value]),
|
|
167
167
|
style: I(a.value),
|
|
168
168
|
role: s.value
|
|
169
|
-
}, [
|
|
170
|
-
d.value ? (L(),
|
|
169
|
+
}, [M("div", xn, [
|
|
170
|
+
d.value ? (L(), j("div", Sn, [e.leftside === H(Y).ICON ? (L(), j("div", Cn, [Qt(H(sn), {
|
|
171
171
|
name: l.value,
|
|
172
172
|
size: 16,
|
|
173
173
|
billing: u.value
|
|
174
|
-
}, null, 8, ["name", "billing"])])) : e.leftside === H(Y).AVATAR && e.avatar ? (L(),
|
|
174
|
+
}, null, 8, ["name", "billing"])])) : e.leftside === H(Y).AVATAR && e.avatar ? (L(), k(H(c), {
|
|
175
175
|
key: 1,
|
|
176
176
|
name: e.avatar.name,
|
|
177
177
|
src: e.avatar.src,
|
|
@@ -183,14 +183,14 @@ var mn = [
|
|
|
183
183
|
"src",
|
|
184
184
|
"badge",
|
|
185
185
|
"size"
|
|
186
|
-
])) :
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
])) : A("", !0)])) : A("", !0),
|
|
187
|
+
M("div", wn, [
|
|
188
|
+
M("div", Tn, [M("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(), k(H(w), {
|
|
189
189
|
key: 0,
|
|
190
190
|
class: "s-ui-notification__close",
|
|
191
|
-
appearance: H(
|
|
192
|
-
variant: H(
|
|
193
|
-
size: H(
|
|
191
|
+
appearance: H(S).BARE,
|
|
192
|
+
variant: H(x).NEUTRAL,
|
|
193
|
+
size: H(C).SMALL,
|
|
194
194
|
"aria-label": e.closeAriaLabel,
|
|
195
195
|
icon: "closeMini",
|
|
196
196
|
onClick: _
|
|
@@ -199,13 +199,14 @@ var mn = [
|
|
|
199
199
|
"variant",
|
|
200
200
|
"size",
|
|
201
201
|
"aria-label"
|
|
202
|
-
])) :
|
|
203
|
-
f.value ? (L(),
|
|
202
|
+
])) : A("", !0)]),
|
|
203
|
+
f.value ? (L(), j("div", En, [e.description || H(r).description ? (L(), j("span", Dn, [z(t.$slots, "description", {}, () => [N(V(e.description), 1)])])) : A("", !0), e.linkText ? (L(), k(H(w), {
|
|
204
204
|
key: 1,
|
|
205
205
|
class: "s-ui-notification__link",
|
|
206
|
-
appearance: H(
|
|
207
|
-
variant: H(
|
|
208
|
-
size: H(
|
|
206
|
+
appearance: H(S).BARE,
|
|
207
|
+
variant: H(x).MAIN,
|
|
208
|
+
size: H(C).SMALL,
|
|
209
|
+
iconRight: e.linkIconRight,
|
|
209
210
|
onClick: v
|
|
210
211
|
}, {
|
|
211
212
|
default: G(() => [N(V(e.linkText), 1)]),
|
|
@@ -213,13 +214,14 @@ var mn = [
|
|
|
213
214
|
}, 8, [
|
|
214
215
|
"appearance",
|
|
215
216
|
"variant",
|
|
216
|
-
"size"
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
"size",
|
|
218
|
+
"iconRight"
|
|
219
|
+
])) : A("", !0)])) : A("", !0),
|
|
220
|
+
e.layout === H(J).VERTICAL && p.value ? (L(), j("div", On, [e.showPrimaryButton && e.primaryButtonText ? (L(), k(H(w), {
|
|
219
221
|
key: 0,
|
|
220
222
|
appearance: h.value,
|
|
221
223
|
variant: g.value,
|
|
222
|
-
size: H(
|
|
224
|
+
size: H(C).SMALL,
|
|
223
225
|
onClick: y
|
|
224
226
|
}, {
|
|
225
227
|
default: G(() => [N(V(e.primaryButtonText), 1)]),
|
|
@@ -228,11 +230,11 @@ var mn = [
|
|
|
228
230
|
"appearance",
|
|
229
231
|
"variant",
|
|
230
232
|
"size"
|
|
231
|
-
])) :
|
|
233
|
+
])) : A("", !0), e.showPrimaryButton && e.secondaryButtonText ? (L(), k(H(w), {
|
|
232
234
|
key: 1,
|
|
233
|
-
appearance: H(
|
|
234
|
-
variant: H(
|
|
235
|
-
size: H(
|
|
235
|
+
appearance: H(S).BARE,
|
|
236
|
+
variant: H(x).NEUTRAL,
|
|
237
|
+
size: H(C).SMALL,
|
|
236
238
|
onClick: b
|
|
237
239
|
}, {
|
|
238
240
|
default: G(() => [N(V(e.secondaryButtonText), 1)]),
|
|
@@ -241,13 +243,13 @@ var mn = [
|
|
|
241
243
|
"appearance",
|
|
242
244
|
"variant",
|
|
243
245
|
"size"
|
|
244
|
-
])) :
|
|
246
|
+
])) : A("", !0)])) : A("", !0)
|
|
245
247
|
]),
|
|
246
|
-
e.layout === H(J).HORIZONTAL && m.value ? (L(),
|
|
248
|
+
e.layout === H(J).HORIZONTAL && m.value ? (L(), j("div", kn, [e.showPrimaryButton && e.primaryButtonText ? (L(), k(H(w), {
|
|
247
249
|
key: 0,
|
|
248
250
|
appearance: h.value,
|
|
249
251
|
variant: g.value,
|
|
250
|
-
size: H(
|
|
252
|
+
size: H(C).SMALL,
|
|
251
253
|
onClick: y
|
|
252
254
|
}, {
|
|
253
255
|
default: G(() => [N(V(e.primaryButtonText), 1)]),
|
|
@@ -256,12 +258,12 @@ var mn = [
|
|
|
256
258
|
"appearance",
|
|
257
259
|
"variant",
|
|
258
260
|
"size"
|
|
259
|
-
])) :
|
|
261
|
+
])) : A("", !0), e.layout === H(J).HORIZONTAL && e.closable ? (L(), k(H(w), {
|
|
260
262
|
key: 1,
|
|
261
263
|
class: "s-ui-notification__close",
|
|
262
|
-
appearance: H(
|
|
263
|
-
variant: H(
|
|
264
|
-
size: H(
|
|
264
|
+
appearance: H(S).BARE,
|
|
265
|
+
variant: H(x).NEUTRAL,
|
|
266
|
+
size: H(C).SMALL,
|
|
265
267
|
"aria-label": e.closeAriaLabel,
|
|
266
268
|
icon: "closeMini",
|
|
267
269
|
onClick: _
|
|
@@ -270,18 +272,23 @@ var mn = [
|
|
|
270
272
|
"variant",
|
|
271
273
|
"size",
|
|
272
274
|
"aria-label"
|
|
273
|
-
])) :
|
|
274
|
-
])], 14,
|
|
275
|
+
])) : A("", !0)])) : A("", !0)
|
|
276
|
+
])], 14, bn));
|
|
275
277
|
}
|
|
276
|
-
}),
|
|
278
|
+
}), jn = /* @__PURE__ */ P({
|
|
277
279
|
__name: "SBanner",
|
|
278
280
|
props: {
|
|
279
281
|
type: { default: () => q.INFO_ACCENT },
|
|
280
282
|
layout: { default: () => J.HORIZONTAL },
|
|
281
283
|
leftside: { default: () => Y.ICON },
|
|
284
|
+
elevated: {
|
|
285
|
+
type: Boolean,
|
|
286
|
+
default: !1
|
|
287
|
+
},
|
|
282
288
|
title: {},
|
|
283
289
|
description: {},
|
|
284
290
|
linkText: {},
|
|
291
|
+
linkIconRight: {},
|
|
285
292
|
primaryButtonText: {},
|
|
286
293
|
secondaryButtonText: {},
|
|
287
294
|
showPrimaryButton: {
|
|
@@ -308,9 +315,9 @@ var mn = [
|
|
|
308
315
|
"secondaryAction"
|
|
309
316
|
],
|
|
310
317
|
setup(e, { emit: t }) {
|
|
311
|
-
let n = t, r = U();
|
|
312
|
-
return (t,
|
|
313
|
-
class: "s-ui-banner",
|
|
318
|
+
let n = t, r = U(), i = O(() => ({ "s-ui-banner--elevated": e.elevated }));
|
|
319
|
+
return (t, a) => (L(), k(An, {
|
|
320
|
+
class: F(["s-ui-banner", i.value]),
|
|
314
321
|
"data-qa": "ui:banner",
|
|
315
322
|
type: e.type,
|
|
316
323
|
layout: e.layout,
|
|
@@ -319,6 +326,7 @@ var mn = [
|
|
|
319
326
|
title: e.title,
|
|
320
327
|
description: e.description,
|
|
321
328
|
linkText: e.linkText,
|
|
329
|
+
linkIconRight: e.linkIconRight,
|
|
322
330
|
primaryButtonText: e.primaryButtonText,
|
|
323
331
|
secondaryButtonText: e.secondaryButtonText,
|
|
324
332
|
showPrimaryButton: e.showPrimaryButton,
|
|
@@ -328,11 +336,11 @@ var mn = [
|
|
|
328
336
|
avatar: e.avatar,
|
|
329
337
|
maxWidth: e.maxWidth,
|
|
330
338
|
truncateTitle: e.truncateTitle,
|
|
331
|
-
onClose:
|
|
332
|
-
onLinkClick:
|
|
333
|
-
onPrimaryAction:
|
|
334
|
-
onSecondaryAction:
|
|
335
|
-
},
|
|
339
|
+
onClose: a[0] ||= (e) => n("close"),
|
|
340
|
+
onLinkClick: a[1] ||= (e) => n("linkClick"),
|
|
341
|
+
onPrimaryAction: a[2] ||= (e) => n("primaryAction"),
|
|
342
|
+
onSecondaryAction: a[3] ||= (e) => n("secondaryAction")
|
|
343
|
+
}, Zt({ _: 2 }, [H(r).title ? {
|
|
336
344
|
name: "title",
|
|
337
345
|
fn: G(() => [z(t.$slots, "title")]),
|
|
338
346
|
key: "0"
|
|
@@ -341,6 +349,7 @@ var mn = [
|
|
|
341
349
|
fn: G(() => [z(t.$slots, "description")]),
|
|
342
350
|
key: "1"
|
|
343
351
|
} : void 0]), 1032, [
|
|
352
|
+
"class",
|
|
344
353
|
"type",
|
|
345
354
|
"layout",
|
|
346
355
|
"leftside",
|
|
@@ -348,6 +357,7 @@ var mn = [
|
|
|
348
357
|
"title",
|
|
349
358
|
"description",
|
|
350
359
|
"linkText",
|
|
360
|
+
"linkIconRight",
|
|
351
361
|
"primaryButtonText",
|
|
352
362
|
"secondaryButtonText",
|
|
353
363
|
"showPrimaryButton",
|
|
@@ -359,7 +369,7 @@ var mn = [
|
|
|
359
369
|
"truncateTitle"
|
|
360
370
|
]));
|
|
361
371
|
}
|
|
362
|
-
}),
|
|
372
|
+
}), Mn = /* @__PURE__ */ P({
|
|
363
373
|
__name: "SToast",
|
|
364
374
|
props: {
|
|
365
375
|
type: { default: () => q.INFO_ACCENT },
|
|
@@ -394,8 +404,8 @@ var mn = [
|
|
|
394
404
|
"secondaryAction"
|
|
395
405
|
],
|
|
396
406
|
setup(e, { emit: t }) {
|
|
397
|
-
let n = t, r = U(), i =
|
|
398
|
-
return (t, a) => (L(),
|
|
407
|
+
let n = t, r = U(), i = O(() => e.width ?? 360);
|
|
408
|
+
return (t, a) => (L(), k(An, {
|
|
399
409
|
class: "s-ui-toast",
|
|
400
410
|
"data-qa": "ui:toast",
|
|
401
411
|
type: e.type,
|
|
@@ -418,7 +428,7 @@ var mn = [
|
|
|
418
428
|
onLinkClick: a[1] ||= (e) => n("linkClick"),
|
|
419
429
|
onPrimaryAction: a[2] ||= (e) => n("primaryAction"),
|
|
420
430
|
onSecondaryAction: a[3] ||= (e) => n("secondaryAction")
|
|
421
|
-
},
|
|
431
|
+
}, Zt({ _: 2 }, [H(r).title ? {
|
|
422
432
|
name: "title",
|
|
423
433
|
fn: G(() => [z(t.$slots, "title")]),
|
|
424
434
|
key: "0"
|
|
@@ -445,13 +455,13 @@ var mn = [
|
|
|
445
455
|
"truncateTitle"
|
|
446
456
|
]));
|
|
447
457
|
}
|
|
448
|
-
}),
|
|
458
|
+
}), Nn = .05, Pn = [
|
|
449
459
|
"data-mounted",
|
|
450
460
|
"data-front",
|
|
451
461
|
"data-expanded",
|
|
452
462
|
"data-removed",
|
|
453
463
|
"data-visible"
|
|
454
|
-
],
|
|
464
|
+
], Fn = /* @__PURE__ */ P({
|
|
455
465
|
__name: "SToastProviderToast",
|
|
456
466
|
props: {
|
|
457
467
|
index: {},
|
|
@@ -464,7 +474,7 @@ var mn = [
|
|
|
464
474
|
},
|
|
465
475
|
emits: ["heightChange"],
|
|
466
476
|
setup(e, { emit: t }) {
|
|
467
|
-
let n = t, r = R(null), i = R(0), a = R(!1), o =
|
|
477
|
+
let n = t, r = R(null), i = R(0), a = R(!1), o = O(() => e.index === 0), s = O(() => 1 - e.index * Nn), c = O(() => ({
|
|
468
478
|
"--s-ui-toast-provider-toasts-before": String(e.index),
|
|
469
479
|
"--s-ui-toast-provider-lift-amount": `${e.stackPeek * -1}px`,
|
|
470
480
|
"--s-ui-toast-provider-front-toast-height": `${e.frontToastHeight}px`,
|
|
@@ -473,16 +483,16 @@ var mn = [
|
|
|
473
483
|
"--s-ui-toast-provider-stack-scale": String(s.value),
|
|
474
484
|
zIndex: String(1e3 - e.index)
|
|
475
485
|
}));
|
|
476
|
-
return
|
|
486
|
+
return mn(r, (e) => {
|
|
477
487
|
let t = e[0]?.contentRect.height ?? 0;
|
|
478
488
|
t !== i.value && (i.value = t, n("heightChange", t));
|
|
479
|
-
}),
|
|
489
|
+
}), tn(() => {
|
|
480
490
|
requestAnimationFrame(() => {
|
|
481
491
|
requestAnimationFrame(() => {
|
|
482
492
|
a.value = !0;
|
|
483
493
|
});
|
|
484
494
|
});
|
|
485
|
-
}), (t, n) => (L(),
|
|
495
|
+
}), (t, n) => (L(), j("div", {
|
|
486
496
|
class: "s-ui-toast-provider__toast",
|
|
487
497
|
"data-mounted": a.value,
|
|
488
498
|
"data-front": o.value,
|
|
@@ -490,54 +500,54 @@ var mn = [
|
|
|
490
500
|
"data-removed": e.removed,
|
|
491
501
|
"data-visible": e.visible,
|
|
492
502
|
style: I(c.value)
|
|
493
|
-
}, [
|
|
503
|
+
}, [M("div", {
|
|
494
504
|
ref_key: "contentRef",
|
|
495
505
|
ref: r,
|
|
496
506
|
class: "s-ui-toast-provider__toast-content"
|
|
497
|
-
}, [z(t.$slots, "default")], 512)], 12,
|
|
507
|
+
}, [z(t.$slots, "default")], 512)], 12, Pn));
|
|
498
508
|
}
|
|
499
|
-
}),
|
|
500
|
-
let n =
|
|
501
|
-
return n > 1e4 ?
|
|
502
|
-
}, Z = B([]), Q = /* @__PURE__ */ new Map(),
|
|
509
|
+
}), In = 4e3, Ln = 1e4, Rn = 50, zn = (e, t) => {
|
|
510
|
+
let n = In + (e.length + (t?.length ?? 0)) * 50;
|
|
511
|
+
return n > 1e4 ? Ln : n;
|
|
512
|
+
}, Z = B([]), Q = /* @__PURE__ */ new Map(), Bn = 0, Vn = {
|
|
503
513
|
type: q.INFO_ACCENT,
|
|
504
514
|
layout: J.HORIZONTAL,
|
|
505
515
|
leftside: Y.ICON,
|
|
506
516
|
showPrimaryButton: !1,
|
|
507
517
|
closable: !0
|
|
508
|
-
},
|
|
518
|
+
}, Hn = () => `toast-${Date.now()}-${++Bn}`, $ = (e) => {
|
|
509
519
|
let t = Q.get(e);
|
|
510
520
|
t && (window.clearTimeout(t), Q.delete(e));
|
|
511
|
-
},
|
|
521
|
+
}, Un = (e) => {
|
|
512
522
|
$(e.id);
|
|
513
|
-
let t = e.duration === void 0 ?
|
|
523
|
+
let t = e.duration === void 0 ? zn(e.title, e.description) : e.duration;
|
|
514
524
|
if (t > 0) {
|
|
515
525
|
let n = window.setTimeout(() => {
|
|
516
|
-
|
|
526
|
+
Wn(e.id);
|
|
517
527
|
}, t);
|
|
518
528
|
Q.set(e.id, n);
|
|
519
529
|
}
|
|
520
|
-
},
|
|
530
|
+
}, Wn = (e) => {
|
|
521
531
|
let t = Z.value.findIndex((t) => t.id === e);
|
|
522
532
|
if (t === -1) return;
|
|
523
533
|
let n = Z.value[t];
|
|
524
534
|
n && ($(e), n.onClose && n.onClose(), Z.value = Z.value.filter((t) => t.id !== e));
|
|
525
|
-
},
|
|
535
|
+
}, Gn = () => {
|
|
526
536
|
Q.forEach((e) => window.clearTimeout(e)), Q.clear(), Z.value = [];
|
|
527
|
-
},
|
|
537
|
+
}, Kn = (e) => e.length <= 3 ? e : (e.slice(3).forEach((e) => {
|
|
528
538
|
$(e.id);
|
|
529
|
-
}), e.slice(0, 3)),
|
|
530
|
-
let t = e.id ??
|
|
531
|
-
...
|
|
539
|
+
}), e.slice(0, 3)), qn = (e) => {
|
|
540
|
+
let t = e.id ?? Hn(), n = {
|
|
541
|
+
...Vn,
|
|
532
542
|
...e,
|
|
533
543
|
id: t
|
|
534
544
|
}, r = Z.value.findIndex((e) => e.id === t);
|
|
535
545
|
if (r > -1) {
|
|
536
546
|
let e = [...Z.value];
|
|
537
|
-
e[r] = n, Z.value =
|
|
538
|
-
} else Z.value =
|
|
539
|
-
return
|
|
540
|
-
},
|
|
547
|
+
e[r] = n, Z.value = Kn(e);
|
|
548
|
+
} else Z.value = Kn([n, ...Z.value]);
|
|
549
|
+
return Un(n), t;
|
|
550
|
+
}, Jn = (e, t) => {
|
|
541
551
|
let n = Z.value.findIndex((t) => t.id === e);
|
|
542
552
|
if (n === -1) return;
|
|
543
553
|
let r = Z.value[n];
|
|
@@ -547,21 +557,21 @@ var mn = [
|
|
|
547
557
|
...t,
|
|
548
558
|
id: r.id
|
|
549
559
|
}, a = [...Z.value];
|
|
550
|
-
a[n] = i, Z.value = a,
|
|
551
|
-
},
|
|
560
|
+
a[n] = i, Z.value = a, Un(i);
|
|
561
|
+
}, Yn = () => ({
|
|
552
562
|
toasts: Z,
|
|
553
|
-
show:
|
|
554
|
-
hide:
|
|
555
|
-
hideAll:
|
|
556
|
-
update:
|
|
557
|
-
}),
|
|
563
|
+
show: qn,
|
|
564
|
+
hide: Wn,
|
|
565
|
+
hideAll: Gn,
|
|
566
|
+
update: Jn
|
|
567
|
+
}), Xn = /* @__PURE__ */ P({
|
|
558
568
|
__name: "SToastProvider",
|
|
559
569
|
setup(e) {
|
|
560
|
-
let { toasts: t, hide: n } =
|
|
561
|
-
|
|
570
|
+
let { toasts: t, hide: n } = Yn(), r = O(() => t.value.slice(0, 3)), i = R(!1), a = B({}), o = R(/* @__PURE__ */ new Set()), s = O(() => t.value[0] ?? null), c = O(() => s.value ? a.value[s.value.id] ?? 0 : 0), l = R(0), u = O(() => c.value > 0 ? c.value : l.value);
|
|
571
|
+
on(c, (e) => {
|
|
562
572
|
e > 0 && (l.value = e);
|
|
563
573
|
});
|
|
564
|
-
let d =
|
|
574
|
+
let d = O(() => {
|
|
565
575
|
if (r.value.length === 0) return {};
|
|
566
576
|
if (i.value) return { height: `${r.value.reduce((e, t, n) => {
|
|
567
577
|
let r = a.value[t.id] ?? 0, i = n > 0 ? 4 : 0;
|
|
@@ -600,15 +610,15 @@ var mn = [
|
|
|
600
610
|
}, b = (e) => {
|
|
601
611
|
e.onSecondaryAction && e.onSecondaryAction();
|
|
602
612
|
};
|
|
603
|
-
return (e, t) => (L(),
|
|
613
|
+
return (e, t) => (L(), k(Xt, { to: "body" }, [M("div", {
|
|
604
614
|
class: "s-ui-toast-provider",
|
|
605
615
|
onMouseenter: m,
|
|
606
616
|
onMouseleave: h
|
|
607
|
-
}, [r.value.length > 0 ? (L(),
|
|
617
|
+
}, [r.value.length > 0 ? (L(), j("div", {
|
|
608
618
|
key: 0,
|
|
609
619
|
class: "s-ui-toast-provider__list",
|
|
610
620
|
style: I(d.value)
|
|
611
|
-
}, [(L(!0),
|
|
621
|
+
}, [(L(!0), j(Yt, null, nn(r.value, (t, n) => (L(), k(Fn, {
|
|
612
622
|
key: t.id,
|
|
613
623
|
index: n,
|
|
614
624
|
expanded: i.value,
|
|
@@ -619,13 +629,13 @@ var mn = [
|
|
|
619
629
|
"offset-y": f(n),
|
|
620
630
|
onHeightChange: (e) => g(t.id, e)
|
|
621
631
|
}, {
|
|
622
|
-
default: G(() => [z(e.$slots, "toast", { toast: t }, () => [t.component ? (L(),
|
|
632
|
+
default: G(() => [z(e.$slots, "toast", { toast: t }, () => [t.component ? (L(), k(rn(t.component), en({
|
|
623
633
|
key: 0,
|
|
624
634
|
ref_for: !0
|
|
625
635
|
}, t.componentProps, {
|
|
626
636
|
toast: t,
|
|
627
637
|
onClose: (e) => _(t.id)
|
|
628
|
-
}), null, 16, ["toast", "onClose"])) : (L(),
|
|
638
|
+
}), null, 16, ["toast", "onClose"])) : (L(), k(H(Mn), {
|
|
629
639
|
key: 1,
|
|
630
640
|
type: t.type,
|
|
631
641
|
layout: t.layout,
|
|
@@ -677,12 +687,12 @@ var mn = [
|
|
|
677
687
|
"visible",
|
|
678
688
|
"offset-y",
|
|
679
689
|
"onHeightChange"
|
|
680
|
-
]))), 128))], 4)) :
|
|
690
|
+
]))), 128))], 4)) : A("", !0)], 32)]));
|
|
681
691
|
}
|
|
682
|
-
}),
|
|
692
|
+
}), Zn = 4, Qn = 4, $n = 1, er = "400 12px var(--s-ui-font-family-label)", tr = 4, nr = (e, t, n, r, i, a) => {
|
|
683
693
|
let o = Math.min(a, r / 2, i / 2);
|
|
684
694
|
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();
|
|
685
|
-
},
|
|
695
|
+
}, rr = (e) => {
|
|
686
696
|
let t = e.getProps([
|
|
687
697
|
"x",
|
|
688
698
|
"y",
|
|
@@ -693,35 +703,35 @@ var mn = [
|
|
|
693
703
|
width: Math.abs(n - i),
|
|
694
704
|
centerY: r
|
|
695
705
|
};
|
|
696
|
-
},
|
|
697
|
-
let i =
|
|
706
|
+
}, ir = (e, t, n, r) => {
|
|
707
|
+
let i = rr(t);
|
|
698
708
|
if (!i) return;
|
|
699
|
-
let a = `${n}`, o = e.measureText(a).width +
|
|
700
|
-
if (i.width < o +
|
|
709
|
+
let a = `${n}`, o = e.measureText(a).width + Zn * 2;
|
|
710
|
+
if (i.width < o + tr * 2) return;
|
|
701
711
|
let s = i.left + i.width / 2;
|
|
702
|
-
|
|
703
|
-
},
|
|
712
|
+
nr(e, s - o / 2, i.centerY - 20 / 2, o, 20, Qn), e.fillStyle = r.background, e.fill(), e.lineWidth = $n, e.strokeStyle = r.border, e.stroke(), e.fillStyle = r.text, e.fillText(a, s, i.centerY);
|
|
713
|
+
}, ar = (e) => ({
|
|
704
714
|
id: "segmentedBarBadge",
|
|
705
715
|
afterDatasetsDraw(t) {
|
|
706
716
|
let n = {
|
|
707
|
-
background:
|
|
708
|
-
border:
|
|
709
|
-
text:
|
|
717
|
+
background: E(D.pieBadgeBackground, e),
|
|
718
|
+
border: E(D.pieBadgeBorder, e),
|
|
719
|
+
text: E(D.pieBadgeText, e)
|
|
710
720
|
}, { ctx: r } = t;
|
|
711
|
-
r.save(), r.font =
|
|
721
|
+
r.save(), r.font = er, r.textAlign = "center", r.textBaseline = "middle", t.data.datasets.forEach((e, i) => {
|
|
712
722
|
let a = t.getDatasetMeta(i)?.data[0], o = e.data[0];
|
|
713
|
-
a && typeof o == "number" && o > 0 &&
|
|
723
|
+
a && typeof o == "number" && o > 0 && ir(r, a, o, n);
|
|
714
724
|
}), r.restore();
|
|
715
725
|
}
|
|
716
|
-
}),
|
|
726
|
+
}), or = 40, sr = 4, cr = 1, lr = [
|
|
717
727
|
"mousemove",
|
|
718
728
|
"mouseout",
|
|
719
729
|
"click",
|
|
720
730
|
"touchstart",
|
|
721
731
|
"touchmove"
|
|
722
|
-
],
|
|
732
|
+
], ur = ({ segments: e, segmentColors: t, colorHostElement: n, skeleton: r = !1, onSegmentClick: i }) => {
|
|
723
733
|
if (e.length === 0) return null;
|
|
724
|
-
let a =
|
|
734
|
+
let a = E("--s-ui-color-surface-primary", n), o = e.reduce((e, t) => e + t.value, 0), s = pt({
|
|
725
735
|
kind: "series",
|
|
726
736
|
skeleton: r,
|
|
727
737
|
colorHostElement: n,
|
|
@@ -738,12 +748,12 @@ var mn = [
|
|
|
738
748
|
hoverBackgroundColor: t[n],
|
|
739
749
|
borderColor: a,
|
|
740
750
|
borderWidth: {
|
|
741
|
-
left:
|
|
742
|
-
right:
|
|
751
|
+
left: cr,
|
|
752
|
+
right: cr
|
|
743
753
|
},
|
|
744
754
|
borderSkipped: !1,
|
|
745
|
-
borderRadius:
|
|
746
|
-
barThickness:
|
|
755
|
+
borderRadius: sr,
|
|
756
|
+
barThickness: or,
|
|
747
757
|
stack: "track"
|
|
748
758
|
}))
|
|
749
759
|
},
|
|
@@ -752,7 +762,7 @@ var mn = [
|
|
|
752
762
|
responsive: !0,
|
|
753
763
|
maintainAspectRatio: !1,
|
|
754
764
|
layout: { padding: 0 },
|
|
755
|
-
events: r ? [] :
|
|
765
|
+
events: r ? [] : lr,
|
|
756
766
|
onHover: s.onHover,
|
|
757
767
|
onClick: s.onClick,
|
|
758
768
|
hover: r ? void 0 : {
|
|
@@ -777,9 +787,9 @@ var mn = [
|
|
|
777
787
|
}
|
|
778
788
|
}
|
|
779
789
|
},
|
|
780
|
-
plugins: [...r ? [] : [
|
|
790
|
+
plugins: [...r ? [] : [ar(n)], ...s.plugins]
|
|
781
791
|
};
|
|
782
|
-
},
|
|
792
|
+
}, dr = [
|
|
783
793
|
4,
|
|
784
794
|
1,
|
|
785
795
|
2,
|
|
@@ -791,7 +801,7 @@ var mn = [
|
|
|
791
801
|
].map((e, t) => ({
|
|
792
802
|
label: `Series ${t + 1}`,
|
|
793
803
|
value: e
|
|
794
|
-
})),
|
|
804
|
+
})), fr = { class: "s-ui-chart-segmented-bar__canvas-wrap" }, pr = /* @__PURE__ */ P({
|
|
795
805
|
__name: "SChartSegmentedBar",
|
|
796
806
|
props: {
|
|
797
807
|
segments: { default: () => [] },
|
|
@@ -806,10 +816,10 @@ var mn = [
|
|
|
806
816
|
},
|
|
807
817
|
emits: ["segmentClick"],
|
|
808
818
|
setup(e, { expose: t, emit: n }) {
|
|
809
|
-
let r = n, i = ht, a = W("chartRootRef"), o = W("chartCanvasRef"), s =
|
|
819
|
+
let r = n, i = ht, a = W("chartRootRef"), o = W("chartCanvasRef"), s = O(() => e.loading ? dr : e.segments), c = O(() => s.value.map((t, n) => _n(n, a.value, t.fillColor, e.loading))), l = O(() => s.value.map((e, t) => ({
|
|
810
820
|
segment: e,
|
|
811
821
|
segmentIndex: t
|
|
812
|
-
})).filter(({ segment: e }) => e.value > 0)), u =
|
|
822
|
+
})).filter(({ segment: e }) => e.value > 0)), u = O(() => l.value.map(({ segment: e }) => e)), d = O(() => l.value.map(({ segmentIndex: e }) => c.value[e] ?? "")), f = O(() => {
|
|
813
823
|
let e = /* @__PURE__ */ new Map();
|
|
814
824
|
return l.value.forEach(({ segmentIndex: t }, n) => {
|
|
815
825
|
e.set(t, n);
|
|
@@ -817,19 +827,19 @@ var mn = [
|
|
|
817
827
|
}), p = (e) => {
|
|
818
828
|
let t = l.value[e];
|
|
819
829
|
t && r("segmentClick", t.segmentIndex, t.segment);
|
|
820
|
-
}, m = wt("onSegmentClick"), h =
|
|
830
|
+
}, m = wt("onSegmentClick"), h = O(() => ur({
|
|
821
831
|
segments: u.value,
|
|
822
832
|
segmentColors: d.value,
|
|
823
833
|
colorHostElement: a.value,
|
|
824
834
|
skeleton: e.loading,
|
|
825
835
|
onSegmentClick: m() ? p : void 0
|
|
826
|
-
})), g =
|
|
836
|
+
})), g = O(() => s.value.map((e, t) => ({
|
|
827
837
|
label: e.label,
|
|
828
838
|
color: c.value[t] ?? ""
|
|
829
839
|
}))), { chartInstance: _ } = ft({
|
|
830
840
|
canvasRef: o,
|
|
831
841
|
config: h,
|
|
832
|
-
enabled:
|
|
842
|
+
enabled: O(() => e.loading || u.value.length > 0)
|
|
833
843
|
}), { exportImage: v, handleLegendItemHover: y } = mt({
|
|
834
844
|
chartInstance: _,
|
|
835
845
|
canvasRef: o,
|
|
@@ -837,22 +847,22 @@ var mn = [
|
|
|
837
847
|
}), b = (e) => {
|
|
838
848
|
y(e === null ? null : f.value.get(e) ?? null);
|
|
839
849
|
};
|
|
840
|
-
return t({ exportImage: v }), (t, n) => (L(),
|
|
850
|
+
return t({ exportImage: v }), (t, n) => (L(), j("div", {
|
|
841
851
|
ref_key: "chartRootRef",
|
|
842
852
|
ref: a,
|
|
843
853
|
class: F(["s-ui-chart-segmented-bar", { "s-ui-chart-segmented-bar--skeleton": e.loading }]),
|
|
844
854
|
"data-qa": "ui:chart-segmented-bar"
|
|
845
|
-
}, [
|
|
855
|
+
}, [M("div", fr, [Qt(H(dt), {
|
|
846
856
|
loading: e.loading,
|
|
847
857
|
type: H(i).CARTESIAN
|
|
848
858
|
}, {
|
|
849
|
-
default: G(() => [
|
|
859
|
+
default: G(() => [M("canvas", {
|
|
850
860
|
ref_key: "chartCanvasRef",
|
|
851
861
|
ref: o,
|
|
852
862
|
class: "s-ui-chart-segmented-bar__canvas"
|
|
853
863
|
}, null, 512)]),
|
|
854
864
|
_: 1
|
|
855
|
-
}, 8, ["loading", "type"])]), e.showLegend && g.value.length ? (L(),
|
|
865
|
+
}, 8, ["loading", "type"])]), e.showLegend && g.value.length ? (L(), k(H(T), {
|
|
856
866
|
key: 0,
|
|
857
867
|
items: g.value,
|
|
858
868
|
disabled: e.loading,
|
|
@@ -862,24 +872,24 @@ var mn = [
|
|
|
862
872
|
"items",
|
|
863
873
|
"disabled",
|
|
864
874
|
"interactive"
|
|
865
|
-
])) :
|
|
875
|
+
])) : A("", !0)], 2));
|
|
866
876
|
}
|
|
867
|
-
}),
|
|
877
|
+
}), mr = {
|
|
868
878
|
key: 0,
|
|
869
879
|
class: "s-ui-chart-widget__header"
|
|
870
|
-
},
|
|
880
|
+
}, hr = {
|
|
871
881
|
key: 0,
|
|
872
882
|
class: "s-ui-chart-widget__title-skeleton",
|
|
873
883
|
"aria-hidden": "true"
|
|
874
|
-
},
|
|
884
|
+
}, gr = {
|
|
875
885
|
key: 1,
|
|
876
886
|
class: "s-ui-chart-widget__title s-ui-typography-label-16-medium"
|
|
877
|
-
},
|
|
887
|
+
}, _r = { class: "s-ui-chart-widget__controls" }, vr = {
|
|
878
888
|
key: 1,
|
|
879
889
|
class: "s-ui-chart-widget__content"
|
|
880
|
-
},
|
|
890
|
+
}, yr = /* @__PURE__ */ P({
|
|
881
891
|
__name: "SChartWidget",
|
|
882
|
-
props: /*@__PURE__*/
|
|
892
|
+
props: /*@__PURE__*/ $t({
|
|
883
893
|
title: { default: "" },
|
|
884
894
|
collapsible: {
|
|
885
895
|
type: Boolean,
|
|
@@ -902,15 +912,15 @@ var mn = [
|
|
|
902
912
|
}),
|
|
903
913
|
emits: ["update:collapsed"],
|
|
904
914
|
setup(e) {
|
|
905
|
-
let t =
|
|
906
|
-
return (n, r) => (L(),
|
|
915
|
+
let t = an(e, "collapsed"), n = U(), { t: r } = pn(), i = O(() => !!e.title || !!n.title || !!n.actions || e.collapsible), a = O(() => !t.value || !e.collapsible || !e.hideContentWhenCollapsed), o = O(() => r(t.value ? "chartWidget.expand" : "chartWidget.collapse"));
|
|
916
|
+
return (n, r) => (L(), j("div", {
|
|
907
917
|
class: F(["s-ui-chart-widget", { "s-ui-chart-widget--skeleton": e.loading }]),
|
|
908
918
|
"data-qa": "ui:chart-widget"
|
|
909
|
-
}, [i.value ? (L(),
|
|
919
|
+
}, [i.value ? (L(), j("div", mr, [e.loading ? (L(), j("span", hr)) : (L(), j("span", gr, [z(n.$slots, "title", {}, () => [N(V(e.title), 1)])])), M("div", _r, [z(n.$slots, "actions"), e.collapsible ? (L(), k(H(w), {
|
|
910
920
|
key: 0,
|
|
911
|
-
appearance: H(
|
|
912
|
-
variant: H(
|
|
913
|
-
size: H(
|
|
921
|
+
appearance: H(S).OUTLINED,
|
|
922
|
+
variant: H(x).NEUTRAL,
|
|
923
|
+
size: H(C).SMALL,
|
|
914
924
|
icon: t.value ? H(K).chevronDown : H(K).chevronUp,
|
|
915
925
|
"aria-label": o.value,
|
|
916
926
|
"aria-expanded": !t.value,
|
|
@@ -922,8 +932,8 @@ var mn = [
|
|
|
922
932
|
"icon",
|
|
923
933
|
"aria-label",
|
|
924
934
|
"aria-expanded"
|
|
925
|
-
])) :
|
|
935
|
+
])) : A("", !0)])])) : A("", !0), a.value ? (L(), j("div", vr, [z(n.$slots, "default")])) : A("", !0)], 2));
|
|
926
936
|
}
|
|
927
937
|
});
|
|
928
938
|
//#endregion
|
|
929
|
-
export { Dt as CALENDAR_WEEK_SLOT_COUNT, Nt as DAY_TIMELINE_MINUTES, m as DEFAULT_COLOR_PALETTE, p as EAccentColor,
|
|
939
|
+
export { Dt as CALENDAR_WEEK_SLOT_COUNT, Nt as DAY_TIMELINE_MINUTES, m as DEFAULT_COLOR_PALETTE, p as EAccentColor, S as EButtonAppearance, le as EButtonGroupLayout, C as EButtonSize, x as EButtonVariant, g as EColorFormat, De 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, Ne as ESChipColor, Pe as ESChipSize, h as ESColorPaletteLayout, Te as ESDropdownPlacement, de as ESInlineGroupOrientation, at as ESInlineInputAppearance, Ve as ESInlineMessageValidationStatus, ze as ESInputCustomize, Ue as ESLabelSize, We as ESLabelVariant, Xe as ESListGap, Je as ESListItemVariant, ct as ESPhotoEditShape, lt as ESPhotoEditSize, et as ESRadioLabelPlacement, ye as ESSegmentControlSize, Qe as ESSelectSearchable, xe as ESTabAppearance, Se as ESTabSize, Ut as ESTableCellState, Gt as ESTableCheckState, Vt as ESTableColumnAlign, Lt as ESTableColumnSticky, Wt as ESTableDropAction, Kt as ESTableFooterTone, Rt as ESTableRowHeightMode, Ht as ESTableRowKind, Jt as ESTableRowState, zt as ESTableRowsDragMode, Bt as ESTableSortDirection, ke as ESTagColor, Ae as ESTagSize, nt as ESToggleLabelPlacement, rt as ESToggleSize, se as ESelectionFocusMode, ie as ESelectionMode, oe as ESelectionOrientation, Ot as EWorkTimeSource, l as MAX_RECENT_COLORS, _ as RECOMMENDED_COLOR_PALETTE, c as SAvatar, ne as SAvatarGroup, n as SBadge, jn as SBanner, w as SButton, fe as SButtonGroup, At as SCalendarMonth, kt as SCalendarWeekGrid, ve as SCard, Tt as SChartBar, Ct as SChartBurnup, bt as SChartHorizontalBar, T as SChartLegend, gt as SChartLine, St as SChartMultiLine, xt as SChartPie, Et as SChartProgress, pr as SChartSegmentedBar, vt as SChartStackedArea, yt as SChartStackedBar, yr as SChartWidget, ge as SCheckbox, Fe as SChip, d as SColorArea, v as SColorPalette, f as SColorPicker, u as SColorValues, jt as SDayTimeline, Le as SDropdown, Re as SDropdownMenu, ue as SInlineGroup, ot as SInlineInput, He as SInlineMessage, Be as SInput, Ge as SLabel, Ze as SList, Ye as SListItem, ut as SPhotoEdit, tt as SRadio, be as SSegmentControl, $e as SSelect, Ce as STab, qt as STable, we as STabs, je as STag, Me as STagGroup, st as STextarea, Mn as SToast, Xn as SToastProvider, it as SToggle, Ie as S_DROPDOWN_SHEET_BREAKPOINT, Ln as TOAST_AUTO_DURATION_MAX_MS, In as TOAST_AUTO_DURATION_MIN_MS, Rn as TOAST_AUTO_DURATION_MS_PER_CHAR, Mt as WORK_TIME_SOURCE_COLOR_VARS, Pt as WORK_TIME_SOURCE_ORDER, Ft as buildWorkTimeLegendItems, zn as computeAutoDuration, Ee as computeConnectedPosition, cn as createUiKit, It as formatDurationHM, ee as isSameColor, b as normalizeColorValue, y as resolveColorPreview, re as resolveOwnPropOrGroupedOrFallback, ln as setUiKitLocale, un as uiKitLocaleEn, dn as uiKitLocaleRu, qe as useFlatTreeList, Oe as useFloatingOverlay, Ke as useSListEndReached, ae as useSelectionGroup, ce as useSelectionGroupItem, Yn as useToast, fn as useUiKitI18n };
|