@soroush.tech/design-system 2.0.0-rc.0 → 2.0.0-rc.2
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 +17 -1
- package/dist/AppBar.d.cts +1 -3
- package/dist/AppBar.d.mts +1 -3
- package/dist/Avatar.cjs +1 -1
- package/dist/Avatar.d.cts +1 -3
- package/dist/Avatar.d.mts +1 -3
- package/dist/Avatar.mjs +1 -1
- package/dist/Backdrop.d.cts +1 -1
- package/dist/Backdrop.d.mts +1 -1
- package/dist/Breadcrumbs.cjs +132 -0
- package/dist/Breadcrumbs.d.cts +40 -0
- package/dist/Breadcrumbs.d.mts +40 -0
- package/dist/Breadcrumbs.mjs +131 -0
- package/dist/Button.cjs +1 -1
- package/dist/Button.d.cts +1 -1
- package/dist/Button.d.mts +1 -1
- package/dist/Button.mjs +1 -1
- package/dist/ButtonGroup.d.cts +1 -1
- package/dist/ButtonGroup.d.mts +1 -1
- package/dist/Card.cjs +3 -3
- package/dist/Card.d.cts +4 -3
- package/dist/Card.d.mts +4 -3
- package/dist/Card.mjs +3 -3
- package/dist/Checkbox.d.cts +1 -2
- package/dist/Checkbox.d.mts +1 -2
- package/dist/CircularProgress.d.cts +2 -3
- package/dist/CircularProgress.d.mts +2 -3
- package/dist/Drawer.d.cts +3 -2
- package/dist/Drawer.d.mts +3 -2
- package/dist/Flex.d.cts +1 -1
- package/dist/Flex.d.mts +1 -1
- package/dist/Form.d.cts +1 -1
- package/dist/Form.d.mts +1 -1
- package/dist/FormControl.cjs +1 -1
- package/dist/FormControl.d.cts +1 -2
- package/dist/FormControl.d.mts +1 -2
- package/dist/FormControl.mjs +1 -1
- package/dist/FormHelperText.d.cts +1 -1
- package/dist/FormHelperText.d.mts +1 -1
- package/dist/FormLabel.d.cts +1 -1
- package/dist/FormLabel.d.mts +1 -1
- package/dist/Grid.d.cts +1 -3
- package/dist/Grid.d.mts +1 -3
- package/dist/{Icon-CI6q2Eyi.cjs → Icon-Cvuhp9ek.cjs} +12 -2
- package/dist/{Icon-CH3asUJu.mjs → Icon-DlheCTJb.mjs} +12 -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.d.cts +1 -2
- package/dist/Image.d.mts +1 -2
- package/dist/LinearProgress.d.cts +2 -3
- package/dist/LinearProgress.d.mts +2 -3
- package/dist/Link.cjs +1 -1
- package/dist/Link.d.cts +1 -1
- package/dist/Link.d.mts +1 -1
- package/dist/Link.mjs +1 -1
- package/dist/Menu/ContextMenu.cjs +146 -0
- package/dist/Menu/ContextMenu.d.cts +52 -0
- package/dist/Menu/ContextMenu.d.mts +52 -0
- package/dist/Menu/ContextMenu.mjs +145 -0
- package/dist/Menu/Menu.cjs +3 -0
- package/dist/Menu/Menu.d.cts +2 -0
- package/dist/Menu/Menu.d.mts +2 -0
- package/dist/Menu/Menu.mjs +2 -0
- package/dist/Menu/MenuDivider.cjs +29 -0
- package/dist/Menu/MenuDivider.d.cts +12 -0
- package/dist/Menu/MenuDivider.d.mts +12 -0
- package/dist/Menu/MenuDivider.mjs +28 -0
- package/dist/Menu/MenuItems.cjs +29 -0
- package/dist/Menu/MenuItems.d.cts +2 -0
- package/dist/Menu/MenuItems.d.mts +2 -0
- package/dist/Menu/MenuItems.mjs +28 -0
- package/dist/Menu/MenuList.cjs +3 -0
- package/dist/Menu/MenuList.d.cts +38 -0
- package/dist/Menu/MenuList.d.mts +38 -0
- package/dist/Menu/MenuList.mjs +2 -0
- package/dist/Menu-BkKPTOfh.cjs +172 -0
- package/dist/Menu-tECbAEFj.mjs +167 -0
- package/dist/Menu.cjs +13 -0
- package/dist/Menu.d.cts +7 -0
- package/dist/Menu.d.mts +7 -0
- package/dist/Menu.mjs +6 -0
- package/dist/MenuItem-BR7ingQx.mjs +654 -0
- package/dist/MenuItem-CfdN4axw.cjs +684 -0
- package/dist/MenuItem.cjs +2 -148
- package/dist/MenuItem.d.cts +2 -52
- package/dist/MenuItem.d.mts +2 -52
- package/dist/MenuItem.mjs +1 -147
- package/dist/MenuList-B7msJ1IG.mjs +187 -0
- package/dist/MenuList-D4imLXAa.cjs +223 -0
- package/dist/MenuListContext-Dml16k0X.d.mts +21 -0
- package/dist/MenuListContext-vujGcRk9.d.cts +21 -0
- package/dist/Modal.d.cts +1 -1
- package/dist/Modal.d.mts +1 -1
- package/dist/NativeSelect.cjs +2 -2
- package/dist/NativeSelect.d.cts +2 -3
- package/dist/NativeSelect.d.mts +2 -3
- package/dist/NativeSelect.mjs +2 -2
- package/dist/Pagination/PaginationItem.cjs +1 -1
- package/dist/Pagination/PaginationItem.d.cts +1 -1
- package/dist/Pagination/PaginationItem.d.mts +1 -1
- package/dist/Pagination/PaginationItem.mjs +1 -1
- package/dist/Pagination.d.cts +2 -2
- package/dist/Pagination.d.mts +2 -2
- package/dist/Paper.cjs +1 -1
- package/dist/Paper.d.cts +2 -1
- package/dist/Paper.d.mts +2 -1
- package/dist/Paper.mjs +1 -1
- package/dist/{Popover-TpwRSORC.cjs → Popover-CiZfgiKE.cjs} +5 -125
- package/dist/Popover-QjM5Z1CR.mjs +133 -0
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.d.cts +6 -7
- package/dist/Popover.d.mts +6 -7
- package/dist/Popover.mjs +1 -1
- package/dist/Pressable.cjs +1 -1
- package/dist/Pressable.d.cts +1 -1
- package/dist/Pressable.d.mts +1 -1
- package/dist/Pressable.mjs +1 -1
- package/dist/Quote.d.cts +2 -3
- package/dist/Quote.d.mts +2 -3
- package/dist/Radio.d.cts +1 -2
- package/dist/Radio.d.mts +1 -2
- package/dist/Select.cjs +3 -3
- package/dist/Select.d.cts +2 -3
- package/dist/Select.d.mts +2 -3
- package/dist/Select.mjs +3 -3
- package/dist/Sidebar/Sidebar.d.cts +1 -1
- package/dist/Sidebar/Sidebar.d.mts +1 -1
- package/dist/Sidebar/SidebarItem.cjs +1 -1
- package/dist/Sidebar/SidebarItem.d.cts +3 -4
- package/dist/Sidebar/SidebarItem.d.mts +3 -4
- package/dist/Sidebar/SidebarItem.mjs +1 -1
- package/dist/Skeleton.d.cts +1 -2
- package/dist/Skeleton.d.mts +1 -2
- package/dist/Switch.cjs +1 -1
- package/dist/Switch.d.cts +1 -2
- package/dist/Switch.d.mts +1 -2
- package/dist/Switch.mjs +1 -1
- package/dist/Table/Table.d.cts +2 -3
- package/dist/Table/Table.d.mts +2 -3
- package/dist/Table/TableBody.d.cts +1 -2
- package/dist/Table/TableBody.d.mts +1 -2
- package/dist/Table/TableCell.d.cts +1 -1
- package/dist/Table/TableCell.d.mts +1 -1
- package/dist/Table/TableContainer.d.cts +1 -3
- package/dist/Table/TableContainer.d.mts +1 -3
- package/dist/Table/TableControl.d.cts +1 -1
- package/dist/Table/TableControl.d.mts +1 -1
- package/dist/Table/TableFooter.d.cts +1 -2
- package/dist/Table/TableFooter.d.mts +1 -2
- package/dist/Table/TableHead.d.cts +1 -2
- package/dist/Table/TableHead.d.mts +1 -2
- package/dist/Table/TablePagination.d.cts +2 -2
- package/dist/Table/TablePagination.d.mts +2 -2
- package/dist/Table/TablePaginationActions.cjs +1 -1
- package/dist/Table/TablePaginationActions.d.cts +1 -1
- package/dist/Table/TablePaginationActions.d.mts +1 -1
- package/dist/Table/TablePaginationActions.mjs +1 -1
- package/dist/Table/TableRow.d.cts +1 -2
- package/dist/Table/TableRow.d.mts +1 -2
- package/dist/Table/TableSortLabel.cjs +1 -1
- package/dist/Table/TableSortLabel.d.cts +1 -1
- package/dist/Table/TableSortLabel.d.mts +1 -1
- package/dist/Table/TableSortLabel.mjs +1 -1
- package/dist/Table/hooks.d.cts +1 -1
- package/dist/Table/hooks.d.mts +1 -1
- package/dist/Table.d.cts +5 -5
- package/dist/Table.d.mts +5 -5
- package/dist/{TableContext-BeCxbtHH.d.cts → TableContext-6PgGpUzM.d.mts} +1 -1
- package/dist/{TableContext-BiRiYkVZ.d.mts → TableContext-CBGk-Lh8.d.cts} +1 -1
- package/dist/Tabs/Tab.cjs +306 -0
- package/dist/Tabs/Tab.d.cts +62 -0
- package/dist/Tabs/Tab.d.mts +62 -0
- package/dist/Tabs/Tab.mjs +305 -0
- package/dist/Tabs/TabContext.cjs +34 -0
- package/dist/Tabs/TabContext.d.cts +20 -0
- package/dist/Tabs/TabContext.d.mts +20 -0
- package/dist/Tabs/TabContext.mjs +33 -0
- package/dist/Tabs/TabList.cjs +31 -0
- package/dist/Tabs/TabList.d.cts +11 -0
- package/dist/Tabs/TabList.d.mts +11 -0
- package/dist/Tabs/TabList.mjs +30 -0
- package/dist/Tabs/TabPanel.cjs +40 -0
- package/dist/Tabs/TabPanel.d.cts +27 -0
- package/dist/Tabs/TabPanel.d.mts +27 -0
- package/dist/Tabs/TabPanel.mjs +38 -0
- package/dist/Tabs/TabScrollButton.cjs +93 -0
- package/dist/Tabs/TabScrollButton.d.cts +2 -0
- package/dist/Tabs/TabScrollButton.d.mts +2 -0
- package/dist/Tabs/TabScrollButton.mjs +91 -0
- package/dist/Tabs/Tabs.cjs +3 -0
- package/dist/Tabs/Tabs.d.cts +3 -0
- package/dist/Tabs/Tabs.d.mts +3 -0
- package/dist/Tabs/Tabs.mjs +2 -0
- package/dist/Tabs-D_wkX-Jb.cjs +645 -0
- package/dist/Tabs-YfCUbkQV.mjs +633 -0
- package/dist/Tabs.cjs +13 -0
- package/dist/Tabs.d.cts +8 -0
- package/dist/Tabs.d.mts +8 -0
- package/dist/Tabs.mjs +7 -0
- package/dist/TabsContext-C2agsLBN.d.cts +6 -0
- package/dist/TabsContext-DqyxdmGW.d.mts +6 -0
- package/dist/TabsValueContext-D40zGCpE.cjs +19 -0
- package/dist/TabsValueContext-DvL3inf7.mjs +8 -0
- package/dist/TextInput.cjs +1 -1
- package/dist/TextInput.d.cts +1 -2
- package/dist/TextInput.d.mts +1 -2
- package/dist/TextInput.mjs +1 -1
- package/dist/ToggleButton/ToggleButton.cjs +1 -1
- package/dist/ToggleButton/ToggleButton.d.cts +1 -1
- package/dist/ToggleButton/ToggleButton.d.mts +1 -1
- package/dist/ToggleButton/ToggleButton.mjs +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.cjs +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.cts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.mts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.mjs +1 -1
- package/dist/Typography.cjs +1 -1
- package/dist/Typography.d.cts +2 -2
- package/dist/Typography.d.mts +2 -2
- package/dist/Typography.mjs +1 -1
- package/dist/View.d.cts +1 -1
- package/dist/View.d.mts +1 -1
- package/dist/catalog.cjs +4110 -0
- package/dist/catalog.d.cts +90 -0
- package/dist/catalog.d.mts +90 -0
- package/dist/catalog.mjs +4109 -0
- package/dist/computePopoverPosition-BIprs_xo.mjs +123 -0
- package/dist/computePopoverPosition-DiyEOHnU.cjs +128 -0
- package/dist/dividerLine-BNljcGlv.cjs +66 -0
- package/dist/dividerLine-FahY-M6_.mjs +31 -0
- package/dist/engine.d.cts +1 -1
- package/dist/engine.d.mts +1 -1
- package/dist/index-B3LIhqHR.d.cts +98 -0
- package/dist/{index-DbEnSf2m.d.cts → index-B8DNxyEw.d.mts} +3 -4
- package/dist/{index-CxUsrlg1.d.cts → index-BCnKYNlZ.d.cts} +1 -2
- package/dist/{index-BUoVTCqX.d.mts → index-BFruxTHv.d.cts} +2 -3
- package/dist/{index-BSqet8aO.d.cts → index-BSA6SKao.d.mts} +2 -3
- package/dist/{index-CrN4MSUF.d.cts → index-BVPrG1L0.d.mts} +1 -1
- package/dist/{index-Celm-8iN.d.cts → index-BbgFYfX_.d.mts} +3 -4
- package/dist/{index-B78VkB0-.d.cts → index-Bhdn4KTy.d.cts} +2 -3
- package/dist/{index-Chg6pSrr.d.mts → index-BiVvxOvj.d.cts} +3 -4
- package/dist/index-BjPX49XA.d.mts +34 -0
- package/dist/{index-BB-dLv5V.d.mts → index-BjfPEP_5.d.cts} +3 -4
- package/dist/{index-Bid71KeF.d.cts → index-BlLH6rlE.d.cts} +2 -2
- package/dist/{index-Ctqajtac.d.cts → index-BqpS_Huq.d.mts} +12 -4
- package/dist/{index-BhibLnZ0.d.cts → index-Bxd9NOWb.d.mts} +2 -3
- package/dist/index-C3KrFPCj.d.mts +35 -0
- package/dist/{themes-RX2UX5gD.d.mts → index-CVNJEUwJ.d.mts} +217 -8
- package/dist/index-CWnbCxgw.d.cts +72 -0
- package/dist/index-Cj5Rhh_9.d.mts +72 -0
- package/dist/index-CoEqjFYn.d.mts +98 -0
- package/dist/{index-S-ClM6WM.d.mts → index-CrIxI8Na.d.mts} +2 -2
- package/dist/index-DBteSahY.d.cts +1 -0
- package/dist/index-DCmH5f9I.d.cts +72 -0
- package/dist/{index-VOsBSWEu.d.mts → index-DDJuUfL5.d.cts} +1 -1
- package/dist/{index-DdqdSOct.d.cts → index-DIC7HKpP.d.mts} +2 -3
- package/dist/{index-BfZuh9c2.d.mts → index-DJCpnTH3.d.mts} +2 -3
- package/dist/index-DQcnJ5H4.d.cts +35 -0
- package/dist/{index-DNwF3DUX.d.cts → index-DXhMkjQ6.d.cts} +2 -3
- package/dist/index-DckSub2J.d.mts +72 -0
- package/dist/{index-nc4Sxiy9.d.mts → index-DeDxYlSQ.d.mts} +2 -3
- package/dist/{themes-Kbk9h5cN.d.cts → index-DmJ7yWWi.d.cts} +214 -5
- package/dist/{index-Wnv6jCR3.d.mts → index-DqjXDutI.d.mts} +1 -2
- package/dist/{index-GpnmW6vu.d.mts → index-DrVYWt-X.d.mts} +1 -2
- package/dist/{index-Belxmt1X.d.cts → index-DuVNRXP4.d.cts} +1 -2
- package/dist/{index-smqjMLAZ.d.mts → index-IdMqR82e.d.cts} +2 -3
- package/dist/{index-DXvQ-JVZ.d.mts → index-XxydXX8l.d.cts} +2 -3
- package/dist/index-_G1osn09.d.mts +1 -0
- package/dist/index-gnh-Oe0n.d.cts +34 -0
- package/dist/{index-DO9J-Fla.d.mts → index-qlfNErNd.d.cts} +12 -4
- package/dist/index.d.cts +1 -2
- package/dist/index.d.mts +1 -2
- 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/surfaceSystem-BGQBoXv_.cjs +38 -0
- package/dist/surfaceSystem-D8TbmKy3.mjs +21 -0
- package/dist/theme-BxXuXRgQ.cjs +137 -0
- package/dist/theme-Z9_QludW.mjs +102 -0
- package/dist/theme.cjs +25 -24
- package/dist/theme.d.cts +3 -3
- package/dist/theme.d.mts +3 -3
- package/dist/theme.mjs +2 -1
- package/dist/{theme-CDVxig_g.mjs → themes-L-dE7_ck.mjs} +10 -110
- package/dist/{theme-BXlAP3xf.cjs → themes-gd6tcmqS.cjs} +0 -136
- package/dist/{useTablePagination-COTiNH_8.d.mts → useTablePagination-C5VKtqDp.d.cts} +1 -1
- package/dist/{useTablePagination-WFkaUZu8.d.cts → useTablePagination-C6LSlt3w.d.mts} +1 -1
- package/package.json +43 -2
- package/dist/Popover-DwnSLpp1.mjs +0 -253
- package/dist/index-B_dKjEDR.d.mts +0 -23
- package/dist/index-C1WqEDtQ.d.mts +0 -69
- package/dist/index-CA7HnbtH.d.cts +0 -21
- package/dist/index-CKZaErxJ.d.mts +0 -21
- package/dist/index-DBUwu65Z.d.cts +0 -69
- package/dist/index-DzQJSYIh.d.cts +0 -23
- package/dist/index-cuv3o-L7.d.mts +0 -34
- package/dist/index-nB94D7UM.d.cts +0 -34
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_src = require("../src-DU81aGy9.cjs");
|
|
3
|
-
const require_Icon = require("../Icon-
|
|
3
|
+
const require_Icon = require("../Icon-Cvuhp9ek.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-DXhMkjQ6.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-DeDxYlSQ.mjs";
|
|
2
2
|
export { TableSortLabel, TableSortLabelDirection, TableSortLabelProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { t as Icon } from "../Icon-DlheCTJb.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.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-C5VKtqDp.cjs";
|
|
2
2
|
//#region src/Table/hooks/useTableSelection.d.ts
|
|
3
3
|
/** Header select-all state - spreads directly onto `Checkbox`. */
|
|
4
4
|
interface TableSelectionAllProps {
|
package/dist/Table/hooks.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-C6LSlt3w.mjs";
|
|
2
2
|
//#region src/Table/hooks/useTableSelection.d.ts
|
|
3
3
|
/** Header select-all state - spreads directly onto `Checkbox`. */
|
|
4
4
|
interface TableSelectionAllProps {
|
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-CBGk-Lh8.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-Bhdn4KTy.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-DXhMkjQ6.cjs";
|
|
7
|
+
import { a as TableSortMap, i as TableSortEntry, n as UseTablePaginationOptions, o as useTableSort, r as useTablePagination, t as TablePaginationState } from "./useTablePagination-C5VKtqDp.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-BlLH6rlE.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-6PgGpUzM.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-DJCpnTH3.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-DeDxYlSQ.mjs";
|
|
7
|
+
import { a as TableSortMap, i as TableSortEntry, n as UseTablePaginationOptions, o as useTableSort, r as useTablePagination, t as TablePaginationState } from "./useTablePagination-C6LSlt3w.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-CrIxI8Na.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";
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_src = require("../src-DU81aGy9.cjs");
|
|
3
|
+
const require_theme = require("../theme-BxXuXRgQ.cjs");
|
|
4
|
+
const require_Icon = require("../Icon-Cvuhp9ek.cjs");
|
|
5
|
+
const require_dividerLine = require("../dividerLine-BNljcGlv.cjs");
|
|
6
|
+
let react = require("react");
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
//#region src/Tabs/Tab/Tab.tsx
|
|
9
|
+
const shouldForwardProp = (0, require("@soroush.tech/styled-system/should-forward-prop").createShouldForwardProp)([
|
|
10
|
+
"variant",
|
|
11
|
+
"color",
|
|
12
|
+
"textColor",
|
|
13
|
+
"sizeToken",
|
|
14
|
+
"isSelected",
|
|
15
|
+
"isDisabled",
|
|
16
|
+
"iconPlacement",
|
|
17
|
+
"isWrapped",
|
|
18
|
+
"fullWidth",
|
|
19
|
+
"isVertical",
|
|
20
|
+
"hasDivider",
|
|
21
|
+
"selectedBg",
|
|
22
|
+
"bg",
|
|
23
|
+
"borderRadius",
|
|
24
|
+
"lineColor",
|
|
25
|
+
"rowPaddingTop",
|
|
26
|
+
"rowPaddingBottom"
|
|
27
|
+
]);
|
|
28
|
+
const getEnclosedEdgeStyle = (theme, main, lineMain, isSelected, isVertical, hasDivider, radius) => {
|
|
29
|
+
const thin = theme.borderWidths.thin;
|
|
30
|
+
const top = `inset 0 ${thin} 0 ${main}`;
|
|
31
|
+
const right = `inset -${thin} 0 0 ${main}`;
|
|
32
|
+
const foot = `inset 0 -${thin} 0 ${main}`;
|
|
33
|
+
const left = `inset ${thin} 0 0 ${main}`;
|
|
34
|
+
const outline = isVertical ? [
|
|
35
|
+
top,
|
|
36
|
+
foot,
|
|
37
|
+
left
|
|
38
|
+
] : [
|
|
39
|
+
top,
|
|
40
|
+
right,
|
|
41
|
+
left
|
|
42
|
+
];
|
|
43
|
+
let edges = "none";
|
|
44
|
+
if (hasDivider) edges = isSelected ? outline.join(", ") : require_dividerLine.getDividerShadow(theme, isVertical, lineMain);
|
|
45
|
+
return {
|
|
46
|
+
border: "none",
|
|
47
|
+
padding: thin,
|
|
48
|
+
boxShadow: edges,
|
|
49
|
+
borderRadius: 0,
|
|
50
|
+
...isVertical ? {
|
|
51
|
+
borderStartStartRadius: radius,
|
|
52
|
+
borderEndStartRadius: radius
|
|
53
|
+
} : {
|
|
54
|
+
borderTopLeftRadius: radius,
|
|
55
|
+
borderTopRightRadius: radius
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
const TabRoot = require_src.styled("div", {
|
|
60
|
+
name: "Tab",
|
|
61
|
+
label: "Tab",
|
|
62
|
+
shouldForwardProp
|
|
63
|
+
})(({ theme, variant, color, isSelected, isDisabled, fullWidth, isVertical, hasDivider, selectedBg, bg, borderRadius, lineColor }) => {
|
|
64
|
+
const main = (0, require_src.src_exports.get)(theme, `palette.${color}.main`);
|
|
65
|
+
const isBoxed = variant === "boxed";
|
|
66
|
+
const outlineColor = isBoxed && isSelected ? `${main}59` : "transparent";
|
|
67
|
+
const raised = (0, require_src.src_exports.get)(theme, "background.paper");
|
|
68
|
+
const groundKey = isSelected && selectedBg ? selectedBg : bg;
|
|
69
|
+
const ground = groundKey ? (0, require_src.src_exports.get)(theme, `background.${groundKey}`) : "transparent";
|
|
70
|
+
const isRounded = isBoxed || variant === "enclosed";
|
|
71
|
+
let radius = 0;
|
|
72
|
+
if (borderRadius) radius = theme.radii[borderRadius];
|
|
73
|
+
else if (isRounded) radius = theme.radii.sm;
|
|
74
|
+
return {
|
|
75
|
+
position: "relative",
|
|
76
|
+
display: "flex",
|
|
77
|
+
alignItems: "stretch",
|
|
78
|
+
flexGrow: fullWidth ? 1 : 0,
|
|
79
|
+
flexShrink: fullWidth ? 1 : 0,
|
|
80
|
+
flexBasis: fullWidth ? 0 : "auto",
|
|
81
|
+
minWidth: 0,
|
|
82
|
+
backgroundColor: ground,
|
|
83
|
+
border: `${theme.borderWidths.thin} solid ${outlineColor}`,
|
|
84
|
+
borderRadius: radius,
|
|
85
|
+
...variant === "enclosed" && getEnclosedEdgeStyle(theme, main, (0, require_src.src_exports.get)(theme, `palette.${lineColor}.main`), isSelected, isVertical, hasDivider, String(radius)),
|
|
86
|
+
transition: "background-color 0.12s ease",
|
|
87
|
+
...isDisabled ? {} : { "&:hover": { backgroundColor: isBoxed ? raised : `${main}14` } },
|
|
88
|
+
"&:hover [data-tab-close]": { visibility: "visible" }
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
const TabLabel = require_src.styled("button", {
|
|
92
|
+
name: "Tab",
|
|
93
|
+
slot: "label",
|
|
94
|
+
label: "TabLabel",
|
|
95
|
+
shouldForwardProp
|
|
96
|
+
})(({ theme, variant, color, textColor, sizeToken, isSelected, isDisabled, iconPlacement, isWrapped, isVertical, rowPaddingTop, rowPaddingBottom }) => {
|
|
97
|
+
const { paddingTop, paddingBottom, paddingLeft, paddingRight, fontSize } = theme.sizes[sizeToken];
|
|
98
|
+
const main = (0, require_src.src_exports.get)(theme, `palette.${color}.main`);
|
|
99
|
+
const idleColor = (0, require_src.src_exports.get)(theme, `text.${textColor ?? "primary"}`);
|
|
100
|
+
let labelColor = isSelected ? variant === "boxed" ? idleColor : main : idleColor;
|
|
101
|
+
if (isDisabled) labelColor = (0, require_src.src_exports.get)(theme, "text.disabled");
|
|
102
|
+
return {
|
|
103
|
+
appearance: "none",
|
|
104
|
+
display: "grid",
|
|
105
|
+
gridAutoFlow: iconPlacement === "start" || iconPlacement === "end" ? "column" : "row",
|
|
106
|
+
alignContent: iconPlacement === "bottom" ? "start" : "end",
|
|
107
|
+
alignItems: "center",
|
|
108
|
+
justifyContent: "center",
|
|
109
|
+
justifyItems: "center",
|
|
110
|
+
gap: theme.space[1],
|
|
111
|
+
flex: 1,
|
|
112
|
+
minWidth: 0,
|
|
113
|
+
margin: 0,
|
|
114
|
+
paddingTop: theme.space[isVertical ? paddingTop : rowPaddingTop],
|
|
115
|
+
paddingBottom: theme.space[isVertical ? paddingBottom : rowPaddingBottom],
|
|
116
|
+
paddingLeft: theme.space[paddingLeft],
|
|
117
|
+
paddingRight: theme.space[paddingRight],
|
|
118
|
+
fontFamily: theme.fonts.body,
|
|
119
|
+
fontSize: theme.fontSizes[fontSize],
|
|
120
|
+
lineHeight: theme.lineHeights.base,
|
|
121
|
+
whiteSpace: isWrapped ? "normal" : "nowrap",
|
|
122
|
+
textAlign: "center",
|
|
123
|
+
textDecoration: "none",
|
|
124
|
+
color: labelColor,
|
|
125
|
+
backgroundColor: "transparent",
|
|
126
|
+
border: "none",
|
|
127
|
+
borderRadius: "inherit",
|
|
128
|
+
cursor: isDisabled ? "default" : "pointer",
|
|
129
|
+
outline: "none",
|
|
130
|
+
"&:focus-visible": {
|
|
131
|
+
outline: `${theme.borderWidths.base} solid ${main}`,
|
|
132
|
+
outlineOffset: `-${theme.borderWidths.base}`
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
});
|
|
136
|
+
const SecondaryActionSlot = require_src.styled("div", {
|
|
137
|
+
name: "Tab",
|
|
138
|
+
slot: "secondaryAction",
|
|
139
|
+
label: "TabSecondaryAction"
|
|
140
|
+
})({
|
|
141
|
+
display: "flex",
|
|
142
|
+
alignItems: "center",
|
|
143
|
+
flexShrink: 0
|
|
144
|
+
});
|
|
145
|
+
const TabClose = require_src.styled("button", {
|
|
146
|
+
name: "Tab",
|
|
147
|
+
slot: "close",
|
|
148
|
+
label: "TabClose",
|
|
149
|
+
shouldForwardProp
|
|
150
|
+
})(({ theme, color, isSelected }) => {
|
|
151
|
+
const main = (0, require_src.src_exports.get)(theme, `palette.${color}.main`);
|
|
152
|
+
return {
|
|
153
|
+
appearance: "none",
|
|
154
|
+
display: "grid",
|
|
155
|
+
placeItems: "center",
|
|
156
|
+
alignSelf: "center",
|
|
157
|
+
flexShrink: 0,
|
|
158
|
+
width: theme.icon.sm,
|
|
159
|
+
height: theme.icon.sm,
|
|
160
|
+
padding: 0,
|
|
161
|
+
marginInlineEnd: theme.space[.5],
|
|
162
|
+
border: "none",
|
|
163
|
+
borderRadius: theme.radii.sm,
|
|
164
|
+
backgroundColor: "transparent",
|
|
165
|
+
color: "inherit",
|
|
166
|
+
cursor: "pointer",
|
|
167
|
+
visibility: isSelected ? "visible" : "hidden",
|
|
168
|
+
"&:hover": { backgroundColor: `${main}1F` }
|
|
169
|
+
};
|
|
170
|
+
});
|
|
171
|
+
const IconSlot = require_src.styled("span", {
|
|
172
|
+
name: "Tab",
|
|
173
|
+
slot: "icon",
|
|
174
|
+
label: "TabIcon"
|
|
175
|
+
})({
|
|
176
|
+
display: "inline-flex",
|
|
177
|
+
flexShrink: 0
|
|
178
|
+
});
|
|
179
|
+
/**
|
|
180
|
+
* @description One tab of a `Tabs`. In a `tablist` it is a `tab` with `aria-selected` and
|
|
181
|
+
* `aria-controls`, the selected one alone in the page's tab order; in a navigation
|
|
182
|
+
* (`Tabs as="nav"`) a button or link marked `aria-current="page"` when it is the current
|
|
183
|
+
* one. It takes one `icon`, which `iconPosition` places on a side of its label.
|
|
184
|
+
*/
|
|
185
|
+
function Tab({ value: valueProp, label, icon, iconPosition = "top", isWrapped: isWrappedProp, bg: bgProp, borderRadius: borderRadiusProp, color: colorProp, textColor: textColorProp, size: sizeProp, selectedBg: selectedBgProp, disabled = false, href, as, onClick, title, closeLabel, secondaryAction, className, "data-testid": dataTestid }) {
|
|
186
|
+
const dp = require_theme.useDefaultProps("Tab");
|
|
187
|
+
const iconPlacement = icon == null ? void 0 : iconPosition;
|
|
188
|
+
const isIconFirst = iconPlacement === "top" || iconPlacement === "start";
|
|
189
|
+
const iconSlot = icon == null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconSlot, {
|
|
190
|
+
"aria-hidden": true,
|
|
191
|
+
children: icon
|
|
192
|
+
});
|
|
193
|
+
const isWrapped = isWrappedProp ?? dp.isWrapped ?? false;
|
|
194
|
+
const bg = bgProp ?? dp.bg;
|
|
195
|
+
const borderRadius = borderRadiusProp ?? dp.borderRadius;
|
|
196
|
+
const tabs = require_dividerLine.useTabsContext();
|
|
197
|
+
const index = (0, react.useContext)(require_dividerLine.TabIndexContext);
|
|
198
|
+
const value = valueProp ?? index;
|
|
199
|
+
const isSelected = tabs.selectedValue === value;
|
|
200
|
+
const { isNavigation, select, rowProps } = tabs;
|
|
201
|
+
const color = colorProp ?? rowProps.color ?? dp.color ?? tabs.color;
|
|
202
|
+
const textColor = textColorProp ?? rowProps.textColor ?? dp.textColor ?? tabs.textColor;
|
|
203
|
+
const size = sizeProp ?? rowProps.size ?? dp.size ?? tabs.size;
|
|
204
|
+
const selectedBg = selectedBgProp ?? rowProps.selectedBg ?? dp.selectedBg ?? tabs.selectedBg;
|
|
205
|
+
const handleClick = (event) => {
|
|
206
|
+
if (disabled) {
|
|
207
|
+
event.preventDefault();
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
onClick?.(event);
|
|
211
|
+
select(value);
|
|
212
|
+
};
|
|
213
|
+
const handleFocus = () => {
|
|
214
|
+
if (tabs.shouldSelectOnFocus && !disabled && !isSelected) select(value);
|
|
215
|
+
};
|
|
216
|
+
const isClosable = closeLabel !== void 0;
|
|
217
|
+
const close = () => tabs.onTabClose?.(value);
|
|
218
|
+
const handleMouseDown = (event) => {
|
|
219
|
+
if (isClosable && event.button === 1) event.preventDefault();
|
|
220
|
+
};
|
|
221
|
+
const handleAuxClick = (event) => {
|
|
222
|
+
if (isClosable && event.button === 1) close();
|
|
223
|
+
};
|
|
224
|
+
const handleKeyDown = (event) => {
|
|
225
|
+
if (isClosable && event.key === "Delete") {
|
|
226
|
+
event.preventDefault();
|
|
227
|
+
close();
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
const element = as ?? (href === void 0 ? "button" : "a");
|
|
231
|
+
const semantics = isNavigation ? { "aria-current": isSelected ? "page" : void 0 } : {
|
|
232
|
+
role: "tab",
|
|
233
|
+
"aria-selected": isSelected,
|
|
234
|
+
"aria-controls": tabs.getPanelId(value),
|
|
235
|
+
tabIndex: value === tabs.focusableValue ? 0 : -1
|
|
236
|
+
};
|
|
237
|
+
const styleProps = {
|
|
238
|
+
variant: tabs.variant,
|
|
239
|
+
color,
|
|
240
|
+
textColor,
|
|
241
|
+
sizeToken: size,
|
|
242
|
+
isSelected,
|
|
243
|
+
isDisabled: disabled,
|
|
244
|
+
iconPlacement,
|
|
245
|
+
isWrapped,
|
|
246
|
+
fullWidth: tabs.fullWidth,
|
|
247
|
+
isVertical: tabs.isVertical,
|
|
248
|
+
hasDivider: tabs.hasDivider,
|
|
249
|
+
selectedBg,
|
|
250
|
+
bg,
|
|
251
|
+
borderRadius,
|
|
252
|
+
lineColor: tabs.selectedColor,
|
|
253
|
+
rowPaddingTop: tabs.rowPaddingTop,
|
|
254
|
+
rowPaddingBottom: tabs.rowPaddingBottom
|
|
255
|
+
};
|
|
256
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(TabRoot, {
|
|
257
|
+
...styleProps,
|
|
258
|
+
role: "presentation",
|
|
259
|
+
className,
|
|
260
|
+
"data-tab-value": String(value),
|
|
261
|
+
"data-tab-selected": isSelected || void 0,
|
|
262
|
+
children: [
|
|
263
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(TabLabel, {
|
|
264
|
+
...semantics,
|
|
265
|
+
as: element,
|
|
266
|
+
id: tabs.getTabId(value),
|
|
267
|
+
type: element === "button" ? "button" : void 0,
|
|
268
|
+
href,
|
|
269
|
+
title,
|
|
270
|
+
"aria-disabled": disabled || void 0,
|
|
271
|
+
"aria-keyshortcuts": isClosable ? "Delete" : void 0,
|
|
272
|
+
"data-tab": true,
|
|
273
|
+
"data-testid": dataTestid,
|
|
274
|
+
...styleProps,
|
|
275
|
+
onClick: handleClick,
|
|
276
|
+
onFocus: handleFocus,
|
|
277
|
+
onMouseDown: handleMouseDown,
|
|
278
|
+
onAuxClick: handleAuxClick,
|
|
279
|
+
onKeyDown: handleKeyDown,
|
|
280
|
+
children: [
|
|
281
|
+
isIconFirst && iconSlot,
|
|
282
|
+
label,
|
|
283
|
+
!isIconFirst && iconSlot
|
|
284
|
+
]
|
|
285
|
+
}),
|
|
286
|
+
secondaryAction != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SecondaryActionSlot, { children: secondaryAction }),
|
|
287
|
+
isClosable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TabClose, {
|
|
288
|
+
type: "button",
|
|
289
|
+
"aria-hidden": true,
|
|
290
|
+
title: closeLabel,
|
|
291
|
+
tabIndex: -1,
|
|
292
|
+
"data-tab-close": true,
|
|
293
|
+
color,
|
|
294
|
+
isSelected,
|
|
295
|
+
onClick: close,
|
|
296
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
297
|
+
name: "close",
|
|
298
|
+
size: "0.75rem",
|
|
299
|
+
color: "inherit"
|
|
300
|
+
})
|
|
301
|
+
})
|
|
302
|
+
]
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
//#endregion
|
|
306
|
+
exports.Tab = Tab;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { V as Theme } from "../index-DmJ7yWWi.cjs";
|
|
2
|
+
import { t as TabValue } from "../TabsContext-C2agsLBN.cjs";
|
|
3
|
+
import { ElementType, MouseEvent, ReactNode } from "react";
|
|
4
|
+
//#region src/Tabs/Tab/Tab.d.ts
|
|
5
|
+
/** Where `icon` sits around a tab's label. */
|
|
6
|
+
type TabIconPosition = 'start' | 'end' | 'top' | 'bottom';
|
|
7
|
+
interface TabProps {
|
|
8
|
+
/** What the tab is chosen as. Default: its position among the tabs. */
|
|
9
|
+
value?: TabValue;
|
|
10
|
+
/** The tab's label. */
|
|
11
|
+
label?: ReactNode;
|
|
12
|
+
/** The tab's icon, as given - its size is the icon's own (`<Icon size="sm" />`). */
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
/** Where `icon` sits around the label. Default: `'top'`. */
|
|
15
|
+
iconPosition?: TabIconPosition;
|
|
16
|
+
/**
|
|
17
|
+
* The tab's ground while it isn't selected - resolves against `theme.background`. Selected, it
|
|
18
|
+
* takes its `Tabs`' `selectedBg`.
|
|
19
|
+
*/
|
|
20
|
+
bg?: keyof Theme['background'];
|
|
21
|
+
/**
|
|
22
|
+
* The tab's corner radius - resolves against `theme.radii`. In the enclosed look it rounds the
|
|
23
|
+
* corners away from the divider; elsewhere, all four. Default: `'sm'` boxed or enclosed, none
|
|
24
|
+
* otherwise.
|
|
25
|
+
*/
|
|
26
|
+
borderRadius?: keyof Theme['radii'];
|
|
27
|
+
/** The tab's accent - its selected label, outline and indicator - resolves to `theme.palette[color]`. Default: its `Tabs`'. */
|
|
28
|
+
color?: keyof Theme['palette'];
|
|
29
|
+
/** The label's color - resolves against `theme.text`. Default: its `Tabs`'. */
|
|
30
|
+
textColor?: keyof Theme['text'];
|
|
31
|
+
/** Density token - resolves against `theme.sizes`. Default: its `Tabs`'. */
|
|
32
|
+
size?: keyof Theme['sizes'];
|
|
33
|
+
/** The tab's ground while it is selected - resolves against `theme.background`. Default: its `Tabs`' `selectedBg`. */
|
|
34
|
+
selectedBg?: keyof Theme['background'];
|
|
35
|
+
/** The label may take two lines rather than one. Default: `false`. */
|
|
36
|
+
isWrapped?: boolean;
|
|
37
|
+
/** The tab can't be chosen, and the arrow keys pass it. Default: `false`. */
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
/** A link, for a navigation of pages. */
|
|
40
|
+
href?: string;
|
|
41
|
+
/** The element the tab is rendered as. Default: `'button'`, or `'a'` with `href`. */
|
|
42
|
+
as?: ElementType;
|
|
43
|
+
/** Fired when the tab is pressed. */
|
|
44
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
45
|
+
/** Hover text. */
|
|
46
|
+
title?: string;
|
|
47
|
+
/** Makes the tab closable: its close button's tooltip (`Close Button`). The button is the pointer's - a tablist owns tabs alone, so it is hidden from assistive technology - and Delete closes the focused tab. `Tabs`' `onTabClose` hears either. */
|
|
48
|
+
closeLabel?: string;
|
|
49
|
+
/** A control of the tab's own after its label - a kebab menu, a badge. */
|
|
50
|
+
secondaryAction?: ReactNode;
|
|
51
|
+
className?: string;
|
|
52
|
+
'data-testid'?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @description One tab of a `Tabs`. In a `tablist` it is a `tab` with `aria-selected` and
|
|
56
|
+
* `aria-controls`, the selected one alone in the page's tab order; in a navigation
|
|
57
|
+
* (`Tabs as="nav"`) a button or link marked `aria-current="page"` when it is the current
|
|
58
|
+
* one. It takes one `icon`, which `iconPosition` places on a side of its label.
|
|
59
|
+
*/
|
|
60
|
+
declare function Tab({ value: valueProp, label, icon, iconPosition, isWrapped: isWrappedProp, bg: bgProp, borderRadius: borderRadiusProp, color: colorProp, textColor: textColorProp, size: sizeProp, selectedBg: selectedBgProp, disabled, href, as, onClick, title, closeLabel, secondaryAction, className, 'data-testid': dataTestid }: Readonly<TabProps>): import("react").JSX.Element;
|
|
61
|
+
//#endregion
|
|
62
|
+
export { Tab, TabIconPosition, TabProps };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { V as Theme } from "../index-CVNJEUwJ.mjs";
|
|
2
|
+
import { t as TabValue } from "../TabsContext-DqyxdmGW.mjs";
|
|
3
|
+
import { ElementType, MouseEvent, ReactNode } from "react";
|
|
4
|
+
//#region src/Tabs/Tab/Tab.d.ts
|
|
5
|
+
/** Where `icon` sits around a tab's label. */
|
|
6
|
+
type TabIconPosition = 'start' | 'end' | 'top' | 'bottom';
|
|
7
|
+
interface TabProps {
|
|
8
|
+
/** What the tab is chosen as. Default: its position among the tabs. */
|
|
9
|
+
value?: TabValue;
|
|
10
|
+
/** The tab's label. */
|
|
11
|
+
label?: ReactNode;
|
|
12
|
+
/** The tab's icon, as given - its size is the icon's own (`<Icon size="sm" />`). */
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
/** Where `icon` sits around the label. Default: `'top'`. */
|
|
15
|
+
iconPosition?: TabIconPosition;
|
|
16
|
+
/**
|
|
17
|
+
* The tab's ground while it isn't selected - resolves against `theme.background`. Selected, it
|
|
18
|
+
* takes its `Tabs`' `selectedBg`.
|
|
19
|
+
*/
|
|
20
|
+
bg?: keyof Theme['background'];
|
|
21
|
+
/**
|
|
22
|
+
* The tab's corner radius - resolves against `theme.radii`. In the enclosed look it rounds the
|
|
23
|
+
* corners away from the divider; elsewhere, all four. Default: `'sm'` boxed or enclosed, none
|
|
24
|
+
* otherwise.
|
|
25
|
+
*/
|
|
26
|
+
borderRadius?: keyof Theme['radii'];
|
|
27
|
+
/** The tab's accent - its selected label, outline and indicator - resolves to `theme.palette[color]`. Default: its `Tabs`'. */
|
|
28
|
+
color?: keyof Theme['palette'];
|
|
29
|
+
/** The label's color - resolves against `theme.text`. Default: its `Tabs`'. */
|
|
30
|
+
textColor?: keyof Theme['text'];
|
|
31
|
+
/** Density token - resolves against `theme.sizes`. Default: its `Tabs`'. */
|
|
32
|
+
size?: keyof Theme['sizes'];
|
|
33
|
+
/** The tab's ground while it is selected - resolves against `theme.background`. Default: its `Tabs`' `selectedBg`. */
|
|
34
|
+
selectedBg?: keyof Theme['background'];
|
|
35
|
+
/** The label may take two lines rather than one. Default: `false`. */
|
|
36
|
+
isWrapped?: boolean;
|
|
37
|
+
/** The tab can't be chosen, and the arrow keys pass it. Default: `false`. */
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
/** A link, for a navigation of pages. */
|
|
40
|
+
href?: string;
|
|
41
|
+
/** The element the tab is rendered as. Default: `'button'`, or `'a'` with `href`. */
|
|
42
|
+
as?: ElementType;
|
|
43
|
+
/** Fired when the tab is pressed. */
|
|
44
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
45
|
+
/** Hover text. */
|
|
46
|
+
title?: string;
|
|
47
|
+
/** Makes the tab closable: its close button's tooltip (`Close Button`). The button is the pointer's - a tablist owns tabs alone, so it is hidden from assistive technology - and Delete closes the focused tab. `Tabs`' `onTabClose` hears either. */
|
|
48
|
+
closeLabel?: string;
|
|
49
|
+
/** A control of the tab's own after its label - a kebab menu, a badge. */
|
|
50
|
+
secondaryAction?: ReactNode;
|
|
51
|
+
className?: string;
|
|
52
|
+
'data-testid'?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @description One tab of a `Tabs`. In a `tablist` it is a `tab` with `aria-selected` and
|
|
56
|
+
* `aria-controls`, the selected one alone in the page's tab order; in a navigation
|
|
57
|
+
* (`Tabs as="nav"`) a button or link marked `aria-current="page"` when it is the current
|
|
58
|
+
* one. It takes one `icon`, which `iconPosition` places on a side of its label.
|
|
59
|
+
*/
|
|
60
|
+
declare function Tab({ value: valueProp, label, icon, iconPosition, isWrapped: isWrappedProp, bg: bgProp, borderRadius: borderRadiusProp, color: colorProp, textColor: textColorProp, size: sizeProp, selectedBg: selectedBgProp, disabled, href, as, onClick, title, closeLabel, secondaryAction, className, 'data-testid': dataTestid }: Readonly<TabProps>): import("react").JSX.Element;
|
|
61
|
+
//#endregion
|
|
62
|
+
export { Tab, TabIconPosition, TabProps };
|