@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.
@@ -1,2 +1,3 @@
1
1
  export { default, default as SPagination } from './s-pagination';
2
2
  export type { SPaginationProps } from './s-pagination';
3
+ export type { SPaginationColor, SPaginationSize } from './types';
@@ -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 the SPagination component, extending Material-UI's PaginationProps
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
- /** Whether the pagination is in a loading state - shows skeleton when true */
8
- loading?: boolean;
9
- /** Total number of pages - component returns empty fragment when 0 */
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 { SSkeleton as e } from "../s-skeleton/s-skeleton.js";
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 t, jsx as n, jsxs as r } from "react/jsx-runtime";
4
- import { Pagination as i, Stack as a, useMediaQuery as o, useTheme as s } from "@mui/material";
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 c = ({ style: t }) => /* @__PURE__ */ r(a, {
7
- direction: "row",
8
- style: t,
9
- sx: {
10
- display: "inline-flex",
11
- flexWrap: "wrap",
12
- gap: 1
13
- },
14
- children: [
15
- /* @__PURE__ */ n(e, { preset: "icon-button" }),
16
- /* @__PURE__ */ n(e, {
17
- variant: "rounded",
18
- width: 120
19
- }),
20
- /* @__PURE__ */ n(e, { preset: "icon-button" })
21
- ]
22
- }), l = ({ loading: e, count: r = 0, ...a }) => {
23
- let l = o(s().breakpoints.down("sm"));
24
- return r === 0 ? /* @__PURE__ */ n(t, {}) : e ? /* @__PURE__ */ n(c, { style: a.style }) : /* @__PURE__ */ n(i, {
25
- size: l ? "small" : "medium",
26
- count: r,
27
- ...a
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
- l.displayName = "SPagination";
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 { l as SPagination, l as default };
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 { MuiPaginationItem as S } from "./pagination-item.js";
24
- import { MuiOutlinedInput as C } from "./outlined-input.js";
25
- import { MuiMultiSectionDigitalClockSection as w } from "./multi-section-digital-clock-section.js";
26
- import { MuiMonthCalendar as T } from "./month-calendar.js";
27
- import { MuiMenu as E } from "./menu.js";
28
- import { MuiMenuItem as D } from "./menu-item.js";
29
- import { MuiList as O } from "./list.js";
30
- import { MuiListSubheader as k } from "./list-subheader.js";
31
- import { MuiListItemButton as A } from "./list-item-button.js";
32
- import { MuiListItem as j } from "./list-item.js";
33
- import { MuiListItemText as M } from "./list-item-text.js";
34
- import { MuiListItemIcon as N } from "./list-item-icon.js";
35
- import { MuiLink as P } from "./link.js";
36
- import { MuiLinearProgress as F } from "./linear-progress.js";
37
- import { MuiInputBase as I } from "./input-base.js";
38
- import { MuiInputAdornment as L } from "./input-adornment.js";
39
- import { MuiIcon as R } from "./icon.js";
40
- import { MuiIconButton as z } from "./icon-button.js";
41
- import { MuiFormLabel as B } from "./form-label.js";
42
- import { MuiFormControl as V } from "./form-control.js";
43
- import { MuiDrawer as H } from "./drawer.js";
44
- import { MuiDialog as U } from "./dialog.js";
45
- import { MuiDialogTitle as W } from "./dialog-title.js";
46
- import { MuiDialogContent as G } from "./dialog-content.js";
47
- import { MuiDialogActions as K } from "./dialog-actions.js";
48
- import { MuiDayCalendar as q } from "./day-calendar.js";
49
- import { MuiDateCalendar as J } from "./date-calendar.js";
50
- import { MuiCssBaseline as Y } from "./css-baseline.js";
51
- import { MuiContainer as X } from "./container.js";
52
- import { MuiAccordion as Z } from "./accordion.js";
53
- import { MuiAccordionDetails as Q } from "./accordion-details.js";
54
- import { MuiAccordionSummary as $ } from "./accordion-summary.js";
55
- import { MuiAlert as ee } from "./alert.js";
56
- import { MuiAppBar as te } from "./app-bar.js";
57
- import { t as ne } from "../../autocomplete-Dd4zjpaF.js";
58
- import { t as re } from "../../checkbox-DC-OoGvh.js";
59
- import { t as ie } from "../../avatar-DFQ5F7pY.js";
60
- import { MuiBackdrop as ae } from "./backdrop.js";
61
- import { MuiButton as oe } from "./button.js";
62
- import { MuiButtonBase as se } from "./button-base.js";
63
- import { MuiCard as ce } from "./card.js";
64
- import { MuiCardActions as le } from "./card-actions.js";
65
- import { MuiCardContent as ue } from "./card-content.js";
66
- import { MuiCardHeader as de } from "./card-header.js";
67
- import { MuiChip as fe } from "./chip.js";
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 pe = {
70
- MuiAccordion: Z,
71
- MuiAccordionDetails: Q,
72
- MuiAccordionSummary: $,
73
- MuiAlert: ee,
74
- MuiAppBar: te,
75
- MuiAutocomplete: ne,
76
- MuiAvatar: ie,
77
- MuiBackdrop: ae,
78
- MuiButton: oe,
79
- MuiButtonBase: se,
80
- MuiCard: ce,
81
- MuiCardActions: le,
82
- MuiCardContent: ue,
83
- MuiCardHeader: de,
84
- MuiCheckbox: re,
85
- MuiChip: fe,
86
- MuiContainer: X,
87
- MuiCssBaseline: Y,
88
- MuiDateCalendar: J,
89
- MuiDayCalendar: q,
90
- MuiDialog: U,
91
- MuiDialogActions: K,
92
- MuiDialogContent: G,
93
- MuiDialogTitle: W,
94
- MuiDrawer: H,
95
- MuiFormLabel: B,
96
- MuiFormControl: V,
97
- MuiIcon: R,
98
- MuiIconButton: z,
99
- MuiInputAdornment: L,
100
- MuiInputBase: I,
101
- MuiLinearProgress: F,
102
- MuiLink: P,
103
- MuiList: O,
104
- MuiListItem: j,
105
- MuiListItemButton: A,
106
- MuiListItemIcon: N,
107
- MuiListItemText: M,
108
- MuiListSubheader: k,
109
- MuiMenu: E,
110
- MuiMenuItem: D,
111
- MuiMonthCalendar: T,
112
- MuiMultiSectionDigitalClockSection: w,
113
- MuiOutlinedInput: C,
114
- MuiPaginationItem: S,
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 { pe as components };
141
+ export { me as components };