@pismo/marola 1.0.0-beta.8 → 1.0.0
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-DiLqcAJG.js → Button-BAljjMv3.js} +2 -2
- package/dist/{ClickAwayListener-BaJ-OV_7.js → ClickAwayListener-DbEYZpyh.js} +3 -3
- package/dist/Dialog.module-W7UCXlf3.js +29 -0
- package/dist/Group-DspH8hyO.js +30 -0
- package/dist/Popover.module-B4boCutS.js +10 -0
- package/dist/{Popup-lLWZt2wk.js → Popup-Ck3XlWMq.js} +3 -3
- package/dist/{Portal-B_Es6eUL.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-MfR7l8Wn.js +190 -0
- package/dist/assets/Advice.css +1 -1
- package/dist/assets/Alert.css +1 -0
- package/dist/assets/Autocomplete.css +1 -1
- package/dist/assets/Avatar.css +1 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Description.css +1 -0
- 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/RadioButton.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/Toggle.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/{combineHooksSlotProps-BtBYUV_B.js → combineHooksSlotProps-C-zYvfnF.js} +1 -1
- package/dist/components/Adornment/Adornment.d.ts +11 -2
- package/dist/components/Adornment/Adornment.js +6 -6
- 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/Alert/Alert.d.ts +11 -0
- package/dist/components/Alert/Alert.js +46 -0
- package/dist/components/Alert/Alert.stories.d.ts +24 -0
- package/dist/components/Alert/Alert.test.d.ts +1 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +12 -42
- package/dist/components/Autocomplete/Autocomplete.js +425 -435
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +3 -25
- package/dist/components/Avatar/Avatar.d.ts +15 -0
- package/dist/components/Avatar/Avatar.js +51 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +25 -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 -4
- package/dist/components/Chip/Chip.js +10 -6
- package/dist/components/Chip/Chip.stories.d.ts +5 -14
- package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +14 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialog.js +37 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +23 -0
- package/dist/components/ConfirmationDialog/ConfirmationModal.test.d.ts +1 -0
- package/dist/components/Description/Description.d.ts +21 -0
- package/dist/components/Description/Description.js +66 -0
- package/dist/components/Description/Description.stories.d.ts +22 -0
- package/dist/components/Description/Description.test.d.ts +1 -0
- 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 +16 -10
- package/dist/components/Dialog/Dialog.js +167 -167
- package/dist/components/Dialog/Dialog.stories.d.ts +74 -68
- package/dist/components/Dialog/DialogTitle.d.ts +5 -2
- package/dist/components/Dialog/DialogTitle.js +22 -16
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -0
- package/dist/components/Icon/Icon.js +331 -51
- 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 +514 -102
- 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/PageHeader/PageHeader.d.ts +6 -2
- package/dist/components/PageHeader/PageHeader.js +78 -71
- package/dist/components/PageHeader/PageHeader.stories.d.ts +3 -1
- package/dist/components/PageHeader/PageHeader.test.d.ts +1 -0
- package/dist/components/Pagination/Pagination.d.ts +5 -1
- package/dist/components/Pagination/Pagination.js +90 -91
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
- 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/RadioButton/RadioButton.d.ts +19 -0
- package/dist/components/RadioButton/RadioButton.js +37 -0
- package/dist/components/RadioButton/RadioButton.stories.d.ts +24 -0
- package/dist/components/RadioButton/RadioButton.test.d.ts +1 -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 +2 -2
- package/dist/components/RowItem/RowItem.js +9 -5
- 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 +22 -0
- package/dist/components/Select/Select.js +476 -414
- 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 +123 -138
- 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 +36 -35
- package/dist/components/Tabs/TabPanel.d.ts +4 -2
- package/dist/components/Tabs/TabPanel.js +48 -38
- package/dist/components/Tabs/Tabs.d.ts +6 -4
- package/dist/components/Tabs/Tabs.js +115 -112
- package/dist/components/TextDisplay/TextDisplay.d.ts +7 -3
- package/dist/components/TextDisplay/TextDisplay.js +44 -37
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +2 -1
- package/dist/components/Toggle/Toggle.js +55 -55
- 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 -4
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +2 -0
- 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 +1 -0
- package/dist/components/Typography/Typography.js +47 -47
- package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +2 -2
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +35 -30
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
- package/dist/{index-D3Wj0eid.js → index-bQFToy-I.js} +1 -1
- package/dist/main.d.ts +8 -0
- package/dist/main.js +95 -79
- package/dist/marola.css +1 -1
- package/dist/{ownerDocument-B61GUaFs.js → ownerDocument-YGhwAnr1.js} +1 -1
- package/dist/test-utils/assertStyles.d.ts +1 -1
- package/dist/{useButton-Bn3MNH8I.js → useButton-DcihopJG.js} +1 -1
- package/dist/{useList-BpJT77u3.js → useList-B9C55YB7.js} +2 -2
- package/dist/{useSlotProps-kRhf7Gil.js → useSlotProps-C_I1kEHr.js} +73 -72
- package/package.json +22 -13
- package/dist/Dialog.module-DFEmFdYT.js +0 -30
- package/dist/Group-B3p31ftp.js +0 -26
- package/dist/Input.module-iOYlI_1w.js +0 -405
- package/dist/SelectButton-K3OIfR5m.js +0 -61
- package/dist/Toggle-BSvvbKBp.js +0 -175
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx as T } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
|
-
import { forwardRef as q
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { a as
|
|
3
|
+
import { forwardRef as q } from "react";
|
|
4
|
+
import { c as B } from "../../clsx-DB4S2d7J.js";
|
|
5
|
+
import { T as G, u as J, s as Q } from "../../Tabs.module-BGGTkDc5.js";
|
|
6
|
+
import { Tab as Ie } from "./Tab.js";
|
|
7
|
+
import { TabPanel as Fe } from "./TabPanel.js";
|
|
8
|
+
import { g as I, a as _, b as C, _ as F, c as $, P as t, d as N, e as w } from "../../useSlotProps-C_I1kEHr.js";
|
|
9
|
+
import { a as M, C as O } from "../../useCompoundItem-B7Eo_qZk.js";
|
|
9
10
|
import { u as X } from "../../useControlled-CCMYYdCM.js";
|
|
10
|
-
import { L as Y, a as Z } from "../../combineHooksSlotProps-
|
|
11
|
-
import { l as ee, m as te, u as oe } from "../../useList-
|
|
11
|
+
import { L as Y, a as Z } from "../../combineHooksSlotProps-C-zYvfnF.js";
|
|
12
|
+
import { l as ee, m as te, u as oe } from "../../useList-B9C55YB7.js";
|
|
12
13
|
const k = "Tabs";
|
|
13
14
|
function se(s) {
|
|
14
15
|
return I(k, s);
|
|
@@ -18,21 +19,21 @@ function ne(s) {
|
|
|
18
19
|
const {
|
|
19
20
|
value: e,
|
|
20
21
|
defaultValue: o,
|
|
21
|
-
onChange:
|
|
22
|
-
orientation:
|
|
22
|
+
onChange: l,
|
|
23
|
+
orientation: a = "horizontal",
|
|
23
24
|
direction: c = "ltr",
|
|
24
|
-
selectionFollowsFocus:
|
|
25
|
-
} = s, [d,
|
|
25
|
+
selectionFollowsFocus: n = !1
|
|
26
|
+
} = s, [d, i] = X({
|
|
26
27
|
controlled: e,
|
|
27
28
|
default: o,
|
|
28
29
|
name: "Tabs",
|
|
29
30
|
state: "value"
|
|
30
|
-
}),
|
|
31
|
-
|
|
32
|
-
}, [
|
|
31
|
+
}), u = r.useCallback((x, y) => {
|
|
32
|
+
i(y), l == null || l(x, y);
|
|
33
|
+
}, [l, i]), {
|
|
33
34
|
subitems: m,
|
|
34
|
-
contextValue:
|
|
35
|
-
} =
|
|
35
|
+
contextValue: h
|
|
36
|
+
} = M(), p = r.useRef(() => {
|
|
36
37
|
}), f = r.useCallback((x) => {
|
|
37
38
|
var y;
|
|
38
39
|
return (y = m.get(x)) == null ? void 0 : y.id;
|
|
@@ -44,12 +45,12 @@ function ne(s) {
|
|
|
44
45
|
direction: c,
|
|
45
46
|
getTabId: b,
|
|
46
47
|
getTabPanelId: f,
|
|
47
|
-
onSelected:
|
|
48
|
-
orientation:
|
|
48
|
+
onSelected: u,
|
|
49
|
+
orientation: a,
|
|
49
50
|
registerTabIdLookup: P,
|
|
50
|
-
selectionFollowsFocus:
|
|
51
|
+
selectionFollowsFocus: n,
|
|
51
52
|
value: d
|
|
52
|
-
},
|
|
53
|
+
}, h)
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
56
|
function le(s) {
|
|
@@ -57,32 +58,32 @@ function le(s) {
|
|
|
57
58
|
value: e,
|
|
58
59
|
children: o
|
|
59
60
|
} = s, {
|
|
60
|
-
direction:
|
|
61
|
-
getItemIndex:
|
|
61
|
+
direction: l,
|
|
62
|
+
getItemIndex: a,
|
|
62
63
|
onSelected: c,
|
|
63
|
-
orientation:
|
|
64
|
+
orientation: n,
|
|
64
65
|
registerItem: d,
|
|
65
|
-
registerTabIdLookup:
|
|
66
|
-
selectionFollowsFocus:
|
|
66
|
+
registerTabIdLookup: i,
|
|
67
|
+
selectionFollowsFocus: u,
|
|
67
68
|
totalSubitemCount: m,
|
|
68
|
-
value:
|
|
69
|
+
value: h,
|
|
69
70
|
getTabId: p,
|
|
70
71
|
getTabPanelId: f
|
|
71
72
|
} = e, b = r.useMemo(() => ({
|
|
72
|
-
getItemIndex:
|
|
73
|
+
getItemIndex: a,
|
|
73
74
|
registerItem: d,
|
|
74
75
|
totalSubitemCount: m
|
|
75
|
-
}), [d,
|
|
76
|
-
direction:
|
|
76
|
+
}), [d, a, m]), P = r.useMemo(() => ({
|
|
77
|
+
direction: l,
|
|
77
78
|
getTabId: p,
|
|
78
79
|
getTabPanelId: f,
|
|
79
80
|
onSelected: c,
|
|
80
|
-
orientation:
|
|
81
|
-
registerTabIdLookup:
|
|
82
|
-
selectionFollowsFocus:
|
|
83
|
-
value:
|
|
84
|
-
}), [
|
|
85
|
-
return /* @__PURE__ */ T(
|
|
81
|
+
orientation: n,
|
|
82
|
+
registerTabIdLookup: i,
|
|
83
|
+
selectionFollowsFocus: u,
|
|
84
|
+
value: h
|
|
85
|
+
}), [l, p, f, c, n, i, u, h]);
|
|
86
|
+
return /* @__PURE__ */ T(O.Provider, {
|
|
86
87
|
value: b,
|
|
87
88
|
children: /* @__PURE__ */ T(G.Provider, {
|
|
88
89
|
value: P,
|
|
@@ -96,24 +97,24 @@ const re = ["children", "value", "defaultValue", "orientation", "direction", "on
|
|
|
96
97
|
} = s;
|
|
97
98
|
return N({
|
|
98
99
|
root: ["root", e]
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
var
|
|
100
|
+
}, w(se));
|
|
101
|
+
}, S = /* @__PURE__ */ r.forwardRef(function(e, o) {
|
|
102
|
+
var l;
|
|
102
103
|
const {
|
|
103
|
-
children:
|
|
104
|
+
children: a,
|
|
104
105
|
orientation: c = "horizontal",
|
|
105
|
-
direction:
|
|
106
|
+
direction: n = "ltr",
|
|
106
107
|
slotProps: d = {},
|
|
107
|
-
slots:
|
|
108
|
-
} = e,
|
|
108
|
+
slots: i = {}
|
|
109
|
+
} = e, u = F(e, re), m = C({}, e, {
|
|
109
110
|
orientation: c,
|
|
110
|
-
direction:
|
|
111
|
+
direction: n
|
|
111
112
|
}), {
|
|
112
|
-
contextValue:
|
|
113
|
-
} = ne(m), p = ae(m), f = (
|
|
113
|
+
contextValue: h
|
|
114
|
+
} = ne(m), p = ae(m), f = (l = i.root) != null ? l : "div", b = $({
|
|
114
115
|
elementType: f,
|
|
115
116
|
externalSlotProps: d.root,
|
|
116
|
-
externalForwardedProps:
|
|
117
|
+
externalForwardedProps: u,
|
|
117
118
|
additionalProps: {
|
|
118
119
|
ref: o
|
|
119
120
|
},
|
|
@@ -122,12 +123,12 @@ const re = ["children", "value", "defaultValue", "orientation", "direction", "on
|
|
|
122
123
|
});
|
|
123
124
|
return /* @__PURE__ */ T(f, C({}, b, {
|
|
124
125
|
children: /* @__PURE__ */ T(le, {
|
|
125
|
-
value:
|
|
126
|
-
children:
|
|
126
|
+
value: h,
|
|
127
|
+
children: a
|
|
127
128
|
})
|
|
128
129
|
}));
|
|
129
130
|
});
|
|
130
|
-
process.env.NODE_ENV !== "production" && (
|
|
131
|
+
process.env.NODE_ENV !== "production" && (S.propTypes = {
|
|
131
132
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
132
133
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
133
134
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -199,7 +200,7 @@ function ue(s, e) {
|
|
|
199
200
|
});
|
|
200
201
|
const o = ee(s, e), {
|
|
201
202
|
context: {
|
|
202
|
-
selectionFollowsFocus:
|
|
203
|
+
selectionFollowsFocus: l
|
|
203
204
|
}
|
|
204
205
|
} = e;
|
|
205
206
|
if (e.type === Y.itemsChange) {
|
|
@@ -209,7 +210,7 @@ function ue(s, e) {
|
|
|
209
210
|
});
|
|
210
211
|
te(null, "reset", e.context);
|
|
211
212
|
}
|
|
212
|
-
return
|
|
213
|
+
return l && o.highlightedValue != null ? C({}, o, {
|
|
213
214
|
selectedValues: [o.highlightedValue]
|
|
214
215
|
}) : o;
|
|
215
216
|
}
|
|
@@ -218,37 +219,37 @@ function ce(s) {
|
|
|
218
219
|
const {
|
|
219
220
|
rootRef: o
|
|
220
221
|
} = s, {
|
|
221
|
-
direction:
|
|
222
|
-
onSelected:
|
|
222
|
+
direction: l = "ltr",
|
|
223
|
+
onSelected: a,
|
|
223
224
|
orientation: c = "horizontal",
|
|
224
|
-
value:
|
|
225
|
+
value: n,
|
|
225
226
|
registerTabIdLookup: d,
|
|
226
|
-
selectionFollowsFocus:
|
|
227
|
+
selectionFollowsFocus: i
|
|
227
228
|
} = J(), {
|
|
228
|
-
subitems:
|
|
229
|
+
subitems: u,
|
|
229
230
|
contextValue: m
|
|
230
|
-
} =
|
|
231
|
+
} = M(), h = r.useCallback((g) => {
|
|
231
232
|
var v;
|
|
232
|
-
return (v =
|
|
233
|
-
}, [
|
|
234
|
-
d(
|
|
235
|
-
const p = r.useMemo(() => Array.from(
|
|
233
|
+
return (v = u.get(g)) == null ? void 0 : v.id;
|
|
234
|
+
}, [u]);
|
|
235
|
+
d(h);
|
|
236
|
+
const p = r.useMemo(() => Array.from(u.keys()), [u]), f = r.useCallback((g) => {
|
|
236
237
|
var v, V;
|
|
237
|
-
return
|
|
238
|
-
}, [
|
|
238
|
+
return g == null ? null : (v = (V = u.get(g)) == null ? void 0 : V.ref.current) != null ? v : null;
|
|
239
|
+
}, [u]), b = l === "rtl";
|
|
239
240
|
let P;
|
|
240
241
|
c === "vertical" ? P = "vertical" : P = b ? "horizontal-rtl" : "horizontal-ltr";
|
|
241
|
-
const x = r.useCallback((
|
|
242
|
+
const x = r.useCallback((g, v) => {
|
|
242
243
|
var V;
|
|
243
|
-
|
|
244
|
-
}, [
|
|
245
|
-
selectedValues: [
|
|
244
|
+
a(g, (V = v[0]) != null ? V : null);
|
|
245
|
+
}, [a]), y = r.useMemo(() => n === void 0 ? {} : n != null ? {
|
|
246
|
+
selectedValues: [n]
|
|
246
247
|
} : {
|
|
247
248
|
selectedValues: []
|
|
248
|
-
}, [
|
|
249
|
+
}, [n]), U = r.useCallback((g) => {
|
|
249
250
|
var v, V;
|
|
250
|
-
return (v = (V =
|
|
251
|
-
}, [
|
|
251
|
+
return (v = (V = u.get(g)) == null ? void 0 : V.disabled) != null ? v : !1;
|
|
252
|
+
}, [u]), {
|
|
252
253
|
contextValue: L,
|
|
253
254
|
dispatch: R,
|
|
254
255
|
getRootProps: D,
|
|
@@ -259,7 +260,7 @@ function ce(s) {
|
|
|
259
260
|
rootRef: K
|
|
260
261
|
} = oe({
|
|
261
262
|
controlledProps: y,
|
|
262
|
-
disabledItemsFocusable: !
|
|
263
|
+
disabledItemsFocusable: !i,
|
|
263
264
|
focusManagement: "DOM",
|
|
264
265
|
getItemDomElement: f,
|
|
265
266
|
isItemDisabled: U,
|
|
@@ -268,18 +269,18 @@ function ce(s) {
|
|
|
268
269
|
onChange: x,
|
|
269
270
|
orientation: P,
|
|
270
271
|
reducerActionContext: r.useMemo(() => ({
|
|
271
|
-
selectionFollowsFocus:
|
|
272
|
-
}), [
|
|
272
|
+
selectionFollowsFocus: i || !1
|
|
273
|
+
}), [i]),
|
|
273
274
|
selectionMode: "single",
|
|
274
275
|
stateReducer: ue
|
|
275
276
|
});
|
|
276
277
|
r.useEffect(() => {
|
|
277
|
-
|
|
278
|
+
n !== void 0 && n != null && R({
|
|
278
279
|
type: z.valueChange,
|
|
279
|
-
value:
|
|
280
|
+
value: n
|
|
280
281
|
});
|
|
281
|
-
}, [R,
|
|
282
|
-
const W = (
|
|
282
|
+
}, [R, n]);
|
|
283
|
+
const W = (g = {}) => C({}, g, D(g), {
|
|
283
284
|
"aria-orientation": c === "vertical" ? "vertical" : void 0,
|
|
284
285
|
role: "tablist"
|
|
285
286
|
});
|
|
@@ -299,24 +300,24 @@ function de(s) {
|
|
|
299
300
|
value: e,
|
|
300
301
|
children: o
|
|
301
302
|
} = s, {
|
|
302
|
-
dispatch:
|
|
303
|
-
getItemIndex:
|
|
303
|
+
dispatch: l,
|
|
304
|
+
getItemIndex: a,
|
|
304
305
|
getItemState: c,
|
|
305
|
-
registerItem:
|
|
306
|
+
registerItem: n,
|
|
306
307
|
totalSubitemCount: d
|
|
307
|
-
} = e,
|
|
308
|
-
dispatch:
|
|
308
|
+
} = e, i = r.useMemo(() => ({
|
|
309
|
+
dispatch: l,
|
|
309
310
|
getItemState: c,
|
|
310
|
-
getItemIndex:
|
|
311
|
-
}), [
|
|
312
|
-
getItemIndex:
|
|
313
|
-
registerItem:
|
|
311
|
+
getItemIndex: a
|
|
312
|
+
}), [l, a, c]), u = r.useMemo(() => ({
|
|
313
|
+
getItemIndex: a,
|
|
314
|
+
registerItem: n,
|
|
314
315
|
totalSubitemCount: d
|
|
315
|
-
}), [
|
|
316
|
-
return /* @__PURE__ */ T(
|
|
317
|
-
value:
|
|
316
|
+
}), [n, a, d]);
|
|
317
|
+
return /* @__PURE__ */ T(O.Provider, {
|
|
318
|
+
value: u,
|
|
318
319
|
children: /* @__PURE__ */ T(Z.Provider, {
|
|
319
|
-
value:
|
|
320
|
+
value: i,
|
|
320
321
|
children: o
|
|
321
322
|
})
|
|
322
323
|
});
|
|
@@ -327,24 +328,24 @@ const me = ["children", "slotProps", "slots"], pe = (s) => {
|
|
|
327
328
|
} = s;
|
|
328
329
|
return N({
|
|
329
330
|
root: ["root", e]
|
|
330
|
-
},
|
|
331
|
+
}, w(ie));
|
|
331
332
|
}, A = /* @__PURE__ */ r.forwardRef(function(e, o) {
|
|
332
|
-
var
|
|
333
|
+
var l;
|
|
333
334
|
const {
|
|
334
|
-
children:
|
|
335
|
+
children: a,
|
|
335
336
|
slotProps: c = {},
|
|
336
|
-
slots:
|
|
337
|
+
slots: n = {}
|
|
337
338
|
} = e, d = F(e, me), {
|
|
338
|
-
isRtl:
|
|
339
|
-
orientation:
|
|
339
|
+
isRtl: i,
|
|
340
|
+
orientation: u,
|
|
340
341
|
getRootProps: m,
|
|
341
|
-
contextValue:
|
|
342
|
+
contextValue: h
|
|
342
343
|
} = ce({
|
|
343
344
|
rootRef: o
|
|
344
345
|
}), p = C({}, e, {
|
|
345
|
-
isRtl:
|
|
346
|
-
orientation:
|
|
347
|
-
}), f = pe(p), b = (
|
|
346
|
+
isRtl: i,
|
|
347
|
+
orientation: u
|
|
348
|
+
}), f = pe(p), b = (l = n.root) != null ? l : "div", P = $({
|
|
348
349
|
elementType: b,
|
|
349
350
|
getSlotProps: m,
|
|
350
351
|
externalSlotProps: c.root,
|
|
@@ -353,9 +354,9 @@ const me = ["children", "slotProps", "slots"], pe = (s) => {
|
|
|
353
354
|
className: f.root
|
|
354
355
|
});
|
|
355
356
|
return /* @__PURE__ */ T(de, {
|
|
356
|
-
value:
|
|
357
|
+
value: h,
|
|
357
358
|
children: /* @__PURE__ */ T(b, C({}, P, {
|
|
358
|
-
children:
|
|
359
|
+
children: a
|
|
359
360
|
}))
|
|
360
361
|
});
|
|
361
362
|
});
|
|
@@ -388,14 +389,16 @@ process.env.NODE_ENV !== "production" && (A.propTypes = {
|
|
|
388
389
|
root: t.elementType
|
|
389
390
|
})
|
|
390
391
|
});
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
});
|
|
392
|
+
const ye = q(
|
|
393
|
+
({ value: s, className: e, "data-testid": o, children: l, onChange: a }, c) => {
|
|
394
|
+
const n = (d, i) => {
|
|
395
|
+
a && a(i, d);
|
|
396
|
+
};
|
|
397
|
+
return /* @__PURE__ */ T(S, { "data-testid": o, value: s, onChange: (d, i) => n(d, i), ref: c, children: /* @__PURE__ */ T(A, { className: B(Q.tabs, e), children: l }) });
|
|
398
|
+
}
|
|
399
|
+
);
|
|
397
400
|
export {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
+
Ie as Tab,
|
|
402
|
+
Fe as TabPanel,
|
|
403
|
+
ye as Tabs
|
|
401
404
|
};
|
|
@@ -2,8 +2,12 @@ import { VariantType } from '../Typography/Typography.tsx';
|
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
|
|
4
4
|
type OptionsProps = {
|
|
5
|
+
/** Text variant */
|
|
5
6
|
variant?: VariantType;
|
|
7
|
+
/** Text color */
|
|
6
8
|
color?: string;
|
|
9
|
+
/** Text weight */
|
|
10
|
+
bold?: boolean;
|
|
7
11
|
};
|
|
8
12
|
export interface TextDisplayProps {
|
|
9
13
|
/** TextDisplay label */
|
|
@@ -12,8 +16,8 @@ export interface TextDisplayProps {
|
|
|
12
16
|
value: React.ReactNode;
|
|
13
17
|
/** Renders skeleton when true */
|
|
14
18
|
isLoading?: boolean;
|
|
15
|
-
/** Sets the
|
|
16
|
-
|
|
19
|
+
/** Sets the data-testid prefix for label, value and skeletons */
|
|
20
|
+
'data-testid'?: string;
|
|
17
21
|
/** Sets the label options */
|
|
18
22
|
labelOptions?: OptionsProps;
|
|
19
23
|
/** Sets the value options */
|
|
@@ -21,5 +25,5 @@ export interface TextDisplayProps {
|
|
|
21
25
|
/** Sets the label and value onto the same line */
|
|
22
26
|
inline?: boolean;
|
|
23
27
|
}
|
|
24
|
-
export declare const TextDisplay: ({ label, value, isLoading,
|
|
28
|
+
export declare const TextDisplay: ({ label, value, isLoading, "data-testid": dataTestId, labelOptions, valueOptions, inline, }: TextDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
29
|
export {};
|
|
@@ -1,44 +1,51 @@
|
|
|
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 f, jsx as d } from "react/jsx-runtime";
|
|
3
|
+
import { c as $ } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import { Skeleton as m } from "../Skeleton/Skeleton.js";
|
|
5
|
+
import { Typography as y } from "../Typography/Typography.js";
|
|
6
|
+
const g = "_container_ia8vu_1", e = {
|
|
7
|
+
container: g,
|
|
8
8
|
"container--inline": "_container--inline_ia8vu_5"
|
|
9
|
-
},
|
|
10
|
-
label:
|
|
11
|
-
value:
|
|
12
|
-
isLoading:
|
|
13
|
-
|
|
9
|
+
}, i = ({
|
|
10
|
+
label: h,
|
|
11
|
+
value: x,
|
|
12
|
+
isLoading: o = !1,
|
|
13
|
+
"data-testid": t = "TextDisplay",
|
|
14
14
|
labelOptions: r,
|
|
15
|
-
valueOptions:
|
|
16
|
-
inline:
|
|
15
|
+
valueOptions: c,
|
|
16
|
+
inline: a
|
|
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
|
-
|
|
18
|
+
const _ = (r == null ? void 0 : r.color) || (a ? "var(--black-100)" : "var(--gray-90)");
|
|
19
|
+
return /* @__PURE__ */ f(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: $([e.container, { [e["container--inline"]]: a }]),
|
|
23
|
+
"data-testid": `${t}-container`,
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ d(
|
|
26
|
+
y,
|
|
27
|
+
{
|
|
28
|
+
color: _,
|
|
29
|
+
variant: (r == null ? void 0 : r.variant) || "base",
|
|
30
|
+
"data-testid": `${t}-label`,
|
|
31
|
+
bold: (r == null ? void 0 : r.bold) ?? a,
|
|
32
|
+
children: o ? /* @__PURE__ */ d(m, { style: { width: 70, marginBottom: 2 }, "data-testid": `${t}-skeletonLabel` }) : h
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ d(
|
|
36
|
+
y,
|
|
37
|
+
{
|
|
38
|
+
bold: (c == null ? void 0 : c.bold) ?? !a,
|
|
39
|
+
color: (c == null ? void 0 : c.color) || "var(--gray-90)",
|
|
40
|
+
variant: (c == null ? void 0 : c.variant) || (a ? "base" : "base-lg"),
|
|
41
|
+
"data-testid": `${t}-value`,
|
|
42
|
+
children: o ? /* @__PURE__ */ d(m, { style: { width: 100 }, "data-testid": `${t}-skeletonValue` }) : x || "-"
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
41
48
|
};
|
|
42
49
|
export {
|
|
43
|
-
|
|
50
|
+
i as TextDisplay
|
|
44
51
|
};
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ label, value, isLoading,
|
|
5
|
+
component: ({ label, value, isLoading, "data-testid": dataTestId, labelOptions, valueOptions, inline, }: import('./TextDisplay').TextDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
};
|
|
8
8
|
export default meta;
|
|
@@ -11,3 +11,4 @@ export declare const Simple: Story;
|
|
|
11
11
|
export declare const WithLoading: Story;
|
|
12
12
|
export declare const Size: Story;
|
|
13
13
|
export declare const Color: Story;
|
|
14
|
+
export declare const Horizontal: Story;
|