@tsiky/components-r19 1.4.1 → 1.4.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 (45) hide show
  1. package/dist/PeriodRange-1MjERs8N.cjs +26 -0
  2. package/dist/PeriodRange-6ksOSvHL.cjs +26 -0
  3. package/dist/PeriodRange-B53IzsZ7.cjs +26 -0
  4. package/dist/PeriodRange-B7crP6r3.js +256 -0
  5. package/dist/PeriodRange-BXSfe73g.js +256 -0
  6. package/dist/PeriodRange-Bk2LtI3D.cjs +26 -0
  7. package/dist/PeriodRange-BtgY7fFR.cjs +26 -0
  8. package/dist/PeriodRange-CfhneSbr.js +270 -0
  9. package/dist/PeriodRange-CjhgOtpd.js +270 -0
  10. package/dist/PeriodRange-DfVhlsw5.js +270 -0
  11. package/dist/assets/index-C-LOvVBi.js +986 -0
  12. package/dist/assets/index-D8b4DHJx.css +1 -0
  13. package/dist/chart.cjs.js +36 -36
  14. package/dist/chart.js +2047 -2035
  15. package/dist/components-r19.css +1 -1
  16. package/dist/index.cjs.js +1633 -1633
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.html +14 -0
  20. package/dist/index.js +19378 -14385
  21. package/dist/src/components/ChartContainer/ChartContainer.d.ts.map +1 -1
  22. package/dist/src/components/Charts/mixed-chart/MixedChart.d.ts +1 -0
  23. package/dist/src/components/Charts/mixed-chart/MixedChart.d.ts.map +1 -1
  24. package/dist/src/components/Header/Header.d.ts.map +1 -1
  25. package/dist/src/components/LegendFilter/LegendFilterSwitcherButton.d.ts +16 -0
  26. package/dist/src/components/LegendFilter/LegendFilterSwitcherButton.d.ts.map +1 -0
  27. package/dist/src/components/LegendFilter/context/useLegendFilterContext.d.ts +11 -0
  28. package/dist/src/components/LegendFilter/context/useLegendFilterContext.d.ts.map +1 -0
  29. package/dist/src/components/LegendFilter/index.d.ts +3 -0
  30. package/dist/src/components/LegendFilter/index.d.ts.map +1 -0
  31. package/dist/src/components/ShowDataSwitcher/ShowDataSwitcherButton.d.ts +6 -0
  32. package/dist/src/components/ShowDataSwitcher/ShowDataSwitcherButton.d.ts.map +1 -0
  33. package/dist/src/components/ShowDataSwitcher/context/useShowDataSwitcher.d.ts +11 -0
  34. package/dist/src/components/ShowDataSwitcher/context/useShowDataSwitcher.d.ts.map +1 -0
  35. package/dist/src/components/ShowDataSwitcher/index.d.ts +3 -0
  36. package/dist/src/components/ShowDataSwitcher/index.d.ts.map +1 -0
  37. package/dist/src/components/TrendItem/TrendItem.d.ts +1 -0
  38. package/dist/src/components/TrendItem/TrendItem.d.ts.map +1 -1
  39. package/dist/src/components/TrendList/TrendList.d.ts +18 -12
  40. package/dist/src/components/TrendList/TrendList.d.ts.map +1 -1
  41. package/dist/src/components/TrendList/index.d.ts +1 -0
  42. package/dist/src/components/TrendList/index.d.ts.map +1 -1
  43. package/dist/src/components/theme/index.d.ts +1 -0
  44. package/dist/src/components/theme/index.d.ts.map +1 -1
  45. package/package.json +2 -1
