@xola/ui-kit 3.4.5 → 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 (94) hide show
  1. package/README.md +27 -2
  2. package/build/components/Alert.js +6 -10
  3. package/build/components/Avatar.js +4 -4
  4. package/build/components/Badge.d.ts +2 -1
  5. package/build/components/Badge.js +18 -16
  6. package/build/components/Breadcrumb.js +1 -1
  7. package/build/components/Breakdown.js +20 -20
  8. package/build/components/Buttons/Button.js +1 -1
  9. package/build/components/Buttons/ButtonGroup.js +18 -18
  10. package/build/components/Buttons/SubmitButton.js +12 -12
  11. package/build/components/Buttons/ToggleButton.js +1 -1
  12. package/build/components/Counter.js +1 -1
  13. package/build/components/DatePicker/DatePicker.js +19 -19
  14. package/build/components/DatePicker/DatePickerPopover.js +18 -18
  15. package/build/components/DatePicker/Day.js +1 -1
  16. package/build/components/DatePicker/LocalizedDayPicker.js +14 -14
  17. package/build/components/DatePicker/MonthGrid.js +20 -20
  18. package/build/components/DatePicker/MonthSelector.js +13 -13
  19. package/build/components/DatePicker/NavbarElement.js +9 -9
  20. package/build/components/DatePicker/RangeDatePicker.js +3 -7
  21. package/build/components/DatePicker/UpcomingDatePicker.js +14 -14
  22. package/build/components/Dot/Dot.js +4 -4
  23. package/build/components/Drawer.js +9 -9
  24. package/build/components/Forms/BaseInput.js +4 -4
  25. package/build/components/Forms/Checkbox.js +5 -5
  26. package/build/components/Forms/ComboBox.js +10 -10
  27. package/build/components/Forms/FormGroup.js +3 -3
  28. package/build/components/Forms/InlineValuePopover.js +11 -11
  29. package/build/components/Forms/Input.js +5 -5
  30. package/build/components/Forms/Label.js +3 -3
  31. package/build/components/Forms/RangeSlider.js +14 -14
  32. package/build/components/Forms/Switch.js +15 -15
  33. package/build/components/Forms/Textarea.js +4 -4
  34. package/build/components/Forms/ValuePopoverText.js +5 -5
  35. package/build/components/HeaderToolbar.js +1 -1
  36. package/build/components/ImageUpload.js +11 -11
  37. package/build/components/Key.js +6 -6
  38. package/build/components/Logo.js +4 -4
  39. package/build/components/Modal.js +10 -10
  40. package/build/components/Popover/Popover.js +6 -12
  41. package/build/components/Popover/PopoverList.js +13 -22
  42. package/build/components/Screens/Login.js +10 -10
  43. package/build/components/Search.js +11 -11
  44. package/build/components/Sidebar/Sidebar.Account.js +8 -8
  45. package/build/components/Sidebar/Sidebar.Button.js +4 -4
  46. package/build/components/Sidebar/Sidebar.Heading.js +4 -4
  47. package/build/components/Sidebar/Sidebar.Link.js +21 -20
  48. package/build/components/Sidebar/Sidebar.Menu.d.ts +3 -0
  49. package/build/components/Sidebar/Sidebar.Menu.js +15 -13
  50. package/build/components/Sidebar/Sidebar.js +26 -26
  51. package/build/components/Skeleton.js +7 -7
  52. package/build/components/Spinner.js +2 -2
  53. package/build/components/Table.js +5 -5
  54. package/build/components/Tabs/Tabs.Panel.js +5 -5
  55. package/build/components/Tabs/Tabs.Tab.js +7 -7
  56. package/build/components/Tabs/Tabs.js +7 -7
  57. package/build/components/Tag.js +10 -10
  58. package/build/components/Utilities/Phone.js +3 -3
  59. package/build/full.css +1 -1
  60. package/build/{icons/build/helpers → helpers}/classnames.js +2 -2
  61. package/build/helpers/flash.js +5 -5
  62. package/build/icons/src/AnnounceIcon.js +13 -0
  63. package/build/icons/src/BellIcon.js +27 -0
  64. package/build/icons/{build → src}/CalendarIcon.js +6 -5
  65. package/build/icons/src/CheckIcon.js +8 -0
  66. package/build/icons/src/ChevronDownIcon.js +8 -0
  67. package/build/icons/src/ChevronLeftIcon.js +8 -0
  68. package/build/icons/src/ChevronRightIcon.js +8 -0
  69. package/build/icons/src/CircleNotch.js +6 -0
  70. package/build/icons/src/CloseIcon.js +11 -0
  71. package/build/icons/src/DownArrowIcon.js +16 -0
  72. package/build/icons/src/ImageIcon.js +27 -0
  73. package/build/icons/src/SearchIcon.js +16 -0
  74. package/build/icons/src/TrashIcon.js +20 -0
  75. package/build/icons/src/WarningDiamondIcon.js +27 -0
  76. package/build/icons/src/helpers/classnames.js +8 -0
  77. package/build/icons/src/helpers/icon.js +11 -0
  78. package/build/icons/{build → src}/images/XolaLogoSimple.js +5 -4
  79. package/package.json +1 -1
  80. package/build/icons/build/AnnounceIcon.js +0 -6
  81. package/build/icons/build/BellIcon.js +0 -23
  82. package/build/icons/build/CheckIcon.js +0 -7
  83. package/build/icons/build/ChevronDownIcon.js +0 -7
  84. package/build/icons/build/ChevronLeftIcon.js +0 -7
  85. package/build/icons/build/ChevronRightIcon.js +0 -7
  86. package/build/icons/build/CircleNotch.js +0 -5
  87. package/build/icons/build/CloseIcon.js +0 -7
  88. package/build/icons/build/DownArrowIcon.js +0 -15
  89. package/build/icons/build/ImageIcon.js +0 -23
  90. package/build/icons/build/SearchIcon.js +0 -15
  91. package/build/icons/build/TrashIcon.js +0 -16
  92. package/build/icons/build/WarningDiamondIcon.js +0 -23
  93. package/build/icons/build/helpers/icon.js +0 -10
  94. /package/build/icons/{build → src}/helpers/iconSizes.js +0 -0
