@xola/ui-kit 3.4.6 → 3.6.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 +48 -78
- package/build/style.css +1 -0
- package/build/theme.css +76 -0
- package/build/ui-kit.es.js +16771 -0
- package/index.css +96 -4
- package/index.d.ts +151 -0
- package/package.json +68 -89
- package/postcss.config.js +1 -1
- package/tailwind.config.js +10 -11
- package/build/base.css +0 -2
- package/build/components/Alert.d.ts +0 -18
- package/build/components/Alert.js +0 -28
- package/build/components/Animation/FadeIn.d.ts +0 -13
- package/build/components/Animation/FadeIn.js +0 -29
- package/build/components/Animation/SlideDown.d.ts +0 -6
- package/build/components/Animation/SlideDown.js +0 -20
- package/build/components/Avatar.d.ts +0 -16
- package/build/components/Avatar.js +0 -21
- package/build/components/Badge.d.ts +0 -28
- package/build/components/Badge.js +0 -42
- package/build/components/Breadcrumb.d.ts +0 -21
- package/build/components/Breadcrumb.js +0 -27
- package/build/components/Breakdown.d.ts +0 -63
- package/build/components/Breakdown.js +0 -89
- package/build/components/Buttons/Button.d.ts +0 -53
- package/build/components/Buttons/Button.js +0 -83
- package/build/components/Buttons/ButtonGroup.d.ts +0 -35
- package/build/components/Buttons/ButtonGroup.js +0 -55
- package/build/components/Buttons/SubmitButton.d.ts +0 -11
- package/build/components/Buttons/SubmitButton.js +0 -83
- package/build/components/Buttons/ToggleButton.d.ts +0 -21
- package/build/components/Buttons/ToggleButton.js +0 -34
- package/build/components/Charts/BaseChartOptions.d.ts +0 -136
- package/build/components/Charts/BaseChartOptions.js +0 -95
- package/build/components/Charts/HistogramOptions.d.ts +0 -192
- package/build/components/Charts/HistogramOptions.js +0 -69
- package/build/components/Charts/PieOptions.d.ts +0 -177
- package/build/components/Charts/PieOptions.js +0 -55
- package/build/components/Counter.d.ts +0 -5
- package/build/components/Counter.js +0 -16
- package/build/components/DatePicker/DatePicker.d.ts +0 -41
- package/build/components/DatePicker/DatePicker.helpers.d.ts +0 -17
- package/build/components/DatePicker/DatePicker.helpers.js +0 -22
- package/build/components/DatePicker/DatePicker.js +0 -241
- package/build/components/DatePicker/DatePickerPopover.d.ts +0 -29
- package/build/components/DatePicker/DatePickerPopover.js +0 -81
- package/build/components/DatePicker/Day.d.ts +0 -13
- package/build/components/DatePicker/Day.js +0 -40
- package/build/components/DatePicker/LocalizedDayPicker.d.ts +0 -6
- package/build/components/DatePicker/LocalizedDayPicker.js +0 -20
- package/build/components/DatePicker/MonthGrid.d.ts +0 -11
- package/build/components/DatePicker/MonthGrid.js +0 -52
- package/build/components/DatePicker/MonthPicker.d.ts +0 -7
- package/build/components/DatePicker/MonthPicker.js +0 -28
- package/build/components/DatePicker/MonthSelector.d.ts +0 -8
- package/build/components/DatePicker/MonthSelector.js +0 -47
- package/build/components/DatePicker/MonthYearSelector.d.ts +0 -8
- package/build/components/DatePicker/MonthYearSelector.js +0 -44
- package/build/components/DatePicker/NavbarElement.d.ts +0 -15
- package/build/components/DatePicker/NavbarElement.js +0 -43
- package/build/components/DatePicker/RangeDatePicker.d.ts +0 -25
- package/build/components/DatePicker/RangeDatePicker.js +0 -134
- package/build/components/DatePicker/RelativeDateRange.d.ts +0 -51
- package/build/components/DatePicker/RelativeDateRange.js +0 -280
- package/build/components/DatePicker/UpcomingDatePicker.d.ts +0 -11
- package/build/components/DatePicker/UpcomingDatePicker.js +0 -27
- package/build/components/Dot/Dot.d.ts +0 -24
- package/build/components/Dot/Dot.js +0 -24
- package/build/components/Dot/DotProgress.d.ts +0 -6
- package/build/components/Dot/DotProgress.js +0 -10
- package/build/components/Drawer.d.ts +0 -28
- package/build/components/Drawer.js +0 -126
- package/build/components/Forms/BaseInput.d.ts +0 -20
- package/build/components/Forms/BaseInput.js +0 -41
- package/build/components/Forms/Checkbox.d.ts +0 -10
- package/build/components/Forms/Checkbox.js +0 -34
- package/build/components/Forms/Checkbox.module.css.js +0 -7
- package/build/components/Forms/ComboBox.d.ts +0 -8
- package/build/components/Forms/ComboBox.js +0 -41
- package/build/components/Forms/FormGroup.d.ts +0 -5
- package/build/components/Forms/FormGroup.js +0 -6
- package/build/components/Forms/InlineValuePopover.d.ts +0 -17
- package/build/components/Forms/InlineValuePopover.js +0 -47
- package/build/components/Forms/Input.d.ts +0 -6
- package/build/components/Forms/Input.js +0 -9
- package/build/components/Forms/Label.d.ts +0 -7
- package/build/components/Forms/Label.js +0 -17
- package/build/components/Forms/RangeSlider.d.ts +0 -33
- package/build/components/Forms/RangeSlider.js +0 -39
- package/build/components/Forms/Select.d.ts +0 -5
- package/build/components/Forms/Select.js +0 -8
- package/build/components/Forms/Switch.d.ts +0 -46
- package/build/components/Forms/Switch.js +0 -62
- package/build/components/Forms/Textarea.d.ts +0 -6
- package/build/components/Forms/Textarea.js +0 -35
- package/build/components/Forms/ValuePopoverText.d.ts +0 -6
- package/build/components/Forms/ValuePopoverText.js +0 -10
- package/build/components/GooglePlacesAutocomplete.d.ts +0 -14
- package/build/components/HeaderToolbar.d.ts +0 -21
- package/build/components/HeaderToolbar.js +0 -33
- package/build/components/ImageUpload.d.ts +0 -17
- package/build/components/ImageUpload.js +0 -86
- package/build/components/Key.d.ts +0 -6
- package/build/components/Key.js +0 -28
- package/build/components/Logo.d.ts +0 -19
- package/build/components/Logo.js +0 -10
- package/build/components/Modal.d.ts +0 -52
- package/build/components/Modal.js +0 -126
- package/build/components/Popover/Popover.d.ts +0 -20
- package/build/components/Popover/Popover.js +0 -50
- package/build/components/Popover/Popover.module.css.js +0 -7
- package/build/components/Popover/PopoverList.d.ts +0 -25
- package/build/components/Popover/PopoverList.js +0 -59
- package/build/components/Popover/PopoverScroll.module.css.js +0 -4
- package/build/components/Provider.d.ts +0 -18
- package/build/components/Provider.js +0 -17
- package/build/components/Screens/Login.d.ts +0 -25
- package/build/components/Screens/Login.js +0 -144
- package/build/components/Search.d.ts +0 -16
- package/build/components/Search.js +0 -174
- package/build/components/Sidebar/Sidebar.Account.d.ts +0 -13
- package/build/components/Sidebar/Sidebar.Account.js +0 -56
- package/build/components/Sidebar/Sidebar.Button.d.ts +0 -10
- package/build/components/Sidebar/Sidebar.Button.js +0 -21
- package/build/components/Sidebar/Sidebar.Footer.d.ts +0 -8
- package/build/components/Sidebar/Sidebar.Footer.js +0 -9
- package/build/components/Sidebar/Sidebar.Heading.d.ts +0 -10
- package/build/components/Sidebar/Sidebar.Heading.js +0 -10
- package/build/components/Sidebar/Sidebar.Link.d.ts +0 -24
- package/build/components/Sidebar/Sidebar.Link.js +0 -56
- package/build/components/Sidebar/Sidebar.Menu.d.ts +0 -10
- package/build/components/Sidebar/Sidebar.Menu.js +0 -28
- package/build/components/Sidebar/Sidebar.Menu.module.css.js +0 -7
- package/build/components/Sidebar/Sidebar.d.ts +0 -58
- package/build/components/Sidebar/Sidebar.js +0 -219
- package/build/components/Sidebar/SidebarScroll.module.css.js +0 -4
- package/build/components/Sidebar/index.d.ts +0 -8
- package/build/components/Skeleton.d.ts +0 -13
- package/build/components/Skeleton.js +0 -29
- package/build/components/Skeleton.module.css.js +0 -7
- package/build/components/Spinner.d.ts +0 -26
- package/build/components/Spinner.js +0 -27
- package/build/components/Table.d.ts +0 -59
- package/build/components/Table.js +0 -71
- package/build/components/Tabs/Tabs.Panel.d.ts +0 -9
- package/build/components/Tabs/Tabs.Panel.js +0 -7
- package/build/components/Tabs/Tabs.Tab.d.ts +0 -19
- package/build/components/Tabs/Tabs.Tab.js +0 -37
- package/build/components/Tabs/Tabs.d.ts +0 -27
- package/build/components/Tabs/Tabs.js +0 -28
- package/build/components/Tabs/index.d.ts +0 -4
- package/build/components/Tag.d.ts +0 -25
- package/build/components/Tag.js +0 -36
- package/build/components/Tooltip.d.ts +0 -8
- package/build/components/Tooltip.js +0 -8
- package/build/components/Utilities/Currency.d.ts +0 -32
- package/build/components/Utilities/Currency.js +0 -49
- package/build/components/Utilities/Number.d.ts +0 -8
- package/build/components/Utilities/Number.js +0 -15
- package/build/components/Utilities/Phone.d.ts +0 -8
- package/build/components/Utilities/Phone.js +0 -19
- package/build/full.css +0 -2
- package/build/helpers/avatar.d.ts +0 -1
- package/build/helpers/avatar.js +0 -8
- package/build/helpers/browser.d.ts +0 -2
- package/build/helpers/browser.js +0 -9
- package/build/helpers/children.d.ts +0 -3
- package/build/helpers/children.js +0 -6
- package/build/helpers/classnames.d.ts +0 -5
- package/build/helpers/currency.d.ts +0 -2
- package/build/helpers/currency.js +0 -11
- package/build/helpers/date.d.ts +0 -12
- package/build/helpers/date.js +0 -49
- package/build/helpers/flash.d.ts +0 -21
- package/build/helpers/flash.js +0 -87
- package/build/helpers/numbers.d.ts +0 -4
- package/build/helpers/numbers.js +0 -23
- package/build/helpers/phone.d.ts +0 -11
- package/build/helpers/phone.js +0 -25
- package/build/hooks/useId.d.ts +0 -1
- package/build/hooks/useId.js +0 -9
- package/build/hooks/useIsClient.d.ts +0 -1
- package/build/hooks/useIsClient.js +0 -10
- package/build/hooks/useViewportHeight.d.ts +0 -1
- package/build/hooks/useViewportHeight.js +0 -15
- package/build/icons/src/AnnounceIcon.js +0 -13
- package/build/icons/src/BellIcon.js +0 -27
- package/build/icons/src/CalendarIcon.js +0 -16
- package/build/icons/src/CheckIcon.js +0 -8
- package/build/icons/src/ChevronDownIcon.js +0 -8
- package/build/icons/src/ChevronLeftIcon.js +0 -8
- package/build/icons/src/ChevronRightIcon.js +0 -8
- package/build/icons/src/CircleNotch.js +0 -6
- package/build/icons/src/CloseIcon.js +0 -11
- package/build/icons/src/DownArrowIcon.js +0 -16
- package/build/icons/src/ImageIcon.js +0 -27
- package/build/icons/src/SearchIcon.js +0 -16
- package/build/icons/src/TrashIcon.js +0 -20
- package/build/icons/src/WarningDiamondIcon.js +0 -27
- package/build/icons/src/helpers/classnames.js +0 -8
- package/build/icons/src/helpers/icon.js +0 -11
- package/build/icons/src/helpers/iconSizes.js +0 -13
- package/build/icons/src/images/XolaLogoSimple.js +0 -14
- package/build/index.d.ts +0 -66
- package/build/index.js +0 -142
- package/build/theme.d.ts +0 -413
- package/build/theme.js +0 -372
- package/build/types/index.d.ts +0 -22
- package/build/types/migration.d.ts +0 -2
- package/build/ui-kit.css +0 -1
- package/build/utils/avatar.d.ts +0 -1
- package/build/utils/avatar.js +0 -8
- package/build/utils/currency.d.ts +0 -2
- package/build/utils/currency.js +0 -11
- package/build/utils/index.d.ts +0 -4
- package/build/utils/numbers.d.ts +0 -4
- package/build/utils/numbers.js +0 -19
- package/build/utils/phone.d.ts +0 -2
- package/build/utils/phone.js +0 -17
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import s from "clsx";
|
|
3
|
-
import $, { useState as x, useRef as K, useEffect as b } from "react";
|
|
4
|
-
import { Counter as I } from "../Counter.js";
|
|
5
|
-
import { Drawer as k } from "../Drawer.js";
|
|
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
|
-
const C = {
|
|
17
|
-
// From Figma
|
|
18
|
-
background: "linear-gradient(138.65deg, #583DFF 19.59%, #F849C7 62.96%, #FFC03D 97.07%)"
|
|
19
|
-
}, p = {
|
|
20
|
-
SM: 64,
|
|
21
|
-
// Small (mobile)
|
|
22
|
-
MD: 134,
|
|
23
|
-
// Medium (tablet)
|
|
24
|
-
LG: 174,
|
|
25
|
-
// Large (small desktop)
|
|
26
|
-
XL: 200
|
|
27
|
-
// Extra large (desktop)
|
|
28
|
-
}, v = {
|
|
29
|
-
MD: 768,
|
|
30
|
-
LG: 1024,
|
|
31
|
-
XL: 1280
|
|
32
|
-
}, E = (r = typeof window > "u" ? 1280 : window.innerWidth) => r >= v.XL ? p.XL : r >= v.LG ? p.LG : r >= v.MD ? p.MD : p.SM, l = ({
|
|
33
|
-
logo: r,
|
|
34
|
-
footer: W,
|
|
35
|
-
notifications: z,
|
|
36
|
-
isFixed: g = !0,
|
|
37
|
-
isStickyHeader: a = !0,
|
|
38
|
-
isStickyFooter: y = !0,
|
|
39
|
-
isLeftDrawerOpen: F,
|
|
40
|
-
isRightDrawerOpen: H,
|
|
41
|
-
children: j,
|
|
42
|
-
className: X,
|
|
43
|
-
onLogoClick: w,
|
|
44
|
-
handleDrawerStateChange: o,
|
|
45
|
-
onSidebarResize: m
|
|
46
|
-
}) => {
|
|
47
|
-
const [e, L] = x(() => {
|
|
48
|
-
if (typeof window < "u") {
|
|
49
|
-
const t = localStorage.getItem("sidebarWidth");
|
|
50
|
-
return t ? Number.parseInt(t, 10) : E(window.innerWidth);
|
|
51
|
-
}
|
|
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, R = a && y;
|
|
54
|
-
b(() => {
|
|
55
|
-
const t = () => {
|
|
56
|
-
const f = E(window.innerWidth);
|
|
57
|
-
L(f);
|
|
58
|
-
};
|
|
59
|
-
return window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
60
|
-
}, [e]), b(() => {
|
|
61
|
-
const t = (T) => {
|
|
62
|
-
if (!u || !h.current) return;
|
|
63
|
-
const O = Math.min(Math.max(T.clientX, 64), 200);
|
|
64
|
-
L(O);
|
|
65
|
-
}, f = () => {
|
|
66
|
-
M(!1), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
67
|
-
};
|
|
68
|
-
return u && (document.addEventListener("mousemove", t), document.addEventListener("mouseup", f), document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none"), () => {
|
|
69
|
-
document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", f);
|
|
70
|
-
};
|
|
71
|
-
}, [u]), b(() => {
|
|
72
|
-
if (typeof window < "u" && e) {
|
|
73
|
-
const t = setTimeout(() => {
|
|
74
|
-
localStorage.setItem("sidebarWidth", e.toString()), m == null || m(e);
|
|
75
|
-
}, 500);
|
|
76
|
-
return () => clearTimeout(t);
|
|
77
|
-
}
|
|
78
|
-
}, [e, m]);
|
|
79
|
-
const G = (t) => {
|
|
80
|
-
t.preventDefault(), M(!0);
|
|
81
|
-
};
|
|
82
|
-
return /* @__PURE__ */ d(
|
|
83
|
-
"div",
|
|
84
|
-
{
|
|
85
|
-
ref: h,
|
|
86
|
-
className: s(
|
|
87
|
-
V,
|
|
88
|
-
"ui-sidebar",
|
|
89
|
-
g ? "fixed" : "relative",
|
|
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",
|
|
91
|
-
(A || u) && "box-border !border-r-4 !border-yellow",
|
|
92
|
-
X
|
|
93
|
-
),
|
|
94
|
-
style: { width: `${e}px` },
|
|
95
|
-
children: [
|
|
96
|
-
/* @__PURE__ */ i(
|
|
97
|
-
"div",
|
|
98
|
-
{
|
|
99
|
-
className: "absolute -right-3 bottom-0 top-0 z-10 w-4 cursor-ew-resize",
|
|
100
|
-
onMouseDown: G,
|
|
101
|
-
onMouseEnter: () => N(!0),
|
|
102
|
-
onMouseLeave: () => N(!1)
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
c ?? n ? /* @__PURE__ */ d(
|
|
106
|
-
"div",
|
|
107
|
-
{
|
|
108
|
-
className: s(
|
|
109
|
-
"flex w-full gap-2 p-2",
|
|
110
|
-
e <= 78 && "flex-col",
|
|
111
|
-
e < 134 ? "justify-center" : "justify-between",
|
|
112
|
-
a && "sticky top-0 z-50 bg-black"
|
|
113
|
-
),
|
|
114
|
-
children: [
|
|
115
|
-
c && /* @__PURE__ */ i("div", { className: s("cursor-pointer text-center", c.hide && "hidden"), children: /* @__PURE__ */ d(
|
|
116
|
-
I,
|
|
117
|
-
{
|
|
118
|
-
style: {
|
|
119
|
-
...C,
|
|
120
|
-
minWidth: e > 168 ? "48px" : "30px",
|
|
121
|
-
width: e > 168 ? "48px" : "30px",
|
|
122
|
-
minHeight: "20px",
|
|
123
|
-
height: "20px",
|
|
124
|
-
display: "inline-flex",
|
|
125
|
-
justifyContent: "center",
|
|
126
|
-
alignItems: "center"
|
|
127
|
-
},
|
|
128
|
-
onClick: () => o == null ? void 0 : o("left"),
|
|
129
|
-
children: [
|
|
130
|
-
/* @__PURE__ */ i(Y, { className: s(e <= 168 && "hidden") }),
|
|
131
|
-
c.count
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
) }),
|
|
135
|
-
n && /* @__PURE__ */ i("div", { className: s("cursor-pointer text-center", B && "hidden"), children: /* @__PURE__ */ d(
|
|
136
|
-
I,
|
|
137
|
-
{
|
|
138
|
-
className: "text-sm",
|
|
139
|
-
style: {
|
|
140
|
-
minWidth: e > 168 ? "48px" : "30px",
|
|
141
|
-
width: e > 168 ? "48px" : "30px",
|
|
142
|
-
minHeight: "20px",
|
|
143
|
-
height: "20px",
|
|
144
|
-
display: "inline-flex",
|
|
145
|
-
justifyContent: "center",
|
|
146
|
-
alignItems: "center"
|
|
147
|
-
},
|
|
148
|
-
onClick: () => o == null ? void 0 : o("right"),
|
|
149
|
-
children: [
|
|
150
|
-
/* @__PURE__ */ i(Z, { className: s(e <= 168 && "hidden") }),
|
|
151
|
-
n.count
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
) })
|
|
155
|
-
]
|
|
156
|
-
}
|
|
157
|
-
) : null,
|
|
158
|
-
c && /* @__PURE__ */ i(
|
|
159
|
-
k,
|
|
160
|
-
{
|
|
161
|
-
classNames: { dialogContent: `left-[${e}px]` },
|
|
162
|
-
sideIndent: e,
|
|
163
|
-
position: "left",
|
|
164
|
-
size: "xl",
|
|
165
|
-
title: c.title,
|
|
166
|
-
content: c.content,
|
|
167
|
-
isOpen: F ?? !1,
|
|
168
|
-
onClose: (t) => !!t && (o == null ? void 0 : o("left"))
|
|
169
|
-
}
|
|
170
|
-
),
|
|
171
|
-
n && /* @__PURE__ */ i(
|
|
172
|
-
k,
|
|
173
|
-
{
|
|
174
|
-
classNames: { dialogContent: `left-[${e}px]` },
|
|
175
|
-
position: "left",
|
|
176
|
-
sideIndent: e,
|
|
177
|
-
size: "xl",
|
|
178
|
-
title: n.title,
|
|
179
|
-
content: n.content,
|
|
180
|
-
isOpen: H ?? !1,
|
|
181
|
-
onClose: (t) => !!t && (o == null ? void 0 : o("right"))
|
|
182
|
-
}
|
|
183
|
-
),
|
|
184
|
-
/* @__PURE__ */ d("div", { className: s("flex-grow space-y-2", R && "overflow-y-auto overflow-x-hidden"), children: [
|
|
185
|
-
e > 60 && /* @__PURE__ */ i("div", { className: "text-center", children: r ? $.cloneElement(r, {
|
|
186
|
-
className: s(
|
|
187
|
-
"inline-block",
|
|
188
|
-
"h-12 w-12",
|
|
189
|
-
e > 160 && "h-30 w-30",
|
|
190
|
-
r.props.className
|
|
191
|
-
)
|
|
192
|
-
}) : e > 90 && /* @__PURE__ */ i(
|
|
193
|
-
D,
|
|
194
|
-
{
|
|
195
|
-
className: s(
|
|
196
|
-
"inline-block h-12 w-12 ",
|
|
197
|
-
e > 160 && "h-30 w-30",
|
|
198
|
-
w !== void 0 && "cursor-pointer transition-opacity hover:opacity-80"
|
|
199
|
-
),
|
|
200
|
-
onClick: w
|
|
201
|
-
}
|
|
202
|
-
) }),
|
|
203
|
-
/* @__PURE__ */ i("div", { children: j })
|
|
204
|
-
] }),
|
|
205
|
-
/* @__PURE__ */ i("div", { className: s(y && "sticky bottom-0 bg-black"), children: W })
|
|
206
|
-
]
|
|
207
|
-
}
|
|
208
|
-
);
|
|
209
|
-
};
|
|
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
|
-
export {
|
|
218
|
-
l as Sidebar
|
|
219
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { Sidebar } from './Sidebar';
|
|
2
|
-
export type { SidebarProps } from './Sidebar';
|
|
3
|
-
export type { SidebarAccountProps } from './Sidebar.Account';
|
|
4
|
-
export type { SidebarButtonProps } from './Sidebar.Button';
|
|
5
|
-
export type { SidebarFooterProps } from './Sidebar.Footer';
|
|
6
|
-
export type { SidebarHeadingProps } from './Sidebar.Heading';
|
|
7
|
-
export type { SidebarLinkProps, SidebarSeparatorProps } from './Sidebar.Link';
|
|
8
|
-
export type { SidebarMenuProps } from './Sidebar.Menu';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
style?: React.CSSProperties;
|
|
4
|
-
height?: number | string;
|
|
5
|
-
shouldAnimate?: boolean;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
classNames?: {
|
|
8
|
-
container?: string;
|
|
9
|
-
shimmer?: string;
|
|
10
|
-
text?: string;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export declare const Skeleton: ({ style, height, shouldAnimate, children, classNames, ...rest }: SkeletonProps) => React.JSX.Element;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import r from "clsx";
|
|
3
|
-
import d from "./Skeleton.module.css.js";
|
|
4
|
-
const c = ({
|
|
5
|
-
style: l,
|
|
6
|
-
height: i = 300,
|
|
7
|
-
shouldAnimate: o = !0,
|
|
8
|
-
children: s,
|
|
9
|
-
classNames: e = {},
|
|
10
|
-
...m
|
|
11
|
-
}) => /* @__PURE__ */ n(
|
|
12
|
-
"div",
|
|
13
|
-
{
|
|
14
|
-
className: r(
|
|
15
|
-
"ui-skeleton",
|
|
16
|
-
"relative flex items-center justify-center overflow-hidden rounded border border-gray-lighter bg-gray-lighter",
|
|
17
|
-
e.container
|
|
18
|
-
),
|
|
19
|
-
style: { height: i, ...l },
|
|
20
|
-
...m,
|
|
21
|
-
children: [
|
|
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: s })
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
export {
|
|
28
|
-
c as Skeleton
|
|
29
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
declare const colors: {
|
|
3
|
-
readonly primary: "text-primary";
|
|
4
|
-
readonly secondary: "text-secondary";
|
|
5
|
-
readonly warning: "text-warning";
|
|
6
|
-
readonly success: "text-success";
|
|
7
|
-
readonly danger: "text-danger";
|
|
8
|
-
readonly caution: "text-caution";
|
|
9
|
-
readonly current: null;
|
|
10
|
-
};
|
|
11
|
-
declare const sizes: {
|
|
12
|
-
readonly tiny: "w-4 h-4";
|
|
13
|
-
readonly small: "w-7 h-7";
|
|
14
|
-
readonly medium: "w-10 h-10";
|
|
15
|
-
readonly large: "w-14 h-14";
|
|
16
|
-
readonly current: "w-[1em] h-[1em]";
|
|
17
|
-
};
|
|
18
|
-
type SpinnerColor = keyof typeof colors;
|
|
19
|
-
type SpinnerSize = keyof typeof sizes;
|
|
20
|
-
export interface SpinnerProps extends React.SVGProps<SVGSVGElement> {
|
|
21
|
-
size?: SpinnerSize;
|
|
22
|
-
color?: SpinnerColor;
|
|
23
|
-
className?: string;
|
|
24
|
-
}
|
|
25
|
-
export declare const Spinner: ({ size, color, className, ...rest }: SpinnerProps) => React.JSX.Element;
|
|
26
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import c from "clsx";
|
|
3
|
-
import { CircleNotch as i } from "../icons/src/CircleNotch.js";
|
|
4
|
-
const o = {
|
|
5
|
-
primary: "text-primary",
|
|
6
|
-
secondary: "text-secondary",
|
|
7
|
-
warning: "text-warning",
|
|
8
|
-
success: "text-success",
|
|
9
|
-
danger: "text-danger",
|
|
10
|
-
caution: "text-caution",
|
|
11
|
-
current: null
|
|
12
|
-
}, a = {
|
|
13
|
-
tiny: "w-4 h-4",
|
|
14
|
-
small: "w-7 h-7",
|
|
15
|
-
medium: "w-10 h-10",
|
|
16
|
-
large: "w-14 h-14",
|
|
17
|
-
current: "w-[1em] h-[1em]"
|
|
18
|
-
}, p = ({ size: r = "small", color: e = "secondary", className: n, ...t }) => /* @__PURE__ */ s(
|
|
19
|
-
i,
|
|
20
|
-
{
|
|
21
|
-
className: c("ui-spinner", n, a[r], o[e], "inline-block animate-spin"),
|
|
22
|
-
...t
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
export {
|
|
26
|
-
p as Spinner
|
|
27
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
className?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const Table: {
|
|
7
|
-
({ className, ...rest }: TableProps): React.JSX.Element;
|
|
8
|
-
Head: {
|
|
9
|
-
({ className, ...rest }: TableHeadProps): React.JSX.Element;
|
|
10
|
-
displayName: string;
|
|
11
|
-
};
|
|
12
|
-
Header: {
|
|
13
|
-
({ className, ...rest }: TableHeaderProps): React.JSX.Element;
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
16
|
-
Body: {
|
|
17
|
-
({ isStriped, children, className, ...rest }: TableBodyProps): React.JSX.Element;
|
|
18
|
-
displayName: string;
|
|
19
|
-
};
|
|
20
|
-
Row: {
|
|
21
|
-
({ isStriped, className, ...rest }: TableRowProps): React.JSX.Element;
|
|
22
|
-
displayName: string;
|
|
23
|
-
};
|
|
24
|
-
Cell: {
|
|
25
|
-
({ className, ...rest }: TableCellProps): React.JSX.Element;
|
|
26
|
-
displayName: string;
|
|
27
|
-
};
|
|
28
|
-
EditableCell: {
|
|
29
|
-
({ value, className, onSave, ...rest }: EditableCellProps): React.JSX.Element;
|
|
30
|
-
displayName: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export interface TableHeadProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
34
|
-
children?: React.ReactNode;
|
|
35
|
-
className?: string;
|
|
36
|
-
}
|
|
37
|
-
export interface TableHeaderProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
38
|
-
children?: React.ReactNode;
|
|
39
|
-
className?: string;
|
|
40
|
-
}
|
|
41
|
-
export interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
42
|
-
isStriped?: boolean;
|
|
43
|
-
children: React.ReactNode;
|
|
44
|
-
className?: string;
|
|
45
|
-
}
|
|
46
|
-
export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
47
|
-
isStriped?: boolean;
|
|
48
|
-
children?: React.ReactNode;
|
|
49
|
-
className?: string;
|
|
50
|
-
}
|
|
51
|
-
export interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
52
|
-
children?: React.ReactNode;
|
|
53
|
-
className?: string;
|
|
54
|
-
}
|
|
55
|
-
export interface EditableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
56
|
-
value: string;
|
|
57
|
-
className?: string;
|
|
58
|
-
onSave: (value: string) => void;
|
|
59
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import s from "clsx";
|
|
3
|
-
import T, { Children as k, cloneElement as B, useState as u, useRef as h, useEffect as A } from "react";
|
|
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
|
-
g.displayName = "Table.Head";
|
|
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
|
-
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 || !T.isValidElement(t) ? t : B(t, { isStriped: e })) });
|
|
9
|
-
y.displayName = "Table.Body";
|
|
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
|
-
p.displayName = "Table.Row";
|
|
12
|
-
const x = ({ className: e, ...l }) => /* @__PURE__ */ a(
|
|
13
|
-
"td",
|
|
14
|
-
{
|
|
15
|
-
className: s("ui-table-cell", "whitespace-nowrap px-4 py-2 text-base text-gray-darker", e),
|
|
16
|
-
...l
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
x.displayName = "Table.Cell";
|
|
20
|
-
const N = ({ value: e, className: l, onSave: i, ...d }) => {
|
|
21
|
-
const [t, b] = u(!1), [o, w] = u(e), c = h(null), m = h(null), [v, C] = u("auto"), H = async () => {
|
|
22
|
-
b(!1), o !== e && i(o);
|
|
23
|
-
}, E = () => {
|
|
24
|
-
t || b(!0);
|
|
25
|
-
}, R = (r) => {
|
|
26
|
-
w(r.target.value), r.target.style.height = "auto", r.target.style.height = `${r.target.scrollHeight}px`;
|
|
27
|
-
};
|
|
28
|
-
return A(() => {
|
|
29
|
-
if (t) {
|
|
30
|
-
requestAnimationFrame(() => {
|
|
31
|
-
var r;
|
|
32
|
-
(r = m.current) == null || r.focus();
|
|
33
|
-
});
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
c.current && C(`${c.current.scrollHeight * 1.07}px`);
|
|
37
|
-
}, [t]), /* @__PURE__ */ a(
|
|
38
|
-
"td",
|
|
39
|
-
{
|
|
40
|
-
className: s(
|
|
41
|
-
"ui-table-cell",
|
|
42
|
-
"whitespace-nowrap px-4 py-2 text-base text-gray-darker",
|
|
43
|
-
{ "bg-gray-hover": t },
|
|
44
|
-
l
|
|
45
|
-
),
|
|
46
|
-
onClick: E,
|
|
47
|
-
...d,
|
|
48
|
-
children: t ? /* @__PURE__ */ a(
|
|
49
|
-
"textarea",
|
|
50
|
-
{
|
|
51
|
-
ref: m,
|
|
52
|
-
value: o,
|
|
53
|
-
style: { height: v },
|
|
54
|
-
className: "h-auto w-full rounded border-none p-1 focus:outline-0 focus:!ring-gray-light",
|
|
55
|
-
onChange: R,
|
|
56
|
-
onBlur: H
|
|
57
|
-
}
|
|
58
|
-
) : /* @__PURE__ */ a("div", { ref: c, className: "cursor-text whitespace-pre-wrap", children: o || /* @__PURE__ */ a("span", { className: "text-gray", children: "Not Available" }) })
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
N.displayName = "Table.EditableCell";
|
|
63
|
-
n.Head = g;
|
|
64
|
-
n.Header = f;
|
|
65
|
-
n.Body = y;
|
|
66
|
-
n.Row = p;
|
|
67
|
-
n.Cell = x;
|
|
68
|
-
n.EditableCell = N;
|
|
69
|
-
export {
|
|
70
|
-
n as Table
|
|
71
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface PanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
className?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const Panel: {
|
|
7
|
-
({ className, ...rest }: PanelProps): React.JSX.Element;
|
|
8
|
-
displayName: string;
|
|
9
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { default as React, ElementType } from 'react';
|
|
2
|
-
declare const variants: {
|
|
3
|
-
readonly default: (isActive: boolean) => string;
|
|
4
|
-
readonly simple: (isActive: boolean) => string;
|
|
5
|
-
};
|
|
6
|
-
type TabVariant = keyof typeof variants;
|
|
7
|
-
export interface TabProps<T extends ElementType = "button"> {
|
|
8
|
-
as?: T;
|
|
9
|
-
variant?: TabVariant;
|
|
10
|
-
isActive?: boolean;
|
|
11
|
-
isHidden?: boolean;
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
className?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const Tab: {
|
|
16
|
-
<T extends ElementType = "button">({ variant, as, isActive, isHidden, className, ...rest }: TabProps<T> & Omit<React.ComponentPropsWithoutRef<T>, keyof TabProps<T>>): React.JSX.Element | null;
|
|
17
|
-
displayName: string;
|
|
18
|
-
};
|
|
19
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import t from "clsx";
|
|
3
|
-
const n = {
|
|
4
|
-
default: (r) => t(
|
|
5
|
-
"border-b border-gray-light",
|
|
6
|
-
r ? "text-primary border-l border-r border-b-transparent" : "hover:text-gray-darker"
|
|
7
|
-
),
|
|
8
|
-
simple: (r) => t(
|
|
9
|
-
"flex-1 text-lg transition-colors",
|
|
10
|
-
r ? "bg-white text-black" : "text-gray-dark hover:text-black hover:bg-gray-light"
|
|
11
|
-
)
|
|
12
|
-
}, c = ({
|
|
13
|
-
variant: r = "default",
|
|
14
|
-
as: e,
|
|
15
|
-
isActive: a = !1,
|
|
16
|
-
isHidden: o = !1,
|
|
17
|
-
className: s,
|
|
18
|
-
...l
|
|
19
|
-
}) => {
|
|
20
|
-
const b = e ?? "button";
|
|
21
|
-
return o ? null : /* @__PURE__ */ i(
|
|
22
|
-
b,
|
|
23
|
-
{
|
|
24
|
-
className: t(
|
|
25
|
-
"ui-tabs-tab",
|
|
26
|
-
s,
|
|
27
|
-
"cursor-pointer whitespace-nowrap px-8 py-4 text-center font-semibold focus-visible:ring",
|
|
28
|
-
n[r](a)
|
|
29
|
-
),
|
|
30
|
-
...l
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
c.displayName = "Tabs.Tab";
|
|
35
|
-
export {
|
|
36
|
-
c as Tab
|
|
37
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { PanelProps } from './Tabs.Panel';
|
|
3
|
-
import { TabProps } from './Tabs.Tab';
|
|
4
|
-
declare const variants: {
|
|
5
|
-
readonly default: "border-t border-gray-light";
|
|
6
|
-
readonly simple: "bg-gray-lighter";
|
|
7
|
-
};
|
|
8
|
-
type TabsVariant = keyof typeof variants;
|
|
9
|
-
export interface TabsProps extends Omit<React.HTMLAttributes<HTMLElement>, "onChange"> {
|
|
10
|
-
variant?: TabsVariant;
|
|
11
|
-
value: number;
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
className?: string;
|
|
14
|
-
onChange: (index: number) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare const Tabs: {
|
|
17
|
-
({ variant, value, children, className, onChange, ...rest }: TabsProps): React.JSX.Element;
|
|
18
|
-
Tab: {
|
|
19
|
-
<T extends React.ElementType = "button">({ variant, as, isActive, isHidden, className, ...rest }: TabProps<T> & Omit<React.ComponentPropsWithoutRef<T>, keyof TabProps<T>>): React.JSX.Element | null;
|
|
20
|
-
displayName: string;
|
|
21
|
-
};
|
|
22
|
-
Panel: {
|
|
23
|
-
({ className, ...rest }: PanelProps): React.JSX.Element;
|
|
24
|
-
displayName: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, Fragment as y, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import h from "clsx";
|
|
3
|
-
import s, { Children as x, cloneElement as w } from "react";
|
|
4
|
-
import { Panel as i } from "./Tabs.Panel.js";
|
|
5
|
-
import { Tab as m } from "./Tabs.Tab.js";
|
|
6
|
-
const A = {
|
|
7
|
-
default: "border-t border-gray-light",
|
|
8
|
-
simple: "bg-gray-lighter"
|
|
9
|
-
}, d = ({ variant: e = "default", value: t, children: f, className: b, onChange: c, ...g }) => {
|
|
10
|
-
const l = x.toArray(f), p = l.filter((r) => s.isValidElement(r) && r.type === m), u = l.filter((r) => s.isValidElement(r) && r.type === i);
|
|
11
|
-
return /* @__PURE__ */ a(y, { children: [
|
|
12
|
-
/* @__PURE__ */ a("nav", { className: h("ui-tabs", "flex overflow-x-auto", A[e], b), ...g, children: [
|
|
13
|
-
e === "default" ? /* @__PURE__ */ n("div", { className: "min-w-10 flex-shrink-0 border-b border-gray-light" }) : null,
|
|
14
|
-
p.map((r, o) => w(r, {
|
|
15
|
-
variant: e,
|
|
16
|
-
isActive: o === t,
|
|
17
|
-
onClick: () => c(o)
|
|
18
|
-
})),
|
|
19
|
-
e === "default" ? /* @__PURE__ */ n("div", { className: "min-w-10 flex-grow border-b border-gray-light" }) : null
|
|
20
|
-
] }),
|
|
21
|
-
u[t]
|
|
22
|
-
] });
|
|
23
|
-
};
|
|
24
|
-
d.Tab = m;
|
|
25
|
-
d.Panel = i;
|
|
26
|
-
export {
|
|
27
|
-
d as Tabs
|
|
28
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
declare const colors: {
|
|
3
|
-
readonly primary: "bg-primary-lighter text-black border border-primary";
|
|
4
|
-
readonly secondary: "bg-secondary-light text-gray-darker border border-secondary";
|
|
5
|
-
readonly success: "bg-success-lighter text-black border border-success";
|
|
6
|
-
readonly warning: "bg-warning-lighter text-black border border-warning";
|
|
7
|
-
readonly danger: "bg-danger-lighter text-black border border-danger";
|
|
8
|
-
readonly caution: "bg-caution-lighter text-black border border-caution";
|
|
9
|
-
};
|
|
10
|
-
declare const sizes: {
|
|
11
|
-
readonly small: "px-1 py-0.75 text-sm leading-3.5";
|
|
12
|
-
readonly medium: "px-2 py-1 text-base leading-3.5";
|
|
13
|
-
readonly large: "px-2 py-1.5 text-base leading-4";
|
|
14
|
-
};
|
|
15
|
-
type TagColor = keyof typeof colors;
|
|
16
|
-
type TagSize = keyof typeof sizes;
|
|
17
|
-
export interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
18
|
-
color?: TagColor;
|
|
19
|
-
size?: TagSize;
|
|
20
|
-
children: React.ReactNode;
|
|
21
|
-
className?: string;
|
|
22
|
-
onClose?: () => void;
|
|
23
|
-
}
|
|
24
|
-
export declare const Tag: ({ color, size, children, className, onClose, ...rest }: TagProps) => React.JSX.Element;
|
|
25
|
-
export {};
|