@shtabapp/ui-kit 1.43.0 → 1.45.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.
Files changed (134) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/SChartBurnup-DYBnJMnm.js +247 -0
  3. package/dist/SChartBurnup-DhuCNXhU.cjs +1 -0
  4. package/dist/{SChartHorizontalBar-tfgmCHtk.cjs → SChartHorizontalBar-DMBzyz9x.cjs} +1 -1
  5. package/dist/{SChartHorizontalBar-DIn1sVoi.js → SChartHorizontalBar-bm3Jexa3.js} +14 -14
  6. package/dist/SChartLegend-Chr0IZWN.js +30 -0
  7. package/dist/SChartLegend-DXFXKXCm.cjs +1 -0
  8. package/dist/SChartLine-CiREb4H_.js +125 -0
  9. package/dist/SChartLine-P57XRR2o.cjs +1 -0
  10. package/dist/SChartMultiLine-3cdB0U12.js +166 -0
  11. package/dist/SChartMultiLine-BW1kITlR.cjs +1 -0
  12. package/dist/SChartPie-55wx2zRi.cjs +1 -0
  13. package/dist/{SChartPie-_6ij1EVn.js → SChartPie-Dc_gjzIl.js} +37 -36
  14. package/dist/{SChartProgress-C08fiO6U.cjs → SChartProgress-QsGTZ8kT.cjs} +1 -1
  15. package/dist/{SChartProgress-CofVafO6.js → SChartProgress-Zdphet8I.js} +12 -12
  16. package/dist/{SChartSkeletonHost-CnfMevXX.js → SChartSkeletonHost-CecfQ3Ye.js} +101 -70
  17. package/dist/SChartSkeletonHost-CfM0zolj.cjs +1 -0
  18. package/dist/SChartStackedArea-BaJ963lU.cjs +1 -0
  19. package/dist/{SChartStackedArea-RKK7aT7x.js → SChartStackedArea-cjN9gECV.js} +56 -62
  20. package/dist/{SChartStackedBar-CJunMhyb.js → SChartStackedBar-0jGICBA0.js} +43 -41
  21. package/dist/SChartStackedBar-j9WyOnsL.cjs +1 -0
  22. package/dist/buildChartSeriesPoints-Bv3nXvSu.cjs +1 -0
  23. package/dist/buildChartSeriesPoints-D8Xpfwp7.js +14 -0
  24. package/dist/buildMultiLineChartScales-7mcIfRVG.cjs +1 -0
  25. package/dist/buildMultiLineChartScales-CFZ8YVeJ.js +19 -0
  26. package/dist/components/SChartBurnup/SChartBurnup.types.d.ts +35 -0
  27. package/dist/components/SChartBurnup/SChartBurnup.types.d.ts.map +1 -0
  28. package/dist/components/SChartBurnup/SChartBurnup.vue.d.ts +5 -0
  29. package/dist/components/SChartBurnup/SChartBurnup.vue.d.ts.map +1 -0
  30. package/dist/components/SChartBurnup/index.d.ts +3 -0
  31. package/dist/components/SChartBurnup/index.d.ts.map +1 -0
  32. package/dist/components/SChartBurnup/utils/buildBurnupChartConfig.d.ts +18 -0
  33. package/dist/components/SChartBurnup/utils/buildBurnupChartConfig.d.ts.map +1 -0
  34. package/dist/components/SChartBurnup/utils/demoBurnupPoints.d.ts +4 -0
  35. package/dist/components/SChartBurnup/utils/demoBurnupPoints.d.ts.map +1 -0
  36. package/dist/components/SChartBurnup/utils/skeletonBurnupPoints.d.ts +3 -0
  37. package/dist/components/SChartBurnup/utils/skeletonBurnupPoints.d.ts.map +1 -0
  38. package/dist/components/SChartMultiLine/SChartMultiLine.types.d.ts +19 -0
  39. package/dist/components/SChartMultiLine/SChartMultiLine.types.d.ts.map +1 -0
  40. package/dist/components/SChartMultiLine/SChartMultiLine.vue.d.ts +5 -0
  41. package/dist/components/SChartMultiLine/SChartMultiLine.vue.d.ts.map +1 -0
  42. package/dist/components/SChartMultiLine/index.d.ts +3 -0
  43. package/dist/components/SChartMultiLine/index.d.ts.map +1 -0
  44. package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts +13 -0
  45. package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts.map +1 -0
  46. package/dist/components/SChartMultiLine/utils/demoMultiLineSeries.d.ts +3 -0
  47. package/dist/components/SChartMultiLine/utils/demoMultiLineSeries.d.ts.map +1 -0
  48. package/dist/components/SChartMultiLine/utils/skeletonMultiLineSeries.d.ts +6 -0
  49. package/dist/components/SChartMultiLine/utils/skeletonMultiLineSeries.d.ts.map +1 -0
  50. package/dist/components/SChartSegmentedBar/SChartSegmentedBar.types.d.ts +11 -0
  51. package/dist/components/SChartSegmentedBar/SChartSegmentedBar.types.d.ts.map +1 -0
  52. package/dist/components/SChartSegmentedBar/SChartSegmentedBar.vue.d.ts +5 -0
  53. package/dist/components/SChartSegmentedBar/SChartSegmentedBar.vue.d.ts.map +1 -0
  54. package/dist/components/SChartSegmentedBar/index.d.ts +3 -0
  55. package/dist/components/SChartSegmentedBar/index.d.ts.map +1 -0
  56. package/dist/components/SChartSegmentedBar/utils/buildSegmentedBarChartConfig.d.ts +10 -0
  57. package/dist/components/SChartSegmentedBar/utils/buildSegmentedBarChartConfig.d.ts.map +1 -0
  58. package/dist/components/SChartSegmentedBar/utils/createSegmentedBarBadgePlugin.d.ts +3 -0
  59. package/dist/components/SChartSegmentedBar/utils/createSegmentedBarBadgePlugin.d.ts.map +1 -0
  60. package/dist/components/SChartSegmentedBar/utils/skeletonSegments.d.ts +3 -0
  61. package/dist/components/SChartSegmentedBar/utils/skeletonSegments.d.ts.map +1 -0
  62. package/dist/components/SChartWidget/SChartWidget.types.d.ts +11 -0
  63. package/dist/components/SChartWidget/SChartWidget.types.d.ts.map +1 -0
  64. package/dist/components/SChartWidget/SChartWidget.vue.d.ts +28 -0
  65. package/dist/components/SChartWidget/SChartWidget.vue.d.ts.map +1 -0
  66. package/dist/components/SChartWidget/index.d.ts +3 -0
  67. package/dist/components/SChartWidget/index.d.ts.map +1 -0
  68. package/dist/createChartAreaFillGradient-BDmME9Gy.js +17 -0
  69. package/dist/createChartAreaFillGradient-BwsojVzU.cjs +1 -0
  70. package/dist/createChartCrosshairPlugin-BC0IDCn3.js +14 -0
  71. package/dist/createChartCrosshairPlugin-HfMMUP5O.cjs +1 -0
  72. package/dist/entries/chart-burnup.cjs +1 -0
  73. package/dist/entries/chart-burnup.d.ts +3 -0
  74. package/dist/entries/chart-burnup.d.ts.map +1 -0
  75. package/dist/entries/chart-burnup.js +2 -0
  76. package/dist/entries/chart-horizontal-bar.cjs +1 -1
  77. package/dist/entries/chart-horizontal-bar.js +1 -1
  78. package/dist/entries/chart-line.cjs +1 -1
  79. package/dist/entries/chart-line.js +1 -1
  80. package/dist/entries/chart-multi-line.cjs +1 -0
  81. package/dist/entries/chart-multi-line.d.ts +3 -0
  82. package/dist/entries/chart-multi-line.d.ts.map +1 -0
  83. package/dist/entries/chart-multi-line.js +2 -0
  84. package/dist/entries/chart-pie.cjs +1 -1
  85. package/dist/entries/chart-pie.js +1 -1
  86. package/dist/entries/chart-progress.cjs +1 -1
  87. package/dist/entries/chart-progress.js +1 -1
  88. package/dist/entries/chart-stacked-area.cjs +1 -1
  89. package/dist/entries/chart-stacked-area.js +1 -1
  90. package/dist/entries/chart-stacked-bar.cjs +1 -1
  91. package/dist/entries/chart-stacked-bar.js +1 -1
  92. package/dist/index.cjs +1 -1
  93. package/dist/index.d.ts +8 -0
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/index.js +390 -160
  96. package/dist/resolveSeriesPaletteColor-BcFyrhh0.cjs +1 -0
  97. package/dist/resolveSeriesPaletteColor-m8HQ9qwV.js +9 -0
  98. package/dist/resolveStackedChartContext-BywAnZUu.cjs +1 -0
  99. package/dist/resolveStackedChartContext-DdraOueU.js +26 -0
  100. package/dist/uikit-components.css +1 -1
  101. package/dist/utils/chart/burnup/createBurnupTagPlugin.d.ts +8 -0
  102. package/dist/utils/chart/burnup/createBurnupTagPlugin.d.ts.map +1 -0
  103. package/dist/utils/chart/burnup/createBurnupTodayLinePlugin.d.ts +3 -0
  104. package/dist/utils/chart/burnup/createBurnupTodayLinePlugin.d.ts.map +1 -0
  105. package/dist/utils/chart/burnup/createBurnupTooltipCallbacks.d.ts +11 -0
  106. package/dist/utils/chart/burnup/createBurnupTooltipCallbacks.d.ts.map +1 -0
  107. package/dist/utils/chart/chartJsAugmentation.d.ts +1 -0
  108. package/dist/utils/chart/chartJsAugmentation.d.ts.map +1 -1
  109. package/dist/utils/chart/core/chartCssVariables.d.ts +11 -0
  110. package/dist/utils/chart/core/chartCssVariables.d.ts.map +1 -1
  111. package/dist/utils/chart/core/registerChartJs.d.ts.map +1 -1
  112. package/dist/utils/chart/index.d.ts +11 -0
  113. package/dist/utils/chart/index.d.ts.map +1 -1
  114. package/dist/utils/chart/multiLine/buildMultiLineChartScales.d.ts +112 -0
  115. package/dist/utils/chart/multiLine/buildMultiLineChartScales.d.ts.map +1 -0
  116. package/dist/utils/chart/multiLine/createMultiLineTooltipCallbacks.d.ts +8 -0
  117. package/dist/utils/chart/multiLine/createMultiLineTooltipCallbacks.d.ts.map +1 -0
  118. package/dist/utils/chart/multiLine/resolveMultiLineSeriesColor.d.ts +2 -0
  119. package/dist/utils/chart/multiLine/resolveMultiLineSeriesColor.d.ts.map +1 -0
  120. package/dist/utils/chart/multiLine/resolveMultiLineYMax.d.ts +3 -0
  121. package/dist/utils/chart/multiLine/resolveMultiLineYMax.d.ts.map +1 -0
  122. package/dist/utils/chart/segmentedBar/resolveSegmentedBarSegmentColor.d.ts +2 -0
  123. package/dist/utils/chart/segmentedBar/resolveSegmentedBarSegmentColor.d.ts.map +1 -0
  124. package/package.json +13 -3
  125. package/dist/SChartLegend-BFwzIA4x.cjs +0 -1
  126. package/dist/SChartLegend-DW16AfUz.js +0 -35
  127. package/dist/SChartLine-G5CeC01A.js +0 -137
  128. package/dist/SChartLine-xql-HCwK.cjs +0 -1
  129. package/dist/SChartPie-xu1fcWMy.cjs +0 -1
  130. package/dist/SChartSkeletonHost-YmLC5zOX.cjs +0 -1
  131. package/dist/SChartStackedArea-BUy47veO.cjs +0 -1
  132. package/dist/SChartStackedBar-1HNyHP8J.cjs +0 -1
  133. package/dist/buildChartSeriesPoints-D-j16fMh.js +0 -35
  134. package/dist/buildChartSeriesPoints-lASMQmBx.cjs +0 -1
