@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.
- package/README.md +27 -2
- package/build/components/Alert.js +6 -10
- package/build/components/Avatar.js +4 -4
- package/build/components/Badge.d.ts +2 -1
- package/build/components/Badge.js +18 -16
- package/build/components/Breadcrumb.js +1 -1
- package/build/components/Breakdown.js +20 -20
- package/build/components/Buttons/Button.js +1 -1
- package/build/components/Buttons/ButtonGroup.js +18 -18
- package/build/components/Buttons/SubmitButton.js +12 -12
- package/build/components/Buttons/ToggleButton.js +1 -1
- package/build/components/Counter.js +1 -1
- package/build/components/DatePicker/DatePicker.js +19 -19
- package/build/components/DatePicker/DatePickerPopover.js +18 -18
- package/build/components/DatePicker/Day.js +1 -1
- package/build/components/DatePicker/LocalizedDayPicker.js +14 -14
- package/build/components/DatePicker/MonthGrid.js +20 -20
- package/build/components/DatePicker/MonthSelector.js +13 -13
- package/build/components/DatePicker/NavbarElement.js +9 -9
- package/build/components/DatePicker/RangeDatePicker.js +3 -7
- package/build/components/DatePicker/UpcomingDatePicker.js +14 -14
- package/build/components/Dot/Dot.js +4 -4
- package/build/components/Drawer.js +9 -9
- package/build/components/Forms/BaseInput.js +4 -4
- package/build/components/Forms/Checkbox.js +5 -5
- package/build/components/Forms/ComboBox.js +10 -10
- package/build/components/Forms/FormGroup.js +3 -3
- package/build/components/Forms/InlineValuePopover.js +11 -11
- package/build/components/Forms/Input.js +5 -5
- package/build/components/Forms/Label.js +3 -3
- package/build/components/Forms/RangeSlider.js +14 -14
- package/build/components/Forms/Switch.js +15 -15
- package/build/components/Forms/Textarea.js +4 -4
- package/build/components/Forms/ValuePopoverText.js +5 -5
- package/build/components/HeaderToolbar.js +1 -1
- package/build/components/ImageUpload.js +11 -11
- package/build/components/Key.js +6 -6
- package/build/components/Logo.js +4 -4
- package/build/components/Modal.js +10 -10
- package/build/components/Popover/Popover.js +6 -12
- package/build/components/Popover/PopoverList.js +13 -22
- package/build/components/Screens/Login.js +10 -10
- package/build/components/Search.js +11 -11
- package/build/components/Sidebar/Sidebar.Account.js +8 -8
- package/build/components/Sidebar/Sidebar.Button.js +4 -4
- package/build/components/Sidebar/Sidebar.Heading.js +4 -4
- package/build/components/Sidebar/Sidebar.Link.js +21 -20
- package/build/components/Sidebar/Sidebar.Menu.d.ts +3 -0
- package/build/components/Sidebar/Sidebar.Menu.js +15 -13
- package/build/components/Sidebar/Sidebar.js +26 -26
- package/build/components/Skeleton.js +7 -7
- package/build/components/Spinner.js +2 -2
- package/build/components/Table.js +5 -5
- package/build/components/Tabs/Tabs.Panel.js +5 -5
- package/build/components/Tabs/Tabs.Tab.js +7 -7
- package/build/components/Tabs/Tabs.js +7 -7
- package/build/components/Tag.js +10 -10
- package/build/components/Utilities/Phone.js +3 -3
- package/build/full.css +1 -1
- package/build/{icons/build/helpers → helpers}/classnames.js +2 -2
- package/build/helpers/flash.js +5 -5
- package/build/icons/src/AnnounceIcon.js +13 -0
- package/build/icons/src/BellIcon.js +27 -0
- package/build/icons/{build → src}/CalendarIcon.js +6 -5
- package/build/icons/src/CheckIcon.js +8 -0
- package/build/icons/src/ChevronDownIcon.js +8 -0
- package/build/icons/src/ChevronLeftIcon.js +8 -0
- package/build/icons/src/ChevronRightIcon.js +8 -0
- package/build/icons/src/CircleNotch.js +6 -0
- package/build/icons/src/CloseIcon.js +11 -0
- package/build/icons/src/DownArrowIcon.js +16 -0
- package/build/icons/src/ImageIcon.js +27 -0
- package/build/icons/src/SearchIcon.js +16 -0
- package/build/icons/src/TrashIcon.js +20 -0
- package/build/icons/src/WarningDiamondIcon.js +27 -0
- package/build/icons/src/helpers/classnames.js +8 -0
- package/build/icons/src/helpers/icon.js +11 -0
- package/build/icons/{build → src}/images/XolaLogoSimple.js +5 -4
- package/package.json +1 -1
- package/build/icons/build/AnnounceIcon.js +0 -6
- package/build/icons/build/BellIcon.js +0 -23
- package/build/icons/build/CheckIcon.js +0 -7
- package/build/icons/build/ChevronDownIcon.js +0 -7
- package/build/icons/build/ChevronLeftIcon.js +0 -7
- package/build/icons/build/ChevronRightIcon.js +0 -7
- package/build/icons/build/CircleNotch.js +0 -5
- package/build/icons/build/CloseIcon.js +0 -7
- package/build/icons/build/DownArrowIcon.js +0 -15
- package/build/icons/build/ImageIcon.js +0 -23
- package/build/icons/build/SearchIcon.js +0 -15
- package/build/icons/build/TrashIcon.js +0 -16
- package/build/icons/build/WarningDiamondIcon.js +0 -23
- package/build/icons/build/helpers/icon.js +0 -10
- /package/build/icons/{build → src}/helpers/iconSizes.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
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:
|
|
21
|
+
}, p = ({ isChecked: n = !1, size: r = "medium", disabled: a, className: c, onChange: u }) => /* @__PURE__ */ t(
|
|
22
22
|
s,
|
|
23
23
|
{
|
|
24
|
-
checked:
|
|
24
|
+
checked: n,
|
|
25
25
|
disabled: a,
|
|
26
|
-
className:
|
|
26
|
+
className: e(
|
|
27
27
|
"ui-switch",
|
|
28
|
-
|
|
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[
|
|
30
|
+
i[r].parent,
|
|
31
31
|
c
|
|
32
32
|
),
|
|
33
33
|
onChange: u ?? m,
|
|
34
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ t(
|
|
35
35
|
"span",
|
|
36
36
|
{
|
|
37
|
-
className:
|
|
38
|
-
|
|
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[
|
|
40
|
+
i[r].inner
|
|
41
41
|
)
|
|
42
42
|
}
|
|
43
43
|
)
|
|
44
44
|
}
|
|
45
|
-
), o = ({ children:
|
|
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:
|
|
47
|
+
const l = ({ direction: n = "left", children: r, className: a }) => /* @__PURE__ */ t(
|
|
48
48
|
s.Label,
|
|
49
49
|
{
|
|
50
50
|
as: "span",
|
|
51
|
-
className:
|
|
52
|
-
children:
|
|
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
|
|
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 =
|
|
7
|
-
({ className: a, value: r, shouldAutoSize:
|
|
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
|
|
2
|
-
import { Tooltip as
|
|
3
|
-
import { WarningDiamondIcon as a } from "../../icons/
|
|
4
|
-
const l = ({ value: r, error: o }) => /* @__PURE__ */
|
|
5
|
-
o ? /* @__PURE__ */ n(
|
|
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 "
|
|
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
|
|
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/
|
|
8
|
-
import { TrashIcon as K } from "../icons/
|
|
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:
|
|
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__ */
|
|
39
|
-
/* @__PURE__ */ e("div", { children:
|
|
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__ */
|
|
50
|
-
/* @__PURE__ */ e("div", { className: "space-x-2", children: d ? /* @__PURE__ */
|
|
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() :
|
|
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__ */
|
|
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
|
] }) })
|
package/build/components/Key.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
},
|
|
11
|
-
const r =
|
|
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:
|
|
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
|
-
|
|
27
|
+
y as Key
|
|
28
28
|
};
|
package/build/components/Logo.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
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
|
-
},
|
|
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
|
-
|
|
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
|
|
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
|
-
},
|
|
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:
|
|
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:
|
|
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",
|
|
83
|
-
enterTo: o("opacity-100",
|
|
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",
|
|
86
|
-
leaveTo: o("opacity-0",
|
|
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:
|
|
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
|
|
9
|
-
import
|
|
10
|
-
import
|
|
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 =
|
|
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:
|
|
7
|
-
const e = h.toArray(i), r = e.filter((t) => t.type !==
|
|
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:
|
|
11
|
+
children: c
|
|
12
12
|
}
|
|
13
13
|
);
|
|
14
|
-
return /* @__PURE__ */ d(
|
|
15
|
-
|
|
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:
|
|
33
|
-
...
|
|
23
|
+
onClickItem: c,
|
|
24
|
+
...p
|
|
34
25
|
}) => {
|
|
35
|
-
const t = (a) =>
|
|
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
|
-
...
|
|
41
|
+
...p,
|
|
51
42
|
children: r
|
|
52
43
|
}
|
|
53
44
|
);
|
|
54
45
|
};
|
|
55
|
-
|
|
56
|
-
y.Item =
|
|
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 {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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
|
|
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(
|
|
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
|
-
|
|
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(
|
|
101
|
-
/* @__PURE__ */ a(
|
|
102
|
-
c ? /* @__PURE__ */ e(
|
|
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 "
|
|
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
|
|
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 !==
|
|
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
|
-
} =
|
|
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(
|
|
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:
|
|
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:
|
|
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(
|
|
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:
|
|
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 "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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(
|
|
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] =
|
|
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:
|
|
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:
|
|
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
|
|
2
|
-
import
|
|
3
|
-
const i = ({ icon: r, label: t, className: s, ...a }) => /* @__PURE__ */
|
|
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:
|
|
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 "
|
|
3
|
-
const m = ({ icon:
|
|
4
|
-
/* @__PURE__ */ e(
|
|
5
|
-
/* @__PURE__ */ e("span", { className: "text-md font-bold", children:
|
|
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 {
|