@xola/ui-kit 3.0.8 → 3.4.1

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 (217) hide show
  1. package/README.md +61 -12
  2. package/build/components/Alert.d.ts +18 -0
  3. package/build/components/Alert.js +28 -0
  4. package/build/components/Animation/FadeIn.d.ts +13 -0
  5. package/build/components/Animation/FadeIn.js +29 -0
  6. package/build/components/Animation/SlideDown.d.ts +6 -0
  7. package/build/components/Animation/SlideDown.js +20 -0
  8. package/build/components/Avatar.d.ts +16 -0
  9. package/build/components/Avatar.js +21 -0
  10. package/build/components/Badge.d.ts +27 -0
  11. package/build/components/Badge.js +40 -0
  12. package/build/components/Breadcrumb.d.ts +21 -0
  13. package/build/components/Breadcrumb.js +27 -0
  14. package/build/components/Breakdown.d.ts +63 -0
  15. package/build/components/Breakdown.js +89 -0
  16. package/build/components/Buttons/Button.d.ts +53 -0
  17. package/build/components/Buttons/Button.js +83 -0
  18. package/build/components/Buttons/ButtonGroup.d.ts +35 -0
  19. package/build/components/Buttons/ButtonGroup.js +55 -0
  20. package/build/components/Buttons/SubmitButton.d.ts +11 -0
  21. package/build/components/Buttons/SubmitButton.js +83 -0
  22. package/build/components/Buttons/ToggleButton.d.ts +21 -0
  23. package/build/components/Buttons/ToggleButton.js +34 -0
  24. package/build/components/Charts/BaseChartOptions.d.ts +136 -0
  25. package/build/components/Charts/BaseChartOptions.js +95 -0
  26. package/build/components/Charts/HistogramOptions.d.ts +192 -0
  27. package/build/components/Charts/HistogramOptions.js +69 -0
  28. package/build/components/Charts/PieOptions.d.ts +177 -0
  29. package/build/components/Charts/PieOptions.js +55 -0
  30. package/build/components/Counter.d.ts +5 -0
  31. package/build/components/Counter.js +16 -0
  32. package/build/components/DatePicker/DatePicker.d.ts +41 -0
  33. package/build/components/DatePicker/DatePicker.helpers.d.ts +17 -0
  34. package/build/components/DatePicker/DatePicker.helpers.js +22 -0
  35. package/build/components/DatePicker/DatePicker.js +241 -0
  36. package/build/components/DatePicker/DatePickerPopover.d.ts +29 -0
  37. package/build/components/DatePicker/DatePickerPopover.js +81 -0
  38. package/build/components/DatePicker/Day.d.ts +13 -0
  39. package/build/components/DatePicker/Day.js +40 -0
  40. package/build/components/DatePicker/LocalizedDayPicker.d.ts +6 -0
  41. package/build/components/DatePicker/LocalizedDayPicker.js +20 -0
  42. package/build/components/DatePicker/MonthGrid.d.ts +11 -0
  43. package/build/components/DatePicker/MonthGrid.js +52 -0
  44. package/build/components/DatePicker/MonthPicker.d.ts +7 -0
  45. package/build/components/DatePicker/MonthPicker.js +28 -0
  46. package/build/components/DatePicker/MonthSelector.d.ts +8 -0
  47. package/build/components/DatePicker/MonthSelector.js +47 -0
  48. package/build/components/DatePicker/MonthYearSelector.d.ts +8 -0
  49. package/build/components/DatePicker/MonthYearSelector.js +44 -0
  50. package/build/components/DatePicker/NavbarElement.d.ts +15 -0
  51. package/build/components/DatePicker/NavbarElement.js +43 -0
  52. package/build/components/DatePicker/RangeDatePicker.d.ts +25 -0
  53. package/build/components/DatePicker/RangeDatePicker.js +134 -0
  54. package/build/components/DatePicker/RelativeDateRange.d.ts +51 -0
  55. package/build/components/DatePicker/RelativeDateRange.js +280 -0
  56. package/build/components/DatePicker/UpcomingDatePicker.d.ts +11 -0
  57. package/build/components/DatePicker/UpcomingDatePicker.js +27 -0
  58. package/build/components/Dot/Dot.d.ts +24 -0
  59. package/build/components/Dot/Dot.js +24 -0
  60. package/build/components/Dot/DotProgress.d.ts +6 -0
  61. package/build/components/Dot/DotProgress.js +10 -0
  62. package/build/components/Drawer.d.ts +28 -0
  63. package/build/components/Drawer.js +126 -0
  64. package/build/components/Forms/BaseInput.d.ts +20 -0
  65. package/build/components/Forms/BaseInput.js +41 -0
  66. package/build/components/Forms/Checkbox.d.ts +10 -0
  67. package/build/components/Forms/Checkbox.js +34 -0
  68. package/build/components/Forms/Checkbox.module.css.js +7 -0
  69. package/build/components/Forms/ComboBox.d.ts +8 -0
  70. package/build/components/Forms/ComboBox.js +41 -0
  71. package/build/components/Forms/FormGroup.d.ts +5 -0
  72. package/build/components/Forms/FormGroup.js +6 -0
  73. package/build/components/Forms/InlineValuePopover.d.ts +17 -0
  74. package/build/components/Forms/InlineValuePopover.js +47 -0
  75. package/build/components/Forms/Input.d.ts +6 -0
  76. package/build/components/Forms/Input.js +9 -0
  77. package/build/components/Forms/Label.d.ts +7 -0
  78. package/build/components/Forms/Label.js +17 -0
  79. package/build/components/Forms/RangeSlider.d.ts +33 -0
  80. package/build/components/Forms/RangeSlider.js +39 -0
  81. package/build/components/Forms/Select.d.ts +5 -0
  82. package/build/components/Forms/Select.js +8 -0
  83. package/build/components/Forms/Switch.d.ts +46 -0
  84. package/build/components/Forms/Switch.js +62 -0
  85. package/build/components/Forms/Textarea.d.ts +6 -0
  86. package/build/components/Forms/Textarea.js +35 -0
  87. package/build/components/Forms/ValuePopoverText.d.ts +6 -0
  88. package/build/components/Forms/ValuePopoverText.js +10 -0
  89. package/build/components/GooglePlacesAutocomplete.d.ts +14 -0
  90. package/build/components/HeaderToolbar.d.ts +21 -0
  91. package/build/components/HeaderToolbar.js +33 -0
  92. package/build/components/ImageUpload.d.ts +17 -0
  93. package/build/components/ImageUpload.js +86 -0
  94. package/build/components/Key.d.ts +6 -0
  95. package/build/components/Key.js +28 -0
  96. package/build/components/Logo.d.ts +19 -0
  97. package/build/components/Logo.js +10 -0
  98. package/build/components/Modal.d.ts +52 -0
  99. package/build/components/Modal.js +126 -0
  100. package/build/components/Popover/Popover.d.ts +20 -0
  101. package/build/components/Popover/Popover.js +50 -0
  102. package/build/components/Popover/Popover.module.css.js +7 -0
  103. package/build/components/Popover/PopoverList.d.ts +25 -0
  104. package/build/components/Popover/PopoverList.js +59 -0
  105. package/build/components/Popover/PopoverScroll.module.css.js +4 -0
  106. package/build/components/Provider.d.ts +18 -0
  107. package/build/components/Provider.js +17 -0
  108. package/build/components/Screens/Login.d.ts +25 -0
  109. package/build/components/Screens/Login.js +144 -0
  110. package/build/components/Search.d.ts +16 -0
  111. package/build/components/Search.js +174 -0
  112. package/build/components/Sidebar/Sidebar.Account.d.ts +13 -0
  113. package/build/components/Sidebar/Sidebar.Account.js +56 -0
  114. package/build/components/Sidebar/Sidebar.Button.d.ts +10 -0
  115. package/build/components/Sidebar/Sidebar.Button.js +21 -0
  116. package/build/components/Sidebar/Sidebar.Footer.d.ts +8 -0
  117. package/build/components/Sidebar/Sidebar.Footer.js +9 -0
  118. package/build/components/Sidebar/Sidebar.Heading.d.ts +10 -0
  119. package/build/components/Sidebar/Sidebar.Heading.js +10 -0
  120. package/build/components/Sidebar/Sidebar.Link.d.ts +24 -0
  121. package/build/components/Sidebar/Sidebar.Link.js +56 -0
  122. package/build/components/Sidebar/Sidebar.Menu.d.ts +10 -0
  123. package/build/components/Sidebar/Sidebar.Menu.js +28 -0
  124. package/build/components/Sidebar/Sidebar.Menu.module.css.js +7 -0
  125. package/build/components/Sidebar/Sidebar.d.ts +58 -0
  126. package/build/components/Sidebar/Sidebar.js +218 -0
  127. package/build/components/Sidebar/SidebarScroll.module.css.js +4 -0
  128. package/build/components/Sidebar/index.d.ts +8 -0
  129. package/build/components/Skeleton.d.ts +13 -0
  130. package/build/components/Skeleton.js +29 -0
  131. package/build/components/Skeleton.module.css.js +7 -0
  132. package/build/components/Spinner.d.ts +26 -0
  133. package/build/components/Spinner.js +27 -0
  134. package/build/components/Table.d.ts +59 -0
  135. package/build/components/Table.js +71 -0
  136. package/build/components/Tabs/Tabs.Panel.d.ts +9 -0
  137. package/build/components/Tabs/Tabs.Panel.js +7 -0
  138. package/build/components/Tabs/Tabs.Tab.d.ts +19 -0
  139. package/build/components/Tabs/Tabs.Tab.js +37 -0
  140. package/build/components/Tabs/Tabs.d.ts +27 -0
  141. package/build/components/Tabs/Tabs.js +28 -0
  142. package/build/components/Tabs/index.d.ts +4 -0
  143. package/build/components/Tag.d.ts +25 -0
  144. package/build/components/Tag.js +36 -0
  145. package/build/components/Tooltip.d.ts +8 -0
  146. package/build/components/Tooltip.js +8 -0
  147. package/build/components/Utilities/Currency.d.ts +32 -0
  148. package/build/components/Utilities/Currency.js +49 -0
  149. package/build/components/Utilities/Number.d.ts +8 -0
  150. package/build/components/Utilities/Number.js +15 -0
  151. package/build/components/Utilities/Phone.d.ts +8 -0
  152. package/build/components/Utilities/Phone.js +19 -0
  153. package/build/helpers/avatar.d.ts +1 -0
  154. package/build/helpers/avatar.js +8 -0
  155. package/build/helpers/browser.d.ts +2 -0
  156. package/build/helpers/browser.js +9 -0
  157. package/build/helpers/children.d.ts +3 -0
  158. package/build/helpers/children.js +6 -0
  159. package/build/helpers/classnames.d.ts +5 -0
  160. package/build/helpers/currency.d.ts +2 -0
  161. package/build/helpers/currency.js +11 -0
  162. package/build/helpers/date.d.ts +12 -0
  163. package/build/helpers/date.js +44 -0
  164. package/build/helpers/flash.d.ts +21 -0
  165. package/build/helpers/flash.js +87 -0
  166. package/build/helpers/numbers.d.ts +4 -0
  167. package/build/helpers/numbers.js +23 -0
  168. package/build/helpers/phone.d.ts +11 -0
  169. package/build/helpers/phone.js +25 -0
  170. package/build/hooks/useId.d.ts +1 -0
  171. package/build/hooks/useId.js +9 -0
  172. package/build/hooks/useIsClient.d.ts +1 -0
  173. package/build/hooks/useIsClient.js +10 -0
  174. package/build/hooks/useViewportHeight.d.ts +1 -0
  175. package/build/hooks/useViewportHeight.js +15 -0
  176. package/build/icons/build/AnnounceIcon.js +6 -0
  177. package/build/icons/build/BellIcon.js +23 -0
  178. package/build/icons/build/CalendarIcon.js +15 -0
  179. package/build/icons/build/CheckIcon.js +7 -0
  180. package/build/icons/build/ChevronDownIcon.js +7 -0
  181. package/build/icons/build/ChevronLeftIcon.js +7 -0
  182. package/build/icons/build/ChevronRightIcon.js +7 -0
  183. package/build/icons/build/CircleNotch.js +5 -0
  184. package/build/icons/build/CloseIcon.js +7 -0
  185. package/build/icons/build/DownArrowIcon.js +15 -0
  186. package/build/icons/build/ImageIcon.js +23 -0
  187. package/build/icons/build/SearchIcon.js +15 -0
  188. package/build/icons/build/TrashIcon.js +16 -0
  189. package/build/icons/build/WarningDiamondIcon.js +23 -0
  190. package/build/icons/build/helpers/classnames.js +8 -0
  191. package/build/icons/build/helpers/icon.js +10 -0
  192. package/build/icons/build/helpers/iconSizes.js +13 -0
  193. package/build/icons/build/images/XolaLogoSimple.js +13 -0
  194. package/build/index.d.ts +66 -0
  195. package/build/index.js +142 -0
  196. package/build/theme.d.ts +413 -0
  197. package/build/theme.js +372 -0
  198. package/build/types/index.d.ts +22 -0
  199. package/build/types/migration.d.ts +2 -0
  200. package/build/ui-kit.css +1 -0
  201. package/build/utils/avatar.d.ts +1 -0
  202. package/build/utils/avatar.js +8 -0
  203. package/build/utils/currency.d.ts +2 -0
  204. package/build/utils/currency.js +11 -0
  205. package/build/utils/date.d.ts +12 -0
  206. package/build/utils/date.js +23 -0
  207. package/build/utils/index.d.ts +5 -0
  208. package/build/utils/numbers.d.ts +4 -0
  209. package/build/utils/numbers.js +19 -0
  210. package/build/utils/phone.d.ts +2 -0
  211. package/build/utils/phone.js +17 -0
  212. package/package.json +76 -49
  213. package/postcss.config.js +1 -1
  214. package/tailwind.config.js +28 -8
  215. package/build/style.css +0 -1
  216. package/build/ui-kit.es.js +0 -12173
  217. package/index.d.ts +0 -72
