lawgic-dev-kit 0.18.8 → 0.19.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 (32) hide show
  1. package/dist/components/atoms/Button/Button.js +9 -8
  2. package/dist/components/atoms/FilterPill/FilterPill.d.ts +8 -0
  3. package/dist/components/atoms/FilterPill/index.d.ts +1 -0
  4. package/dist/components/atoms/IconButton/IconButton.js +11 -10
  5. package/dist/components/atoms/ProgressBar/ProgressBar.js +3 -2
  6. package/dist/components/atoms/SectionButton/desktop/SectionButton.js +11 -10
  7. package/dist/components/atoms/SectionButton/mobile/SectionButton.js +13 -12
  8. package/dist/components/atoms/SidebarButton/SidebarButton.js +3 -2
  9. package/dist/components/atoms/Switch/Switch.js +3 -2
  10. package/dist/components/atoms/TextButton/TextButton.js +1 -0
  11. package/dist/components/atoms/TextInput/TextInput.js +3 -2
  12. package/dist/components/atoms/UncontrolledTextInput/UncontrolledTextInput.js +9 -8
  13. package/dist/components/molecules/AutocompleteInput/AutocompleteInput.js +1 -1
  14. package/dist/components/molecules/AutocompleteInput/AutocompleteInput.types.d.ts +1 -1
  15. package/dist/components/molecules/DateInput/DateInput.d.ts +2 -1
  16. package/dist/components/molecules/DateInput/DateInput.js +40 -29
  17. package/dist/components/molecules/FiltersMenu/FiltersMenu.d.ts +13 -0
  18. package/dist/components/molecules/FiltersMenu/index.d.ts +1 -0
  19. package/dist/components/molecules/PillsContainer/PillsContainer.d.ts +5 -2
  20. package/dist/components/molecules/PillsContainer/PillsContainer.js +29 -23
  21. package/dist/components/molecules/UncontrolledDateInput/UncontrolledDateInput.d.ts +2 -1
  22. package/dist/components/molecules/UncontrolledDateInput/UncontrolledDateInput.js +27 -25
  23. package/dist/hooks/index.d.ts +1 -0
  24. package/dist/hooks/useFilterToggler.d.ts +5 -0
  25. package/dist/hooks/useFilterToggler.js +56 -0
  26. package/dist/index.js +17 -15
  27. package/dist/lawgic-dev-kit.css +1 -1
  28. package/dist/lawgic-dev-kit.umd.js +40 -40
  29. package/dist/types/cycles.d.ts +103 -0
  30. package/dist/types/filters.d.ts +22 -0
  31. package/dist/utils/cycles.d.ts +2 -0
  32. package/package.json +1 -1
@@ -1,9 +1,10 @@
1
1
  import { j as s } from "../../../_virtual/jsx-runtime.js";
2
- import { resolveButtonClasses as d } from "./Button.styles.js";
3
- import { useTheme as i } from "../../../hooks/useTheme.js";
2
+ import { resolveButtonClasses as i } from "./Button.styles.js";
3
+ import { useTheme as d } from "../../../hooks/useTheme.js";
4
+ import "react";
4
5
  import { FontAwesomeIcon as r } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
5
6
  import { resolveIconClasses as m } from "../IconButton/IconButton.styles.js";
