@igne-agency/react-web-ui 0.3.0 → 0.4.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 +32 -1
- package/dist/components/accordion/accordion.css +24 -19
- package/dist/components/accordion/accordion.d.ts +19 -3
- package/dist/components/accordion/accordion.js +86 -32
- package/dist/components/accordion/accordion.module.js +8 -8
- package/dist/components/active-filters/active-filter-describers.d.ts +1 -1
- package/dist/components/active-filters/active-filter-describers.js +1 -1
- package/dist/components/active-filters/active-filters.d.ts +35 -2
- package/dist/components/active-filters/active-filters.js +57 -52
- package/dist/components/active-filters/index.js +2 -2
- package/dist/components/attachment-tile/attachment-preview.d.ts +11 -9
- package/dist/components/attachment-tile/attachment-preview.js +102 -68
- package/dist/components/attachment-tile/attachment-tile.css +22 -13
- package/dist/components/attachment-tile/attachment-tile.d.ts +51 -6
- package/dist/components/attachment-tile/attachment-tile.js +209 -85
- package/dist/components/attachment-tile/attachment-tile.module.js +10 -10
- package/dist/components/attachment-tile/index.d.ts +1 -1
- package/dist/components/attachment-tile/index.js +2 -2
- package/dist/components/avatar/avatar.d.ts +5 -5
- package/dist/components/avatar/avatar.js +64 -37
- package/dist/components/avatar-group/avatar-group.js +2 -2
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +22 -7
- package/dist/components/breadcrumbs/breadcrumbs.js +189 -170
- package/dist/components/button/button.d.ts +2 -3
- package/dist/components/button/button.js +58 -77
- package/dist/components/button/close-button.d.ts +4 -2
- package/dist/components/button/close-button.js +9 -9
- package/dist/components/checkbox-field/checkbox-field.d.ts +17 -3
- package/dist/components/checkbox-field/checkbox-field.js +108 -131
- package/dist/components/checkbox-field/checkbox.css +26 -34
- package/dist/components/checkbox-field/checkbox.d.ts +51 -8
- package/dist/components/checkbox-field/checkbox.js +221 -57
- package/dist/components/checkbox-field/checkbox.module.js +6 -8
- package/dist/components/checkbox-field/index.d.ts +0 -1
- package/dist/components/checkbox-field/index.js +1 -2
- package/dist/components/checkbox-field/tsf-checkbox-field.d.ts +2 -2
- package/dist/components/checkbox-group-field/checkbox-group-field.d.ts +4 -1
- package/dist/components/checkbox-group-field/checkbox-group-field.js +54 -50
- package/dist/components/checkbox-group-field/checkbox-group.d.ts +7 -2
- package/dist/components/checkbox-group-field/checkbox-group.js +8 -3
- package/dist/components/collapsible/collapsible.css +23 -18
- package/dist/components/collapsible/collapsible.d.ts +18 -3
- package/dist/components/collapsible/collapsible.js +85 -32
- package/dist/components/collapsible/collapsible.module.js +7 -7
- package/dist/components/combobox-field/combobox-field.d.ts +9 -1
- package/dist/components/combobox-field/combobox-field.js +195 -175
- package/dist/components/combobox-field/combobox-items.d.ts +2 -2
- package/dist/components/combobox-field/combobox-items.js +4 -4
- package/dist/components/combobox-field/combobox.css +99 -96
- package/dist/components/combobox-field/combobox.d.ts +94 -15
- package/dist/components/combobox-field/combobox.js +484 -159
- package/dist/components/combobox-field/combobox.module.js +21 -21
- package/dist/components/combobox-field/index.d.ts +0 -1
- package/dist/components/combobox-field/selection.d.ts +4 -1
- package/dist/components/combobox-field/value-state-view.css +7 -3
- package/dist/components/combobox-field/value-state-view.d.ts +4 -2
- package/dist/components/combobox-field/value-state-view.js +15 -15
- package/dist/components/combobox-field/value-state-view.module.js +6 -4
- package/dist/components/composer/composer-attachments.d.ts +11 -3
- package/dist/components/composer/composer-attachments.js +61 -47
- package/dist/components/composer/composer-editor.d.ts +2 -1
- package/dist/components/composer/composer-editor.js +79 -71
- package/dist/components/composer/composer-mentions.js +2 -2
- package/dist/components/composer/composer.d.ts +42 -21
- package/dist/components/composer/composer.js +201 -58
- package/dist/components/composer/mention-text.js +3 -3
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +8 -7
- package/dist/components/confirm-dialog/confirm-dialog.js +10 -9
- package/dist/components/conversation/conversation.context.d.ts +0 -5
- package/dist/components/conversation/conversation.d.ts +63 -29
- package/dist/components/conversation/conversation.js +193 -82
- package/dist/components/conversation/index.d.ts +1 -1
- package/dist/components/date-field/date-field.d.ts +10 -4
- package/dist/components/date-field/date-field.js +57 -43
- package/dist/components/date-field/date-input.d.ts +20 -3
- package/dist/components/date-field/date-input.js +28 -13
- package/dist/components/date-field/index.d.ts +1 -1
- package/dist/components/date-field/tsf-date-field.d.ts +1 -1
- package/dist/components/date-field/tsf-date-field.js +1 -1
- package/dist/components/date-range-field/date-range-field.d.ts +8 -4
- package/dist/components/date-range-field/date-range-field.js +57 -45
- package/dist/components/date-range-field/date-range-input.d.ts +20 -3
- package/dist/components/date-range-field/date-range-input.js +27 -12
- package/dist/components/date-range-field/tsf-date-range-field.d.ts +1 -1
- package/dist/components/date-range-field/tsf-date-range-field.js +1 -1
- package/dist/components/detail-list/detail-list.d.ts +28 -27
- package/dist/components/detail-list/detail-list.js +177 -121
- package/dist/components/dialog/dialog.d.ts +47 -27
- package/dist/components/dialog/dialog.js +101 -38
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/drawer/drawer.d.ts +48 -30
- package/dist/components/drawer/drawer.js +113 -41
- package/dist/components/email-field/email-field.d.ts +5 -3
- package/dist/components/email-field/email-field.js +1 -3
- package/dist/components/email-field/tsf-email-field.d.ts +3 -2
- package/dist/components/empty-message/empty-message.d.ts +3 -3
- package/dist/components/empty-message/empty-message.js +3 -3
- package/dist/components/error-boundary/error-boundary.d.ts +5 -2
- package/dist/components/error-boundary/error-boundary.js +2 -3
- package/dist/components/error-message/error-message.d.ts +1 -1
- package/dist/components/error-message/error-message.js +1 -1
- package/dist/components/error-text/error-text.js +3 -3
- package/dist/components/field/field.d.ts +5 -5
- package/dist/components/field/field.js +9 -9
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/input-parts.js +1 -1
- package/dist/components/field-placeholder/field-placeholder.d.ts +4 -1
- package/dist/components/field-placeholder/field-placeholder.js +41 -26
- package/dist/components/fieldset/field-group.js +1 -1
- package/dist/components/fieldset/fieldset-root.js +1 -1
- package/dist/components/fieldset/fieldset.css +4 -3
- package/dist/components/fieldset/fieldset.js +1 -1
- package/dist/components/fieldset/fieldset.module.js +2 -2
- package/dist/components/file-field/file-field.css +19 -15
- package/dist/components/file-field/file-field.d.ts +10 -1
- package/dist/components/file-field/file-field.js +130 -109
- package/dist/components/file-field/file-field.module.js +6 -4
- package/dist/components/file-field/file-input.d.ts +32 -9
- package/dist/components/file-field/file-input.js +94 -74
- package/dist/components/filter-bar/filter-bar.d.ts +79 -51
- package/dist/components/filter-bar/filter-bar.js +552 -216
- package/dist/components/form/form.d.ts +4 -6
- package/dist/components/form/form.js +6 -8
- package/dist/components/icon/icon.d.ts +5 -10
- package/dist/components/icon/icon.js +4 -6
- package/dist/components/link/link.js +1 -1
- package/dist/components/link-button/link-button.d.ts +1 -2
- package/dist/components/link-button/link-button.js +12 -22
- package/dist/components/loading-message/loading-message.d.ts +2 -2
- package/dist/components/loading-message/loading-message.js +1 -1
- package/dist/components/locale-provider/locale-provider.js +1 -1
- package/dist/components/menu/menu.d.ts +40 -22
- package/dist/components/menu/menu.js +100 -40
- package/dist/components/nav/nav-context.d.ts +0 -1
- package/dist/components/nav/nav-context.js +1 -2
- package/dist/components/nav/nav-item-view.d.ts +7 -7
- package/dist/components/nav/nav-item-view.js +27 -51
- package/dist/components/nav/nav.css +72 -60
- package/dist/components/nav/nav.d.ts +15 -8
- package/dist/components/nav/nav.js +105 -52
- package/dist/components/nav/nav.module.js +14 -14
- package/dist/components/number-field/number-field.d.ts +7 -1
- package/dist/components/number-field/number-field.js +98 -82
- package/dist/components/number-field/number-input.d.ts +53 -4
- package/dist/components/number-field/number-input.js +68 -21
- package/dist/components/number-field/tsf-number-field.d.ts +1 -1
- package/dist/components/number-field/tsf-number-field.js +1 -1
- package/dist/components/otp-field/otp-input.d.ts +25 -0
- package/dist/components/otp-field/otp-input.js +26 -1
- package/dist/components/pagination/pagination.d.ts +82 -23
- package/dist/components/pagination/pagination.js +656 -229
- package/dist/components/password-field/password-field.d.ts +7 -1
- package/dist/components/password-field/password-field.js +117 -126
- package/dist/components/password-field/password-strength.js +1 -1
- package/dist/components/password-field/tsf-password-field.d.ts +1 -1
- package/dist/components/password-field/tsf-password-field.js +1 -1
- package/dist/components/photo-field/photo-field.d.ts +17 -3
- package/dist/components/photo-field/photo-field.js +168 -89
- package/dist/components/photo-field/photo-input-context.d.ts +25 -0
- package/dist/components/photo-field/photo-input-context.js +14 -0
- package/dist/components/photo-field/photo-input.d.ts +58 -23
- package/dist/components/photo-field/photo-input.js +459 -261
- package/dist/components/popover/popover.d.ts +55 -23
- package/dist/components/popover/popover.js +205 -61
- package/dist/components/radio-group-field/radio-group.js +1 -1
- package/dist/components/search-field/search-field.d.ts +7 -5
- package/dist/components/search-field/search-field.js +4 -6
- package/dist/components/search-field/tsf-search-field.d.ts +1 -1
- package/dist/components/search-field/tsf-search-field.js +1 -1
- package/dist/components/segmented-control-field/segmented-control.js +1 -1
- package/dist/components/select-field/select-field.d.ts +7 -1
- package/dist/components/select-field/select-field.js +151 -139
- package/dist/components/select-field/select.d.ts +28 -6
- package/dist/components/select-field/select.js +234 -149
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/spinner/spinner.css +47 -1
- package/dist/components/spinner/spinner.js +28 -11
- package/dist/components/spinner/spinner.module.js +18 -3
- package/dist/components/stale/stale.d.ts +17 -21
- package/dist/components/stale/stale.js +307 -129
- package/dist/components/status-message/status-message.css +22 -21
- package/dist/components/status-message/status-message.d.ts +10 -5
- package/dist/components/status-message/status-message.js +20 -24
- package/dist/components/status-message/status-message.module.js +6 -6
- package/dist/components/status-message/status-preset.d.ts +4 -5
- package/dist/components/status-message/status-preset.js +3 -3
- package/dist/components/switch-field/switch.js +1 -1
- package/dist/components/tabs/tabs.d.ts +51 -28
- package/dist/components/tabs/tabs.js +219 -144
- package/dist/components/tag/tag.css +23 -21
- package/dist/components/tag/tag.d.ts +17 -15
- package/dist/components/tag/tag.js +140 -65
- package/dist/components/tag/tag.module.js +3 -3
- package/dist/components/tag-group/tag-group.css +30 -27
- package/dist/components/tag-group/tag-group.d.ts +10 -4
- package/dist/components/tag-group/tag-group.js +47 -35
- package/dist/components/tag-group/tag-group.module.js +4 -4
- package/dist/components/text-field/text-field.d.ts +14 -3
- package/dist/components/text-field/text-field.js +154 -133
- package/dist/components/text-field/text-input.d.ts +89 -3
- package/dist/components/text-field/text-input.js +184 -70
- package/dist/components/textarea-field/textarea.js +1 -1
- package/dist/components/time-field/time-input.d.ts +6 -0
- package/dist/components/time-field/time-input.js +6 -0
- package/dist/components/time-zone-provider/time-zone-provider.js +1 -1
- package/dist/components/toast/index.js +2 -2
- package/dist/components/toast/toast-provider.css +38 -34
- package/dist/components/toast/toast-provider.d.ts +65 -3
- package/dist/components/toast/toast-provider.js +313 -148
- package/dist/components/toast/toast-provider.module.js +11 -17
- package/dist/components/toast/toast.d.ts +5 -1
- package/dist/components/toast/toast.js +2 -1
- package/dist/components/toggle-group-field/toggle-group.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +6 -6
- package/dist/components/tooltip/tooltip.js +7 -7
- package/dist/data-table/data-table-content.d.ts +18 -10
- package/dist/data-table/data-table-content.js +145 -290
- package/dist/data-table/data-table-context.d.ts +4 -2
- package/dist/data-table/data-table-context.js +1 -1
- package/dist/data-table/data-table-parts.d.ts +99 -0
- package/dist/data-table/data-table-parts.js +1182 -0
- package/dist/data-table/data-table-selection.d.ts +7 -3
- package/dist/data-table/data-table-selection.js +62 -37
- package/dist/data-table/data-table.css +100 -95
- package/dist/data-table/data-table.d.ts +49 -25
- package/dist/data-table/data-table.js +95 -83
- package/dist/data-table/data-table.module.js +34 -34
- package/dist/data-table/index.d.ts +2 -1
- package/dist/data-table/index.js +2 -1
- package/dist/data-view/use-data-view.d.ts +2 -2
- package/dist/data-view/use-data-view.js +2 -2
- package/dist/index.js +7 -8
- package/dist/lib/calendar/calendar-navigation.d.ts +9 -2
- package/dist/lib/calendar/calendar-navigation.js +72 -73
- package/dist/lib/calendar/calendar-year.d.ts +4 -3
- package/dist/lib/calendar/calendar-year.js +137 -156
- package/dist/lib/calendar/temporal.d.ts +18 -12
- package/dist/lib/calendar/temporal.js +191 -147
- package/dist/lib/table-storage.d.ts +2 -2
- package/dist/lib/table-storage.js +2 -2
- package/dist/lib/unsaved-changes/leave-guard.js +1 -1
- package/dist/terrazzo/index.d.ts +16 -0
- package/dist/terrazzo/index.js +94 -2
- package/dist/tokens.css +71 -69
- package/package.json +3 -2
- package/tokens/ref.tokens.json +0 -30
- package/tokens/sys.tokens.json +0 -7
- package/dist/assets/spinner.js +0 -28
- package/dist/components/checkbox-field/checkbox-glyph.d.ts +0 -12
- package/dist/components/checkbox-field/checkbox-glyph.js +0 -38
- package/dist/components/combobox-field/combobox-popup-body.d.ts +0 -34
- package/dist/components/combobox-field/combobox-popup-body.js +0 -142
- package/dist/components/conversation/conversation.context.js +0 -4
- package/dist/vendor/@material-design-icons/svg/outlined/add.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_downward.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_forward.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_upward.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/attach_file.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/block.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/calendar_today.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/check.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/check_circle.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/chevron_left.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/chevron_right.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/close.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/content_copy.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/date_range.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/description.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/download.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/error.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/error_outline.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/expand_less.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/expand_more.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/filter_alt.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/filter_alt_off.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/first_page.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/info.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/keyboard_arrow_down.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/last_page.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/mail.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/more_horiz.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/photo_camera.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/remove.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/restart_alt.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/restore.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/search.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/unfold_more.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/upload_file.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/visibility.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/visibility_off.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/warning_amber.js +0 -12
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import SvgChevronLeft from "../../vendor/@material-design-icons/svg/outlined/chevron_left.js";
|
|
2
|
-
import SvgChevronRight from "../../vendor/@material-design-icons/svg/outlined/chevron_right.js";
|
|
3
|
-
import SvgFirstPage from "../../vendor/@material-design-icons/svg/outlined/first_page.js";
|
|
4
|
-
import SvgLastPage from "../../vendor/@material-design-icons/svg/outlined/last_page.js";
|
|
5
1
|
import { Button } from "../button/button.js";
|
|
6
2
|
import { useLocale } from "../locale-provider/locale-provider.js";
|
|
7
3
|
import { Select } from "../select-field/select.js";
|
|
8
4
|
import { PaginationContext, usePagination } from "./pagination-context.js";
|
|
9
5
|
import pagination_module_default from "./pagination.module.js";
|
|
10
6
|
import { c } from "react/compiler-runtime";
|
|
11
|
-
import {
|
|
7
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
12
8
|
import { clsx } from "clsx";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
10
|
// src/components/pagination/pagination.tsx
|
|
11
|
+
/** Where the list stands, for the parts inside it, laid out in a row. */
|
|
14
12
|
var PaginationRoot = (t0) => {
|
|
15
|
-
const $ = c(
|
|
13
|
+
const $ = c(30);
|
|
16
14
|
let className;
|
|
17
15
|
let onPageIndexChange;
|
|
18
16
|
let onPageSizeChange;
|
|
@@ -21,8 +19,10 @@ var PaginationRoot = (t0) => {
|
|
|
21
19
|
let pageSize;
|
|
22
20
|
let pageSizes;
|
|
23
21
|
let props;
|
|
22
|
+
let ref;
|
|
23
|
+
let render;
|
|
24
24
|
if ($[0] !== t0) {
|
|
25
|
-
({pageIndex, pageCount, pageSize, pageSizes, onPageIndexChange, onPageSizeChange, className, ...props} = t0);
|
|
25
|
+
({pageIndex, pageCount, pageSize, pageSizes, onPageIndexChange, onPageSizeChange, render, className, ref, ...props} = t0);
|
|
26
26
|
$[0] = t0;
|
|
27
27
|
$[1] = className;
|
|
28
28
|
$[2] = onPageIndexChange;
|
|
@@ -32,6 +32,8 @@ var PaginationRoot = (t0) => {
|
|
|
32
32
|
$[6] = pageSize;
|
|
33
33
|
$[7] = pageSizes;
|
|
34
34
|
$[8] = props;
|
|
35
|
+
$[9] = ref;
|
|
36
|
+
$[10] = render;
|
|
35
37
|
} else {
|
|
36
38
|
className = $[1];
|
|
37
39
|
onPageIndexChange = $[2];
|
|
@@ -41,10 +43,42 @@ var PaginationRoot = (t0) => {
|
|
|
41
43
|
pageSize = $[6];
|
|
42
44
|
pageSizes = $[7];
|
|
43
45
|
props = $[8];
|
|
46
|
+
ref = $[9];
|
|
47
|
+
render = $[10];
|
|
44
48
|
}
|
|
45
49
|
let t1;
|
|
46
|
-
if ($[
|
|
47
|
-
t1 =
|
|
50
|
+
if ($[11] !== className) {
|
|
51
|
+
t1 = clsx(pagination_module_default.root, className);
|
|
52
|
+
$[11] = className;
|
|
53
|
+
$[12] = t1;
|
|
54
|
+
} else t1 = $[12];
|
|
55
|
+
let t2;
|
|
56
|
+
if ($[13] !== props || $[14] !== t1) {
|
|
57
|
+
t2 = {
|
|
58
|
+
...props,
|
|
59
|
+
className: t1
|
|
60
|
+
};
|
|
61
|
+
$[13] = props;
|
|
62
|
+
$[14] = t1;
|
|
63
|
+
$[15] = t2;
|
|
64
|
+
} else t2 = $[15];
|
|
65
|
+
let t3;
|
|
66
|
+
if ($[16] !== ref || $[17] !== render || $[18] !== t2) {
|
|
67
|
+
t3 = {
|
|
68
|
+
defaultTagName: "div",
|
|
69
|
+
render,
|
|
70
|
+
ref,
|
|
71
|
+
props: t2
|
|
72
|
+
};
|
|
73
|
+
$[16] = ref;
|
|
74
|
+
$[17] = render;
|
|
75
|
+
$[18] = t2;
|
|
76
|
+
$[19] = t3;
|
|
77
|
+
} else t3 = $[19];
|
|
78
|
+
const element = useRender(t3);
|
|
79
|
+
let t4;
|
|
80
|
+
if ($[20] !== onPageIndexChange || $[21] !== onPageSizeChange || $[22] !== pageCount || $[23] !== pageIndex || $[24] !== pageSize || $[25] !== pageSizes) {
|
|
81
|
+
t4 = {
|
|
48
82
|
pageIndex,
|
|
49
83
|
pageCount,
|
|
50
84
|
pageSize,
|
|
@@ -52,289 +86,682 @@ var PaginationRoot = (t0) => {
|
|
|
52
86
|
onPageIndexChange,
|
|
53
87
|
onPageSizeChange
|
|
54
88
|
};
|
|
55
|
-
$[
|
|
56
|
-
$[
|
|
57
|
-
$[
|
|
58
|
-
$[
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
62
|
-
} else
|
|
63
|
-
let
|
|
64
|
-
if ($[
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
} else t2 = $[17];
|
|
69
|
-
let t3;
|
|
70
|
-
if ($[18] !== props || $[19] !== t2) {
|
|
71
|
-
t3 = /* @__PURE__ */ jsx("div", {
|
|
72
|
-
className: t2,
|
|
73
|
-
...props
|
|
74
|
-
});
|
|
75
|
-
$[18] = props;
|
|
76
|
-
$[19] = t2;
|
|
77
|
-
$[20] = t3;
|
|
78
|
-
} else t3 = $[20];
|
|
79
|
-
let t4;
|
|
80
|
-
if ($[21] !== t1 || $[22] !== t3) {
|
|
81
|
-
t4 = /* @__PURE__ */ jsx(PaginationContext, {
|
|
82
|
-
value: t1,
|
|
83
|
-
children: t3
|
|
89
|
+
$[20] = onPageIndexChange;
|
|
90
|
+
$[21] = onPageSizeChange;
|
|
91
|
+
$[22] = pageCount;
|
|
92
|
+
$[23] = pageIndex;
|
|
93
|
+
$[24] = pageSize;
|
|
94
|
+
$[25] = pageSizes;
|
|
95
|
+
$[26] = t4;
|
|
96
|
+
} else t4 = $[26];
|
|
97
|
+
let t5;
|
|
98
|
+
if ($[27] !== element || $[28] !== t4) {
|
|
99
|
+
t5 = /* @__PURE__ */ jsx(PaginationContext, {
|
|
100
|
+
value: t4,
|
|
101
|
+
children: element
|
|
84
102
|
});
|
|
85
|
-
$[
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
} else
|
|
89
|
-
return
|
|
103
|
+
$[27] = element;
|
|
104
|
+
$[28] = t4;
|
|
105
|
+
$[29] = t5;
|
|
106
|
+
} else t5 = $[29];
|
|
107
|
+
return t5;
|
|
90
108
|
};
|
|
109
|
+
/**
|
|
110
|
+
* A `Select.Root` over the page sizes, holding the `Select` parts it is given
|
|
111
|
+
* in a row. The size in effect is always on offer.
|
|
112
|
+
*/
|
|
91
113
|
var PaginationPageSize = (t0) => {
|
|
92
|
-
const $ = c(
|
|
93
|
-
|
|
114
|
+
const $ = c(26);
|
|
115
|
+
let className;
|
|
116
|
+
let props;
|
|
117
|
+
let ref;
|
|
118
|
+
let render;
|
|
119
|
+
if ($[0] !== t0) {
|
|
120
|
+
({render, className, ref, ...props} = t0);
|
|
121
|
+
$[0] = t0;
|
|
122
|
+
$[1] = className;
|
|
123
|
+
$[2] = props;
|
|
124
|
+
$[3] = ref;
|
|
125
|
+
$[4] = render;
|
|
126
|
+
} else {
|
|
127
|
+
className = $[1];
|
|
128
|
+
props = $[2];
|
|
129
|
+
ref = $[3];
|
|
130
|
+
render = $[4];
|
|
131
|
+
}
|
|
94
132
|
const { pageSize, pageSizes, onPageSizeChange } = usePagination();
|
|
95
133
|
const format = new Intl.NumberFormat(useLocale());
|
|
96
134
|
let t1;
|
|
97
|
-
if ($[
|
|
135
|
+
if ($[5] !== pageSize || $[6] !== pageSizes) {
|
|
98
136
|
t1 = pageSizes.includes(pageSize) ? pageSizes : [...pageSizes, pageSize].toSorted(_temp);
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
} else t1 = $[
|
|
137
|
+
$[5] = pageSize;
|
|
138
|
+
$[6] = pageSizes;
|
|
139
|
+
$[7] = t1;
|
|
140
|
+
} else t1 = $[7];
|
|
103
141
|
const sizes = t1;
|
|
104
|
-
|
|
105
|
-
|
|
142
|
+
let t2;
|
|
143
|
+
if ($[8] !== className) {
|
|
144
|
+
t2 = clsx(pagination_module_default.pageSize, className);
|
|
145
|
+
$[8] = className;
|
|
146
|
+
$[9] = t2;
|
|
147
|
+
} else t2 = $[9];
|
|
148
|
+
let t3;
|
|
149
|
+
if ($[10] !== props || $[11] !== t2) {
|
|
150
|
+
t3 = {
|
|
151
|
+
...props,
|
|
152
|
+
className: t2
|
|
153
|
+
};
|
|
154
|
+
$[10] = props;
|
|
155
|
+
$[11] = t2;
|
|
156
|
+
$[12] = t3;
|
|
157
|
+
} else t3 = $[12];
|
|
158
|
+
let t4;
|
|
159
|
+
if ($[13] !== ref || $[14] !== render || $[15] !== t3) {
|
|
160
|
+
t4 = {
|
|
161
|
+
defaultTagName: "div",
|
|
162
|
+
render,
|
|
163
|
+
ref,
|
|
164
|
+
props: t3
|
|
165
|
+
};
|
|
166
|
+
$[13] = ref;
|
|
167
|
+
$[14] = render;
|
|
168
|
+
$[15] = t3;
|
|
169
|
+
$[16] = t4;
|
|
170
|
+
} else t4 = $[16];
|
|
171
|
+
const element = useRender(t4);
|
|
172
|
+
const t5 = Select;
|
|
173
|
+
const t6 = sizes.map((size) => ({
|
|
106
174
|
value: String(size),
|
|
107
175
|
label: format.format(size)
|
|
108
176
|
}));
|
|
109
|
-
const
|
|
110
|
-
let
|
|
111
|
-
if ($[
|
|
112
|
-
|
|
177
|
+
const t7 = String(pageSize);
|
|
178
|
+
let t8;
|
|
179
|
+
if ($[17] !== onPageSizeChange || $[18] !== sizes) {
|
|
180
|
+
t8 = (value) => {
|
|
113
181
|
const size_0 = sizes.find((candidate) => String(candidate) === value);
|
|
114
182
|
if (size_0 !== void 0) onPageSizeChange(size_0);
|
|
115
183
|
};
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
} else
|
|
120
|
-
let t6;
|
|
121
|
-
if ($[6] !== label) {
|
|
122
|
-
t6 = /* @__PURE__ */ jsx(Select.Label, { children: label });
|
|
123
|
-
$[6] = label;
|
|
124
|
-
$[7] = t6;
|
|
125
|
-
} else t6 = $[7];
|
|
126
|
-
let t7;
|
|
127
|
-
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
128
|
-
t7 = /* @__PURE__ */ jsx(Select.Trigger, {});
|
|
129
|
-
$[8] = t7;
|
|
130
|
-
} else t7 = $[8];
|
|
131
|
-
let t8;
|
|
132
|
-
if ($[9] !== t6) {
|
|
133
|
-
t8 = /* @__PURE__ */ jsxs("div", {
|
|
134
|
-
className: pagination_module_default.pageSize,
|
|
135
|
-
children: [t6, t7]
|
|
136
|
-
});
|
|
137
|
-
$[9] = t6;
|
|
138
|
-
$[10] = t8;
|
|
139
|
-
} else t8 = $[10];
|
|
184
|
+
$[17] = onPageSizeChange;
|
|
185
|
+
$[18] = sizes;
|
|
186
|
+
$[19] = t8;
|
|
187
|
+
} else t8 = $[19];
|
|
140
188
|
let t9;
|
|
141
|
-
if ($[
|
|
142
|
-
t9 = /* @__PURE__ */ jsx(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
t10 = /* @__PURE__ */ jsxs(t2.Root, {
|
|
148
|
-
options: t3,
|
|
149
|
-
value: t4,
|
|
150
|
-
onValueChange: t5,
|
|
151
|
-
children: [t8, t9]
|
|
189
|
+
if ($[20] !== element || $[21] !== t5.Root || $[22] !== t6 || $[23] !== t7 || $[24] !== t8) {
|
|
190
|
+
t9 = /* @__PURE__ */ jsx(t5.Root, {
|
|
191
|
+
options: t6,
|
|
192
|
+
value: t7,
|
|
193
|
+
onValueChange: t8,
|
|
194
|
+
children: element
|
|
152
195
|
});
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
} else
|
|
160
|
-
return
|
|
196
|
+
$[20] = element;
|
|
197
|
+
$[21] = t5.Root;
|
|
198
|
+
$[22] = t6;
|
|
199
|
+
$[23] = t7;
|
|
200
|
+
$[24] = t8;
|
|
201
|
+
$[25] = t9;
|
|
202
|
+
} else t9 = $[25];
|
|
203
|
+
return t9;
|
|
161
204
|
};
|
|
205
|
+
/** Which page is on screen, as a polite live region. */
|
|
162
206
|
var PaginationIndex = (t0) => {
|
|
163
|
-
const $ = c(
|
|
164
|
-
|
|
207
|
+
const $ = c(21);
|
|
208
|
+
let className;
|
|
209
|
+
let label;
|
|
210
|
+
let props;
|
|
211
|
+
let ref;
|
|
212
|
+
let render;
|
|
213
|
+
if ($[0] !== t0) {
|
|
214
|
+
({label, render, className, ref, ...props} = t0);
|
|
215
|
+
$[0] = t0;
|
|
216
|
+
$[1] = className;
|
|
217
|
+
$[2] = label;
|
|
218
|
+
$[3] = props;
|
|
219
|
+
$[4] = ref;
|
|
220
|
+
$[5] = render;
|
|
221
|
+
} else {
|
|
222
|
+
className = $[1];
|
|
223
|
+
label = $[2];
|
|
224
|
+
props = $[3];
|
|
225
|
+
ref = $[4];
|
|
226
|
+
render = $[5];
|
|
227
|
+
}
|
|
165
228
|
const { pageIndex, pageCount, pageSize } = usePagination();
|
|
166
229
|
let t1;
|
|
167
|
-
if ($[
|
|
168
|
-
t1 =
|
|
230
|
+
if ($[6] !== className) {
|
|
231
|
+
t1 = clsx(pagination_module_default.index, className);
|
|
232
|
+
$[6] = className;
|
|
233
|
+
$[7] = t1;
|
|
234
|
+
} else t1 = $[7];
|
|
235
|
+
let t2;
|
|
236
|
+
if ($[8] !== label || $[9] !== pageCount || $[10] !== pageIndex || $[11] !== pageSize) {
|
|
237
|
+
t2 = label({
|
|
169
238
|
pageIndex,
|
|
170
239
|
pageCount,
|
|
171
240
|
pageSize
|
|
172
241
|
});
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
} else
|
|
179
|
-
let
|
|
180
|
-
if ($[
|
|
181
|
-
|
|
242
|
+
$[8] = label;
|
|
243
|
+
$[9] = pageCount;
|
|
244
|
+
$[10] = pageIndex;
|
|
245
|
+
$[11] = pageSize;
|
|
246
|
+
$[12] = t2;
|
|
247
|
+
} else t2 = $[12];
|
|
248
|
+
let t3;
|
|
249
|
+
if ($[13] !== props || $[14] !== t1 || $[15] !== t2) {
|
|
250
|
+
t3 = {
|
|
182
251
|
role: "status",
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
$[
|
|
188
|
-
|
|
189
|
-
|
|
252
|
+
...props,
|
|
253
|
+
className: t1,
|
|
254
|
+
children: t2
|
|
255
|
+
};
|
|
256
|
+
$[13] = props;
|
|
257
|
+
$[14] = t1;
|
|
258
|
+
$[15] = t2;
|
|
259
|
+
$[16] = t3;
|
|
260
|
+
} else t3 = $[16];
|
|
261
|
+
let t4;
|
|
262
|
+
if ($[17] !== ref || $[18] !== render || $[19] !== t3) {
|
|
263
|
+
t4 = {
|
|
264
|
+
defaultTagName: "span",
|
|
265
|
+
render,
|
|
266
|
+
ref,
|
|
267
|
+
props: t3
|
|
268
|
+
};
|
|
269
|
+
$[17] = ref;
|
|
270
|
+
$[18] = render;
|
|
271
|
+
$[19] = t3;
|
|
272
|
+
$[20] = t4;
|
|
273
|
+
} else t4 = $[20];
|
|
274
|
+
return useRender(t4);
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
* The page a step goes to, and whether it goes nowhere from where the list stands.
|
|
278
|
+
*
|
|
279
|
+
* @example
|
|
280
|
+
* stepTo("next", 11, 12); // -> { target: 12, unavailable: true }
|
|
281
|
+
*/
|
|
282
|
+
var stepTo = (step, pageIndex, pageCount) => {
|
|
283
|
+
const lastIndex = Math.max(pageCount - 1, 0);
|
|
284
|
+
const atStart = pageIndex <= 0;
|
|
285
|
+
const atEnd = pageIndex >= lastIndex;
|
|
286
|
+
return {
|
|
287
|
+
first: {
|
|
288
|
+
target: 0,
|
|
289
|
+
unavailable: atStart
|
|
290
|
+
},
|
|
291
|
+
previous: {
|
|
292
|
+
target: pageIndex - 1,
|
|
293
|
+
unavailable: atStart
|
|
294
|
+
},
|
|
295
|
+
next: {
|
|
296
|
+
target: pageIndex + 1,
|
|
297
|
+
unavailable: atEnd
|
|
298
|
+
},
|
|
299
|
+
last: {
|
|
300
|
+
target: lastIndex,
|
|
301
|
+
unavailable: atEnd
|
|
302
|
+
}
|
|
303
|
+
}[step];
|
|
190
304
|
};
|
|
191
|
-
var
|
|
192
|
-
const $ = c(
|
|
193
|
-
|
|
194
|
-
|
|
305
|
+
var PageStep = (t0) => {
|
|
306
|
+
const $ = c(22);
|
|
307
|
+
let children;
|
|
308
|
+
let label;
|
|
309
|
+
let onClick;
|
|
310
|
+
let props;
|
|
311
|
+
let step;
|
|
312
|
+
if ($[0] !== t0) {
|
|
313
|
+
({step, label, children, onClick, ...props} = t0);
|
|
314
|
+
$[0] = t0;
|
|
315
|
+
$[1] = children;
|
|
316
|
+
$[2] = label;
|
|
317
|
+
$[3] = onClick;
|
|
318
|
+
$[4] = props;
|
|
319
|
+
$[5] = step;
|
|
320
|
+
} else {
|
|
321
|
+
children = $[1];
|
|
322
|
+
label = $[2];
|
|
323
|
+
onClick = $[3];
|
|
324
|
+
props = $[4];
|
|
325
|
+
step = $[5];
|
|
326
|
+
}
|
|
327
|
+
const { pageIndex, pageCount, onPageIndexChange } = usePagination();
|
|
328
|
+
let t1;
|
|
329
|
+
if ($[6] !== pageCount || $[7] !== pageIndex || $[8] !== step) {
|
|
330
|
+
t1 = stepTo(step, pageIndex, pageCount);
|
|
331
|
+
$[6] = pageCount;
|
|
332
|
+
$[7] = pageIndex;
|
|
333
|
+
$[8] = step;
|
|
334
|
+
$[9] = t1;
|
|
335
|
+
} else t1 = $[9];
|
|
336
|
+
const { target, unavailable } = t1;
|
|
195
337
|
const t2 = unavailable || void 0;
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
338
|
+
const t3 = unavailable || void 0;
|
|
339
|
+
let t4;
|
|
340
|
+
if ($[10] !== onClick || $[11] !== onPageIndexChange || $[12] !== target || $[13] !== unavailable) {
|
|
341
|
+
t4 = (event) => {
|
|
342
|
+
onClick?.(event);
|
|
199
343
|
if (!unavailable) onPageIndexChange(target);
|
|
200
344
|
};
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
345
|
+
$[10] = onClick;
|
|
346
|
+
$[11] = onPageIndexChange;
|
|
347
|
+
$[12] = target;
|
|
348
|
+
$[13] = unavailable;
|
|
349
|
+
$[14] = t4;
|
|
350
|
+
} else t4 = $[14];
|
|
351
|
+
let t5;
|
|
352
|
+
if ($[15] !== children || $[16] !== label || $[17] !== props || $[18] !== t2 || $[19] !== t3 || $[20] !== t4) {
|
|
353
|
+
t5 = /* @__PURE__ */ jsx(Button, {
|
|
210
354
|
variant: "tertiary",
|
|
211
|
-
|
|
355
|
+
...props,
|
|
356
|
+
iconOnly: true,
|
|
357
|
+
icon: children,
|
|
212
358
|
label,
|
|
213
|
-
"aria-disabled":
|
|
214
|
-
"data-disabled":
|
|
215
|
-
onClick:
|
|
359
|
+
"aria-disabled": t2,
|
|
360
|
+
"data-disabled": t3,
|
|
361
|
+
onClick: t4
|
|
362
|
+
});
|
|
363
|
+
$[15] = children;
|
|
364
|
+
$[16] = label;
|
|
365
|
+
$[17] = props;
|
|
366
|
+
$[18] = t2;
|
|
367
|
+
$[19] = t3;
|
|
368
|
+
$[20] = t4;
|
|
369
|
+
$[21] = t5;
|
|
370
|
+
} else t5 = $[21];
|
|
371
|
+
return t5;
|
|
372
|
+
};
|
|
373
|
+
/** Goes to the first page; marked `aria-disabled`, and kept in the tab order, on the first page. */
|
|
374
|
+
var PaginationFirst = (props) => {
|
|
375
|
+
const $ = c(2);
|
|
376
|
+
let t0;
|
|
377
|
+
if ($[0] !== props) {
|
|
378
|
+
t0 = /* @__PURE__ */ jsx(PageStep, {
|
|
379
|
+
step: "first",
|
|
380
|
+
...props
|
|
381
|
+
});
|
|
382
|
+
$[0] = props;
|
|
383
|
+
$[1] = t0;
|
|
384
|
+
} else t0 = $[1];
|
|
385
|
+
return t0;
|
|
386
|
+
};
|
|
387
|
+
/** Goes back a page; marked `aria-disabled`, and kept in the tab order, on the first page. */
|
|
388
|
+
var PaginationPrevious = (props) => {
|
|
389
|
+
const $ = c(2);
|
|
390
|
+
let t0;
|
|
391
|
+
if ($[0] !== props) {
|
|
392
|
+
t0 = /* @__PURE__ */ jsx(PageStep, {
|
|
393
|
+
step: "previous",
|
|
394
|
+
...props
|
|
395
|
+
});
|
|
396
|
+
$[0] = props;
|
|
397
|
+
$[1] = t0;
|
|
398
|
+
} else t0 = $[1];
|
|
399
|
+
return t0;
|
|
400
|
+
};
|
|
401
|
+
/** Goes on a page; marked `aria-disabled`, and kept in the tab order, on the last page. */
|
|
402
|
+
var PaginationNext = (props) => {
|
|
403
|
+
const $ = c(2);
|
|
404
|
+
let t0;
|
|
405
|
+
if ($[0] !== props) {
|
|
406
|
+
t0 = /* @__PURE__ */ jsx(PageStep, {
|
|
407
|
+
step: "next",
|
|
408
|
+
...props
|
|
409
|
+
});
|
|
410
|
+
$[0] = props;
|
|
411
|
+
$[1] = t0;
|
|
412
|
+
} else t0 = $[1];
|
|
413
|
+
return t0;
|
|
414
|
+
};
|
|
415
|
+
/** Goes to the last page; marked `aria-disabled`, and kept in the tab order, on the last page. */
|
|
416
|
+
var PaginationLast = (props) => {
|
|
417
|
+
const $ = c(2);
|
|
418
|
+
let t0;
|
|
419
|
+
if ($[0] !== props) {
|
|
420
|
+
t0 = /* @__PURE__ */ jsx(PageStep, {
|
|
421
|
+
step: "last",
|
|
422
|
+
...props
|
|
216
423
|
});
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
$[8] = t3;
|
|
222
|
-
$[9] = t4;
|
|
223
|
-
} else t4 = $[9];
|
|
224
|
-
return t4;
|
|
424
|
+
$[0] = props;
|
|
425
|
+
$[1] = t0;
|
|
426
|
+
} else t0 = $[1];
|
|
427
|
+
return t0;
|
|
225
428
|
};
|
|
429
|
+
/** `First`, `Previous`, `Next` and `Last` in a row. */
|
|
226
430
|
var PaginationControls = (t0) => {
|
|
227
|
-
const $ = c(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
431
|
+
const $ = c(40);
|
|
432
|
+
let className;
|
|
433
|
+
let firstIcon;
|
|
434
|
+
let firstLabel;
|
|
435
|
+
let lastIcon;
|
|
436
|
+
let lastLabel;
|
|
437
|
+
let nextIcon;
|
|
438
|
+
let nextLabel;
|
|
439
|
+
let previousIcon;
|
|
440
|
+
let previousLabel;
|
|
441
|
+
let props;
|
|
442
|
+
let ref;
|
|
443
|
+
let render;
|
|
444
|
+
if ($[0] !== t0) {
|
|
445
|
+
({firstLabel, previousLabel, nextLabel, lastLabel, firstIcon, previousIcon, nextIcon, lastIcon, render, className, ref, ...props} = t0);
|
|
446
|
+
$[0] = t0;
|
|
447
|
+
$[1] = className;
|
|
448
|
+
$[2] = firstIcon;
|
|
449
|
+
$[3] = firstLabel;
|
|
450
|
+
$[4] = lastIcon;
|
|
451
|
+
$[5] = lastLabel;
|
|
452
|
+
$[6] = nextIcon;
|
|
453
|
+
$[7] = nextLabel;
|
|
454
|
+
$[8] = previousIcon;
|
|
455
|
+
$[9] = previousLabel;
|
|
456
|
+
$[10] = props;
|
|
457
|
+
$[11] = ref;
|
|
458
|
+
$[12] = render;
|
|
459
|
+
} else {
|
|
460
|
+
className = $[1];
|
|
461
|
+
firstIcon = $[2];
|
|
462
|
+
firstLabel = $[3];
|
|
463
|
+
lastIcon = $[4];
|
|
464
|
+
lastLabel = $[5];
|
|
465
|
+
nextIcon = $[6];
|
|
466
|
+
nextLabel = $[7];
|
|
467
|
+
previousIcon = $[8];
|
|
468
|
+
previousLabel = $[9];
|
|
469
|
+
props = $[10];
|
|
470
|
+
ref = $[11];
|
|
471
|
+
render = $[12];
|
|
472
|
+
}
|
|
233
473
|
let t1;
|
|
234
|
-
if ($[
|
|
235
|
-
t1 =
|
|
236
|
-
|
|
474
|
+
if ($[13] !== className) {
|
|
475
|
+
t1 = clsx(pagination_module_default.controls, className);
|
|
476
|
+
$[13] = className;
|
|
477
|
+
$[14] = t1;
|
|
478
|
+
} else t1 = $[14];
|
|
479
|
+
let t2;
|
|
480
|
+
if ($[15] !== firstIcon || $[16] !== firstLabel) {
|
|
481
|
+
t2 = /* @__PURE__ */ jsx(PaginationFirst, {
|
|
237
482
|
label: firstLabel,
|
|
238
|
-
|
|
239
|
-
unavailable: atStart,
|
|
240
|
-
onPageIndexChange
|
|
483
|
+
children: firstIcon
|
|
241
484
|
});
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
|
|
246
|
-
} else t1 = $[3];
|
|
247
|
-
const t2 = pageIndex - 1;
|
|
485
|
+
$[15] = firstIcon;
|
|
486
|
+
$[16] = firstLabel;
|
|
487
|
+
$[17] = t2;
|
|
488
|
+
} else t2 = $[17];
|
|
248
489
|
let t3;
|
|
249
|
-
if ($[
|
|
250
|
-
t3 = /* @__PURE__ */ jsx(
|
|
251
|
-
icon: SvgChevronLeft,
|
|
490
|
+
if ($[18] !== previousIcon || $[19] !== previousLabel) {
|
|
491
|
+
t3 = /* @__PURE__ */ jsx(PaginationPrevious, {
|
|
252
492
|
label: previousLabel,
|
|
253
|
-
|
|
254
|
-
unavailable: atStart,
|
|
255
|
-
onPageIndexChange
|
|
493
|
+
children: previousIcon
|
|
256
494
|
});
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
let t5;
|
|
265
|
-
if ($[9] !== atEnd || $[10] !== nextLabel || $[11] !== onPageIndexChange || $[12] !== t4) {
|
|
266
|
-
t5 = /* @__PURE__ */ jsx(PageButton, {
|
|
267
|
-
icon: SvgChevronRight,
|
|
495
|
+
$[18] = previousIcon;
|
|
496
|
+
$[19] = previousLabel;
|
|
497
|
+
$[20] = t3;
|
|
498
|
+
} else t3 = $[20];
|
|
499
|
+
let t4;
|
|
500
|
+
if ($[21] !== nextIcon || $[22] !== nextLabel) {
|
|
501
|
+
t4 = /* @__PURE__ */ jsx(PaginationNext, {
|
|
268
502
|
label: nextLabel,
|
|
269
|
-
|
|
270
|
-
unavailable: atEnd,
|
|
271
|
-
onPageIndexChange
|
|
503
|
+
children: nextIcon
|
|
272
504
|
});
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
if ($[14] !== atEnd || $[15] !== lastIndex || $[16] !== lastLabel || $[17] !== onPageIndexChange) {
|
|
281
|
-
t6 = /* @__PURE__ */ jsx(PageButton, {
|
|
282
|
-
icon: SvgLastPage,
|
|
505
|
+
$[21] = nextIcon;
|
|
506
|
+
$[22] = nextLabel;
|
|
507
|
+
$[23] = t4;
|
|
508
|
+
} else t4 = $[23];
|
|
509
|
+
let t5;
|
|
510
|
+
if ($[24] !== lastIcon || $[25] !== lastLabel) {
|
|
511
|
+
t5 = /* @__PURE__ */ jsx(PaginationLast, {
|
|
283
512
|
label: lastLabel,
|
|
284
|
-
|
|
285
|
-
unavailable: atEnd,
|
|
286
|
-
onPageIndexChange
|
|
513
|
+
children: lastIcon
|
|
287
514
|
});
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
515
|
+
$[24] = lastIcon;
|
|
516
|
+
$[25] = lastLabel;
|
|
517
|
+
$[26] = t5;
|
|
518
|
+
} else t5 = $[26];
|
|
519
|
+
let t6;
|
|
520
|
+
if ($[27] !== t2 || $[28] !== t3 || $[29] !== t4 || $[30] !== t5) {
|
|
521
|
+
t6 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
522
|
+
t2,
|
|
523
|
+
t3,
|
|
524
|
+
t4,
|
|
525
|
+
t5
|
|
526
|
+
] });
|
|
527
|
+
$[27] = t2;
|
|
528
|
+
$[28] = t3;
|
|
529
|
+
$[29] = t4;
|
|
530
|
+
$[30] = t5;
|
|
531
|
+
$[31] = t6;
|
|
532
|
+
} else t6 = $[31];
|
|
294
533
|
let t7;
|
|
295
|
-
if ($[
|
|
296
|
-
t7 =
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
534
|
+
if ($[32] !== props || $[33] !== t1 || $[34] !== t6) {
|
|
535
|
+
t7 = {
|
|
536
|
+
...props,
|
|
537
|
+
className: t1,
|
|
538
|
+
children: t6
|
|
539
|
+
};
|
|
540
|
+
$[32] = props;
|
|
541
|
+
$[33] = t1;
|
|
542
|
+
$[34] = t6;
|
|
543
|
+
$[35] = t7;
|
|
544
|
+
} else t7 = $[35];
|
|
545
|
+
let t8;
|
|
546
|
+
if ($[36] !== ref || $[37] !== render || $[38] !== t7) {
|
|
547
|
+
t8 = {
|
|
548
|
+
defaultTagName: "div",
|
|
549
|
+
render,
|
|
550
|
+
ref,
|
|
551
|
+
props: t7
|
|
552
|
+
};
|
|
553
|
+
$[36] = ref;
|
|
554
|
+
$[37] = render;
|
|
555
|
+
$[38] = t7;
|
|
556
|
+
$[39] = t8;
|
|
557
|
+
} else t8 = $[39];
|
|
558
|
+
return useRender(t8);
|
|
559
|
+
};
|
|
560
|
+
var PaginationContent = (t0) => {
|
|
561
|
+
const $ = c(24);
|
|
562
|
+
let checkIcon;
|
|
563
|
+
let controls;
|
|
564
|
+
let expandIcon;
|
|
565
|
+
let indexLabel;
|
|
566
|
+
let pageSizeLabel;
|
|
567
|
+
if ($[0] !== t0) {
|
|
568
|
+
({pageSizeLabel, indexLabel, checkIcon, expandIcon, ...controls} = t0);
|
|
569
|
+
$[0] = t0;
|
|
570
|
+
$[1] = checkIcon;
|
|
571
|
+
$[2] = controls;
|
|
572
|
+
$[3] = expandIcon;
|
|
573
|
+
$[4] = indexLabel;
|
|
574
|
+
$[5] = pageSizeLabel;
|
|
575
|
+
} else {
|
|
576
|
+
checkIcon = $[1];
|
|
577
|
+
controls = $[2];
|
|
578
|
+
expandIcon = $[3];
|
|
579
|
+
indexLabel = $[4];
|
|
580
|
+
pageSizeLabel = $[5];
|
|
581
|
+
}
|
|
582
|
+
let t1;
|
|
583
|
+
if ($[6] !== pageSizeLabel) {
|
|
584
|
+
t1 = /* @__PURE__ */ jsx(Select.Label, { children: pageSizeLabel });
|
|
585
|
+
$[6] = pageSizeLabel;
|
|
586
|
+
$[7] = t1;
|
|
587
|
+
} else t1 = $[7];
|
|
588
|
+
let t2;
|
|
589
|
+
if ($[8] !== expandIcon) {
|
|
590
|
+
t2 = /* @__PURE__ */ jsx(Select.Trigger, { icon: expandIcon });
|
|
591
|
+
$[8] = expandIcon;
|
|
592
|
+
$[9] = t2;
|
|
593
|
+
} else t2 = $[9];
|
|
594
|
+
let t3;
|
|
595
|
+
if ($[10] !== checkIcon) {
|
|
596
|
+
t3 = /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, { children: /* @__PURE__ */ jsx(Select.Popup, { children: /* @__PURE__ */ jsx(Select.List, { children: /* @__PURE__ */ jsx(Select.Items, { checkIcon }) }) }) }) });
|
|
597
|
+
$[10] = checkIcon;
|
|
598
|
+
$[11] = t3;
|
|
599
|
+
} else t3 = $[11];
|
|
600
|
+
let t4;
|
|
601
|
+
if ($[12] !== t1 || $[13] !== t2 || $[14] !== t3) {
|
|
602
|
+
t4 = /* @__PURE__ */ jsxs(PaginationPageSize, { children: [
|
|
603
|
+
t1,
|
|
604
|
+
t2,
|
|
605
|
+
t3
|
|
606
|
+
] });
|
|
607
|
+
$[12] = t1;
|
|
608
|
+
$[13] = t2;
|
|
609
|
+
$[14] = t3;
|
|
610
|
+
$[15] = t4;
|
|
611
|
+
} else t4 = $[15];
|
|
612
|
+
let t5;
|
|
613
|
+
if ($[16] !== indexLabel) {
|
|
614
|
+
t5 = /* @__PURE__ */ jsx(PaginationIndex, { label: indexLabel });
|
|
615
|
+
$[16] = indexLabel;
|
|
616
|
+
$[17] = t5;
|
|
617
|
+
} else t5 = $[17];
|
|
618
|
+
let t6;
|
|
619
|
+
if ($[18] !== controls) {
|
|
620
|
+
t6 = /* @__PURE__ */ jsx(PaginationControls, { ...controls });
|
|
621
|
+
$[18] = controls;
|
|
622
|
+
$[19] = t6;
|
|
623
|
+
} else t6 = $[19];
|
|
624
|
+
let t7;
|
|
625
|
+
if ($[20] !== t4 || $[21] !== t5 || $[22] !== t6) {
|
|
626
|
+
t7 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
627
|
+
t4,
|
|
628
|
+
t5,
|
|
629
|
+
t6
|
|
630
|
+
] });
|
|
631
|
+
$[20] = t4;
|
|
307
632
|
$[21] = t5;
|
|
308
633
|
$[22] = t6;
|
|
309
634
|
$[23] = t7;
|
|
310
635
|
} else t7 = $[23];
|
|
311
636
|
return t7;
|
|
312
637
|
};
|
|
638
|
+
/** The page size, the index and the four step buttons, in a `Root`. */
|
|
639
|
+
var Prefab = (t0) => {
|
|
640
|
+
const $ = c(30);
|
|
641
|
+
let checkIcon;
|
|
642
|
+
let expandIcon;
|
|
643
|
+
let firstIcon;
|
|
644
|
+
let firstLabel;
|
|
645
|
+
let indexLabel;
|
|
646
|
+
let lastIcon;
|
|
647
|
+
let lastLabel;
|
|
648
|
+
let nextIcon;
|
|
649
|
+
let nextLabel;
|
|
650
|
+
let pageSizeLabel;
|
|
651
|
+
let previousIcon;
|
|
652
|
+
let previousLabel;
|
|
653
|
+
let props;
|
|
654
|
+
if ($[0] !== t0) {
|
|
655
|
+
({pageSizeLabel, indexLabel, checkIcon, expandIcon, firstLabel, previousLabel, nextLabel, lastLabel, firstIcon, previousIcon, nextIcon, lastIcon, ...props} = t0);
|
|
656
|
+
$[0] = t0;
|
|
657
|
+
$[1] = checkIcon;
|
|
658
|
+
$[2] = expandIcon;
|
|
659
|
+
$[3] = firstIcon;
|
|
660
|
+
$[4] = firstLabel;
|
|
661
|
+
$[5] = indexLabel;
|
|
662
|
+
$[6] = lastIcon;
|
|
663
|
+
$[7] = lastLabel;
|
|
664
|
+
$[8] = nextIcon;
|
|
665
|
+
$[9] = nextLabel;
|
|
666
|
+
$[10] = pageSizeLabel;
|
|
667
|
+
$[11] = previousIcon;
|
|
668
|
+
$[12] = previousLabel;
|
|
669
|
+
$[13] = props;
|
|
670
|
+
} else {
|
|
671
|
+
checkIcon = $[1];
|
|
672
|
+
expandIcon = $[2];
|
|
673
|
+
firstIcon = $[3];
|
|
674
|
+
firstLabel = $[4];
|
|
675
|
+
indexLabel = $[5];
|
|
676
|
+
lastIcon = $[6];
|
|
677
|
+
lastLabel = $[7];
|
|
678
|
+
nextIcon = $[8];
|
|
679
|
+
nextLabel = $[9];
|
|
680
|
+
pageSizeLabel = $[10];
|
|
681
|
+
previousIcon = $[11];
|
|
682
|
+
previousLabel = $[12];
|
|
683
|
+
props = $[13];
|
|
684
|
+
}
|
|
685
|
+
let t1;
|
|
686
|
+
if ($[14] !== checkIcon || $[15] !== expandIcon || $[16] !== firstIcon || $[17] !== firstLabel || $[18] !== indexLabel || $[19] !== lastIcon || $[20] !== lastLabel || $[21] !== nextIcon || $[22] !== nextLabel || $[23] !== pageSizeLabel || $[24] !== previousIcon || $[25] !== previousLabel) {
|
|
687
|
+
t1 = /* @__PURE__ */ jsx(PaginationContent, {
|
|
688
|
+
pageSizeLabel,
|
|
689
|
+
indexLabel,
|
|
690
|
+
checkIcon,
|
|
691
|
+
expandIcon,
|
|
692
|
+
firstLabel,
|
|
693
|
+
previousLabel,
|
|
694
|
+
nextLabel,
|
|
695
|
+
lastLabel,
|
|
696
|
+
firstIcon,
|
|
697
|
+
previousIcon,
|
|
698
|
+
nextIcon,
|
|
699
|
+
lastIcon
|
|
700
|
+
});
|
|
701
|
+
$[14] = checkIcon;
|
|
702
|
+
$[15] = expandIcon;
|
|
703
|
+
$[16] = firstIcon;
|
|
704
|
+
$[17] = firstLabel;
|
|
705
|
+
$[18] = indexLabel;
|
|
706
|
+
$[19] = lastIcon;
|
|
707
|
+
$[20] = lastLabel;
|
|
708
|
+
$[21] = nextIcon;
|
|
709
|
+
$[22] = nextLabel;
|
|
710
|
+
$[23] = pageSizeLabel;
|
|
711
|
+
$[24] = previousIcon;
|
|
712
|
+
$[25] = previousLabel;
|
|
713
|
+
$[26] = t1;
|
|
714
|
+
} else t1 = $[26];
|
|
715
|
+
let t2;
|
|
716
|
+
if ($[27] !== props || $[28] !== t1) {
|
|
717
|
+
t2 = /* @__PURE__ */ jsx(PaginationRoot, {
|
|
718
|
+
...props,
|
|
719
|
+
children: t1
|
|
720
|
+
});
|
|
721
|
+
$[27] = props;
|
|
722
|
+
$[28] = t1;
|
|
723
|
+
$[29] = t2;
|
|
724
|
+
} else t2 = $[29];
|
|
725
|
+
return t2;
|
|
726
|
+
};
|
|
313
727
|
/**
|
|
314
|
-
* The pager for a paged list, over any source:
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
728
|
+
* The pager for a paged list, over any source: the page size, which page is on
|
|
729
|
+
* screen, and buttons to the first, previous, next and last page. Its parts
|
|
730
|
+
* compose another pager: `Root` holds where the list stands, `PageSize` picks
|
|
731
|
+
* rows per page, `Index` says which page is on screen, and `Controls`, or
|
|
732
|
+
* `First`, `Previous`, `Next` and `Last` on their own, step through the pages.
|
|
318
733
|
*
|
|
319
734
|
* @example
|
|
320
|
-
* <Pagination
|
|
735
|
+
* <Pagination
|
|
321
736
|
* pageIndex={pageIndex}
|
|
322
737
|
* pageCount={pageCount}
|
|
323
738
|
* pageSize={pageSize}
|
|
324
739
|
* pageSizes={[10, 20, 50]}
|
|
325
740
|
* onPageIndexChange={setPageIndex}
|
|
326
|
-
* onPageSizeChange={setPageSize}
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
741
|
+
* onPageSizeChange={setPageSize}
|
|
742
|
+
* pageSizeLabel="Rows per page"
|
|
743
|
+
* indexLabel={page => `Page ${page.pageIndex + 1} of ${page.pageCount}`}
|
|
744
|
+
* firstLabel="First page"
|
|
745
|
+
* previousLabel="Previous page"
|
|
746
|
+
* nextLabel="Next page"
|
|
747
|
+
* lastLabel="Last page"
|
|
748
|
+
* firstIcon={<FirstPageIcon />}
|
|
749
|
+
* previousIcon={<ChevronLeftIcon />}
|
|
750
|
+
* nextIcon={<ChevronRightIcon />}
|
|
751
|
+
* lastIcon={<LastPageIcon />}
|
|
752
|
+
* checkIcon={<CheckIcon />}
|
|
753
|
+
* />
|
|
331
754
|
*/
|
|
332
|
-
var Pagination = {
|
|
755
|
+
var Pagination = Object.assign(Prefab, {
|
|
333
756
|
Root: PaginationRoot,
|
|
334
757
|
PageSize: PaginationPageSize,
|
|
335
758
|
Index: PaginationIndex,
|
|
336
|
-
Controls: PaginationControls
|
|
337
|
-
|
|
759
|
+
Controls: PaginationControls,
|
|
760
|
+
First: PaginationFirst,
|
|
761
|
+
Previous: PaginationPrevious,
|
|
762
|
+
Next: PaginationNext,
|
|
763
|
+
Last: PaginationLast
|
|
764
|
+
});
|
|
338
765
|
function _temp(a, b) {
|
|
339
766
|
return a - b;
|
|
340
767
|
}
|