@aseguragonzalez/ui 1.0.4 → 1.0.5
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/dist/components/AppShell/AppShell.cjs +1 -0
- package/dist/components/AppShell/AppShell.js +37 -0
- package/dist/components/AppShell/AppShell.module.css.cjs +1 -0
- package/dist/components/AppShell/AppShell.module.css.js +12 -0
- package/dist/components/Banner/Banner.cjs +1 -0
- package/dist/components/Banner/Banner.js +200 -0
- package/dist/components/Banner/Banner.module.css.cjs +1 -0
- package/dist/components/Banner/Banner.module.css.js +18 -0
- package/dist/components/BarChart/BarChart.cjs +1 -0
- package/dist/components/BarChart/BarChart.js +104 -0
- package/dist/components/BarChart/BarChart.module.css.cjs +1 -0
- package/dist/components/BarChart/BarChart.module.css.js +13 -0
- package/dist/components/Breadcrumb/Breadcrumb.cjs +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +33 -0
- package/dist/components/Breadcrumb/Breadcrumb.module.css.cjs +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.module.css.js +10 -0
- package/dist/components/Card/Card.cjs +1 -0
- package/dist/components/Card/Card.js +54 -0
- package/dist/components/Card/Card.module.css.cjs +1 -0
- package/dist/components/Card/Card.module.css.js +16 -0
- package/dist/components/Carousel/Carousel.cjs +1 -0
- package/dist/components/Carousel/Carousel.js +146 -0
- package/dist/components/Carousel/Carousel.module.css.cjs +1 -0
- package/dist/components/Carousel/Carousel.module.css.js +15 -0
- package/dist/components/CheckboxField/CheckboxField.cjs +1 -0
- package/dist/components/CheckboxField/CheckboxField.js +43 -0
- package/dist/components/CheckboxField/CheckboxField.module.css.cjs +1 -0
- package/dist/components/CheckboxField/CheckboxField.module.css.js +9 -0
- package/dist/components/Container/Container.cjs +1 -0
- package/dist/components/Container/Container.js +20 -0
- package/dist/components/Container/Container.module.css.cjs +1 -0
- package/dist/components/Container/Container.module.css.js +12 -0
- package/dist/components/DataTable/DataTable.cjs +1 -0
- package/dist/components/DataTable/DataTable.js +109 -0
- package/dist/components/DataTable/DataTable.module.css.cjs +1 -0
- package/dist/components/DataTable/DataTable.module.css.js +22 -0
- package/dist/components/DateField/DateField.cjs +1 -0
- package/dist/components/DateField/DateField.js +52 -0
- package/dist/components/DateField/DateField.module.css.cjs +1 -0
- package/dist/components/DateField/DateField.module.css.js +7 -0
- package/dist/components/DonutChart/DonutChart.cjs +1 -0
- package/dist/components/DonutChart/DonutChart.js +98 -0
- package/dist/components/DonutChart/DonutChart.module.css.cjs +1 -0
- package/dist/components/DonutChart/DonutChart.module.css.js +15 -0
- package/dist/components/EmailField/EmailField.cjs +1 -0
- package/dist/components/EmailField/EmailField.js +51 -0
- package/dist/components/EmailField/EmailField.module.css.cjs +1 -0
- package/dist/components/EmailField/EmailField.module.css.js +7 -0
- package/dist/components/Grid/Grid.cjs +1 -0
- package/dist/components/Grid/Grid.js +42 -0
- package/dist/components/Grid/Grid.module.css.cjs +1 -0
- package/dist/components/Grid/Grid.module.css.js +7 -0
- package/dist/components/LineChart/LineChart.cjs +1 -0
- package/dist/components/LineChart/LineChart.js +112 -0
- package/dist/components/LineChart/LineChart.module.css.cjs +1 -0
- package/dist/components/LineChart/LineChart.module.css.js +12 -0
- package/dist/components/Navbar/Navbar.cjs +1 -0
- package/dist/components/Navbar/Navbar.js +101 -0
- package/dist/components/Navbar/Navbar.module.css.cjs +1 -0
- package/dist/components/Navbar/Navbar.module.css.js +22 -0
- package/dist/components/NumberField/NumberField.cjs +1 -0
- package/dist/components/NumberField/NumberField.js +54 -0
- package/dist/components/NumberField/NumberField.module.css.cjs +1 -0
- package/dist/components/NumberField/NumberField.module.css.js +7 -0
- package/dist/components/PageLayout/PageLayout.cjs +1 -0
- package/dist/components/PageLayout/PageLayout.js +42 -0
- package/dist/components/PageLayout/PageLayout.module.css.cjs +1 -0
- package/dist/components/PageLayout/PageLayout.module.css.js +12 -0
- package/dist/components/PasswordField/PasswordField.cjs +1 -0
- package/dist/components/PasswordField/PasswordField.js +50 -0
- package/dist/components/PasswordField/PasswordField.module.css.cjs +1 -0
- package/dist/components/PasswordField/PasswordField.module.css.js +4 -0
- package/dist/components/PhoneField/PhoneField.cjs +1 -0
- package/dist/components/PhoneField/PhoneField.js +51 -0
- package/dist/components/PhoneField/PhoneField.module.css.cjs +1 -0
- package/dist/components/PhoneField/PhoneField.module.css.js +7 -0
- package/dist/components/RadarChart/RadarChart.cjs +1 -0
- package/dist/components/RadarChart/RadarChart.js +101 -0
- package/dist/components/RadarChart/RadarChart.module.css.cjs +1 -0
- package/dist/components/RadarChart/RadarChart.module.css.js +15 -0
- package/dist/components/RadioGroup/RadioGroup.cjs +1 -0
- package/dist/components/RadioGroup/RadioGroup.js +63 -0
- package/dist/components/RadioGroup/RadioGroup.module.css.cjs +1 -0
- package/dist/components/RadioGroup/RadioGroup.module.css.js +12 -0
- package/dist/components/ScatterPlot/ScatterPlot.cjs +1 -0
- package/dist/components/ScatterPlot/ScatterPlot.js +134 -0
- package/dist/components/ScatterPlot/ScatterPlot.module.css.cjs +1 -0
- package/dist/components/ScatterPlot/ScatterPlot.module.css.js +14 -0
- package/dist/components/SearchField/SearchField.cjs +1 -0
- package/dist/components/SearchField/SearchField.js +51 -0
- package/dist/components/SearchField/SearchField.module.css.cjs +1 -0
- package/dist/components/SearchField/SearchField.module.css.js +7 -0
- package/dist/components/Section/Section.cjs +1 -0
- package/dist/components/Section/Section.js +41 -0
- package/dist/components/Section/Section.module.css.cjs +1 -0
- package/dist/components/Section/Section.module.css.js +12 -0
- package/dist/components/SelectField/SelectField.cjs +1 -0
- package/dist/components/SelectField/SelectField.js +57 -0
- package/dist/components/SelectField/SelectField.module.css.cjs +1 -0
- package/dist/components/SelectField/SelectField.module.css.js +4 -0
- package/dist/components/Sidebar/Sidebar.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.js +150 -0
- package/dist/components/Sidebar/Sidebar.module.css.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.module.css.js +25 -0
- package/dist/components/Stack/Stack.cjs +1 -0
- package/dist/components/Stack/Stack.js +42 -0
- package/dist/components/Stack/Stack.module.css.cjs +1 -0
- package/dist/components/Stack/Stack.module.css.js +4 -0
- package/dist/components/TextAreaField/TextAreaField.cjs +1 -0
- package/dist/components/TextAreaField/TextAreaField.js +49 -0
- package/dist/components/TextAreaField/TextAreaField.module.css.cjs +1 -0
- package/dist/components/TextAreaField/TextAreaField.module.css.js +4 -0
- package/dist/components/TextField/TextField.cjs +1 -0
- package/dist/components/TextField/TextField.js +51 -0
- package/dist/components/TextField/TextField.module.css.cjs +1 -0
- package/dist/components/TextField/TextField.module.css.js +7 -0
- package/dist/components/ThemeProvider/ThemeProvider.cjs +1 -0
- package/dist/components/ThemeProvider/ThemeProvider.js +33 -0
- package/dist/components/ThemeProvider/useTheme.cjs +1 -0
- package/dist/components/ThemeProvider/useTheme.js +10 -0
- package/dist/components/ToggleField/ToggleField.cjs +1 -0
- package/dist/components/ToggleField/ToggleField.js +47 -0
- package/dist/components/ToggleField/ToggleField.module.css.cjs +1 -0
- package/dist/components/ToggleField/ToggleField.module.css.js +7 -0
- package/dist/components/shared/useFieldIds.cjs +1 -0
- package/dist/components/shared/useFieldIds.js +13 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +64 -3653
- package/dist/patterns/AuthLayout/AuthLayout.cjs +1 -0
- package/dist/patterns/AuthLayout/AuthLayout.js +59 -0
- package/dist/patterns/AuthLayout/AuthLayout.module.css.cjs +1 -0
- package/dist/patterns/AuthLayout/AuthLayout.module.css.js +13 -0
- package/dist/primitives/Alert/Alert.cjs +1 -0
- package/dist/primitives/Alert/Alert.js +170 -0
- package/dist/primitives/Alert/Alert.module.css.cjs +1 -0
- package/dist/primitives/Alert/Alert.module.css.js +15 -0
- package/dist/primitives/Avatar/Avatar.cjs +1 -0
- package/dist/primitives/Avatar/Avatar.js +41 -0
- package/dist/primitives/Avatar/Avatar.module.css.cjs +1 -0
- package/dist/primitives/Avatar/Avatar.module.css.js +15 -0
- package/dist/primitives/Badge/Badge.cjs +1 -0
- package/dist/primitives/Badge/Badge.js +20 -0
- package/dist/primitives/Badge/Badge.module.css.cjs +1 -0
- package/dist/primitives/Badge/Badge.module.css.js +16 -0
- package/dist/primitives/Button/Button.cjs +1 -0
- package/dist/primitives/Button/Button.js +33 -0
- package/dist/primitives/Button/Button.module.css.cjs +1 -0
- package/dist/primitives/Button/Button.module.css.js +16 -0
- package/dist/primitives/Checkbox/Checkbox.cjs +1 -0
- package/dist/primitives/Checkbox/Checkbox.js +22 -0
- package/dist/primitives/Checkbox/Checkbox.module.css.cjs +1 -0
- package/dist/primitives/Checkbox/Checkbox.module.css.js +9 -0
- package/dist/primitives/DateInput/DateInput.cjs +1 -0
- package/dist/primitives/DateInput/DateInput.js +22 -0
- package/dist/primitives/Divider/Divider.cjs +1 -0
- package/dist/primitives/Divider/Divider.js +22 -0
- package/dist/primitives/Divider/Divider.module.css.cjs +1 -0
- package/dist/primitives/Divider/Divider.module.css.js +8 -0
- package/dist/primitives/EmailInput/EmailInput.cjs +1 -0
- package/dist/primitives/EmailInput/EmailInput.js +22 -0
- package/dist/primitives/ErrorMessage/ErrorMessage.cjs +1 -0
- package/dist/primitives/ErrorMessage/ErrorMessage.js +13 -0
- package/dist/primitives/ErrorMessage/ErrorMessage.module.css.cjs +1 -0
- package/dist/primitives/ErrorMessage/ErrorMessage.module.css.js +4 -0
- package/dist/primitives/Heading/Heading.cjs +1 -0
- package/dist/primitives/Heading/Heading.js +52 -0
- package/dist/primitives/Heading/Heading.module.css.cjs +1 -0
- package/dist/primitives/Heading/Heading.module.css.js +13 -0
- package/dist/primitives/Hint/Hint.cjs +1 -0
- package/dist/primitives/Hint/Hint.js +13 -0
- package/dist/primitives/Hint/Hint.module.css.cjs +1 -0
- package/dist/primitives/Hint/Hint.module.css.js +4 -0
- package/dist/primitives/Label/Label.cjs +1 -0
- package/dist/primitives/Label/Label.js +22 -0
- package/dist/primitives/Label/Label.module.css.cjs +1 -0
- package/dist/primitives/Label/Label.module.css.js +8 -0
- package/dist/primitives/Modal/Modal.cjs +1 -0
- package/dist/primitives/Modal/Modal.js +111 -0
- package/dist/primitives/Modal/Modal.module.css.cjs +1 -0
- package/dist/primitives/Modal/Modal.module.css.js +15 -0
- package/dist/primitives/NumberInput/NumberInput.cjs +1 -0
- package/dist/primitives/NumberInput/NumberInput.js +27 -0
- package/dist/primitives/NumberInput/NumberInput.module.css.cjs +1 -0
- package/dist/primitives/NumberInput/NumberInput.module.css.js +4 -0
- package/dist/primitives/PasswordInput/PasswordInput.cjs +1 -0
- package/dist/primitives/PasswordInput/PasswordInput.js +65 -0
- package/dist/primitives/PasswordInput/PasswordInput.module.css.cjs +1 -0
- package/dist/primitives/PasswordInput/PasswordInput.module.css.js +12 -0
- package/dist/primitives/PhoneInput/PhoneInput.cjs +1 -0
- package/dist/primitives/PhoneInput/PhoneInput.js +22 -0
- package/dist/primitives/ProgressBar/ProgressBar.cjs +1 -0
- package/dist/primitives/ProgressBar/ProgressBar.js +32 -0
- package/dist/primitives/ProgressBar/ProgressBar.module.css.cjs +1 -0
- package/dist/primitives/ProgressBar/ProgressBar.module.css.js +18 -0
- package/dist/primitives/RadioButton/RadioButton.cjs +1 -0
- package/dist/primitives/RadioButton/RadioButton.js +22 -0
- package/dist/primitives/RadioButton/RadioButton.module.css.cjs +1 -0
- package/dist/primitives/RadioButton/RadioButton.module.css.js +9 -0
- package/dist/primitives/SearchInput/SearchInput.cjs +1 -0
- package/dist/primitives/SearchInput/SearchInput.js +22 -0
- package/dist/primitives/Select/Select.cjs +1 -0
- package/dist/primitives/Select/Select.js +25 -0
- package/dist/primitives/Select/Select.module.css.cjs +1 -0
- package/dist/primitives/Select/Select.module.css.js +11 -0
- package/dist/primitives/Skeleton/Skeleton.cjs +1 -0
- package/dist/primitives/Skeleton/Skeleton.js +43 -0
- package/dist/primitives/Skeleton/Skeleton.module.css.cjs +1 -0
- package/dist/primitives/Skeleton/Skeleton.module.css.js +11 -0
- package/dist/primitives/Spinner/Spinner.cjs +1 -0
- package/dist/primitives/Spinner/Spinner.js +24 -0
- package/dist/primitives/Spinner/Spinner.module.css.cjs +1 -0
- package/dist/primitives/Spinner/Spinner.module.css.js +11 -0
- package/dist/primitives/Tabs/Tabs.cjs +1 -0
- package/dist/primitives/Tabs/Tabs.js +110 -0
- package/dist/primitives/Tabs/Tabs.module.css.cjs +1 -0
- package/dist/primitives/Tabs/Tabs.module.css.js +9 -0
- package/dist/primitives/Text/Text.cjs +1 -0
- package/dist/primitives/Text/Text.js +21 -0
- package/dist/primitives/Text/Text.module.css.cjs +1 -0
- package/dist/primitives/Text/Text.module.css.js +20 -0
- package/dist/primitives/TextArea/TextArea.cjs +1 -0
- package/dist/primitives/TextArea/TextArea.js +32 -0
- package/dist/primitives/TextArea/TextArea.module.css.cjs +1 -0
- package/dist/primitives/TextArea/TextArea.module.css.js +11 -0
- package/dist/primitives/TextInput/TextInput.cjs +1 -0
- package/dist/primitives/TextInput/TextInput.js +22 -0
- package/dist/primitives/TextInput/TextInput.module.css.cjs +1 -0
- package/dist/primitives/TextInput/TextInput.module.css.js +10 -0
- package/dist/primitives/Toast/Toast.cjs +1 -0
- package/dist/primitives/Toast/Toast.js +178 -0
- package/dist/primitives/Toast/Toast.module.css.cjs +1 -0
- package/dist/primitives/Toast/Toast.module.css.js +14 -0
- package/dist/primitives/Toggle/Toggle.cjs +1 -0
- package/dist/primitives/Toggle/Toggle.js +26 -0
- package/dist/primitives/Toggle/Toggle.module.css.cjs +1 -0
- package/dist/primitives/Toggle/Toggle.module.css.js +12 -0
- package/dist/primitives/Tooltip/Tooltip.cjs +1 -0
- package/dist/primitives/Tooltip/Tooltip.js +95 -0
- package/dist/primitives/Tooltip/Tooltip.module.css.cjs +1 -0
- package/dist/primitives/Tooltip/Tooltip.module.css.js +11 -0
- package/package.json +4 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`_root_123no_1`,t=`_inputWrapper_123no_7`,n={root:e,inputWrapper:t};exports.default=n,exports.inputWrapper=t,exports.root=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./RadarChart.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=320,i=320,a=r/2,o=i/2,s=110,c=4;function l(e,t){return e.color??`var(--ds-chart-${t%6+1})`}function u(e,t){return-Math.PI/2+2*Math.PI*e/t}function d(e,t){return[a+e*Math.cos(t),o+e*Math.sin(t)]}function f(e,t,n){return e.map((e,r)=>{let[i,a]=d(t>0?e/t*s:0,u(r,n));return`${i},${a}`}).join(` `)}var p=(0,t.forwardRef)(({title:p,axes:m,series:h,maxValue:g,className:_},v)=>{let y=(0,t.useId)();if(m.length===0||h.length===0)return(0,n.jsxs)(`div`,{className:[e.default.empty,_??``].filter(Boolean).join(` `),children:[p,` — no data`]});let b=m.length,x=Math.max(...h.flatMap(e=>e.values),0),S=g??x;return(0,n.jsxs)(`div`,{ref:v,className:[e.default.wrapper,_??``].filter(Boolean).join(` `),children:[(0,n.jsxs)(`svg`,{role:`img`,"aria-labelledby":y,viewBox:`0 0 ${r} ${i}`,className:e.default.svg,children:[(0,n.jsx)(`title`,{id:y,children:p}),Array.from({length:c},(t,r)=>{let i=(r+1)/c*s,a=Array.from({length:b},(e,t)=>{let[n,r]=d(i,u(t,b));return`${n},${r}`}).join(` `);return(0,n.jsx)(`polygon`,{points:a,className:e.default.ring},r)}),m.map((t,r)=>{let[i,c]=d(s,u(r,b));return(0,n.jsx)(`line`,{x1:a,y1:o,x2:i,y2:c,className:e.default.axisLine},t)}),h.map((t,r)=>{let i=l(t,r),a=f(t.values,S,b);return(0,n.jsx)(`polygon`,{points:a,fill:i,fillOpacity:`0.15`,stroke:i,strokeWidth:`2`,strokeLinejoin:`round`,className:e.default.seriesPolygon},`${t.id}-fill`)}),m.map((t,r)=>{let i=u(r,b),[a,o]=d(130,i),s=`middle`;return Math.cos(i)>.1?s=`start`:Math.cos(i)<-.1&&(s=`end`),(0,n.jsx)(`text`,{x:a,y:o,textAnchor:s,dominantBaseline:`middle`,className:e.default.axisLabel,children:t},t)})]}),(0,n.jsx)(`ul`,{className:e.default.legend,"aria-label":`Chart legend`,children:h.map((t,r)=>(0,n.jsxs)(`li`,{className:e.default.legendItem,children:[(0,n.jsx)(`span`,{className:e.default.legendSwatch,style:{background:l(t,r)},"aria-hidden":`true`}),(0,n.jsx)(`span`,{children:t.label})]},t.id))})]})});p.displayName=`RadarChart`,exports.RadarChart=p;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import e from "./RadarChart.module.css.js";
|
|
2
|
+
import { forwardRef as t, useId as n } from "react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/RadarChart/RadarChart.tsx
|
|
5
|
+
var a = 320, o = 320, s = a / 2, c = o / 2, l = 110, u = 4;
|
|
6
|
+
function d(e, t) {
|
|
7
|
+
return e.color ?? `var(--ds-chart-${t % 6 + 1})`;
|
|
8
|
+
}
|
|
9
|
+
function f(e, t) {
|
|
10
|
+
return -Math.PI / 2 + 2 * Math.PI * e / t;
|
|
11
|
+
}
|
|
12
|
+
function p(e, t) {
|
|
13
|
+
return [s + e * Math.cos(t), c + e * Math.sin(t)];
|
|
14
|
+
}
|
|
15
|
+
function m(e, t, n) {
|
|
16
|
+
return e.map((e, r) => {
|
|
17
|
+
let [i, a] = p(t > 0 ? e / t * l : 0, f(r, n));
|
|
18
|
+
return `${i},${a}`;
|
|
19
|
+
}).join(" ");
|
|
20
|
+
}
|
|
21
|
+
var h = t(({ title: t, axes: h, series: g, maxValue: _, className: v }, y) => {
|
|
22
|
+
let b = n();
|
|
23
|
+
if (h.length === 0 || g.length === 0) return /* @__PURE__ */ i("div", {
|
|
24
|
+
className: [e.empty, v ?? ""].filter(Boolean).join(" "),
|
|
25
|
+
children: [t, " — no data"]
|
|
26
|
+
});
|
|
27
|
+
let x = h.length, S = Math.max(...g.flatMap((e) => e.values), 0), C = _ ?? S;
|
|
28
|
+
return /* @__PURE__ */ i("div", {
|
|
29
|
+
ref: y,
|
|
30
|
+
className: [e.wrapper, v ?? ""].filter(Boolean).join(" "),
|
|
31
|
+
children: [/* @__PURE__ */ i("svg", {
|
|
32
|
+
role: "img",
|
|
33
|
+
"aria-labelledby": b,
|
|
34
|
+
viewBox: `0 0 ${a} ${o}`,
|
|
35
|
+
className: e.svg,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ r("title", {
|
|
38
|
+
id: b,
|
|
39
|
+
children: t
|
|
40
|
+
}),
|
|
41
|
+
Array.from({ length: u }, (t, n) => {
|
|
42
|
+
let i = (n + 1) / u * l, a = Array.from({ length: x }, (e, t) => {
|
|
43
|
+
let [n, r] = p(i, f(t, x));
|
|
44
|
+
return `${n},${r}`;
|
|
45
|
+
}).join(" ");
|
|
46
|
+
return /* @__PURE__ */ r("polygon", {
|
|
47
|
+
points: a,
|
|
48
|
+
className: e.ring
|
|
49
|
+
}, n);
|
|
50
|
+
}),
|
|
51
|
+
h.map((t, n) => {
|
|
52
|
+
let [i, a] = p(l, f(n, x));
|
|
53
|
+
return /* @__PURE__ */ r("line", {
|
|
54
|
+
x1: s,
|
|
55
|
+
y1: c,
|
|
56
|
+
x2: i,
|
|
57
|
+
y2: a,
|
|
58
|
+
className: e.axisLine
|
|
59
|
+
}, t);
|
|
60
|
+
}),
|
|
61
|
+
g.map((t, n) => {
|
|
62
|
+
let i = d(t, n), a = m(t.values, C, x);
|
|
63
|
+
return /* @__PURE__ */ r("polygon", {
|
|
64
|
+
points: a,
|
|
65
|
+
fill: i,
|
|
66
|
+
fillOpacity: "0.15",
|
|
67
|
+
stroke: i,
|
|
68
|
+
strokeWidth: "2",
|
|
69
|
+
strokeLinejoin: "round",
|
|
70
|
+
className: e.seriesPolygon
|
|
71
|
+
}, `${t.id}-fill`);
|
|
72
|
+
}),
|
|
73
|
+
h.map((t, n) => {
|
|
74
|
+
let i = f(n, x), [a, o] = p(130, i), s = "middle";
|
|
75
|
+
return Math.cos(i) > .1 ? s = "start" : Math.cos(i) < -.1 && (s = "end"), /* @__PURE__ */ r("text", {
|
|
76
|
+
x: a,
|
|
77
|
+
y: o,
|
|
78
|
+
textAnchor: s,
|
|
79
|
+
dominantBaseline: "middle",
|
|
80
|
+
className: e.axisLabel,
|
|
81
|
+
children: t
|
|
82
|
+
}, t);
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
}), /* @__PURE__ */ r("ul", {
|
|
86
|
+
className: e.legend,
|
|
87
|
+
"aria-label": "Chart legend",
|
|
88
|
+
children: g.map((t, n) => /* @__PURE__ */ i("li", {
|
|
89
|
+
className: e.legendItem,
|
|
90
|
+
children: [/* @__PURE__ */ r("span", {
|
|
91
|
+
className: e.legendSwatch,
|
|
92
|
+
style: { background: d(t, n) },
|
|
93
|
+
"aria-hidden": "true"
|
|
94
|
+
}), /* @__PURE__ */ r("span", { children: t.label })]
|
|
95
|
+
}, t.id))
|
|
96
|
+
})]
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
h.displayName = "RadarChart";
|
|
100
|
+
//#endregion
|
|
101
|
+
export { h as RadarChart };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`_wrapper_1k1rg_1`,t=`_svg_1k1rg_6`,n=`_ring_1k1rg_12`,r=`_axisLine_1k1rg_18`,i=`_axisLabel_1k1rg_23`,a=`_seriesPolygon_1k1rg_29`,o=`_legend_1k1rg_37`,s=`_legendItem_1k1rg_48`,c=`_legendSwatch_1k1rg_57`,l=`_empty_1k1rg_64`,u={wrapper:e,svg:t,ring:n,axisLine:r,axisLabel:i,seriesPolygon:a,legend:o,legendItem:s,legendSwatch:c,empty:l};exports.axisLabel=i,exports.axisLine=r,exports.default=u,exports.empty=l,exports.legend=o,exports.legendItem=s,exports.legendSwatch=c,exports.ring=n,exports.seriesPolygon=a,exports.svg=t,exports.wrapper=e;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/components/RadarChart/RadarChart.module.css
|
|
2
|
+
var e = "_wrapper_1k1rg_1", t = "_svg_1k1rg_6", n = "_ring_1k1rg_12", r = "_axisLine_1k1rg_18", i = "_axisLabel_1k1rg_23", a = "_seriesPolygon_1k1rg_29", o = "_legend_1k1rg_37", s = "_legendItem_1k1rg_48", c = "_legendSwatch_1k1rg_57", l = "_empty_1k1rg_64", u = {
|
|
3
|
+
wrapper: e,
|
|
4
|
+
svg: t,
|
|
5
|
+
ring: n,
|
|
6
|
+
axisLine: r,
|
|
7
|
+
axisLabel: i,
|
|
8
|
+
seriesPolygon: a,
|
|
9
|
+
legend: o,
|
|
10
|
+
legendItem: s,
|
|
11
|
+
legendSwatch: c,
|
|
12
|
+
empty: l
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { i as axisLabel, r as axisLine, u as default, l as empty, o as legend, s as legendItem, c as legendSwatch, n as ring, a as seriesPolygon, t as svg, e as wrapper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("../../primitives/RadioButton/RadioButton.cjs"),t=require("../../primitives/Hint/Hint.cjs"),n=require("../../primitives/ErrorMessage/ErrorMessage.cjs"),r=require("../shared/useFieldIds.cjs"),i=require("./RadioGroup.module.css.cjs");let a=require("react/jsx-runtime");function o({legend:o,name:s,options:c,value:l,defaultValue:u,onChange:d,hint:f,error:p,required:m=!1,disabled:h=!1,size:g=`md`,className:_}){let{id:v,hintId:y,errorId:b,describedBy:x}=r.useFieldIds({hint:f,error:p});return(0,a.jsxs)(`fieldset`,{className:[i.default.fieldset,_??``].filter(Boolean).join(` `),"aria-describedby":x,disabled:h,children:[(0,a.jsxs)(`legend`,{className:[i.default.legend,h?i.default.disabled:``].filter(Boolean).join(` `),children:[o,m&&(0,a.jsx)(`span`,{className:i.default.required,"aria-hidden":`true`,children:`*`})]}),c.map((t,n)=>{let r=`${v}-${t.value}`,o=h||t.disabled;return(0,a.jsxs)(`div`,{className:i.default.option,children:[(0,a.jsx)(e.RadioButton,{id:r,name:s,value:t.value,size:g,hasError:!!p,disabled:o,required:m&&n===0,checked:l===void 0?void 0:l===t.value,defaultChecked:u===void 0?void 0:u===t.value,onChange:d?()=>d(t.value):void 0}),(0,a.jsx)(`label`,{htmlFor:r,className:[i.default.optionLabel,o?i.default.disabled:``].filter(Boolean).join(` `),children:t.label})]},t.value)}),(p||f)&&(0,a.jsx)(`div`,{className:i.default.footer,children:p?(0,a.jsx)(n.ErrorMessage,{id:b,children:p}):f?(0,a.jsx)(t.Hint,{id:y,children:f}):null})]})}o.displayName=`RadioGroup`,exports.RadioGroup=o;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { RadioButton as e } from "../../primitives/RadioButton/RadioButton.js";
|
|
2
|
+
import { Hint as t } from "../../primitives/Hint/Hint.js";
|
|
3
|
+
import { ErrorMessage as n } from "../../primitives/ErrorMessage/ErrorMessage.js";
|
|
4
|
+
import { useFieldIds as r } from "../shared/useFieldIds.js";
|
|
5
|
+
import i from "./RadioGroup.module.css.js";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/RadioGroup/RadioGroup.tsx
|
|
8
|
+
function s({ legend: s, name: c, options: l, value: u, defaultValue: d, onChange: f, hint: p, error: m, required: h = !1, disabled: g = !1, size: _ = "md", className: v }) {
|
|
9
|
+
let { id: y, hintId: b, errorId: x, describedBy: S } = r({
|
|
10
|
+
hint: p,
|
|
11
|
+
error: m
|
|
12
|
+
});
|
|
13
|
+
return /* @__PURE__ */ o("fieldset", {
|
|
14
|
+
className: [i.fieldset, v ?? ""].filter(Boolean).join(" "),
|
|
15
|
+
"aria-describedby": S,
|
|
16
|
+
disabled: g,
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ o("legend", {
|
|
19
|
+
className: [i.legend, g ? i.disabled : ""].filter(Boolean).join(" "),
|
|
20
|
+
children: [s, h && /* @__PURE__ */ a("span", {
|
|
21
|
+
className: i.required,
|
|
22
|
+
"aria-hidden": "true",
|
|
23
|
+
children: "*"
|
|
24
|
+
})]
|
|
25
|
+
}),
|
|
26
|
+
l.map((t, n) => {
|
|
27
|
+
let r = `${y}-${t.value}`, s = g || t.disabled;
|
|
28
|
+
return /* @__PURE__ */ o("div", {
|
|
29
|
+
className: i.option,
|
|
30
|
+
children: [/* @__PURE__ */ a(e, {
|
|
31
|
+
id: r,
|
|
32
|
+
name: c,
|
|
33
|
+
value: t.value,
|
|
34
|
+
size: _,
|
|
35
|
+
hasError: !!m,
|
|
36
|
+
disabled: s,
|
|
37
|
+
required: h && n === 0,
|
|
38
|
+
checked: u === void 0 ? void 0 : u === t.value,
|
|
39
|
+
defaultChecked: d === void 0 ? void 0 : d === t.value,
|
|
40
|
+
onChange: f ? () => f(t.value) : void 0
|
|
41
|
+
}), /* @__PURE__ */ a("label", {
|
|
42
|
+
htmlFor: r,
|
|
43
|
+
className: [i.optionLabel, s ? i.disabled : ""].filter(Boolean).join(" "),
|
|
44
|
+
children: t.label
|
|
45
|
+
})]
|
|
46
|
+
}, t.value);
|
|
47
|
+
}),
|
|
48
|
+
(m || p) && /* @__PURE__ */ a("div", {
|
|
49
|
+
className: i.footer,
|
|
50
|
+
children: m ? /* @__PURE__ */ a(n, {
|
|
51
|
+
id: x,
|
|
52
|
+
children: m
|
|
53
|
+
}) : p ? /* @__PURE__ */ a(t, {
|
|
54
|
+
id: b,
|
|
55
|
+
children: p
|
|
56
|
+
}) : null
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
s.displayName = "RadioGroup";
|
|
62
|
+
//#endregion
|
|
63
|
+
export { s as RadioGroup };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`_fieldset_8eiqw_1`,t=`_legend_8eiqw_12`,n=`_disabled_8eiqw_26`,r=`_required_8eiqw_30`,i=`_option_8eiqw_35`,a=`_optionLabel_8eiqw_41`,o=`_footer_8eiqw_56`,s={fieldset:e,legend:t,disabled:n,required:r,option:i,optionLabel:a,footer:o};exports.default=s,exports.disabled=n,exports.fieldset=e,exports.footer=o,exports.legend=t,exports.option=i,exports.optionLabel=a,exports.required=r;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/components/RadioGroup/RadioGroup.module.css
|
|
2
|
+
var e = "_fieldset_8eiqw_1", t = "_legend_8eiqw_12", n = "_disabled_8eiqw_26", r = "_required_8eiqw_30", i = "_option_8eiqw_35", a = "_optionLabel_8eiqw_41", o = "_footer_8eiqw_56", s = {
|
|
3
|
+
fieldset: e,
|
|
4
|
+
legend: t,
|
|
5
|
+
disabled: n,
|
|
6
|
+
required: r,
|
|
7
|
+
option: i,
|
|
8
|
+
optionLabel: a,
|
|
9
|
+
footer: o
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { s as default, n as disabled, e as fieldset, o as footer, t as legend, i as option, a as optionLabel, r as required };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./ScatterPlot.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=480,i=320,a={top:20,right:20,bottom:64,left:56},o=r-a.left-a.right,s=i-a.top-a.bottom,c=4,l=.1;function u(e){return Math.abs(e)>=1e6?`${(e/1e6).toFixed(1)}M`:Math.abs(e)>=1e3?`${(e/1e3).toFixed(1)}k`:String(Number.isInteger(e)?e:e.toFixed(1))}function d(e,t){return e.color??`var(--ds-chart-${t%6+1})`}var f=(0,t.forwardRef)(({title:f,series:p,xLabel:m,yLabel:h,className:g},_)=>{let v=(0,t.useId)();if(p.length===0||p.every(e=>e.data.length===0))return(0,n.jsxs)(`div`,{className:[e.default.empty,g??``].filter(Boolean).join(` `),children:[f,` — no data`]});let y=p.flatMap(e=>e.data.map(e=>e.x)),b=p.flatMap(e=>e.data.map(e=>e.y)),x=Math.min(...y),S=Math.max(...y),C=Math.min(...b),w=Math.max(...b),T=S-x||1,E=w-C||1,D=x-T*l,O=S+T*l,k=C-E*l,A=w+E*l,j=e=>a.left+(e-D)/(O-D)*o,M=e=>a.top+s-(e-k)/(A-k)*s;return(0,n.jsxs)(`div`,{ref:_,className:[e.default.wrapper,g??``].filter(Boolean).join(` `),children:[(0,n.jsxs)(`svg`,{role:`img`,"aria-labelledby":v,viewBox:`0 0 ${r} ${i}`,className:e.default.svg,children:[(0,n.jsx)(`title`,{id:v,children:f}),Array.from({length:5},(t,i)=>{let o=i/c,l=a.top+s-o*s,d=k+(A-k)*o;return(0,n.jsxs)(`g`,{children:[(0,n.jsx)(`line`,{x1:a.left,y1:l,x2:r-a.right,y2:l,stroke:`var(--ds-chart-grid)`,strokeWidth:`1`}),(0,n.jsx)(`text`,{x:a.left-6,y:l,textAnchor:`end`,dominantBaseline:`middle`,className:e.default.axisLabel,children:u(d)})]},`gy-${i}`)}),Array.from({length:5},(t,r)=>{let i=r/c,l=a.left+i*o,d=D+(O-D)*i;return(0,n.jsxs)(`g`,{children:[(0,n.jsx)(`line`,{x1:l,y1:a.top,x2:l,y2:a.top+s,stroke:`var(--ds-chart-grid)`,strokeWidth:`1`}),(0,n.jsx)(`text`,{x:l,y:a.top+s+16,textAnchor:`middle`,className:e.default.axisLabel,children:u(d)})]},`gx-${r}`)}),p.map((t,r)=>{let i=d(t,r);return(0,n.jsx)(`g`,{children:t.data.map((r,a)=>(0,n.jsx)(`circle`,{cx:j(r.x),cy:M(r.y),r:`5`,fill:i,fillOpacity:`0.7`,stroke:i,strokeWidth:`1`,className:e.default.point,children:(0,n.jsx)(`title`,{children:r.label?`${t.label} — ${r.label}: (${r.x}, ${r.y})`:`${t.label}: (${r.x}, ${r.y})`})},a))},t.id)}),(0,n.jsx)(`line`,{x1:a.left,y1:a.top+s,x2:r-a.right,y2:a.top+s,stroke:`var(--ds-chart-axis)`,strokeWidth:`1`}),(0,n.jsx)(`line`,{x1:a.left,y1:a.top,x2:a.left,y2:a.top+s,stroke:`var(--ds-chart-axis)`,strokeWidth:`1`}),m&&(0,n.jsx)(`text`,{x:a.left+o/2,y:312,textAnchor:`middle`,className:e.default.axisTitle,children:m}),h&&(0,n.jsx)(`text`,{x:12,y:a.top+s/2,textAnchor:`middle`,transform:`rotate(-90 12 ${a.top+s/2})`,className:e.default.axisTitle,children:h})]}),p.length>1&&(0,n.jsx)(`ul`,{className:e.default.legend,"aria-label":`Chart legend`,children:p.map((t,r)=>(0,n.jsxs)(`li`,{className:e.default.legendItem,children:[(0,n.jsx)(`span`,{className:e.default.legendSwatch,style:{background:d(t,r)},"aria-hidden":`true`}),(0,n.jsx)(`span`,{children:t.label})]},t.id))})]})});f.displayName=`ScatterPlot`,exports.ScatterPlot=f;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import e from "./ScatterPlot.module.css.js";
|
|
2
|
+
import { forwardRef as t, useId as n } from "react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ScatterPlot/ScatterPlot.tsx
|
|
5
|
+
var a = 480, o = 320, s = {
|
|
6
|
+
top: 20,
|
|
7
|
+
right: 20,
|
|
8
|
+
bottom: 64,
|
|
9
|
+
left: 56
|
|
10
|
+
}, c = a - s.left - s.right, l = o - s.top - s.bottom, u = 4, d = .1;
|
|
11
|
+
function f(e) {
|
|
12
|
+
return Math.abs(e) >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : Math.abs(e) >= 1e3 ? `${(e / 1e3).toFixed(1)}k` : String(Number.isInteger(e) ? e : e.toFixed(1));
|
|
13
|
+
}
|
|
14
|
+
function p(e, t) {
|
|
15
|
+
return e.color ?? `var(--ds-chart-${t % 6 + 1})`;
|
|
16
|
+
}
|
|
17
|
+
var m = t(({ title: t, series: m, xLabel: h, yLabel: g, className: _ }, v) => {
|
|
18
|
+
let y = n();
|
|
19
|
+
if (m.length === 0 || m.every((e) => e.data.length === 0)) return /* @__PURE__ */ i("div", {
|
|
20
|
+
className: [e.empty, _ ?? ""].filter(Boolean).join(" "),
|
|
21
|
+
children: [t, " — no data"]
|
|
22
|
+
});
|
|
23
|
+
let b = m.flatMap((e) => e.data.map((e) => e.x)), x = m.flatMap((e) => e.data.map((e) => e.y)), S = Math.min(...b), C = Math.max(...b), w = Math.min(...x), T = Math.max(...x), E = C - S || 1, D = T - w || 1, O = S - E * d, k = C + E * d, A = w - D * d, j = T + D * d, M = (e) => s.left + (e - O) / (k - O) * c, N = (e) => s.top + l - (e - A) / (j - A) * l;
|
|
24
|
+
return /* @__PURE__ */ i("div", {
|
|
25
|
+
ref: v,
|
|
26
|
+
className: [e.wrapper, _ ?? ""].filter(Boolean).join(" "),
|
|
27
|
+
children: [/* @__PURE__ */ i("svg", {
|
|
28
|
+
role: "img",
|
|
29
|
+
"aria-labelledby": y,
|
|
30
|
+
viewBox: `0 0 ${a} ${o}`,
|
|
31
|
+
className: e.svg,
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ r("title", {
|
|
34
|
+
id: y,
|
|
35
|
+
children: t
|
|
36
|
+
}),
|
|
37
|
+
Array.from({ length: 5 }, (t, n) => {
|
|
38
|
+
let o = n / u, c = s.top + l - o * l, d = A + (j - A) * o;
|
|
39
|
+
return /* @__PURE__ */ i("g", { children: [/* @__PURE__ */ r("line", {
|
|
40
|
+
x1: s.left,
|
|
41
|
+
y1: c,
|
|
42
|
+
x2: a - s.right,
|
|
43
|
+
y2: c,
|
|
44
|
+
stroke: "var(--ds-chart-grid)",
|
|
45
|
+
strokeWidth: "1"
|
|
46
|
+
}), /* @__PURE__ */ r("text", {
|
|
47
|
+
x: s.left - 6,
|
|
48
|
+
y: c,
|
|
49
|
+
textAnchor: "end",
|
|
50
|
+
dominantBaseline: "middle",
|
|
51
|
+
className: e.axisLabel,
|
|
52
|
+
children: f(d)
|
|
53
|
+
})] }, `gy-${n}`);
|
|
54
|
+
}),
|
|
55
|
+
Array.from({ length: 5 }, (t, n) => {
|
|
56
|
+
let a = n / u, o = s.left + a * c, d = O + (k - O) * a;
|
|
57
|
+
return /* @__PURE__ */ i("g", { children: [/* @__PURE__ */ r("line", {
|
|
58
|
+
x1: o,
|
|
59
|
+
y1: s.top,
|
|
60
|
+
x2: o,
|
|
61
|
+
y2: s.top + l,
|
|
62
|
+
stroke: "var(--ds-chart-grid)",
|
|
63
|
+
strokeWidth: "1"
|
|
64
|
+
}), /* @__PURE__ */ r("text", {
|
|
65
|
+
x: o,
|
|
66
|
+
y: s.top + l + 16,
|
|
67
|
+
textAnchor: "middle",
|
|
68
|
+
className: e.axisLabel,
|
|
69
|
+
children: f(d)
|
|
70
|
+
})] }, `gx-${n}`);
|
|
71
|
+
}),
|
|
72
|
+
m.map((t, n) => {
|
|
73
|
+
let i = p(t, n);
|
|
74
|
+
return /* @__PURE__ */ r("g", { children: t.data.map((n, a) => /* @__PURE__ */ r("circle", {
|
|
75
|
+
cx: M(n.x),
|
|
76
|
+
cy: N(n.y),
|
|
77
|
+
r: "5",
|
|
78
|
+
fill: i,
|
|
79
|
+
fillOpacity: "0.7",
|
|
80
|
+
stroke: i,
|
|
81
|
+
strokeWidth: "1",
|
|
82
|
+
className: e.point,
|
|
83
|
+
children: /* @__PURE__ */ r("title", { children: n.label ? `${t.label} — ${n.label}: (${n.x}, ${n.y})` : `${t.label}: (${n.x}, ${n.y})` })
|
|
84
|
+
}, a)) }, t.id);
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ r("line", {
|
|
87
|
+
x1: s.left,
|
|
88
|
+
y1: s.top + l,
|
|
89
|
+
x2: a - s.right,
|
|
90
|
+
y2: s.top + l,
|
|
91
|
+
stroke: "var(--ds-chart-axis)",
|
|
92
|
+
strokeWidth: "1"
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ r("line", {
|
|
95
|
+
x1: s.left,
|
|
96
|
+
y1: s.top,
|
|
97
|
+
x2: s.left,
|
|
98
|
+
y2: s.top + l,
|
|
99
|
+
stroke: "var(--ds-chart-axis)",
|
|
100
|
+
strokeWidth: "1"
|
|
101
|
+
}),
|
|
102
|
+
h && /* @__PURE__ */ r("text", {
|
|
103
|
+
x: s.left + c / 2,
|
|
104
|
+
y: 312,
|
|
105
|
+
textAnchor: "middle",
|
|
106
|
+
className: e.axisTitle,
|
|
107
|
+
children: h
|
|
108
|
+
}),
|
|
109
|
+
g && /* @__PURE__ */ r("text", {
|
|
110
|
+
x: 12,
|
|
111
|
+
y: s.top + l / 2,
|
|
112
|
+
textAnchor: "middle",
|
|
113
|
+
transform: `rotate(-90 12 ${s.top + l / 2})`,
|
|
114
|
+
className: e.axisTitle,
|
|
115
|
+
children: g
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
}), m.length > 1 && /* @__PURE__ */ r("ul", {
|
|
119
|
+
className: e.legend,
|
|
120
|
+
"aria-label": "Chart legend",
|
|
121
|
+
children: m.map((t, n) => /* @__PURE__ */ i("li", {
|
|
122
|
+
className: e.legendItem,
|
|
123
|
+
children: [/* @__PURE__ */ r("span", {
|
|
124
|
+
className: e.legendSwatch,
|
|
125
|
+
style: { background: p(t, n) },
|
|
126
|
+
"aria-hidden": "true"
|
|
127
|
+
}), /* @__PURE__ */ r("span", { children: t.label })]
|
|
128
|
+
}, t.id))
|
|
129
|
+
})]
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
m.displayName = "ScatterPlot";
|
|
133
|
+
//#endregion
|
|
134
|
+
export { m as ScatterPlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`_wrapper_kmbah_1`,t=`_svg_kmbah_6`,n=`_point_kmbah_12`,r=`_axisLabel_kmbah_21`,i=`_axisTitle_kmbah_27`,a=`_legend_kmbah_34`,o=`_legendItem_kmbah_45`,s=`_legendSwatch_kmbah_54`,c=`_empty_kmbah_61`,l={wrapper:e,svg:t,point:n,axisLabel:r,axisTitle:i,legend:a,legendItem:o,legendSwatch:s,empty:c};exports.axisLabel=r,exports.axisTitle=i,exports.default=l,exports.empty=c,exports.legend=a,exports.legendItem=o,exports.legendSwatch=s,exports.point=n,exports.svg=t,exports.wrapper=e;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/components/ScatterPlot/ScatterPlot.module.css
|
|
2
|
+
var e = "_wrapper_kmbah_1", t = "_svg_kmbah_6", n = "_point_kmbah_12", r = "_axisLabel_kmbah_21", i = "_axisTitle_kmbah_27", a = "_legend_kmbah_34", o = "_legendItem_kmbah_45", s = "_legendSwatch_kmbah_54", c = "_empty_kmbah_61", l = {
|
|
3
|
+
wrapper: e,
|
|
4
|
+
svg: t,
|
|
5
|
+
point: n,
|
|
6
|
+
axisLabel: r,
|
|
7
|
+
axisTitle: i,
|
|
8
|
+
legend: a,
|
|
9
|
+
legendItem: o,
|
|
10
|
+
legendSwatch: s,
|
|
11
|
+
empty: c
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { r as axisLabel, i as axisTitle, l as default, c as empty, a as legend, o as legendItem, s as legendSwatch, n as point, t as svg, e as wrapper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("../../primitives/SearchInput/SearchInput.cjs"),t=require("../../primitives/Label/Label.cjs"),n=require("../../primitives/Hint/Hint.cjs"),r=require("../../primitives/ErrorMessage/ErrorMessage.cjs"),i=require("../shared/useFieldIds.cjs"),a=require("./SearchField.module.css.cjs");let o=require("react"),s=require("react/jsx-runtime");var c=(0,o.forwardRef)(({label:o,hint:c,error:l,size:u=`md`,required:d=!1,disabled:f=!1,inputId:p,className:m,...h},g)=>{let{id:_,hintId:v,errorId:y,describedBy:b}=i.useFieldIds({inputId:p,hint:c,error:l});return(0,s.jsxs)(`div`,{className:[a.default.root,m??``].filter(Boolean).join(` `),children:[(0,s.jsx)(t.Label,{htmlFor:_,required:d,disabled:f,children:o}),(0,s.jsx)(`div`,{className:a.default.inputWrapper,children:(0,s.jsx)(e.SearchInput,{ref:g,id:_,size:u,hasError:!!l,disabled:f,required:d,"aria-required":d,"aria-describedby":b,...h})}),l?(0,s.jsx)(r.ErrorMessage,{id:y,children:l}):c?(0,s.jsx)(n.Hint,{id:v,children:c}):null]})});c.displayName=`SearchField`,exports.SearchField=c;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { SearchInput as e } from "../../primitives/SearchInput/SearchInput.js";
|
|
2
|
+
import { Label as t } from "../../primitives/Label/Label.js";
|
|
3
|
+
import { Hint as n } from "../../primitives/Hint/Hint.js";
|
|
4
|
+
import { ErrorMessage as r } from "../../primitives/ErrorMessage/ErrorMessage.js";
|
|
5
|
+
import { useFieldIds as i } from "../shared/useFieldIds.js";
|
|
6
|
+
import a from "./SearchField.module.css.js";
|
|
7
|
+
import { forwardRef as o } from "react";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/SearchField/SearchField.tsx
|
|
10
|
+
var l = o(({ label: o, hint: l, error: u, size: d = "md", required: f = !1, disabled: p = !1, inputId: m, className: h, ...g }, _) => {
|
|
11
|
+
let { id: v, hintId: y, errorId: b, describedBy: x } = i({
|
|
12
|
+
inputId: m,
|
|
13
|
+
hint: l,
|
|
14
|
+
error: u
|
|
15
|
+
});
|
|
16
|
+
return /* @__PURE__ */ c("div", {
|
|
17
|
+
className: [a.root, h ?? ""].filter(Boolean).join(" "),
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ s(t, {
|
|
20
|
+
htmlFor: v,
|
|
21
|
+
required: f,
|
|
22
|
+
disabled: p,
|
|
23
|
+
children: o
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ s("div", {
|
|
26
|
+
className: a.inputWrapper,
|
|
27
|
+
children: /* @__PURE__ */ s(e, {
|
|
28
|
+
ref: _,
|
|
29
|
+
id: v,
|
|
30
|
+
size: d,
|
|
31
|
+
hasError: !!u,
|
|
32
|
+
disabled: p,
|
|
33
|
+
required: f,
|
|
34
|
+
"aria-required": f,
|
|
35
|
+
"aria-describedby": x,
|
|
36
|
+
...g
|
|
37
|
+
})
|
|
38
|
+
}),
|
|
39
|
+
u ? /* @__PURE__ */ s(r, {
|
|
40
|
+
id: b,
|
|
41
|
+
children: u
|
|
42
|
+
}) : l ? /* @__PURE__ */ s(n, {
|
|
43
|
+
id: y,
|
|
44
|
+
children: l
|
|
45
|
+
}) : null
|
|
46
|
+
]
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
l.displayName = "SearchField";
|
|
50
|
+
//#endregion
|
|
51
|
+
export { l as SearchField };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`_root_123no_1`,t=`_inputWrapper_123no_7`,n={root:e,inputWrapper:t};exports.default=n,exports.inputWrapper=t,exports.root=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./Section.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r={0:`0`,1:`var(--ds-space-1)`,2:`var(--ds-space-2)`,3:`var(--ds-space-3)`,4:`var(--ds-space-4)`,5:`var(--ds-space-5)`,6:`var(--ds-space-6)`,8:`var(--ds-space-8)`,10:`var(--ds-space-10)`,12:`var(--ds-space-12)`,16:`var(--ds-space-16)`},i={none:e.default.paddingNone,sm:e.default.paddingSm,md:e.default.paddingMd,lg:e.default.paddingLg},a=(0,t.forwardRef)(({variant:t=`surface`,padding:a=`md`,gap:o=4,className:s,style:c,...l},u)=>{let d=[e.default.section,e.default[t],i[a],s??``].filter(Boolean).join(` `);return(0,n.jsx)(`div`,{ref:u,className:d,style:{gap:r[o],...c},...l})});a.displayName=`Section`,exports.Section=a;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import e from "./Section.module.css.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/Section/Section.tsx
|
|
5
|
+
var r = {
|
|
6
|
+
0: "0",
|
|
7
|
+
1: "var(--ds-space-1)",
|
|
8
|
+
2: "var(--ds-space-2)",
|
|
9
|
+
3: "var(--ds-space-3)",
|
|
10
|
+
4: "var(--ds-space-4)",
|
|
11
|
+
5: "var(--ds-space-5)",
|
|
12
|
+
6: "var(--ds-space-6)",
|
|
13
|
+
8: "var(--ds-space-8)",
|
|
14
|
+
10: "var(--ds-space-10)",
|
|
15
|
+
12: "var(--ds-space-12)",
|
|
16
|
+
16: "var(--ds-space-16)"
|
|
17
|
+
}, i = {
|
|
18
|
+
none: e.paddingNone,
|
|
19
|
+
sm: e.paddingSm,
|
|
20
|
+
md: e.paddingMd,
|
|
21
|
+
lg: e.paddingLg
|
|
22
|
+
}, a = t(({ variant: t = "surface", padding: a = "md", gap: o = 4, className: s, style: c, ...l }, u) => {
|
|
23
|
+
let d = [
|
|
24
|
+
e.section,
|
|
25
|
+
e[t],
|
|
26
|
+
i[a],
|
|
27
|
+
s ?? ""
|
|
28
|
+
].filter(Boolean).join(" ");
|
|
29
|
+
return /* @__PURE__ */ n("div", {
|
|
30
|
+
ref: u,
|
|
31
|
+
className: d,
|
|
32
|
+
style: {
|
|
33
|
+
gap: r[o],
|
|
34
|
+
...c
|
|
35
|
+
},
|
|
36
|
+
...l
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
a.displayName = "Section";
|
|
40
|
+
//#endregion
|
|
41
|
+
export { a as Section };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`_section_c3tl4_1`,t=`_surface_c3tl4_9`,n=`_flat_c3tl4_15`,r=`_paddingNone_c3tl4_21`,i=`_paddingSm_c3tl4_22`,a=`_paddingMd_c3tl4_23`,o=`_paddingLg_c3tl4_24`,s={section:e,surface:t,flat:n,paddingNone:r,paddingSm:i,paddingMd:a,paddingLg:o};exports.default=s,exports.flat=n,exports.paddingLg=o,exports.paddingMd=a,exports.paddingNone=r,exports.paddingSm=i,exports.section=e,exports.surface=t;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/components/Section/Section.module.css
|
|
2
|
+
var e = "_section_c3tl4_1", t = "_surface_c3tl4_9", n = "_flat_c3tl4_15", r = "_paddingNone_c3tl4_21", i = "_paddingSm_c3tl4_22", a = "_paddingMd_c3tl4_23", o = "_paddingLg_c3tl4_24", s = {
|
|
3
|
+
section: e,
|
|
4
|
+
surface: t,
|
|
5
|
+
flat: n,
|
|
6
|
+
paddingNone: r,
|
|
7
|
+
paddingSm: i,
|
|
8
|
+
paddingMd: a,
|
|
9
|
+
paddingLg: o
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { s as default, n as flat, o as paddingLg, a as paddingMd, r as paddingNone, i as paddingSm, e as section, t as surface };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("../../primitives/Select/Select.cjs"),t=require("../../primitives/Label/Label.cjs"),n=require("../../primitives/Hint/Hint.cjs"),r=require("../../primitives/ErrorMessage/ErrorMessage.cjs"),i=require("../shared/useFieldIds.cjs"),a=require("./SelectField.module.css.cjs");let o=require("react"),s=require("react/jsx-runtime");var c=(0,o.forwardRef)(({label:o,options:c,placeholder:l,hint:u,error:d,size:f=`md`,required:p=!1,disabled:m=!1,inputId:h,className:g,children:_,...v},y)=>{let{id:b,hintId:x,errorId:S,describedBy:C}=i.useFieldIds({inputId:h,hint:u,error:d});return(0,s.jsxs)(`div`,{className:[a.default.root,g??``].filter(Boolean).join(` `),children:[(0,s.jsx)(t.Label,{htmlFor:b,required:p,disabled:m,children:o}),(0,s.jsxs)(e.Select,{ref:y,id:b,size:f,hasError:!!d,disabled:m,required:p,"aria-required":p,"aria-describedby":C,...v,children:[l&&(0,s.jsx)(`option`,{value:``,disabled:!0,children:l}),c?c.map(e=>(0,s.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value)):_]}),d?(0,s.jsx)(r.ErrorMessage,{id:S,children:d}):u?(0,s.jsx)(n.Hint,{id:x,children:u}):null]})});c.displayName=`SelectField`,exports.SelectField=c;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Select as e } from "../../primitives/Select/Select.js";
|
|
2
|
+
import { Label as t } from "../../primitives/Label/Label.js";
|
|
3
|
+
import { Hint as n } from "../../primitives/Hint/Hint.js";
|
|
4
|
+
import { ErrorMessage as r } from "../../primitives/ErrorMessage/ErrorMessage.js";
|
|
5
|
+
import { useFieldIds as i } from "../shared/useFieldIds.js";
|
|
6
|
+
import a from "./SelectField.module.css.js";
|
|
7
|
+
import { forwardRef as o } from "react";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/SelectField/SelectField.tsx
|
|
10
|
+
var l = o(({ label: o, options: l, placeholder: u, hint: d, error: f, size: p = "md", required: m = !1, disabled: h = !1, inputId: g, className: _, children: v, ...y }, b) => {
|
|
11
|
+
let { id: x, hintId: S, errorId: C, describedBy: w } = i({
|
|
12
|
+
inputId: g,
|
|
13
|
+
hint: d,
|
|
14
|
+
error: f
|
|
15
|
+
});
|
|
16
|
+
return /* @__PURE__ */ c("div", {
|
|
17
|
+
className: [a.root, _ ?? ""].filter(Boolean).join(" "),
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ s(t, {
|
|
20
|
+
htmlFor: x,
|
|
21
|
+
required: m,
|
|
22
|
+
disabled: h,
|
|
23
|
+
children: o
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ c(e, {
|
|
26
|
+
ref: b,
|
|
27
|
+
id: x,
|
|
28
|
+
size: p,
|
|
29
|
+
hasError: !!f,
|
|
30
|
+
disabled: h,
|
|
31
|
+
required: m,
|
|
32
|
+
"aria-required": m,
|
|
33
|
+
"aria-describedby": w,
|
|
34
|
+
...y,
|
|
35
|
+
children: [u && /* @__PURE__ */ s("option", {
|
|
36
|
+
value: "",
|
|
37
|
+
disabled: !0,
|
|
38
|
+
children: u
|
|
39
|
+
}), l ? l.map((e) => /* @__PURE__ */ s("option", {
|
|
40
|
+
value: e.value,
|
|
41
|
+
disabled: e.disabled,
|
|
42
|
+
children: e.label
|
|
43
|
+
}, e.value)) : v]
|
|
44
|
+
}),
|
|
45
|
+
f ? /* @__PURE__ */ s(r, {
|
|
46
|
+
id: C,
|
|
47
|
+
children: f
|
|
48
|
+
}) : d ? /* @__PURE__ */ s(n, {
|
|
49
|
+
id: S,
|
|
50
|
+
children: d
|
|
51
|
+
}) : null
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
l.displayName = "SelectField";
|
|
56
|
+
//#endregion
|
|
57
|
+
export { l as SelectField };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`_root_1oeo1_1`,t={root:e};exports.default=t,exports.root=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./Sidebar.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("react-dom");var i=`a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])`,a=()=>(0,n.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M10 4L6 8L10 12`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}),o=()=>(0,n.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M6 4L10 8L6 12`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}),s=()=>(0,n.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z`})}),c=(0,t.forwardRef)(({items:c,logo:l,header:u,footer:d,"aria-label":f=`Sidebar navigation`,defaultCollapsed:p=!1,isCollapsed:m,onCollapsedChange:h,defaultMobileOpen:g=!1,isMobileOpen:_,onMobileOpenChange:v,className:y},b)=>{let[x,S]=(0,t.useState)(p),C=m??x,[w,T]=(0,t.useState)(g),E=_??w,[D]=(0,t.useState)(()=>typeof document<`u`),O=(0,t.useRef)(null),k=(0,t.useRef)(null);(0,t.useEffect)(()=>{if(window.matchMedia?.(`(max-width: 767px)`)?.matches??!1)return E?(k.current=document.activeElement,document.body.style.overflow=`hidden`,(O.current?.querySelector(i))?.focus()):(document.body.style.overflow=``,k.current?.focus(),k.current=null),()=>{document.body.style.overflow=``}},[E]);let A=(0,t.useCallback)(()=>{let e=!C;m===void 0&&S(e),h?.(e)},[C,m,h]),j=(0,t.useCallback)(()=>{_===void 0&&T(!1),v?.(!1)},[_,v]),M=(0,t.useCallback)(e=>{e.key===`Escape`&&j()},[j]),N=[e.default.sidebar,C?e.default.collapsed:``,E?e.default.mobileOpen:``,y??``].filter(Boolean).join(` `);return(0,n.jsxs)(`aside`,{ref:b,className:N,children:[D&&E&&(0,r.createPortal)((0,n.jsx)(`div`,{className:e.default.backdrop,onClick:j,"aria-hidden":`true`}),document.body),(0,n.jsxs)(`div`,{ref:O,className:e.default.panel,onKeyDown:M,tabIndex:-1,children:[(l||u)&&(0,n.jsxs)(`div`,{className:e.default.panelTop,children:[(0,n.jsxs)(`div`,{className:e.default.logoRow,children:[l&&(0,n.jsx)(`div`,{className:e.default.logoSlot,children:l}),u&&(0,n.jsx)(`div`,{className:e.default.headerContent,children:u})]}),(0,n.jsx)(`button`,{type:`button`,className:e.default.mobileCloseButton,onClick:j,"aria-label":`Close sidebar`,children:(0,n.jsx)(s,{})})]}),!l&&!u&&(0,n.jsx)(`div`,{className:e.default.mobileCloseRow,children:(0,n.jsx)(`button`,{type:`button`,className:e.default.mobileCloseButton,onClick:j,"aria-label":`Close sidebar`,children:(0,n.jsx)(s,{})})}),(0,n.jsx)(`nav`,{"aria-label":f,className:e.default.nav,children:(0,n.jsx)(`ul`,{className:e.default.navList,tabIndex:0,children:c.map(t=>(0,n.jsx)(`li`,{className:e.default.navItem,children:(0,n.jsxs)(`a`,{href:t.href,onClick:t.onClick,className:[e.default.navLink,t.isActive?e.default.navLinkActive:``].filter(Boolean).join(` `),"aria-current":t.isActive?`page`:void 0,"aria-label":t.icon&&C?t.label:void 0,title:t.icon&&C?t.label:void 0,children:[t.icon&&(0,n.jsx)(`span`,{className:e.default.navLinkIcon,"aria-hidden":`true`,children:t.icon}),(0,n.jsx)(`span`,{className:e.default.navLinkLabel,children:t.label})]})},t.key))})}),d&&(0,n.jsx)(`div`,{className:e.default.footer,children:d}),(0,n.jsx)(`button`,{type:`button`,className:e.default.collapseButton,onClick:A,"aria-label":C?`Expand sidebar`:`Collapse sidebar`,"aria-expanded":!C,children:C?(0,n.jsx)(o,{}):(0,n.jsx)(a,{})})]})]})});c.displayName=`Sidebar`,exports.Sidebar=c;
|