@soroush.tech/design-system 2.0.0-rc.1 → 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,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-DBUwu65Z.cjs";
|
|
3
|
-
import { ButtonHTMLAttributes, ReactNode } from "react";
|
|
1
|
+
import { M as PaletteColor, V as Theme, d as ButtonVariants } from "./index-CVNJEUwJ.mjs";
|
|
4
2
|
import { BorderProps, LayoutProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
3
|
+
import { ButtonHTMLAttributes, ReactNode } from "react";
|
|
5
4
|
//#region src/Button/Button.d.ts
|
|
6
5
|
/** Augmentable via the `ButtonVariants` interface - style new values through `theme.components.Button.variants`. */
|
|
7
6
|
type ButtonVariant = keyof ButtonVariants;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { t as MenuItemValue } from "./MenuListContext-Dml16k0X.mjs";
|
|
2
|
+
import { i as MenuItemRole } from "./index-Cj5Rhh_9.mjs";
|
|
3
|
+
import { KeyboardEvent, MouseEvent, ReactNode } from "react";
|
|
4
|
+
//#region src/Menu/MenuItems/MenuItems.d.ts
|
|
5
|
+
/** A menu row as data - what a `MenuItem` takes, with its label as `label`. */
|
|
6
|
+
interface MenuItemRowData {
|
|
7
|
+
value?: MenuItemValue;
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
role?: MenuItemRole;
|
|
10
|
+
selected?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
startIcon?: ReactNode;
|
|
13
|
+
shortcut?: ReactNode;
|
|
14
|
+
note?: string;
|
|
15
|
+
onClick?: (event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;
|
|
16
|
+
/** The rows of this row's submenu; `null` or `[]` is an empty one. */
|
|
17
|
+
submenu?: MenuItemData[] | null;
|
|
18
|
+
emptyLabel?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/** A divider between groups of rows. */
|
|
21
|
+
interface MenuDividerData {
|
|
22
|
+
type: 'divider';
|
|
23
|
+
}
|
|
24
|
+
type MenuItemData = MenuItemRowData | MenuDividerData;
|
|
25
|
+
interface MenuItemsProps {
|
|
26
|
+
items: readonly MenuItemData[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @description Menu rows from data: each entry a `MenuItem` (its label as `label`, its
|
|
30
|
+
* submenu as more entries) or `{ type: 'divider' }`. It renders the same rows JSX children
|
|
31
|
+
* would, so the two behave alike - inside a `MenuList`, a `Menu` or a `ContextMenu`.
|
|
32
|
+
*/
|
|
33
|
+
declare function MenuItems({ items }: Readonly<MenuItemsProps>): import("react").JSX.Element[];
|
|
34
|
+
//#endregion
|
|
35
|
+
export { MenuItemsProps as a, MenuItems as i, MenuItemData as n, MenuItemRowData as r, MenuDividerData as t };
|
|
@@ -1,6 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { CreateStyledComponent, FilteringStyledOptions, Interpolation, StyledOptions } from "@emotion/styled";
|
|
2
|
+
import { CSSObject, PropsOf, css as css$1, keyframes } from "@emotion/react";
|
|
3
|
+
import { BorderProps, ContainerQueries, FlexboxProps, LayoutFrameProps, LayoutProps, PositionProps, QueryHelpers, SpaceProps, SpanProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
4
|
+
import { createShouldForwardProp, props } from "@soroush.tech/styled-system/should-forward-prop";
|
|
5
|
+
import { CSSProperties, ComponentClass, ComponentProps, ComponentType, ElementType, HTMLAttributes, JSX, ReactNode, Ref } from "react";
|
|
6
|
+
//#region src/View/View.d.ts
|
|
7
|
+
/** Valid values for the color prop - derived from theme.text keys. */
|
|
8
|
+
type ViewColorToken = keyof Theme['text'];
|
|
9
|
+
/** Valid values for the bg prop - derived from theme.background keys. */
|
|
10
|
+
type ViewBackgroundToken = keyof Theme['background'];
|
|
11
|
+
/** Valid values for the borderColor prop - derived from theme.border keys. */
|
|
12
|
+
type ViewBorderColorToken = keyof Theme['border'];
|
|
13
|
+
/** Valid values for the borderWidth prop - derived from theme.borderWidths keys. */
|
|
14
|
+
type ViewBorderWidthToken = keyof Theme['borderWidths'];
|
|
15
|
+
/** Valid theme tokens for border-radius. Raw CSS pixel values (e.g. '6px', '9999px') are also accepted. */
|
|
16
|
+
type ViewBorderRadiusToken = keyof Theme['radii'] | `${number}px`;
|
|
17
|
+
interface ViewProps extends Omit<HTMLAttributes<HTMLElement>, 'color'>, SpaceProps<Theme>, LayoutProps<Theme>, TypographyProps<Theme>, Omit<BorderProps<Theme>, 'borderColor' | 'borderWidth' | 'borderRadius'>, PositionProps<Theme>, SpanProps<Theme>, LayoutFrameProps<Theme> {
|
|
18
|
+
bg?: ViewBackgroundToken;
|
|
19
|
+
/** Resolves against theme.border - light · primary · dark */
|
|
20
|
+
borderColor?: ViewBorderColorToken;
|
|
21
|
+
/** Resolves against theme.borderWidths - none · thin · base · thick */
|
|
22
|
+
borderWidth?: ViewBorderWidthToken;
|
|
23
|
+
/** Theme tokens: sq · sm · md · lg. Also accepts raw CSS pixel values e.g. '6px', '9999px'. */
|
|
24
|
+
borderRadius?: ViewBorderRadiusToken;
|
|
25
|
+
opacity?: number;
|
|
26
|
+
cursor?: CSSProperties['cursor'];
|
|
27
|
+
/** CSS order for flex/grid item placement. Accepts responsive arrays. */
|
|
28
|
+
order?: FlexboxProps<Theme>['order'];
|
|
29
|
+
}
|
|
30
|
+
declare const View: import("@emotion/styled").StyledComponent<{
|
|
31
|
+
theme?: Theme;
|
|
32
|
+
as?: React.ElementType;
|
|
33
|
+
} & ViewProps, import("react").DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/Flex/Flex.d.ts
|
|
36
|
+
/** Valid values for the gap prop - derived from theme.space keys. */
|
|
37
|
+
type GapToken = keyof Theme['space'];
|
|
38
|
+
/**
|
|
39
|
+
* `layout` puts the flex container on the page frame, as on any View: the theme's margin and
|
|
40
|
+
* max width per breakpoint. The flexbox stays as set - a column by default, a row with
|
|
41
|
+
* `flexDirection="row"`. Columns are Grid's: content on the page columns uses `<Grid layout>`.
|
|
42
|
+
*/
|
|
43
|
+
interface FlexProps extends ViewProps, FlexboxProps<Theme> {}
|
|
44
|
+
declare const Flex: import("@emotion/styled").StyledComponent<{
|
|
45
|
+
theme?: Theme;
|
|
46
|
+
as?: React.ElementType;
|
|
47
|
+
} & ViewProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
48
|
+
theme?: Theme;
|
|
49
|
+
} & FlexProps, {}, {}>;
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/Paper/Paper.d.ts
|
|
52
|
+
type PaperElevation = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
|
|
53
|
+
interface PaperProps extends FlexProps {
|
|
54
|
+
/** Shadow depth - 0 (flat) to 24 (highest). Resolves to theme.shadows[n]. Default: 1. */
|
|
55
|
+
elevation?: PaperElevation;
|
|
56
|
+
/** CSS transition for surface animations (e.g. hover elevation change). */
|
|
57
|
+
transition?: CSSProperties['transition'];
|
|
58
|
+
/** Resolves against theme.border - light · primary · dark */
|
|
59
|
+
borderColor?: keyof Theme['border'];
|
|
60
|
+
/** Resolves against theme.borderWidths - none · thin · base · thick */
|
|
61
|
+
borderWidth?: keyof Theme['borderWidths'];
|
|
62
|
+
/** CSS border-style value (e.g. 'solid', 'dashed'). */
|
|
63
|
+
borderStyle?: CSSProperties['borderStyle'];
|
|
64
|
+
/** Renders the surface as a different element (e.g. 'section'). */
|
|
65
|
+
as?: ElementType;
|
|
66
|
+
}
|
|
67
|
+
declare function Paper({ elevation, p, bg, borderRadius, ...rest }: Readonly<PaperProps>): import("react").JSX.Element;
|
|
68
|
+
//#endregion
|
|
4
69
|
//#region src/theme/breakpoints.d.ts
|
|
5
70
|
/**
|
|
6
71
|
* The query helpers a theme's breakpoint scale carries: `up` / `down` / `only` / `between` /
|
|
@@ -402,6 +467,15 @@ interface ButtonVariants {
|
|
|
402
467
|
outlined: true;
|
|
403
468
|
text: true;
|
|
404
469
|
}
|
|
470
|
+
/** The defaults a theme may set for every `Breadcrumbs` - its `expandLabel` gives a trail its language. */
|
|
471
|
+
interface BreadcrumbsOwnerState {
|
|
472
|
+
separator?: ReactNode;
|
|
473
|
+
maxItems?: number;
|
|
474
|
+
itemsBeforeCollapse?: number;
|
|
475
|
+
itemsAfterCollapse?: number;
|
|
476
|
+
expandLabel?: string;
|
|
477
|
+
color?: keyof ThemeText;
|
|
478
|
+
}
|
|
405
479
|
/** The resolved props Button's styled roots receive - what `ownerState` exposes. */
|
|
406
480
|
interface ButtonOwnerState {
|
|
407
481
|
variant?: keyof ButtonVariants;
|
|
@@ -411,6 +485,69 @@ interface ButtonOwnerState {
|
|
|
411
485
|
fullWidth?: boolean;
|
|
412
486
|
disabled?: boolean;
|
|
413
487
|
}
|
|
488
|
+
/** Tabs' look values - augment to register new ones (then style them via `variants`). */
|
|
489
|
+
interface TabsVariants {
|
|
490
|
+
underline: true;
|
|
491
|
+
boxed: true;
|
|
492
|
+
enclosed: true;
|
|
493
|
+
}
|
|
494
|
+
/** The resolved props Tabs' styled elements receive - what `ownerState` exposes. */
|
|
495
|
+
interface TabsOwnerState {
|
|
496
|
+
variant?: keyof TabsVariants;
|
|
497
|
+
color?: keyof ThemePalette;
|
|
498
|
+
size?: keyof ThemeSizes;
|
|
499
|
+
orientation?: 'horizontal' | 'vertical';
|
|
500
|
+
fullWidth?: boolean;
|
|
501
|
+
hasDivider?: boolean;
|
|
502
|
+
selectedBg?: keyof ThemeBackground;
|
|
503
|
+
}
|
|
504
|
+
/** The defaults a theme may set for every `Menu`. */
|
|
505
|
+
interface MenuOwnerState {
|
|
506
|
+
align?: 'start' | 'end';
|
|
507
|
+
marginThreshold?: keyof ThemeSpace;
|
|
508
|
+
elevation?: PaperElevation;
|
|
509
|
+
layer?: keyof ThemeZOrder;
|
|
510
|
+
color?: keyof ThemePalette;
|
|
511
|
+
textColor?: keyof ThemeText;
|
|
512
|
+
size?: keyof ThemeSizes;
|
|
513
|
+
dense?: boolean;
|
|
514
|
+
}
|
|
515
|
+
/** The defaults a theme may set for every `ContextMenu` - a `Menu`'s, placed at the pointer. */
|
|
516
|
+
type ContextMenuOwnerState = Omit<MenuOwnerState, 'align'>;
|
|
517
|
+
/** The defaults a theme may set for every `MenuList` - and so for its rows. */
|
|
518
|
+
interface MenuListOwnerState {
|
|
519
|
+
color?: keyof ThemePalette;
|
|
520
|
+
textColor?: keyof ThemeText;
|
|
521
|
+
size?: keyof ThemeSizes;
|
|
522
|
+
dense?: boolean;
|
|
523
|
+
shouldWrap?: boolean;
|
|
524
|
+
}
|
|
525
|
+
/** The defaults a theme may set for every `MenuItem` - a list's own values win. */
|
|
526
|
+
interface MenuItemOwnerState {
|
|
527
|
+
color?: keyof ThemePalette;
|
|
528
|
+
textColor?: keyof ThemeText;
|
|
529
|
+
size?: keyof ThemeSizes;
|
|
530
|
+
dense?: boolean;
|
|
531
|
+
}
|
|
532
|
+
/** The defaults a theme may set for every `Tab`. */
|
|
533
|
+
interface TabOwnerState {
|
|
534
|
+
isWrapped?: boolean;
|
|
535
|
+
bg?: keyof ThemeBackground;
|
|
536
|
+
borderRadius?: keyof ThemeRadii;
|
|
537
|
+
color?: keyof ThemePalette;
|
|
538
|
+
textColor?: keyof ThemeText;
|
|
539
|
+
size?: keyof ThemeSizes;
|
|
540
|
+
selectedBg?: keyof ThemeBackground;
|
|
541
|
+
}
|
|
542
|
+
/** The defaults a theme may set for every `TabScrollButton`. */
|
|
543
|
+
interface TabScrollButtonOwnerState {
|
|
544
|
+
color?: keyof ThemePalette;
|
|
545
|
+
textColor?: keyof ThemeText;
|
|
546
|
+
}
|
|
547
|
+
/** The defaults a theme may set for every `TabPanel`. */
|
|
548
|
+
interface TabPanelOwnerState {
|
|
549
|
+
shouldKeepMounted?: boolean;
|
|
550
|
+
}
|
|
414
551
|
/** Token-typed Typography props a theme may set for Card's title/caption slots. */
|
|
415
552
|
interface CardSlotTypographyProps {
|
|
416
553
|
variant?: keyof ThemeTypographyVariants;
|
|
@@ -454,11 +591,13 @@ interface ThemeComponents {
|
|
|
454
591
|
AppBar?: ComponentConfig;
|
|
455
592
|
Avatar?: ComponentConfig<Record<string, unknown>, 'root' | 'img'>;
|
|
456
593
|
Backdrop?: ComponentConfig;
|
|
594
|
+
Breadcrumbs?: ComponentConfig<BreadcrumbsOwnerState, 'root' | 'list' | 'item' | 'separator' | 'collapsed' | 'collapsedIcon'>;
|
|
457
595
|
Button?: ComponentConfig<ButtonOwnerState, 'root' | 'label' | 'icon' | 'loader'>;
|
|
458
596
|
ButtonGroup?: ComponentConfig;
|
|
459
597
|
Card?: ComponentConfig<CardOwnerState, 'root' | 'title' | 'caption' | 'icon'>;
|
|
460
598
|
Checkbox?: ComponentConfig<Record<string, unknown>, 'root' | 'input' | 'icon'>;
|
|
461
599
|
CircularProgress?: ComponentConfig<Record<string, unknown>, 'root' | 'track' | 'circle'>;
|
|
600
|
+
ContextMenu?: ComponentConfig<ContextMenuOwnerState, 'root' | 'paper'>;
|
|
462
601
|
Drawer?: ComponentConfig;
|
|
463
602
|
Flex?: ComponentConfig;
|
|
464
603
|
FocusTrap?: ComponentConfig;
|
|
@@ -471,7 +610,10 @@ interface ThemeComponents {
|
|
|
471
610
|
Image?: ComponentConfig;
|
|
472
611
|
LinearProgress?: ComponentConfig<Record<string, unknown>, 'root' | 'track' | 'dash' | 'bar' | 'traveler' | 'segment' | 'secondaryBar'>;
|
|
473
612
|
Link?: ComponentConfig;
|
|
474
|
-
|
|
613
|
+
Menu?: ComponentConfig<MenuOwnerState, 'root' | 'paper'>;
|
|
614
|
+
MenuDivider?: ComponentConfig;
|
|
615
|
+
MenuItem?: ComponentConfig<MenuItemOwnerState, 'root' | 'check' | 'startIcon' | 'label' | 'shortcut' | 'submenuIcon' | 'entry' | 'secondaryAction'>;
|
|
616
|
+
MenuList?: ComponentConfig<MenuListOwnerState>;
|
|
475
617
|
Modal?: ComponentConfig;
|
|
476
618
|
NativeSelect?: ComponentConfig<Record<string, unknown>, 'root' | 'select' | 'icon'>;
|
|
477
619
|
Pagination?: ComponentConfig<Record<string, unknown>, 'root' | 'list'>;
|
|
@@ -486,6 +628,7 @@ interface ThemeComponents {
|
|
|
486
628
|
SidebarItem?: ComponentConfig;
|
|
487
629
|
Skeleton?: ComponentConfig<Record<string, unknown>, 'root' | 'content'>;
|
|
488
630
|
Switch?: ComponentConfig<Record<string, unknown>, 'root' | 'input' | 'track' | 'thumb'>;
|
|
631
|
+
Tab?: ComponentConfig<TabOwnerState, 'root' | 'label' | 'icon' | 'secondaryAction' | 'close'>;
|
|
489
632
|
Table?: ComponentConfig;
|
|
490
633
|
TableBody?: ComponentConfig;
|
|
491
634
|
TableCell?: ComponentConfig;
|
|
@@ -496,6 +639,9 @@ interface ThemeComponents {
|
|
|
496
639
|
TablePaginationActions?: ComponentConfig;
|
|
497
640
|
TableRow?: ComponentConfig;
|
|
498
641
|
TableSortLabel?: ComponentConfig<Record<string, unknown>, 'root' | 'icon'>;
|
|
642
|
+
TabPanel?: ComponentConfig<TabPanelOwnerState>;
|
|
643
|
+
TabScrollButton?: ComponentConfig<TabScrollButtonOwnerState>;
|
|
644
|
+
Tabs?: ComponentConfig<TabsOwnerState, 'root' | 'list' | 'indicator' | 'startContent' | 'endContent' | 'scrollButton' | 'overflowButton' | 'overflowClose'>;
|
|
499
645
|
TextInput?: ComponentConfig<Record<string, unknown>, 'root' | 'input'>;
|
|
500
646
|
ToggleButton?: ComponentConfig;
|
|
501
647
|
ToggleButtonGroup?: ComponentConfig;
|
|
@@ -601,10 +747,10 @@ declare const avatar: {
|
|
|
601
747
|
};
|
|
602
748
|
declare const icon: ThemeIconSizes;
|
|
603
749
|
declare const sizes: ThemeSizes;
|
|
604
|
-
declare const space: ThemeSpace;
|
|
750
|
+
declare const space$1: ThemeSpace;
|
|
605
751
|
declare const breakpoints: ThemeBreakpoints & BreakpointHelpers;
|
|
606
|
-
declare const layout: ThemeLayout;
|
|
607
|
-
declare const typography: ThemeTypographyVariants;
|
|
752
|
+
declare const layout$1: ThemeLayout;
|
|
753
|
+
declare const typography$1: ThemeTypographyVariants;
|
|
608
754
|
/**
|
|
609
755
|
* The package's complete default theme (dark-schemed). Raw hex only - palettes
|
|
610
756
|
* belong to the consumer, who builds brand themes with `createTheme(baseTheme, ...)`.
|
|
@@ -616,4 +762,67 @@ declare const baseTheme: Theme;
|
|
|
616
762
|
*/
|
|
617
763
|
declare const up: (from: import("@soroush.tech/styled-system").BreakpointInput) => string, down: (to: import("@soroush.tech/styled-system").BreakpointInput) => string, only: (key: string) => string, between: (from: import("@soroush.tech/styled-system").BreakpointInput, to: import("@soroush.tech/styled-system").BreakpointInput) => string, not: (key: string) => string, containerQueries: import("@soroush.tech/styled-system").ContainerQueries;
|
|
618
764
|
//#endregion
|
|
619
|
-
|
|
765
|
+
//#region src/style/styled.d.ts
|
|
766
|
+
/**
|
|
767
|
+
* Design-system additions to Emotion's styled options. A styled root that passes
|
|
768
|
+
* `name` becomes theme-customizable: `theme.components[name]` may contribute
|
|
769
|
+
* `styleOverrides` (per `slot`) and `variants`, appended after the component's
|
|
770
|
+
* own styles so the theme wins the cascade. Roots without `name` are plain
|
|
771
|
+
* Emotion - zero behavior change, zero cost.
|
|
772
|
+
*/
|
|
773
|
+
interface ThemeCustomizationOptions {
|
|
774
|
+
/** `theme.components` key enabling styleOverrides/variants for this root. */
|
|
775
|
+
name?: string;
|
|
776
|
+
/** The `styleOverrides` slot this root maps to. Default: `'root'`. */
|
|
777
|
+
slot?: string;
|
|
778
|
+
/**
|
|
779
|
+
* Styled-system prop parsers (`space`, `layout`, ...) appended AFTER the theme
|
|
780
|
+
* override resolver, so per-instance props (`m`, `p`, `width`, ...) always beat
|
|
781
|
+
* theme `styleOverrides`.
|
|
782
|
+
*/
|
|
783
|
+
systemProps?: ReadonlyArray<Interpolation<never>>;
|
|
784
|
+
/**
|
|
785
|
+
* Custom mapping from render props to applied override styles - replaces the
|
|
786
|
+
* default `styleOverrides[slot]` lookup (for prop-keyed override keys).
|
|
787
|
+
*/
|
|
788
|
+
overridesResolver?: (props: Record<string, unknown>, styleOverrides: Record<string, unknown>) => unknown;
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* The `styled.div`, `styled.span`, ... tag shorthands - mirrors Emotion's own
|
|
792
|
+
* `StyledTags`, retyped against this package's `Theme` instead of Emotion's
|
|
793
|
+
* (otherwise-empty) one, so `${({ theme }) => theme.space[2]}` template
|
|
794
|
+
* interpolations resolve to the real theme shape.
|
|
795
|
+
*/
|
|
796
|
+
type StyledTags = { [Tag in keyof JSX.IntrinsicElements]: CreateStyledComponent<{
|
|
797
|
+
theme?: Theme;
|
|
798
|
+
as?: React.ElementType;
|
|
799
|
+
}, JSX.IntrinsicElements[Tag]>; };
|
|
800
|
+
/** Overloads mirroring Emotion's, with the theme-customization options added. */
|
|
801
|
+
interface CreateThemedStyled extends StyledTags {
|
|
802
|
+
<C extends ComponentClass<ComponentProps<C>>, ForwardedProps extends keyof ComponentProps<C> & string = keyof ComponentProps<C> & string>(component: C, options: FilteringStyledOptions<ComponentProps<C>, ForwardedProps> & ThemeCustomizationOptions): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & {
|
|
803
|
+
theme?: Theme;
|
|
804
|
+
}, {}, {
|
|
805
|
+
ref?: Ref<InstanceType<C>>;
|
|
806
|
+
}>;
|
|
807
|
+
<C extends ComponentType<ComponentProps<C>>, ForwardedProps extends keyof ComponentProps<C> & string = keyof ComponentProps<C> & string>(component: C, options: FilteringStyledOptions<ComponentProps<C>, ForwardedProps> & ThemeCustomizationOptions): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & {
|
|
808
|
+
theme?: Theme;
|
|
809
|
+
}>;
|
|
810
|
+
<C extends ComponentType<ComponentProps<C>>>(component: C, options?: StyledOptions<ComponentProps<C>> & ThemeCustomizationOptions): CreateStyledComponent<PropsOf<C> & {
|
|
811
|
+
theme?: Theme;
|
|
812
|
+
}>;
|
|
813
|
+
<Tag extends keyof JSX.IntrinsicElements, ForwardedProps extends keyof JSX.IntrinsicElements[Tag] & string = keyof JSX.IntrinsicElements[Tag] & string>(tag: Tag, options: FilteringStyledOptions<JSX.IntrinsicElements[Tag], ForwardedProps> & ThemeCustomizationOptions): CreateStyledComponent<{
|
|
814
|
+
theme?: Theme;
|
|
815
|
+
as?: React.ElementType;
|
|
816
|
+
}, Pick<JSX.IntrinsicElements[Tag], ForwardedProps>>;
|
|
817
|
+
<Tag extends keyof JSX.IntrinsicElements>(tag: Tag, options?: StyledOptions<JSX.IntrinsicElements[Tag]> & ThemeCustomizationOptions): CreateStyledComponent<{
|
|
818
|
+
theme?: Theme;
|
|
819
|
+
as?: React.ElementType;
|
|
820
|
+
}, JSX.IntrinsicElements[Tag]>;
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* The design system's `styled` - Emotion's styled plus theme-level component
|
|
824
|
+
* customization (`theme.components[name].styleOverrides` / `.variants`).
|
|
825
|
+
*/
|
|
826
|
+
declare const styled: CreateThemedStyled;
|
|
827
|
+
//#endregion
|
|
828
|
+
export { ThemeLetterSpacings as $, MenuOwnerState as A, sizes as At, TabsVariants as B, Paper as Bt, LayoutEntry as C, icon as Ct, LayoutSpace as D, not as Dt, LayoutPanels as E, lineHeights as Et, SizeEntry as F, DeepPartial as Ft, ThemeBorderWidths as G, GapToken as Gt, ThemeAvatarSizes as H, PaperProps as Ht, TabOwnerState as I, ThemeOverride as It, ThemeDefaults as J, ViewBorderColorToken as Jt, ThemeBreakpoints as K, View as Kt, TabPanelOwnerState as L, createTheme as Lt, PaletteColor as M, typography$1 as Mt, PaletteEntry as N, up as Nt, MenuItemOwnerState as O, only as Ot, PressableOwnerState as P, zOrder as Pt, ThemeLayout as Q, ViewProps as Qt, TabScrollButtonOwnerState as R, BreakpointHelpers as Rt, LayoutContent as S, fonts as St, LayoutPanel as T, letterSpacings as Tt, ThemeBackground as U, Flex as Ut, Theme as V, PaperElevation as Vt, ThemeBorder as W, FlexProps as Wt, ThemeFonts as X, ViewBorderWidthToken as Xt, ThemeFontWeights as Y, ViewBorderRadiusToken as Yt, ThemeIconSizes as Z, ViewColorToken as Zt, ComponentStyle as _, breakpoints as _t, ThemeCustomizationOptions as a, ThemeSkeleton as at, DefaultBreakpoints as b, fontSizes as bt, BreakpointKey as c, ThemeText as ct, ButtonVariants as d, TypographyVariant as dt, ThemeLineHeights as et, CSSObject$1 as f, TypographyVariantStyle as ft, ComponentConfig as g, borderWidths as gt, CardSlotTypographyProps as h, between as ht, props as i, ThemeSizes as it, OpenScale as j, space$1 as jt, MenuListOwnerState as k, radii as kt, BreakpointOverrides as l, ThemeTypographyVariants as lt, CardSlotIconProps as m, baseTheme as mt, css$1 as n, ThemeRadii as nt, styled as o, ThemeSpace as ot, CardOwnerState as p, avatar as pt, ThemeComponents as q, ViewBackgroundToken as qt, keyframes as r, ThemeShadow as rt, BreadcrumbsOwnerState as s, ThemeSwitch as st, createShouldForwardProp as t, ThemePalette as tt, ButtonOwnerState as u, ThemeZOrder as ut, ComponentVariant as v, containerQueries as vt, LayoutLength as w, layout$1 as wt, LayoutBars as x, fontWeights as xt, ContextMenuOwnerState as y, down as yt, TabsOwnerState as z, withBreakpointHelpers as zt };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { V as Theme, Vt as PaperElevation } from "./index-DmJ7yWWi.cjs";
|
|
2
|
+
import "./index-DBteSahY.cjs";
|
|
3
|
+
import { t as MenuItemValue } from "./MenuListContext-vujGcRk9.cjs";
|
|
4
|
+
import { n as MenuItemData } from "./index-DQcnJ5H4.cjs";
|
|
5
|
+
import { KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref, SyntheticEvent } from "react";
|
|
6
|
+
//#region src/Menu/utils/getMenuOrigins.d.ts
|
|
7
|
+
/** Which edge of its trigger a menu lines up with: the start edge, or the end edge. */
|
|
8
|
+
type MenuAlign = 'start' | 'end';
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/Menu/Menu/Menu.d.ts
|
|
11
|
+
/** Why a menu closed: Escape, a chosen row, its trigger pressed again, or focus leaving it. */
|
|
12
|
+
type MenuCloseReason = 'escapeKey' | 'select' | 'triggerClick' | 'blur';
|
|
13
|
+
/** A step a menu bar takes from this menu to the previous (`-1`) or next (`1`) one. */
|
|
14
|
+
type MenuStep = -1 | 1;
|
|
15
|
+
interface TriggerProps {
|
|
16
|
+
id?: string;
|
|
17
|
+
ref?: Ref<HTMLElement>;
|
|
18
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
19
|
+
onKeyDown?: (event: KeyboardEvent<HTMLElement>) => void;
|
|
20
|
+
}
|
|
21
|
+
interface MenuProps {
|
|
22
|
+
/** The element that opens the menu - a `Button`, a `Pressable`... It is given `aria-haspopup`, `aria-expanded` and `aria-controls`, and must take a `ref` for focus to return to it. */
|
|
23
|
+
trigger: ReactElement<TriggerProps>;
|
|
24
|
+
/** `MenuItem` rows and `MenuDivider`s. */
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
/** The rows as data, in place of `children`. */
|
|
27
|
+
items?: readonly MenuItemData[];
|
|
28
|
+
/** Controlled open state. When set, the menu never opens or closes on its own - it asks through `onOpen` / `onClose`. */
|
|
29
|
+
isOpen?: boolean;
|
|
30
|
+
/** Uncontrolled initial open state. Default: `false`. */
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
/** Fired when the menu asks to open. */
|
|
33
|
+
onOpen?: () => void;
|
|
34
|
+
/** Fired when the menu asks to close, with why. */
|
|
35
|
+
onClose?: (event: SyntheticEvent, reason: MenuCloseReason) => void;
|
|
36
|
+
/** Fired when Left or Right has nowhere further to go inside the menu - so an owner such as a menu bar can step to the next menu. Swapped in right-to-left pages. */
|
|
37
|
+
onStep?: (step: MenuStep) => void;
|
|
38
|
+
/** Fired with a row's `value` when a row that has one is chosen. */
|
|
39
|
+
onSelect?: (value: MenuItemValue) => void;
|
|
40
|
+
/** Which edge of the trigger the list lines up with. Mirrored in right-to-left pages. Default: `'start'`. */
|
|
41
|
+
align?: MenuAlign;
|
|
42
|
+
/** The least room between the list and the window's edge - a `theme.space` key. Default: `2`. */
|
|
43
|
+
marginThreshold?: keyof Theme['space'];
|
|
44
|
+
/** Shadow depth of the surface. Default: `8`. */
|
|
45
|
+
elevation?: PaperElevation;
|
|
46
|
+
/** Stacking layer from `theme.zOrder`. Default: `'modal'`. */
|
|
47
|
+
layer?: keyof Theme['zOrder'];
|
|
48
|
+
/** Shown as one disabled row when the menu has no rows. Without it, the list stays empty. */
|
|
49
|
+
emptyLabel?: ReactNode;
|
|
50
|
+
/** Accent color for every row - resolves to `theme.palette[color]`. */
|
|
51
|
+
color?: keyof Theme['palette'];
|
|
52
|
+
/** Base text color for every row - resolves against `theme.text`. */
|
|
53
|
+
textColor?: keyof Theme['text'];
|
|
54
|
+
/** Density token for every row - resolves against `theme.sizes`. */
|
|
55
|
+
size?: keyof Theme['sizes'];
|
|
56
|
+
/** Compact vertical padding for every row. */
|
|
57
|
+
dense?: boolean;
|
|
58
|
+
/** Names the list. Default: the trigger names it (`aria-labelledby`). */
|
|
59
|
+
'aria-label'?: string;
|
|
60
|
+
className?: string;
|
|
61
|
+
'data-testid'?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @description A trigger and the `MenuList` it opens. Not modal: no focus trap, no scroll
|
|
65
|
+
* lock, nothing laid over the page, so the pointer passes over it freely. The list is
|
|
66
|
+
* placed `position: fixed` in the window next to the trigger, so a panel's overflow
|
|
67
|
+
* can't clip it, but stays inside the menu's own box in the DOM. Escape or a chosen row
|
|
68
|
+
* closes it and returns focus to the trigger; focus leaving it closes it where it went.
|
|
69
|
+
*/
|
|
70
|
+
declare function Menu({ trigger, children, items, isOpen: isOpenProp, defaultOpen, onOpen, onClose, onStep, onSelect, align: alignProp, marginThreshold: marginThresholdProp, elevation: elevationProp, layer: layerProp, emptyLabel, color: colorProp, textColor: textColorProp, size: sizeProp, dense: denseProp, 'aria-label': ariaLabel, className, 'data-testid': dataTestid }: Readonly<MenuProps>): import("react").JSX.Element;
|
|
71
|
+
//#endregion
|
|
72
|
+
export { MenuAlign as a, MenuStep as i, MenuCloseReason as n, MenuProps as r, Menu as t };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { V as Theme } from "./index-CVNJEUwJ.mjs";
|
|
2
|
+
import { t as MenuItemValue } from "./MenuListContext-Dml16k0X.mjs";
|
|
3
|
+
import { ElementType, KeyboardEvent, MouseEvent, ReactNode } from "react";
|
|
4
|
+
//#region src/MenuItem/MenuItem.d.ts
|
|
5
|
+
type MenuItemColor = keyof Theme['palette'];
|
|
6
|
+
type MenuItemSize = keyof Theme['sizes'];
|
|
7
|
+
type MenuItemTextColor = keyof Theme['text'];
|
|
8
|
+
/** A menu row's role: a command, the current choice of a group, or an on/off setting. */
|
|
9
|
+
type MenuItemRole = 'menuitem' | 'menuitemradio' | 'menuitemcheckbox';
|
|
10
|
+
interface MenuItemProps {
|
|
11
|
+
/** The value this row represents - reported to `Select`'s `onChange`, or `MenuList`'s `onSelect`. Required inside a `Select`. */
|
|
12
|
+
value?: MenuItemValue;
|
|
13
|
+
/** The row label. */
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
/** The element used for the root node - a tag name or a component. Default: `'li'`. */
|
|
16
|
+
as?: ElementType;
|
|
17
|
+
/** Disables the row - it cannot be highlighted or chosen. In a menu the keys skip it. */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Marks the row as the current selection. Injected by `Select`; in a menu it sets `aria-checked` on `menuitemradio` / `menuitemcheckbox` rows. */
|
|
20
|
+
selected?: boolean;
|
|
21
|
+
/** Marks the option as the keyboard-highlighted row. Injected by `Select`. */
|
|
22
|
+
highlighted?: boolean;
|
|
23
|
+
/** Reserves a leading checkmark slot for multi-select menus. Injected by `Select`. */
|
|
24
|
+
multiple?: boolean;
|
|
25
|
+
/** Accent color - resolves to `theme.palette[color]`. Injected by `Select` or `MenuList`; the item's own value wins. Default: 'primary', overridable via `theme.defaults.color`. */
|
|
26
|
+
color?: MenuItemColor;
|
|
27
|
+
/** Base text color of the row - resolves against `theme.text`. When unset, falls back to the accent color's `main`. Injected by `Select` or `MenuList`; the item's own value wins. */
|
|
28
|
+
textColor?: MenuItemTextColor;
|
|
29
|
+
/** Density token - resolves against `theme.sizes`. Injected by `Select` or `MenuList`. Default: 'md', overridable via `theme.defaults.size`. */
|
|
30
|
+
size?: MenuItemSize;
|
|
31
|
+
/** Compact vertical padding, independent of `size`. Default: `false`. */
|
|
32
|
+
dense?: boolean;
|
|
33
|
+
/** Remove the left and right padding. Default: `false`. */
|
|
34
|
+
disableGutters?: boolean;
|
|
35
|
+
/** Add a 1px bottom border to separate the row. Default: `false`. */
|
|
36
|
+
divider?: boolean;
|
|
37
|
+
/** Focus the row on first mount, and whenever `autoFocus` flips from `false` to `true`. Default: `false`. */
|
|
38
|
+
autoFocus?: boolean;
|
|
39
|
+
/** Class applied only while the row has keyboard focus - a `:focus-visible` hook. */
|
|
40
|
+
focusVisibleClassName?: string;
|
|
41
|
+
/** Fired with `value` when the option is chosen. Injected by `Select`. */
|
|
42
|
+
onSelect?: (value: MenuItemValue) => void;
|
|
43
|
+
/** Menu only: the row's role. Default: `'menuitem'`. */
|
|
44
|
+
role?: MenuItemRole;
|
|
45
|
+
/** Menu only: an icon in the leading column. Every row keeps the column, so labels line up; a selected checkable row shows a tick there. */
|
|
46
|
+
startIcon?: ReactNode;
|
|
47
|
+
/** Menu only: the row's keyboard shortcut, shown at its end. A string is also given to the row as `aria-keyshortcuts`. */
|
|
48
|
+
shortcut?: ReactNode;
|
|
49
|
+
/** Menu only: why the row is off - its tooltip and accessible description. */
|
|
50
|
+
note?: string;
|
|
51
|
+
/** Menu only: fired when the row is chosen, by a click, Enter or Space. */
|
|
52
|
+
onClick?: (event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;
|
|
53
|
+
/** Menu only: the rows of a submenu this row opens. `null` or `[]` is a submenu with nothing in it yet - see `emptyLabel`. */
|
|
54
|
+
submenu?: ReactNode;
|
|
55
|
+
/** Menu only: shown as one disabled row in an empty submenu ("Coming soon"). Without it, the submenu stays empty. */
|
|
56
|
+
emptyLabel?: ReactNode;
|
|
57
|
+
/** Menu only: a control of the row's own beside it - a close button. It sits in the row's `role="none"` entry, out of the arrow keys and hidden from assistive technology (a menu owns rows alone), so it is the pointer's: give it `tabIndex={-1}`, and the row a key of its own through `MenuList`'s `onKeyDown`. */
|
|
58
|
+
secondaryAction?: ReactNode;
|
|
59
|
+
id?: string;
|
|
60
|
+
className?: string;
|
|
61
|
+
'data-testid'?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @description A row of a list. Inside a `MenuList` it is a menu row - a `menuitem`
|
|
65
|
+
* (or `menuitemradio` / `menuitemcheckbox`) with a leading icon column, its label and a
|
|
66
|
+
* trailing shortcut, chosen by a click, Enter or Space. Anywhere else it is `Select`'s
|
|
67
|
+
* `<li role="option">` (override via `as`), whose selection, highlight and density props
|
|
68
|
+
* `Select` injects; used on its own it renders a static, styled row.
|
|
69
|
+
*/
|
|
70
|
+
declare function MenuItem({ value, children, as, disabled, selected, highlighted, multiple, color: colorProp, textColor: textColorProp, size: sizeProp, dense: denseProp, disableGutters, divider, autoFocus, focusVisibleClassName, onSelect, role, startIcon, shortcut, note, onClick, submenu, emptyLabel, secondaryAction, id, className, 'data-testid': dataTestid }: Readonly<MenuItemProps>): import("react").JSX.Element;
|
|
71
|
+
//#endregion
|
|
72
|
+
export { MenuItemSize as a, MenuItemRole as i, MenuItemColor as n, MenuItemTextColor as o, MenuItemProps as r, MenuItem as t };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { B as TabsVariants, V as Theme } from "./index-CVNJEUwJ.mjs";
|
|
2
|
+
import "./index-BVPrG1L0.mjs";
|
|
3
|
+
import { t as TabValue } from "./TabsContext-DqyxdmGW.mjs";
|
|
4
|
+
import { n as TabScrollButtonProps } from "./index-BjPX49XA.mjs";
|
|
5
|
+
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
6
|
+
import { ComponentType, ReactNode, Ref } from "react";
|
|
7
|
+
//#region src/Tabs/Tabs/Tabs.d.ts
|
|
8
|
+
type TabsVariant = keyof TabsVariants;
|
|
9
|
+
type TabsOrientation = 'horizontal' | 'vertical';
|
|
10
|
+
/** What the row does when its tabs don't fit: scroll, list the rest in a menu, or nothing. */
|
|
11
|
+
type TabsOverflowBehavior = 'scroll' | 'menu' | 'none';
|
|
12
|
+
/** When a scrolling row shows its scroll buttons. */
|
|
13
|
+
type TabsScrollButtons = 'auto' | 'always' | 'never';
|
|
14
|
+
/** What `action` exposes. */
|
|
15
|
+
interface TabsActions {
|
|
16
|
+
/** Re-measures the selected tab for the indicator - after a font loads or a label changes. */
|
|
17
|
+
updateIndicator: () => void;
|
|
18
|
+
/** Re-reads whether the tabs overflow - for the scroll buttons, or which tabs go to the menu. */
|
|
19
|
+
updateOverflow: () => void;
|
|
20
|
+
}
|
|
21
|
+
interface TabsProps extends SpaceProps<Theme> {
|
|
22
|
+
/** `Tab`s. */
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
/** The selected tab's value - `null` for none. Controlled with `onChange`. */
|
|
25
|
+
value?: TabValue | null;
|
|
26
|
+
/** The selected tab's value at first, when uncontrolled. */
|
|
27
|
+
defaultValue?: TabValue | null;
|
|
28
|
+
/** Fired with a tab's value when it is chosen. */
|
|
29
|
+
onChange?: (value: TabValue) => void;
|
|
30
|
+
/** Fired with a closable tab's value when its close button, a middle click or Delete closes it. Removing the tab, and picking the next selection, are the app's. */
|
|
31
|
+
onTabClose?: (value: TabValue) => void;
|
|
32
|
+
/** `'nav'` makes it a navigation of links or buttons (`aria-current="page"`) rather than a `tablist`. Default: `'div'`. */
|
|
33
|
+
as?: 'div' | 'nav';
|
|
34
|
+
/** Default: `'horizontal'`. */
|
|
35
|
+
orientation?: TabsOrientation;
|
|
36
|
+
/** The look: an indicator under the selected tab, or the selected tab boxed. Default: `'underline'`, overridable via `theme.components.Tabs.defaultProps`. */
|
|
37
|
+
variant?: TabsVariant;
|
|
38
|
+
/** The indicator's or outline's color - resolves to `theme.palette[color]`. Default: `'primary'`. */
|
|
39
|
+
color?: keyof Theme['palette'];
|
|
40
|
+
/** The labels' color - resolves against `theme.text`. Default: `'primary'`. */
|
|
41
|
+
textColor?: keyof Theme['text'];
|
|
42
|
+
/** Density token - resolves against `theme.sizes`. Default: `'md'`. */
|
|
43
|
+
size?: keyof Theme['sizes'];
|
|
44
|
+
/** The tabs share the row's width equally. Default: `false`. */
|
|
45
|
+
fullWidth?: boolean;
|
|
46
|
+
/** The tabs sit in the middle of the row. Default: `false`. */
|
|
47
|
+
isCentered?: boolean;
|
|
48
|
+
/** Moving focus with the arrow keys selects as it goes. Default: `false` - Enter or Space selects. */
|
|
49
|
+
shouldSelectOnFocus?: boolean;
|
|
50
|
+
/** What the row does when its tabs don't fit: `'scroll'` - it scrolls, with scroll buttons; `'menu'` - it shows the tabs that fit whole and lists the rest in a menu. Default: `'none'`. */
|
|
51
|
+
overflowBehavior?: TabsOverflowBehavior;
|
|
52
|
+
/** With `overflowBehavior="menu"`: names the button that opens the menu of the tabs that don't fit ("More tabs"). */
|
|
53
|
+
overflowLabel?: string;
|
|
54
|
+
/** With `overflowBehavior="scroll"`: `'auto'` shows them while the tabs overflow, each only while tabs are out of view its way; `'always'` keeps both, disabled at an end; `'never'` hides them. Default: `'auto'`. */
|
|
55
|
+
scrollButtons?: TabsScrollButtons;
|
|
56
|
+
/** Show the scroll buttons on narrow screens too, where swiping does the job. Default: `false`. */
|
|
57
|
+
shouldShowScrollButtonsOnMobile?: boolean;
|
|
58
|
+
/** Show the list's scrollbar. Default: `false`. */
|
|
59
|
+
hasVisibleScrollbar?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* A line along the row's foot (a column's end side), under its own content too. In the
|
|
62
|
+
* enclosed look it runs round the selected tab. Default: `true`, but `false` in the boxed look.
|
|
63
|
+
*/
|
|
64
|
+
hasDivider?: boolean;
|
|
65
|
+
/** The tab strip's ground - resolves against `theme.background`. */
|
|
66
|
+
bg?: keyof Theme['background'];
|
|
67
|
+
/**
|
|
68
|
+
* The selected tab's ground - resolves against `theme.background`. Give its `TabPanel` the same
|
|
69
|
+
* `bg` and the two read as one. Default: `'paper'` in the boxed look, and in the enclosed look
|
|
70
|
+
* without a divider; none otherwise.
|
|
71
|
+
*/
|
|
72
|
+
selectedBg?: keyof Theme['background'];
|
|
73
|
+
/** Components in place of its own: `scrollButton` - a button that takes `TabScrollButton`'s props. */
|
|
74
|
+
slots?: {
|
|
75
|
+
scrollButton?: ComponentType<TabScrollButtonProps>;
|
|
76
|
+
};
|
|
77
|
+
/** Before the tabs - an icon, a button, any component. The arrow keys don't reach it. */
|
|
78
|
+
startContent?: ReactNode;
|
|
79
|
+
/** After the tabs - a toolbar, a "+" button, any component. The arrow keys don't reach it. */
|
|
80
|
+
endContent?: ReactNode;
|
|
81
|
+
/** Imperative handle - see `TabsActions`. */
|
|
82
|
+
action?: Ref<TabsActions>;
|
|
83
|
+
'aria-label'?: string;
|
|
84
|
+
'aria-labelledby'?: string;
|
|
85
|
+
id?: string;
|
|
86
|
+
className?: string;
|
|
87
|
+
'data-testid'?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @description A row of tabs. By default a `tablist`: one tab in the page's tab order, the
|
|
91
|
+
* arrow keys of its orientation moving between tabs, Enter or Space selecting (or moving
|
|
92
|
+
* focus selecting, with `shouldSelectOnFocus`). With `as="nav"`, the same look as a
|
|
93
|
+
* navigation, its current tab marked `aria-current="page"`. Content of the row's own sits
|
|
94
|
+
* before and after the tabs.
|
|
95
|
+
*/
|
|
96
|
+
declare function Tabs({ children, value: valueProp, defaultValue, onChange, onTabClose, as, orientation, variant: variantProp, color: colorProp, textColor, size: sizeProp, fullWidth, isCentered, shouldSelectOnFocus, overflowBehavior, overflowLabel, scrollButtons, shouldShowScrollButtonsOnMobile, hasVisibleScrollbar, hasDivider: hasDividerProp, bg, selectedBg: selectedBgProp, slots, startContent, endContent, action, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, id, className, 'data-testid': dataTestid, ...spaceProps }: Readonly<TabsProps>): import("react").JSX.Element;
|
|
97
|
+
//#endregion
|
|
98
|
+
export { TabsProps as a, TabsOverflowBehavior as i, TabsActions as n, TabsScrollButtons as o, TabsOrientation as r, TabsVariant as s, Tabs as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as PaginationItemSize } from "./index-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { a as PaginationItemSize } from "./index-DIC7HKpP.mjs";
|
|
2
|
+
import "./index-BbgFYfX_.mjs";
|
|
3
3
|
import { HTMLAttributes } from "react";
|
|
4
4
|
//#region src/Table/TablePaginationActions/TablePaginationActions.d.ts
|
|
5
5
|
type TablePaginationActionType = 'first' | 'previous' | 'next' | 'last';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index-DmJ7yWWi.cjs";
|