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.
- package/README.md +7 -1
- package/dist/Accordion/Accordion.js +3 -3
- package/dist/Autocomplete/Autocomplete.js +3 -3
- package/dist/Badge/Badge.js +3 -3
- package/dist/Calendar/CalendarHeader.js +3 -3
- package/dist/Calendar/Day/CalendarCell.js +3 -3
- package/dist/Calendar/Day/CalendarGrid.js +3 -3
- package/dist/Calendar/Month/MonthCell.js +3 -3
- package/dist/Calendar/Year/YearCell.js +3 -3
- package/dist/Chart/Chart.js +150 -126
- package/dist/Chart/ChartArea.js +17 -15
- package/dist/Chart/ChartAxes.js +74 -0
- package/dist/Chart/ChartBar.js +42 -42
- package/dist/Chart/ChartLine.js +33 -32
- package/dist/Chart/ChartTooltip.js +61 -47
- package/dist/Chart/axes.js +66 -0
- package/dist/Chart/curve.js +37 -30
- package/dist/Chart/utils.js +53 -46
- package/dist/Checkbox/Checkbox.js +3 -3
- package/dist/CheckboxGroup/CheckboxGroup.js +3 -3
- package/dist/Choice/Choice.js +3 -3
- package/dist/ChoiceCard/ChoiceCard.js +3 -3
- package/dist/DatePicker/DatePicker.js +3 -3
- package/dist/DatePicker/DatePickerSegment.js +3 -3
- package/dist/InfoHint/InfoHint.js +3 -3
- package/dist/Modal/ModalDialog.js +3 -3
- package/dist/Notification/Notification.js +3 -3
- package/dist/Notification/NotificationDescription.js +3 -3
- package/dist/Notification/NotificationTitle.js +3 -3
- package/dist/Phone/Phone.js +3 -3
- package/dist/Phone/PhoneSelect.js +3 -3
- package/dist/Phone/PhoneTrigger.js +3 -3
- package/dist/Radio/Radio.js +3 -3
- package/dist/RadioGroup/RadioGroup.js +3 -3
- package/dist/Searchfield/Searchfield.js +3 -3
- package/dist/Select/Select.js +3 -3
- package/dist/Select/SelectListOption.js +3 -3
- package/dist/Slider/Slider.js +3 -3
- package/dist/Slider/SliderThumb.js +3 -3
- package/dist/Switch/Switch.js +3 -3
- package/dist/SwitchGroup/SwitchGroup.js +3 -3
- package/dist/Tab/Tab.js +3 -3
- package/dist/Table/TableCell.js +3 -3
- package/dist/Table/TableFooterCell.js +3 -3
- package/dist/Table/TableHeaderCell.js +3 -3
- package/dist/Textarea/Textarea.js +3 -3
- package/dist/Textfield/Textfield.js +3 -3
- package/dist/Toast/Toast.js +3 -3
- package/dist/_virtual/index3.js +2 -2
- package/dist/_virtual/index4.js +2 -2
- package/dist/external/prop-types/index.js +1 -1
- package/dist/external/recharts/es6/context/chartLayoutContext.js +3 -3
- package/dist/external/use-sync-external-store/shim/index.js +1 -1
- package/dist/index.d.ts +13 -11
- package/dist/index.js +1717 -1713
- package/dist/llms.txt +2143 -294
- package/dist/output/icons/IconCompareSm.js +15 -0
- package/dist/output/icons/IconRefreshXs.js +15 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -2
- package/dist/Chart/ChartAxis.js +0 -66
- package/dist/Chart/ticks.js +0 -74
- /package/dist/{breakpoints2.css → breakpoints.css} +0 -0
- /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";
|
package/dist/Badge/Badge.js
CHANGED
|
@@ -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 */
|
package/dist/Chart/Chart.js
CHANGED
|
@@ -1,202 +1,226 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as i } from "../external/react/jsx-runtime.js";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { prepareData as
|
|
11
|
-
import {
|
|
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
|
|
15
|
-
import { useId as
|
|
16
|
-
import { ResponsiveContainer as
|
|
17
|
-
import { ComposedChart as
|
|
18
|
-
const
|
|
19
|
-
({ datasets:
|
|
20
|
-
const [
|
|
21
|
-
function
|
|
22
|
-
var
|
|
23
|
-
r.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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:
|
|
36
|
-
settings:
|
|
37
|
-
data:
|
|
38
|
-
active: !!
|
|
47
|
+
index: a,
|
|
48
|
+
settings: e,
|
|
49
|
+
data: h,
|
|
50
|
+
active: !!o
|
|
39
51
|
}
|
|
40
52
|
),
|
|
41
|
-
bar_stack: ({ dataset: r, index:
|
|
42
|
-
|
|
53
|
+
bar_stack: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
|
|
54
|
+
b,
|
|
43
55
|
{
|
|
44
56
|
dataset: r,
|
|
45
|
-
index:
|
|
46
|
-
settings:
|
|
47
|
-
data:
|
|
48
|
-
active: !!
|
|
57
|
+
index: a,
|
|
58
|
+
settings: e,
|
|
59
|
+
data: h,
|
|
60
|
+
active: !!o,
|
|
61
|
+
stack: !0
|
|
49
62
|
}
|
|
50
63
|
),
|
|
51
|
-
line: ({ dataset: r, index:
|
|
52
|
-
|
|
64
|
+
line: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
|
|
65
|
+
s,
|
|
53
66
|
{
|
|
54
67
|
dataset: r,
|
|
55
|
-
index:
|
|
56
|
-
settings:
|
|
57
|
-
data:
|
|
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:
|
|
62
|
-
|
|
75
|
+
line_step: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
|
|
76
|
+
s,
|
|
63
77
|
{
|
|
64
78
|
dataset: r,
|
|
65
|
-
index:
|
|
66
|
-
settings:
|
|
67
|
-
data:
|
|
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:
|
|
72
|
-
|
|
86
|
+
line_slope: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
|
|
87
|
+
s,
|
|
73
88
|
{
|
|
74
89
|
dataset: r,
|
|
75
|
-
index:
|
|
76
|
-
settings:
|
|
77
|
-
data:
|
|
78
|
-
curve:
|
|
90
|
+
index: a,
|
|
91
|
+
settings: e,
|
|
92
|
+
data: t,
|
|
93
|
+
curve: x(),
|
|
94
|
+
active: !!o
|
|
79
95
|
}
|
|
80
96
|
),
|
|
81
|
-
area: ({ dataset: r, index:
|
|
82
|
-
|
|
97
|
+
area: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
|
|
98
|
+
d,
|
|
83
99
|
{
|
|
84
100
|
dataset: r,
|
|
85
|
-
index:
|
|
101
|
+
index: a,
|
|
86
102
|
curve: "linear",
|
|
87
|
-
settings:
|
|
88
|
-
data:
|
|
103
|
+
settings: e,
|
|
104
|
+
data: t,
|
|
105
|
+
active: !!o
|
|
89
106
|
}
|
|
90
107
|
),
|
|
91
|
-
area_step: ({ dataset: r, index:
|
|
92
|
-
|
|
108
|
+
area_step: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
|
|
109
|
+
d,
|
|
93
110
|
{
|
|
94
111
|
dataset: r,
|
|
95
|
-
index:
|
|
112
|
+
index: a,
|
|
96
113
|
curve: "step",
|
|
97
|
-
settings:
|
|
98
|
-
data:
|
|
114
|
+
settings: e,
|
|
115
|
+
data: t,
|
|
116
|
+
active: !!o
|
|
99
117
|
}
|
|
100
118
|
),
|
|
101
|
-
area_slope: ({ dataset: r, index:
|
|
102
|
-
|
|
119
|
+
area_slope: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
|
|
120
|
+
d,
|
|
103
121
|
{
|
|
104
122
|
dataset: r,
|
|
105
|
-
index:
|
|
106
|
-
curve:
|
|
107
|
-
settings:
|
|
108
|
-
data:
|
|
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:
|
|
112
|
-
|
|
130
|
+
area_stack: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
|
|
131
|
+
d,
|
|
113
132
|
{
|
|
114
133
|
dataset: r,
|
|
115
|
-
index:
|
|
134
|
+
index: a,
|
|
116
135
|
curve: "linear",
|
|
117
|
-
settings:
|
|
118
|
-
data:
|
|
136
|
+
settings: e,
|
|
137
|
+
data: t,
|
|
138
|
+
active: !!o
|
|
119
139
|
}
|
|
120
140
|
),
|
|
121
|
-
area_stack_slope: ({ dataset: r, index:
|
|
122
|
-
|
|
141
|
+
area_stack_slope: ({ dataset: r, index: a }) => /* @__PURE__ */ i.jsx(
|
|
142
|
+
d,
|
|
123
143
|
{
|
|
124
144
|
dataset: r,
|
|
125
|
-
index:
|
|
126
|
-
curve:
|
|
127
|
-
settings:
|
|
128
|
-
data:
|
|
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:
|
|
136
|
-
className:
|
|
156
|
+
ref: $,
|
|
157
|
+
className: G("eds-chart", _),
|
|
137
158
|
style: {
|
|
138
|
-
width:
|
|
139
|
-
height:
|
|
159
|
+
width: e.width || "100%",
|
|
160
|
+
height: e.height
|
|
140
161
|
},
|
|
141
162
|
role: "region",
|
|
142
|
-
"aria-roledescription": "
|
|
143
|
-
"aria-labelledby": `chart-title-${
|
|
144
|
-
"aria-describedby": `chart-description-${
|
|
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
|
-
|
|
147
|
-
|
|
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-${
|
|
172
|
+
id: `chart-description-${p}`,
|
|
151
173
|
className: "eds-sr-only",
|
|
152
|
-
children:
|
|
174
|
+
children: e.description
|
|
153
175
|
}
|
|
154
176
|
),
|
|
155
|
-
/* @__PURE__ */ i.jsx(
|
|
156
|
-
|
|
177
|
+
/* @__PURE__ */ i.jsx(W, { children: /* @__PURE__ */ i.jsxs(
|
|
178
|
+
X,
|
|
157
179
|
{
|
|
158
|
-
width:
|
|
159
|
-
height:
|
|
160
|
-
data:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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:
|
|
166
|
-
left:
|
|
189
|
+
top: M,
|
|
190
|
+
left: y(c).includes(
|
|
167
191
|
"left"
|
|
168
|
-
) &&
|
|
169
|
-
right:
|
|
192
|
+
) && j,
|
|
193
|
+
right: y(c).includes(
|
|
170
194
|
"right"
|
|
171
|
-
) &&
|
|
195
|
+
) && j
|
|
172
196
|
},
|
|
173
|
-
accessibilityLayer: !
|
|
174
|
-
stackOffset:
|
|
197
|
+
accessibilityLayer: !1,
|
|
198
|
+
stackOffset: E(c, t) ? "sign" : "none",
|
|
175
199
|
barGap: 1,
|
|
176
|
-
barCategoryGap: "
|
|
200
|
+
barCategoryGap: "12%",
|
|
177
201
|
children: [
|
|
178
|
-
/* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx(
|
|
202
|
+
/* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx(S, { id: "outline" }) }),
|
|
179
203
|
/* @__PURE__ */ i.jsx(
|
|
180
|
-
|
|
204
|
+
T,
|
|
181
205
|
{
|
|
182
|
-
settings:
|
|
183
|
-
datasets:
|
|
184
|
-
active:
|
|
206
|
+
settings: e,
|
|
207
|
+
datasets: c,
|
|
208
|
+
active: o
|
|
185
209
|
}
|
|
186
210
|
),
|
|
187
|
-
|
|
188
|
-
const
|
|
189
|
-
return
|
|
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
|
-
|
|
192
|
-
|
|
215
|
+
e.variant !== "card" && /* @__PURE__ */ i.jsx(
|
|
216
|
+
R,
|
|
193
217
|
{
|
|
194
|
-
settings:
|
|
195
|
-
|
|
196
|
-
|
|
218
|
+
settings: e,
|
|
219
|
+
datasets: c,
|
|
220
|
+
data: t
|
|
197
221
|
}
|
|
198
222
|
),
|
|
199
|
-
|
|
223
|
+
k
|
|
200
224
|
]
|
|
201
225
|
}
|
|
202
226
|
) })
|
|
@@ -205,7 +229,7 @@ const B = $(
|
|
|
205
229
|
);
|
|
206
230
|
}
|
|
207
231
|
);
|
|
208
|
-
|
|
232
|
+
Y.displayName = "Chart";
|
|
209
233
|
export {
|
|
210
|
-
|
|
234
|
+
Y as default
|
|
211
235
|
};
|
package/dist/Chart/ChartArea.js
CHANGED
|
@@ -1,49 +1,51 @@
|
|
|
1
1
|
import { j as o } from "../external/react/jsx-runtime.js";
|
|
2
|
-
import { getName as
|
|
3
|
-
import
|
|
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
|
|
5
|
+
function k({
|
|
6
6
|
dataset: r,
|
|
7
|
-
data:
|
|
7
|
+
data: n,
|
|
8
8
|
index: t,
|
|
9
|
-
curve:
|
|
10
|
-
settings: m
|
|
9
|
+
curve: a = "linear",
|
|
10
|
+
settings: m,
|
|
11
|
+
active: s
|
|
11
12
|
}) {
|
|
12
|
-
const
|
|
13
|
+
const f = Array.isArray(r.yDataKey) ? r.yDataKey : [r.yDataKey];
|
|
13
14
|
return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
14
|
-
|
|
15
|
+
f.map((l, i) => /* @__PURE__ */ o.jsx(
|
|
15
16
|
u,
|
|
16
17
|
{
|
|
17
18
|
id: `${t}-${i}`,
|
|
18
|
-
dataKey:
|
|
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:
|
|
27
|
-
hide:
|
|
28
|
+
type: a,
|
|
29
|
+
hide: c(r),
|
|
28
30
|
strokeLinejoin: "round",
|
|
29
31
|
strokeLinecap: "round",
|
|
30
|
-
name:
|
|
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
|
-
|
|
39
|
+
A,
|
|
38
40
|
{
|
|
39
41
|
settings: m,
|
|
40
42
|
dataset: r,
|
|
41
|
-
data:
|
|
43
|
+
data: n,
|
|
42
44
|
index: t
|
|
43
45
|
}
|
|
44
46
|
)
|
|
45
47
|
] });
|
|
46
48
|
}
|
|
47
49
|
export {
|
|
48
|
-
|
|
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
|
+
};
|