zuii 1.4.13 → 1.4.15

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/components/Button/react/index.js +20 -20
  2. package/dist/components/Color/react/index.js +10 -9
  3. package/dist/components/Dashboard/react/index.d.ts +1 -0
  4. package/dist/components/Dashboard/react/index.js +16 -15
  5. package/dist/components/Dashboard/style/index.css +1 -1
  6. package/dist/components/Errorpage/react/index.js +4 -3
  7. package/dist/components/Form/js/select.d.ts +1 -1
  8. package/dist/components/Form/js/select.js +33 -12
  9. package/dist/components/Form/react/Select.d.ts +10 -1
  10. package/dist/components/Form/react/Select.js +58 -40
  11. package/dist/components/Form/react/index.d.ts +1 -1
  12. package/dist/components/Form/style/index.css +1 -1
  13. package/dist/components/Group/style/index.css +1 -1
  14. package/dist/components/Icon/react/index.d.ts +17 -1
  15. package/dist/components/Icon/react/index.js +10 -7
  16. package/dist/components/Icon/style/index.css +1 -1
  17. package/dist/components/Lang-selector/js/language-selector.d.ts +3 -1
  18. package/dist/components/Lang-selector/js/language-selector.js +15 -13
  19. package/dist/components/Lang-selector/react/index.d.ts +14 -1
  20. package/dist/components/Lang-selector/react/index.js +29 -20
  21. package/dist/components/Loader/js/loader.d.ts +24 -0
  22. package/dist/components/Loader/js/loader.js +8 -0
  23. package/dist/components/Loader/react/index.d.ts +27 -0
  24. package/dist/components/Loader/react/index.js +38 -0
  25. package/dist/components/Loader/style/index.css +1 -0
  26. package/dist/components/Modal/style/index.css +1 -1
  27. package/dist/components/Nav/react/index.js +24 -23
  28. package/dist/components/Placeholder/react/index.d.ts +3 -1
  29. package/dist/components/Placeholder/react/index.js +11 -10
  30. package/dist/components/Placeholder/style/index.css +1 -1
  31. package/dist/components/Table/js/table.d.ts +1 -1
  32. package/dist/components/Table/style/index.css +1 -1
  33. package/dist/index.d.ts +1 -0
  34. package/dist/index.js +44 -40
  35. package/dist/templates/Forms/Forms-elements.tsx +18 -3
  36. package/dist/templates/Forms/Forms.tsx +1 -1
  37. package/dist/templates/Lang-selector/LangSelectors.tsx +29 -1
  38. package/dist/templates/Loaders/Loaders.d.ts +6 -0
  39. package/dist/templates/Loaders/Loaders.tsx +78 -0
  40. package/dist/templates/Placeholders/Placeholders.tsx +5 -0
  41. package/dist/templates/Tables/tables.data.d.ts +1 -1
  42. package/dist/templates/Tables/tables.data.tsx +6 -6
  43. package/dist/templates/index.d.ts +1 -0
  44. package/dist/templates/index.ts +1 -0
  45. package/package.json +1 -1
@@ -1,32 +1,32 @@
1
- import { jsx as s, jsxs as p } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
2
  import { Button as $ } from "react-bootstrap";
3
3
  import '../style/index.css';/* empty css */
