@pismo/marola 0.0.1-alpha.32 → 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 +2 -13
- package/dist/{Button-2b1peDFT.js → Button-D--uN90N.js} +26 -25
- package/dist/Dialog.module-BKWFakxu.js +15 -0
- package/dist/ListContext-Dj2Va7Iv.js +18 -0
- package/dist/Tabs.module-BKlNuSPH.js +66 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/Tabs.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/assets/main.css +1 -0
- package/dist/components/Button/Button.d.ts +2 -13
- package/dist/components/Button/Button.js +49 -60
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +1 -1
- package/dist/components/Dialog/Backdrop.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +124 -12
- package/dist/components/Dialog/Dialog.d.ts +3 -4
- package/dist/components/Dialog/Dialog.js +20098 -444
- package/dist/components/Dialog/{DialogTitle.d.ts → Title.d.ts} +3 -3
- package/dist/components/Dialog/Title.js +29 -0
- package/dist/components/IconButton/IconButton.d.ts +5 -21
- package/dist/components/IconButton/IconButton.js +76 -60
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +0 -2
- package/dist/components/PageHeader/PageHeader.d.ts +16 -56
- package/dist/components/PageHeader/PageHeader.js +65 -83
- package/dist/components/Pagination/Pagination.d.ts +6 -25
- package/dist/components/Pagination/Pagination.js +113 -131
- package/dist/components/SortTooltip/SortTooltip.d.ts +0 -28
- package/dist/components/SortTooltip/SortTooltip.js +1 -93
- package/dist/components/Table/Table.d.ts +0 -56
- package/dist/components/Table/Table.js +1 -137
- package/dist/components/Table/TableContext.d.ts +0 -19
- package/dist/components/Table/TableContext.js +1 -21
- package/dist/components/Tabs/Tab.d.ts +1 -6
- package/dist/components/Tabs/Tab.js +173 -113
- package/dist/components/Tabs/TabPanel.d.ts +1 -5
- package/dist/components/Tabs/TabPanel.js +16 -15
- package/dist/components/Tabs/Tabs.d.ts +2 -8
- package/dist/components/Tabs/Tabs.js +664 -242
- package/dist/components/Tooltip/Tooltip.d.ts +0 -33
- package/dist/components/Tooltip/Tooltip.js +1 -141
- package/dist/components/Typography/Typography.d.ts +6 -17
- package/dist/components/Typography/Typography.js +58 -58
- package/dist/{index-CH45lKw7.js → index-BvA1HyDs.js} +300 -322
- package/dist/main.d.ts +8 -27
- package/dist/main.js +28 -75
- package/dist/objectWithoutPropertiesLoose-ClNcje2_.js +22 -0
- package/dist/types/helpers.d.ts +0 -8
- package/dist/useButton-abQpo0za.js +187 -0
- package/dist/useCompoundItem-wTwXbURC.js +41 -0
- package/package.json +9 -30
- package/dist/ClickAwayListener-BSW-Nd-y.js +0 -107
- package/dist/Dialog.module-DFEmFdYT.js +0 -30
- package/dist/Group-B3p31ftp.js +0 -26
- package/dist/Popup-B6ZSGIEI.js +0 -1248
- package/dist/Portal-DIeBsWdL.js +0 -73
- package/dist/SelectButton-C8JQKaf4.js +0 -61
- package/dist/Tabs.module-jkH1Qjn7.js +0 -22
- package/dist/Toggle-BCgIItCc.js +0 -142
- package/dist/assets/Advice.css +0 -1
- package/dist/assets/Checkbox.css +0 -1
- package/dist/assets/EllipsisTooltip.css +0 -1
- package/dist/assets/Group.css +0 -1
- package/dist/assets/Input.css +0 -1
- package/dist/assets/InputSearch.css +0 -1
- package/dist/assets/SelectButton.css +0 -1
- package/dist/assets/Skeleton.css +0 -1
- package/dist/assets/Snackbar.css +0 -1
- package/dist/assets/SortTooltip.css +0 -1
- package/dist/assets/Stepper.css +0 -1
- package/dist/assets/Table.css +0 -1
- package/dist/assets/TextDisplay.css +0 -1
- package/dist/assets/Toggle.css +0 -1
- package/dist/assets/Toggle2.css +0 -1
- package/dist/assets/Tooltip.css +0 -1
- package/dist/combineHooksSlotProps-DVjg9PRh.js +0 -80
- package/dist/components/Advice/Advice.d.ts +0 -30
- package/dist/components/Advice/Advice.js +0 -47
- package/dist/components/Advice/Advice.stories.d.ts +0 -18
- package/dist/components/Button/Button.stories.d.ts +0 -62
- package/dist/components/Checkbox/Checkbox.d.ts +0 -34
- package/dist/components/Checkbox/Checkbox.js +0 -71
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -31
- package/dist/components/Chip/Chip.d.ts +0 -39
- package/dist/components/Chip/Chip.js +0 -19
- package/dist/components/Chip/Chip.stories.d.ts +0 -42
- package/dist/components/Chip/chip.test.d.ts +0 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +0 -343
- package/dist/components/Dialog/DialogTitle.js +0 -29
- package/dist/components/EllipsisTooltip/EllipsisTooltip.d.ts +0 -7
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +0 -23
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +0 -31
- package/dist/components/Icon/Icon.d.ts +0 -11
- package/dist/components/Icon/Icon.js +0 -127
- package/dist/components/Icon/Icon.stories.d.ts +0 -15
- package/dist/components/Icon/types.d.ts +0 -5
- package/dist/components/Icon/types.js +0 -1
- package/dist/components/IconButton/Icon.stories.d.ts +0 -15
- package/dist/components/Input/Input.d.ts +0 -44
- package/dist/components/Input/Input.js +0 -508
- package/dist/components/Input/Input.stories.d.ts +0 -43
- package/dist/components/InputSearch/InputSearch.d.ts +0 -9
- package/dist/components/InputSearch/InputSearch.js +0 -34
- package/dist/components/InputSearch/InputSearch.stories.d.ts +0 -39
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +0 -14
- package/dist/components/PageHeader/PageHeader.stories.d.ts +0 -14
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -17
- package/dist/components/Select/Select.d.ts +0 -26
- package/dist/components/Select/Select.js +0 -857
- package/dist/components/Select/Select.stories.d.ts +0 -22
- package/dist/components/Select/SelectButton.d.ts +0 -12
- package/dist/components/Select/SelectButton.js +0 -8
- package/dist/components/Skeleton/Skeleton.d.ts +0 -25
- package/dist/components/Skeleton/Skeleton.js +0 -23
- package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -14
- package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +0 -14
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +0 -16
- package/dist/components/Snackbar/Snackbar.d.ts +0 -27
- package/dist/components/Snackbar/Snackbar.js +0 -639
- package/dist/components/Snackbar/Snackbar.stories.d.ts +0 -319
- package/dist/components/Stepper/Stepper.d.ts +0 -26
- package/dist/components/Stepper/Stepper.js +0 -48
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -16
- package/dist/components/Table/Table.stories.d.ts +0 -29
- package/dist/components/Table/_Table.TBody.stories.d.ts +0 -14
- package/dist/components/Table/_Table.THead.stories.d.ts +0 -14
- package/dist/components/Table/_Table.Td.stories.d.ts +0 -16
- package/dist/components/Table/_Table.Th.stories.d.ts +0 -15
- package/dist/components/Table/_Table.Tr.stories.d.ts +0 -15
- package/dist/components/Tabs/Tab.stories.d.ts +0 -15
- package/dist/components/Tabs/TabPanel.stories.d.ts +0 -14
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -14
- package/dist/components/TextDisplay/TextDisplay.d.ts +0 -23
- package/dist/components/TextDisplay/TextDisplay.js +0 -37
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +0 -13
- package/dist/components/TextDisplay/textDisplay.test.d.ts +0 -1
- package/dist/components/Toggle/Toggle.d.ts +0 -11
- package/dist/components/Toggle/Toggle.js +0 -266
- package/dist/components/Toggle/Toggle.stories.d.ts +0 -21
- package/dist/components/ToggleGroup/Group.d.ts +0 -18
- package/dist/components/ToggleGroup/Group.js +0 -7
- package/dist/components/ToggleGroup/Group.test.d.ts +0 -1
- package/dist/components/ToggleGroup/Toggle.d.ts +0 -15
- package/dist/components/ToggleGroup/Toggle.js +0 -17
- package/dist/components/ToggleGroup/Toggle.test.d.ts +0 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +0 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +0 -6
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +0 -25
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -35
- package/dist/components/Typography/Typography.stories.d.ts +0 -32
- package/dist/components/Typography/typography.test.d.ts +0 -1
- package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +0 -11
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +0 -50
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +0 -21
- package/dist/index-CjW42-M-.js +0 -19584
- package/dist/marola.css +0 -1
- package/dist/test-utils/assertStyles.d.ts +0 -1
- package/dist/test-utils/assertStyles.js +0 -11
- package/dist/useButton-DNk3wrQp.js +0 -105
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useEventCallback-xTG9piMa.js +0 -45
- package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
- package/dist/useList-B0hog_3-.js +0 -436
- package/dist/useTimeout-DxF9kiZL.js +0 -36
- package/dist/utils/styleStrings.d.ts +0 -6
- package/dist/utils/styleStrings.js +0 -10
- package/dist/utils/styleStrings.test.d.ts +0 -1
|
@@ -1,129 +1,112 @@
|
|
|
1
1
|
import '../../assets/Pagination.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
function T(l = {}) {
|
|
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 = {}) {
|
|
9
8
|
const {
|
|
10
|
-
boundaryCount:
|
|
11
|
-
componentName:
|
|
9
|
+
boundaryCount: a = 1,
|
|
10
|
+
componentName: _ = "usePagination",
|
|
12
11
|
count: s = 1,
|
|
13
12
|
defaultPage: b = 1,
|
|
14
|
-
disabled:
|
|
15
|
-
hideNextButton:
|
|
16
|
-
hidePrevButton:
|
|
17
|
-
onChange:
|
|
18
|
-
page:
|
|
19
|
-
showFirstButton:
|
|
20
|
-
showLastButton:
|
|
21
|
-
siblingCount:
|
|
22
|
-
} =
|
|
23
|
-
controlled:
|
|
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,
|
|
24
23
|
default: b,
|
|
25
|
-
name:
|
|
24
|
+
name: _,
|
|
26
25
|
state: "page"
|
|
27
|
-
}),
|
|
28
|
-
|
|
29
|
-
}, v = (
|
|
30
|
-
const
|
|
26
|
+
}), N = (n, l) => {
|
|
27
|
+
o || k(l), t && t(n, l);
|
|
28
|
+
}, v = (n, l) => {
|
|
29
|
+
const I = l - n + 1;
|
|
31
30
|
return Array.from({
|
|
32
|
-
length:
|
|
33
|
-
}, (
|
|
34
|
-
},
|
|
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(
|
|
35
34
|
Math.min(
|
|
36
35
|
// Natural start
|
|
37
|
-
|
|
36
|
+
r - u,
|
|
38
37
|
// Lower boundary when page is high
|
|
39
|
-
s -
|
|
38
|
+
s - a - u * 2 - 1
|
|
40
39
|
),
|
|
41
40
|
// Greater than startPages
|
|
42
|
-
|
|
43
|
-
),
|
|
41
|
+
a + 2
|
|
42
|
+
), B = Math.min(
|
|
44
43
|
Math.max(
|
|
45
44
|
// Natural end
|
|
46
|
-
|
|
45
|
+
r + u,
|
|
47
46
|
// Upper boundary when page is low
|
|
48
|
-
|
|
47
|
+
a + u * 2 + 2
|
|
49
48
|
),
|
|
50
49
|
// Less than endPages
|
|
51
|
-
|
|
50
|
+
f.length > 0 ? f[0] - 2 : s - 1
|
|
52
51
|
), L = [
|
|
53
|
-
...
|
|
54
|
-
...
|
|
55
|
-
...
|
|
52
|
+
...p ? ["first"] : [],
|
|
53
|
+
...m ? [] : ["previous"],
|
|
54
|
+
...j,
|
|
56
55
|
// Start ellipsis
|
|
57
56
|
// eslint-disable-next-line no-nested-ternary
|
|
58
|
-
...
|
|
57
|
+
...y > a + 2 ? ["start-ellipsis"] : a + 1 < s - a ? [a + 1] : [],
|
|
59
58
|
// Sibling pages
|
|
60
|
-
...v(
|
|
59
|
+
...v(y, B),
|
|
61
60
|
// End ellipsis
|
|
62
61
|
// eslint-disable-next-line no-nested-ternary
|
|
63
|
-
...
|
|
64
|
-
...
|
|
65
|
-
...
|
|
66
|
-
...
|
|
67
|
-
],
|
|
68
|
-
switch (
|
|
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) {
|
|
69
68
|
case "first":
|
|
70
69
|
return 1;
|
|
71
70
|
case "previous":
|
|
72
|
-
return
|
|
71
|
+
return r - 1;
|
|
73
72
|
case "next":
|
|
74
|
-
return
|
|
73
|
+
return r + 1;
|
|
75
74
|
case "last":
|
|
76
75
|
return s;
|
|
77
76
|
default:
|
|
78
77
|
return null;
|
|
79
78
|
}
|
|
80
|
-
},
|
|
81
|
-
onClick: (
|
|
82
|
-
|
|
79
|
+
}, F = L.map((n) => typeof n == "number" ? {
|
|
80
|
+
onClick: (l) => {
|
|
81
|
+
N(l, n);
|
|
83
82
|
},
|
|
84
83
|
type: "page",
|
|
85
|
-
page:
|
|
86
|
-
selected:
|
|
87
|
-
disabled:
|
|
88
|
-
"aria-current":
|
|
84
|
+
page: n,
|
|
85
|
+
selected: n === r,
|
|
86
|
+
disabled: h,
|
|
87
|
+
"aria-current": n === r ? "true" : void 0
|
|
89
88
|
} : {
|
|
90
|
-
onClick: (
|
|
91
|
-
|
|
89
|
+
onClick: (l) => {
|
|
90
|
+
N(l, w(n));
|
|
92
91
|
},
|
|
93
|
-
type:
|
|
94
|
-
page:
|
|
92
|
+
type: n,
|
|
93
|
+
page: w(n),
|
|
95
94
|
selected: !1,
|
|
96
|
-
disabled:
|
|
95
|
+
disabled: h || n.indexOf("ellipsis") === -1 && (n === "next" || n === "last" ? r >= s : r <= 1)
|
|
97
96
|
});
|
|
98
|
-
return
|
|
99
|
-
items:
|
|
97
|
+
return A({
|
|
98
|
+
items: F
|
|
100
99
|
}, d);
|
|
101
100
|
}
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
"per-page-container": "_per-page-container_19imj_43",
|
|
112
|
-
"u-typography-base--xxl": "_u-typography-base--xxl_19imj_48",
|
|
113
|
-
"u-typography-base--xl": "_u-typography-base--xl_19imj_52",
|
|
114
|
-
"u-typography-base--lg": "_u-typography-base--lg_19imj_56",
|
|
115
|
-
"u-typography-base--sm": "_u-typography-base--sm_19imj_60",
|
|
116
|
-
"u-typography-base--bold": "_u-typography-base--bold_19imj_64",
|
|
117
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_19imj_67",
|
|
118
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_19imj_70",
|
|
119
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_19imj_73",
|
|
120
|
-
"per-page-container__select": "_per-page-container__select_19imj_90",
|
|
121
|
-
"pages-navigator-container": "_pages-navigator-container_19imj_97",
|
|
122
|
-
"page-item": "_page-item_19imj_114",
|
|
123
|
-
"page-number__btn": "_page-number__btn_19imj_114",
|
|
124
|
-
"pages-navigator-container__previous-next-btn": "_pages-navigator-container__previous-next-btn_19imj_133",
|
|
125
|
-
"page-number__btn--selected": "_page-number__btn--selected_19imj_158"
|
|
126
|
-
}, q = {
|
|
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 = {
|
|
127
110
|
pt: {
|
|
128
111
|
showing: "Exibindo",
|
|
129
112
|
of: "de",
|
|
@@ -138,91 +121,90 @@ const W = "_pagination_19imj_43", u = {
|
|
|
138
121
|
previous: "Previous",
|
|
139
122
|
next: "Next"
|
|
140
123
|
}
|
|
141
|
-
},
|
|
142
|
-
const
|
|
143
|
-
count:
|
|
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: _,
|
|
144
127
|
hideNextButton: !0,
|
|
145
128
|
hidePrevButton: !0,
|
|
146
129
|
page: e.currentPage,
|
|
130
|
+
onChange: (t, o) => e.onPageChange(o),
|
|
147
131
|
siblingCount: 1,
|
|
148
|
-
boundaryCount: 2
|
|
149
|
-
onChange: (t, r) => e.onPageChange(r)
|
|
132
|
+
boundaryCount: 2
|
|
150
133
|
});
|
|
151
|
-
return /* @__PURE__ */
|
|
134
|
+
return /* @__PURE__ */ P("div", { className: C(c.pagination, e.className), "data-testid": e["data-testid"], children: [
|
|
152
135
|
/* @__PURE__ */ i(
|
|
153
136
|
"div",
|
|
154
137
|
{
|
|
155
|
-
className:
|
|
156
|
-
"data-testid": e["data-
|
|
157
|
-
children:
|
|
158
|
-
|
|
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`,
|
|
159
142
|
/* @__PURE__ */ i(
|
|
160
|
-
|
|
143
|
+
"select",
|
|
161
144
|
{
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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";
|
|
167
151
|
return /* @__PURE__ */ i(
|
|
168
|
-
|
|
152
|
+
"option",
|
|
169
153
|
{
|
|
170
|
-
value:
|
|
171
|
-
children:
|
|
154
|
+
value: o ? t : t.value,
|
|
155
|
+
children: o ? t : t.label
|
|
172
156
|
},
|
|
173
|
-
`per-page__${
|
|
157
|
+
`per-page__${o ? t : t.value}`
|
|
174
158
|
);
|
|
175
159
|
})
|
|
176
160
|
}
|
|
177
161
|
),
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
_`results`
|
|
184
|
-
] })
|
|
162
|
+
g`of`,
|
|
163
|
+
" ",
|
|
164
|
+
/* @__PURE__ */ i("strong", { children: e.totalItems }),
|
|
165
|
+
" ",
|
|
166
|
+
g`results`
|
|
185
167
|
] })
|
|
186
168
|
}
|
|
187
169
|
),
|
|
188
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ P(
|
|
189
171
|
"div",
|
|
190
172
|
{
|
|
191
|
-
className:
|
|
192
|
-
"data-testid": e["data-
|
|
173
|
+
className: C(c["pages-navigator-container"], e.classNamePagesNav),
|
|
174
|
+
"data-testid": e["data-testid__per-page"],
|
|
193
175
|
children: [
|
|
194
176
|
/* @__PURE__ */ i(
|
|
195
177
|
"button",
|
|
196
178
|
{
|
|
197
|
-
className:
|
|
198
|
-
disabled:
|
|
179
|
+
className: c["pages-navigator-container__previous-next-btn"],
|
|
180
|
+
disabled: s,
|
|
199
181
|
onClick: () => e.onPageChange(e.currentPage - 1),
|
|
200
182
|
type: "button",
|
|
201
|
-
children:
|
|
183
|
+
children: g`previous`
|
|
202
184
|
},
|
|
203
185
|
"page__previous"
|
|
204
186
|
),
|
|
205
|
-
|
|
206
|
-
let
|
|
207
|
-
return
|
|
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(
|
|
208
190
|
"button",
|
|
209
191
|
{
|
|
210
|
-
className:
|
|
192
|
+
className: [c["page-number__btn"], p ? c["page-number__btn--selected"] : ""].join(" ").trim(),
|
|
211
193
|
onClick: () => e.onPageChange(t || 0),
|
|
212
194
|
type: "button",
|
|
213
195
|
children: t
|
|
214
196
|
},
|
|
215
|
-
`page__${
|
|
216
|
-
) :
|
|
217
|
-
})
|
|
197
|
+
`page__${u}`
|
|
198
|
+
) : d = /* @__PURE__ */ i("button", { type: "button", ...x, children: o }), /* @__PURE__ */ i("li", { children: d }, u);
|
|
199
|
+
}),
|
|
218
200
|
/* @__PURE__ */ i(
|
|
219
201
|
"button",
|
|
220
202
|
{
|
|
221
|
-
className:
|
|
222
|
-
disabled:
|
|
203
|
+
className: c["pages-navigator-container__previous-next-btn"],
|
|
204
|
+
disabled: b,
|
|
223
205
|
onClick: () => e.onPageChange(e.currentPage + 1),
|
|
224
206
|
type: "button",
|
|
225
|
-
children:
|
|
207
|
+
children: g`next`
|
|
226
208
|
},
|
|
227
209
|
"page__next"
|
|
228
210
|
)
|
|
@@ -232,6 +214,6 @@ const W = "_pagination_19imj_43", u = {
|
|
|
232
214
|
] });
|
|
233
215
|
};
|
|
234
216
|
export {
|
|
235
|
-
|
|
236
|
-
|
|
217
|
+
J as Pagination,
|
|
218
|
+
T as defaultTranslations
|
|
237
219
|
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
|
|
3
|
-
export type SortType = 'ASC' | 'DESC';
|
|
4
|
-
type SortCommonProps = {
|
|
5
|
-
className?: string;
|
|
6
|
-
'data-testid'?: string;
|
|
7
|
-
};
|
|
8
|
-
export type SortTranslationsByKeys = {
|
|
9
|
-
asc: string;
|
|
10
|
-
desc: string;
|
|
11
|
-
};
|
|
12
|
-
type SortLanguages = 'pt' | 'en';
|
|
13
|
-
type SortTranslations = {
|
|
14
|
-
t?: SortTranslationsByKeys;
|
|
15
|
-
language?: SortLanguages;
|
|
16
|
-
};
|
|
17
|
-
type SortTooltipProps = {
|
|
18
|
-
onSort: (order: SortType) => void;
|
|
19
|
-
onClose: () => void;
|
|
20
|
-
sortType?: SortType;
|
|
21
|
-
show?: boolean;
|
|
22
|
-
anchorRef?: HTMLElement | null | undefined;
|
|
23
|
-
} & SortCommonProps & SortTranslations;
|
|
24
|
-
export declare const sortTooltipDefaultTranslations: {
|
|
25
|
-
[key in SortLanguages]: SortTranslationsByKeys;
|
|
26
|
-
};
|
|
27
|
-
declare const SortTooltip: ({ children, className, language, onClose, onSort, show, sortType, t, ...rest }: PropsWithChildren<SortTooltipProps>) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export { SortTooltip };
|
|
@@ -1,93 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
3
|
-
import { c as d } from "../../clsx-DB4S2d7J.js";
|
|
4
|
-
import { Tooltip as b } from "../Tooltip/Tooltip.js";
|
|
5
|
-
import * as t from "react";
|
|
6
|
-
const m = (h) => /* @__PURE__ */ t.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...h }, /* @__PURE__ */ t.createElement("path", { d: "M4.73768 14.6906C4.35893 15.105 3.64205 15.105 3.26299 14.6906L0.541112 11.6878C0.167987 11.28 0.195487 10.6469 0.602643 10.2731C1.00952 9.89969 1.64233 9.92812 2.01577 10.3348L3.00017 11.4406V2.00094C3.00017 1.44781 3.44799 1 4.00017 1C4.55236 1 5.00017 1.44781 5.00017 2.00094V11.4384L6.01267 10.3325C6.3708 9.94219 7.00236 9.88281 7.4258 10.2708C7.83299 10.6443 7.86018 11.2777 7.48733 11.6855L4.73768 14.6906Z", fill: "#1897F3" }), /* @__PURE__ */ t.createElement("path", { opacity: 0.4, d: "M14.0001 13H12.4141L14.7073 10.7069C14.9934 10.4208 15.0788 9.99098 14.9241 9.61691C14.7693 9.24285 14.4032 9.00004 13.972 9.00004H9.97196C9.44696 9.00004 9.00008 9.44691 9.00008 10C9.00008 10.5532 9.4479 11 10.0001 11H11.586L9.2929 13.2932C9.00677 13.5793 8.92133 14.0091 9.07608 14.3832C9.23083 14.7572 9.59696 15 9.97196 15H13.9438C14.5532 15 15.0001 14.5532 15.0001 14C15.0001 13.4469 14.5532 13 14.0001 13ZM15.3938 6.54066L12.8941 1.53754C12.5554 0.855977 11.4441 0.855977 11.1054 1.53754L8.60633 6.54066C8.35927 7.03785 8.55946 7.64191 9.05352 7.89035C9.54946 8.13791 10.1485 7.93651 10.3951 7.44035L10.6186 6.99066H13.3821L13.6056 7.44035C13.7986 7.82879 14.3547 8.18629 14.9472 7.89035C15.4407 7.64379 15.6407 7.03754 15.3938 6.54066ZM11.4938 5.23129L12.0001 4.20941L12.507 5.2291H11.4938V5.23129Z", fill: "#1897F3" })), L = (h) => /* @__PURE__ */ t.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...h }, /* @__PURE__ */ t.createElement("path", { d: "M0.512792 11.6594C0.139667 11.2516 0.167167 10.6184 0.574323 10.2447C0.766229 10.0688 1.00839 9.98175 1.24964 9.98175C1.52063 9.98175 1.79026 10.0912 1.98745 10.3064L2.99998 11.4406V2.00094C2.99998 1.44781 3.44779 1 3.99998 1C4.55217 1 4.99998 1.44781 4.99998 2.00094V11.4384L6.01248 10.3325C6.38748 9.92812 7.01873 9.89687 7.42498 10.2719C7.83216 10.6453 7.85935 11.2787 7.48651 11.6866L4.76463 14.6894C4.38588 15.1037 3.66901 15.1037 3.28995 14.6894L0.512792 11.6594Z", fill: "#1897F3" }), /* @__PURE__ */ t.createElement("path", { opacity: 0.4, d: "M10.0002 3H11.5862L9.29303 5.29313C9.00691 5.57925 8.92147 6.00906 9.07622 6.38313C9.23097 6.75719 9.59591 7 9.99997 7H13.9718C14.5533 6.97188 15.0002 6.55313 15.0002 6C15.0002 5.44688 14.5524 5 14.0002 5H12.4143L14.7074 2.70688C14.9935 2.42075 15.079 1.99094 14.9242 1.61688C14.7695 1.24281 14.4033 1 13.9721 1H10.0002C9.44709 1 9.00022 1.44719 9.00022 2C9.00022 2.55281 9.44709 3 10.0002 3ZM15.394 13.5406L12.8943 8.5375C12.5555 7.85594 11.4443 7.85594 11.1055 8.5375L8.60584 13.5406C8.35878 14.0378 8.55897 14.6419 9.05303 14.8903C9.54897 15.1379 10.148 14.9365 10.3946 14.4403L10.6182 13.9906H13.3816L13.6052 14.4403C13.7981 14.8288 14.3542 15.1863 14.9467 14.8903C15.4408 14.6438 15.6408 14.0375 15.394 13.5406ZM11.494 12.2313L12.0002 11.2094L12.5071 12.2291H11.494V12.2313Z", fill: "#1897F3" })), p = {
|
|
7
|
-
"u-typography-h1": "_u-typography-h1_1hhgh_1",
|
|
8
|
-
"u-typography-h2": "_u-typography-h2_1hhgh_8",
|
|
9
|
-
"u-typography-h3": "_u-typography-h3_1hhgh_15",
|
|
10
|
-
"u-typography-h4": "_u-typography-h4_1hhgh_22",
|
|
11
|
-
"u-typography-h5": "_u-typography-h5_1hhgh_29",
|
|
12
|
-
"u-typography-h6": "_u-typography-h6_1hhgh_36",
|
|
13
|
-
"u-typography-base": "_u-typography-base_1hhgh_43",
|
|
14
|
-
"sort-tooltip": "_sort-tooltip_1hhgh_43",
|
|
15
|
-
"u-typography-base--xxl": "_u-typography-base--xxl_1hhgh_48",
|
|
16
|
-
"u-typography-base--xl": "_u-typography-base--xl_1hhgh_52",
|
|
17
|
-
"u-typography-base--lg": "_u-typography-base--lg_1hhgh_56",
|
|
18
|
-
"u-typography-base--sm": "_u-typography-base--sm_1hhgh_60",
|
|
19
|
-
"u-typography-base--bold": "_u-typography-base--bold_1hhgh_64",
|
|
20
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1hhgh_67",
|
|
21
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_1hhgh_70",
|
|
22
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1hhgh_73",
|
|
23
|
-
"button--selected": "_button--selected_1hhgh_94"
|
|
24
|
-
}, w = {
|
|
25
|
-
pt: {
|
|
26
|
-
asc: "Ascendente",
|
|
27
|
-
desc: "Descendente"
|
|
28
|
-
},
|
|
29
|
-
en: {
|
|
30
|
-
asc: "Sort ascending",
|
|
31
|
-
desc: "Sort descending"
|
|
32
|
-
}
|
|
33
|
-
}, Z = ({
|
|
34
|
-
children: h,
|
|
35
|
-
className: y,
|
|
36
|
-
language: l,
|
|
37
|
-
onClose: o,
|
|
38
|
-
onSort: r,
|
|
39
|
-
show: n,
|
|
40
|
-
sortType: s,
|
|
41
|
-
t: i,
|
|
42
|
-
..._
|
|
43
|
-
}) => {
|
|
44
|
-
const u = d(p["sort-tooltip"], y), C = i || w[l || "en"], g = (c) => C[c];
|
|
45
|
-
return /* @__PURE__ */ e(
|
|
46
|
-
b,
|
|
47
|
-
{
|
|
48
|
-
className: u,
|
|
49
|
-
onClose: o,
|
|
50
|
-
open: n,
|
|
51
|
-
theme: "white",
|
|
52
|
-
padding: "normal",
|
|
53
|
-
position: "bottom-start",
|
|
54
|
-
disableHoverListener: !0,
|
|
55
|
-
title: /* @__PURE__ */ a("ul", { children: [
|
|
56
|
-
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ a(
|
|
57
|
-
"button",
|
|
58
|
-
{
|
|
59
|
-
type: "button",
|
|
60
|
-
onClick: () => {
|
|
61
|
-
o(), r("ASC");
|
|
62
|
-
},
|
|
63
|
-
className: s === "ASC" ? p["button--selected"] : "",
|
|
64
|
-
children: [
|
|
65
|
-
/* @__PURE__ */ e(m, {}),
|
|
66
|
-
g`asc`
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
) }),
|
|
70
|
-
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ a(
|
|
71
|
-
"button",
|
|
72
|
-
{
|
|
73
|
-
type: "button",
|
|
74
|
-
onClick: () => {
|
|
75
|
-
o(), r("DESC");
|
|
76
|
-
},
|
|
77
|
-
className: s === "DESC" ? p["button--selected"] : "",
|
|
78
|
-
children: [
|
|
79
|
-
/* @__PURE__ */ e(L, {}),
|
|
80
|
-
g`desc`
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
) })
|
|
84
|
-
] }),
|
|
85
|
-
..._,
|
|
86
|
-
children: h
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
};
|
|
90
|
-
export {
|
|
91
|
-
Z as SortTooltip,
|
|
92
|
-
w as sortTooltipDefaultTranslations
|
|
93
|
-
};
|
|
1
|
+
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { TableTranslations } from './TableContext';
|
|
2
|
-
import { SortType } from '../SortTooltip/SortTooltip';
|
|
3
|
-
import { PaginationProps } from '../Pagination/Pagination';
|
|
4
|
-
|
|
5
|
-
export type ChildrenProps = {
|
|
6
|
-
/** Children of the component */
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
/** CSS classes to be applied on the component */
|
|
9
|
-
className?: string;
|
|
10
|
-
/** Id to be applied as data-testid on the component */
|
|
11
|
-
'data-testid'?: string;
|
|
12
|
-
};
|
|
13
|
-
type ActionProps = {
|
|
14
|
-
/** Disabled status */
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
/** Functionality to perform once clicked */
|
|
17
|
-
onClick?: () => void;
|
|
18
|
-
};
|
|
19
|
-
type AlignProps = {
|
|
20
|
-
/** Alignment */
|
|
21
|
-
align?: 'left' | 'right' | 'center';
|
|
22
|
-
};
|
|
23
|
-
type TableTheme = 'white' | 'transparent';
|
|
24
|
-
export type TableProps = ChildrenProps & {
|
|
25
|
-
/** Set if the table is full width */
|
|
26
|
-
fullWidth?: boolean;
|
|
27
|
-
/** Pagination Props */
|
|
28
|
-
paginationProps?: PaginationProps;
|
|
29
|
-
/** Set theme */
|
|
30
|
-
theme?: TableTheme;
|
|
31
|
-
/** Set language */
|
|
32
|
-
language?: string;
|
|
33
|
-
/** Set translations to labels */
|
|
34
|
-
translations?: TableTranslations;
|
|
35
|
-
};
|
|
36
|
-
declare const Table: {
|
|
37
|
-
({ children, theme, fullWidth, className, paginationProps, language, translations, ...rest }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
-
THead: import('react').FunctionComponent<ChildrenProps>;
|
|
39
|
-
TBody: import('react').FunctionComponent<ChildrenProps>;
|
|
40
|
-
Tr: import('react').FunctionComponent<TrProps>;
|
|
41
|
-
Td: import('react').FunctionComponent<TdProps>;
|
|
42
|
-
Th: import('react').FunctionComponent<ThProps>;
|
|
43
|
-
};
|
|
44
|
-
export declare const THead: ({ children, ...rest }: ChildrenProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
-
export declare const TBody: ({ children, ...rest }: ChildrenProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
-
export type TrProps = ChildrenProps & ActionProps;
|
|
47
|
-
export declare const Tr: ({ children, onClick, disabled, className, ...rest }: TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
-
export type TdProps = ChildrenProps & ActionProps & AlignProps;
|
|
49
|
-
export declare const Td: ({ children, onClick, disabled, className, align, ...rest }: TdProps) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
-
export type ThProps = ChildrenProps & AlignProps & {
|
|
51
|
-
onSort?: (order: SortType) => void;
|
|
52
|
-
sortType?: SortType;
|
|
53
|
-
classNameTooltip?: string;
|
|
54
|
-
};
|
|
55
|
-
export declare const Th: ({ children, onSort, sortType, className, classNameTooltip, align, ...rest }: ThProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
-
export { Table, type TableTranslations };
|