@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,46 +1,46 @@
|
|
|
1
1
|
import '../../assets/Stepper.css';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { c as
|
|
4
|
-
const
|
|
5
|
-
"u-typography-h1": "_u-typography-
|
|
6
|
-
"u-typography-h2": "_u-typography-
|
|
7
|
-
"u-typography-h3": "_u-typography-
|
|
8
|
-
"u-typography-h4": "_u-typography-
|
|
9
|
-
"u-typography-h5": "_u-typography-
|
|
10
|
-
"u-typography-h6": "_u-typography-
|
|
11
|
-
"u-typography-base": "_u-typography-
|
|
12
|
-
"u-typography-base--xxl": "_u-typography-base--
|
|
13
|
-
"u-typography-base--xl": "_u-typography-base--
|
|
14
|
-
"u-typography-base--lg": "_u-typography-base--
|
|
15
|
-
"u-typography-base--sm": "_u-typography-base--
|
|
16
|
-
stepper:
|
|
17
|
-
item:
|
|
18
|
-
name:
|
|
19
|
-
"u-typography-base--bold": "_u-typography-base--
|
|
20
|
-
"item--active": "_item--
|
|
21
|
-
"item--completed": "_item--
|
|
2
|
+
import { jsx as _, jsxs as d } from "react/jsx-runtime";
|
|
3
|
+
import { c as p } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
const m = "_stepper_a47qe_60", c = "_item_a47qe_60", n = "_name_a47qe_60", l = "_counter_a47qe_64", e = {
|
|
5
|
+
"u-typography-h1": "_u-typography-h1_a47qe_1",
|
|
6
|
+
"u-typography-h2": "_u-typography-h2_a47qe_8",
|
|
7
|
+
"u-typography-h3": "_u-typography-h3_a47qe_15",
|
|
8
|
+
"u-typography-h4": "_u-typography-h4_a47qe_22",
|
|
9
|
+
"u-typography-h5": "_u-typography-h5_a47qe_29",
|
|
10
|
+
"u-typography-h6": "_u-typography-h6_a47qe_36",
|
|
11
|
+
"u-typography-base": "_u-typography-base_a47qe_43",
|
|
12
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_a47qe_48",
|
|
13
|
+
"u-typography-base--xl": "_u-typography-base--xl_a47qe_52",
|
|
14
|
+
"u-typography-base--lg": "_u-typography-base--lg_a47qe_56",
|
|
15
|
+
"u-typography-base--sm": "_u-typography-base--sm_a47qe_60",
|
|
16
|
+
stepper: m,
|
|
17
|
+
item: c,
|
|
18
|
+
name: n,
|
|
19
|
+
"u-typography-base--bold": "_u-typography-base--bold_a47qe_64",
|
|
20
|
+
"item--active": "_item--active_a47qe_64",
|
|
21
|
+
"item--completed": "_item--completed_a47qe_64",
|
|
22
22
|
counter: l,
|
|
23
|
-
"u-typography-base--strikethrough": "_u-typography-base--
|
|
24
|
-
"u-typography-base--underlined": "_u-typography-base--
|
|
25
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-
|
|
26
|
-
}, v = ({ currentStep:
|
|
27
|
-
const
|
|
28
|
-
return /* @__PURE__ */
|
|
23
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_a47qe_67",
|
|
24
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_a47qe_70",
|
|
25
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_a47qe_73"
|
|
26
|
+
}, v = ({ currentStep: y = 0, steps: r, classNameItem: s, classNameCounter: o, classNameName: h, ...a }) => /* @__PURE__ */ _("div", { className: p(e.stepper, a.className), "data-testid": a["data-testid"], children: r.map((u, t) => {
|
|
27
|
+
const i = t < y, g = t === y;
|
|
28
|
+
return /* @__PURE__ */ d(
|
|
29
29
|
"div",
|
|
30
30
|
{
|
|
31
|
-
className:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
className: p(
|
|
32
|
+
e.item,
|
|
33
|
+
i && e["item--completed"],
|
|
34
|
+
g && e["item--active"],
|
|
35
|
+
s
|
|
36
36
|
),
|
|
37
|
-
"data-testid":
|
|
37
|
+
"data-testid": a["data-testid-item"],
|
|
38
38
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ _("div", { className: p(e.counter, o), "data-testid": a["data-testid-counter"], children: t + 1 }),
|
|
40
|
+
/* @__PURE__ */ _("div", { className: p(e.name, h), "data-testid": a["data-testid-name"], children: u })
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
|
-
|
|
43
|
+
t
|
|
44
44
|
);
|
|
45
45
|
}) });
|
|
46
46
|
export {
|
|
@@ -28,15 +28,13 @@ export type TableProps = ChildrenProps & {
|
|
|
28
28
|
paginationProps?: PaginationProps;
|
|
29
29
|
/** Set theme */
|
|
30
30
|
theme?: TableTheme;
|
|
31
|
-
/** Set css style `table-layout: fixed;` if was `true` */
|
|
32
|
-
isFixed?: boolean;
|
|
33
31
|
/** Set language */
|
|
34
32
|
language?: string;
|
|
35
33
|
/** Set translations to labels */
|
|
36
34
|
translations?: TableTranslations;
|
|
37
35
|
};
|
|
38
36
|
declare const Table: {
|
|
39
|
-
({ children, theme, fullWidth, className, paginationProps,
|
|
37
|
+
({ children, theme, fullWidth, className, paginationProps, language, translations, ...rest }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
40
38
|
THead: import('react').FunctionComponent<ChildrenProps>;
|
|
41
39
|
TBody: import('react').FunctionComponent<ChildrenProps>;
|
|
42
40
|
Tr: import('react').FunctionComponent<TrProps>;
|
|
@@ -1,39 +1,53 @@
|
|
|
1
1
|
import '../../assets/Table.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { c as
|
|
6
|
-
import { paginationDefaultTranslations as
|
|
7
|
-
import { sortTooltipDefaultTranslations as
|
|
2
|
+
import { jsxs as b, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import * as h from "react";
|
|
4
|
+
import { useState as w } from "react";
|
|
5
|
+
import { c as g } from "../../clsx-DB4S2d7J.js";
|
|
6
|
+
import { paginationDefaultTranslations as y, Pagination as T } from "../Pagination/Pagination.js";
|
|
7
|
+
import { sortTooltipDefaultTranslations as u, SortTooltip as f } from "../SortTooltip/SortTooltip.js";
|
|
8
8
|
import { TableProvider as N, useTable as x } from "./TableContext.js";
|
|
9
|
-
const C = (
|
|
9
|
+
const C = (p) => /* @__PURE__ */ h.createElement("svg", { width: 7, height: 10, viewBox: "0 0 7 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...p }, /* @__PURE__ */ h.createElement("g", { clipPath: "url(#clip0_2291_2457)" }, /* @__PURE__ */ h.createElement("path", { d: "M6.41658 3.93794C6.26731 3.93794 6.11798 3.88301 6.00423 3.77314L3.49991 1.35923L0.995768 3.77271C0.767904 3.99243 0.398763 3.99243 0.170898 3.77271C-0.0569661 3.55298 -0.0569661 3.19702 0.170898 2.97729L3.08756 0.164795C3.31543 -0.0549316 3.68457 -0.0549316 3.91243 0.164795L6.8291 2.97729C7.05697 3.19702 7.05697 3.55298 6.8291 3.77271C6.71553 3.88345 6.56605 3.93794 6.41658 3.93794Z", fill: "#1897F3" }), /* @__PURE__ */ h.createElement("path", { opacity: 0.4, d: "M6.41663 5.38022C6.26737 5.38022 6.11804 5.43516 6.00429 5.54502L3.49997 7.95894L0.99528 5.5437C0.767415 5.32397 0.398275 5.32397 0.17041 5.5437C-0.0574544 5.76343 -0.0574544 6.11938 0.17041 6.33911L3.08708 9.15161C3.31494 9.37134 3.68408 9.37134 3.91195 9.15161L6.82861 6.33911C7.05648 6.11938 7.05648 5.76343 6.82861 5.5437C6.71559 5.43472 6.56611 5.38022 6.41663 5.38022Z", fill: "#1897F3" })), /* @__PURE__ */ h.createElement("defs", null, /* @__PURE__ */ h.createElement("clipPath", { id: "clip0_2291_2457" }, /* @__PURE__ */ h.createElement("rect", { width: 7, height: 10, fill: "white" })))), L = "_table_1gspp_43", E = "_th__wrapper_1gspp_114", k = "_tr_1gspp_130", v = "_td_1gspp_134", t = {
|
|
10
|
+
"u-typography-h1": "_u-typography-h1_1gspp_1",
|
|
11
|
+
"u-typography-h2": "_u-typography-h2_1gspp_8",
|
|
12
|
+
"u-typography-h3": "_u-typography-h3_1gspp_15",
|
|
13
|
+
"u-typography-h4": "_u-typography-h4_1gspp_22",
|
|
14
|
+
"u-typography-h5": "_u-typography-h5_1gspp_29",
|
|
15
|
+
"u-typography-h6": "_u-typography-h6_1gspp_36",
|
|
16
|
+
"u-typography-base": "_u-typography-base_1gspp_43",
|
|
10
17
|
table: L,
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_1gspp_48",
|
|
19
|
+
"u-typography-base--xl": "_u-typography-base--xl_1gspp_52",
|
|
20
|
+
"u-typography-base--lg": "_u-typography-base--lg_1gspp_56",
|
|
21
|
+
"u-typography-base--sm": "_u-typography-base--sm_1gspp_60",
|
|
22
|
+
"u-typography-base--bold": "_u-typography-base--bold_1gspp_64",
|
|
23
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1gspp_67",
|
|
24
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_1gspp_70",
|
|
25
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1gspp_73",
|
|
26
|
+
"table--full-width": "_table--full-width_1gspp_81",
|
|
27
|
+
"table--white-theme": "_table--white-theme_1gspp_84",
|
|
28
|
+
"table--transparent-theme": "_table--transparent-theme_1gspp_87",
|
|
29
|
+
"cell--left-alignment": "_cell--left-alignment_1gspp_90",
|
|
30
|
+
"cell--center-alignment": "_cell--center-alignment_1gspp_94",
|
|
31
|
+
"cell--right-alignment": "_cell--right-alignment_1gspp_98",
|
|
18
32
|
th__wrapper: E,
|
|
19
|
-
"th__wrapper--pressed": "_th__wrapper--
|
|
20
|
-
"th__wrapper--clickable": "_th__wrapper--
|
|
21
|
-
"th__sort-icon-container": "_th__sort-icon-
|
|
22
|
-
"tr__row-or-cell--disabled": "_tr__row-or-cell--
|
|
23
|
-
tr:
|
|
24
|
-
td:
|
|
25
|
-
"tr__row-or-cell--clickable": "_tr__row-or-cell--
|
|
26
|
-
"td__row-or-cell--clickable": "_td__row-or-cell--
|
|
27
|
-
"td__row-or-cell--disabled": "_td__row-or-cell--
|
|
28
|
-
"td-wrapper": "_td-
|
|
29
|
-
},
|
|
33
|
+
"th__wrapper--pressed": "_th__wrapper--pressed_1gspp_117",
|
|
34
|
+
"th__wrapper--clickable": "_th__wrapper--clickable_1gspp_121",
|
|
35
|
+
"th__sort-icon-container": "_th__sort-icon-container_1gspp_124",
|
|
36
|
+
"tr__row-or-cell--disabled": "_tr__row-or-cell--disabled_1gspp_130",
|
|
37
|
+
tr: k,
|
|
38
|
+
td: v,
|
|
39
|
+
"tr__row-or-cell--clickable": "_tr__row-or-cell--clickable_1gspp_139",
|
|
40
|
+
"td__row-or-cell--clickable": "_td__row-or-cell--clickable_1gspp_140",
|
|
41
|
+
"td__row-or-cell--disabled": "_td__row-or-cell--disabled_1gspp_144",
|
|
42
|
+
"td-wrapper": "_td-wrapper_1gspp_148"
|
|
43
|
+
}, B = {
|
|
30
44
|
pt: {
|
|
31
|
-
...
|
|
32
|
-
...
|
|
45
|
+
...y.pt,
|
|
46
|
+
...u.pt
|
|
33
47
|
},
|
|
34
48
|
en: {
|
|
35
|
-
...
|
|
36
|
-
...
|
|
49
|
+
...y.en,
|
|
50
|
+
...u.en
|
|
37
51
|
},
|
|
38
52
|
// example to add a new language translation
|
|
39
53
|
es: {
|
|
@@ -45,81 +59,79 @@ const C = (r) => /* @__PURE__ */ c.createElement("svg", { width: 7, height: 10,
|
|
|
45
59
|
of: "de",
|
|
46
60
|
results: "resultados"
|
|
47
61
|
}
|
|
48
|
-
},
|
|
49
|
-
children:
|
|
62
|
+
}, l = ({
|
|
63
|
+
children: p,
|
|
50
64
|
theme: e = "white",
|
|
51
|
-
fullWidth:
|
|
52
|
-
className:
|
|
53
|
-
paginationProps:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
...i
|
|
65
|
+
fullWidth: r = !0,
|
|
66
|
+
className: o,
|
|
67
|
+
paginationProps: s,
|
|
68
|
+
language: _,
|
|
69
|
+
translations: n,
|
|
70
|
+
...d
|
|
58
71
|
}) => {
|
|
59
|
-
const
|
|
72
|
+
const c = g(
|
|
60
73
|
t.table,
|
|
61
|
-
|
|
62
|
-
n && t["table--fixed"],
|
|
74
|
+
r ? t["table--full-width"] : "",
|
|
63
75
|
t[`table--${e}-theme`],
|
|
64
|
-
|
|
65
|
-
),
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
|
|
76
|
+
o
|
|
77
|
+
), i = _ && B[_] || n;
|
|
78
|
+
return /* @__PURE__ */ b(N, { initialTranslations: i, children: [
|
|
79
|
+
/* @__PURE__ */ a("table", { ...d, className: c, children: p }),
|
|
80
|
+
s && /* @__PURE__ */ a(T, { ...s, t: i })
|
|
69
81
|
] });
|
|
70
|
-
},
|
|
71
|
-
const
|
|
82
|
+
}, H = ({ children: p, ...e }) => /* @__PURE__ */ a("thead", { ...e, children: p }), P = ({ children: p, ...e }) => /* @__PURE__ */ a("tbody", { ...e, children: p }), D = ({ children: p, onClick: e, disabled: r, className: o, ...s }) => {
|
|
83
|
+
const _ = g(
|
|
72
84
|
t.tr,
|
|
73
|
-
e && !
|
|
74
|
-
|
|
85
|
+
e && !r ? t["tr__row-or-cell--clickable"] : r ? t["tr__row-or-cell--disabled"] : "",
|
|
86
|
+
o
|
|
75
87
|
);
|
|
76
|
-
return /* @__PURE__ */
|
|
77
|
-
},
|
|
78
|
-
const
|
|
88
|
+
return /* @__PURE__ */ a("tr", { ...s, className: _, onClick: () => !r && (e == null ? void 0 : e()), children: p });
|
|
89
|
+
}, M = ({ children: p, onClick: e, disabled: r, className: o, align: s = "left", ..._ }) => {
|
|
90
|
+
const n = g(
|
|
79
91
|
t.td,
|
|
80
|
-
e && !
|
|
81
|
-
t[`cell--${
|
|
82
|
-
|
|
92
|
+
e && !r ? t["td__row-or-cell--clickable"] : r ? t["td__row-or-cell--disabled"] : "",
|
|
93
|
+
t[`cell--${s}-alignment`],
|
|
94
|
+
o
|
|
83
95
|
);
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
},
|
|
86
|
-
const { translations:
|
|
96
|
+
return /* @__PURE__ */ a("td", { ..._, className: n, onClick: () => !r && (e == null ? void 0 : e()), children: /* @__PURE__ */ a("span", { className: t["td-wrapper"], children: p }) });
|
|
97
|
+
}, O = ({ children: p, onSort: e, sortType: r, className: o, classNameTooltip: s, align: _ = "left", ...n }) => {
|
|
98
|
+
const { translations: d } = x(), [c, i] = w(!1), m = g(
|
|
87
99
|
t.th__wrapper,
|
|
88
|
-
|
|
100
|
+
c ? t["th__wrapper--pressed"] : "",
|
|
89
101
|
e ? t["th__wrapper--clickable"] : "",
|
|
90
|
-
|
|
102
|
+
o
|
|
91
103
|
);
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
-
|
|
104
|
+
return /* @__PURE__ */ a("th", { ...n, className: t[`cell--${_}-alignment`], children: /* @__PURE__ */ a("span", { className: m, onClick: e && (() => i(!c)), children: e ? /* @__PURE__ */ b(
|
|
105
|
+
f,
|
|
94
106
|
{
|
|
95
|
-
onClose: () =>
|
|
107
|
+
onClose: () => i(!1),
|
|
96
108
|
onSort: e,
|
|
97
|
-
show:
|
|
98
|
-
sortType:
|
|
99
|
-
className:
|
|
100
|
-
t:
|
|
109
|
+
show: c,
|
|
110
|
+
sortType: r,
|
|
111
|
+
className: s,
|
|
112
|
+
t: d,
|
|
101
113
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ a("span", { children: p }),
|
|
115
|
+
/* @__PURE__ */ a("span", { className: t["th__sort-icon-container"], children: /* @__PURE__ */ a(C, {}) })
|
|
104
116
|
]
|
|
105
117
|
}
|
|
106
|
-
) : /* @__PURE__ */
|
|
118
|
+
) : /* @__PURE__ */ a("span", { children: p }) }) });
|
|
107
119
|
};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
l.THead = H;
|
|
121
|
+
l.THead.displayName = "Table.THead";
|
|
122
|
+
l.TBody = P;
|
|
123
|
+
l.TBody.displayName = "Table.TBody";
|
|
124
|
+
l.Tr = D;
|
|
125
|
+
l.Tr.displayName = "Table.Tr";
|
|
126
|
+
l.Td = M;
|
|
127
|
+
l.Td.displayName = "Table.Td";
|
|
128
|
+
l.Th = O;
|
|
129
|
+
l.Th.displayName = "Table.Th";
|
|
118
130
|
export {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
131
|
+
P as TBody,
|
|
132
|
+
H as THead,
|
|
133
|
+
l as Table,
|
|
134
|
+
M as Td,
|
|
135
|
+
O as Th,
|
|
136
|
+
D as Tr
|
|
125
137
|
};
|
|
@@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: {
|
|
6
|
-
({ children, theme, fullWidth, className, paginationProps,
|
|
6
|
+
({ children, theme, fullWidth, className, paginationProps, language, translations, ...rest }: import('./Table').TableProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
THead: import('react').FunctionComponent<import('./Table').ChildrenProps>;
|
|
8
8
|
TBody: import('react').FunctionComponent<import('./Table').ChildrenProps>;
|
|
9
9
|
Tr: import('react').FunctionComponent<import('./Table').TrProps>;
|
|
@@ -4,13 +4,11 @@ export interface TabProps {
|
|
|
4
4
|
/** The value to be showing in the tab */
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
/** The value that corresponds to the panel to show.
|
|
7
|
-
* e.g. value="1" when this tab is clicked it will show the panel which also has value="1
|
|
7
|
+
* e.g. value="1" when this tab is clicked it will show the panel which also has value="1! */
|
|
8
8
|
value: string | number;
|
|
9
9
|
/** Disable clicking the tab */
|
|
10
10
|
disabled?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
/** Id to be applied as `data-testid` on the container element */
|
|
14
|
-
'data-testid'?: string;
|
|
11
|
+
/** data test id */
|
|
12
|
+
dataTestId?: string;
|
|
15
13
|
}
|
|
16
14
|
export declare const Tab: import('react').ForwardRefExoticComponent<TabProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as N } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as f from "react";
|
|
3
3
|
import { forwardRef as H, useContext as U, useMemo as j } from "react";
|
|
4
4
|
import { c as k } from "../../clsx-DB4S2d7J.js";
|
|
5
|
-
import { u as B, T as D, s as y } from "../../Tabs.module-
|
|
6
|
-
import { g as L, a as W, u as O, f as $, b as
|
|
7
|
-
import { u as J, c as K } from "../../combineHooksSlotProps-
|
|
5
|
+
import { u as B, T as D, s as y } from "../../Tabs.module-jkH1Qjn7.js";
|
|
6
|
+
import { g as L, a as W, u as O, f as $, b as d, _ as q, c as z, P as e, d as A, e as G } from "../../useSlotProps-kRhf7Gil.js";
|
|
7
|
+
import { u as J, c as K } from "../../combineHooksSlotProps-BtBYUV_B.js";
|
|
8
8
|
import { u as Q } from "../../useId-BW-oWmul.js";
|
|
9
|
-
import { u as X } from "../../useButton-
|
|
9
|
+
import { u as X } from "../../useButton-Bn3MNH8I.js";
|
|
10
10
|
import { u as Y } from "../../useCompoundItem-B7Eo_qZk.js";
|
|
11
11
|
const E = "Tab";
|
|
12
12
|
function Z(o) {
|
|
@@ -22,27 +22,27 @@ function te(o) {
|
|
|
22
22
|
rootRef: s,
|
|
23
23
|
disabled: n = !1,
|
|
24
24
|
id: c
|
|
25
|
-
} = o,
|
|
26
|
-
value:
|
|
25
|
+
} = o, a = f.useRef(null), r = Q(c), {
|
|
26
|
+
value: b,
|
|
27
27
|
selectionFollowsFocus: p,
|
|
28
28
|
getTabPanelId: m
|
|
29
|
-
} = B(), P =
|
|
29
|
+
} = B(), P = f.useMemo(() => ({
|
|
30
30
|
disabled: n,
|
|
31
|
-
ref:
|
|
32
|
-
id:
|
|
33
|
-
}), [n,
|
|
31
|
+
ref: a,
|
|
32
|
+
id: r
|
|
33
|
+
}), [n, a, r]), {
|
|
34
34
|
id: l,
|
|
35
35
|
index: R,
|
|
36
36
|
totalItemCount: g
|
|
37
37
|
} = Y(t ?? ee, P), {
|
|
38
38
|
getRootProps: h,
|
|
39
39
|
highlighted: T,
|
|
40
|
-
selected:
|
|
40
|
+
selected: i
|
|
41
41
|
} = J({
|
|
42
42
|
item: l
|
|
43
43
|
}), {
|
|
44
44
|
getRootProps: C,
|
|
45
|
-
rootRef:
|
|
45
|
+
rootRef: u,
|
|
46
46
|
active: v,
|
|
47
47
|
focusVisible: I,
|
|
48
48
|
setFocusVisible: V
|
|
@@ -50,15 +50,15 @@ function te(o) {
|
|
|
50
50
|
disabled: n,
|
|
51
51
|
focusableWhenDisabled: !p,
|
|
52
52
|
type: "button"
|
|
53
|
-
}), _ = O(
|
|
53
|
+
}), _ = O(a, s, u), M = l !== void 0 ? m(l) : void 0;
|
|
54
54
|
return {
|
|
55
55
|
getRootProps: (x = {}) => {
|
|
56
56
|
const S = $(x), w = K(h, C);
|
|
57
|
-
return
|
|
57
|
+
return d({}, x, w(S), {
|
|
58
58
|
role: "tab",
|
|
59
59
|
"aria-controls": M,
|
|
60
|
-
"aria-selected":
|
|
61
|
-
id:
|
|
60
|
+
"aria-selected": i,
|
|
61
|
+
id: r,
|
|
62
62
|
ref: _
|
|
63
63
|
});
|
|
64
64
|
},
|
|
@@ -69,7 +69,7 @@ function te(o) {
|
|
|
69
69
|
rootRef: _,
|
|
70
70
|
// the `selected` state isn't set on the server (it relies on effects to be calculated),
|
|
71
71
|
// so we fall back to checking the `value` prop with the selectedValue from the TabsContext
|
|
72
|
-
selected:
|
|
72
|
+
selected: i || l === b,
|
|
73
73
|
setFocusVisible: V,
|
|
74
74
|
totalTabsCount: g
|
|
75
75
|
};
|
|
@@ -82,39 +82,39 @@ const oe = ["action", "children", "disabled", "onChange", "onClick", "onFocus",
|
|
|
82
82
|
return A({
|
|
83
83
|
root: ["root", t && "selected", s && "disabled"]
|
|
84
84
|
}, G(Z));
|
|
85
|
-
}, F = /* @__PURE__ */
|
|
85
|
+
}, F = /* @__PURE__ */ f.forwardRef(function(t, s) {
|
|
86
86
|
var n;
|
|
87
87
|
const {
|
|
88
88
|
children: c,
|
|
89
|
-
disabled:
|
|
90
|
-
slotProps:
|
|
91
|
-
slots:
|
|
89
|
+
disabled: a = !1,
|
|
90
|
+
slotProps: r = {},
|
|
91
|
+
slots: b = {},
|
|
92
92
|
value: p
|
|
93
|
-
} = t, m = q(t, oe), P =
|
|
93
|
+
} = t, m = q(t, oe), P = f.useRef(), l = O(P, s), {
|
|
94
94
|
active: R,
|
|
95
95
|
highlighted: g,
|
|
96
96
|
selected: h,
|
|
97
97
|
getRootProps: T
|
|
98
|
-
} = te(
|
|
98
|
+
} = te(d({}, t, {
|
|
99
99
|
rootRef: l,
|
|
100
100
|
value: p
|
|
101
|
-
})),
|
|
101
|
+
})), i = d({}, t, {
|
|
102
102
|
active: R,
|
|
103
|
-
disabled:
|
|
103
|
+
disabled: a,
|
|
104
104
|
highlighted: g,
|
|
105
105
|
selected: h
|
|
106
|
-
}), C = se(
|
|
107
|
-
elementType:
|
|
106
|
+
}), C = se(i), u = (n = b.root) != null ? n : "button", v = z({
|
|
107
|
+
elementType: u,
|
|
108
108
|
getSlotProps: T,
|
|
109
|
-
externalSlotProps:
|
|
109
|
+
externalSlotProps: r.root,
|
|
110
110
|
externalForwardedProps: m,
|
|
111
111
|
additionalProps: {
|
|
112
112
|
ref: s
|
|
113
113
|
},
|
|
114
|
-
ownerState:
|
|
114
|
+
ownerState: i,
|
|
115
115
|
className: C.root
|
|
116
116
|
});
|
|
117
|
-
return /* @__PURE__ */ N(
|
|
117
|
+
return /* @__PURE__ */ N(u, d({}, v, {
|
|
118
118
|
children: c
|
|
119
119
|
}));
|
|
120
120
|
});
|
|
@@ -165,17 +165,16 @@ process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
|
165
165
|
value: e.oneOfType([e.number, e.string])
|
|
166
166
|
});
|
|
167
167
|
const pe = H(
|
|
168
|
-
({ children: o, value: t, disabled: s,
|
|
169
|
-
const a = U(D),
|
|
168
|
+
({ children: o, value: t, disabled: s, dataTestId: n }, c) => {
|
|
169
|
+
const a = U(D), r = j(
|
|
170
170
|
() => k(
|
|
171
171
|
y.tabs__tab,
|
|
172
172
|
t === (a == null ? void 0 : a.value) && y["tabs__tab--selected"],
|
|
173
|
-
s && y["tabs__tab--disabled"]
|
|
174
|
-
n
|
|
173
|
+
s && y["tabs__tab--disabled"]
|
|
175
174
|
),
|
|
176
175
|
[t, a, s]
|
|
177
176
|
);
|
|
178
|
-
return /* @__PURE__ */ N(F, { className:
|
|
177
|
+
return /* @__PURE__ */ N(F, { className: r, disabled: s, value: t, "data-testid": n, ref: c, children: o });
|
|
179
178
|
}
|
|
180
179
|
);
|
|
181
180
|
export {
|
|
@@ -6,9 +6,7 @@ export interface TabPanelProps {
|
|
|
6
6
|
/** The value that identifies which tab is selected.
|
|
7
7
|
* e.g. value="1" when the tab button with the value="1" is selected this content will show */
|
|
8
8
|
value: string | number;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/** Id to be applied as `data-testid` on the container element */
|
|
12
|
-
'data-testid'?: string;
|
|
9
|
+
/** Test id */
|
|
10
|
+
dataTestId?: string;
|
|
13
11
|
}
|
|
14
12
|
export declare const TabPanel: import('react').ForwardRefExoticComponent<TabPanelProps & import('react').RefAttributes<HTMLDivElement>>;
|