@pismo/marola 0.0.1-alpha.8 → 1.0.0-beta.0
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 +1 -1
- package/dist/{Button-B1umG8kJ.js → Button-2b1peDFT.js} +25 -26
- package/dist/{ClickAwayListener-BKznXF1d.js → ClickAwayListener-BSW-Nd-y.js} +3 -2
- package/dist/Dialog.module-DFEmFdYT.js +30 -0
- package/dist/Group-B3p31ftp.js +26 -0
- package/dist/Popup-B6ZSGIEI.js +1248 -0
- package/dist/{Portal-BcdMtRGF.js → Portal-DIeBsWdL.js} +2 -2
- package/dist/SelectButton-C8JQKaf4.js +61 -0
- package/dist/Tabs.module-jkH1Qjn7.js +22 -0
- package/dist/Toggle-BCgIItCc.js +142 -0
- package/dist/assets/Advice.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/EllipsisTooltip.css +1 -0
- package/dist/assets/Group.css +1 -0
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputSearch.css +1 -1
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/SelectButton.css +1 -0
- package/dist/assets/Skeleton.css +1 -1
- package/dist/assets/Snackbar.css +1 -1
- package/dist/assets/SortTooltip.css +1 -1
- package/dist/assets/Stepper.css +1 -1
- package/dist/assets/Table.css +1 -1
- package/dist/assets/TextDisplay.css +1 -0
- package/dist/assets/Toggle.css +1 -1
- package/dist/assets/Toggle2.css +1 -0
- package/dist/assets/Typography.css +1 -1
- package/dist/combineHooksSlotProps-DVjg9PRh.js +80 -0
- package/dist/components/Advice/Advice.d.ts +17 -3
- package/dist/components/Advice/Advice.js +39 -17
- package/dist/components/Advice/Advice.stories.d.ts +18 -0
- package/dist/components/Button/Button.d.ts +6 -3
- package/dist/components/Button/Button.js +60 -65
- package/dist/components/Button/Button.stories.d.ts +3 -1
- package/dist/components/Checkbox/Checkbox.d.ts +19 -2
- package/dist/components/Checkbox/Checkbox.js +63 -40
- package/dist/components/Checkbox/Checkbox.stories.d.ts +31 -0
- package/dist/components/Chip/Chip.d.ts +39 -0
- package/dist/components/Chip/Chip.js +19 -0
- package/dist/components/Chip/Chip.stories.d.ts +42 -0
- package/dist/components/Chip/chip.test.d.ts +1 -0
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +2 -2
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +13 -13
- package/dist/components/Dialog/Dialog.stories.d.ts +10 -10
- package/dist/components/Dialog/{Title.d.ts → DialogTitle.d.ts} +3 -3
- package/dist/components/Dialog/DialogTitle.js +29 -0
- package/dist/components/EllipsisTooltip/EllipsisTooltip.d.ts +7 -0
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +23 -0
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +31 -0
- package/dist/components/Icon/Icon.d.ts +8 -15
- package/dist/components/Icon/Icon.js +85 -41
- package/dist/components/Icon/Icon.stories.d.ts +15 -0
- package/dist/components/Icon/types.d.ts +5 -0
- package/dist/components/Icon/types.js +1 -0
- package/dist/components/IconButton/Icon.stories.d.ts +15 -0
- package/dist/components/IconButton/IconButton.d.ts +18 -2
- package/dist/components/IconButton/IconButton.js +58 -63
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +241 -230
- package/dist/components/InputSearch/InputSearch.d.ts +7 -9
- package/dist/components/InputSearch/InputSearch.js +30 -25
- package/dist/components/InputSearch/InputSearch.stories.d.ts +21 -4
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +36 -6
- package/dist/components/PageHeader/PageHeader.js +83 -47
- package/dist/components/PageHeader/PageHeader.stories.d.ts +2 -31
- package/dist/components/Pagination/Pagination.d.ts +24 -5
- package/dist/components/Pagination/Pagination.js +127 -109
- package/dist/components/Pagination/Pagination.stories.d.ts +17 -0
- package/dist/components/Select/Select.d.ts +26 -0
- package/dist/components/Select/Select.js +857 -0
- package/dist/components/Select/Select.stories.d.ts +22 -0
- package/dist/components/Select/SelectButton.d.ts +12 -0
- package/dist/components/Select/SelectButton.js +8 -0
- package/dist/components/Skeleton/Skeleton.d.ts +10 -3
- package/dist/components/Skeleton/Skeleton.js +16 -19
- package/dist/components/Skeleton/Skeleton.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +16 -0
- package/dist/components/Snackbar/Snackbar.d.ts +19 -5
- package/dist/components/Snackbar/Snackbar.js +247 -230
- package/dist/components/Snackbar/Snackbar.stories.d.ts +319 -0
- package/dist/components/SortTooltip/SortTooltip.d.ts +3 -1
- package/dist/components/SortTooltip/SortTooltip.js +55 -29
- package/dist/components/Stepper/Stepper.d.ts +11 -1
- package/dist/components/Stepper/Stepper.js +37 -22
- package/dist/components/Stepper/Stepper.stories.d.ts +16 -0
- package/dist/components/Table/Table.d.ts +33 -16
- package/dist/components/Table/Table.js +106 -91
- package/dist/components/Table/Table.stories.d.ts +29 -0
- package/dist/components/Table/_Table.TBody.stories.d.ts +14 -0
- package/dist/components/Table/_Table.THead.stories.d.ts +14 -0
- package/dist/components/Table/_Table.Td.stories.d.ts +16 -0
- package/dist/components/Table/_Table.Th.stories.d.ts +15 -0
- package/dist/components/Table/_Table.Tr.stories.d.ts +15 -0
- package/dist/components/Tabs/Tab.d.ts +5 -0
- package/dist/components/Tabs/Tab.js +179 -6
- package/dist/components/Tabs/Tab.stories.d.ts +15 -0
- package/dist/components/Tabs/TabPanel.d.ts +4 -0
- package/dist/components/Tabs/TabPanel.js +12 -12
- package/dist/components/Tabs/TabPanel.stories.d.ts +14 -0
- package/dist/components/Tabs/Tabs.d.ts +5 -1
- package/dist/components/Tabs/Tabs.js +242 -668
- package/dist/components/Tabs/Tabs.stories.d.ts +14 -0
- package/dist/components/TextDisplay/TextDisplay.d.ts +23 -0
- package/dist/components/TextDisplay/TextDisplay.js +37 -0
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +13 -0
- package/dist/components/TextDisplay/textDisplay.test.d.ts +1 -0
- package/dist/components/Toggle/Toggle.d.ts +2 -3
- package/dist/components/Toggle/Toggle.js +148 -133
- package/dist/components/Toggle/Toggle.stories.d.ts +2 -3
- package/dist/components/ToggleGroup/Group.d.ts +18 -0
- package/dist/components/ToggleGroup/Group.js +7 -0
- package/dist/components/ToggleGroup/Group.test.d.ts +1 -0
- package/dist/components/ToggleGroup/Toggle.d.ts +15 -0
- package/dist/components/ToggleGroup/Toggle.js +17 -0
- package/dist/components/ToggleGroup/Toggle.test.d.ts +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +2 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +6 -0
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +25 -0
- package/dist/components/Tooltip/Tooltip.d.ts +22 -6
- package/dist/components/Tooltip/Tooltip.js +114 -1339
- package/dist/components/Tooltip/Tooltip.stories.d.ts +35 -0
- package/dist/components/Typography/Typography.d.ts +4 -2
- package/dist/components/Typography/Typography.js +56 -73
- package/dist/components/Typography/Typography.stories.d.ts +1 -0
- package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +11 -0
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +50 -0
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +21 -0
- package/dist/{index-CqjC7P5Y.js → index-CH45lKw7.js} +333 -307
- package/dist/{index-BNWbc5Kh.js → index-CjW42-M-.js} +3108 -3152
- package/dist/main.d.ts +10 -1
- package/dist/main.js +73 -55
- package/dist/marola.css +1 -0
- package/dist/{useButton-Bc8IAgyk.js → useButton-DNk3wrQp.js} +3 -4
- package/dist/useCompoundItem-D1iRfg8D.js +84 -0
- package/dist/useEventCallback-xTG9piMa.js +45 -0
- package/dist/useList-B0hog_3-.js +436 -0
- package/dist/utils/styleStrings.d.ts +1 -1
- package/dist/utils/styleStrings.js +7 -7
- package/package.json +4 -4
- package/dist/Dialog.module-CGVM5V_D.js +0 -15
- package/dist/Tab-CRwnhsj5.js +0 -254
- package/dist/Tabs.module-yYcTJnj6.js +0 -103
- package/dist/_commonjsHelpers-CT_km90n.js +0 -30
- package/dist/assets/global.css +0 -1
- package/dist/components/Button/Button.stories.js +0 -40
- package/dist/components/Dialog/Dialog.stories.js +0 -59
- package/dist/components/Dialog/Title.js +0 -29
- package/dist/components/Input/Input.stories.js +0 -106
- package/dist/components/InputSearch/InputSearch.stories.js +0 -36
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +0 -38
- package/dist/components/PageHeader/PageHeader.stories.js +0 -49
- package/dist/components/Toggle/Toggle.stories.js +0 -27
- package/dist/components/Typography/Typography.stories.js +0 -30
- package/dist/components/Typography/typography.test.js +0 -11357
- package/dist/magic-string.es-O_8lTkE3.js +0 -738
- package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +0 -26
- package/dist/utils/styleStrings.test.js +0 -41
- package/dist/vi.Y_w82WR8-Df0JUamG.js +0 -9860
|
@@ -1,112 +1,129 @@
|
|
|
1
1
|
import '../../assets/Pagination.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { jsxs as m, jsx as i, Fragment as k } from "react/jsx-runtime";
|
|
3
|
+
import { c as y } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import { Select as w } from "../Select/Select.js";
|
|
5
|
+
import { _ as A, b as E } from "../../index-CH45lKw7.js";
|
|
6
|
+
import { u as $ } from "../../useControlled-CCMYYdCM.js";
|
|
7
|
+
const R = ["boundaryCount", "componentName", "count", "defaultPage", "disabled", "hideNextButton", "hidePrevButton", "onChange", "page", "showFirstButton", "showLastButton", "siblingCount"];
|
|
8
|
+
function T(l = {}) {
|
|
8
9
|
const {
|
|
9
|
-
boundaryCount:
|
|
10
|
-
componentName:
|
|
10
|
+
boundaryCount: n = 1,
|
|
11
|
+
componentName: e = "usePagination",
|
|
11
12
|
count: s = 1,
|
|
12
13
|
defaultPage: b = 1,
|
|
13
|
-
disabled:
|
|
14
|
-
hideNextButton:
|
|
15
|
-
hidePrevButton:
|
|
16
|
-
onChange:
|
|
17
|
-
page:
|
|
18
|
-
showFirstButton:
|
|
14
|
+
disabled: c = !1,
|
|
15
|
+
hideNextButton: x = !1,
|
|
16
|
+
hidePrevButton: _ = !1,
|
|
17
|
+
onChange: p,
|
|
18
|
+
page: t,
|
|
19
|
+
showFirstButton: r = !1,
|
|
19
20
|
showLastButton: f = !1,
|
|
20
|
-
siblingCount:
|
|
21
|
-
} =
|
|
22
|
-
controlled:
|
|
21
|
+
siblingCount: h = 1
|
|
22
|
+
} = l, d = A(l, R), [o, M] = $({
|
|
23
|
+
controlled: t,
|
|
23
24
|
default: b,
|
|
24
|
-
name:
|
|
25
|
+
name: e,
|
|
25
26
|
state: "page"
|
|
26
|
-
}),
|
|
27
|
-
|
|
28
|
-
}, v = (
|
|
29
|
-
const F =
|
|
27
|
+
}), C = (a, g) => {
|
|
28
|
+
t || M(g), p && p(a, g);
|
|
29
|
+
}, v = (a, g) => {
|
|
30
|
+
const F = g - a + 1;
|
|
30
31
|
return Array.from({
|
|
31
32
|
length: F
|
|
32
|
-
}, (
|
|
33
|
-
},
|
|
33
|
+
}, (z, I) => a + I);
|
|
34
|
+
}, S = v(1, Math.min(n, s)), j = v(Math.max(s - n + 1, n + 1), s), P = Math.max(
|
|
34
35
|
Math.min(
|
|
35
36
|
// Natural start
|
|
36
|
-
|
|
37
|
+
o - h,
|
|
37
38
|
// Lower boundary when page is high
|
|
38
|
-
s -
|
|
39
|
+
s - n - h * 2 - 1
|
|
39
40
|
),
|
|
40
41
|
// Greater than startPages
|
|
41
|
-
|
|
42
|
-
),
|
|
42
|
+
n + 2
|
|
43
|
+
), N = Math.min(
|
|
43
44
|
Math.max(
|
|
44
45
|
// Natural end
|
|
45
|
-
|
|
46
|
+
o + h,
|
|
46
47
|
// Upper boundary when page is low
|
|
47
|
-
|
|
48
|
+
n + h * 2 + 2
|
|
48
49
|
),
|
|
49
50
|
// Less than endPages
|
|
50
|
-
|
|
51
|
+
j.length > 0 ? j[0] - 2 : s - 1
|
|
51
52
|
), L = [
|
|
52
|
-
...
|
|
53
|
-
...
|
|
54
|
-
...
|
|
53
|
+
...r ? ["first"] : [],
|
|
54
|
+
..._ ? [] : ["previous"],
|
|
55
|
+
...S,
|
|
55
56
|
// Start ellipsis
|
|
56
57
|
// eslint-disable-next-line no-nested-ternary
|
|
57
|
-
...
|
|
58
|
+
...P > n + 2 ? ["start-ellipsis"] : n + 1 < s - n ? [n + 1] : [],
|
|
58
59
|
// Sibling pages
|
|
59
|
-
...v(
|
|
60
|
+
...v(P, N),
|
|
60
61
|
// End ellipsis
|
|
61
62
|
// eslint-disable-next-line no-nested-ternary
|
|
62
|
-
...
|
|
63
|
-
...
|
|
64
|
-
...
|
|
63
|
+
...N < s - n - 1 ? ["end-ellipsis"] : s - n > n ? [s - n] : [],
|
|
64
|
+
...j,
|
|
65
|
+
...x ? [] : ["next"],
|
|
65
66
|
...f ? ["last"] : []
|
|
66
|
-
],
|
|
67
|
-
switch (
|
|
67
|
+
], B = (a) => {
|
|
68
|
+
switch (a) {
|
|
68
69
|
case "first":
|
|
69
70
|
return 1;
|
|
70
71
|
case "previous":
|
|
71
|
-
return
|
|
72
|
+
return o - 1;
|
|
72
73
|
case "next":
|
|
73
|
-
return
|
|
74
|
+
return o + 1;
|
|
74
75
|
case "last":
|
|
75
76
|
return s;
|
|
76
77
|
default:
|
|
77
78
|
return null;
|
|
78
79
|
}
|
|
79
|
-
}, D = L.map((
|
|
80
|
-
onClick: (
|
|
81
|
-
|
|
80
|
+
}, D = L.map((a) => typeof a == "number" ? {
|
|
81
|
+
onClick: (g) => {
|
|
82
|
+
C(g, a);
|
|
82
83
|
},
|
|
83
84
|
type: "page",
|
|
84
|
-
page:
|
|
85
|
-
selected:
|
|
86
|
-
disabled:
|
|
87
|
-
"aria-current":
|
|
85
|
+
page: a,
|
|
86
|
+
selected: a === o,
|
|
87
|
+
disabled: c,
|
|
88
|
+
"aria-current": a === o ? "true" : void 0
|
|
88
89
|
} : {
|
|
89
|
-
onClick: (
|
|
90
|
-
|
|
90
|
+
onClick: (g) => {
|
|
91
|
+
C(g, B(a));
|
|
91
92
|
},
|
|
92
|
-
type:
|
|
93
|
-
page:
|
|
93
|
+
type: a,
|
|
94
|
+
page: B(a),
|
|
94
95
|
selected: !1,
|
|
95
|
-
disabled:
|
|
96
|
+
disabled: c || a.indexOf("ellipsis") === -1 && (a === "next" || a === "last" ? o >= s : o <= 1)
|
|
96
97
|
});
|
|
97
|
-
return
|
|
98
|
+
return E({
|
|
98
99
|
items: D
|
|
99
100
|
}, d);
|
|
100
101
|
}
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
|
|
102
|
+
const W = "_pagination_19imj_43", u = {
|
|
103
|
+
"u-typography-h1": "_u-typography-h1_19imj_1",
|
|
104
|
+
"u-typography-h2": "_u-typography-h2_19imj_8",
|
|
105
|
+
"u-typography-h3": "_u-typography-h3_19imj_15",
|
|
106
|
+
"u-typography-h4": "_u-typography-h4_19imj_22",
|
|
107
|
+
"u-typography-h5": "_u-typography-h5_19imj_29",
|
|
108
|
+
"u-typography-h6": "_u-typography-h6_19imj_36",
|
|
109
|
+
"u-typography-base": "_u-typography-base_19imj_43",
|
|
110
|
+
pagination: W,
|
|
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 = {
|
|
110
127
|
pt: {
|
|
111
128
|
showing: "Exibindo",
|
|
112
129
|
of: "de",
|
|
@@ -121,90 +138,91 @@ const R = "_pagination_9gf1w_1", g = {
|
|
|
121
138
|
previous: "Previous",
|
|
122
139
|
next: "Next"
|
|
123
140
|
}
|
|
124
|
-
},
|
|
125
|
-
const
|
|
126
|
-
count:
|
|
141
|
+
}, U = ({ perPageOptions: l = [5, 10, 25, 50, 100], language: n = "en", ...e }) => {
|
|
142
|
+
const s = Math.ceil(e.totalItems / e.perPage), b = e.currentPage <= 1, c = e.currentPage >= s, x = e.t || q[n], _ = (t) => x[t], { items: p } = T({
|
|
143
|
+
count: s,
|
|
127
144
|
hideNextButton: !0,
|
|
128
145
|
hidePrevButton: !0,
|
|
129
146
|
page: e.currentPage,
|
|
130
|
-
onChange: (t, o) => e.onPageChange(o),
|
|
131
147
|
siblingCount: 1,
|
|
132
|
-
boundaryCount: 2
|
|
148
|
+
boundaryCount: 2,
|
|
149
|
+
onChange: (t, r) => e.onPageChange(r)
|
|
133
150
|
});
|
|
134
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ m("div", { className: y(u.pagination, e.className), "data-testid": e["data-testid"], children: [
|
|
135
152
|
/* @__PURE__ */ i(
|
|
136
153
|
"div",
|
|
137
154
|
{
|
|
138
|
-
className:
|
|
139
|
-
"data-testid": e["data-
|
|
140
|
-
children:
|
|
141
|
-
|
|
155
|
+
className: y(u["per-page-container"], e.classNamePerPage),
|
|
156
|
+
"data-testid": e["data-testid-per-page"],
|
|
157
|
+
children: l && /* @__PURE__ */ m(k, { children: [
|
|
158
|
+
/* @__PURE__ */ i("span", { children: _`showing` }),
|
|
142
159
|
/* @__PURE__ */ i(
|
|
143
|
-
|
|
160
|
+
w,
|
|
144
161
|
{
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
const o = typeof t == "number";
|
|
162
|
+
className: u["per-page-container__select"],
|
|
163
|
+
value: String(e.perPage),
|
|
164
|
+
onChange: (t) => e.onRowsPerPageChange(Number(t)),
|
|
165
|
+
children: l == null ? void 0 : l.map((t) => {
|
|
166
|
+
const r = typeof t == "number";
|
|
151
167
|
return /* @__PURE__ */ i(
|
|
152
|
-
|
|
168
|
+
w.Option,
|
|
153
169
|
{
|
|
154
|
-
value:
|
|
155
|
-
children:
|
|
170
|
+
value: String(r ? t : t.value),
|
|
171
|
+
children: r ? t : t.label
|
|
156
172
|
},
|
|
157
|
-
`per-page__${
|
|
173
|
+
`per-page__${r ? t : t.value}`
|
|
158
174
|
);
|
|
159
175
|
})
|
|
160
176
|
}
|
|
161
177
|
),
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
178
|
+
/* @__PURE__ */ m("span", { children: [
|
|
179
|
+
_`of`,
|
|
180
|
+
" ",
|
|
181
|
+
/* @__PURE__ */ i("strong", { children: e.totalItems }),
|
|
182
|
+
" ",
|
|
183
|
+
_`results`
|
|
184
|
+
] })
|
|
167
185
|
] })
|
|
168
186
|
}
|
|
169
187
|
),
|
|
170
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ m(
|
|
171
189
|
"div",
|
|
172
190
|
{
|
|
173
|
-
className:
|
|
174
|
-
"data-testid": e["data-
|
|
191
|
+
className: y(u["pages-navigator-container"], e.classNamePagesNav),
|
|
192
|
+
"data-testid": e["data-testid-pages-nav"],
|
|
175
193
|
children: [
|
|
176
194
|
/* @__PURE__ */ i(
|
|
177
195
|
"button",
|
|
178
196
|
{
|
|
179
|
-
className:
|
|
180
|
-
disabled:
|
|
197
|
+
className: u["pages-navigator-container__previous-next-btn"],
|
|
198
|
+
disabled: b,
|
|
181
199
|
onClick: () => e.onPageChange(e.currentPage - 1),
|
|
182
200
|
type: "button",
|
|
183
|
-
children:
|
|
201
|
+
children: _`previous`
|
|
184
202
|
},
|
|
185
203
|
"page__previous"
|
|
186
204
|
),
|
|
187
|
-
|
|
188
|
-
let
|
|
189
|
-
return
|
|
205
|
+
/* @__PURE__ */ i("ul", { children: p.map(({ page: t, type: r, selected: f, ...h }, d) => {
|
|
206
|
+
let o = /* @__PURE__ */ i(k, {});
|
|
207
|
+
return r === "start-ellipsis" || r === "end-ellipsis" ? o = /* @__PURE__ */ i("span", { className: u["page-item"], children: "..." }) : r === "page" ? o = /* @__PURE__ */ i(
|
|
190
208
|
"button",
|
|
191
209
|
{
|
|
192
|
-
className: [
|
|
210
|
+
className: y(u["page-number__btn"], f && u["page-number__btn--selected"]),
|
|
193
211
|
onClick: () => e.onPageChange(t || 0),
|
|
194
212
|
type: "button",
|
|
195
213
|
children: t
|
|
196
214
|
},
|
|
197
|
-
`page__${
|
|
198
|
-
) :
|
|
199
|
-
}),
|
|
215
|
+
`page__${d}`
|
|
216
|
+
) : o = /* @__PURE__ */ i("button", { type: "button", ...h, children: r }), /* @__PURE__ */ i("li", { children: o }, d);
|
|
217
|
+
}) }),
|
|
200
218
|
/* @__PURE__ */ i(
|
|
201
219
|
"button",
|
|
202
220
|
{
|
|
203
|
-
className:
|
|
204
|
-
disabled:
|
|
221
|
+
className: u["pages-navigator-container__previous-next-btn"],
|
|
222
|
+
disabled: c,
|
|
205
223
|
onClick: () => e.onPageChange(e.currentPage + 1),
|
|
206
224
|
type: "button",
|
|
207
|
-
children:
|
|
225
|
+
children: _`next`
|
|
208
226
|
},
|
|
209
227
|
"page__next"
|
|
210
228
|
)
|
|
@@ -214,6 +232,6 @@ const R = "_pagination_9gf1w_1", g = {
|
|
|
214
232
|
] });
|
|
215
233
|
};
|
|
216
234
|
export {
|
|
217
|
-
|
|
218
|
-
|
|
235
|
+
U as Pagination,
|
|
236
|
+
q as paginationDefaultTranslations
|
|
219
237
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PaginationProps } from '../../main';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ perPageOptions, language, ...props }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Simple: Story;
|
|
15
|
+
export declare const WithCustomPerPageOptions: Story;
|
|
16
|
+
export declare const WithLanguage: Story;
|
|
17
|
+
export declare const WithCustomTexts: Story;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export type SelectOptionProps = {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
value: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
'data-testid'?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const SelectOption: (props: SelectOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export type SelectProps = {
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
prefix?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
value?: string;
|
|
19
|
+
'data-testid'?: string;
|
|
20
|
+
onChange?: (value: string | null, event?: React.SyntheticEvent<Element, Event> | null) => void;
|
|
21
|
+
};
|
|
22
|
+
declare const Select: {
|
|
23
|
+
(props: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
Option: (props: SelectOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
};
|
|
26
|
+
export { Select };
|