@pismo/marola 1.0.0-beta.69 → 1.0.0-beta.8
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-DiLqcAJG.js} +2 -2
- package/dist/{ClickAwayListener-DbEYZpyh.js → ClickAwayListener-BaJ-OV_7.js} +3 -3
- package/dist/Dialog.module-DFEmFdYT.js +30 -0
- package/dist/Group-B3p31ftp.js +26 -0
- package/dist/Input.module-iOYlI_1w.js +405 -0
- package/dist/{Popup-Ck3XlWMq.js → Popup-lLWZt2wk.js} +3 -3
- package/dist/{Portal-oY3enyAm.js → Portal-B_Es6eUL.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-BSvvbKBp.js +175 -0
- package/dist/assets/Advice.css +1 -1
- package/dist/assets/Autocomplete.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/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-BtBYUV_B.js} +1 -1
- package/dist/components/Adornment/Adornment.d.ts +2 -11
- package/dist/components/Adornment/Adornment.js +6 -6
- 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/Autocomplete/Autocomplete.d.ts +42 -12
- package/dist/components/Autocomplete/Autocomplete.js +435 -425
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +25 -3
- 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 +4 -6
- package/dist/components/Chip/Chip.js +6 -10
- package/dist/components/Chip/Chip.stories.d.ts +15 -6
- 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 +10 -16
- package/dist/components/Dialog/Dialog.js +167 -167
- package/dist/components/Dialog/Dialog.stories.d.ts +69 -75
- package/dist/components/Dialog/DialogTitle.d.ts +2 -5
- package/dist/components/Dialog/DialogTitle.js +16 -22
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +17 -30
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -2
- package/dist/components/Icon/Icon.js +51 -331
- 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 -26
- package/dist/components/Input/Input.js +102 -514
- package/dist/components/Input/Input.stories.d.ts +21 -2
- package/dist/components/InputSearch/InputSearch.d.ts +7 -37
- package/dist/components/InputSearch/InputSearch.js +29 -27
- package/dist/components/InputSearch/InputSearch.stories.d.ts +3 -15
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +2 -6
- package/dist/components/PageHeader/PageHeader.js +71 -78
- package/dist/components/PageHeader/PageHeader.stories.d.ts +1 -3
- package/dist/components/Pagination/Pagination.d.ts +1 -5
- package/dist/components/Pagination/Pagination.js +91 -90
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
- package/dist/components/RowItem/RowItem.d.ts +2 -2
- package/dist/components/RowItem/RowItem.js +5 -9
- package/dist/components/Select/Select.d.ts +0 -22
- package/dist/components/Select/Select.js +414 -476
- package/dist/components/Select/SelectButton.d.ts +0 -2
- package/dist/components/Select/SelectButton.js +2 -3
- 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 +93 -93
- package/dist/components/Snackbar/Snackbar.stories.d.ts +1 -1
- 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 +35 -36
- package/dist/components/Tabs/TabPanel.d.ts +2 -4
- package/dist/components/Tabs/TabPanel.js +38 -48
- package/dist/components/Tabs/Tabs.d.ts +4 -6
- package/dist/components/Tabs/Tabs.js +112 -115
- package/dist/components/TextDisplay/TextDisplay.d.ts +3 -7
- package/dist/components/TextDisplay/TextDisplay.js +37 -44
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +1 -2
- package/dist/components/Toggle/Toggle.js +55 -55
- package/dist/components/ToggleGroup/Group.d.ts +0 -2
- package/dist/components/ToggleGroup/Group.js +2 -4
- package/dist/components/ToggleGroup/Toggle.d.ts +0 -2
- package/dist/components/ToggleGroup/Toggle.js +4 -8
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -3
- 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 +1 -2
- package/dist/components/Typography/Typography.js +47 -47
- package/dist/components/Typography/Typography.stories.d.ts +1 -1
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +30 -34
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
- package/dist/{index-bQFToy-I.js → index-D3Wj0eid.js} +1 -1
- package/dist/main.d.ts +0 -8
- package/dist/main.js +79 -95
- package/dist/marola.css +1 -1
- package/dist/{ownerDocument-YGhwAnr1.js → ownerDocument-B61GUaFs.js} +1 -1
- package/dist/test-utils/assertStyles.d.ts +1 -1
- package/dist/{useButton-DcihopJG.js → useButton-Bn3MNH8I.js} +1 -1
- package/dist/{useList-B9C55YB7.js → useList-BpJT77u3.js} +2 -2
- package/dist/{useSlotProps-C_I1kEHr.js → useSlotProps-kRhf7Gil.js} +72 -73
- package/package.json +13 -22
- package/dist/Dialog.module-W7UCXlf3.js +0 -29
- package/dist/Group-DspH8hyO.js +0 -30
- package/dist/Popover.module-B4boCutS.js +0 -10
- package/dist/SelectButton-B38avP9u.js +0 -75
- package/dist/Toggle-MfR7l8Wn.js +0 -190
- package/dist/assets/Alert.css +0 -1
- package/dist/assets/Avatar.css +0 -1
- package/dist/assets/Description.css +0 -1
- package/dist/assets/Popover.css +0 -1
- package/dist/assets/RadioButton.css +0 -1
- package/dist/assets/ResultWithChips.css +0 -1
- package/dist/assets/StepperNavigator.css +0 -1
- package/dist/components/Adornment/Adornment.stories.d.ts +0 -14
- package/dist/components/Adornment/adornment.test.d.ts +0 -1
- package/dist/components/Alert/Alert.d.ts +0 -11
- package/dist/components/Alert/Alert.js +0 -46
- package/dist/components/Alert/Alert.stories.d.ts +0 -24
- package/dist/components/Alert/Alert.test.d.ts +0 -1
- package/dist/components/Avatar/Avatar.d.ts +0 -15
- package/dist/components/Avatar/Avatar.js +0 -51
- package/dist/components/Avatar/Avatar.stories.d.ts +0 -25
- package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +0 -14
- package/dist/components/ConfirmationDialog/ConfirmationDialog.js +0 -37
- package/dist/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +0 -23
- package/dist/components/ConfirmationDialog/ConfirmationModal.test.d.ts +0 -1
- package/dist/components/Description/Description.d.ts +0 -21
- package/dist/components/Description/Description.js +0 -66
- package/dist/components/Description/Description.stories.d.ts +0 -22
- package/dist/components/Description/Description.test.d.ts +0 -1
- package/dist/components/PageHeader/PageHeader.test.d.ts +0 -1
- package/dist/components/Popover/Popover.d.ts +0 -32
- package/dist/components/Popover/Popover.js +0 -24
- package/dist/components/Popover/Popover.stories.d.ts +0 -34
- package/dist/components/Popover/PopoverBody.d.ts +0 -6
- package/dist/components/Popover/PopoverBody.js +0 -6
- package/dist/components/Popover/PopoverFooter.d.ts +0 -6
- package/dist/components/Popover/PopoverFooter.js +0 -6
- package/dist/components/Popover/PopoverHeader.d.ts +0 -6
- package/dist/components/Popover/PopoverHeader.js +0 -6
- package/dist/components/RadioButton/RadioButton.d.ts +0 -19
- package/dist/components/RadioButton/RadioButton.js +0 -37
- package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -24
- package/dist/components/RadioButton/RadioButton.test.d.ts +0 -1
- package/dist/components/ResultWithChips/ResultWithChips.d.ts +0 -12
- package/dist/components/ResultWithChips/ResultWithChips.js +0 -33
- 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 -58
- package/dist/components/StepperNavigator/StepperNavigator.js +0 -115
- package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +0 -18
- package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +0 -1
|
@@ -1,80 +1,79 @@
|
|
|
1
1
|
import { jsx as T } from "react/jsx-runtime";
|
|
2
2
|
import * as P from "react";
|
|
3
3
|
import { forwardRef as v } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
6
|
-
import {
|
|
7
|
-
import { u as U } from "../../
|
|
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 "../../useSlotProps-kRhf7Gil.js";
|
|
6
|
+
import { u as S } from "../../useId-BW-oWmul.js";
|
|
7
|
+
import { u as U } from "../../useCompoundItem-B7Eo_qZk.js";
|
|
9
8
|
const h = "TabPanel";
|
|
10
|
-
function
|
|
11
|
-
return
|
|
9
|
+
function j(t) {
|
|
10
|
+
return C(h, t);
|
|
12
11
|
}
|
|
13
|
-
|
|
14
|
-
function
|
|
12
|
+
N(h, ["root", "hidden"]);
|
|
13
|
+
function M(t) {
|
|
15
14
|
return t.size;
|
|
16
15
|
}
|
|
17
|
-
function
|
|
16
|
+
function V(t) {
|
|
18
17
|
const {
|
|
19
18
|
value: e,
|
|
20
19
|
id: s,
|
|
21
20
|
rootRef: n
|
|
22
|
-
} = t,
|
|
23
|
-
if (
|
|
21
|
+
} = t, i = y();
|
|
22
|
+
if (i === null)
|
|
24
23
|
throw new Error("No TabContext provided");
|
|
25
24
|
const {
|
|
26
25
|
value: f,
|
|
27
26
|
getTabId: m
|
|
28
|
-
} =
|
|
27
|
+
} = i, r = S(s), a = P.useRef(null), u = _(a, n), c = P.useMemo(() => ({
|
|
29
28
|
id: r,
|
|
30
|
-
ref:
|
|
29
|
+
ref: a
|
|
31
30
|
}), [r]), {
|
|
32
|
-
id:
|
|
33
|
-
} =
|
|
31
|
+
id: l
|
|
32
|
+
} = U(e ?? M, c), d = l !== f, p = l !== void 0 ? m(l) : void 0;
|
|
34
33
|
return {
|
|
35
|
-
hidden:
|
|
34
|
+
hidden: d,
|
|
36
35
|
getRootProps: (g = {}) => b({
|
|
37
36
|
"aria-labelledby": p ?? void 0,
|
|
38
|
-
hidden:
|
|
37
|
+
hidden: d,
|
|
39
38
|
id: r ?? void 0
|
|
40
39
|
}, g, {
|
|
41
|
-
ref:
|
|
40
|
+
ref: u
|
|
42
41
|
}),
|
|
43
|
-
rootRef:
|
|
42
|
+
rootRef: u
|
|
44
43
|
};
|
|
45
44
|
}
|
|
46
|
-
const
|
|
45
|
+
const F = ["children", "value", "slotProps", "slots"], $ = (t) => {
|
|
47
46
|
const {
|
|
48
47
|
hidden: e
|
|
49
48
|
} = t;
|
|
50
|
-
return
|
|
49
|
+
return E({
|
|
51
50
|
root: ["root", e && "hidden"]
|
|
52
|
-
},
|
|
51
|
+
}, I(j));
|
|
53
52
|
}, R = /* @__PURE__ */ P.forwardRef(function(e, s) {
|
|
54
53
|
var n;
|
|
55
54
|
const {
|
|
56
|
-
children:
|
|
55
|
+
children: i,
|
|
57
56
|
slotProps: f = {},
|
|
58
57
|
slots: m = {}
|
|
59
|
-
} = e, r =
|
|
60
|
-
hidden:
|
|
61
|
-
getRootProps:
|
|
62
|
-
} =
|
|
63
|
-
hidden:
|
|
64
|
-
}),
|
|
65
|
-
elementType:
|
|
66
|
-
getSlotProps:
|
|
58
|
+
} = e, r = w(e, F), {
|
|
59
|
+
hidden: a,
|
|
60
|
+
getRootProps: u
|
|
61
|
+
} = V(e), c = b({}, e, {
|
|
62
|
+
hidden: a
|
|
63
|
+
}), l = $(c), d = (n = m.root) != null ? n : "div", p = O({
|
|
64
|
+
elementType: d,
|
|
65
|
+
getSlotProps: u,
|
|
67
66
|
externalSlotProps: f.root,
|
|
68
67
|
externalForwardedProps: r,
|
|
69
68
|
additionalProps: {
|
|
70
69
|
role: "tabpanel",
|
|
71
70
|
ref: s
|
|
72
71
|
},
|
|
73
|
-
ownerState:
|
|
74
|
-
className:
|
|
72
|
+
ownerState: c,
|
|
73
|
+
className: l.root
|
|
75
74
|
});
|
|
76
|
-
return /* @__PURE__ */ T(
|
|
77
|
-
children: !
|
|
75
|
+
return /* @__PURE__ */ T(d, b({}, p, {
|
|
76
|
+
children: !a && i
|
|
78
77
|
}));
|
|
79
78
|
});
|
|
80
79
|
process.env.NODE_ENV !== "production" && (R.propTypes = {
|
|
@@ -112,18 +111,9 @@ process.env.NODE_ENV !== "production" && (R.propTypes = {
|
|
|
112
111
|
*/
|
|
113
112
|
value: o.oneOfType([o.number, o.string])
|
|
114
113
|
});
|
|
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
|
-
)
|
|
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 })
|
|
126
116
|
);
|
|
127
117
|
export {
|
|
128
|
-
|
|
118
|
+
q as TabPanel
|
|
129
119
|
};
|
|
@@ -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 "../../useSlotProps-kRhf7Gil.js";
|
|
8
|
+
import { a as O, C as S } from "../../useCompoundItem-B7Eo_qZk.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-BtBYUV_B.js";
|
|
11
|
+
import { l as ee, m as te, u as oe } from "../../useList-BpJT77u3.js";
|
|
13
12
|
const k = "Tabs";
|
|
14
13
|
function se(s) {
|
|
15
14
|
return I(k, s);
|
|
@@ -19,21 +18,21 @@ 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
|
-
} =
|
|
34
|
+
contextValue: g
|
|
35
|
+
} = O(), p = r.useRef(() => {
|
|
37
36
|
}), f = r.useCallback((x) => {
|
|
38
37
|
var y;
|
|
39
38
|
return (y = m.get(x)) == null ? void 0 : y.id;
|
|
@@ -45,12 +44,12 @@ function ne(s) {
|
|
|
45
44
|
direction: c,
|
|
46
45
|
getTabId: b,
|
|
47
46
|
getTabPanelId: f,
|
|
48
|
-
onSelected:
|
|
49
|
-
orientation:
|
|
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,32 +57,32 @@ 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
70
|
getTabPanelId: f
|
|
72
71
|
} = e, b = r.useMemo(() => ({
|
|
73
|
-
getItemIndex:
|
|
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
78
|
getTabPanelId: f,
|
|
80
79
|
onSelected: c,
|
|
81
|
-
orientation:
|
|
82
|
-
registerTabIdLookup:
|
|
83
|
-
selectionFollowsFocus:
|
|
84
|
-
value:
|
|
85
|
-
}), [
|
|
86
|
-
return /* @__PURE__ */ T(
|
|
80
|
+
orientation: l,
|
|
81
|
+
registerTabIdLookup: u,
|
|
82
|
+
selectionFollowsFocus: a,
|
|
83
|
+
value: g
|
|
84
|
+
}), [n, p, f, c, l, u, a, g]);
|
|
85
|
+
return /* @__PURE__ */ T(S.Provider, {
|
|
87
86
|
value: b,
|
|
88
87
|
children: /* @__PURE__ */ T(G.Provider, {
|
|
89
88
|
value: P,
|
|
@@ -97,24 +96,24 @@ 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), f = (
|
|
112
|
+
contextValue: g
|
|
113
|
+
} = ne(m), p = ae(m), f = (n = u.root) != null ? n : "div", b = $({
|
|
115
114
|
elementType: f,
|
|
116
115
|
externalSlotProps: d.root,
|
|
117
|
-
externalForwardedProps:
|
|
116
|
+
externalForwardedProps: a,
|
|
118
117
|
additionalProps: {
|
|
119
118
|
ref: o
|
|
120
119
|
},
|
|
@@ -123,12 +122,12 @@ const re = ["children", "value", "defaultValue", "orientation", "direction", "on
|
|
|
123
122
|
});
|
|
124
123
|
return /* @__PURE__ */ T(f, C({}, b, {
|
|
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]), f = 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]), b = n === "rtl";
|
|
240
239
|
let P;
|
|
241
240
|
c === "vertical" ? P = "vertical" : P = b ? "horizontal-rtl" : "horizontal-ltr";
|
|
242
|
-
const x = r.useCallback((
|
|
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,7 +259,7 @@ function ce(s) {
|
|
|
260
259
|
rootRef: K
|
|
261
260
|
} = oe({
|
|
262
261
|
controlledProps: y,
|
|
263
|
-
disabledItemsFocusable: !
|
|
262
|
+
disabledItemsFocusable: !u,
|
|
264
263
|
focusManagement: "DOM",
|
|
265
264
|
getItemDomElement: f,
|
|
266
265
|
isItemDisabled: U,
|
|
@@ -269,18 +268,18 @@ function ce(s) {
|
|
|
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
|
});
|
|
@@ -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,24 +327,24 @@ 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
|
-
}), f = pe(p), b = (
|
|
345
|
+
isRtl: u,
|
|
346
|
+
orientation: a
|
|
347
|
+
}), f = pe(p), b = (n = l.root) != null ? n : "div", P = $({
|
|
349
348
|
elementType: b,
|
|
350
349
|
getSlotProps: m,
|
|
351
350
|
externalSlotProps: c.root,
|
|
@@ -354,9 +353,9 @@ const me = ["children", "slotProps", "slots"], pe = (s) => {
|
|
|
354
353
|
className: f.root
|
|
355
354
|
});
|
|
356
355
|
return /* @__PURE__ */ T(de, {
|
|
357
|
-
value:
|
|
356
|
+
value: g,
|
|
358
357
|
children: /* @__PURE__ */ T(b, C({}, P, {
|
|
359
|
-
children:
|
|
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,8 +12,8 @@ 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 */
|
|
@@ -25,5 +21,5 @@ export interface TextDisplayProps {
|
|
|
25
21
|
/** Sets the label and value onto the same line */
|
|
26
22
|
inline?: boolean;
|
|
27
23
|
}
|
|
28
|
-
export declare const TextDisplay: ({ label, value, isLoading,
|
|
24
|
+
export declare const TextDisplay: ({ label, value, isLoading, testId, labelOptions, valueOptions, inline, }: TextDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
25
|
export {};
|
|
@@ -1,51 +1,44 @@
|
|
|
1
1
|
import '../../assets/TextDisplay.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { c as
|
|
4
|
-
import { Skeleton as
|
|
5
|
-
import { Typography as
|
|
6
|
-
const
|
|
7
|
-
container:
|
|
2
|
+
import { jsxs as x, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { c as _ } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import { Skeleton as d } from "../Skeleton/Skeleton.js";
|
|
5
|
+
import { Typography as m } from "../Typography/Typography.js";
|
|
6
|
+
const f = "_container_ia8vu_1", n = {
|
|
7
|
+
container: f,
|
|
8
8
|
"container--inline": "_container--inline_ia8vu_5"
|
|
9
|
-
},
|
|
10
|
-
label:
|
|
11
|
-
value:
|
|
12
|
-
isLoading:
|
|
13
|
-
|
|
9
|
+
}, T = ({
|
|
10
|
+
label: y,
|
|
11
|
+
value: i,
|
|
12
|
+
isLoading: e = !1,
|
|
13
|
+
testId: t = "TextDisplay",
|
|
14
14
|
labelOptions: r,
|
|
15
|
-
valueOptions:
|
|
16
|
-
inline:
|
|
15
|
+
valueOptions: a,
|
|
16
|
+
inline: c
|
|
17
17
|
}) => {
|
|
18
|
-
const
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"data-testid": `${t}-value`,
|
|
42
|
-
children: o ? /* @__PURE__ */ d(m, { style: { width: 100 }, "data-testid": `${t}-skeletonValue` }) : x || "-"
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
);
|
|
18
|
+
const h = r != null && r.color || c ? "var(--black-100)" : "var(--gray-90)";
|
|
19
|
+
return /* @__PURE__ */ x("div", { className: _([n.container, { [n["container--inline"]]: c }]), children: [
|
|
20
|
+
/* @__PURE__ */ o(
|
|
21
|
+
m,
|
|
22
|
+
{
|
|
23
|
+
color: h,
|
|
24
|
+
variant: (r == null ? void 0 : r.variant) || "base",
|
|
25
|
+
"data-testid": `${t}-label`,
|
|
26
|
+
bold: c,
|
|
27
|
+
children: e ? /* @__PURE__ */ o(d, { style: { width: 70, marginBottom: 2 }, "data-testid": `${t}-skeletonLabel` }) : y
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ o(
|
|
31
|
+
m,
|
|
32
|
+
{
|
|
33
|
+
bold: !c,
|
|
34
|
+
color: (a == null ? void 0 : a.color) || "var(--gray-90)",
|
|
35
|
+
variant: a != null && a.variant || c ? "base" : "base-lg",
|
|
36
|
+
"data-testid": `${t}-value`,
|
|
37
|
+
children: e ? /* @__PURE__ */ o(d, { style: { width: 100 }, "data-testid": `${t}-skeletonValue` }) : i || "-"
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
] });
|
|
48
41
|
};
|
|
49
42
|
export {
|
|
50
|
-
|
|
43
|
+
T as TextDisplay
|
|
51
44
|
};
|