@solostylist/ui-kit 1.0.229 → 1.0.230
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/s-pagination/index.d.ts +1 -0
- package/dist/s-pagination/s-pagination.d.ts +43 -6
- package/dist/s-pagination/s-pagination.js +46 -28
- package/dist/s-pagination/types.d.ts +9 -0
- package/dist/s-pagination/types.js +27 -0
- package/dist/theme/components/components.js +94 -92
- package/dist/theme/components/pagination-item.d.ts +1077 -1015
- package/dist/theme/components/pagination-item.js +81 -6
- package/dist/theme/components/pagination.d.ts +14 -0
- package/dist/theme/components/pagination.js +5 -0
- package/package.json +1 -1
|
@@ -1,16 +1,53 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { PaginationProps } from '@mui/material';
|
|
3
|
+
import { SPaginationColor, SPaginationSize } from './types';
|
|
4
|
+
export type { SPaginationColor, SPaginationSize } from './types';
|
|
3
5
|
/**
|
|
4
|
-
* Props for
|
|
6
|
+
* Props for SPagination. Web behavior is sourced from MUI Pagination; custom
|
|
7
|
+
* SoloStylist props stay local to the web package.
|
|
5
8
|
*/
|
|
6
|
-
export interface SPaginationProps extends PaginationProps {
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
/**
|
|
9
|
+
export interface SPaginationProps extends Omit<PaginationProps, 'color' | 'count' | 'shape' | 'size' | 'variant'> {
|
|
10
|
+
/** Accessible label for the complete pagination control. */
|
|
11
|
+
accessibilityLabel?: string;
|
|
12
|
+
/** Number of always-visible pages at the beginning and end. */
|
|
13
|
+
boundaryCount?: number;
|
|
14
|
+
/** Total number of pages. The component is hidden when count is 0 or less. */
|
|
10
15
|
count?: number;
|
|
16
|
+
/** Page selected initially when the component is uncontrolled. */
|
|
17
|
+
defaultPage?: number;
|
|
18
|
+
/** Whether the complete pagination control is disabled. */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Returns the accessible label for an item. */
|
|
21
|
+
getItemAriaLabel?: PaginationProps['getItemAriaLabel'];
|
|
22
|
+
/** Whether to hide the next-page button. */
|
|
23
|
+
hideNextButton?: boolean;
|
|
24
|
+
/** Whether to hide the previous-page button. */
|
|
25
|
+
hidePrevButton?: boolean;
|
|
26
|
+
/** Whether to show the pagination skeleton. */
|
|
27
|
+
loading?: boolean;
|
|
28
|
+
/** Callback fired when the page changes. */
|
|
29
|
+
onChange?: PaginationProps['onChange'];
|
|
30
|
+
/** Current page for controlled usage (1-indexed). */
|
|
31
|
+
page?: number;
|
|
32
|
+
/** Custom item renderer. */
|
|
33
|
+
renderItem?: PaginationProps['renderItem'];
|
|
34
|
+
/** Active-page color, using the same semantic palette as SButton. */
|
|
35
|
+
color?: SPaginationColor;
|
|
36
|
+
/** Shape of every pagination item. Defaults to the rounded SIconButton shape. */
|
|
37
|
+
shape?: 'circular' | 'rounded';
|
|
38
|
+
/** Whether to show the first-page button. */
|
|
39
|
+
showFirstButton?: boolean;
|
|
40
|
+
/** Whether to show the last-page button. */
|
|
41
|
+
showLastButton?: boolean;
|
|
42
|
+
/** Number of visible pages before and after the current page. */
|
|
43
|
+
siblingCount?: number;
|
|
44
|
+
/** Size of pagination items. */
|
|
45
|
+
size?: SPaginationSize;
|
|
46
|
+
/** Inactive-page visual variant. The active page always uses the contained SButton treatment. */
|
|
47
|
+
variant?: 'text' | 'outlined';
|
|
11
48
|
}
|
|
12
49
|
export declare const SPagination: {
|
|
13
|
-
({ loading, count, ...props }: SPaginationProps): React.JSX.Element;
|
|
50
|
+
({ loading, count, color, shape, size, variant, accessibilityLabel, sx, ...props }: SPaginationProps): React.JSX.Element;
|
|
14
51
|
displayName: string;
|
|
15
52
|
};
|
|
16
53
|
export default SPagination;
|
|
@@ -1,32 +1,50 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { paginationDimensions as e } from "./types.js";
|
|
2
|
+
import { SSkeleton as t } from "../s-skeleton/s-skeleton.js";
|
|
2
3
|
import "react";
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { Pagination as
|
|
4
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { Pagination as a, Stack as o } from "@mui/material";
|
|
5
6
|
//#region lib/s-pagination/s-pagination.tsx
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
7
|
+
var s = ({ size: n, style: a }) => {
|
|
8
|
+
let s = e[n];
|
|
9
|
+
return /* @__PURE__ */ i(o, {
|
|
10
|
+
direction: "row",
|
|
11
|
+
style: a,
|
|
12
|
+
sx: {
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
display: "inline-flex",
|
|
15
|
+
gap: `${s.gap}px`
|
|
16
|
+
},
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ r(t, {
|
|
19
|
+
variant: "rounded",
|
|
20
|
+
width: s.item,
|
|
21
|
+
height: s.item
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ r(t, {
|
|
24
|
+
variant: "rounded",
|
|
25
|
+
width: s.bar,
|
|
26
|
+
height: s.item
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ r(t, {
|
|
29
|
+
variant: "rounded",
|
|
30
|
+
width: s.item,
|
|
31
|
+
height: s.item
|
|
32
|
+
})
|
|
33
|
+
]
|
|
28
34
|
});
|
|
29
|
-
}
|
|
30
|
-
|
|
35
|
+
}, c = ({ loading: e = !1, count: t = 0, color: i = "primary", shape: o = "rounded", size: c = "medium", variant: l = "text", accessibilityLabel: u = "pagination navigation", sx: d, ...f }) => t <= 0 ? /* @__PURE__ */ r(n, {}) : e ? /* @__PURE__ */ r(s, {
|
|
36
|
+
size: c,
|
|
37
|
+
style: f.style
|
|
38
|
+
}) : /* @__PURE__ */ r(a, {
|
|
39
|
+
count: t,
|
|
40
|
+
"aria-label": u,
|
|
41
|
+
color: i,
|
|
42
|
+
shape: o,
|
|
43
|
+
size: c,
|
|
44
|
+
variant: l,
|
|
45
|
+
sx: d,
|
|
46
|
+
...f
|
|
47
|
+
});
|
|
48
|
+
c.displayName = "SPagination";
|
|
31
49
|
//#endregion
|
|
32
|
-
export {
|
|
50
|
+
export { c as SPagination, c as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PaginationProps } from '@mui/material';
|
|
2
|
+
export type SPaginationSize = NonNullable<PaginationProps['size']>;
|
|
3
|
+
export type SPaginationColor = 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
4
|
+
export declare const paginationColors: readonly ["primary", "secondary", "success", "error", "info", "warning"];
|
|
5
|
+
export declare const paginationDimensions: Record<SPaginationSize, {
|
|
6
|
+
item: number;
|
|
7
|
+
gap: number;
|
|
8
|
+
bar: number;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region lib/s-pagination/types.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"primary",
|
|
4
|
+
"secondary",
|
|
5
|
+
"success",
|
|
6
|
+
"error",
|
|
7
|
+
"info",
|
|
8
|
+
"warning"
|
|
9
|
+
], t = {
|
|
10
|
+
small: {
|
|
11
|
+
item: 26,
|
|
12
|
+
gap: 2,
|
|
13
|
+
bar: 90
|
|
14
|
+
},
|
|
15
|
+
medium: {
|
|
16
|
+
item: 32,
|
|
17
|
+
gap: 6,
|
|
18
|
+
bar: 120
|
|
19
|
+
},
|
|
20
|
+
large: {
|
|
21
|
+
item: 40,
|
|
22
|
+
gap: 6,
|
|
23
|
+
bar: 150
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { e as paginationColors, t as paginationDimensions };
|
|
@@ -20,98 +20,100 @@ import { MuiPickersCalendarHeader as v } from "./pickers-calendar-header.js";
|
|
|
20
20
|
import { MuiPickersArrowSwitcher as y } from "./pickers-arrow-switcher.js";
|
|
21
21
|
import { MuiPickerDay as b } from "./picker-day.js";
|
|
22
22
|
import { MuiPaper as x } from "./paper.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import { t as re } from "../../
|
|
59
|
-
import { t as ie } from "../../
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
23
|
+
import { MuiPagination as S } from "./pagination.js";
|
|
24
|
+
import { MuiPaginationItem as C } from "./pagination-item.js";
|
|
25
|
+
import { MuiOutlinedInput as w } from "./outlined-input.js";
|
|
26
|
+
import { MuiMultiSectionDigitalClockSection as T } from "./multi-section-digital-clock-section.js";
|
|
27
|
+
import { MuiMonthCalendar as E } from "./month-calendar.js";
|
|
28
|
+
import { MuiMenu as D } from "./menu.js";
|
|
29
|
+
import { MuiMenuItem as O } from "./menu-item.js";
|
|
30
|
+
import { MuiList as k } from "./list.js";
|
|
31
|
+
import { MuiListSubheader as A } from "./list-subheader.js";
|
|
32
|
+
import { MuiListItemButton as j } from "./list-item-button.js";
|
|
33
|
+
import { MuiListItem as M } from "./list-item.js";
|
|
34
|
+
import { MuiListItemText as N } from "./list-item-text.js";
|
|
35
|
+
import { MuiListItemIcon as P } from "./list-item-icon.js";
|
|
36
|
+
import { MuiLink as F } from "./link.js";
|
|
37
|
+
import { MuiLinearProgress as I } from "./linear-progress.js";
|
|
38
|
+
import { MuiInputBase as L } from "./input-base.js";
|
|
39
|
+
import { MuiInputAdornment as R } from "./input-adornment.js";
|
|
40
|
+
import { MuiIcon as z } from "./icon.js";
|
|
41
|
+
import { MuiIconButton as B } from "./icon-button.js";
|
|
42
|
+
import { MuiFormLabel as V } from "./form-label.js";
|
|
43
|
+
import { MuiFormControl as H } from "./form-control.js";
|
|
44
|
+
import { MuiDrawer as U } from "./drawer.js";
|
|
45
|
+
import { MuiDialog as W } from "./dialog.js";
|
|
46
|
+
import { MuiDialogTitle as G } from "./dialog-title.js";
|
|
47
|
+
import { MuiDialogContent as K } from "./dialog-content.js";
|
|
48
|
+
import { MuiDialogActions as q } from "./dialog-actions.js";
|
|
49
|
+
import { MuiDayCalendar as J } from "./day-calendar.js";
|
|
50
|
+
import { MuiDateCalendar as Y } from "./date-calendar.js";
|
|
51
|
+
import { MuiCssBaseline as X } from "./css-baseline.js";
|
|
52
|
+
import { MuiContainer as Z } from "./container.js";
|
|
53
|
+
import { MuiAccordion as Q } from "./accordion.js";
|
|
54
|
+
import { MuiAccordionDetails as $ } from "./accordion-details.js";
|
|
55
|
+
import { MuiAccordionSummary as ee } from "./accordion-summary.js";
|
|
56
|
+
import { MuiAlert as te } from "./alert.js";
|
|
57
|
+
import { MuiAppBar as ne } from "./app-bar.js";
|
|
58
|
+
import { t as re } from "../../autocomplete-Dd4zjpaF.js";
|
|
59
|
+
import { t as ie } from "../../checkbox-DC-OoGvh.js";
|
|
60
|
+
import { t as ae } from "../../avatar-DFQ5F7pY.js";
|
|
61
|
+
import { MuiBackdrop as oe } from "./backdrop.js";
|
|
62
|
+
import { MuiButton as se } from "./button.js";
|
|
63
|
+
import { MuiButtonBase as ce } from "./button-base.js";
|
|
64
|
+
import { MuiCard as le } from "./card.js";
|
|
65
|
+
import { MuiCardActions as ue } from "./card-actions.js";
|
|
66
|
+
import { MuiCardContent as de } from "./card-content.js";
|
|
67
|
+
import { MuiCardHeader as fe } from "./card-header.js";
|
|
68
|
+
import { MuiChip as pe } from "./chip.js";
|
|
68
69
|
//#region lib/theme/components/components.ts
|
|
69
|
-
var
|
|
70
|
-
MuiAccordion:
|
|
71
|
-
MuiAccordionDetails:
|
|
72
|
-
MuiAccordionSummary:
|
|
73
|
-
MuiAlert:
|
|
74
|
-
MuiAppBar:
|
|
75
|
-
MuiAutocomplete:
|
|
76
|
-
MuiAvatar:
|
|
77
|
-
MuiBackdrop:
|
|
78
|
-
MuiButton:
|
|
79
|
-
MuiButtonBase:
|
|
80
|
-
MuiCard:
|
|
81
|
-
MuiCardActions:
|
|
82
|
-
MuiCardContent:
|
|
83
|
-
MuiCardHeader:
|
|
84
|
-
MuiCheckbox:
|
|
85
|
-
MuiChip:
|
|
86
|
-
MuiContainer:
|
|
87
|
-
MuiCssBaseline:
|
|
88
|
-
MuiDateCalendar:
|
|
89
|
-
MuiDayCalendar:
|
|
90
|
-
MuiDialog:
|
|
91
|
-
MuiDialogActions:
|
|
92
|
-
MuiDialogContent:
|
|
93
|
-
MuiDialogTitle:
|
|
94
|
-
MuiDrawer:
|
|
95
|
-
MuiFormLabel:
|
|
96
|
-
MuiFormControl:
|
|
97
|
-
MuiIcon:
|
|
98
|
-
MuiIconButton:
|
|
99
|
-
MuiInputAdornment:
|
|
100
|
-
MuiInputBase:
|
|
101
|
-
MuiLinearProgress:
|
|
102
|
-
MuiLink:
|
|
103
|
-
MuiList:
|
|
104
|
-
MuiListItem:
|
|
105
|
-
MuiListItemButton:
|
|
106
|
-
MuiListItemIcon:
|
|
107
|
-
MuiListItemText:
|
|
108
|
-
MuiListSubheader:
|
|
109
|
-
MuiMenu:
|
|
110
|
-
MuiMenuItem:
|
|
111
|
-
MuiMonthCalendar:
|
|
112
|
-
MuiMultiSectionDigitalClockSection:
|
|
113
|
-
MuiOutlinedInput:
|
|
114
|
-
|
|
70
|
+
var me = {
|
|
71
|
+
MuiAccordion: Q,
|
|
72
|
+
MuiAccordionDetails: $,
|
|
73
|
+
MuiAccordionSummary: ee,
|
|
74
|
+
MuiAlert: te,
|
|
75
|
+
MuiAppBar: ne,
|
|
76
|
+
MuiAutocomplete: re,
|
|
77
|
+
MuiAvatar: ae,
|
|
78
|
+
MuiBackdrop: oe,
|
|
79
|
+
MuiButton: se,
|
|
80
|
+
MuiButtonBase: ce,
|
|
81
|
+
MuiCard: le,
|
|
82
|
+
MuiCardActions: ue,
|
|
83
|
+
MuiCardContent: de,
|
|
84
|
+
MuiCardHeader: fe,
|
|
85
|
+
MuiCheckbox: ie,
|
|
86
|
+
MuiChip: pe,
|
|
87
|
+
MuiContainer: Z,
|
|
88
|
+
MuiCssBaseline: X,
|
|
89
|
+
MuiDateCalendar: Y,
|
|
90
|
+
MuiDayCalendar: J,
|
|
91
|
+
MuiDialog: W,
|
|
92
|
+
MuiDialogActions: q,
|
|
93
|
+
MuiDialogContent: K,
|
|
94
|
+
MuiDialogTitle: G,
|
|
95
|
+
MuiDrawer: U,
|
|
96
|
+
MuiFormLabel: V,
|
|
97
|
+
MuiFormControl: H,
|
|
98
|
+
MuiIcon: z,
|
|
99
|
+
MuiIconButton: B,
|
|
100
|
+
MuiInputAdornment: R,
|
|
101
|
+
MuiInputBase: L,
|
|
102
|
+
MuiLinearProgress: I,
|
|
103
|
+
MuiLink: F,
|
|
104
|
+
MuiList: k,
|
|
105
|
+
MuiListItem: M,
|
|
106
|
+
MuiListItemButton: j,
|
|
107
|
+
MuiListItemIcon: P,
|
|
108
|
+
MuiListItemText: N,
|
|
109
|
+
MuiListSubheader: A,
|
|
110
|
+
MuiMenu: D,
|
|
111
|
+
MuiMenuItem: O,
|
|
112
|
+
MuiMonthCalendar: E,
|
|
113
|
+
MuiMultiSectionDigitalClockSection: T,
|
|
114
|
+
MuiOutlinedInput: w,
|
|
115
|
+
MuiPagination: S,
|
|
116
|
+
MuiPaginationItem: C,
|
|
115
117
|
MuiPaper: x,
|
|
116
118
|
MuiPickerDay: b,
|
|
117
119
|
MuiPickersArrowSwitcher: y,
|
|
@@ -136,4 +138,4 @@ var pe = {
|
|
|
136
138
|
MuiYearCalendar: e
|
|
137
139
|
};
|
|
138
140
|
//#endregion
|
|
139
|
-
export {
|
|
141
|
+
export { me as components };
|