@@ -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,8 +1,8 @@
1
- import { jsxs as t, jsx as n } from "react/jsx-runtime";
2
- import { Tooltip as e } from "../Tooltip.js";
3
- import { WarningDiamondIcon as a } from "../../icons/build/WarningDiamondIcon.js";
4
- const l = ({ value: r, error: o }) => /* @__PURE__ */ t("span", { children: [
5
- o ? /* @__PURE__ */ n(e, { content: o, className: "", children: /* @__PURE__ */ n("span", { children: /* @__PURE__ */ n(a, { className: "mr-1 text-danger" }) }) }) : null,
1
+ import { jsxs as e, jsx as n } from "react/jsx-runtime";
2
+ import { Tooltip as t } from "../Tooltip.js";
3
+ import { WarningDiamondIcon as a } from "../../icons/src/WarningDiamondIcon.js";
4
+ const l = ({ value: r, error: o }) => /* @__PURE__ */ e("span", { children: [
5
+ o ? /* @__PURE__ */ n(t, { content: o, className: "", children: /* @__PURE__ */ n("span", { children: /* @__PURE__ */ n(a, { className: "mr-1 text-danger" }) }) }) : null,
6
6
  r
7
7
  ] });
8
8
  export {
@@ -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,13 +1,13 @@
1
- import { jsxs as a, jsx as e, Fragment as B } from "react/jsx-runtime";
2
- import g from "clsx";
1
+ import { jsxs as c, jsx as e, Fragment as B } from "react/jsx-runtime";
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";
7
- import { ImageIcon as G } from "../icons/build/ImageIcon.js";
8
- import { TrashIcon as K } from "../icons/build/TrashIcon.js";
7
+ import { ImageIcon as G } from "../icons/src/ImageIcon.js";
8
+ import { TrashIcon as K } from "../icons/src/TrashIcon.js";
9
9
  const H = ({
10
- src: c,
10
+ src: a,
11
11
  size: s = "large",
12
12
  isLoading: l = !1,
13
13
  maxSize: o = 5,
@@ -35,8 +35,8 @@ const H = ({
35
35
  }, P = () => {
36
36
  k(m + 1), v();
37
37
  }, j = typeof t == "string" ? (t == null ? void 0 : t.trim().length) > 0 : !!t, f = r ? r.trim().length > 0 : !1;
38
- return /* @__PURE__ */ a("div", { className: g("flex items-center rounded bg-gray-lighter p-4", d ? "space-x-2" : "space-x-3"), children: [
39
- /* @__PURE__ */ e("div", { children: c ? /* @__PURE__ */ e(x, { src: c, size: s }) : /* @__PURE__ */ e(
38
+ return /* @__PURE__ */ c("div", { className: g("flex items-center rounded bg-gray-lighter p-4", d ? "space-x-2" : "space-x-3"), children: [
39
+ /* @__PURE__ */ e("div", { children: a ? /* @__PURE__ */ e(x, { src: a, size: s }) : /* @__PURE__ */ e(
40
40
  "div",
41
41
  {
42
42
  className: g(
@@ -46,8 +46,8 @@ const H = ({
46
46
  children: /* @__PURE__ */ e(G, { size: "large", className: "text-gray" })
47
47
  }
48
48
  ) }),
49
- /* @__PURE__ */ a("div", { className: "flex flex-col space-y-2", children: [
50
- /* @__PURE__ */ e("div", { className: "space-x-2", children: d ? /* @__PURE__ */ a(B, { children: [
49
+ /* @__PURE__ */ c("div", { className: "flex flex-col space-y-2", children: [
50
+ /* @__PURE__ */ e("div", { className: "space-x-2", children: d ? /* @__PURE__ */ c(B, { children: [
51
51
  /* @__PURE__ */ e(
52
52
  w,
53
53
  {
@@ -60,7 +60,7 @@ const H = ({
60
60
  }
61
61
  ),
62
62
  /* @__PURE__ */ e(u, { disabled: l, isLoading: l, onClick: p, children: f ? r.trim() : "Upload New Photo" })
63
- ] }) : /* @__PURE__ */ e(u, { disabled: l, isLoading: l, onClick: p, children: f ? r.trim() : c ? "Replace Photo" : "Upload New Photo" }) }),
63
+ ] }) : /* @__PURE__ */ e(u, { disabled: l, isLoading: l, onClick: p, children: f ? r.trim() : a ? "Replace Photo" : "Upload New Photo" }) }),
64
64
  /* @__PURE__ */ e(
65
65
  "input",
66
66
  {
@@ -74,7 +74,7 @@ const H = ({
74
74
  },
75
75
  m
76
76
  ),
77
- /* @__PURE__ */ e("div", { className: "text-xs text-gray-darker", children: j ? t : /* @__PURE__ */ a("div", { children: [
77
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-darker", children: j ? t : /* @__PURE__ */ c("div", { children: [
78
78
  "Check that the image is in PNG or JPG format",
79
79
  o ? ` and does not exceed ${o}MB` : ""
80
80
  ] }) })
@@ -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,8 +1,8 @@
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";
5
- import { CloseIcon as v } from "../icons/build/CloseIcon.js";
4
+ import o from "../helpers/classnames.js";
5
+ import { CloseIcon as v } from "../icons/src/CloseIcon.js";
6
6
  const y = {
7
7
  small: "max-w-100",
8
8
  // 400px
@@ -18,7 +18,7 @@ const y = {
18
18
  topRight: "absolute m-4 top-0 right-0",
19
19
  bottomLeft: "absolute m-4 bottom-0 left-0",
20
20
  bottomRight: "absolute m-4 bottom-0 right-0"
21
- }, l = {
21
+ }, r = {
22
22
  center: {
23
23
  enterFrom: "translate-y-4 sm:translate-y-0 sm:scale-95",
24
24
  enterTo: "translate-y-0 sm:scale-100",
@@ -52,12 +52,12 @@ const y = {
52
52
  }, g = ({
53
53
  size: a = "medium",
54
54
  position: e = "center",
55
- isOpen: r = !1,
55
+ isOpen: l = !1,
56
56
  shouldCloseOnOutsideClick: i = !1,
57
57
  children: b,
58
58
  className: f,
59
59
  onClose: n
60
- }) => /* @__PURE__ */ t(s, { appear: !0, show: r, as: m, children: /* @__PURE__ */ t(d, { as: "div", className: "ui-modal fixed inset-0 z-30 overflow-y-auto", onClose: () => {
60
+ }) => /* @__PURE__ */ t(s, { appear: !0, show: l, as: m, children: /* @__PURE__ */ t(d, { as: "div", className: "ui-modal fixed inset-0 z-30 overflow-y-auto", onClose: () => {
61
61
  i && n();
62
62
  }, children: /* @__PURE__ */ c("div", { className: "min-h-screen px-4 text-center", children: [
63
63
  /* @__PURE__ */ t(
@@ -79,11 +79,11 @@ const y = {
79
79
  {
80
80
  as: m,
81
81
  enter: o("ease-out duration-300"),
82
- enterFrom: o("opacity-0", l[e].enterFrom),
83
- enterTo: o("opacity-100", l[e].enterTo),
82
+ enterFrom: o("opacity-0", r[e].enterFrom),
83
+ enterTo: o("opacity-100", r[e].enterTo),
84
84
  leave: o("ease-in duration-300"),
85
- leaveFrom: o("opacity-100", l[e].leaveFrom),
86
- leaveTo: o("opacity-0", l[e].leaveTo),
85
+ leaveFrom: o("opacity-100", r[e].leaveFrom),
86
+ leaveTo: o("opacity-0", r[e].leaveTo),
87
87
  children: /* @__PURE__ */ c(
88
88
  "div",
89
89
  {
@@ -109,7 +109,7 @@ const y = {
109
109
  )
110
110
  }
111
111
  )
112
- ] }) }) }), h = ({ description: a, children: e, className: r, ...i }) => /* @__PURE__ */ c(d.Title, { as: "div", className: o(r, "ui-modal-header text-center"), ...i, children: [
112
+ ] }) }) }), h = ({ description: a, children: e, className: l, ...i }) => /* @__PURE__ */ c(d.Title, { as: "div", className: o(l, "ui-modal-header text-center"), ...i, children: [
113
113
  /* @__PURE__ */ t("h3", { className: "text-2xl font-semibold leading-6 text-black", children: e }),
114
114
  a ? /* @__PURE__ */ t("p", { className: "mt-2 text-base font-normal leading-normal text-gray-darker", children: a }) : null
115
115
  ] });
@@ -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,38 +1,29 @@
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, p = e.map((t, a) => t.type === l ? v.cloneElement(t, { position: a, total: m }) : null), c = /* @__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
- children: p
11
+ children: c
12
12
  }
13
13
  );
14
- return /* @__PURE__ */ d(
15
- u,
16
- {
17
- content: c,
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,
29
20
  total: e,
30
21
  children: r,
31
22
  className: m,
32
- onClickItem: p,
33
- ...c
23
+ onClickItem: c,
24
+ ...p
34
25
  }) => {
35
- const t = (a) => p(a, n, s);
26
+ const t = (a) => c(a, l, s);
36
27
  return /* @__PURE__ */ d(
37
28
  "div",
38
29
  {
@@ -47,13 +38,13 @@ const y = ({ placement: n = "bottom", children: i, className: s, ...o }) => {
47
38
  m
48
39
  ),
49
40
  onClick: t,
50
- ...c,
41
+ ...p,
51
42
  children: r
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,13 +1,13 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as C } from "react";
3
- import { XolaLogoSimple as j } from "../../icons/build/images/XolaLogoSimple.js";
4
- import { Alert as I } from "../Alert.js";
5
- import { Button as R } from "../Buttons/Button.js";
6
- import { Checkbox as F } from "../Forms/Checkbox.js";
3
+ import { Alert as j } from "../Alert.js";
4
+ import { Button as I } from "../Buttons/Button.js";
5
+ import { Checkbox as R } from "../Forms/Checkbox.js";
7
6
  import { FormGroup as u } from "../Forms/FormGroup.js";
8
7
  import { Input as f } from "../Forms/Input.js";
9
8
  import { Label as p } from "../Forms/Label.js";
10
- import { Spinner as B } from "../Spinner.js";
9
+ import { Spinner as F } from "../Spinner.js";
10
+ import { XolaLogoSimple as B } from "../../icons/src/images/XolaLogoSimple.js";
11
11
  const g = {
12
12
  default: "https://files.xola.com/x2/images/login/old-photo-1554629947-334ff61d85dc.jpeg",
13
13
  x2: "https://files.xola.com/x2/images/login/x2-34fc260271ca80160c61777846784611.jpeg",
@@ -52,7 +52,7 @@ const g = {
52
52
  children: [
53
53
  /* @__PURE__ */ e("div", { className: "md:full flex h-[88%] w-full flex-col items-center justify-center space-y-8", children: /* @__PURE__ */ a("div", { className: "w-85 rounded-lg px-9 py-0 md:bg-white md:py-10", children: [
54
54
  /* @__PURE__ */ a("div", { className: "mb-12 space-y-4 md:mb-20", children: [
55
- /* @__PURE__ */ e(j, { className: "mx-auto h-10 w-auto md:h-12" }),
55
+ /* @__PURE__ */ e(B, { className: "mx-auto h-10 w-auto md:h-12" }),
56
56
  m && /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: m })
57
57
  ] }),
58
58
  /* @__PURE__ */ e("form", { onSubmit: k, children: /* @__PURE__ */ a("fieldset", { className: "space-y-6", disabled: c, children: [
@@ -89,7 +89,7 @@ const g = {
89
89
  ] })
90
90
  ] }),
91
91
  /* @__PURE__ */ e(
92
- F,
92
+ R,
93
93
  {
94
94
  name: "shouldRemember",
95
95
  label: "Remember me",
@@ -97,9 +97,9 @@ const g = {
97
97
  onChange: v
98
98
  }
99
99
  ),
100
- t ? /* @__PURE__ */ e(I, { color: "danger", children: t }) : null,
101
- /* @__PURE__ */ a(R, { type: "submit", className: "w-full", color: "primary", children: [
102
- c ? /* @__PURE__ */ e(B, { size: "current", color: "current", className: "mr-2" }) : null,
100
+ t ? /* @__PURE__ */ e(j, { color: "danger", children: t }) : null,
101
+ /* @__PURE__ */ a(I, { type: "submit", className: "w-full", color: "primary", children: [
102
+ c ? /* @__PURE__ */ e(F, { size: "current", color: "current", className: "mr-2" }) : null,
103
103
  "Login"
104
104
  ] }),
105
105
  /* @__PURE__ */ e("div", { className: "mt-5 text-center text-sm", children: /* @__PURE__ */ e(
@@ -1,15 +1,15 @@
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
- import { SearchIcon as ce } from "../icons/build/SearchIcon.js";
11
10
  import { Key as n } from "./Key.js";
12
- import { Spinner as oe } from "./Spinner.js";
11
+ import { Spinner as ce } from "./Spinner.js";
12
+ import { SearchIcon as oe } from "../icons/src/SearchIcon.js";
13
13
  const ie = le((m, h) => m(h), 500), Ie = ({
14
14
  className: m,
15
15
  items: h = [],
@@ -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,
@@ -80,14 +80,14 @@ const ie = le((m, h) => m(h), 500), Ie = ({
80
80
  const N = (b || !A || M) && c.length > 0 && !T, se = N && !C && c.length <= 1 && r.length >= g, y = N || !$;
81
81
  return /* @__PURE__ */ l("div", { className: "ui-search relative w-full", children: [
82
82
  /* @__PURE__ */ l("div", { ...Y({ className: "w-full relative rounded-md" }), children: [
83
- /* @__PURE__ */ t("div", { className: "pointer-events-none absolute inset-y-0 -top-0.5 left-0 hidden items-center md:flex", children: /* @__PURE__ */ t(ce, { className: "h-4 w-4 text-gray-darker" }) }),
83
+ /* @__PURE__ */ t("div", { className: "pointer-events-none absolute inset-y-0 -top-0.5 left-0 hidden items-center md:flex", children: /* @__PURE__ */ t(oe, { className: "h-4 w-4 text-gray-darker" }) }),
84
84
  /* @__PURE__ */ t(
85
85
  "input",
86
86
  {
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 }
@@ -135,10 +135,10 @@ const ie = le((m, h) => m(h), 500), Ie = ({
135
135
  "li",
136
136
  {
137
137
  ...Z({ key: s, item: e, index: s, className: "ui-search-item" }),
138
- children: e === i ? C ? /* @__PURE__ */ t("div", { className: "p-3 text-center", children: /* @__PURE__ */ t(oe, { size: "small" }) }) : r.length < g ? /* @__PURE__ */ t(
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
  ),
@@ -1,18 +1,18 @@
1
1
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import m from "clsx";
3
- import { useRef as w, useState as d, useEffect as N } from "react";
4
- import { ChevronRightIcon as g } from "../../icons/build/ChevronRightIcon.js";
5
- import { Avatar as S } from "../Avatar.js";
2
+ import { useRef as w, useState as m, useEffect as N } from "react";
3
+ import d from "../../helpers/classnames.js";
4
+ import { Avatar as g } from "../Avatar.js";
5
+ import { ChevronRightIcon as S } from "../../icons/src/ChevronRightIcon.js";
6
6
  const j = ({
7
7
  name: n,
8
8
  description: o,
9
9
  image: h,
10
- icon: x = /* @__PURE__ */ e(g, {}),
10
+ icon: x = /* @__PURE__ */ e(S, {}),
11
11
  isResponsive: r = !1,
12
12
  className: b,
13
13
  ...y
14
14
  }) => {
15
- const t = w(null), [s, a] = d(!r), [p, u] = d(!r), v = h ?? /* @__PURE__ */ e(S, { size: "tiny", name: n });
15
+ const t = w(null), [s, a] = m(!r), [p, u] = m(!r), v = h ?? /* @__PURE__ */ e(g, { size: "tiny", name: n });
16
16
  return N(() => {
17
17
  if (!r) {
18
18
  a(!0), u(!0);
@@ -31,7 +31,7 @@ const j = ({
31
31
  {
32
32
  ref: t,
33
33
  type: "button",
34
- className: m(
34
+ className: d(
35
35
  "ui-sidebar-account",
36
36
  "flex h-12 w-full cursor-pointer items-center justify-center rounded px-4 py-3 hover:bg-gray-darker",
37
37
  "xl:justify-start",
@@ -40,7 +40,7 @@ const j = ({
40
40
  ),
41
41
  ...y,
42
42
  children: [
43
- p && /* @__PURE__ */ e("div", { className: m(r && "m-auto", "flex-shrink-0"), children: v }),
43
+ p && /* @__PURE__ */ e("div", { className: d(r && "m-auto", "flex-shrink-0"), children: v }),
44
44
  s && /* @__PURE__ */ l("div", { className: "ml-2 min-w-0 text-left", children: [
45
45
  /* @__PURE__ */ e("div", { className: "truncate text-base", children: n }),
46
46
  o && /* @__PURE__ */ e("div", { className: "truncate text-sm text-gray-dark", children: o })
@@ -1,10 +1,10 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import n from "clsx";
3
- const i = ({ icon: r, label: t, className: s, ...a }) => /* @__PURE__ */ o(
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import o from "../../helpers/classnames.js";
3
+ const i = ({ icon: r, label: t, className: s, ...a }) => /* @__PURE__ */ n(
4
4
  "button",
5
5
  {
6
6
  type: "button",
7
- className: n(
7
+ className: o(
8
8
  "ui-sidebar-button flex w-full cursor-pointer items-center rounded px-4 py-2 hover:bg-gray-darker",
9
9
  s
10
10
  ),
@@ -1,8 +1,8 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import i from "clsx";
3
- const m = ({ icon: s, label: a, className: r }) => /* @__PURE__ */ t("p", { className: i("ml-4 flex items-center text-white", r), children: [
4
- /* @__PURE__ */ e(s, { className: "mr-3 h-5 w-5" }),
5
- /* @__PURE__ */ e("span", { className: "text-md font-bold", children: a })
2
+ import i from "../../helpers/classnames.js";
3
+ const m = ({ icon: a, label: r, className: s }) => /* @__PURE__ */ t("p", { className: i("ml-4 flex items-center text-white", s), children: [
4
+ /* @__PURE__ */ e(a, { className: "mr-3 h-5 w-5" }),
5
+ /* @__PURE__ */ e("span", { className: "text-md font-bold", children: r })
6
6
  ] });
7
7
  m.displayName = "Sidebar.Heading";
8
8
  export {