package/dist/index.js CHANGED
@@ -30,58 +30,86 @@ import { n as Ze, t as Qe } from "./SToggle-T7FKzMSo.js";
30
30
  import { n as $e, t as et } from "./SInlineInput-DHq5BNPn.js";
31
31
  import { t as tt } from "./STextarea-ASdLqfpC.js";
32
32
  import { n as nt, r as rt, t as it } from "./SPhotoEdit-bXKHcP3x.js";
33
- import { t as at } from "./SChartLine-G5CeC01A.js";
34
- import { t as ot } from "./SChartStackedArea-RKK7aT7x.js";
35
- import { t as st } from "./SChartStackedBar-CJunMhyb.js";
36
- import { t as ct } from "./SChartHorizontalBar-DIn1sVoi.js";
37
- import { t as lt } from "./SChartPie-_6ij1EVn.js";
38
- import { t as ut } from "./SChartProgress-CofVafO6.js";
39
- import { Fragment as dt, Teleport as ft, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createSlots as A, createTextVNode as j, createVNode as pt, defineComponent as M, mergeProps as mt, normalizeClass as ht, normalizeStyle as N, onMounted as gt, openBlock as P, ref as F, renderList as _t, renderSlot as I, resolveDynamicComponent as vt, shallowRef as L, toDisplayString as R, unref as z, useSlots as B, watch as yt, withCtx as V } from "vue";
40
- import { ESIconName as H, SIcon as bt, createUiKit as xt, setUiKitLocale as St, uiKitLocaleEn as Ct, uiKitLocaleRu as wt, useUiKitI18n as Tt } from "@shtabapp/ui-kit-primitives";
41
- import { useResizeObserver as Et } from "@vueuse/core";
33
+ import { S as T, g as E, n as at, r as ot, t as st } from "./SChartSkeletonHost-CecfQ3Ye.js";
34
+ import { t as ct } from "./SChartLine-CiREb4H_.js";
35
+ import { t as lt } from "./resolveSeriesPaletteColor-m8HQ9qwV.js";
36
+ import { t as ut } from "./SChartStackedArea-cjN9gECV.js";
37
+ import { t as dt } from "./SChartStackedBar-0jGICBA0.js";
38
+ import { t as ft } from "./SChartHorizontalBar-bm3Jexa3.js";
39
+ import { t as pt } from "./SChartPie-Dc_gjzIl.js";
40
+ import { t as mt } from "./SChartMultiLine-3cdB0U12.js";
41
+ import { t as ht } from "./SChartBurnup-DYBnJMnm.js";
42
+ import { t as gt } from "./SChartProgress-Zdphet8I.js";
43
+ import { t as _t } from "./SChartLegend-Chr0IZWN.js";
44
+ import { Fragment as vt, Teleport as yt, computed as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createSlots as M, createTextVNode as N, createVNode as P, defineComponent as F, mergeModels as bt, mergeProps as xt, normalizeClass as I, normalizeStyle as L, onMounted as St, openBlock as R, ref as z, renderList as Ct, renderSlot as B, resolveDynamicComponent as wt, shallowRef as Tt, toDisplayString as V, unref as H, useModel as Et, useSlots as U, useTemplateRef as Dt, watch as Ot, withCtx as W } from "vue";
45
+ import { ESIconName as G, SIcon as kt, createUiKit as At, setUiKitLocale as jt, uiKitLocaleEn as Mt, uiKitLocaleRu as Nt, useUiKitI18n as Pt, useUiKitI18n as Ft } from "@shtabapp/ui-kit-primitives";
46
+ import { useResizeObserver as It } from "@vueuse/core";
42
47
  export * from "@shtabapp/ui-kit-primitives";
