@pismo/marola 1.0.0-beta.39 → 1.0.0-beta.4
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-BAljjMv3.js → Button-2b1peDFT.js} +2 -2
- package/dist/{ClickAwayListener-DbEYZpyh.js → ClickAwayListener-BSW-Nd-y.js} +3 -4
- package/dist/Dialog.module-DFEmFdYT.js +30 -0
- package/dist/Group-B3p31ftp.js +26 -0
- package/dist/{Popup-Ck3XlWMq.js → Popup-B6ZSGIEI.js} +3 -3
- package/dist/{Portal-oY3enyAm.js → Portal-DIeBsWdL.js} +2 -2
- package/dist/SelectButton-K3OIfR5m.js +61 -0
- package/dist/{Tabs.module-BGGTkDc5.js → Tabs.module-jkH1Qjn7.js} +7 -7
- package/dist/Toggle-BCgIItCc.js +142 -0
- package/dist/assets/Advice.css +1 -1
- 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/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/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-C-zYvfnF.js → combineHooksSlotProps-DVjg9PRh.js} +1 -1
- package/dist/components/Advice/Advice.d.ts +17 -32
- package/dist/components/Advice/Advice.js +40 -39
- package/dist/components/Advice/Advice.stories.d.ts +3 -4
- package/dist/components/Button/Button.d.ts +0 -2
- package/dist/components/Button/Button.js +49 -51
- package/dist/components/Checkbox/Checkbox.js +52 -52
- package/dist/components/Chip/Chip.d.ts +12 -6
- package/dist/components/Chip/Chip.js +6 -8
- package/dist/components/Chip/Chip.stories.d.ts +14 -5
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +3 -3
- package/dist/components/Dialog/Backdrop.js +7 -8
- package/dist/components/Dialog/CloseIconButton.d.ts +2 -1
- package/dist/components/Dialog/CloseIconButton.js +18 -15
- package/dist/components/Dialog/Dialog.d.ts +6 -9
- package/dist/components/Dialog/Dialog.js +139 -139
- package/dist/components/Dialog/Dialog.stories.d.ts +46 -50
- package/dist/components/Dialog/DialogTitle.js +1 -1
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +17 -30
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -2
- package/dist/components/Icon/Icon.js +47 -141
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +42 -42
- package/dist/components/Input/Input.d.ts +5 -24
- package/dist/components/Input/Input.js +278 -291
- package/dist/components/Input/Input.stories.d.ts +21 -2
- package/dist/components/InputSearch/InputSearch.stories.d.ts +21 -1
- package/dist/components/PageHeader/PageHeader.js +57 -57
- package/dist/components/Pagination/Pagination.d.ts +1 -5
- package/dist/components/Pagination/Pagination.js +185 -87
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +0 -7
- package/dist/components/Select/Select.js +365 -409
- package/dist/components/Select/SelectButton.d.ts +0 -1
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +1 -3
- package/dist/components/Skeleton/Skeleton.js +14 -20
- 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 +3 -3
- package/dist/components/SortTooltip/SortTooltip.js +46 -46
- package/dist/components/Stepper/Stepper.js +35 -35
- package/dist/components/Table/Table.d.ts +1 -3
- package/dist/components/Table/Table.js +99 -87
- package/dist/components/Table/Table.stories.d.ts +1 -1
- package/dist/components/Tabs/Tab.d.ts +3 -5
- package/dist/components/Tabs/Tab.js +36 -38
- package/dist/components/Tabs/TabPanel.d.ts +2 -4
- package/dist/components/Tabs/TabPanel.js +40 -51
- package/dist/components/Tabs/Tabs.d.ts +4 -6
- package/dist/components/Tabs/Tabs.js +128 -131
- package/dist/components/TextDisplay/TextDisplay.d.ts +3 -9
- package/dist/components/TextDisplay/TextDisplay.js +31 -45
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +1 -2
- package/dist/components/Toggle/Toggle.js +56 -56
- package/dist/components/ToggleGroup/Group.js +1 -1
- package/dist/components/ToggleGroup/Toggle.d.ts +0 -1
- package/dist/components/ToggleGroup/Toggle.js +5 -6
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/Tooltip/Tooltip.d.ts +1 -3
- package/dist/components/Tooltip/Tooltip.js +4 -4
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -1
- package/dist/components/Typography/Typography.js +47 -47
- package/dist/{useSlotProps-C_I1kEHr.js → index-CH45lKw7.js} +99 -99
- package/dist/{index-bQFToy-I.js → index-CjW42-M-.js} +1 -1
- package/dist/main.d.ts +0 -5
- package/dist/main.js +76 -85
- package/dist/{useButton-DcihopJG.js → useButton-DNk3wrQp.js} +1 -1
- package/dist/useCompoundItem-D1iRfg8D.js +84 -0
- package/dist/useEventCallback-xTG9piMa.js +45 -0
- package/dist/{useList-B9C55YB7.js → useList-B0hog_3-.js} +2 -2
- package/package.json +13 -22
- package/dist/Dialog.module-D9e4RsKo.js +0 -30
- package/dist/Group-B80_u5Q1.js +0 -27
- package/dist/SelectButton-BlVl6pJn.js +0 -70
- package/dist/Toggle-Dl-yPy8S.js +0 -187
- package/dist/assets/Adornment.css +0 -1
- package/dist/assets/Autocomplete.css +0 -1
- package/dist/assets/ResultWithChips.css +0 -1
- package/dist/assets/StepperNavigator.css +0 -1
- package/dist/components/Adornment/Adornment.d.ts +0 -20
- package/dist/components/Adornment/Adornment.js +0 -13
- package/dist/components/Adornment/Adornment.stories.d.ts +0 -14
- package/dist/components/Adornment/adornment.test.d.ts +0 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +0 -20
- package/dist/components/Autocomplete/Autocomplete.js +0 -679
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +0 -23
- package/dist/components/Pagination/usePagination.d.ts +0 -90
- package/dist/components/Pagination/usePagination.js +0 -79
- package/dist/components/ResultWithChips/ResultWithChips.d.ts +0 -12
- package/dist/components/ResultWithChips/ResultWithChips.js +0 -33
- package/dist/components/RowItem/RowItem.d.ts +0 -25
- package/dist/components/RowItem/RowItem.js +0 -20
- package/dist/components/RowItem/RowItem.stories.d.ts +0 -17
- package/dist/components/RowItem/rowItem.test.d.ts +0 -1
- package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -43
- package/dist/components/StepperNavigator/StepperNavigator.js +0 -56
- package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +0 -16
- package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +0 -1
- package/dist/ownerDocument-YGhwAnr1.js +0 -33
- package/dist/useCompoundItem-B7Eo_qZk.js +0 -68
- package/dist/useEventCallback-BAQJJ3ye.js +0 -14
- package/dist/useId-BW-oWmul.js +0 -19
|
@@ -1,80 +1,78 @@
|
|
|
1
1
|
import { jsx as T } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as m from "react";
|
|
3
3
|
import { forwardRef as v } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
6
|
-
import {
|
|
7
|
-
import { u as U } from "../../useId-BW-oWmul.js";
|
|
8
|
-
import { u as j } from "../../useCompoundItem-B7Eo_qZk.js";
|
|
4
|
+
import { u as y, s as x } from "../../Tabs.module-jkH1Qjn7.js";
|
|
5
|
+
import { g as C, a as N, u as _, b, _ as w, c as O, P as o, d as E, e as I } from "../../index-CH45lKw7.js";
|
|
6
|
+
import { u as S, a as U } from "../../useCompoundItem-D1iRfg8D.js";
|
|
9
7
|
const h = "TabPanel";
|
|
10
|
-
function
|
|
11
|
-
return
|
|
8
|
+
function j(t) {
|
|
9
|
+
return C(h, t);
|
|
12
10
|
}
|
|
13
|
-
|
|
14
|
-
function
|
|
11
|
+
N(h, ["root", "hidden"]);
|
|
12
|
+
function M(t) {
|
|
15
13
|
return t.size;
|
|
16
14
|
}
|
|
17
|
-
function
|
|
15
|
+
function V(t) {
|
|
18
16
|
const {
|
|
19
17
|
value: e,
|
|
20
18
|
id: s,
|
|
21
19
|
rootRef: n
|
|
22
|
-
} = t,
|
|
23
|
-
if (
|
|
20
|
+
} = t, i = y();
|
|
21
|
+
if (i === null)
|
|
24
22
|
throw new Error("No TabContext provided");
|
|
25
23
|
const {
|
|
26
24
|
value: f,
|
|
27
|
-
getTabId:
|
|
28
|
-
} =
|
|
29
|
-
id:
|
|
30
|
-
ref:
|
|
31
|
-
}), [
|
|
32
|
-
id:
|
|
33
|
-
} =
|
|
25
|
+
getTabId: P
|
|
26
|
+
} = i, a = S(s), r = m.useRef(null), c = _(r, n), u = m.useMemo(() => ({
|
|
27
|
+
id: a,
|
|
28
|
+
ref: r
|
|
29
|
+
}), [a]), {
|
|
30
|
+
id: l
|
|
31
|
+
} = U(e ?? M, u), d = l !== f, p = l !== void 0 ? P(l) : void 0;
|
|
34
32
|
return {
|
|
35
|
-
hidden:
|
|
33
|
+
hidden: d,
|
|
36
34
|
getRootProps: (g = {}) => b({
|
|
37
35
|
"aria-labelledby": p ?? void 0,
|
|
38
|
-
hidden:
|
|
39
|
-
id:
|
|
36
|
+
hidden: d,
|
|
37
|
+
id: a ?? void 0
|
|
40
38
|
}, g, {
|
|
41
39
|
ref: c
|
|
42
40
|
}),
|
|
43
41
|
rootRef: c
|
|
44
42
|
};
|
|
45
43
|
}
|
|
46
|
-
const
|
|
44
|
+
const F = ["children", "value", "slotProps", "slots"], $ = (t) => {
|
|
47
45
|
const {
|
|
48
46
|
hidden: e
|
|
49
47
|
} = t;
|
|
50
|
-
return
|
|
48
|
+
return E({
|
|
51
49
|
root: ["root", e && "hidden"]
|
|
52
|
-
},
|
|
53
|
-
}, R = /* @__PURE__ */
|
|
50
|
+
}, I(j));
|
|
51
|
+
}, R = /* @__PURE__ */ m.forwardRef(function(e, s) {
|
|
54
52
|
var n;
|
|
55
53
|
const {
|
|
56
|
-
children:
|
|
54
|
+
children: i,
|
|
57
55
|
slotProps: f = {},
|
|
58
|
-
slots:
|
|
59
|
-
} = e,
|
|
60
|
-
hidden:
|
|
56
|
+
slots: P = {}
|
|
57
|
+
} = e, a = w(e, F), {
|
|
58
|
+
hidden: r,
|
|
61
59
|
getRootProps: c
|
|
62
|
-
} =
|
|
63
|
-
hidden:
|
|
64
|
-
}),
|
|
65
|
-
elementType:
|
|
60
|
+
} = V(e), u = b({}, e, {
|
|
61
|
+
hidden: r
|
|
62
|
+
}), l = $(u), d = (n = P.root) != null ? n : "div", p = O({
|
|
63
|
+
elementType: d,
|
|
66
64
|
getSlotProps: c,
|
|
67
65
|
externalSlotProps: f.root,
|
|
68
|
-
externalForwardedProps:
|
|
66
|
+
externalForwardedProps: a,
|
|
69
67
|
additionalProps: {
|
|
70
68
|
role: "tabpanel",
|
|
71
69
|
ref: s
|
|
72
70
|
},
|
|
73
71
|
ownerState: u,
|
|
74
|
-
className:
|
|
72
|
+
className: l.root
|
|
75
73
|
});
|
|
76
|
-
return /* @__PURE__ */ T(
|
|
77
|
-
children: !
|
|
74
|
+
return /* @__PURE__ */ T(d, b({}, p, {
|
|
75
|
+
children: !r && i
|
|
78
76
|
}));
|
|
79
77
|
});
|
|
80
78
|
process.env.NODE_ENV !== "production" && (R.propTypes = {
|
|
@@ -112,18 +110,9 @@ process.env.NODE_ENV !== "production" && (R.propTypes = {
|
|
|
112
110
|
*/
|
|
113
111
|
value: o.oneOfType([o.number, o.string])
|
|
114
112
|
});
|
|
115
|
-
const
|
|
116
|
-
({ children: t, value: e,
|
|
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
|
-
)
|
|
113
|
+
const W = v(
|
|
114
|
+
({ children: t, value: e, dataTestId: s }, n) => /* @__PURE__ */ T(R, { className: x["tabs__tab-panel"], value: e, "data-testid": s, ref: n, children: t })
|
|
126
115
|
);
|
|
127
116
|
export {
|
|
128
|
-
|
|
117
|
+
W as TabPanel
|
|
129
118
|
};
|
|
@@ -4,13 +4,11 @@ export interface TabsProps {
|
|
|
4
4
|
/** Should contain `Tab` and `TabPanel` components to be rendered */
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
/** Selected tab */
|
|
7
|
-
value?:
|
|
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;
|
|
7
|
+
value?: number | string;
|
|
12
8
|
/** Callback triggered when the user has selected a tab */
|
|
13
|
-
onChange?: (tabValue:
|
|
9
|
+
onChange?: (tabValue: number | string | null, event?: React.SyntheticEvent<Element, Event> | null) => void;
|
|
10
|
+
/** Test id */
|
|
11
|
+
dataTestId?: string;
|
|
14
12
|
}
|
|
15
13
|
export declare const Tabs: import('react').ForwardRefExoticComponent<TabsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
16
14
|
export * from './Tab';
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { jsx as T } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
|
-
import { forwardRef as q } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { a as M, C as O } from "../../useCompoundItem-B7Eo_qZk.js";
|
|
3
|
+
import { forwardRef as q, useState as B } from "react";
|
|
4
|
+
import { T as G, u as J, s as Q } from "../../Tabs.module-jkH1Qjn7.js";
|
|
5
|
+
import { Tab as Le } from "./Tab.js";
|
|
6
|
+
import { TabPanel as _e } from "./TabPanel.js";
|
|
7
|
+
import { g as I, a as _, b as C, _ as F, c as $, P as t, d as N, e as M } from "../../index-CH45lKw7.js";
|
|
8
|
+
import { b as O, C as S } from "../../useCompoundItem-D1iRfg8D.js";
|
|
10
9
|
import { u as X } from "../../useControlled-CCMYYdCM.js";
|
|
11
|
-
import { L as Y, a as Z } from "../../combineHooksSlotProps-
|
|
12
|
-
import { l as ee, m as te, u as oe } from "../../useList-
|
|
10
|
+
import { L as Y, a as Z } from "../../combineHooksSlotProps-DVjg9PRh.js";
|
|
11
|
+
import { l as ee, m as te, u as oe } from "../../useList-B0hog_3-.js";
|
|
13
12
|
const k = "Tabs";
|
|
14
13
|
function se(s) {
|
|
15
14
|
return I(k, s);
|
|
@@ -19,38 +18,38 @@ function ne(s) {
|
|
|
19
18
|
const {
|
|
20
19
|
value: e,
|
|
21
20
|
defaultValue: o,
|
|
22
|
-
onChange:
|
|
23
|
-
orientation:
|
|
21
|
+
onChange: n,
|
|
22
|
+
orientation: i = "horizontal",
|
|
24
23
|
direction: c = "ltr",
|
|
25
|
-
selectionFollowsFocus:
|
|
26
|
-
} = s, [d,
|
|
24
|
+
selectionFollowsFocus: l = !1
|
|
25
|
+
} = s, [d, u] = X({
|
|
27
26
|
controlled: e,
|
|
28
27
|
default: o,
|
|
29
28
|
name: "Tabs",
|
|
30
29
|
state: "value"
|
|
31
|
-
}),
|
|
32
|
-
|
|
33
|
-
}, [
|
|
30
|
+
}), a = r.useCallback((x, y) => {
|
|
31
|
+
u(y), n == null || n(x, y);
|
|
32
|
+
}, [n, u]), {
|
|
34
33
|
subitems: m,
|
|
35
|
-
contextValue:
|
|
36
|
-
} =
|
|
37
|
-
}),
|
|
34
|
+
contextValue: g
|
|
35
|
+
} = O(), p = r.useRef(() => {
|
|
36
|
+
}), b = r.useCallback((x) => {
|
|
38
37
|
var y;
|
|
39
38
|
return (y = m.get(x)) == null ? void 0 : y.id;
|
|
40
|
-
}, [m]),
|
|
39
|
+
}, [m]), f = r.useCallback((x) => p.current(x), []), P = r.useCallback((x) => {
|
|
41
40
|
p.current = x;
|
|
42
41
|
}, []);
|
|
43
42
|
return {
|
|
44
43
|
contextValue: C({
|
|
45
44
|
direction: c,
|
|
46
|
-
getTabId:
|
|
47
|
-
getTabPanelId:
|
|
48
|
-
onSelected:
|
|
49
|
-
orientation:
|
|
45
|
+
getTabId: f,
|
|
46
|
+
getTabPanelId: b,
|
|
47
|
+
onSelected: a,
|
|
48
|
+
orientation: i,
|
|
50
49
|
registerTabIdLookup: P,
|
|
51
|
-
selectionFollowsFocus:
|
|
50
|
+
selectionFollowsFocus: l,
|
|
52
51
|
value: d
|
|
53
|
-
},
|
|
52
|
+
}, g)
|
|
54
53
|
};
|
|
55
54
|
}
|
|
56
55
|
function le(s) {
|
|
@@ -58,33 +57,33 @@ function le(s) {
|
|
|
58
57
|
value: e,
|
|
59
58
|
children: o
|
|
60
59
|
} = s, {
|
|
61
|
-
direction:
|
|
62
|
-
getItemIndex:
|
|
60
|
+
direction: n,
|
|
61
|
+
getItemIndex: i,
|
|
63
62
|
onSelected: c,
|
|
64
|
-
orientation:
|
|
63
|
+
orientation: l,
|
|
65
64
|
registerItem: d,
|
|
66
|
-
registerTabIdLookup:
|
|
67
|
-
selectionFollowsFocus:
|
|
65
|
+
registerTabIdLookup: u,
|
|
66
|
+
selectionFollowsFocus: a,
|
|
68
67
|
totalSubitemCount: m,
|
|
69
|
-
value:
|
|
68
|
+
value: g,
|
|
70
69
|
getTabId: p,
|
|
71
|
-
getTabPanelId:
|
|
72
|
-
} = e,
|
|
73
|
-
getItemIndex:
|
|
70
|
+
getTabPanelId: b
|
|
71
|
+
} = e, f = r.useMemo(() => ({
|
|
72
|
+
getItemIndex: i,
|
|
74
73
|
registerItem: d,
|
|
75
74
|
totalSubitemCount: m
|
|
76
|
-
}), [d,
|
|
77
|
-
direction:
|
|
75
|
+
}), [d, i, m]), P = r.useMemo(() => ({
|
|
76
|
+
direction: n,
|
|
78
77
|
getTabId: p,
|
|
79
|
-
getTabPanelId:
|
|
78
|
+
getTabPanelId: b,
|
|
80
79
|
onSelected: c,
|
|
81
|
-
orientation:
|
|
82
|
-
registerTabIdLookup:
|
|
83
|
-
selectionFollowsFocus:
|
|
84
|
-
value:
|
|
85
|
-
}), [
|
|
86
|
-
return /* @__PURE__ */ T(
|
|
87
|
-
value:
|
|
80
|
+
orientation: l,
|
|
81
|
+
registerTabIdLookup: u,
|
|
82
|
+
selectionFollowsFocus: a,
|
|
83
|
+
value: g
|
|
84
|
+
}), [n, p, b, c, l, u, a, g]);
|
|
85
|
+
return /* @__PURE__ */ T(S.Provider, {
|
|
86
|
+
value: f,
|
|
88
87
|
children: /* @__PURE__ */ T(G.Provider, {
|
|
89
88
|
value: P,
|
|
90
89
|
children: o
|
|
@@ -97,38 +96,38 @@ const re = ["children", "value", "defaultValue", "orientation", "direction", "on
|
|
|
97
96
|
} = s;
|
|
98
97
|
return N({
|
|
99
98
|
root: ["root", e]
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
var
|
|
99
|
+
}, M(se));
|
|
100
|
+
}, w = /* @__PURE__ */ r.forwardRef(function(e, o) {
|
|
101
|
+
var n;
|
|
103
102
|
const {
|
|
104
|
-
children:
|
|
103
|
+
children: i,
|
|
105
104
|
orientation: c = "horizontal",
|
|
106
|
-
direction:
|
|
105
|
+
direction: l = "ltr",
|
|
107
106
|
slotProps: d = {},
|
|
108
|
-
slots:
|
|
109
|
-
} = e,
|
|
107
|
+
slots: u = {}
|
|
108
|
+
} = e, a = F(e, re), m = C({}, e, {
|
|
110
109
|
orientation: c,
|
|
111
|
-
direction:
|
|
110
|
+
direction: l
|
|
112
111
|
}), {
|
|
113
|
-
contextValue:
|
|
114
|
-
} = ne(m), p = ae(m),
|
|
115
|
-
elementType:
|
|
112
|
+
contextValue: g
|
|
113
|
+
} = ne(m), p = ae(m), b = (n = u.root) != null ? n : "div", f = $({
|
|
114
|
+
elementType: b,
|
|
116
115
|
externalSlotProps: d.root,
|
|
117
|
-
externalForwardedProps:
|
|
116
|
+
externalForwardedProps: a,
|
|
118
117
|
additionalProps: {
|
|
119
118
|
ref: o
|
|
120
119
|
},
|
|
121
120
|
ownerState: m,
|
|
122
121
|
className: p.root
|
|
123
122
|
});
|
|
124
|
-
return /* @__PURE__ */ T(
|
|
123
|
+
return /* @__PURE__ */ T(b, C({}, f, {
|
|
125
124
|
children: /* @__PURE__ */ T(le, {
|
|
126
|
-
value:
|
|
127
|
-
children:
|
|
125
|
+
value: g,
|
|
126
|
+
children: i
|
|
128
127
|
})
|
|
129
128
|
}));
|
|
130
129
|
});
|
|
131
|
-
process.env.NODE_ENV !== "production" && (
|
|
130
|
+
process.env.NODE_ENV !== "production" && (w.propTypes = {
|
|
132
131
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
133
132
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
134
133
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -200,7 +199,7 @@ function ue(s, e) {
|
|
|
200
199
|
});
|
|
201
200
|
const o = ee(s, e), {
|
|
202
201
|
context: {
|
|
203
|
-
selectionFollowsFocus:
|
|
202
|
+
selectionFollowsFocus: n
|
|
204
203
|
}
|
|
205
204
|
} = e;
|
|
206
205
|
if (e.type === Y.itemsChange) {
|
|
@@ -210,7 +209,7 @@ function ue(s, e) {
|
|
|
210
209
|
});
|
|
211
210
|
te(null, "reset", e.context);
|
|
212
211
|
}
|
|
213
|
-
return
|
|
212
|
+
return n && o.highlightedValue != null ? C({}, o, {
|
|
214
213
|
selectedValues: [o.highlightedValue]
|
|
215
214
|
}) : o;
|
|
216
215
|
}
|
|
@@ -219,37 +218,37 @@ function ce(s) {
|
|
|
219
218
|
const {
|
|
220
219
|
rootRef: o
|
|
221
220
|
} = s, {
|
|
222
|
-
direction:
|
|
223
|
-
onSelected:
|
|
221
|
+
direction: n = "ltr",
|
|
222
|
+
onSelected: i,
|
|
224
223
|
orientation: c = "horizontal",
|
|
225
|
-
value:
|
|
224
|
+
value: l,
|
|
226
225
|
registerTabIdLookup: d,
|
|
227
|
-
selectionFollowsFocus:
|
|
226
|
+
selectionFollowsFocus: u
|
|
228
227
|
} = J(), {
|
|
229
|
-
subitems:
|
|
228
|
+
subitems: a,
|
|
230
229
|
contextValue: m
|
|
231
|
-
} =
|
|
230
|
+
} = O(), g = r.useCallback((h) => {
|
|
232
231
|
var v;
|
|
233
|
-
return (v =
|
|
234
|
-
}, [
|
|
235
|
-
d(
|
|
236
|
-
const p = r.useMemo(() => Array.from(
|
|
232
|
+
return (v = a.get(h)) == null ? void 0 : v.id;
|
|
233
|
+
}, [a]);
|
|
234
|
+
d(g);
|
|
235
|
+
const p = r.useMemo(() => Array.from(a.keys()), [a]), b = r.useCallback((h) => {
|
|
237
236
|
var v, V;
|
|
238
|
-
return
|
|
239
|
-
}, [
|
|
237
|
+
return h == null ? null : (v = (V = a.get(h)) == null ? void 0 : V.ref.current) != null ? v : null;
|
|
238
|
+
}, [a]), f = n === "rtl";
|
|
240
239
|
let P;
|
|
241
|
-
c === "vertical" ? P = "vertical" : P =
|
|
242
|
-
const x = r.useCallback((
|
|
240
|
+
c === "vertical" ? P = "vertical" : P = f ? "horizontal-rtl" : "horizontal-ltr";
|
|
241
|
+
const x = r.useCallback((h, v) => {
|
|
243
242
|
var V;
|
|
244
|
-
|
|
245
|
-
}, [
|
|
246
|
-
selectedValues: [
|
|
243
|
+
i(h, (V = v[0]) != null ? V : null);
|
|
244
|
+
}, [i]), y = r.useMemo(() => l === void 0 ? {} : l != null ? {
|
|
245
|
+
selectedValues: [l]
|
|
247
246
|
} : {
|
|
248
247
|
selectedValues: []
|
|
249
|
-
}, [
|
|
248
|
+
}, [l]), U = r.useCallback((h) => {
|
|
250
249
|
var v, V;
|
|
251
|
-
return (v = (V =
|
|
252
|
-
}, [
|
|
250
|
+
return (v = (V = a.get(h)) == null ? void 0 : V.disabled) != null ? v : !1;
|
|
251
|
+
}, [a]), {
|
|
253
252
|
contextValue: L,
|
|
254
253
|
dispatch: R,
|
|
255
254
|
getRootProps: D,
|
|
@@ -260,27 +259,27 @@ function ce(s) {
|
|
|
260
259
|
rootRef: K
|
|
261
260
|
} = oe({
|
|
262
261
|
controlledProps: y,
|
|
263
|
-
disabledItemsFocusable: !
|
|
262
|
+
disabledItemsFocusable: !u,
|
|
264
263
|
focusManagement: "DOM",
|
|
265
|
-
getItemDomElement:
|
|
264
|
+
getItemDomElement: b,
|
|
266
265
|
isItemDisabled: U,
|
|
267
266
|
items: p,
|
|
268
267
|
rootRef: o,
|
|
269
268
|
onChange: x,
|
|
270
269
|
orientation: P,
|
|
271
270
|
reducerActionContext: r.useMemo(() => ({
|
|
272
|
-
selectionFollowsFocus:
|
|
273
|
-
}), [
|
|
271
|
+
selectionFollowsFocus: u || !1
|
|
272
|
+
}), [u]),
|
|
274
273
|
selectionMode: "single",
|
|
275
274
|
stateReducer: ue
|
|
276
275
|
});
|
|
277
276
|
r.useEffect(() => {
|
|
278
|
-
|
|
277
|
+
l !== void 0 && l != null && R({
|
|
279
278
|
type: z.valueChange,
|
|
280
|
-
value:
|
|
279
|
+
value: l
|
|
281
280
|
});
|
|
282
|
-
}, [R,
|
|
283
|
-
const W = (
|
|
281
|
+
}, [R, l]);
|
|
282
|
+
const W = (h = {}) => C({}, h, D(h), {
|
|
284
283
|
"aria-orientation": c === "vertical" ? "vertical" : void 0,
|
|
285
284
|
role: "tablist"
|
|
286
285
|
});
|
|
@@ -289,7 +288,7 @@ function ce(s) {
|
|
|
289
288
|
dispatch: R,
|
|
290
289
|
getRootProps: W,
|
|
291
290
|
highlightedValue: j,
|
|
292
|
-
isRtl:
|
|
291
|
+
isRtl: f,
|
|
293
292
|
orientation: c,
|
|
294
293
|
rootRef: K,
|
|
295
294
|
selectedValue: (e = H[0]) != null ? e : null
|
|
@@ -300,24 +299,24 @@ function de(s) {
|
|
|
300
299
|
value: e,
|
|
301
300
|
children: o
|
|
302
301
|
} = s, {
|
|
303
|
-
dispatch:
|
|
304
|
-
getItemIndex:
|
|
302
|
+
dispatch: n,
|
|
303
|
+
getItemIndex: i,
|
|
305
304
|
getItemState: c,
|
|
306
|
-
registerItem:
|
|
305
|
+
registerItem: l,
|
|
307
306
|
totalSubitemCount: d
|
|
308
|
-
} = e,
|
|
309
|
-
dispatch:
|
|
307
|
+
} = e, u = r.useMemo(() => ({
|
|
308
|
+
dispatch: n,
|
|
310
309
|
getItemState: c,
|
|
311
|
-
getItemIndex:
|
|
312
|
-
}), [
|
|
313
|
-
getItemIndex:
|
|
314
|
-
registerItem:
|
|
310
|
+
getItemIndex: i
|
|
311
|
+
}), [n, i, c]), a = r.useMemo(() => ({
|
|
312
|
+
getItemIndex: i,
|
|
313
|
+
registerItem: l,
|
|
315
314
|
totalSubitemCount: d
|
|
316
|
-
}), [
|
|
317
|
-
return /* @__PURE__ */ T(
|
|
318
|
-
value:
|
|
315
|
+
}), [l, i, d]);
|
|
316
|
+
return /* @__PURE__ */ T(S.Provider, {
|
|
317
|
+
value: a,
|
|
319
318
|
children: /* @__PURE__ */ T(Z.Provider, {
|
|
320
|
-
value:
|
|
319
|
+
value: u,
|
|
321
320
|
children: o
|
|
322
321
|
})
|
|
323
322
|
});
|
|
@@ -328,35 +327,35 @@ const me = ["children", "slotProps", "slots"], pe = (s) => {
|
|
|
328
327
|
} = s;
|
|
329
328
|
return N({
|
|
330
329
|
root: ["root", e]
|
|
331
|
-
},
|
|
330
|
+
}, M(ie));
|
|
332
331
|
}, A = /* @__PURE__ */ r.forwardRef(function(e, o) {
|
|
333
|
-
var
|
|
332
|
+
var n;
|
|
334
333
|
const {
|
|
335
|
-
children:
|
|
334
|
+
children: i,
|
|
336
335
|
slotProps: c = {},
|
|
337
|
-
slots:
|
|
336
|
+
slots: l = {}
|
|
338
337
|
} = e, d = F(e, me), {
|
|
339
|
-
isRtl:
|
|
340
|
-
orientation:
|
|
338
|
+
isRtl: u,
|
|
339
|
+
orientation: a,
|
|
341
340
|
getRootProps: m,
|
|
342
|
-
contextValue:
|
|
341
|
+
contextValue: g
|
|
343
342
|
} = ce({
|
|
344
343
|
rootRef: o
|
|
345
344
|
}), p = C({}, e, {
|
|
346
|
-
isRtl:
|
|
347
|
-
orientation:
|
|
348
|
-
}),
|
|
349
|
-
elementType:
|
|
345
|
+
isRtl: u,
|
|
346
|
+
orientation: a
|
|
347
|
+
}), b = pe(p), f = (n = l.root) != null ? n : "div", P = $({
|
|
348
|
+
elementType: f,
|
|
350
349
|
getSlotProps: m,
|
|
351
350
|
externalSlotProps: c.root,
|
|
352
351
|
externalForwardedProps: d,
|
|
353
352
|
ownerState: p,
|
|
354
|
-
className:
|
|
353
|
+
className: b.root
|
|
355
354
|
});
|
|
356
355
|
return /* @__PURE__ */ T(de, {
|
|
357
|
-
value:
|
|
358
|
-
children: /* @__PURE__ */ T(
|
|
359
|
-
children:
|
|
356
|
+
value: g,
|
|
357
|
+
children: /* @__PURE__ */ T(f, C({}, P, {
|
|
358
|
+
children: i
|
|
360
359
|
}))
|
|
361
360
|
});
|
|
362
361
|
});
|
|
@@ -389,16 +388,14 @@ process.env.NODE_ENV !== "production" && (A.propTypes = {
|
|
|
389
388
|
root: t.elementType
|
|
390
389
|
})
|
|
391
390
|
});
|
|
392
|
-
const
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
);
|
|
391
|
+
const Ve = q(({ children: s, onChange: e, dataTestId: o }, n) => {
|
|
392
|
+
const [i, c] = B("1");
|
|
393
|
+
return /* @__PURE__ */ T(w, { "data-testid": o, value: i, onChange: (d, u) => {
|
|
394
|
+
c(u), e && e(u, d);
|
|
395
|
+
}, ref: n, children: /* @__PURE__ */ T(A, { className: Q.tabs, children: s }) });
|
|
396
|
+
});
|
|
400
397
|
export {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
398
|
+
Le as Tab,
|
|
399
|
+
_e as TabPanel,
|
|
400
|
+
Ve as Tabs
|
|
404
401
|
};
|
|
@@ -2,12 +2,8 @@ import { VariantType } from '../Typography/Typography.tsx';
|
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
|
|
4
4
|
type OptionsProps = {
|
|
5
|
-
/** Text variant */
|
|
6
5
|
variant?: VariantType;
|
|
7
|
-
/** Text color */
|
|
8
6
|
color?: string;
|
|
9
|
-
/** Text weight */
|
|
10
|
-
bold?: boolean;
|
|
11
7
|
};
|
|
12
8
|
export interface TextDisplayProps {
|
|
13
9
|
/** TextDisplay label */
|
|
@@ -16,14 +12,12 @@ export interface TextDisplayProps {
|
|
|
16
12
|
value: React.ReactNode;
|
|
17
13
|
/** Renders skeleton when true */
|
|
18
14
|
isLoading?: boolean;
|
|
19
|
-
/** Sets the
|
|
20
|
-
|
|
15
|
+
/** Sets the testId prefix for label, value and skeletons */
|
|
16
|
+
testId?: string;
|
|
21
17
|
/** Sets the label options */
|
|
22
18
|
labelOptions?: OptionsProps;
|
|
23
19
|
/** Sets the value options */
|
|
24
20
|
valueOptions?: OptionsProps;
|
|
25
|
-
/** Sets the label and value onto the same line */
|
|
26
|
-
inline?: boolean;
|
|
27
21
|
}
|
|
28
|
-
export declare const TextDisplay: ({ label, value, isLoading,
|
|
22
|
+
export declare const TextDisplay: ({ label, value, isLoading, testId, labelOptions, valueOptions, }: TextDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
23
|
export {};
|