@shtabapp/ui-kit 1.64.1 → 1.66.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 +19 -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-B_rbs-0d.cjs +1 -0
- package/dist/{SColorPicker-Djr-R81h.js → SColorPicker-C_161aLA.js} +16 -17
- package/dist/{SDropdown-LNVnMol3.cjs → SDropdown-B1OGbIYg.cjs} +1 -1
- package/dist/SDropdown-CiXHI3g1.js +362 -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-C3-8vi2u.js} +8 -9
- package/dist/SSelect-EhvfGB4d.cjs +1 -0
- package/dist/{STable-aS1eGuVB.js → STable-CADyNvk8.js} +28 -29
- package/dist/STable-D1x-kIBO.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/SDropdown/SDropdown.types.d.ts +10 -2
- package/dist/components/SDropdown/SDropdown.types.d.ts.map +1 -1
- package/dist/components/SDropdown/SDropdown.vue.d.ts.map +1 -1
- package/dist/components/SDropdown/index.d.ts +1 -1
- package/dist/components/SDropdown/index.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/composables/connectedPosition/index.d.ts +1 -1
- package/dist/composables/connectedPosition/index.d.ts.map +1 -1
- package/dist/composables/connectedPosition/types.d.ts +4 -0
- package/dist/composables/connectedPosition/types.d.ts.map +1 -1
- package/dist/composables/useFloatingOverlay.d.ts +2 -1
- package/dist/composables/useFloatingOverlay.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/composables.cjs +1 -1
- package/dist/entries/composables.js +1 -1
- package/dist/entries/dropdown.cjs +1 -1
- package/dist/entries/dropdown.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.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 +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +207 -197
- package/dist/uikit-components.css +1 -1
- package/dist/{useFloatingOverlay-QcumEYEq.js → useFloatingOverlay-B1BvRxLz.js} +134 -130
- package/dist/useFloatingOverlay-CtQBdvS9.cjs +1 -0
- 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/SDropdown-LOTCtlCX.js +0 -356
- 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/useFloatingOverlay-B1UCUYQQ.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,59 +1,58 @@
|
|
|
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-C_161aLA.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
|
|
37
|
-
import { t as
|
|
38
|
-
import { t as
|
|
39
|
-
import { t as
|
|
40
|
-
import { t as
|
|
41
|
-
import { t as
|
|
42
|
-
import { t as
|
|
43
|
-
import { t as
|
|
44
|
-
import { t as
|
|
45
|
-
import { t as
|
|
46
|
-
import { t as
|
|
47
|
-
import { t as
|
|
48
|
-
import { a as
|
|
49
|
-
import { a as
|
|
50
|
-
import { Fragment as
|
|
51
|
-
import { ESIconName as K, SIcon as
|
|
52
|
-
import { useResizeObserver 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 { a as Te, i as Ee, n as De, r as Oe, t as ke } from "./useFloatingOverlay-B1BvRxLz.js";
|
|
17
|
+
import { n as Ae, r as je, t as Me } from "./STag-BJV5gtD6.js";
|
|
18
|
+
import { t as Ne } from "./STagGroup-DnNdOCrX.js";
|
|
19
|
+
import { n as Pe, r as Fe, t as Ie } from "./SChip-DBlJ-4jv.js";
|
|
20
|
+
import { n as Le, t as Re } from "./SDropdown-CiXHI3g1.js";
|
|
21
|
+
import { t as ze } from "./SDropdownMenu-2koPU6IG.js";
|
|
22
|
+
import { n as Be, t as Ve } from "./SInput-CqC-jrCC.js";
|
|
23
|
+
import { n as He, t as Ue } from "./SInlineMessage-Dirk5RwO.js";
|
|
24
|
+
import { n as We, r as Ge, t as Ke } from "./SLabel-FHHPlcKq.js";
|
|
25
|
+
import { a as qe, s as Je } from "./treeKeyboardNavigation-SmxTdnDz.js";
|
|
26
|
+
import { n as Ye, t as Xe } from "./SListItem-Chd81xY0.js";
|
|
27
|
+
import { a as Ze, t as Qe } from "./SList-Bxet9twB.js";
|
|
28
|
+
import { n as $e, t as et } from "./SSelect-C3-8vi2u.js";
|
|
29
|
+
import { n as tt, t as nt } from "./SRadio-D6_Pd6XX.js";
|
|
30
|
+
import { n as rt, r as it, t as at } from "./SToggle-sGw-LSNd.js";
|
|
31
|
+
import { n as ot, t as st } from "./SInlineInput-DO_glYxP.js";
|
|
32
|
+
import { t as ct } from "./STextarea-BDyy7Ku5.js";
|
|
33
|
+
import { n as lt, r as ut, t as dt } from "./SPhotoEdit-COkIQFxd.js";
|
|
34
|
+
import { t as T } from "./SChartLegend-oZoF8XK7.js";
|
|
35
|
+
import { C as ft, S as E, g as D, n as pt, r as mt, t as ht, w as gt } from "./useChartInteractivity-BATdT86l.js";
|
|
36
|
+
import { t as _t } from "./SChartLine-Cs1JzPEK.js";
|
|
37
|
+
import { t as vt } from "./resolveSeriesPaletteColor-DcLSyk-D.js";
|
|
38
|
+
import { t as yt } from "./SChartStackedArea-BQGnKp1i.js";
|
|
39
|
+
import { t as bt } from "./SChartStackedBar-fiUU9lNp.js";
|
|
40
|
+
import { t as xt } from "./SChartHorizontalBar-DDo6TfE8.js";
|
|
41
|
+
import { t as St } from "./SChartPie-Bt3o7LZI.js";
|
|
42
|
+
import { t as Ct } from "./SChartMultiLine-DqCQ7FCv.js";
|
|
43
|
+
import { t as wt } from "./SChartBurnup-DyJHdRlf.js";
|
|
44
|
+
import { t as Tt } from "./useHasListener-RSjlUyqH.js";
|
|
45
|
+
import { t as Et } from "./SChartBar-BVgwPlYi.js";
|
|
46
|
+
import { t as Dt } from "./SChartProgress-uMg4DBpS.js";
|
|
47
|
+
import { a as Ot, c as kt, i as At, l as jt, n as Mt, o as Nt, r as Pt, s as Ft, t as It, u as Lt } from "./buildWorkTimeLegendItems-ChGHTwbn.js";
|
|
48
|
+
import { a as Rt, c as zt, d as Bt, f as Vt, i as Ht, l as Ut, n as Wt, o as Gt, r as Kt, s as qt, t as Jt, u as Yt } from "./STable-CADyNvk8.js";
|
|
49
|
+
import { Fragment as Xt, Teleport as Zt, computed as O, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createSlots as Qt, createTextVNode as N, createVNode as $t, defineComponent as P, mergeModels as en, mergeProps as tn, normalizeClass as F, normalizeStyle as I, onMounted as nn, openBlock as L, ref as R, renderList as rn, renderSlot as z, resolveDynamicComponent as an, shallowRef as B, toDisplayString as V, unref as H, useModel as on, useSlots as U, useTemplateRef as W, watch as sn, withCtx as G } from "vue";
|
|
50
|
+
import { ESIconName as K, SIcon as cn, createUiKit as ln, setUiKitLocale as un, uiKitLocaleEn as dn, uiKitLocaleRu as fn, useUiKitI18n as pn, useUiKitI18n as mn } from "@shtabapp/ui-kit-primitives";
|
|
51
|
+
import { useResizeObserver as hn } 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 gn = [
|
|
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
|
+
], _n = [
|
|
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
|
+
], vn = (e, t, n, r = !1) => vt(e, t, n, r, {
|
|
74
|
+
palette: gn,
|
|
75
|
+
paletteFallback: gn[0],
|
|
76
|
+
skeletonPalette: _n,
|
|
77
|
+
skeletonFallback: _n[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
|
+
}({}), yn = {
|
|
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
|
+
}, bn = (e, t) => t || yn[e], xn = ["role"], Sn = { class: "s-ui-notification__body" }, Cn = {
|
|
95
94
|
key: 0,
|
|
96
95
|
class: "s-ui-notification__leftside"
|
|
97
|
-
},
|
|
96
|
+
}, wn = {
|
|
98
97
|
key: 0,
|
|
99
98
|
class: "s-ui-notification__icon"
|
|
100
|
-
},
|
|
99
|
+
}, Tn = { class: "s-ui-notification__content" }, En = { class: "s-ui-notification__title-row" }, Dn = {
|
|
101
100
|
key: 0,
|
|
102
101
|
class: "s-ui-notification__description-block"
|
|
103
|
-
},
|
|
102
|
+
}, On = {
|
|
104
103
|
key: 0,
|
|
105
104
|
class: "s-ui-notification__description s-ui-typography-label-12-medium"
|
|
106
|
-
},
|
|
105
|
+
}, kn = {
|
|
107
106
|
key: 1,
|
|
108
107
|
class: "s-ui-notification__actions-stack"
|
|
109
|
-
},
|
|
108
|
+
}, An = {
|
|
110
109
|
key: 1,
|
|
111
110
|
class: "s-ui-notification__actions-row"
|
|
112
|
-
},
|
|
111
|
+
}, jn = /* @__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(() => bn(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", Sn, [
|
|
170
|
+
d.value ? (L(), j("div", Cn, [e.leftside === H(Y).ICON ? (L(), j("div", wn, [$t(H(cn), {
|
|
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", Tn, [
|
|
188
|
+
M("div", En, [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", Dn, [e.description || H(r).description ? (L(), j("span", On, [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", kn, [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", An, [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, xn));
|
|
275
277
|
}
|
|
276
|
-
}),
|
|
278
|
+
}), Mn = /* @__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(jn, {
|
|
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
|
+
}, Qt({ _: 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
|
+
}), Nn = /* @__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(jn, {
|
|
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
|
+
}, Qt({ _: 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
|
+
}), Pn = .05, Fn = [
|
|
449
459
|
"data-mounted",
|
|
450
460
|
"data-front",
|
|
451
461
|
"data-expanded",
|
|
452
462
|
"data-removed",
|
|
453
463
|
"data-visible"
|
|
454
|
-
],
|
|
464
|
+
], In = /* @__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 * Pn), 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 hn(r, (e) => {
|
|
477
487
|
let t = e[0]?.contentRect.height ?? 0;
|
|
478
488
|
t !== i.value && (i.value = t, n("heightChange", t));
|
|
479
|
-
}),
|
|
489
|
+
}), nn(() => {
|
|
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, Fn));
|
|
498
508
|
}
|
|
499
|
-
}),
|
|
500
|
-
let n =
|
|
501
|
-
return n > 1e4 ?
|
|
502
|
-
}, Z = B([]), Q = /* @__PURE__ */ new Map(),
|
|
509
|
+
}), Ln = 4e3, Rn = 1e4, zn = 50, Bn = (e, t) => {
|
|
510
|
+
let n = Ln + (e.length + (t?.length ?? 0)) * 50;
|
|
511
|
+
return n > 1e4 ? Rn : n;
|
|
512
|
+
}, Z = B([]), Q = /* @__PURE__ */ new Map(), Vn = 0, Hn = {
|
|
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
|
+
}, Un = () => `toast-${Date.now()}-${++Vn}`, $ = (e) => {
|
|
509
519
|
let t = Q.get(e);
|
|
510
520
|
t && (window.clearTimeout(t), Q.delete(e));
|
|
511
|
-
},
|
|
521
|
+
}, Wn = (e) => {
|
|
512
522
|
$(e.id);
|
|
513
|
-
let t = e.duration === void 0 ?
|
|
523
|
+
let t = e.duration === void 0 ? Bn(e.title, e.description) : e.duration;
|
|
514
524
|
if (t > 0) {
|
|
515
525
|
let n = window.setTimeout(() => {
|
|
516
|
-
|
|
526
|
+
Gn(e.id);
|
|
517
527
|
}, t);
|
|
518
528
|
Q.set(e.id, n);
|
|
519
529
|
}
|
|
520
|
-
},
|
|
530
|
+
}, Gn = (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
|
+
}, Kn = () => {
|
|
526
536
|
Q.forEach((e) => window.clearTimeout(e)), Q.clear(), Z.value = [];
|
|
527
|
-
},
|
|
537
|
+
}, qn = (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)), Jn = (e) => {
|
|
540
|
+
let t = e.id ?? Un(), n = {
|
|
541
|
+
...Hn,
|
|
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 = qn(e);
|
|
548
|
+
} else Z.value = qn([n, ...Z.value]);
|
|
549
|
+
return Wn(n), t;
|
|
550
|
+
}, Yn = (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, Wn(i);
|
|
561
|
+
}, Xn = () => ({
|
|
552
562
|
toasts: Z,
|
|
553
|
-
show:
|
|
554
|
-
hide:
|
|
555
|
-
hideAll:
|
|
556
|
-
update:
|
|
557
|
-
}),
|
|
563
|
+
show: Jn,
|
|
564
|
+
hide: Gn,
|
|
565
|
+
hideAll: Kn,
|
|
566
|
+
update: Yn
|
|
567
|
+
}), Zn = /* @__PURE__ */ P({
|
|
558
568
|
__name: "SToastProvider",
|
|
559
569
|
setup(e) {
|
|
560
|
-
let { toasts: t, hide: n } =
|
|
561
|
-
|
|
570
|
+
let { toasts: t, hide: n } = Xn(), 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
|
+
sn(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(Zt, { 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(Xt, null, rn(r.value, (t, n) => (L(), k(In, {
|
|
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(an(t.component), tn({
|
|
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(Nn), {
|
|
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
|
+
}), Qn = 4, $n = 4, er = 1, tr = "400 12px var(--s-ui-font-family-label)", nr = 4, rr = (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
|
+
}, ir = (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
|
+
}, ar = (e, t, n, r) => {
|
|
707
|
+
let i = ir(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 + Qn * 2;
|
|
710
|
+
if (i.width < o + nr * 2) return;
|
|
701
711
|
let s = i.left + i.width / 2;
|
|
702
|
-
|
|
703
|
-
},
|
|
712
|
+
rr(e, s - o / 2, i.centerY - 20 / 2, o, 20, $n), e.fillStyle = r.background, e.fill(), e.lineWidth = er, e.strokeStyle = r.border, e.stroke(), e.fillStyle = r.text, e.fillText(a, s, i.centerY);
|
|
713
|
+
}, or = (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 = tr, 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 && ar(r, a, o, n);
|
|
714
724
|
}), r.restore();
|
|
715
725
|
}
|
|
716
|
-
}),
|
|
726
|
+
}), sr = 40, cr = 4, lr = 1, ur = [
|
|
717
727
|
"mousemove",
|
|
718
728
|
"mouseout",
|
|
719
729
|
"click",
|
|
720
730
|
"touchstart",
|
|
721
731
|
"touchmove"
|
|
722
|
-
],
|
|
732
|
+
], dr = ({ 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 = mt({
|
|
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: lr,
|
|
752
|
+
right: lr
|
|
743
753
|
},
|
|
744
754
|
borderSkipped: !1,
|
|
745
|
-
borderRadius:
|
|
746
|
-
barThickness:
|
|
755
|
+
borderRadius: cr,
|
|
756
|
+
barThickness: sr,
|
|
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 ? [] : ur,
|
|
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 ? [] : [or(n)], ...s.plugins]
|
|
781
791
|
};
|
|
782
|
-
},
|
|
792
|
+
}, fr = [
|
|
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
|
+
})), pr = { class: "s-ui-chart-segmented-bar__canvas-wrap" }, mr = /* @__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 =
|
|
819
|
+
let r = n, i = gt, a = W("chartRootRef"), o = W("chartCanvasRef"), s = O(() => e.loading ? fr : e.segments), c = O(() => s.value.map((t, n) => vn(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,42 +827,42 @@ var mn = [
|
|
|
817
827
|
}), p = (e) => {
|
|
818
828
|
let t = l.value[e];
|
|
819
829
|
t && r("segmentClick", t.segmentIndex, t.segment);
|
|
820
|
-
}, m =
|
|
830
|
+
}, m = Tt("onSegmentClick"), h = O(() => dr({
|
|
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
|
-
}))), { chartInstance: _ } =
|
|
839
|
+
}))), { chartInstance: _ } = pt({
|
|
830
840
|
canvasRef: o,
|
|
831
841
|
config: h,
|
|
832
|
-
enabled:
|
|
833
|
-
}), { exportImage: v, handleLegendItemHover: y } =
|
|
842
|
+
enabled: O(() => e.loading || u.value.length > 0)
|
|
843
|
+
}), { exportImage: v, handleLegendItemHover: y } = ht({
|
|
834
844
|
chartInstance: _,
|
|
835
845
|
canvasRef: o,
|
|
836
846
|
colorHostElement: a
|
|
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", pr, [$t(H(ft), {
|
|
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
|
+
}), hr = {
|
|
868
878
|
key: 0,
|
|
869
879
|
class: "s-ui-chart-widget__header"
|
|
870
|
-
},
|
|
880
|
+
}, gr = {
|
|
871
881
|
key: 0,
|
|
872
882
|
class: "s-ui-chart-widget__title-skeleton",
|
|
873
883
|
"aria-hidden": "true"
|
|
874
|
-
},
|
|
884
|
+
}, _r = {
|
|
875
885
|
key: 1,
|
|
876
886
|
class: "s-ui-chart-widget__title s-ui-typography-label-16-medium"
|
|
877
|
-
},
|
|
887
|
+
}, vr = { class: "s-ui-chart-widget__controls" }, yr = {
|
|
878
888
|
key: 1,
|
|
879
889
|
class: "s-ui-chart-widget__content"
|
|
880
|
-
},
|
|
890
|
+
}, br = /* @__PURE__ */ P({
|
|
881
891
|
__name: "SChartWidget",
|
|
882
|
-
props: /*@__PURE__*/
|
|
892
|
+
props: /*@__PURE__*/ en({
|
|
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 = on(e, "collapsed"), n = U(), { t: r } = mn(), 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", hr, [e.loading ? (L(), j("span", gr)) : (L(), j("span", _r, [z(n.$slots, "title", {}, () => [N(V(e.title), 1)])])), M("div", vr, [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", yr, [z(n.$slots, "default")])) : A("", !0)], 2));
|
|
926
936
|
}
|
|
927
937
|
});
|
|
928
938
|
//#endregion
|
|
929
|
-
export {
|
|
939
|
+
export { Ot as CALENDAR_WEEK_SLOT_COUNT, Pt 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, Oe 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, Pe as ESChipColor, Fe as ESChipSize, h as ESColorPaletteLayout, Ee as ESDropdownBoundary, Te as ESDropdownPlacement, de as ESInlineGroupOrientation, ot as ESInlineInputAppearance, He as ESInlineMessageValidationStatus, Be as ESInputCustomize, We as ESLabelSize, Ge as ESLabelVariant, Ze as ESListGap, Ye as ESListItemVariant, lt as ESPhotoEditShape, ut as ESPhotoEditSize, tt as ESRadioLabelPlacement, ye as ESSegmentControlSize, $e as ESSelectSearchable, xe as ESTabAppearance, Se as ESTabSize, Wt as ESTableCellState, Kt as ESTableCheckState, Ht as ESTableColumnAlign, Rt as ESTableColumnSticky, Gt as ESTableDropAction, qt as ESTableFooterTone, zt as ESTableRowHeightMode, Ut as ESTableRowKind, Yt as ESTableRowState, Bt as ESTableRowsDragMode, Vt as ESTableSortDirection, Ae as ESTagColor, je as ESTagSize, rt as ESToggleLabelPlacement, it as ESToggleSize, se as ESelectionFocusMode, ie as ESelectionMode, oe as ESelectionOrientation, kt as EWorkTimeSource, l as MAX_RECENT_COLORS, _ as RECOMMENDED_COLOR_PALETTE, c as SAvatar, ne as SAvatarGroup, n as SBadge, Mn as SBanner, w as SButton, fe as SButtonGroup, jt as SCalendarMonth, At as SCalendarWeekGrid, ve as SCard, Et as SChartBar, wt as SChartBurnup, xt as SChartHorizontalBar, T as SChartLegend, _t as SChartLine, Ct as SChartMultiLine, St as SChartPie, Dt as SChartProgress, mr as SChartSegmentedBar, yt as SChartStackedArea, bt as SChartStackedBar, br as SChartWidget, ge as SCheckbox, Ie as SChip, d as SColorArea, v as SColorPalette, f as SColorPicker, u as SColorValues, Mt as SDayTimeline, Re as SDropdown, ze as SDropdownMenu, ue as SInlineGroup, st as SInlineInput, Ue as SInlineMessage, Ve as SInput, Ke as SLabel, Qe as SList, Xe as SListItem, dt as SPhotoEdit, nt as SRadio, be as SSegmentControl, et as SSelect, Ce as STab, Jt as STable, we as STabs, Me as STag, Ne as STagGroup, ct as STextarea, Nn as SToast, Zn as SToastProvider, at as SToggle, Le as S_DROPDOWN_SHEET_BREAKPOINT, Rn as TOAST_AUTO_DURATION_MAX_MS, Ln as TOAST_AUTO_DURATION_MIN_MS, zn as TOAST_AUTO_DURATION_MS_PER_CHAR, Nt as WORK_TIME_SOURCE_COLOR_VARS, Ft as WORK_TIME_SOURCE_ORDER, It as buildWorkTimeLegendItems, Bn as computeAutoDuration, De as computeConnectedPosition, ln as createUiKit, Lt as formatDurationHM, ee as isSameColor, b as normalizeColorValue, y as resolveColorPreview, re as resolveOwnPropOrGroupedOrFallback, un as setUiKitLocale, dn as uiKitLocaleEn, fn as uiKitLocaleRu, Je as useFlatTreeList, ke as useFloatingOverlay, qe as useSListEndReached, ae as useSelectionGroup, ce as useSelectionGroupItem, Xn as useToast, pn as useUiKitI18n };
|