@@ -0,0 +1,58 @@
1
+ import { default as React } from 'react';
2
+ interface NotificationDrawer {
3
+ count: number;
4
+ content: React.ReactNode;
5
+ title: string;
6
+ hide?: boolean;
7
+ onClose?: () => void;
8
+ }
9
+ export interface SidebarProps {
10
+ logo?: React.ReactElement;
11
+ footer: React.ReactElement;
12
+ notifications?: {
13
+ announcements?: NotificationDrawer;
14
+ notices?: NotificationDrawer;
15
+ };
16
+ isFixed?: boolean;
17
+ isStickyHeader?: boolean;
18
+ isStickyFooter?: boolean;
19
+ isLeftDrawerOpen?: boolean;
20
+ isRightDrawerOpen?: boolean;
21
+ children: React.ReactNode;
22
+ className?: string;
23
+ onLogoClick: () => void;
24
+ handleDrawerStateChange?: (drawer: "left" | "right") => void;
25
+ onSidebarResize?: (width: number) => void;
26
+ }
27
+ export declare const Sidebar: {
28
+ ({ logo, footer, notifications, isFixed, isStickyHeader, isStickyFooter, isLeftDrawerOpen, isRightDrawerOpen, children, className, onLogoClick, handleDrawerStateChange, onSidebarResize, }: SidebarProps): React.JSX.Element;
29
+ Account: {
30
+ ({ name, description, image, icon, isResponsive, className, ...rest }: import('./Sidebar.Account').SidebarAccountProps): React.JSX.Element;
31
+ displayName: string;
32
+ };
33
+ Button: {
34
+ ({ icon: Icon, label, className, ...rest }: import('./Sidebar.Button').SidebarButtonProps): React.JSX.Element;
35
+ displayName: string;
36
+ };
37
+ Footer: {
38
+ ({ children, ...rest }: import('./Sidebar.Footer').SidebarFooterProps): React.JSX.Element;
39
+ displayName: string;
40
+ };
41
+ Link: {
42
+ ({ isActive, icon: Icon, isSubMenuItem, align, children, classNames, ...rest }: import('./Sidebar.Link').SidebarLinkProps): React.JSX.Element;
43
+ displayName: string;
44
+ };
45
+ Separator: {
46
+ ({ className }: import('./Sidebar.Link').SidebarSeparatorProps): React.JSX.Element;
47
+ displayName: string;
48
+ };
49
+ Menu: {
50
+ ({ content, children, ...rest }: import('./Sidebar.Menu').SidebarMenuProps): React.JSX.Element;
51
+ displayName: string;
52
+ };
53
+ Heading: {
54
+ ({ icon: Icon, label, className }: import('./Sidebar.Heading').SidebarHeadingProps): React.JSX.Element;
55
+ displayName: string;
56
+ };
57
+ };
58
+ export {};
@@ -0,0 +1,218 @@
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 { AnnounceIcon as P } from "../../icons/build/AnnounceIcon.js";
5
+ import { BellIcon as U } from "../../icons/build/BellIcon.js";
6
+ import { XolaLogoSimple as _ } from "../../icons/build/images/XolaLogoSimple.js";
7
+ import { Counter as h } from "../Counter.js";
8
+ import { Drawer as k } from "../Drawer.js";
9
+ import { SidebarAccount as q } from "./Sidebar.Account.js";
10
+ import { SidebarButton as J } from "./Sidebar.Button.js";
11
+ import { SidebarFooter as Q } from "./Sidebar.Footer.js";
12
+ import { SidebarHeading as S } from "./Sidebar.Heading.js";
13
+ import { SidebarLink as V, SidebarSeparator as Y } from "./Sidebar.Link.js";
14
+ import { SidebarMenu as Z } from "./Sidebar.Menu.js";
15
+ import D from "./SidebarScroll.module.css.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
+ }, a = {
29
+ MD: 768,
30
+ LG: 1024,
31
+ XL: 1280
32
+ }, E = (r = typeof window > "u" ? 1280 : window.innerWidth) => r >= a.XL ? p.XL : r >= a.LG ? p.LG : r >= a.MD ? p.MD : p.SM, l = ({
33
+ logo: r,
34
+ footer: W,
35
+ notifications: z,
36
+ isFixed: g = !0,
37
+ isStickyHeader: v = !0,
38
+ isStickyFooter: y = !0,
39
+ isLeftDrawerOpen: F,
40
+ isRightDrawerOpen: H,
41
+ children: j,
42
+ className: X,
43
+ onLogoClick: L,
44
+ handleDrawerStateChange: o,
45
+ onSidebarResize: m
46
+ }) => {
47
+ const [e, N] = 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, w] = x(!1), [u, M] = x(!1), I = K(null), { announcements: c, notices: n } = z ?? {}, B = ((n == null ? void 0 : n.count) ?? 0) <= 0 || !n, G = v && y;
54
+ b(() => {
55
+ const t = () => {
56
+ const f = E(window.innerWidth);
57
+ N(f);
58
+ };
59
+ return window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
60
+ }, [e]), b(() => {
61
+ const t = (T) => {
62
+ if (!u || !I.current) return;
63
+ const O = Math.min(Math.max(T.clientX, 64), 200);
64
+ N(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 R = (t) => {
80
+ t.preventDefault(), M(!0);
81
+ };
82
+ return /* @__PURE__ */ d(
83
+ "div",
84
+ {
85
+ ref: I,
86
+ className: s(
87
+ D,
88
+ "ui-sidebar",
89
+ g ? "fixed" : "relative",
90
+ "z-20 flex h-full flex-col 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: R,
101
+ onMouseEnter: () => w(!0),
102
+ onMouseLeave: () => w(!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
+ v && "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
+ h,
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(P, { 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
+ h,
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(U, { 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", G && "overflow-y-auto"), children: [
185
+ e > 60 && /* @__PURE__ */ i("div", { className: "text-center", children: r ? $.cloneElement(r, {
186
+ className: s(
187
+ "inline-block h-12 w-12",
188
+ e > 160 && "h-30 w-30",
189
+ r.props.className
190
+ )
191
+ }) : e > 90 && /* @__PURE__ */ i(
192
+ _,
193
+ {
194
+ className: s(
195
+ "inline-block h-12 w-12 ",
196
+ e > 160 && "h-30 w-30",
197
+ L !== void 0 && "cursor-pointer transition-opacity hover:opacity-80"
198
+ ),
199
+ onClick: L
200
+ }
201
+ ) }),
202
+ /* @__PURE__ */ i("div", { children: j })
203
+ ] }),
204
+ /* @__PURE__ */ i("div", { className: s(y && "sticky bottom-0 bg-black"), children: W })
205
+ ]
206
+ }
207
+ );
208
+ };
209
+ l.Account = q;
210
+ l.Button = J;
211
+ l.Footer = Q;
212
+ l.Link = V;
213
+ l.Separator = Y;
214
+ l.Menu = Z;
215
+ l.Heading = S;
216
+ export {
217
+ l as Sidebar
218
+ };
@@ -0,0 +1,4 @@
1
+ const a = {};
2
+ export {
3
+ a as default
4
+ };
@@ -0,0 +1,8 @@
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';
@@ -0,0 +1,13 @@
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;
@@ -0,0 +1,29 @@
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
+ };
@@ -0,0 +1,7 @@
1
+ const s = "_shimmer_qt4e9_7", e = {
2
+ shimmer: s
3
+ };
4
+ export {
5
+ e as default,
6
+ s as shimmer
7
+ };
@@ -0,0 +1,26 @@
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 {};
@@ -0,0 +1,27 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import c from "clsx";
3
+ import { CircleNotch as i } from "../icons/build/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
+ };
@@ -0,0 +1,59 @@
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
+ }
@@ -0,0 +1,71 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import s from "clsx";
3
+ import R, { 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 || !R.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
+ }, T = (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: T,
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
+ };
@@ -0,0 +1,9 @@
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
+ };
@@ -0,0 +1,7 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import r from "clsx";
3
+ const l = ({ className: a, ...s }) => /* @__PURE__ */ e("div", { className: r("ui-tabs-panel", a), ...s });
4
+ l.displayName = "Tabs.Panel";
5
+ export {
6
+ l as Panel
7
+ };
@@ -0,0 +1,19 @@
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 {};
@@ -0,0 +1,37 @@
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
+ };
@@ -0,0 +1,27 @@
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 {};
@@ -0,0 +1,28 @@
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
+ };
@@ -0,0 +1,4 @@
1
+ export { Tabs } from './Tabs';
2
+ export type { TabsProps } from './Tabs';
3
+ export type { TabProps } from './Tabs.Tab';
4
+ export type { PanelProps } from './Tabs.Panel';