@xola/ui-kit 3.4.6 → 3.5.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.
Files changed (58) hide show
  1. package/build/components/Alert.js +4 -8
  2. package/build/components/Avatar.js +4 -4
  3. package/build/components/Badge.d.ts +2 -2
  4. package/build/components/Badge.js +19 -19
  5. package/build/components/Breadcrumb.js +1 -1
  6. package/build/components/Breakdown.js +20 -20
  7. package/build/components/Buttons/Button.js +1 -1
  8. package/build/components/Buttons/ButtonGroup.js +8 -8
  9. package/build/components/Buttons/SubmitButton.js +13 -13
  10. package/build/components/Buttons/ToggleButton.js +1 -1
  11. package/build/components/Counter.js +1 -1
  12. package/build/components/DatePicker/DatePicker.js +19 -19
  13. package/build/components/DatePicker/DatePickerPopover.js +7 -7
  14. package/build/components/DatePicker/Day.js +1 -1
  15. package/build/components/DatePicker/LocalizedDayPicker.js +14 -14
  16. package/build/components/DatePicker/MonthGrid.js +4 -4
  17. package/build/components/DatePicker/NavbarElement.js +3 -3
  18. package/build/components/DatePicker/RangeDatePicker.js +3 -7
  19. package/build/components/DatePicker/UpcomingDatePicker.js +14 -14
  20. package/build/components/Dot/Dot.js +4 -4
  21. package/build/components/Drawer.js +5 -5
  22. package/build/components/Forms/BaseInput.js +4 -4
  23. package/build/components/Forms/Checkbox.js +5 -5
  24. package/build/components/Forms/ComboBox.js +10 -10
  25. package/build/components/Forms/FormGroup.js +3 -3
  26. package/build/components/Forms/InlineValuePopover.js +9 -9
  27. package/build/components/Forms/Input.js +5 -5
  28. package/build/components/Forms/Label.js +3 -3
  29. package/build/components/Forms/RangeSlider.js +14 -14
  30. package/build/components/Forms/Switch.js +15 -15
  31. package/build/components/Forms/Textarea.js +4 -4
  32. package/build/components/HeaderToolbar.js +1 -1
  33. package/build/components/ImageUpload.js +1 -1
  34. package/build/components/Key.js +6 -6
  35. package/build/components/Logo.js +4 -4
  36. package/build/components/Modal.js +1 -1
  37. package/build/components/Popover/Popover.js +6 -12
  38. package/build/components/Popover/PopoverList.js +9 -18
  39. package/build/components/Search.js +7 -7
  40. package/build/components/Sidebar/Sidebar.Account.js +5 -5
  41. package/build/components/Sidebar/Sidebar.Button.js +4 -4
  42. package/build/components/Sidebar/Sidebar.Heading.js +4 -4
  43. package/build/components/Sidebar/Sidebar.Link.js +21 -20
  44. package/build/components/Sidebar/Sidebar.Menu.d.ts +3 -0
  45. package/build/components/Sidebar/Sidebar.Menu.js +15 -13
  46. package/build/components/Sidebar/Sidebar.js +1 -1
  47. package/build/components/Skeleton.js +7 -7
  48. package/build/components/Spinner.js +1 -1
  49. package/build/components/Table.js +1 -1
  50. package/build/components/Tabs/Tabs.Panel.js +5 -5
  51. package/build/components/Tabs/Tabs.Tab.js +7 -7
  52. package/build/components/Tabs/Tabs.js +7 -7
  53. package/build/components/Tag.js +9 -9
  54. package/build/components/Utilities/Phone.js +3 -3
  55. package/build/full.css +1 -1
  56. package/build/helpers/classnames.js +8 -0
  57. package/build/helpers/flash.js +4 -4
  58. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- import { jsxs as n, jsx as l } from "react/jsx-runtime";