6
- const h = ({
7
+ const v = ({
7
8
  icon: e,
8
9
  rightIcon: t,
9
10
  color: l,
@@ -11,15 +12,15 @@ const h = ({
11
12
  size: o = "base",
12
13
  children: n,
13
14
  className: c,
14
- ...u
15
+ ...p
15
16
  }) => {
16
- const { defaultColorScheme: f } = i(), p = l || f;
17
+ const { defaultColorScheme: u } = d(), f = l || u;
17
18
  return /* @__PURE__ */ s.jsxs(
18
19
  "button",
19
20
  {
20
21
  type: "button",
21
- className: d(a, p, o) + " " + c,
22
- ...u,
22
+ className: i(a, f, o) + " " + c,
23
+ ...p,
23
24
  children: [
24
25
  e && /* @__PURE__ */ s.jsx(r, { icon: e, className: m(o) }),
25
26
  n,
@@ -35,5 +36,5 @@ const h = ({
35
36
  );
36
37
  };
37
38
  export {
38
- h as default
39
+ v as default
39
40
  };
@@ -0,0 +1,8 @@
1
+ import { Filter, FilterControl } from '../../../types/filters';
2
+ interface FilterPillProps<T> {
3
+ filter: Omit<Filter<T>, "fn">;
4
+ filterControl: FilterControl<T>;
5
+ translations?: Record<string, string>;
6
+ }
7
+ declare const FilterPill: <T>({ filter, filterControl, translations, }: FilterPillProps<T>) => React.ReactElement;
8
+ export default FilterPill;
@@ -0,0 +1 @@
1
+ export { default as FilterPill } from './FilterPill';
@@ -1,14 +1,15 @@
1
1
  import { j as s } from "../../../_virtual/jsx-runtime.js";
2
- import { FontAwesomeIcon as d } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
3
- import { resolveIconButtonClasses as i, resolveIconClasses as p } from "./IconButton.styles.js";
2
+ import { FontAwesomeIcon as i } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
3
+ import { resolveIconButtonClasses as p, resolveIconClasses as d } from "./IconButton.styles.js";
4
4
  import { useTheme as x } from "../../../hooks/useTheme.js";
5
- const b = ({
5
+ import "react";
6
+ const v = ({
6
7
  variant: t = "filled",
7
8
  color: r,
8
9
  size: o = "base",
9
- shadow: n = "none",
10
+ shadow: m = "none",
10
11
  icon: e,
11
- iconProps: m = {},
12
+ iconProps: n = {},
12
13
  children: l,
13
14
  className: a,
14
15
  ...c
@@ -18,12 +19,12 @@ const b = ({
18
19
  "button",
19
20
  {
20
21
  ...c,
21
- className: `${i(t, f, o, n)} ${a}`,
22
+ className: `${p(t, f, o, m)} ${a}`,
22
23
  children: e ? /* @__PURE__ */ s.jsx(
23
- d,
24
+ i,
24
25
  {
25
- ...m,
26
- className: p(o),
26
+ ...n,
27
+ className: d(o),
27
28
  icon: e
28
29
  }
29
30
  ) : l
@@ -31,5 +32,5 @@ const b = ({
31
32
  );
32
33
  };
33
34
  export {
34
- b as default
35
+ v as default
35
36
  };
@@ -1,7 +1,8 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
2
  import { resolveProgressBarColors as c } from "./ProgressBar.styles.js";
3
3
  import { useTheme as f } from "../../../hooks/useTheme.js";
4
- const p = ({
4
+ import "react";
5
+ const g = ({
5
6
  progress: r,
6
7
  showPercentage: o = !1,
7
8
  color: l,
@@ -24,5 +25,5 @@ const p = ({
24
25
  ] });
25
26
  };
26
27
  export {
27
- p as default
28
+ g as default
28
29
  };
@@ -1,16 +1,17 @@
1
- import { j as t } from "../../../../_virtual/jsx-runtime.js";
1
+ import { j as e } from "../../../../_virtual/jsx-runtime.js";
2
2
  import { FontAwesomeIcon as u } from "../../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
3
3
  import { resolveSectionButtonClasses as $ } from "./SectionButton.styles.js";
4
4
  import { resolveIconClasses as f } from "../../IconButton/IconButton.styles.js";
5
5
  import { useTheme as d } from "../../../../hooks/useTheme.js";
6
- const g = ({
6
+ import "react";
7
+ const w = ({
7
8
  label: r,
8
9
  href: a,
9
10
  onClick: o,
10
11
  active: p = !1,
11
12
  disabled: s = !1,
12
13
  className: m,
13
- icon: e,
14
+ icon: t,
14
15
  color: i
15
16
  }) => {
16
17
  const { defaultColorScheme: x } = d(), j = i || x, n = (c) => {
@@ -20,7 +21,7 @@ const g = ({
20
21
  }
21
22
  o == null || o(c);
22
23
  }, l = `${$(p, j)} ${s ? "!text-gray-300 cursor-not-allowed !bg-transparent" : ""}`;
23
- return a ? /* @__PURE__ */ t.jsxs(
24
+ return a ? /* @__PURE__ */ e.jsxs(
24
25
  "a",
25
26
  {
26
27
  href: a,
@@ -28,27 +29,27 @@ const g = ({
28
29
  onClick: n,
29
30
  "aria-disabled": s,
30
31
  children: [
31
- e && /* @__PURE__ */ t.jsx(
32
+ t && /* @__PURE__ */ e.jsx(
32
33
  u,
33
34
  {
34
- icon: e,
35
+ icon: t,
35
36
  className: f()
36
37
  }
37
38
  ),
38
39
  r
39
40
  ]
40
41
  }
41
- ) : /* @__PURE__ */ t.jsxs(
42
+ ) : /* @__PURE__ */ e.jsxs(
42
43
  "button",
43
44
  {
44
45
  className: `${l} ${m || ""}`,
45
46
  onClick: n,
46
47
  disabled: s,
47
48
  children: [
48
- e && /* @__PURE__ */ t.jsx(
49
+ t && /* @__PURE__ */ e.jsx(
49
50
  u,
50
51
  {
51
- icon: e,
52
+ icon: t,
52
53
  className: f()
53
54
  }
54
55
  ),
@@ -58,5 +59,5 @@ const g = ({
58
59
  );
59
60
  };
60
61
  export {
61
- g as default
62
+ w as default
62
63
  };
@@ -1,8 +1,9 @@
1
1
  import { j as s } from "../../../../_virtual/jsx-runtime.js";
2
- import { FontAwesomeIcon as i } from "../../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
3
- import { useTheme as j } from "../../../../hooks/useTheme.js";
4
- import { resolveSectionButtonClasses as p, resolveSectionButtonIconClasses as f } from "./MobileSectionButton.styles.js";
5
- const S = ({
2
+ import { FontAwesomeIcon as u } from "../../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
3
+ import { useTheme as h } from "../../../../hooks/useTheme.js";
4
+ import "react";
5
+ import { resolveSectionButtonClasses as j, resolveSectionButtonIconClasses as f } from "./MobileSectionButton.styles.js";
6
+ const v = ({
6
7
  label: m,
7
8
  href: n,
8
9
  onClick: o,
@@ -10,15 +11,15 @@ const S = ({
10
11
  disabled: e = !1,
11
12
  className: l,
12
13
  icon: t,
13
- color: d
14
+ color: p
14
15
  }) => {
15
- const { defaultColorScheme: h } = j(), a = d || h, c = (u) => {
16
+ const { defaultColorScheme: d } = h(), a = p || d, c = (i) => {
16
17
  if (e) {
17
- u.preventDefault();
18
+ i.preventDefault();
18
19
  return;
19
20
  }
20
- o == null || o(u);
21
- }, x = `${p(r, a)} ${e ? "!text-gray-300 cursor-not-allowed !bg-transparent" : ""}`;
21
+ o == null || o(i);
22
+ }, x = `${j(r, a)} ${e ? "!text-gray-300 cursor-not-allowed !bg-transparent" : ""}`;
22
23
  return n ? /* @__PURE__ */ s.jsxs(
23
24
  "a",
24
25
  {
@@ -28,7 +29,7 @@ const S = ({
28
29
  "aria-disabled": e,
29
30
  children: [
30
31
  t && /* @__PURE__ */ s.jsx("div", { className: f(r, a), children: /* @__PURE__ */ s.jsx(
31
- i,
32
+ u,
32
33
  {
33
34
  icon: t,
34
35
  className: "size-16 max-h-16 max-w-16"
@@ -45,7 +46,7 @@ const S = ({
45
46
  disabled: e,
46
47
  children: [
47
48
  t && /* @__PURE__ */ s.jsx("div", { className: f(r, a), children: /* @__PURE__ */ s.jsx(
48
- i,
49
+ u,
49
50
  {
50
51
  icon: t,
51
52
  className: "size-16 max-h-16 max-w-16"
@@ -57,5 +58,5 @@ const S = ({
57
58
  );
58
59
  };
59
60
  export {
60
- S as default
61
+ v as default
61
62
  };
@@ -2,7 +2,8 @@ import { j as t } from "../../../_virtual/jsx-runtime.js";
2
2
  import { FontAwesomeIcon as f } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
3
3
  import { resolveSidebarButtonColors as d } from "./SidebarButton.styles.js";
4
4
  import { useTheme as h } from "../../../hooks/useTheme.js";
5
- const y = ({
5
+ import "react";
6
+ const j = ({
6
7
  active: o,
7
8
  icon: l,
8
9
  label: n,
@@ -58,5 +59,5 @@ const y = ({
58
59
  );
59
60
  };
60
61
  export {
61
- y as default
62
+ j as default
62
63
  };
@@ -1,6 +1,7 @@
1
1
  import { j as s } from "../../../_virtual/jsx-runtime.js";
2
2
  import { useTheme as t } from "../../../hooks/useTheme.js";
3
- const l = ({ active: n, onClick: e }) => {
3
+ import "react";
4
+ const i = ({ active: n, onClick: e }) => {
4
5
  const { defaultColorScheme: o } = t();
5
6
  return /* @__PURE__ */ s.jsxs(
6
7
  "button",
@@ -29,5 +30,5 @@ const l = ({ active: n, onClick: e }) => {
29
30
  );
30
31
  };
31
32
  export {
32
- l as default
33
+ i as default
33
34
  };
@@ -1,6 +1,7 @@
1
1
  import { j as n } from "../../../_virtual/jsx-runtime.js";
2
2
  import { resolveTextButtonClasses as u } from "./TextButton.styles.js";
3
3
  import { useTheme as a } from "../../../hooks/useTheme.js";
4
+ import "react";
4
5
  const c = ({
5
6
  color: t,
6
7
  children: o,
@@ -1,7 +1,8 @@
1
1
  import { j as o } from "../../../_virtual/jsx-runtime.js";
2
2
  import { useController as w } from "react-hook-form";
3
3
  import { useTheme as v } from "../../../hooks/useTheme.js";
4
- const I = ({
4
+ import "react";
5
+ const S = ({
5
6
  label: c,
6
7
  control: x,
7
8
  name: e,
@@ -94,5 +95,5 @@ const I = ({
94
95
  );
95
96
  };
96
97
  export {
97
- I as default
98
+ S as default
98
99
  };
@@ -1,16 +1,17 @@
1
1
  import { j as o } from "../../../_virtual/jsx-runtime.js";
2
2
  import { useTheme as h } from "../../../hooks/useTheme.js";
3
- const j = ({
3
+ import "react";
4
+ const w = ({
4
5
  label: x,
5
6
  onChange: p,
6
7
  value: s,
7
8
  name: t,
8
9
  error: l,
9
- placeholder: b,
10
- className: g = "",
10
+ placeholder: i,
11
+ className: b = "",
11
12
  disabled: e = !1,
12
13
  disabledInput: n = !1,
13
- size: i = "base",
14
+ size: g = "base",
14
15
  leftSide: a,
15
16
  rightSide: c,
16
17
  ...d
@@ -30,11 +31,11 @@ const j = ({
30
31
  error: "text-label",
31
32
  gap: "gap-8"
32
33
  }
33
- }[i];
34
+ }[g];
34
35
  return /* @__PURE__ */ o.jsxs(
35
36
  "label",
36
37
  {
37
- className: `flex flex-col group select-none ${r.gap} ${e && "cursor-not-allowed"} ${g}`,
38
+ className: `flex flex-col group select-none ${r.gap} ${e && "cursor-not-allowed"} ${b}`,
38
39
  htmlFor: t,
39
40
  children: [
40
41
  /* @__PURE__ */ o.jsx(
@@ -74,7 +75,7 @@ const j = ({
74
75
  id: t,
75
76
  name: t,
76
77
  disabled: e,
77
- placeholder: b,
78
+ placeholder: i,
78
79
  value: s,
79
80
  onChange: (f) => {
80
81
  p(f.target.value);
@@ -92,5 +93,5 @@ const j = ({
92
93
  );
93
94
  };
94
95
  export {
95
- j as default
96
+ w as default
96
97
  };
@@ -10,7 +10,7 @@ import { offset as re, flip as se, shift as oe, size as ne } from "../../../node
10
10
  const ge = ({
11
11
  name: p,
12
12
  error: c,
13
- value: r,
13
+ value: r = "",
14
14
  onChange: n,
15
15
  onOptionClick: u,
16
16
  onKeyDown: y,
@@ -5,7 +5,7 @@ export interface AutocompleteInputProps {
5
5
  onChange?: (value: string) => void;
6
6
  onSelect?: (value: unknown) => void;
7
7
  onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
8
- onOptionClick?: (option: {
8
+ onOptionClick?: ({ label, value }: {
9
9
  label: string;
10
10
  value: unknown;
11
11
  }) => void;
@@ -8,6 +8,7 @@ export type DateInputProps<T extends FieldValues = FieldValues> = {
8
8
  translateKey?: string;
9
9
  futureDates?: boolean;
10
10
  pastDates?: boolean;
11
+ size?: "sm" | "base";
11
12
  };
12
- declare const DateInput: <T extends FieldValues = FieldValues>({ control, name, showTimeSelector, label, translateKey, placeholder, futureDates, pastDates }: DateInputProps<T>) => React.ReactElement;
13
+ declare const DateInput: <T extends FieldValues = FieldValues>({ control, name, showTimeSelector, label, translateKey, placeholder, futureDates, pastDates, size, }: DateInputProps<T>) => React.ReactElement;
13
14
  export default DateInput;
@@ -1,50 +1,60 @@
1
1
  import { j as c } from "../../../_virtual/jsx-runtime.js";
2
- import { useState as x, useEffect as E } from "react";
3
- import { useController as V } from "react-hook-form";
4
- import { faX as k } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
5
- import { FontAwesomeIcon as A } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
6
- import B from "../FloatingMenu/FloatingMenu.js";
7
- import K from "../CalendarSelector/CalendarSelector.js";
8
- import O from "../../atoms/UncontrolledTextInput/UncontrolledTextInput.js";
9
- import { useTheme as R } from "../../../hooks/useTheme.js";
10
- import { formatDate as U } from "../../../node_modules/date-fns/format.js";
11
- const N = (a) => U(a, "dd/MM/yyyy"), D = (a) => {
2
+ import { useState as x, useEffect as V } from "react";
3
+ import { useController as k } from "react-hook-form";
4
+ import { faX as A } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
5
+ import { FontAwesomeIcon as B } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
6
+ import K from "../FloatingMenu/FloatingMenu.js";
7
+ import O from "../CalendarSelector/CalendarSelector.js";
8
+ import R from "../../atoms/UncontrolledTextInput/UncontrolledTextInput.js";
9
+ import { useTheme as U } from "../../../hooks/useTheme.js";
10
+ import { formatDate as X } from "../../../node_modules/date-fns/format.js";
11
+ const N = (a) => X(a, "dd/MM/yyyy"), D = (a) => {
12
12
  const [t, n, o] = a.split("/");
13
13
  if ((t == null ? void 0 : t.length) === 2 && (n == null ? void 0 : n.length) === 2 && (o == null ? void 0 : o.length) === 4) {
14
14
  const l = new Date(Number(o), Number(n) - 1, Number(t));
15
15
  return isNaN(l.getTime()) ? null : l;
16
16
  }
17
17
  return null;
18
- }, Y = ({ control: a, name: t, showTimeSelector: n = !1, label: o, translateKey: l = "", placeholder: j, futureDates: I = !1, pastDates: b = !0 }) => {
18
+ }, Z = ({
19
+ control: a,
20
+ name: t,
21
+ showTimeSelector: n = !1,
22
+ label: o,
23
+ translateKey: l = "",
24
+ placeholder: j,
25
+ futureDates: I = !1,
26
+ pastDates: b = !0,
27
+ size: S
28
+ }) => {
19
29
  const {
20
- field: { value: i, onChange: p, onBlur: S },
30
+ field: { value: i, onChange: p, onBlur: T },
21
31
  fieldState: { error: m }
22
- } = V({ name: t, control: a }), { t: g } = R(), T = g(t), v = g(l), [y, f] = x(!1), [h, r] = x("");
23
- E(() => {
32
+ } = k({ name: t, control: a }), { t: g } = U(), v = g(t), y = g(l), [F, f] = x(!1), [h, r] = x("");
33
+ V(() => {
24
34
  i instanceof Date && !isNaN(i.getTime()) ? r(N(i)) : r("");
25
35
  }, [i]);
26
- const C = D(h), F = (e) => {
36
+ const C = D(h), M = (e) => {
27
37
  const s = e.replace(/\D/g, "").slice(0, 8), u = [];
28
38
  s.length > 0 && u.push(s.slice(0, 2)), s.length > 2 && u.push(s.slice(2, 4)), s.length > 4 && u.push(s.slice(4, 8));
29
39
  const d = u.join("/");
30
40
  if (r(d), f(!1), d.length === 10) {
31
- const w = D(d);
32
- p(w);
41
+ const E = D(d);
42
+ p(E);
33
43
  }
34
- }, M = () => {
44
+ }, w = () => {
35
45
  p(null), r("");
36
46
  };
37
47
  return /* @__PURE__ */ c.jsx(
38
- B,
48
+ K,
39
49
  {
40
- open: y,
50
+ open: F,
41
51
  strategy: "fixed",
42
52
  padding: 0,
43
53
  offset: 0,
44
54
  onClose: () => f(!1),
45
55
  className: "p-0!",
46
56
  component: /* @__PURE__ */ c.jsx(
47
- K,
57
+ O,
48
58
  {
49
59
  date: C || /* @__PURE__ */ new Date(),
50
60
  onDateChange: (e) => {
@@ -56,25 +66,26 @@ const N = (a) => U(a, "dd/MM/yyyy"), D = (a) => {
56
66
  }
57
67
  ),
58
68
  children: /* @__PURE__ */ c.jsx(
59
- O,
69
+ R,
60
70
  {
61
- onBlur: S,
62
- name: v || T,
71
+ size: S,
72
+ onBlur: T,
73
+ name: y || v,
63
74
  label: o,
64
75
  value: h,
65
76
  onFocus: (e) => {
66
77
  e.preventDefault(), f(!0);
67
78
  },
68
79
  disabledInput: !0,
69
- onChange: (e) => F(e),
80
+ onChange: (e) => M(e),
70
81
  placeholder: j,
71
82
  error: m == null ? void 0 : m.message,
72
83
  rightSide: !!C && /* @__PURE__ */ c.jsx(
73
- A,
84
+ B,
74
85
  {
75
- icon: k,
86
+ icon: A,
76
87
  className: "text-gray-500 cursor-pointer",
77
- onClick: M
88
+ onClick: w
78
89
  }
79
90
  )
80
91
  }
@@ -83,5 +94,5 @@ const N = (a) => U(a, "dd/MM/yyyy"), D = (a) => {
83
94
  );
84
95
  };
85
96
  export {
86
- Y as default
97
+ Z as default
87
98
  };
@@ -0,0 +1,13 @@
1
+ import { IconProp } from '@fortawesome/fontawesome-svg-core';
2
+ import { FilterControl } from '../../../types/filters';
3
+ import { Cycle } from 'motion/react';
4
+ interface FiltersMenuProps {
5
+ filters: {
6
+ icon: IconProp;
7
+ label: string;
8
+ onClick: () => void;
9
+ }[];
10
+ filterControl: FilterControl<Cycle>;
11
+ }
12
+ declare const FiltersMenu: React.FC<FiltersMenuProps>;
13
+ export default FiltersMenu;
@@ -0,0 +1 @@
1
+ export { default as FiltersMenu } from './FiltersMenu';
@@ -1,6 +1,9 @@
1
1
  interface PillsContainerProps {
2
- values: string[];
3
- onPillRemove: (index: number) => void;
2
+ values: {
3
+ label: string;
4
+ value: string;
5
+ }[];
6
+ onPillRemove: (id: string) => void;
4
7
  }
5
8
  declare const PillsContainer: ({ values, onPillRemove, }: PillsContainerProps) => React.ReactElement;
6
9
  export default PillsContainer;
@@ -1,60 +1,66 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
2
  import a from "../../atoms/Pill/Pill.js";
3
- import { faChevronUp as x, faChevronDown as p } from "../../../node_modules/@fortawesome/pro-light-svg-icons/index.js";
4
- import { FontAwesomeIcon as l } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
3
+ import { faChevronUp as m, faChevronDown as x } from "../../../node_modules/@fortawesome/pro-light-svg-icons/index.js";
4
+ import { FontAwesomeIcon as r } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
5
5
  import { useState as d } from "react";
6
- import { AnimatePresence as f } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
7
- import { motion as h } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
8
- const C = ({
9
- values: o,
10
- onPillRemove: r
6
+ import { AnimatePresence as p } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
7
+ import { motion as f } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
8
+ const y = ({
9
+ values: n,
10
+ onPillRemove: o
11
11
  }) => {
12
- const [i, c] = d(!1), m = o.slice(0, 3), s = o.slice(3);
12
+ const [s, l] = d(!1), c = n.slice(0, 3), i = n.slice(3);
13
13
  return /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-start gap-20", children: [
14
14
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 gap-4", children: [
15
- m.map((t, n) => /* @__PURE__ */ e.jsx(
15
+ c.map((t) => /* @__PURE__ */ e.jsx(
16
16
  a,
17
17
  {
18
- label: t,
19
- onRemove: () => r(n)
18
+ label: t.label,
19
+ onRemove: () => o(t.value)
20
20
  },
21
- t
21
+ t.value
22
22
  )),
23
- /* @__PURE__ */ e.jsx(f, { children: i && s.map((t, n) => /* @__PURE__ */ e.jsx(
24
- h.div,
23
+ /* @__PURE__ */ e.jsx(p, { children: s && i.map((t) => /* @__PURE__ */ e.jsx(
24
+ f.div,
25
25
  {
26
26
  initial: { opacity: 0, scale: 0.8 },
27
27
  animate: { opacity: 1, scale: 1 },
28
28
  exit: { opacity: 0, scale: 0.8 },
29
29
  transition: { duration: 0.2 },
30
- children: /* @__PURE__ */ e.jsx(a, { label: t, onRemove: () => r(n) })
30
+ children: /* @__PURE__ */ e.jsx(
31
+ a,
32
+ {
33
+ label: t.label,
34
+ onRemove: () => o(t.value)
35
+ }
36
+ )
31
37
  },
32
- t
38
+ t.value
33
39
  )) })
34
40
  ] }),
35
- s.length > 0 && /* @__PURE__ */ e.jsx(
41
+ i.length > 0 && /* @__PURE__ */ e.jsx(
36
42
  "button",
37
43
  {
38
44
  type: "button",
39
- onClick: () => c(!i),
45
+ onClick: () => l(!s),
40
46
  className: "flex items-center gap-8 w-fit text-blue-500 font-semibold text-14 transition hover:text-blue-700 text-nowrap shrink-0",
41
- children: i ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
47
+ children: s ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
42
48
  /* @__PURE__ */ e.jsx("p", { children: "Ocultar" }),
43
49
  " ",
44
- /* @__PURE__ */ e.jsx(l, { icon: x })
50
+ /* @__PURE__ */ e.jsx(r, { icon: m })
45
51
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
46
52
  /* @__PURE__ */ e.jsxs("p", { children: [
47
53
  "Ver ",
48
- s.length,
54
+ i.length,
49
55
  " más"
50
56
  ] }),
51
57
  " ",
52
- /* @__PURE__ */ e.jsx(l, { icon: p })
58
+ /* @__PURE__ */ e.jsx(r, { icon: x })
53
59
  ] })
54
60
  }
55
61
  )
56
62
  ] });
57
63
  };
58
64
  export {
59
- C as default
65
+ y as default
60
66
  };
@@ -11,5 +11,6 @@ export type UncontrolledDateInputProps = {
11
11
  minDate?: Date;
12
12
  maxDate?: Date;
13
13
  customDisplay?: React.ReactNode;
14
+ size?: "sm" | "base";
14
15
  };
15
- export default function UncontrolledDateInput({ currentDate, onDateChange, label, placeholder, error, translatedKey, showTimeSelector, futureDates, pastDates, minDate, maxDate, customDisplay, }: UncontrolledDateInputProps): import("react/jsx-runtime").JSX.Element;
16
+ export default function UncontrolledDateInput({ currentDate, onDateChange, label, placeholder, error, translatedKey, showTimeSelector, futureDates, pastDates, minDate, maxDate, customDisplay, size, }: UncontrolledDateInputProps): import("react/jsx-runtime").JSX.Element;