@tsiky/components-r19 1.3.3 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 C=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),N=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),b=e=>{const t=N(e);return t.charAt(0).toUpperCase()+t.slice(1)},j=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),L=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 W={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 v=o.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:l="",children:i,iconNode:d,...p},u)=>o.createElement("svg",{ref:u,...W,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:j("lucide",l),...!i&&!L(p)&&{"aria-hidden":"true"},...p},[...d.map(([f,m])=>o.createElement(f,m)),...Array.isArray(i)?i:[i]]));/**
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 w=(e,t)=>{const r=o.forwardRef(({className:n,...l},i)=>o.createElement(v,{ref:i,iconNode:t,className:j(`lucide-${C(b(e))}`,`lucide-${e}`,n),...l}));return r.displayName=b(e),r};/**
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 q=[["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"}]],I=w("move",q);var P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function R(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var l=!1;try{l=this instanceof n}catch{}return l?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}),r}const k="_wrapper_ffq96_1",O="_label_ffq96_14",M="_labelText_ffq96_23",S="_calendarIcon_ffq96_28",A="_rangeRow_ffq96_33",F="_dateWrap_ffq96_41",T="_innerLabel_ffq96_49",D="_dateInput_ffq96_55",$="_sepWrap_ffq96_69",H="_separator_ffq96_76",V="_samplingWrap_ffq96_82",z="_samplingLabel_ffq96_91",B="_samplingSelect_ffq96_96",s={wrapper:k,label:O,labelText:M,calendarIcon:S,rangeRow:A,dateWrap:F,innerLabel:T,dateInput:D,sepWrap:$,separator:H,samplingWrap:V,samplingLabel:z,samplingSelect:B};function G({start:e="",end:t="",onChange:r,sampling:n="Par jour",onSamplingChange:l,className:i=""}){const[d,p]=o.useState(e),[u,f]=o.useState(t),[m,g]=o.useState(n),h=o.useRef(null);o.useEffect(()=>p(e),[e]),o.useEffect(()=>f(t),[t]),o.useEffect(()=>g(n),[n]),o.useEffect(()=>{function c(x){const _=x.target;h.current&&_&&h.current.contains(_)}return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),o.useEffect(()=>{r?.({start:d,end:u})},[d,u,r]);const y=c=>{g(c),l?.(c)};return a.jsxs("div",{className:`${s.wrapper} ${i}`,ref:h,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:"Période"})]}),a.jsxs("div",{className:s.rangeRow,children:[a.jsxs("div",{className:s.dateWrap,children:[a.jsx("label",{className:s.innerLabel,htmlFor:"period-from",children:"Début"}),a.jsx("input",{id:"period-from",className:s.dateInput,type:"date",value:d,onChange:c=>p(c.target.value),"aria-label":"Date de début"})]}),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:"Fin"}),a.jsx("div",{className:s.inputWithIcon,children:a.jsx("input",{id:"period-to",className:s.dateInput,type:"date",value:u,onChange:c=>f(c.target.value),"aria-label":"Date de fin"})})]}),a.jsxs("div",{className:s.samplingWrap,children:[a.jsx("label",{className:s.samplingLabel,htmlFor:"period-sampling",children:"Échantillonnage"}),a.jsxs("select",{id:"period-sampling",className:s.samplingSelect,value:m,onChange:c=>y(c.target.value),"aria-label":"Échantillonnage",children:[a.jsx("option",{children:"Par jour"}),a.jsx("option",{children:"Par semaine"}),a.jsx("option",{children:"Par mois"}),a.jsx("option",{children:"Par heure"})]})]})]})]})}exports.Icon=v;exports.Move=I;exports.PeriodRange=G;exports.commonjsGlobal=P;exports.createLucideIcon=w;exports.getAugmentedNamespace=R;exports.getDefaultExportFromCjs=E;
@@ -1,4 +1,4 @@
1
- import { forwardRef as C, createElement as _, useState as w, useRef as W, useEffect as m } from "react";
1
+ import { forwardRef as C, createElement as b, useState as _, useRef as j, useEffect as f } from "react";
2
2
  import { jsxs as c, jsx as o } from "react/jsx-runtime";
3
3
  /**
4
4
  * @license lucide-react v0.540.0 - ISC
@@ -6,13 +6,13 @@ import { jsxs as c, jsx as o } from "react/jsx-runtime";
6
6
  * This source code is licensed under the ISC license.
7
7
  * See the LICENSE file in the root directory of this source tree.
8
8
  */