2
- import c from "clsx";
3
- import t from "dayjs";
4
- const f = ({ value: o, upcomingDates: r, onChange: d, onMonthChange: i }) => /* @__PURE__ */ n("div", { className: "rounded-l-lg border-r border-gray pt-8", children: [
5
- /* @__PURE__ */ l("p", { className: "mb-2 px-6 text-lg font-bold", children: "Upcoming" }),
6
- (r == null ? void 0 : r.length) > 0 ? /* @__PURE__ */ l("div", { className: "mt-5", children: r == null ? void 0 : r.map((e) => {
7
- const m = t(e).isSame(t(o), "day"), s = t(e).format();
8
- return /* @__PURE__ */ l(
1
+ import { jsxs as b, jsx as t } from "react/jsx-runtime";
2
+ import l from "dayjs";
3
+ import c from "../../helpers/classnames.js";
4
+ const x = ({ value: o, upcomingDates: r, onChange: d, onMonthChange: i }) => /* @__PURE__ */ b("div", { className: "rounded-l-lg border-r border-gray pt-8", children: [
5
+ /* @__PURE__ */ t("p", { className: "mb-2 px-6 text-lg font-bold", children: "Upcoming" }),
6
+ (r == null ? void 0 : r.length) > 0 ? /* @__PURE__ */ t("div", { className: "mt-5", children: r == null ? void 0 : r.map((e) => {
7
+ const m = l(e).isSame(l(o), "day"), n = l(e).format();
8
+ return /* @__PURE__ */ t(
9
9
  "div",
10
10
  {
11
11
  className: c(
@@ -13,15 +13,15 @@ const f = ({ value: o, upcomingDates: r, onChange: d, onMonthChange: i }) => /*
13
13
  "rounded border border-gray py-3 hover:border-blue hover:bg-blue hover:text-white",
14
14
  { "border-blue bg-blue text-white": m }
15
15
  ),
16
- onClick: (b) => {
17
- d(e, {}, b), i(e);
16
+ onClick: (s) => {
17
+ d(e, {}, s), i(e);
18
18
  },
19
- children: t(e).format("ddd DD MMMM")
19
+ children: l(e).format("ddd DD MMMM")
20
20
  },
21
- s
21
+ n
22
22
  );
23
- }) }) : /* @__PURE__ */ l("div", { className: "mx-6 mt-7 max-w-40 items-center justify-center rounded bg-yellow-lighter p-3", children: "There is no future availability for this product." })
23
+ }) }) : /* @__PURE__ */ t("div", { className: "mx-6 mt-7 max-w-40 items-center justify-center rounded bg-yellow-lighter p-3", children: "There is no future availability for this product." })
24
24
  ] });
25
25
  export {
26
- f as UpcomingDatePicker
26
+ x as UpcomingDatePicker
27
27
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import a from "clsx";
2
+ import a from "../../helpers/classnames.js";
3
3
  const i = {
4
4
  primary: "bg-primary",
5
5
  secondary: "bg-secondary",
@@ -12,11 +12,11 @@ const i = {
12
12
  medium: "h-1.5 w-1.5",
13
13
  large: "h-2 w-2",
14
14
  xlarge: "h-8 w-8"
15
- }, g = ({ color: r = "primary", size: s = "medium", className: e, ...n }) => /* @__PURE__ */ o(
15
+ }, g = ({ color: r = "primary", size: n = "medium", className: s, ...e }) => /* @__PURE__ */ o(
16
16
  "span",
17
17
  {
18
- className: a("ui-dot", "inline-block rounded-full text-white", i[r], c[s], e),
19
- ...n
18
+ className: a("ui-dot", "inline-block rounded-full text-white", i[r], c[n], s),
19
+ ...e
20
20
  }
21
21
  );
22
22
  export {
@@ -1,8 +1,8 @@
1
1
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
2
  import { Transition as o, Dialog as s } from "@headlessui/react";
3
- import l from "clsx";
4
3
  import { forwardRef as v, Fragment as m } from "react";
5
4
  import { isIosBrowser as g } from "../helpers/browser.js";
5
+ import l from "../helpers/classnames.js";
6
6
  import { useViewportHeight as y } from "../hooks/useViewportHeight.js";
7
7
  import { Button as b } from "./Buttons/Button.js";
8
8
  import { CloseIcon as N } from "../icons/src/CloseIcon.js";
@@ -18,8 +18,8 @@ const T = {
18
18
  isOpen: i = !1,
19
19
  title: f,
20
20
  size: u = "medium",
21
- content: x,
22
- sideIndent: h = 0,
21
+ content: h,
22
+ sideIndent: x = 0,
23
23
  position: r = "right",
24
24
  classNames: t = {},
25
25
  onClose: a
@@ -66,7 +66,7 @@ const T = {
66
66
  "div",
67
67
  {
68
68
  style: {
69
- [r === "right" ? "right" : "left"]: `${h ?? 0}px`
69
+ [r === "right" ? "right" : "left"]: `${x ?? 0}px`
70
70
  },
71
71
  className: l("fixed inset-y-0 flex max-w-full", t.dialogContent),
72
72
  children: /* @__PURE__ */ e(
@@ -91,7 +91,7 @@ const T = {
91
91
  ),
92
92
  children: [
93
93
  /* @__PURE__ */ e("div", { className: "w-full", children: /* @__PURE__ */ e(s.Title, { children: f }) }),
94
- /* @__PURE__ */ e("div", { className: l("relative mt-3 flex-1", t.content), children: x })
94
+ /* @__PURE__ */ e("div", { className: l("relative mt-3 flex-1", t.content), children: h })
95
95
  ]
96
96
  }
97
97
  ),
@@ -1,7 +1,7 @@
1
- import { jsxs as x, jsx as s } from "react/jsx-runtime";
2
- import y from "clsx";
1
+ import { jsxs as y, jsx as s } from "react/jsx-runtime";
3
2
  import { isString as i, isEmpty as l } from "lodash-es";
4
3
  import { forwardRef as u } from "react";
4
+ import x from "../../helpers/classnames.js";
5
5
  import { Dot as h } from "../Dot/Dot.js";
6
6
  const k = {
7
7
  small: "px-3 py-1.5 text-sm leading-sm",
@@ -14,12 +14,12 @@ const k = {
14
14
  let e = r;
15
15
  return a && (e = e.replace(new RegExp(`^${a}`), "")), o && (e = e.replace(new RegExp(`${o}$`), "")), e.replaceAll(/[^.\S]+/g, "").replace(/[\p{Sc}]/u, "");
16
16
  }, b = i(r) ? l(f()) : l(r == null ? void 0 : r.toString());
17
- return /* @__PURE__ */ x("div", { className: "relative flex w-full items-center", children: [
17
+ return /* @__PURE__ */ y("div", { className: "relative flex w-full items-center", children: [
18
18
  /* @__PURE__ */ s(
19
19
  t,
20
20
  {
21
21
  ref: m,
22
- className: y(
22
+ className: x(
23
23
  "w-full rounded text-gray-darker placeholder-gray-dark hover:placeholder-gray-darker disabled:text-gray",
24
24
  "border hover:border-black hover:bg-gray-lighter focus:text-black active:text-black disabled:bg-gray-lighter",
25
25
  k[d],
@@ -1,10 +1,10 @@
1
- import { jsxs as s, jsx as c } from "react/jsx-runtime";
2
- import e from "clsx";
1
+ import { jsxs as n, jsx as c } from "react/jsx-runtime";
2
+ import e from "../../helpers/classnames.js";
3
3
  import { useId as d } from "../../hooks/useId.js";
4
- import n from "./Checkbox.module.css.js";
4
+ import s from "./Checkbox.module.css.js";
5
5
  const m = ({ label: r, classNames: o = {}, className: i, ...l }) => {
6
6
  const t = d("checkbox");
7
- return /* @__PURE__ */ s("div", { className: e("ui-checkbox", i, "flex items-center"), children: [
7
+ return /* @__PURE__ */ n("div", { className: e("ui-checkbox", i, "flex items-center"), children: [
8
8
  /* @__PURE__ */ c(
9
9
  "input",
10
10
  {
@@ -12,7 +12,7 @@ const m = ({ label: r, classNames: o = {}, className: i, ...l }) => {
12
12
  className: e(
13
13
  "ui-checkbox-input",
14
14
  o.checkbox,
15
- n.checkbox,
15
+ s.checkbox,
16
16
  "h-4 w-4 rounded !border-primary text-white transition-colors disabled:border-none disabled:bg-gray-light disabled:text-gray-light"
17
17
  ),
18
18
  ...l,
@@ -1,25 +1,25 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import i from "clsx";
3
- import { useRef as c, useState as s, useEffect as m } from "react";
4
- import u, { components as f } from "react-select";
5
- import d from "react-select/creatable";
2
+ import { useRef as i, useState as c, useEffect as s } from "react";
3
+ import m, { components as u } from "react-select";
4
+ import f from "react-select/creatable";
5
+ import d from "../../helpers/classnames.js";
6
6
  import { Tooltip as b } from "../Tooltip.js";
7
7
  /* empty css */
8
8
  const R = ({ isCreatable: e = !1, isError: t, className: l, ...n }) => /* @__PURE__ */ o(
9
- e ? d : u,
9
+ e ? f : m,
10
10
  {
11
- className: i("ui-combo-box", t && "border-danger", l),
11
+ className: d("ui-combo-box", t && "border-danger", l),
12
12
  classNamePrefix: "ui-combo-box",
13
13
  components: e ? {
14
14
  IndicatorsContainer: () => null,
15
15
  Menu: () => null,
16
- MultiValueLabel: x
16
+ MultiValueLabel: h
17
17
  } : void 0,
18
18
  ...n
19
19
  }
20
- ), { MultiValueLabel: p } = f, x = (e) => {
21
- const t = c(null), [l, n] = s(!0);
22
- return m(() => {
20
+ ), { MultiValueLabel: p } = u, h = (e) => {
21
+ const t = i(null), [l, n] = c(!0);
22
+ return s(() => {
23
23
  var r;
24
24
  if ((r = t.current) != null && r.offsetParent) {
25
25
  const a = t.current.offsetWidth > t.current.offsetParent.clientWidth;
@@ -1,6 +1,6 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import p from "clsx";
3
- const i = ({ className: r, ...o }) => /* @__PURE__ */ m("div", { className: p("ui-form-group", r, "mb-4"), ...o });
2
+ import p from "../../helpers/classnames.js";
3
+ const s = ({ className: r, ...o }) => /* @__PURE__ */ m("div", { className: p("ui-form-group", r, "mb-4"), ...o });
4
4
  export {
5
- i as FormGroup
5
+ s as FormGroup
6
6
  };
@@ -1,13 +1,13 @@
1
1
  import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import i from "clsx";
3
2
  import { useRef as P } from "react";
4
- import { Popover as l } from "../Popover/Popover.js";
3
+ import i from "../../helpers/classnames.js";
4
+ import { Popover as f } from "../Popover/Popover.js";
5
5
  import { ValuePopoverText as g } from "./ValuePopoverText.js";
6
6
  import { DownArrowIcon as j } from "../../icons/src/DownArrowIcon.js";
7
7
  const D = ({
8
- text: f,
9
- isOpen: x = !1,
10
- showArrow: b = !0,
8
+ text: l,
9
+ isOpen: b = !1,
10
+ showArrow: x = !0,
11
11
  autoSelectOnClick: c = !1,
12
12
  children: h,
13
13
  error: p = null,
@@ -23,7 +23,7 @@ const D = ({
23
23
  n && (n.focus(), c && n.select());
24
24
  }, 0), o == null || o(I);
25
25
  };
26
- return /* @__PURE__ */ d(l, { visible: x, className: "", onClickOutside: v, ...m, children: [
26
+ return /* @__PURE__ */ d(f, { visible: b, className: "", onClickOutside: v, ...m, children: [
27
27
  /* @__PURE__ */ d(
28
28
  "span",
29
29
  {
@@ -34,12 +34,12 @@ const D = ({
34
34
  ),
35
35
  onClick: w,
36
36
  children: [
37
- /* @__PURE__ */ e("span", { className: i("border-b border-b-black font-bold text-black", r == null ? void 0 : r.textField), children: /* @__PURE__ */ e(g, { value: f, error: p }) }),
38
- b && /* @__PURE__ */ e(j, { size: "medium" })
37
+ /* @__PURE__ */ e("span", { className: i("border-b border-b-black font-bold text-black", r == null ? void 0 : r.textField), children: /* @__PURE__ */ e(g, { value: l, error: p }) }),
38
+ x && /* @__PURE__ */ e(j, { size: "medium" })
39
39
  ]
40
40
  }
41
41
  ),
42
- /* @__PURE__ */ e(l.Content, { children: /* @__PURE__ */ e("div", { ref: t, className: i("p-2", r == null ? void 0 : r.children), children: h }) })
42
+ /* @__PURE__ */ e(f.Content, { children: /* @__PURE__ */ e("div", { ref: t, className: i("p-2", r == null ? void 0 : r.children), children: h }) })
43
43
  ] });
44
44
  };
45
45
  export {
@@ -1,9 +1,9 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import s from "clsx";
3
- import { forwardRef as a } from "react";
2
+ import { forwardRef as n } from "react";
3
+ import a from "../../helpers/classnames.js";
4
4
  import { BaseInput as e } from "./BaseInput.js";
5
- const n = a(({ className: t, type: r = "text", value: o, ...p }, m) => /* @__PURE__ */ i(e, { ref: m, as: "input", className: s("ui-input", t), type: r, value: o, ...p }));
6
- n.displayName = "Input";
5
+ const s = n(({ className: t, type: r = "text", value: o, ...p }, m) => /* @__PURE__ */ i(e, { ref: m, as: "input", className: a("ui-input", t), type: r, value: o, ...p }));
6
+ s.displayName = "Input";
7
7
  export {
8
- n as Input
8
+ s as Input
9
9
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import r from "clsx";
3
- const m = ({ isDisabled: t = !1, isError: e = !1, className: l, ...a }) => /* @__PURE__ */ o(
2
+ import r from "../../helpers/classnames.js";
3
+ const s = ({ isDisabled: t = !1, isError: e = !1, className: l, ...a }) => /* @__PURE__ */ o(
4
4
  "label",
5
5
  {
6
6
  className: r(
@@ -13,5 +13,5 @@ const m = ({ isDisabled: t = !1, isError: e = !1, className: l, ...a }) => /* @_
13
13
  }
14
14
  );
15
15
  export {
16
- m as Label
16
+ s as Label
17
17
  };
@@ -1,35 +1,35 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
- import u from "clsx";
3
- import g from "nouislider-react";
2
+ import u from "nouislider-react";
4
3
  /* empty css */
4
+ import g from "../../helpers/classnames.js";
5
5
  /* empty css */
6
6
  const j = ({
7
7
  values: t,
8
8
  min: o,
9
9
  max: e,
10
10
  isDisabled: i = !1,
11
- shouldConnectHandles: s = !1,
12
- step: a = 1,
13
- isTooltipEnabled: l = !0,
14
- tooltipCustomFormatter: m = null,
15
- tooltipSuffix: n,
11
+ shouldConnectHandles: a = !1,
12
+ step: m = 1,
13
+ isTooltipEnabled: n = !0,
14
+ tooltipCustomFormatter: s = null,
15
+ tooltipSuffix: l,
16
16
  className: p,
17
17
  onChange: f
18
18
  }) => {
19
- const c = m ?? t.map(() => ({
19
+ const c = s ?? t.map(() => ({
20
20
  from: (r) => r,
21
- to: (r) => `${Math.round(r)}${n ?? ""}`
21
+ to: (r) => `${Math.round(r)}${l ?? ""}`
22
22
  }));
23
23
  return /* @__PURE__ */ d(
24
- g,
24
+ u,
25
25
  {
26
- className: u("ui-range-slider", p),
27
- connect: s,
26
+ className: g("ui-range-slider", p),
27
+ connect: a,
28
28
  disabled: i,
29
29
  start: t,
30
30
  range: { min: o, max: e },
31
- step: a,
32
- tooltips: l ? c : !1,
31
+ step: m,
32
+ tooltips: n ? c : !1,
33
33
  onChange: f
34
34
  }
35
35
  );
@@ -1,7 +1,7 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { jsx as t } from "react/jsx-runtime";
2
2
  import { Switch as s } from "@headlessui/react";
3
- import n from "clsx";
4
3
  import { noop as m } from "lodash-es";
4
+ import e from "../../helpers/classnames.js";
5
5
  const i = {
6
6
  large: {
7
7
  parent: "h-6 w-11",
@@ -18,38 +18,38 @@ const i = {
18
18
  inner: "h-2 w-2",
19
19
  translate: "translate-x-2"
20
20
  }
21
- }, p = ({ isChecked: r = !1, size: t = "medium", disabled: a, className: c, onChange: u }) => /* @__PURE__ */ e(
21
+ }, p = ({ isChecked: n = !1, size: r = "medium", disabled: a, className: c, onChange: u }) => /* @__PURE__ */ t(
22
22
  s,
23
23
  {
24
- checked: r,
24
+ checked: n,
25
25
  disabled: a,
26
- className: n(
26
+ className: e(
27
27
  "ui-switch",
28
- r ? "bg-primary disabled:bg-gray-light" : "bg-gray disabled:bg-gray-light",
28
+ n ? "bg-primary disabled:bg-gray-light" : "bg-gray disabled:bg-gray-light",
29
29
  "relative inline-flex flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none",
30
- i[t].parent,
30
+ i[r].parent,
31
31
  c
32
32
  ),
33
33
  onChange: u ?? m,
34
- children: /* @__PURE__ */ e(
34
+ children: /* @__PURE__ */ t(
35
35
  "span",
36
36
  {
37
- className: n(
38
- r ? i[t].translate : "translate-x-0",
37
+ className: e(
38
+ n ? i[r].translate : "translate-x-0",
39
39
  "ui-switch-inner pointer-events-none inline-block transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",
40
- i[t].inner
40
+ i[r].inner
41
41
  )
42
42
  }
43
43
  )
44
44
  }
45
- ), o = ({ children: r, className: t }) => /* @__PURE__ */ e(s.Group, { as: "div", className: n("ui-switch-group", "inline-flex items-center", t), children: r });
45
+ ), o = ({ children: n, className: r }) => /* @__PURE__ */ t(s.Group, { as: "div", className: e("ui-switch-group", "inline-flex items-center", r), children: n });
46
46
  o.displayName = "Switch.Group";
47
- const l = ({ direction: r = "left", children: t, className: a }) => /* @__PURE__ */ e(
47
+ const l = ({ direction: n = "left", children: r, className: a }) => /* @__PURE__ */ t(
48
48
  s.Label,
49
49
  {
50
50
  as: "span",
51
- className: n("ui-switch-label", "cursor-pointer", r === "left" ? "mr-2" : "ml-2", a),
52
- children: t
51
+ className: e("ui-switch-label", "cursor-pointer", n === "left" ? "mr-2" : "ml-2", a),
52
+ children: r
53
53
  }
54
54
  );
55
55
  l.displayName = "Switch.Label";
@@ -1,10 +1,10 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import i from "clsx";
3
- import { forwardRef as p } from "react";
2
+ import { forwardRef as x } from "react";
4
3
  import f from "react-textarea-autosize";
4
+ import i from "../../helpers/classnames.js";
5
5
  import { BaseInput as s } from "./BaseInput.js";
6
- const n = p(
7
- ({ className: a, value: r, shouldAutoSize: x = !1, rows: t = 2, ...e }, o) => x ? (
6
+ const n = x(
7
+ ({ className: a, value: r, shouldAutoSize: p = !1, rows: t = 2, ...e }, o) => p ? (
8
8
  // TextareaAutosize has a few special props like minRows and maxRows instead of rows field so using rows field to feed the minRows prop. See full list here https://github.com/Andarist/react-textarea-autosize?tab=readme-ov-file#props
9
9
  /* @__PURE__ */ m(
10
10
  s,
@@ -1,5 +1,5 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import o from "clsx";
2
+ import o from "../helpers/classnames.js";
3
3
  import { Search as c } from "./Search.js";
4
4
  import { Breadcrumb as d } from "./Breadcrumb.js";
5
5
  const l = ({ classNames: r, children: e }) => /* @__PURE__ */ a(
@@ -1,6 +1,6 @@
1
1
  import { jsxs as c, jsx as e, Fragment as B } from "react/jsx-runtime";
2
- import g from "clsx";
3
2
  import { useRef as R, useState as U } from "react";
3
+ import g from "../helpers/classnames.js";
4
4
  import { Button as w } from "./Buttons/Button.js";
5
5
  import { SubmitButton as u } from "./Buttons/SubmitButton.js";
6
6
  import { Logo as x } from "./Logo.js";
@@ -1,18 +1,18 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import l from "clsx";
3
2
  import { isOSX as t } from "../helpers/browser.js";
4
- const s = {
3
+ import c from "../helpers/classnames.js";
4
+ const l = {
5
5
  cmd: t ? "⌘" : "ctrl",
6
6
  option: t ? "⌥" : "win",
7
7
  ctrl: "ctrl",
8
8
  up: "↑",
9
9
  down: "↓"
10
- }, x = ({ char: e, className: n, ...o }) => {
11
- const r = s[e] ?? e;
10
+ }, y = ({ char: e, className: n, ...o }) => {
11
+ const r = l[e] ?? e;
12
12
  return /* @__PURE__ */ i(
13
13
  "div",
14
14
  {
15
- className: l(
15
+ className: c(
16
16
  "ui-key",
17
17
  "no-translate inline-flex h-5 items-center justify-center rounded bg-gray-lighter px-2 py-1 text-xs font-semibold text-gray",
18
18
  r.length === 1 && "w-5",
@@ -24,5 +24,5 @@ const s = {
24
24
  );
25
25
  };
26
26
  export {
27
- x as Key
27
+ y as Key
28
28
  };
@@ -1,10 +1,10 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import n from "clsx";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import r from "../helpers/classnames.js";
3
3
  const o = {
4
4
  small: "w-10 h-10",
5
5
  medium: "w-16 h-16",
6
6
  large: "w-20 h-20"
7
- }, r = ({ size: s = "small", className: e, ...m }) => /* @__PURE__ */ l("img", { className: n("ui-logo", e, "inline-block rounded object-cover", o[s]), ...m }), i = Object.assign(r, { sizes: o });
7
+ }, t = ({ size: e = "small", className: s, ...m }) => /* @__PURE__ */ n("img", { className: r("ui-logo", s, "inline-block rounded object-cover", o[e]), ...m }), l = Object.assign(t, { sizes: o });
8
8
  export {
9
- i as Logo
9
+ l as Logo
10
10
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
2
  import { Transition as s, Dialog as d } from "@headlessui/react";
3
- import o from "clsx";
4
3
  import { Fragment as m } from "react";
4
+ import o from "../helpers/classnames.js";
5
5
  import { CloseIcon as v } from "../icons/src/CloseIcon.js";
6
6
  const y = {
7
7
  small: "max-w-100",
@@ -1,28 +1,22 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import d from "@tippyjs/react";
3
- import u from "clsx";
4
3
  import { Children as y, forwardRef as g, useState as C } from "react";
4
+ import u from "../../helpers/classnames.js";
5
5
  import { followCursor as v } from "tippy.js";
6
6
  import "tippy.js/dist/border.css";
7
7
  import "tippy.js/dist/tippy.css";
8
- import { getChildrenByType as x } from "../../helpers/children.js";
9
- import T from "./Popover.module.css.js";
10
- import h from "./PopoverScroll.module.css.js";
8
+ import { getChildrenByType as T } from "../../helpers/children.js";
9
+ import h from "./Popover.module.css.js";
10
+ import x from "./PopoverScroll.module.css.js";
11
11
  const z = ({ isLazy: t = !0, skidding: o = 0, distance: r = 10, children: n, className: s, ...e }) => {
12
- const p = x(n, l), a = y.toArray(n).filter((i) => i.type !== l);
12
+ const p = T(n, l), a = y.toArray(n).filter((i) => i.type !== l);
13
13
  return /* @__PURE__ */ m(
14
14
  t ? f : d,
15
15
  {
16
16
  interactive: !0,
17
17
  zIndex: 50,
18
18
  content: p,
19
- className: u(
20
- "ui-popover",
21
- h,
22
- T.main,
23
- "!rounded-lg !border-gray-light shadow-xl",
24
- s
25
- ),
19
+ className: u("ui-popover", x, h.main, "!rounded-lg !border-gray-light shadow-xl", s),
26
20
  plugins: [v],
27
21
  offset: [o ?? 0, r ?? 10],
28
22
  ...e,
@@ -1,28 +1,19 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
- import g from "clsx";
3
2
  import v, { Children as h } from "react";
3
+ import g from "../../helpers/classnames.js";
4
4
  import { Popover as u } from "./Popover.js";
5
5
  import f from "./PopoverScroll.module.css.js";
6
- const y = ({ placement: n = "bottom", children: i, className: s, ...o }) => {
7
- const e = h.toArray(i), r = e.filter((t) => t.type !== l), m = e.length - r.length, c = e.map((t, a) => t.type === l ? v.cloneElement(t, { position: a, total: m }) : null), p = /* @__PURE__ */ d(
6
+ const y = ({ placement: l = "bottom", children: i, className: s, ...o }) => {
7
+ const e = h.toArray(i), r = e.filter((t) => t.type !== n), m = e.length - r.length, c = e.map((t, a) => t.type === n ? v.cloneElement(t, { position: a, total: m }) : null), p = /* @__PURE__ */ d(
8
8
  u.Content,
9
9
  {
10
10
  className: g(f, "ui-popover-list-content divide-y divide-solid divide-gray-lighter p-0 "),
11
11
  children: c
12
12
  }
13
13
  );
14
- return /* @__PURE__ */ d(
15
- u,
16
- {
17
- content: p,
18
- placement: n,
19
- className: g("ui-popover-list", "w-40", s),
20
- ...o,
21
- children: r
22
- }
23
- );
24
- }, l = ({
25
- name: n,
14
+ return /* @__PURE__ */ d(u, { content: p, placement: l, className: g("ui-popover-list", "w-40", s), ...o, children: r });
15
+ }, n = ({
16
+ name: l,
26
17
  isActive: i = !1,
27
18
  id: s = null,
28
19
  position: o,
@@ -32,7 +23,7 @@ const y = ({ placement: n = "bottom", children: i, className: s, ...o }) => {
32
23
  onClickItem: c,
33
24
  ...p
34
25
  }) => {
35
- const t = (a) => c(a, n, s);
26
+ const t = (a) => c(a, l, s);
36
27
  return /* @__PURE__ */ d(
37
28
  "div",
38
29
  {
@@ -52,8 +43,8 @@ const y = ({ placement: n = "bottom", children: i, className: s, ...o }) => {
52
43
  }
53
44
  );
54
45
  };
55
- l.displayName = "PopoverList.Item";
56
- y.Item = l;
46
+ n.displayName = "PopoverList.Item";
47
+ y.Item = n;
57
48
  export {
58
49
  y as PopoverList
59
50
  };
@@ -1,10 +1,10 @@
1
1
  import { jsxs as l, jsx as t, Fragment as re } from "react/jsx-runtime";
2
- import I from "clsx";
3
- import { useCombobox as w } from "downshift";
2
+ import { useCombobox as I } from "downshift";
4
3
  import { debounce as le } from "lodash-es";
5
4
  import { useState as u, useRef as E, useEffect as K } from "react";
6
5
  import { useHotkeys as O } from "react-hotkeys-hook";
7
6
  import { isOSX as ae } from "../helpers/browser.js";
7
+ import w from "../helpers/classnames.js";
8
8
  import { useId as R } from "../hooks/useId.js";
9
9
  import { useIsClient as ne } from "../hooks/useIsClient.js";
10
10
  import { Key as n } from "./Key.js";
@@ -31,7 +31,7 @@ const ie = le((m, h) => m(h), 500), Ie = ({
31
31
  }, [r]);
32
32
  const i = { value: r }, c = r ? [i, ...h] : [], G = ({ selectedItem: e, type: s }) => {
33
33
  var F, S;
34
- s !== w.stateChangeTypes.InputBlur && s !== w.stateChangeTypes.FunctionCloseMenu && (e === i ? (d == null || d(r), (F = a.current) == null || F.blur()) : e && (p == null || p(e), (S = a.current) == null || S.blur()), _());
34
+ s !== I.stateChangeTypes.InputBlur && s !== I.stateChangeTypes.FunctionCloseMenu && (e === i ? (d == null || d(r), (F = a.current) == null || F.blur()) : e && (p == null || p(e), (S = a.current) == null || S.blur()), _());
35
35
  }, J = ({ inputValue: e }) => {
36
36
  const s = e ?? "";
37
37
  x(s), o && ie(o, s);
@@ -44,7 +44,7 @@ const ie = le((m, h) => m(h), 500), Ie = ({
44
44
  highlightedIndex: V,
45
45
  getItemProps: Z,
46
46
  closeMenu: _
47
- } = w({
47
+ } = I({
48
48
  items: c,
49
49
  inputValue: r,
50
50
  onInputValueChange: J,
@@ -87,7 +87,7 @@ const ie = le((m, h) => m(h), 500), Ie = ({
87
87
  ...W({
88
88
  id: U,
89
89
  type: "text",
90
- className: I(
90
+ className: w(
91
91
  "ui-search-input",
92
92
  "block w-full border-none pl-0 md:pl-7 text-base md:text-md text-gray-darker leading-p2 focus:ring-0",
93
93
  m
@@ -124,7 +124,7 @@ const ie = le((m, h) => m(h), 500), Ie = ({
124
124
  {
125
125
  ...Q({
126
126
  id: H,
127
- className: I(
127
+ className: w(
128
128
  "ui-search-menu",
129
129
  "absolute top-10 divide-y divide-gray-light w-full xl:w-[590px] max-h-[75vh] border border-secondary-lighter shadow-xl mt-1 rounded overflow-auto z-20 bg-white",
130
130
  { hidden: !N }
@@ -138,7 +138,7 @@ const ie = le((m, h) => m(h), 500), Ie = ({
138
138
  children: e === i ? C ? /* @__PURE__ */ t("div", { className: "p-3 text-center", children: /* @__PURE__ */ t(ce, { size: "small" }) }) : r.length < g ? /* @__PURE__ */ t(
139
139
  "div",
140
140
  {
141
- className: I(
141
+ className: w(
142
142
  "cursor-pointer p-2",
143
143
  V === s ? "bg-blue-light text-white" : ""
144
144
  ),