@pismo/marola 1.0.0-beta.3 → 1.0.0-beta.31
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-D9e4RsKo.js +30 -0
- package/dist/{Popup-B6ZSGIEI.js → Popup-Ck3XlWMq.js} +3 -3
- package/dist/{Portal-DIeBsWdL.js → Portal-oY3enyAm.js} +2 -2
- package/dist/SelectButton-BlVl6pJn.js +70 -0
- package/dist/{Tabs.module-jkH1Qjn7.js → Tabs.module-BGGTkDc5.js} +7 -7
- package/dist/Toggle-Buew6bzm.js +182 -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/Button.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Dialog.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/ResultWithChips.css +1 -0
- package/dist/assets/SelectButton.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/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 +7 -5
- package/dist/components/Chip/Chip.stories.d.ts +5 -14
- 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 +9 -6
- package/dist/components/Dialog/Dialog.js +139 -139
- package/dist/components/Dialog/Dialog.stories.d.ts +50 -46
- package/dist/components/Dialog/DialogTitle.js +1 -1
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +2 -1
- package/dist/components/Icon/Icon.js +105 -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 +24 -5
- package/dist/components/Input/Input.js +297 -284
- package/dist/components/Input/Input.stories.d.ts +2 -21
- package/dist/components/InputSearch/InputSearch.stories.d.ts +1 -21
- package/dist/components/PageHeader/PageHeader.js +57 -57
- package/dist/components/Pagination/Pagination.d.ts +5 -1
- package/dist/components/Pagination/Pagination.js +87 -185
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
- package/dist/components/Pagination/usePagination.d.ts +90 -0
- package/dist/components/Pagination/usePagination.js +79 -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 +20 -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 +7 -0
- package/dist/components/Select/Select.js +409 -365
- package/dist/components/Select/SelectButton.d.ts +1 -0
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +3 -1
- package/dist/components/Skeleton/Skeleton.js +18 -12
- 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 +43 -0
- package/dist/components/StepperNavigator/StepperNavigator.js +56 -0
- package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +16 -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 +88 -85
- 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/Toggle.js +5 -4
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- 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 +5 -0
- package/dist/main.js +85 -76
- 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 +9 -3
- package/dist/Dialog.module-DFEmFdYT.js +0 -30
- package/dist/SelectButton-C8JQKaf4.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,43 @@
|
|
|
1
|
+
type StepperNavigatorLang = 'en' | 'pt';
|
|
2
|
+
export type StepperNavigatorProps = {
|
|
3
|
+
/** Hides the "previous" button */
|
|
4
|
+
hidePrevious?: boolean;
|
|
5
|
+
/** Hides the "cancel" button */
|
|
6
|
+
hideCancel?: boolean;
|
|
7
|
+
/** Hides the "next" button */
|
|
8
|
+
hideNext?: boolean;
|
|
9
|
+
/** Hides the "finish" button */
|
|
10
|
+
hideFinish?: boolean;
|
|
11
|
+
/** Disables the "previous" button */
|
|
12
|
+
disablePrevious?: boolean;
|
|
13
|
+
/** Disables the "cancel" button */
|
|
14
|
+
disableCancel?: boolean;
|
|
15
|
+
/** Disables the "next" button */
|
|
16
|
+
disableNext?: boolean;
|
|
17
|
+
/** Disables the "finish" button */
|
|
18
|
+
disableFinish?: boolean;
|
|
19
|
+
/** Label to be used for the "previous" button */
|
|
20
|
+
labelPrevious?: string;
|
|
21
|
+
/** Label to be used for the "cancel" button */
|
|
22
|
+
labelCancel?: string;
|
|
23
|
+
/** Label to be used for the "next" button */
|
|
24
|
+
labelNext?: string;
|
|
25
|
+
/** Label to be used for the "finish" button */
|
|
26
|
+
labelFinish?: string;
|
|
27
|
+
/** Language to be used for the button labels. Default "en" */
|
|
28
|
+
lang?: StepperNavigatorLang;
|
|
29
|
+
/** Callback to be called when the "previous" button is clicked */
|
|
30
|
+
onPrevious?: () => void;
|
|
31
|
+
/** Callback to be called when the "cancel" button is clicked */
|
|
32
|
+
onCancel?: () => void;
|
|
33
|
+
/** Callback to be called when the "next" button is clicked */
|
|
34
|
+
onNext?: () => void;
|
|
35
|
+
/** Callback to be called when the "finish" button is clicked */
|
|
36
|
+
onFinish?: () => void;
|
|
37
|
+
/** CSS classes to be applied on the container element */
|
|
38
|
+
className?: string;
|
|
39
|
+
/** Id to be applied as `data-testid` on the container element */
|
|
40
|
+
'data-testid'?: string;
|
|
41
|
+
};
|
|
42
|
+
export declare const StepperNavigator: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, onNext, onPrevious, onCancel, onFinish, }: StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import '../../assets/StepperNavigator.css';
|
|
2
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { c as g } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import { Button as t } from "../Button/Button.js";
|
|
5
|
+
const c = {
|
|
6
|
+
"stepper-navigator": "_stepper-navigator_1ouny_1",
|
|
7
|
+
"cancel-button": "_cancel-button_1ouny_11",
|
|
8
|
+
"previous-button": "_previous-button_1ouny_20"
|
|
9
|
+
}, n = {
|
|
10
|
+
en: {
|
|
11
|
+
previous: "Previous",
|
|
12
|
+
cancel: "Cancel",
|
|
13
|
+
next: "Next",
|
|
14
|
+
finish: "Finish"
|
|
15
|
+
},
|
|
16
|
+
pt: {
|
|
17
|
+
previous: "Anterior",
|
|
18
|
+
cancel: "Cancelar",
|
|
19
|
+
next: "Próximo",
|
|
20
|
+
finish: "Finalizar"
|
|
21
|
+
}
|
|
22
|
+
}, B = ({
|
|
23
|
+
hideNext: d = !1,
|
|
24
|
+
hidePrevious: l = !1,
|
|
25
|
+
hideCancel: u = !1,
|
|
26
|
+
hideFinish: f = !1,
|
|
27
|
+
disableNext: v = !1,
|
|
28
|
+
disablePrevious: m = !1,
|
|
29
|
+
disableCancel: _ = !1,
|
|
30
|
+
disableFinish: h = !1,
|
|
31
|
+
lang: s = "en",
|
|
32
|
+
labelNext: i,
|
|
33
|
+
labelPrevious: o,
|
|
34
|
+
labelCancel: r,
|
|
35
|
+
labelFinish: a,
|
|
36
|
+
className: x,
|
|
37
|
+
"data-testid": k = "stepper-navigator",
|
|
38
|
+
onNext: y = () => {
|
|
39
|
+
},
|
|
40
|
+
onPrevious: C = () => {
|
|
41
|
+
},
|
|
42
|
+
onCancel: b = () => {
|
|
43
|
+
},
|
|
44
|
+
onFinish: N = () => {
|
|
45
|
+
}
|
|
46
|
+
}) => (r = r || n[s].cancel, o = o || n[s].previous, i = i || n[s].next, a = a || n[s].finish, /* @__PURE__ */ p("div", { className: g(c["stepper-navigator"], x), "data-testid": k, children: [
|
|
47
|
+
l ? /* @__PURE__ */ e("span", {}) : /* @__PURE__ */ e(t, { className: c["previous-button"], disabled: m, onClick: C, children: o }),
|
|
48
|
+
/* @__PURE__ */ p("span", { children: [
|
|
49
|
+
!u && /* @__PURE__ */ e(t, { className: c["cancel-button"], disabled: _, onClick: b, children: r }),
|
|
50
|
+
!d && /* @__PURE__ */ e(t, { disabled: v, onClick: y, children: i }),
|
|
51
|
+
!f && /* @__PURE__ */ e(t, { disabled: h, onClick: N, children: a })
|
|
52
|
+
] })
|
|
53
|
+
] }));
|
|
54
|
+
export {
|
|
55
|
+
B as StepperNavigator
|
|
56
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
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, 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;
|
|
@@ -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,54 @@
|
|
|
1
1
|
import '../../assets/Table.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsxs as g, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import * as p from "react";
|
|
4
4
|
import { useState as w } from "react";
|
|
5
|
-
import { c as
|
|
6
|
-
import { paginationDefaultTranslations as
|
|
7
|
-
import { sortTooltipDefaultTranslations as
|
|
8
|
-
import { TableProvider as
|
|
9
|
-
const C = (
|
|
10
|
-
"u-typography-h1": "_u-typography-
|
|
11
|
-
"u-typography-h2": "_u-typography-
|
|
12
|
-
"u-typography-h3": "_u-typography-
|
|
13
|
-
"u-typography-h4": "_u-typography-
|
|
14
|
-
"u-typography-h5": "_u-typography-
|
|
15
|
-
"u-typography-h6": "_u-typography-
|
|
16
|
-
"u-typography-base": "_u-typography-
|
|
5
|
+
import { c as d } from "../../clsx-DB4S2d7J.js";
|
|
6
|
+
import { paginationDefaultTranslations as u, Pagination as T } from "../Pagination/Pagination.js";
|
|
7
|
+
import { sortTooltipDefaultTranslations as m, SortTooltip as f } from "../SortTooltip/SortTooltip.js";
|
|
8
|
+
import { TableProvider as x, useTable as N } from "./TableContext.js";
|
|
9
|
+
const C = (l) => /* @__PURE__ */ p.createElement("svg", { width: 7, height: 10, viewBox: "0 0 7 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ p.createElement("g", { clipPath: "url(#clip0_2291_2457)" }, /* @__PURE__ */ p.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__ */ p.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__ */ p.createElement("defs", null, /* @__PURE__ */ p.createElement("clipPath", { id: "clip0_2291_2457" }, /* @__PURE__ */ p.createElement("rect", { width: 7, height: 10, fill: "white" })))), L = "_table_1ysnl_43", E = "_th__wrapper_1ysnl_118", k = "_tr_1ysnl_134", v = "_td_1ysnl_138", t = {
|
|
10
|
+
"u-typography-h1": "_u-typography-h1_1ysnl_1",
|
|
11
|
+
"u-typography-h2": "_u-typography-h2_1ysnl_8",
|
|
12
|
+
"u-typography-h3": "_u-typography-h3_1ysnl_15",
|
|
13
|
+
"u-typography-h4": "_u-typography-h4_1ysnl_22",
|
|
14
|
+
"u-typography-h5": "_u-typography-h5_1ysnl_29",
|
|
15
|
+
"u-typography-h6": "_u-typography-h6_1ysnl_36",
|
|
16
|
+
"u-typography-base": "_u-typography-base_1ysnl_43",
|
|
17
17
|
table: L,
|
|
18
|
-
"u-typography-base--xxl": "_u-typography-base--
|
|
19
|
-
"u-typography-base--xl": "_u-typography-base--
|
|
20
|
-
"u-typography-base--lg": "_u-typography-base--
|
|
21
|
-
"u-typography-base--sm": "_u-typography-base--
|
|
22
|
-
"u-typography-base--bold": "_u-typography-base--
|
|
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
|
-
"table--
|
|
27
|
-
"table--
|
|
28
|
-
"table--
|
|
29
|
-
"
|
|
30
|
-
"cell--
|
|
31
|
-
"cell--
|
|
18
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_1ysnl_49",
|
|
19
|
+
"u-typography-base--xl": "_u-typography-base--xl_1ysnl_53",
|
|
20
|
+
"u-typography-base--lg": "_u-typography-base--lg_1ysnl_57",
|
|
21
|
+
"u-typography-base--sm": "_u-typography-base--sm_1ysnl_61",
|
|
22
|
+
"u-typography-base--bold": "_u-typography-base--bold_1ysnl_65",
|
|
23
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1ysnl_68",
|
|
24
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_1ysnl_71",
|
|
25
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1ysnl_74",
|
|
26
|
+
"table--fixed": "_table--fixed_1ysnl_82",
|
|
27
|
+
"table--full-width": "_table--full-width_1ysnl_85",
|
|
28
|
+
"table--white-theme": "_table--white-theme_1ysnl_88",
|
|
29
|
+
"table--transparent-theme": "_table--transparent-theme_1ysnl_91",
|
|
30
|
+
"cell--left-alignment": "_cell--left-alignment_1ysnl_94",
|
|
31
|
+
"cell--center-alignment": "_cell--center-alignment_1ysnl_98",
|
|
32
|
+
"cell--right-alignment": "_cell--right-alignment_1ysnl_102",
|
|
32
33
|
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--
|
|
34
|
+
"th__wrapper--pressed": "_th__wrapper--pressed_1ysnl_121",
|
|
35
|
+
"th__wrapper--clickable": "_th__wrapper--clickable_1ysnl_125",
|
|
36
|
+
"th__sort-icon-container": "_th__sort-icon-container_1ysnl_128",
|
|
37
|
+
"tr__row-or-cell--disabled": "_tr__row-or-cell--disabled_1ysnl_134",
|
|
37
38
|
tr: k,
|
|
38
39
|
td: v,
|
|
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-
|
|
40
|
+
"tr__row-or-cell--clickable": "_tr__row-or-cell--clickable_1ysnl_143",
|
|
41
|
+
"td__row-or-cell--clickable": "_td__row-or-cell--clickable_1ysnl_144",
|
|
42
|
+
"td__row-or-cell--disabled": "_td__row-or-cell--disabled_1ysnl_148",
|
|
43
|
+
"td-wrapper": "_td-wrapper_1ysnl_152"
|
|
43
44
|
}, B = {
|
|
44
45
|
pt: {
|
|
45
|
-
...
|
|
46
|
-
...
|
|
46
|
+
...u.pt,
|
|
47
|
+
...m.pt
|
|
47
48
|
},
|
|
48
49
|
en: {
|
|
49
|
-
...
|
|
50
|
-
...
|
|
50
|
+
...u.en,
|
|
51
|
+
...m.en
|
|
51
52
|
},
|
|
52
53
|
// example to add a new language translation
|
|
53
54
|
es: {
|
|
@@ -59,78 +60,80 @@ const C = (p) => /* @__PURE__ */ h.createElement("svg", { width: 7, height: 10,
|
|
|
59
60
|
of: "de",
|
|
60
61
|
results: "resultados"
|
|
61
62
|
}
|
|
62
|
-
},
|
|
63
|
-
children:
|
|
63
|
+
}, s = ({
|
|
64
|
+
children: l,
|
|
64
65
|
theme: e = "white",
|
|
65
66
|
fullWidth: r = !0,
|
|
66
|
-
className:
|
|
67
|
-
paginationProps:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
className: n,
|
|
68
|
+
paginationProps: _,
|
|
69
|
+
isFixed: o,
|
|
70
|
+
language: y,
|
|
71
|
+
translations: b,
|
|
72
|
+
...h
|
|
71
73
|
}) => {
|
|
72
|
-
const c =
|
|
74
|
+
const c = d(
|
|
73
75
|
t.table,
|
|
74
|
-
r
|
|
76
|
+
r && t["table--full-width"],
|
|
77
|
+
o && t["table--fixed"],
|
|
75
78
|
t[`table--${e}-theme`],
|
|
76
|
-
|
|
77
|
-
), i =
|
|
78
|
-
return /* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */ a("table", { ...
|
|
80
|
-
|
|
79
|
+
n
|
|
80
|
+
), i = y && B[y] || b;
|
|
81
|
+
return /* @__PURE__ */ g(x, { initialTranslations: i, children: [
|
|
82
|
+
/* @__PURE__ */ a("table", { ...h, className: c, children: l }),
|
|
83
|
+
_ && /* @__PURE__ */ a(T, { ..._, t: i })
|
|
81
84
|
] });
|
|
82
|
-
}, H = ({ children:
|
|
83
|
-
const
|
|
85
|
+
}, H = ({ children: l, ...e }) => /* @__PURE__ */ a("thead", { ...e, children: l }), P = ({ children: l, ...e }) => /* @__PURE__ */ a("tbody", { ...e, children: l }), D = ({ children: l, onClick: e, disabled: r, className: n, ..._ }) => {
|
|
86
|
+
const o = d(
|
|
84
87
|
t.tr,
|
|
85
88
|
e && !r ? t["tr__row-or-cell--clickable"] : r ? t["tr__row-or-cell--disabled"] : "",
|
|
86
|
-
|
|
89
|
+
n
|
|
87
90
|
);
|
|
88
|
-
return /* @__PURE__ */ a("tr", { ...
|
|
89
|
-
}, M = ({ children:
|
|
90
|
-
const
|
|
91
|
+
return /* @__PURE__ */ a("tr", { ..._, className: o, onClick: () => !r && (e == null ? void 0 : e()), children: l });
|
|
92
|
+
}, M = ({ children: l, onClick: e, disabled: r, className: n, align: _ = "left", ...o }) => {
|
|
93
|
+
const y = d(
|
|
91
94
|
t.td,
|
|
92
95
|
e && !r ? t["td__row-or-cell--clickable"] : r ? t["td__row-or-cell--disabled"] : "",
|
|
93
|
-
t[`cell--${
|
|
94
|
-
|
|
96
|
+
t[`cell--${_}-alignment`],
|
|
97
|
+
n
|
|
95
98
|
);
|
|
96
|
-
return /* @__PURE__ */ a("td", { ...
|
|
97
|
-
}, O = ({ children:
|
|
98
|
-
const { translations:
|
|
99
|
+
return /* @__PURE__ */ a("td", { ...o, className: y, onClick: () => !r && (e == null ? void 0 : e()), children: /* @__PURE__ */ a("span", { className: t["td-wrapper"], children: l }) });
|
|
100
|
+
}, O = ({ children: l, onSort: e, sortType: r, className: n, classNameTooltip: _, align: o = "left", ...y }) => {
|
|
101
|
+
const { translations: b } = N(), [h, c] = w(!1), i = d(
|
|
99
102
|
t.th__wrapper,
|
|
100
|
-
|
|
103
|
+
h ? t["th__wrapper--pressed"] : "",
|
|
101
104
|
e ? t["th__wrapper--clickable"] : "",
|
|
102
|
-
|
|
105
|
+
n
|
|
103
106
|
);
|
|
104
|
-
return /* @__PURE__ */ a("th", { ...
|
|
107
|
+
return /* @__PURE__ */ a("th", { ...y, className: t[`cell--${o}-alignment`], children: /* @__PURE__ */ a("span", { className: i, onClick: e && (() => c(!h)), children: e ? /* @__PURE__ */ g(
|
|
105
108
|
f,
|
|
106
109
|
{
|
|
107
|
-
onClose: () =>
|
|
110
|
+
onClose: () => c(!1),
|
|
108
111
|
onSort: e,
|
|
109
|
-
show:
|
|
112
|
+
show: h,
|
|
110
113
|
sortType: r,
|
|
111
|
-
className:
|
|
112
|
-
t:
|
|
114
|
+
className: _,
|
|
115
|
+
t: b,
|
|
113
116
|
children: [
|
|
114
|
-
/* @__PURE__ */ a("span", { children:
|
|
117
|
+
/* @__PURE__ */ a("span", { children: l }),
|
|
115
118
|
/* @__PURE__ */ a("span", { className: t["th__sort-icon-container"], children: /* @__PURE__ */ a(C, {}) })
|
|
116
119
|
]
|
|
117
120
|
}
|
|
118
|
-
) : /* @__PURE__ */ a("span", { children:
|
|
121
|
+
) : /* @__PURE__ */ a("span", { children: l }) }) });
|
|
119
122
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
123
|
+
s.THead = H;
|
|
124
|
+
s.THead.displayName = "Table.THead";
|
|
125
|
+
s.TBody = P;
|
|
126
|
+
s.TBody.displayName = "Table.TBody";
|
|
127
|
+
s.Tr = D;
|
|
128
|
+
s.Tr.displayName = "Table.Tr";
|
|
129
|
+
s.Td = M;
|
|
130
|
+
s.Td.displayName = "Table.Td";
|
|
131
|
+
s.Th = O;
|
|
132
|
+
s.Th.displayName = "Table.Th";
|
|
130
133
|
export {
|
|
131
134
|
P as TBody,
|
|
132
135
|
H as THead,
|
|
133
|
-
|
|
136
|
+
s as Table,
|
|
134
137
|
M as Td,
|
|
135
138
|
O as Th,
|
|
136
139
|
D as Tr
|
|
@@ -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>>;
|
|
@@ -2,11 +2,12 @@ import { jsx as N } from "react/jsx-runtime";
|
|
|
2
2
|
import * as b 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-
|
|
8
|
-
import { u as Q
|
|
9
|
-
import { u as
|
|
5
|
+
import { u as B, T as D, s as y } from "../../Tabs.module-BGGTkDc5.js";
|
|
6
|
+
import { g as L, a as W, u as O, f as $, b as f, _ as q, c as z, P as e, d as A, e as G } from "../../useSlotProps-C_I1kEHr.js";
|
|
7
|
+
import { u as J, c as K } from "../../combineHooksSlotProps-C-zYvfnF.js";
|
|
8
|
+
import { u as Q } from "../../useId-BW-oWmul.js";
|
|
9
|
+
import { u as X } from "../../useButton-DcihopJG.js";
|
|
10
|
+
import { u as Y } from "../../useCompoundItem-B7Eo_qZk.js";
|
|
10
11
|
const E = "Tab";
|
|
11
12
|
function Z(o) {
|
|
12
13
|
return L(E, o);
|
|
@@ -21,43 +22,43 @@ function te(o) {
|
|
|
21
22
|
rootRef: s,
|
|
22
23
|
disabled: n = !1,
|
|
23
24
|
id: c
|
|
24
|
-
} = o,
|
|
25
|
-
value:
|
|
25
|
+
} = o, r = b.useRef(null), a = Q(c), {
|
|
26
|
+
value: i,
|
|
26
27
|
selectionFollowsFocus: p,
|
|
27
28
|
getTabPanelId: m
|
|
28
29
|
} = B(), P = b.useMemo(() => ({
|
|
29
30
|
disabled: n,
|
|
30
|
-
ref:
|
|
31
|
-
id:
|
|
32
|
-
}), [n,
|
|
31
|
+
ref: r,
|
|
32
|
+
id: a
|
|
33
|
+
}), [n, r, a]), {
|
|
33
34
|
id: l,
|
|
34
35
|
index: R,
|
|
35
36
|
totalItemCount: g
|
|
36
|
-
} =
|
|
37
|
+
} = Y(t ?? ee, P), {
|
|
37
38
|
getRootProps: h,
|
|
38
39
|
highlighted: T,
|
|
39
|
-
selected:
|
|
40
|
+
selected: u
|
|
40
41
|
} = J({
|
|
41
42
|
item: l
|
|
42
43
|
}), {
|
|
43
44
|
getRootProps: C,
|
|
44
|
-
rootRef:
|
|
45
|
+
rootRef: d,
|
|
45
46
|
active: v,
|
|
46
47
|
focusVisible: I,
|
|
47
48
|
setFocusVisible: V
|
|
48
|
-
} =
|
|
49
|
+
} = X({
|
|
49
50
|
disabled: n,
|
|
50
51
|
focusableWhenDisabled: !p,
|
|
51
52
|
type: "button"
|
|
52
|
-
}), _ = O(
|
|
53
|
+
}), _ = O(r, s, d), M = l !== void 0 ? m(l) : void 0;
|
|
53
54
|
return {
|
|
54
55
|
getRootProps: (x = {}) => {
|
|
55
56
|
const S = $(x), w = K(h, C);
|
|
56
|
-
return
|
|
57
|
+
return f({}, x, w(S), {
|
|
57
58
|
role: "tab",
|
|
58
59
|
"aria-controls": M,
|
|
59
|
-
"aria-selected":
|
|
60
|
-
id:
|
|
60
|
+
"aria-selected": u,
|
|
61
|
+
id: a,
|
|
61
62
|
ref: _
|
|
62
63
|
});
|
|
63
64
|
},
|
|
@@ -68,7 +69,7 @@ function te(o) {
|
|
|
68
69
|
rootRef: _,
|
|
69
70
|
// the `selected` state isn't set on the server (it relies on effects to be calculated),
|
|
70
71
|
// so we fall back to checking the `value` prop with the selectedValue from the TabsContext
|
|
71
|
-
selected:
|
|
72
|
+
selected: u || l === i,
|
|
72
73
|
setFocusVisible: V,
|
|
73
74
|
totalTabsCount: g
|
|
74
75
|
};
|
|
@@ -85,35 +86,35 @@ const oe = ["action", "children", "disabled", "onChange", "onClick", "onFocus",
|
|
|
85
86
|
var n;
|
|
86
87
|
const {
|
|
87
88
|
children: c,
|
|
88
|
-
disabled:
|
|
89
|
-
slotProps:
|
|
90
|
-
slots:
|
|
89
|
+
disabled: r = !1,
|
|
90
|
+
slotProps: a = {},
|
|
91
|
+
slots: i = {},
|
|
91
92
|
value: p
|
|
92
93
|
} = t, m = q(t, oe), P = b.useRef(), l = O(P, s), {
|
|
93
94
|
active: R,
|
|
94
95
|
highlighted: g,
|
|
95
96
|
selected: h,
|
|
96
97
|
getRootProps: T
|
|
97
|
-
} = te(
|
|
98
|
+
} = te(f({}, t, {
|
|
98
99
|
rootRef: l,
|
|
99
100
|
value: p
|
|
100
|
-
})),
|
|
101
|
+
})), u = f({}, t, {
|
|
101
102
|
active: R,
|
|
102
|
-
disabled:
|
|
103
|
+
disabled: r,
|
|
103
104
|
highlighted: g,
|
|
104
105
|
selected: h
|
|
105
|
-
}), C = se(
|
|
106
|
-
elementType:
|
|
106
|
+
}), C = se(u), d = (n = i.root) != null ? n : "button", v = z({
|
|
107
|
+
elementType: d,
|
|
107
108
|
getSlotProps: T,
|
|
108
|
-
externalSlotProps:
|
|
109
|
+
externalSlotProps: a.root,
|
|
109
110
|
externalForwardedProps: m,
|
|
110
111
|
additionalProps: {
|
|
111
112
|
ref: s
|
|
112
113
|
},
|
|
113
|
-
ownerState:
|
|
114
|
+
ownerState: u,
|
|
114
115
|
className: C.root
|
|
115
116
|
});
|
|
116
|
-
return /* @__PURE__ */ N(
|
|
117
|
+
return /* @__PURE__ */ N(d, f({}, v, {
|
|
117
118
|
children: c
|
|
118
119
|
}));
|
|
119
120
|
});
|
|
@@ -163,19 +164,20 @@ process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
|
163
164
|
*/
|
|
164
165
|
value: e.oneOfType([e.number, e.string])
|
|
165
166
|
});
|
|
166
|
-
const
|
|
167
|
-
({ children: o, value: t, disabled: s,
|
|
168
|
-
const a = U(D),
|
|
167
|
+
const pe = H(
|
|
168
|
+
({ children: o, value: t, disabled: s, className: n, "data-testid": c }, r) => {
|
|
169
|
+
const a = U(D), i = j(
|
|
169
170
|
() => k(
|
|
170
171
|
y.tabs__tab,
|
|
171
172
|
t === (a == null ? void 0 : a.value) && y["tabs__tab--selected"],
|
|
172
|
-
s && y["tabs__tab--disabled"]
|
|
173
|
+
s && y["tabs__tab--disabled"],
|
|
174
|
+
n
|
|
173
175
|
),
|
|
174
176
|
[t, a, s]
|
|
175
177
|
);
|
|
176
|
-
return /* @__PURE__ */ N(F, { className:
|
|
178
|
+
return /* @__PURE__ */ N(F, { className: i, disabled: s, value: t, "data-testid": c, ref: r, children: o });
|
|
177
179
|
}
|
|
178
180
|
);
|
|
179
181
|
export {
|
|
180
|
-
|
|
182
|
+
pe as Tab
|
|
181
183
|
};
|