4
- import { Icon as f } from "../../Icon/react/index.js";
5
- const d = ({
6
- children: t = "",
7
- variant: o = "primary",
8
- reverse: e = !1,
9
- size: n,
10
- icon: r,
4
+ import { SizeProvider as f, Icon as b } from "../../Icon/react/index.js";
5
+ const B = ({
6
+ children: n = "",
7
+ variant: e = "primary",
8
+ reverse: s = !1,
9
+ size: t,
10
+ icon: o,
11
11
  btnIcon: a = !1,
12
12
  transparent: m = !1,
13
- className: c = "",
14
- ...i
13
+ className: i = "",
14
+ ...c
15
15
  }) => {
16
- const l = n ? `btn-${n}` : "";
17
- return /* @__PURE__ */ s(
16
+ const l = t ? `btn-${t}` : "";
17
+ return /* @__PURE__ */ r(
18
18
  $,
19
19
  {
20
- variant: o,
21
- className: `${c} ${l} ${a ? "btn-icon" : ""} ${m ? "btn-transparent" : ""}`.trim(),
22
- ...i,
23
- children: /* @__PURE__ */ p("div", { className: `btn-content ${e ? "btn-reverse" : ""}`, children: [
24
- r && /* @__PURE__ */ s(f, { name: r }),
25
- t && t
26
- ] })
20
+ variant: e,
21
+ className: `${i} ${l} ${a ? "btn-icon" : ""} ${m ? "btn-transparent" : ""}`.trim(),
22
+ ...c,
23
+ children: /* @__PURE__ */ r(f, { size: t, children: /* @__PURE__ */ p("div", { className: `btn-content ${s ? "btn-reverse" : ""}`, children: [
24
+ o && /* @__PURE__ */ r(b, { name: o }),
25
+ n && n
26
+ ] }) })
27
27
  }
28
28
  );
29
29
  };
30
30
  export {
31
- d as Button
31
+ B as Button
32
32
  };
@@ -1,10 +1,10 @@
1
1
  import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
- import { tokens as p } from "../../../core/styles/tokens.js";
3
- import '../../Errorpage/style/index.css';import '../../Lang-selector/style/index.css';import '../../../node_modules/.pnpm/flag-icons@7.5.0/node_modules/flag-icons/css/flag-icons.min.css';import '../../Placeholder/style/index.css';import '../../Logo/style/index.css';import '../../Radius/style/index.css';import '../../Shadow/style/index.css';import '../../Context-menu/style/index.css';import '../../Divider/style/index.css';import '../../Badge/style/index.css';import '../../Avatar/style/index.css';import '../../Icon/style/index.css';import '../../Button/style/index.css';import '../style/index.css';import '../../../core/styles/main.css';/* empty css */
2
+ import { tokens as l } from "../../../core/styles/tokens.js";
3
+ import '../../Loader/style/index.css';import '../../Errorpage/style/index.css';import '../../Lang-selector/style/index.css';import '../../../node_modules/.pnpm/flag-icons@7.5.0/node_modules/flag-icons/css/flag-icons.min.css';import '../../Placeholder/style/index.css';import '../../Logo/style/index.css';import '../../Radius/style/index.css';import '../../Shadow/style/index.css';import '../../Context-menu/style/index.css';import '../../Divider/style/index.css';import '../../Badge/style/index.css';import '../../Avatar/style/index.css';import '../../Button/style/index.css';import '../style/index.css';import '../../../core/styles/main.css';/* empty css */
4
4
  /* empty css */
5
5
  import "react-bootstrap";
6
6
  /* empty css */
7
- /* empty css */
7
+ import "../../Icon/react/index.js";
8
8
  import { Group as t } from "../../Group/react/index.js";
9
9
  /* empty css */
10
10
  /* empty css */
@@ -31,29 +31,30 @@ import "choices.js";
31
31
  import "../../Auth/react/index.js";
32
32
  import "react-router-dom";
33
33
  /* empty css */
34
- const K = ({ name: r }) => {
35
- const l = p.brands[r];
34
+ /* empty css */
35
+ const L = ({ name: r }) => {
36
+ const p = l.brands[r];
36
37
  return /* @__PURE__ */ i(t, { children: [
37
38
  /* @__PURE__ */ o("div", { className: `color bg-${r} p-4`, children: /* @__PURE__ */ i(t, { vertical: !0, center: !0, children: [
38
39
  /* @__PURE__ */ o("span", { className: "color__name", children: r }),
39
- /* @__PURE__ */ o("span", { className: "color__value", children: l.value })
40
+ /* @__PURE__ */ o("span", { className: "color__value", children: p.value })
40
41
  ] }) }),
41
42
  /* @__PURE__ */ o("div", { className: `color bg-${r}-light p-4`, children: /* @__PURE__ */ i(t, { vertical: !0, center: !0, children: [
42
43
  /* @__PURE__ */ i("span", { className: "color__name", children: [
43
44
  r,
44
45
  "-light"
45
46
  ] }),
46
- /* @__PURE__ */ o("span", { className: "color__value", children: l.value })
47
+ /* @__PURE__ */ o("span", { className: "color__value", children: p.value })
47
48
  ] }) }),
48
49
  /* @__PURE__ */ o("div", { className: `color bg-${r}-dark p-4`, children: /* @__PURE__ */ i(t, { vertical: !0, center: !0, children: [
49
50
  /* @__PURE__ */ i("span", { className: "color__name", children: [
50
51
  r,
51
52
  "-dark"
52
53
  ] }),
53
- /* @__PURE__ */ o("span", { className: "color__value", children: l.value })
54
+ /* @__PURE__ */ o("span", { className: "color__value", children: p.value })
54
55
  ] }) })
55
56
  ] });
56
57
  };
57
58
  export {
58
- K as Color
59
+ L as Color
59
60
  };
@@ -25,5 +25,6 @@ export declare const Dashboard: {
25
25
  Header: ({ children, className }: Props) => import("react/jsx-runtime").JSX.Element;
26
26
  SubNavigation: ({ children, className }: Props) => import("react/jsx-runtime").JSX.Element;
27
27
  Wrapper: ({ children, className }: Props) => import("react/jsx-runtime").JSX.Element;
28
+ Card: ({ children, className }: Props) => import("react/jsx-runtime").JSX.Element;
28
29
  };
29
30
  export {};
@@ -1,31 +1,32 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import o from "react";
2
+ import e from "react";
3
3
  import '../style/index.css';/* empty css */
4
4
  const c = ({ children: a, className: s = "" }) => {
5
- const n = o.Children.map(a, (t, d) => {
6
- if (o.isValidElement(t)) {
7
- const i = t, m = [
5
+ const n = e.Children.map(a, (o, d) => {
6
+ if (e.isValidElement(o)) {
7
+ const i = o, m = [
8
8
  `nav-${d + 1}`
9
9
  ].filter(Boolean).join(" ");
10
- return o.cloneElement(i, {
10
+ return e.cloneElement(i, {
11
11
  className: `${i.props.className || ""} ${m}`.trim()
12
12
  });
13
13
  }
14
- return t;
14
+ return o;
15
15
  });
16
16
  return /* @__PURE__ */ r("div", { className: `dashboard__navigation ${s}`.trim(), children: n });
17
- }, l = ({ children: a, className: s = "" }) => /* @__PURE__ */ r("div", { className: `dashboard__content ${s}`.trim(), children: a }), b = ({ children: a, className: s = "" }) => /* @__PURE__ */ r("div", { className: `dashboard__header ${s}`.trim(), children: a }), p = ({ children: a, className: s = "" }) => /* @__PURE__ */ r("div", { className: `dashboard__sub-navigation ${s}`.trim(), children: a }), h = ({ children: a, className: s = "" }) => /* @__PURE__ */ r("div", { className: `dashboard__wrapper ${s}`.trim(), children: a }), e = ({
17
+ }, l = ({ children: a, className: s = "" }) => /* @__PURE__ */ r("div", { className: `dashboard__content ${s}`.trim(), children: a }), b = ({ children: a, className: s = "" }) => /* @__PURE__ */ r("div", { className: `dashboard__header ${s}`.trim(), children: a }), h = ({ children: a, className: s = "" }) => /* @__PURE__ */ r("div", { className: `dashboard__sub-navigation ${s}`.trim(), children: a }), p = ({ children: a, className: s = "" }) => /* @__PURE__ */ r("div", { className: `dashboard__wrapper ${s}`.trim(), children: a }), _ = ({ children: a, className: s = "" }) => /* @__PURE__ */ r("div", { className: `dashboard__card ${s}`.trim(), children: a }), t = ({
18
18
  children: a,
19
19
  className: s = ""
20
20
  }) => {
21
- const t = `dashboard ${s}`.trim();
22
- return /* @__PURE__ */ r("main", { className: t, children: a });
21
+ const o = `dashboard ${s}`.trim();
22
+ return /* @__PURE__ */ r("main", { className: o, children: a });
23
23
  };
24
- e.Navigation = c;
25
- e.Content = l;
26
- e.Header = b;
27
- e.SubNavigation = p;
28
- e.Wrapper = h;
24
+ t.Navigation = c;
25
+ t.Content = l;
26
+ t.Header = b;
27
+ t.SubNavigation = h;
28
+ t.Wrapper = p;
29
+ t.Card = _;
29
30
  export {
30
- e as Dashboard
31
+ t as Dashboard
31
32
  };
@@ -1 +1 @@
1
- @layer layout{.dashboard{--dashboard-nav-width: 90px;--dashboard-padding: var(--spacing-md);display:flex;height:100vh;overflow:hidden}.dashboard__navigation{display:flex;flex-direction:column;background:var(--primary);color:var(--white);padding:var(--dashboard-padding) 0;width:var(--dashboard-nav-width);gap:var(--spacing-lg)}.dashboard__navigation>:first-child{flex:1;overflow-y:auto}.dashboard__content{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;width:100%}.dashboard__header{grid-column:span 2;background:var(--accent)}.dashboard__sub-navigation{grid-row:2;background:var(--light);width:0px;background:var(--primary-dark);color:var(--white);transition:all .3s ease-in-out}.dashboard__sub-navigation.open{width:200px}}
1
+ @layer layout{.dashboard{--dashboard-nav-width: 90px;--dashboard-padding: var(--spacing-md);display:flex;height:100vh;overflow:hidden}.dashboard__navigation{display:flex;flex-direction:column;background:var(--primary);color:var(--white);padding:var(--dashboard-padding) 0;width:var(--dashboard-nav-width);gap:var(--spacing-lg)}.dashboard__navigation>:first-child{flex:1;overflow-y:auto}.dashboard__content{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;width:100%}.dashboard__header{grid-column:span 2;background:var(--accent)}.dashboard__sub-navigation{grid-row:2;background:var(--light);width:0px;background:var(--primary-dark);color:var(--white);transition:all .3s ease-in-out}.dashboard__sub-navigation.open{width:160px}.dashboard__wrapper{padding:var(--dashboard-padding);display:flex;flex-direction:column;gap:var(--spacing-md);overflow:auto}.dashboard__card{background:var(--white);border-radius:var(--radius-base);box-shadow:var(--box-shadow-md);height:fit-content}.dashboard__card-header{background:var(--gray-200);padding:0 var(--spacing-md);border-radius:var(--radius-base) var(--radius-base) 0 0}.dashboard__card-content{padding:var(--spacing-md)}.dashboard__card-title{font-size:1.25rem;margin:0}}@layer components{.dashboard__card-header .btn{--btn-font-size: .8rem;padding:var(--spacing-xs)}.dashboard__card-header .btn .icon{font-size:.8rem}}
@@ -1,6 +1,6 @@
1
1
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
2
  import { useNavigate as e } from "react-router-dom";
3
- import '../style/index.css';import '../../Lang-selector/style/index.css';import '../../../node_modules/.pnpm/flag-icons@7.5.0/node_modules/flag-icons/css/flag-icons.min.css';import '../../Placeholder/style/index.css';import '../../Logo/style/index.css';import '../../Radius/style/index.css';import '../../Shadow/style/index.css';import '../../Context-menu/style/index.css';import '../../Divider/style/index.css';import '../../Badge/style/index.css';import '../../Avatar/style/index.css';import '../../Color/style/index.css';import '../../../core/styles/main.css';/* empty css */
3
+ import '../../Loader/style/index.css';import '../style/index.css';import '../../Lang-selector/style/index.css';import '../../../node_modules/.pnpm/flag-icons@7.5.0/node_modules/flag-icons/css/flag-icons.min.css';import '../../Placeholder/style/index.css';import '../../Logo/style/index.css';import '../../Radius/style/index.css';import '../../Shadow/style/index.css';import '../../Context-menu/style/index.css';import '../../Divider/style/index.css';import '../../Badge/style/index.css';import '../../Avatar/style/index.css';import '../../Color/style/index.css';import '../../../core/styles/main.css';/* empty css */
4
4
  /* empty css */
5
5
  import { Button as p } from "../../Button/react/index.js";
6
6
  import { Icon as a } from "../../Icon/react/index.js";
@@ -30,7 +30,8 @@ import "choices.js";
30
30
  /* empty css */
31
31
  import "../../Auth/react/index.js";
32
32
  /* empty css */
33
- const H = ({ code: t = 404 }) => {
33
+ /* empty css */
34
+ const J = ({ code: t = 404 }) => {
34
35
  const m = e();
35
36
  return /* @__PURE__ */ r("main", { className: "error-page", children: /* @__PURE__ */ r("div", { className: "error-page__container ", children: /* @__PURE__ */ i("div", { className: "container", children: [
36
37
  /* @__PURE__ */ i(o, { className: "text-secondary mb-4", children: [
@@ -46,5 +47,5 @@ const H = ({ code: t = 404 }) => {
46
47
  ] }) }) });
47
48
  };
48
49
  export {
49
- H as Errorpage
50
+ J as Errorpage
50
51
  };
@@ -3,7 +3,7 @@ import { default as Choices } from 'choices.js';
3
3
  * Initialise un sélecteur Choices.js générique.
4
4
  *
5
5
  * @param {HTMLSelectElement} element - L'élément select à transformer.
6
- * @param {any} options - Options de configuration de Choices.js.
6
+ * @param {any} config - Options de configuration de Choices.js.
7
7
  * @param {(value: string | string[]) => void} onChange - Callback lors du changement.
8
8
  * @returns {Choices} L'instance Choices.js.
9
9
  */
@@ -1,19 +1,40 @@
1
- import c from "choices.js";
2
- const d = (t, e = {}, l) => {
3
- const a = new c(t, {
1
+ import v from "choices.js";
2
+ import '../../../node_modules/.pnpm/flag-icons@7.5.0/node_modules/flag-icons/css/flag-icons.min.css';/* empty css */
3
+ const f = (u, l = {}, p) => {
4
+ const m = {
4
5
  itemSelectText: "",
5
- removeItemButton: e.removeItemButton || !1,
6
- searchEnabled: e.searchEnabled !== void 0 ? e.searchEnabled : !0,
6
+ removeItemButton: l.removeItemButton || !1,
7
+ searchEnabled: l.searchEnabled !== void 0 ? l.searchEnabled : !0,
7
8
  shouldSort: !1,
8
9
  placeholder: !0,
9
- placeholderValue: e.placeholderValue || "Sélectionnez une option",
10
- ...e
10
+ placeholderValue: l.placeholderValue || "Sélectionnez une option",
11
+ ...l
12
+ };
13
+ l.variant === "country" && (m.callbackOnCreateTemplates = (s) => {
14
+ const b = (t) => t.placeholder || !t.customProperties?.flag ? `<span>${t.label}</span>` : `<span class="fi fi-${t.customProperties.flag} select__flag"></span> <span>${t.label}</span>`;
15
+ return {
16
+ item: (t, e) => {
17
+ const { item: a, highlightedState: c, itemSelectable: i, placeholder: r } = t.classNames, o = e.highlighted ? c : i, n = e.active ? 'aria-selected="true"' : "", d = e.disabled ? 'aria-disabled="true"' : "", h = e.placeholder ? r : "";
18
+ return s(`
19
+ <div class="${a} ${o} ${h}" data-item data-id="${e.id}" data-value="${e.value}" ${n} ${d}>
20
+ ${b(e)}
21
+ </div>`.trim());
22
+ },
23
+ choice: (t, e) => {
24
+ const { item: a, itemChoice: c, itemDisabled: i, itemSelectable: r, placeholder: o } = t.classNames, n = e.disabled ? i : r, d = e.disabled ? 'data-choice-disabled aria-disabled="true"' : "data-choice-selectable", h = e.placeholder ? o : "";
25
+ return s(`
26
+ <div class="${a} ${c} ${n} ${h}" data-select-text="${t.itemSelectText}" data-choice ${d} data-id="${e.id}" data-value="${e.value}" role="option">
27
+ ${b(e)}
28
+ </div>`.trim());
29
+ }
30
+ };
11
31
  });
12
- return l && t.addEventListener("change", (r) => {
13
- const o = r.detail.value;
14
- l(o);
15
- }), a;
32
+ const $ = new v(u, m);
33
+ return p && u.addEventListener("change", () => {
34
+ const s = $.getValue(!0);
35
+ p(s);
36
+ }), $;
16
37
  };
17
38
  export {
18
- d as initSelect
39
+ f as initSelect
19
40
  };
@@ -4,6 +4,10 @@
4
4
  export interface SelectOption {
5
5
  text: string;
6
6
  value: string;
7
+ /**
8
+ * Code du drapeau (ex: 'fr', 'en').
9
+ */
10
+ flag?: string;
7
11
  }
8
12
  /**
9
13
  * Propriétés du composant Select.
@@ -45,6 +49,11 @@ export interface SelectProps {
45
49
  * Nom du champ.
46
50
  */
47
51
  name?: string;
52
+ /**
53
+ * Variante du sélecteur.
54
+ * @default 'default'
55
+ */
56
+ variant?: 'default' | 'country';
48
57
  }
49
58
  /**
50
59
  * Composant Select premium basé sur Choices.js.
@@ -52,4 +61,4 @@ export interface SelectProps {
52
61
  * @param {SelectProps} props - Les propriétés du composant.
53
62
  * @returns {JSX.Element} Le composant Select rendu.
54
63
  */
55
- export declare const Select: ({ options, value, onChange, multiple, placeholder, disabled, searchable, className, name, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
64
+ export declare const Select: ({ options, value, onChange, multiple, placeholder, disabled, searchable, className, name, variant, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,55 +1,73 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { useRef as f, useEffect as a } from "react";
3
- import { initSelect as S } from "../js/select.js";
4
- const O = ({
5
- options: s,
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import { useRef as f, useEffect as o } from "react";
3
+ import { initSelect as R } from "../js/select.js";
4
+ const b = ({
5
+ options: n,
6
6
  value: r,
7
- onChange: u,
8
- multiple: i = !1,
9
- placeholder: o = "Sélectionnez une option",
10
- disabled: m = !1,
11
- searchable: y = !0,
12
- className: d = "",
13
- name: A
7
+ onChange: l,
8
+ multiple: s = !1,
9
+ placeholder: a = "Sélectionnez une option",
10
+ disabled: h = !1,
11
+ searchable: d = !0,
12
+ className: S = "",
13
+ name: V,
14
+ variant: A = "default"
14
15
  }) => {
15
- const n = f(null), e = f(null);
16
- return a(() => {
17
- if (s) {
18
- if (n.current) {
19
- n.current.innerHTML = "";
20
- const c = s.map((t) => ({
21
- value: t.value,
22
- label: t.text,
23
- selected: Array.isArray(r) ? r.includes(t.value) : r === t.value
16
+ const u = f(null), c = f(null), y = f(l), m = f(r);
17
+ o(() => {
18
+ y.current = l;
19
+ }, [l]), o(() => {
20
+ m.current = r;
21
+ }, [r]);
22
+ const N = JSON.stringify(n);
23
+ return o(() => {
24
+ if (!(!n || n.length === 0)) {
25
+ if (u.current) {
26
+ u.current.innerHTML = "";
27
+ const t = r ?? m.current, i = n.map((e) => ({
28
+ value: e.value,
29
+ label: e.text,
30
+ selected: Array.isArray(t) ? t.includes(e.value) : t === e.value,
31
+ customProperties: {
32
+ flag: e.flag
33
+ }
24
34
  }));
25
- e.current = S(n.current, {
26
- choices: c,
27
- removeItemButton: i,
28
- placeholderValue: o,
29
- searchEnabled: y,
30
- silent: !0
31
- }, u);
35
+ s || i.unshift({
36
+ value: "",
37
+ label: a,
38
+ selected: t === void 0 || t === "",
39
+ placeholder: !0
40
+ }), c.current = R(u.current, {
41
+ choices: i,
42
+ removeItemButton: s,
43
+ placeholderValue: a,
44
+ searchEnabled: d,
45
+ silent: !0,
46
+ variant: A
47
+ }, (e) => {
48
+ m.current = e, y.current && y.current(e);
49
+ });
32
50
  }
33
51
  return () => {
34
- e.current && (e.current.destroy(), e.current = null);
52
+ c.current && (c.current.destroy(), c.current = null);
35
53
  };
36
54
  }
37
- }, [s, i, o, u]), a(() => {
38
- if (e.current && r !== void 0) {
39
- const c = e.current.getValue(!0), t = Array.isArray(r) ? r : [r], h = Array.isArray(c) ? c : [c];
40
- JSON.stringify(t.sort()) !== JSON.stringify(h.sort()) && e.current.setChoiceByValue(r);
55
+ }, [N, s, a, A, d]), o(() => {
56
+ if (c.current && r !== void 0) {
57
+ const t = c.current.getValue(!0), i = Array.isArray(r) ? r : [r], e = Array.isArray(t) ? t : [t];
58
+ JSON.stringify(i.sort()) !== JSON.stringify(e.sort()) && c.current.setChoiceByValue(r);
41
59
  }
42
- }, [r]), /* @__PURE__ */ l("div", { className: `form__input ${d}`.trim(), children: /* @__PURE__ */ l(
60
+ }, [r]), /* @__PURE__ */ g("div", { className: `form__input ${S}`.trim(), children: /* @__PURE__ */ g(
43
61
  "select",
44
62
  {
45
- ref: n,
46
- multiple: i,
47
- disabled: m,
48
- className: "zuii-select",
49
- name: A
63
+ ref: u,
64
+ multiple: s,
65
+ disabled: h,
66
+ className: "select",
67
+ name: V
50
68
  }
51
69
  ) });
52
70
  };
53
71
  export {
54
- O as Select
72
+ b as Select
55
73
  };
@@ -53,7 +53,7 @@ export declare const Form: {
53
53
  Input: BsPrefixRefForwardingComponent<"input", FormCheckInputProps>;
54
54
  Label: React.ForwardRefExoticComponent< FormCheckLabelProps & React.RefAttributes<HTMLLabelElement>>;
55
55
  };
56
- Select: ({ options, value, onChange, multiple, placeholder, disabled, searchable, className, name, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
56
+ Select: ({ options, value, onChange, multiple, placeholder, disabled, searchable, className, name, variant, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
57
57
  InputGroup: BsPrefixRefForwardingComponent<"div", InputGroupProps> & {
58
58
  Text: BsPrefixRefForwardingComponent<"span", InputGroupTextProps>;
59
59
  Radio: (props: FormCheckInputProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- @layer vendor{.choices{position:relative;overflow:hidden;margin-bottom:24px;font-size:16px}.choices:focus{outline:none}.choices:last-child{margin-bottom:0}.choices.is-open{overflow:visible}.choices.is-disabled .choices__inner,.choices.is-disabled .choices__input{background-color:#eaeaea;cursor:not-allowed;-webkit-user-select:none;user-select:none}.choices.is-disabled .choices__item{cursor:not-allowed}.choices [hidden]{display:none!important}.choices[data-type*=select-one]{cursor:pointer}.choices[data-type*=select-one] .choices__inner{padding-bottom:7.5px}.choices[data-type*=select-one] .choices__input{display:block;width:100%;padding:10px;border-bottom:1px solid #ddd;background-color:#fff;margin:0}.choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:.25}.choices[data-type*=select-one] .choices__button:hover,.choices[data-type*=select-one] .choices__button:focus{opacity:1}.choices[data-type*=select-one] .choices__button:focus{box-shadow:0 0 0 2px #005f75}.choices[data-type*=select-one] .choices__item[data-placeholder] .choices__button{display:none}.choices[data-type*=select-one]:after{content:"";height:0;width:0;border-style:solid;border-color:#333 transparent transparent transparent;border-width:5px;position:absolute;right:11.5px;top:50%;margin-top:-2.5px;pointer-events:none}.choices[data-type*=select-one].is-open:after{border-color:transparent transparent #333;margin-top:-7.5px}.choices[data-type*=select-one][dir=rtl]:after{left:11.5px;right:auto}.choices[data-type*=select-one][dir=rtl] .choices__button{right:auto;left:0;margin-left:25px;margin-right:0}.choices[data-type*=select-multiple] .choices__inner,.choices[data-type*=text] .choices__inner{cursor:text}.choices[data-type*=select-multiple] .choices__button,.choices[data-type*=text] .choices__button{position:relative;display:inline-block;margin:0 -4px 0 8px;padding-left:16px;border-left:1px solid #003642;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:.75;border-radius:0}.choices[data-type*=select-multiple] .choices__button:hover,.choices[data-type*=select-multiple] .choices__button:focus,.choices[data-type*=text] .choices__button:hover,.choices[data-type*=text] .choices__button:focus{opacity:1}.choices__inner{display:inline-block;vertical-align:top;width:100%;background-color:#f9f9f9;padding:7.5px 7.5px 3.75px;border:1px solid #ddd;border-radius:2.5px;font-size:14px;min-height:44px;overflow:hidden}.is-focused .choices__inner,.is-open .choices__inner{border-color:#b7b7b7}.is-open .choices__inner{border-radius:2.5px 2.5px 0 0}.is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px}.choices__list{margin:0;padding-left:0;list-style:none}.choices__list--single{display:inline-block;padding:4px 16px 4px 4px;width:100%}[dir=rtl] .choices__list--single{padding-right:4px;padding-left:16px}.choices__list--single .choices__item{width:100%}.choices__list--multiple{display:inline}.choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:12px;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#005f75;border:1px solid #004a5c;color:#fff;word-break:break-all;box-sizing:border-box}.choices__list--multiple .choices__item[data-deletable]{padding-right:5px}[dir=rtl] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px}.choices__list--multiple .choices__item.is-highlighted{background-color:#004a5c;border:1px solid #003642}.is-disabled .choices__list--multiple .choices__item{background-color:#aaa;border:1px solid #919191}.choices__list--dropdown,.choices__list[aria-expanded]{display:none;z-index:1;position:absolute;width:100%;background-color:#fff;border:1px solid #ddd;top:100%;margin-top:-1px;border-bottom-left-radius:2.5px;border-bottom-right-radius:2.5px;overflow:hidden;word-break:break-all}.is-active.choices__list--dropdown,.is-active.choices__list[aria-expanded]{display:block}.is-open .choices__list--dropdown,.is-open .choices__list[aria-expanded]{border-color:#b7b7b7}.is-flipped .choices__list--dropdown,.is-flipped .choices__list[aria-expanded]{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:.25rem .25rem 0 0}.choices__list--dropdown .choices__list,.choices__list[aria-expanded] .choices__list{position:relative;max-height:300px;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position}.choices__list--dropdown .choices__item,.choices__list[aria-expanded] .choices__item{position:relative;padding:10px;font-size:14px}[dir=rtl] .choices__list--dropdown .choices__item,[dir=rtl] .choices__list[aria-expanded] .choices__item{text-align:right}@media(min-width:640px){.choices__list--dropdown .choices__item--selectable[data-select-text],.choices__list[aria-expanded] .choices__item--selectable[data-select-text]{padding-right:100px}.choices__list--dropdown .choices__item--selectable[data-select-text]:after,.choices__list[aria-expanded] .choices__item--selectable[data-select-text]:after{content:attr(data-select-text);font-size:12px;opacity:0;position:absolute;right:10px;top:50%;transform:translateY(-50%)}[dir=rtl] .choices__list--dropdown .choices__item--selectable[data-select-text],[dir=rtl] .choices__list[aria-expanded] .choices__item--selectable[data-select-text]{text-align:right;padding-left:100px;padding-right:10px}[dir=rtl] .choices__list--dropdown .choices__item--selectable[data-select-text]:after,[dir=rtl] .choices__list[aria-expanded] .choices__item--selectable[data-select-text]:after{right:auto;left:10px}}.choices__list--dropdown .choices__item--selectable.is-highlighted,.choices__list[aria-expanded] .choices__item--selectable.is-highlighted{background-color:#f2f2f2}.choices__list--dropdown .choices__item--selectable.is-highlighted:after,.choices__list[aria-expanded] .choices__item--selectable.is-highlighted:after{opacity:.5}.choices__item{cursor:default}.choices__item--selectable{cursor:pointer}.choices__item--disabled{cursor:not-allowed;-webkit-user-select:none;user-select:none;opacity:.5}.choices__heading{font-weight:600;font-size:12px;padding:10px;border-bottom:1px solid #f7f7f7;color:gray}.choices__button{text-indent:-9999px;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.choices__button:focus{outline:none}.choices__input{display:inline-block;vertical-align:baseline;background-color:#f9f9f9;font-size:14px;margin-bottom:5px;border:0;border-radius:0;max-width:100%;padding:4px 0 4px 2px}.choices__input:focus{outline:0}.choices__input::-webkit-search-decoration,.choices__input::-webkit-search-cancel-button,.choices__input::-webkit-search-results-button,.choices__input::-webkit-search-results-decoration{display:none}.choices__input::-ms-clear,.choices__input::-ms-reveal{display:none;width:0;height:0}[dir=rtl] .choices__input{padding-right:2px;padding-left:0}.choices__placeholder{opacity:.5}}@layer vendor;@layer components{.form__input:not(:has(.choices)){padding:var(--spacing-xs) var(--spacing-sm)}.choices__inner{padding:var(--spacing-xs) var(--spacing-sm)}.form__input{background-color:var(--white);border-radius:var(--radius-base);border:var(--border-width) solid var(--border-color);margin:var(--spacing-sm) 0;display:flex;gap:var(--spacing-xs);transition:all .2s cubic-bezier(.455,.03,.515,.955);flex:1}.form__input[type=checkbox],.form__input[type=radio]{appearance:none;width:1.25rem;height:1.25rem;background-color:var(--white);border:2px solid var(--color-gray-300);border-radius:var(--radius-sm);cursor:pointer;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1);vertical-align:middle;margin-top:-2px}.form__input[type=checkbox]:after,.form__input[type=radio]:after{content:"";position:absolute;top:50%;left:50%;width:.75rem;height:.75rem;background-color:var(--white);-webkit-mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;transform:translate(-50%,-50%) scale(0);transition:transform .2s cubic-bezier(.4,0,.2,1)}.form__input[type=checkbox]:checked,.form__input[type=radio]:checked{background-color:var(--primary);border-color:var(--primary)}.form__input[type=checkbox]:checked:after,.form__input[type=radio]:checked:after{transform:translate(-50%,-50%) scale(1)}.form__input[type=checkbox]:focus,.form__input[type=radio]:focus{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--primary),transparent 80%);border-color:var(--primary)}.form__input[type=checkbox]:hover:not(:checked):not(:disabled),.form__input[type=radio]:hover:not(:checked):not(:disabled){border-color:var(--primary);background-color:color-mix(in srgb,var(--primary),transparent 95%)}.form__input[type=checkbox]:disabled,.form__input[type=radio]:disabled{background-color:var(--color-gray-100);border-color:var(--color-gray-200);cursor:not-allowed;opacity:.7}.form__input[type=radio]{border-radius:var(--radius-pill)}.form__input[type=radio]:after{-webkit-mask-image:none;mask-image:none;border-radius:var(--radius-pill);width:.5rem;height:.5rem}.form__input .form-control:not([type=checkbox]):not([type=radio]){padding:0;background-color:transparent;border-radius:var(--radius-none);border:none;line-height:1.3}.form__input .form-control:not([type=checkbox]):not([type=radio]):focus{border:none;box-shadow:none}.form__input:has(.form-control:focus){border-color:var(--accent)}.group--vertical .form__input{width:100%}input[type=checkbox],input[type=radio]{--border-color: var(--primary)}.form__input:has(.form-control:disabled){border-color:var(--gray-200);background-color:var(--gray-100)}.form__input:has(.form-control:disabled) .form-control,.form__input:has(.form-control:disabled) .form-control::placeholder,.form__input:has(.form-control:disabled) .icon{color:var(--gray-400)}@keyframes menu-fade-in{0%{opacity:0}to{opacity:1}}.choices{width:100%;display:flex}.choices__inner,.choices__input{background-color:transparent;border:none;border-radius:0;min-height:initial;margin:0}.choices:not([data-type=select-multiple]) .choices__inner{display:flex;align-items:center;gap:var(--spacing-xs)}.choices__list--single{padding:0}.choices[data-type*=select-one]:after{content:"";-webkit-mask-image:var(--icons-chevron-down);mask-image:var(--icons-chevron-down);-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;width:24px;height:24px;background:currentColor;border:none;display:block;top:0;position:relative;right:0;margin-top:0}.choices__list--multiple .choices__item{border-radius:var(--radius-pill);background-color:var(--accent);border:var(--border-width) solid var(--accent-dark)}.choices__list--dropdown{--menu-border-radius: var(--border-radius-sm, .375rem);position:fixed;z-index:1000;min-width:160px;background-color:var(--white, #fff);border:1px solid var(--gray-200, #e2e8f0);border-radius:var(--menu-border-radius);box-shadow:var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, .1));outline:none;animation:menu-fade-in .1s ease-out;position:absolute;width:100%;margin-top:4px;padding:4px}.shadow{display:flex;justify-content:center;align-items:center;padding:1rem}.shadow--xs{box-shadow:0 1px 2px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--sm{box-shadow:0 1px 3px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--md{box-shadow:0 4px 6px -1px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--lg{box-shadow:0 10px 15px -3px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--xl{box-shadow:0 20px 25px -5px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--2xl{box-shadow:0 25px 50px -12px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--outline,.form-check-input:focus{box-shadow:0 0 2px 4px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--inset{box-shadow:inset 0 0 6px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--none{box-shadow:0 0 color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.form-check-input:checked{background-color:var(--accent);border-color:var(--accent)}.form-control::-webkit-outer-spin-button,.form-control::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.form-control[type=number]{-moz-appearance:textfield;appearance:textfield}.form__addon{cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .2s}.form__addon:hover{background-color:var(--bs-gray-200)}.form__addon:active{background-color:var(--bs-gray-300)}}
1
+ @layer vendor{.choices{position:relative;overflow:hidden;margin-bottom:24px;font-size:16px}.choices:focus{outline:none}.choices:last-child{margin-bottom:0}.choices.is-open{overflow:visible}.choices.is-disabled .choices__inner,.choices.is-disabled .choices__input{background-color:#eaeaea;cursor:not-allowed;-webkit-user-select:none;user-select:none}.choices.is-disabled .choices__item{cursor:not-allowed}.choices [hidden]{display:none!important}.choices[data-type*=select-one]{cursor:pointer}.choices[data-type*=select-one] .choices__inner{padding-bottom:7.5px}.choices[data-type*=select-one] .choices__input{display:block;width:100%;padding:10px;border-bottom:1px solid #ddd;background-color:#fff;margin:0}.choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:.25}.choices[data-type*=select-one] .choices__button:hover,.choices[data-type*=select-one] .choices__button:focus{opacity:1}.choices[data-type*=select-one] .choices__button:focus{box-shadow:0 0 0 2px #005f75}.choices[data-type*=select-one] .choices__item[data-placeholder] .choices__button{display:none}.choices[data-type*=select-one]:after{content:"";height:0;width:0;border-style:solid;border-color:#333 transparent transparent transparent;border-width:5px;position:absolute;right:11.5px;top:50%;margin-top:-2.5px;pointer-events:none}.choices[data-type*=select-one].is-open:after{border-color:transparent transparent #333;margin-top:-7.5px}.choices[data-type*=select-one][dir=rtl]:after{left:11.5px;right:auto}.choices[data-type*=select-one][dir=rtl] .choices__button{right:auto;left:0;margin-left:25px;margin-right:0}.choices[data-type*=select-multiple] .choices__inner,.choices[data-type*=text] .choices__inner{cursor:text}.choices[data-type*=select-multiple] .choices__button,.choices[data-type*=text] .choices__button{position:relative;display:inline-block;margin:0 -4px 0 8px;padding-left:16px;border-left:1px solid #003642;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:.75;border-radius:0}.choices[data-type*=select-multiple] .choices__button:hover,.choices[data-type*=select-multiple] .choices__button:focus,.choices[data-type*=text] .choices__button:hover,.choices[data-type*=text] .choices__button:focus{opacity:1}.choices__inner{display:inline-block;vertical-align:top;width:100%;background-color:#f9f9f9;padding:7.5px 7.5px 3.75px;border:1px solid #ddd;border-radius:2.5px;font-size:14px;min-height:44px;overflow:hidden}.is-focused .choices__inner,.is-open .choices__inner{border-color:#b7b7b7}.is-open .choices__inner{border-radius:2.5px 2.5px 0 0}.is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px}.choices__list{margin:0;padding-left:0;list-style:none}.choices__list--single{display:inline-block;padding:4px 16px 4px 4px;width:100%}[dir=rtl] .choices__list--single{padding-right:4px;padding-left:16px}.choices__list--single .choices__item{width:100%}.choices__list--multiple{display:inline}.choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:12px;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#005f75;border:1px solid #004a5c;color:#fff;word-break:break-all;box-sizing:border-box}.choices__list--multiple .choices__item[data-deletable]{padding-right:5px}[dir=rtl] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px}.choices__list--multiple .choices__item.is-highlighted{background-color:#004a5c;border:1px solid #003642}.is-disabled .choices__list--multiple .choices__item{background-color:#aaa;border:1px solid #919191}.choices__list--dropdown,.choices__list[aria-expanded]{display:none;z-index:1;position:absolute;width:100%;background-color:#fff;border:1px solid #ddd;top:100%;margin-top:-1px;border-bottom-left-radius:2.5px;border-bottom-right-radius:2.5px;overflow:hidden;word-break:break-all}.is-active.choices__list--dropdown,.is-active.choices__list[aria-expanded]{display:block}.is-open .choices__list--dropdown,.is-open .choices__list[aria-expanded]{border-color:#b7b7b7}.is-flipped .choices__list--dropdown,.is-flipped .choices__list[aria-expanded]{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:.25rem .25rem 0 0}.choices__list--dropdown .choices__list,.choices__list[aria-expanded] .choices__list{position:relative;max-height:300px;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position}.choices__list--dropdown .choices__item,.choices__list[aria-expanded] .choices__item{position:relative;padding:10px;font-size:14px}[dir=rtl] .choices__list--dropdown .choices__item,[dir=rtl] .choices__list[aria-expanded] .choices__item{text-align:right}@media(min-width:640px){.choices__list--dropdown .choices__item--selectable[data-select-text],.choices__list[aria-expanded] .choices__item--selectable[data-select-text]{padding-right:100px}.choices__list--dropdown .choices__item--selectable[data-select-text]:after,.choices__list[aria-expanded] .choices__item--selectable[data-select-text]:after{content:attr(data-select-text);font-size:12px;opacity:0;position:absolute;right:10px;top:50%;transform:translateY(-50%)}[dir=rtl] .choices__list--dropdown .choices__item--selectable[data-select-text],[dir=rtl] .choices__list[aria-expanded] .choices__item--selectable[data-select-text]{text-align:right;padding-left:100px;padding-right:10px}[dir=rtl] .choices__list--dropdown .choices__item--selectable[data-select-text]:after,[dir=rtl] .choices__list[aria-expanded] .choices__item--selectable[data-select-text]:after{right:auto;left:10px}}.choices__list--dropdown .choices__item--selectable.is-highlighted,.choices__list[aria-expanded] .choices__item--selectable.is-highlighted{background-color:#f2f2f2}.choices__list--dropdown .choices__item--selectable.is-highlighted:after,.choices__list[aria-expanded] .choices__item--selectable.is-highlighted:after{opacity:.5}.choices__item{cursor:default}.choices__item--selectable{cursor:pointer}.choices__item--disabled{cursor:not-allowed;-webkit-user-select:none;user-select:none;opacity:.5}.choices__heading{font-weight:600;font-size:12px;padding:10px;border-bottom:1px solid #f7f7f7;color:gray}.choices__button{text-indent:-9999px;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.choices__button:focus{outline:none}.choices__input{display:inline-block;vertical-align:baseline;background-color:#f9f9f9;font-size:14px;margin-bottom:5px;border:0;border-radius:0;max-width:100%;padding:4px 0 4px 2px}.choices__input:focus{outline:0}.choices__input::-webkit-search-decoration,.choices__input::-webkit-search-cancel-button,.choices__input::-webkit-search-results-button,.choices__input::-webkit-search-results-decoration{display:none}.choices__input::-ms-clear,.choices__input::-ms-reveal{display:none;width:0;height:0}[dir=rtl] .choices__input{padding-right:2px;padding-left:0}.choices__placeholder{opacity:.5}}@layer vendor;@layer components{.form__input{--form-placeholder-color: color-mix(in srgb, var(--body-color), transparent 70%)}.form__input:not(:has(.choices)){padding:var(--spacing-xs) var(--spacing-sm)}.choices__inner{padding:var(--spacing-xs) var(--spacing-sm)}.form__input{background-color:var(--white);border-radius:var(--radius-base);border:var(--border-width) solid var(--border-color);margin:var(--spacing-sm) 0;display:flex;gap:var(--spacing-xs);transition:all .2s cubic-bezier(.455,.03,.515,.955);flex:1}.form__input[type=checkbox],.form__input[type=radio]{appearance:none;width:1.25rem;height:1.25rem;background-color:var(--white);border:2px solid var(--color-gray-300);border-radius:var(--radius-sm);cursor:pointer;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1);vertical-align:middle;margin-top:-2px}.form__input[type=checkbox]:after,.form__input[type=radio]:after{content:"";position:absolute;top:50%;left:50%;width:.75rem;height:.75rem;background-color:var(--white);-webkit-mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;transform:translate(-50%,-50%) scale(0);transition:transform .2s cubic-bezier(.4,0,.2,1)}.form__input[type=checkbox]:checked,.form__input[type=radio]:checked{background-color:var(--primary);border-color:var(--primary)}.form__input[type=checkbox]:checked:after,.form__input[type=radio]:checked:after{transform:translate(-50%,-50%) scale(1)}.form__input[type=checkbox]:focus,.form__input[type=radio]:focus{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--primary),transparent 80%);border-color:var(--primary)}.form__input[type=checkbox]:hover:not(:checked):not(:disabled),.form__input[type=radio]:hover:not(:checked):not(:disabled){border-color:var(--primary);background-color:color-mix(in srgb,var(--primary),transparent 95%)}.form__input[type=checkbox]:disabled,.form__input[type=radio]:disabled{background-color:var(--color-gray-100);border-color:var(--color-gray-200);cursor:not-allowed;opacity:.7}.form__input[type=radio]{border-radius:var(--radius-pill)}.form__input[type=radio]:after{-webkit-mask-image:none;mask-image:none;border-radius:var(--radius-pill);width:.5rem;height:.5rem}.form__input .form-control:not([type=checkbox]):not([type=radio]){padding:0;background-color:transparent;border-radius:var(--radius-none);border:none;line-height:1.3}.form__input .form-control:not([type=checkbox]):not([type=radio]):focus{border:none;box-shadow:none}.form__input:has(.form-control:focus){border-color:var(--accent)}.group--vertical .form__input{width:100%}input[type=checkbox],input[type=radio]{--border-color: var(--primary)}.form__input:has(.form-control:disabled){border-color:var(--gray-200);background-color:var(--gray-100)}.form__input:has(.form-control:disabled) .form-control,.form__input:has(.form-control:disabled) .form-control::placeholder,.form__input:has(.form-control:disabled) .icon{color:var(--form-placeholder-color)}input::placeholder{color:var(--form-placeholder-color)}@keyframes menu-fade-in{0%{opacity:0}to{opacity:1}}.choices{width:100%;display:flex}.choices__placeholder{opacity:1;color:var(--form-placeholder-color)}.choices__inner,.choices__input{background-color:transparent;border:none;border-radius:0;min-height:initial;margin:0}.choices:not([data-type=select-multiple]) .choices__inner{display:flex;align-items:center;gap:var(--spacing-xs)}.choices__list--single{padding:0}.choices[data-type*=select-one]:after{content:"";-webkit-mask-image:var(--icons-chevron-down);mask-image:var(--icons-chevron-down);-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;width:24px;height:24px;background:currentColor;border:none;display:block;top:0;position:relative;right:0;margin-top:0}.choices__list--multiple .choices__item{border-radius:var(--radius-pill);background-color:var(--accent);border:var(--border-width) solid var(--accent-dark)}.choices__list--dropdown{--menu-border-radius: var(--border-radius-sm, .375rem);position:fixed;z-index:1000;min-width:160px;background-color:var(--white, #fff);border:1px solid var(--gray-200, #e2e8f0);border-radius:var(--menu-border-radius);box-shadow:var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, .1));outline:none;animation:menu-fade-in .1s ease-out;position:absolute;width:100%;margin-top:4px;padding:4px}.select__flag{margin-right:var(--spacing-xs);width:20px;height:15px;display:inline-block}.shadow{display:flex;justify-content:center;align-items:center;padding:1rem}.shadow--xs{box-shadow:0 1px 2px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--sm{box-shadow:0 1px 3px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--md{box-shadow:0 4px 6px -1px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--lg{box-shadow:0 10px 15px -3px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--xl{box-shadow:0 20px 25px -5px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--2xl{box-shadow:0 25px 50px -12px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--outline,.form-check-input:focus{box-shadow:0 0 2px 4px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--inset{box-shadow:inset 0 0 6px color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.shadow--none{box-shadow:0 0 color-mix(in srgb,var(--box-shadow-color),transparent 80%)}.form-check-input:checked{background-color:var(--accent);border-color:var(--accent)}.form-control::-webkit-outer-spin-button,.form-control::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.form-control[type=number]{-moz-appearance:textfield;appearance:textfield}.form__addon{cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .2s}.form__addon:hover{background-color:var(--bs-gray-200)}.form__addon:active{background-color:var(--bs-gray-300)}}
@@ -1 +1 @@
1
- @layer components{.group{display:flex;flex-wrap:wrap;gap:.5rem}.group--vertical{flex-direction:column;align-items:flex-start}.group--horizontal{flex-direction:row;align-items:center}.group--no-wrap{flex-wrap:nowrap}.group--gap-none{gap:0}.group--center{align-items:center;justify-content:center}.group--start{justify-content:flex-start}.group--end{justify-content:flex-end}.group--between{justify-content:space-between}}
1
+ @layer components{.group{display:flex;flex-wrap:wrap;gap:.5rem}.group>*:has(.form__input){flex:1}.group--vertical{flex-direction:column;align-items:flex-start}.group--horizontal{flex-direction:row;align-items:center}.group--no-wrap{flex-wrap:nowrap}.group--gap-none{gap:0}.group--center{align-items:center;justify-content:center}.group--start{justify-content:flex-start}.group--end{justify-content:flex-end}.group--between{justify-content:space-between}}
@@ -1,3 +1,19 @@
1
+ import { default as React } from 'react';
2
+ /**
3
+ * Type pour les tailles supportées.
4
+ */
5
+ export type ComponentSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | undefined;
6
+ /**
7
+ * Fournisseur de contexte pour la taille.
8
+ */
9
+ export declare const SizeProvider: ({ size, children }: {
10
+ size: ComponentSize;
11
+ children: React.ReactNode;
12
+ }) => import("react/jsx-runtime").JSX.Element;
13
+ /**
14
+ * Hook pour consommer la taille du contexte.
15
+ */
16
+ export declare const useSize: () => ComponentSize;
1
17
  /**
2
18
  * Propriétés du composant Icon.
3
19
  */
@@ -10,7 +26,7 @@ interface Props {
10
26
  /**
11
27
  * La taille de l'icône.
12
28
  */
13
- size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl";
29
+ size?: ComponentSize;
14
30
  /**
15
31
  * Classe CSS additionnelle.
16
32
  */
@@ -1,13 +1,16 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
+ import { createContext as m, useContext as l } from "react";
2
3
  import '../style/index.css';/* empty css */
3
- const a = ({
4
- name: c,
5
- size: e = "lg",
6
- className: i = ""
4
+ const n = m(void 0), p = ({ size: e, children: t }) => /* @__PURE__ */ o(n.Provider, { value: e, children: t }), z = () => l(n), C = ({
5
+ name: e,
6
+ size: t,
7
+ className: r = ""
7
8
  }) => {
8
- const s = "icon", n = `${s}--size-${e}`;
9
- return /* @__PURE__ */ o("span", { className: `${s} ${n} ${i}`.trim(), children: /* @__PURE__ */ o("i", { className: `${c}` }) });
9
+ const i = z(), c = t || i || "lg", s = "icon", a = `${s}--size-${c}`;
10
+ return /* @__PURE__ */ o("span", { className: `${s} ${a} ${r}`.trim(), children: /* @__PURE__ */ o("i", { className: `${e}` }) });
10
11
  };
11
12
  export {
12
- a as Icon
13
+ C as Icon,
14
+ p as SizeProvider,
15
+ z as useSize
13
16
  };