@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
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { V as Theme } from "./index-DmJ7yWWi.cjs";
|
|
2
|
+
import { t as MenuItemValue } from "./MenuListContext-vujGcRk9.cjs";
|
|
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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as ThemeDefaults, Q as ThemeLayout, V as Theme, q as ThemeComponents } from "./index-DmJ7yWWi.cjs";
|
|
2
2
|
import { ComponentType, ReactNode } from "react";
|
|
3
3
|
//#region src/theme/ThemeProvider.d.ts
|
|
4
4
|
interface ThemeProviderProps {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-DBUwu65Z.cjs";
|
|
3
|
-
import { ButtonHTMLAttributes, ElementType, ReactNode } from "react";
|
|
1
|
+
import { M as PaletteColor, V as Theme } from "./index-CVNJEUwJ.mjs";
|
|
4
2
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
3
|
+
import { ButtonHTMLAttributes, ElementType, ReactNode } from "react";
|
|
5
4
|
//#region src/Pagination/hooks/usePagination.d.ts
|
|
6
5
|
type PaginationItemType = 'page' | 'first' | 'previous' | 'next' | 'last' | 'start-ellipsis' | 'end-ellipsis';
|
|
7
6
|
/** One renderable pagination item - `Pagination` maps these onto `PaginationItem`s. */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import { t as TableCellPadding } from "./TableContext-BiRiYkVZ.mjs";
|
|
1
|
+
import { V as Theme } from "./index-CVNJEUwJ.mjs";
|
|
2
|
+
import { t as TableCellPadding } from "./TableContext-6PgGpUzM.mjs";
|
|
4
3
|
import { BorderProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
5
4
|
import { ElementType, ThHTMLAttributes } from "react";
|
|
6
5
|
//#region src/Table/TableSectionContext.d.ts
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { t as MenuItemValue } from "./MenuListContext-vujGcRk9.cjs";
|
|
2
|
+
import { i as MenuItemRole } from "./index-DCmH5f9I.cjs";
|
|
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,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
3
|
-
import { n as IconProps, r as IconName } from "./index-Ctqajtac.cjs";
|
|
1
|
+
import { V as Theme } from "./index-DmJ7yWWi.cjs";
|
|
2
|
+
import { n as IconProps, r as IconName } from "./index-qlfNErNd.cjs";
|
|
4
3
|
import { ButtonHTMLAttributes } from "react";
|
|
5
4
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
6
5
|
//#region src/Table/TableSortLabel/TableSortLabel.d.ts
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { V as Theme, Vt as PaperElevation } from "./index-CVNJEUwJ.mjs";
|
|
2
|
+
import "./index-_G1osn09.mjs";
|
|
3
|
+
import { t as MenuItemValue } from "./MenuListContext-Dml16k0X.mjs";
|
|
4
|
+
import { n as MenuItemData } from "./index-C3KrFPCj.mjs";
|
|
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 };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
3
|
-
import { n as IconProps, r as IconName } from "./index-DO9J-Fla.mjs";
|
|
1
|
+
import { V as Theme } from "./index-CVNJEUwJ.mjs";
|
|
2
|
+
import { n as IconProps, r as IconName } from "./index-BqpS_Huq.mjs";
|
|
4
3
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
5
4
|
import { ButtonHTMLAttributes } from "react";
|
|
6
5
|
//#region src/Table/TableSortLabel/TableSortLabel.d.ts
|
|
@@ -1,6 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { CreateStyledComponent, FilteringStyledOptions, Interpolation, StyledOptions } from "@emotion/styled";
|
|
2
|
+
import { CSSObject, PropsOf, css, keyframes } from "@emotion/react";
|
|
3
|
+
import { CSSProperties, ComponentClass, ComponentProps, ComponentType, ElementType, HTMLAttributes, JSX, ReactNode, Ref } from "react";
|
|
4
|
+
import { BorderProps, ContainerQueries, FlexboxProps, LayoutFrameProps, LayoutProps, PositionProps, QueryHelpers, SpaceProps, SpanProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
5
|
+
import { createShouldForwardProp, props } from "@soroush.tech/styled-system/should-forward-prop";
|
|
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;
|
|
@@ -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 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 as jt, MenuListOwnerState as k, radii as kt, BreakpointOverrides as l, ThemeTypographyVariants as lt, CardSlotIconProps as m, baseTheme as mt, css 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 as wt, LayoutBars as x, fontWeights as xt, ContextMenuOwnerState as y, down as yt, TabsOwnerState as z, withBreakpointHelpers as zt };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-C1WqEDtQ.mjs";
|
|
1
|
+
import { V as Theme } from "./index-CVNJEUwJ.mjs";
|
|
3
2
|
import { KeyboardEvent, MouseEvent, ReactNode, Ref, RefCallback, SyntheticEvent } from "react";
|
|
4
3
|
//#region src/Modal/useModal.d.ts
|
|
5
4
|
type ModalCloseReason = 'escapeKey' | 'backdropClick';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-C1WqEDtQ.mjs";
|
|
1
|
+
import { M as PaletteColor, V as Theme } from "./index-CVNJEUwJ.mjs";
|
|
3
2
|
import { BorderProps, LayoutProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
4
3
|
import { ButtonHTMLAttributes, ElementType } from "react";
|
|
5
4
|
//#region src/Pressable/Pressable.d.ts
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-DBUwu65Z.cjs";
|
|
1
|
+
import { V as Theme } from "./index-DmJ7yWWi.cjs";
|
|
3
2
|
import { KeyboardEvent, MouseEvent, ReactNode, Ref, RefCallback, SyntheticEvent } from "react";
|
|
4
3
|
//#region src/Modal/useModal.d.ts
|
|
5
4
|
type ModalCloseReason = 'escapeKey' | 'backdropClick';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-C1WqEDtQ.mjs";
|
|
3
|
-
import { BorderProps, FlexboxProps, LayoutProps, PositionProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
1
|
+
import { V as Theme, dt as TypographyVariant } from "./index-DmJ7yWWi.cjs";
|
|
4
2
|
import { CSSProperties, ElementType, HTMLAttributes } from "react";
|
|
3
|
+
import { BorderProps, FlexboxProps, LayoutProps, PositionProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
5
4
|
//#region src/Typography/Typography.d.ts
|
|
6
5
|
type TypographyAlign = 'left' | 'right' | 'center' | 'justify' | 'inherit';
|
|
7
6
|
/** Valid values for the color prop - derived from theme.text keys. */
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-C1WqEDtQ.mjs";
|
|
3
|
-
import { BorderProps, LayoutProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
1
|
+
import { M as PaletteColor, V as Theme, d as ButtonVariants } from "./index-DmJ7yWWi.cjs";
|
|
4
2
|
import { ButtonHTMLAttributes, ReactNode } from "react";
|
|
3
|
+
import { BorderProps, LayoutProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
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 @@
|
|
|
1
|
+
import "./index-CVNJEUwJ.mjs";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { V as Theme } from "./index-DmJ7yWWi.cjs";
|
|
2
|
+
import { MouseEvent, ReactNode } from "react";
|
|
3
|
+
//#region src/Tabs/TabScrollButton/TabScrollButton.d.ts
|
|
4
|
+
/** Which way a scroll button scrolls a row of tabs: towards its start, or its end. */
|
|
5
|
+
type TabScrollDirection = 'start' | 'end';
|
|
6
|
+
interface TabScrollButtonProps {
|
|
7
|
+
/** Which way it scrolls the row: towards its start, or its end. */
|
|
8
|
+
direction: TabScrollDirection;
|
|
9
|
+
/** The row's orientation. Default: its `Tabs`', else `'horizontal'`. */
|
|
10
|
+
orientation?: 'horizontal' | 'vertical';
|
|
11
|
+
/** There is nowhere further to scroll this way - kept, but off. */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** There is nowhere further to scroll this way - hidden, keeping its room. */
|
|
14
|
+
isHidden?: boolean;
|
|
15
|
+
/** Its stretch of an enclosed row's divider - resolves to `theme.palette`. Default: the row's line, the selected tab's color. */
|
|
16
|
+
color?: keyof Theme['palette'];
|
|
17
|
+
/** The chevron's color - resolves against `theme.text`. Default: its `Tabs`' `textColor`, else `'primary'`. */
|
|
18
|
+
textColor?: keyof Theme['text'];
|
|
19
|
+
/** Fired when it is pressed. In a `Tabs`, it scrolls the row by its visible size. */
|
|
20
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
21
|
+
/** What it shows. Default: a chevron pointing the way it scrolls. */
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
'data-testid'?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @description The button that scrolls a row of tabs - a `Tabs` shows one at each end while its
|
|
28
|
+
* tabs overflow (`overflowBehavior="scroll"`). Out of the tab order and hidden from assistive
|
|
29
|
+
* technology: the arrow keys already reach every tab. A `Tabs` takes another in its place with
|
|
30
|
+
* `slots={{ scrollButton }}`, given these same props.
|
|
31
|
+
*/
|
|
32
|
+
declare function TabScrollButton({ direction, orientation, disabled, isHidden, color: colorProp, textColor: textColorProp, onClick, children, className, 'data-testid': dataTestid }: Readonly<TabScrollButtonProps>): import("react").JSX.Element;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { TabScrollButtonProps as n, TabScrollDirection as r, TabScrollButton as t };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Z as ThemeIconSizes } from "./index-DmJ7yWWi.cjs";
|
|
2
|
+
import { n as TextColorToken } from "./index-IdMqR82e.cjs";
|
|
3
3
|
import { SVGProps } from "react";
|
|
4
|
+
import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
4
5
|
//#region src/Icon/icons/AccountTree.d.ts
|
|
5
6
|
declare const SvgAccountTree: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
6
7
|
//#endregion
|
|
@@ -118,6 +119,9 @@ declare const SvgLock: (props: SVGProps<SVGSVGElement>) => import("react").JSX.E
|
|
|
118
119
|
//#region src/Icon/icons/Menu.d.ts
|
|
119
120
|
declare const SvgMenu: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
120
121
|
//#endregion
|
|
122
|
+
//#region src/Icon/icons/MoreHoriz.d.ts
|
|
123
|
+
declare const SvgMoreHoriz: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
124
|
+
//#endregion
|
|
121
125
|
//#region src/Icon/icons/Neurology.d.ts
|
|
122
126
|
declare const SvgNeurology: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
123
127
|
//#endregion
|
|
@@ -214,6 +218,7 @@ declare const icons: {
|
|
|
214
218
|
readonly link: typeof SvgLink;
|
|
215
219
|
readonly lock: typeof SvgLock;
|
|
216
220
|
readonly menu: typeof SvgMenu;
|
|
221
|
+
readonly more_horiz: typeof SvgMoreHoriz;
|
|
217
222
|
readonly neurology: typeof SvgNeurology;
|
|
218
223
|
readonly psychology: typeof SvgPsychology;
|
|
219
224
|
readonly rebase_edit: typeof SvgRebaseEdit;
|
|
@@ -242,8 +247,11 @@ interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'color' | 'ref' | 'wid
|
|
|
242
247
|
name: IconName;
|
|
243
248
|
/** Resolves against theme.text - applied as `color`, which the SVG inherits via `currentColor`. */
|
|
244
249
|
color?: TextColorToken;
|
|
245
|
-
/**
|
|
246
|
-
|
|
250
|
+
/**
|
|
251
|
+
* Sets both width and height (icons are square): one of the theme's icon sizes (`'sm'`, `'md'`,
|
|
252
|
+
* `'lg'`), or any CSS length. Default: the theme's `iconSize`, else `'lg'`.
|
|
253
|
+
*/
|
|
254
|
+
size?: keyof ThemeIconSizes | (string & {}) | number;
|
|
247
255
|
}
|
|
248
256
|
declare function Icon({ name, color, size, ...rest }: Readonly<IconProps>): import("react").JSX.Element;
|
|
249
257
|
//#endregion
|