@soroush.tech/design-system 1.3.1 → 1.3.3
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 +28 -28
- package/dist/AppBar.cjs +1 -1
- package/dist/AppBar.d.cts +6 -6
- package/dist/AppBar.d.mts +6 -6
- package/dist/AppBar.mjs +1 -1
- package/dist/Avatar.cjs +2 -2
- package/dist/Avatar.d.cts +6 -6
- package/dist/Avatar.d.mts +6 -6
- package/dist/Avatar.mjs +2 -2
- package/dist/Backdrop.cjs +1 -1
- package/dist/Backdrop.d.cts +1 -1
- package/dist/Backdrop.d.mts +1 -1
- package/dist/Backdrop.mjs +1 -1
- package/dist/Button.cjs +2 -2
- package/dist/Button.d.cts +1 -1
- package/dist/Button.d.mts +1 -1
- package/dist/Button.mjs +2 -2
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.d.cts +1 -1
- package/dist/ButtonGroup.d.mts +1 -1
- package/dist/ButtonGroup.mjs +1 -1
- package/dist/Card.cjs +3 -3
- package/dist/Card.d.cts +3 -3
- package/dist/Card.d.mts +3 -3
- package/dist/Card.mjs +3 -3
- package/dist/Checkbox.cjs +1 -1
- package/dist/Checkbox.d.cts +2 -2
- package/dist/Checkbox.d.mts +2 -2
- package/dist/Checkbox.mjs +1 -1
- package/dist/CircularProgress.cjs +1 -1
- package/dist/CircularProgress.d.cts +6 -6
- package/dist/CircularProgress.d.mts +6 -6
- package/dist/CircularProgress.mjs +1 -1
- package/dist/Drawer.cjs +2 -2
- package/dist/Drawer.d.cts +3 -3
- package/dist/Drawer.d.mts +3 -3
- package/dist/Drawer.mjs +2 -2
- package/dist/Flex.cjs +1 -1
- package/dist/Flex.d.cts +1 -1
- package/dist/Flex.d.mts +1 -1
- package/dist/Flex.mjs +1 -1
- package/dist/FocusTrap.cjs +1 -1
- package/dist/FocusTrap.mjs +1 -1
- package/dist/Form.cjs +2 -2
- package/dist/Form.d.cts +5 -5
- package/dist/Form.d.mts +5 -5
- package/dist/Form.mjs +2 -2
- package/dist/FormControl.cjs +2 -2
- package/dist/FormControl.d.cts +8 -8
- package/dist/FormControl.d.mts +8 -8
- package/dist/FormControl.mjs +2 -2
- package/dist/FormHelperText.cjs +1 -1
- package/dist/FormHelperText.d.cts +1 -1
- package/dist/FormHelperText.d.mts +1 -1
- package/dist/FormHelperText.mjs +1 -1
- package/dist/FormLabel.cjs +1 -1
- package/dist/FormLabel.d.cts +1 -1
- package/dist/FormLabel.d.mts +1 -1
- package/dist/FormLabel.mjs +1 -1
- package/dist/Grid.cjs +1 -1
- package/dist/Grid.d.cts +4 -4
- package/dist/Grid.d.mts +4 -4
- package/dist/Grid.mjs +1 -1
- package/dist/{Icon-ByDvM-t1.cjs → Icon-BAMpe9SO.cjs} +2 -2
- package/dist/{Icon-CU_nUmsU.mjs → Icon-gSiGgU13.mjs} +2 -2
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.d.cts +1 -1
- package/dist/Icon.d.mts +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/Image.cjs +1 -1
- package/dist/Image.d.cts +3 -3
- package/dist/Image.d.mts +3 -3
- package/dist/Image.mjs +1 -1
- package/dist/LinearProgress.cjs +1 -1
- package/dist/LinearProgress.d.cts +5 -5
- package/dist/LinearProgress.d.mts +5 -5
- package/dist/LinearProgress.mjs +1 -1
- package/dist/Link.cjs +2 -2
- package/dist/Link.d.cts +1 -1
- package/dist/Link.d.mts +1 -1
- package/dist/Link.mjs +2 -2
- package/dist/MenuItem.cjs +3 -3
- package/dist/MenuItem.d.cts +9 -9
- package/dist/MenuItem.d.mts +9 -9
- package/dist/MenuItem.mjs +3 -3
- package/dist/{Modal-Bjfv7n4e.cjs → Modal-CApyh_V5.cjs} +2 -2
- package/dist/{Modal-Bv-mf8Fn.mjs → Modal-CYNcPk-2.mjs} +2 -2
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.d.cts +1 -1
- package/dist/Modal.d.mts +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NativeSelect.cjs +3 -3
- package/dist/NativeSelect.d.cts +12 -12
- package/dist/NativeSelect.d.mts +12 -12
- package/dist/NativeSelect.mjs +3 -3
- package/dist/Pagination/PaginationItem.cjs +3 -3
- package/dist/Pagination/PaginationItem.d.cts +1 -1
- package/dist/Pagination/PaginationItem.d.mts +1 -1
- package/dist/Pagination/PaginationItem.mjs +3 -3
- package/dist/Pagination.cjs +2 -2
- package/dist/Pagination.d.cts +2 -2
- package/dist/Pagination.d.mts +2 -2
- package/dist/Pagination.mjs +2 -2
- package/dist/Paper.cjs +2 -2
- package/dist/Paper.d.cts +1 -1
- package/dist/Paper.d.mts +1 -1
- package/dist/Paper.mjs +2 -2
- package/dist/{Popover-CH3yI-j-.mjs → Popover-Bq31OTEl.mjs} +4 -4
- package/dist/{Popover-COoJ2p2I.cjs → Popover-gg44qzwo.cjs} +4 -4
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.d.cts +7 -7
- package/dist/Popover.d.mts +7 -7
- package/dist/Popover.mjs +1 -1
- package/dist/Portal.cjs +1 -1
- package/dist/Portal.d.cts +1 -1
- package/dist/Portal.d.mts +1 -1
- package/dist/Portal.mjs +1 -1
- package/dist/Pressable.cjs +4 -4
- package/dist/Pressable.d.cts +1 -1
- package/dist/Pressable.d.mts +1 -1
- package/dist/Pressable.mjs +4 -4
- package/dist/Quote.cjs +2 -2
- package/dist/Quote.d.cts +5 -5
- package/dist/Quote.d.mts +5 -5
- package/dist/Quote.mjs +2 -2
- package/dist/Radio.cjs +1 -1
- package/dist/Radio.d.cts +3 -3
- package/dist/Radio.d.mts +3 -3
- package/dist/Radio.mjs +1 -1
- package/dist/Select.cjs +4 -4
- package/dist/Select.d.cts +11 -11
- package/dist/Select.d.mts +11 -11
- package/dist/Select.mjs +4 -4
- package/dist/Sidebar/Sidebar.cjs +4 -4
- package/dist/Sidebar/Sidebar.d.cts +12 -12
- package/dist/Sidebar/Sidebar.d.mts +12 -12
- package/dist/Sidebar/Sidebar.mjs +4 -4
- package/dist/Sidebar/SidebarItem.cjs +4 -4
- package/dist/Sidebar/SidebarItem.d.cts +13 -13
- package/dist/Sidebar/SidebarItem.d.mts +13 -13
- package/dist/Sidebar/SidebarItem.mjs +4 -4
- package/dist/Sidebar.d.cts +1 -1
- package/dist/Sidebar.d.mts +1 -1
- package/dist/{SidebarContext-ao6lRfTX.d.cts → SidebarContext-B1lWrt77.d.cts} +4 -4
- package/dist/{SidebarContext-ao6lRfTX.d.mts → SidebarContext-B1lWrt77.d.mts} +4 -4
- package/dist/Skeleton.cjs +1 -1
- package/dist/Skeleton.d.cts +3 -3
- package/dist/Skeleton.d.mts +3 -3
- package/dist/Skeleton.mjs +1 -1
- package/dist/Switch.cjs +2 -2
- package/dist/Switch.d.cts +5 -5
- package/dist/Switch.d.mts +5 -5
- package/dist/Switch.mjs +2 -2
- package/dist/Table/Table.cjs +1 -1
- package/dist/Table/Table.d.cts +14 -14
- package/dist/Table/Table.d.mts +14 -14
- package/dist/Table/Table.mjs +1 -1
- package/dist/Table/TableBody.cjs +1 -1
- package/dist/Table/TableBody.d.cts +6 -6
- package/dist/Table/TableBody.d.mts +6 -6
- package/dist/Table/TableBody.mjs +1 -1
- package/dist/Table/TableCell.cjs +1 -1
- package/dist/Table/TableCell.d.cts +1 -1
- package/dist/Table/TableCell.d.mts +1 -1
- package/dist/Table/TableCell.mjs +1 -1
- package/dist/Table/TableContainer.cjs +2 -2
- package/dist/Table/TableContainer.d.cts +5 -5
- package/dist/Table/TableContainer.d.mts +5 -5
- package/dist/Table/TableContainer.mjs +2 -2
- package/dist/Table/TableControl.cjs +1 -1
- package/dist/Table/TableControl.d.cts +7 -7
- package/dist/Table/TableControl.d.mts +7 -7
- package/dist/Table/TableControl.mjs +1 -1
- package/dist/Table/TableFooter.cjs +1 -1
- package/dist/Table/TableFooter.d.cts +6 -6
- package/dist/Table/TableFooter.d.mts +6 -6
- package/dist/Table/TableFooter.mjs +1 -1
- package/dist/Table/TableHead.cjs +1 -1
- package/dist/Table/TableHead.d.cts +6 -6
- package/dist/Table/TableHead.d.mts +6 -6
- package/dist/Table/TableHead.mjs +1 -1
- package/dist/Table/TablePagination.cjs +3 -3
- package/dist/Table/TablePagination.d.cts +4 -4
- package/dist/Table/TablePagination.d.mts +4 -4
- package/dist/Table/TablePagination.mjs +3 -3
- package/dist/Table/TablePaginationActions.cjs +2 -2
- package/dist/Table/TablePaginationActions.d.cts +1 -1
- package/dist/Table/TablePaginationActions.d.mts +1 -1
- package/dist/Table/TablePaginationActions.mjs +2 -2
- package/dist/Table/TableRow.cjs +1 -1
- package/dist/Table/TableRow.d.cts +7 -7
- package/dist/Table/TableRow.d.mts +7 -7
- package/dist/Table/TableRow.mjs +1 -1
- package/dist/Table/TableSortLabel.cjs +2 -2
- package/dist/Table/TableSortLabel.d.cts +1 -1
- package/dist/Table/TableSortLabel.d.mts +1 -1
- package/dist/Table/TableSortLabel.mjs +2 -2
- package/dist/Table/hooks.cjs +5 -5
- package/dist/Table/hooks.d.cts +5 -5
- package/dist/Table/hooks.d.mts +5 -5
- package/dist/Table/hooks.mjs +5 -5
- package/dist/Table.d.cts +5 -5
- package/dist/Table.d.mts +5 -5
- package/dist/{TableContext-BoOxdk8p.d.cts → TableContext-BrIREKe7.d.mts} +2 -2
- package/dist/{TableContext-DV31j6HO.d.mts → TableContext-DXzUQ4-a.d.cts} +2 -2
- package/dist/TextInput.cjs +2 -2
- package/dist/TextInput.d.cts +10 -10
- package/dist/TextInput.d.mts +10 -10
- package/dist/TextInput.mjs +2 -2
- package/dist/ToggleButton/ToggleButton.cjs +2 -2
- package/dist/ToggleButton/ToggleButton.d.cts +3 -3
- package/dist/ToggleButton/ToggleButton.d.mts +3 -3
- package/dist/ToggleButton/ToggleButton.mjs +2 -2
- package/dist/ToggleButton/ToggleButtonGroup.cjs +3 -3
- package/dist/ToggleButton/ToggleButtonGroup.d.cts +4 -4
- package/dist/ToggleButton/ToggleButtonGroup.d.mts +4 -4
- package/dist/ToggleButton/ToggleButtonGroup.mjs +3 -3
- package/dist/ToggleButton.d.cts +1 -1
- package/dist/ToggleButton.d.mts +1 -1
- package/dist/{ToggleButtonGroupContext-CqD-Afho.d.cts → ToggleButtonGroupContext-10jEsQdg.d.cts} +2 -2
- package/dist/{ToggleButtonGroupContext-CqD-Afho.d.mts → ToggleButtonGroupContext-10jEsQdg.d.mts} +2 -2
- package/dist/Typography.cjs +2 -2
- package/dist/Typography.d.cts +2 -2
- package/dist/Typography.d.mts +2 -2
- package/dist/Typography.mjs +2 -2
- package/dist/View.cjs +1 -1
- package/dist/View.d.cts +1 -1
- package/dist/View.d.mts +1 -1
- package/dist/View.mjs +1 -1
- package/dist/engine.cjs +2 -2
- package/dist/engine.d.cts +3 -3
- package/dist/engine.d.mts +3 -3
- package/dist/engine.mjs +2 -2
- package/dist/index-76XH-GEc.d.mts +250 -0
- package/dist/{index-BW-9sqFG.d.cts → index-BCvkP5R1.d.mts} +6 -6
- package/dist/{index-CohsoGjZ.d.cts → index-BWECJgSb.d.mts} +7 -7
- package/dist/{index-X4STXeE2.d.cts → index-BoIi-XoB.d.mts} +15 -15
- package/dist/{index-D07y72Xr.d.mts → index-Br2gDSme.d.cts} +8 -8
- package/dist/{index-m9jUR509.d.mts → index-Btmdtbpb.d.cts} +9 -9
- package/dist/{index-uH0EeDBZ.d.cts → index-C-2VKPcp.d.mts} +12 -12
- package/dist/{index-CbGfrKZi.d.mts → index-C5-ZM7lt.d.cts} +7 -7
- package/dist/{index-DfhMdqqI.d.mts → index-CHRAYSwH.d.cts} +15 -15
- package/dist/{index-CrXLEJO4.d.mts → index-COYxtrc0.d.mts} +8 -8
- package/dist/{index-CTYZyQ2g.d.mts → index-CTVFwvju.d.mts} +3 -3
- package/dist/{index-CKz1lEdR.d.mts → index-Cf7w9Lod.d.cts} +6 -6
- package/dist/{index-DxBKLmUS.d.mts → index-Csp1Wzbz.d.cts} +7 -7
- package/dist/{index-BBWtMvkm.d.cts → index-D-QRCHiS.d.cts} +3 -3
- package/dist/{index-MsUtFRul.d.cts → index-D3iQQ0L3.d.cts} +3 -3
- package/dist/{index-DEEHBUUZ.d.cts → index-D9CwTcnr.d.cts} +4 -4
- package/dist/index-DCu7qjpa.d.cts +250 -0
- package/dist/{index-DLUE7t3O.d.cts → index-DOLA1VFD.d.cts} +4 -4
- package/dist/{index-BPzvFTi5.d.cts → index-DQ16ijxx.d.mts} +9 -9
- package/dist/{index-3hPS6Lm8.d.mts → index-DdBeSvit.d.mts} +8 -8
- package/dist/{index-BYYEoNec.d.cts → index-DhMAwR96.d.mts} +7 -7
- package/dist/{index-CSXMCqrV.d.cts → index-DzuXwDCW.d.cts} +8 -8
- package/dist/{index-n2OyTMr6.d.mts → index-KZKeZDAF.d.mts} +4 -4
- package/dist/{index-BoOs5h_b.d.mts → index-NBVilQuP.d.mts} +3 -3
- package/dist/{index-BAfSyQaP.d.mts → index-Oxx0z4dS.d.cts} +12 -12
- package/dist/{index-DGku7hLP.d.mts → index-XZDPGJ_h.d.mts} +4 -4
- package/dist/{index-CiShdd2j.d.cts → index-d6gR2x8j.d.cts} +8 -8
- package/dist/{index-C1hP7Igl.d.mts → index-ggLhNdZV.d.mts} +5 -5
- package/dist/{index-CCfnnT2l.d.cts → index-h36rcOy8.d.mts} +8 -8
- package/dist/{index-2QPYJgCl.d.cts → index-jmy5eXpx.d.cts} +7 -7
- package/dist/{index-q9peil7T.d.mts → index-v_otepCe.d.mts} +7 -7
- package/dist/{index-DiLm48XP.d.cts → index-vuPAf55D.d.cts} +5 -5
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{src-D3tHU94W.mjs → src-DLGYOJMh.mjs} +1 -1
- package/dist/{src-BJrcLd7P.cjs → src-DU81aGy9.cjs} +1 -1
- package/dist/style.cjs +1 -1
- package/dist/style.d.cts +2 -2
- package/dist/style.d.mts +2 -2
- package/dist/style.mjs +1 -1
- package/dist/{theme-CleLAV6A.cjs → theme-Bnc03K83.cjs} +4 -4
- package/dist/{theme-Cudynq5K.mjs → theme-BuqqFbsz.mjs} +4 -4
- package/dist/theme.cjs +1 -1
- package/dist/theme.d.cts +2 -2
- package/dist/theme.d.mts +2 -2
- package/dist/theme.mjs +1 -1
- package/dist/{themes-CUV79qWU.d.mts → themes-kbuYiwCi.d.cts} +20 -20
- package/dist/{themes-CUV79qWU.d.cts → themes-kbuYiwCi.d.mts} +20 -20
- package/dist/{useTablePagination-DOty8Ucb.d.mts → useTablePagination-BpMOVLsR.d.cts} +6 -6
- package/dist/{useTablePagination-Dh7o59Wt.d.cts → useTablePagination-DebYZ6vN.d.mts} +6 -6
- package/package.json +15 -15
- package/dist/index-BjLlSr2P.d.mts +0 -79
- package/dist/index-Borai-Wg.d.cts +0 -79
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("../src-
|
|
2
|
+
const require_src = require("../src-DU81aGy9.cjs");
|
|
3
3
|
const require_Typography = require("../Typography.cjs");
|
|
4
4
|
const require_NativeSelect = require("../NativeSelect.cjs");
|
|
5
5
|
const require_Table_TableCell = require("./TableCell.cjs");
|
|
@@ -14,7 +14,7 @@ const DEFAULT_ROWS_PER_PAGE_OPTIONS = [
|
|
|
14
14
|
100
|
|
15
15
|
];
|
|
16
16
|
const defaultDisplayedRowsLabel = ({ from, to, count }) => {
|
|
17
|
-
return `${from}
|
|
17
|
+
return `${from}-${to} of ${count !== -1 ? count : `more than ${to}`}`;
|
|
18
18
|
};
|
|
19
19
|
const defaultGetItemAriaLabel = (type) => `Go to ${type} page`;
|
|
20
20
|
const Toolbar = require_src.styled("div", {
|
|
@@ -29,7 +29,7 @@ const Toolbar = require_src.styled("div", {
|
|
|
29
29
|
});
|
|
30
30
|
/**
|
|
31
31
|
* A `TableCell`-based pagination control for `TableFooter > TableRow`.
|
|
32
|
-
* Controlled only
|
|
32
|
+
* Controlled only - the consumer owns `page` and `rowsPerPage`.
|
|
33
33
|
*/
|
|
34
34
|
function TablePagination({ count, page, rowsPerPage, onPageChange, onRowsPerPageChange, rowsPerPageOptions = DEFAULT_ROWS_PER_PAGE_OPTIONS, disabled = false, shouldShowFirstButton = false, shouldShowLastButton = false, rowsPerPageLabel = "Rows per page:", displayedRowsLabel = defaultDisplayedRowsLabel, getItemAriaLabel = defaultGetItemAriaLabel, colSpan = 1e3, as, ...rest }) {
|
|
35
35
|
const selectOptions = rowsPerPageOptions.map((option) => typeof option === "number" ? {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as TableCellProps } from "../index-
|
|
2
|
-
import { t as TablePaginationActionType } from "../index-
|
|
1
|
+
import { o as TableCellProps } from "../index-CHRAYSwH.cjs";
|
|
2
|
+
import { t as TablePaginationActionType } from "../index-D9CwTcnr.cjs";
|
|
3
3
|
import { ElementType, ReactNode } from "react";
|
|
4
4
|
//#region src/Table/TablePagination/TablePagination.d.ts
|
|
5
5
|
interface TablePaginationDisplayedRowsInfo {
|
|
@@ -30,7 +30,7 @@ interface TablePaginationProps extends Omit<TableCellProps, 'children' | 'varian
|
|
|
30
30
|
shouldShowLastButton?: boolean;
|
|
31
31
|
/** Label for the rows-per-page selector. Default: `'Rows per page:'`. */
|
|
32
32
|
rowsPerPageLabel?: ReactNode;
|
|
33
|
-
/** Renders the displayed-rows range. A sensible default (`1
|
|
33
|
+
/** Renders the displayed-rows range. A sensible default (`1-10 of 57`) is provided. */
|
|
34
34
|
displayedRowsLabel?: (info: TablePaginationDisplayedRowsInfo) => ReactNode;
|
|
35
35
|
/** Accessible name per nav button. A sensible default is provided. */
|
|
36
36
|
getItemAriaLabel?: (type: TablePaginationActionType) => string;
|
|
@@ -38,7 +38,7 @@ interface TablePaginationProps extends Omit<TableCellProps, 'children' | 'varian
|
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* A `TableCell`-based pagination control for `TableFooter > TableRow`.
|
|
41
|
-
* Controlled only
|
|
41
|
+
* Controlled only - the consumer owns `page` and `rowsPerPage`.
|
|
42
42
|
*/
|
|
43
43
|
declare function TablePagination({ count, page, rowsPerPage, onPageChange, onRowsPerPageChange, rowsPerPageOptions, disabled, shouldShowFirstButton, shouldShowLastButton, rowsPerPageLabel, displayedRowsLabel, getItemAriaLabel, colSpan, as, ...rest }: Readonly<TablePaginationProps>): import("react").JSX.Element;
|
|
44
44
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as TableCellProps } from "../index-
|
|
2
|
-
import { t as TablePaginationActionType } from "../index-
|
|
1
|
+
import { o as TableCellProps } from "../index-BoIi-XoB.mjs";
|
|
2
|
+
import { t as TablePaginationActionType } from "../index-XZDPGJ_h.mjs";
|
|
3
3
|
import { ElementType, ReactNode } from "react";
|
|
4
4
|
//#region src/Table/TablePagination/TablePagination.d.ts
|
|
5
5
|
interface TablePaginationDisplayedRowsInfo {
|
|
@@ -30,7 +30,7 @@ interface TablePaginationProps extends Omit<TableCellProps, 'children' | 'varian
|
|
|
30
30
|
shouldShowLastButton?: boolean;
|
|
31
31
|
/** Label for the rows-per-page selector. Default: `'Rows per page:'`. */
|
|
32
32
|
rowsPerPageLabel?: ReactNode;
|
|
33
|
-
/** Renders the displayed-rows range. A sensible default (`1
|
|
33
|
+
/** Renders the displayed-rows range. A sensible default (`1-10 of 57`) is provided. */
|
|
34
34
|
displayedRowsLabel?: (info: TablePaginationDisplayedRowsInfo) => ReactNode;
|
|
35
35
|
/** Accessible name per nav button. A sensible default is provided. */
|
|
36
36
|
getItemAriaLabel?: (type: TablePaginationActionType) => string;
|
|
@@ -38,7 +38,7 @@ interface TablePaginationProps extends Omit<TableCellProps, 'children' | 'varian
|
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* A `TableCell`-based pagination control for `TableFooter > TableRow`.
|
|
41
|
-
* Controlled only
|
|
41
|
+
* Controlled only - the consumer owns `page` and `rowsPerPage`.
|
|
42
42
|
*/
|
|
43
43
|
declare function TablePagination({ count, page, rowsPerPage, onPageChange, onRowsPerPageChange, rowsPerPageOptions, disabled, shouldShowFirstButton, shouldShowLastButton, rowsPerPageLabel, displayedRowsLabel, getItemAriaLabel, colSpan, as, ...rest }: Readonly<TablePaginationProps>): import("react").JSX.Element;
|
|
44
44
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as styled } from "../src-
|
|
1
|
+
import { o as styled } from "../src-DLGYOJMh.mjs";
|
|
2
2
|
import { Typography } from "../Typography.mjs";
|
|
3
3
|
import { NativeSelect } from "../NativeSelect.mjs";
|
|
4
4
|
import { TableCell } from "./TableCell.mjs";
|
|
@@ -13,7 +13,7 @@ const DEFAULT_ROWS_PER_PAGE_OPTIONS = [
|
|
|
13
13
|
100
|
|
14
14
|
];
|
|
15
15
|
const defaultDisplayedRowsLabel = ({ from, to, count }) => {
|
|
16
|
-
return `${from}
|
|
16
|
+
return `${from}-${to} of ${count !== -1 ? count : `more than ${to}`}`;
|
|
17
17
|
};
|
|
18
18
|
const defaultGetItemAriaLabel = (type) => `Go to ${type} page`;
|
|
19
19
|
const Toolbar = styled("div", {
|
|
@@ -28,7 +28,7 @@ const Toolbar = styled("div", {
|
|
|
28
28
|
});
|
|
29
29
|
/**
|
|
30
30
|
* A `TableCell`-based pagination control for `TableFooter > TableRow`.
|
|
31
|
-
* Controlled only
|
|
31
|
+
* Controlled only - the consumer owns `page` and `rowsPerPage`.
|
|
32
32
|
*/
|
|
33
33
|
function TablePagination({ count, page, rowsPerPage, onPageChange, onRowsPerPageChange, rowsPerPageOptions = DEFAULT_ROWS_PER_PAGE_OPTIONS, disabled = false, shouldShowFirstButton = false, shouldShowLastButton = false, rowsPerPageLabel = "Rows per page:", displayedRowsLabel = defaultDisplayedRowsLabel, getItemAriaLabel = defaultGetItemAriaLabel, colSpan = 1e3, as, ...rest }) {
|
|
34
34
|
const selectOptions = rowsPerPageOptions.map((option) => typeof option === "number" ? {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("../src-
|
|
2
|
+
const require_src = require("../src-DU81aGy9.cjs");
|
|
3
3
|
const require_themeDefault = require("../themeDefault-Cebi08Cv.cjs");
|
|
4
|
-
const require_theme = require("../theme-
|
|
4
|
+
const require_theme = require("../theme-Bnc03K83.cjs");
|
|
5
5
|
const require_Pagination_PaginationItem = require("../Pagination/PaginationItem.cjs");
|
|
6
6
|
require("react");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TablePaginationActions, r as TablePaginationActionsProps, t as TablePaginationActionType } from "../index-
|
|
1
|
+
import { n as TablePaginationActions, r as TablePaginationActionsProps, t as TablePaginationActionType } from "../index-D9CwTcnr.cjs";
|
|
2
2
|
export { TablePaginationActionType, TablePaginationActions, TablePaginationActionsProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TablePaginationActions, r as TablePaginationActionsProps, t as TablePaginationActionType } from "../index-
|
|
1
|
+
import { n as TablePaginationActions, r as TablePaginationActionsProps, t as TablePaginationActionType } from "../index-XZDPGJ_h.mjs";
|
|
2
2
|
export { TablePaginationActionType, TablePaginationActions, TablePaginationActionsProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as styled } from "../src-
|
|
1
|
+
import { o as styled } from "../src-DLGYOJMh.mjs";
|
|
2
2
|
import { t as themeDefault } from "../themeDefault-Z3KmyIbm.mjs";
|
|
3
|
-
import { r as useTheme } from "../theme-
|
|
3
|
+
import { r as useTheme } from "../theme-BuqqFbsz.mjs";
|
|
4
4
|
import { PaginationItem } from "../Pagination/PaginationItem.mjs";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/dist/Table/TableRow.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("../src-
|
|
2
|
+
const require_src = require("../src-DU81aGy9.cjs");
|
|
3
3
|
const require_themeDefault = require("../themeDefault-Cebi08Cv.cjs");
|
|
4
4
|
const require_TableContext = require("../TableContext-Bfg1C3Sr.cjs");
|
|
5
5
|
let react = require("react");
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { d as PaletteColor, h as Theme } from "../themes-
|
|
2
|
-
import "../index-
|
|
1
|
+
import { d as PaletteColor, h as Theme } from "../themes-kbuYiwCi.cjs";
|
|
2
|
+
import "../index-jmy5eXpx.cjs";
|
|
3
3
|
import { ElementType, HTMLAttributes } from "react";
|
|
4
4
|
import { BorderProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
//#region src/Table/TableRow/TableRow.d.ts
|
|
6
|
-
/** Palette color driving the hover/selected shading
|
|
6
|
+
/** Palette color driving the hover/selected shading - a `theme.palette` key. */
|
|
7
7
|
type TableRowColor = PaletteColor;
|
|
8
|
-
/** Valid values for the bg prop
|
|
8
|
+
/** Valid values for the bg prop - derived from theme.background keys. */
|
|
9
9
|
type TableRowBackgroundToken = keyof Theme['background'];
|
|
10
|
-
/** Valid values for the borderColor prop
|
|
10
|
+
/** Valid values for the borderColor prop - derived from theme.border keys. */
|
|
11
11
|
type TableRowBorderColorToken = keyof Theme['border'];
|
|
12
12
|
interface TableRowProps extends Omit<HTMLAttributes<HTMLTableRowElement>, 'color'>, SpaceProps<Theme>, Omit<BorderProps<Theme>, 'borderColor' | 'borderRadius'> {
|
|
13
13
|
/**
|
|
14
|
-
* Palette color for the hover/selected shading
|
|
14
|
+
* Palette color for the hover/selected shading - maps to `theme.palette[color]`
|
|
15
15
|
* (hover → `.light`, selected → `.dark`, both with `contrastText`). Falls back
|
|
16
16
|
* to the enclosing `Table`'s `color`. Default: 'primary', overridable via `theme.defaults.color`.
|
|
17
17
|
*/
|
|
@@ -19,7 +19,7 @@ interface TableRowProps extends Omit<HTMLAttributes<HTMLTableRowElement>, 'color
|
|
|
19
19
|
as?: ElementType;
|
|
20
20
|
/** Resolves against theme.background */
|
|
21
21
|
bg?: TableRowBackgroundToken;
|
|
22
|
-
/** Resolves against theme.border
|
|
22
|
+
/** Resolves against theme.border - light · primary · dark */
|
|
23
23
|
borderColor?: TableRowBorderColorToken;
|
|
24
24
|
/** Shades the row on hover with `theme.palette[color].light`. Default: `false`. */
|
|
25
25
|
isHoverable?: boolean;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { d as PaletteColor, h as Theme } from "../themes-
|
|
2
|
-
import "../index-
|
|
1
|
+
import { d as PaletteColor, h as Theme } from "../themes-kbuYiwCi.mjs";
|
|
2
|
+
import "../index-v_otepCe.mjs";
|
|
3
3
|
import { BorderProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
4
4
|
import { ElementType, HTMLAttributes } from "react";
|
|
5
5
|
//#region src/Table/TableRow/TableRow.d.ts
|
|
6
|
-
/** Palette color driving the hover/selected shading
|
|
6
|
+
/** Palette color driving the hover/selected shading - a `theme.palette` key. */
|
|
7
7
|
type TableRowColor = PaletteColor;
|
|
8
|
-
/** Valid values for the bg prop
|
|
8
|
+
/** Valid values for the bg prop - derived from theme.background keys. */
|
|
9
9
|
type TableRowBackgroundToken = keyof Theme['background'];
|
|
10
|
-
/** Valid values for the borderColor prop
|
|
10
|
+
/** Valid values for the borderColor prop - derived from theme.border keys. */
|
|
11
11
|
type TableRowBorderColorToken = keyof Theme['border'];
|
|
12
12
|
interface TableRowProps extends Omit<HTMLAttributes<HTMLTableRowElement>, 'color'>, SpaceProps<Theme>, Omit<BorderProps<Theme>, 'borderColor' | 'borderRadius'> {
|
|
13
13
|
/**
|
|
14
|
-
* Palette color for the hover/selected shading
|
|
14
|
+
* Palette color for the hover/selected shading - maps to `theme.palette[color]`
|
|
15
15
|
* (hover → `.light`, selected → `.dark`, both with `contrastText`). Falls back
|
|
16
16
|
* to the enclosing `Table`'s `color`. Default: 'primary', overridable via `theme.defaults.color`.
|
|
17
17
|
*/
|
|
@@ -19,7 +19,7 @@ interface TableRowProps extends Omit<HTMLAttributes<HTMLTableRowElement>, 'color
|
|
|
19
19
|
as?: ElementType;
|
|
20
20
|
/** Resolves against theme.background */
|
|
21
21
|
bg?: TableRowBackgroundToken;
|
|
22
|
-
/** Resolves against theme.border
|
|
22
|
+
/** Resolves against theme.border - light · primary · dark */
|
|
23
23
|
borderColor?: TableRowBorderColorToken;
|
|
24
24
|
/** Shades the row on hover with `theme.palette[color].light`. Default: `false`. */
|
|
25
25
|
isHoverable?: boolean;
|
package/dist/Table/TableRow.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "../src-
|
|
1
|
+
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "../src-DLGYOJMh.mjs";
|
|
2
2
|
import { t as themeDefault } from "../themeDefault-Z3KmyIbm.mjs";
|
|
3
3
|
import { t as TableContext } from "../TableContext-Dyr89h_k.mjs";
|
|
4
4
|
import { useContext } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("../src-
|
|
3
|
-
const require_Icon = require("../Icon-
|
|
2
|
+
const require_src = require("../src-DU81aGy9.cjs");
|
|
3
|
+
const require_Icon = require("../Icon-BAMpe9SO.cjs");
|
|
4
4
|
const require_TableContext = require("../TableContext-Bfg1C3Sr.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TableSortLabelDirection, r as TableSortLabelProps, t as TableSortLabel } from "../index-
|
|
1
|
+
import { n as TableSortLabelDirection, r as TableSortLabelProps, t as TableSortLabel } from "../index-vuPAf55D.cjs";
|
|
2
2
|
export { TableSortLabel, TableSortLabelDirection, TableSortLabelProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TableSortLabelDirection, r as TableSortLabelProps, t as TableSortLabel } from "../index-
|
|
1
|
+
import { n as TableSortLabelDirection, r as TableSortLabelProps, t as TableSortLabel } from "../index-ggLhNdZV.mjs";
|
|
2
2
|
export { TableSortLabel, TableSortLabelDirection, TableSortLabelProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "../src-
|
|
2
|
-
import { t as Icon } from "../Icon-
|
|
1
|
+
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "../src-DLGYOJMh.mjs";
|
|
2
|
+
import { t as Icon } from "../Icon-gSiGgU13.mjs";
|
|
3
3
|
import { t as TableContext } from "../TableContext-Dyr89h_k.mjs";
|
|
4
4
|
import { useContext } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/dist/Table/hooks.cjs
CHANGED
|
@@ -7,7 +7,7 @@ let react = require("react");
|
|
|
7
7
|
* ```tsx
|
|
8
8
|
* const pagination = useTablePagination({ defaultRowsPerPage: 10 })
|
|
9
9
|
* <TablePagination count={data.length} {...pagination} />
|
|
10
|
-
* <TableControl data={data} pagination={pagination}>{(row) =>
|
|
10
|
+
* <TableControl data={data} pagination={pagination}>{(row) => ...}</TableControl>
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
13
|
function useTablePagination({ defaultPage = 0, defaultRowsPerPage = 10 } = {}) {
|
|
@@ -27,7 +27,7 @@ function useTablePagination({ defaultPage = 0, defaultRowsPerPage = 10 } = {}) {
|
|
|
27
27
|
//#region src/Table/hooks/useTableSelection.ts
|
|
28
28
|
const toggleKey = (selected, selectedSet, key) => selectedSet.has(key) ? selected.filter((item) => item !== key) : [...selected, key];
|
|
29
29
|
/**
|
|
30
|
-
* Key-based row selection that survives paging and re-sorting
|
|
30
|
+
* Key-based row selection that survives paging and re-sorting - selection is
|
|
31
31
|
* stored as row identities, and the select-all/indeterminate state is computed
|
|
32
32
|
* against the full `keys` list rather than the visible slice.
|
|
33
33
|
*
|
|
@@ -35,7 +35,7 @@ const toggleKey = (selected, selectedSet, key) => selectedSet.has(key) ? selecte
|
|
|
35
35
|
* const selection = useTableSelection(services.map((s) => s.service))
|
|
36
36
|
* <Checkbox {...selection.all} aria-label="Select all" />
|
|
37
37
|
* <Checkbox {...selection.row(row.service)} aria-label={`Select ${row.service}`} />
|
|
38
|
-
* <TableRow isSelected={selection.isSelected(row.service)}
|
|
38
|
+
* <TableRow isSelected={selection.isSelected(row.service)}>...</TableRow>
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
41
|
function useTableSelection(keys, onChange) {
|
|
@@ -74,13 +74,13 @@ function useTableSelection(keys, onChange) {
|
|
|
74
74
|
/**
|
|
75
75
|
* Column-keyed sort state for sortable tables. Each column remembers its own
|
|
76
76
|
* direction (initially `'asc'`); clicking a column activates it AND flips its
|
|
77
|
-
* stored direction
|
|
77
|
+
* stored direction - so the first click on a column sorts `'desc'`.
|
|
78
78
|
* `keys` is read once on mount.
|
|
79
79
|
*
|
|
80
80
|
* ```tsx
|
|
81
81
|
* const sort = useTableSort(['name', 'latency'])
|
|
82
82
|
* <TableSortLabel {...sort.name}>Service</TableSortLabel>
|
|
83
|
-
* <TableControl data={rows} sort={sort}>{(row) =>
|
|
83
|
+
* <TableControl data={rows} sort={sort}>{(row) => ...}</TableControl>
|
|
84
84
|
* ```
|
|
85
85
|
*/
|
|
86
86
|
function useTableSort(keys, onChange) {
|
package/dist/Table/hooks.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { a as TableSortMap, i as TableSortEntry, n as UseTablePaginationOptions, o as useTableSort, r as useTablePagination, t as TablePaginationState } from "../useTablePagination-
|
|
1
|
+
import { a as TableSortMap, i as TableSortEntry, n as UseTablePaginationOptions, o as useTableSort, r as useTablePagination, t as TablePaginationState } from "../useTablePagination-BpMOVLsR.cjs";
|
|
2
2
|
//#region src/Table/hooks/useTableSelection.d.ts
|
|
3
|
-
/** Header select-all state
|
|
3
|
+
/** Header select-all state - spreads directly onto `Checkbox`. */
|
|
4
4
|
interface TableSelectionAllProps {
|
|
5
5
|
checked: boolean;
|
|
6
6
|
indeterminate: boolean;
|
|
7
7
|
/** All selected → clears; otherwise selects every key. */
|
|
8
8
|
onChange: () => void;
|
|
9
9
|
}
|
|
10
|
-
/** One row's selection state
|
|
10
|
+
/** One row's selection state - spreads directly onto `Checkbox`. */
|
|
11
11
|
interface TableSelectionRowProps {
|
|
12
12
|
checked: boolean;
|
|
13
13
|
/** Toggles this key in and out of the selection. */
|
|
@@ -24,7 +24,7 @@ interface TableSelection<K extends string | number> {
|
|
|
24
24
|
clear: () => void;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* Key-based row selection that survives paging and re-sorting
|
|
27
|
+
* Key-based row selection that survives paging and re-sorting - selection is
|
|
28
28
|
* stored as row identities, and the select-all/indeterminate state is computed
|
|
29
29
|
* against the full `keys` list rather than the visible slice.
|
|
30
30
|
*
|
|
@@ -32,7 +32,7 @@ interface TableSelection<K extends string | number> {
|
|
|
32
32
|
* const selection = useTableSelection(services.map((s) => s.service))
|
|
33
33
|
* <Checkbox {...selection.all} aria-label="Select all" />
|
|
34
34
|
* <Checkbox {...selection.row(row.service)} aria-label={`Select ${row.service}`} />
|
|
35
|
-
* <TableRow isSelected={selection.isSelected(row.service)}
|
|
35
|
+
* <TableRow isSelected={selection.isSelected(row.service)}>...</TableRow>
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
38
|
declare function useTableSelection<K extends string | number>(keys: readonly K[], onChange?: (selected: K[]) => void): TableSelection<K>;
|
package/dist/Table/hooks.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { a as TableSortMap, i as TableSortEntry, n as UseTablePaginationOptions, o as useTableSort, r as useTablePagination, t as TablePaginationState } from "../useTablePagination-
|
|
1
|
+
import { a as TableSortMap, i as TableSortEntry, n as UseTablePaginationOptions, o as useTableSort, r as useTablePagination, t as TablePaginationState } from "../useTablePagination-DebYZ6vN.mjs";
|
|
2
2
|
//#region src/Table/hooks/useTableSelection.d.ts
|
|
3
|
-
/** Header select-all state
|
|
3
|
+
/** Header select-all state - spreads directly onto `Checkbox`. */
|
|
4
4
|
interface TableSelectionAllProps {
|
|
5
5
|
checked: boolean;
|
|
6
6
|
indeterminate: boolean;
|
|
7
7
|
/** All selected → clears; otherwise selects every key. */
|
|
8
8
|
onChange: () => void;
|
|
9
9
|
}
|
|
10
|
-
/** One row's selection state
|
|
10
|
+
/** One row's selection state - spreads directly onto `Checkbox`. */
|
|
11
11
|
interface TableSelectionRowProps {
|
|
12
12
|
checked: boolean;
|
|
13
13
|
/** Toggles this key in and out of the selection. */
|
|
@@ -24,7 +24,7 @@ interface TableSelection<K extends string | number> {
|
|
|
24
24
|
clear: () => void;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* Key-based row selection that survives paging and re-sorting
|
|
27
|
+
* Key-based row selection that survives paging and re-sorting - selection is
|
|
28
28
|
* stored as row identities, and the select-all/indeterminate state is computed
|
|
29
29
|
* against the full `keys` list rather than the visible slice.
|
|
30
30
|
*
|
|
@@ -32,7 +32,7 @@ interface TableSelection<K extends string | number> {
|
|
|
32
32
|
* const selection = useTableSelection(services.map((s) => s.service))
|
|
33
33
|
* <Checkbox {...selection.all} aria-label="Select all" />
|
|
34
34
|
* <Checkbox {...selection.row(row.service)} aria-label={`Select ${row.service}`} />
|
|
35
|
-
* <TableRow isSelected={selection.isSelected(row.service)}
|
|
35
|
+
* <TableRow isSelected={selection.isSelected(row.service)}>...</TableRow>
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
38
|
declare function useTableSelection<K extends string | number>(keys: readonly K[], onChange?: (selected: K[]) => void): TableSelection<K>;
|
package/dist/Table/hooks.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { useCallback, useMemo, useState } from "react";
|
|
|
6
6
|
* ```tsx
|
|
7
7
|
* const pagination = useTablePagination({ defaultRowsPerPage: 10 })
|
|
8
8
|
* <TablePagination count={data.length} {...pagination} />
|
|
9
|
-
* <TableControl data={data} pagination={pagination}>{(row) =>
|
|
9
|
+
* <TableControl data={data} pagination={pagination}>{(row) => ...}</TableControl>
|
|
10
10
|
* ```
|
|
11
11
|
*/
|
|
12
12
|
function useTablePagination({ defaultPage = 0, defaultRowsPerPage = 10 } = {}) {
|
|
@@ -26,7 +26,7 @@ function useTablePagination({ defaultPage = 0, defaultRowsPerPage = 10 } = {}) {
|
|
|
26
26
|
//#region src/Table/hooks/useTableSelection.ts
|
|
27
27
|
const toggleKey = (selected, selectedSet, key) => selectedSet.has(key) ? selected.filter((item) => item !== key) : [...selected, key];
|
|
28
28
|
/**
|
|
29
|
-
* Key-based row selection that survives paging and re-sorting
|
|
29
|
+
* Key-based row selection that survives paging and re-sorting - selection is
|
|
30
30
|
* stored as row identities, and the select-all/indeterminate state is computed
|
|
31
31
|
* against the full `keys` list rather than the visible slice.
|
|
32
32
|
*
|
|
@@ -34,7 +34,7 @@ const toggleKey = (selected, selectedSet, key) => selectedSet.has(key) ? selecte
|
|
|
34
34
|
* const selection = useTableSelection(services.map((s) => s.service))
|
|
35
35
|
* <Checkbox {...selection.all} aria-label="Select all" />
|
|
36
36
|
* <Checkbox {...selection.row(row.service)} aria-label={`Select ${row.service}`} />
|
|
37
|
-
* <TableRow isSelected={selection.isSelected(row.service)}
|
|
37
|
+
* <TableRow isSelected={selection.isSelected(row.service)}>...</TableRow>
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
40
|
function useTableSelection(keys, onChange) {
|
|
@@ -73,13 +73,13 @@ function useTableSelection(keys, onChange) {
|
|
|
73
73
|
/**
|
|
74
74
|
* Column-keyed sort state for sortable tables. Each column remembers its own
|
|
75
75
|
* direction (initially `'asc'`); clicking a column activates it AND flips its
|
|
76
|
-
* stored direction
|
|
76
|
+
* stored direction - so the first click on a column sorts `'desc'`.
|
|
77
77
|
* `keys` is read once on mount.
|
|
78
78
|
*
|
|
79
79
|
* ```tsx
|
|
80
80
|
* const sort = useTableSort(['name', 'latency'])
|
|
81
81
|
* <TableSortLabel {...sort.name}>Service</TableSortLabel>
|
|
82
|
-
* <TableControl data={rows} sort={sort}>{(row) =>
|
|
82
|
+
* <TableControl data={rows} sort={sort}>{(row) => ...}</TableControl>
|
|
83
83
|
* ```
|
|
84
84
|
*/
|
|
85
85
|
function useTableSort(keys, onChange) {
|
package/dist/Table.d.cts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { n as TableContext, r as TableContextValue, t as TableCellPadding } from "./TableContext-
|
|
1
|
+
import { n as TableContext, r as TableContextValue, t as TableCellPadding } from "./TableContext-DXzUQ4-a.cjs";
|
|
2
2
|
import { Table, TableAlign, TableBackgroundToken, TableBorderColorToken, TableProps, TableSize } from "./Table/Table.cjs";
|
|
3
3
|
import { TableBody, TableBodyBackgroundToken, TableBodyBorderColorToken, TableBodyColorToken, TableBodyProps } from "./Table/TableBody.cjs";
|
|
4
|
-
import { a as TableCellColorToken, c as TableCellVariant, i as TableCellBorderColorToken, l as TableSection, n as TableCellAlign, o as TableCellProps, r as TableCellBackgroundToken, s as TableCellSortDirection, t as TableCell, u as TableSectionContext } from "./index-
|
|
4
|
+
import { a as TableCellColorToken, c as TableCellVariant, i as TableCellBorderColorToken, l as TableSection, n as TableCellAlign, o as TableCellProps, r as TableCellBackgroundToken, s as TableCellSortDirection, t as TableCell, u as TableSectionContext } from "./index-CHRAYSwH.cjs";
|
|
5
5
|
import { TableContainer, TableContainerProps } from "./Table/TableContainer.cjs";
|
|
6
|
-
import { n as TableSortLabelDirection, r as TableSortLabelProps, t as TableSortLabel } from "./index-
|
|
7
|
-
import { a as TableSortMap, i as TableSortEntry, n as UseTablePaginationOptions, o as useTableSort, r as useTablePagination, t as TablePaginationState } from "./useTablePagination-
|
|
6
|
+
import { n as TableSortLabelDirection, r as TableSortLabelProps, t as TableSortLabel } from "./index-vuPAf55D.cjs";
|
|
7
|
+
import { a as TableSortMap, i as TableSortEntry, n as UseTablePaginationOptions, o as useTableSort, r as useTablePagination, t as TablePaginationState } from "./useTablePagination-BpMOVLsR.cjs";
|
|
8
8
|
import { TableControl, TableControlProps } from "./Table/TableControl.cjs";
|
|
9
9
|
import { TableFooter, TableFooterBackgroundToken, TableFooterBorderColorToken, TableFooterColorToken, TableFooterProps } from "./Table/TableFooter.cjs";
|
|
10
10
|
import { TableHead, TableHeadBackgroundToken, TableHeadBorderColorToken, TableHeadColorToken, TableHeadProps } from "./Table/TableHead.cjs";
|
|
11
|
-
import { n as TablePaginationActions, r as TablePaginationActionsProps, t as TablePaginationActionType } from "./index-
|
|
11
|
+
import { n as TablePaginationActions, r as TablePaginationActionsProps, t as TablePaginationActionType } from "./index-D9CwTcnr.cjs";
|
|
12
12
|
import { TablePagination, TablePaginationDisplayedRowsInfo, TablePaginationProps } from "./Table/TablePagination.cjs";
|
|
13
13
|
import { TableRow, TableRowBackgroundToken, TableRowBorderColorToken, TableRowColor, TableRowProps } from "./Table/TableRow.cjs";
|
|
14
14
|
import { TableSelection, TableSelectionAllProps, TableSelectionRowProps, useTableSelection } from "./Table/hooks.cjs";
|
package/dist/Table.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { n as TableContext, r as TableContextValue, t as TableCellPadding } from "./TableContext-
|
|
1
|
+
import { n as TableContext, r as TableContextValue, t as TableCellPadding } from "./TableContext-BrIREKe7.mjs";
|
|
2
2
|
import { Table, TableAlign, TableBackgroundToken, TableBorderColorToken, TableProps, TableSize } from "./Table/Table.mjs";
|
|
3
3
|
import { TableBody, TableBodyBackgroundToken, TableBodyBorderColorToken, TableBodyColorToken, TableBodyProps } from "./Table/TableBody.mjs";
|
|
4
|
-
import { a as TableCellColorToken, c as TableCellVariant, i as TableCellBorderColorToken, l as TableSection, n as TableCellAlign, o as TableCellProps, r as TableCellBackgroundToken, s as TableCellSortDirection, t as TableCell, u as TableSectionContext } from "./index-
|
|
4
|
+
import { a as TableCellColorToken, c as TableCellVariant, i as TableCellBorderColorToken, l as TableSection, n as TableCellAlign, o as TableCellProps, r as TableCellBackgroundToken, s as TableCellSortDirection, t as TableCell, u as TableSectionContext } from "./index-BoIi-XoB.mjs";
|
|
5
5
|
import { TableContainer, TableContainerProps } from "./Table/TableContainer.mjs";
|
|
6
|
-
import { n as TableSortLabelDirection, r as TableSortLabelProps, t as TableSortLabel } from "./index-
|
|
7
|
-
import { a as TableSortMap, i as TableSortEntry, n as UseTablePaginationOptions, o as useTableSort, r as useTablePagination, t as TablePaginationState } from "./useTablePagination-
|
|
6
|
+
import { n as TableSortLabelDirection, r as TableSortLabelProps, t as TableSortLabel } from "./index-ggLhNdZV.mjs";
|
|
7
|
+
import { a as TableSortMap, i as TableSortEntry, n as UseTablePaginationOptions, o as useTableSort, r as useTablePagination, t as TablePaginationState } from "./useTablePagination-DebYZ6vN.mjs";
|
|
8
8
|
import { TableControl, TableControlProps } from "./Table/TableControl.mjs";
|
|
9
9
|
import { TableFooter, TableFooterBackgroundToken, TableFooterBorderColorToken, TableFooterColorToken, TableFooterProps } from "./Table/TableFooter.mjs";
|
|
10
10
|
import { TableHead, TableHeadBackgroundToken, TableHeadBorderColorToken, TableHeadColorToken, TableHeadProps } from "./Table/TableHead.mjs";
|
|
11
|
-
import { n as TablePaginationActions, r as TablePaginationActionsProps, t as TablePaginationActionType } from "./index-
|
|
11
|
+
import { n as TablePaginationActions, r as TablePaginationActionsProps, t as TablePaginationActionType } from "./index-XZDPGJ_h.mjs";
|
|
12
12
|
import { TablePagination, TablePaginationDisplayedRowsInfo, TablePaginationProps } from "./Table/TablePagination.mjs";
|
|
13
13
|
import { TableRow, TableRowBackgroundToken, TableRowBorderColorToken, TableRowColor, TableRowProps } from "./Table/TableRow.mjs";
|
|
14
14
|
import { TableSelection, TableSelectionAllProps, TableSelectionRowProps, useTableSelection } from "./Table/hooks.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as Theme } from "./themes-
|
|
1
|
+
import { h as Theme } from "./themes-kbuYiwCi.mjs";
|
|
2
2
|
//#region src/Table/TableContext.d.ts
|
|
3
3
|
/** Cell padding modes broadcast from `Table` to descendant cells. */
|
|
4
4
|
type TableCellPadding = 'normal' | 'none';
|
|
@@ -7,7 +7,7 @@ interface TableContextValue {
|
|
|
7
7
|
size?: keyof Theme['sizes'];
|
|
8
8
|
cellPadding?: TableCellPadding;
|
|
9
9
|
hasStickyHeader?: boolean;
|
|
10
|
-
/** Palette color for descendant rows' hover/selected shading
|
|
10
|
+
/** Palette color for descendant rows' hover/selected shading - a row's own `color` wins. */
|
|
11
11
|
color?: keyof Theme['palette'];
|
|
12
12
|
/** Hides inactive sort icons (revealed on hover/focus). */
|
|
13
13
|
shouldHideSortIcon?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as Theme } from "./themes-
|
|
1
|
+
import { h as Theme } from "./themes-kbuYiwCi.cjs";
|
|
2
2
|
//#region src/Table/TableContext.d.ts
|
|
3
3
|
/** Cell padding modes broadcast from `Table` to descendant cells. */
|
|
4
4
|
type TableCellPadding = 'normal' | 'none';
|
|
@@ -7,7 +7,7 @@ interface TableContextValue {
|
|
|
7
7
|
size?: keyof Theme['sizes'];
|
|
8
8
|
cellPadding?: TableCellPadding;
|
|
9
9
|
hasStickyHeader?: boolean;
|
|
10
|
-
/** Palette color for descendant rows' hover/selected shading
|
|
10
|
+
/** Palette color for descendant rows' hover/selected shading - a row's own `color` wins. */
|
|
11
11
|
color?: keyof Theme['palette'];
|
|
12
12
|
/** Hides inactive sort icons (revealed on hover/focus). */
|
|
13
13
|
shouldHideSortIcon?: boolean;
|
package/dist/TextInput.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("./src-
|
|
2
|
+
const require_src = require("./src-DU81aGy9.cjs");
|
|
3
3
|
const require_themeDefault = require("./themeDefault-Cebi08Cv.cjs");
|
|
4
|
-
const require_theme = require("./theme-
|
|
4
|
+
const require_theme = require("./theme-Bnc03K83.cjs");
|
|
5
5
|
const require_FormControl = require("./FormControl.cjs");
|
|
6
6
|
const require_inputVariantStyles = require("./inputVariantStyles-BBkkYQtE.cjs");
|
|
7
7
|
let react = require("react");
|
package/dist/TextInput.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as Theme } from "./themes-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { h as Theme } from "./themes-kbuYiwCi.cjs";
|
|
2
|
+
import "./index-jmy5eXpx.cjs";
|
|
3
3
|
import { ChangeEventHandler, ElementType, InputHTMLAttributes, TextareaHTMLAttributes } from "react";
|
|
4
4
|
import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
//#region src/TextInput/TextInput.d.ts
|
|
@@ -12,7 +12,7 @@ interface TextInputClasses {
|
|
|
12
12
|
input?: string;
|
|
13
13
|
}
|
|
14
14
|
interface TextInputProps extends SpaceProps<Theme>, Pick<LayoutProps<Theme>, 'width' | 'minWidth' | 'maxWidth'> {
|
|
15
|
-
/** Corner radius
|
|
15
|
+
/** Corner radius - applies only to `default` and `outlined` variants. Resolves against `theme.radii`. */
|
|
16
16
|
borderRadius?: keyof Theme['radii'];
|
|
17
17
|
autoComplete?: string;
|
|
18
18
|
autoFocus?: boolean;
|
|
@@ -23,20 +23,20 @@ interface TextInputProps extends SpaceProps<Theme>, Pick<LayoutProps<Theme>, 'wi
|
|
|
23
23
|
Input?: ElementType;
|
|
24
24
|
Root?: ElementType;
|
|
25
25
|
};
|
|
26
|
-
/** Focus/active border color
|
|
26
|
+
/** Focus/active border color - resolves to `theme.palette[color].main`. Default: 'primary', overridable via `theme.defaults.color`. */
|
|
27
27
|
color?: TextInputColor;
|
|
28
|
-
/** Text color of the typed value
|
|
28
|
+
/** Text color of the typed value - resolves against `theme.text`. Default: 'primary', overridable via `theme.defaults.accentTextColor`. */
|
|
29
29
|
textColor?: TextInputTextColor;
|
|
30
30
|
/** Disables the input. */
|
|
31
31
|
disabled?: boolean;
|
|
32
|
-
/** Marks the field as invalid
|
|
32
|
+
/** Marks the field as invalid - applies error border color. */
|
|
33
33
|
error?: boolean;
|
|
34
34
|
/** Stretches the root to fill its container. */
|
|
35
35
|
fullWidth?: boolean;
|
|
36
36
|
id?: string;
|
|
37
37
|
/** Custom component for the input element. Takes priority over `components.Input`. Default: `'input'`. */
|
|
38
38
|
inputComponent?: ElementType;
|
|
39
|
-
/** Native HTML `size` attribute
|
|
39
|
+
/** Native HTML `size` attribute - visible width in character widths. Has no effect with `multiline` or `resize`. */
|
|
40
40
|
inputSize?: number;
|
|
41
41
|
/** Extra props spread onto the native element. Explicit top-level props take priority. */
|
|
42
42
|
inputProps?: InputHTMLAttributes<HTMLInputElement> & TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
@@ -67,9 +67,9 @@ interface TextInputProps extends SpaceProps<Theme>, Pick<LayoutProps<Theme>, 'wi
|
|
|
67
67
|
type?: string;
|
|
68
68
|
/**
|
|
69
69
|
* Visual style of the input.
|
|
70
|
-
* - `outlined` / `default`
|
|
71
|
-
* - `underline`
|
|
72
|
-
* - `text`
|
|
70
|
+
* - `outlined` / `default` - full border box (default)
|
|
71
|
+
* - `underline` - border on bottom only
|
|
72
|
+
* - `text` - no border, transparent background
|
|
73
73
|
*/
|
|
74
74
|
variant?: TextInputVariant;
|
|
75
75
|
value?: string | number | readonly string[];
|
package/dist/TextInput.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as Theme } from "./themes-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { h as Theme } from "./themes-kbuYiwCi.mjs";
|
|
2
|
+
import "./index-v_otepCe.mjs";
|
|
3
3
|
import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
4
4
|
import { ChangeEventHandler, ElementType, InputHTMLAttributes, TextareaHTMLAttributes } from "react";
|
|
5
5
|
//#region src/TextInput/TextInput.d.ts
|
|
@@ -12,7 +12,7 @@ interface TextInputClasses {
|
|
|
12
12
|
input?: string;
|
|
13
13
|
}
|
|
14
14
|
interface TextInputProps extends SpaceProps<Theme>, Pick<LayoutProps<Theme>, 'width' | 'minWidth' | 'maxWidth'> {
|
|
15
|
-
/** Corner radius
|
|
15
|
+
/** Corner radius - applies only to `default` and `outlined` variants. Resolves against `theme.radii`. */
|
|
16
16
|
borderRadius?: keyof Theme['radii'];
|
|
17
17
|
autoComplete?: string;
|
|
18
18
|
autoFocus?: boolean;
|
|
@@ -23,20 +23,20 @@ interface TextInputProps extends SpaceProps<Theme>, Pick<LayoutProps<Theme>, 'wi
|
|
|
23
23
|
Input?: ElementType;
|
|
24
24
|
Root?: ElementType;
|
|
25
25
|
};
|
|
26
|
-
/** Focus/active border color
|
|
26
|
+
/** Focus/active border color - resolves to `theme.palette[color].main`. Default: 'primary', overridable via `theme.defaults.color`. */
|
|
27
27
|
color?: TextInputColor;
|
|
28
|
-
/** Text color of the typed value
|
|
28
|
+
/** Text color of the typed value - resolves against `theme.text`. Default: 'primary', overridable via `theme.defaults.accentTextColor`. */
|
|
29
29
|
textColor?: TextInputTextColor;
|
|
30
30
|
/** Disables the input. */
|
|
31
31
|
disabled?: boolean;
|
|
32
|
-
/** Marks the field as invalid
|
|
32
|
+
/** Marks the field as invalid - applies error border color. */
|
|
33
33
|
error?: boolean;
|
|
34
34
|
/** Stretches the root to fill its container. */
|
|
35
35
|
fullWidth?: boolean;
|
|
36
36
|
id?: string;
|
|
37
37
|
/** Custom component for the input element. Takes priority over `components.Input`. Default: `'input'`. */
|
|
38
38
|
inputComponent?: ElementType;
|
|
39
|
-
/** Native HTML `size` attribute
|
|
39
|
+
/** Native HTML `size` attribute - visible width in character widths. Has no effect with `multiline` or `resize`. */
|
|
40
40
|
inputSize?: number;
|
|
41
41
|
/** Extra props spread onto the native element. Explicit top-level props take priority. */
|
|
42
42
|
inputProps?: InputHTMLAttributes<HTMLInputElement> & TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
@@ -67,9 +67,9 @@ interface TextInputProps extends SpaceProps<Theme>, Pick<LayoutProps<Theme>, 'wi
|
|
|
67
67
|
type?: string;
|
|
68
68
|
/**
|
|
69
69
|
* Visual style of the input.
|
|
70
|
-
* - `outlined` / `default`
|
|
71
|
-
* - `underline`
|
|
72
|
-
* - `text`
|
|
70
|
+
* - `outlined` / `default` - full border box (default)
|
|
71
|
+
* - `underline` - border on bottom only
|
|
72
|
+
* - `text` - no border, transparent background
|
|
73
73
|
*/
|
|
74
74
|
variant?: TextInputVariant;
|
|
75
75
|
value?: string | number | readonly string[];
|
package/dist/TextInput.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "./src-
|
|
1
|
+
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "./src-DLGYOJMh.mjs";
|
|
2
2
|
import { t as themeDefault } from "./themeDefault-Z3KmyIbm.mjs";
|
|
3
|
-
import { r as useTheme } from "./theme-
|
|
3
|
+
import { r as useTheme } from "./theme-BuqqFbsz.mjs";
|
|
4
4
|
import { useFormControl } from "./FormControl.mjs";
|
|
5
5
|
import { t as inputVariantStyles } from "./inputVariantStyles-CcqpGfuP.mjs";
|
|
6
6
|
import { forwardRef, useCallback, useLayoutEffect, useRef } from "react";
|