@pismo/marola 0.0.1-alpha.4 → 0.0.1-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/{Button-C3Qm852g.js → Button-D--uN90N.js} +6 -5
- package/dist/Dialog.module-BKWFakxu.js +15 -0
- package/dist/{ListContext-D6-YwtZn.js → ListContext-Dj2Va7Iv.js} +2 -2
- package/dist/{Tabs.module-_kSbSyth.js → Tabs.module-BKlNuSPH.js} +20 -20
- package/dist/assets/Button.css +1 -0
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/IconButton.css +1 -0
- package/dist/assets/LoadingSpinner.css +1 -1
- package/dist/assets/PageHeader.css +1 -0
- package/dist/assets/Pagination.css +1 -0
- package/dist/assets/Tabs.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/assets/main.css +1 -1
- package/dist/components/Button/Button.d.ts +21 -0
- package/dist/components/Button/Button.js +54 -0
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.js +2 -9
- package/dist/components/Dialog/CloseIconButton.js +3 -3
- package/dist/components/Dialog/Dialog.d.ts +2 -2
- package/dist/components/Dialog/Dialog.js +22 -26
- package/dist/components/Dialog/Title.js +22 -7
- package/dist/components/IconButton/IconButton.d.ts +22 -0
- package/dist/components/IconButton/IconButton.js +79 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.js +12 -13
- package/dist/components/PageHeader/PageHeader.d.ts +26 -0
- package/dist/components/PageHeader/PageHeader.js +69 -0
- package/dist/components/Pagination/Pagination.d.ts +36 -0
- package/dist/components/Pagination/Pagination.js +219 -0
- package/dist/components/SortTooltip/SortTooltip.d.ts +0 -0
- package/dist/components/SortTooltip/SortTooltip.js +1 -0
- package/dist/components/Table/Table.d.ts +0 -0
- package/dist/components/Table/Table.js +1 -0
- package/dist/components/Table/TableContext.d.ts +0 -0
- package/dist/components/Table/TableContext.js +1 -0
- package/dist/components/Tabs/Tab.js +42 -37
- package/dist/components/Tabs/TabPanel.js +20 -21
- package/dist/components/Tabs/Tabs.js +185 -214
- package/dist/components/Tooltip/Tooltip.d.ts +0 -0
- package/dist/components/Tooltip/Tooltip.js +1 -0
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/Typography.js +38 -47
- package/dist/{index-BZ1lkM_M.js → index-BvA1HyDs.js} +274 -293
- package/dist/main.d.ts +4 -1
- package/dist/main.js +22 -15
- package/dist/objectWithoutPropertiesLoose-ClNcje2_.js +22 -0
- package/dist/types/helpers.d.ts +6 -7
- package/dist/{useButton-CbmjmH5z.js → useButton-abQpo0za.js} +17 -16
- package/dist/{useCompoundItem-B7wfGDHQ.js → useCompoundItem-wTwXbURC.js} +1 -1
- package/dist/useControlled-CCMYYdCM.js +31 -0
- package/package.json +26 -6
- package/dist/Dialog.module-BO0mdB7d.js +0 -15
- package/dist/assets/CallToActionButton.css +0 -1
- package/dist/components/CallToActionButton/CallToActionButton.d.ts +0 -21
- package/dist/components/CallToActionButton/CallToActionButton.js +0 -57
- package/src/playground/Playground.tsx +0 -20
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import '../../assets/LoadingSpinner.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useMemo as
|
|
2
|
+
import { jsxs as e, jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as o } from "react";
|
|
4
4
|
import { c as t } from "../../clsx-DB4S2d7J.js";
|
|
5
5
|
const n = {
|
|
6
|
-
"ls-ring": "_ls-
|
|
7
|
-
"ls-ring--invert": "_ls-ring--
|
|
8
|
-
},
|
|
9
|
-
const l =
|
|
10
|
-
[n["ls-ring"]],
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return /* @__PURE__ */ o("div", { className: l, children: [
|
|
6
|
+
"ls-ring": "_ls-ring_elvjz_1",
|
|
7
|
+
"ls-ring--invert": "_ls-ring--invert_elvjz_34"
|
|
8
|
+
}, a = ({ invert: i = !1, classNames: r }) => {
|
|
9
|
+
const l = o(
|
|
10
|
+
() => t([n["ls-ring"]], { [n["ls-ring--invert"]]: i }, r),
|
|
11
|
+
[r, i]
|
|
12
|
+
);
|
|
13
|
+
return /* @__PURE__ */ e("div", { className: l, children: [
|
|
15
14
|
/* @__PURE__ */ s("div", {}),
|
|
16
15
|
/* @__PURE__ */ s("div", {}),
|
|
17
16
|
/* @__PURE__ */ s("div", {}),
|
|
@@ -19,6 +18,6 @@ const n = {
|
|
|
19
18
|
] });
|
|
20
19
|
};
|
|
21
20
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
a as LoadingSpinner,
|
|
22
|
+
a as default
|
|
24
23
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { RequireAllOrNone } from '../../types/helpers';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type PageHeaderCommonProps = {
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
rightChildren?: ReactNode;
|
|
8
|
+
bottomChildren?: ReactNode;
|
|
9
|
+
backLinkText?: string;
|
|
10
|
+
onBackLinkClick?: () => void;
|
|
11
|
+
wrapperClassName?: string;
|
|
12
|
+
backLinkClassName?: string;
|
|
13
|
+
titleClassName?: string;
|
|
14
|
+
subtitleClassName?: string;
|
|
15
|
+
rightChildrenClassName?: string;
|
|
16
|
+
bottomChildrenClassName?: string;
|
|
17
|
+
wrapperTestId?: string;
|
|
18
|
+
backLinkTestId?: string;
|
|
19
|
+
titleTestId?: string;
|
|
20
|
+
subtitleTestId?: string;
|
|
21
|
+
rightChildrenTestId?: string;
|
|
22
|
+
bottomChildrenTestId?: string;
|
|
23
|
+
};
|
|
24
|
+
type PageHeaderProps = RequireAllOrNone<PageHeaderCommonProps, 'backLinkText' | 'onBackLinkClick'>;
|
|
25
|
+
export declare const PageHeader: ({ title, subtitle, backLinkText, onBackLinkClick, rightChildren, bottomChildren, wrapperClassName, backLinkClassName, titleClassName, subtitleClassName, rightChildrenClassName, bottomChildrenClassName, wrapperTestId, backLinkTestId, titleTestId, subtitleTestId, rightChildrenTestId, bottomChildrenTestId, ...rest }: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import '../../assets/PageHeader.css';
|
|
2
|
+
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { c as a } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import * as i from "react";
|
|
5
|
+
const C = (n) => /* @__PURE__ */ i.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", "data-waves-icon": "fa/solid/arrow-left", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
6
|
+
fill: "currentcolor",
|
|
7
|
+
color: "currentcolor",
|
|
8
|
+
width: "1em",
|
|
9
|
+
height: "1em"
|
|
10
|
+
}, ...n }, /* @__PURE__ */ i.createElement("path", { d: "M447.1 256C447.1 273.7 433.7 288 416 288H109.3l105.4 105.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448s-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L109.3 224H416C433.7 224 447.1 238.3 447.1 256z" })), y = C, H = "_title_cz9x0_46", j = "_subtitle_cz9x0_47", e = {
|
|
11
|
+
"page-header": "_page-header_cz9x0_1",
|
|
12
|
+
"page-header__top-content": "_page-header__top-content_cz9x0_10",
|
|
13
|
+
"page-header__main-content": "_page-header__main-content_cz9x0_13",
|
|
14
|
+
"page-header__bottom-content": "_page-header__bottom-content_cz9x0_13",
|
|
15
|
+
"page-header__main-left-content": "_page-header__main-left-content_cz9x0_40",
|
|
16
|
+
title: H,
|
|
17
|
+
subtitle: j,
|
|
18
|
+
"page-header__main-right-content": "_page-header__main-right-content_cz9x0_64"
|
|
19
|
+
}, L = ({
|
|
20
|
+
title: n,
|
|
21
|
+
subtitle: s,
|
|
22
|
+
backLinkText: r,
|
|
23
|
+
onBackLinkClick: d,
|
|
24
|
+
rightChildren: o,
|
|
25
|
+
bottomChildren: _,
|
|
26
|
+
wrapperClassName: l,
|
|
27
|
+
backLinkClassName: h,
|
|
28
|
+
titleClassName: m,
|
|
29
|
+
subtitleClassName: p,
|
|
30
|
+
rightChildrenClassName: g,
|
|
31
|
+
bottomChildrenClassName: f,
|
|
32
|
+
wrapperTestId: x,
|
|
33
|
+
backLinkTestId: u,
|
|
34
|
+
titleTestId: v,
|
|
35
|
+
subtitleTestId: w,
|
|
36
|
+
rightChildrenTestId: z,
|
|
37
|
+
bottomChildrenTestId: N,
|
|
38
|
+
...b
|
|
39
|
+
}) => /* @__PURE__ */ c("div", { className: a([e["page-header"], l]), "data-testid": x, ...b, children: [
|
|
40
|
+
r && /* @__PURE__ */ t("div", { className: e["page-header__top-content"], children: /* @__PURE__ */ c("button", { type: "button", onClick: d, className: h, "data-testid": u, children: [
|
|
41
|
+
/* @__PURE__ */ t(y, { fontSize: 16 }),
|
|
42
|
+
r
|
|
43
|
+
] }) }),
|
|
44
|
+
/* @__PURE__ */ c("div", { className: e["page-header__main-content"], children: [
|
|
45
|
+
/* @__PURE__ */ c("div", { className: e["page-header__main-left-content"], children: [
|
|
46
|
+
/* @__PURE__ */ t("h1", { className: a(e.title, m), "data-testid": v, children: n }),
|
|
47
|
+
/* @__PURE__ */ t("h3", { className: a(e.subtitle, p), "data-testid": w, children: s })
|
|
48
|
+
] }),
|
|
49
|
+
o && /* @__PURE__ */ t(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
className: a(e["page-header__main-right-content"], g),
|
|
53
|
+
"data-testid": z,
|
|
54
|
+
children: o
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
] }),
|
|
58
|
+
_ && /* @__PURE__ */ t(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
className: a(e["page-header__bottom-content"], f),
|
|
62
|
+
"data-testid": N,
|
|
63
|
+
children: _
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] });
|
|
67
|
+
export {
|
|
68
|
+
L as PageHeader
|
|
69
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type PaginationParams = {
|
|
2
|
+
totalItems: number;
|
|
3
|
+
perPage: number;
|
|
4
|
+
currentPage: number;
|
|
5
|
+
};
|
|
6
|
+
export type PaginationTranslations = {
|
|
7
|
+
showing: string;
|
|
8
|
+
of: string;
|
|
9
|
+
results: string;
|
|
10
|
+
previous: string;
|
|
11
|
+
next: string;
|
|
12
|
+
};
|
|
13
|
+
type PaginationLanguages = 'pt' | 'en';
|
|
14
|
+
type PaginationCommonProps = {
|
|
15
|
+
className?: string;
|
|
16
|
+
'data-testid'?: string;
|
|
17
|
+
classNamePerPage?: string;
|
|
18
|
+
'data-testid__per-page'?: string;
|
|
19
|
+
classNamePagesNav?: string;
|
|
20
|
+
'data-testid__pages-nav'?: string;
|
|
21
|
+
};
|
|
22
|
+
export type PaginationProps = {
|
|
23
|
+
perPageOptions?: (number | {
|
|
24
|
+
value: number;
|
|
25
|
+
label: string;
|
|
26
|
+
})[] | undefined;
|
|
27
|
+
onPageChange: (page: number) => void;
|
|
28
|
+
onRowsPerPageChange: (perPage: number | string) => void;
|
|
29
|
+
language?: PaginationLanguages;
|
|
30
|
+
t?: PaginationTranslations;
|
|
31
|
+
} & PaginationParams & PaginationCommonProps;
|
|
32
|
+
export declare const defaultTranslations: {
|
|
33
|
+
[key in PaginationLanguages]: PaginationTranslations;
|
|
34
|
+
};
|
|
35
|
+
export declare const Pagination: (props: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import '../../assets/Pagination.css';
|
|
2
|
+
import { jsxs as P, jsx as i, Fragment as M } from "react/jsx-runtime";
|
|
3
|
+
import { c as C } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import { _ as S, a as A } from "../../objectWithoutPropertiesLoose-ClNcje2_.js";
|
|
5
|
+
import { u as D } from "../../useControlled-CCMYYdCM.js";
|
|
6
|
+
const E = ["boundaryCount", "componentName", "count", "defaultPage", "disabled", "hideNextButton", "hidePrevButton", "onChange", "page", "showFirstButton", "showLastButton", "siblingCount"];
|
|
7
|
+
function $(e = {}) {
|
|
8
|
+
const {
|
|
9
|
+
boundaryCount: a = 1,
|
|
10
|
+
componentName: _ = "usePagination",
|
|
11
|
+
count: s = 1,
|
|
12
|
+
defaultPage: b = 1,
|
|
13
|
+
disabled: h = !1,
|
|
14
|
+
hideNextButton: g = !1,
|
|
15
|
+
hidePrevButton: m = !1,
|
|
16
|
+
onChange: t,
|
|
17
|
+
page: o,
|
|
18
|
+
showFirstButton: p = !1,
|
|
19
|
+
showLastButton: x = !1,
|
|
20
|
+
siblingCount: u = 1
|
|
21
|
+
} = e, d = S(e, E), [r, k] = D({
|
|
22
|
+
controlled: o,
|
|
23
|
+
default: b,
|
|
24
|
+
name: _,
|
|
25
|
+
state: "page"
|
|
26
|
+
}), N = (n, l) => {
|
|
27
|
+
o || k(l), t && t(n, l);
|
|
28
|
+
}, v = (n, l) => {
|
|
29
|
+
const I = l - n + 1;
|
|
30
|
+
return Array.from({
|
|
31
|
+
length: I
|
|
32
|
+
}, (W, O) => n + O);
|
|
33
|
+
}, j = v(1, Math.min(a, s)), f = v(Math.max(s - a + 1, a + 1), s), y = Math.max(
|
|
34
|
+
Math.min(
|
|
35
|
+
// Natural start
|
|
36
|
+
r - u,
|
|
37
|
+
// Lower boundary when page is high
|
|
38
|
+
s - a - u * 2 - 1
|
|
39
|
+
),
|
|
40
|
+
// Greater than startPages
|
|
41
|
+
a + 2
|
|
42
|
+
), B = Math.min(
|
|
43
|
+
Math.max(
|
|
44
|
+
// Natural end
|
|
45
|
+
r + u,
|
|
46
|
+
// Upper boundary when page is low
|
|
47
|
+
a + u * 2 + 2
|
|
48
|
+
),
|
|
49
|
+
// Less than endPages
|
|
50
|
+
f.length > 0 ? f[0] - 2 : s - 1
|
|
51
|
+
), L = [
|
|
52
|
+
...p ? ["first"] : [],
|
|
53
|
+
...m ? [] : ["previous"],
|
|
54
|
+
...j,
|
|
55
|
+
// Start ellipsis
|
|
56
|
+
// eslint-disable-next-line no-nested-ternary
|
|
57
|
+
...y > a + 2 ? ["start-ellipsis"] : a + 1 < s - a ? [a + 1] : [],
|
|
58
|
+
// Sibling pages
|
|
59
|
+
...v(y, B),
|
|
60
|
+
// End ellipsis
|
|
61
|
+
// eslint-disable-next-line no-nested-ternary
|
|
62
|
+
...B < s - a - 1 ? ["end-ellipsis"] : s - a > a ? [s - a] : [],
|
|
63
|
+
...f,
|
|
64
|
+
...g ? [] : ["next"],
|
|
65
|
+
...x ? ["last"] : []
|
|
66
|
+
], w = (n) => {
|
|
67
|
+
switch (n) {
|
|
68
|
+
case "first":
|
|
69
|
+
return 1;
|
|
70
|
+
case "previous":
|
|
71
|
+
return r - 1;
|
|
72
|
+
case "next":
|
|
73
|
+
return r + 1;
|
|
74
|
+
case "last":
|
|
75
|
+
return s;
|
|
76
|
+
default:
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
}, F = L.map((n) => typeof n == "number" ? {
|
|
80
|
+
onClick: (l) => {
|
|
81
|
+
N(l, n);
|
|
82
|
+
},
|
|
83
|
+
type: "page",
|
|
84
|
+
page: n,
|
|
85
|
+
selected: n === r,
|
|
86
|
+
disabled: h,
|
|
87
|
+
"aria-current": n === r ? "true" : void 0
|
|
88
|
+
} : {
|
|
89
|
+
onClick: (l) => {
|
|
90
|
+
N(l, w(n));
|
|
91
|
+
},
|
|
92
|
+
type: n,
|
|
93
|
+
page: w(n),
|
|
94
|
+
selected: !1,
|
|
95
|
+
disabled: h || n.indexOf("ellipsis") === -1 && (n === "next" || n === "last" ? r >= s : r <= 1)
|
|
96
|
+
});
|
|
97
|
+
return A({
|
|
98
|
+
items: F
|
|
99
|
+
}, d);
|
|
100
|
+
}
|
|
101
|
+
const R = "_pagination_1exye_1", c = {
|
|
102
|
+
pagination: R,
|
|
103
|
+
"per-page-container": "_per-page-container_1exye_8",
|
|
104
|
+
"pages-navigator-container": "_pages-navigator-container_1exye_20",
|
|
105
|
+
"pages-navigator-container__label": "_pages-navigator-container__label_1exye_31",
|
|
106
|
+
"page-number__btn": "_page-number__btn_1exye_31",
|
|
107
|
+
"pages-navigator-container__previous-next-btn": "_pages-navigator-container__previous-next-btn_1exye_44",
|
|
108
|
+
"page-number__btn--selected": "_page-number__btn--selected_1exye_69"
|
|
109
|
+
}, T = {
|
|
110
|
+
pt: {
|
|
111
|
+
showing: "Exibindo",
|
|
112
|
+
of: "de",
|
|
113
|
+
results: "resultados",
|
|
114
|
+
previous: "Anterior",
|
|
115
|
+
next: "Próximo"
|
|
116
|
+
},
|
|
117
|
+
en: {
|
|
118
|
+
showing: "Showing",
|
|
119
|
+
of: "of",
|
|
120
|
+
results: "results",
|
|
121
|
+
previous: "Previous",
|
|
122
|
+
next: "Next"
|
|
123
|
+
}
|
|
124
|
+
}, J = (e) => {
|
|
125
|
+
const a = e.perPageOptions || [5, 10, 25, 50, 100], _ = Math.ceil(e.totalItems / e.perPage), s = e.currentPage <= 1, b = e.currentPage >= _, h = e.t || T[e.language || "en"], g = (t) => h[t], { items: m } = $({
|
|
126
|
+
count: _,
|
|
127
|
+
hideNextButton: !0,
|
|
128
|
+
hidePrevButton: !0,
|
|
129
|
+
page: e.currentPage,
|
|
130
|
+
onChange: (t, o) => e.onPageChange(o),
|
|
131
|
+
siblingCount: 1,
|
|
132
|
+
boundaryCount: 2
|
|
133
|
+
});
|
|
134
|
+
return /* @__PURE__ */ P("div", { className: C(c.pagination, e.className), "data-testid": e["data-testid"], children: [
|
|
135
|
+
/* @__PURE__ */ i(
|
|
136
|
+
"div",
|
|
137
|
+
{
|
|
138
|
+
className: C(c["per-page-container"], e.classNamePerPage),
|
|
139
|
+
"data-testid": e["data-testid__per-page"],
|
|
140
|
+
children: a && /* @__PURE__ */ P(M, { children: [
|
|
141
|
+
g`showing`,
|
|
142
|
+
/* @__PURE__ */ i(
|
|
143
|
+
"select",
|
|
144
|
+
{
|
|
145
|
+
value: e.perPage,
|
|
146
|
+
name: "per-page-select",
|
|
147
|
+
id: "per-page-select",
|
|
148
|
+
onChange: (t) => e.onRowsPerPageChange(t.target.value),
|
|
149
|
+
children: a.map((t) => {
|
|
150
|
+
const o = typeof t == "number";
|
|
151
|
+
return /* @__PURE__ */ i(
|
|
152
|
+
"option",
|
|
153
|
+
{
|
|
154
|
+
value: o ? t : t.value,
|
|
155
|
+
children: o ? t : t.label
|
|
156
|
+
},
|
|
157
|
+
`per-page__${o ? t : t.value}`
|
|
158
|
+
);
|
|
159
|
+
})
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
g`of`,
|
|
163
|
+
" ",
|
|
164
|
+
/* @__PURE__ */ i("strong", { children: e.totalItems }),
|
|
165
|
+
" ",
|
|
166
|
+
g`results`
|
|
167
|
+
] })
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
/* @__PURE__ */ P(
|
|
171
|
+
"div",
|
|
172
|
+
{
|
|
173
|
+
className: C(c["pages-navigator-container"], e.classNamePagesNav),
|
|
174
|
+
"data-testid": e["data-testid__per-page"],
|
|
175
|
+
children: [
|
|
176
|
+
/* @__PURE__ */ i(
|
|
177
|
+
"button",
|
|
178
|
+
{
|
|
179
|
+
className: c["pages-navigator-container__previous-next-btn"],
|
|
180
|
+
disabled: s,
|
|
181
|
+
onClick: () => e.onPageChange(e.currentPage - 1),
|
|
182
|
+
type: "button",
|
|
183
|
+
children: g`previous`
|
|
184
|
+
},
|
|
185
|
+
"page__previous"
|
|
186
|
+
),
|
|
187
|
+
m.map(({ page: t, type: o, selected: p, ...x }, u) => {
|
|
188
|
+
let d = /* @__PURE__ */ i(M, {});
|
|
189
|
+
return o === "start-ellipsis" || o === "end-ellipsis" ? d = /* @__PURE__ */ i("span", { className: c["pages-navigator-container__label"], children: "..." }) : o === "page" ? d = /* @__PURE__ */ i(
|
|
190
|
+
"button",
|
|
191
|
+
{
|
|
192
|
+
className: [c["page-number__btn"], p ? c["page-number__btn--selected"] : ""].join(" ").trim(),
|
|
193
|
+
onClick: () => e.onPageChange(t || 0),
|
|
194
|
+
type: "button",
|
|
195
|
+
children: t
|
|
196
|
+
},
|
|
197
|
+
`page__${u}`
|
|
198
|
+
) : d = /* @__PURE__ */ i("button", { type: "button", ...x, children: o }), /* @__PURE__ */ i("li", { children: d }, u);
|
|
199
|
+
}),
|
|
200
|
+
/* @__PURE__ */ i(
|
|
201
|
+
"button",
|
|
202
|
+
{
|
|
203
|
+
className: c["pages-navigator-container__previous-next-btn"],
|
|
204
|
+
disabled: b,
|
|
205
|
+
onClick: () => e.onPageChange(e.currentPage + 1),
|
|
206
|
+
type: "button",
|
|
207
|
+
children: g`next`
|
|
208
|
+
},
|
|
209
|
+
"page__next"
|
|
210
|
+
)
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
)
|
|
214
|
+
] });
|
|
215
|
+
};
|
|
216
|
+
export {
|
|
217
|
+
J as Pagination,
|
|
218
|
+
T as defaultTranslations
|
|
219
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx as I } from "react/jsx-runtime";
|
|
2
|
-
import { a as S, T as U, s as y } from "../../Tabs.module-_kSbSyth.js";
|
|
3
2
|
import * as f from "react";
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { a as
|
|
9
|
-
import { u as
|
|
3
|
+
import { forwardRef as S, useContext as U, useMemo as j } from "react";
|
|
4
|
+
import { c as D } from "../../clsx-DB4S2d7J.js";
|
|
5
|
+
import { u as $, T as A, s as y } from "../../Tabs.module-BKlNuSPH.js";
|
|
6
|
+
import { a as p, _ as B } from "../../objectWithoutPropertiesLoose-ClNcje2_.js";
|
|
7
|
+
import { h as O, g as W, a as q, f as N, u as z, P as o, c as G, b as J } from "../../index-BvA1HyDs.js";
|
|
8
|
+
import { u as K, a as Q } from "../../useCompoundItem-wTwXbURC.js";
|
|
9
|
+
import { L as X, a as E } from "../../ListContext-Dj2Va7Iv.js";
|
|
10
|
+
import { u as Y } from "../../useButton-abQpo0za.js";
|
|
10
11
|
function Z(n) {
|
|
11
12
|
const {
|
|
12
13
|
handlePointerOverEvents: t = !1,
|
|
@@ -22,8 +23,8 @@ function Z(n) {
|
|
|
22
23
|
selected: b,
|
|
23
24
|
focusable: m
|
|
24
25
|
} = i(e), h = f.useCallback((l) => (r) => {
|
|
25
|
-
var
|
|
26
|
-
if ((
|
|
26
|
+
var d;
|
|
27
|
+
if ((d = l.onClick) == null || d.call(l, r), !r.defaultPrevented) {
|
|
27
28
|
if (process.env.NODE_ENV !== "production" && e === void 0)
|
|
28
29
|
throw new Error(["MUI: The `item` provided to useListItem() is undefined.", "This should happen only during server-side rendering under React 17."].join(`
|
|
29
30
|
`));
|
|
@@ -34,8 +35,8 @@ function Z(n) {
|
|
|
34
35
|
});
|
|
35
36
|
}
|
|
36
37
|
}, [a, e]), P = f.useCallback((l) => (r) => {
|
|
37
|
-
var
|
|
38
|
-
if ((
|
|
38
|
+
var d;
|
|
39
|
+
if ((d = l.onMouseOver) == null || d.call(l, r), !r.defaultPrevented) {
|
|
39
40
|
if (process.env.NODE_ENV !== "production" && e === void 0)
|
|
40
41
|
throw new Error(["MUI: The `item` provided to useListItem() is undefined.", "This should happen only during server-side rendering under React 17."].join(`
|
|
41
42
|
`));
|
|
@@ -46,14 +47,14 @@ function Z(n) {
|
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
}, [a, e]);
|
|
49
|
-
let
|
|
50
|
-
return m && (
|
|
50
|
+
let u;
|
|
51
|
+
return m && (u = c ? 0 : -1), {
|
|
51
52
|
getRootProps: (l = {}) => {
|
|
52
53
|
const r = O(l);
|
|
53
54
|
return p({}, l, {
|
|
54
55
|
onClick: h(r),
|
|
55
56
|
onPointerOver: t ? P(r) : void 0,
|
|
56
|
-
tabIndex:
|
|
57
|
+
tabIndex: u
|
|
57
58
|
});
|
|
58
59
|
},
|
|
59
60
|
highlighted: c,
|
|
@@ -68,9 +69,9 @@ function ee(n, t) {
|
|
|
68
69
|
}
|
|
69
70
|
const w = "Tab";
|
|
70
71
|
function te(n) {
|
|
71
|
-
return
|
|
72
|
+
return W(w, n);
|
|
72
73
|
}
|
|
73
|
-
|
|
74
|
+
q(w, ["root", "selected", "disabled"]);
|
|
74
75
|
function oe(n) {
|
|
75
76
|
return n.size;
|
|
76
77
|
}
|
|
@@ -84,20 +85,20 @@ function se(n) {
|
|
|
84
85
|
value: b,
|
|
85
86
|
selectionFollowsFocus: m,
|
|
86
87
|
getTabPanelId: h
|
|
87
|
-
} =
|
|
88
|
+
} = $(), P = f.useMemo(() => ({
|
|
88
89
|
disabled: s,
|
|
89
90
|
ref: i,
|
|
90
91
|
id: c
|
|
91
92
|
}), [s, i, c]), {
|
|
92
|
-
id:
|
|
93
|
+
id: u,
|
|
93
94
|
index: C,
|
|
94
95
|
totalItemCount: l
|
|
95
96
|
} = Q(t ?? oe, P), {
|
|
96
97
|
getRootProps: r,
|
|
97
|
-
highlighted:
|
|
98
|
+
highlighted: d,
|
|
98
99
|
selected: g
|
|
99
100
|
} = Z({
|
|
100
|
-
item:
|
|
101
|
+
item: u
|
|
101
102
|
}), {
|
|
102
103
|
getRootProps: v,
|
|
103
104
|
rootRef: R,
|
|
@@ -108,7 +109,7 @@ function se(n) {
|
|
|
108
109
|
disabled: s,
|
|
109
110
|
focusableWhenDisabled: !m,
|
|
110
111
|
type: "button"
|
|
111
|
-
}), _ = N(i, e, R), H =
|
|
112
|
+
}), _ = N(i, e, R), H = u !== void 0 ? h(u) : void 0;
|
|
112
113
|
return {
|
|
113
114
|
getRootProps: (x = {}) => {
|
|
114
115
|
const V = O(x), F = ee(r, v);
|
|
@@ -122,12 +123,12 @@ function se(n) {
|
|
|
122
123
|
},
|
|
123
124
|
active: T,
|
|
124
125
|
focusVisible: L,
|
|
125
|
-
highlighted:
|
|
126
|
+
highlighted: d,
|
|
126
127
|
index: C,
|
|
127
128
|
rootRef: _,
|
|
128
129
|
// the `selected` state isn't set on the server (it relies on effects to be calculated),
|
|
129
130
|
// so we fall back to checking the `value` prop with the selectedValue from the TabsContext
|
|
130
|
-
selected: g ||
|
|
131
|
+
selected: g || u === b,
|
|
131
132
|
setFocusVisible: M,
|
|
132
133
|
totalTabsCount: l
|
|
133
134
|
};
|
|
@@ -148,13 +149,13 @@ const ne = ["action", "children", "disabled", "onChange", "onClick", "onFocus",
|
|
|
148
149
|
slotProps: c = {},
|
|
149
150
|
slots: b = {},
|
|
150
151
|
value: m
|
|
151
|
-
} = t, h =
|
|
152
|
+
} = t, h = B(t, ne), P = f.useRef(), u = N(P, e), {
|
|
152
153
|
active: C,
|
|
153
154
|
highlighted: l,
|
|
154
155
|
selected: r,
|
|
155
|
-
getRootProps:
|
|
156
|
+
getRootProps: d
|
|
156
157
|
} = se(p({}, t, {
|
|
157
|
-
rootRef:
|
|
158
|
+
rootRef: u,
|
|
158
159
|
value: m
|
|
159
160
|
})), g = p({}, t, {
|
|
160
161
|
active: C,
|
|
@@ -163,7 +164,7 @@ const ne = ["action", "children", "disabled", "onChange", "onClick", "onFocus",
|
|
|
163
164
|
selected: r
|
|
164
165
|
}), v = re(g), R = (s = b.root) != null ? s : "button", T = z({
|
|
165
166
|
elementType: R,
|
|
166
|
-
getSlotProps:
|
|
167
|
+
getSlotProps: d,
|
|
167
168
|
externalSlotProps: c.root,
|
|
168
169
|
externalForwardedProps: h,
|
|
169
170
|
additionalProps: {
|
|
@@ -222,15 +223,19 @@ process.env.NODE_ENV !== "production" && (k.propTypes = {
|
|
|
222
223
|
*/
|
|
223
224
|
value: o.oneOfType([o.number, o.string])
|
|
224
225
|
});
|
|
225
|
-
const
|
|
226
|
-
children: n,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
226
|
+
const he = S(
|
|
227
|
+
({ children: n, value: t, disabled: e, dataTestId: s }, a) => {
|
|
228
|
+
const i = U(A), c = j(
|
|
229
|
+
() => D(
|
|
230
|
+
y.tabs__tab,
|
|
231
|
+
t === (i == null ? void 0 : i.value) && y["tabs__tab--selected"],
|
|
232
|
+
e && y["tabs__tab--disabled"]
|
|
233
|
+
),
|
|
234
|
+
[t, i, e]
|
|
235
|
+
);
|
|
236
|
+
return /* @__PURE__ */ I(k, { className: c, disabled: e, value: t, "data-testid": s, ref: a, children: n });
|
|
237
|
+
}
|
|
238
|
+
);
|
|
234
239
|
export {
|
|
235
|
-
|
|
240
|
+
he as Tab
|
|
236
241
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx as T } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import * as P from "react";
|
|
3
|
+
import { forwardRef as v } from "react";
|
|
4
|
+
import { u as y, s as x } from "../../Tabs.module-BKlNuSPH.js";
|
|
5
|
+
import { a as b, _ as C } from "../../objectWithoutPropertiesLoose-ClNcje2_.js";
|
|
6
|
+
import { g as N, a as _, f as w, u as O, P as o, c as E, b as I } from "../../index-BvA1HyDs.js";
|
|
7
|
+
import { u as S, a as U } from "../../useCompoundItem-wTwXbURC.js";
|
|
7
8
|
const h = "TabPanel";
|
|
8
9
|
function j(t) {
|
|
9
|
-
return
|
|
10
|
+
return N(h, t);
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
_(h, ["root", "hidden"]);
|
|
12
13
|
function M(t) {
|
|
13
14
|
return t.size;
|
|
14
15
|
}
|
|
@@ -17,18 +18,18 @@ function V(t) {
|
|
|
17
18
|
value: e,
|
|
18
19
|
id: s,
|
|
19
20
|
rootRef: n
|
|
20
|
-
} = t, i =
|
|
21
|
+
} = t, i = y();
|
|
21
22
|
if (i === null)
|
|
22
23
|
throw new Error("No TabContext provided");
|
|
23
24
|
const {
|
|
24
25
|
value: f,
|
|
25
|
-
getTabId:
|
|
26
|
-
} = i, a = S(s), r =
|
|
26
|
+
getTabId: m
|
|
27
|
+
} = i, a = S(s), r = P.useRef(null), c = w(r, n), u = P.useMemo(() => ({
|
|
27
28
|
id: a,
|
|
28
29
|
ref: r
|
|
29
30
|
}), [a]), {
|
|
30
31
|
id: l
|
|
31
|
-
} = U(e ?? M, u), d = l !== f, p = l !== void 0 ?
|
|
32
|
+
} = U(e ?? M, u), d = l !== f, p = l !== void 0 ? m(l) : void 0;
|
|
32
33
|
return {
|
|
33
34
|
hidden: d,
|
|
34
35
|
getRootProps: (g = {}) => b({
|
|
@@ -48,18 +49,18 @@ const F = ["children", "value", "slotProps", "slots"], $ = (t) => {
|
|
|
48
49
|
return E({
|
|
49
50
|
root: ["root", e && "hidden"]
|
|
50
51
|
}, I(j));
|
|
51
|
-
}, R = /* @__PURE__ */
|
|
52
|
+
}, R = /* @__PURE__ */ P.forwardRef(function(e, s) {
|
|
52
53
|
var n;
|
|
53
54
|
const {
|
|
54
55
|
children: i,
|
|
55
56
|
slotProps: f = {},
|
|
56
|
-
slots:
|
|
57
|
-
} = e, a =
|
|
57
|
+
slots: m = {}
|
|
58
|
+
} = e, a = C(e, F), {
|
|
58
59
|
hidden: r,
|
|
59
60
|
getRootProps: c
|
|
60
61
|
} = V(e), u = b({}, e, {
|
|
61
62
|
hidden: r
|
|
62
|
-
}), l = $(u), d = (n =
|
|
63
|
+
}), l = $(u), d = (n = m.root) != null ? n : "div", p = O({
|
|
63
64
|
elementType: d,
|
|
64
65
|
getSlotProps: c,
|
|
65
66
|
externalSlotProps: f.root,
|
|
@@ -110,11 +111,9 @@ process.env.NODE_ENV !== "production" && (R.propTypes = {
|
|
|
110
111
|
*/
|
|
111
112
|
value: o.oneOfType([o.number, o.string])
|
|
112
113
|
});
|
|
113
|
-
const
|
|
114
|
-
children: t,
|
|
115
|
-
|
|
116
|
-
dataTestId: s
|
|
117
|
-
}, n) => /* @__PURE__ */ T(R, { className: y["tabs__tab-panel"], value: e, "data-testid": s, ref: n, children: t }));
|
|
114
|
+
const q = v(
|
|
115
|
+
({ children: t, value: e, dataTestId: s }, n) => /* @__PURE__ */ T(R, { className: x["tabs__tab-panel"], value: e, "data-testid": s, ref: n, children: t })
|
|
116
|
+
);
|
|
118
117
|
export {
|
|
119
|
-
|
|
118
|
+
q as TabPanel
|
|
120
119
|
};
|