@pismo/marola 0.0.1-alpha.18 → 0.0.1-alpha.2
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/README.md +5 -17
- package/dist/Button-REznN-RP.js +1139 -0
- package/dist/Dialog.module-BO0mdB7d.js +15 -0
- package/dist/assets/CallToActionButton.css +1 -0
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/LoadingSpinner.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/assets/main.css +1 -0
- package/dist/components/CallToActionButton/CallToActionButton.d.ts +23 -0
- package/dist/components/CallToActionButton/CallToActionButton.js +57 -0
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +1 -1
- package/dist/components/Dialog/Backdrop.js +9 -2
- package/dist/components/Dialog/CloseIconButton.js +10 -11
- package/dist/components/Dialog/Dialog.d.ts +4 -5
- package/dist/components/Dialog/Dialog.js +20103 -445
- package/dist/components/Dialog/Title.js +7 -22
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +0 -2
- package/dist/components/LoadingSpinner/LoadingSpinner.js +13 -12
- package/dist/components/Typography/Typography.d.ts +6 -17
- package/dist/components/Typography/Typography.js +64 -85
- package/dist/main.d.ts +3 -25
- package/dist/main.js +15 -62
- package/dist/types/helpers.d.ts +7 -14
- package/package.json +9 -51
- package/src/playground/Playground.tsx +58 -0
- package/dist/Button-2b1peDFT.js +0 -130
- package/dist/ClickAwayListener-BSW-Nd-y.js +0 -107
- package/dist/Dialog.module-B8COssqi.js +0 -15
- package/dist/Popup-B6ZSGIEI.js +0 -1248
- package/dist/Portal-DIeBsWdL.js +0 -73
- package/dist/SelectButton-pciwIWcj.js +0 -46
- package/dist/Tabs.module-jkH1Qjn7.js +0 -22
- package/dist/assets/Advice.css +0 -1
- package/dist/assets/Button.css +0 -1
- package/dist/assets/Checkbox.css +0 -1
- package/dist/assets/Chip.css +0 -1
- package/dist/assets/IconButton.css +0 -1
- package/dist/assets/Input.css +0 -1
- package/dist/assets/InputSearch.css +0 -1
- package/dist/assets/PageHeader.css +0 -1
- package/dist/assets/Pagination.css +0 -1
- package/dist/assets/SelectButton.css +0 -1
- package/dist/assets/Skeleton.css +0 -1
- package/dist/assets/Snackbar.css +0 -1
- package/dist/assets/SortTooltip.css +0 -1
- package/dist/assets/Stepper.css +0 -1
- package/dist/assets/Table.css +0 -1
- package/dist/assets/Tabs.css +0 -1
- package/dist/assets/TextDisplay.css +0 -1
- package/dist/assets/Toggle.css +0 -1
- package/dist/assets/Tooltip.css +0 -1
- package/dist/combineHooksSlotProps-DVjg9PRh.js +0 -80
- package/dist/components/Advice/Advice.d.ts +0 -28
- package/dist/components/Advice/Advice.js +0 -25
- package/dist/components/Advice/Advice.stories.d.ts +0 -16
- package/dist/components/Button/Button.d.ts +0 -32
- package/dist/components/Button/Button.js +0 -94
- package/dist/components/Button/Button.stories.d.ts +0 -62
- package/dist/components/Checkbox/Checkbox.d.ts +0 -34
- package/dist/components/Checkbox/Checkbox.js +0 -56
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -31
- package/dist/components/Chip/Chip.d.ts +0 -37
- package/dist/components/Chip/Chip.js +0 -143
- package/dist/components/Chip/Chip.stories.d.ts +0 -40
- package/dist/components/Chip/chip.test.d.ts +0 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +0 -343
- package/dist/components/Icon/Icon.d.ts +0 -27
- package/dist/components/Icon/Icon.js +0 -116
- package/dist/components/Icon/Icon.stories.d.ts +0 -16
- package/dist/components/IconButton/Icon.stories.d.ts +0 -15
- package/dist/components/IconButton/IconButton.d.ts +0 -36
- package/dist/components/IconButton/IconButton.js +0 -70
- package/dist/components/Input/Input.d.ts +0 -44
- package/dist/components/Input/Input.js +0 -496
- package/dist/components/Input/Input.stories.d.ts +0 -43
- package/dist/components/InputSearch/InputSearch.d.ts +0 -9
- package/dist/components/InputSearch/InputSearch.js +0 -34
- package/dist/components/InputSearch/InputSearch.stories.d.ts +0 -39
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +0 -14
- package/dist/components/PageHeader/PageHeader.d.ts +0 -36
- package/dist/components/PageHeader/PageHeader.js +0 -51
- package/dist/components/PageHeader/PageHeader.stories.d.ts +0 -43
- package/dist/components/Pagination/Pagination.d.ts +0 -55
- package/dist/components/Pagination/Pagination.js +0 -222
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -17
- package/dist/components/Select/Select.d.ts +0 -26
- package/dist/components/Select/Select.js +0 -857
- package/dist/components/Select/Select.stories.d.ts +0 -22
- package/dist/components/Select/SelectButton.d.ts +0 -12
- package/dist/components/Select/SelectButton.js +0 -8
- package/dist/components/Skeleton/Skeleton.d.ts +0 -25
- package/dist/components/Skeleton/Skeleton.js +0 -23
- package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -14
- package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +0 -14
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +0 -16
- package/dist/components/Snackbar/Snackbar.d.ts +0 -25
- package/dist/components/Snackbar/Snackbar.js +0 -622
- package/dist/components/Snackbar/Snackbar.stories.d.ts +0 -318
- package/dist/components/SortTooltip/SortTooltip.d.ts +0 -28
- package/dist/components/SortTooltip/SortTooltip.js +0 -78
- package/dist/components/Stepper/Stepper.d.ts +0 -26
- package/dist/components/Stepper/Stepper.js +0 -33
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -16
- package/dist/components/Table/Table.d.ts +0 -39
- package/dist/components/Table/Table.js +0 -120
- package/dist/components/Table/TableContext.d.ts +0 -19
- package/dist/components/Table/TableContext.js +0 -21
- package/dist/components/Tabs/Tab.d.ts +0 -14
- package/dist/components/Tabs/Tab.js +0 -181
- package/dist/components/Tabs/Tab.stories.d.ts +0 -15
- package/dist/components/Tabs/TabPanel.d.ts +0 -12
- package/dist/components/Tabs/TabPanel.js +0 -118
- package/dist/components/Tabs/TabPanel.stories.d.ts +0 -14
- package/dist/components/Tabs/Tabs.d.ts +0 -15
- package/dist/components/Tabs/Tabs.js +0 -401
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -14
- package/dist/components/TextDisplay/TextDisplay.d.ts +0 -23
- package/dist/components/TextDisplay/TextDisplay.js +0 -37
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +0 -13
- package/dist/components/TextDisplay/textDisplay.test.d.ts +0 -1
- package/dist/components/Toggle/Toggle.d.ts +0 -11
- package/dist/components/Toggle/Toggle.js +0 -251
- package/dist/components/Toggle/Toggle.stories.d.ts +0 -21
- package/dist/components/Tooltip/Tooltip.d.ts +0 -29
- package/dist/components/Tooltip/Tooltip.js +0 -139
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -33
- package/dist/components/Typography/Typography.stories.d.ts +0 -32
- package/dist/components/Typography/typography.test.d.ts +0 -1
- package/dist/index-CH45lKw7.js +0 -840
- package/dist/index-CjW42-M-.js +0 -19584
- package/dist/marola.css +0 -1
- package/dist/test-utils/assertStyles.d.ts +0 -1
- package/dist/test-utils/assertStyles.js +0 -11
- package/dist/useButton-DNk3wrQp.js +0 -105
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useControlled-CCMYYdCM.js +0 -31
- package/dist/useEnhancedEffect-CJGo-L3B.js +0 -5
- package/dist/useEventCallback-xTG9piMa.js +0 -45
- package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
- package/dist/useList-B0hog_3-.js +0 -436
- package/dist/useTimeout-DxF9kiZL.js +0 -36
- package/dist/utils/styleStrings.d.ts +0 -6
- package/dist/utils/styleStrings.js +0 -10
- package/dist/utils/styleStrings.test.d.ts +0 -1
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
import { jsx as T } from "react/jsx-runtime";
|
|
2
|
-
import * as r from "react";
|
|
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";
|
|
9
|
-
import { u as X } from "../../useControlled-CCMYYdCM.js";
|
|
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";
|
|
12
|
-
const k = "Tabs";
|
|
13
|
-
function se(s) {
|
|
14
|
-
return I(k, s);
|
|
15
|
-
}
|
|
16
|
-
_(k, ["root", "horizontal", "vertical"]);
|
|
17
|
-
function ne(s) {
|
|
18
|
-
const {
|
|
19
|
-
value: e,
|
|
20
|
-
defaultValue: o,
|
|
21
|
-
onChange: n,
|
|
22
|
-
orientation: i = "horizontal",
|
|
23
|
-
direction: c = "ltr",
|
|
24
|
-
selectionFollowsFocus: l = !1
|
|
25
|
-
} = s, [d, u] = X({
|
|
26
|
-
controlled: e,
|
|
27
|
-
default: o,
|
|
28
|
-
name: "Tabs",
|
|
29
|
-
state: "value"
|
|
30
|
-
}), a = r.useCallback((x, y) => {
|
|
31
|
-
u(y), n == null || n(x, y);
|
|
32
|
-
}, [n, u]), {
|
|
33
|
-
subitems: m,
|
|
34
|
-
contextValue: g
|
|
35
|
-
} = O(), p = r.useRef(() => {
|
|
36
|
-
}), b = r.useCallback((x) => {
|
|
37
|
-
var y;
|
|
38
|
-
return (y = m.get(x)) == null ? void 0 : y.id;
|
|
39
|
-
}, [m]), f = r.useCallback((x) => p.current(x), []), P = r.useCallback((x) => {
|
|
40
|
-
p.current = x;
|
|
41
|
-
}, []);
|
|
42
|
-
return {
|
|
43
|
-
contextValue: C({
|
|
44
|
-
direction: c,
|
|
45
|
-
getTabId: f,
|
|
46
|
-
getTabPanelId: b,
|
|
47
|
-
onSelected: a,
|
|
48
|
-
orientation: i,
|
|
49
|
-
registerTabIdLookup: P,
|
|
50
|
-
selectionFollowsFocus: l,
|
|
51
|
-
value: d
|
|
52
|
-
}, g)
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function le(s) {
|
|
56
|
-
const {
|
|
57
|
-
value: e,
|
|
58
|
-
children: o
|
|
59
|
-
} = s, {
|
|
60
|
-
direction: n,
|
|
61
|
-
getItemIndex: i,
|
|
62
|
-
onSelected: c,
|
|
63
|
-
orientation: l,
|
|
64
|
-
registerItem: d,
|
|
65
|
-
registerTabIdLookup: u,
|
|
66
|
-
selectionFollowsFocus: a,
|
|
67
|
-
totalSubitemCount: m,
|
|
68
|
-
value: g,
|
|
69
|
-
getTabId: p,
|
|
70
|
-
getTabPanelId: b
|
|
71
|
-
} = e, f = r.useMemo(() => ({
|
|
72
|
-
getItemIndex: i,
|
|
73
|
-
registerItem: d,
|
|
74
|
-
totalSubitemCount: m
|
|
75
|
-
}), [d, i, m]), P = r.useMemo(() => ({
|
|
76
|
-
direction: n,
|
|
77
|
-
getTabId: p,
|
|
78
|
-
getTabPanelId: b,
|
|
79
|
-
onSelected: c,
|
|
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,
|
|
87
|
-
children: /* @__PURE__ */ T(G.Provider, {
|
|
88
|
-
value: P,
|
|
89
|
-
children: o
|
|
90
|
-
})
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
const re = ["children", "value", "defaultValue", "orientation", "direction", "onChange", "selectionFollowsFocus", "slotProps", "slots"], ae = (s) => {
|
|
94
|
-
const {
|
|
95
|
-
orientation: e
|
|
96
|
-
} = s;
|
|
97
|
-
return N({
|
|
98
|
-
root: ["root", e]
|
|
99
|
-
}, M(se));
|
|
100
|
-
}, w = /* @__PURE__ */ r.forwardRef(function(e, o) {
|
|
101
|
-
var n;
|
|
102
|
-
const {
|
|
103
|
-
children: i,
|
|
104
|
-
orientation: c = "horizontal",
|
|
105
|
-
direction: l = "ltr",
|
|
106
|
-
slotProps: d = {},
|
|
107
|
-
slots: u = {}
|
|
108
|
-
} = e, a = F(e, re), m = C({}, e, {
|
|
109
|
-
orientation: c,
|
|
110
|
-
direction: l
|
|
111
|
-
}), {
|
|
112
|
-
contextValue: g
|
|
113
|
-
} = ne(m), p = ae(m), b = (n = u.root) != null ? n : "div", f = $({
|
|
114
|
-
elementType: b,
|
|
115
|
-
externalSlotProps: d.root,
|
|
116
|
-
externalForwardedProps: a,
|
|
117
|
-
additionalProps: {
|
|
118
|
-
ref: o
|
|
119
|
-
},
|
|
120
|
-
ownerState: m,
|
|
121
|
-
className: p.root
|
|
122
|
-
});
|
|
123
|
-
return /* @__PURE__ */ T(b, C({}, f, {
|
|
124
|
-
children: /* @__PURE__ */ T(le, {
|
|
125
|
-
value: g,
|
|
126
|
-
children: i
|
|
127
|
-
})
|
|
128
|
-
}));
|
|
129
|
-
});
|
|
130
|
-
process.env.NODE_ENV !== "production" && (w.propTypes = {
|
|
131
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
132
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
133
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
134
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
135
|
-
/**
|
|
136
|
-
* The content of the component.
|
|
137
|
-
*/
|
|
138
|
-
children: t.node,
|
|
139
|
-
/**
|
|
140
|
-
* @ignore
|
|
141
|
-
*/
|
|
142
|
-
className: t.string,
|
|
143
|
-
/**
|
|
144
|
-
* The default value. Use when the component is not controlled.
|
|
145
|
-
*/
|
|
146
|
-
defaultValue: t.oneOfType([t.number, t.string]),
|
|
147
|
-
/**
|
|
148
|
-
* The direction of the text.
|
|
149
|
-
* @default 'ltr'
|
|
150
|
-
*/
|
|
151
|
-
direction: t.oneOf(["ltr", "rtl"]),
|
|
152
|
-
/**
|
|
153
|
-
* Callback invoked when new value is being set.
|
|
154
|
-
*/
|
|
155
|
-
onChange: t.func,
|
|
156
|
-
/**
|
|
157
|
-
* The component orientation (layout flow direction).
|
|
158
|
-
* @default 'horizontal'
|
|
159
|
-
*/
|
|
160
|
-
orientation: t.oneOf(["horizontal", "vertical"]),
|
|
161
|
-
/**
|
|
162
|
-
* If `true` the selected tab changes on focus. Otherwise it only
|
|
163
|
-
* changes on activation.
|
|
164
|
-
*/
|
|
165
|
-
selectionFollowsFocus: t.bool,
|
|
166
|
-
/**
|
|
167
|
-
* The props used for each slot inside the Tabs.
|
|
168
|
-
* @default {}
|
|
169
|
-
*/
|
|
170
|
-
slotProps: t.shape({
|
|
171
|
-
root: t.oneOfType([t.func, t.object])
|
|
172
|
-
}),
|
|
173
|
-
/**
|
|
174
|
-
* The components used for each slot inside the Tabs.
|
|
175
|
-
* Either a string to use a HTML element or a component.
|
|
176
|
-
* @default {}
|
|
177
|
-
*/
|
|
178
|
-
slots: t.shape({
|
|
179
|
-
root: t.elementType
|
|
180
|
-
}),
|
|
181
|
-
/**
|
|
182
|
-
* The value of the currently selected `Tab`.
|
|
183
|
-
* If you don't want any selected `Tab`, you can set this prop to `null`.
|
|
184
|
-
*/
|
|
185
|
-
value: t.oneOfType([t.number, t.string])
|
|
186
|
-
});
|
|
187
|
-
const E = "TabsList";
|
|
188
|
-
function ie(s) {
|
|
189
|
-
return I(E, s);
|
|
190
|
-
}
|
|
191
|
-
_(E, ["root", "horizontal", "vertical"]);
|
|
192
|
-
const z = {
|
|
193
|
-
valueChange: "valueChange"
|
|
194
|
-
};
|
|
195
|
-
function ue(s, e) {
|
|
196
|
-
if (e.type === z.valueChange)
|
|
197
|
-
return C({}, s, {
|
|
198
|
-
highlightedValue: e.value
|
|
199
|
-
});
|
|
200
|
-
const o = ee(s, e), {
|
|
201
|
-
context: {
|
|
202
|
-
selectionFollowsFocus: n
|
|
203
|
-
}
|
|
204
|
-
} = e;
|
|
205
|
-
if (e.type === Y.itemsChange) {
|
|
206
|
-
if (o.selectedValues.length > 0)
|
|
207
|
-
return C({}, o, {
|
|
208
|
-
highlightedValue: o.selectedValues[0]
|
|
209
|
-
});
|
|
210
|
-
te(null, "reset", e.context);
|
|
211
|
-
}
|
|
212
|
-
return n && o.highlightedValue != null ? C({}, o, {
|
|
213
|
-
selectedValues: [o.highlightedValue]
|
|
214
|
-
}) : o;
|
|
215
|
-
}
|
|
216
|
-
function ce(s) {
|
|
217
|
-
var e;
|
|
218
|
-
const {
|
|
219
|
-
rootRef: o
|
|
220
|
-
} = s, {
|
|
221
|
-
direction: n = "ltr",
|
|
222
|
-
onSelected: i,
|
|
223
|
-
orientation: c = "horizontal",
|
|
224
|
-
value: l,
|
|
225
|
-
registerTabIdLookup: d,
|
|
226
|
-
selectionFollowsFocus: u
|
|
227
|
-
} = J(), {
|
|
228
|
-
subitems: a,
|
|
229
|
-
contextValue: m
|
|
230
|
-
} = O(), g = r.useCallback((h) => {
|
|
231
|
-
var v;
|
|
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) => {
|
|
236
|
-
var v, V;
|
|
237
|
-
return h == null ? null : (v = (V = a.get(h)) == null ? void 0 : V.ref.current) != null ? v : null;
|
|
238
|
-
}, [a]), f = n === "rtl";
|
|
239
|
-
let P;
|
|
240
|
-
c === "vertical" ? P = "vertical" : P = f ? "horizontal-rtl" : "horizontal-ltr";
|
|
241
|
-
const x = r.useCallback((h, v) => {
|
|
242
|
-
var V;
|
|
243
|
-
i(h, (V = v[0]) != null ? V : null);
|
|
244
|
-
}, [i]), y = r.useMemo(() => l === void 0 ? {} : l != null ? {
|
|
245
|
-
selectedValues: [l]
|
|
246
|
-
} : {
|
|
247
|
-
selectedValues: []
|
|
248
|
-
}, [l]), U = r.useCallback((h) => {
|
|
249
|
-
var v, V;
|
|
250
|
-
return (v = (V = a.get(h)) == null ? void 0 : V.disabled) != null ? v : !1;
|
|
251
|
-
}, [a]), {
|
|
252
|
-
contextValue: L,
|
|
253
|
-
dispatch: R,
|
|
254
|
-
getRootProps: D,
|
|
255
|
-
state: {
|
|
256
|
-
highlightedValue: j,
|
|
257
|
-
selectedValues: H
|
|
258
|
-
},
|
|
259
|
-
rootRef: K
|
|
260
|
-
} = oe({
|
|
261
|
-
controlledProps: y,
|
|
262
|
-
disabledItemsFocusable: !u,
|
|
263
|
-
focusManagement: "DOM",
|
|
264
|
-
getItemDomElement: b,
|
|
265
|
-
isItemDisabled: U,
|
|
266
|
-
items: p,
|
|
267
|
-
rootRef: o,
|
|
268
|
-
onChange: x,
|
|
269
|
-
orientation: P,
|
|
270
|
-
reducerActionContext: r.useMemo(() => ({
|
|
271
|
-
selectionFollowsFocus: u || !1
|
|
272
|
-
}), [u]),
|
|
273
|
-
selectionMode: "single",
|
|
274
|
-
stateReducer: ue
|
|
275
|
-
});
|
|
276
|
-
r.useEffect(() => {
|
|
277
|
-
l !== void 0 && l != null && R({
|
|
278
|
-
type: z.valueChange,
|
|
279
|
-
value: l
|
|
280
|
-
});
|
|
281
|
-
}, [R, l]);
|
|
282
|
-
const W = (h = {}) => C({}, h, D(h), {
|
|
283
|
-
"aria-orientation": c === "vertical" ? "vertical" : void 0,
|
|
284
|
-
role: "tablist"
|
|
285
|
-
});
|
|
286
|
-
return {
|
|
287
|
-
contextValue: r.useMemo(() => C({}, m, L), [m, L]),
|
|
288
|
-
dispatch: R,
|
|
289
|
-
getRootProps: W,
|
|
290
|
-
highlightedValue: j,
|
|
291
|
-
isRtl: f,
|
|
292
|
-
orientation: c,
|
|
293
|
-
rootRef: K,
|
|
294
|
-
selectedValue: (e = H[0]) != null ? e : null
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
function de(s) {
|
|
298
|
-
const {
|
|
299
|
-
value: e,
|
|
300
|
-
children: o
|
|
301
|
-
} = s, {
|
|
302
|
-
dispatch: n,
|
|
303
|
-
getItemIndex: i,
|
|
304
|
-
getItemState: c,
|
|
305
|
-
registerItem: l,
|
|
306
|
-
totalSubitemCount: d
|
|
307
|
-
} = e, u = r.useMemo(() => ({
|
|
308
|
-
dispatch: n,
|
|
309
|
-
getItemState: c,
|
|
310
|
-
getItemIndex: i
|
|
311
|
-
}), [n, i, c]), a = r.useMemo(() => ({
|
|
312
|
-
getItemIndex: i,
|
|
313
|
-
registerItem: l,
|
|
314
|
-
totalSubitemCount: d
|
|
315
|
-
}), [l, i, d]);
|
|
316
|
-
return /* @__PURE__ */ T(S.Provider, {
|
|
317
|
-
value: a,
|
|
318
|
-
children: /* @__PURE__ */ T(Z.Provider, {
|
|
319
|
-
value: u,
|
|
320
|
-
children: o
|
|
321
|
-
})
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
const me = ["children", "slotProps", "slots"], pe = (s) => {
|
|
325
|
-
const {
|
|
326
|
-
orientation: e
|
|
327
|
-
} = s;
|
|
328
|
-
return N({
|
|
329
|
-
root: ["root", e]
|
|
330
|
-
}, M(ie));
|
|
331
|
-
}, A = /* @__PURE__ */ r.forwardRef(function(e, o) {
|
|
332
|
-
var n;
|
|
333
|
-
const {
|
|
334
|
-
children: i,
|
|
335
|
-
slotProps: c = {},
|
|
336
|
-
slots: l = {}
|
|
337
|
-
} = e, d = F(e, me), {
|
|
338
|
-
isRtl: u,
|
|
339
|
-
orientation: a,
|
|
340
|
-
getRootProps: m,
|
|
341
|
-
contextValue: g
|
|
342
|
-
} = ce({
|
|
343
|
-
rootRef: o
|
|
344
|
-
}), p = C({}, e, {
|
|
345
|
-
isRtl: u,
|
|
346
|
-
orientation: a
|
|
347
|
-
}), b = pe(p), f = (n = l.root) != null ? n : "div", P = $({
|
|
348
|
-
elementType: f,
|
|
349
|
-
getSlotProps: m,
|
|
350
|
-
externalSlotProps: c.root,
|
|
351
|
-
externalForwardedProps: d,
|
|
352
|
-
ownerState: p,
|
|
353
|
-
className: b.root
|
|
354
|
-
});
|
|
355
|
-
return /* @__PURE__ */ T(de, {
|
|
356
|
-
value: g,
|
|
357
|
-
children: /* @__PURE__ */ T(f, C({}, P, {
|
|
358
|
-
children: i
|
|
359
|
-
}))
|
|
360
|
-
});
|
|
361
|
-
});
|
|
362
|
-
process.env.NODE_ENV !== "production" && (A.propTypes = {
|
|
363
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
364
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
365
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
366
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
367
|
-
/**
|
|
368
|
-
* The content of the component.
|
|
369
|
-
*/
|
|
370
|
-
children: t.node,
|
|
371
|
-
/**
|
|
372
|
-
* @ignore
|
|
373
|
-
*/
|
|
374
|
-
className: t.string,
|
|
375
|
-
/**
|
|
376
|
-
* The props used for each slot inside the TabsList.
|
|
377
|
-
* @default {}
|
|
378
|
-
*/
|
|
379
|
-
slotProps: t.shape({
|
|
380
|
-
root: t.oneOfType([t.func, t.object])
|
|
381
|
-
}),
|
|
382
|
-
/**
|
|
383
|
-
* The components used for each slot inside the TabsList.
|
|
384
|
-
* Either a string to use a HTML element or a component.
|
|
385
|
-
* @default {}
|
|
386
|
-
*/
|
|
387
|
-
slots: t.shape({
|
|
388
|
-
root: t.elementType
|
|
389
|
-
})
|
|
390
|
-
});
|
|
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
|
-
});
|
|
397
|
-
export {
|
|
398
|
-
Le as Tab,
|
|
399
|
-
_e as TabPanel,
|
|
400
|
-
Ve as Tabs
|
|
401
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
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;
|
|
@@ -1,23 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { InputHTMLAttributes } from 'react';
|
|
2
|
-
|
|
3
|
-
type ToggleProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
-
label?: string;
|
|
5
|
-
classNameWrapper?: string;
|
|
6
|
-
classNameInput?: string;
|
|
7
|
-
classNameLabel?: string;
|
|
8
|
-
'data-testid'?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const Toggle: ({ label, checked, disabled, classNameWrapper, classNameInput, "data-testid": dataTestId, onChange, classNameLabel, }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|