@pismo/marola 0.0.1-alpha.17 → 0.0.1-alpha.19
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-CSuug0jG.js → Button-2b1peDFT.js} +25 -26
- package/dist/{ClickAwayListener-hSFuUJnv.js → ClickAwayListener-BSW-Nd-y.js} +3 -3
- package/dist/{Popup-DwaWJ3ye.js → Popup-B6ZSGIEI.js} +12 -13
- package/dist/{Portal-CGBQMhI6.js → Portal-DIeBsWdL.js} +2 -2
- package/dist/{SelectButton-DWZ2BRaX.js → SelectButton-pciwIWcj.js} +24 -22
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/SelectButton.css +1 -1
- package/dist/assets/TextDisplay.css +1 -0
- package/dist/{combineHooksSlotProps-D8j4htsd.js → combineHooksSlotProps-DVjg9PRh.js} +18 -19
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +31 -0
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.js +15 -16
- package/dist/components/Dialog/Dialog.stories.d.ts +3 -3
- package/dist/components/Icon/Icon.d.ts +10 -1
- package/dist/components/Icon/Icon.js +39 -25
- package/dist/components/Icon/Icon.stories.d.ts +16 -0
- package/dist/components/IconButton/Icon.stories.d.ts +15 -0
- package/dist/components/IconButton/IconButton.d.ts +14 -0
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.js +25 -26
- package/dist/components/Pagination/Pagination.d.ts +24 -5
- package/dist/components/Pagination/Pagination.js +119 -116
- package/dist/components/Pagination/Pagination.stories.d.ts +17 -0
- package/dist/components/Select/Select.js +138 -139
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +10 -3
- package/dist/components/Skeleton/Skeleton.js +12 -15
- package/dist/components/Skeleton/Skeleton.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +16 -0
- package/dist/components/Snackbar/Snackbar.js +6 -7
- package/dist/components/Snackbar/Snackbar.stories.d.ts +3 -3
- package/dist/components/SortTooltip/SortTooltip.d.ts +3 -1
- package/dist/components/SortTooltip/SortTooltip.js +27 -16
- package/dist/components/Stepper/Stepper.d.ts +11 -1
- package/dist/components/Stepper/Stepper.stories.d.ts +16 -0
- package/dist/components/Table/Table.js +38 -40
- package/dist/components/Tabs/Tab.d.ts +5 -0
- package/dist/components/Tabs/Tab.js +9 -10
- package/dist/components/Tabs/Tab.stories.d.ts +15 -0
- package/dist/components/Tabs/TabPanel.d.ts +4 -0
- package/dist/components/Tabs/TabPanel.js +13 -14
- package/dist/components/Tabs/TabPanel.stories.d.ts +14 -0
- package/dist/components/Tabs/Tabs.d.ts +5 -1
- package/dist/components/Tabs/Tabs.js +36 -37
- package/dist/components/Tabs/Tabs.stories.d.ts +14 -0
- package/dist/components/TextDisplay/TextDisplay.d.ts +23 -0
- package/dist/components/TextDisplay/TextDisplay.js +37 -0
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +13 -0
- package/dist/components/TextDisplay/textDisplay.test.d.ts +1 -0
- package/dist/components/Toggle/Toggle.js +7 -8
- package/dist/components/Tooltip/Tooltip.d.ts +18 -6
- package/dist/components/Tooltip/Tooltip.js +104 -92
- package/dist/components/Tooltip/Tooltip.stories.d.ts +33 -0
- package/dist/components/Typography/Typography.d.ts +2 -0
- package/dist/components/Typography/Typography.js +40 -29
- package/dist/components/Typography/Typography.stories.d.ts +1 -0
- package/dist/{index-CtPvew6C.js → index-CH45lKw7.js} +310 -287
- package/dist/{index-BfeM9yWx.js → index-CjW42-M-.js} +5 -6
- package/dist/main.d.ts +1 -0
- package/dist/main.js +28 -26
- package/dist/{useButton-DSAvAfH_.js → useButton-DNk3wrQp.js} +3 -4
- package/dist/{useEventCallback-lXNMsMLa.js → useEventCallback-xTG9piMa.js} +1 -1
- package/dist/{useList-C5PBIv2I.js → useList-B0hog_3-.js} +48 -49
- package/package.json +1 -1
- package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +0 -26
|
@@ -1,15 +1,14 @@
|
|
|
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
4
|
import { u as y, s as x } from "../../Tabs.module-jkH1Qjn7.js";
|
|
5
|
-
import { a as b, _ as
|
|
6
|
-
import { g as N, a as _, u as w, b as O, P as o, c as E, d as I } from "../../index-CtPvew6C.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";
|
|
7
6
|
import { u as S, a as U } from "../../useCompoundItem-D1iRfg8D.js";
|
|
8
7
|
const h = "TabPanel";
|
|
9
8
|
function j(t) {
|
|
10
|
-
return
|
|
9
|
+
return C(h, t);
|
|
11
10
|
}
|
|
12
|
-
|
|
11
|
+
N(h, ["root", "hidden"]);
|
|
13
12
|
function M(t) {
|
|
14
13
|
return t.size;
|
|
15
14
|
}
|
|
@@ -23,13 +22,13 @@ function V(t) {
|
|
|
23
22
|
throw new Error("No TabContext provided");
|
|
24
23
|
const {
|
|
25
24
|
value: f,
|
|
26
|
-
getTabId:
|
|
27
|
-
} = i, a = S(s), r =
|
|
25
|
+
getTabId: P
|
|
26
|
+
} = i, a = S(s), r = m.useRef(null), c = _(r, n), u = m.useMemo(() => ({
|
|
28
27
|
id: a,
|
|
29
28
|
ref: r
|
|
30
29
|
}), [a]), {
|
|
31
30
|
id: l
|
|
32
|
-
} = U(e ?? M, u), d = l !== f, p = l !== void 0 ?
|
|
31
|
+
} = U(e ?? M, u), d = l !== f, p = l !== void 0 ? P(l) : void 0;
|
|
33
32
|
return {
|
|
34
33
|
hidden: d,
|
|
35
34
|
getRootProps: (g = {}) => b({
|
|
@@ -49,18 +48,18 @@ const F = ["children", "value", "slotProps", "slots"], $ = (t) => {
|
|
|
49
48
|
return E({
|
|
50
49
|
root: ["root", e && "hidden"]
|
|
51
50
|
}, I(j));
|
|
52
|
-
}, R = /* @__PURE__ */
|
|
51
|
+
}, R = /* @__PURE__ */ m.forwardRef(function(e, s) {
|
|
53
52
|
var n;
|
|
54
53
|
const {
|
|
55
54
|
children: i,
|
|
56
55
|
slotProps: f = {},
|
|
57
|
-
slots:
|
|
58
|
-
} = e, a =
|
|
56
|
+
slots: P = {}
|
|
57
|
+
} = e, a = w(e, F), {
|
|
59
58
|
hidden: r,
|
|
60
59
|
getRootProps: c
|
|
61
60
|
} = V(e), u = b({}, e, {
|
|
62
61
|
hidden: r
|
|
63
|
-
}), l = $(u), d = (n =
|
|
62
|
+
}), l = $(u), d = (n = P.root) != null ? n : "div", p = O({
|
|
64
63
|
elementType: d,
|
|
65
64
|
getSlotProps: c,
|
|
66
65
|
externalSlotProps: f.root,
|
|
@@ -111,9 +110,9 @@ process.env.NODE_ENV !== "production" && (R.propTypes = {
|
|
|
111
110
|
*/
|
|
112
111
|
value: o.oneOfType([o.number, o.string])
|
|
113
112
|
});
|
|
114
|
-
const
|
|
113
|
+
const W = v(
|
|
115
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 })
|
|
116
115
|
);
|
|
117
116
|
export {
|
|
118
|
-
|
|
117
|
+
W as TabPanel
|
|
119
118
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TabPanelProps } from './Tabs.tsx';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import('react').ForwardRefExoticComponent<TabPanelProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Simple: Story;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
export interface TabsProps {
|
|
4
|
+
/** Should contain `Tab` and `TabPanel` components to be rendered */
|
|
4
5
|
children?: ReactNode;
|
|
6
|
+
/** Selected tab */
|
|
5
7
|
value?: number | string;
|
|
6
|
-
|
|
8
|
+
/** Callback triggered when the user has selected a tab */
|
|
7
9
|
onChange?: (tabValue: number | string | null, event?: React.SyntheticEvent<Element, Event> | null) => void;
|
|
10
|
+
/** Test id */
|
|
11
|
+
dataTestId?: string;
|
|
8
12
|
}
|
|
9
13
|
export declare const Tabs: import('react').ForwardRefExoticComponent<TabsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
14
|
export * from './Tab';
|
|
@@ -2,19 +2,18 @@ import { jsx as T } from "react/jsx-runtime";
|
|
|
2
2
|
import * as r from "react";
|
|
3
3
|
import { forwardRef as q, useState as B } from "react";
|
|
4
4
|
import { T as G, u as J, s as Q } from "../../Tabs.module-jkH1Qjn7.js";
|
|
5
|
-
import { Tab as
|
|
6
|
-
import { TabPanel as
|
|
7
|
-
import { a as C, _ as
|
|
8
|
-
import { g as _, a as F, b as $, P as t, c as N, d as M } from "../../index-CtPvew6C.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";
|
|
9
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
|
-
return
|
|
14
|
+
return I(k, s);
|
|
16
15
|
}
|
|
17
|
-
|
|
16
|
+
_(k, ["root", "horizontal", "vertical"]);
|
|
18
17
|
function ne(s) {
|
|
19
18
|
const {
|
|
20
19
|
value: e,
|
|
@@ -34,17 +33,17 @@ function ne(s) {
|
|
|
34
33
|
subitems: m,
|
|
35
34
|
contextValue: g
|
|
36
35
|
} = O(), p = r.useRef(() => {
|
|
37
|
-
}),
|
|
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:
|
|
45
|
+
getTabId: f,
|
|
46
|
+
getTabPanelId: b,
|
|
48
47
|
onSelected: a,
|
|
49
48
|
orientation: i,
|
|
50
49
|
registerTabIdLookup: P,
|
|
@@ -68,23 +67,23 @@ function le(s) {
|
|
|
68
67
|
totalSubitemCount: m,
|
|
69
68
|
value: g,
|
|
70
69
|
getTabId: p,
|
|
71
|
-
getTabPanelId:
|
|
72
|
-
} = e,
|
|
70
|
+
getTabPanelId: b
|
|
71
|
+
} = e, f = r.useMemo(() => ({
|
|
73
72
|
getItemIndex: i,
|
|
74
73
|
registerItem: d,
|
|
75
74
|
totalSubitemCount: m
|
|
76
75
|
}), [d, i, m]), P = r.useMemo(() => ({
|
|
77
76
|
direction: n,
|
|
78
77
|
getTabId: p,
|
|
79
|
-
getTabPanelId:
|
|
78
|
+
getTabPanelId: b,
|
|
80
79
|
onSelected: c,
|
|
81
80
|
orientation: l,
|
|
82
81
|
registerTabIdLookup: u,
|
|
83
82
|
selectionFollowsFocus: a,
|
|
84
83
|
value: g
|
|
85
|
-
}), [n, p,
|
|
84
|
+
}), [n, p, b, c, l, u, a, g]);
|
|
86
85
|
return /* @__PURE__ */ T(S.Provider, {
|
|
87
|
-
value:
|
|
86
|
+
value: f,
|
|
88
87
|
children: /* @__PURE__ */ T(G.Provider, {
|
|
89
88
|
value: P,
|
|
90
89
|
children: o
|
|
@@ -106,13 +105,13 @@ const re = ["children", "value", "defaultValue", "orientation", "direction", "on
|
|
|
106
105
|
direction: l = "ltr",
|
|
107
106
|
slotProps: d = {},
|
|
108
107
|
slots: u = {}
|
|
109
|
-
} = e, a =
|
|
108
|
+
} = e, a = F(e, re), m = C({}, e, {
|
|
110
109
|
orientation: c,
|
|
111
110
|
direction: l
|
|
112
111
|
}), {
|
|
113
112
|
contextValue: g
|
|
114
|
-
} = ne(m), p = ae(m),
|
|
115
|
-
elementType:
|
|
113
|
+
} = ne(m), p = ae(m), b = (n = u.root) != null ? n : "div", f = $({
|
|
114
|
+
elementType: b,
|
|
116
115
|
externalSlotProps: d.root,
|
|
117
116
|
externalForwardedProps: a,
|
|
118
117
|
additionalProps: {
|
|
@@ -121,7 +120,7 @@ const re = ["children", "value", "defaultValue", "orientation", "direction", "on
|
|
|
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
125
|
value: g,
|
|
127
126
|
children: i
|
|
@@ -187,9 +186,9 @@ process.env.NODE_ENV !== "production" && (w.propTypes = {
|
|
|
187
186
|
});
|
|
188
187
|
const E = "TabsList";
|
|
189
188
|
function ie(s) {
|
|
190
|
-
return
|
|
189
|
+
return I(E, s);
|
|
191
190
|
}
|
|
192
|
-
|
|
191
|
+
_(E, ["root", "horizontal", "vertical"]);
|
|
193
192
|
const z = {
|
|
194
193
|
valueChange: "valueChange"
|
|
195
194
|
};
|
|
@@ -233,12 +232,12 @@ function ce(s) {
|
|
|
233
232
|
return (v = a.get(h)) == null ? void 0 : v.id;
|
|
234
233
|
}, [a]);
|
|
235
234
|
d(g);
|
|
236
|
-
const p = r.useMemo(() => Array.from(a.keys()), [a]),
|
|
235
|
+
const p = r.useMemo(() => Array.from(a.keys()), [a]), b = r.useCallback((h) => {
|
|
237
236
|
var v, V;
|
|
238
237
|
return h == null ? null : (v = (V = a.get(h)) == null ? void 0 : V.ref.current) != null ? v : null;
|
|
239
|
-
}, [a]),
|
|
238
|
+
}, [a]), f = n === "rtl";
|
|
240
239
|
let P;
|
|
241
|
-
c === "vertical" ? P = "vertical" : P =
|
|
240
|
+
c === "vertical" ? P = "vertical" : P = f ? "horizontal-rtl" : "horizontal-ltr";
|
|
242
241
|
const x = r.useCallback((h, v) => {
|
|
243
242
|
var V;
|
|
244
243
|
i(h, (V = v[0]) != null ? V : null);
|
|
@@ -262,7 +261,7 @@ function ce(s) {
|
|
|
262
261
|
controlledProps: y,
|
|
263
262
|
disabledItemsFocusable: !u,
|
|
264
263
|
focusManagement: "DOM",
|
|
265
|
-
getItemDomElement:
|
|
264
|
+
getItemDomElement: b,
|
|
266
265
|
isItemDisabled: U,
|
|
267
266
|
items: p,
|
|
268
267
|
rootRef: o,
|
|
@@ -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
|
|
@@ -335,7 +334,7 @@ const me = ["children", "slotProps", "slots"], pe = (s) => {
|
|
|
335
334
|
children: i,
|
|
336
335
|
slotProps: c = {},
|
|
337
336
|
slots: l = {}
|
|
338
|
-
} = e, d =
|
|
337
|
+
} = e, d = F(e, me), {
|
|
339
338
|
isRtl: u,
|
|
340
339
|
orientation: a,
|
|
341
340
|
getRootProps: m,
|
|
@@ -345,17 +344,17 @@ const me = ["children", "slotProps", "slots"], pe = (s) => {
|
|
|
345
344
|
}), p = C({}, e, {
|
|
346
345
|
isRtl: u,
|
|
347
346
|
orientation: a
|
|
348
|
-
}),
|
|
349
|
-
elementType:
|
|
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
356
|
value: g,
|
|
358
|
-
children: /* @__PURE__ */ T(
|
|
357
|
+
children: /* @__PURE__ */ T(f, C({}, P, {
|
|
359
358
|
children: i
|
|
360
359
|
}))
|
|
361
360
|
});
|
|
@@ -389,14 +388,14 @@ process.env.NODE_ENV !== "production" && (A.propTypes = {
|
|
|
389
388
|
root: t.elementType
|
|
390
389
|
})
|
|
391
390
|
});
|
|
392
|
-
const
|
|
391
|
+
const Ve = q(({ children: s, onChange: e, dataTestId: o }, n) => {
|
|
393
392
|
const [i, c] = B("1");
|
|
394
393
|
return /* @__PURE__ */ T(w, { "data-testid": o, value: i, onChange: (d, u) => {
|
|
395
394
|
c(u), e && e(u, d);
|
|
396
395
|
}, ref: n, children: /* @__PURE__ */ T(A, { className: Q.tabs, children: s }) });
|
|
397
396
|
});
|
|
398
397
|
export {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
398
|
+
Le as Tab,
|
|
399
|
+
_e as TabPanel,
|
|
400
|
+
Ve as Tabs
|
|
402
401
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TabsProps } from './Tabs.tsx';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import('react').ForwardRefExoticComponent<TabsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Simple: Story;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { VariantType } from '../Typography/Typography.tsx';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
type OptionsProps = {
|
|
5
|
+
variant?: VariantType;
|
|
6
|
+
color?: string;
|
|
7
|
+
};
|
|
8
|
+
export interface TextDisplayProps {
|
|
9
|
+
/** TextDisplay label */
|
|
10
|
+
label: React.ReactNode;
|
|
11
|
+
/** TextDisplay value */
|
|
12
|
+
value: React.ReactNode;
|
|
13
|
+
/** Renders skeleton when true */
|
|
14
|
+
isLoading?: boolean;
|
|
15
|
+
/** Sets the testId prefix for label, value and skeletons */
|
|
16
|
+
testId?: string;
|
|
17
|
+
/** Sets the label options */
|
|
18
|
+
labelOptions?: OptionsProps;
|
|
19
|
+
/** Sets the value options */
|
|
20
|
+
valueOptions?: OptionsProps;
|
|
21
|
+
}
|
|
22
|
+
export declare const TextDisplay: ({ label, value, isLoading, testId, labelOptions, valueOptions, }: TextDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import '../../assets/TextDisplay.css';
|
|
2
|
+
import { jsxs as h, jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import { Skeleton as o } from "../Skeleton/Skeleton.js";
|
|
4
|
+
import { Typography as y } from "../Typography/Typography.js";
|
|
5
|
+
const x = "_container_13z5o_1", f = {
|
|
6
|
+
container: x
|
|
7
|
+
}, g = ({
|
|
8
|
+
label: e,
|
|
9
|
+
value: m,
|
|
10
|
+
isLoading: d = !1,
|
|
11
|
+
testId: t = "TextDisplay",
|
|
12
|
+
labelOptions: r,
|
|
13
|
+
valueOptions: a
|
|
14
|
+
}) => /* @__PURE__ */ h("div", { className: f.container, children: [
|
|
15
|
+
/* @__PURE__ */ c(
|
|
16
|
+
y,
|
|
17
|
+
{
|
|
18
|
+
color: (r == null ? void 0 : r.color) || "var(--gray-90)",
|
|
19
|
+
variant: (r == null ? void 0 : r.variant) || "body-small",
|
|
20
|
+
"data-testid": `${t}-label`,
|
|
21
|
+
children: d ? /* @__PURE__ */ c(o, { style: { width: 70, marginBottom: 2 }, "data-testid": `${t}-skeletonLabel` }) : e
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
/* @__PURE__ */ c(
|
|
25
|
+
y,
|
|
26
|
+
{
|
|
27
|
+
bold: !0,
|
|
28
|
+
color: (a == null ? void 0 : a.color) || "var(--gray-90)",
|
|
29
|
+
variant: (a == null ? void 0 : a.variant) || "body",
|
|
30
|
+
"data-testid": `${t}-value`,
|
|
31
|
+
children: d ? /* @__PURE__ */ c(o, { style: { width: 100 }, "data-testid": `${t}-skeletonValue` }) : m || "-"
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
] });
|
|
35
|
+
export {
|
|
36
|
+
g as TextDisplay
|
|
37
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ label, value, isLoading, testId, labelOptions, valueOptions, }: import('./TextDisplay').TextDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
tags: string[];
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const Simple: Story;
|
|
11
|
+
export declare const WithLoading: Story;
|
|
12
|
+
export declare const Size: Story;
|
|
13
|
+
export declare const Color: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import '../../assets/Toggle.css';
|
|
2
2
|
import { jsxs as I, jsx as P } from "react/jsx-runtime";
|
|
3
3
|
import { c as C } from "../../clsx-DB4S2d7J.js";
|
|
4
|
-
import {
|
|
4
|
+
import { u as v, b as x, g as U, a as q, _ as H, c as F, P as e, d as M, e as A } from "../../index-CH45lKw7.js";
|
|
5
5
|
import * as N from "react";
|
|
6
|
-
import { u as U, g as q, a as H, b as F, P as e, c as M, d as A } from "../../index-CtPvew6C.js";
|
|
7
6
|
import { u as D } from "../../useControlled-CCMYYdCM.js";
|
|
8
7
|
import { u as L } from "../../useIsFocusVisible-BH4IAdcw.js";
|
|
9
8
|
function W(l) {
|
|
@@ -40,7 +39,7 @@ function W(l) {
|
|
|
40
39
|
}, T = (t) => (o) => {
|
|
41
40
|
var b;
|
|
42
41
|
w(o), _.current === !1 && y(!1), a == null || a(o), (b = t.onBlur) == null || b.call(t, o);
|
|
43
|
-
}, O =
|
|
42
|
+
}, O = v(m, k);
|
|
44
43
|
return {
|
|
45
44
|
checked: V,
|
|
46
45
|
disabled: !!c,
|
|
@@ -66,9 +65,9 @@ function W(l) {
|
|
|
66
65
|
}
|
|
67
66
|
const $ = "Switch";
|
|
68
67
|
function z(l) {
|
|
69
|
-
return
|
|
68
|
+
return U($, l);
|
|
70
69
|
}
|
|
71
|
-
|
|
70
|
+
q($, ["root", "input", "track", "thumb", "checked", "disabled", "focusVisible", "readOnly"]);
|
|
72
71
|
const G = ["checked", "defaultChecked", "disabled", "onBlur", "onChange", "onFocus", "onFocusVisible", "readOnly", "required", "slotProps", "slots"], J = (l) => {
|
|
73
72
|
const {
|
|
74
73
|
checked: s,
|
|
@@ -87,7 +86,7 @@ const G = ["checked", "defaultChecked", "disabled", "onBlur", "onChange", "onFoc
|
|
|
87
86
|
const {
|
|
88
87
|
slotProps: u = {},
|
|
89
88
|
slots: n = {}
|
|
90
|
-
} = s, i =
|
|
89
|
+
} = s, i = H(s, G), {
|
|
91
90
|
getInputProps: V,
|
|
92
91
|
checked: S,
|
|
93
92
|
disabled: B,
|
|
@@ -209,7 +208,7 @@ const K = "_toggle_1icxx_1", Q = "_input_1icxx_12", X = "_thumb_1icxx_23", Y = "
|
|
|
209
208
|
"toggle--checked": "_toggle--checked_1icxx_51",
|
|
210
209
|
toggle__label: Z,
|
|
211
210
|
"toggle--disabled": "_toggle--disabled_1icxx_66"
|
|
212
|
-
},
|
|
211
|
+
}, ce = ({
|
|
213
212
|
label: l,
|
|
214
213
|
checked: s,
|
|
215
214
|
disabled: p,
|
|
@@ -248,5 +247,5 @@ const K = "_toggle_1icxx_1", Q = "_input_1icxx_12", X = "_thumb_1icxx_23", Y = "
|
|
|
248
247
|
] });
|
|
249
248
|
};
|
|
250
249
|
export {
|
|
251
|
-
|
|
250
|
+
ce as Toggle
|
|
252
251
|
};
|
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
import { PopupPlacement } from '@mui/base';
|
|
2
|
+
import { AriaRole, ReactNode } from 'react';
|
|
2
3
|
|
|
3
|
-
type TooltipProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export type TooltipProps = {
|
|
5
|
+
/** Tooltip reference element. */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** Tooltip title. Zero-length titles string, undefined, null and false are never displayed. */
|
|
8
|
+
title: ReactNode;
|
|
9
|
+
/** Should the tooltip be initially open */
|
|
10
|
+
open?: boolean;
|
|
11
|
+
/** Disable the hover listener */
|
|
7
12
|
disableHoverListener?: boolean;
|
|
13
|
+
/** Function to run when the tooltip is closed */
|
|
8
14
|
onClose?: () => void;
|
|
15
|
+
/** The color of the tooltip */
|
|
9
16
|
theme?: 'white' | 'black';
|
|
17
|
+
/** Dhe padding applied to the tooltip */
|
|
10
18
|
padding?: 'small' | 'normal';
|
|
19
|
+
/** The Position where the tooltip will be display relative to the anchor element */
|
|
11
20
|
position?: PopupPlacement;
|
|
12
|
-
|
|
21
|
+
/** Accessibility role label */
|
|
22
|
+
arialRole?: AriaRole;
|
|
23
|
+
/** Additional classnames to be applied to the tooltip */
|
|
13
24
|
className?: string;
|
|
25
|
+
/** Test id */
|
|
14
26
|
'data-testid'?: string;
|
|
15
27
|
};
|
|
16
|
-
declare const Tooltip: ({ children,
|
|
28
|
+
declare const Tooltip: ({ arialRole, children: childrenProp, className, disableHoverListener, onClose, padding, position, open: openProp, theme, title, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
29
|
export { Tooltip };
|