enefit-design-system 0.6.2-alpha.1 → 0.7.2

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 (64) hide show
  1. package/README.md +7 -1
  2. package/dist/Accordion/Accordion.js +3 -3
  3. package/dist/Autocomplete/Autocomplete.js +3 -3
  4. package/dist/Badge/Badge.js +3 -3
  5. package/dist/Calendar/CalendarHeader.js +3 -3
  6. package/dist/Calendar/Day/CalendarCell.js +3 -3
  7. package/dist/Calendar/Day/CalendarGrid.js +3 -3
  8. package/dist/Calendar/Month/MonthCell.js +3 -3
  9. package/dist/Calendar/Year/YearCell.js +3 -3
  10. package/dist/Chart/Chart.js +150 -126
  11. package/dist/Chart/ChartArea.js +17 -15
  12. package/dist/Chart/ChartAxes.js +74 -0
  13. package/dist/Chart/ChartBar.js +42 -42
  14. package/dist/Chart/ChartLine.js +33 -32
  15. package/dist/Chart/ChartTooltip.js +61 -47
  16. package/dist/Chart/axes.js +66 -0
  17. package/dist/Chart/curve.js +37 -30
  18. package/dist/Chart/utils.js +53 -46
  19. package/dist/Checkbox/Checkbox.js +3 -3
  20. package/dist/CheckboxGroup/CheckboxGroup.js +3 -3
  21. package/dist/Choice/Choice.js +3 -3
  22. package/dist/ChoiceCard/ChoiceCard.js +3 -3
  23. package/dist/DatePicker/DatePicker.js +3 -3
  24. package/dist/DatePicker/DatePickerSegment.js +3 -3
  25. package/dist/InfoHint/InfoHint.js +3 -3
  26. package/dist/Modal/ModalDialog.js +3 -3
  27. package/dist/Notification/Notification.js +3 -3
  28. package/dist/Notification/NotificationDescription.js +3 -3
  29. package/dist/Notification/NotificationTitle.js +3 -3
  30. package/dist/Phone/Phone.js +3 -3
  31. package/dist/Phone/PhoneSelect.js +3 -3
  32. package/dist/Phone/PhoneTrigger.js +3 -3
  33. package/dist/Radio/Radio.js +3 -3
  34. package/dist/RadioGroup/RadioGroup.js +3 -3
  35. package/dist/Searchfield/Searchfield.js +3 -3
  36. package/dist/Select/Select.js +3 -3
  37. package/dist/Select/SelectListOption.js +3 -3
  38. package/dist/Slider/Slider.js +3 -3
  39. package/dist/Slider/SliderThumb.js +3 -3
  40. package/dist/Switch/Switch.js +3 -3
  41. package/dist/SwitchGroup/SwitchGroup.js +3 -3
  42. package/dist/Tab/Tab.js +3 -3
  43. package/dist/Table/TableCell.js +3 -3
  44. package/dist/Table/TableFooterCell.js +3 -3
  45. package/dist/Table/TableHeaderCell.js +3 -3
  46. package/dist/Textarea/Textarea.js +3 -3
  47. package/dist/Textfield/Textfield.js +3 -3
  48. package/dist/Toast/Toast.js +3 -3
  49. package/dist/_virtual/index3.js +2 -2
  50. package/dist/_virtual/index4.js +2 -2
  51. package/dist/external/prop-types/index.js +1 -1
  52. package/dist/external/recharts/es6/context/chartLayoutContext.js +3 -3
  53. package/dist/external/use-sync-external-store/shim/index.js +1 -1
  54. package/dist/index.d.ts +13 -11
  55. package/dist/index.js +1717 -1713
  56. package/dist/llms.txt +2143 -294
  57. package/dist/output/icons/IconCompareSm.js +15 -0
  58. package/dist/output/icons/IconRefreshXs.js +15 -0
  59. package/dist/styles.css +1 -1
  60. package/package.json +1 -2
  61. package/dist/Chart/ChartAxis.js +0 -66
  62. package/dist/Chart/ticks.js +0 -74
  63. /package/dist/{breakpoints2.css → breakpoints.css} +0 -0
  64. /package/dist/output/{variables2/tailwind2.json.js → variables/tailwind.json.js} +0 -0
package/README.md CHANGED
@@ -2,4 +2,10 @@
2
2
 
3
3
  See the documentation at https://enefit-design-system.pages.dev
4
4
 
