@pismo/marola 1.0.0-beta.5 → 1.0.0-beta.51
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/{Button-2b1peDFT.js → Button-BAljjMv3.js} +2 -2
- package/dist/{ClickAwayListener-BSW-Nd-y.js → ClickAwayListener-DbEYZpyh.js} +4 -3
- package/dist/Dialog.module-D9e4RsKo.js +30 -0
- package/dist/Group-DspH8hyO.js +30 -0
- package/dist/Popover.module-B4boCutS.js +10 -0
- package/dist/{Popup-B6ZSGIEI.js → Popup-Ck3XlWMq.js} +3 -3
- package/dist/{Portal-DIeBsWdL.js → Portal-oY3enyAm.js} +2 -2
- package/dist/SelectButton-B38avP9u.js +75 -0
- package/dist/{Tabs.module-jkH1Qjn7.js → Tabs.module-BGGTkDc5.js} +7 -7
- package/dist/Toggle-CzkXi3_R.js +189 -0
- package/dist/assets/Adornment.css +1 -0
- package/dist/assets/Advice.css +1 -1
- package/dist/assets/Autocomplete.css +1 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/EllipsisTooltip.css +1 -1
- package/dist/assets/Group.css +1 -1
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/Popover.css +1 -0
- package/dist/assets/ResultWithChips.css +1 -0
- package/dist/assets/SelectButton.css +1 -1
- package/dist/assets/Skeleton.css +1 -1
- package/dist/assets/Snackbar.css +1 -1
- package/dist/assets/SortTooltip.css +1 -1
- package/dist/assets/Stepper.css +1 -1
- package/dist/assets/StepperNavigator.css +1 -0
- package/dist/assets/Table.css +1 -1
- package/dist/assets/Tabs.css +1 -1
- package/dist/assets/TextDisplay.css +1 -1
- package/dist/assets/Toggle.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/{combineHooksSlotProps-DVjg9PRh.js → combineHooksSlotProps-C-zYvfnF.js} +1 -1
- package/dist/components/Adornment/Adornment.d.ts +20 -0
- package/dist/components/Adornment/Adornment.js +13 -0
- package/dist/components/Adornment/Adornment.stories.d.ts +14 -0
- package/dist/components/Adornment/adornment.test.d.ts +1 -0
- package/dist/components/Advice/Advice.d.ts +32 -17
- package/dist/components/Advice/Advice.js +39 -40
- package/dist/components/Advice/Advice.stories.d.ts +4 -3
- package/dist/components/Autocomplete/Autocomplete.d.ts +20 -0
- package/dist/components/Autocomplete/Autocomplete.js +679 -0
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +23 -0
- package/dist/components/Button/Button.d.ts +2 -0
- package/dist/components/Button/Button.js +51 -49
- package/dist/components/Checkbox/Checkbox.js +52 -52
- package/dist/components/Chip/Chip.d.ts +6 -12
- package/dist/components/Chip/Chip.js +10 -6
- package/dist/components/Chip/Chip.stories.d.ts +6 -15
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +3 -3
- package/dist/components/Dialog/Backdrop.js +8 -7
- package/dist/components/Dialog/CloseIconButton.d.ts +1 -2
- package/dist/components/Dialog/CloseIconButton.js +15 -18
- package/dist/components/Dialog/Dialog.d.ts +9 -6
- package/dist/components/Dialog/Dialog.js +139 -139
- package/dist/components/Dialog/Dialog.stories.d.ts +51 -47
- package/dist/components/Dialog/DialogTitle.js +1 -1
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +3 -2
- package/dist/components/Icon/Icon.js +177 -52
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +42 -42
- package/dist/components/Input/Input.d.ts +26 -5
- package/dist/components/Input/Input.js +319 -304
- package/dist/components/Input/Input.stories.d.ts +2 -21
- package/dist/components/InputSearch/InputSearch.d.ts +37 -7
- package/dist/components/InputSearch/InputSearch.js +27 -29
- package/dist/components/InputSearch/InputSearch.stories.d.ts +15 -3
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -1
- package/dist/components/PageHeader/PageHeader.js +57 -57
- package/dist/components/Pagination/Pagination.d.ts +5 -1
- package/dist/components/Pagination/Pagination.js +87 -185
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
- package/dist/components/Pagination/usePagination.d.ts +90 -0
- package/dist/components/Pagination/usePagination.js +79 -0
- package/dist/components/Popover/Popover.d.ts +32 -0
- package/dist/components/Popover/Popover.js +24 -0
- package/dist/components/Popover/Popover.stories.d.ts +34 -0
- package/dist/components/Popover/PopoverBody.d.ts +6 -0
- package/dist/components/Popover/PopoverBody.js +6 -0
- package/dist/components/Popover/PopoverFooter.d.ts +6 -0
- package/dist/components/Popover/PopoverFooter.js +6 -0
- package/dist/components/Popover/PopoverHeader.d.ts +6 -0
- package/dist/components/Popover/PopoverHeader.js +6 -0
- package/dist/components/ResultWithChips/ResultWithChips.d.ts +12 -0
- package/dist/components/ResultWithChips/ResultWithChips.js +33 -0
- package/dist/components/RowItem/RowItem.d.ts +25 -0
- package/dist/components/RowItem/RowItem.js +22 -0
- package/dist/components/RowItem/RowItem.stories.d.ts +17 -0
- package/dist/components/RowItem/rowItem.test.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +21 -0
- package/dist/components/Select/Select.js +476 -413
- package/dist/components/Select/SelectButton.d.ts +2 -0
- package/dist/components/Select/SelectButton.js +3 -2
- package/dist/components/Skeleton/Skeleton.d.ts +3 -1
- package/dist/components/Skeleton/Skeleton.js +20 -14
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
- package/dist/components/Snackbar/Snackbar.js +94 -94
- package/dist/components/Snackbar/Snackbar.stories.d.ts +4 -4
- package/dist/components/SortTooltip/SortTooltip.js +46 -46
- package/dist/components/Stepper/Stepper.js +35 -35
- package/dist/components/StepperNavigator/StepperNavigator.d.ts +58 -0
- package/dist/components/StepperNavigator/StepperNavigator.js +115 -0
- package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +18 -0
- package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +3 -1
- package/dist/components/Table/Table.js +87 -99
- package/dist/components/Table/Table.stories.d.ts +1 -1
- package/dist/components/Tabs/Tab.d.ts +5 -3
- package/dist/components/Tabs/Tab.js +38 -36
- package/dist/components/Tabs/TabPanel.d.ts +4 -2
- package/dist/components/Tabs/TabPanel.js +51 -40
- package/dist/components/Tabs/Tabs.d.ts +6 -4
- package/dist/components/Tabs/Tabs.js +131 -128
- package/dist/components/TextDisplay/TextDisplay.d.ts +9 -3
- package/dist/components/TextDisplay/TextDisplay.js +45 -31
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +2 -1
- package/dist/components/Toggle/Toggle.js +56 -56
- package/dist/components/ToggleGroup/Group.d.ts +2 -0
- package/dist/components/ToggleGroup/Group.js +4 -2
- package/dist/components/ToggleGroup/Toggle.d.ts +2 -0
- package/dist/components/ToggleGroup/Toggle.js +8 -5
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +3 -1
- package/dist/components/Tooltip/Tooltip.d.ts +3 -1
- package/dist/components/Tooltip/Tooltip.js +4 -4
- package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -1
- package/dist/components/Typography/Typography.js +47 -47
- package/dist/components/Typography/Typography.stories.d.ts +1 -1
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
- package/dist/{index-CjW42-M-.js → index-bQFToy-I.js} +1 -1
- package/dist/main.d.ts +6 -0
- package/dist/main.js +87 -76
- package/dist/ownerDocument-YGhwAnr1.js +33 -0
- package/dist/{useButton-DNk3wrQp.js → useButton-DcihopJG.js} +1 -1
- package/dist/useCompoundItem-B7Eo_qZk.js +68 -0
- package/dist/useEventCallback-BAQJJ3ye.js +14 -0
- package/dist/useId-BW-oWmul.js +19 -0
- package/dist/{useList-B0hog_3-.js → useList-B9C55YB7.js} +2 -2
- package/dist/{index-CH45lKw7.js → useSlotProps-C_I1kEHr.js} +99 -99
- package/package.json +21 -12
- package/dist/Dialog.module-DFEmFdYT.js +0 -30
- package/dist/Group-B3p31ftp.js +0 -26
- package/dist/SelectButton-K3OIfR5m.js +0 -61
- package/dist/Toggle-BCgIItCc.js +0 -142
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useEventCallback-xTG9piMa.js +0 -45
|
@@ -2,11 +2,12 @@ import { jsx as N } from "react/jsx-runtime";
|
|
|
2
2
|
import * as b from "react";
|
|
3
3
|
import { forwardRef as H, useContext as U, useMemo as j } from "react";
|
|
4
4
|
import { c as k } from "../../clsx-DB4S2d7J.js";
|
|
5
|
-
import { u as B, T as D, s as y } from "../../Tabs.module-
|
|
6
|
-
import { g as L, a as W, u as O, f as $, b as
|
|
7
|
-
import { u as J, c as K } from "../../combineHooksSlotProps-
|
|
8
|
-
import { u as Q
|
|
9
|
-
import { u as
|
|
5
|
+
import { u as B, T as D, s as y } from "../../Tabs.module-BGGTkDc5.js";
|
|
6
|
+
import { g as L, a as W, u as O, f as $, b as f, _ as q, c as z, P as e, d as A, e as G } from "../../useSlotProps-C_I1kEHr.js";
|
|
7
|
+
import { u as J, c as K } from "../../combineHooksSlotProps-C-zYvfnF.js";
|
|
8
|
+
import { u as Q } from "../../useId-BW-oWmul.js";
|
|
9
|
+
import { u as X } from "../../useButton-DcihopJG.js";
|
|
10
|
+
import { u as Y } from "../../useCompoundItem-B7Eo_qZk.js";
|
|
10
11
|
const E = "Tab";
|
|
11
12
|
function Z(o) {
|
|
12
13
|
return L(E, o);
|
|
@@ -21,43 +22,43 @@ function te(o) {
|
|
|
21
22
|
rootRef: s,
|
|
22
23
|
disabled: n = !1,
|
|
23
24
|
id: c
|
|
24
|
-
} = o,
|
|
25
|
-
value:
|
|
25
|
+
} = o, r = b.useRef(null), a = Q(c), {
|
|
26
|
+
value: i,
|
|
26
27
|
selectionFollowsFocus: p,
|
|
27
28
|
getTabPanelId: m
|
|
28
29
|
} = B(), P = b.useMemo(() => ({
|
|
29
30
|
disabled: n,
|
|
30
|
-
ref:
|
|
31
|
-
id:
|
|
32
|
-
}), [n,
|
|
31
|
+
ref: r,
|
|
32
|
+
id: a
|
|
33
|
+
}), [n, r, a]), {
|
|
33
34
|
id: l,
|
|
34
35
|
index: R,
|
|
35
36
|
totalItemCount: g
|
|
36
|
-
} =
|
|
37
|
+
} = Y(t ?? ee, P), {
|
|
37
38
|
getRootProps: h,
|
|
38
39
|
highlighted: T,
|
|
39
|
-
selected:
|
|
40
|
+
selected: u
|
|
40
41
|
} = J({
|
|
41
42
|
item: l
|
|
42
43
|
}), {
|
|
43
44
|
getRootProps: C,
|
|
44
|
-
rootRef:
|
|
45
|
+
rootRef: d,
|
|
45
46
|
active: v,
|
|
46
47
|
focusVisible: I,
|
|
47
48
|
setFocusVisible: V
|
|
48
|
-
} =
|
|
49
|
+
} = X({
|
|
49
50
|
disabled: n,
|
|
50
51
|
focusableWhenDisabled: !p,
|
|
51
52
|
type: "button"
|
|
52
|
-
}), _ = O(
|
|
53
|
+
}), _ = O(r, s, d), M = l !== void 0 ? m(l) : void 0;
|
|
53
54
|
return {
|
|
54
55
|
getRootProps: (x = {}) => {
|
|
55
56
|
const S = $(x), w = K(h, C);
|
|
56
|
-
return
|
|
57
|
+
return f({}, x, w(S), {
|
|
57
58
|
role: "tab",
|
|
58
59
|
"aria-controls": M,
|
|
59
|
-
"aria-selected":
|
|
60
|
-
id:
|
|
60
|
+
"aria-selected": u,
|
|
61
|
+
id: a,
|
|
61
62
|
ref: _
|
|
62
63
|
});
|
|
63
64
|
},
|
|
@@ -68,7 +69,7 @@ function te(o) {
|
|
|
68
69
|
rootRef: _,
|
|
69
70
|
// the `selected` state isn't set on the server (it relies on effects to be calculated),
|
|
70
71
|
// so we fall back to checking the `value` prop with the selectedValue from the TabsContext
|
|
71
|
-
selected:
|
|
72
|
+
selected: u || l === i,
|
|
72
73
|
setFocusVisible: V,
|
|
73
74
|
totalTabsCount: g
|
|
74
75
|
};
|
|
@@ -85,35 +86,35 @@ const oe = ["action", "children", "disabled", "onChange", "onClick", "onFocus",
|
|
|
85
86
|
var n;
|
|
86
87
|
const {
|
|
87
88
|
children: c,
|
|
88
|
-
disabled:
|
|
89
|
-
slotProps:
|
|
90
|
-
slots:
|
|
89
|
+
disabled: r = !1,
|
|
90
|
+
slotProps: a = {},
|
|
91
|
+
slots: i = {},
|
|
91
92
|
value: p
|
|
92
93
|
} = t, m = q(t, oe), P = b.useRef(), l = O(P, s), {
|
|
93
94
|
active: R,
|
|
94
95
|
highlighted: g,
|
|
95
96
|
selected: h,
|
|
96
97
|
getRootProps: T
|
|
97
|
-
} = te(
|
|
98
|
+
} = te(f({}, t, {
|
|
98
99
|
rootRef: l,
|
|
99
100
|
value: p
|
|
100
|
-
})),
|
|
101
|
+
})), u = f({}, t, {
|
|
101
102
|
active: R,
|
|
102
|
-
disabled:
|
|
103
|
+
disabled: r,
|
|
103
104
|
highlighted: g,
|
|
104
105
|
selected: h
|
|
105
|
-
}), C = se(
|
|
106
|
-
elementType:
|
|
106
|
+
}), C = se(u), d = (n = i.root) != null ? n : "button", v = z({
|
|
107
|
+
elementType: d,
|
|
107
108
|
getSlotProps: T,
|
|
108
|
-
externalSlotProps:
|
|
109
|
+
externalSlotProps: a.root,
|
|
109
110
|
externalForwardedProps: m,
|
|
110
111
|
additionalProps: {
|
|
111
112
|
ref: s
|
|
112
113
|
},
|
|
113
|
-
ownerState:
|
|
114
|
+
ownerState: u,
|
|
114
115
|
className: C.root
|
|
115
116
|
});
|
|
116
|
-
return /* @__PURE__ */ N(
|
|
117
|
+
return /* @__PURE__ */ N(d, f({}, v, {
|
|
117
118
|
children: c
|
|
118
119
|
}));
|
|
119
120
|
});
|
|
@@ -163,19 +164,20 @@ process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
|
163
164
|
*/
|
|
164
165
|
value: e.oneOfType([e.number, e.string])
|
|
165
166
|
});
|
|
166
|
-
const
|
|
167
|
-
({ children: o, value: t, disabled: s,
|
|
168
|
-
const a = U(D),
|
|
167
|
+
const pe = H(
|
|
168
|
+
({ children: o, value: t, disabled: s, className: n, "data-testid": c }, r) => {
|
|
169
|
+
const a = U(D), i = j(
|
|
169
170
|
() => k(
|
|
170
171
|
y.tabs__tab,
|
|
171
172
|
t === (a == null ? void 0 : a.value) && y["tabs__tab--selected"],
|
|
172
|
-
s && y["tabs__tab--disabled"]
|
|
173
|
+
s && y["tabs__tab--disabled"],
|
|
174
|
+
n
|
|
173
175
|
),
|
|
174
176
|
[t, a, s]
|
|
175
177
|
);
|
|
176
|
-
return /* @__PURE__ */ N(F, { className:
|
|
178
|
+
return /* @__PURE__ */ N(F, { className: i, disabled: s, value: t, "data-testid": c, ref: r, children: o });
|
|
177
179
|
}
|
|
178
180
|
);
|
|
179
181
|
export {
|
|
180
|
-
|
|
182
|
+
pe as Tab
|
|
181
183
|
};
|
|
@@ -6,7 +6,9 @@ export interface TabPanelProps {
|
|
|
6
6
|
/** The value that identifies which tab is selected.
|
|
7
7
|
* e.g. value="1" when the tab button with the value="1" is selected this content will show */
|
|
8
8
|
value: string | number;
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/** CSS classes to be applied on the container element */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Id to be applied as `data-testid` on the container element */
|
|
12
|
+
'data-testid'?: string;
|
|
11
13
|
}
|
|
12
14
|
export declare const TabPanel: import('react').ForwardRefExoticComponent<TabPanelProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,78 +1,80 @@
|
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { c as y } from "../../clsx-DB4S2d7J.js";
|
|
5
|
+
import { u as x, s as C } from "../../Tabs.module-BGGTkDc5.js";
|
|
6
|
+
import { g as N, a as _, u as w, b, _ as O, c as E, P as o, d as I, e as S } from "../../useSlotProps-C_I1kEHr.js";
|
|
7
|
+
import { u as U } from "../../useId-BW-oWmul.js";
|
|
8
|
+
import { u as j } from "../../useCompoundItem-B7Eo_qZk.js";
|
|
7
9
|
const h = "TabPanel";
|
|
8
|
-
function j(t) {
|
|
9
|
-
return C(h, t);
|
|
10
|
-
}
|
|
11
|
-
N(h, ["root", "hidden"]);
|
|
12
10
|
function M(t) {
|
|
13
|
-
return t
|
|
11
|
+
return N(h, t);
|
|
14
12
|
}
|
|
13
|
+
_(h, ["root", "hidden"]);
|
|
15
14
|
function V(t) {
|
|
15
|
+
return t.size;
|
|
16
|
+
}
|
|
17
|
+
function F(t) {
|
|
16
18
|
const {
|
|
17
19
|
value: e,
|
|
18
20
|
id: s,
|
|
19
21
|
rootRef: n
|
|
20
|
-
} = t,
|
|
21
|
-
if (
|
|
22
|
+
} = t, a = x();
|
|
23
|
+
if (a === null)
|
|
22
24
|
throw new Error("No TabContext provided");
|
|
23
25
|
const {
|
|
24
26
|
value: f,
|
|
25
|
-
getTabId:
|
|
26
|
-
} =
|
|
27
|
-
id:
|
|
28
|
-
ref:
|
|
29
|
-
}), [
|
|
30
|
-
id:
|
|
31
|
-
} =
|
|
27
|
+
getTabId: m
|
|
28
|
+
} = a, r = U(s), l = P.useRef(null), c = w(l, n), u = P.useMemo(() => ({
|
|
29
|
+
id: r,
|
|
30
|
+
ref: l
|
|
31
|
+
}), [r]), {
|
|
32
|
+
id: d
|
|
33
|
+
} = j(e ?? V, u), i = d !== f, p = d !== void 0 ? m(d) : void 0;
|
|
32
34
|
return {
|
|
33
|
-
hidden:
|
|
35
|
+
hidden: i,
|
|
34
36
|
getRootProps: (g = {}) => b({
|
|
35
37
|
"aria-labelledby": p ?? void 0,
|
|
36
|
-
hidden:
|
|
37
|
-
id:
|
|
38
|
+
hidden: i,
|
|
39
|
+
id: r ?? void 0
|
|
38
40
|
}, g, {
|
|
39
41
|
ref: c
|
|
40
42
|
}),
|
|
41
43
|
rootRef: c
|
|
42
44
|
};
|
|
43
45
|
}
|
|
44
|
-
const
|
|
46
|
+
const $ = ["children", "value", "slotProps", "slots"], k = (t) => {
|
|
45
47
|
const {
|
|
46
48
|
hidden: e
|
|
47
49
|
} = t;
|
|
48
|
-
return
|
|
50
|
+
return I({
|
|
49
51
|
root: ["root", e && "hidden"]
|
|
50
|
-
},
|
|
51
|
-
}, R = /* @__PURE__ */
|
|
52
|
+
}, S(M));
|
|
53
|
+
}, R = /* @__PURE__ */ P.forwardRef(function(e, s) {
|
|
52
54
|
var n;
|
|
53
55
|
const {
|
|
54
|
-
children:
|
|
56
|
+
children: a,
|
|
55
57
|
slotProps: f = {},
|
|
56
|
-
slots:
|
|
57
|
-
} = e,
|
|
58
|
-
hidden:
|
|
58
|
+
slots: m = {}
|
|
59
|
+
} = e, r = O(e, $), {
|
|
60
|
+
hidden: l,
|
|
59
61
|
getRootProps: c
|
|
60
|
-
} =
|
|
61
|
-
hidden:
|
|
62
|
-
}),
|
|
63
|
-
elementType:
|
|
62
|
+
} = F(e), u = b({}, e, {
|
|
63
|
+
hidden: l
|
|
64
|
+
}), d = k(u), i = (n = m.root) != null ? n : "div", p = E({
|
|
65
|
+
elementType: i,
|
|
64
66
|
getSlotProps: c,
|
|
65
67
|
externalSlotProps: f.root,
|
|
66
|
-
externalForwardedProps:
|
|
68
|
+
externalForwardedProps: r,
|
|
67
69
|
additionalProps: {
|
|
68
70
|
role: "tabpanel",
|
|
69
71
|
ref: s
|
|
70
72
|
},
|
|
71
73
|
ownerState: u,
|
|
72
|
-
className:
|
|
74
|
+
className: d.root
|
|
73
75
|
});
|
|
74
|
-
return /* @__PURE__ */ T(
|
|
75
|
-
children: !
|
|
76
|
+
return /* @__PURE__ */ T(i, b({}, p, {
|
|
77
|
+
children: !l && a
|
|
76
78
|
}));
|
|
77
79
|
});
|
|
78
80
|
process.env.NODE_ENV !== "production" && (R.propTypes = {
|
|
@@ -110,9 +112,18 @@ process.env.NODE_ENV !== "production" && (R.propTypes = {
|
|
|
110
112
|
*/
|
|
111
113
|
value: o.oneOfType([o.number, o.string])
|
|
112
114
|
});
|
|
113
|
-
const
|
|
114
|
-
({ children: t, value: e,
|
|
115
|
+
const H = v(
|
|
116
|
+
({ children: t, value: e, className: s, "data-testid": n }, a) => /* @__PURE__ */ T(
|
|
117
|
+
R,
|
|
118
|
+
{
|
|
119
|
+
className: y(C["tabs__tab-panel"], s),
|
|
120
|
+
value: e,
|
|
121
|
+
"data-testid": n,
|
|
122
|
+
ref: a,
|
|
123
|
+
children: t
|
|
124
|
+
}
|
|
125
|
+
)
|
|
115
126
|
);
|
|
116
127
|
export {
|
|
117
|
-
|
|
128
|
+
H as TabPanel
|
|
118
129
|
};
|
|
@@ -4,11 +4,13 @@ export interface TabsProps {
|
|
|
4
4
|
/** Should contain `Tab` and `TabPanel` components to be rendered */
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
/** Selected tab */
|
|
7
|
-
value?: number |
|
|
7
|
+
value?: string | number | null;
|
|
8
|
+
/** CSS classes to be applied on the container element */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Id to be applied as `data-testid` on the container element */
|
|
11
|
+
'data-testid'?: string;
|
|
8
12
|
/** Callback triggered when the user has selected a tab */
|
|
9
|
-
onChange?: (tabValue:
|
|
10
|
-
/** Test id */
|
|
11
|
-
dataTestId?: string;
|
|
13
|
+
onChange?: (tabValue: string | number | null, event?: React.SyntheticEvent<Element, Event> | null) => void;
|
|
12
14
|
}
|
|
13
15
|
export declare const Tabs: import('react').ForwardRefExoticComponent<TabsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
16
|
export * from './Tab';
|