9
- const j = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), P = (e) => e.replace(
9
+ const P = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), I = (e) => e.replace(
10
10
  /^([A-Z])|[\s-_]+(\w)/g,
11
11
  (a, t, r) => r ? r.toUpperCase() : t.toLowerCase()
12
12
  ), y = (e) => {
13
- const a = P(e);
13
+ const a = I(e);
14
14
  return a.charAt(0).toUpperCase() + a.slice(1);
15
- }, N = (...e) => e.filter((a, t, r) => !!a && a.trim() !== "" && r.indexOf(a) === t).join(" ").trim(), I = (e) => {
15
+ }, N = (...e) => e.filter((a, t, r) => !!a && a.trim() !== "" && r.indexOf(a) === t).join(" ").trim(), q = (e) => {
16
16
  for (const a in e)
17
17
  if (a.startsWith("aria-") || a === "role" || a === "title")
18
18
  return !0;
@@ -50,7 +50,7 @@ const O = C(
50
50
  children: i,
51
51
  iconNode: p,
52
52
  ...d
53
- }, u) => _(
53
+ }, u) => b(
54
54
  "svg",
55
55
  {
56
56
  ref: u,
@@ -60,11 +60,11 @@ const O = C(
60
60
  stroke: e,
61
61
  strokeWidth: r ? Number(t) * 24 / Number(a) : t,
62
62
  className: N("lucide", l),
63
- ...!i && !I(d) && { "aria-hidden": "true" },
63
+ ...!i && !q(d) && { "aria-hidden": "true" },
64
64
  ...d
65
65
  },
66
66
  [
67
- ...p.map(([h, f]) => _(h, f)),
67
+ ...p.map(([m, h]) => b(m, h)),
68
68
  ...Array.isArray(i) ? i : [i]
69
69
  ]
70
70
  )
@@ -77,11 +77,11 @@ const O = C(
77
77
  */
78
78
  const M = (e, a) => {
79
79
  const t = C(
80
- ({ className: r, ...l }, i) => _(O, {
80
+ ({ className: r, ...l }, i) => b(O, {
81
81
  ref: i,
82
82
  iconNode: a,
83
83
  className: N(
84
- `lucide-${j(y(e))}`,
84
+ `lucide-${P(y(e))}`,
85
85
  `lucide-${e}`,
86
86
  r
87
87
  ),
@@ -103,7 +103,7 @@ const x = [
103
103
  ["path", { d: "M2 12h20", key: "9i4pu4" }],
104
104
  ["path", { d: "m5 9-3 3 3 3", key: "j64kie" }],
105
105
  ["path", { d: "m9 5 3-3 3 3", key: "l8vdw6" }]
106
- ], q = M("move", x);
106
+ ], K = M("move", x);
107
107
  var J = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
108
108
  function Q(e) {
109
109
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -132,7 +132,7 @@ function X(e) {
132
132
  });
133
133
  }), t;
134
134
  }
135
- const R = "_wrapper_urwzi_1", A = "_label_urwzi_27", S = "_labelText_urwzi_45", T = "_calendarIcon_urwzi_55", E = "_rangeRow_urwzi_65", F = "_dateWrap_urwzi_81", $ = "_innerLabel_urwzi_97", D = "_dateInput_urwzi_109", H = "_sepWrap_urwzi_137", V = "_separator_urwzi_151", B = "_samplingWrap_urwzi_163", U = "_samplingLabel_urwzi_181", Z = "_samplingSelect_urwzi_191", n = {
135
+ const R = "_wrapper_ffq96_1", A = "_label_ffq96_14", S = "_labelText_ffq96_23", T = "_calendarIcon_ffq96_28", E = "_rangeRow_ffq96_33", F = "_dateWrap_ffq96_41", $ = "_innerLabel_ffq96_49", D = "_dateInput_ffq96_55", H = "_sepWrap_ffq96_69", V = "_separator_ffq96_76", z = "_samplingWrap_ffq96_82", B = "_samplingLabel_ffq96_91", U = "_samplingSelect_ffq96_96", n = {
136
136
  wrapper: R,
137
137
  label: A,
138
138
  labelText: S,
@@ -143,9 +143,9 @@ const R = "_wrapper_urwzi_1", A = "_label_urwzi_27", S = "_labelText_urwzi_45",
143
143
  dateInput: D,
144
144
  sepWrap: H,
145
145
  separator: V,
146
- samplingWrap: B,
147
- samplingLabel: U,
148
- samplingSelect: Z
146
+ samplingWrap: z,
147
+ samplingLabel: B,
148
+ samplingSelect: U
149
149
  };
150
150
  function Y({
151
151
  start: e = "",
@@ -155,18 +155,18 @@ function Y({
155
155
  onSamplingChange: l,
156
156
  className: i = ""
157
157
  }) {
158
- const [p, d] = w(e), [u, h] = w(a), [f, b] = w(r), g = W(null);
159
- m(() => d(e), [e]), m(() => h(a), [a]), m(() => b(r), [r]), m(() => {
160
- function s(z) {
161
- const v = z.target;
162
- g.current && v && g.current.contains(v);
158
+ const [p, d] = _(e), [u, m] = _(a), [h, v] = _(r), g = j(null);
159
+ f(() => d(e), [e]), f(() => m(a), [a]), f(() => v(r), [r]), f(() => {
160
+ function s(W) {
161
+ const w = W.target;
162
+ g.current && w && g.current.contains(w);
163
163
  }
164
164
  return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
165
- }, []), m(() => {
165
+ }, []), f(() => {
166
166
  t?.({ start: p, end: u });
167
167
  }, [p, u, t]);
168
168
  const L = (s) => {
169
- b(s), l?.(s);
169
+ v(s), l?.(s);
170
170
  };
171
171
  return /* @__PURE__ */ c("div", { className: `${n.wrapper} ${i}`, ref: g, children: [
172
172
  /* @__PURE__ */ c("label", { className: n.label, "aria-hidden": !0, children: [
@@ -218,7 +218,7 @@ function Y({
218
218
  className: n.dateInput,
219
219
  type: "date",
220
220
  value: u,
221
- onChange: (s) => h(s.target.value),
221
+ onChange: (s) => m(s.target.value),
222
222
  "aria-label": "Date de fin"
223
223
  }
224
224
  ) })
@@ -230,7 +230,7 @@ function Y({
230
230
  {
231
231
  id: "period-sampling",
232
232
  className: n.samplingSelect,
233
- value: f,
233
+ value: h,
234
234
  onChange: (s) => L(s.target.value),
235
235
  "aria-label": "Échantillonnage",
236
236
  children: [
@@ -247,7 +247,7 @@ function Y({
247
247
  }
248
248
  export {
249
249
  O as I,
250
- q as M,
250
+ K as M,
251
251
  Y as P,
252
252
  J as a,
253
253
  X as b,