@xola/ui-kit 3.4.5 → 3.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -2
- package/build/components/Alert.js +5 -5
- package/build/components/Badge.d.ts +1 -0
- package/build/components/Badge.js +10 -8
- package/build/components/Buttons/ButtonGroup.js +13 -13
- package/build/components/Buttons/SubmitButton.js +6 -6
- package/build/components/DatePicker/DatePickerPopover.js +12 -12
- package/build/components/DatePicker/MonthGrid.js +17 -17
- package/build/components/DatePicker/MonthSelector.js +13 -13
- package/build/components/DatePicker/NavbarElement.js +9 -9
- package/build/components/Drawer.js +4 -4
- package/build/components/Forms/InlineValuePopover.js +4 -4
- package/build/components/Forms/ValuePopoverText.js +5 -5
- package/build/components/ImageUpload.js +10 -10
- package/build/components/Modal.js +9 -9
- package/build/components/Popover/PopoverList.js +7 -7
- package/build/components/Screens/Login.js +10 -10
- package/build/components/Search.js +4 -4
- package/build/components/Sidebar/Sidebar.Account.js +4 -4
- package/build/components/Sidebar/Sidebar.Link.js +5 -5
- package/build/components/Sidebar/Sidebar.js +25 -25
- package/build/components/Spinner.js +1 -1
- package/build/components/Table.js +4 -4
- package/build/components/Tag.js +3 -3
- package/build/full.css +1 -1
- package/build/helpers/flash.js +1 -1
- package/build/icons/src/AnnounceIcon.js +13 -0
- package/build/icons/src/BellIcon.js +27 -0
- package/build/icons/{build → src}/CalendarIcon.js +6 -5
- package/build/icons/src/CheckIcon.js +8 -0
- package/build/icons/src/ChevronDownIcon.js +8 -0
- package/build/icons/src/ChevronLeftIcon.js +8 -0
- package/build/icons/src/ChevronRightIcon.js +8 -0
- package/build/icons/src/CircleNotch.js +6 -0
- package/build/icons/src/CloseIcon.js +11 -0
- package/build/icons/src/DownArrowIcon.js +16 -0
- package/build/icons/src/ImageIcon.js +27 -0
- package/build/icons/src/SearchIcon.js +16 -0
- package/build/icons/src/TrashIcon.js +20 -0
- package/build/icons/src/WarningDiamondIcon.js +27 -0
- package/build/icons/{build → src}/helpers/classnames.js +2 -2
- package/build/icons/src/helpers/icon.js +11 -0
- package/build/icons/{build → src}/images/XolaLogoSimple.js +5 -4
- package/package.json +1 -1
- package/build/icons/build/AnnounceIcon.js +0 -6
- package/build/icons/build/BellIcon.js +0 -23
- package/build/icons/build/CheckIcon.js +0 -7
- package/build/icons/build/ChevronDownIcon.js +0 -7
- package/build/icons/build/ChevronLeftIcon.js +0 -7
- package/build/icons/build/ChevronRightIcon.js +0 -7
- package/build/icons/build/CircleNotch.js +0 -5
- package/build/icons/build/CloseIcon.js +0 -7
- package/build/icons/build/DownArrowIcon.js +0 -15
- package/build/icons/build/ImageIcon.js +0 -23
- package/build/icons/build/SearchIcon.js +0 -15
- package/build/icons/build/TrashIcon.js +0 -16
- package/build/icons/build/WarningDiamondIcon.js +0 -23
- package/build/icons/build/helpers/icon.js +0 -10
- /package/build/icons/{build → src}/helpers/iconSizes.js +0 -0
package/README.md
CHANGED
|
@@ -72,13 +72,18 @@ export { default } from "@xola/ui-kit/postcss.config.js";
|
|
|
72
72
|
|
|
73
73
|
#### Import Styles and Components
|
|
74
74
|
|
|
75
|
-
Import
|
|
75
|
+
Import CSS files in your project's entry point (e.g., `main.tsx` or `App.tsx`):
|
|
76
76
|
|
|
77
77
|
```js
|
|
78
|
+
// Full Tailwind setup with base styles, fonts, and CSS reset
|
|
78
79
|
import "@xola/ui-kit/index.css";
|
|
80
|
+
|
|
81
|
+
// Component-specific styles (Popover, Checkbox, RangeSlider, Sidebar, Skeleton, etc.)
|
|
79
82
|
import "@xola/ui-kit/build/ui-kit.css";
|
|
80
83
|
```
|
|
81
84
|
|
|
85
|
+
**Both imports are required** for components to render correctly. The first provides Tailwind base styles and fonts, while the second includes all component CSS modules.
|
|
86
|
+
|
|
82
87
|
UI kit expects you already have a working React 18+ dev environment with PostCSS support.
|
|
83
88
|
|
|
84
89
|
Import and use the components (with full TypeScript support):
|
|
@@ -164,7 +169,27 @@ $ rm -rf node_modules/@xola
|
|
|
164
169
|
|
|
165
170
|
### Troubleshooting
|
|
166
171
|
|
|
167
|
-
|
|
172
|
+
#### Missing Component Styles
|
|
173
|
+
|
|
174
|
+
If components are rendering without styles (e.g., Popover, Checkbox, RangeSlider), ensure both CSS imports are present:
|
|
175
|
+
|
|
176
|
+
```js
|
|
177
|
+
import "@xola/ui-kit/index.css"; // Tailwind base + fonts
|
|
178
|
+
import "tippy.js/dist/tippy.css";
|
|
179
|
+
import "@xola/ui-kit/build/ui-kit.css"; // Component CSS modules
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
All component-specific styles are bundled in `ui-kit.css`, including:
|
|
183
|
+
- Popover (`.main` with arrow styles)
|
|
184
|
+
- PopoverScroll (scrollbar customization)
|
|
185
|
+
- Checkbox (custom checkmark)
|
|
186
|
+
- RangeSlider (noUiSlider styling)
|
|
187
|
+
- Sidebar (menu and scroll styles)
|
|
188
|
+
- Skeleton (shimmer animation)
|
|
189
|
+
|
|
190
|
+
#### Package Installation Issues
|
|
191
|
+
|
|
192
|
+
If you encounter package related issues, try removing the following directories and running the install command again:
|
|
168
193
|
|
|
169
194
|
```bash
|
|
170
195
|
$ cd workspace
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { CloseIcon as n } from "../icons/
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import s from "clsx";
|
|
3
|
+
import { CloseIcon as n } from "../icons/src/CloseIcon.js";
|
|
4
4
|
const o = {
|
|
5
5
|
primary: "bg-primary-lighter text-black",
|
|
6
6
|
secondary: "bg-secondary-lighter text-black",
|
|
@@ -8,10 +8,10 @@ const o = {
|
|
|
8
8
|
warning: "bg-warning-lighter text-black",
|
|
9
9
|
danger: "bg-danger-lighter text-black",
|
|
10
10
|
caution: "bg-caution-lighter text-black"
|
|
11
|
-
}, u = ({ color: r = "primary", children: a, className: l, onClose: e, ...c }) => /* @__PURE__ */
|
|
11
|
+
}, u = ({ color: r = "primary", children: a, className: l, onClose: e, ...c }) => /* @__PURE__ */ i(
|
|
12
12
|
"div",
|
|
13
13
|
{
|
|
14
|
-
className:
|
|
14
|
+
className: s(
|
|
15
15
|
"ui-alert flex items-start rounded px-3 py-3 text-base leading-4",
|
|
16
16
|
o[r],
|
|
17
17
|
l
|
|
@@ -10,6 +10,7 @@ declare const colors: {
|
|
|
10
10
|
readonly critical: "bg-danger text-white";
|
|
11
11
|
};
|
|
12
12
|
declare const sizes: {
|
|
13
|
+
readonly xs: "px-1 py-0.5 h-3 text-xs";
|
|
13
14
|
readonly small: "px-2 py-0.75 h-5 text-sm leading-sm";
|
|
14
15
|
readonly medium: "px-3 py-1.5 h-7.5 text-base leading-base";
|
|
15
16
|
readonly large: "px-3.5 py-0.75 h-10 text-lg leading-lg";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import r from "clsx";
|
|
3
3
|
import { cloneElement as g } from "react";
|
|
4
4
|
const c = {
|
|
5
5
|
primary: "bg-primary-lighter text-primary-dark",
|
|
@@ -11,30 +11,32 @@ const c = {
|
|
|
11
11
|
problem: "bg-warning text-white",
|
|
12
12
|
critical: "bg-danger text-white"
|
|
13
13
|
}, m = {
|
|
14
|
+
xs: "px-1 py-0.5 h-3 text-xs",
|
|
14
15
|
small: "px-2 py-0.75 h-5 text-sm leading-sm",
|
|
15
16
|
medium: "px-3 py-1.5 h-7.5 text-base leading-base",
|
|
16
17
|
large: "px-3.5 py-0.75 h-10 text-lg leading-lg"
|
|
17
|
-
},
|
|
18
|
+
}, x = {
|
|
19
|
+
xs: "w-2.5 h-2.5",
|
|
18
20
|
small: "w-3 h-3",
|
|
19
21
|
medium: "w-4 h-4",
|
|
20
22
|
large: "w-5 h-5 mr-1.5"
|
|
21
|
-
},
|
|
23
|
+
}, p = ({ color: a = "primary", size: e = "small", icon: t, children: s, className: i, ...l }) => /* @__PURE__ */ n(
|
|
22
24
|
"span",
|
|
23
25
|
{
|
|
24
|
-
className:
|
|
26
|
+
className: r(
|
|
25
27
|
"ui-badge",
|
|
26
28
|
"inline-flex items-center whitespace-nowrap rounded-full",
|
|
27
29
|
c[a],
|
|
28
30
|
m[e],
|
|
29
|
-
|
|
31
|
+
i
|
|
30
32
|
),
|
|
31
33
|
...l,
|
|
32
34
|
children: [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
t ? g(t, { className: r("mr-1", x[e]) }) : null,
|
|
36
|
+
s
|
|
35
37
|
]
|
|
36
38
|
}
|
|
37
39
|
);
|
|
38
40
|
export {
|
|
39
|
-
|
|
41
|
+
p as Badge
|
|
40
42
|
};
|
|
@@ -8,47 +8,47 @@ const B = {
|
|
|
8
8
|
}, k = ({
|
|
9
9
|
size: i,
|
|
10
10
|
value: e,
|
|
11
|
-
isCollapsed:
|
|
11
|
+
isCollapsed: a = !1,
|
|
12
12
|
children: p,
|
|
13
|
-
className:
|
|
13
|
+
className: u,
|
|
14
14
|
onChange: t,
|
|
15
15
|
...n
|
|
16
|
-
}) => /* @__PURE__ */ d("span", { className: m("ui-button-group", "inline-flex whitespace-nowrap",
|
|
16
|
+
}) => /* @__PURE__ */ d("span", { className: m("ui-button-group", "inline-flex whitespace-nowrap", u), ...n, children: h.map(p, (r, o) => {
|
|
17
17
|
if (!x.isValidElement(r) || r.props.isHidden)
|
|
18
18
|
return null;
|
|
19
19
|
const s = { size: i };
|
|
20
|
-
return e !== void 0 && (s.isActive = e === o),
|
|
21
|
-
}) }),
|
|
20
|
+
return e !== void 0 && (s.isActive = e === o), a && e >= 0 && e !== o && (s.shouldShowText = !1), t && (s.onClick = () => t(o)), y(r, s);
|
|
21
|
+
}) }), c = ({
|
|
22
22
|
as: i,
|
|
23
23
|
isActive: e,
|
|
24
|
-
shouldShowText:
|
|
24
|
+
shouldShowText: a = !0,
|
|
25
25
|
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
26
26
|
isHidden: p = !1,
|
|
27
|
-
size:
|
|
27
|
+
size: u = "medium",
|
|
28
28
|
icon: t,
|
|
29
29
|
iconPlacement: n = "left",
|
|
30
30
|
children: r,
|
|
31
31
|
className: o,
|
|
32
32
|
...s
|
|
33
33
|
}) => {
|
|
34
|
-
const
|
|
34
|
+
const f = i ?? "button", l = { ...s };
|
|
35
35
|
delete l.isActive, delete l.shouldShowText, delete l.isHidden;
|
|
36
36
|
const b = m(
|
|
37
37
|
"ui-button-group-button",
|
|
38
38
|
"inline-flex border-t border-l border-b last:border-r first:rounded-l-md last:rounded-r-md transition-colors focus:ring disabled:opacity-60 focus:z-10 leading-none",
|
|
39
|
-
B[
|
|
39
|
+
B[u],
|
|
40
40
|
e ? "bg-primary border-primary text-white hover:bg-primary-dark" : "border-gray-light hover:bg-gray-lighter text-gray-darker",
|
|
41
41
|
o
|
|
42
42
|
);
|
|
43
|
-
return /* @__PURE__ */ g(
|
|
43
|
+
return /* @__PURE__ */ g(f, { className: b, ...l, children: [
|
|
44
44
|
t && n === "left" ? /* @__PURE__ */ d("span", { className: "mr-2 flex-shrink-0", children: t }) : null,
|
|
45
|
-
|
|
45
|
+
a ? r : t ? null : r,
|
|
46
46
|
t && n === "right" ? /* @__PURE__ */ d("span", { className: "ml-2 flex-shrink-0", children: t }) : null
|
|
47
47
|
] });
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
c.displayName = "ButtonGroup.Button";
|
|
50
50
|
const j = Object.assign(k, {
|
|
51
|
-
Button:
|
|
51
|
+
Button: c
|
|
52
52
|
});
|
|
53
53
|
export {
|
|
54
54
|
j as ButtonGroup
|
|
@@ -2,9 +2,9 @@ import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { Transition as g } from "@headlessui/react";
|
|
3
3
|
import o from "clsx";
|
|
4
4
|
import { useState as y, useEffect as b } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { Spinner as d } from "../Spinner.js";
|
|
6
|
+
import { Button as x } from "./Button.js";
|
|
7
|
+
import { CheckIcon as w } from "../../icons/src/CheckIcon.js";
|
|
8
8
|
const N = {
|
|
9
9
|
primary: "!bg-primary-light",
|
|
10
10
|
secondary: "!bg-secondary-light",
|
|
@@ -33,7 +33,7 @@ const N = {
|
|
|
33
33
|
}, [c, e]);
|
|
34
34
|
const t = !!e || r;
|
|
35
35
|
return /* @__PURE__ */ l(
|
|
36
|
-
|
|
36
|
+
x,
|
|
37
37
|
{
|
|
38
38
|
color: i,
|
|
39
39
|
variant: n,
|
|
@@ -59,7 +59,7 @@ const N = {
|
|
|
59
59
|
enterTo: "opacity-100",
|
|
60
60
|
children: [
|
|
61
61
|
r && /* @__PURE__ */ s(
|
|
62
|
-
|
|
62
|
+
w,
|
|
63
63
|
{
|
|
64
64
|
size: "medium",
|
|
65
65
|
className: o("relative -top-0.25 text-white", {
|
|
@@ -67,7 +67,7 @@ const N = {
|
|
|
67
67
|
})
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
|
-
e && !r && /* @__PURE__ */ s(
|
|
70
|
+
e && !r && /* @__PURE__ */ s(d, { size: "current", color: "current", className: "relative -top-0.25 text-white" })
|
|
71
71
|
]
|
|
72
72
|
}
|
|
73
73
|
)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as D, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import y from "clsx";
|
|
3
3
|
import { useState as m, useEffect as E, cloneElement as L, forwardRef as A } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { formatDate as q } from "../../helpers/date.js";
|
|
7
|
-
import { Input as B } from "../Forms/Input.js";
|
|
4
|
+
import { formatDate as M } from "../../helpers/date.js";
|
|
5
|
+
import { Input as W } from "../Forms/Input.js";
|
|
8
6
|
import { Popover as x } from "../Popover/Popover.js";
|
|
9
|
-
import { DatePicker as
|
|
10
|
-
import { MonthPicker as
|
|
7
|
+
import { DatePicker as q } from "./DatePicker.js";
|
|
8
|
+
import { MonthPicker as B } from "./MonthPicker.js";
|
|
9
|
+
import { CalendarIcon as F } from "../../icons/src/CalendarIcon.js";
|
|
10
|
+
import { DownArrowIcon as G } from "../../icons/src/DownArrowIcon.js";
|
|
11
11
|
const $ = ({
|
|
12
12
|
value: t,
|
|
13
13
|
variant: r = "single",
|
|
@@ -49,14 +49,14 @@ const $ = ({
|
|
|
49
49
|
{
|
|
50
50
|
readOnly: !0,
|
|
51
51
|
size: "medium",
|
|
52
|
-
value: t ?
|
|
52
|
+
value: t ? M(t, l) : "",
|
|
53
53
|
placeholder: V,
|
|
54
54
|
className: o == null ? void 0 : o.input,
|
|
55
55
|
onClick: s
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
|
-
/* @__PURE__ */ e(x.Content, { className: "pr-1", children: c && (N === "month" ? /* @__PURE__ */ e(
|
|
59
|
-
|
|
58
|
+
/* @__PURE__ */ e(x.Content, { className: "pr-1", children: c && (N === "month" ? /* @__PURE__ */ e(B, { value: t, onChange: a, ...p }) : /* @__PURE__ */ e(
|
|
59
|
+
q,
|
|
60
60
|
{
|
|
61
61
|
variant: r,
|
|
62
62
|
getDayContent: S,
|
|
@@ -71,9 +71,9 @@ const $ = ({
|
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
73
|
}, I = A(({ className: t, ...r }, l) => /* @__PURE__ */ D("div", { ref: l, className: "relative flex bg-gray-lighter", children: [
|
|
74
|
-
/* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-0 flex items-center pl-3", children: /* @__PURE__ */ e(
|
|
75
|
-
/* @__PURE__ */ e(
|
|
76
|
-
/* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3", children: /* @__PURE__ */ e(
|
|
74
|
+
/* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-0 flex items-center pl-3", children: /* @__PURE__ */ e(F, { className: "z-10 inline-block" }) }),
|
|
75
|
+
/* @__PURE__ */ e(W, { className: y("no-translate cursor-pointer px-8", t), ...r }),
|
|
76
|
+
/* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3", children: /* @__PURE__ */ e(G, { className: "inline-block" }) })
|
|
77
77
|
] }));
|
|
78
78
|
I.displayName = "DefaultInput";
|
|
79
79
|
export {
|
|
@@ -2,44 +2,44 @@ import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import x from "clsx";
|
|
3
3
|
import u from "dayjs";
|
|
4
4
|
import { useContext as g } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import { ChevronRightIcon as k } from "../../icons/build/ChevronRightIcon.js";
|
|
7
|
-
import { Context as y } from "../Provider.js";
|
|
5
|
+
import { Context as C } from "../Provider.js";
|
|
8
6
|
import { Button as i } from "../Buttons/Button.js";
|
|
9
7
|
import { ChevronButton as s } from "./NavbarElement.js";
|
|
8
|
+
import { ChevronLeftIcon as k } from "../../icons/src/ChevronLeftIcon.js";
|
|
9
|
+
import { ChevronRightIcon as y } from "../../icons/src/ChevronRightIcon.js";
|
|
10
10
|
const v = u(), A = ({
|
|
11
11
|
year: r,
|
|
12
12
|
value: n,
|
|
13
|
-
locale:
|
|
14
|
-
onChange:
|
|
13
|
+
locale: m,
|
|
14
|
+
onChange: a,
|
|
15
15
|
handleYearChange: c,
|
|
16
16
|
handleClear: d,
|
|
17
17
|
handleToday: h
|
|
18
18
|
}) => {
|
|
19
|
-
const { locale: p } = g(
|
|
20
|
-
(
|
|
21
|
-
), b = (
|
|
22
|
-
const
|
|
23
|
-
|
|
19
|
+
const { locale: p } = g(C), f = [...Array.from({ length: 12 }).keys()].map(
|
|
20
|
+
(e) => v.locale(m ?? p).month(e).format("MMM")
|
|
21
|
+
), b = (e) => {
|
|
22
|
+
const o = new Date(r, e);
|
|
23
|
+
a(o);
|
|
24
24
|
};
|
|
25
25
|
return /* @__PURE__ */ l("span", { className: "min-w-72", children: [
|
|
26
26
|
/* @__PURE__ */ l("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
27
|
-
/* @__PURE__ */ t(s, { onClick: () => c(-1), children: /* @__PURE__ */ t(
|
|
27
|
+
/* @__PURE__ */ t(s, { onClick: () => c(-1), children: /* @__PURE__ */ t(k, {}) }),
|
|
28
28
|
/* @__PURE__ */ t("span", { className: "text-lg font-bold", children: r }),
|
|
29
|
-
/* @__PURE__ */ t(s, { onClick: () => c(1), children: /* @__PURE__ */ t(
|
|
29
|
+
/* @__PURE__ */ t(s, { onClick: () => c(1), children: /* @__PURE__ */ t(y, {}) })
|
|
30
30
|
] }),
|
|
31
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-2", children: f.map((
|
|
31
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-2", children: f.map((e, o) => /* @__PURE__ */ t(
|
|
32
32
|
"button",
|
|
33
33
|
{
|
|
34
34
|
type: "button",
|
|
35
35
|
className: x(
|
|
36
|
-
n && n.getMonth() ===
|
|
36
|
+
n && n.getMonth() === o && n.getFullYear() === r ? "bg-blue-dark text-white" : "text-black",
|
|
37
37
|
"rounded-md p-4 text-center hover:bg-blue-dark hover:text-white"
|
|
38
38
|
),
|
|
39
|
-
onClick: () => b(
|
|
40
|
-
children:
|
|
39
|
+
onClick: () => b(o),
|
|
40
|
+
children: e
|
|
41
41
|
},
|
|
42
|
-
|
|
42
|
+
e
|
|
43
43
|
)) }),
|
|
44
44
|
/* @__PURE__ */ l("div", { className: "mt-2 flex justify-between border-t border-gray-lighter pt-2", children: [
|
|
45
45
|
/* @__PURE__ */ t(i, { size: "small", color: "secondary", variant: "outline", onClick: d, children: "Clear" }),
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import M from "dayjs";
|
|
3
3
|
import { useState as m } from "react";
|
|
4
|
-
import { ChevronDownIcon as Y } from "../../icons/build/ChevronDownIcon.js";
|
|
5
4
|
import { Popover as d } from "../Popover/Popover.js";
|
|
6
|
-
import { MonthGrid as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import { MonthGrid as Y } from "./MonthGrid.js";
|
|
6
|
+
import { ChevronDownIcon as g } from "../../icons/src/ChevronDownIcon.js";
|
|
7
|
+
const j = ({ date: o, currentMonth: p, locale: s, onChange: i }) => {
|
|
8
|
+
const [l, t] = m(!1), [a, h] = m(new Date(p).getFullYear()), f = () => {
|
|
9
|
+
t(!l);
|
|
10
10
|
}, b = (n) => {
|
|
11
11
|
i(n), t(!1);
|
|
12
12
|
}, u = (n) => {
|
|
13
|
-
h(
|
|
13
|
+
h(a + n);
|
|
14
14
|
}, r = () => {
|
|
15
15
|
t(!1);
|
|
16
16
|
}, C = () => {
|
|
17
17
|
i(/* @__PURE__ */ new Date()), t(!1);
|
|
18
18
|
};
|
|
19
|
-
return /* @__PURE__ */ e("span", { className: "DayPicker-Caption", children: /* @__PURE__ */ e("span", { className: "inline-block", children: /* @__PURE__ */ c(d, { visible:
|
|
19
|
+
return /* @__PURE__ */ e("span", { className: "DayPicker-Caption", children: /* @__PURE__ */ e("span", { className: "inline-block", children: /* @__PURE__ */ c(d, { visible: l, distance: 5, skidding: 60, placement: "bottom", onClickOutside: r, children: [
|
|
20
20
|
/* @__PURE__ */ c(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
23
|
className: "mt-2 min-w-40 cursor-pointer items-center justify-between text-left font-bold",
|
|
24
24
|
onClick: f,
|
|
25
25
|
children: [
|
|
26
|
-
/* @__PURE__ */ e("span", { className: "pr-1 text-lg", children: M(
|
|
27
|
-
/* @__PURE__ */ e(
|
|
26
|
+
/* @__PURE__ */ e("span", { className: "pr-1 text-lg", children: M(o).locale(s ?? "en").format("MMMM YYYY") }),
|
|
27
|
+
/* @__PURE__ */ e(g, {})
|
|
28
28
|
]
|
|
29
29
|
}
|
|
30
30
|
),
|
|
31
31
|
/* @__PURE__ */ e(d.Content, { className: "p-2", children: /* @__PURE__ */ e(
|
|
32
|
-
|
|
32
|
+
Y,
|
|
33
33
|
{
|
|
34
|
-
year:
|
|
35
|
-
value:
|
|
36
|
-
locale:
|
|
34
|
+
year: a,
|
|
35
|
+
value: o,
|
|
36
|
+
locale: s,
|
|
37
37
|
handleClear: r,
|
|
38
38
|
handleToday: C,
|
|
39
39
|
handleYearChange: u,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import a from "clsx";
|
|
3
3
|
import { useCallback as l } from "react";
|
|
4
4
|
import { useDayPicker as m } from "react-day-picker";
|
|
5
|
-
import { ChevronLeftIcon as p } from "../../icons/
|
|
6
|
-
import { ChevronRightIcon as x } from "../../icons/
|
|
5
|
+
import { ChevronLeftIcon as p } from "../../icons/src/ChevronLeftIcon.js";
|
|
6
|
+
import { ChevronRightIcon as x } from "../../icons/src/ChevronRightIcon.js";
|
|
7
7
|
const C = ({ className: i, onTodayClick: t }) => {
|
|
8
8
|
const { nextMonth: e, previousMonth: o, goToMonth: n } = m(), b = !e, h = !o, d = l(() => {
|
|
9
9
|
o && n(o);
|
|
10
10
|
}, [o, n]), u = l(() => {
|
|
11
11
|
e && n(e);
|
|
12
12
|
}, [n, e]);
|
|
13
|
-
return /* @__PURE__ */ s("nav", { className:
|
|
13
|
+
return /* @__PURE__ */ s("nav", { className: a("h-8 right-0 absolute items-center flex space-x-4 z-10", i), children: [
|
|
14
14
|
t && /* @__PURE__ */ r(
|
|
15
15
|
"button",
|
|
16
16
|
{
|
|
@@ -21,15 +21,15 @@ const C = ({ className: i, onTodayClick: t }) => {
|
|
|
21
21
|
}
|
|
22
22
|
),
|
|
23
23
|
/* @__PURE__ */ s("span", { className: "flex space-x-2", children: [
|
|
24
|
-
/* @__PURE__ */ r(
|
|
25
|
-
/* @__PURE__ */ r(
|
|
24
|
+
/* @__PURE__ */ r(c, { isVisible: !h, onClick: d, children: /* @__PURE__ */ r(p, {}) }),
|
|
25
|
+
/* @__PURE__ */ r(c, { isVisible: !b, onClick: u, children: /* @__PURE__ */ r(x, {}) })
|
|
26
26
|
] })
|
|
27
27
|
] });
|
|
28
|
-
},
|
|
28
|
+
}, c = ({ isVisible: i = !0, children: t, onClick: e }) => /* @__PURE__ */ r(
|
|
29
29
|
"button",
|
|
30
30
|
{
|
|
31
31
|
type: "button",
|
|
32
|
-
className:
|
|
32
|
+
className: a(
|
|
33
33
|
i ? "inline-block" : "invisible",
|
|
34
34
|
"inline-flex h-7 w-7 items-center justify-center rounded-full border border-transparent leading-none text-black hover:border-black"
|
|
35
35
|
),
|
|
@@ -38,6 +38,6 @@ const C = ({ className: i, onTodayClick: t }) => {
|
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
c as ChevronButton,
|
|
42
42
|
C as NavbarElement
|
|
43
43
|
};
|
|
@@ -4,8 +4,8 @@ import l from "clsx";
|
|
|
4
4
|
import { forwardRef as v, Fragment as m } from "react";
|
|
5
5
|
import { isIosBrowser as g } from "../helpers/browser.js";
|
|
6
6
|
import { useViewportHeight as y } from "../hooks/useViewportHeight.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { Button as b } from "./Buttons/Button.js";
|
|
8
|
+
import { CloseIcon as N } from "../icons/src/CloseIcon.js";
|
|
9
9
|
const T = {
|
|
10
10
|
small: "w-72",
|
|
11
11
|
medium: "w-85",
|
|
@@ -110,7 +110,7 @@ const T = {
|
|
|
110
110
|
);
|
|
111
111
|
F.displayName = "Drawer";
|
|
112
112
|
const c = ({ onClose: i }) => /* @__PURE__ */ e(
|
|
113
|
-
|
|
113
|
+
b,
|
|
114
114
|
{
|
|
115
115
|
size: "small",
|
|
116
116
|
variant: "link",
|
|
@@ -118,7 +118,7 @@ const c = ({ onClose: i }) => /* @__PURE__ */ e(
|
|
|
118
118
|
"m-2.5 inline-flex !h-10 !w-10 items-center justify-center !rounded-full bg-white !px-1.5 !text-black"
|
|
119
119
|
),
|
|
120
120
|
onClick: () => i(!1),
|
|
121
|
-
children: /* @__PURE__ */ e(
|
|
121
|
+
children: /* @__PURE__ */ e(N, { size: "medium" })
|
|
122
122
|
}
|
|
123
123
|
);
|
|
124
124
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import i from "clsx";
|
|
3
3
|
import { useRef as P } from "react";
|
|
4
|
-
import { DownArrowIcon as g } from "../../icons/build/DownArrowIcon.js";
|
|
5
4
|
import { Popover as l } from "../Popover/Popover.js";
|
|
6
|
-
import { ValuePopoverText as
|
|
5
|
+
import { ValuePopoverText as g } from "./ValuePopoverText.js";
|
|
6
|
+
import { DownArrowIcon as j } from "../../icons/src/DownArrowIcon.js";
|
|
7
7
|
const D = ({
|
|
8
8
|
text: f,
|
|
9
9
|
isOpen: x = !1,
|
|
@@ -34,8 +34,8 @@ const D = ({
|
|
|
34
34
|
),
|
|
35
35
|
onClick: w,
|
|
36
36
|
children: [
|
|
37
|
-
/* @__PURE__ */ e("span", { className: i("border-b border-b-black font-bold text-black", r == null ? void 0 : r.textField), children: /* @__PURE__ */ e(
|
|
38
|
-
b && /* @__PURE__ */ e(
|
|
37
|
+
/* @__PURE__ */ e("span", { className: i("border-b border-b-black font-bold text-black", r == null ? void 0 : r.textField), children: /* @__PURE__ */ e(g, { value: f, error: p }) }),
|
|
38
|
+
b && /* @__PURE__ */ e(j, { size: "medium" })
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
41
|
),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Tooltip as
|
|
3
|
-
import { WarningDiamondIcon as a } from "../../icons/
|
|
4
|
-
const l = ({ value: r, error: o }) => /* @__PURE__ */
|
|
5
|
-
o ? /* @__PURE__ */ n(
|
|
1
|
+
import { jsxs as e, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip as t } from "../Tooltip.js";
|
|
3
|
+
import { WarningDiamondIcon as a } from "../../icons/src/WarningDiamondIcon.js";
|
|
4
|
+
const l = ({ value: r, error: o }) => /* @__PURE__ */ e("span", { children: [
|
|
5
|
+
o ? /* @__PURE__ */ n(t, { content: o, className: "", children: /* @__PURE__ */ n("span", { children: /* @__PURE__ */ n(a, { className: "mr-1 text-danger" }) }) }) : null,
|
|
6
6
|
r
|
|
7
7
|
] });
|
|
8
8
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as e, Fragment as B } from "react/jsx-runtime";
|
|
2
2
|
import g from "clsx";
|
|
3
3
|
import { useRef as R, useState as U } from "react";
|
|
4
4
|
import { Button as w } from "./Buttons/Button.js";
|
|
5
5
|
import { SubmitButton as u } from "./Buttons/SubmitButton.js";
|
|
6
6
|
import { Logo as x } from "./Logo.js";
|
|
7
|
-
import { ImageIcon as G } from "../icons/
|
|
8
|
-
import { TrashIcon as K } from "../icons/
|
|
7
|
+
import { ImageIcon as G } from "../icons/src/ImageIcon.js";
|
|
8
|
+
import { TrashIcon as K } from "../icons/src/TrashIcon.js";
|
|
9
9
|
const H = ({
|
|
10
|
-
src:
|
|
10
|
+
src: a,
|
|
11
11
|
size: s = "large",
|
|
12
12
|
isLoading: l = !1,
|
|
13
13
|
maxSize: o = 5,
|
|
@@ -35,8 +35,8 @@ const H = ({
|
|
|
35
35
|
}, P = () => {
|
|
36
36
|
k(m + 1), v();
|
|
37
37
|
}, j = typeof t == "string" ? (t == null ? void 0 : t.trim().length) > 0 : !!t, f = r ? r.trim().length > 0 : !1;
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */ e("div", { children:
|
|
38
|
+
return /* @__PURE__ */ c("div", { className: g("flex items-center rounded bg-gray-lighter p-4", d ? "space-x-2" : "space-x-3"), children: [
|
|
39
|
+
/* @__PURE__ */ e("div", { children: a ? /* @__PURE__ */ e(x, { src: a, size: s }) : /* @__PURE__ */ e(
|
|
40
40
|
"div",
|
|
41
41
|
{
|
|
42
42
|
className: g(
|
|
@@ -46,8 +46,8 @@ const H = ({
|
|
|
46
46
|
children: /* @__PURE__ */ e(G, { size: "large", className: "text-gray" })
|
|
47
47
|
}
|
|
48
48
|
) }),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */ e("div", { className: "space-x-2", children: d ? /* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col space-y-2", children: [
|
|
50
|
+
/* @__PURE__ */ e("div", { className: "space-x-2", children: d ? /* @__PURE__ */ c(B, { children: [
|
|
51
51
|
/* @__PURE__ */ e(
|
|
52
52
|
w,
|
|
53
53
|
{
|
|
@@ -60,7 +60,7 @@ const H = ({
|
|
|
60
60
|
}
|
|
61
61
|
),
|
|
62
62
|
/* @__PURE__ */ e(u, { disabled: l, isLoading: l, onClick: p, children: f ? r.trim() : "Upload New Photo" })
|
|
63
|
-
] }) : /* @__PURE__ */ e(u, { disabled: l, isLoading: l, onClick: p, children: f ? r.trim() :
|
|
63
|
+
] }) : /* @__PURE__ */ e(u, { disabled: l, isLoading: l, onClick: p, children: f ? r.trim() : a ? "Replace Photo" : "Upload New Photo" }) }),
|
|
64
64
|
/* @__PURE__ */ e(
|
|
65
65
|
"input",
|
|
66
66
|
{
|
|
@@ -74,7 +74,7 @@ const H = ({
|
|
|
74
74
|
},
|
|
75
75
|
m
|
|
76
76
|
),
|
|
77
|
-
/* @__PURE__ */ e("div", { className: "text-xs text-gray-darker", children: j ? t : /* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ e("div", { className: "text-xs text-gray-darker", children: j ? t : /* @__PURE__ */ c("div", { children: [
|
|
78
78
|
"Check that the image is in PNG or JPG format",
|
|
79
79
|
o ? ` and does not exceed ${o}MB` : ""
|
|
80
80
|
] }) })
|
|
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
|
2
2
|
import { Transition as s, Dialog as d } from "@headlessui/react";
|
|
3
3
|
import o from "clsx";
|
|
4
4
|
import { Fragment as m } from "react";
|
|
5
|
-
import { CloseIcon as v } from "../icons/
|
|
5
|
+
import { CloseIcon as v } from "../icons/src/CloseIcon.js";
|
|
6
6
|
const y = {
|
|
7
7
|
small: "max-w-100",
|
|
8
8
|
// 400px
|
|
@@ -18,7 +18,7 @@ const y = {
|
|
|
18
18
|
topRight: "absolute m-4 top-0 right-0",
|
|
19
19
|
bottomLeft: "absolute m-4 bottom-0 left-0",
|
|
20
20
|
bottomRight: "absolute m-4 bottom-0 right-0"
|
|
21
|
-
},
|
|
21
|
+
}, r = {
|
|
22
22
|
center: {
|
|
23
23
|
enterFrom: "translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
24
24
|
enterTo: "translate-y-0 sm:scale-100",
|
|
@@ -52,12 +52,12 @@ const y = {
|
|
|
52
52
|
}, g = ({
|
|
53
53
|
size: a = "medium",
|
|
54
54
|
position: e = "center",
|
|
55
|
-
isOpen:
|
|
55
|
+
isOpen: l = !1,
|
|
56
56
|
shouldCloseOnOutsideClick: i = !1,
|
|
57
57
|
children: b,
|
|
58
58
|
className: f,
|
|
59
59
|
onClose: n
|
|
60
|
-
}) => /* @__PURE__ */ t(s, { appear: !0, show:
|
|
60
|
+
}) => /* @__PURE__ */ t(s, { appear: !0, show: l, as: m, children: /* @__PURE__ */ t(d, { as: "div", className: "ui-modal fixed inset-0 z-30 overflow-y-auto", onClose: () => {
|
|
61
61
|
i && n();
|
|
62
62
|
}, children: /* @__PURE__ */ c("div", { className: "min-h-screen px-4 text-center", children: [
|
|
63
63
|
/* @__PURE__ */ t(
|
|
@@ -79,11 +79,11 @@ const y = {
|
|
|
79
79
|
{
|
|
80
80
|
as: m,
|
|
81
81
|
enter: o("ease-out duration-300"),
|
|
82
|
-
enterFrom: o("opacity-0",
|
|
83
|
-
enterTo: o("opacity-100",
|
|
82
|
+
enterFrom: o("opacity-0", r[e].enterFrom),
|
|
83
|
+
enterTo: o("opacity-100", r[e].enterTo),
|
|
84
84
|
leave: o("ease-in duration-300"),
|
|
85
|
-
leaveFrom: o("opacity-100",
|
|
86
|
-
leaveTo: o("opacity-0",
|
|
85
|
+
leaveFrom: o("opacity-100", r[e].leaveFrom),
|
|
86
|
+
leaveTo: o("opacity-0", r[e].leaveTo),
|
|
87
87
|
children: /* @__PURE__ */ c(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
@@ -109,7 +109,7 @@ const y = {
|
|
|
109
109
|
)
|
|
110
110
|
}
|
|
111
111
|
)
|
|
112
|
-
] }) }) }), h = ({ description: a, children: e, className:
|
|
112
|
+
] }) }) }), h = ({ description: a, children: e, className: l, ...i }) => /* @__PURE__ */ c(d.Title, { as: "div", className: o(l, "ui-modal-header text-center"), ...i, children: [
|
|
113
113
|
/* @__PURE__ */ t("h3", { className: "text-2xl font-semibold leading-6 text-black", children: e }),
|
|
114
114
|
a ? /* @__PURE__ */ t("p", { className: "mt-2 text-base font-normal leading-normal text-gray-darker", children: a }) : null
|
|
115
115
|
] });
|