5
- .
5
+ ## How to release new library version
6
+
7
+ 1. Make changes in the library source code
8
+ 2. Set new `<VERSION>` (e.g. `0.6.1`) in `version` in `package.json` and `package-lock.json` files according to the Semantic versioning.
9
+ 3. Prepare the changes as part of PR.
10
+ 4. **Merge and squash** the changes with commit like `RELEASE <VERSION>` e.g. `RELEASE 0.6.1` into the `main` branch
11
+ 5. Make sure [`the proper workflow`](https://github.com/Enefit-Web/enefit-design-system/actions/workflows/release.yml) has succeeded
@@ -2,12 +2,12 @@
2
2
  import { j as e } from "../external/react/jsx-runtime.js";
3
3
  import { useContext as y, useRef as _, useState as g, useEffect as d } from "react";
4
4
  import p from "../external/classnames/index.js";
5
- /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ /* empty css */
6
8
  /* empty css */
7
9
  /* empty css */
8
- /* empty css */
9
10
  /* empty css */
10
- /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
13
  import z from "../output/icons/IconChevronDownAltSm.js";
@@ -2,12 +2,12 @@
2
2
  import { j as e } from "../external/react/jsx-runtime.js";
3
3
  import { useRef as s, useEffect as Q } from "react";
4
4
  import r from "../external/classnames/index.js";
5
- /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ /* empty css */
6
8
  /* empty css */
7
9
  /* empty css */
8
- /* empty css */
9
10
  /* empty css */
10
- /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
13
  import U from "../output/icons/IconCrossSm.js";
@@ -2,12 +2,12 @@
2
2
  import { j as r } from "../external/react/jsx-runtime.js";
3
3
  import m from "../external/classnames/index.js";
4
4
  /* empty css */
5
- /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ /* empty css */
6
8
  /* empty css */
7
9
  /* empty css */
8
- /* empty css */
9
10
  /* empty css */
10
- /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
13
  import p from "../output/icons/IconAlertTriangleXs.js";
@@ -1,10 +1,10 @@
1
1
  import { j as r } from "../external/react/jsx-runtime.js";
2
- /* empty css */
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
3
5
  /* empty css */
4
6
  /* empty css */
5
- /* empty css */
6
7
  /* empty css */
7
- /* empty css */
8
8
  /* empty css */
9
9
  /* empty css */
10
10
  import p from "../output/icons/IconChevronLeftAltSm.js";
@@ -2,12 +2,12 @@
2
2
  import { j as r } from "../../external/react/jsx-runtime.js";
3
3
  import { useRef as $ } from "react";
4
4
  import b from "../../external/classnames/index.js";
5
- /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ /* empty css */
6
8
  /* empty css */
7
9
  /* empty css */
8
- /* empty css */
9
10
  /* empty css */
10
- /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { j as r } from "../../external/react/jsx-runtime.js";
3
3
  import { getWeeksInMonth as f } from "../../external/@internationalized/date/dist/queries.js";
4
- /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ /* empty css */
5
7
  /* empty css */
6
8
  /* empty css */
7
- /* empty css */
8
9
  /* empty css */
9
- /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
@@ -3,12 +3,12 @@ import { useRef as y } from "react";
3
3
  import { CalendarDate as g } from "../../external/@internationalized/date/dist/CalendarDate.js";
4
4
  import { today as j, getLocalTimeZone as F } from "../../external/@internationalized/date/dist/queries.js";
5
5
  import A from "../../external/classnames/index.js";
6
- /* empty css */
6
+ /* empty css */
7
+ /* empty css */
8
+ /* empty css */
7
9
  /* empty css */
8
10
  /* empty css */
9
- /* empty css */
10
11
  /* empty css */
11
- /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  /* empty css */
@@ -2,12 +2,12 @@
2
2
  import { j as c } from "../../external/react/jsx-runtime.js";
3
3
  import { useRef as V } from "react";
4
4
  import L from "../../external/classnames/index.js";
5
- /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ /* empty css */
6
8
  /* empty css */
7
9
  /* empty css */
8
- /* empty css */
9
10
  /* empty css */
10
- /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
@@ -1,202 +1,226 @@
1
1
  "use client";
2
2
  import { j as i } from "../external/react/jsx-runtime.js";
3
- import { forwardRef as $, useState as N } from "react";
4
- import O from "./ChartAxis.js";
5
- import w from "./ChartTooltip.js";
6
- import M from "./ChartOutline.js";
7
- import v from "./ChartBar.js";
8
- import d from "./ChartLine.js";
9
- import c from "./ChartArea.js";
10
- import { prepareData as L, getYAxisOrientations as j, isStackWithNegatives as T } from "./utils.js";
11
- import { getTicks as R } from "./ticks.js";
12
- import { curveSloped as h } from "./curve.js";
3
+ import { forwardRef as w, useState as L, useRef as O } from "react";
4
+ import R from "./ChartAxes.js";
5
+ import T from "./ChartTooltip.js";
6
+ import S from "./ChartOutline.js";
7
+ import b from "./ChartBar.js";
8
+ import s from "./ChartLine.js";
9
+ import d from "./ChartArea.js";
10
+ import { prepareData as D, getYAxisOrientations as y, isStackWithNegatives as E } from "./utils.js";
11
+ import { curveSloped as x } from "./curve.js";
13
12
  /* empty css */
14
- import S from "../external/classnames/index.js";
15
- import { useId as D } from "../external/@react-aria/utils/dist/useId.js";
16
- import { ResponsiveContainer as G } from "../external/recharts/es6/component/ResponsiveContainer.js";
17
- import { ComposedChart as I } from "../external/recharts/es6/chart/ComposedChart.js";
18
- const B = $(
19
- ({ datasets: t, data: n, settings: a, className: C, children: b }, y) => {
20
- const [p, m] = N(null);
21
- function s(r) {
22
- var e;
23
- r.isTooltipActive === !0 ? m({
24
- x: (e = r.activeCoordinate) == null ? void 0 : e.x,
25
- label: r.activeLabel
26
- }) : m(null);
13
+ import G from "../external/classnames/index.js";
14
+ import { useId as B } from "../external/@react-aria/utils/dist/useId.js";
15
+ import { ResponsiveContainer as W } from "../external/recharts/es6/component/ResponsiveContainer.js";
16
+ import { ComposedChart as X } from "../external/recharts/es6/chart/ComposedChart.js";
17
+ const Y = w(
18
+ ({ datasets: c, data: h, settings: e, className: _, children: k, onActive: l, ...I }, $) => {
19
+ const [o, m] = L(null), f = O(null);
20
+ function u(r) {
21
+ var a;
22
+ if (r.activeIndex === null)
23
+ m(null), l == null || l(null);
24
+ else {
25
+ const n = parseInt(String(r.activeIndex));
26
+ if (n !== f.current) {
27
+ f.current = n;
28
+ const C = {
29
+ x: (a = r.activeCoordinate) == null ? void 0 : a.x,
30
+ index: n,
31
+ label: r.activeLabel
32
+ };
33
+ m(C), l == null || l(C);
34
+ }
35
+ }
27
36
  }
28
- const k = a.variant === "card" ? 0 : 24, x = -10;
29
- t.length > 1 && !t[1].yAxisOrientation && (t[1].yAxisOrientation = "right");
30
- const l = D(), o = L(t, n), u = 6, _ = R(t, o, u), A = {
31
- bar: ({ dataset: r, index: e }) => /* @__PURE__ */ i.jsx(
32
- v,
37
+ function v() {
38
+ m(null), l == null || l(null);
39
+ }
40
+ const M = e.variant === "card" ? 0 : 24, j = -10;
41
+ c.length > 1 && !c[1].yAxisOrientation && (c[1].yAxisOrientation = "right");
42
+ const p = B(), t = D(c, h), N = {
43
+ bar: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
44
+ b,
33
45
  {
34
46
  dataset: r,
35
- index: e,
36
- settings: a,
37
- data: n,
38
- active: !!p
47
+ index: a,
48
+ settings: e,
49
+ data: h,
50
+ active: !!o
39
51
  }
40
52
  ),
41
- bar_stack: ({ dataset: r, index: e }) => /* @__PURE__ */ i.jsx(
42
- v,
53
+ bar_stack: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
54
+ b,
43
55
  {
44
56
  dataset: r,
45
- index: e,
46
- settings: a,
47
- data: n,
48
- active: !!p
57
+ index: a,
58
+ settings: e,
59
+ data: h,
60
+ active: !!o,
61
+ stack: !0
49
62
  }
50
63
  ),
51
- line: ({ dataset: r, index: e }) => /* @__PURE__ */ i.jsx(
52
- d,
64
+ line: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
65
+ s,
53
66
  {
54
67
  dataset: r,
55
- index: e,
56
- settings: a,
57
- data: o,
58
- curve: "linear"
68
+ index: a,
69
+ settings: e,
70
+ data: t,
71
+ curve: "linear",
72
+ active: !!o
59
73
  }
60
74
  ),
61
- line_step: ({ dataset: r, index: e }) => /* @__PURE__ */ i.jsx(
62
- d,
75
+ line_step: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
76
+ s,
63
77
  {
64
78
  dataset: r,
65
- index: e,
66
- settings: a,
67
- data: o,
68
- curve: "step"
79
+ index: a,
80
+ settings: e,
81
+ data: t,
82
+ curve: "step",
83
+ active: !!o
69
84
  }
70
85
  ),
71
- line_slope: ({ dataset: r, index: e }) => /* @__PURE__ */ i.jsx(
72
- d,
86
+ line_slope: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
87
+ s,
73
88
  {
74
89
  dataset: r,
75
- index: e,
76
- settings: a,
77
- data: o,
78
- curve: h()
90
+ index: a,
91
+ settings: e,
92
+ data: t,
93
+ curve: x(),
94
+ active: !!o
79
95
  }
80
96
  ),
81
- area: ({ dataset: r, index: e }) => /* @__PURE__ */ i.jsx(
82
- c,
97
+ area: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
98
+ d,
83
99
  {
84
100
  dataset: r,
85
- index: e,
101
+ index: a,
86
102
  curve: "linear",
87
- settings: a,
88
- data: o
103
+ settings: e,
104
+ data: t,
105
+ active: !!o
89
106
  }
90
107
  ),
91
- area_step: ({ dataset: r, index: e }) => /* @__PURE__ */ i.jsx(
92
- c,
108
+ area_step: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
109
+ d,
93
110
  {
94
111
  dataset: r,
95
- index: e,
112
+ index: a,
96
113
  curve: "step",
97
- settings: a,
98
- data: o
114
+ settings: e,
115
+ data: t,
116
+ active: !!o
99
117
  }
100
118
  ),
101
- area_slope: ({ dataset: r, index: e }) => /* @__PURE__ */ i.jsx(
102
- c,
119
+ area_slope: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
120
+ d,
103
121
  {
104
122
  dataset: r,
105
- index: e,
106
- curve: h(),
107
- settings: a,
108
- data: o
123
+ index: a,
124
+ curve: x(),
125
+ settings: e,
126
+ data: t,
127
+ active: !!o
109
128
  }
110
129
  ),
111
- area_stack: ({ dataset: r, index: e }) => /* @__PURE__ */ i.jsx(
112
- c,
130
+ area_stack: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
131
+ d,
113
132
  {
114
133
  dataset: r,
115
- index: e,
134
+ index: a,
116
135
  curve: "linear",
117
- settings: a,
118
- data: o
136
+ settings: e,
137
+ data: t,
138
+ active: !!o
119
139
  }
120
140
  ),
121
- area_stack_slope: ({ dataset: r, index: e }) => /* @__PURE__ */ i.jsx(
122
- c,
141
+ area_stack_slope: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
142
+ d,
123
143
  {
124
144
  dataset: r,
125
- index: e,
126
- curve: h(),
127
- settings: a,
128
- data: o
145
+ index: a,
146
+ curve: x(),
147
+ settings: e,
148
+ data: t,
149
+ active: !!o
129
150
  }
130
151
  )
131
152
  };
132
153
  return /* @__PURE__ */ i.jsxs(
133
154
  "div",
134
155
  {
135
- ref: y,
136
- className: S("eds-chart", C),
156
+ ref: $,
157
+ className: G("eds-chart", _),
137
158
  style: {
138
- width: a.width || "100%",
139
- height: a.height
159
+ width: e.width || "100%",
160
+ height: e.height
140
161
  },
141
162
  role: "region",
142
- "aria-roledescription": "interactive chart",
143
- "aria-labelledby": `chart-title-${l}`,
144
- "aria-describedby": `chart-description-${l}`,
163
+ "aria-roledescription": "chart",
164
+ "aria-labelledby": e.title ? `chart-title-${p}` : void 0,
165
+ "aria-describedby": e.description ? `chart-description-${p}` : void 0,
166
+ ...I,
145
167
  children: [
146
- a.title && /* @__PURE__ */ i.jsx("div", { id: `chart-title-${l}`, className: "eds-sr-only", children: a.title }),
147
- a.description && /* @__PURE__ */ i.jsx(
168
+ e.title && /* @__PURE__ */ i.jsx("div", { id: `chart-title-${p}`, className: "eds-sr-only", children: e.title }),
169
+ e.description && /* @__PURE__ */ i.jsx(
148
170
  "div",
149
171
  {
150
- id: `chart-description-${l}`,
172
+ id: `chart-description-${p}`,
151
173
  className: "eds-sr-only",
152
- children: a.description
174
+ children: e.description
153
175
  }
154
176
  ),
155
- /* @__PURE__ */ i.jsx(G, { children: /* @__PURE__ */ i.jsxs(
156
- I,
177
+ /* @__PURE__ */ i.jsx(W, { children: /* @__PURE__ */ i.jsxs(
178
+ X,
157
179
  {
158
- width: a.width,
159
- height: a.height,
160
- data: o,
161
- onMouseMove: s,
162
- onClick: s,
163
- onMouseLeave: () => m(void 0),
180
+ width: e.width,
181
+ height: e.height,
182
+ data: t,
183
+ onClick: u,
184
+ onTouchMove: u,
185
+ onMouseMove: u,
186
+ onMouseLeave: v,
187
+ onTouchEnd: v,
164
188
  margin: {
165
- top: k,
166
- left: j(t).includes(
189
+ top: M,
190
+ left: y(c).includes(
167
191
  "left"
168
- ) && x,
169
- right: j(t).includes(
192
+ ) && j,
193
+ right: y(c).includes(
170
194
  "right"
171
- ) && x
195
+ ) && j
172
196
  },
173
- accessibilityLayer: !0,
174
- stackOffset: T(t, o) ? "sign" : "none",
197
+ accessibilityLayer: !1,
198
+ stackOffset: E(c, t) ? "sign" : "none",
175
199
  barGap: 1,
176
- barCategoryGap: "15%",
200
+ barCategoryGap: "12%",
177
201
  children: [
178
- /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx(M, { id: "outline" }) }),
202
+ /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx(S, { id: "outline" }) }),
179
203
  /* @__PURE__ */ i.jsx(
180
- w,
204
+ T,
181
205
  {
182
- settings: a,
183
- datasets: t,
184
- active: p
206
+ settings: e,
207
+ datasets: c,
208
+ active: o
185
209
  }
186
210
  ),
187
- t.map((r, e) => {
188
- const f = A[r.type];
189
- return f ? /* @__PURE__ */ i.jsx(f, { dataset: r, index: e }, e) : null;
211
+ c.map((r, a) => {
212
+ const n = N[r.type];
213
+ return n ? /* @__PURE__ */ i.jsx(n, { dataset: r, index: a }, a) : null;
190
214
  }),
191
- a.variant !== "card" && /* @__PURE__ */ i.jsx(
192
- O,
215
+ e.variant !== "card" && /* @__PURE__ */ i.jsx(
216
+ R,
193
217
  {
194
- settings: a,
195
- ticks: _,
196
- tickCount: u
218
+ settings: e,
219
+ datasets: c,
220
+ data: t
197
221
  }
198
222
  ),
199
- b
223
+ k
200
224
  ]
201
225
  }
202
226
  ) })
@@ -205,7 +229,7 @@ const B = $(
205
229
  );
206
230
  }
207
231
  );
208
- B.displayName = "Chart";
232
+ Y.displayName = "Chart";
209
233
  export {
210
- B as default
234
+ Y as default
211
235
  };
@@ -1,49 +1,51 @@
1
1
  import { j as o } from "../external/react/jsx-runtime.js";
2
- import { getName as l, getChartHide as p, getColor as e, getYDataKey as y } from "./utils.js";
3
- import c from "./ChartAnnotation.js";
2
+ import { getName as p, getChartHide as c, getColor as e, getYAxisId as y } from "./utils.js";
3
+ import A from "./ChartAnnotation.js";
4
4
  import { Area as u } from "../external/recharts/es6/cartesian/Area.js";
5
- function x({
5
+ function k({
6
6
  dataset: r,
7
- data: a,
7
+ data: n,
8
8
  index: t,
9
- curve: n = "linear",
10
- settings: m
9
+ curve: a = "linear",
10
+ settings: m,
11
+ active: s
11
12
  }) {
12
- const s = Array.isArray(r.yDataKey) ? r.yDataKey : [r.yDataKey];
13
+ const f = Array.isArray(r.yDataKey) ? r.yDataKey : [r.yDataKey];
13
14
  return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
14
- s.map((f, i) => /* @__PURE__ */ o.jsx(
15
+ f.map((l, i) => /* @__PURE__ */ o.jsx(
15
16
  u,
16
17
  {
17
18
  id: `${t}-${i}`,
18
- dataKey: f,
19
+ dataKey: l,
19
20
  yAxisId: y(r),
20
21
  stroke: e(r, i).areaStroke,
21
22
  strokeWidth: 1,
22
23
  fill: e(r, i).areaBg,
23
24
  fillOpacity: 1,
24
25
  dot: !1,
26
+ activeDot: s,
25
27
  isAnimationActive: !1,
26
- type: n,
27
- hide: p(r),
28
+ type: a,
29
+ hide: c(r),
28
30
  strokeLinejoin: "round",
29
31
  strokeLinecap: "round",
30
- name: l(r, i),
32
+ name: p(r, i),
31
33
  unit: r.unit,
32
34
  stackId: "stack"
33
35
  },
34
36
  `${t}-${i}`
35
37
  )),
36
38
  /* @__PURE__ */ o.jsx(
37
- c,
39
+ A,
38
40
  {
39
41
  settings: m,
40
42
  dataset: r,
41
- data: a,
43
+ data: n,
42
44
  index: t
43
45
  }
44
46
  )
45
47
  ] });
46
48
  }
47
49
  export {
48
- x as default
50
+ k as default
49
51
  };
@@ -0,0 +1,74 @@
1
+ import { j as o } from "../external/react/jsx-runtime.js";
2
+ import { getYAxisId as n, getYAxisOrientation as c, defaultYAxisFormatter as f } from "./utils.js";
3
+ import { getAxes as x } from "./axes.js";
4
+ import u from "./ChartUnit.js";
5
+ import { CartesianGrid as y } from "../external/recharts/es6/cartesian/CartesianGrid.js";
6
+ import { XAxis as d } from "../external/recharts/es6/cartesian/XAxis.js";
7
+ import { YAxis as p } from "../external/recharts/es6/cartesian/YAxis.js";
8
+ function A(s, i) {
9
+ const l = i.yDataKeyFlipped ? Math.abs(s) : s;
10
+ return i.yAxisFormatter ? i.yAxisFormatter(l) : f(l);
11
+ }
12
+ function S({
13
+ settings: s,
14
+ datasets: i,
15
+ data: l
16
+ }) {
17
+ const m = x(i, l, 5);
18
+ return /* @__PURE__ */ o.jsxs("g", { style: { mixBlendMode: "multiply" }, children: [
19
+ /* @__PURE__ */ o.jsx(
20
+ y,
21
+ {
22
+ yAxisId: n(i[0]),
23
+ vertical: !1,
24
+ style: {
25
+ stroke: "var(--eds-color-static-stroke-chart-grid)",
26
+ strokeWidth: "var(--eds-stroke-chart-grid)"
27
+ }
28
+ }
29
+ ),
30
+ /* @__PURE__ */ o.jsx(
31
+ d,
32
+ {
33
+ dataKey: s.xDataKey,
34
+ tickLine: !1,
35
+ axisLine: !1,
36
+ style: {
37
+ fill: "var(--eds-color-static-text-chart-tick)",
38
+ fontSize: "var(--eds-label-tiny-600-font-size-mobile)",
39
+ fontFeatureSettings: "tnum",
40
+ userSelect: "none"
41
+ }
42
+ }
43
+ ),
44
+ i.filter((t, a, e) => e.findIndex(
45
+ (r) => n(r) === n(t)
46
+ ) === a).map((t, a) => {
47
+ const e = m.find((r) => r.id === n(t));
48
+ return /* @__PURE__ */ o.jsx(
49
+ p,
50
+ {
51
+ yAxisId: n(t),
52
+ domain: e == null ? void 0 : e.domain,
53
+ ticks: e == null ? void 0 : e.ticks,
54
+ orientation: c(t, a),
55
+ tickLine: !1,
56
+ axisLine: !1,
57
+ label: (r) => t.unit && /* @__PURE__ */ o.jsx(u, { dataset: t, ...r }),
58
+ mirror: t.yAxisOrientation === "none",
59
+ style: {
60
+ fill: t.yAxisOrientation === "none" ? "none" : "var(--eds-color-static-text-chart-tick)",
61
+ fontSize: "var(--eds-label-tiny-600-font-size-mobile)",
62
+ fontFeatureSettings: "tnum",
63
+ userSelect: "none"
64
+ },
65
+ tickFormatter: (r) => A(r, t)
66
+ },
67
+ a
68
+ );
69
+ })
70
+ ] });
71
+ }
72
+ export {
73
+ S as default
74
+ };