zuii 1.7.8 → 1.7.10

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.
@@ -1,64 +1,62 @@
1
- import { jsxs as h, Fragment as j, jsx as n } from "react/jsx-runtime";
2
- import { forwardRef as C, useRef as c, useState as E, useMemo as P, useEffect as y } from "react";
3
- import { Form as _ } from "react-bootstrap";
4
- import { Icon as b } from "../../Icon/react/index.js";
5
- import { getRangeSeparator as k, initDatePicker as v, formatHiddenDateValue as w } from "../js/date.js";
6
- const A = C(({
7
- flatpickrOptions: o,
1
+ import { jsxs as R, Fragment as V, jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as j, useRef as c, useState as C, useMemo as E, useEffect as h } from "react";
3
+ import { Form as P } from "react-bootstrap";
4
+ import { getRangeSeparator as _, initDatePicker as b, formatHiddenDateValue as k } from "../js/date.js";
5
+ const v = j(({
6
+ flatpickrOptions: n,
8
7
  value: e = "",
9
8
  onChange: s,
10
- placeholder: I,
9
+ placeholder: y,
11
10
  name: x,
12
11
  className: D = "",
13
- icon: m,
14
- disabled: l = !1,
12
+ icon: w,
13
+ disabled: m = !1,
15
14
  ...d
16
- }, g) => {
17
- const F = g, a = c(null), p = c(null), R = c(e || ""), r = c(null), [u, i] = E(e || ""), N = P(() => k(o?.locale), [o?.locale]);
18
- y(() => {
15
+ }, I) => {
16
+ const g = I, a = c(null), p = c(null), r = c(null), [u, i] = C(e || ""), f = c(e || ""), F = E(() => _(n?.locale), [n?.locale]);
17
+ h(() => {
19
18
  if (a.current)
20
- return r.current = v(
19
+ return r.current = b(
21
20
  a.current,
22
- o,
21
+ n,
23
22
  p.current,
24
23
  (t) => {
25
- R.current = t, i(t), s?.(t);
24
+ f.current = t, i(t), s?.(t);
26
25
  }
27
26
  ), d.onReady?.(r.current), () => {
28
27
  r.current && r.current?.destroy();
29
28
  };
30
- }, [o, s]), y(() => {
31
- e !== void 0 && e !== u && (i(e || ""), r.current?.setDate(e || "", !1));
29
+ }, [n, s]), h(() => {
30
+ e !== f.current && e !== void 0 && e !== u && (i(e || ""), r.current?.setDate(e || "", !1));
32
31
  }, [e]);
33
- const V = () => {
34
- l || r.current?.open();
32
+ const N = () => {
33
+ m || r.current?.open();
35
34
  };
36
- return /* @__PURE__ */ h(j, { children: [
37
- /* @__PURE__ */ h("div", { className: `form__input ${D}`.trim(), children: [
38
- m && /* @__PURE__ */ n(b, { name: m, size: "sm" }),
39
- /* @__PURE__ */ n(
40
- _.Control,
35
+ return /* @__PURE__ */ R(V, { children: [
36
+ /* @__PURE__ */ R("div", { className: `form__input ${D}`.trim(), children: [
37
+ /* @__PURE__ */ o(
38
+ P.Control,
41
39
  {
42
40
  ...d,
43
- ref: F,
41
+ ref: g,
44
42
  autoComplete: "off",
45
43
  value: u,
46
44
  onChange: (t) => {
47
- const f = t.target.value;
48
- R.current = f, i(f), s?.(f);
45
+ const l = t.target.value;
46
+ f.current = l, i(l), s?.(l);
49
47
  },
50
- onClick: V,
51
- disabled: l,
52
- placeholder: I,
48
+ onClick: N,
49
+ disabled: m,
50
+ placeholder: y,
53
51
  className: "form-date-control"
54
52
  }
55
53
  ),
56
- /* @__PURE__ */ n("span", { ref: p, className: "form-date-anchor" })
54
+ /* @__PURE__ */ o("span", { ref: p, className: "form-date-anchor" })
57
55
  ] }),
58
- /* @__PURE__ */ n("input", { ref: a, style: { display: "none" }, tabIndex: -1, "aria-hidden": "true" }),
59
- /* @__PURE__ */ n("input", { type: "hidden", name: x, value: w(u, N, r.current) })
56
+ /* @__PURE__ */ o("input", { ref: a, style: { display: "none" }, tabIndex: -1, "aria-hidden": "true" }),
57
+ /* @__PURE__ */ o("input", { type: "hidden", name: x, value: k(u, F, r.current) })
60
58
  ] });
61
59
  });
62
60
  export {
63
- A as FormDate
61
+ v as FormDate
64
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zuii",
3
- "version": "1.7.8",
3
+ "version": "1.7.10",
4
4
  "packageManager": "pnpm@9.9.0",
5
5
  "description": "Bibliothèque de composants UI légère, intuitive et modulaire pour les interfaces web modernes.",
6
6
  "type": "module",