@pismo/marola 1.0.0-beta.6 → 1.0.0-beta.62
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-2b1peDFT.js → Button-BAljjMv3.js} +2 -2
- package/dist/{ClickAwayListener-BSW-Nd-y.js → ClickAwayListener-DbEYZpyh.js} +4 -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-B6ZSGIEI.js → Popup-Ck3XlWMq.js} +3 -3
- package/dist/{Portal-DIeBsWdL.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/Adornment.css +1 -0
- package/dist/assets/Advice.css +1 -1
- package/dist/assets/Autocomplete.css +1 -0
- 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/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/TextDisplay.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-DVjg9PRh.js → combineHooksSlotProps-C-zYvfnF.js} +1 -1
- package/dist/components/Adornment/Adornment.d.ts +20 -0
- package/dist/components/Adornment/Adornment.js +13 -0
- 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/Autocomplete/Autocomplete.d.ts +20 -0
- package/dist/components/Autocomplete/Autocomplete.js +679 -0
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +23 -0
- 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 -12
- package/dist/components/Chip/Chip.js +12 -7
- 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 +15 -0
- package/dist/components/Description/Description.js +54 -0
- package/dist/components/Description/Description.stories.d.ts +18 -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 -166
- package/dist/components/Dialog/Dialog.stories.d.ts +115 -109
- 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 +2 -1
- package/dist/components/Icon/Icon.js +315 -47
- 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 +319 -304
- 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 +72 -65
- 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/ResultWithChips/ResultWithChips.d.ts +12 -0
- package/dist/components/ResultWithChips/ResultWithChips.js +33 -0
- package/dist/components/RowItem/RowItem.d.ts +25 -0
- package/dist/components/RowItem/RowItem.js +23 -0
- 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 -413
- 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 +94 -94
- package/dist/components/Snackbar/Snackbar.stories.d.ts +3 -3
- 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 +38 -36
- package/dist/components/Tabs/TabPanel.d.ts +4 -2
- package/dist/components/Tabs/TabPanel.js +51 -40
- package/dist/components/Tabs/Tabs.d.ts +6 -4
- package/dist/components/Tabs/Tabs.js +131 -128
- package/dist/components/TextDisplay/TextDisplay.d.ts +9 -3
- package/dist/components/TextDisplay/TextDisplay.js +45 -31
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +2 -1
- package/dist/components/Toggle/Toggle.js +56 -56
- 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 +9 -5
- 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/{index-CjW42-M-.js → index-bQFToy-I.js} +1 -1
- package/dist/main.d.ts +9 -0
- package/dist/main.js +91 -76
- package/dist/marola.css +1 -1
- package/dist/ownerDocument-YGhwAnr1.js +33 -0
- package/dist/{useButton-DNk3wrQp.js → useButton-DcihopJG.js} +1 -1
- package/dist/useCompoundItem-B7Eo_qZk.js +68 -0
- package/dist/useEventCallback-BAQJJ3ye.js +14 -0
- package/dist/useId-BW-oWmul.js +19 -0
- package/dist/{useList-B0hog_3-.js → useList-B9C55YB7.js} +2 -2
- package/dist/{index-CH45lKw7.js → useSlotProps-C_I1kEHr.js} +99 -99
- package/package.json +22 -13
- package/dist/Dialog.module-DFEmFdYT.js +0 -30
- package/dist/Group-B3p31ftp.js +0 -26
- package/dist/SelectButton-K3OIfR5m.js +0 -61
- package/dist/Toggle-BCgIItCc.js +0 -142
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useEventCallback-xTG9piMa.js +0 -45
|
@@ -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 s, jsxs as g } from "react/jsx-runtime";
|
|
3
|
+
import { c as r } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
const d = "_stepper_7fsnr_61", m = "_item_7fsnr_61", c = "_name_7fsnr_61", l = "_counter_7fsnr_65", t = {
|
|
5
|
+
"u-typography-h1": "_u-typography-h1_7fsnr_1",
|
|
6
|
+
"u-typography-h2": "_u-typography-h2_7fsnr_8",
|
|
7
|
+
"u-typography-h3": "_u-typography-h3_7fsnr_15",
|
|
8
|
+
"u-typography-h4": "_u-typography-h4_7fsnr_22",
|
|
9
|
+
"u-typography-h5": "_u-typography-h5_7fsnr_29",
|
|
10
|
+
"u-typography-h6": "_u-typography-h6_7fsnr_36",
|
|
11
|
+
"u-typography-base": "_u-typography-base_7fsnr_43",
|
|
12
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_7fsnr_49",
|
|
13
|
+
"u-typography-base--xl": "_u-typography-base--xl_7fsnr_53",
|
|
14
|
+
"u-typography-base--lg": "_u-typography-base--lg_7fsnr_57",
|
|
15
|
+
"u-typography-base--sm": "_u-typography-base--sm_7fsnr_61",
|
|
16
|
+
stepper: d,
|
|
17
|
+
item: m,
|
|
18
|
+
name: c,
|
|
19
|
+
"u-typography-base--bold": "_u-typography-base--bold_7fsnr_65",
|
|
20
|
+
"item--active": "_item--active_7fsnr_65",
|
|
21
|
+
"item--completed": "_item--completed_7fsnr_65",
|
|
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_7fsnr_68",
|
|
24
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_7fsnr_71",
|
|
25
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_7fsnr_74"
|
|
26
|
+
}, v = ({ currentStep: p = 0, steps: _, classNameItem: y, classNameCounter: o, classNameName: h, ...e }) => /* @__PURE__ */ s("div", { className: r(t.stepper, e.className), "data-testid": e["data-testid"], children: _.map((n, a) => {
|
|
27
|
+
const u = a < p, i = a === p;
|
|
28
|
+
return /* @__PURE__ */ g(
|
|
29
29
|
"div",
|
|
30
30
|
{
|
|
31
|
-
className:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
className: r(
|
|
32
|
+
t.item,
|
|
33
|
+
u && t["item--completed"],
|
|
34
|
+
i && t["item--active"],
|
|
35
|
+
y
|
|
36
36
|
),
|
|
37
|
-
"data-testid":
|
|
37
|
+
"data-testid": e["data-testid-item"],
|
|
38
38
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ s("div", { className: r(t.counter, o), "data-testid": e["data-testid-counter"], children: a + 1 }),
|
|
40
|
+
/* @__PURE__ */ s("div", { className: r(t.name, h), "data-testid": e["data-testid-name"], children: n })
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
|
-
|
|
43
|
+
a
|
|
44
44
|
);
|
|
45
45
|
}) });
|
|
46
46
|
export {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type StepperNavigatorLang = 'en' | 'pt';
|
|
3
|
+
export type StepperNavigatorButtonProps = {
|
|
4
|
+
leftIcon?: React.ReactNode;
|
|
5
|
+
rightIcon?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
'data-testid'?: string;
|
|
8
|
+
};
|
|
9
|
+
export type StepperNavigatorProps = {
|
|
10
|
+
/** Hides the "previous" button */
|
|
11
|
+
hidePrevious?: boolean;
|
|
12
|
+
/** Hides the "cancel" button */
|
|
13
|
+
hideCancel?: boolean;
|
|
14
|
+
/** Hides the "next" button */
|
|
15
|
+
hideNext?: boolean;
|
|
16
|
+
/** Hides the "finish" button */
|
|
17
|
+
hideFinish?: boolean;
|
|
18
|
+
/** Disables the "previous" button */
|
|
19
|
+
disablePrevious?: boolean;
|
|
20
|
+
/** Disables the "cancel" button */
|
|
21
|
+
disableCancel?: boolean;
|
|
22
|
+
/** Disables the "next" button */
|
|
23
|
+
disableNext?: boolean;
|
|
24
|
+
/** Disables the "finish" button */
|
|
25
|
+
disableFinish?: boolean;
|
|
26
|
+
/** Label to be used for the "previous" button */
|
|
27
|
+
labelPrevious?: string;
|
|
28
|
+
/** Label to be used for the "cancel" button */
|
|
29
|
+
labelCancel?: string;
|
|
30
|
+
/** Label to be used for the "next" button */
|
|
31
|
+
labelNext?: string;
|
|
32
|
+
/** Label to be used for the "finish" button */
|
|
33
|
+
labelFinish?: string;
|
|
34
|
+
/** Language to be used for the button labels. Default "en" */
|
|
35
|
+
lang?: StepperNavigatorLang;
|
|
36
|
+
/** CSS classes to be applied on the container element */
|
|
37
|
+
className?: string;
|
|
38
|
+
/** Id to be applied as `data-testid` on the container element */
|
|
39
|
+
'data-testid'?: string;
|
|
40
|
+
/** Previous button props */
|
|
41
|
+
previousButtonProps?: StepperNavigatorButtonProps;
|
|
42
|
+
/** Cancel button props */
|
|
43
|
+
cancelButtonProps?: StepperNavigatorButtonProps;
|
|
44
|
+
/** Next button props */
|
|
45
|
+
nextButtonProps?: StepperNavigatorButtonProps;
|
|
46
|
+
/** Finish button props */
|
|
47
|
+
finishButtonProps?: StepperNavigatorButtonProps;
|
|
48
|
+
/** Callback to be called when the "previous" button is clicked */
|
|
49
|
+
onPrevious?: () => void;
|
|
50
|
+
/** Callback to be called when the "cancel" button is clicked */
|
|
51
|
+
onCancel?: () => void;
|
|
52
|
+
/** Callback to be called when the "next" button is clicked */
|
|
53
|
+
onNext?: () => void;
|
|
54
|
+
/** Callback to be called when the "finish" button is clicked */
|
|
55
|
+
onFinish?: () => void;
|
|
56
|
+
};
|
|
57
|
+
export declare const StepperNavigator: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, previousButtonProps, cancelButtonProps, nextButtonProps, finishButtonProps, onNext, onPrevious, onCancel, onFinish, }: StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import '../../assets/StepperNavigator.css';
|
|
2
|
+
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { c as i } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import { Button as I } from "../Button/Button.js";
|
|
5
|
+
import { Icon as K } from "../Icon/Icon.js";
|
|
6
|
+
const _ = {
|
|
7
|
+
"stepper-navigator": "_stepper-navigator_27f6m_1",
|
|
8
|
+
"cancel-button": "_cancel-button_27f6m_11",
|
|
9
|
+
"previous-button": "_previous-button_27f6m_20",
|
|
10
|
+
"next-button": "_next-button_27f6m_39",
|
|
11
|
+
"finish-button": "_finish-button_27f6m_40"
|
|
12
|
+
}, b = {
|
|
13
|
+
en: {
|
|
14
|
+
previous: "Previous",
|
|
15
|
+
cancel: "Cancel",
|
|
16
|
+
next: "Next",
|
|
17
|
+
finish: "Finish"
|
|
18
|
+
},
|
|
19
|
+
pt: {
|
|
20
|
+
previous: "Anterior",
|
|
21
|
+
cancel: "Cancelar",
|
|
22
|
+
next: "Próximo",
|
|
23
|
+
finish: "Finalizar"
|
|
24
|
+
}
|
|
25
|
+
}, R = ({
|
|
26
|
+
hideNext: C = !1,
|
|
27
|
+
hidePrevious: j = !1,
|
|
28
|
+
hideCancel: z = !1,
|
|
29
|
+
hideFinish: w = !1,
|
|
30
|
+
disableNext: y = !1,
|
|
31
|
+
disablePrevious: A = !1,
|
|
32
|
+
disableCancel: S = !1,
|
|
33
|
+
disableFinish: q = !1,
|
|
34
|
+
lang: h = "en",
|
|
35
|
+
labelNext: N,
|
|
36
|
+
labelPrevious: f,
|
|
37
|
+
labelCancel: g,
|
|
38
|
+
labelFinish: k,
|
|
39
|
+
className: D,
|
|
40
|
+
"data-testid": E = "stepper-navigator",
|
|
41
|
+
previousButtonProps: d,
|
|
42
|
+
cancelButtonProps: c,
|
|
43
|
+
nextButtonProps: e = { rightIcon: /* @__PURE__ */ a(K, { icon: "circle-arrow-right", size: 24 }) },
|
|
44
|
+
finishButtonProps: m,
|
|
45
|
+
onNext: F = () => {
|
|
46
|
+
},
|
|
47
|
+
onPrevious: G = () => {
|
|
48
|
+
},
|
|
49
|
+
onCancel: H = () => {
|
|
50
|
+
},
|
|
51
|
+
onFinish: J = () => {
|
|
52
|
+
}
|
|
53
|
+
}) => (g = g || b[h].cancel, f = f || b[h].previous, N = N || b[h].next, k = k || b[h].finish, /* @__PURE__ */ l("div", { className: i(_["stepper-navigator"], D), "data-testid": E, children: [
|
|
54
|
+
j ? /* @__PURE__ */ a("span", {}) : /* @__PURE__ */ l(
|
|
55
|
+
I,
|
|
56
|
+
{
|
|
57
|
+
className: i(_["previous-button"], d == null ? void 0 : d.className),
|
|
58
|
+
"data-testid": d == null ? void 0 : d["data-testid"],
|
|
59
|
+
disabled: A,
|
|
60
|
+
onClick: G,
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ a("span", { children: d == null ? void 0 : d.leftIcon }),
|
|
63
|
+
/* @__PURE__ */ a("span", { children: f }),
|
|
64
|
+
/* @__PURE__ */ a("span", { children: d == null ? void 0 : d.rightIcon })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ l("span", { children: [
|
|
69
|
+
!z && /* @__PURE__ */ l(
|
|
70
|
+
I,
|
|
71
|
+
{
|
|
72
|
+
className: i(_["cancel-button"], c == null ? void 0 : c.className),
|
|
73
|
+
"data-testid": c == null ? void 0 : c["data-testid"],
|
|
74
|
+
disabled: S,
|
|
75
|
+
onClick: H,
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ a("span", { children: c == null ? void 0 : c.leftIcon }),
|
|
78
|
+
/* @__PURE__ */ a("span", { children: g }),
|
|
79
|
+
/* @__PURE__ */ a("span", { children: c == null ? void 0 : c.rightIcon })
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
!C && /* @__PURE__ */ l(
|
|
84
|
+
I,
|
|
85
|
+
{
|
|
86
|
+
className: i(_["next-button"], e == null ? void 0 : e.className),
|
|
87
|
+
"data-testid": e == null ? void 0 : e["data-testid"],
|
|
88
|
+
disabled: y,
|
|
89
|
+
onClick: F,
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ a("span", { children: e == null ? void 0 : e.leftIcon }),
|
|
92
|
+
/* @__PURE__ */ a("span", { children: N }),
|
|
93
|
+
/* @__PURE__ */ a("span", { children: e == null ? void 0 : e.rightIcon })
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
!w && /* @__PURE__ */ l(
|
|
98
|
+
I,
|
|
99
|
+
{
|
|
100
|
+
className: i(_["finish-button"], m == null ? void 0 : m.className),
|
|
101
|
+
"data-testid": m == null ? void 0 : m["data-testid"],
|
|
102
|
+
disabled: q,
|
|
103
|
+
onClick: J,
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ a("span", { children: m == null ? void 0 : m.leftIcon }),
|
|
106
|
+
/* @__PURE__ */ a("span", { children: k }),
|
|
107
|
+
/* @__PURE__ */ a("span", { children: m == null ? void 0 : m.rightIcon })
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
] })
|
|
112
|
+
] }));
|
|
113
|
+
export {
|
|
114
|
+
R as StepperNavigator
|
|
115
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, previousButtonProps, cancelButtonProps, nextButtonProps, finishButtonProps, onNext, onPrevious, onCancel, onFinish, }: import('./StepperNavigator').StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Simple: Story;
|
|
14
|
+
export declare const WithCustomLanguage: Story;
|
|
15
|
+
export declare const WithCustomLabels: Story;
|
|
16
|
+
export declare const Disabled: Story;
|
|
17
|
+
export declare const WithIcons: Story;
|
|
18
|
+
export declare const DefaultWithNoIcons: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -28,13 +28,15 @@ 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;
|
|
31
33
|
/** Set language */
|
|
32
34
|
language?: string;
|
|
33
35
|
/** Set translations to labels */
|
|
34
36
|
translations?: TableTranslations;
|
|
35
37
|
};
|
|
36
38
|
declare const Table: {
|
|
37
|
-
({ children, theme, fullWidth, className, paginationProps, language, translations, ...rest }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
({ children, theme, fullWidth, className, paginationProps, isFixed, language, translations, ...rest }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
38
40
|
THead: import('react').FunctionComponent<ChildrenProps>;
|
|
39
41
|
TBody: import('react').FunctionComponent<ChildrenProps>;
|
|
40
42
|
Tr: import('react').FunctionComponent<TrProps>;
|
|
@@ -1,53 +1,39 @@
|
|
|
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 y, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { useState as f } from "react";
|
|
5
|
+
import { c as m } from "../../clsx-DB4S2d7J.js";
|
|
6
|
+
import { paginationDefaultTranslations as b, Pagination as u } from "../Pagination/Pagination.js";
|
|
7
|
+
import { sortTooltipDefaultTranslations as T, SortTooltip as g } from "../SortTooltip/SortTooltip.js";
|
|
8
8
|
import { TableProvider as N, useTable as x } from "./TableContext.js";
|
|
9
|
-
const C = (
|
|
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",
|
|
9
|
+
const C = (r) => /* @__PURE__ */ c.createElement("svg", { width: 7, height: 10, viewBox: "0 0 7 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...r }, /* @__PURE__ */ c.createElement("g", { clipPath: "url(#clip0_2291_2457)" }, /* @__PURE__ */ c.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__ */ c.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__ */ c.createElement("defs", null, /* @__PURE__ */ c.createElement("clipPath", { id: "clip0_2291_2457" }, /* @__PURE__ */ c.createElement("rect", { width: 7, height: 10, fill: "white" })))), L = "_table_yerpo_1", E = "_th__wrapper_yerpo_43", v = "_tr_yerpo_66", B = "_td_yerpo_70", t = {
|
|
17
10
|
table: L,
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
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",
|
|
11
|
+
"table--fixed": "_table--fixed_yerpo_5",
|
|
12
|
+
"table--full-width": "_table--full-width_yerpo_8",
|
|
13
|
+
"table--white-theme": "_table--white-theme_yerpo_11",
|
|
14
|
+
"table--transparent-theme": "_table--transparent-theme_yerpo_14",
|
|
15
|
+
"cell--left-alignment": "_cell--left-alignment_yerpo_17",
|
|
16
|
+
"cell--center-alignment": "_cell--center-alignment_yerpo_21",
|
|
17
|
+
"cell--right-alignment": "_cell--right-alignment_yerpo_25",
|
|
32
18
|
th__wrapper: E,
|
|
33
|
-
"th__wrapper--pressed": "_th__wrapper--
|
|
34
|
-
"th__wrapper--clickable": "_th__wrapper--
|
|
35
|
-
"th__sort-icon-container": "_th__sort-icon-
|
|
36
|
-
"tr__row-or-cell--disabled": "_tr__row-or-cell--
|
|
37
|
-
tr:
|
|
38
|
-
td:
|
|
39
|
-
"tr__row-or-cell--clickable": "_tr__row-or-cell--
|
|
40
|
-
"td__row-or-cell--clickable": "_td__row-or-cell--
|
|
41
|
-
"td__row-or-cell--disabled": "_td__row-or-cell--
|
|
42
|
-
"td-wrapper": "_td-
|
|
43
|
-
},
|
|
19
|
+
"th__wrapper--pressed": "_th__wrapper--pressed_yerpo_48",
|
|
20
|
+
"th__wrapper--clickable": "_th__wrapper--clickable_yerpo_54",
|
|
21
|
+
"th__sort-icon-container": "_th__sort-icon-container_yerpo_57",
|
|
22
|
+
"tr__row-or-cell--disabled": "_tr__row-or-cell--disabled_yerpo_66",
|
|
23
|
+
tr: v,
|
|
24
|
+
td: B,
|
|
25
|
+
"tr__row-or-cell--clickable": "_tr__row-or-cell--clickable_yerpo_76",
|
|
26
|
+
"td__row-or-cell--clickable": "_td__row-or-cell--clickable_yerpo_77",
|
|
27
|
+
"td__row-or-cell--disabled": "_td__row-or-cell--disabled_yerpo_81",
|
|
28
|
+
"td-wrapper": "_td-wrapper_yerpo_85"
|
|
29
|
+
}, H = {
|
|
44
30
|
pt: {
|
|
45
|
-
...
|
|
46
|
-
...
|
|
31
|
+
...b.pt,
|
|
32
|
+
...T.pt
|
|
47
33
|
},
|
|
48
34
|
en: {
|
|
49
|
-
...
|
|
50
|
-
...
|
|
35
|
+
...b.en,
|
|
36
|
+
...T.en
|
|
51
37
|
},
|
|
52
38
|
// example to add a new language translation
|
|
53
39
|
es: {
|
|
@@ -59,79 +45,81 @@ const C = (p) => /* @__PURE__ */ h.createElement("svg", { width: 7, height: 10,
|
|
|
59
45
|
of: "de",
|
|
60
46
|
results: "resultados"
|
|
61
47
|
}
|
|
62
|
-
},
|
|
63
|
-
children:
|
|
48
|
+
}, o = ({
|
|
49
|
+
children: r,
|
|
64
50
|
theme: e = "white",
|
|
65
|
-
fullWidth:
|
|
66
|
-
className:
|
|
67
|
-
paginationProps:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
51
|
+
fullWidth: a = !0,
|
|
52
|
+
className: s,
|
|
53
|
+
paginationProps: _,
|
|
54
|
+
isFixed: n,
|
|
55
|
+
language: p,
|
|
56
|
+
translations: w,
|
|
57
|
+
...i
|
|
71
58
|
}) => {
|
|
72
|
-
const
|
|
59
|
+
const d = m(
|
|
73
60
|
t.table,
|
|
74
|
-
|
|
61
|
+
a && t["table--full-width"],
|
|
62
|
+
n && t["table--fixed"],
|
|
75
63
|
t[`table--${e}-theme`],
|
|
76
|
-
|
|
77
|
-
),
|
|
78
|
-
return /* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
64
|
+
s
|
|
65
|
+
), h = p && H[p] || w;
|
|
66
|
+
return /* @__PURE__ */ y(N, { initialTranslations: h, children: [
|
|
67
|
+
/* @__PURE__ */ l("table", { ...i, className: d, children: r }),
|
|
68
|
+
_ && /* @__PURE__ */ l(u, { ..._, t: h })
|
|
81
69
|
] });
|
|
82
|
-
},
|
|
83
|
-
const
|
|
70
|
+
}, P = ({ children: r, ...e }) => /* @__PURE__ */ l("thead", { ...e, children: r }), D = ({ children: r, ...e }) => /* @__PURE__ */ l("tbody", { ...e, children: r }), M = ({ children: r, onClick: e, disabled: a, className: s, ..._ }) => {
|
|
71
|
+
const n = m(
|
|
84
72
|
t.tr,
|
|
85
|
-
e && !
|
|
86
|
-
|
|
73
|
+
e && !a ? t["tr__row-or-cell--clickable"] : a ? t["tr__row-or-cell--disabled"] : "",
|
|
74
|
+
s
|
|
87
75
|
);
|
|
88
|
-
return /* @__PURE__ */
|
|
89
|
-
},
|
|
90
|
-
const
|
|
76
|
+
return /* @__PURE__ */ l("tr", { ..._, className: n, onClick: () => !a && (e == null ? void 0 : e()), children: r });
|
|
77
|
+
}, O = ({ children: r, onClick: e, disabled: a, className: s, align: _ = "left", ...n }) => {
|
|
78
|
+
const p = m(
|
|
91
79
|
t.td,
|
|
92
|
-
e && !
|
|
93
|
-
t[`cell--${
|
|
94
|
-
|
|
80
|
+
e && !a ? t["td__row-or-cell--clickable"] : a ? t["td__row-or-cell--disabled"] : "",
|
|
81
|
+
t[`cell--${_}-alignment`],
|
|
82
|
+
s
|
|
95
83
|
);
|
|
96
|
-
return /* @__PURE__ */
|
|
97
|
-
},
|
|
98
|
-
const { translations:
|
|
84
|
+
return /* @__PURE__ */ l("td", { ...n, className: p, onClick: () => !a && (e == null ? void 0 : e()), children: /* @__PURE__ */ l("span", { className: t["td-wrapper"], children: r }) });
|
|
85
|
+
}, $ = ({ children: r, onSort: e, sortType: a, className: s, classNameTooltip: _, align: n = "left", ...p }) => {
|
|
86
|
+
const { translations: w } = x(), [i, d] = f(!1), h = m(
|
|
99
87
|
t.th__wrapper,
|
|
100
|
-
|
|
88
|
+
i ? t["th__wrapper--pressed"] : "",
|
|
101
89
|
e ? t["th__wrapper--clickable"] : "",
|
|
102
|
-
|
|
90
|
+
s
|
|
103
91
|
);
|
|
104
|
-
return /* @__PURE__ */
|
|
105
|
-
|
|
92
|
+
return /* @__PURE__ */ l("th", { ...p, className: t[`cell--${n}-alignment`], children: /* @__PURE__ */ l("span", { className: h, onClick: e && (() => d(!i)), children: e ? /* @__PURE__ */ y(
|
|
93
|
+
g,
|
|
106
94
|
{
|
|
107
|
-
onClose: () =>
|
|
95
|
+
onClose: () => d(!1),
|
|
108
96
|
onSort: e,
|
|
109
|
-
show:
|
|
110
|
-
sortType:
|
|
111
|
-
className:
|
|
112
|
-
t:
|
|
97
|
+
show: i,
|
|
98
|
+
sortType: a,
|
|
99
|
+
className: _,
|
|
100
|
+
t: w,
|
|
113
101
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ l("span", { children: r }),
|
|
103
|
+
/* @__PURE__ */ l("span", { className: t["th__sort-icon-container"], children: /* @__PURE__ */ l(C, { width: 12, height: 12 }) })
|
|
116
104
|
]
|
|
117
105
|
}
|
|
118
|
-
) : /* @__PURE__ */
|
|
106
|
+
) : /* @__PURE__ */ l("span", { children: r }) }) });
|
|
119
107
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
108
|
+
o.THead = P;
|
|
109
|
+
o.THead.displayName = "Table.THead";
|
|
110
|
+
o.TBody = D;
|
|
111
|
+
o.TBody.displayName = "Table.TBody";
|
|
112
|
+
o.Tr = M;
|
|
113
|
+
o.Tr.displayName = "Table.Tr";
|
|
114
|
+
o.Td = O;
|
|
115
|
+
o.Td.displayName = "Table.Td";
|
|
116
|
+
o.Th = $;
|
|
117
|
+
o.Th.displayName = "Table.Th";
|
|
130
118
|
export {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
119
|
+
D as TBody,
|
|
120
|
+
P as THead,
|
|
121
|
+
o as Table,
|
|
122
|
+
O as Td,
|
|
123
|
+
$ as Th,
|
|
124
|
+
M as Tr
|
|
137
125
|
};
|
|
@@ -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, language, translations, ...rest }: import('./Table').TableProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
({ children, theme, fullWidth, className, paginationProps, isFixed, 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,11 +4,13 @@ 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
|
-
|
|
11
|
+
/** CSS classes to be applied on the container element */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Id to be applied as `data-testid` on the container element */
|
|
14
|
+
'data-testid'?: string;
|
|
13
15
|
}
|
|
14
16
|
export declare const Tab: import('react').ForwardRefExoticComponent<TabProps & import('react').RefAttributes<HTMLButtonElement>>;
|