quirk-ui 0.0.6 → 0.0.7
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/dist/arrow-right-CnuUc2oD.js +25 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/index.css.d.ts +1 -7
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index10.css.d.ts +5 -2
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index11.css.d.ts +3 -3
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index13.css.d.ts +4 -4
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index16.css.d.ts +1 -4
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index2.css.d.ts +7 -5
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index20.css.d.ts +2 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index21.css.d.ts +15 -4
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index22.css.d.ts +10 -2
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index23.css.d.ts +9 -3
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index24.css.d.ts +6 -3
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index25.css.d.ts +9 -5
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index26.css.d.ts +8 -17
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index27.css.d.ts +10 -5
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index28.css.d.ts +1 -8
- package/dist/assets/index29.css +1 -0
- package/dist/assets/index29.css.d.ts +12 -0
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index3.css.d.ts +3 -4
- package/dist/assets/index30.css +1 -0
- package/dist/assets/index30.css.d.ts +15 -0
- package/dist/assets/index31.css +1 -0
- package/dist/assets/index31.css.d.ts +12 -0
- package/dist/assets/index32.css +1 -0
- package/dist/assets/index32.css.d.ts +14 -0
- package/dist/assets/index33.css +1 -0
- package/dist/assets/index33.css.d.ts +5 -0
- package/dist/assets/index34.css +1 -0
- package/dist/assets/index34.css.d.ts +8 -0
- package/dist/assets/index35.css +1 -0
- package/dist/assets/index35.css.d.ts +6 -0
- package/dist/assets/index36.css +1 -0
- package/dist/assets/index36.css.d.ts +7 -0
- package/dist/assets/index37.css +1 -0
- package/dist/assets/index37.css.d.ts +7 -0
- package/dist/assets/index38.css +1 -0
- package/dist/assets/index38.css.d.ts +6 -0
- package/dist/assets/index39.css +1 -0
- package/dist/assets/index39.css.d.ts +6 -0
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index4.css.d.ts +5 -4
- package/dist/assets/index40.css +1 -0
- package/dist/assets/index40.css.d.ts +7 -0
- package/dist/assets/index41.css +1 -0
- package/dist/assets/index41.css.d.ts +10 -0
- package/dist/assets/index42.css +1 -0
- package/dist/assets/index42.css.d.ts +9 -0
- package/dist/assets/index43.css +1 -0
- package/dist/assets/index43.css.d.ts +20 -0
- package/dist/assets/index44.css +1 -0
- package/dist/assets/index44.css.d.ts +21 -0
- package/dist/assets/index45.css +1 -0
- package/dist/assets/index45.css.d.ts +9 -0
- package/dist/assets/index46.css +1 -0
- package/dist/assets/index46.css.d.ts +12 -0
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index5.css.d.ts +4 -17
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index6.css.d.ts +4 -7
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index7.css.d.ts +17 -2
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index8.css.d.ts +10 -6
- package/dist/assets/index9.css +1 -1
- package/dist/assets/index9.css.d.ts +7 -3
- package/dist/chevron-down-DSUzBz9F.js +11 -0
- package/dist/components/Accordion/Accordion.test.js +45 -0
- package/dist/components/Accordion/index.js +49 -0
- package/dist/components/Alert/Alert.test.js +52 -0
- package/dist/components/Alert/__mocks__/styles.module.css.js +11 -0
- package/dist/components/Alert/index.js +57 -0
- package/dist/components/Avatar/Avatar.test.js +51 -0
- package/dist/components/Avatar/index.js +51 -0
- package/dist/components/Badge/Badge.test.js +62 -0
- package/dist/components/Badge/__mocks__/styles.module.css.js +10 -0
- package/dist/components/Badge/index.js +41 -0
- package/dist/components/Box/Box.test.js +2 -1
- package/dist/components/Button/Button.test.js +2 -1
- package/dist/components/Button/index.js +14 -14
- package/dist/components/ButtonGroup/ButtonGroup.test.js +2 -1
- package/dist/components/ButtonGroup/index.js +11 -11
- package/dist/components/Calendar/Calendar.test.js +5 -4
- package/dist/components/Calendar/index.js +4 -2
- package/dist/components/Card/Card.test.js +49 -0
- package/dist/components/Card/__mocks__/styles.module.css.js +11 -0
- package/dist/components/Card/index.js +77 -0
- package/dist/components/Carousel/Carousel.test.js +41 -0
- package/dist/components/Carousel/index.js +96 -0
- package/dist/components/Checkbox/Checkbox.test.js +2 -1
- package/dist/components/Checkbox/index.js +10 -9
- package/dist/components/Container/Container.test.js +2 -1
- package/dist/components/DatePicker/DatePicker.test.js +3 -2
- package/dist/components/DatePicker/index.js +16 -15
- package/dist/components/Divider/Divider.test.js +10 -9
- package/dist/components/Drawer/Drawer.test.js +35 -0
- package/dist/components/Drawer/__mocks__/styles.module.css.js +9 -0
- package/dist/components/Drawer/index.js +55 -0
- package/dist/components/Fieldset/Fieldset.test.js +3 -2
- package/dist/components/Fieldset/index.js +1 -1
- package/dist/components/FileUpload/FileUpload.test.js +2 -1
- package/dist/components/FileUpload/index.js +4 -3
- package/dist/components/FloatingActionButton/FloatingActionButton.test.js +11 -20
- package/dist/components/Form/Form.test.js +2 -1
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Grid/Grid.test.js +14 -13
- package/dist/components/Grid/index.js +53 -17
- package/dist/components/Heading/Heading.test.js +2 -1
- package/dist/components/IconButton/IconButton.test.js +10 -9
- package/dist/components/Input/Input.test.js +5 -4
- package/dist/components/Input/index.js +13 -12
- package/dist/components/Label/Label.test.js +2 -1
- package/dist/components/Label/index.js +25 -26
- package/dist/components/Link/Link.test.js +3 -2
- package/dist/components/Link/index.js +1 -1
- package/dist/components/List/List.test.js +78 -0
- package/dist/components/List/index.js +24 -0
- package/dist/components/Modal/Modal.test.js +94 -0
- package/dist/components/Modal/index.js +37 -0
- package/dist/components/MultiSelect/MultiSelect.test.js +2 -1
- package/dist/components/MultiSelect/index.js +4 -3
- package/dist/components/NavBar/NavBar.test.js +54 -0
- package/dist/components/NavBar/index.js +139 -0
- package/dist/components/Notification/Notification.test.js +64 -0
- package/dist/components/Notification/__mocks__/styles.module.css.js +9 -0
- package/dist/components/Notification/index.js +61 -0
- package/dist/components/NotificationContainer/NotificationContainer.test.js +28 -0
- package/dist/components/NotificationContainer/index.js +15 -0
- package/dist/components/ProgressBar/ProgressBar.test.js +24 -0
- package/dist/components/ProgressBar/__mocks__/styles.module.css.js +9 -0
- package/dist/components/ProgressBar/index.js +50 -0
- package/dist/components/Radio/Radio.test.js +8 -7
- package/dist/components/Radio/index.js +10 -10
- package/dist/components/Range/Range.test.js +5 -4
- package/dist/components/Range/index.js +13 -12
- package/dist/components/Select/Select.test.js +6 -5
- package/dist/components/Select/index.js +8 -7
- package/dist/components/Skeleton/Skeleton.test.js +26 -0
- package/dist/components/Skeleton/__mocks__/styles.module.css.js +8 -0
- package/dist/components/Skeleton/index.js +34 -0
- package/dist/components/Spacer/Spacer.test.js +2 -1
- package/dist/components/Spacer/index.js +1 -1
- package/dist/components/Spinner/Spinner.test.js +18 -0
- package/dist/components/Spinner/__mocks__/styles.module.css.js +12 -0
- package/dist/components/Spinner/index.js +39 -0
- package/dist/components/Stack/Stack.test.js +2 -1
- package/dist/components/Stack/index.js +1 -1
- package/dist/components/Switch/Switch.test.js +4 -3
- package/dist/components/Switch/index.js +9 -8
- package/dist/components/Table/Table.test.js +2 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tabs/Context.js +11 -0
- package/dist/components/Tabs/Tabs.test.js +49 -0
- package/dist/components/Tabs/__mocks__/styles.module.css.js +8 -0
- package/dist/components/Tabs/index.js +89 -0
- package/dist/components/Text/Text.test.js +2 -1
- package/dist/components/Text/index.js +1 -1
- package/dist/components/Textarea/Textarea.test.js +2 -1
- package/dist/components/Textarea/index.js +13 -12
- package/dist/components/Tooltip/Tooltip.test.js +43 -0
- package/dist/components/Tooltip/index.js +45 -0
- package/dist/{index-BtY6pil2.js → index-BXkubhGb.js} +1 -1
- package/dist/index-Bgo8MuTU.js +4279 -0
- package/dist/{index-DhqFdMqD.js → index-RF23qrF-.js} +172 -190
- package/dist/lib/components/Accordion/Accordion.test.d.ts +0 -0
- package/dist/lib/components/Accordion/index.d.ts +13 -0
- package/dist/lib/components/Alert/Alert.test.d.ts +0 -0
- package/dist/lib/components/Alert/__mocks__/styles.module.css.d.ts +9 -0
- package/dist/lib/components/Alert/index.d.ts +15 -0
- package/dist/lib/components/Avatar/Avatar.test.d.ts +0 -0
- package/dist/lib/components/Avatar/index.d.ts +25 -0
- package/dist/lib/components/Badge/Badge.test.d.ts +0 -0
- package/dist/lib/components/Badge/__mocks__/styles.module.css.d.ts +8 -0
- package/dist/lib/components/Badge/index.d.ts +18 -0
- package/dist/lib/components/Card/Card.test.d.ts +0 -0
- package/dist/lib/components/Card/__mocks__/styles.module.css.d.ts +9 -0
- package/dist/lib/components/Card/index.d.ts +22 -0
- package/dist/lib/components/Carousel/Carousel.test.d.ts +0 -0
- package/dist/lib/components/Carousel/index.d.ts +9 -0
- package/dist/lib/components/Drawer/Drawer.test.d.ts +0 -0
- package/dist/lib/components/Drawer/__mocks__/styles.module.css.d.ts +7 -0
- package/dist/lib/components/Drawer/index.d.ts +19 -0
- package/dist/lib/components/Grid/index.d.ts +9 -1
- package/dist/lib/components/Heading/index.d.ts +0 -2
- package/dist/lib/components/List/List.test.d.ts +1 -0
- package/dist/lib/components/List/index.d.ts +15 -0
- package/dist/lib/components/Modal/Modal.test.d.ts +1 -0
- package/dist/lib/components/Modal/index.d.ts +10 -0
- package/dist/lib/components/NavBar/NavBar.test.d.ts +1 -0
- package/dist/lib/components/NavBar/index.d.ts +16 -0
- package/dist/lib/components/Notification/Notification.test.d.ts +1 -0
- package/dist/lib/components/Notification/__mocks__/styles.module.css.d.ts +7 -0
- package/dist/lib/components/Notification/index.d.ts +17 -0
- package/dist/lib/components/NotificationContainer/NotificationContainer.test.d.ts +1 -0
- package/dist/lib/components/NotificationContainer/index.d.ts +6 -0
- package/dist/lib/components/ProgressBar/ProgressBar.test.d.ts +1 -0
- package/dist/lib/components/ProgressBar/__mocks__/styles.module.css.d.ts +7 -0
- package/dist/lib/components/ProgressBar/index.d.ts +15 -0
- package/dist/lib/components/Skeleton/Skeleton.test.d.ts +1 -0
- package/dist/lib/components/Skeleton/__mocks__/styles.module.css.d.ts +6 -0
- package/dist/lib/components/Skeleton/index.d.ts +15 -0
- package/dist/lib/components/Spinner/Spinner.test.d.ts +1 -0
- package/dist/lib/components/Spinner/__mocks__/styles.module.css.d.ts +10 -0
- package/dist/lib/components/Spinner/index.d.ts +20 -0
- package/dist/lib/components/Tabs/Context.d.ts +10 -0
- package/dist/lib/components/Tabs/Tabs.test.d.ts +0 -0
- package/dist/lib/components/Tabs/__mocks__/styles.module.css.d.ts +6 -0
- package/dist/lib/components/Tabs/index.d.ts +27 -0
- package/dist/lib/components/Tooltip/Tooltip.test.d.ts +0 -0
- package/dist/lib/components/Tooltip/index.d.ts +16 -0
- package/dist/lib/main.d.ts +19 -0
- package/dist/lib/utils/NotificationManager/NotificationManager.test.d.ts +1 -0
- package/dist/lib/utils/NotificationManager/index.d.ts +10 -0
- package/dist/lib/utils/ThemeProvider/index.d.ts +7 -0
- package/dist/main.js +78 -44
- package/dist/plus-Cs7TaIK9.js +14 -0
- package/dist/utils/NotificationManager/NotificationManager.test.js +34 -0
- package/dist/utils/NotificationManager/index.js +70 -0
- package/dist/utils/RenderAsRichtext.tsx/index.js +5 -0
- package/dist/utils/ThemeProvider/index.js +13 -0
- package/dist/vi.B-PuvDzu-a048kFcX.js +41965 -0
- package/dist/x-CnsEH4Ox.js +14 -0
- package/package.json +3 -2
- package/dist/index-BWTAh3RO.js +0 -57529
- /package/dist/lib/utils/{renderRichText.d.ts → RenderAsRichtext.tsx/index.d.ts} +0 -0
- /package/dist/utils/{renderRichText.js → RenderAsRichtext.js} +0 -0
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { jsxs as h, jsx as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as i } from "react";
|
|
3
|
+
import "../Tabs/index.js";
|
|
3
4
|
import { Label as w } from "../Label/index.js";
|
|
4
|
-
import { f as x, C as D } from "../../index-
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import { f as x, C as D } from "../../index-RF23qrF-.js";
|
|
6
|
+
import '../../assets/index40.css';const S = "_wrapper_13tha_1", N = "_input_13tha_7", O = "_popover_13tha_25", s = {
|
|
6
7
|
wrapper: S,
|
|
7
8
|
input: N,
|
|
8
9
|
popover: O
|
|
9
10
|
};
|
|
10
|
-
function
|
|
11
|
+
function I({
|
|
11
12
|
id: o,
|
|
12
|
-
name:
|
|
13
|
+
name: n,
|
|
13
14
|
label: m,
|
|
14
15
|
onValueChange: r,
|
|
15
16
|
required: a = !1,
|
|
@@ -19,18 +20,18 @@ function F({
|
|
|
19
20
|
className: d,
|
|
20
21
|
...v
|
|
21
22
|
}) {
|
|
22
|
-
const [p, y] =
|
|
23
|
+
const [p, y] = i(null), [u, l] = i(!1);
|
|
23
24
|
return /* @__PURE__ */ h("div", { className: `${s.wrapper} ${d ?? ""}`, children: [
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ e(w, { htmlFor: o, required: a, disabled: c, children: m }),
|
|
26
|
+
/* @__PURE__ */ e(
|
|
26
27
|
"input",
|
|
27
28
|
{
|
|
28
29
|
id: o,
|
|
29
|
-
name:
|
|
30
|
+
name: n,
|
|
30
31
|
type: "text",
|
|
31
32
|
readOnly: !0,
|
|
32
33
|
value: p ? x(p, "yyyy-MM-dd") : "",
|
|
33
|
-
onClick: () => l((
|
|
34
|
+
onClick: () => l((t) => !t),
|
|
34
35
|
placeholder: "Select date",
|
|
35
36
|
required: a,
|
|
36
37
|
disabled: c,
|
|
@@ -40,17 +41,17 @@ function F({
|
|
|
40
41
|
...v
|
|
41
42
|
}
|
|
42
43
|
),
|
|
43
|
-
u && /* @__PURE__ */
|
|
44
|
+
u && /* @__PURE__ */ e("div", { className: s.popover, children: /* @__PURE__ */ e(
|
|
44
45
|
D,
|
|
45
46
|
{
|
|
46
47
|
selectedDate: p,
|
|
47
|
-
onSelectDate: (
|
|
48
|
-
r == null || r(
|
|
48
|
+
onSelectDate: (t) => {
|
|
49
|
+
r == null || r(t), y(t), l(!1);
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
) })
|
|
52
53
|
] });
|
|
53
54
|
}
|
|
54
55
|
export {
|
|
55
|
-
|
|
56
|
+
I as DatePicker
|
|
56
57
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { d as
|
|
3
|
-
import { Divider as
|
|
4
|
-
|
|
2
|
+
import { d as o, i as e, r as i, g as t } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
|
+
import { Divider as a } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
5
|
+
o("Spacer", () => {
|
|
5
6
|
e("renders with default props", () => {
|
|
6
|
-
const { container: s } = i(/* @__PURE__ */ r(
|
|
7
|
-
|
|
7
|
+
const { container: s } = i(/* @__PURE__ */ r(a, {}));
|
|
8
|
+
t(s.firstChild).toHaveClass("horizontal", "divider");
|
|
8
9
|
}), e("renders the correct classes", () => {
|
|
9
|
-
const { container: s } = i(/* @__PURE__ */ r(
|
|
10
|
-
|
|
10
|
+
const { container: s } = i(/* @__PURE__ */ r(a, { axis: "vertical" }));
|
|
11
|
+
t(s.firstChild).toHaveClass("vertical", "divider");
|
|
11
12
|
}), e("renders custom classes", () => {
|
|
12
13
|
const { container: s } = i(
|
|
13
|
-
/* @__PURE__ */ r(
|
|
14
|
+
/* @__PURE__ */ r(a, { className: "custom-class", axis: "vertical" })
|
|
14
15
|
);
|
|
15
|
-
|
|
16
|
+
t(s.firstChild).toHaveClass(
|
|
16
17
|
"custom-class",
|
|
17
18
|
"vertical",
|
|
18
19
|
"divider"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { d as h, i as r, r as s, v as t, g as l, s as c, f as a } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
|
+
import { Drawer as i } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
5
|
+
h("Drawer", () => {
|
|
6
|
+
const n = /* @__PURE__ */ e("nav", { children: /* @__PURE__ */ f("ul", { children: [
|
|
7
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("a", { href: "/profile", children: "Profile" }) }),
|
|
8
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("a", { href: "/settings", children: "Settings" }) })
|
|
9
|
+
] }) });
|
|
10
|
+
r("renders drawer content when open", () => {
|
|
11
|
+
s(
|
|
12
|
+
/* @__PURE__ */ e(i, { isOpen: !0, onClose: t.fn(), position: "left", overlay: !0, children: n })
|
|
13
|
+
), l(c.getByRole("dialog")).toHaveClass("open");
|
|
14
|
+
}), r("does not render drawer content when open", () => {
|
|
15
|
+
s(
|
|
16
|
+
/* @__PURE__ */ e(i, { isOpen: !1, onClose: t.fn(), position: "left", overlay: !0, children: n })
|
|
17
|
+
), l(c.getByRole("dialog")).not.toHaveClass("open");
|
|
18
|
+
}), r("calls onClose when clicking outside the drawer", () => {
|
|
19
|
+
const o = t.fn();
|
|
20
|
+
s(
|
|
21
|
+
/* @__PURE__ */ e(i, { isOpen: !0, onClose: o, position: "left", overlay: !0, children: n })
|
|
22
|
+
), a.mouseDown(document.body), l(o).toHaveBeenCalled();
|
|
23
|
+
}), r("does not call onClose when clicking inside the drawer", () => {
|
|
24
|
+
const o = t.fn(), { container: p } = s(
|
|
25
|
+
/* @__PURE__ */ e(i, { isOpen: !1, onClose: o, position: "left", overlay: !0, children: n })
|
|
26
|
+
), d = p.querySelector(".drawer");
|
|
27
|
+
if (!d) throw new Error("Drawer not found");
|
|
28
|
+
a.mouseDown(d), l(o).not.toHaveBeenCalled();
|
|
29
|
+
}), r("calls onClose when Escape key is pressed", () => {
|
|
30
|
+
const o = t.fn();
|
|
31
|
+
s(
|
|
32
|
+
/* @__PURE__ */ e(i, { isOpen: !0, onClose: o, position: "left", overlay: !0, children: n })
|
|
33
|
+
), a.keyDown(document, { key: "Escape", code: "Escape" }), l(o).toHaveBeenCalled();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsxs as f, Fragment as y, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as w, useEffect as d } from "react";
|
|
3
|
+
import '../../assets/index31.css';const l = "_drawer_55xty_1", h = "_right_55xty_12", p = "_left_55xty_18", x = "_top_55xty_24", v = "_bottom_55xty_32", g = "_open_55xty_40", b = "_overlay_55xty_50", E = "_show_55xty_60", e = {
|
|
4
|
+
drawer: l,
|
|
5
|
+
right: h,
|
|
6
|
+
left: p,
|
|
7
|
+
top: x,
|
|
8
|
+
bottom: v,
|
|
9
|
+
open: g,
|
|
10
|
+
overlay: b,
|
|
11
|
+
show: E
|
|
12
|
+
}, $ = {
|
|
13
|
+
left: e.left,
|
|
14
|
+
right: e.right,
|
|
15
|
+
top: e.top,
|
|
16
|
+
bottom: e.bottom
|
|
17
|
+
};
|
|
18
|
+
function j({
|
|
19
|
+
isOpen: o,
|
|
20
|
+
onClose: t,
|
|
21
|
+
position: _ = "left",
|
|
22
|
+
overlay: c = !0,
|
|
23
|
+
ariaLabel: i = "Sidebar",
|
|
24
|
+
children: m,
|
|
25
|
+
className: u
|
|
26
|
+
}) {
|
|
27
|
+
const n = w(null);
|
|
28
|
+
return d(() => {
|
|
29
|
+
const r = (a) => {
|
|
30
|
+
a.key === "Escape" && (t == null || t());
|
|
31
|
+
};
|
|
32
|
+
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
33
|
+
}, [t]), d(() => {
|
|
34
|
+
const r = (a) => {
|
|
35
|
+
o && n.current && !n.current.contains(a.target) && (t == null || t());
|
|
36
|
+
};
|
|
37
|
+
return document.addEventListener("mousedown", r), () => document.removeEventListener("mousedown", r);
|
|
38
|
+
}, [o, t, c]), /* @__PURE__ */ f(y, { children: [
|
|
39
|
+
c && /* @__PURE__ */ s("div", { className: `${e.overlay} ${o ? e.show : ""}` }),
|
|
40
|
+
/* @__PURE__ */ s(
|
|
41
|
+
"aside",
|
|
42
|
+
{
|
|
43
|
+
ref: n,
|
|
44
|
+
className: `${e.drawer} ${$[_]} ${o ? e.open : ""} ${u ?? ""}`,
|
|
45
|
+
role: "dialog",
|
|
46
|
+
"aria-label": i,
|
|
47
|
+
"aria-modal": "true",
|
|
48
|
+
children: m
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
] });
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
j as Drawer
|
|
55
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { d as
|
|
2
|
+
import { d as o, i as t, r, g as n, s as d } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
3
|
import { Fieldset as i } from "./index.js";
|
|
4
|
-
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
5
|
+
o("Fieldset", () => {
|
|
5
6
|
t("renders children", () => {
|
|
6
7
|
r(
|
|
7
8
|
/* @__PURE__ */ e(i, { children: /* @__PURE__ */ e("input", { type: "text", placeholder: "Text input" }) })
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/
|
|
2
|
+
import '../../assets/index35.css';const c = "_fieldset_1i2zv_1", f = "_legend_1i2zv_8", s = {
|
|
3
3
|
fieldset: c,
|
|
4
4
|
legend: f
|
|
5
5
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { d as c, i as t, r as l, g as s, s as n, v as a, f as d } from "../../
|
|
2
|
+
import { d as c, i as t, r as l, g as s, s as n, v as a, f as d } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
3
|
import { FileUpload as r } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
4
5
|
c("FileUpload", () => {
|
|
5
6
|
t("renders the label correctly", () => {
|
|
6
7
|
l(/* @__PURE__ */ o(r, { label: "Upload your resume", onFilesChange: () => {
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as x, useState as h } from "react";
|
|
3
3
|
import { IconButton as N } from "../IconButton/index.js";
|
|
4
|
+
import "../Tabs/index.js";
|
|
4
5
|
import { Label as Z } from "../Label/index.js";
|
|
5
6
|
import { T as z } from "../../trash-2-2Rn0a4s6.js";
|
|
6
|
-
import '../../assets/
|
|
7
|
+
import '../../assets/index42.css';const I = "_wrapper_s8dew_1", R = "_dropZone_s8dew_7", T = "_dragging_s8dew_25", j = "_input_s8dew_30", A = "_fileList_s8dew_34", i = {
|
|
7
8
|
wrapper: I,
|
|
8
9
|
dropZone: R,
|
|
9
10
|
dragging: T,
|
|
10
11
|
input: j,
|
|
11
12
|
fileList: A
|
|
12
13
|
};
|
|
13
|
-
function
|
|
14
|
+
function E({
|
|
14
15
|
id: D,
|
|
15
16
|
name: w,
|
|
16
17
|
label: p = "Upload files",
|
|
@@ -95,5 +96,5 @@ function b({
|
|
|
95
96
|
] });
|
|
96
97
|
}
|
|
97
98
|
export {
|
|
98
|
-
|
|
99
|
+
E as FileUpload
|
|
99
100
|
};
|
|
@@ -1,36 +1,27 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { d as r, i as o, r as
|
|
3
|
-
import { FloatingActionButton as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
* @license lucide-react v0.488.0 - ISC
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the ISC license.
|
|
9
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/
|
|
11
|
-
const p = [
|
|
12
|
-
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
13
|
-
["path", { d: "M12 5v14", key: "s699le" }]
|
|
14
|
-
], n = h("plus", p);
|
|
2
|
+
import { d as r, i as o, r as i, g as l, s, v as d, f as m } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
|
+
import { FloatingActionButton as c } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
5
|
+
import { P as n } from "../../plus-Cs7TaIK9.js";
|
|
15
6
|
r("FloatingActionButton", () => {
|
|
16
7
|
o("renders the icon", () => {
|
|
17
|
-
|
|
8
|
+
i(/* @__PURE__ */ e(c, { icon: /* @__PURE__ */ e(n, {}), "aria-label": "Add" })), l(s.getByLabelText("Add")).toBeInTheDocument();
|
|
18
9
|
}), o("calls onClick when clicked", () => {
|
|
19
10
|
const t = d.fn();
|
|
20
|
-
|
|
11
|
+
i(
|
|
21
12
|
/* @__PURE__ */ e(
|
|
22
|
-
|
|
13
|
+
c,
|
|
23
14
|
{
|
|
24
15
|
onClick: t,
|
|
25
16
|
icon: /* @__PURE__ */ e(n, {}),
|
|
26
17
|
"aria-label": "Add"
|
|
27
18
|
}
|
|
28
19
|
)
|
|
29
|
-
), m.click(s.getByLabelText("Add")),
|
|
20
|
+
), m.click(s.getByLabelText("Add")), l(t).toHaveBeenCalledTimes(1);
|
|
30
21
|
}), o("applies the correct size class", () => {
|
|
31
|
-
const { container: t } =
|
|
32
|
-
/* @__PURE__ */ e(
|
|
22
|
+
const { container: t } = i(
|
|
23
|
+
/* @__PURE__ */ e(c, { icon: /* @__PURE__ */ e(n, {}), "aria-label": "Add", size: "lg" })
|
|
33
24
|
), a = t.querySelector("button");
|
|
34
|
-
|
|
25
|
+
l(a == null ? void 0 : a.className).toMatch(/lg/);
|
|
35
26
|
});
|
|
36
27
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { d as i, i as o, r, g as s, s as a } from "../../
|
|
2
|
+
import { d as i, i as o, r, g as s, s as a } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
3
|
import { Form as m } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
4
5
|
i("Form", () => {
|
|
5
6
|
o("renders children", () => {
|
|
6
7
|
r(
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { d as o, i as d, r as
|
|
3
|
-
import { Grid as
|
|
2
|
+
import { d as o, i as d, r as m, g as i, s as l } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
|
+
import { Grid as s } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
4
5
|
o("Grid", () => {
|
|
5
6
|
d("renders children", () => {
|
|
6
|
-
|
|
7
|
-
/* @__PURE__ */ n(
|
|
7
|
+
m(
|
|
8
|
+
/* @__PURE__ */ n(s, { columns: 2, children: [
|
|
8
9
|
/* @__PURE__ */ e("div", { children: "Item 1" }),
|
|
9
10
|
/* @__PURE__ */ e("div", { children: "Item 2" })
|
|
10
11
|
] })
|
|
11
|
-
), i(
|
|
12
|
+
), i(l.getByText("Item 1")).toBeInTheDocument(), i(l.getByText("Item 2")).toBeInTheDocument();
|
|
12
13
|
}), d("applies correct number of columns", () => {
|
|
13
|
-
const { container: t } =
|
|
14
|
-
/* @__PURE__ */ n(
|
|
14
|
+
const { container: t } = m(
|
|
15
|
+
/* @__PURE__ */ n(s, { columns: 3, children: [
|
|
15
16
|
/* @__PURE__ */ e("div", { children: "Item 1" }),
|
|
16
17
|
/* @__PURE__ */ e("div", { children: "Item 2" }),
|
|
17
18
|
/* @__PURE__ */ e("div", { children: "Item 3" })
|
|
@@ -19,8 +20,8 @@ o("Grid", () => {
|
|
|
19
20
|
), r = t.firstChild;
|
|
20
21
|
i(r.style.gridTemplateColumns).toBe("repeat(3, 1fr)");
|
|
21
22
|
}), d("uses auto-fit minmax", () => {
|
|
22
|
-
const { container: t } =
|
|
23
|
-
/* @__PURE__ */ n(
|
|
23
|
+
const { container: t } = m(
|
|
24
|
+
/* @__PURE__ */ n(s, { columns: 3, autoFitMinMax: "250px", gap: "2rem", children: [
|
|
24
25
|
/* @__PURE__ */ e("div", { children: "Item 1" }),
|
|
25
26
|
/* @__PURE__ */ e("div", { children: "Item 2" }),
|
|
26
27
|
/* @__PURE__ */ e("div", { children: "Item 3" })
|
|
@@ -34,8 +35,8 @@ o("Grid", () => {
|
|
|
34
35
|
["header", "header"],
|
|
35
36
|
["sidebar", "main"],
|
|
36
37
|
["footer, footer"]
|
|
37
|
-
], { container: r } =
|
|
38
|
-
/* @__PURE__ */ n(
|
|
38
|
+
], { container: r } = m(
|
|
39
|
+
/* @__PURE__ */ n(s, { columns: 3, areas: t, gap: "2rem", children: [
|
|
39
40
|
/* @__PURE__ */ e("div", { children: "Item 1" }),
|
|
40
41
|
/* @__PURE__ */ e("div", { children: "Item 2" }),
|
|
41
42
|
/* @__PURE__ */ e("div", { children: "Item 3" })
|
|
@@ -47,8 +48,8 @@ o("Grid", () => {
|
|
|
47
48
|
r.firstChild.style.gridTemplateAreas
|
|
48
49
|
).toContain("main");
|
|
49
50
|
}), d("applies custom gap", () => {
|
|
50
|
-
const { container: t } =
|
|
51
|
-
/* @__PURE__ */ n(
|
|
51
|
+
const { container: t } = m(
|
|
52
|
+
/* @__PURE__ */ n(s, { columns: 3, gap: "2rem", children: [
|
|
52
53
|
/* @__PURE__ */ e("div", { children: "Item 1" }),
|
|
53
54
|
/* @__PURE__ */ e("div", { children: "Item 2" }),
|
|
54
55
|
/* @__PURE__ */ e("div", { children: "Item 3" })
|
|
@@ -1,32 +1,68 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import '../../assets/index16.css';const
|
|
3
|
-
grid:
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/index16.css';const y = "_grid_1pzcn_1", $ = {
|
|
3
|
+
grid: y
|
|
4
4
|
};
|
|
5
|
-
function
|
|
5
|
+
function v({
|
|
6
6
|
columns: r = 1,
|
|
7
|
-
gap:
|
|
8
|
-
areas:
|
|
9
|
-
autoFitMinMax:
|
|
7
|
+
gap: a = "1rem",
|
|
8
|
+
areas: o,
|
|
9
|
+
autoFitMinMax: l,
|
|
10
10
|
className: s,
|
|
11
|
-
children:
|
|
12
|
-
style:
|
|
13
|
-
...
|
|
11
|
+
children: p,
|
|
12
|
+
style: n,
|
|
13
|
+
...m
|
|
14
14
|
}) {
|
|
15
15
|
const e = {
|
|
16
|
-
...
|
|
16
|
+
...n,
|
|
17
17
|
display: "grid",
|
|
18
|
-
gap:
|
|
18
|
+
gap: a
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
if (o)
|
|
21
|
+
e.gridTemplateAreas = o.map((t) => `"${t.join(" ")}"`).join(" ");
|
|
22
|
+
else if (l)
|
|
23
|
+
e.gridTemplateColumns = `repeat(auto-fit, minmax(${l}, 1fr))`;
|
|
24
|
+
else if (typeof r == "object") {
|
|
25
|
+
const { xs: t, sm: d, md: f, lg: g, xl: x, "2xl": b } = r;
|
|
26
|
+
[
|
|
27
|
+
{
|
|
28
|
+
breakpoint: "xs",
|
|
29
|
+
value: t
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
breakpoint: "sm",
|
|
33
|
+
value: d
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
breakpoint: "md",
|
|
37
|
+
value: f
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
breakpoint: "lg",
|
|
41
|
+
value: g
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
breakpoint: "xl",
|
|
45
|
+
value: x
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
breakpoint: "2xl",
|
|
49
|
+
value: b
|
|
50
|
+
}
|
|
51
|
+
].forEach(({ breakpoint: c, value: i }) => {
|
|
52
|
+
i && (e[`--${c}-columns`] = typeof i == "number" ? `repeat(${i}, 1fr)` : i);
|
|
53
|
+
});
|
|
54
|
+
} else
|
|
55
|
+
e.gridTemplateColumns = typeof r == "number" ? `repeat(${r}, 1fr)` : r;
|
|
56
|
+
return console.log(e), /* @__PURE__ */ u(
|
|
21
57
|
"div",
|
|
22
58
|
{
|
|
23
|
-
className: `${
|
|
59
|
+
className: `${$.grid} ${s ?? ""}`,
|
|
24
60
|
style: e,
|
|
25
|
-
...
|
|
26
|
-
children:
|
|
61
|
+
...m,
|
|
62
|
+
children: p
|
|
27
63
|
}
|
|
28
64
|
);
|
|
29
65
|
}
|
|
30
66
|
export {
|
|
31
|
-
|
|
67
|
+
v as Grid
|
|
32
68
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { d as i, i as a, r as s, s as d, g as l } from "../../
|
|
2
|
+
import { d as i, i as a, r as s, s as d, g as l } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
3
|
import { Heading as n } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
4
5
|
i("Heading", () => {
|
|
5
6
|
a("renders with default level (h1)", () => {
|
|
6
7
|
s(/* @__PURE__ */ t(n, { children: "Test Heading" }));
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { d as r, i as
|
|
2
|
+
import { d as r, i as o, r as a, s as n, g as s, v as m, f as b } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
3
|
import { IconButton as l } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
4
5
|
import { T as c } from "../../trash-2-2Rn0a4s6.js";
|
|
5
6
|
r("IconButton", () => {
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
o("renders with icon and accessible label", () => {
|
|
8
|
+
a(
|
|
8
9
|
/* @__PURE__ */ t(l, { icon: /* @__PURE__ */ t(c, { size: 21 }), srOnlyLabel: "Delete item" })
|
|
9
10
|
);
|
|
10
11
|
const e = n.getByRole("button", { name: /delete item/i });
|
|
11
12
|
s(e).toBeInTheDocument();
|
|
12
|
-
}),
|
|
13
|
-
|
|
13
|
+
}), o("applies the correct size and intent classes", () => {
|
|
14
|
+
a(
|
|
14
15
|
/* @__PURE__ */ t(
|
|
15
16
|
l,
|
|
16
17
|
{
|
|
@@ -24,15 +25,15 @@ r("IconButton", () => {
|
|
|
24
25
|
);
|
|
25
26
|
const e = n.getByRole("button", { name: /delete item/i });
|
|
26
27
|
s(e.className).toMatch("custom-class"), s(e.className).toMatch("iconButton"), s(e.className).toMatch("lg"), s(e.className).toMatch("error");
|
|
27
|
-
}),
|
|
28
|
-
|
|
28
|
+
}), o("can be disabled", () => {
|
|
29
|
+
a(
|
|
29
30
|
/* @__PURE__ */ t(l, { icon: /* @__PURE__ */ t(c, { size: 21 }), disabled: !0, srOnlyLabel: "Disabled" })
|
|
30
31
|
);
|
|
31
32
|
const e = n.getByRole("button", { name: /disabled/i });
|
|
32
33
|
s(e.className).toBeDisabled;
|
|
33
|
-
}),
|
|
34
|
+
}), o("calls onClick when clicked", () => {
|
|
34
35
|
const e = m.fn();
|
|
35
|
-
|
|
36
|
+
a(
|
|
36
37
|
/* @__PURE__ */ t(
|
|
37
38
|
l,
|
|
38
39
|
{
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { d as m, i, r as t, g as e, s as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { d as m, i, r as t, g as e, s as r } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
3
|
import { Input as l } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
4
5
|
m("Input", () => {
|
|
5
6
|
i("renders an input with a label", () => {
|
|
6
|
-
t(/* @__PURE__ */
|
|
7
|
+
t(/* @__PURE__ */ a(l, { label: "email", name: "email" })), e(r.getByLabelText("email")).toBeInTheDocument();
|
|
7
8
|
}), i("renders an error message if provided", () => {
|
|
8
|
-
t(/* @__PURE__ */
|
|
9
|
+
t(/* @__PURE__ */ a(l, { label: "email", name: "email", error: "Required field" })), e(r.getByText("Required field")).toBeInTheDocument(), e(r.getByLabelText("email")).toHaveAttribute(
|
|
9
10
|
"aria-invalid",
|
|
10
11
|
"true"
|
|
11
12
|
);
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as _, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
+
import "../Tabs/index.js";
|
|
3
4
|
import { Label as u } from "../Label/index.js";
|
|
4
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index34.css';const d = "_wrapper_1fwv5_1", l = "_input_1fwv5_7", w = "_error_1fwv5_25", f = "_errorMessage_1fwv5_29", e = {
|
|
5
6
|
wrapper: d,
|
|
6
7
|
input: l,
|
|
7
8
|
error: w,
|
|
8
9
|
errorMessage: f
|
|
9
10
|
};
|
|
10
|
-
function
|
|
11
|
-
label:
|
|
11
|
+
function $({
|
|
12
|
+
label: n,
|
|
12
13
|
id: o,
|
|
13
14
|
className: a,
|
|
14
15
|
error: r,
|
|
15
16
|
required: p,
|
|
16
17
|
optional: c,
|
|
17
|
-
tooltip:
|
|
18
|
+
tooltip: m,
|
|
18
19
|
...s
|
|
19
20
|
}) {
|
|
20
21
|
const i = o ?? s.name ?? `input-${Math.random().toString(36).slice(2)}`;
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
|
|
22
|
+
return /* @__PURE__ */ _("div", { className: `${e.wrapper} ${a ?? ""}`, children: [
|
|
23
|
+
n && /* @__PURE__ */ t(
|
|
23
24
|
u,
|
|
24
25
|
{
|
|
25
26
|
htmlFor: i,
|
|
26
27
|
required: p,
|
|
27
28
|
optional: c,
|
|
28
29
|
intent: r ? "error" : "default",
|
|
29
|
-
tooltip:
|
|
30
|
+
tooltip: m,
|
|
30
31
|
showErrorIcon: !!r,
|
|
31
|
-
children:
|
|
32
|
+
children: n
|
|
32
33
|
}
|
|
33
34
|
),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ t(
|
|
35
36
|
"input",
|
|
36
37
|
{
|
|
37
38
|
id: i,
|
|
@@ -40,9 +41,9 @@ function M({
|
|
|
40
41
|
...s
|
|
41
42
|
}
|
|
42
43
|
),
|
|
43
|
-
r && /* @__PURE__ */
|
|
44
|
+
r && /* @__PURE__ */ t("div", { className: e.errorMessage, children: r })
|
|
44
45
|
] });
|
|
45
46
|
}
|
|
46
47
|
export {
|
|
47
|
-
|
|
48
|
+
$ as Input
|
|
48
49
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { d as s, i as o, r as n, g as e, s as r } from "../../
|
|
2
|
+
import { d as s, i as o, r as n, g as e, s as r } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
3
|
import { Label as l } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
4
5
|
s("Label", () => {
|
|
5
6
|
o("renders label text", () => {
|
|
6
7
|
n(/* @__PURE__ */ t(l, { htmlFor: "username", children: "Username" })), e(r.getByText("Username")).toBeInTheDocument();
|