43
48
  export * from "@shtabapp/ui-kit-tokens";
44
- //#region src/components/SNotification/SNotification.types.ts
45
- var U = /* @__PURE__ */ function(e) {
49
+ //#region src/utils/chart/segmentedBar/resolveSegmentedBarSegmentColor.ts
50
+ var Lt = [
51
+ "--s-ui-chart-segmented-bar-palette-1",
52
+ "--s-ui-chart-segmented-bar-palette-2",
53
+ "--s-ui-chart-segmented-bar-palette-3",
54
+ "--s-ui-chart-segmented-bar-palette-4",
55
+ "--s-ui-chart-segmented-bar-palette-5",
56
+ "--s-ui-chart-segmented-bar-palette-6",
57
+ "--s-ui-chart-segmented-bar-palette-7",
58
+ "--s-ui-chart-segmented-bar-palette-8"
59
+ ], Rt = [
60
+ "--s-ui-chart-segmented-bar-skeleton-palette-1",
61
+ "--s-ui-chart-segmented-bar-skeleton-palette-2",
62
+ "--s-ui-chart-segmented-bar-skeleton-palette-3",
63
+ "--s-ui-chart-segmented-bar-skeleton-palette-4",
64
+ "--s-ui-chart-segmented-bar-skeleton-palette-5",
65
+ "--s-ui-chart-segmented-bar-skeleton-palette-6",
66
+ "--s-ui-chart-segmented-bar-skeleton-palette-7",
67
+ "--s-ui-chart-segmented-bar-skeleton-palette-8"
68
+ ], zt = (e, t, n, r = !1) => lt(e, t, n, r, {
69
+ palette: Lt,
70
+ paletteFallback: Lt[0],
71
+ skeletonPalette: Rt,
72
+ skeletonFallback: Rt[0]
73
+ }), K = /* @__PURE__ */ function(e) {
46
74
  return e.INFO_ACCENT = "info-accent", e.INFO_NORMAL = "info-normal", e.SUCCESS = "success", e.WARNING = "warning", e.DANGER = "danger", e.BILLING = "billing", e;
47
- }({}), W = /* @__PURE__ */ function(e) {
75
+ }({}), q = /* @__PURE__ */ function(e) {
48
76
  return e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e;
49
- }({}), G = /* @__PURE__ */ function(e) {
77
+ }({}), J = /* @__PURE__ */ function(e) {
50
78
  return e.ICON = "icon", e.AVATAR = "avatar", e;
51
- }({}), K = /* @__PURE__ */ function(e) {
79
+ }({}), Y = /* @__PURE__ */ function(e) {
52
80
  return e.BANNER = "banner", e.TOAST = "toast", e;
53
- }({}), Dt = {
54
- [U.INFO_ACCENT]: H.infoCircle,
55
- [U.INFO_NORMAL]: H.infoCircle,
56
- [U.SUCCESS]: H.checkCircle,
57
- [U.WARNING]: H.alertCircle,
58
- [U.DANGER]: H.dangerCircleFill,
59
- [U.BILLING]: H.infoCircle
60
- }, Ot = (e, t) => t || Dt[e], kt = ["role"], At = { class: "s-ui-notification__body" }, jt = {
81
+ }({}), Bt = {
82
+ [K.INFO_ACCENT]: G.infoCircle,
83
+ [K.INFO_NORMAL]: G.infoCircle,
84
+ [K.SUCCESS]: G.checkCircle,
85
+ [K.WARNING]: G.alertCircle,
86
+ [K.DANGER]: G.dangerCircleFill,
87
+ [K.BILLING]: G.infoCircle
88
+ }, Vt = (e, t) => t || Bt[e], Ht = ["role"], Ut = { class: "s-ui-notification__body" }, Wt = {
61
89
  key: 0,
62
90
  class: "s-ui-notification__leftside"
63
- }, Mt = {
91
+ }, Gt = {
64
92
  key: 0,
65
93
  class: "s-ui-notification__icon"
66
- }, Nt = { class: "s-ui-notification__content" }, Pt = { class: "s-ui-notification__title-row" }, Ft = { class: "s-ui-notification__title s-ui-typography-label-14-medium" }, It = {
94
+ }, Kt = { class: "s-ui-notification__content" }, qt = { class: "s-ui-notification__title-row" }, Jt = { class: "s-ui-notification__title s-ui-typography-label-14-medium" }, Yt = {
67
95
  key: 0,
68
96
  class: "s-ui-notification__description-block"
69
- }, Lt = {
97
+ }, Xt = {
70
98
  key: 0,
71
99
  class: "s-ui-notification__description s-ui-typography-label-12-medium"
72
- }, Rt = {
100
+ }, Zt = {
73
101
  key: 1,
74
102
  class: "s-ui-notification__actions-stack"
75
- }, zt = {
103
+ }, Qt = {
76
104
  key: 1,
77
105
  class: "s-ui-notification__actions-row"
78
- }, q = /* @__PURE__ */ M({
106
+ }, $t = /* @__PURE__ */ F({
79
107
  __name: "SNotification",
80
108
  props: {
81
- type: { default: () => U.INFO_ACCENT },
82
- layout: { default: () => W.HORIZONTAL },
83
- leftside: { default: () => G.ICON },
84
- surface: { default: () => K.BANNER },
109
+ type: { default: () => K.INFO_ACCENT },
110
+ layout: { default: () => q.HORIZONTAL },
111
+ leftside: { default: () => J.ICON },
112
+ surface: { default: () => Y.BANNER },
85
113
  title: {},
86
114
  description: {},
87
115
  linkText: {},
@@ -108,14 +136,14 @@ var U = /* @__PURE__ */ function(e) {
108
136
  "secondaryAction"
109
137
  ],
110
138
  setup(e, { emit: t }) {
111
- let n = t, r = B(), i = T(() => [
139
+ let n = t, r = U(), i = D(() => [
112
140
  `s-ui-notification--type-${e.type}`,
113
141
  `s-ui-notification--layout-${e.layout}`,
114
142
  `s-ui-notification--surface-${e.surface}`
115
- ]), a = T(() => {
143
+ ]), a = D(() => {
116
144
  let t = {};
117
145
  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;
118
- }), s = T(() => e.type === U.DANGER ? "alert" : "status"), l = T(() => Ot(e.type, e.icon)), u = T(() => e.type === U.BILLING), d = T(() => !!(e.leftside === G.AVATAR && e.avatar || e.leftside === G.ICON)), f = T(() => !!(e.description || e.linkText || r.description)), p = T(() => e.showPrimaryButton && (e.primaryButtonText || e.secondaryButtonText)), m = T(() => e.showPrimaryButton && e.primaryButtonText || e.closable), h = T(() => e.type === U.BILLING ? C.MAJOR : C.OUTLINED), g = T(() => e.type === U.BILLING ? S.BILLING : S.MAIN), _ = () => {
146
+ }), s = D(() => e.type === K.DANGER ? "alert" : "status"), l = D(() => Vt(e.type, e.icon)), u = D(() => e.type === K.BILLING), d = D(() => !!(e.leftside === J.AVATAR && e.avatar || e.leftside === J.ICON)), f = D(() => !!(e.description || e.linkText || r.description)), p = D(() => e.showPrimaryButton && (e.primaryButtonText || e.secondaryButtonText)), m = D(() => e.showPrimaryButton && e.primaryButtonText || e.closable), h = D(() => e.type === K.BILLING ? C.MAJOR : C.OUTLINED), g = D(() => e.type === K.BILLING ? S.BILLING : S.MAIN), _ = () => {
119
147
  n("close");
120
148
  }, v = () => {
121
149
  n("linkClick");
@@ -124,35 +152,35 @@ var U = /* @__PURE__ */ function(e) {
124
152
  }, b = () => {
125
153
  n("secondaryAction");
126
154
  };
127
- return (t, n) => (P(), O("div", {
128
- class: ht(["s-ui-notification", i.value]),
129
- style: N(a.value),
155
+ return (t, n) => (R(), A("div", {
156
+ class: I(["s-ui-notification", i.value]),
157
+ style: L(a.value),
130
158
  role: s.value
131
- }, [k("div", At, [
132
- d.value ? (P(), O("div", jt, [e.leftside === z(G).ICON ? (P(), O("div", Mt, [pt(z(bt), {
159
+ }, [j("div", Ut, [
160
+ d.value ? (R(), A("div", Wt, [e.leftside === H(J).ICON ? (R(), A("div", Gt, [P(H(kt), {
133
161
  name: l.value,
134
162
  size: 16,
135
163
  billing: u.value
136
- }, null, 8, ["name", "billing"])])) : e.leftside === z(G).AVATAR && e.avatar ? (P(), E(z(c), {
164
+ }, null, 8, ["name", "billing"])])) : e.leftside === H(J).AVATAR && e.avatar ? (R(), O(H(c), {
137
165
  key: 1,
138
166
  name: e.avatar.name,
139
167
  src: e.avatar.src,
140
168
  badge: e.avatar.badge,
141
- size: z(o).SIZE_20,
169
+ size: H(o).SIZE_20,
142
170
  showName: !1
143
171
  }, null, 8, [
144
172
  "name",
145
173
  "src",
146
174
  "badge",
147
175
  "size"
148
- ])) : D("", !0)])) : D("", !0),
149
- k("div", Nt, [
150
- k("div", Pt, [k("span", Ft, [I(t.$slots, "title", {}, () => [j(R(e.title), 1)])]), e.layout === z(W).VERTICAL && e.closable ? (P(), E(z(w), {
176
+ ])) : k("", !0)])) : k("", !0),
177
+ j("div", Kt, [
178
+ j("div", qt, [j("span", Jt, [B(t.$slots, "title", {}, () => [N(V(e.title), 1)])]), e.layout === H(q).VERTICAL && e.closable ? (R(), O(H(w), {
151
179
  key: 0,
152
180
  class: "s-ui-notification__close",
153
- appearance: z(C).BARE,
154
- variant: z(S).NEUTRAL,
155
- size: z(x).SMALL,
181
+ appearance: H(C).BARE,
182
+ variant: H(S).NEUTRAL,
183
+ size: H(x).SMALL,
156
184
  "aria-label": e.closeAriaLabel,
157
185
  icon: "closeMini",
158
186
  onClick: _
@@ -161,69 +189,69 @@ var U = /* @__PURE__ */ function(e) {
161
189
  "variant",
162
190
  "size",
163
191
  "aria-label"
164
- ])) : D("", !0)]),
165
- f.value ? (P(), O("div", It, [e.description || z(r).description ? (P(), O("span", Lt, [I(t.$slots, "description", {}, () => [j(R(e.description), 1)])])) : D("", !0), e.linkText ? (P(), E(z(w), {
192
+ ])) : k("", !0)]),
193
+ f.value ? (R(), A("div", Yt, [e.description || H(r).description ? (R(), A("span", Xt, [B(t.$slots, "description", {}, () => [N(V(e.description), 1)])])) : k("", !0), e.linkText ? (R(), O(H(w), {
166
194
  key: 1,
167
195
  class: "s-ui-notification__link",
168
- appearance: z(C).BARE,
169
- variant: z(S).MAIN,
170
- size: z(x).SMALL,
196
+ appearance: H(C).BARE,
197
+ variant: H(S).MAIN,
198
+ size: H(x).SMALL,
171
199
  onClick: v
172
200
  }, {
173
- default: V(() => [j(R(e.linkText), 1)]),
201
+ default: W(() => [N(V(e.linkText), 1)]),
174
202
  _: 1
175
203
  }, 8, [
176
204
  "appearance",
177
205
  "variant",
178
206
  "size"
179
- ])) : D("", !0)])) : D("", !0),
180
- e.layout === z(W).VERTICAL && p.value ? (P(), O("div", Rt, [e.showPrimaryButton && e.primaryButtonText ? (P(), E(z(w), {
207
+ ])) : k("", !0)])) : k("", !0),
208
+ e.layout === H(q).VERTICAL && p.value ? (R(), A("div", Zt, [e.showPrimaryButton && e.primaryButtonText ? (R(), O(H(w), {
181
209
  key: 0,
182
210
  appearance: h.value,
183
211
  variant: g.value,
184
- size: z(x).SMALL,
212
+ size: H(x).SMALL,
185
213
  onClick: y
186
214
  }, {
187
- default: V(() => [j(R(e.primaryButtonText), 1)]),
215
+ default: W(() => [N(V(e.primaryButtonText), 1)]),
188
216
  _: 1
189
217
  }, 8, [
190
218
  "appearance",
191
219
  "variant",
192
220
  "size"
193
- ])) : D("", !0), e.showPrimaryButton && e.secondaryButtonText ? (P(), E(z(w), {
221
+ ])) : k("", !0), e.showPrimaryButton && e.secondaryButtonText ? (R(), O(H(w), {
194
222
  key: 1,
195
- appearance: z(C).BARE,
196
- variant: z(S).NEUTRAL,
197
- size: z(x).SMALL,
223
+ appearance: H(C).BARE,
224
+ variant: H(S).NEUTRAL,
225
+ size: H(x).SMALL,
198
226
  onClick: b
199
227
  }, {
200
- default: V(() => [j(R(e.secondaryButtonText), 1)]),
228
+ default: W(() => [N(V(e.secondaryButtonText), 1)]),
201
229
  _: 1
202
230
  }, 8, [
203
231
  "appearance",
204
232
  "variant",
205
233
  "size"
206
- ])) : D("", !0)])) : D("", !0)
234
+ ])) : k("", !0)])) : k("", !0)
207
235
  ]),
208
- e.layout === z(W).HORIZONTAL && m.value ? (P(), O("div", zt, [e.showPrimaryButton && e.primaryButtonText ? (P(), E(z(w), {
236
+ e.layout === H(q).HORIZONTAL && m.value ? (R(), A("div", Qt, [e.showPrimaryButton && e.primaryButtonText ? (R(), O(H(w), {
209
237
  key: 0,
210
238
  appearance: h.value,
211
239
  variant: g.value,
212
- size: z(x).SMALL,
240
+ size: H(x).SMALL,
213
241
  onClick: y
214
242
  }, {
215
- default: V(() => [j(R(e.primaryButtonText), 1)]),
243
+ default: W(() => [N(V(e.primaryButtonText), 1)]),
216
244
  _: 1
217
245
  }, 8, [
218
246
  "appearance",
219
247
  "variant",
220
248
  "size"
221
- ])) : D("", !0), e.layout === z(W).HORIZONTAL && e.closable ? (P(), E(z(w), {
249
+ ])) : k("", !0), e.layout === H(q).HORIZONTAL && e.closable ? (R(), O(H(w), {
222
250
  key: 1,
223
251
  class: "s-ui-notification__close",
224
- appearance: z(C).BARE,
225
- variant: z(S).NEUTRAL,
226
- size: z(x).SMALL,
252
+ appearance: H(C).BARE,
253
+ variant: H(S).NEUTRAL,
254
+ size: H(x).SMALL,
227
255
  "aria-label": e.closeAriaLabel,
228
256
  icon: "closeMini",
229
257
  onClick: _
@@ -232,15 +260,15 @@ var U = /* @__PURE__ */ function(e) {
232
260
  "variant",
233
261
  "size",
234
262
  "aria-label"
235
- ])) : D("", !0)])) : D("", !0)
236
- ])], 14, kt));
263
+ ])) : k("", !0)])) : k("", !0)
264
+ ])], 14, Ht));
237
265
  }
238
- }), Bt = /* @__PURE__ */ M({
266
+ }), en = /* @__PURE__ */ F({
239
267
  __name: "SBanner",
240
268
  props: {
241
- type: { default: () => U.INFO_ACCENT },
242
- layout: { default: () => W.HORIZONTAL },
243
- leftside: { default: () => G.ICON },
269
+ type: { default: () => K.INFO_ACCENT },
270
+ layout: { default: () => q.HORIZONTAL },
271
+ leftside: { default: () => J.ICON },
244
272
  title: {},
245
273
  description: {},
246
274
  linkText: {},
@@ -266,14 +294,14 @@ var U = /* @__PURE__ */ function(e) {
266
294
  "secondaryAction"
267
295
  ],
268
296
  setup(e, { emit: t }) {
269
- let n = t, r = B();
270
- return (t, i) => (P(), E(q, {
297
+ let n = t, r = U();
298
+ return (t, i) => (R(), O($t, {
271
299
  class: "s-ui-banner",
272
300
  "data-qa": "ui:banner",
273
301
  type: e.type,
274
302
  layout: e.layout,
275
303
  leftside: e.leftside,
276
- surface: z(K).BANNER,
304
+ surface: H(Y).BANNER,
277
305
  title: e.title,
278
306
  description: e.description,
279
307
  linkText: e.linkText,
@@ -289,13 +317,13 @@ var U = /* @__PURE__ */ function(e) {
289
317
  onLinkClick: i[1] ||= (e) => n("linkClick"),
290
318
  onPrimaryAction: i[2] ||= (e) => n("primaryAction"),
291
319
  onSecondaryAction: i[3] ||= (e) => n("secondaryAction")
292
- }, A({ _: 2 }, [z(r).title ? {
320
+ }, M({ _: 2 }, [H(r).title ? {
293
321
  name: "title",
294
- fn: V(() => [I(t.$slots, "title")]),
322
+ fn: W(() => [B(t.$slots, "title")]),
295
323
  key: "0"
296
- } : void 0, z(r).description ? {
324
+ } : void 0, H(r).description ? {
297
325
  name: "description",
298
- fn: V(() => [I(t.$slots, "description")]),
326
+ fn: W(() => [B(t.$slots, "description")]),
299
327
  key: "1"
300
328
  } : void 0]), 1032, [
301
329
  "type",
@@ -315,12 +343,12 @@ var U = /* @__PURE__ */ function(e) {
315
343
  "maxWidth"
316
344
  ]));
317
345
  }
318
- }), J = /* @__PURE__ */ M({
346
+ }), tn = /* @__PURE__ */ F({
319
347
  __name: "SToast",
320
348
  props: {
321
- type: { default: () => U.INFO_ACCENT },
322
- layout: { default: () => W.HORIZONTAL },
323
- leftside: { default: () => G.ICON },
349
+ type: { default: () => K.INFO_ACCENT },
350
+ layout: { default: () => q.HORIZONTAL },
351
+ leftside: { default: () => J.ICON },
324
352
  title: {},
325
353
  description: {},
326
354
  linkText: {},
@@ -346,14 +374,14 @@ var U = /* @__PURE__ */ function(e) {
346
374
  "secondaryAction"
347
375
  ],
348
376
  setup(e, { emit: t }) {
349
- let n = t, r = B(), i = T(() => e.width ?? 360);
350
- return (t, a) => (P(), E(q, {
377
+ let n = t, r = U(), i = D(() => e.width ?? 360);
378
+ return (t, a) => (R(), O($t, {
351
379
  class: "s-ui-toast",
352
380
  "data-qa": "ui:toast",
353
381
  type: e.type,
354
382
  layout: e.layout,
355
383
  leftside: e.leftside,
356
- surface: z(K).TOAST,
384
+ surface: H(Y).TOAST,
357
385
  title: e.title,
358
386
  description: e.description,
359
387
  linkText: e.linkText,
@@ -369,13 +397,13 @@ var U = /* @__PURE__ */ function(e) {
369
397
  onLinkClick: a[1] ||= (e) => n("linkClick"),
370
398
  onPrimaryAction: a[2] ||= (e) => n("primaryAction"),
371
399
  onSecondaryAction: a[3] ||= (e) => n("secondaryAction")
372
- }, A({ _: 2 }, [z(r).title ? {
400
+ }, M({ _: 2 }, [H(r).title ? {
373
401
  name: "title",
374
- fn: V(() => [I(t.$slots, "title")]),
402
+ fn: W(() => [B(t.$slots, "title")]),
375
403
  key: "0"
376
- } : void 0, z(r).description ? {
404
+ } : void 0, H(r).description ? {
377
405
  name: "description",
378
- fn: V(() => [I(t.$slots, "description")]),
406
+ fn: W(() => [B(t.$slots, "description")]),
379
407
  key: "1"
380
408
  } : void 0]), 1032, [
381
409
  "type",
@@ -395,13 +423,13 @@ var U = /* @__PURE__ */ function(e) {
395
423
  "width"
396
424
  ]));
397
425
  }
398
- }), Vt = .05, Ht = [
426
+ }), nn = .05, rn = [
399
427
  "data-mounted",
400
428
  "data-front",
401
429
  "data-expanded",
402
430
  "data-removed",
403
431
  "data-visible"
404
- ], Ut = /* @__PURE__ */ M({
432
+ ], an = /* @__PURE__ */ F({
405
433
  __name: "SToastProviderToast",
406
434
  props: {
407
435
  index: {},
@@ -414,7 +442,7 @@ var U = /* @__PURE__ */ function(e) {
414
442
  },
415
443
  emits: ["heightChange"],
416
444
  setup(e, { emit: t }) {
417
- let n = t, r = F(null), i = F(0), a = F(!1), o = T(() => e.index === 0), s = T(() => 1 - e.index * Vt), c = T(() => ({
445
+ let n = t, r = z(null), i = z(0), a = z(!1), o = D(() => e.index === 0), s = D(() => 1 - e.index * nn), c = D(() => ({
418
446
  "--s-ui-toast-provider-toasts-before": String(e.index),
419
447
  "--s-ui-toast-provider-lift-amount": `${e.stackPeek * -1}px`,
420
448
  "--s-ui-toast-provider-front-toast-height": `${e.frontToastHeight}px`,
@@ -423,95 +451,95 @@ var U = /* @__PURE__ */ function(e) {
423
451
  "--s-ui-toast-provider-stack-scale": String(s.value),
424
452
  zIndex: String(1e3 - e.index)
425
453
  }));
426
- return Et(r, (e) => {
454
+ return It(r, (e) => {
427
455
  let t = e[0]?.contentRect.height ?? 0;
428
456
  t !== i.value && (i.value = t, n("heightChange", t));
429
- }), gt(() => {
457
+ }), St(() => {
430
458
  requestAnimationFrame(() => {
431
459
  requestAnimationFrame(() => {
432
460
  a.value = !0;
433
461
  });
434
462
  });
435
- }), (t, n) => (P(), O("div", {
463
+ }), (t, n) => (R(), A("div", {
436
464
  class: "s-ui-toast-provider__toast",
437
465
  "data-mounted": a.value,
438
466
  "data-front": o.value,
439
467
  "data-expanded": e.expanded,
440
468
  "data-removed": e.removed,
441
469
  "data-visible": e.visible,
442
- style: N(c.value)
443
- }, [k("div", {
470
+ style: L(c.value)
471
+ }, [j("div", {
444
472
  ref_key: "contentRef",
445
473
  ref: r,
446
474
  class: "s-ui-toast-provider__toast-content"
447
- }, [I(t.$slots, "default")], 512)], 12, Ht));
475
+ }, [B(t.$slots, "default")], 512)], 12, rn));
448
476
  }
449
- }), Y = 4e3, X = 1e4, Wt = 50, Gt = (e, t) => {
450
- let n = Y + (e.length + (t?.length ?? 0)) * 50;
451
- return n > 1e4 ? X : n;
452
- }, Z = L([]), Q = /* @__PURE__ */ new Map(), Kt = 0, qt = {
453
- type: U.INFO_ACCENT,
454
- layout: W.HORIZONTAL,
455
- leftside: G.ICON,
477
+ }), on = 4e3, sn = 1e4, cn = 50, ln = (e, t) => {
478
+ let n = on + (e.length + (t?.length ?? 0)) * 50;
479
+ return n > 1e4 ? sn : n;
480
+ }, X = Tt([]), Z = /* @__PURE__ */ new Map(), un = 0, dn = {
481
+ type: K.INFO_ACCENT,
482
+ layout: q.HORIZONTAL,
483
+ leftside: J.ICON,
456
484
  showPrimaryButton: !1,
457
485
  closable: !0
458
- }, Jt = () => `toast-${Date.now()}-${++Kt}`, $ = (e) => {
459
- let t = Q.get(e);
460
- t && (window.clearTimeout(t), Q.delete(e));
461
- }, Yt = (e) => {
462
- $(e.id);
463
- let t = e.duration === void 0 ? Gt(e.title, e.description) : e.duration;
486
+ }, fn = () => `toast-${Date.now()}-${++un}`, Q = (e) => {
487
+ let t = Z.get(e);
488
+ t && (window.clearTimeout(t), Z.delete(e));
489
+ }, pn = (e) => {
490
+ Q(e.id);
491
+ let t = e.duration === void 0 ? ln(e.title, e.description) : e.duration;
464
492
  if (t > 0) {
465
493
  let n = window.setTimeout(() => {
466
- Xt(e.id);
494
+ mn(e.id);
467
495
  }, t);
468
- Q.set(e.id, n);
496
+ Z.set(e.id, n);
469
497
  }
470
- }, Xt = (e) => {
471
- let t = Z.value.findIndex((t) => t.id === e);
498
+ }, mn = (e) => {
499
+ let t = X.value.findIndex((t) => t.id === e);
472
500
  if (t === -1) return;
473
- let n = Z.value[t];
474
- n && ($(e), n.onClose && n.onClose(), Z.value = Z.value.filter((t) => t.id !== e));
475
- }, Zt = () => {
476
- Q.forEach((e) => window.clearTimeout(e)), Q.clear(), Z.value = [];
477
- }, Qt = (e) => e.length <= 3 ? e : (e.slice(3).forEach((e) => {
478
- $(e.id);
479
- }), e.slice(0, 3)), $t = (e) => {
480
- let t = e.id ?? Jt(), n = {
481
- ...qt,
501
+ let n = X.value[t];
502
+ n && (Q(e), n.onClose && n.onClose(), X.value = X.value.filter((t) => t.id !== e));
503
+ }, hn = () => {
504
+ Z.forEach((e) => window.clearTimeout(e)), Z.clear(), X.value = [];
505
+ }, gn = (e) => e.length <= 3 ? e : (e.slice(3).forEach((e) => {
506
+ Q(e.id);
507
+ }), e.slice(0, 3)), _n = (e) => {
508
+ let t = e.id ?? fn(), n = {
509
+ ...dn,
482
510
  ...e,
483
511
  id: t
484
- }, r = Z.value.findIndex((e) => e.id === t);
512
+ }, r = X.value.findIndex((e) => e.id === t);
485
513
  if (r > -1) {
486
- let e = [...Z.value];
487
- e[r] = n, Z.value = Qt(e);
488
- } else Z.value = Qt([n, ...Z.value]);
489
- return Yt(n), t;
490
- }, en = (e, t) => {
491
- let n = Z.value.findIndex((t) => t.id === e);
514
+ let e = [...X.value];
515
+ e[r] = n, X.value = gn(e);
516
+ } else X.value = gn([n, ...X.value]);
517
+ return pn(n), t;
518
+ }, vn = (e, t) => {
519
+ let n = X.value.findIndex((t) => t.id === e);
492
520
  if (n === -1) return;
493
- let r = Z.value[n];
521
+ let r = X.value[n];
494
522
  if (!r) return;
495
523
  let i = {
496
524
  ...r,
497
525
  ...t,
498
526
  id: r.id
499
- }, a = [...Z.value];
500
- a[n] = i, Z.value = a, Yt(i);
501
- }, tn = () => ({
502
- toasts: Z,
503
- show: $t,
504
- hide: Xt,
505
- hideAll: Zt,
506
- update: en
507
- }), nn = /* @__PURE__ */ M({
527
+ }, a = [...X.value];
528
+ a[n] = i, X.value = a, pn(i);
529
+ }, yn = () => ({
530
+ toasts: X,
531
+ show: _n,
532
+ hide: mn,
533
+ hideAll: hn,
534
+ update: vn
535
+ }), bn = /* @__PURE__ */ F({
508
536
  __name: "SToastProvider",
509
537
  setup(e) {
510
- let { toasts: t, hide: n } = tn(), r = T(() => t.value.slice(0, 3)), i = F(!1), a = L({}), o = F(/* @__PURE__ */ new Set()), s = T(() => t.value[0] ?? null), c = T(() => s.value ? a.value[s.value.id] ?? 0 : 0), l = F(0), u = T(() => c.value > 0 ? c.value : l.value);
511
- yt(c, (e) => {
538
+ let { toasts: t, hide: n } = yn(), r = D(() => t.value.slice(0, 3)), i = z(!1), a = Tt({}), o = z(/* @__PURE__ */ new Set()), s = D(() => t.value[0] ?? null), c = D(() => s.value ? a.value[s.value.id] ?? 0 : 0), l = z(0), u = D(() => c.value > 0 ? c.value : l.value);
539
+ Ot(c, (e) => {
512
540
  e > 0 && (l.value = e);
513
541
  });
514
- let d = T(() => {
542
+ let d = D(() => {
515
543
  if (r.value.length === 0) return {};
516
544
  if (i.value) return { height: `${r.value.reduce((e, t, n) => {
517
545
  let r = a.value[t.id] ?? 0, i = n > 0 ? 4 : 0;
@@ -550,32 +578,32 @@ var U = /* @__PURE__ */ function(e) {
550
578
  }, b = (e) => {
551
579
  e.onSecondaryAction && e.onSecondaryAction();
552
580
  };
553
- return (e, t) => (P(), E(ft, { to: "body" }, [k("div", {
581
+ return (e, t) => (R(), O(yt, { to: "body" }, [j("div", {
554
582
  class: "s-ui-toast-provider",
555
583
  onMouseenter: m,
556
584
  onMouseleave: h
557
- }, [r.value.length > 0 ? (P(), O("div", {
585
+ }, [r.value.length > 0 ? (R(), A("div", {
558
586
  key: 0,
559
587
  class: "s-ui-toast-provider__list",
560
- style: N(d.value)
561
- }, [(P(!0), O(dt, null, _t(r.value, (t, n) => (P(), E(Ut, {
588
+ style: L(d.value)
589
+ }, [(R(!0), A(vt, null, Ct(r.value, (t, n) => (R(), O(an, {
562
590
  key: t.id,
563
591
  index: n,
564
592
  expanded: i.value,
565
593
  "front-toast-height": u.value,
566
- "stack-peek": z(10),
594
+ "stack-peek": H(10),
567
595
  removed: p(t.id),
568
- visible: n < z(3),
596
+ visible: n < H(3),
569
597
  "offset-y": f(n),
570
598
  onHeightChange: (e) => g(t.id, e)
571
599
  }, {
572
- default: V(() => [I(e.$slots, "toast", { toast: t }, () => [t.component ? (P(), E(vt(t.component), mt({
600
+ default: W(() => [B(e.$slots, "toast", { toast: t }, () => [t.component ? (R(), O(wt(t.component), xt({
573
601
  key: 0,
574
602
  ref_for: !0
575
603
  }, t.componentProps, {
576
604
  toast: t,
577
605
  onClose: (e) => _(t.id)
578
- }), null, 16, ["toast", "onClose"])) : (P(), E(z(J), {
606
+ }), null, 16, ["toast", "onClose"])) : (R(), O(H(tn), {
579
607
  key: 1,
580
608
  type: t.type,
581
609
  layout: t.layout,
@@ -625,8 +653,210 @@ var U = /* @__PURE__ */ function(e) {
625
653
  "visible",
626
654
  "offset-y",
627
655
  "onHeightChange"
628
- ]))), 128))], 4)) : D("", !0)], 32)]));
656
+ ]))), 128))], 4)) : k("", !0)], 32)]));
657
+ }
658
+ }), xn = 4, Sn = 4, Cn = 1, wn = "400 12px var(--s-ui-font-family-label)", Tn = 4, En = (e, t, n, r, i, a) => {
659
+ let o = Math.min(a, r / 2, i / 2);
660
+ 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();
661
+ }, Dn = (e) => {
662
+ let t = e.getProps([
663
+ "x",
664
+ "y",
665
+ "base"
666
+ ], !0), n = Number(t.x), r = Number(t.y), i = Number(t.base);
667
+ return !Number.isFinite(n) || !Number.isFinite(r) || !Number.isFinite(i) ? null : {
668
+ left: Math.min(i, n),
669
+ width: Math.abs(n - i),
670
+ centerY: r
671
+ };
672
+ }, On = (e, t, n, r) => {
673
+ let i = Dn(t);
674
+ if (!i) return;
675
+ let a = `${n}`, o = e.measureText(a).width + xn * 2;
676
+ if (i.width < o + Tn * 2) return;
677
+ let s = i.left + i.width / 2;
678
+ En(e, s - o / 2, i.centerY - 20 / 2, o, 20, Sn), e.fillStyle = r.background, e.fill(), e.lineWidth = Cn, e.strokeStyle = r.border, e.stroke(), e.fillStyle = r.text, e.fillText(a, s, i.centerY);
679
+ }, kn = (e) => ({
680
+ id: "segmentedBarBadge",
681
+ afterDatasetsDraw(t) {
682
+ let n = {
683
+ background: T(E.pieBadgeBackground, e),
684
+ border: T(E.pieBadgeBorder, e),
685
+ text: T(E.pieBadgeText, e)
686
+ }, { ctx: r } = t;
687
+ r.save(), r.font = wn, r.textAlign = "center", r.textBaseline = "middle", t.data.datasets.forEach((e, i) => {
688
+ let a = t.getDatasetMeta(i)?.data[0], o = e.data[0];
689
+ a && typeof o == "number" && o > 0 && On(r, a, o, n);
690
+ }), r.restore();
691
+ }
692
+ }), An = 40, jn = 4, Mn = 1, Nn = ({ segments: e, segmentColors: t, colorHostElement: n, skeleton: r = !1 }) => {
693
+ if (e.length === 0) return null;
694
+ let i = T("--s-ui-color-surface-primary", n), a = e.reduce((e, t) => e + t.value, 0);
695
+ return {
696
+ type: "bar",
697
+ data: {
698
+ labels: [""],
699
+ datasets: e.map((e, n) => ({
700
+ label: e.label,
701
+ data: [e.value],
702
+ backgroundColor: t[n],
703
+ hoverBackgroundColor: t[n],
704
+ borderColor: i,
705
+ borderWidth: {
706
+ left: Mn,
707
+ right: Mn
708
+ },
709
+ borderSkipped: !1,
710
+ borderRadius: jn,
711
+ barThickness: An,
712
+ stack: "track"
713
+ }))
714
+ },
715
+ options: {
716
+ indexAxis: "y",
717
+ responsive: !0,
718
+ maintainAspectRatio: !1,
719
+ layout: { padding: 0 },
720
+ events: [],
721
+ plugins: {
722
+ legend: { display: !1 },
723
+ tooltip: { enabled: !1 }
724
+ },
725
+ scales: {
726
+ x: {
727
+ display: !1,
728
+ stacked: !0,
729
+ min: 0,
730
+ max: a
731
+ },
732
+ y: {
733
+ display: !1,
734
+ stacked: !0
735
+ }
736
+ }
737
+ },
738
+ plugins: r ? [] : [kn(n)]
739
+ };
740
+ }, $ = [
741
+ 4,
742
+ 1,
743
+ 2,
744
+ 1,
745
+ 3,
746
+ 1,
747
+ 2,
748
+ 1
749
+ ].map((e, t) => ({
750
+ label: `Series ${t + 1}`,
751
+ value: e
752
+ })), Pn = { class: "s-ui-chart-segmented-bar__canvas-wrap" }, Fn = /* @__PURE__ */ F({
753
+ __name: "SChartSegmentedBar",
754
+ props: {
755
+ segments: { default: () => [] },
756
+ showLegend: {
757
+ type: Boolean,
758
+ default: !0
759
+ },
760
+ loading: {
761
+ type: Boolean,
762
+ default: !1
763
+ }
764
+ },
765
+ setup(e) {
766
+ let t = at, n = Dt("chartRootRef"), r = Dt("chartCanvasRef"), i = D(() => e.loading ? $ : e.segments.filter((e) => e.value > 0)), a = D(() => i.value.map((t, r) => zt(r, n.value, t.fillColor, e.loading))), o = D(() => Nn({
767
+ segments: i.value,
768
+ segmentColors: a.value,
769
+ colorHostElement: n.value,
770
+ skeleton: e.loading
771
+ })), s = D(() => (e.loading ? $ : e.segments).map((t, r) => ({
772
+ label: t.label,
773
+ color: zt(r, n.value, t.fillColor, e.loading)
774
+ }))), c = D(() => e.showLegend && s.value.length > 0);
775
+ return ot({
776
+ canvasRef: r,
777
+ config: o,
778
+ enabled: D(() => e.loading || i.value.length > 0)
779
+ }), (i, a) => (R(), A("div", {
780
+ ref_key: "chartRootRef",
781
+ ref: n,
782
+ class: I(["s-ui-chart-segmented-bar", { "s-ui-chart-segmented-bar--skeleton": e.loading }]),
783
+ "data-qa": "ui:chart-segmented-bar"
784
+ }, [j("div", Pn, [P(H(st), {
785
+ loading: e.loading,
786
+ type: H(t).CARTESIAN
787
+ }, {
788
+ default: W(() => [j("canvas", {
789
+ ref_key: "chartCanvasRef",
790
+ ref: r,
791
+ class: "s-ui-chart-segmented-bar__canvas"
792
+ }, null, 512)]),
793
+ _: 1
794
+ }, 8, ["loading", "type"])]), c.value ? (R(), O(H(_t), {
795
+ key: 0,
796
+ items: s.value,
797
+ disabled: e.loading
798
+ }, null, 8, ["items", "disabled"])) : k("", !0)], 2));
799
+ }
800
+ }), In = {
801
+ key: 0,
802
+ class: "s-ui-chart-widget__header"
803
+ }, Ln = {
804
+ key: 0,
805
+ class: "s-ui-chart-widget__title-skeleton",
806
+ "aria-hidden": "true"
807
+ }, Rn = {
808
+ key: 1,
809
+ class: "s-ui-chart-widget__title s-ui-typography-label-16-medium"
810
+ }, zn = { class: "s-ui-chart-widget__controls" }, Bn = {
811
+ key: 1,
812
+ class: "s-ui-chart-widget__content"
813
+ }, Vn = /* @__PURE__ */ F({
814
+ __name: "SChartWidget",
815
+ props: /*@__PURE__*/ bt({
816
+ title: { default: "" },
817
+ collapsible: {
818
+ type: Boolean,
819
+ default: !1
820
+ },
821
+ hideContentWhenCollapsed: {
822
+ type: Boolean,
823
+ default: !0
824
+ },
825
+ loading: {
826
+ type: Boolean,
827
+ default: !1
828
+ }
829
+ }, {
830
+ collapsed: {
831
+ type: Boolean,
832
+ default: !1
833
+ },
834
+ collapsedModifiers: {}
835
+ }),
836
+ emits: ["update:collapsed"],
837
+ setup(e) {
838
+ let t = Et(e, "collapsed"), n = U(), { t: r } = Ft(), 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"));
839
+ return (n, r) => (R(), A("div", {
840
+ class: I(["s-ui-chart-widget", { "s-ui-chart-widget--skeleton": e.loading }]),
841
+ "data-qa": "ui:chart-widget"
842
+ }, [i.value ? (R(), A("div", In, [e.loading ? (R(), A("span", Ln)) : (R(), A("span", Rn, [B(n.$slots, "title", {}, () => [N(V(e.title), 1)])])), j("div", zn, [B(n.$slots, "actions"), e.collapsible ? (R(), O(H(w), {
843
+ key: 0,
844
+ appearance: H(C).OUTLINED,
845
+ variant: H(S).NEUTRAL,
846
+ size: H(x).SMALL,
847
+ icon: t.value ? H(G).chevronDown : H(G).chevronUp,
848
+ "aria-label": o.value,
849
+ "aria-expanded": !t.value,
850
+ onClick: r[0] ||= (e) => t.value = !t.value
851
+ }, null, 8, [
852
+ "appearance",
853
+ "variant",
854
+ "size",
855
+ "icon",
856
+ "aria-label",
857
+ "aria-expanded"
858
+ ])) : k("", !0)])])) : k("", !0), a.value ? (R(), A("div", Bn, [B(n.$slots, "default")])) : k("", !0)], 2));
629
859
  }
630
860
  });
631
861
  //#endregion
632
- export { 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, Ce as EConnectedPositionStrategy, W as ENotificationLayout, G as ENotificationLeftside, U 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, me as ESCardLayout, de as ESCheckboxColor, fe as ESCheckboxSize, ke as ESChipColor, Ae as ESChipSize, h as ESColorPaletteLayout, xe as ESDropdownPlacement, $e as ESInlineInputAppearance, Re as ESInlineMessageValidationStatus, Ie as ESInputCustomize, Be as ESLabelSize, Ve as ESLabelVariant, Ue as ESListGap, qe as ESListItemVariant, nt as ESPhotoEditShape, rt as ESPhotoEditSize, Ye as ESRadioLabelPlacement, Ne as ESSelectSearchable, _e as ESTabAppearance, ve as ESTabSize, Te as ESTagColor, Ee as ESTagSize, Ze as ESToggleSize, se as ESelectionFocusMode, ie as ESelectionMode, oe as ESelectionOrientation, l as MAX_RECENT_COLORS, _ as RECOMMENDED_COLOR_PALETTE, c as SAvatar, ne as SAvatarGroup, n as SBadge, Bt as SBanner, w as SButton, ue as SButtonGroup, he as SCard, ct as SChartHorizontalBar, at as SChartLine, lt as SChartPie, ut as SChartProgress, ot as SChartStackedArea, st as SChartStackedBar, pe as SCheckbox, je as SChip, d as SColorArea, v as SColorPalette, f as SColorPicker, u as SColorValues, Me as SDropdown, Pe as SDropdownMenu, et as SInlineInput, ze as SInlineMessage, Le as SInput, He as SLabel, Ke as SList, Je as SListItem, it as SPhotoEdit, Xe as SRadio, ge as SSegmentControl, Fe as SSelect, ye as STab, be as STabs, De as STag, Oe as STagGroup, tt as STextarea, J as SToast, nn as SToastProvider, Qe as SToggle, X as TOAST_AUTO_DURATION_MAX_MS, Y as TOAST_AUTO_DURATION_MIN_MS, Wt as TOAST_AUTO_DURATION_MS_PER_CHAR, Gt as computeAutoDuration, Se as computeConnectedPosition, xt as createUiKit, ee as isSameColor, b as normalizeColorValue, y as resolveColorPreview, re as resolveOwnPropOrGroupedOrFallback, St as setUiKitLocale, Ct as uiKitLocaleEn, wt as uiKitLocaleRu, Ge as useFlatTreeList, we as useFloatingOverlay, We as useSListEndReached, ae as useSelectionGroup, ce as useSelectionGroupItem, tn as useToast, Tt as useUiKitI18n };
862
+ export { 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, Ce as EConnectedPositionStrategy, q as ENotificationLayout, J as ENotificationLeftside, K 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, me as ESCardLayout, de as ESCheckboxColor, fe as ESCheckboxSize, ke as ESChipColor, Ae as ESChipSize, h as ESColorPaletteLayout, xe as ESDropdownPlacement, $e as ESInlineInputAppearance, Re as ESInlineMessageValidationStatus, Ie as ESInputCustomize, Be as ESLabelSize, Ve as ESLabelVariant, Ue as ESListGap, qe as ESListItemVariant, nt as ESPhotoEditShape, rt as ESPhotoEditSize, Ye as ESRadioLabelPlacement, Ne as ESSelectSearchable, _e as ESTabAppearance, ve as ESTabSize, Te as ESTagColor, Ee as ESTagSize, Ze as ESToggleSize, se as ESelectionFocusMode, ie as ESelectionMode, oe as ESelectionOrientation, l as MAX_RECENT_COLORS, _ as RECOMMENDED_COLOR_PALETTE, c as SAvatar, ne as SAvatarGroup, n as SBadge, en as SBanner, w as SButton, ue as SButtonGroup, he as SCard, ht as SChartBurnup, ft as SChartHorizontalBar, ct as SChartLine, mt as SChartMultiLine, pt as SChartPie, gt as SChartProgress, Fn as SChartSegmentedBar, ut as SChartStackedArea, dt as SChartStackedBar, Vn as SChartWidget, pe as SCheckbox, je as SChip, d as SColorArea, v as SColorPalette, f as SColorPicker, u as SColorValues, Me as SDropdown, Pe as SDropdownMenu, et as SInlineInput, ze as SInlineMessage, Le as SInput, He as SLabel, Ke as SList, Je as SListItem, it as SPhotoEdit, Xe as SRadio, ge as SSegmentControl, Fe as SSelect, ye as STab, be as STabs, De as STag, Oe as STagGroup, tt as STextarea, tn as SToast, bn as SToastProvider, Qe as SToggle, sn as TOAST_AUTO_DURATION_MAX_MS, on as TOAST_AUTO_DURATION_MIN_MS, cn as TOAST_AUTO_DURATION_MS_PER_CHAR, ln as computeAutoDuration, Se as computeConnectedPosition, At as createUiKit, ee as isSameColor, b as normalizeColorValue, y as resolveColorPreview, re as resolveOwnPropOrGroupedOrFallback, jt as setUiKitLocale, Mt as uiKitLocaleEn, Nt as uiKitLocaleRu, Ge as useFlatTreeList, we as useFloatingOverlay, We as useSListEndReached, ae as useSelectionGroup, ce as useSelectionGroupItem, yn as useToast, Pt as useUiKitI18n };