@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,28 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { ChevronRightIcon as b } from "../../icons/build/ChevronRightIcon.js";
|
|
1
|
+
import { jsxs as b, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as g, useState as h, useEffect as w } from "react";
|
|
3
|
+
import n from "../../helpers/classnames.js";
|
|
5
4
|
import { Dot as k } from "../Dot/Dot.js";
|
|
6
|
-
|
|
5
|
+
import { useSidebarMenu as j } from "./Sidebar.Menu.js";
|
|
6
|
+
import { ChevronRightIcon as N } from "../../icons/src/ChevronRightIcon.js";
|
|
7
|
+
const S = ({
|
|
7
8
|
isActive: t = !1,
|
|
8
9
|
icon: i,
|
|
9
10
|
isSubMenuItem: r,
|
|
10
|
-
align:
|
|
11
|
+
align: l,
|
|
11
12
|
children: d,
|
|
12
13
|
classNames: s,
|
|
13
|
-
...
|
|
14
|
+
...m
|
|
14
15
|
}) => {
|
|
15
|
-
const e = g(null), [a,
|
|
16
|
+
const e = g(null), [a, p] = h(!0), [u, x] = h(!0), { hasSubmenu: y } = j();
|
|
16
17
|
return w(() => {
|
|
17
18
|
const c = () => {
|
|
18
|
-
e.current && (
|
|
19
|
+
e.current && (p(e.current.offsetWidth >= 140), x(e.current.offsetWidth >= 140 || e.current.offsetWidth < 100));
|
|
19
20
|
};
|
|
20
21
|
c();
|
|
21
22
|
const f = new ResizeObserver(c);
|
|
22
23
|
return e.current && f.observe(e.current), () => {
|
|
23
24
|
f.disconnect();
|
|
24
25
|
};
|
|
25
|
-
}, []), /* @__PURE__ */
|
|
26
|
+
}, []), /* @__PURE__ */ b(
|
|
26
27
|
"button",
|
|
27
28
|
{
|
|
28
29
|
ref: e,
|
|
@@ -30,7 +31,7 @@ const j = ({
|
|
|
30
31
|
className: n(
|
|
31
32
|
"ui-sidebar-link",
|
|
32
33
|
"flex w-full items-center rounded leading-none transition-colors xl:justify-start",
|
|
33
|
-
!r && "h-
|
|
34
|
+
!r && "h-11",
|
|
34
35
|
{
|
|
35
36
|
"bg-primary text-white hover:bg-primary-dark": t,
|
|
36
37
|
"text-gray hover:bg-gray-darker": !t,
|
|
@@ -38,19 +39,19 @@ const j = ({
|
|
|
38
39
|
"justify-center px-6 py-3": !r
|
|
39
40
|
}
|
|
40
41
|
),
|
|
41
|
-
...
|
|
42
|
+
...m,
|
|
42
43
|
children: [
|
|
43
|
-
r ? /* @__PURE__ */ o(k, { className: n("mr-3 shrink-0", { "bg-white": t, "bg-gray": !t }) }) :
|
|
44
|
-
(a
|
|
45
|
-
!r && a && /* @__PURE__ */ o(
|
|
44
|
+
r ? /* @__PURE__ */ o(k, { className: n("mr-3 shrink-0", { "bg-white": t, "bg-gray": !t }) }) : u && i && /* @__PURE__ */ o("div", { className: n(!a && "flex w-full justify-center"), children: /* @__PURE__ */ o(i, { className: n("h-5 w-5 shrink-0", a && "mr-3") }) }),
|
|
45
|
+
(a || r) && /* @__PURE__ */ o("span", { className: n("px-1", { "text-left": r ?? l === "left" }, s == null ? void 0 : s.text), children: d }),
|
|
46
|
+
!r && a && y && /* @__PURE__ */ o(N, { className: "ml-auto h-3 w-3" })
|
|
46
47
|
]
|
|
47
48
|
}
|
|
48
49
|
);
|
|
49
50
|
};
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
51
|
+
S.displayName = "Sidebar.Link";
|
|
52
|
+
const v = ({ className: t }) => /* @__PURE__ */ o("hr", { className: n("mx-3 my-4 border-gray-lighter/20", t) });
|
|
53
|
+
v.displayName = "Sidebar.Separator";
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
S as SidebarLink,
|
|
56
|
+
v as SidebarSeparator
|
|
56
57
|
};
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import i from "@tippyjs/react";
|
|
3
|
+
import { useContext as a, createContext as s } from "react";
|
|
4
|
+
import d from "../../helpers/classnames.js";
|
|
5
|
+
import m from "./Sidebar.Menu.module.css.js";
|
|
6
|
+
const u = typeof window > "u" ? void 0 : window.document.body, r = s({ hasSubmenu: !1 }), h = () => a(r), c = ({ content: o, children: n, ...t }) => /* @__PURE__ */ e(r.Provider, { value: { hasSubmenu: !0 }, children: /* @__PURE__ */ e(
|
|
7
|
+
i,
|
|
7
8
|
{
|
|
8
9
|
interactive: !0,
|
|
9
10
|
trigger: "mouseenter",
|
|
10
11
|
hideOnClick: "toggle",
|
|
11
|
-
appendTo:
|
|
12
|
+
appendTo: u,
|
|
12
13
|
placement: "right",
|
|
13
14
|
offset: [0, 4],
|
|
14
15
|
arrow: !1,
|
|
15
|
-
className:
|
|
16
|
+
className: d(
|
|
16
17
|
"ui-sidebar-menu",
|
|
17
|
-
|
|
18
|
+
m.main,
|
|
18
19
|
"!rounded-none bg-black bg-opacity-90 p-2 backdrop-blur-sm backdrop-filter"
|
|
19
20
|
),
|
|
20
21
|
content: o,
|
|
21
|
-
...
|
|
22
|
-
children: /* @__PURE__ */ e("span", { className: "block", children:
|
|
22
|
+
...t,
|
|
23
|
+
children: /* @__PURE__ */ e("span", { className: "block", children: n })
|
|
23
24
|
}
|
|
24
|
-
);
|
|
25
|
-
|
|
25
|
+
) });
|
|
26
|
+
c.displayName = "Sidebar.Menu";
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
c as SidebarMenu,
|
|
29
|
+
h as useSidebarMenu
|
|
28
30
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import s from "clsx";
|
|
3
2
|
import $, { useState as x, useRef as K, useEffect as b } from "react";
|
|
4
|
-
import
|
|
5
|
-
import { BellIcon as U } from "../../icons/build/BellIcon.js";
|
|
6
|
-
import { XolaLogoSimple as _ } from "../../icons/build/images/XolaLogoSimple.js";
|
|
3
|
+
import s from "../../helpers/classnames.js";
|
|
7
4
|
import { Counter as I } from "../Counter.js";
|
|
8
5
|
import { Drawer as k } from "../Drawer.js";
|
|
9
|
-
import { SidebarAccount as
|
|
10
|
-
import { SidebarButton as
|
|
11
|
-
import { SidebarFooter as
|
|
12
|
-
import { SidebarHeading as
|
|
13
|
-
import { SidebarLink as
|
|
14
|
-
import { SidebarMenu as
|
|
15
|
-
import
|
|
6
|
+
import { SidebarAccount as P } from "./Sidebar.Account.js";
|
|
7
|
+
import { SidebarButton as U } from "./Sidebar.Button.js";
|
|
8
|
+
import { SidebarFooter as _ } from "./Sidebar.Footer.js";
|
|
9
|
+
import { SidebarHeading as q } from "./Sidebar.Heading.js";
|
|
10
|
+
import { SidebarLink as J, SidebarSeparator as Q } from "./Sidebar.Link.js";
|
|
11
|
+
import { SidebarMenu as S } from "./Sidebar.Menu.js";
|
|
12
|
+
import V from "./SidebarScroll.module.css.js";
|
|
13
|
+
import { AnnounceIcon as Y } from "../../icons/src/AnnounceIcon.js";
|
|
14
|
+
import { BellIcon as Z } from "../../icons/src/BellIcon.js";
|
|
15
|
+
import { XolaLogoSimple as D } from "../../icons/src/images/XolaLogoSimple.js";
|
|
16
16
|
const C = {
|
|
17
17
|
// From Figma
|
|
18
18
|
background: "linear-gradient(138.65deg, #583DFF 19.59%, #F849C7 62.96%, #FFC03D 97.07%)"
|
|
@@ -50,7 +50,7 @@ const C = {
|
|
|
50
50
|
return t ? Number.parseInt(t, 10) : E(window.innerWidth);
|
|
51
51
|
}
|
|
52
52
|
return 200;
|
|
53
|
-
}), [A, N] = x(!1), [u, M] = x(!1), h = K(null), { announcements: c, notices: n } = z ?? {}, B = ((n == null ? void 0 : n.count) ?? 0) <= 0 || !n,
|
|
53
|
+
}), [A, N] = x(!1), [u, M] = x(!1), h = K(null), { announcements: c, notices: n } = z ?? {}, B = ((n == null ? void 0 : n.count) ?? 0) <= 0 || !n, R = a && y;
|
|
54
54
|
b(() => {
|
|
55
55
|
const t = () => {
|
|
56
56
|
const f = E(window.innerWidth);
|
|
@@ -76,7 +76,7 @@ const C = {
|
|
|
76
76
|
return () => clearTimeout(t);
|
|
77
77
|
}
|
|
78
78
|
}, [e, m]);
|
|
79
|
-
const
|
|
79
|
+
const G = (t) => {
|
|
80
80
|
t.preventDefault(), M(!0);
|
|
81
81
|
};
|
|
82
82
|
return /* @__PURE__ */ d(
|
|
@@ -84,7 +84,7 @@ const C = {
|
|
|
84
84
|
{
|
|
85
85
|
ref: h,
|
|
86
86
|
className: s(
|
|
87
|
-
|
|
87
|
+
V,
|
|
88
88
|
"ui-sidebar",
|
|
89
89
|
g ? "fixed" : "relative",
|
|
90
90
|
"z-20 flex h-full flex-col overflow-x-hidden border-r-4 border-black bg-black px-1 py-2 text-white transition-all duration-300",
|
|
@@ -97,7 +97,7 @@ const C = {
|
|
|
97
97
|
"div",
|
|
98
98
|
{
|
|
99
99
|
className: "absolute -right-3 bottom-0 top-0 z-10 w-4 cursor-ew-resize",
|
|
100
|
-
onMouseDown:
|
|
100
|
+
onMouseDown: G,
|
|
101
101
|
onMouseEnter: () => N(!0),
|
|
102
102
|
onMouseLeave: () => N(!1)
|
|
103
103
|
}
|
|
@@ -127,7 +127,7 @@ const C = {
|
|
|
127
127
|
},
|
|
128
128
|
onClick: () => o == null ? void 0 : o("left"),
|
|
129
129
|
children: [
|
|
130
|
-
/* @__PURE__ */ i(
|
|
130
|
+
/* @__PURE__ */ i(Y, { className: s(e <= 168 && "hidden") }),
|
|
131
131
|
c.count
|
|
132
132
|
]
|
|
133
133
|
}
|
|
@@ -147,7 +147,7 @@ const C = {
|
|
|
147
147
|
},
|
|
148
148
|
onClick: () => o == null ? void 0 : o("right"),
|
|
149
149
|
children: [
|
|
150
|
-
/* @__PURE__ */ i(
|
|
150
|
+
/* @__PURE__ */ i(Z, { className: s(e <= 168 && "hidden") }),
|
|
151
151
|
n.count
|
|
152
152
|
]
|
|
153
153
|
}
|
|
@@ -181,7 +181,7 @@ const C = {
|
|
|
181
181
|
onClose: (t) => !!t && (o == null ? void 0 : o("right"))
|
|
182
182
|
}
|
|
183
183
|
),
|
|
184
|
-
/* @__PURE__ */ d("div", { className: s("flex-grow space-y-2",
|
|
184
|
+
/* @__PURE__ */ d("div", { className: s("flex-grow space-y-2", R && "overflow-y-auto overflow-x-hidden"), children: [
|
|
185
185
|
e > 60 && /* @__PURE__ */ i("div", { className: "text-center", children: r ? $.cloneElement(r, {
|
|
186
186
|
className: s(
|
|
187
187
|
"inline-block",
|
|
@@ -190,7 +190,7 @@ const C = {
|
|
|
190
190
|
r.props.className
|
|
191
191
|
)
|
|
192
192
|
}) : e > 90 && /* @__PURE__ */ i(
|
|
193
|
-
|
|
193
|
+
D,
|
|
194
194
|
{
|
|
195
195
|
className: s(
|
|
196
196
|
"inline-block h-12 w-12 ",
|
|
@@ -207,13 +207,13 @@ const C = {
|
|
|
207
207
|
}
|
|
208
208
|
);
|
|
209
209
|
};
|
|
210
|
-
l.Account =
|
|
211
|
-
l.Button =
|
|
212
|
-
l.Footer =
|
|
213
|
-
l.Link =
|
|
214
|
-
l.Separator =
|
|
215
|
-
l.Menu =
|
|
216
|
-
l.Heading =
|
|
210
|
+
l.Account = P;
|
|
211
|
+
l.Button = U;
|
|
212
|
+
l.Footer = _;
|
|
213
|
+
l.Link = J;
|
|
214
|
+
l.Separator = Q;
|
|
215
|
+
l.Menu = S;
|
|
216
|
+
l.Heading = q;
|
|
217
217
|
export {
|
|
218
218
|
l as Sidebar
|
|
219
219
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import r from "
|
|
1
|
+
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import r from "../helpers/classnames.js";
|
|
3
3
|
import d from "./Skeleton.module.css.js";
|
|
4
4
|
const c = ({
|
|
5
5
|
style: l,
|
|
6
6
|
height: i = 300,
|
|
7
7
|
shouldAnimate: o = !0,
|
|
8
|
-
children:
|
|
8
|
+
children: n,
|
|
9
9
|
classNames: e = {},
|
|
10
|
-
...
|
|
11
|
-
}) => /* @__PURE__ */
|
|
10
|
+
...s
|
|
11
|
+
}) => /* @__PURE__ */ m(
|
|
12
12
|
"div",
|
|
13
13
|
{
|
|
14
14
|
className: r(
|
|
@@ -17,10 +17,10 @@ const c = ({
|
|
|
17
17
|
e.container
|
|
18
18
|
),
|
|
19
19
|
style: { height: i, ...l },
|
|
20
|
-
...
|
|
20
|
+
...s,
|
|
21
21
|
children: [
|
|
22
22
|
o ? /* @__PURE__ */ t("div", { className: r(d.shimmer, "absolute h-full w-full", e.shimmer) }) : null,
|
|
23
|
-
/* @__PURE__ */ t("div", { className: r("text-gray", e.text), children:
|
|
23
|
+
/* @__PURE__ */ t("div", { className: r("text-gray", e.text), children: n })
|
|
24
24
|
]
|
|
25
25
|
}
|
|
26
26
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import c from "
|
|
3
|
-
import { CircleNotch as i } from "../icons/
|
|
2
|
+
import c from "../helpers/classnames.js";
|
|
3
|
+
import { CircleNotch as i } from "../icons/src/CircleNotch.js";
|
|
4
4
|
const o = {
|
|
5
5
|
primary: "text-primary",
|
|
6
6
|
secondary: "text-secondary",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import T, { Children as k, cloneElement as B, useState as u, useRef as h, useEffect as A } from "react";
|
|
3
|
+
import s from "../helpers/classnames.js";
|
|
4
4
|
const n = ({ className: e, ...l }) => /* @__PURE__ */ a("div", { className: "ui-table flex flex-col", children: /* @__PURE__ */ a("div", { className: "-my-2 overflow-x-auto", children: /* @__PURE__ */ a("div", { className: "inline-block min-w-full py-2 align-middle", children: /* @__PURE__ */ a("div", { className: "overflow-hidden border-b border-gray-lighter sm:rounded-lg", children: /* @__PURE__ */ a("table", { className: s(e, "min-w-full divide-y border border-gray-lighter"), ...l }) }) }) }) }), g = ({ className: e, ...l }) => /* @__PURE__ */ a("thead", { className: s("ui-table-head", "bg-gray-lighter", e), ...l });
|
|
5
5
|
g.displayName = "Table.Head";
|
|
6
6
|
const f = ({ className: e, ...l }) => /* @__PURE__ */ a("th", { className: s("ui-table-header", "px-4 py-2 text-left text-base font-bold", e), ...l });
|
|
7
7
|
f.displayName = "Table.Header";
|
|
8
|
-
const y = ({ isStriped: e = !1, children: l, className: i, ...d }) => /* @__PURE__ */ a("tbody", { className: s("ui-table-body", "border-none", i), ...d, children: k.map(l, (t) => !t || !
|
|
8
|
+
const y = ({ isStriped: e = !1, children: l, className: i, ...d }) => /* @__PURE__ */ a("tbody", { className: s("ui-table-body", "border-none", i), ...d, children: k.map(l, (t) => !t || !T.isValidElement(t) ? t : B(t, { isStriped: e })) });
|
|
9
9
|
y.displayName = "Table.Body";
|
|
10
10
|
const p = ({ isStriped: e = !1, className: l, ...i }) => /* @__PURE__ */ a("tr", { className: s("ui-table-row", e && "even:bg-gray-lighter", l), ...i });
|
|
11
11
|
p.displayName = "Table.Row";
|
|
@@ -22,7 +22,7 @@ const N = ({ value: e, className: l, onSave: i, ...d }) => {
|
|
|
22
22
|
b(!1), o !== e && i(o);
|
|
23
23
|
}, E = () => {
|
|
24
24
|
t || b(!0);
|
|
25
|
-
},
|
|
25
|
+
}, R = (r) => {
|
|
26
26
|
w(r.target.value), r.target.style.height = "auto", r.target.style.height = `${r.target.scrollHeight}px`;
|
|
27
27
|
};
|
|
28
28
|
return A(() => {
|
|
@@ -52,7 +52,7 @@ const N = ({ value: e, className: l, onSave: i, ...d }) => {
|
|
|
52
52
|
value: o,
|
|
53
53
|
style: { height: v },
|
|
54
54
|
className: "h-auto w-full rounded border-none p-1 focus:outline-0 focus:!ring-gray-light",
|
|
55
|
-
onChange:
|
|
55
|
+
onChange: R,
|
|
56
56
|
onBlur: H
|
|
57
57
|
}
|
|
58
58
|
) : /* @__PURE__ */ a("div", { ref: c, className: "cursor-text whitespace-pre-wrap", children: o || /* @__PURE__ */ a("span", { className: "text-gray", children: "Not Available" }) })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import s from "../../helpers/classnames.js";
|
|
3
|
+
const m = ({ className: a, ...e }) => /* @__PURE__ */ r("div", { className: s("ui-tabs-panel", a), ...e });
|
|
4
|
+
m.displayName = "Tabs.Panel";
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as Panel
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import t from "
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import t from "../../helpers/classnames.js";
|
|
3
3
|
const n = {
|
|
4
4
|
default: (r) => t(
|
|
5
5
|
"border-b border-gray-light",
|
|
@@ -15,11 +15,11 @@ const n = {
|
|
|
15
15
|
isActive: a = !1,
|
|
16
16
|
isHidden: o = !1,
|
|
17
17
|
className: s,
|
|
18
|
-
...
|
|
18
|
+
...b
|
|
19
19
|
}) => {
|
|
20
|
-
const
|
|
21
|
-
return o ? null : /* @__PURE__ */
|
|
22
|
-
|
|
20
|
+
const i = e ?? "button";
|
|
21
|
+
return o ? null : /* @__PURE__ */ l(
|
|
22
|
+
i,
|
|
23
23
|
{
|
|
24
24
|
className: t(
|
|
25
25
|
"ui-tabs-tab",
|
|
@@ -27,7 +27,7 @@ const n = {
|
|
|
27
27
|
"cursor-pointer whitespace-nowrap px-8 py-4 text-center font-semibold focus-visible:ring",
|
|
28
28
|
n[r](a)
|
|
29
29
|
),
|
|
30
|
-
...
|
|
30
|
+
...b
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as a, Fragment as y, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import h from "
|
|
3
|
-
import
|
|
4
|
-
import { Panel as
|
|
2
|
+
import i, { Children as h, cloneElement as x } from "react";
|
|
3
|
+
import w from "../../helpers/classnames.js";
|
|
4
|
+
import { Panel as s } from "./Tabs.Panel.js";
|
|
5
5
|
import { Tab as m } from "./Tabs.Tab.js";
|
|
6
6
|
const A = {
|
|
7
7
|
default: "border-t border-gray-light",
|
|
8
8
|
simple: "bg-gray-lighter"
|
|
9
9
|
}, d = ({ variant: e = "default", value: t, children: f, className: b, onChange: c, ...g }) => {
|
|
10
|
-
const l =
|
|
10
|
+
const l = h.toArray(f), p = l.filter((r) => i.isValidElement(r) && r.type === m), u = l.filter((r) => i.isValidElement(r) && r.type === s);
|
|
11
11
|
return /* @__PURE__ */ a(y, { children: [
|
|
12
|
-
/* @__PURE__ */ a("nav", { className:
|
|
12
|
+
/* @__PURE__ */ a("nav", { className: w("ui-tabs", "flex overflow-x-auto", A[e], b), ...g, children: [
|
|
13
13
|
e === "default" ? /* @__PURE__ */ n("div", { className: "min-w-10 flex-shrink-0 border-b border-gray-light" }) : null,
|
|
14
|
-
p.map((r, o) =>
|
|
14
|
+
p.map((r, o) => x(r, {
|
|
15
15
|
variant: e,
|
|
16
16
|
isActive: o === t,
|
|
17
17
|
onClick: () => c(o)
|
|
@@ -22,7 +22,7 @@ const A = {
|
|
|
22
22
|
] });
|
|
23
23
|
};
|
|
24
24
|
d.Tab = m;
|
|
25
|
-
d.Panel =
|
|
25
|
+
d.Panel = s;
|
|
26
26
|
export {
|
|
27
27
|
d as Tabs
|
|
28
28
|
};
|
package/build/components/Tag.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import a from "
|
|
3
|
-
import { CloseIcon as d } from "../icons/
|
|
1
|
+
import { jsxs as c, jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import a from "../helpers/classnames.js";
|
|
3
|
+
import { CloseIcon as d } from "../icons/src/CloseIcon.js";
|
|
4
4
|
const b = {
|
|
5
5
|
primary: "bg-primary-lighter text-black border border-primary",
|
|
6
6
|
secondary: "bg-secondary-light text-gray-darker border border-secondary",
|
|
@@ -12,13 +12,13 @@ const b = {
|
|
|
12
12
|
small: "px-1 py-0.75 text-sm leading-3.5",
|
|
13
13
|
medium: "px-2 py-1 text-base leading-3.5",
|
|
14
14
|
large: "px-2 py-1.5 text-base leading-4"
|
|
15
|
-
}, y = ({ color: t = "primary", size: e = "small", children:
|
|
16
|
-
const
|
|
17
|
-
|
|
15
|
+
}, y = ({ color: t = "primary", size: e = "small", children: i, className: o, onClose: r, ...s }) => {
|
|
16
|
+
const l = (n) => {
|
|
17
|
+
n.stopPropagation(), r == null || r();
|
|
18
18
|
};
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
r ? /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ c("span", { className: a("ui-tag", "inline-flex rounded", b[t], m[e], o), ...s, children: [
|
|
20
|
+
i,
|
|
21
|
+
r ? /* @__PURE__ */ g(
|
|
22
22
|
d,
|
|
23
23
|
{
|
|
24
24
|
size: "small",
|
|
@@ -26,7 +26,7 @@ const b = {
|
|
|
26
26
|
"ui-tag-close ml-2 cursor-pointer leading-4 hover:text-gray-darker",
|
|
27
27
|
e === "large" ? "mt-0.5" : "mt-0.25"
|
|
28
28
|
),
|
|
29
|
-
onClick:
|
|
29
|
+
onClick: l
|
|
30
30
|
}
|
|
31
31
|
) : null
|
|
32
32
|
] });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import a from "
|
|
3
|
-
import { formatPhoneNumber as
|
|
2
|
+
import a from "../../helpers/classnames.js";
|
|
3
|
+
import { formatPhoneNumber as c, getRegionCode as s } from "../../helpers/phone.js";
|
|
4
4
|
const g = ({ countryCode: o = "US", children: t, className: r }) => {
|
|
5
|
-
const e = t.toString(), n =
|
|
5
|
+
const e = t.toString(), n = c(e, o), m = s(e, o);
|
|
6
6
|
return /* @__PURE__ */ i(
|
|
7
7
|
"span",
|
|
8
8
|
{
|