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,18 +1,19 @@
|
|
|
1
1
|
import { jsx as e, jsxs as h } 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/index6.css';const d = "_wrapper_fzy93_1", y = "_input_fzy93_7", w = "_slider_fzy93_11", b = "_label_fzy93_41", s = {
|
|
5
6
|
wrapper: d,
|
|
6
7
|
input: y,
|
|
7
8
|
slider: w,
|
|
8
9
|
label: b
|
|
9
10
|
};
|
|
10
|
-
function
|
|
11
|
+
function $({
|
|
11
12
|
id: r,
|
|
12
13
|
name: a,
|
|
13
14
|
checked: x,
|
|
14
|
-
disabled:
|
|
15
|
-
label:
|
|
15
|
+
disabled: t = !1,
|
|
16
|
+
label: l,
|
|
16
17
|
required: p,
|
|
17
18
|
optional: c,
|
|
18
19
|
intent: n = "default",
|
|
@@ -30,7 +31,7 @@ function k({
|
|
|
30
31
|
size: i,
|
|
31
32
|
required: p,
|
|
32
33
|
optional: c,
|
|
33
|
-
disabled:
|
|
34
|
+
disabled: t,
|
|
34
35
|
tooltip: o,
|
|
35
36
|
showErrorIcon: _,
|
|
36
37
|
children: [
|
|
@@ -40,18 +41,18 @@ function k({
|
|
|
40
41
|
type: "checkbox",
|
|
41
42
|
id: r,
|
|
42
43
|
name: a,
|
|
43
|
-
disabled:
|
|
44
|
+
disabled: t,
|
|
44
45
|
required: p,
|
|
45
46
|
className: s.input,
|
|
46
47
|
...f
|
|
47
48
|
}
|
|
48
49
|
),
|
|
49
50
|
/* @__PURE__ */ e("span", { className: s.slider }),
|
|
50
|
-
|
|
51
|
+
l && /* @__PURE__ */ e("span", { className: s.label, children: l })
|
|
51
52
|
]
|
|
52
53
|
}
|
|
53
54
|
) });
|
|
54
55
|
}
|
|
55
56
|
export {
|
|
56
|
-
|
|
57
|
+
$ as Switch
|
|
57
58
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { d as g, i as n, r as a, g as e, s as t, v as i, f as h } from "../../
|
|
2
|
+
import { d as g, i as n, r as a, g as e, s as t, v as i, f as h } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
3
|
import { Table as c } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
4
5
|
const s = [
|
|
5
6
|
{ name: "Alice", age: 30 },
|
|
6
7
|
{ name: "Bob", age: 33 }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/
|
|
2
|
+
import '../../assets/index5.css';const m = "_wrapper_g45ha_1", b = "_table_g45ha_5", _ = "_empty_g45ha_24", g = "_clickableRow_g45ha_30", t = {
|
|
3
3
|
wrapper: m,
|
|
4
4
|
table: b,
|
|
5
5
|
empty: _,
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { d as h, i as o, g as t, s as e, f as r, r as c } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
|
+
import { Tabs as a } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
5
|
+
h("Tabs", () => {
|
|
6
|
+
const i = () => {
|
|
7
|
+
c(
|
|
8
|
+
/* @__PURE__ */ l(a, { defaultIndex: 0, align: "center", children: [
|
|
9
|
+
/* @__PURE__ */ l(a.List, { children: [
|
|
10
|
+
/* @__PURE__ */ n(a.Trigger, { index: 0, children: "Tab 1" }),
|
|
11
|
+
/* @__PURE__ */ n(a.Trigger, { index: 1, children: "Tab 2" })
|
|
12
|
+
] }),
|
|
13
|
+
/* @__PURE__ */ n(a.Panel, { index: 0, children: /* @__PURE__ */ n("p", { children: "This is the first panel" }) }),
|
|
14
|
+
/* @__PURE__ */ n(a.Panel, { index: 1, children: /* @__PURE__ */ n("p", { children: "This is the second panel" }) })
|
|
15
|
+
] })
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
o("renders tab triggers and default panel", () => {
|
|
19
|
+
i(), t(e.getByRole("tab", { name: /tab 1/i })).toBeInTheDocument(), t(e.getByRole("tab", { name: /tab 2/i })).toBeInTheDocument(), t(e.getByRole("tabpanel")).toHaveTextContent(
|
|
20
|
+
"This is the first panel"
|
|
21
|
+
), t(
|
|
22
|
+
e.queryByText("This is the second panel")
|
|
23
|
+
).not.toBeInTheDocument();
|
|
24
|
+
}), o("changes panel when tab is clicked", () => {
|
|
25
|
+
i(), r.click(e.getByRole("tab", { name: /tab 2/i })), t(e.getByRole("tabpanel")).toHaveTextContent(
|
|
26
|
+
"This is the second panel"
|
|
27
|
+
), t(
|
|
28
|
+
e.queryByText("This is the first panel")
|
|
29
|
+
).not.toBeInTheDocument();
|
|
30
|
+
}), o("responds to ArrowRight key to switch tabs", () => {
|
|
31
|
+
i();
|
|
32
|
+
const s = e.getByRole("tab", { name: /tab 1/i });
|
|
33
|
+
r.keyDown(s, { key: "ArrowRight" }), t(e.getByRole("tabpanel")).toHaveTextContent(
|
|
34
|
+
"This is the second panel"
|
|
35
|
+
);
|
|
36
|
+
}), o("responds to ArrowLeft key to switch tabs", () => {
|
|
37
|
+
i();
|
|
38
|
+
const s = e.getByRole("tab", { name: /tab 1/i });
|
|
39
|
+
r.keyDown(s, { key: "ArrowRight" }), r.keyDown(e.getByRole("tab", { name: /tab 2/i }), {
|
|
40
|
+
key: "ArrowLeft"
|
|
41
|
+
}), t(e.getByRole("tabpanel")).toHaveTextContent(
|
|
42
|
+
"This is the first panel"
|
|
43
|
+
);
|
|
44
|
+
}), o("applies alignment class to list", () => {
|
|
45
|
+
i();
|
|
46
|
+
const s = e.getByRole("tablist");
|
|
47
|
+
t(s.className).toMatch(/center/i);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx as o, jsxs as P } from "react/jsx-runtime";
|
|
2
|
+
import d, { useState as m, useId as T, useMemo as $, useRef as y } from "react";
|
|
3
|
+
import { TabsContext as L, useTabsContext as u } from "./Context.js";
|
|
4
|
+
import '../../assets/index32.css';const x = "_tabs_f06du_1", I = "_tabsList_f06du_7", A = "_left_f06du_12", C = "_center_f06du_16", N = "_right_f06du_20", w = "_tabsTrigger_f06du_24", W = "_active_f06du_38", k = "_tabsPanelWrapper_f06du_43", M = "_tabsPanel_f06du_43", n = {
|
|
5
|
+
tabs: x,
|
|
6
|
+
tabsList: I,
|
|
7
|
+
left: A,
|
|
8
|
+
center: C,
|
|
9
|
+
right: N,
|
|
10
|
+
tabsTrigger: w,
|
|
11
|
+
active: W,
|
|
12
|
+
tabsPanelWrapper: k,
|
|
13
|
+
tabsPanel: M
|
|
14
|
+
}, R = {
|
|
15
|
+
left: n.left,
|
|
16
|
+
center: n.center,
|
|
17
|
+
right: n.right
|
|
18
|
+
};
|
|
19
|
+
function _({
|
|
20
|
+
children: r,
|
|
21
|
+
defaultIndex: t = 0,
|
|
22
|
+
align: a = "left"
|
|
23
|
+
}) {
|
|
24
|
+
const [s, f] = m(t), i = T(), c = [], l = [], b = $(
|
|
25
|
+
() => ({ activeIndex: s, setActiveIndex: f, idPrefix: i, align: a }),
|
|
26
|
+
[s, i, a]
|
|
27
|
+
);
|
|
28
|
+
return d.Children.forEach(r, (e) => {
|
|
29
|
+
var p;
|
|
30
|
+
(e == null ? void 0 : e.type) === g ? c.push(e) : ((e == null ? void 0 : e.type) === v || ((p = e == null ? void 0 : e.type) == null ? void 0 : p.name) === "Panel") && l.push(e);
|
|
31
|
+
}), /* @__PURE__ */ o(L.Provider, { value: b, children: /* @__PURE__ */ P("div", { className: n.tabs, children: [
|
|
32
|
+
c,
|
|
33
|
+
/* @__PURE__ */ o("div", { className: n.tabsPanelWrapper, children: l })
|
|
34
|
+
] }) });
|
|
35
|
+
}
|
|
36
|
+
function g({ children: r }) {
|
|
37
|
+
const { align: t } = u();
|
|
38
|
+
return /* @__PURE__ */ o(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: `${n.tabsList} ${R[t]}`,
|
|
42
|
+
role: "tablist",
|
|
43
|
+
"aria-label": "Tabs",
|
|
44
|
+
children: r
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
function j({ children: r, index: t }) {
|
|
49
|
+
const { activeIndex: a, setActiveIndex: s, idPrefix: f } = u(), i = y(null), c = (b) => {
|
|
50
|
+
b.key === "ArrowRight" ? s((e) => e + 1) : b.key === "ArrowLeft" && s((e) => Math.max(0, e - 1));
|
|
51
|
+
}, l = a === t;
|
|
52
|
+
return /* @__PURE__ */ o(
|
|
53
|
+
"button",
|
|
54
|
+
{
|
|
55
|
+
className: `${n.tabsTrigger} ${l ? n.active : ""}`,
|
|
56
|
+
role: "tab",
|
|
57
|
+
ref: i,
|
|
58
|
+
id: `${f}-tab-${t}`,
|
|
59
|
+
"aria-selected": a === t,
|
|
60
|
+
tabIndex: a === t ? 0 : -1,
|
|
61
|
+
onClick: () => s(t),
|
|
62
|
+
onKeyDown: c,
|
|
63
|
+
children: r
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function v({ children: r, index: t }) {
|
|
68
|
+
const { activeIndex: a, idPrefix: s } = u();
|
|
69
|
+
return t !== a ? null : /* @__PURE__ */ o(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
className: n.tabsPanel,
|
|
73
|
+
role: "tabpanel",
|
|
74
|
+
id: `${s}-panel-${t}`,
|
|
75
|
+
"aria-labelledby": `${s}-tab-${t}`,
|
|
76
|
+
"aria-hidden": a !== t,
|
|
77
|
+
hidden: a !== t,
|
|
78
|
+
children: r
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
_.List = g;
|
|
83
|
+
_.Trigger = j;
|
|
84
|
+
_.Panel = v;
|
|
85
|
+
export {
|
|
86
|
+
_ as Tabs,
|
|
87
|
+
R as alignClassMap,
|
|
88
|
+
_ as default
|
|
89
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as s, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { d as u, i as r, r as a, s as n, g as e,
|
|
2
|
+
import { d as u, i as r, r as a, s as n, g as e, b as m } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
3
|
import { Text as i } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
4
5
|
u("Text", () => {
|
|
5
6
|
r("renders default paragraph text", () => {
|
|
6
7
|
a(/* @__PURE__ */ s(i, { children: "Hello world" }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import o from "react";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index4.css';const c = "_text_17qk6_1", _ = "_muted_17qk6_59", d = "_lead_17qk6_63", m = "_small_17qk6_68", a = {
|
|
4
4
|
text: c,
|
|
5
5
|
default: "_default_17qk6_55",
|
|
6
6
|
muted: _,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { d as x, i as o, r as n, g as t, s as a, v as i, f as d } from "../../
|
|
2
|
+
import { d as x, i as o, r as n, g as t, s as a, v as i, f as d } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
3
|
import { Textarea as s } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
4
5
|
x("Textarea", () => {
|
|
5
6
|
o("renders correctly", () => {
|
|
6
7
|
n(/* @__PURE__ */ r(s, { id: "textarea1", name: "testText", label: "Your message" })), t(a.getByRole("textbox")).toBeInTheDocument(), t(a.getByLabelText("Your message")).toBeInTheDocument();
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
+
import "../Tabs/index.js";
|
|
3
4
|
import { Label as l } from "../Label/index.js";
|
|
4
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index3.css';const _ = "_wrapper_162xi_1", w = "_textarea_162xi_11", p = {
|
|
5
6
|
wrapper: _,
|
|
6
7
|
textarea: w
|
|
7
8
|
};
|
|
8
|
-
function
|
|
9
|
+
function N({
|
|
9
10
|
id: r,
|
|
10
11
|
name: f,
|
|
11
12
|
label: t,
|
|
12
13
|
error: e,
|
|
13
|
-
disabled:
|
|
14
|
+
disabled: s,
|
|
14
15
|
required: a,
|
|
15
|
-
className:
|
|
16
|
+
className: n,
|
|
16
17
|
optional: x,
|
|
17
|
-
tooltip:
|
|
18
|
-
...
|
|
18
|
+
tooltip: m,
|
|
19
|
+
...c
|
|
19
20
|
}) {
|
|
20
|
-
return /* @__PURE__ */ i("div", { className: `${
|
|
21
|
+
return /* @__PURE__ */ i("div", { className: `${p.wrapper} ${n ?? ""}`, children: [
|
|
21
22
|
t && /* @__PURE__ */ o(
|
|
22
23
|
l,
|
|
23
24
|
{
|
|
@@ -25,7 +26,7 @@ function u({
|
|
|
25
26
|
required: a,
|
|
26
27
|
optional: x,
|
|
27
28
|
intent: e ? "error" : "default",
|
|
28
|
-
tooltip:
|
|
29
|
+
tooltip: m,
|
|
29
30
|
showErrorIcon: !!e,
|
|
30
31
|
children: t
|
|
31
32
|
}
|
|
@@ -34,14 +35,14 @@ function u({
|
|
|
34
35
|
"textarea",
|
|
35
36
|
{
|
|
36
37
|
id: r,
|
|
37
|
-
className:
|
|
38
|
-
disabled:
|
|
38
|
+
className: p.textarea,
|
|
39
|
+
disabled: s,
|
|
39
40
|
required: a,
|
|
40
|
-
...
|
|
41
|
+
...c
|
|
41
42
|
}
|
|
42
43
|
)
|
|
43
44
|
] });
|
|
44
45
|
}
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
N as Textarea
|
|
47
48
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { d as a, i, r as s, g as n, s as o, f as c } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
|
+
import { Tooltip as r } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
5
|
+
a("Tooltip", () => {
|
|
6
|
+
i("renders children correctly", () => {
|
|
7
|
+
s(
|
|
8
|
+
/* @__PURE__ */ t(r, { content: "Tooltip content", children: /* @__PURE__ */ t("button", { children: "Hover me" }) })
|
|
9
|
+
), n(o.getByText("Hover me")).toBeInTheDocument();
|
|
10
|
+
}), i("does not show the tooltip by default", () => {
|
|
11
|
+
s(
|
|
12
|
+
/* @__PURE__ */ t(r, { content: "Tooltip content", children: /* @__PURE__ */ t("button", { children: "Hover me" }) })
|
|
13
|
+
);
|
|
14
|
+
const e = o.queryByText("Tooltip content");
|
|
15
|
+
n(e).not.toHaveClass("visible");
|
|
16
|
+
}), i("shows the tooltip on hover", () => {
|
|
17
|
+
s(
|
|
18
|
+
/* @__PURE__ */ t(r, { content: "Tooltip content", children: /* @__PURE__ */ t("button", { children: "Hover me" }) })
|
|
19
|
+
);
|
|
20
|
+
const e = o.getByText("Hover me");
|
|
21
|
+
c.mouseEnter(e);
|
|
22
|
+
const l = o.getByText("Tooltip content");
|
|
23
|
+
n(l).toHaveClass("visible");
|
|
24
|
+
}), i("hides the tooltip on mouse leave", () => {
|
|
25
|
+
s(
|
|
26
|
+
/* @__PURE__ */ t(r, { content: "Tooltip content", children: /* @__PURE__ */ t("button", { children: "Hover me" }) })
|
|
27
|
+
);
|
|
28
|
+
const e = o.getByText("Hover me"), l = o.getByText("Tooltip content");
|
|
29
|
+
c.mouseEnter(e), n(l).toHaveClass("visible"), c.mouseLeave(e), n(l).not.toHaveClass("visible");
|
|
30
|
+
}), i("applies custom className to the container", () => {
|
|
31
|
+
s(
|
|
32
|
+
/* @__PURE__ */ t(r, { content: "Tooltip content", className: "custom-class", children: /* @__PURE__ */ t("button", { children: "Hover me" }) })
|
|
33
|
+
);
|
|
34
|
+
const e = o.getByText("Hover me").parentElement;
|
|
35
|
+
n(e).toHaveClass("custom-class");
|
|
36
|
+
}), i("renders the tooltip in the correct position", () => {
|
|
37
|
+
s(
|
|
38
|
+
/* @__PURE__ */ t(r, { content: "Tooltip content", position: "top", children: /* @__PURE__ */ t("button", { children: "Hover me" }) })
|
|
39
|
+
);
|
|
40
|
+
const e = o.getByText("Tooltip content");
|
|
41
|
+
n(e).toHaveClass("top");
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsxs as _, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useState as r } from "react";
|
|
3
|
+
import '../../assets/index2.css';const c = "_tooltipContainer_94xs9_1", a = "_tooltip_94xs9_1", b = "_top_94xs9_19", m = "_bottom_94xs9_26", f = "_left_94xs9_33", x = "_right_94xs9_40", h = "_visible_94xs9_47", t = {
|
|
4
|
+
tooltipContainer: c,
|
|
5
|
+
tooltip: a,
|
|
6
|
+
top: b,
|
|
7
|
+
bottom: m,
|
|
8
|
+
left: f,
|
|
9
|
+
right: x,
|
|
10
|
+
visible: h
|
|
11
|
+
}, v = {
|
|
12
|
+
top: t.top,
|
|
13
|
+
bottom: t.bottom,
|
|
14
|
+
left: t.left,
|
|
15
|
+
right: t.right
|
|
16
|
+
};
|
|
17
|
+
function C({
|
|
18
|
+
content: s,
|
|
19
|
+
children: i,
|
|
20
|
+
position: e = "top",
|
|
21
|
+
className: l
|
|
22
|
+
}) {
|
|
23
|
+
const [n, o] = r(!1);
|
|
24
|
+
return /* @__PURE__ */ _(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
className: `${t.tooltipContainer} ${l ?? ""}`,
|
|
28
|
+
onMouseEnter: () => o(!0),
|
|
29
|
+
onMouseLeave: () => o(!1),
|
|
30
|
+
children: [
|
|
31
|
+
i,
|
|
32
|
+
/* @__PURE__ */ p(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
className: `${t.tooltip} ${v[e]} ${n ? t.visible : ""}`,
|
|
36
|
+
children: s
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
C as Tooltip
|
|
45
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _, jsxs as Se, Fragment as ke } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import './assets/
|
|
3
|
+
import './assets/index45.css';const Pe = "_link_98em4_1", Le = "_muted_98em4_13", $e = "_underline_98em4_17", Ie = "_icon_98em4_21", N = {
|
|
4
4
|
link: Pe,
|
|
5
5
|
default: "_default_98em4_9",
|
|
6
6
|
muted: Le,
|