@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.
Files changed (219) hide show
  1. package/README.md +48 -78
  2. package/build/style.css +1 -0
  3. package/build/theme.css +76 -0
  4. package/build/ui-kit.es.js +16771 -0
  5. package/index.css +96 -4
  6. package/index.d.ts +151 -0
  7. package/package.json +68 -89
  8. package/postcss.config.js +1 -1
  9. package/tailwind.config.js +10 -11
  10. package/build/base.css +0 -2
  11. package/build/components/Alert.d.ts +0 -18
  12. package/build/components/Alert.js +0 -28
  13. package/build/components/Animation/FadeIn.d.ts +0 -13
  14. package/build/components/Animation/FadeIn.js +0 -29
  15. package/build/components/Animation/SlideDown.d.ts +0 -6
  16. package/build/components/Animation/SlideDown.js +0 -20
  17. package/build/components/Avatar.d.ts +0 -16
  18. package/build/components/Avatar.js +0 -21
  19. package/build/components/Badge.d.ts +0 -28
  20. package/build/components/Badge.js +0 -42
  21. package/build/components/Breadcrumb.d.ts +0 -21
  22. package/build/components/Breadcrumb.js +0 -27
  23. package/build/components/Breakdown.d.ts +0 -63
  24. package/build/components/Breakdown.js +0 -89
  25. package/build/components/Buttons/Button.d.ts +0 -53
  26. package/build/components/Buttons/Button.js +0 -83
  27. package/build/components/Buttons/ButtonGroup.d.ts +0 -35
  28. package/build/components/Buttons/ButtonGroup.js +0 -55
  29. package/build/components/Buttons/SubmitButton.d.ts +0 -11
  30. package/build/components/Buttons/SubmitButton.js +0 -83
  31. package/build/components/Buttons/ToggleButton.d.ts +0 -21
  32. package/build/components/Buttons/ToggleButton.js +0 -34
  33. package/build/components/Charts/BaseChartOptions.d.ts +0 -136
  34. package/build/components/Charts/BaseChartOptions.js +0 -95
  35. package/build/components/Charts/HistogramOptions.d.ts +0 -192
  36. package/build/components/Charts/HistogramOptions.js +0 -69
  37. package/build/components/Charts/PieOptions.d.ts +0 -177
  38. package/build/components/Charts/PieOptions.js +0 -55
  39. package/build/components/Counter.d.ts +0 -5
  40. package/build/components/Counter.js +0 -16
  41. package/build/components/DatePicker/DatePicker.d.ts +0 -41
  42. package/build/components/DatePicker/DatePicker.helpers.d.ts +0 -17
  43. package/build/components/DatePicker/DatePicker.helpers.js +0 -22
  44. package/build/components/DatePicker/DatePicker.js +0 -241
  45. package/build/components/DatePicker/DatePickerPopover.d.ts +0 -29
  46. package/build/components/DatePicker/DatePickerPopover.js +0 -81
  47. package/build/components/DatePicker/Day.d.ts +0 -13
  48. package/build/components/DatePicker/Day.js +0 -40
  49. package/build/components/DatePicker/LocalizedDayPicker.d.ts +0 -6
  50. package/build/components/DatePicker/LocalizedDayPicker.js +0 -20
  51. package/build/components/DatePicker/MonthGrid.d.ts +0 -11
  52. package/build/components/DatePicker/MonthGrid.js +0 -52
  53. package/build/components/DatePicker/MonthPicker.d.ts +0 -7
  54. package/build/components/DatePicker/MonthPicker.js +0 -28
  55. package/build/components/DatePicker/MonthSelector.d.ts +0 -8
  56. package/build/components/DatePicker/MonthSelector.js +0 -47
  57. package/build/components/DatePicker/MonthYearSelector.d.ts +0 -8
  58. package/build/components/DatePicker/MonthYearSelector.js +0 -44
  59. package/build/components/DatePicker/NavbarElement.d.ts +0 -15
  60. package/build/components/DatePicker/NavbarElement.js +0 -43
  61. package/build/components/DatePicker/RangeDatePicker.d.ts +0 -25
  62. package/build/components/DatePicker/RangeDatePicker.js +0 -134
  63. package/build/components/DatePicker/RelativeDateRange.d.ts +0 -51
  64. package/build/components/DatePicker/RelativeDateRange.js +0 -280
  65. package/build/components/DatePicker/UpcomingDatePicker.d.ts +0 -11
  66. package/build/components/DatePicker/UpcomingDatePicker.js +0 -27
  67. package/build/components/Dot/Dot.d.ts +0 -24
  68. package/build/components/Dot/Dot.js +0 -24
  69. package/build/components/Dot/DotProgress.d.ts +0 -6
  70. package/build/components/Dot/DotProgress.js +0 -10
  71. package/build/components/Drawer.d.ts +0 -28
  72. package/build/components/Drawer.js +0 -126
  73. package/build/components/Forms/BaseInput.d.ts +0 -20
  74. package/build/components/Forms/BaseInput.js +0 -41
  75. package/build/components/Forms/Checkbox.d.ts +0 -10
  76. package/build/components/Forms/Checkbox.js +0 -34
  77. package/build/components/Forms/Checkbox.module.css.js +0 -7
  78. package/build/components/Forms/ComboBox.d.ts +0 -8
  79. package/build/components/Forms/ComboBox.js +0 -41
  80. package/build/components/Forms/FormGroup.d.ts +0 -5
  81. package/build/components/Forms/FormGroup.js +0 -6
  82. package/build/components/Forms/InlineValuePopover.d.ts +0 -17
  83. package/build/components/Forms/InlineValuePopover.js +0 -47
  84. package/build/components/Forms/Input.d.ts +0 -6
  85. package/build/components/Forms/Input.js +0 -9
  86. package/build/components/Forms/Label.d.ts +0 -7
  87. package/build/components/Forms/Label.js +0 -17
  88. package/build/components/Forms/RangeSlider.d.ts +0 -33
  89. package/build/components/Forms/RangeSlider.js +0 -39
  90. package/build/components/Forms/Select.d.ts +0 -5
  91. package/build/components/Forms/Select.js +0 -8
  92. package/build/components/Forms/Switch.d.ts +0 -46
  93. package/build/components/Forms/Switch.js +0 -62
  94. package/build/components/Forms/Textarea.d.ts +0 -6
  95. package/build/components/Forms/Textarea.js +0 -35
  96. package/build/components/Forms/ValuePopoverText.d.ts +0 -6
  97. package/build/components/Forms/ValuePopoverText.js +0 -10
  98. package/build/components/GooglePlacesAutocomplete.d.ts +0 -14
  99. package/build/components/HeaderToolbar.d.ts +0 -21
  100. package/build/components/HeaderToolbar.js +0 -33
  101. package/build/components/ImageUpload.d.ts +0 -17
  102. package/build/components/ImageUpload.js +0 -86
  103. package/build/components/Key.d.ts +0 -6
  104. package/build/components/Key.js +0 -28
  105. package/build/components/Logo.d.ts +0 -19
  106. package/build/components/Logo.js +0 -10
  107. package/build/components/Modal.d.ts +0 -52
  108. package/build/components/Modal.js +0 -126
  109. package/build/components/Popover/Popover.d.ts +0 -20
  110. package/build/components/Popover/Popover.js +0 -50
  111. package/build/components/Popover/Popover.module.css.js +0 -7
  112. package/build/components/Popover/PopoverList.d.ts +0 -25
  113. package/build/components/Popover/PopoverList.js +0 -59
  114. package/build/components/Popover/PopoverScroll.module.css.js +0 -4
  115. package/build/components/Provider.d.ts +0 -18
  116. package/build/components/Provider.js +0 -17
  117. package/build/components/Screens/Login.d.ts +0 -25
  118. package/build/components/Screens/Login.js +0 -144
  119. package/build/components/Search.d.ts +0 -16
  120. package/build/components/Search.js +0 -174
  121. package/build/components/Sidebar/Sidebar.Account.d.ts +0 -13
  122. package/build/components/Sidebar/Sidebar.Account.js +0 -56
  123. package/build/components/Sidebar/Sidebar.Button.d.ts +0 -10
  124. package/build/components/Sidebar/Sidebar.Button.js +0 -21
  125. package/build/components/Sidebar/Sidebar.Footer.d.ts +0 -8
  126. package/build/components/Sidebar/Sidebar.Footer.js +0 -9
  127. package/build/components/Sidebar/Sidebar.Heading.d.ts +0 -10
  128. package/build/components/Sidebar/Sidebar.Heading.js +0 -10
  129. package/build/components/Sidebar/Sidebar.Link.d.ts +0 -24
  130. package/build/components/Sidebar/Sidebar.Link.js +0 -56
  131. package/build/components/Sidebar/Sidebar.Menu.d.ts +0 -10
  132. package/build/components/Sidebar/Sidebar.Menu.js +0 -28
  133. package/build/components/Sidebar/Sidebar.Menu.module.css.js +0 -7
  134. package/build/components/Sidebar/Sidebar.d.ts +0 -58
  135. package/build/components/Sidebar/Sidebar.js +0 -219
  136. package/build/components/Sidebar/SidebarScroll.module.css.js +0 -4
  137. package/build/components/Sidebar/index.d.ts +0 -8
  138. package/build/components/Skeleton.d.ts +0 -13
  139. package/build/components/Skeleton.js +0 -29
  140. package/build/components/Skeleton.module.css.js +0 -7
  141. package/build/components/Spinner.d.ts +0 -26
  142. package/build/components/Spinner.js +0 -27
  143. package/build/components/Table.d.ts +0 -59
  144. package/build/components/Table.js +0 -71
  145. package/build/components/Tabs/Tabs.Panel.d.ts +0 -9
  146. package/build/components/Tabs/Tabs.Panel.js +0 -7
  147. package/build/components/Tabs/Tabs.Tab.d.ts +0 -19
  148. package/build/components/Tabs/Tabs.Tab.js +0 -37
  149. package/build/components/Tabs/Tabs.d.ts +0 -27
  150. package/build/components/Tabs/Tabs.js +0 -28
  151. package/build/components/Tabs/index.d.ts +0 -4
  152. package/build/components/Tag.d.ts +0 -25
  153. package/build/components/Tag.js +0 -36
  154. package/build/components/Tooltip.d.ts +0 -8
  155. package/build/components/Tooltip.js +0 -8
  156. package/build/components/Utilities/Currency.d.ts +0 -32
  157. package/build/components/Utilities/Currency.js +0 -49
  158. package/build/components/Utilities/Number.d.ts +0 -8
  159. package/build/components/Utilities/Number.js +0 -15
  160. package/build/components/Utilities/Phone.d.ts +0 -8
  161. package/build/components/Utilities/Phone.js +0 -19
  162. package/build/full.css +0 -2
  163. package/build/helpers/avatar.d.ts +0 -1
  164. package/build/helpers/avatar.js +0 -8
  165. package/build/helpers/browser.d.ts +0 -2
  166. package/build/helpers/browser.js +0 -9
  167. package/build/helpers/children.d.ts +0 -3
  168. package/build/helpers/children.js +0 -6
  169. package/build/helpers/classnames.d.ts +0 -5
  170. package/build/helpers/currency.d.ts +0 -2
  171. package/build/helpers/currency.js +0 -11
  172. package/build/helpers/date.d.ts +0 -12
  173. package/build/helpers/date.js +0 -49
  174. package/build/helpers/flash.d.ts +0 -21
  175. package/build/helpers/flash.js +0 -87
  176. package/build/helpers/numbers.d.ts +0 -4
  177. package/build/helpers/numbers.js +0 -23
  178. package/build/helpers/phone.d.ts +0 -11
  179. package/build/helpers/phone.js +0 -25
  180. package/build/hooks/useId.d.ts +0 -1
  181. package/build/hooks/useId.js +0 -9
  182. package/build/hooks/useIsClient.d.ts +0 -1
  183. package/build/hooks/useIsClient.js +0 -10
  184. package/build/hooks/useViewportHeight.d.ts +0 -1
  185. package/build/hooks/useViewportHeight.js +0 -15
  186. package/build/icons/src/AnnounceIcon.js +0 -13
  187. package/build/icons/src/BellIcon.js +0 -27
  188. package/build/icons/src/CalendarIcon.js +0 -16
  189. package/build/icons/src/CheckIcon.js +0 -8
  190. package/build/icons/src/ChevronDownIcon.js +0 -8
  191. package/build/icons/src/ChevronLeftIcon.js +0 -8
  192. package/build/icons/src/ChevronRightIcon.js +0 -8
  193. package/build/icons/src/CircleNotch.js +0 -6
  194. package/build/icons/src/CloseIcon.js +0 -11
  195. package/build/icons/src/DownArrowIcon.js +0 -16
  196. package/build/icons/src/ImageIcon.js +0 -27
  197. package/build/icons/src/SearchIcon.js +0 -16
  198. package/build/icons/src/TrashIcon.js +0 -20
  199. package/build/icons/src/WarningDiamondIcon.js +0 -27
  200. package/build/icons/src/helpers/classnames.js +0 -8
  201. package/build/icons/src/helpers/icon.js +0 -11
  202. package/build/icons/src/helpers/iconSizes.js +0 -13
  203. package/build/icons/src/images/XolaLogoSimple.js +0 -14
  204. package/build/index.d.ts +0 -66
  205. package/build/index.js +0 -142
  206. package/build/theme.d.ts +0 -413
  207. package/build/theme.js +0 -372
  208. package/build/types/index.d.ts +0 -22
  209. package/build/types/migration.d.ts +0 -2
  210. package/build/ui-kit.css +0 -1
  211. package/build/utils/avatar.d.ts +0 -1
  212. package/build/utils/avatar.js +0 -8
  213. package/build/utils/currency.d.ts +0 -2
  214. package/build/utils/currency.js +0 -11
  215. package/build/utils/index.d.ts +0 -4
  216. package/build/utils/numbers.d.ts +0 -4
  217. package/build/utils/numbers.js +0 -19
  218. package/build/utils/phone.d.ts +0 -2
  219. package/build/utils/phone.js +0 -17