@@ -0,0 +1,26 @@
1
+ "use strict";const o=require("react"),a=require("react/jsx-runtime");/**
2
+ * @license lucide-react v0.540.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const k=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),q=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),w=e=>{const t=q(e);return t.charAt(0).toUpperCase()+t.slice(1)},y=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),I=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
7
+ * @license lucide-react v0.540.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */var P={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
12
+ * @license lucide-react v0.540.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const x=o.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:l="",children:d,iconNode:h,...m},i)=>o.createElement("svg",{ref:i,...P,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:y("lucide",l),...!d&&!I(m)&&{"aria-hidden":"true"},...m},[...h.map(([p,u])=>o.createElement(p,u)),...Array.isArray(d)?d:[d]]));/**
17
+ * @license lucide-react v0.540.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const C=(e,t)=>{const n=o.forwardRef(({className:r,...l},d)=>o.createElement(x,{ref:d,iconNode:t,className:y(`lucide-${k(w(e))}`,`lucide-${e}`,r),...l}));return n.displayName=w(e),n};/**
22
+ * @license lucide-react v0.540.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const E=[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]],R=C("move",E);var O=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function M(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var l=!1;try{l=this instanceof r}catch{}return l?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var l=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,l.get?l:{enumerable:!0,get:function(){return e[r]}})}),n}const A="_wrapper_nqjee_1",F="_label_nqjee_27",T="_labelText_nqjee_43",$="_calendarIcon_nqjee_51",H="_rangeRow_nqjee_61",D="_dateWrap_nqjee_77",V="_innerLabel_nqjee_93",z="_dateInput_nqjee_103",B="_sepWrap_nqjee_129",G="_separator_nqjee_143",U="_samplingWrap_nqjee_153",Z="_samplingLabel_nqjee_171",K="_samplingSelect_nqjee_179",s={wrapper:A,label:F,labelText:T,calendarIcon:$,rangeRow:H,dateWrap:D,innerLabel:V,dateInput:z,sepWrap:B,separator:G,samplingWrap:U,samplingLabel:Z,samplingSelect:K};function J({start:e="",end:t="",onChange:n,sampling:r="day",onSamplingChange:l,labels:d={},samplingOptions:h={},className:m=""}){const i={period:"Période",start:"Début",end:"Fin",sampling:"Échantillonnage",...d},p={hour:"Par heure",day:"Par jour",week:"Par semaine",month:"Par mois",...h},[u,j]=o.useState(e),[f,_]=o.useState(t),[N,b]=o.useState(r),g=o.useRef(null);o.useEffect(()=>j(e),[e]),o.useEffect(()=>_(t),[t]),o.useEffect(()=>b(r),[r]),o.useEffect(()=>{function c(W){const v=W.target;g.current&&v&&g.current.contains(v)}return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),o.useEffect(()=>{n?.({start:u,end:f})},[u,f,n]);const L=c=>{b(c),l?.(c)};return a.jsxs("div",{className:`${s.wrapper} ${m}`,ref:g,children:[a.jsxs("label",{className:s.label,"aria-hidden":!0,children:[a.jsxs("svg",{className:s.calendarIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":!0,children:[a.jsx("path",{fill:"currentColor",d:"M7 10h5v5H7z",opacity:"0"}),a.jsx("path",{fill:"currentColor",d:"M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 00-2 2v12a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2zM5 20V9h14l.002 11H5z"})]}),a.jsx("span",{className:s.labelText,children:i.period})]}),a.jsxs("div",{className:s.rangeRow,children:[a.jsxs("div",{className:s.dateWrap,children:[a.jsx("label",{className:s.innerLabel,htmlFor:"period-from",children:i.start}),a.jsx("input",{id:"period-from",className:s.dateInput,type:"date",value:u,onChange:c=>j(c.target.value),"aria-label":i.start})]}),a.jsx("div",{className:s.sepWrap,"aria-hidden":!0,children:a.jsx("span",{className:s.separator,children:"—"})}),a.jsxs("div",{className:s.dateWrap,children:[a.jsx("label",{className:s.innerLabel,htmlFor:"period-to",children:i.end}),a.jsx("div",{className:s.inputWithIcon,children:a.jsx("input",{id:"period-to",className:s.dateInput,type:"date",value:f,onChange:c=>_(c.target.value),"aria-label":i.end})})]}),a.jsxs("div",{className:s.samplingWrap,children:[a.jsx("label",{className:s.samplingLabel,htmlFor:"period-sampling",children:i.sampling}),a.jsxs("select",{id:"period-sampling",className:s.samplingSelect,value:N,onChange:c=>L(c.target.value),"aria-label":i.sampling,children:[a.jsx("option",{value:"hour",children:p.hour}),a.jsx("option",{value:"day",children:p.day}),a.jsx("option",{value:"week",children:p.week}),a.jsx("option",{value:"month",children:p.month})]})]})]})]})}exports.Icon=x;exports.Move=R;exports.PeriodRange=J;exports.commonjsGlobal=O;exports.createLucideIcon=C;exports.getAugmentedNamespace=M;exports.getDefaultExportFromCjs=S;
@@ -0,0 +1,270 @@
1
+ import { forwardRef as L, createElement as v, useState as b, useRef as q, useEffect as m } from "react";
2
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
3
+ /**
4
+ * @license lucide-react v0.540.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+ const O = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), M = (e) => e.replace(
10
+ /^([A-Z])|[\s-_]+(\w)/g,
11
+ (a, t, n) => n ? n.toUpperCase() : t.toLowerCase()
12
+ ), N = (e) => {
13
+ const a = M(e);
14
+ return a.charAt(0).toUpperCase() + a.slice(1);
15
+ }, W = (...e) => e.filter((a, t, n) => !!a && a.trim() !== "" && n.indexOf(a) === t).join(" ").trim(), x = (e) => {
16
+ for (const a in e)
17
+ if (a.startsWith("aria-") || a === "role" || a === "title")
18
+ return !0;
19
+ };
20
+ /**
21
+ * @license lucide-react v0.540.0 - ISC
22
+ *
23
+ * This source code is licensed under the ISC license.
24
+ * See the LICENSE file in the root directory of this source tree.
25
+ */
26
+ var R = {
27
+ xmlns: "http://www.w3.org/2000/svg",
28
+ width: 24,
29
+ height: 24,
30
+ viewBox: "0 0 24 24",
31
+ fill: "none",
32
+ stroke: "currentColor",
33
+ strokeWidth: 2,
34
+ strokeLinecap: "round",
35
+ strokeLinejoin: "round"
36
+ };
37
+ /**
38
+ * @license lucide-react v0.540.0 - ISC
39
+ *
40
+ * This source code is licensed under the ISC license.
41
+ * See the LICENSE file in the root directory of this source tree.
42
+ */
43
+ const S = L(
44
+ ({
45
+ color: e = "currentColor",
46
+ size: a = 24,
47
+ strokeWidth: t = 2,
48
+ absoluteStrokeWidth: n,
49
+ className: l = "",
50
+ children: c,
51
+ iconNode: g,
52
+ ...h
53
+ }, i) => v(
54
+ "svg",
55
+ {
56
+ ref: i,
57
+ ...R,
58
+ width: a,
59
+ height: a,
60
+ stroke: e,
61
+ strokeWidth: n ? Number(t) * 24 / Number(a) : t,
62
+ className: W("lucide", l),
63
+ ...!c && !x(h) && { "aria-hidden": "true" },
64
+ ...h
65
+ },
66
+ [
67
+ ...g.map(([d, u]) => v(d, u)),
68
+ ...Array.isArray(c) ? c : [c]
69
+ ]
70
+ )
71
+ );
72
+ /**
73
+ * @license lucide-react v0.540.0 - ISC
74
+ *
75
+ * This source code is licensed under the ISC license.
76
+ * See the LICENSE file in the root directory of this source tree.
77
+ */
78
+ const A = (e, a) => {
79
+ const t = L(
80
+ ({ className: n, ...l }, c) => v(S, {
81
+ ref: c,
82
+ iconNode: a,
83
+ className: W(
84
+ `lucide-${O(N(e))}`,
85
+ `lucide-${e}`,
86
+ n
87
+ ),
88
+ ...l
89
+ })
90
+ );
91
+ return t.displayName = N(e), t;
92
+ };
93
+ /**
94
+ * @license lucide-react v0.540.0 - ISC
95
+ *
96
+ * This source code is licensed under the ISC license.
97
+ * See the LICENSE file in the root directory of this source tree.
98
+ */
99
+ const T = [
100
+ ["path", { d: "M12 2v20", key: "t6zp3m" }],
101
+ ["path", { d: "m15 19-3 3-3-3", key: "11eu04" }],
102
+ ["path", { d: "m19 9 3 3-3 3", key: "1mg7y2" }],
103
+ ["path", { d: "M2 12h20", key: "9i4pu4" }],
104
+ ["path", { d: "m5 9-3 3 3 3", key: "j64kie" }],
105
+ ["path", { d: "m9 5 3-3 3 3", key: "l8vdw6" }]
106
+ ], Y = A("move", T);
107
+ var ee = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
108
+ function ae(e) {
109
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
110
+ }
111
+ function te(e) {
112
+ if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
113
+ var a = e.default;
114
+ if (typeof a == "function") {
115
+ var t = function n() {
116
+ var l = !1;
117
+ try {
118
+ l = this instanceof n;
119
+ } catch {
120
+ }
121
+ return l ? Reflect.construct(a, arguments, this.constructor) : a.apply(this, arguments);
122
+ };
123
+ t.prototype = a.prototype;
124
+ } else t = {};
125
+ return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(n) {
126
+ var l = Object.getOwnPropertyDescriptor(e, n);
127
+ Object.defineProperty(t, n, l.get ? l : {
128
+ enumerable: !0,
129
+ get: function() {
130
+ return e[n];
131
+ }
132
+ });
133
+ }), t;
134
+ }
135
+ const E = "_wrapper_nqjee_1", F = "_label_nqjee_27", $ = "_labelText_nqjee_43", H = "_calendarIcon_nqjee_51", V = "_rangeRow_nqjee_61", z = "_dateWrap_nqjee_77", B = "_innerLabel_nqjee_93", D = "_dateInput_nqjee_103", U = "_sepWrap_nqjee_129", Z = "_separator_nqjee_143", G = "_samplingWrap_nqjee_153", K = "_samplingLabel_nqjee_171", J = "_samplingSelect_nqjee_179", r = {
136
+ wrapper: E,
137
+ label: F,
138
+ labelText: $,
139
+ calendarIcon: H,
140
+ rangeRow: V,
141
+ dateWrap: z,
142
+ innerLabel: B,
143
+ dateInput: D,
144
+ sepWrap: U,
145
+ separator: Z,
146
+ samplingWrap: G,
147
+ samplingLabel: K,
148
+ samplingSelect: J
149
+ };
150
+ function ne({
151
+ start: e = "",
152
+ end: a = "",
153
+ onChange: t,
154
+ sampling: n = "day",
155
+ onSamplingChange: l,
156
+ labels: c = {},
157
+ samplingOptions: g = {},
158
+ className: h = ""
159
+ }) {
160
+ const i = {
161
+ period: "Période",
162
+ start: "Début",
163
+ end: "Fin",
164
+ sampling: "Échantillonnage",
165
+ ...c
166
+ }, d = {
167
+ hour: "Par heure",
168
+ day: "Par jour",
169
+ week: "Par semaine",
170
+ month: "Par mois",
171
+ ...g
172
+ }, [u, w] = b(e), [f, y] = b(a), [k, j] = b(n), _ = q(null);
173
+ m(() => w(e), [e]), m(() => y(a), [a]), m(() => j(n), [n]), m(() => {
174
+ function s(P) {
175
+ const C = P.target;
176
+ _.current && C && _.current.contains(C);
177
+ }
178
+ return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
179
+ }, []), m(() => {
180
+ t?.({ start: u, end: f });
181
+ }, [u, f, t]);
182
+ const I = (s) => {
183
+ j(s), l?.(s);
184
+ };
185
+ return /* @__PURE__ */ p("div", { className: `${r.wrapper} ${h}`, ref: _, children: [
186
+ /* @__PURE__ */ p("label", { className: r.label, "aria-hidden": !0, children: [
187
+ /* @__PURE__ */ p(
188
+ "svg",
189
+ {
190
+ className: r.calendarIcon,
191
+ xmlns: "http://www.w3.org/2000/svg",
192
+ viewBox: "0 0 24 24",
193
+ width: "18",
194
+ height: "18",
195
+ "aria-hidden": !0,
196
+ children: [
197
+ /* @__PURE__ */ o("path", { fill: "currentColor", d: "M7 10h5v5H7z", opacity: "0" }),
198
+ /* @__PURE__ */ o(
199
+ "path",
200
+ {
201
+ fill: "currentColor",
202
+ d: "M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 00-2 2v12a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2zM5 20V9h14l.002 11H5z"
203
+ }
204
+ )
205
+ ]
206
+ }
207
+ ),
208
+ /* @__PURE__ */ o("span", { className: r.labelText, children: i.period })
209
+ ] }),
210
+ /* @__PURE__ */ p("div", { className: r.rangeRow, children: [
211
+ /* @__PURE__ */ p("div", { className: r.dateWrap, children: [
212
+ /* @__PURE__ */ o("label", { className: r.innerLabel, htmlFor: "period-from", children: i.start }),
213
+ /* @__PURE__ */ o(
214
+ "input",
215
+ {
216
+ id: "period-from",
217
+ className: r.dateInput,
218
+ type: "date",
219
+ value: u,
220
+ onChange: (s) => w(s.target.value),
221
+ "aria-label": i.start
222
+ }
223
+ )
224
+ ] }),
225
+ /* @__PURE__ */ o("div", { className: r.sepWrap, "aria-hidden": !0, children: /* @__PURE__ */ o("span", { className: r.separator, children: "—" }) }),
226
+ /* @__PURE__ */ p("div", { className: r.dateWrap, children: [
227
+ /* @__PURE__ */ o("label", { className: r.innerLabel, htmlFor: "period-to", children: i.end }),
228
+ /* @__PURE__ */ o("div", { className: r.inputWithIcon, children: /* @__PURE__ */ o(
229
+ "input",
230
+ {
231
+ id: "period-to",
232
+ className: r.dateInput,
233
+ type: "date",
234
+ value: f,
235
+ onChange: (s) => y(s.target.value),
236
+ "aria-label": i.end
237
+ }
238
+ ) })
239
+ ] }),
240
+ /* @__PURE__ */ p("div", { className: r.samplingWrap, children: [
241
+ /* @__PURE__ */ o("label", { className: r.samplingLabel, htmlFor: "period-sampling", children: i.sampling }),
242
+ /* @__PURE__ */ p(
243
+ "select",
244
+ {
245
+ id: "period-sampling",
246
+ className: r.samplingSelect,
247
+ value: k,
248
+ onChange: (s) => I(s.target.value),
249
+ "aria-label": i.sampling,
250
+ children: [
251
+ /* @__PURE__ */ o("option", { value: "hour", children: d.hour }),
252
+ /* @__PURE__ */ o("option", { value: "day", children: d.day }),
253
+ /* @__PURE__ */ o("option", { value: "week", children: d.week }),
254
+ /* @__PURE__ */ o("option", { value: "month", children: d.month })
255
+ ]
256
+ }
257
+ )
258
+ ] })
259
+ ] })
260
+ ] });
261
+ }
262
+ export {
263
+ S as I,
264
+ Y as M,
265
+ ne as P,
266
+ ee as a,
267
+ te as b,
268
+ A as c,
269
+ ae as g
270
+ };
@@ -0,0 +1,270 @@
1
+ import { forwardRef as W, createElement as v, useState as b, useRef as O, useEffect as m } from "react";
2
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
3
+ /**
4
+ * @license lucide-react v0.540.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+ const M = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), x = (e) => e.replace(
10
+ /^([A-Z])|[\s-_]+(\w)/g,
11
+ (a, t, r) => r ? r.toUpperCase() : t.toLowerCase()
12
+ ), L = (e) => {
13
+ const a = x(e);
14
+ return a.charAt(0).toUpperCase() + a.slice(1);
15
+ }, k = (...e) => e.filter((a, t, r) => !!a && a.trim() !== "" && r.indexOf(a) === t).join(" ").trim(), R = (e) => {
16
+ for (const a in e)
17
+ if (a.startsWith("aria-") || a === "role" || a === "title")
18
+ return !0;
19
+ };
20
+ /**
21
+ * @license lucide-react v0.540.0 - ISC
22
+ *
23
+ * This source code is licensed under the ISC license.
24
+ * See the LICENSE file in the root directory of this source tree.
25
+ */
26
+ var S = {
27
+ xmlns: "http://www.w3.org/2000/svg",
28
+ width: 24,
29
+ height: 24,
30
+ viewBox: "0 0 24 24",
31
+ fill: "none",
32
+ stroke: "currentColor",
33
+ strokeWidth: 2,
34
+ strokeLinecap: "round",
35
+ strokeLinejoin: "round"
36
+ };
37
+ /**
38
+ * @license lucide-react v0.540.0 - ISC
39
+ *
40
+ * This source code is licensed under the ISC license.
41
+ * See the LICENSE file in the root directory of this source tree.
42
+ */
43
+ const A = W(
44
+ ({
45
+ color: e = "currentColor",
46
+ size: a = 24,
47
+ strokeWidth: t = 2,
48
+ absoluteStrokeWidth: r,
49
+ className: l = "",
50
+ children: i,
51
+ iconNode: g,
52
+ ...h
53
+ }, c) => v(
54
+ "svg",
55
+ {
56
+ ref: c,
57
+ ...S,
58
+ width: a,
59
+ height: a,
60
+ stroke: e,
61
+ strokeWidth: r ? Number(t) * 24 / Number(a) : t,
62
+ className: k("lucide", l),
63
+ ...!i && !R(h) && { "aria-hidden": "true" },
64
+ ...h
65
+ },
66
+ [
67
+ ...g.map(([d, u]) => v(d, u)),
68
+ ...Array.isArray(i) ? i : [i]
69
+ ]
70
+ )
71
+ );
72
+ /**
73
+ * @license lucide-react v0.540.0 - ISC
74
+ *
75
+ * This source code is licensed under the ISC license.
76
+ * See the LICENSE file in the root directory of this source tree.
77
+ */
78
+ const T = (e, a) => {
79
+ const t = W(
80
+ ({ className: r, ...l }, i) => v(A, {
81
+ ref: i,
82
+ iconNode: a,
83
+ className: k(
84
+ `lucide-${M(L(e))}`,
85
+ `lucide-${e}`,
86
+ r
87
+ ),
88
+ ...l
89
+ })
90
+ );
91
+ return t.displayName = L(e), t;
92
+ };
93
+ /**
94
+ * @license lucide-react v0.540.0 - ISC
95
+ *
96
+ * This source code is licensed under the ISC license.
97
+ * See the LICENSE file in the root directory of this source tree.
98
+ */
99
+ const E = [
100
+ ["path", { d: "M12 2v20", key: "t6zp3m" }],
101
+ ["path", { d: "m15 19-3 3-3-3", key: "11eu04" }],
102
+ ["path", { d: "m19 9 3 3-3 3", key: "1mg7y2" }],
103
+ ["path", { d: "M2 12h20", key: "9i4pu4" }],
104
+ ["path", { d: "m5 9-3 3 3 3", key: "j64kie" }],
105
+ ["path", { d: "m9 5 3-3 3 3", key: "l8vdw6" }]
106
+ ], Y = T("move", E);
107
+ var ee = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
108
+ function ae(e) {
109
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
110
+ }
111
+ function te(e) {
112
+ if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
113
+ var a = e.default;
114
+ if (typeof a == "function") {
115
+ var t = function r() {
116
+ var l = !1;
117
+ try {
118
+ l = this instanceof r;
119
+ } catch {
120
+ }
121
+ return l ? Reflect.construct(a, arguments, this.constructor) : a.apply(this, arguments);
122
+ };
123
+ t.prototype = a.prototype;
124
+ } else t = {};
125
+ return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
126
+ var l = Object.getOwnPropertyDescriptor(e, r);
127
+ Object.defineProperty(t, r, l.get ? l : {
128
+ enumerable: !0,
129
+ get: function() {
130
+ return e[r];
131
+ }
132
+ });
133
+ }), t;
134
+ }
135
+ const F = "_wrapper_1c0o1_1", $ = "_label_1c0o1_14", H = "_labelText_1c0o1_23", V = "_calendarIcon_1c0o1_28", z = "_rangeRow_1c0o1_33", B = "_dateWrap_1c0o1_41", D = "_innerLabel_1c0o1_49", U = "_dateInput_1c0o1_54", Z = "_sepWrap_1c0o1_68", G = "_separator_1c0o1_75", K = "_samplingWrap_1c0o1_80", q = "_samplingLabel_1c0o1_89", J = "_samplingSelect_1c0o1_93", n = {
136
+ wrapper: F,
137
+ label: $,
138
+ labelText: H,
139
+ calendarIcon: V,
140
+ rangeRow: z,
141
+ dateWrap: B,
142
+ innerLabel: D,
143
+ dateInput: U,
144
+ sepWrap: Z,
145
+ separator: G,
146
+ samplingWrap: K,
147
+ samplingLabel: q,
148
+ samplingSelect: J
149
+ };
150
+ function re({
151
+ start: e = "",
152
+ end: a = "",
153
+ onChange: t,
154
+ sampling: r = "day",
155
+ onSamplingChange: l,
156
+ labels: i = {},
157
+ samplingOptions: g = {},
158
+ className: h = ""
159
+ }) {
160
+ const c = {
161
+ period: "Période",
162
+ start: "Début",
163
+ end: "Fin",
164
+ sampling: "Échantillonnage",
165
+ ...i
166
+ }, d = {
167
+ hour: "Par heure",
168
+ day: "Par jour",
169
+ week: "Par semaine",
170
+ month: "Par mois",
171
+ ...g
172
+ }, [u, w] = b(e), [f, y] = b(a), [j, C] = b(r), _ = O(null);
173
+ m(() => w(e), [e]), m(() => y(a), [a]), m(() => C(r), [r]), m(() => {
174
+ function s(P) {
175
+ const N = P.target;
176
+ _.current && N && _.current.contains(N);
177
+ }
178
+ return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
179
+ }, []), m(() => {
180
+ t?.({ start: u, end: f });
181
+ }, [u, f, t]);
182
+ const I = (s) => {
183
+ C(s), l?.(s);
184
+ };
185
+ return /* @__PURE__ */ p("div", { className: `${n.wrapper} ${h}`, ref: _, children: [
186
+ /* @__PURE__ */ p("label", { className: n.label, "aria-hidden": !0, children: [
187
+ /* @__PURE__ */ p(
188
+ "svg",
189
+ {
190
+ className: n.calendarIcon,
191
+ xmlns: "http://www.w3.org/2000/svg",
192
+ viewBox: "0 0 24 24",
193
+ width: "18",
194
+ height: "18",
195
+ "aria-hidden": !0,
196
+ children: [
197
+ /* @__PURE__ */ o("path", { fill: "currentColor", d: "M7 10h5v5H7z", opacity: "0" }),
198
+ /* @__PURE__ */ o(
199
+ "path",
200
+ {
201
+ fill: "currentColor",
202
+ d: "M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 00-2 2v12a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2zM5 20V9h14l.002 11H5z"
203
+ }
204
+ )
205
+ ]
206
+ }
207
+ ),
208
+ /* @__PURE__ */ o("span", { className: n.labelText, children: c.period })
209
+ ] }),
210
+ /* @__PURE__ */ p("div", { className: n.rangeRow, children: [
211
+ /* @__PURE__ */ p("div", { className: n.dateWrap, children: [
212
+ /* @__PURE__ */ o("label", { className: n.innerLabel, htmlFor: "period-from", children: c.start }),
213
+ /* @__PURE__ */ o(
214
+ "input",
215
+ {
216
+ id: "period-from",
217
+ className: n.dateInput,
218
+ type: "date",
219
+ value: u,
220
+ onChange: (s) => w(s.target.value),
221
+ "aria-label": c.start
222
+ }
223
+ )
224
+ ] }),
225
+ /* @__PURE__ */ o("div", { className: n.sepWrap, "aria-hidden": !0, children: /* @__PURE__ */ o("span", { className: n.separator, children: "—" }) }),
226
+ /* @__PURE__ */ p("div", { className: n.dateWrap, children: [
227
+ /* @__PURE__ */ o("label", { className: n.innerLabel, htmlFor: "period-to", children: c.end }),
228
+ /* @__PURE__ */ o("div", { className: n.inputWithIcon, children: /* @__PURE__ */ o(
229
+ "input",
230
+ {
231
+ id: "period-to",
232
+ className: n.dateInput,
233
+ type: "date",
234
+ value: f,
235
+ onChange: (s) => y(s.target.value),
236
+ "aria-label": c.end
237
+ }
238
+ ) })
239
+ ] }),
240
+ /* @__PURE__ */ p("div", { className: n.samplingWrap, children: [
241
+ /* @__PURE__ */ o("label", { className: n.samplingLabel, htmlFor: "period-sampling", children: c.sampling }),
242
+ /* @__PURE__ */ p(
243
+ "select",
244
+ {
245
+ id: "period-sampling",
246
+ className: n.samplingSelect,
247
+ value: j,
248
+ onChange: (s) => I(s.target.value),
249
+ "aria-label": c.sampling,
250
+ children: [
251
+ /* @__PURE__ */ o("option", { value: "hour", children: d.hour }),
252
+ /* @__PURE__ */ o("option", { value: "day", children: d.day }),
253
+ /* @__PURE__ */ o("option", { value: "week", children: d.week }),
254
+ /* @__PURE__ */ o("option", { value: "month", children: d.month })
255
+ ]
256
+ }
257
+ )
258
+ ] })
259
+ ] })
260
+ ] });
261
+ }
262
+ export {
263
+ A as I,
264
+ Y as M,
265
+ re as P,
266
+ ee as a,
267
+ te as b,
268
+ T as c,
269
+ ae as g
270
+ };