@pismo/marola 0.0.1-alpha.11 → 0.0.1-alpha.13
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 +1 -1
- package/dist/{ClickAwayListener-BKznXF1d.js → ClickAwayListener-HI1G6ob9.js} +2 -1
- package/dist/Popup-DFJQc_jn.js +1249 -0
- package/dist/{Portal-BcdMtRGF.js → Portal-D__zvwbZ.js} +1 -1
- package/dist/SelectButton-DWtqAiwt.js +45 -0
- package/dist/Tabs.module-jkH1Qjn7.js +22 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Chip.css +1 -0
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputSearch.css +1 -1
- package/dist/assets/SelectButton.css +1 -0
- package/dist/assets/Typography.css +1 -1
- package/dist/combineHooksSlotProps-BHqhiBfc.js +81 -0
- package/dist/components/Button/Button.d.ts +5 -2
- package/dist/components/Button/Button.js +87 -63
- package/dist/components/Button/Button.stories.d.ts +2 -0
- package/dist/components/Button/Button.stories.js +8 -8
- package/dist/components/Chip/Chip.d.ts +37 -0
- package/dist/components/Chip/Chip.js +143 -0
- package/dist/components/Chip/Chip.stories.d.ts +40 -0
- package/dist/components/Chip/Chip.stories.js +59 -0
- package/dist/components/Chip/chip.test.d.ts +1 -0
- package/dist/components/Chip/chip.test.js +17303 -0
- package/dist/components/Dialog/Dialog.js +13 -12
- package/dist/components/Dialog/Dialog.stories.d.ts +3 -3
- package/dist/components/Dialog/Dialog.stories.js +9 -9
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +27 -20
- package/dist/components/IconButton/IconButton.d.ts +2 -2
- package/dist/components/IconButton/IconButton.js +63 -61
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +32 -32
- package/dist/components/InputSearch/InputSearch.d.ts +7 -9
- package/dist/components/InputSearch/InputSearch.js +31 -26
- package/dist/components/InputSearch/InputSearch.stories.d.ts +21 -4
- package/dist/components/InputSearch/InputSearch.stories.js +55 -18
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +6 -6
- package/dist/components/PageHeader/PageHeader.stories.js +3 -3
- package/dist/components/Select/Select.d.ts +25 -0
- package/dist/components/Select/Select.js +860 -0
- package/dist/components/Select/Select.stories.d.ts +31 -0
- package/dist/components/Select/Select.stories.js +65 -0
- package/dist/components/Select/SelectButton.d.ts +13 -0
- package/dist/components/Select/SelectButton.js +8 -0
- package/dist/components/Snackbar/Snackbar.js +5 -4
- package/dist/components/Tabs/Tab.js +180 -6
- package/dist/components/Tabs/TabPanel.js +19 -18
- package/dist/components/Tabs/Tabs.js +237 -662
- package/dist/components/Tooltip/Tooltip.js +89 -1328
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/Typography.js +76 -74
- package/dist/components/Typography/Typography.stories.js +6 -6
- package/dist/components/Typography/typography.test.js +196 -11319
- package/dist/{index-BNWbc5Kh.js → index-BJ8HbRCy.js} +3109 -3152
- package/dist/main.d.ts +2 -0
- package/dist/main.js +57 -54
- package/dist/react.esm-DGd9_oKA.js +11126 -0
- package/dist/useCompoundItem-D1iRfg8D.js +84 -0
- package/dist/useEventCallback-vAfOD-oT.js +45 -0
- package/dist/useList-ByMguSS_.js +437 -0
- package/dist/utils/styleStrings.test.js +1 -1
- package/dist/{vi.Y_w82WR8-Df0JUamG.js → vi.Y_w82WR8-XVYrIxgm.js} +2 -1
- package/package.json +1 -1
- package/dist/Tab-CRwnhsj5.js +0 -254
- package/dist/Tabs.module-yYcTJnj6.js +0 -103
- package/dist/assets/global.css +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: {
|
|
6
|
+
(props: {
|
|
7
|
+
children: import('react').ReactNode;
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
placeholder?: string | number | undefined;
|
|
10
|
+
ariaLabelledby?: string | undefined;
|
|
11
|
+
onChange?: ((value: string | number | null, event?: import('react').SyntheticEvent<Element, Event> | null | undefined) => void) | undefined;
|
|
12
|
+
className?: string | undefined;
|
|
13
|
+
'data-testid'?: string | undefined;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
Option: (props: {
|
|
16
|
+
disabled?: boolean | undefined;
|
|
17
|
+
value: string | number;
|
|
18
|
+
children: import('react').ReactNode;
|
|
19
|
+
icon?: import('react').ReactNode;
|
|
20
|
+
className?: string | undefined;
|
|
21
|
+
'data-testid'?: string | undefined;
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
};
|
|
24
|
+
tags: string[];
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
export declare const Simple: Story;
|
|
29
|
+
export declare const Disabled: Story;
|
|
30
|
+
export declare const WithPrefix: Story;
|
|
31
|
+
export declare const WithIcon: Story;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsxs as l, Fragment as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "../Chip/Chip.js";
|
|
3
|
+
import "../Button/Button.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import "../Dialog/Backdrop.js";
|
|
6
|
+
import "../Typography/Typography.js";
|
|
7
|
+
import "../IconButton/IconButton.js";
|
|
8
|
+
import { Select as i } from "./Select.js";
|
|
9
|
+
import "../Table/Table.js";
|
|
10
|
+
import "../Tabs/Tabs.js";
|
|
11
|
+
const r = (o) => /* @__PURE__ */ n.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...o }, /* @__PURE__ */ n.createElement("path", { d: "M0.512792 11.6594C0.139667 11.2516 0.167167 10.6184 0.574323 10.2447C0.766229 10.0688 1.00839 9.98175 1.24964 9.98175C1.52063 9.98175 1.79026 10.0912 1.98745 10.3064L2.99998 11.4406V2.00094C2.99998 1.44781 3.44779 1 3.99998 1C4.55217 1 4.99998 1.44781 4.99998 2.00094V11.4384L6.01248 10.3325C6.38748 9.92812 7.01873 9.89687 7.42498 10.2719C7.83216 10.6453 7.85935 11.2787 7.48651 11.6866L4.76463 14.6894C4.38588 15.1037 3.66901 15.1037 3.28995 14.6894L0.512792 11.6594Z", fill: "#1897F3" }), /* @__PURE__ */ n.createElement("path", { opacity: 0.4, d: "M9.99998 3H11.5859L9.29279 5.29313C9.00666 5.57925 8.92123 6.00906 9.07598 6.38313C9.23073 6.75719 9.59566 7 9.99973 7H13.9716C14.5531 6.97188 15 6.55313 15 6C15 5.44688 14.5522 5 14 5H12.414L14.7072 2.70688C14.9933 2.42075 15.0787 1.99094 14.924 1.61688C14.7692 1.24281 14.4031 1 13.9719 1H9.99998C9.44685 1 8.99998 1.44719 8.99998 2C8.99998 2.55281 9.44685 3 9.99998 3ZM15.3937 13.5406L12.894 8.5375C12.5553 7.85594 11.444 7.85594 11.1053 8.5375L8.6056 13.5406C8.35854 14.0378 8.55873 14.6419 9.05279 14.8903C9.54873 15.1379 10.1478 14.9365 10.3944 14.4403L10.6179 13.9906H13.3814L13.6049 14.4403C13.7979 14.8288 14.354 15.1863 14.9465 14.8903C15.4406 14.6438 15.6406 14.0375 15.3937 13.5406ZM11.4937 12.2313L12 11.2094L12.5069 12.2291H11.4937V12.2313Z", fill: "#1897F3" })), v = {
|
|
12
|
+
title: "Components/Select",
|
|
13
|
+
component: i,
|
|
14
|
+
tags: ["autodocs"]
|
|
15
|
+
}, O = {
|
|
16
|
+
args: {
|
|
17
|
+
placeholder: "Select an option",
|
|
18
|
+
children: /* @__PURE__ */ l(t, { children: [
|
|
19
|
+
/* @__PURE__ */ e(i.Option, { value: "1", children: "Frodo" }),
|
|
20
|
+
/* @__PURE__ */ e(i.Option, { value: "2", children: "Sam" }),
|
|
21
|
+
/* @__PURE__ */ e(i.Option, { value: "3", children: "Mery" }),
|
|
22
|
+
/* @__PURE__ */ e(i.Option, { value: "4", children: "Pippin" })
|
|
23
|
+
] })
|
|
24
|
+
}
|
|
25
|
+
}, L = {
|
|
26
|
+
args: {
|
|
27
|
+
placeholder: "Select an option",
|
|
28
|
+
children: /* @__PURE__ */ l(t, { children: [
|
|
29
|
+
/* @__PURE__ */ e(i.Option, { value: "1", children: "Frodo" }),
|
|
30
|
+
/* @__PURE__ */ e(i.Option, { value: "2", children: "Sam" }),
|
|
31
|
+
/* @__PURE__ */ e(i.Option, { value: "3", children: "Mery" }),
|
|
32
|
+
/* @__PURE__ */ e(i.Option, { value: "4", children: "Pippin" })
|
|
33
|
+
] }),
|
|
34
|
+
disabled: !0
|
|
35
|
+
}
|
|
36
|
+
}, S = {
|
|
37
|
+
args: {
|
|
38
|
+
placeholder: "Select an option",
|
|
39
|
+
ariaLabelledby: "Filter by",
|
|
40
|
+
children: /* @__PURE__ */ l(t, { children: [
|
|
41
|
+
/* @__PURE__ */ e(i.Option, { value: "1", children: "Frodo" }),
|
|
42
|
+
/* @__PURE__ */ e(i.Option, { value: "2", children: "Sam" }),
|
|
43
|
+
/* @__PURE__ */ e(i.Option, { value: "3", children: "Mery" }),
|
|
44
|
+
/* @__PURE__ */ e(i.Option, { value: "4", children: "Pippin" })
|
|
45
|
+
] })
|
|
46
|
+
}
|
|
47
|
+
}, g = {
|
|
48
|
+
args: {
|
|
49
|
+
placeholder: "Select an option",
|
|
50
|
+
ariaLabelledby: "Filter by",
|
|
51
|
+
children: /* @__PURE__ */ l(t, { children: [
|
|
52
|
+
/* @__PURE__ */ e(i.Option, { value: "1", disabled: !0, children: "Frodo" }),
|
|
53
|
+
/* @__PURE__ */ e(i.Option, { value: "2", icon: /* @__PURE__ */ e(r, {}), children: "Sam" }),
|
|
54
|
+
/* @__PURE__ */ e(i.Option, { value: "3", disabled: !0, children: "Mery" }),
|
|
55
|
+
/* @__PURE__ */ e(i.Option, { value: "4", children: "Pippin" })
|
|
56
|
+
] })
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
L as Disabled,
|
|
61
|
+
O as Simple,
|
|
62
|
+
g as WithIcon,
|
|
63
|
+
S as WithPrefix,
|
|
64
|
+
v as default
|
|
65
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SelectButtonProps {
|
|
4
|
+
className: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
'aria-expanded': boolean;
|
|
8
|
+
'aria-labelledby': string | number;
|
|
9
|
+
type?: HTMLButtonElement['type'];
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
'data-testid'?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const Button: import('react').ForwardRefExoticComponent<SelectButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -7,8 +7,9 @@ import { Icon as K } from "../Icon/Icon.js";
|
|
|
7
7
|
import { a as w, _ as j } from "../../objectWithoutPropertiesLoose-D7Cp0Pg_.js";
|
|
8
8
|
import { g as $, a as z, e as H, b as U, P as t, c as J, d as Q } from "../../index-CqjC7P5Y.js";
|
|
9
9
|
import { u as Z } from "../../useTimeout-DxF9kiZL.js";
|
|
10
|
-
import { u as I
|
|
11
|
-
import { C as B } from "../../ClickAwayListener-
|
|
10
|
+
import { u as I } from "../../useEventCallback-vAfOD-oT.js";
|
|
11
|
+
import { C as B } from "../../ClickAwayListener-HI1G6ob9.js";
|
|
12
|
+
import { R as D } from "../../index-BJ8HbRCy.js";
|
|
12
13
|
const W = "Snackbar";
|
|
13
14
|
function ee(u) {
|
|
14
15
|
return $(W, u);
|
|
@@ -558,7 +559,7 @@ const ae = "_snackbar_kt3bd_1", ue = "_bottomToTop_kt3bd_1", T = {
|
|
|
558
559
|
"snackbar--message": "_snackbar--message_kt3bd_38",
|
|
559
560
|
"snackbar--action": "_snackbar--action_kt3bd_46",
|
|
560
561
|
bottomToTop: ue
|
|
561
|
-
},
|
|
562
|
+
}, ve = ({
|
|
562
563
|
snackbarMessage: u,
|
|
563
564
|
color: s,
|
|
564
565
|
autoHideDuration: a = 5e3,
|
|
@@ -618,5 +619,5 @@ const ae = "_snackbar_kt3bd_1", ue = "_bottomToTop_kt3bd_1", T = {
|
|
|
618
619
|
) });
|
|
619
620
|
};
|
|
620
621
|
export {
|
|
621
|
-
|
|
622
|
+
ve as Snackbar
|
|
622
623
|
};
|
|
@@ -1,8 +1,182 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "
|
|
4
|
-
import "../../
|
|
5
|
-
import { T as
|
|
1
|
+
import { jsx as N } from "react/jsx-runtime";
|
|
2
|
+
import * as b from "react";
|
|
3
|
+
import { forwardRef as H, useContext as U, useMemo as j } from "react";
|
|
4
|
+
import { c as k } from "../../clsx-DB4S2d7J.js";
|
|
5
|
+
import { u as B, T as D, s as y } from "../../Tabs.module-jkH1Qjn7.js";
|
|
6
|
+
import { a as d, _ as L } from "../../objectWithoutPropertiesLoose-D7Cp0Pg_.js";
|
|
7
|
+
import { g as W, a as $, u as O, e as q, b as z, P as e, c as A, d as G } from "../../index-CqjC7P5Y.js";
|
|
8
|
+
import { u as J, c as K } from "../../combineHooksSlotProps-BHqhiBfc.js";
|
|
9
|
+
import { u as Q, a as X } from "../../useCompoundItem-D1iRfg8D.js";
|
|
10
|
+
import { u as Y } from "../../useButton-Bc8IAgyk.js";
|
|
11
|
+
const E = "Tab";
|
|
12
|
+
function Z(o) {
|
|
13
|
+
return W(E, o);
|
|
14
|
+
}
|
|
15
|
+
$(E, ["root", "selected", "disabled"]);
|
|
16
|
+
function ee(o) {
|
|
17
|
+
return o.size;
|
|
18
|
+
}
|
|
19
|
+
function te(o) {
|
|
20
|
+
const {
|
|
21
|
+
value: t,
|
|
22
|
+
rootRef: s,
|
|
23
|
+
disabled: n = !1,
|
|
24
|
+
id: c
|
|
25
|
+
} = o, a = b.useRef(null), r = Q(c), {
|
|
26
|
+
value: f,
|
|
27
|
+
selectionFollowsFocus: p,
|
|
28
|
+
getTabPanelId: m
|
|
29
|
+
} = B(), P = b.useMemo(() => ({
|
|
30
|
+
disabled: n,
|
|
31
|
+
ref: a,
|
|
32
|
+
id: r
|
|
33
|
+
}), [n, a, r]), {
|
|
34
|
+
id: l,
|
|
35
|
+
index: R,
|
|
36
|
+
totalItemCount: g
|
|
37
|
+
} = X(t ?? ee, P), {
|
|
38
|
+
getRootProps: h,
|
|
39
|
+
highlighted: T,
|
|
40
|
+
selected: i
|
|
41
|
+
} = J({
|
|
42
|
+
item: l
|
|
43
|
+
}), {
|
|
44
|
+
getRootProps: C,
|
|
45
|
+
rootRef: u,
|
|
46
|
+
active: v,
|
|
47
|
+
focusVisible: I,
|
|
48
|
+
setFocusVisible: V
|
|
49
|
+
} = Y({
|
|
50
|
+
disabled: n,
|
|
51
|
+
focusableWhenDisabled: !p,
|
|
52
|
+
type: "button"
|
|
53
|
+
}), _ = O(a, s, u), M = l !== void 0 ? m(l) : void 0;
|
|
54
|
+
return {
|
|
55
|
+
getRootProps: (x = {}) => {
|
|
56
|
+
const S = q(x), w = K(h, C);
|
|
57
|
+
return d({}, x, w(S), {
|
|
58
|
+
role: "tab",
|
|
59
|
+
"aria-controls": M,
|
|
60
|
+
"aria-selected": i,
|
|
61
|
+
id: r,
|
|
62
|
+
ref: _
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
active: v,
|
|
66
|
+
focusVisible: I,
|
|
67
|
+
highlighted: T,
|
|
68
|
+
index: R,
|
|
69
|
+
rootRef: _,
|
|
70
|
+
// the `selected` state isn't set on the server (it relies on effects to be calculated),
|
|
71
|
+
// so we fall back to checking the `value` prop with the selectedValue from the TabsContext
|
|
72
|
+
selected: i || l === f,
|
|
73
|
+
setFocusVisible: V,
|
|
74
|
+
totalTabsCount: g
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
const oe = ["action", "children", "disabled", "onChange", "onClick", "onFocus", "slotProps", "slots", "value"], se = (o) => {
|
|
78
|
+
const {
|
|
79
|
+
selected: t,
|
|
80
|
+
disabled: s
|
|
81
|
+
} = o;
|
|
82
|
+
return A({
|
|
83
|
+
root: ["root", t && "selected", s && "disabled"]
|
|
84
|
+
}, G(Z));
|
|
85
|
+
}, F = /* @__PURE__ */ b.forwardRef(function(t, s) {
|
|
86
|
+
var n;
|
|
87
|
+
const {
|
|
88
|
+
children: c,
|
|
89
|
+
disabled: a = !1,
|
|
90
|
+
slotProps: r = {},
|
|
91
|
+
slots: f = {},
|
|
92
|
+
value: p
|
|
93
|
+
} = t, m = L(t, oe), P = b.useRef(), l = O(P, s), {
|
|
94
|
+
active: R,
|
|
95
|
+
highlighted: g,
|
|
96
|
+
selected: h,
|
|
97
|
+
getRootProps: T
|
|
98
|
+
} = te(d({}, t, {
|
|
99
|
+
rootRef: l,
|
|
100
|
+
value: p
|
|
101
|
+
})), i = d({}, t, {
|
|
102
|
+
active: R,
|
|
103
|
+
disabled: a,
|
|
104
|
+
highlighted: g,
|
|
105
|
+
selected: h
|
|
106
|
+
}), C = se(i), u = (n = f.root) != null ? n : "button", v = z({
|
|
107
|
+
elementType: u,
|
|
108
|
+
getSlotProps: T,
|
|
109
|
+
externalSlotProps: r.root,
|
|
110
|
+
externalForwardedProps: m,
|
|
111
|
+
additionalProps: {
|
|
112
|
+
ref: s
|
|
113
|
+
},
|
|
114
|
+
ownerState: i,
|
|
115
|
+
className: C.root
|
|
116
|
+
});
|
|
117
|
+
return /* @__PURE__ */ N(u, d({}, v, {
|
|
118
|
+
children: c
|
|
119
|
+
}));
|
|
120
|
+
});
|
|
121
|
+
process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
122
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
123
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
124
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
125
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
126
|
+
/**
|
|
127
|
+
* A ref for imperative actions. It currently only supports `focusVisible()` action.
|
|
128
|
+
*/
|
|
129
|
+
action: e.oneOfType([e.func, e.shape({
|
|
130
|
+
current: e.shape({
|
|
131
|
+
focusVisible: e.func.isRequired
|
|
132
|
+
})
|
|
133
|
+
})]),
|
|
134
|
+
/**
|
|
135
|
+
* @ignore
|
|
136
|
+
*/
|
|
137
|
+
children: e.node,
|
|
138
|
+
/**
|
|
139
|
+
* If `true`, the component is disabled.
|
|
140
|
+
* @default false
|
|
141
|
+
*/
|
|
142
|
+
disabled: e.bool,
|
|
143
|
+
/**
|
|
144
|
+
* Callback invoked when new value is being set.
|
|
145
|
+
*/
|
|
146
|
+
onChange: e.func,
|
|
147
|
+
/**
|
|
148
|
+
* The props used for each slot inside the Tab.
|
|
149
|
+
* @default {}
|
|
150
|
+
*/
|
|
151
|
+
slotProps: e.shape({
|
|
152
|
+
root: e.oneOfType([e.func, e.object])
|
|
153
|
+
}),
|
|
154
|
+
/**
|
|
155
|
+
* The components used for each slot inside the Tab.
|
|
156
|
+
* Either a string to use a HTML element or a component.
|
|
157
|
+
* @default {}
|
|
158
|
+
*/
|
|
159
|
+
slots: e.shape({
|
|
160
|
+
root: e.elementType
|
|
161
|
+
}),
|
|
162
|
+
/**
|
|
163
|
+
* You can provide your own value. Otherwise, it falls back to the child position index.
|
|
164
|
+
*/
|
|
165
|
+
value: e.oneOfType([e.number, e.string])
|
|
166
|
+
});
|
|
167
|
+
const pe = H(
|
|
168
|
+
({ children: o, value: t, disabled: s, dataTestId: n }, c) => {
|
|
169
|
+
const a = U(D), r = j(
|
|
170
|
+
() => k(
|
|
171
|
+
y.tabs__tab,
|
|
172
|
+
t === (a == null ? void 0 : a.value) && y["tabs__tab--selected"],
|
|
173
|
+
s && y["tabs__tab--disabled"]
|
|
174
|
+
),
|
|
175
|
+
[t, a, s]
|
|
176
|
+
);
|
|
177
|
+
return /* @__PURE__ */ N(F, { className: r, disabled: s, value: t, "data-testid": n, ref: c, children: o });
|
|
178
|
+
}
|
|
179
|
+
);
|
|
6
180
|
export {
|
|
7
|
-
|
|
181
|
+
pe as Tab
|
|
8
182
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx as T } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as P from "react";
|
|
3
3
|
import { forwardRef as v } from "react";
|
|
4
|
-
import { u as y,
|
|
5
|
-
import { a as b, _ } from "../../objectWithoutPropertiesLoose-D7Cp0Pg_.js";
|
|
6
|
-
import { g as
|
|
4
|
+
import { u as y, s as x } from "../../Tabs.module-jkH1Qjn7.js";
|
|
5
|
+
import { a as b, _ as C } from "../../objectWithoutPropertiesLoose-D7Cp0Pg_.js";
|
|
6
|
+
import { g as N, a as _, u as w, b as O, P as o, c as E, d as I } from "../../index-CqjC7P5Y.js";
|
|
7
|
+
import { u as S, a as U } from "../../useCompoundItem-D1iRfg8D.js";
|
|
7
8
|
const h = "TabPanel";
|
|
8
9
|
function j(t) {
|
|
9
|
-
return
|
|
10
|
+
return N(h, t);
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
_(h, ["root", "hidden"]);
|
|
12
13
|
function M(t) {
|
|
13
14
|
return t.size;
|
|
14
15
|
}
|
|
@@ -22,13 +23,13 @@ function V(t) {
|
|
|
22
23
|
throw new Error("No TabContext provided");
|
|
23
24
|
const {
|
|
24
25
|
value: f,
|
|
25
|
-
getTabId:
|
|
26
|
-
} = i, a =
|
|
26
|
+
getTabId: m
|
|
27
|
+
} = i, a = S(s), r = P.useRef(null), c = w(r, n), u = P.useMemo(() => ({
|
|
27
28
|
id: a,
|
|
28
29
|
ref: r
|
|
29
30
|
}), [a]), {
|
|
30
31
|
id: l
|
|
31
|
-
} =
|
|
32
|
+
} = U(e ?? M, u), d = l !== f, p = l !== void 0 ? m(l) : void 0;
|
|
32
33
|
return {
|
|
33
34
|
hidden: d,
|
|
34
35
|
getRootProps: (g = {}) => b({
|
|
@@ -45,21 +46,21 @@ const F = ["children", "value", "slotProps", "slots"], $ = (t) => {
|
|
|
45
46
|
const {
|
|
46
47
|
hidden: e
|
|
47
48
|
} = t;
|
|
48
|
-
return
|
|
49
|
+
return E({
|
|
49
50
|
root: ["root", e && "hidden"]
|
|
50
|
-
},
|
|
51
|
-
}, R = /* @__PURE__ */
|
|
51
|
+
}, I(j));
|
|
52
|
+
}, R = /* @__PURE__ */ P.forwardRef(function(e, s) {
|
|
52
53
|
var n;
|
|
53
54
|
const {
|
|
54
55
|
children: i,
|
|
55
56
|
slotProps: f = {},
|
|
56
|
-
slots:
|
|
57
|
-
} = e, a =
|
|
57
|
+
slots: m = {}
|
|
58
|
+
} = e, a = C(e, F), {
|
|
58
59
|
hidden: r,
|
|
59
60
|
getRootProps: c
|
|
60
61
|
} = V(e), u = b({}, e, {
|
|
61
62
|
hidden: r
|
|
62
|
-
}), l = $(u), d = (n =
|
|
63
|
+
}), l = $(u), d = (n = m.root) != null ? n : "div", p = O({
|
|
63
64
|
elementType: d,
|
|
64
65
|
getSlotProps: c,
|
|
65
66
|
externalSlotProps: f.root,
|
|
@@ -110,9 +111,9 @@ process.env.NODE_ENV !== "production" && (R.propTypes = {
|
|
|
110
111
|
*/
|
|
111
112
|
value: o.oneOfType([o.number, o.string])
|
|
112
113
|
});
|
|
113
|
-
const
|
|
114
|
-
({ children: t, value: e, dataTestId: s }, n) => /* @__PURE__ */ T(R, { className:
|
|
114
|
+
const q = v(
|
|
115
|
+
({ children: t, value: e, dataTestId: s }, n) => /* @__PURE__ */ T(R, { className: x["tabs__tab-panel"], value: e, "data-testid": s, ref: n, children: t })
|
|
115
116
|
);
|
|
116
117
|
export {
|
|
117
|
-
|
|
118
|
+
q as TabPanel
|
|
118
119
|
};
|