@@ -1,10 +0,0 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import n from "clsx";
3
- const o = {
4
- small: "w-10 h-10",
5
- medium: "w-16 h-16",
6
- large: "w-20 h-20"
7
- }, r = ({ size: s = "small", className: e, ...m }) => /* @__PURE__ */ l("img", { className: n("ui-logo", e, "inline-block rounded object-cover", o[s]), ...m }), i = Object.assign(r, { sizes: o });
8
- export {
9
- i as Logo
10
- };
@@ -1,52 +0,0 @@
1
- import { default as React } from 'react';
2
- declare const sizes: {
3
- readonly small: "max-w-100";
4
- readonly medium: "max-w-125";
5
- readonly large: "max-w-150";
6
- readonly huge: "max-w-200";
7
- };
8
- declare const positions: {
9
- readonly center: "inline-block";
10
- readonly topLeft: "absolute m-4 top-0 left-0";
11
- readonly topRight: "absolute m-4 top-0 right-0";
12
- readonly bottomLeft: "absolute m-4 bottom-0 left-0";
13
- readonly bottomRight: "absolute m-4 bottom-0 right-0";
14
- };
15
- type ModalSize = keyof typeof sizes;
16
- type ModalPosition = keyof typeof positions;
17
- export interface ModalProps {
18
- size?: ModalSize;
19
- position?: ModalPosition;
20
- isOpen: boolean;
21
- shouldCloseOnOutsideClick?: boolean;
22
- children: React.ReactNode;
23
- className?: string;
24
- onClose: () => void;
25
- }
26
- export declare const Modal: {
27
- ({ size, position, isOpen, shouldCloseOnOutsideClick, children, className, onClose, }: ModalProps): React.JSX.Element;
28
- Header: {
29
- ({ description, children, className, ...rest }: ModalHeaderProps): React.JSX.Element;
30
- displayName: string;
31
- };
32
- Body: {
33
- ({ className, ...rest }: ModalBodyProps): React.JSX.Element;
34
- displayName: string;
35
- };
36
- Footer: {
37
- ({ className, ...rest }: ModalFooterProps): React.JSX.Element;
38
- displayName: string;
39
- };
40
- };
41
- export interface ModalHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
42
- description?: string;
43
- children: React.ReactNode;
44
- className?: string;
45
- }
46
- export interface ModalBodyProps extends React.HTMLAttributes<HTMLDivElement> {
47
- className?: string;
48
- }
49
- export interface ModalFooterProps extends React.HTMLAttributes<HTMLDivElement> {
50
- className?: string;
51
- }
52
- export {};
@@ -1,126 +0,0 @@
1
- import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
- import { Transition as s, Dialog as d } from "@headlessui/react";
3
- import o from "clsx";
4
- import { Fragment as m } from "react";
5
- import { CloseIcon as v } from "../icons/src/CloseIcon.js";
6
- const y = {
7
- small: "max-w-100",
8
- // 400px
9
- medium: "max-w-125",
10
- // 500px
11
- large: "max-w-150",
12
- // 600px
13
- huge: "max-w-200"
14
- // 800px
15
- }, x = {
16
- center: "inline-block",
17
- topLeft: "absolute m-4 top-0 left-0",
18
- topRight: "absolute m-4 top-0 right-0",
19
- bottomLeft: "absolute m-4 bottom-0 left-0",
20
- bottomRight: "absolute m-4 bottom-0 right-0"
21
- }, r = {
22
- center: {
23
- enterFrom: "translate-y-4 sm:translate-y-0 sm:scale-95",
24
- enterTo: "translate-y-0 sm:scale-100",
25
- leaveFrom: "translate-y-0 sm:scale-100",
26
- leaveTo: "translate-y-4 sm:translate-y-0 sm:scale-95"
27
- },
28
- topLeft: {
29
- enterFrom: "scale-0 origin-top-left",
30
- enterTo: "scale-100 origin-top-left",
31
- leaveFrom: "scale-100 origin-top-left",
32
- leaveTo: "scale-0 origin-top-left"
33
- },
34
- topRight: {
35
- enterFrom: "scale-0 origin-top-right",
36
- enterTo: "scale-100 origin-top-right",
37
- leaveFrom: "scale-100 origin-top-right",
38
- leaveTo: "scale-0 origin-top-right"
39
- },
40
- bottomLeft: {
41
- enterFrom: "scale-0 origin-bottom-left",
42
- enterTo: "scale-100 origin-bottom-left",
43
- leaveFrom: "scale-100 origin-bottom-left",
44
- leaveTo: "scale-0 origin-bottom-left"
45
- },
46
- bottomRight: {
47
- enterFrom: "scale-0 origin-bottom-right",
48
- enterTo: "scale-100 origin-bottom-right",
49
- leaveFrom: "scale-100 origin-bottom-right",
50
- leaveTo: "scale-0 origin-bottom-right"
51
- }
52
- }, g = ({
53
- size: a = "medium",
54
- position: e = "center",
55
- isOpen: l = !1,
56
- shouldCloseOnOutsideClick: i = !1,
57
- children: b,
58
- className: f,
59
- onClose: n
60
- }) => /* @__PURE__ */ t(s, { appear: !0, show: l, as: m, children: /* @__PURE__ */ t(d, { as: "div", className: "ui-modal fixed inset-0 z-30 overflow-y-auto", onClose: () => {
61
- i && n();
62
- }, children: /* @__PURE__ */ c("div", { className: "min-h-screen px-4 text-center", children: [
63
- /* @__PURE__ */ t(
64
- s.Child,
65
- {
66
- as: m,
67
- enter: "ease-out duration-300",
68
- enterFrom: "opacity-0",
69
- enterTo: "opacity-100",
70
- leave: "ease-in duration-200",
71
- leaveFrom: "opacity-100",
72
- leaveTo: "opacity-0",
73
- children: /* @__PURE__ */ t(d.Overlay, { className: "ui-modal-overlay fixed inset-0 bg-black bg-opacity-80 transition-opacity" })
74
- }
75
- ),
76
- e === "center" && /* @__PURE__ */ t("span", { className: "inline-block h-screen align-middle", "aria-hidden": "true", children: "​" }),
77
- /* @__PURE__ */ t(
78
- s.Child,
79
- {
80
- as: m,
81
- enter: o("ease-out duration-300"),
82
- enterFrom: o("opacity-0", r[e].enterFrom),
83
- enterTo: o("opacity-100", r[e].enterTo),
84
- leave: o("ease-in duration-300"),
85
- leaveFrom: o("opacity-100", r[e].leaveFrom),
86
- leaveTo: o("opacity-0", r[e].leaveTo),
87
- children: /* @__PURE__ */ c(
88
- "div",
89
- {
90
- className: o(
91
- f,
92
- y[a],
93
- x[e],
94
- "w-full transform overflow-hidden rounded-lg bg-white p-10 text-left align-middle shadow-xl transition-all"
95
- ),
96
- children: [
97
- n ? /* @__PURE__ */ t(
98
- "button",
99
- {
100
- type: "button",
101
- className: "absolute right-0 top-0 m-4 hidden p-2 text-black hover:text-gray-darker sm:block",
102
- onClick: () => n(),
103
- children: /* @__PURE__ */ t(v, {})
104
- }
105
- ) : null,
106
- b
107
- ]
108
- }
109
- )
110
- }
111
- )
112
- ] }) }) }), h = ({ description: a, children: e, className: l, ...i }) => /* @__PURE__ */ c(d.Title, { as: "div", className: o(l, "ui-modal-header text-center"), ...i, children: [
113
- /* @__PURE__ */ t("h3", { className: "text-2xl font-semibold leading-6 text-black", children: e }),
114
- a ? /* @__PURE__ */ t("p", { className: "mt-2 text-base font-normal leading-normal text-gray-darker", children: a }) : null
115
- ] });
116
- h.displayName = "Modal.Header";
117
- const p = ({ className: a, ...e }) => /* @__PURE__ */ t("div", { className: o(a, "ui-modal-body mt-10"), ...e });
118
- p.displayName = "Modal.Body";
119
- const u = ({ className: a, ...e }) => /* @__PURE__ */ t("div", { className: o(a, "ui-modal-footer mt-10 space-x-4 text-right"), ...e });
120
- u.displayName = "Modal.Footer";
121
- g.Header = h;
122
- g.Body = p;
123
- g.Footer = u;
124
- export {
125
- g as Modal
126
- };
@@ -1,20 +0,0 @@
1
- import { TippyProps } from '@tippyjs/react';
2
- import { default as React } from 'react';
3
- export interface PopoverProps extends Omit<Partial<TippyProps>, "children" | "className"> {
4
- isLazy?: boolean;
5
- skidding?: number;
6
- distance?: number;
7
- children: React.ReactNode;
8
- className?: string;
9
- }
10
- export declare const Popover: {
11
- ({ isLazy, skidding, distance, children, className, ...rest }: PopoverProps): React.JSX.Element;
12
- Content: {
13
- ({ children, className }: PopoverContentProps): React.JSX.Element;
14
- displayName: string;
15
- };
16
- };
17
- export interface PopoverContentProps {
18
- children: React.ReactNode;
19
- className?: string;
20
- }
@@ -1,50 +0,0 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import d from "@tippyjs/react";
3
- import u from "clsx";
4
- import { Children as y, forwardRef as g, useState as C } from "react";
5
- import { followCursor as v } from "tippy.js";
6
- import "tippy.js/dist/border.css";
7
- import "tippy.js/dist/tippy.css";
8
- import { getChildrenByType as x } from "../../helpers/children.js";
9
- import T from "./Popover.module.css.js";
10
- import h from "./PopoverScroll.module.css.js";
11
- const z = ({ isLazy: t = !0, skidding: o = 0, distance: r = 10, children: n, className: s, ...e }) => {
12
- const p = x(n, l), a = y.toArray(n).filter((i) => i.type !== l);
13
- return /* @__PURE__ */ m(
14
- t ? f : d,
15
- {
16
- interactive: !0,
17
- zIndex: 50,
18
- content: p,
19
- className: u(
20
- "ui-popover",
21
- h,
22
- T.main,
23
- "!rounded-lg !border-gray-light shadow-xl",
24
- s
25
- ),
26
- plugins: [v],
27
- offset: [o ?? 0, r ?? 10],
28
- ...e,
29
- children: /* @__PURE__ */ m("span", { children: a })
30
- }
31
- );
32
- }, l = ({ children: t, className: o }) => /* @__PURE__ */ m("div", { className: u("ui-popover-content", o), children: t });
33
- l.displayName = "Popover.Content";
34
- z.Content = l;
35
- const f = g((t, o) => {
36
- const [r, n] = C(!1), s = {
37
- fn: () => ({
38
- onMount: () => n(!0),
39
- onHidden: () => n(!1)
40
- })
41
- }, e = { ...t };
42
- return e.plugins = [s, ...t.plugins ?? []], t.render ? e.render = (p, a, c) => {
43
- var i;
44
- return r ? (i = t.render) == null ? void 0 : i.call(t, p, a, c) : "";
45
- } : e.content = r ? t.content : "", /* @__PURE__ */ m(d, { ...e, ref: o });
46
- });
47
- f.displayName = "LazyTippy";
48
- export {
49
- z as Popover
50
- };
@@ -1,7 +0,0 @@
1
- const t = "_main_jm0tk_1", a = {
2
- main: t
3
- };
4
- export {
5
- a as default,
6
- t as main
7
- };
@@ -1,25 +0,0 @@
1
- import { TippyProps } from '@tippyjs/react';
2
- import { default as React } from 'react';
3
- import { PopoverProps } from './Popover';
4
- export interface PopoverListProps extends Omit<Partial<PopoverProps>, "placement" | "children" | "className"> {
5
- placement?: TippyProps["placement"];
6
- children: React.ReactNode;
7
- className?: string;
8
- }
9
- export declare const PopoverList: {
10
- ({ placement, children, className, ...rest }: PopoverListProps): React.JSX.Element;
11
- Item: {
12
- ({ name, isActive, id, position, total, children, className, onClickItem, ...rest }: PopoverListItemProps): React.JSX.Element;
13
- displayName: string;
14
- };
15
- };
16
- export interface PopoverListItemProps {
17
- name: string;
18
- isActive?: boolean;
19
- id?: string | null;
20
- position?: number;
21
- total?: number;
22
- children: React.ReactNode;
23
- className?: string;
24
- onClickItem: (event: React.MouseEvent<HTMLDivElement>, name: string, id: string | null) => void;
25
- }
@@ -1,59 +0,0 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import g from "clsx";
3
- import v, { Children as h } from "react";
4
- import { Popover as u } from "./Popover.js";
5
- import f from "./PopoverScroll.module.css.js";
6
- const y = ({ placement: n = "bottom", children: i, className: s, ...o }) => {
7
- const e = h.toArray(i), r = e.filter((t) => t.type !== l), m = e.length - r.length, c = e.map((t, a) => t.type === l ? v.cloneElement(t, { position: a, total: m }) : null), p = /* @__PURE__ */ d(
8
- u.Content,
9
- {
10
- className: g(f, "ui-popover-list-content divide-y divide-solid divide-gray-lighter p-0 "),
11
- children: c
12
- }
13
- );
14
- return /* @__PURE__ */ d(
15
- u,
16
- {
17
- content: p,
18
- placement: n,
19
- className: g("ui-popover-list", "w-40", s),
20
- ...o,
21
- children: r
22
- }
23
- );
24
- }, l = ({
25
- name: n,
26
- isActive: i = !1,
27
- id: s = null,
28
- position: o,
29
- total: e,
30
- children: r,
31
- className: m,
32
- onClickItem: c,
33
- ...p
34
- }) => {
35
- const t = (a) => c(a, n, s);
36
- return /* @__PURE__ */ d(
37
- "div",
38
- {
39
- className: g(
40
- "ui-popover-list-item",
41
- "flex cursor-pointer space-x-2.5 p-4 align-text-top font-semibold leading-4 tracking-tightest hover:bg-gray-lighter",
42
- i ? "bg-gray-lighter" : null,
43
- o === 1 ? "rounded-t-lg" : null,
44
- // Round the top left & right corners if it's the first one
45
- o === e ? "rounded-b-lg" : null,
46
- // Round bottom left & right if it's the last one
47
- m
48
- ),
49
- onClick: t,
50
- ...p,
51
- children: r
52
- }
53
- );
54
- };
55
- l.displayName = "PopoverList.Item";
56
- y.Item = l;
57
- export {
58
- y as PopoverList
59
- };
@@ -1,4 +0,0 @@
1
- const l = {};
2
- export {
3
- l as default
4
- };
@@ -1,18 +0,0 @@
1
- import { default as React } from 'react';
2
- export interface ContextValue {
3
- generateId: () => number;
4
- localize: boolean;
5
- locale: string;
6
- }
7
- export declare const Context: React.Context<ContextValue>;
8
- export interface ProviderProps {
9
- children: React.ReactNode;
10
- localize?: boolean;
11
- locale?: string;
12
- }
13
- /**
14
- * UI Kit's default provider.
15
- * Must be used from now on in order to generate correct component IDs.
16
- * Also a good place to implement any global state required for the UI Kit in the future.
17
- */
18
- export declare const Provider: ({ children, localize, locale }: ProviderProps) => React.JSX.Element;
@@ -1,17 +0,0 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { createContext as s, useRef as i, useCallback as c, useMemo as l } from "react";
3
- let p = 1;
4
- const m = s({
5
- generateId: () => (console.warn(
6
- "Please wrap your app with `<Provider />` component from `@xola/ui-kit`. Otherwise your app will not work with SSR frameworks."
7
- ), p++),
8
- localize: !0,
9
- locale: "en_US"
10
- }), f = ({ children: n, localize: e = !0, locale: r = "en_US" }) => {
11
- const t = i(1), o = c(() => t.current++, [t]), a = l(() => ({ generateId: o, localize: e, locale: r }), [o, e, r]);
12
- return /* @__PURE__ */ u(m.Provider, { value: a, children: n });
13
- };
14
- export {
15
- m as Context,
16
- f as Provider
17
- };
@@ -1,25 +0,0 @@
1
- import { default as React } from 'react';
2
- declare const backgrounds: {
3
- readonly default: "https://files.xola.com/x2/images/login/old-photo-1554629947-334ff61d85dc.jpeg";
4
- readonly x2: "https://files.xola.com/x2/images/login/x2-34fc260271ca80160c61777846784611.jpeg";
5
- readonly admin: "https://files.xola.com/x2/images/login/admin-42e40b1836193f064f0fe0fafce1d2af.png";
6
- readonly scaffold: "https://files.xola.com/x2/images/login/scaffold-f3bd19169b6976f1c75da53e7b61d0a7.jpeg";
7
- };
8
- type BackgroundType = keyof typeof backgrounds;
9
- export interface LoginValues {
10
- email: string;
11
- password: string;
12
- shouldRemember: boolean;
13
- }
14
- export interface LoginProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSubmit"> {
15
- defaultValues?: Partial<LoginValues>;
16
- isLoading?: boolean;
17
- error?: string | null;
18
- onSubmit?: (values: LoginValues) => void;
19
- passwordResetUrl?: string;
20
- label?: React.ReactNode;
21
- backgroundImage?: string | null;
22
- backgroundType?: BackgroundType;
23
- }
24
- export declare const Login: ({ defaultValues, isLoading, error, onSubmit, passwordResetUrl, label, backgroundImage, backgroundType, ...rest }: LoginProps) => React.JSX.Element;
25
- export {};
@@ -1,144 +0,0 @@
1
- import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import { useState as C } from "react";
3
- import { Alert as j } from "../Alert.js";
4
- import { Button as I } from "../Buttons/Button.js";
5
- import { Checkbox as R } from "../Forms/Checkbox.js";
6
- import { FormGroup as u } from "../Forms/FormGroup.js";
7
- import { Input as f } from "../Forms/Input.js";
8
- import { Label as p } from "../Forms/Label.js";
9
- import { Spinner as F } from "../Spinner.js";
10
- import { XolaLogoSimple as B } from "../../icons/src/images/XolaLogoSimple.js";
11
- const g = {
12
- default: "https://files.xola.com/x2/images/login/old-photo-1554629947-334ff61d85dc.jpeg",
13
- x2: "https://files.xola.com/x2/images/login/x2-34fc260271ca80160c61777846784611.jpeg",
14
- admin: "https://files.xola.com/x2/images/login/admin-42e40b1836193f064f0fe0fafce1d2af.png",
15
- scaffold: "https://files.xola.com/x2/images/login/scaffold-f3bd19169b6976f1c75da53e7b61d0a7.jpeg"
16
- }, G = ({
17
- defaultValues: h,
18
- isLoading: c = !1,
19
- error: t = null,
20
- onSubmit: o,
21
- passwordResetUrl: x,
22
- label: m,
23
- backgroundImage: b = null,
24
- backgroundType: y = "default",
25
- ...w
26
- }) => {
27
- const [r, d] = C({
28
- email: "",
29
- password: "",
30
- shouldRemember: !1,
31
- ...h
32
- }), i = (l) => {
33
- const { name: n, value: s } = l.target;
34
- d({ ...r, [n]: s });
35
- }, v = (l) => {
36
- const { name: n, checked: s } = l.target;
37
- d({ ...r, [n]: s });
38
- }, k = (l) => {
39
- l.preventDefault(), o == null || o(r);
40
- }, N = {
41
- backgroundImage: `url("${b ?? g[y] ?? g.default}")`,
42
- backgroundRepeat: "no-repeat",
43
- backgroundPosition: "center",
44
- backgroundSize: "cover"
45
- };
46
- return /* @__PURE__ */ a(
47
- "div",
48
- {
49
- className: "ui-login h-screen overflow-hidden bg-white bg-opacity-100 bg-blend-overlay md:bg-opacity-0",
50
- style: N,
51
- ...w,
52
- children: [
53
- /* @__PURE__ */ e("div", { className: "md:full flex h-[88%] w-full flex-col items-center justify-center space-y-8", children: /* @__PURE__ */ a("div", { className: "w-85 rounded-lg px-9 py-0 md:bg-white md:py-10", children: [
54
- /* @__PURE__ */ a("div", { className: "mb-12 space-y-4 md:mb-20", children: [
55
- /* @__PURE__ */ e(B, { className: "mx-auto h-10 w-auto md:h-12" }),
56
- m && /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: m })
57
- ] }),
58
- /* @__PURE__ */ e("form", { onSubmit: k, children: /* @__PURE__ */ a("fieldset", { className: "space-y-6", disabled: c, children: [
59
- /* @__PURE__ */ a("div", { className: "-space-y-px rounded-md bg-white", children: [
60
- /* @__PURE__ */ a(u, { className: "md:mb-7", children: [
61
- /* @__PURE__ */ e(p, { children: "Email" }),
62
- /* @__PURE__ */ e(
63
- f,
64
- {
65
- required: !0,
66
- name: "email",
67
- type: "email",
68
- autoComplete: "email",
69
- value: r.email,
70
- isError: !!t,
71
- onChange: i
72
- }
73
- )
74
- ] }),
75
- /* @__PURE__ */ a(u, { children: [
76
- /* @__PURE__ */ e(p, { children: "Password" }),
77
- /* @__PURE__ */ e(
78
- f,
79
- {
80
- required: !0,
81
- name: "password",
82
- type: "password",
83
- autoComplete: "current-password",
84
- value: r.password,
85
- isError: !!t,
86
- onChange: i
87
- }
88
- )
89
- ] })
90
- ] }),
91
- /* @__PURE__ */ e(
92
- R,
93
- {
94
- name: "shouldRemember",
95
- label: "Remember me",
96
- checked: r.shouldRemember,
97
- onChange: v
98
- }
99
- ),
100
- t ? /* @__PURE__ */ e(j, { color: "danger", children: t }) : null,
101
- /* @__PURE__ */ a(I, { type: "submit", className: "w-full", color: "primary", children: [
102
- c ? /* @__PURE__ */ e(F, { size: "current", color: "current", className: "mr-2" }) : null,
103
- "Login"
104
- ] }),
105
- /* @__PURE__ */ e("div", { className: "mt-5 text-center text-sm", children: /* @__PURE__ */ e(
106
- "a",
107
- {
108
- href: x,
109
- className: "font-semibold text-gray-darker underline hover:text-black",
110
- target: "_blank",
111
- rel: "noreferrer",
112
- children: "Forgot your password?"
113
- }
114
- ) })
115
- ] }) })
116
- ] }) }),
117
- /* @__PURE__ */ e("footer", { children: /* @__PURE__ */ e("div", { className: "flex w-full flex-col items-center justify-center overflow-hidden px-4 py-1 sm:px-6 lg:px-8", children: /* @__PURE__ */ a("div", { className: "m-5 w-85 rounded-lg px-4 text-center text-xs opacity-80 md:text-sm", children: [
118
- /* @__PURE__ */ a(
119
- "a",
120
- {
121
- href: "https://www.xola.com/team",
122
- target: "_blank",
123
- className: "text-gray md:text-gray-dark",
124
- rel: "noreferrer",
125
- children: [
126
- "Designed in San Francisco & Rouen, France",
127
- /* @__PURE__ */ e("br", {}),
128
- "Built in Houston, Belgrade, Ukraine & Bengaluru"
129
- ]
130
- }
131
- ),
132
- /* @__PURE__ */ a("div", { className: "text-center text-gray md:text-gray-dark", children: [
133
- "© ",
134
- (/* @__PURE__ */ new Date()).getFullYear(),
135
- " Xola, Inc."
136
- ] })
137
- ] }) }) })
138
- ]
139
- }
140
- );
141
- };
142
- export {
143
- G as Login
144
- };
@@ -1,16 +0,0 @@
1
- import { default as React } from 'react';
2
- export interface SearchProps<T = any> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "onSelect" | "onSubmit" | "children"> {
3
- className?: string;
4
- items?: T[];
5
- defaultValue?: string;
6
- onChange?: (value: string) => void;
7
- onSubmit?: (value: string) => void;
8
- onSelect?: (item: T) => void;
9
- children?: (item: T, isHighlighted: boolean) => React.ReactNode;
10
- isLoading?: boolean;
11
- shouldStayOpen?: boolean;
12
- shouldDestroyOnClose?: boolean;
13
- shouldHideMenu?: boolean;
14
- minChars?: number;
15
- }
16
- export declare const Search: <T = any>({ className, items, defaultValue, onChange, onSubmit, onSelect, children, isLoading, shouldStayOpen, shouldDestroyOnClose, shouldHideMenu, minChars, ...rest }: SearchProps<T>) => React.JSX.Element;