@xola/ui-kit 3.4.5 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -2
- package/build/components/Alert.js +6 -10
- package/build/components/Avatar.js +4 -4
- package/build/components/Badge.d.ts +2 -1
- package/build/components/Badge.js +18 -16
- package/build/components/Breadcrumb.js +1 -1
- package/build/components/Breakdown.js +20 -20
- package/build/components/Buttons/Button.js +1 -1
- package/build/components/Buttons/ButtonGroup.js +18 -18
- package/build/components/Buttons/SubmitButton.js +12 -12
- package/build/components/Buttons/ToggleButton.js +1 -1
- package/build/components/Counter.js +1 -1
- package/build/components/DatePicker/DatePicker.js +19 -19
- package/build/components/DatePicker/DatePickerPopover.js +18 -18
- package/build/components/DatePicker/Day.js +1 -1
- package/build/components/DatePicker/LocalizedDayPicker.js +14 -14
- package/build/components/DatePicker/MonthGrid.js +20 -20
- package/build/components/DatePicker/MonthSelector.js +13 -13
- package/build/components/DatePicker/NavbarElement.js +9 -9
- package/build/components/DatePicker/RangeDatePicker.js +3 -7
- package/build/components/DatePicker/UpcomingDatePicker.js +14 -14
- package/build/components/Dot/Dot.js +4 -4
- package/build/components/Drawer.js +9 -9
- package/build/components/Forms/BaseInput.js +4 -4
- package/build/components/Forms/Checkbox.js +5 -5
- package/build/components/Forms/ComboBox.js +10 -10
- package/build/components/Forms/FormGroup.js +3 -3
- package/build/components/Forms/InlineValuePopover.js +11 -11
- package/build/components/Forms/Input.js +5 -5
- package/build/components/Forms/Label.js +3 -3
- package/build/components/Forms/RangeSlider.js +14 -14
- package/build/components/Forms/Switch.js +15 -15
- package/build/components/Forms/Textarea.js +4 -4
- package/build/components/Forms/ValuePopoverText.js +5 -5
- package/build/components/HeaderToolbar.js +1 -1
- package/build/components/ImageUpload.js +11 -11
- package/build/components/Key.js +6 -6
- package/build/components/Logo.js +4 -4
- package/build/components/Modal.js +10 -10
- package/build/components/Popover/Popover.js +6 -12
- package/build/components/Popover/PopoverList.js +13 -22
- package/build/components/Screens/Login.js +10 -10
- package/build/components/Search.js +11 -11
- package/build/components/Sidebar/Sidebar.Account.js +8 -8
- package/build/components/Sidebar/Sidebar.Button.js +4 -4
- package/build/components/Sidebar/Sidebar.Heading.js +4 -4
- package/build/components/Sidebar/Sidebar.Link.js +21 -20
- package/build/components/Sidebar/Sidebar.Menu.d.ts +3 -0
- package/build/components/Sidebar/Sidebar.Menu.js +15 -13
- package/build/components/Sidebar/Sidebar.js +26 -26
- package/build/components/Skeleton.js +7 -7
- package/build/components/Spinner.js +2 -2
- package/build/components/Table.js +5 -5
- package/build/components/Tabs/Tabs.Panel.js +5 -5
- package/build/components/Tabs/Tabs.Tab.js +7 -7
- package/build/components/Tabs/Tabs.js +7 -7
- package/build/components/Tag.js +10 -10
- package/build/components/Utilities/Phone.js +3 -3
- package/build/full.css +1 -1
- package/build/{icons/build/helpers → helpers}/classnames.js +2 -2
- package/build/helpers/flash.js +5 -5
- package/build/icons/src/AnnounceIcon.js +13 -0
- package/build/icons/src/BellIcon.js +27 -0
- package/build/icons/{build → src}/CalendarIcon.js +6 -5
- package/build/icons/src/CheckIcon.js +8 -0
- package/build/icons/src/ChevronDownIcon.js +8 -0
- package/build/icons/src/ChevronLeftIcon.js +8 -0
- package/build/icons/src/ChevronRightIcon.js +8 -0
- package/build/icons/src/CircleNotch.js +6 -0
- package/build/icons/src/CloseIcon.js +11 -0
- package/build/icons/src/DownArrowIcon.js +16 -0
- package/build/icons/src/ImageIcon.js +27 -0
- package/build/icons/src/SearchIcon.js +16 -0
- package/build/icons/src/TrashIcon.js +20 -0
- package/build/icons/src/WarningDiamondIcon.js +27 -0
- package/build/icons/src/helpers/classnames.js +8 -0
- package/build/icons/src/helpers/icon.js +11 -0
- package/build/icons/{build → src}/images/XolaLogoSimple.js +5 -4
- package/package.json +1 -1
- package/build/icons/build/AnnounceIcon.js +0 -6
- package/build/icons/build/BellIcon.js +0 -23
- package/build/icons/build/CheckIcon.js +0 -7
- package/build/icons/build/ChevronDownIcon.js +0 -7
- package/build/icons/build/ChevronLeftIcon.js +0 -7
- package/build/icons/build/ChevronRightIcon.js +0 -7
- package/build/icons/build/CircleNotch.js +0 -5
- package/build/icons/build/CloseIcon.js +0 -7
- package/build/icons/build/DownArrowIcon.js +0 -15
- package/build/icons/build/ImageIcon.js +0 -23
- package/build/icons/build/SearchIcon.js +0 -15
- package/build/icons/build/TrashIcon.js +0 -16
- package/build/icons/build/WarningDiamondIcon.js +0 -23
- package/build/icons/build/helpers/icon.js +0 -10
- /package/build/icons/{build → src}/helpers/iconSizes.js +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { kebabCase as u } from "lodash-es";
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as s, useState as l, useEffect as n } from "react";
|
|
3
|
+
import { DayPicker as p } from "react-day-picker";
|
|
4
|
+
import { kebabCase as f } from "lodash-es";
|
|
6
5
|
import { enUS as r } from "date-fns/locale";
|
|
6
|
+
import u from "../../helpers/classnames.js";
|
|
7
7
|
import { Context as P } from "../Provider.js";
|
|
8
|
-
import { getLocalizationProps as
|
|
9
|
-
const
|
|
10
|
-
const { locale: o } =
|
|
11
|
-
return
|
|
8
|
+
import { getLocalizationProps as z } from "./DatePicker.helpers.js";
|
|
9
|
+
const C = ({ className: a, ...i }) => {
|
|
10
|
+
const { locale: o } = s(P), [c, t] = l({ locale: r });
|
|
11
|
+
return n(() => {
|
|
12
12
|
t({ locale: r });
|
|
13
|
-
const e =
|
|
14
|
-
!e || e === "en" || e === "en-us" ||
|
|
15
|
-
}, [o]), /* @__PURE__ */
|
|
13
|
+
const e = f(o).toLowerCase();
|
|
14
|
+
!e || e === "en" || e === "en-us" || z(o).then(t);
|
|
15
|
+
}, [o]), /* @__PURE__ */ m(p, { className: u(a), ...c, ...i });
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
C.displayName = "LocalizedDayPicker";
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
C as LocalizedDayPicker
|
|
20
20
|
};
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import x from "clsx";
|
|
3
2
|
import u from "dayjs";
|
|
4
|
-
import { useContext as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { Context as y } from "../Provider.js";
|
|
3
|
+
import { useContext as x } from "react";
|
|
4
|
+
import g from "../../helpers/classnames.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 } =
|
|
20
|
-
(
|
|
21
|
-
), b = (
|
|
22
|
-
const
|
|
23
|
-
|
|
19
|
+
const { locale: p } = x(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
|
-
className:
|
|
36
|
-
n && n.getMonth() ===
|
|
35
|
+
className: g(
|
|
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 c from "clsx";
|
|
3
2
|
import { useCallback as l } from "react";
|
|
4
3
|
import { useDayPicker as m } from "react-day-picker";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
4
|
+
import a from "../../helpers/classnames.js";
|
|
5
|
+
import { ChevronLeftIcon as p } from "../../icons/src/ChevronLeftIcon.js";
|
|
6
|
+
import { ChevronRightIcon as f } 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(f, {}) })
|
|
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
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as K, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import a from "clsx";
|
|
3
2
|
import { isFunction as Q, isArray as U } from "lodash-es";
|
|
4
3
|
import { now as d } from "../../helpers/date.js";
|
|
4
|
+
import a from "../../helpers/classnames.js";
|
|
5
5
|
import { Tooltip as V } from "../Tooltip.js";
|
|
6
6
|
import { Day as W } from "./Day.js";
|
|
7
7
|
import { LocalizedDayPicker as F } from "./LocalizedDayPicker.js";
|
|
@@ -84,9 +84,7 @@ const et = ({
|
|
|
84
84
|
/* @__PURE__ */ n(
|
|
85
85
|
F,
|
|
86
86
|
{
|
|
87
|
-
className: a(
|
|
88
|
-
"pt-6 tracking-tightest max-w-[400px] rounded-lg ring-0 focus:outline-none focus:ring-0"
|
|
89
|
-
),
|
|
87
|
+
className: a("pt-6 tracking-tightest max-w-[400px] rounded-lg ring-0 focus:outline-none focus:ring-0"),
|
|
90
88
|
mode: "single",
|
|
91
89
|
selected: b == null ? void 0 : b.from,
|
|
92
90
|
month: c,
|
|
@@ -107,9 +105,7 @@ const et = ({
|
|
|
107
105
|
/* @__PURE__ */ n(
|
|
108
106
|
F,
|
|
109
107
|
{
|
|
110
|
-
className: a(
|
|
111
|
-
"pt-6 tracking-tightest max-w-[400px] rounded-lg ring-0 focus:outline-none focus:ring-0"
|
|
112
|
-
),
|
|
108
|
+
className: a("pt-6 tracking-tightest max-w-[400px] rounded-lg ring-0 focus:outline-none focus:ring-0"),
|
|
113
109
|
mode: "single",
|
|
114
110
|
selected: y || b == null ? void 0 : b.to,
|
|
115
111
|
month: m,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
(r == null ? void 0 : r.length) > 0 ? /* @__PURE__ */
|
|
7
|
-
const m =
|
|
8
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsxs as b, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import l from "dayjs";
|
|
3
|
+
import c from "../../helpers/classnames.js";
|
|
4
|
+
const x = ({ value: o, upcomingDates: r, onChange: d, onMonthChange: i }) => /* @__PURE__ */ b("div", { className: "rounded-l-lg border-r border-gray pt-8", children: [
|
|
5
|
+
/* @__PURE__ */ t("p", { className: "mb-2 px-6 text-lg font-bold", children: "Upcoming" }),
|
|
6
|
+
(r == null ? void 0 : r.length) > 0 ? /* @__PURE__ */ t("div", { className: "mt-5", children: r == null ? void 0 : r.map((e) => {
|
|
7
|
+
const m = l(e).isSame(l(o), "day"), n = l(e).format();
|
|
8
|
+
return /* @__PURE__ */ t(
|
|
9
9
|
"div",
|
|
10
10
|
{
|
|
11
11
|
className: c(
|
|
@@ -13,15 +13,15 @@ const f = ({ value: o, upcomingDates: r, onChange: d, onMonthChange: i }) => /*
|
|
|
13
13
|
"rounded border border-gray py-3 hover:border-blue hover:bg-blue hover:text-white",
|
|
14
14
|
{ "border-blue bg-blue text-white": m }
|
|
15
15
|
),
|
|
16
|
-
onClick: (
|
|
17
|
-
d(e, {},
|
|
16
|
+
onClick: (s) => {
|
|
17
|
+
d(e, {}, s), i(e);
|
|
18
18
|
},
|
|
19
|
-
children:
|
|
19
|
+
children: l(e).format("ddd DD MMMM")
|
|
20
20
|
},
|
|
21
|
-
|
|
21
|
+
n
|
|
22
22
|
);
|
|
23
|
-
}) }) : /* @__PURE__ */
|
|
23
|
+
}) }) : /* @__PURE__ */ t("div", { className: "mx-6 mt-7 max-w-40 items-center justify-center rounded bg-yellow-lighter p-3", children: "There is no future availability for this product." })
|
|
24
24
|
] });
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
x as UpcomingDatePicker
|
|
27
27
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import a from "
|
|
2
|
+
import a from "../../helpers/classnames.js";
|
|
3
3
|
const i = {
|
|
4
4
|
primary: "bg-primary",
|
|
5
5
|
secondary: "bg-secondary",
|
|
@@ -12,11 +12,11 @@ const i = {
|
|
|
12
12
|
medium: "h-1.5 w-1.5",
|
|
13
13
|
large: "h-2 w-2",
|
|
14
14
|
xlarge: "h-8 w-8"
|
|
15
|
-
}, g = ({ color: r = "primary", size:
|
|
15
|
+
}, g = ({ color: r = "primary", size: n = "medium", className: s, ...e }) => /* @__PURE__ */ o(
|
|
16
16
|
"span",
|
|
17
17
|
{
|
|
18
|
-
className: a("ui-dot", "inline-block rounded-full text-white", i[r], c[
|
|
19
|
-
...
|
|
18
|
+
className: a("ui-dot", "inline-block rounded-full text-white", i[r], c[n], s),
|
|
19
|
+
...e
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { Transition as o, Dialog as s } from "@headlessui/react";
|
|
3
|
-
import l from "clsx";
|
|
4
3
|
import { forwardRef as v, Fragment as m } from "react";
|
|
5
4
|
import { isIosBrowser as g } from "../helpers/browser.js";
|
|
5
|
+
import l from "../helpers/classnames.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",
|
|
@@ -18,8 +18,8 @@ const T = {
|
|
|
18
18
|
isOpen: i = !1,
|
|
19
19
|
title: f,
|
|
20
20
|
size: u = "medium",
|
|
21
|
-
content:
|
|
22
|
-
sideIndent:
|
|
21
|
+
content: h,
|
|
22
|
+
sideIndent: x = 0,
|
|
23
23
|
position: r = "right",
|
|
24
24
|
classNames: t = {},
|
|
25
25
|
onClose: a
|
|
@@ -66,7 +66,7 @@ const T = {
|
|
|
66
66
|
"div",
|
|
67
67
|
{
|
|
68
68
|
style: {
|
|
69
|
-
[r === "right" ? "right" : "left"]: `${
|
|
69
|
+
[r === "right" ? "right" : "left"]: `${x ?? 0}px`
|
|
70
70
|
},
|
|
71
71
|
className: l("fixed inset-y-0 flex max-w-full", t.dialogContent),
|
|
72
72
|
children: /* @__PURE__ */ e(
|
|
@@ -91,7 +91,7 @@ const T = {
|
|
|
91
91
|
),
|
|
92
92
|
children: [
|
|
93
93
|
/* @__PURE__ */ e("div", { className: "w-full", children: /* @__PURE__ */ e(s.Title, { children: f }) }),
|
|
94
|
-
/* @__PURE__ */ e("div", { className: l("relative mt-3 flex-1", t.content), children:
|
|
94
|
+
/* @__PURE__ */ e("div", { className: l("relative mt-3 flex-1", t.content), children: h })
|
|
95
95
|
]
|
|
96
96
|
}
|
|
97
97
|
),
|
|
@@ -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,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import y from "clsx";
|
|
1
|
+
import { jsxs as y, jsx as s } from "react/jsx-runtime";
|
|
3
2
|
import { isString as i, isEmpty as l } from "lodash-es";
|
|
4
3
|
import { forwardRef as u } from "react";
|
|
4
|
+
import x from "../../helpers/classnames.js";
|
|
5
5
|
import { Dot as h } from "../Dot/Dot.js";
|
|
6
6
|
const k = {
|
|
7
7
|
small: "px-3 py-1.5 text-sm leading-sm",
|
|
@@ -14,12 +14,12 @@ const k = {
|
|
|
14
14
|
let e = r;
|
|
15
15
|
return a && (e = e.replace(new RegExp(`^${a}`), "")), o && (e = e.replace(new RegExp(`${o}$`), "")), e.replaceAll(/[^.\S]+/g, "").replace(/[\p{Sc}]/u, "");
|
|
16
16
|
}, b = i(r) ? l(f()) : l(r == null ? void 0 : r.toString());
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ y("div", { className: "relative flex w-full items-center", children: [
|
|
18
18
|
/* @__PURE__ */ s(
|
|
19
19
|
t,
|
|
20
20
|
{
|
|
21
21
|
ref: m,
|
|
22
|
-
className:
|
|
22
|
+
className: x(
|
|
23
23
|
"w-full rounded text-gray-darker placeholder-gray-dark hover:placeholder-gray-darker disabled:text-gray",
|
|
24
24
|
"border hover:border-black hover:bg-gray-lighter focus:text-black active:text-black disabled:bg-gray-lighter",
|
|
25
25
|
k[d],
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import e from "
|
|
1
|
+
import { jsxs as n, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import e from "../../helpers/classnames.js";
|
|
3
3
|
import { useId as d } from "../../hooks/useId.js";
|
|
4
|
-
import
|
|
4
|
+
import s from "./Checkbox.module.css.js";
|
|
5
5
|
const m = ({ label: r, classNames: o = {}, className: i, ...l }) => {
|
|
6
6
|
const t = d("checkbox");
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ n("div", { className: e("ui-checkbox", i, "flex items-center"), children: [
|
|
8
8
|
/* @__PURE__ */ c(
|
|
9
9
|
"input",
|
|
10
10
|
{
|
|
@@ -12,7 +12,7 @@ const m = ({ label: r, classNames: o = {}, className: i, ...l }) => {
|
|
|
12
12
|
className: e(
|
|
13
13
|
"ui-checkbox-input",
|
|
14
14
|
o.checkbox,
|
|
15
|
-
|
|
15
|
+
s.checkbox,
|
|
16
16
|
"h-4 w-4 rounded !border-primary text-white transition-colors disabled:border-none disabled:bg-gray-light disabled:text-gray-light"
|
|
17
17
|
),
|
|
18
18
|
...l,
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import i from "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import d from "
|
|
2
|
+
import { useRef as i, useState as c, useEffect as s } from "react";
|
|
3
|
+
import m, { components as u } from "react-select";
|
|
4
|
+
import f from "react-select/creatable";
|
|
5
|
+
import d from "../../helpers/classnames.js";
|
|
6
6
|
import { Tooltip as b } from "../Tooltip.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
const R = ({ isCreatable: e = !1, isError: t, className: l, ...n }) => /* @__PURE__ */ o(
|
|
9
|
-
e ?
|
|
9
|
+
e ? f : m,
|
|
10
10
|
{
|
|
11
|
-
className:
|
|
11
|
+
className: d("ui-combo-box", t && "border-danger", l),
|
|
12
12
|
classNamePrefix: "ui-combo-box",
|
|
13
13
|
components: e ? {
|
|
14
14
|
IndicatorsContainer: () => null,
|
|
15
15
|
Menu: () => null,
|
|
16
|
-
MultiValueLabel:
|
|
16
|
+
MultiValueLabel: h
|
|
17
17
|
} : void 0,
|
|
18
18
|
...n
|
|
19
19
|
}
|
|
20
|
-
), { MultiValueLabel: p } =
|
|
21
|
-
const t =
|
|
22
|
-
return
|
|
20
|
+
), { MultiValueLabel: p } = u, h = (e) => {
|
|
21
|
+
const t = i(null), [l, n] = c(!0);
|
|
22
|
+
return s(() => {
|
|
23
23
|
var r;
|
|
24
24
|
if ((r = t.current) != null && r.offsetParent) {
|
|
25
25
|
const a = t.current.offsetWidth > t.current.offsetParent.clientWidth;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import p from "
|
|
3
|
-
const
|
|
2
|
+
import p from "../../helpers/classnames.js";
|
|
3
|
+
const s = ({ className: r, ...o }) => /* @__PURE__ */ m("div", { className: p("ui-form-group", r, "mb-4"), ...o });
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
s as FormGroup
|
|
6
6
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import i from "clsx";
|
|
3
2
|
import { useRef as P } from "react";
|
|
4
|
-
import
|
|
5
|
-
import { Popover as
|
|
6
|
-
import { ValuePopoverText as
|
|
3
|
+
import i from "../../helpers/classnames.js";
|
|
4
|
+
import { Popover as f } from "../Popover/Popover.js";
|
|
5
|
+
import { ValuePopoverText as g } from "./ValuePopoverText.js";
|
|
6
|
+
import { DownArrowIcon as j } from "../../icons/src/DownArrowIcon.js";
|
|
7
7
|
const D = ({
|
|
8
|
-
text:
|
|
9
|
-
isOpen:
|
|
10
|
-
showArrow:
|
|
8
|
+
text: l,
|
|
9
|
+
isOpen: b = !1,
|
|
10
|
+
showArrow: x = !0,
|
|
11
11
|
autoSelectOnClick: c = !1,
|
|
12
12
|
children: h,
|
|
13
13
|
error: p = null,
|
|
@@ -23,7 +23,7 @@ const D = ({
|
|
|
23
23
|
n && (n.focus(), c && n.select());
|
|
24
24
|
}, 0), o == null || o(I);
|
|
25
25
|
};
|
|
26
|
-
return /* @__PURE__ */ d(
|
|
26
|
+
return /* @__PURE__ */ d(f, { visible: b, className: "", onClickOutside: v, ...m, children: [
|
|
27
27
|
/* @__PURE__ */ d(
|
|
28
28
|
"span",
|
|
29
29
|
{
|
|
@@ -34,12 +34,12 @@ 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
|
-
|
|
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: l, error: p }) }),
|
|
38
|
+
x && /* @__PURE__ */ e(j, { size: "medium" })
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
41
|
),
|
|
42
|
-
/* @__PURE__ */ e(
|
|
42
|
+
/* @__PURE__ */ e(f.Content, { children: /* @__PURE__ */ e("div", { ref: t, className: i("p-2", r == null ? void 0 : r.children), children: h }) })
|
|
43
43
|
] });
|
|
44
44
|
};
|
|
45
45
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import a from "../../helpers/classnames.js";
|
|
4
4
|
import { BaseInput as e } from "./BaseInput.js";
|
|
5
|
-
const
|
|
6
|
-
|
|
5
|
+
const s = n(({ className: t, type: r = "text", value: o, ...p }, m) => /* @__PURE__ */ i(e, { ref: m, as: "input", className: a("ui-input", t), type: r, value: o, ...p }));
|
|
6
|
+
s.displayName = "Input";
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
s as Input
|
|
9
9
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import r from "
|
|
3
|
-
const
|
|
2
|
+
import r from "../../helpers/classnames.js";
|
|
3
|
+
const s = ({ isDisabled: t = !1, isError: e = !1, className: l, ...a }) => /* @__PURE__ */ o(
|
|
4
4
|
"label",
|
|
5
5
|
{
|
|
6
6
|
className: r(
|
|
@@ -13,5 +13,5 @@ const m = ({ isDisabled: t = !1, isError: e = !1, className: l, ...a }) => /* @_
|
|
|
13
13
|
}
|
|
14
14
|
);
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
s as Label
|
|
17
17
|
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import u from "
|
|
3
|
-
import g from "nouislider-react";
|
|
2
|
+
import u from "nouislider-react";
|
|
4
3
|
/* empty css */
|
|
4
|
+
import g from "../../helpers/classnames.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
const j = ({
|
|
7
7
|
values: t,
|
|
8
8
|
min: o,
|
|
9
9
|
max: e,
|
|
10
10
|
isDisabled: i = !1,
|
|
11
|
-
shouldConnectHandles:
|
|
12
|
-
step:
|
|
13
|
-
isTooltipEnabled:
|
|
14
|
-
tooltipCustomFormatter:
|
|
15
|
-
tooltipSuffix:
|
|
11
|
+
shouldConnectHandles: a = !1,
|
|
12
|
+
step: m = 1,
|
|
13
|
+
isTooltipEnabled: n = !0,
|
|
14
|
+
tooltipCustomFormatter: s = null,
|
|
15
|
+
tooltipSuffix: l,
|
|
16
16
|
className: p,
|
|
17
17
|
onChange: f
|
|
18
18
|
}) => {
|
|
19
|
-
const c =
|
|
19
|
+
const c = s ?? t.map(() => ({
|
|
20
20
|
from: (r) => r,
|
|
21
|
-
to: (r) => `${Math.round(r)}${
|
|
21
|
+
to: (r) => `${Math.round(r)}${l ?? ""}`
|
|
22
22
|
}));
|
|
23
23
|
return /* @__PURE__ */ d(
|
|
24
|
-
|
|
24
|
+
u,
|
|
25
25
|
{
|
|
26
|
-
className:
|
|
27
|
-
connect:
|
|
26
|
+
className: g("ui-range-slider", p),
|
|
27
|
+
connect: a,
|
|
28
28
|
disabled: i,
|
|
29
29
|
start: t,
|
|
30
30
|
range: { min: o, max: e },
|
|
31
|
-
step:
|
|
32
|
-
tooltips:
|
|
31
|
+
step: m,
|
|
32
|
+
tooltips: n ? c : !1,
|
|
33
33
|
onChange: f
|
|
34
34
|
}
|
|
35
35
|
);
|