@gild-ui/react 0.0.0 → 0.1.0-alpha.1
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/LICENSE +21 -0
- package/README.md +399 -1
- package/dist/Accordion.cjs +338 -0
- package/dist/Accordion.d.cts +110 -0
- package/dist/Accordion.d.mts +110 -0
- package/dist/Accordion.mjs +334 -0
- package/dist/Accordion.types-DxvwAfZc.d.mts +1299 -0
- package/dist/Alert.cjs +187 -0
- package/dist/Alert.d.cts +51 -0
- package/dist/Alert.d.mts +51 -0
- package/dist/Alert.mjs +186 -0
- package/dist/AppBar.cjs +76 -0
- package/dist/AppBar.d.cts +22 -0
- package/dist/AppBar.d.mts +22 -0
- package/dist/AppBar.mjs +76 -0
- package/dist/Autocomplete.cjs +685 -0
- package/dist/Autocomplete.d.cts +97 -0
- package/dist/Autocomplete.d.mts +97 -0
- package/dist/Autocomplete.mjs +685 -0
- package/dist/Avatar.cjs +113 -0
- package/dist/Avatar.d.cts +27 -0
- package/dist/Avatar.d.mts +27 -0
- package/dist/Avatar.mjs +113 -0
- package/dist/Backdrop.cjs +30 -0
- package/dist/Backdrop.d.cts +11 -0
- package/dist/Backdrop.d.mts +11 -0
- package/dist/Backdrop.mjs +29 -0
- package/dist/Badge.cjs +136 -0
- package/dist/Badge.d.cts +47 -0
- package/dist/Badge.d.mts +47 -0
- package/dist/Badge.mjs +136 -0
- package/dist/Breadcrumbs.cjs +150 -0
- package/dist/Breadcrumbs.d.cts +33 -0
- package/dist/Breadcrumbs.d.mts +33 -0
- package/dist/Breadcrumbs.mjs +149 -0
- package/dist/Button.cjs +194 -0
- package/dist/Button.d.cts +3 -0
- package/dist/Button.d.mts +3 -0
- package/dist/Button.mjs +194 -0
- package/dist/ButtonGroup.cjs +116 -0
- package/dist/ButtonGroup.d.cts +43 -0
- package/dist/ButtonGroup.d.mts +3 -0
- package/dist/ButtonGroup.mjs +115 -0
- package/dist/ButtonGroupContext-D5Fg5Slq.mjs +5 -0
- package/dist/ButtonGroupContext-W4VkHwoR.cjs +9 -0
- package/dist/CacheProvider.cjs +9 -0
- package/dist/CacheProvider.d.cts +4 -0
- package/dist/CacheProvider.d.mts +4 -0
- package/dist/CacheProvider.mjs +9 -0
- package/dist/Card.cjs +105 -0
- package/dist/Card.d.cts +19 -0
- package/dist/Card.d.mts +19 -0
- package/dist/Card.mjs +105 -0
- package/dist/Checkbox.cjs +210 -0
- package/dist/Checkbox.d.cts +48 -0
- package/dist/Checkbox.d.mts +48 -0
- package/dist/Checkbox.mjs +210 -0
- package/dist/Chip.cjs +210 -0
- package/dist/Chip.d.cts +51 -0
- package/dist/Chip.d.mts +51 -0
- package/dist/Chip.mjs +210 -0
- package/dist/CircularProgress.cjs +151 -0
- package/dist/CircularProgress.d.cts +37 -0
- package/dist/CircularProgress.d.mts +37 -0
- package/dist/CircularProgress.mjs +151 -0
- package/dist/Collapse.cjs +133 -0
- package/dist/Collapse.d.cts +38 -0
- package/dist/Collapse.d.mts +3 -0
- package/dist/Collapse.mjs +133 -0
- package/dist/Drawer.cjs +168 -0
- package/dist/Drawer.d.cts +60 -0
- package/dist/Drawer.d.mts +60 -0
- package/dist/Drawer.mjs +166 -0
- package/dist/Fab.cjs +123 -0
- package/dist/Fab.d.cts +33 -0
- package/dist/Fab.d.mts +3 -0
- package/dist/Fab.mjs +122 -0
- package/dist/FabMenu.cjs +312 -0
- package/dist/FabMenu.d.cts +70 -0
- package/dist/FabMenu.d.mts +70 -0
- package/dist/FabMenu.mjs +311 -0
- package/dist/Fade.cjs +17 -0
- package/dist/Fade.d.cts +8 -0
- package/dist/Fade.d.mts +8 -0
- package/dist/Fade.mjs +16 -0
- package/dist/Flex.cjs +18 -0
- package/dist/Flex.d.cts +2 -0
- package/dist/Flex.d.mts +2 -0
- package/dist/Flex.mjs +17 -0
- package/dist/FocusTrap.cjs +87 -0
- package/dist/FocusTrap.d.cts +28 -0
- package/dist/FocusTrap.d.mts +28 -0
- package/dist/FocusTrap.mjs +86 -0
- package/dist/Form.cjs +47 -0
- package/dist/Form.d.cts +41 -0
- package/dist/Form.d.mts +41 -0
- package/dist/Form.mjs +46 -0
- package/dist/FormContext-DfpxiqRO.cjs +9 -0
- package/dist/FormContext-fZHQHKUU.mjs +6 -0
- package/dist/FormControl.cjs +98 -0
- package/dist/FormControl.d.cts +81 -0
- package/dist/FormControl.d.mts +81 -0
- package/dist/FormControl.mjs +96 -0
- package/dist/FormControlContext-Btvm04Sj.cjs +9 -0
- package/dist/FormControlContext-CaQLS_sK.mjs +6 -0
- package/dist/FormHelperText.cjs +40 -0
- package/dist/FormHelperText.d.cts +15 -0
- package/dist/FormHelperText.d.mts +15 -0
- package/dist/FormHelperText.mjs +39 -0
- package/dist/FormLabel.cjs +45 -0
- package/dist/FormLabel.d.cts +17 -0
- package/dist/FormLabel.d.mts +17 -0
- package/dist/FormLabel.mjs +44 -0
- package/dist/Global.cjs +8 -0
- package/dist/Global.d.cts +2 -0
- package/dist/Global.d.mts +2 -0
- package/dist/Global.mjs +1 -0
- package/dist/Grid.cjs +20 -0
- package/dist/Grid.d.cts +25 -0
- package/dist/Grid.d.mts +25 -0
- package/dist/Grid.mjs +20 -0
- package/dist/Grow.cjs +21 -0
- package/dist/Grow.d.cts +8 -0
- package/dist/Grow.d.mts +8 -0
- package/dist/Grow.mjs +20 -0
- package/dist/Icon-DBgqmUb3.mjs +916 -0
- package/dist/Icon-DPIqGixm.cjs +927 -0
- package/dist/Icon.cjs +4 -0
- package/dist/Icon.d.cts +3 -0
- package/dist/Icon.d.mts +3 -0
- package/dist/Icon.mjs +1 -0
- package/dist/Image.cjs +89 -0
- package/dist/Image.d.cts +19 -0
- package/dist/Image.d.mts +19 -0
- package/dist/Image.mjs +89 -0
- package/dist/LayoutProvider-DFwC1-h0.d.cts +19 -0
- package/dist/LayoutProvider-DFwC1-h0.d.mts +19 -0
- package/dist/LayoutProvider-Eb5Vp2BZ.mjs +36 -0
- package/dist/LayoutProvider-nB0hiaCR.cjs +41 -0
- package/dist/LayoutProvider.cjs +3 -0
- package/dist/LayoutProvider.d.cts +2 -0
- package/dist/LayoutProvider.d.mts +2 -0
- package/dist/LayoutProvider.mjs +1 -0
- package/dist/LinearProgress.cjs +232 -0
- package/dist/LinearProgress.d.cts +39 -0
- package/dist/LinearProgress.d.mts +39 -0
- package/dist/LinearProgress.mjs +232 -0
- package/dist/Link.cjs +59 -0
- package/dist/Link.d.cts +9 -0
- package/dist/Link.d.mts +9 -0
- package/dist/Link.mjs +59 -0
- package/dist/Menu-Ca7aUnLg.mjs +229 -0
- package/dist/Menu-DlPDdIAu.cjs +245 -0
- package/dist/Menu.cjs +174 -0
- package/dist/Menu.d.cts +209 -0
- package/dist/Menu.d.mts +209 -0
- package/dist/Menu.mjs +168 -0
- package/dist/MenuItem-2UwOFsM6.cjs +859 -0
- package/dist/MenuItem-w7D1-AYW.mjs +807 -0
- package/dist/MenuItem.cjs +4 -0
- package/dist/MenuItem.d.cts +3 -0
- package/dist/MenuItem.d.mts +3 -0
- package/dist/MenuItem.mjs +2 -0
- package/dist/Modal-B6_1ugIW.cjs +328 -0
- package/dist/Modal-Ouz9KdOG.mjs +300 -0
- package/dist/Modal.cjs +8 -0
- package/dist/Modal.d.cts +57 -0
- package/dist/Modal.d.mts +3 -0
- package/dist/Modal.mjs +2 -0
- package/dist/NativeSelect.cjs +197 -0
- package/dist/NativeSelect.d.cts +65 -0
- package/dist/NativeSelect.d.mts +65 -0
- package/dist/NativeSelect.mjs +197 -0
- package/dist/NavTree.cjs +225 -0
- package/dist/NavTree.d.cts +65 -0
- package/dist/NavTree.d.mts +65 -0
- package/dist/NavTree.mjs +223 -0
- package/dist/NumberInput.cjs +513 -0
- package/dist/NumberInput.d.cts +96 -0
- package/dist/NumberInput.d.mts +96 -0
- package/dist/NumberInput.mjs +512 -0
- package/dist/Pagination.cjs +258 -0
- package/dist/Pagination.d.cts +90 -0
- package/dist/Pagination.d.mts +3 -0
- package/dist/Pagination.mjs +256 -0
- package/dist/Paper.cjs +54 -0
- package/dist/Paper.d.cts +2 -0
- package/dist/Paper.d.mts +3 -0
- package/dist/Paper.mjs +54 -0
- package/dist/Popover-ZsN1txGi.mjs +139 -0
- package/dist/Popover-d5fip8Fi.cjs +143 -0
- package/dist/Popover.cjs +4 -0
- package/dist/Popover.d.cts +67 -0
- package/dist/Popover.d.mts +67 -0
- package/dist/Popover.mjs +2 -0
- package/dist/Portal.cjs +22 -0
- package/dist/Portal.d.cts +15 -0
- package/dist/Portal.d.mts +2 -0
- package/dist/Portal.mjs +21 -0
- package/dist/Pressable.cjs +134 -0
- package/dist/Pressable.d.cts +52 -0
- package/dist/Pressable.d.mts +3 -0
- package/dist/Pressable.mjs +134 -0
- package/dist/Quote.cjs +11 -0
- package/dist/Quote.d.cts +15 -0
- package/dist/Quote.d.mts +15 -0
- package/dist/Quote.mjs +10 -0
- package/dist/Radio.cjs +161 -0
- package/dist/Radio.d.cts +43 -0
- package/dist/Radio.d.mts +43 -0
- package/dist/Radio.mjs +161 -0
- package/dist/RangeInput.cjs +705 -0
- package/dist/RangeInput.d.cts +77 -0
- package/dist/RangeInput.d.mts +77 -0
- package/dist/RangeInput.mjs +705 -0
- package/dist/Rating.cjs +390 -0
- package/dist/Rating.d.cts +59 -0
- package/dist/Rating.d.mts +59 -0
- package/dist/Rating.mjs +390 -0
- package/dist/ScrollArea.cjs +282 -0
- package/dist/ScrollArea.d.cts +40 -0
- package/dist/ScrollArea.d.mts +40 -0
- package/dist/ScrollArea.mjs +281 -0
- package/dist/Select.cjs +528 -0
- package/dist/Select.d.cts +69 -0
- package/dist/Select.d.mts +69 -0
- package/dist/Select.mjs +528 -0
- package/dist/Sidebar.cjs +332 -0
- package/dist/Sidebar.d.cts +156 -0
- package/dist/Sidebar.d.mts +156 -0
- package/dist/Sidebar.mjs +330 -0
- package/dist/Skeleton.cjs +90 -0
- package/dist/Skeleton.d.cts +24 -0
- package/dist/Skeleton.d.mts +24 -0
- package/dist/Skeleton.mjs +90 -0
- package/dist/Slide.cjs +57 -0
- package/dist/Slide.d.cts +14 -0
- package/dist/Slide.d.mts +14 -0
- package/dist/Slide.mjs +56 -0
- package/dist/Snackbar.cjs +216 -0
- package/dist/Snackbar.d.cts +81 -0
- package/dist/Snackbar.d.mts +81 -0
- package/dist/Snackbar.mjs +215 -0
- package/dist/StyleSheet.cjs +8 -0
- package/dist/StyleSheet.d.cts +2 -0
- package/dist/StyleSheet.d.mts +2 -0
- package/dist/StyleSheet.mjs +1 -0
- package/dist/Switch.cjs +355 -0
- package/dist/Switch.d.cts +45 -0
- package/dist/Switch.d.mts +45 -0
- package/dist/Switch.mjs +355 -0
- package/dist/Table.cjs +722 -0
- package/dist/Table.d.cts +404 -0
- package/dist/Table.d.mts +404 -0
- package/dist/Table.mjs +707 -0
- package/dist/Tabs.cjs +1227 -0
- package/dist/Tabs.d.cts +245 -0
- package/dist/Tabs.d.mts +245 -0
- package/dist/Tabs.mjs +1222 -0
- package/dist/TextInput.cjs +236 -0
- package/dist/TextInput.d.cts +3 -0
- package/dist/TextInput.d.mts +3 -0
- package/dist/TextInput.mjs +236 -0
- package/dist/ThemeProvider-DS6pBgE-.cjs +68 -0
- package/dist/ThemeProvider-DuhfCo2F.mjs +63 -0
- package/dist/ThemeProvider.cjs +4 -0
- package/dist/ThemeProvider.d.cts +2 -0
- package/dist/ThemeProvider.d.mts +2 -0
- package/dist/ThemeProvider.mjs +2 -0
- package/dist/ToggleButton.cjs +115 -0
- package/dist/ToggleButton.d.cts +51 -0
- package/dist/ToggleButton.d.mts +51 -0
- package/dist/ToggleButton.mjs +113 -0
- package/dist/Tooltip-Bt5lr52c.mjs +485 -0
- package/dist/Tooltip-CUpZpoC9.cjs +495 -0
- package/dist/Tooltip.cjs +5 -0
- package/dist/Tooltip.d.cts +122 -0
- package/dist/Tooltip.d.mts +122 -0
- package/dist/Tooltip.mjs +2 -0
- package/dist/TransferList.cjs +394 -0
- package/dist/TransferList.d.cts +69 -0
- package/dist/TransferList.d.mts +69 -0
- package/dist/TransferList.mjs +394 -0
- package/dist/Typography.cjs +69 -0
- package/dist/Typography.d.cts +3 -0
- package/dist/Typography.d.mts +3 -0
- package/dist/Typography.mjs +69 -0
- package/dist/View-DFnZ41Xe.cjs +77 -0
- package/dist/View-zuvgW6DP.mjs +66 -0
- package/dist/View.cjs +3 -0
- package/dist/View.d.cts +2 -0
- package/dist/View.d.mts +2 -0
- package/dist/View.mjs +1 -0
- package/dist/Zoom.cjs +16 -0
- package/dist/Zoom.d.cts +7 -0
- package/dist/Zoom.d.mts +7 -0
- package/dist/Zoom.mjs +15 -0
- package/dist/catalog.cjs +22 -0
- package/dist/catalog.d.cts +28 -0
- package/dist/catalog.d.mts +28 -0
- package/dist/catalog.mjs +21 -0
- package/dist/computePopoverPosition-C6qSQ1QD.cjs +126 -0
- package/dist/computePopoverPosition-DHV1wQgJ.mjs +121 -0
- package/dist/computePopoverPosition-JgOwCM7k.d.cts +12 -0
- package/dist/computePopoverPosition-JgOwCM7k.d.mts +12 -0
- package/dist/css.cjs +20 -0
- package/dist/css.d.cts +2 -0
- package/dist/css.d.mts +2 -0
- package/dist/css.mjs +1 -0
- package/dist/derivedTheme-B0cxTzAq.cjs +29 -0
- package/dist/derivedTheme-BB9VVZ08.mjs +24 -0
- package/dist/engine.cjs +146 -0
- package/dist/engine.d.cts +59 -0
- package/dist/engine.d.mts +59 -0
- package/dist/engine.mjs +101 -0
- package/dist/getElementRef-4m6-x2FS.cjs +18 -0
- package/dist/getElementRef-SBx9_7pp.mjs +13 -0
- package/dist/index-B3jHcw5h.d.cts +175 -0
- package/dist/index-Bf-ZHQLG.d.mts +33 -0
- package/dist/index-CAMwJg71.d.mts +92 -0
- package/dist/index-CLQt_mOa.d.mts +3 -0
- package/dist/index-Cqse4F32.d.mts +38 -0
- package/dist/index-CsYK-ukA.d.mts +3 -0
- package/dist/index-D9Gg2NWm.d.mts +90 -0
- package/dist/index-DPQxIeZF.d.cts +1299 -0
- package/dist/index-Dc7XiT_v.d.cts +92 -0
- package/dist/index-Djum1XiO.d.mts +52 -0
- package/dist/index-DtfH-dhY.d.mts +43 -0
- package/dist/index-IB1nBqEO.d.mts +175 -0
- package/dist/index-UloRwym_.d.mts +16 -0
- package/dist/index-phuw9VpI.d.mts +57 -0
- package/dist/index-yCzwpbBP.d.mts +1 -0
- package/dist/index.cjs +93 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +17 -0
- package/dist/inputVariantStyles-B-4lHxUZ.mjs +41 -0
- package/dist/inputVariantStyles-CqCQatKb.cjs +58 -0
- package/dist/isRtl-DN-EdUlg.mjs +6 -0
- package/dist/isRtl-Dl6QQWib.cjs +11 -0
- package/dist/keyframes.cjs +8 -0
- package/dist/keyframes.d.cts +2 -0
- package/dist/keyframes.d.mts +2 -0
- package/dist/keyframes.mjs +1 -0
- package/dist/next.cjs +8 -0
- package/dist/next.d.cts +2 -0
- package/dist/next.d.mts +2 -0
- package/dist/next.mjs +1 -0
- package/dist/overrides-DeXScOFK.cjs +21 -0
- package/dist/overrides-Ds6QZL5Q.mjs +16 -0
- package/dist/server.cjs +19 -0
- package/dist/server.d.cts +10 -0
- package/dist/server.d.mts +10 -0
- package/dist/server.mjs +18 -0
- package/dist/styleEngine-CLid4cmR.mjs +1 -0
- package/dist/styled-Dr3_OY1-.cjs +48 -0
- package/dist/styled-tLHNvicL.mjs +43 -0
- package/dist/styled.cjs +3 -0
- package/dist/styled.d.cts +2 -0
- package/dist/styled.d.mts +2 -0
- package/dist/styled.mjs +1 -0
- package/dist/testing.cjs +60 -0
- package/dist/testing.d.cts +6 -0
- package/dist/testing.d.mts +6 -0
- package/dist/testing.mjs +59 -0
- package/dist/themes-BtfQPcbo.mjs +8 -0
- package/dist/themes-k-PEE5O9.cjs +12 -0
- package/dist/useAnchoredPlacement-CSotv28V.cjs +116 -0
- package/dist/useAnchoredPlacement-VwHtXnAx.mjs +111 -0
- package/dist/useDefaultProps-BTQGhvfY.mjs +13 -0
- package/dist/useDefaultProps-DratGGIL.cjs +18 -0
- package/dist/useDefaultProps.cjs +3 -0
- package/dist/useDefaultProps.d.cts +2 -0
- package/dist/useDefaultProps.d.mts +2 -0
- package/dist/useDefaultProps.mjs +1 -0
- package/dist/useLiveValue-CN2SUG2B.cjs +20 -0
- package/dist/useLiveValue-CqiwCr56.mjs +15 -0
- package/dist/useMediaQuery-acJak9M3.mjs +2 -0
- package/dist/useMediaQuery.cjs +9 -0
- package/dist/useMediaQuery.d.cts +2 -0
- package/dist/useMediaQuery.d.mts +2 -0
- package/dist/useMediaQuery.mjs +2 -0
- package/dist/useStyle.cjs +14 -0
- package/dist/useStyle.d.cts +2 -0
- package/dist/useStyle.d.mts +2 -0
- package/dist/useStyle.mjs +1 -0
- package/dist/useTheme.cjs +8 -0
- package/dist/useTheme.d.cts +2 -0
- package/dist/useTheme.d.mts +2 -0
- package/dist/useTheme.mjs +1 -0
- package/dist/useTransition-BKBtk0Mb.mjs +78 -0
- package/dist/useTransition-BzwifRXe.d.mts +40 -0
- package/dist/useTransition-gHFCJwqF.cjs +83 -0
- package/dist/useTransition-lt8_WKk-.d.cts +40 -0
- package/dist/useTransitionChild-C18w474Q.mjs +52 -0
- package/dist/useTransitionChild-DD3f44AQ.cjs +57 -0
- package/dist/utils-ChXrUitU.mjs +1 -0
- package/dist/withStyle.cjs +8 -0
- package/dist/withStyle.d.cts +2 -0
- package/dist/withStyle.d.mts +2 -0
- package/dist/withStyle.mjs +1 -0
- package/dist/withTheme.cjs +8 -0
- package/dist/withTheme.d.cts +2 -0
- package/dist/withTheme.d.mts +2 -0
- package/dist/withTheme.mjs +1 -0
- package/package.json +911 -3
|
@@ -0,0 +1,1299 @@
|
|
|
1
|
+
import "./LayoutProvider-DFwC1-h0.cjs";
|
|
2
|
+
import { ButtonHTMLAttributes, CSSProperties, ChangeEventHandler, ComponentClass, ComponentProps, ComponentType, ElementType, FunctionComponent, HTMLAttributes, InputHTMLAttributes, JSX, ReactElement, ReactNode, Ref, TextareaHTMLAttributes } from "react";
|
|
3
|
+
import * as GildCore from "@gild-ui/core/theme";
|
|
4
|
+
import { ButtonVariants, InputVariantKey, OpenScale, Register, RegisteredTheme, Theme as Theme$1, ThemeBackground, ThemeColor, ThemeDefaults, ThemeFonts, ThemeRadii, ThemeSize, ThemeSpaceKey, ThemeText, ThemeTransitionEasing, ThemeTypography, ThemeZOrder, TypographyVariant, VariantOf } from "@gild-ui/core/theme";
|
|
5
|
+
import { CSSObject as CSSObject$1, Global, LiveValue, PropsOf, SheetStyleProp, StyleSheet, StyledStatics, alpha, asIs, configure as configureEngine, css, defineTheme, fallback, keyframes, negate, setNonceSource, useMediaQuery, useStyle, useStyleValue, useTheme, val, variable, withStyle, withTheme } from "@umber-style/react";
|
|
6
|
+
import { BorderProps, FlexboxProps, LayoutFrameProps, LayoutProps, PositionProps, SpaceProps, SpanProps, TypographyProps as TypographyProps$1 } from "@soroush.tech/styled-system";
|
|
7
|
+
import { CreateStyledComponent, FilteringStyledOptions, Interpolation, StyledOptions } from "@umber-style/styled";
|
|
8
|
+
/**
|
|
9
|
+
* Once themes are registered, `T` may have no key the registered themes lack, at any depth: each
|
|
10
|
+
* extra key is typed `never`, so the error names it. `components` is the one shared value, which
|
|
11
|
+
* `defineThemes` already checked.
|
|
12
|
+
*/
|
|
13
|
+
type Exact<T, Shape> = keyof Register extends never ? unknown : Same<T, Shape>;
|
|
14
|
+
type Same<T, Shape> = T extends readonly unknown[] | ((...args: never[]) => unknown) | string | number | boolean | null | undefined ? T : { [K in keyof T]: K extends 'components' ? T[K] : K extends keyof Shape ? Same<T[K], NonNullable<Shape[K]>> : never; };
|
|
15
|
+
/** The defaults a theme may set for every `Accordion`. */
|
|
16
|
+
interface AccordionOwnerState {
|
|
17
|
+
hasGutters?: boolean;
|
|
18
|
+
borderRadius?: keyof ThemeRadii;
|
|
19
|
+
bg?: keyof ThemeBackground;
|
|
20
|
+
textColor?: keyof ThemeText;
|
|
21
|
+
}
|
|
22
|
+
/** The slots of Accordion a theme can style with `styleOverrides`. */
|
|
23
|
+
type AccordionSlot = 'root' | 'region';
|
|
24
|
+
/** What `theme.components.Accordion` takes. */
|
|
25
|
+
type AccordionThemeConfig = ComponentConfig<AccordionOwnerState, AccordionSlot>;
|
|
26
|
+
/** The resolved props AccordionActions's styled elements receive - what `ownerState` exposes. */
|
|
27
|
+
type AccordionActionsOwnerState = Record<string, unknown>;
|
|
28
|
+
/** The slots of AccordionActions a theme can style with `styleOverrides`. */
|
|
29
|
+
type AccordionActionsSlot = 'root';
|
|
30
|
+
/** What `theme.components.AccordionActions` takes. */
|
|
31
|
+
type AccordionActionsThemeConfig = ComponentConfig<AccordionActionsOwnerState, AccordionActionsSlot>;
|
|
32
|
+
/** The resolved props AccordionDetails's styled elements receive - what `ownerState` exposes. */
|
|
33
|
+
type AccordionDetailsOwnerState = Record<string, unknown>;
|
|
34
|
+
/** The slots of AccordionDetails a theme can style with `styleOverrides`. */
|
|
35
|
+
type AccordionDetailsSlot = 'root';
|
|
36
|
+
/** What `theme.components.AccordionDetails` takes. */
|
|
37
|
+
type AccordionDetailsThemeConfig = ComponentConfig<AccordionDetailsOwnerState, AccordionDetailsSlot>;
|
|
38
|
+
/** The defaults a theme may set for every `AccordionGroup`. */
|
|
39
|
+
interface AccordionGroupOwnerState {
|
|
40
|
+
isExclusive?: boolean;
|
|
41
|
+
variant?: 'separated' | 'attached';
|
|
42
|
+
}
|
|
43
|
+
/** The slots of AccordionGroup a theme can style with `styleOverrides`. */
|
|
44
|
+
type AccordionGroupSlot = 'root';
|
|
45
|
+
/** What `theme.components.AccordionGroup` takes. */
|
|
46
|
+
type AccordionGroupThemeConfig = ComponentConfig<AccordionGroupOwnerState, AccordionGroupSlot>;
|
|
47
|
+
/** The defaults a theme may set for every `AccordionSummary`. */
|
|
48
|
+
interface AccordionSummaryOwnerState {
|
|
49
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
50
|
+
}
|
|
51
|
+
/** The slots of AccordionSummary a theme can style with `styleOverrides`. */
|
|
52
|
+
type AccordionSummarySlot = 'root' | 'button' | 'content' | 'icon';
|
|
53
|
+
/** What `theme.components.AccordionSummary` takes. */
|
|
54
|
+
type AccordionSummaryThemeConfig = ComponentConfig<AccordionSummaryOwnerState, AccordionSummarySlot>;
|
|
55
|
+
/** The defaults a theme may set for every `Alert` - its `closeLabel` gives it a language. */
|
|
56
|
+
interface AlertOwnerState {
|
|
57
|
+
severity?: 'success' | 'info' | 'warning' | 'error';
|
|
58
|
+
variant?: 'standard' | 'contained' | 'outlined';
|
|
59
|
+
closeLabel?: string;
|
|
60
|
+
role?: 'alert' | 'status';
|
|
61
|
+
borderRadius?: keyof ThemeRadii;
|
|
62
|
+
}
|
|
63
|
+
/** The slots of Alert a theme can style with `styleOverrides`. */
|
|
64
|
+
type AlertSlot = 'root' | 'icon' | 'message' | 'action' | 'closeButton';
|
|
65
|
+
/** What `theme.components.Alert` takes. */
|
|
66
|
+
type AlertThemeConfig = ComponentConfig<AlertOwnerState, AlertSlot>;
|
|
67
|
+
/** The resolved props AlertTitle's styled elements receive - what `ownerState` exposes. */
|
|
68
|
+
type AlertTitleOwnerState = Record<string, unknown>;
|
|
69
|
+
/** The slots of AlertTitle a theme can style with `styleOverrides`. */
|
|
70
|
+
type AlertTitleSlot = 'root';
|
|
71
|
+
/** What `theme.components.AlertTitle` takes. */
|
|
72
|
+
type AlertTitleThemeConfig = ComponentConfig<AlertTitleOwnerState, AlertTitleSlot>;
|
|
73
|
+
/** The resolved props AppBar's styled elements receive - what `ownerState` exposes. */
|
|
74
|
+
type AppBarOwnerState = Record<string, unknown>;
|
|
75
|
+
/** The slots of AppBar a theme can style with `styleOverrides`. */
|
|
76
|
+
type AppBarSlot = 'root';
|
|
77
|
+
/** What `theme.components.AppBar` takes. */
|
|
78
|
+
type AppBarThemeConfig = ComponentConfig<AppBarOwnerState, AppBarSlot>;
|
|
79
|
+
/** The defaults a theme may set for every `Autocomplete` - its labels give it a language. */
|
|
80
|
+
interface AutocompleteOwnerState {
|
|
81
|
+
borderRadius?: keyof ThemeRadii;
|
|
82
|
+
bg?: keyof ThemeBackground;
|
|
83
|
+
textColor?: keyof ThemeText;
|
|
84
|
+
variant?: InputVariantKey;
|
|
85
|
+
size?: ThemeSize;
|
|
86
|
+
color?: ThemeColor;
|
|
87
|
+
shouldAllowFreeText?: boolean;
|
|
88
|
+
layer?: keyof ThemeZOrder;
|
|
89
|
+
clearLabel?: string;
|
|
90
|
+
openLabel?: string;
|
|
91
|
+
closeLabel?: string;
|
|
92
|
+
loadingText?: string;
|
|
93
|
+
noOptionsText?: string;
|
|
94
|
+
}
|
|
95
|
+
/** The slots of Autocomplete a theme can style with `styleOverrides`. */
|
|
96
|
+
type AutocompleteSlot = 'root' | 'tags' | 'input' | 'clearIndicator' | 'popupIndicator' | 'popup' | 'listbox' | 'group' | 'groupLabel' | 'groupItems' | 'option' | 'status';
|
|
97
|
+
/** What `theme.components.Autocomplete` takes. */
|
|
98
|
+
type AutocompleteThemeConfig = ComponentConfig<AutocompleteOwnerState, AutocompleteSlot>;
|
|
99
|
+
/** The resolved props Avatar's styled elements receive - what `ownerState` exposes. */
|
|
100
|
+
type AvatarOwnerState = Record<string, unknown>;
|
|
101
|
+
/** The slots of Avatar a theme can style with `styleOverrides`. */
|
|
102
|
+
type AvatarSlot = 'root' | 'img';
|
|
103
|
+
/** What `theme.components.Avatar` takes. */
|
|
104
|
+
type AvatarThemeConfig = ComponentConfig<AvatarOwnerState, AvatarSlot>;
|
|
105
|
+
/** The resolved props Backdrop's styled elements receive - what `ownerState` exposes. */
|
|
106
|
+
type BackdropOwnerState = Record<string, unknown>;
|
|
107
|
+
/** The slots of Backdrop a theme can style with `styleOverrides`. */
|
|
108
|
+
type BackdropSlot = 'root';
|
|
109
|
+
/** What `theme.components.Backdrop` takes. */
|
|
110
|
+
type BackdropThemeConfig = ComponentConfig<BackdropOwnerState, BackdropSlot>;
|
|
111
|
+
/** The defaults a theme may set for every `Badge`. */
|
|
112
|
+
interface BadgeOwnerState {
|
|
113
|
+
max?: number;
|
|
114
|
+
variant?: 'standard' | 'dot';
|
|
115
|
+
color?: ThemeColor;
|
|
116
|
+
anchorOrigin?: {
|
|
117
|
+
vertical: 'top' | 'bottom';
|
|
118
|
+
horizontal: 'start' | 'end';
|
|
119
|
+
};
|
|
120
|
+
overlap?: 'rectangular' | 'circular';
|
|
121
|
+
}
|
|
122
|
+
/** The slots of Badge a theme can style with `styleOverrides`. */
|
|
123
|
+
type BadgeSlot = 'root' | 'badge' | 'label';
|
|
124
|
+
/** What `theme.components.Badge` takes. */
|
|
125
|
+
type BadgeThemeConfig = ComponentConfig<BadgeOwnerState, BadgeSlot>;
|
|
126
|
+
/** The defaults a theme may set for every `Breadcrumbs` - its `expandLabel` gives a trail its language. */
|
|
127
|
+
interface BreadcrumbsOwnerState {
|
|
128
|
+
separator?: ReactNode;
|
|
129
|
+
maxItems?: number;
|
|
130
|
+
itemsBeforeCollapse?: number;
|
|
131
|
+
itemsAfterCollapse?: number;
|
|
132
|
+
expandLabel?: string;
|
|
133
|
+
color?: keyof ThemeText;
|
|
134
|
+
}
|
|
135
|
+
/** The slots of Breadcrumbs a theme can style with `styleOverrides`. */
|
|
136
|
+
type BreadcrumbsSlot = 'root' | 'list' | 'item' | 'separator' | 'collapsed' | 'collapsedIcon';
|
|
137
|
+
/** What `theme.components.Breadcrumbs` takes. */
|
|
138
|
+
type BreadcrumbsThemeConfig = ComponentConfig<BreadcrumbsOwnerState, BreadcrumbsSlot>;
|
|
139
|
+
/**
|
|
140
|
+
* What the `style` prop of a component takes: the engine's `SheetStyleProp`, so an entry of
|
|
141
|
+
* `StyleSheet.create` (of an object, or a handle `sheet.card` of a sheet of the theme) or a list of
|
|
142
|
+
* them, with `false`, `null` and `undefined` for a condition that is off. A plain style object is not
|
|
143
|
+
* one: it is a type error.
|
|
144
|
+
*/
|
|
145
|
+
type StyleOverride = SheetStyleProp;
|
|
146
|
+
/**
|
|
147
|
+
* What one slot of a component takes in `slotProps`: a `style` (as above), a `className`, and `data-*`
|
|
148
|
+
* and `aria-*` attributes. Nothing a component controls (its handlers, `ref`, `id`, `role`) is here.
|
|
149
|
+
*/
|
|
150
|
+
type SlotOverride = {
|
|
151
|
+
style?: StyleOverride;
|
|
152
|
+
className?: string;
|
|
153
|
+
} & { [K in `data-${string}` | `aria-${string}`]?: string | number | boolean | undefined; };
|
|
154
|
+
/** The `slotProps` of a component: one `SlotOverride` for each slot it declares for the theme (`<Name>Slot`). */
|
|
155
|
+
type SlotProps<Slot extends string> = { [S in Slot]?: SlotOverride; };
|
|
156
|
+
/**
|
|
157
|
+
* A component made by `styled` with its `style` narrowed to `StyleOverride`, for one the library
|
|
158
|
+
* exports: `styled` itself takes any style on the element it makes.
|
|
159
|
+
*/
|
|
160
|
+
type StrictStyled<C extends ElementType & StyledStatics> = FunctionComponent<Omit<ComponentProps<C>, 'style' | 'slotProps'> & {
|
|
161
|
+
style?: StyleOverride;
|
|
162
|
+
slotProps?: SlotProps<'root'>;
|
|
163
|
+
}> & StyledStatics;
|
|
164
|
+
/** The corner shapes of a control or a surface. */
|
|
165
|
+
type ShapeKey$2 = 'square' | 'rounded' | 'pill';
|
|
166
|
+
/** The resolved props Button's styled roots receive - what `ownerState` exposes. */
|
|
167
|
+
interface ButtonOwnerState {
|
|
168
|
+
variant?: ButtonVariant;
|
|
169
|
+
color?: ThemeColor;
|
|
170
|
+
size?: ThemeSize;
|
|
171
|
+
shape?: ShapeKey$2;
|
|
172
|
+
fullWidth?: boolean;
|
|
173
|
+
disabled?: boolean;
|
|
174
|
+
}
|
|
175
|
+
/** Button's looks: the built-in ones, those added through `ButtonVariants`, and those a registered theme defines. */
|
|
176
|
+
type ButtonVariant = keyof ButtonVariants | VariantOf<'Button'>;
|
|
177
|
+
/** The slots of Button a theme can style with `styleOverrides`. */
|
|
178
|
+
type ButtonSlot = 'root' | 'label' | 'icon' | 'loader';
|
|
179
|
+
/** What `theme.components.Button` takes. */
|
|
180
|
+
type ButtonThemeConfig = ComponentConfig<ButtonOwnerState, ButtonSlot>;
|
|
181
|
+
/** Augmentable via the `ButtonVariants` interface, or defined by a registered theme - style new values through `theme.components.Button.variants`. */
|
|
182
|
+
type ButtonColor = ThemeColor;
|
|
183
|
+
type ButtonSize = keyof AppTheme['sizes'];
|
|
184
|
+
type ButtonShape = 'square' | 'rounded' | 'pill';
|
|
185
|
+
type ButtonLoadingPosition = 'start' | 'end' | 'center';
|
|
186
|
+
/** Valid values for the gap prop - resolves against theme.space. Default: `1` (8px). */
|
|
187
|
+
type GapToken$1 = keyof AppTheme['space'];
|
|
188
|
+
interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'style'>, SpaceProps, LayoutProps, BorderProps, TypographyProps$1 {
|
|
189
|
+
/** Visual style - filled, stroked, or ghost. Default: `'contained'`, overridable via `theme.defaults.buttonVariant`. */
|
|
190
|
+
variant?: ButtonVariant;
|
|
191
|
+
/** Color palette - maps to `theme.palette[color]`. Default: `'primary'`, overridable via `theme.defaults.color`. */
|
|
192
|
+
color?: ButtonColor;
|
|
193
|
+
/** Size token - controls padding and font size. Default: `'md'`, overridable via `theme.defaults.size`. */
|
|
194
|
+
size?: ButtonSize;
|
|
195
|
+
/** Gap between icon and label - resolves against theme.space. Default: `1` (8px). */
|
|
196
|
+
gap?: GapToken$1;
|
|
197
|
+
/** Icon rendered before the label. */
|
|
198
|
+
startIcon?: ReactNode;
|
|
199
|
+
/** Icon rendered after the label. */
|
|
200
|
+
endIcon?: ReactNode;
|
|
201
|
+
/** Stretch button to full container width. */
|
|
202
|
+
fullWidth?: boolean;
|
|
203
|
+
/** Shows loading indicator and disables the button. */
|
|
204
|
+
loading?: boolean;
|
|
205
|
+
/** Custom loading element. Default: animated spinner. */
|
|
206
|
+
loadingIndicator?: ReactNode;
|
|
207
|
+
/**
|
|
208
|
+
* Corner shape - sets the default `borderRadius`.
|
|
209
|
+
* `"square"` → 0 · `"rounded"` → `theme.radii.md` (default) · `"pill"` → 9999px
|
|
210
|
+
* The `borderRadius` prop always overrides this.
|
|
211
|
+
*/
|
|
212
|
+
shape?: ButtonShape;
|
|
213
|
+
/** Where the loading indicator appears. Default: `"center"`. */
|
|
214
|
+
loadingPosition?: ButtonLoadingPosition;
|
|
215
|
+
/** The URL to link to when the button is clicked. If defined, an `a` element will be used as the root node. */
|
|
216
|
+
href?: string;
|
|
217
|
+
/** Anchor `target` - only meaningful when `href` is set. */
|
|
218
|
+
target?: string;
|
|
219
|
+
/** Anchor `rel` - only meaningful when `href` is set. */
|
|
220
|
+
rel?: string;
|
|
221
|
+
/** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
|
|
222
|
+
style?: StyleOverride;
|
|
223
|
+
/** Overrides for the slots a theme can style: `style`, `className`, `data-*` and `aria-*`. */
|
|
224
|
+
slotProps?: SlotProps<ButtonSlot>;
|
|
225
|
+
}
|
|
226
|
+
/** The resolved props ButtonGroup's styled elements receive - what `ownerState` exposes. */
|
|
227
|
+
type ButtonGroupOwnerState = Record<string, unknown>;
|
|
228
|
+
/** The slots of ButtonGroup a theme can style with `styleOverrides`. */
|
|
229
|
+
type ButtonGroupSlot = 'root';
|
|
230
|
+
/** What `theme.components.ButtonGroup` takes. */
|
|
231
|
+
type ButtonGroupThemeConfig = ComponentConfig<ButtonGroupOwnerState, ButtonGroupSlot>;
|
|
232
|
+
/** Card's resolved props / theme-settable defaults. */
|
|
233
|
+
interface CardOwnerState {
|
|
234
|
+
variant?: 'paper' | 'bracketBox' | 'interactive';
|
|
235
|
+
/** Merged under any per-instance `titleProps` (instance wins). */
|
|
236
|
+
titleProps?: CardSlotTypographyProps;
|
|
237
|
+
/** Merged under any per-instance `captionProps` (instance wins). */
|
|
238
|
+
captionProps?: CardSlotTypographyProps;
|
|
239
|
+
/** Merged under any per-instance `iconProps` (instance wins). */
|
|
240
|
+
iconProps?: CardSlotIconProps;
|
|
241
|
+
}
|
|
242
|
+
/** Token-typed Typography props a theme may set for Card's title/caption slots. */
|
|
243
|
+
interface CardSlotTypographyProps {
|
|
244
|
+
variant?: ThemeTypography;
|
|
245
|
+
color?: keyof ThemeText;
|
|
246
|
+
fontFamily?: keyof ThemeFonts;
|
|
247
|
+
mb?: ThemeSpaceKey;
|
|
248
|
+
}
|
|
249
|
+
/** Token-typed Icon props a theme may set for Card's icon slot. */
|
|
250
|
+
interface CardSlotIconProps {
|
|
251
|
+
color?: keyof ThemeText;
|
|
252
|
+
size?: string | number;
|
|
253
|
+
}
|
|
254
|
+
/** The slots of Card a theme can style with `styleOverrides`. */
|
|
255
|
+
type CardSlot = 'root' | 'title' | 'caption' | 'icon';
|
|
256
|
+
/** What `theme.components.Card` takes. */
|
|
257
|
+
type CardThemeConfig = ComponentConfig<CardOwnerState, CardSlot>;
|
|
258
|
+
/** The resolved props Checkbox's styled elements receive - what `ownerState` exposes. */
|
|
259
|
+
type CheckboxOwnerState = Record<string, unknown>;
|
|
260
|
+
/** The slots of Checkbox a theme can style with `styleOverrides`. */
|
|
261
|
+
type CheckboxSlot = 'root' | 'input' | 'icon' | 'label';
|
|
262
|
+
/** What `theme.components.Checkbox` takes. */
|
|
263
|
+
type CheckboxThemeConfig = ComponentConfig<CheckboxOwnerState, CheckboxSlot>;
|
|
264
|
+
/** The corner shapes of a control or a surface. */
|
|
265
|
+
type ShapeKey$1 = 'square' | 'rounded' | 'pill';
|
|
266
|
+
/** The defaults a theme may set for every `Chip` - its `deleteLabel` gives it a language. */
|
|
267
|
+
interface ChipOwnerState {
|
|
268
|
+
variant?: 'contained' | 'outlined' | 'text';
|
|
269
|
+
color?: ThemeColor;
|
|
270
|
+
size?: ThemeSize;
|
|
271
|
+
shape?: ShapeKey$1;
|
|
272
|
+
borderRadius?: keyof ThemeRadii;
|
|
273
|
+
deleteLabel?: string;
|
|
274
|
+
}
|
|
275
|
+
/** The slots of Chip a theme can style with `styleOverrides`. */
|
|
276
|
+
type ChipSlot = 'root' | 'body' | 'label' | 'icon' | 'avatar' | 'deleteIcon';
|
|
277
|
+
/** What `theme.components.Chip` takes. */
|
|
278
|
+
type ChipThemeConfig = ComponentConfig<ChipOwnerState, ChipSlot>;
|
|
279
|
+
/** The resolved props CircularProgress's styled elements receive - what `ownerState` exposes. */
|
|
280
|
+
type CircularProgressOwnerState = Record<string, unknown>;
|
|
281
|
+
/** The slots of CircularProgress a theme can style with `styleOverrides`. */
|
|
282
|
+
type CircularProgressSlot = 'root' | 'track' | 'circle';
|
|
283
|
+
/** What `theme.components.CircularProgress` takes. */
|
|
284
|
+
type CircularProgressThemeConfig = ComponentConfig<CircularProgressOwnerState, CircularProgressSlot>;
|
|
285
|
+
/** The defaults a theme may set for every `Collapse`. */
|
|
286
|
+
interface CollapseOwnerState {
|
|
287
|
+
orientation?: 'vertical' | 'horizontal';
|
|
288
|
+
collapsedSize?: string | number;
|
|
289
|
+
timeout?: number | {
|
|
290
|
+
enter: number;
|
|
291
|
+
exit: number;
|
|
292
|
+
};
|
|
293
|
+
easing?: keyof ThemeTransitionEasing;
|
|
294
|
+
shouldAppear?: boolean;
|
|
295
|
+
}
|
|
296
|
+
/** The slots of Collapse a theme can style with `styleOverrides`. */
|
|
297
|
+
type CollapseSlot = 'root' | 'wrapper' | 'inner';
|
|
298
|
+
/** What `theme.components.Collapse` takes. */
|
|
299
|
+
type CollapseThemeConfig = ComponentConfig<CollapseOwnerState, CollapseSlot>;
|
|
300
|
+
/** The resolved props Paper's styled elements receive - what `ownerState` exposes. */
|
|
301
|
+
type PaperOwnerState = Record<string, unknown>;
|
|
302
|
+
/** The slots of Paper a theme can style with `styleOverrides`. */
|
|
303
|
+
type PaperSlot = 'root';
|
|
304
|
+
/** What `theme.components.Paper` takes. */
|
|
305
|
+
type PaperThemeConfig = ComponentConfig<PaperOwnerState, PaperSlot>;
|
|
306
|
+
/** Valid values for the color prop - derived from theme.text keys. */
|
|
307
|
+
type ViewColorToken = keyof Theme['text'];
|
|
308
|
+
/** Valid values for the bg prop - derived from theme.background keys. */
|
|
309
|
+
type ViewBackgroundToken = keyof Theme['background'];
|
|
310
|
+
/** Valid values for the borderColor prop - derived from theme.border keys. */
|
|
311
|
+
type ViewBorderColorToken = keyof Theme['border'];
|
|
312
|
+
/** Valid values for the borderWidth prop - derived from theme.borderWidths keys. */
|
|
313
|
+
type ViewBorderWidthToken = keyof Theme['borderWidths'];
|
|
314
|
+
/** Valid theme tokens for border-radius. Raw CSS pixel values (e.g. '6px', '9999px') are also accepted. */
|
|
315
|
+
type OrPixels<Token extends PropertyKey> = Token | `${number}px`;
|
|
316
|
+
type ViewBorderRadiusToken = OrPixels<keyof Theme['radii']>;
|
|
317
|
+
interface ViewProps extends Omit<HTMLAttributes<HTMLElement>, 'color' | 'style'>, SpaceProps, LayoutProps, TypographyProps$1, Omit<BorderProps, 'borderColor' | 'borderWidth' | 'borderRadius'>, PositionProps, SpanProps, LayoutFrameProps {
|
|
318
|
+
/** Overrides the CSS of the element: an entry of `StyleSheet.create`, or a list of them. */
|
|
319
|
+
style?: StyleOverride;
|
|
320
|
+
/** Overrides for the slot a theme can style: `style`, `className`, `data-*` and `aria-*`. */
|
|
321
|
+
slotProps?: SlotProps<'root'>;
|
|
322
|
+
bg?: ViewBackgroundToken;
|
|
323
|
+
/** Resolves against theme.border - light · primary · dark */
|
|
324
|
+
borderColor?: ViewBorderColorToken;
|
|
325
|
+
/** Resolves against theme.borderWidths - none · thin · base · thick */
|
|
326
|
+
borderWidth?: ViewBorderWidthToken;
|
|
327
|
+
/** Theme tokens: sq · sm · md · lg. Also accepts raw CSS pixel values e.g. '6px', '9999px'. */
|
|
328
|
+
borderRadius?: ViewBorderRadiusToken;
|
|
329
|
+
opacity?: number;
|
|
330
|
+
cursor?: CSSProperties['cursor'];
|
|
331
|
+
/** CSS order for flex/grid item placement. Accepts responsive arrays. */
|
|
332
|
+
order?: FlexboxProps['order'];
|
|
333
|
+
}
|
|
334
|
+
/** The resolved props View's styled elements receive - what `ownerState` exposes. */
|
|
335
|
+
type ViewOwnerState = Record<string, unknown>;
|
|
336
|
+
/** The slots of View a theme can style with `styleOverrides`. */
|
|
337
|
+
type ViewSlot = 'root';
|
|
338
|
+
/** What `theme.components.View` takes. */
|
|
339
|
+
type ViewThemeConfig = ComponentConfig<ViewOwnerState, ViewSlot>;
|
|
340
|
+
declare const View: StrictStyled<import("@umber-style/react").StyledComponent<import("react").ElementType, ViewProps, {
|
|
341
|
+
theme?: AppTheme;
|
|
342
|
+
as?: React.ElementType;
|
|
343
|
+
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & object>>;
|
|
344
|
+
/** Valid values for the gap prop - derived from theme.space keys. */
|
|
345
|
+
type GapToken = keyof Theme['space'];
|
|
346
|
+
/**
|
|
347
|
+
* `layout` puts the flex container on the page frame, as on any View: the theme's margin and
|
|
348
|
+
* max width per breakpoint. The flexbox stays as set - a column by default, a row with
|
|
349
|
+
* `flexDirection="row"`. Columns are Grid's: content on the page columns uses `<Grid layout>`.
|
|
350
|
+
*/
|
|
351
|
+
interface FlexProps extends ViewProps, FlexboxProps {}
|
|
352
|
+
/** The resolved props Flex's styled elements receive - what `ownerState` exposes. */
|
|
353
|
+
type FlexOwnerState = Record<string, unknown>;
|
|
354
|
+
/** The slots of Flex a theme can style with `styleOverrides`. */
|
|
355
|
+
type FlexSlot = 'root';
|
|
356
|
+
/** What `theme.components.Flex` takes. */
|
|
357
|
+
type FlexThemeConfig = ComponentConfig<FlexOwnerState, FlexSlot>;
|
|
358
|
+
declare const Flex: StrictStyled<import("@umber-style/react").StyledComponent<import("react").ElementType, FlexProps, Omit<Omit<{
|
|
359
|
+
theme?: AppTheme;
|
|
360
|
+
as?: React.ElementType;
|
|
361
|
+
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & object, "as" | keyof ViewProps> & Omit<ViewProps, "style"> & {
|
|
362
|
+
as?: "a" | "abbr" | "address" | "animate" | "animateMotion" | "animateTransform" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "center" | "circle" | "cite" | "clipPath" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "defs" | "del" | "desc" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "ellipse" | "em" | "embed" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "fieldset" | "figcaption" | "figure" | "filter" | "footer" | "foreignObject" | "form" | "g" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "image" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "line" | "linearGradient" | "link" | "main" | "map" | "mark" | "marker" | "mask" | "menu" | "menuitem" | "meta" | "metadata" | "meter" | "mpath" | "nav" | "noindex" | "noscript" | "object" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "path" | "pattern" | "picture" | "polygon" | "polyline" | "pre" | "progress" | "q" | "radialGradient" | "rect" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "search" | "section" | "select" | "set" | "slot" | "small" | "source" | "span" | "stop" | "strong" | "style" | "sub" | "summary" | "sup" | "svg" | "switch" | "symbol" | "table" | "tbody" | "td" | "template" | "text" | "textPath" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "tspan" | "u" | "ul" | "use" | "var" | "video" | "view" | "wbr" | "webview" | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
|
363
|
+
style?: import("@umber-style/react").StyleProp;
|
|
364
|
+
}, "slotProps" | "style"> & {
|
|
365
|
+
style?: StyleOverride;
|
|
366
|
+
slotProps?: SlotProps<'root'>;
|
|
367
|
+
} & {
|
|
368
|
+
theme?: AppTheme;
|
|
369
|
+
} & object>>;
|
|
370
|
+
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;
|
|
371
|
+
interface PaperProps extends FlexProps {
|
|
372
|
+
/** Shadow depth - 0 (flat) to 24 (highest). Resolves to theme.shadows[n]. Default: 1. */
|
|
373
|
+
elevation?: PaperElevation;
|
|
374
|
+
/** CSS transition for surface animations (e.g. hover elevation change). */
|
|
375
|
+
transition?: CSSProperties['transition'];
|
|
376
|
+
/** Resolves against theme.border - light · primary · dark */
|
|
377
|
+
borderColor?: keyof Theme['border'];
|
|
378
|
+
/** Resolves against theme.borderWidths - none · thin · base · thick */
|
|
379
|
+
borderWidth?: keyof Theme['borderWidths'];
|
|
380
|
+
/** CSS border-style value (e.g. 'solid', 'dashed'). */
|
|
381
|
+
borderStyle?: CSSProperties['borderStyle'];
|
|
382
|
+
/** Renders the surface as a different element (e.g. 'section'). */
|
|
383
|
+
as?: ElementType;
|
|
384
|
+
/** Overrides for the slots a theme can style: `style`, `className`, `data-*` and `aria-*`. */
|
|
385
|
+
slotProps?: SlotProps<PaperSlot>;
|
|
386
|
+
}
|
|
387
|
+
declare function Paper({ elevation, p, bg, borderRadius, style, className, slotProps, ...rest }: Readonly<PaperProps>): import("react").JSX.Element;
|
|
388
|
+
/** The defaults a theme may set for every `Menu`. */
|
|
389
|
+
interface MenuOwnerState {
|
|
390
|
+
align?: 'start' | 'end';
|
|
391
|
+
borderRadius?: keyof ThemeRadii;
|
|
392
|
+
marginThreshold?: ThemeSpaceKey;
|
|
393
|
+
elevation?: PaperElevation;
|
|
394
|
+
layer?: keyof ThemeZOrder;
|
|
395
|
+
color?: ThemeColor;
|
|
396
|
+
textColor?: keyof ThemeText;
|
|
397
|
+
size?: ThemeSize;
|
|
398
|
+
dense?: boolean;
|
|
399
|
+
}
|
|
400
|
+
/** The slots of Menu a theme can style with `styleOverrides`. */
|
|
401
|
+
type MenuSlot = 'root' | 'paper' | 'list';
|
|
402
|
+
/** What `theme.components.Menu` takes. */
|
|
403
|
+
type MenuThemeConfig = ComponentConfig<MenuOwnerState, MenuSlot>;
|
|
404
|
+
/** The defaults a theme may set for every `ContextMenu` - a `Menu`'s, placed at the pointer. */
|
|
405
|
+
type ContextMenuOwnerState = Omit<MenuOwnerState, 'align'>;
|
|
406
|
+
/** The slots of ContextMenu a theme can style with `styleOverrides`. */
|
|
407
|
+
type ContextMenuSlot = 'root' | 'paper' | 'list';
|
|
408
|
+
/** What `theme.components.ContextMenu` takes. */
|
|
409
|
+
type ContextMenuThemeConfig = ComponentConfig<ContextMenuOwnerState, ContextMenuSlot>;
|
|
410
|
+
/** The resolved props Drawer's styled elements receive - what `ownerState` exposes. */
|
|
411
|
+
type DrawerOwnerState = Record<string, unknown>;
|
|
412
|
+
/** The slots of Drawer a theme can style with `styleOverrides`. */
|
|
413
|
+
type DrawerSlot = 'root';
|
|
414
|
+
/** What `theme.components.Drawer` takes. */
|
|
415
|
+
type DrawerThemeConfig = ComponentConfig<DrawerOwnerState, DrawerSlot>;
|
|
416
|
+
/** The defaults a theme may set for every `Fab`. */
|
|
417
|
+
interface FabOwnerState {
|
|
418
|
+
variant?: 'circular' | 'extended';
|
|
419
|
+
color?: ThemeColor;
|
|
420
|
+
size?: ThemeSize;
|
|
421
|
+
}
|
|
422
|
+
/** The slots of Fab a theme can style with `styleOverrides`. */
|
|
423
|
+
type FabSlot = 'root' | 'label' | 'labelText';
|
|
424
|
+
/** What `theme.components.Fab` takes. */
|
|
425
|
+
type FabThemeConfig = ComponentConfig<FabOwnerState, FabSlot>;
|
|
426
|
+
/** The defaults a theme may set for every `FabMenu`. */
|
|
427
|
+
interface FabMenuOwnerState {
|
|
428
|
+
direction?: 'up' | 'down' | 'left' | 'right';
|
|
429
|
+
align?: 'start' | 'end';
|
|
430
|
+
color?: ThemeColor;
|
|
431
|
+
size?: ThemeSize;
|
|
432
|
+
}
|
|
433
|
+
/** The slots of FabMenu a theme can style with `styleOverrides`. */
|
|
434
|
+
type FabMenuSlot = 'root' | 'list';
|
|
435
|
+
/** What `theme.components.FabMenu` takes. */
|
|
436
|
+
type FabMenuThemeConfig = ComponentConfig<FabMenuOwnerState, FabMenuSlot>;
|
|
437
|
+
/** The resolved props FocusTrap's styled elements receive - what `ownerState` exposes. */
|
|
438
|
+
type FocusTrapOwnerState = Record<string, unknown>;
|
|
439
|
+
/** The slots of FocusTrap a theme can style with `styleOverrides`. */
|
|
440
|
+
type FocusTrapSlot = 'root';
|
|
441
|
+
/** What `theme.components.FocusTrap` takes. */
|
|
442
|
+
type FocusTrapThemeConfig = ComponentConfig<FocusTrapOwnerState, FocusTrapSlot>;
|
|
443
|
+
/** The resolved props Form's styled elements receive - what `ownerState` exposes. */
|
|
444
|
+
type FormOwnerState = Record<string, unknown>;
|
|
445
|
+
/** The slots of Form a theme can style with `styleOverrides`. */
|
|
446
|
+
type FormSlot = 'root';
|
|
447
|
+
/** What `theme.components.Form` takes. */
|
|
448
|
+
type FormThemeConfig = ComponentConfig<FormOwnerState, FormSlot>;
|
|
449
|
+
/** The resolved props FormControl's styled elements receive - what `ownerState` exposes. */
|
|
450
|
+
type FormControlOwnerState = Record<string, unknown>;
|
|
451
|
+
/** The slots of FormControl a theme can style with `styleOverrides`. */
|
|
452
|
+
type FormControlSlot = 'root';
|
|
453
|
+
/** What `theme.components.FormControl` takes. */
|
|
454
|
+
type FormControlThemeConfig = ComponentConfig<FormControlOwnerState, FormControlSlot>;
|
|
455
|
+
/** The resolved props FormHelperText's styled elements receive - what `ownerState` exposes. */
|
|
456
|
+
type FormHelperTextOwnerState = Record<string, unknown>;
|
|
457
|
+
/** The slots of FormHelperText a theme can style with `styleOverrides`. */
|
|
458
|
+
type FormHelperTextSlot = 'root';
|
|
459
|
+
/** What `theme.components.FormHelperText` takes. */
|
|
460
|
+
type FormHelperTextThemeConfig = ComponentConfig<FormHelperTextOwnerState, FormHelperTextSlot>;
|
|
461
|
+
/** The resolved props FormLabel's styled elements receive - what `ownerState` exposes. */
|
|
462
|
+
type FormLabelOwnerState = Record<string, unknown>;
|
|
463
|
+
/** The slots of FormLabel a theme can style with `styleOverrides`. */
|
|
464
|
+
type FormLabelSlot = 'root';
|
|
465
|
+
/** What `theme.components.FormLabel` takes. */
|
|
466
|
+
type FormLabelThemeConfig = ComponentConfig<FormLabelOwnerState, FormLabelSlot>;
|
|
467
|
+
/** The resolved props Grid's styled elements receive - what `ownerState` exposes. */
|
|
468
|
+
type GridOwnerState = Record<string, unknown>;
|
|
469
|
+
/** The slots of Grid a theme can style with `styleOverrides`. */
|
|
470
|
+
type GridSlot = 'root';
|
|
471
|
+
/** What `theme.components.Grid` takes. */
|
|
472
|
+
type GridThemeConfig = ComponentConfig<GridOwnerState, GridSlot>;
|
|
473
|
+
/** The resolved props Icon's styled elements receive - what `ownerState` exposes. */
|
|
474
|
+
type IconOwnerState = Record<string, unknown>;
|
|
475
|
+
/** The slots of Icon a theme can style with `styleOverrides`. */
|
|
476
|
+
type IconSlot = 'root';
|
|
477
|
+
/** What `theme.components.Icon` takes. */
|
|
478
|
+
type IconThemeConfig = ComponentConfig<IconOwnerState, IconSlot>;
|
|
479
|
+
/** The resolved props Image's styled elements receive - what `ownerState` exposes. */
|
|
480
|
+
type ImageOwnerState = Record<string, unknown>;
|
|
481
|
+
/** The slots of Image a theme can style with `styleOverrides`. */
|
|
482
|
+
type ImageSlot = 'root';
|
|
483
|
+
/** What `theme.components.Image` takes. */
|
|
484
|
+
type ImageThemeConfig = ComponentConfig<ImageOwnerState, ImageSlot>;
|
|
485
|
+
/** The resolved props LinearProgress's styled elements receive - what `ownerState` exposes. */
|
|
486
|
+
type LinearProgressOwnerState = Record<string, unknown>;
|
|
487
|
+
/** The slots of LinearProgress a theme can style with `styleOverrides`. */
|
|
488
|
+
type LinearProgressSlot = 'root' | 'track' | 'dash' | 'bar' | 'traveler' | 'segment' | 'secondaryBar';
|
|
489
|
+
/** What `theme.components.LinearProgress` takes. */
|
|
490
|
+
type LinearProgressThemeConfig = ComponentConfig<LinearProgressOwnerState, LinearProgressSlot>;
|
|
491
|
+
/** The resolved props Link's styled elements receive - what `ownerState` exposes. */
|
|
492
|
+
type LinkOwnerState = Record<string, unknown>;
|
|
493
|
+
/** The slots of Link a theme can style with `styleOverrides`. */
|
|
494
|
+
type LinkSlot = 'root';
|
|
495
|
+
/** What `theme.components.Link` takes. */
|
|
496
|
+
type LinkThemeConfig = ComponentConfig<LinkOwnerState, LinkSlot>;
|
|
497
|
+
/** The resolved props MenuDivider's styled elements receive - what `ownerState` exposes. */
|
|
498
|
+
type MenuDividerOwnerState = Record<string, unknown>;
|
|
499
|
+
/** The slots of MenuDivider a theme can style with `styleOverrides`. */
|
|
500
|
+
type MenuDividerSlot = 'root';
|
|
501
|
+
/** What `theme.components.MenuDivider` takes. */
|
|
502
|
+
type MenuDividerThemeConfig = ComponentConfig<MenuDividerOwnerState, MenuDividerSlot>;
|
|
503
|
+
/** The defaults a theme may set for every `MenuItem` - a list's own values win. */
|
|
504
|
+
interface MenuItemOwnerState {
|
|
505
|
+
color?: ThemeColor;
|
|
506
|
+
textColor?: keyof ThemeText;
|
|
507
|
+
size?: ThemeSize;
|
|
508
|
+
dense?: boolean;
|
|
509
|
+
}
|
|
510
|
+
/** The slots of MenuItem a theme can style with `styleOverrides`. */
|
|
511
|
+
type MenuItemSlot = 'root' | 'check' | 'startIcon' | 'label' | 'shortcut' | 'submenuIcon' | 'entry' | 'secondaryAction';
|
|
512
|
+
/** What `theme.components.MenuItem` takes. */
|
|
513
|
+
type MenuItemThemeConfig = ComponentConfig<MenuItemOwnerState, MenuItemSlot>;
|
|
514
|
+
/** The defaults a theme may set for every `MenuList` - and so for its rows. */
|
|
515
|
+
interface MenuListOwnerState {
|
|
516
|
+
color?: ThemeColor;
|
|
517
|
+
textColor?: keyof ThemeText;
|
|
518
|
+
size?: ThemeSize;
|
|
519
|
+
dense?: boolean;
|
|
520
|
+
shouldWrap?: boolean;
|
|
521
|
+
}
|
|
522
|
+
/** The slots of MenuList a theme can style with `styleOverrides`. */
|
|
523
|
+
type MenuListSlot = 'root';
|
|
524
|
+
/** What `theme.components.MenuList` takes. */
|
|
525
|
+
type MenuListThemeConfig = ComponentConfig<MenuListOwnerState, MenuListSlot>;
|
|
526
|
+
type ModalCloseReason = 'escapeKey' | 'backdropClick';
|
|
527
|
+
type ModalScroll = 'paper' | 'body';
|
|
528
|
+
interface ModalProps {
|
|
529
|
+
/** If true, the modal is shown. */
|
|
530
|
+
isOpen: boolean;
|
|
531
|
+
/** A single content element. */
|
|
532
|
+
children: ReactNode;
|
|
533
|
+
/** Fired on Escape (top modal only) or backdrop click. */
|
|
534
|
+
onClose?: (event: Event | React.SyntheticEvent, reason: ModalCloseReason) => void;
|
|
535
|
+
/** Render the dimmed backdrop. Default: true. */
|
|
536
|
+
hasBackdrop?: boolean;
|
|
537
|
+
/** Keep the children mounted while closed. Default: false. */
|
|
538
|
+
shouldKeepMounted?: boolean;
|
|
539
|
+
/** Portal the modal into `portalContainer`. Default: true. */
|
|
540
|
+
shouldUsePortal?: boolean;
|
|
541
|
+
/** Portal target, or a function returning one. Defaults to the document body. */
|
|
542
|
+
portalContainer?: HTMLElement | (() => HTMLElement | null) | null;
|
|
543
|
+
/** Lock body scroll while open. Default: true. */
|
|
544
|
+
shouldLockScroll?: boolean;
|
|
545
|
+
/** Skip `aria-hidden` on background content - for non-modal popovers whose trigger stays focused. Default: false. */
|
|
546
|
+
disableAriaHidden?: boolean;
|
|
547
|
+
/** Move focus into the modal on open. Default: true. */
|
|
548
|
+
shouldAutoFocus?: boolean;
|
|
549
|
+
/** Trap Tab focus within the modal. Default: true. */
|
|
550
|
+
shouldTrapFocus?: boolean;
|
|
551
|
+
/** Pull focus back into the modal whenever it escapes. Default: true. */
|
|
552
|
+
shouldEnforceFocus?: boolean;
|
|
553
|
+
/** Restore focus to the trigger on close. Default: true. */
|
|
554
|
+
shouldRestoreFocus?: boolean;
|
|
555
|
+
/** How long content scrolls: within the content (`'paper'`) or the whole root (`'body'`). Default: 'paper'. */
|
|
556
|
+
scroll?: ModalScroll;
|
|
557
|
+
/** Stacking layer from `theme.zOrder`. Default: 'modal'. */
|
|
558
|
+
layer?: keyof Theme['zOrder'];
|
|
559
|
+
/** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
|
|
560
|
+
style?: StyleOverride;
|
|
561
|
+
className?: string;
|
|
562
|
+
/** Overrides for the slots a theme can style: `style`, `className`, `data-*` and `aria-*`. */
|
|
563
|
+
slotProps?: SlotProps<ModalSlot>;
|
|
564
|
+
}
|
|
565
|
+
/** The resolved props Modal's styled elements receive - what `ownerState` exposes. */
|
|
566
|
+
type ModalOwnerState = Record<string, unknown>;
|
|
567
|
+
/** The slots of Modal a theme can style with `styleOverrides`. */
|
|
568
|
+
type ModalSlot = 'root';
|
|
569
|
+
/** What `theme.components.Modal` takes. */
|
|
570
|
+
type ModalThemeConfig = ComponentConfig<ModalOwnerState, ModalSlot>;
|
|
571
|
+
/** The resolved props NativeSelect's styled elements receive - what `ownerState` exposes. */
|
|
572
|
+
type NativeSelectOwnerState = Record<string, unknown>;
|
|
573
|
+
/** The slots of NativeSelect a theme can style with `styleOverrides`. */
|
|
574
|
+
type NativeSelectSlot = 'root' | 'select' | 'icon';
|
|
575
|
+
/** What `theme.components.NativeSelect` takes. */
|
|
576
|
+
type NativeSelectThemeConfig = ComponentConfig<NativeSelectOwnerState, NativeSelectSlot>;
|
|
577
|
+
/** The resolved props NavGroup's styled elements receive - what `ownerState` exposes. */
|
|
578
|
+
type NavGroupOwnerState = Record<string, unknown>;
|
|
579
|
+
/** The slots of NavGroup a theme can style with `styleOverrides`. */
|
|
580
|
+
type NavGroupSlot = 'root' | 'label' | 'list';
|
|
581
|
+
/** What `theme.components.NavGroup` takes. */
|
|
582
|
+
type NavGroupThemeConfig = ComponentConfig<NavGroupOwnerState, NavGroupSlot>;
|
|
583
|
+
/** The resolved props NavLink's styled elements receive - what `ownerState` exposes. */
|
|
584
|
+
type NavLinkOwnerState = Record<string, unknown>;
|
|
585
|
+
/** The slots of NavLink a theme can style with `styleOverrides`. */
|
|
586
|
+
type NavLinkSlot = 'root' | 'label' | 'note';
|
|
587
|
+
/** What `theme.components.NavLink` takes. */
|
|
588
|
+
type NavLinkThemeConfig = ComponentConfig<NavLinkOwnerState, NavLinkSlot>;
|
|
589
|
+
/** The resolved props NavTree's styled elements receive - what `ownerState` exposes. */
|
|
590
|
+
type NavTreeOwnerState = Record<string, unknown>;
|
|
591
|
+
/** The slots of NavTree a theme can style with `styleOverrides`. */
|
|
592
|
+
type NavTreeSlot = 'root';
|
|
593
|
+
/** What `theme.components.NavTree` takes. */
|
|
594
|
+
type NavTreeThemeConfig = ComponentConfig<NavTreeOwnerState, NavTreeSlot>;
|
|
595
|
+
/** The defaults a theme may set for every `NumberInput` - its button labels give it a language. */
|
|
596
|
+
interface NumberInputOwnerState {
|
|
597
|
+
variant?: InputVariantKey;
|
|
598
|
+
size?: ThemeSize;
|
|
599
|
+
color?: ThemeColor;
|
|
600
|
+
spinButtons?: 'stacked' | 'sides' | 'none';
|
|
601
|
+
step?: number;
|
|
602
|
+
smallStep?: number;
|
|
603
|
+
largeStep?: number;
|
|
604
|
+
shouldSnapOnStep?: boolean;
|
|
605
|
+
shouldScrubOnWheel?: boolean;
|
|
606
|
+
incrementLabel?: string;
|
|
607
|
+
decrementLabel?: string;
|
|
608
|
+
}
|
|
609
|
+
/** The slots of NumberInput a theme can style with `styleOverrides`. */
|
|
610
|
+
type NumberInputSlot = 'root' | 'input' | 'content' | 'spinButtons' | 'increment' | 'decrement';
|
|
611
|
+
/** What `theme.components.NumberInput` takes. */
|
|
612
|
+
type NumberInputThemeConfig = ComponentConfig<NumberInputOwnerState, NumberInputSlot>;
|
|
613
|
+
/** The resolved props Pagination's styled elements receive - what `ownerState` exposes. */
|
|
614
|
+
type PaginationOwnerState = Record<string, unknown>;
|
|
615
|
+
/** The slots of Pagination a theme can style with `styleOverrides`. */
|
|
616
|
+
type PaginationSlot = 'root' | 'list';
|
|
617
|
+
/** What `theme.components.Pagination` takes. */
|
|
618
|
+
type PaginationThemeConfig = ComponentConfig<PaginationOwnerState, PaginationSlot>;
|
|
619
|
+
/** The resolved props PaginationItem's styled elements receive - what `ownerState` exposes. */
|
|
620
|
+
type PaginationItemOwnerState = Record<string, unknown>;
|
|
621
|
+
/** The slots of PaginationItem a theme can style with `styleOverrides`. */
|
|
622
|
+
type PaginationItemSlot = 'root' | 'ellipsis';
|
|
623
|
+
/** What `theme.components.PaginationItem` takes. */
|
|
624
|
+
type PaginationItemThemeConfig = ComponentConfig<PaginationItemOwnerState, PaginationItemSlot>;
|
|
625
|
+
/** The resolved props Popover's styled elements receive - what `ownerState` exposes. */
|
|
626
|
+
type PopoverOwnerState = Record<string, unknown>;
|
|
627
|
+
/** The slots of Popover a theme can style with `styleOverrides`. */
|
|
628
|
+
type PopoverSlot = 'root' | 'positioner';
|
|
629
|
+
/** What `theme.components.Popover` takes. */
|
|
630
|
+
type PopoverThemeConfig = ComponentConfig<PopoverOwnerState, PopoverSlot>;
|
|
631
|
+
/**
|
|
632
|
+
* Pressable's resolved props / theme-settable defaults. Only the three keys it
|
|
633
|
+
* actually resolves through `useDefaultProps` - the disabled state reaches the
|
|
634
|
+
* styled root as `isDisabled` and is never read from here, so exposing it would
|
|
635
|
+
* promise theme authors an override that does nothing.
|
|
636
|
+
*/
|
|
637
|
+
interface PressableOwnerState {
|
|
638
|
+
feedback?: 'none' | 'opacity' | 'highlight';
|
|
639
|
+
color?: ThemeColor;
|
|
640
|
+
/** Opacity held content fades to under `feedback: 'opacity'`. */
|
|
641
|
+
activeOpacity?: number;
|
|
642
|
+
}
|
|
643
|
+
/** The slots of Pressable a theme can style with `styleOverrides`. */
|
|
644
|
+
type PressableSlot = 'root';
|
|
645
|
+
/** What `theme.components.Pressable` takes. */
|
|
646
|
+
type PressableThemeConfig = ComponentConfig<PressableOwnerState, PressableSlot>;
|
|
647
|
+
/** The resolved props Quote's styled elements receive - what `ownerState` exposes. */
|
|
648
|
+
type QuoteOwnerState = Record<string, unknown>;
|
|
649
|
+
/** The slots of Quote a theme can style with `styleOverrides`. */
|
|
650
|
+
type QuoteSlot = 'root';
|
|
651
|
+
/** What `theme.components.Quote` takes. */
|
|
652
|
+
type QuoteThemeConfig = ComponentConfig<QuoteOwnerState, QuoteSlot>;
|
|
653
|
+
/** The resolved props Radio's styled elements receive - what `ownerState` exposes. */
|
|
654
|
+
type RadioOwnerState = Record<string, unknown>;
|
|
655
|
+
/** The slots of Radio a theme can style with `styleOverrides`. */
|
|
656
|
+
type RadioSlot = 'root' | 'input' | 'icon' | 'label';
|
|
657
|
+
/** What `theme.components.Radio` takes. */
|
|
658
|
+
type RadioThemeConfig = ComponentConfig<RadioOwnerState, RadioSlot>;
|
|
659
|
+
/** The defaults a theme may set for every `RangeInput`. */
|
|
660
|
+
interface RangeInputOwnerState {
|
|
661
|
+
size?: ThemeSize;
|
|
662
|
+
color?: ThemeColor;
|
|
663
|
+
orientation?: 'horizontal' | 'vertical';
|
|
664
|
+
track?: 'normal' | false | 'inverted';
|
|
665
|
+
step?: number | null;
|
|
666
|
+
shiftStep?: number;
|
|
667
|
+
valueLabel?: 'auto' | 'on' | 'off';
|
|
668
|
+
shouldSwapThumbs?: boolean;
|
|
669
|
+
}
|
|
670
|
+
/** The slots of RangeInput a theme can style with `styleOverrides`. */
|
|
671
|
+
type RangeInputSlot = 'root' | 'rail' | 'track' | 'thumb' | 'mark' | 'markLabel' | 'valueLabel' | 'input';
|
|
672
|
+
/** What `theme.components.RangeInput` takes. */
|
|
673
|
+
type RangeInputThemeConfig = ComponentConfig<RangeInputOwnerState, RangeInputSlot>;
|
|
674
|
+
/** The defaults a theme may set for every `Rating`. */
|
|
675
|
+
interface RatingOwnerState {
|
|
676
|
+
max?: number;
|
|
677
|
+
precision?: number;
|
|
678
|
+
highlightSelectedOnly?: boolean;
|
|
679
|
+
size?: ThemeSize;
|
|
680
|
+
color?: ThemeColor;
|
|
681
|
+
}
|
|
682
|
+
/** The slots of Rating a theme can style with `styleOverrides`. */
|
|
683
|
+
type RatingSlot = 'root' | 'item' | 'icon' | 'decimal' | 'input' | 'text' | 'emptyLabel';
|
|
684
|
+
/** What `theme.components.Rating` takes. */
|
|
685
|
+
type RatingThemeConfig = ComponentConfig<RatingOwnerState, RatingSlot>;
|
|
686
|
+
/** The defaults a theme may set for every `ScrollArea`. */
|
|
687
|
+
interface ScrollAreaOwnerState {
|
|
688
|
+
axes?: 'x' | 'y' | 'both';
|
|
689
|
+
}
|
|
690
|
+
/** The slots of ScrollArea a theme can style with `styleOverrides`. */
|
|
691
|
+
type ScrollAreaSlot = 'root' | 'viewport' | 'track' | 'thumb';
|
|
692
|
+
/** What `theme.components.ScrollArea` takes. */
|
|
693
|
+
type ScrollAreaThemeConfig = ComponentConfig<ScrollAreaOwnerState, ScrollAreaSlot>;
|
|
694
|
+
/** The resolved props Select's styled elements receive - what `ownerState` exposes. */
|
|
695
|
+
type SelectOwnerState = Record<string, unknown>;
|
|
696
|
+
/** The slots of Select a theme can style with `styleOverrides`. */
|
|
697
|
+
type SelectSlot = 'root' | 'value' | 'valueArea' | 'valueGhost' | 'listbox';
|
|
698
|
+
/** What `theme.components.Select` takes. */
|
|
699
|
+
type SelectThemeConfig = ComponentConfig<SelectOwnerState, SelectSlot>;
|
|
700
|
+
/** The resolved props Sidebar's styled elements receive - what `ownerState` exposes. */
|
|
701
|
+
type SidebarOwnerState = Record<string, unknown>;
|
|
702
|
+
/** The slots of Sidebar a theme can style with `styleOverrides`. */
|
|
703
|
+
type SidebarSlot = 'root' | 'rail' | 'panel';
|
|
704
|
+
/** What `theme.components.Sidebar` takes. */
|
|
705
|
+
type SidebarThemeConfig = ComponentConfig<SidebarOwnerState, SidebarSlot>;
|
|
706
|
+
/** The resolved props SidebarItem's styled elements receive - what `ownerState` exposes. */
|
|
707
|
+
type SidebarItemOwnerState = Record<string, unknown>;
|
|
708
|
+
/** The slots of SidebarItem a theme can style with `styleOverrides`. */
|
|
709
|
+
type SidebarItemSlot = 'root' | 'pill';
|
|
710
|
+
/** What `theme.components.SidebarItem` takes. */
|
|
711
|
+
type SidebarItemThemeConfig = ComponentConfig<SidebarItemOwnerState, SidebarItemSlot>;
|
|
712
|
+
/** The resolved props Skeleton's styled elements receive - what `ownerState` exposes. */
|
|
713
|
+
type SkeletonOwnerState = Record<string, unknown>;
|
|
714
|
+
/** The slots of Skeleton a theme can style with `styleOverrides`. */
|
|
715
|
+
type SkeletonSlot = 'root' | 'content';
|
|
716
|
+
/** What `theme.components.Skeleton` takes. */
|
|
717
|
+
type SkeletonThemeConfig = ComponentConfig<SkeletonOwnerState, SkeletonSlot>;
|
|
718
|
+
/** The corner shapes of a control or a surface. */
|
|
719
|
+
type ShapeKey = 'square' | 'rounded' | 'pill';
|
|
720
|
+
/** The defaults a theme may set for every `Snackbar`. */
|
|
721
|
+
interface SnackbarOwnerState {
|
|
722
|
+
anchorOrigin?: {
|
|
723
|
+
vertical: 'top' | 'bottom';
|
|
724
|
+
horizontal: 'start' | 'center' | 'end';
|
|
725
|
+
};
|
|
726
|
+
autoHideDuration?: number;
|
|
727
|
+
resumeHideDuration?: number;
|
|
728
|
+
layer?: keyof ThemeZOrder;
|
|
729
|
+
shape?: ShapeKey;
|
|
730
|
+
borderRadius?: keyof ThemeRadii;
|
|
731
|
+
bg?: keyof ThemeBackground;
|
|
732
|
+
textColor?: keyof ThemeText;
|
|
733
|
+
}
|
|
734
|
+
/** The slots of Snackbar a theme can style with `styleOverrides`. */
|
|
735
|
+
type SnackbarSlot = 'root' | 'content' | 'message' | 'action';
|
|
736
|
+
/** What `theme.components.Snackbar` takes. */
|
|
737
|
+
type SnackbarThemeConfig = ComponentConfig<SnackbarOwnerState, SnackbarSlot>;
|
|
738
|
+
/** The resolved props Switch's styled elements receive - what `ownerState` exposes. */
|
|
739
|
+
type SwitchOwnerState = Record<string, unknown>;
|
|
740
|
+
/** The slots of Switch a theme can style with `styleOverrides`. */
|
|
741
|
+
type SwitchSlot = 'root' | 'input' | 'track' | 'thumb' | 'label';
|
|
742
|
+
/** What `theme.components.Switch` takes. */
|
|
743
|
+
type SwitchThemeConfig = ComponentConfig<SwitchOwnerState, SwitchSlot>;
|
|
744
|
+
/** The defaults a theme may set for every `Tab`. */
|
|
745
|
+
interface TabOwnerState {
|
|
746
|
+
isWrapped?: boolean;
|
|
747
|
+
bg?: keyof ThemeBackground;
|
|
748
|
+
borderRadius?: keyof ThemeRadii;
|
|
749
|
+
color?: ThemeColor;
|
|
750
|
+
textColor?: keyof ThemeText;
|
|
751
|
+
size?: ThemeSize;
|
|
752
|
+
selectedBg?: keyof ThemeBackground;
|
|
753
|
+
}
|
|
754
|
+
/** The slots of Tab a theme can style with `styleOverrides`. */
|
|
755
|
+
type TabSlot = 'root' | 'label' | 'icon' | 'secondaryAction' | 'close';
|
|
756
|
+
/** What `theme.components.Tab` takes. */
|
|
757
|
+
type TabThemeConfig = ComponentConfig<TabOwnerState, TabSlot>;
|
|
758
|
+
/** The defaults a theme may set for every `TabPanel`. */
|
|
759
|
+
interface TabPanelOwnerState {
|
|
760
|
+
shouldKeepMounted?: boolean;
|
|
761
|
+
}
|
|
762
|
+
/** The slots of TabPanel a theme can style with `styleOverrides`. */
|
|
763
|
+
type TabPanelSlot = 'root';
|
|
764
|
+
/** What `theme.components.TabPanel` takes. */
|
|
765
|
+
type TabPanelThemeConfig = ComponentConfig<TabPanelOwnerState, TabPanelSlot>;
|
|
766
|
+
/** The defaults a theme may set for every `TabScrollButton`. */
|
|
767
|
+
interface TabScrollButtonOwnerState {
|
|
768
|
+
color?: ThemeColor;
|
|
769
|
+
textColor?: keyof ThemeText;
|
|
770
|
+
}
|
|
771
|
+
/** The slots of TabScrollButton a theme can style with `styleOverrides`. */
|
|
772
|
+
type TabScrollButtonSlot = 'root';
|
|
773
|
+
/** What `theme.components.TabScrollButton` takes. */
|
|
774
|
+
type TabScrollButtonThemeConfig = ComponentConfig<TabScrollButtonOwnerState, TabScrollButtonSlot>;
|
|
775
|
+
/** The resolved props Table's styled elements receive - what `ownerState` exposes. */
|
|
776
|
+
type TableOwnerState = Record<string, unknown>;
|
|
777
|
+
/** The slots of Table a theme can style with `styleOverrides`. */
|
|
778
|
+
type TableSlot = 'root';
|
|
779
|
+
/** What `theme.components.Table` takes. */
|
|
780
|
+
type TableThemeConfig = ComponentConfig<TableOwnerState, TableSlot>;
|
|
781
|
+
/** The resolved props TableBody's styled elements receive - what `ownerState` exposes. */
|
|
782
|
+
type TableBodyOwnerState = Record<string, unknown>;
|
|
783
|
+
/** The slots of TableBody a theme can style with `styleOverrides`. */
|
|
784
|
+
type TableBodySlot = 'root';
|
|
785
|
+
/** What `theme.components.TableBody` takes. */
|
|
786
|
+
type TableBodyThemeConfig = ComponentConfig<TableBodyOwnerState, TableBodySlot>;
|
|
787
|
+
/** The resolved props TableCell's styled elements receive - what `ownerState` exposes. */
|
|
788
|
+
type TableCellOwnerState = Record<string, unknown>;
|
|
789
|
+
/** The slots of TableCell a theme can style with `styleOverrides`. */
|
|
790
|
+
type TableCellSlot = 'root';
|
|
791
|
+
/** What `theme.components.TableCell` takes. */
|
|
792
|
+
type TableCellThemeConfig = ComponentConfig<TableCellOwnerState, TableCellSlot>;
|
|
793
|
+
/** The resolved props TableContainer's styled elements receive - what `ownerState` exposes. */
|
|
794
|
+
type TableContainerOwnerState = Record<string, unknown>;
|
|
795
|
+
/** The slots of TableContainer a theme can style with `styleOverrides`. */
|
|
796
|
+
type TableContainerSlot = 'root';
|
|
797
|
+
/** What `theme.components.TableContainer` takes. */
|
|
798
|
+
type TableContainerThemeConfig = ComponentConfig<TableContainerOwnerState, TableContainerSlot>;
|
|
799
|
+
/** The resolved props TableFooter's styled elements receive - what `ownerState` exposes. */
|
|
800
|
+
type TableFooterOwnerState = Record<string, unknown>;
|
|
801
|
+
/** The slots of TableFooter a theme can style with `styleOverrides`. */
|
|
802
|
+
type TableFooterSlot = 'root';
|
|
803
|
+
/** What `theme.components.TableFooter` takes. */
|
|
804
|
+
type TableFooterThemeConfig = ComponentConfig<TableFooterOwnerState, TableFooterSlot>;
|
|
805
|
+
/** The resolved props TableHead's styled elements receive - what `ownerState` exposes. */
|
|
806
|
+
type TableHeadOwnerState = Record<string, unknown>;
|
|
807
|
+
/** The slots of TableHead a theme can style with `styleOverrides`. */
|
|
808
|
+
type TableHeadSlot = 'root';
|
|
809
|
+
/** What `theme.components.TableHead` takes. */
|
|
810
|
+
type TableHeadThemeConfig = ComponentConfig<TableHeadOwnerState, TableHeadSlot>;
|
|
811
|
+
/** The resolved props TablePagination's styled elements receive - what `ownerState` exposes. */
|
|
812
|
+
type TablePaginationOwnerState = Record<string, unknown>;
|
|
813
|
+
/** The slots of TablePagination a theme can style with `styleOverrides`. */
|
|
814
|
+
type TablePaginationSlot = 'root';
|
|
815
|
+
/** What `theme.components.TablePagination` takes. */
|
|
816
|
+
type TablePaginationThemeConfig = ComponentConfig<TablePaginationOwnerState, TablePaginationSlot>;
|
|
817
|
+
/** The resolved props TablePaginationActions's styled elements receive - what `ownerState` exposes. */
|
|
818
|
+
type TablePaginationActionsOwnerState = Record<string, unknown>;
|
|
819
|
+
/** The slots of TablePaginationActions a theme can style with `styleOverrides`. */
|
|
820
|
+
type TablePaginationActionsSlot = 'root';
|
|
821
|
+
/** What `theme.components.TablePaginationActions` takes. */
|
|
822
|
+
type TablePaginationActionsThemeConfig = ComponentConfig<TablePaginationActionsOwnerState, TablePaginationActionsSlot>;
|
|
823
|
+
/** The resolved props TableRow's styled elements receive - what `ownerState` exposes. */
|
|
824
|
+
type TableRowOwnerState = Record<string, unknown>;
|
|
825
|
+
/** The slots of TableRow a theme can style with `styleOverrides`. */
|
|
826
|
+
type TableRowSlot = 'root';
|
|
827
|
+
/** What `theme.components.TableRow` takes. */
|
|
828
|
+
type TableRowThemeConfig = ComponentConfig<TableRowOwnerState, TableRowSlot>;
|
|
829
|
+
/** The resolved props TableSortLabel's styled elements receive - what `ownerState` exposes. */
|
|
830
|
+
type TableSortLabelOwnerState = Record<string, unknown>;
|
|
831
|
+
/** The slots of TableSortLabel a theme can style with `styleOverrides`. */
|
|
832
|
+
type TableSortLabelSlot = 'root' | 'icon';
|
|
833
|
+
/** What `theme.components.TableSortLabel` takes. */
|
|
834
|
+
type TableSortLabelThemeConfig = ComponentConfig<TableSortLabelOwnerState, TableSortLabelSlot>;
|
|
835
|
+
/** The resolved props Tabs' styled elements receive - what `ownerState` exposes. */
|
|
836
|
+
interface TabsOwnerState {
|
|
837
|
+
variant?: TabsVariant;
|
|
838
|
+
color?: ThemeColor;
|
|
839
|
+
size?: ThemeSize;
|
|
840
|
+
orientation?: 'horizontal' | 'vertical';
|
|
841
|
+
fullWidth?: boolean;
|
|
842
|
+
hasDivider?: boolean;
|
|
843
|
+
selectedBg?: keyof ThemeBackground;
|
|
844
|
+
}
|
|
845
|
+
/** Tabs' look values - augment to register new ones (then style them via `variants`). */
|
|
846
|
+
interface TabsVariants {
|
|
847
|
+
underline: true;
|
|
848
|
+
boxed: true;
|
|
849
|
+
enclosed: true;
|
|
850
|
+
tonal: true;
|
|
851
|
+
}
|
|
852
|
+
/** Tabs' looks: the built-in ones, those added through `TabsVariants`, and those a registered theme defines. */
|
|
853
|
+
type TabsVariant = keyof TabsVariants | VariantOf<'Tabs'>;
|
|
854
|
+
/** The slots of Tabs a theme can style with `styleOverrides`. */
|
|
855
|
+
type TabsSlot = 'root' | 'list' | 'indicator' | 'startContent' | 'endContent' | 'scrollButton' | 'overflowButton' | 'overflowClose';
|
|
856
|
+
/** What `theme.components.Tabs` takes. */
|
|
857
|
+
type TabsThemeConfig = ComponentConfig<TabsOwnerState, TabsSlot>;
|
|
858
|
+
type TextInputColor = keyof Theme['palette'];
|
|
859
|
+
type TextInputTextColor = keyof Theme['text'];
|
|
860
|
+
type TextInputVariant = 'default' | 'outlined' | 'text' | 'underline';
|
|
861
|
+
type TextInputSize = keyof Theme['sizes'];
|
|
862
|
+
interface TextInputClasses {
|
|
863
|
+
root?: string;
|
|
864
|
+
input?: string;
|
|
865
|
+
}
|
|
866
|
+
interface TextInputProps extends SpaceProps, Pick<LayoutProps, 'width' | 'minWidth' | 'maxWidth'> {
|
|
867
|
+
/** Corner radius - applies only to `default` and `outlined` variants. Resolves against `theme.radii`. */
|
|
868
|
+
borderRadius?: keyof Theme['radii'];
|
|
869
|
+
autoComplete?: string;
|
|
870
|
+
autoFocus?: boolean;
|
|
871
|
+
/** Class names applied to inner elements. `root` targets the wrapper; `input` targets the native element. */
|
|
872
|
+
classes?: TextInputClasses;
|
|
873
|
+
/** Override components for the Root and Input slots. */
|
|
874
|
+
components?: {
|
|
875
|
+
Input?: ElementType;
|
|
876
|
+
Root?: ElementType;
|
|
877
|
+
};
|
|
878
|
+
/** Focus/active border color - resolves to `theme.palette[color].main`. Default: 'primary', overridable via `theme.defaults.color`. */
|
|
879
|
+
color?: TextInputColor;
|
|
880
|
+
/** Text color of the typed value - resolves against `theme.text`. Default: the accent `color`'s `main`. */
|
|
881
|
+
textColor?: TextInputTextColor;
|
|
882
|
+
/** Disables the input. */
|
|
883
|
+
disabled?: boolean;
|
|
884
|
+
/** Marks the field as invalid - applies error border color. */
|
|
885
|
+
error?: boolean;
|
|
886
|
+
/** Stretches the root to fill its container. */
|
|
887
|
+
fullWidth?: boolean;
|
|
888
|
+
id?: string;
|
|
889
|
+
/** Custom component for the input element. Takes priority over `components.Input`. Default: `'input'`. */
|
|
890
|
+
inputComponent?: ElementType;
|
|
891
|
+
/** Native HTML `size` attribute - visible width in character widths. Has no effect with `multiline` or `resize`. */
|
|
892
|
+
inputSize?: number;
|
|
893
|
+
/** Extra props spread onto the native element. Explicit top-level props take priority. */
|
|
894
|
+
inputProps?: Omit<InputHTMLAttributes<HTMLInputElement>, 'style'> & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'style'>;
|
|
895
|
+
/** Maximum rows before the auto-grow textarea starts scrolling. Only applies when `resize` is set. */
|
|
896
|
+
maxRows?: number | string;
|
|
897
|
+
/** Minimum rows for the auto-grow textarea. Only applies when `resize` is set. */
|
|
898
|
+
minRows?: number | string;
|
|
899
|
+
/**
|
|
900
|
+
* Renders a `<textarea>` that grows with its content.
|
|
901
|
+
* Combine with `rows` to fix the height instead of auto-growing.
|
|
902
|
+
*/
|
|
903
|
+
multiline?: boolean;
|
|
904
|
+
name?: string;
|
|
905
|
+
onChange?: ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
906
|
+
placeholder?: string;
|
|
907
|
+
readOnly?: boolean;
|
|
908
|
+
required?: boolean;
|
|
909
|
+
/** Auto-grows the textarea as content increases. Requires `multiline`. */
|
|
910
|
+
resize?: boolean;
|
|
911
|
+
/** Controls padding and font size. Default: 'md', overridable via `theme.defaults.size`. */
|
|
912
|
+
size?: TextInputSize;
|
|
913
|
+
/**
|
|
914
|
+
* Fixes the textarea height to this many rows. Also enables `multiline`
|
|
915
|
+
* when value is greater than 1. Disables resize.
|
|
916
|
+
*/
|
|
917
|
+
rows?: number | string;
|
|
918
|
+
/** HTML input type. Ignored when multiline. Default: `'text'`. */
|
|
919
|
+
type?: string;
|
|
920
|
+
/**
|
|
921
|
+
* Visual style of the input.
|
|
922
|
+
* - `outlined` / `default` - full border box (default)
|
|
923
|
+
* - `underline` - border on bottom only
|
|
924
|
+
* - `text` - no border, transparent background
|
|
925
|
+
*/
|
|
926
|
+
variant?: TextInputVariant;
|
|
927
|
+
value?: string | number | readonly string[];
|
|
928
|
+
className?: string;
|
|
929
|
+
/** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
|
|
930
|
+
style?: StyleOverride;
|
|
931
|
+
/** Overrides for the slots a theme can style: `style`, `className`, `data-*` and `aria-*`. */
|
|
932
|
+
slotProps?: SlotProps<TextInputSlot>;
|
|
933
|
+
'data-testid'?: string;
|
|
934
|
+
}
|
|
935
|
+
/** The resolved props TextInput's styled elements receive - what `ownerState` exposes. */
|
|
936
|
+
type TextInputOwnerState = Record<string, unknown>;
|
|
937
|
+
/** The slots of TextInput a theme can style with `styleOverrides`. */
|
|
938
|
+
type TextInputSlot = 'root' | 'input';
|
|
939
|
+
/** What `theme.components.TextInput` takes. */
|
|
940
|
+
type TextInputThemeConfig = ComponentConfig<TextInputOwnerState, TextInputSlot>;
|
|
941
|
+
/** The resolved props ToggleButton's styled elements receive - what `ownerState` exposes. */
|
|
942
|
+
type ToggleButtonOwnerState = Record<string, unknown>;
|
|
943
|
+
/** The slots of ToggleButton a theme can style with `styleOverrides`. */
|
|
944
|
+
type ToggleButtonSlot = 'root';
|
|
945
|
+
/** What `theme.components.ToggleButton` takes. */
|
|
946
|
+
type ToggleButtonThemeConfig = ComponentConfig<ToggleButtonOwnerState, ToggleButtonSlot>;
|
|
947
|
+
/** The resolved props ToggleButtonGroup's styled elements receive - what `ownerState` exposes. */
|
|
948
|
+
type ToggleButtonGroupOwnerState = Record<string, unknown>;
|
|
949
|
+
/** The slots of ToggleButtonGroup a theme can style with `styleOverrides`. */
|
|
950
|
+
type ToggleButtonGroupSlot = 'root';
|
|
951
|
+
/** What `theme.components.ToggleButtonGroup` takes. */
|
|
952
|
+
type ToggleButtonGroupThemeConfig = ComponentConfig<ToggleButtonGroupOwnerState, ToggleButtonGroupSlot>;
|
|
953
|
+
/** The defaults a theme may set for every `Tooltip`. */
|
|
954
|
+
interface TooltipOwnerState {
|
|
955
|
+
borderRadius?: keyof ThemeRadii;
|
|
956
|
+
bg?: keyof ThemeBackground;
|
|
957
|
+
textColor?: keyof ThemeText;
|
|
958
|
+
placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end' | 'auto' | 'auto-start' | 'auto-end';
|
|
959
|
+
hasArrow?: boolean;
|
|
960
|
+
enterDelay?: number;
|
|
961
|
+
leaveDelay?: number;
|
|
962
|
+
enterTouchDelay?: number;
|
|
963
|
+
leaveTouchDelay?: number;
|
|
964
|
+
shouldDescribeChild?: boolean;
|
|
965
|
+
isDescriptionPersistent?: boolean;
|
|
966
|
+
isInteractive?: boolean;
|
|
967
|
+
shouldWrapDisabledChild?: boolean;
|
|
968
|
+
/**
|
|
969
|
+
* Theme only. With a value above 0, every tooltip under the theme shares one delay window, as in a
|
|
970
|
+
* `TooltipGroup` of that duration: no enter delay while another is open or within this many
|
|
971
|
+
* milliseconds of the last close. A `TooltipGroup` around a tooltip wins.
|
|
972
|
+
*/
|
|
973
|
+
skipDelayDuration?: number;
|
|
974
|
+
shouldOpenOnHover?: boolean;
|
|
975
|
+
shouldOpenOnFocus?: boolean;
|
|
976
|
+
shouldOpenOnTouch?: boolean;
|
|
977
|
+
layer?: keyof ThemeZOrder;
|
|
978
|
+
}
|
|
979
|
+
/** The slots of Tooltip a theme can style with `styleOverrides`. */
|
|
980
|
+
type TooltipSlot = 'root' | 'arrow';
|
|
981
|
+
/** What `theme.components.Tooltip` takes. */
|
|
982
|
+
type TooltipThemeConfig = ComponentConfig<TooltipOwnerState, TooltipSlot>;
|
|
983
|
+
/** The defaults a theme may set for every `TransferList` - its button labels give it a language. */
|
|
984
|
+
interface TransferListOwnerState {
|
|
985
|
+
size?: ThemeSize;
|
|
986
|
+
color?: ThemeColor;
|
|
987
|
+
shouldShowMoveAll?: boolean;
|
|
988
|
+
hasSelectAll?: boolean;
|
|
989
|
+
moveAllRightLabel?: string;
|
|
990
|
+
moveRightLabel?: string;
|
|
991
|
+
moveLeftLabel?: string;
|
|
992
|
+
moveAllLeftLabel?: string;
|
|
993
|
+
}
|
|
994
|
+
/** The slots of TransferList a theme can style with `styleOverrides`. */
|
|
995
|
+
type TransferListSlot = 'root' | 'list' | 'header' | 'title' | 'count' | 'items' | 'item' | 'controls' | 'icon';
|
|
996
|
+
/** What `theme.components.TransferList` takes. */
|
|
997
|
+
type TransferListThemeConfig = ComponentConfig<TransferListOwnerState, TransferListSlot>;
|
|
998
|
+
type TypographyAlign = 'left' | 'right' | 'center' | 'justify' | 'inherit';
|
|
999
|
+
/** Valid values for the color prop - derived from theme.text keys. */
|
|
1000
|
+
type TextColorToken = keyof Theme['text'];
|
|
1001
|
+
/** Valid values for the bg prop - derived from theme.background keys. */
|
|
1002
|
+
type BackgroundToken = keyof Theme['background'];
|
|
1003
|
+
interface TypographyProps extends Omit<HTMLAttributes<HTMLElement>, 'color' | 'style'>, SpaceProps, LayoutProps, TypographyProps$1, FlexboxProps, BorderProps, PositionProps {
|
|
1004
|
+
/** Resolves against theme.text - inherit · initial · primary · secondary · error · success */
|
|
1005
|
+
color?: TextColorToken;
|
|
1006
|
+
/** Resolves against theme.background */
|
|
1007
|
+
bg?: BackgroundToken;
|
|
1008
|
+
/** Overrides the CSS of the element: an entry of `StyleSheet.create`, or a list of them. */
|
|
1009
|
+
style?: StyleOverride;
|
|
1010
|
+
/** Overrides for the slots a theme can style: `style`, `className`, `data-*` and `aria-*`. */
|
|
1011
|
+
slotProps?: SlotProps<TypographySlot>;
|
|
1012
|
+
opacity?: number;
|
|
1013
|
+
textTransform?: CSSProperties['textTransform'];
|
|
1014
|
+
variant?: TypographyVariant;
|
|
1015
|
+
align?: TypographyAlign;
|
|
1016
|
+
gutterBottom?: boolean;
|
|
1017
|
+
noWrap?: boolean;
|
|
1018
|
+
/** Machine-readable timestamp - forwarded when rendering as `<time>` (`as="time"`). */
|
|
1019
|
+
dateTime?: string;
|
|
1020
|
+
as?: ElementType;
|
|
1021
|
+
}
|
|
1022
|
+
/** The resolved props Typography's styled elements receive - what `ownerState` exposes. */
|
|
1023
|
+
type TypographyOwnerState = Record<string, unknown>;
|
|
1024
|
+
/** The slots of Typography a theme can style with `styleOverrides`. */
|
|
1025
|
+
type TypographySlot = 'root';
|
|
1026
|
+
/** What `theme.components.Typography` takes. */
|
|
1027
|
+
type TypographyThemeConfig = ComponentConfig<TypographyOwnerState, TypographySlot>;
|
|
1028
|
+
/**
|
|
1029
|
+
* Per-component theme customization, keyed by component name: each key takes the component's
|
|
1030
|
+
* `<Name>ThemeConfig` - its owner state, its slots, its default props and variants. An app checks
|
|
1031
|
+
* its looks against it with `satisfies ThemeComponents`.
|
|
1032
|
+
*/
|
|
1033
|
+
interface ThemeComponents {
|
|
1034
|
+
Accordion?: AccordionThemeConfig;
|
|
1035
|
+
AccordionActions?: AccordionActionsThemeConfig;
|
|
1036
|
+
AccordionDetails?: AccordionDetailsThemeConfig;
|
|
1037
|
+
AccordionGroup?: AccordionGroupThemeConfig;
|
|
1038
|
+
AccordionSummary?: AccordionSummaryThemeConfig;
|
|
1039
|
+
Alert?: AlertThemeConfig;
|
|
1040
|
+
AlertTitle?: AlertTitleThemeConfig;
|
|
1041
|
+
AppBar?: AppBarThemeConfig;
|
|
1042
|
+
Autocomplete?: AutocompleteThemeConfig;
|
|
1043
|
+
Avatar?: AvatarThemeConfig;
|
|
1044
|
+
Backdrop?: BackdropThemeConfig;
|
|
1045
|
+
Badge?: BadgeThemeConfig;
|
|
1046
|
+
Breadcrumbs?: BreadcrumbsThemeConfig;
|
|
1047
|
+
Button?: ButtonThemeConfig;
|
|
1048
|
+
ButtonGroup?: ButtonGroupThemeConfig;
|
|
1049
|
+
Card?: CardThemeConfig;
|
|
1050
|
+
Checkbox?: CheckboxThemeConfig;
|
|
1051
|
+
Chip?: ChipThemeConfig;
|
|
1052
|
+
CircularProgress?: CircularProgressThemeConfig;
|
|
1053
|
+
Collapse?: CollapseThemeConfig;
|
|
1054
|
+
ContextMenu?: ContextMenuThemeConfig;
|
|
1055
|
+
Drawer?: DrawerThemeConfig;
|
|
1056
|
+
Fab?: FabThemeConfig;
|
|
1057
|
+
FabMenu?: FabMenuThemeConfig;
|
|
1058
|
+
Flex?: FlexThemeConfig;
|
|
1059
|
+
FocusTrap?: FocusTrapThemeConfig;
|
|
1060
|
+
Form?: FormThemeConfig;
|
|
1061
|
+
FormControl?: FormControlThemeConfig;
|
|
1062
|
+
FormHelperText?: FormHelperTextThemeConfig;
|
|
1063
|
+
FormLabel?: FormLabelThemeConfig;
|
|
1064
|
+
Grid?: GridThemeConfig;
|
|
1065
|
+
Icon?: IconThemeConfig;
|
|
1066
|
+
Image?: ImageThemeConfig;
|
|
1067
|
+
LinearProgress?: LinearProgressThemeConfig;
|
|
1068
|
+
Link?: LinkThemeConfig;
|
|
1069
|
+
Menu?: MenuThemeConfig;
|
|
1070
|
+
MenuDivider?: MenuDividerThemeConfig;
|
|
1071
|
+
MenuItem?: MenuItemThemeConfig;
|
|
1072
|
+
MenuList?: MenuListThemeConfig;
|
|
1073
|
+
Modal?: ModalThemeConfig;
|
|
1074
|
+
NativeSelect?: NativeSelectThemeConfig;
|
|
1075
|
+
NavGroup?: NavGroupThemeConfig;
|
|
1076
|
+
NavLink?: NavLinkThemeConfig;
|
|
1077
|
+
NavTree?: NavTreeThemeConfig;
|
|
1078
|
+
NumberInput?: NumberInputThemeConfig;
|
|
1079
|
+
Pagination?: PaginationThemeConfig;
|
|
1080
|
+
PaginationItem?: PaginationItemThemeConfig;
|
|
1081
|
+
Paper?: PaperThemeConfig;
|
|
1082
|
+
Popover?: PopoverThemeConfig;
|
|
1083
|
+
Pressable?: PressableThemeConfig;
|
|
1084
|
+
Quote?: QuoteThemeConfig;
|
|
1085
|
+
Radio?: RadioThemeConfig;
|
|
1086
|
+
RangeInput?: RangeInputThemeConfig;
|
|
1087
|
+
Rating?: RatingThemeConfig;
|
|
1088
|
+
ScrollArea?: ScrollAreaThemeConfig;
|
|
1089
|
+
Select?: SelectThemeConfig;
|
|
1090
|
+
Sidebar?: SidebarThemeConfig;
|
|
1091
|
+
SidebarItem?: SidebarItemThemeConfig;
|
|
1092
|
+
Skeleton?: SkeletonThemeConfig;
|
|
1093
|
+
Snackbar?: SnackbarThemeConfig;
|
|
1094
|
+
Switch?: SwitchThemeConfig;
|
|
1095
|
+
Tab?: TabThemeConfig;
|
|
1096
|
+
TabPanel?: TabPanelThemeConfig;
|
|
1097
|
+
TabScrollButton?: TabScrollButtonThemeConfig;
|
|
1098
|
+
Table?: TableThemeConfig;
|
|
1099
|
+
TableBody?: TableBodyThemeConfig;
|
|
1100
|
+
TableCell?: TableCellThemeConfig;
|
|
1101
|
+
TableContainer?: TableContainerThemeConfig;
|
|
1102
|
+
TableFooter?: TableFooterThemeConfig;
|
|
1103
|
+
TableHead?: TableHeadThemeConfig;
|
|
1104
|
+
TablePagination?: TablePaginationThemeConfig;
|
|
1105
|
+
TablePaginationActions?: TablePaginationActionsThemeConfig;
|
|
1106
|
+
TableRow?: TableRowThemeConfig;
|
|
1107
|
+
TableSortLabel?: TableSortLabelThemeConfig;
|
|
1108
|
+
Tabs?: TabsThemeConfig;
|
|
1109
|
+
TextInput?: TextInputThemeConfig;
|
|
1110
|
+
ToggleButton?: ToggleButtonThemeConfig;
|
|
1111
|
+
ToggleButtonGroup?: ToggleButtonGroupThemeConfig;
|
|
1112
|
+
Tooltip?: TooltipThemeConfig;
|
|
1113
|
+
TransferList?: TransferListThemeConfig;
|
|
1114
|
+
Typography?: TypographyThemeConfig;
|
|
1115
|
+
View?: ViewThemeConfig;
|
|
1116
|
+
}
|
|
1117
|
+
/** Design-system's own style-object shape - the engine stays an internal implementation detail. */
|
|
1118
|
+
type CSSObject = CSSObject$1;
|
|
1119
|
+
/**
|
|
1120
|
+
* A style contributed from `theme.components` - a plain CSS object, or a
|
|
1121
|
+
* callback receiving the theme and the styled root's resolved props
|
|
1122
|
+
* (`ownerState`) for conditional styling.
|
|
1123
|
+
*/
|
|
1124
|
+
type ComponentStyle<OwnerState> = CSSObject | ((args: {
|
|
1125
|
+
theme: Theme;
|
|
1126
|
+
ownerState: OwnerState;
|
|
1127
|
+
}) => CSSObject);
|
|
1128
|
+
/**
|
|
1129
|
+
* The owner-state fields whose types the registered themes widen: the colors, sizes, spacing keys
|
|
1130
|
+
* and looks they add.
|
|
1131
|
+
*/
|
|
1132
|
+
type DerivedFields = 'color' | 'size' | 'variant' | 'mb' | 'marginThreshold';
|
|
1133
|
+
type OpenValue = '' | (string & {}) | number | boolean | null | object;
|
|
1134
|
+
/**
|
|
1135
|
+
* The owner state as the theme's own `components` are checked against it. Once themes are
|
|
1136
|
+
* registered, the derived fields are left open: a type that reads the registered themes cannot be
|
|
1137
|
+
* checked while those themes are being written (it would read itself). A misspelt value is checked
|
|
1138
|
+
* where it is used (a component's props), and in development by the validator `ThemeProvider` runs.
|
|
1139
|
+
* Every other field keeps its type.
|
|
1140
|
+
*/
|
|
1141
|
+
type OwnerKeys<OwnerState> = keyof Register extends never ? Partial<OwnerState> : { [K in keyof OwnerState]?: K extends DerivedFields ? OpenValue : OwnerState[K]; };
|
|
1142
|
+
/** One theme-contributed variant: applied when every key in `props` matches the render props. */
|
|
1143
|
+
interface ComponentVariant<OwnerState> {
|
|
1144
|
+
props: OwnerKeys<OwnerState>;
|
|
1145
|
+
style: ComponentStyle<OwnerState>;
|
|
1146
|
+
}
|
|
1147
|
+
/** Per-component customization: default prop values, per-slot CSS, extra variants. */
|
|
1148
|
+
interface ComponentConfig<OwnerState = Record<string, unknown>, Slot extends string = 'root'> {
|
|
1149
|
+
/** Default prop values - explicit props and group context always win. */
|
|
1150
|
+
defaultProps?: OwnerKeys<OwnerState>;
|
|
1151
|
+
/** Per-slot CSS merged after the component's own styles (theme wins). */
|
|
1152
|
+
styleOverrides?: Partial<Record<Slot, ComponentStyle<OwnerState>>>;
|
|
1153
|
+
/** Extra variants matched by props. */
|
|
1154
|
+
variants?: ReadonlyArray<ComponentVariant<OwnerState>>;
|
|
1155
|
+
/** Type only, never set: names the owner state, for `useDefaultProps` to type what it hands back. */
|
|
1156
|
+
readonly $owner?: OwnerState;
|
|
1157
|
+
}
|
|
1158
|
+
/** The core's theme, with the typing of `theme.components` that the libraries and the app add. */
|
|
1159
|
+
interface Theme extends Theme$1 {
|
|
1160
|
+
/** Optional per-component customization - see `ThemeComponents`. */
|
|
1161
|
+
components?: OpenScale<ThemeComponents>;
|
|
1162
|
+
}
|
|
1163
|
+
/** This package's `Theme` under a name no other interface of the engine's modules has: the bridge extends the engine's `Theme` from it. */
|
|
1164
|
+
type GildTheme = Theme;
|
|
1165
|
+
/** The theme the app registered (see `Register` in the core), or this package's `Theme` when it registered none. */
|
|
1166
|
+
type AppTheme = RegisteredTheme<Theme>;
|
|
1167
|
+
interface ThemeProviderOwnProps<T> {
|
|
1168
|
+
children?: ReactNode;
|
|
1169
|
+
/**
|
|
1170
|
+
* The active theme. Bring one theme, or as many as you like - switching
|
|
1171
|
+
* between them is your state, not the provider's. Defaults to the built-in
|
|
1172
|
+
* `baseTheme`.
|
|
1173
|
+
*/
|
|
1174
|
+
theme?: T & Exact<T, AppTheme>;
|
|
1175
|
+
/**
|
|
1176
|
+
* Optional component default token/variant keys, merged into the theme
|
|
1177
|
+
* (e.g. `{ size: 'compact' }` makes every sized component default to your key).
|
|
1178
|
+
* Two objects with the same contents give the same theme, so an inline literal is fine.
|
|
1179
|
+
*/
|
|
1180
|
+
defaults?: ThemeDefaults;
|
|
1181
|
+
}
|
|
1182
|
+
/** The props once the app registers its themes: it has no built-in theme to fall back to, so `theme` is required. */
|
|
1183
|
+
interface RegisteredThemeProviderProps<T> {
|
|
1184
|
+
children?: ReactNode;
|
|
1185
|
+
/** The active theme: one of the registered themes. Switching between them is your state, not the provider's. */
|
|
1186
|
+
theme: T & Exact<T, AppTheme>;
|
|
1187
|
+
/**
|
|
1188
|
+
* Optional component default token/variant keys, merged into the theme
|
|
1189
|
+
* (e.g. `{ size: 'compact' }` makes every sized component default to your key).
|
|
1190
|
+
* Two objects with the same contents give the same theme, so an inline literal is fine.
|
|
1191
|
+
*/
|
|
1192
|
+
defaults?: ThemeDefaults;
|
|
1193
|
+
}
|
|
1194
|
+
type ThemeProviderProps<T = Theme> = Register extends {
|
|
1195
|
+
themes: unknown;
|
|
1196
|
+
} ? RegisteredThemeProviderProps<T> : ThemeProviderOwnProps<T>;
|
|
1197
|
+
declare function ThemeProvider$1<T extends Theme = Theme>(props: Readonly<ThemeProviderProps<T>>): ReactElement;
|
|
1198
|
+
type GildFallback = GildCore.Register extends {
|
|
1199
|
+
themes: unknown;
|
|
1200
|
+
} ? Record<never, never> : GildTheme;
|
|
1201
|
+
declare module '@umber-style/react' {
|
|
1202
|
+
interface Register extends GildCore.Register {}
|
|
1203
|
+
interface Theme extends GildFallback {}
|
|
1204
|
+
}
|
|
1205
|
+
type GildStyleThemes = GildCore.Register extends {
|
|
1206
|
+
themes: infer Themes;
|
|
1207
|
+
} ? {
|
|
1208
|
+
themes: Themes;
|
|
1209
|
+
} : Record<never, never>;
|
|
1210
|
+
interface GildStyleRegister extends GildStyleThemes {
|
|
1211
|
+
defaultValues: {
|
|
1212
|
+
space: 'strict';
|
|
1213
|
+
sizes: 'wide';
|
|
1214
|
+
colors: 'strict';
|
|
1215
|
+
fontSizes: 'strict';
|
|
1216
|
+
fontWeights: 'strict';
|
|
1217
|
+
lineHeights: 'strict';
|
|
1218
|
+
letterSpacings: 'strict';
|
|
1219
|
+
fonts: 'strict';
|
|
1220
|
+
borders: 'strict';
|
|
1221
|
+
borderStyles: 'strict';
|
|
1222
|
+
borderWidths: 'strict';
|
|
1223
|
+
radii: 'strict';
|
|
1224
|
+
shadows: 'strict';
|
|
1225
|
+
zIndices: 'strict';
|
|
1226
|
+
};
|
|
1227
|
+
}
|
|
1228
|
+
declare module '@soroush.tech/styled-system' {
|
|
1229
|
+
interface Register extends GildStyleRegister {}
|
|
1230
|
+
}
|
|
1231
|
+
type DefaultPropsOf<N extends keyof ThemeComponents> = Partial<NonNullable<NonNullable<ThemeComponents[N]>['$owner']>>;
|
|
1232
|
+
/**
|
|
1233
|
+
* The theme-contributed default prop values for a component
|
|
1234
|
+
* (`theme.components[name].defaultProps`), or an empty object.
|
|
1235
|
+
*
|
|
1236
|
+
* Components apply it as one step of the default-resolution chain:
|
|
1237
|
+
* explicit prop → group context → `useDefaultProps` → `theme.defaults.*` → literal fallback.
|
|
1238
|
+
*/
|
|
1239
|
+
declare function useDefaultProps<N extends keyof ThemeComponents>(name: N): DefaultPropsOf<N>;
|
|
1240
|
+
/**
|
|
1241
|
+
* Design-system additions to the engine's styled options. A styled root that passes
|
|
1242
|
+
* `name` becomes theme-customizable: `theme.components[name]` may contribute
|
|
1243
|
+
* `styleOverrides` (per `slot`) and `variants`, appended after the component's
|
|
1244
|
+
* own styles so the theme wins the cascade. Roots without `name` are plain
|
|
1245
|
+
* `styled` - zero behavior change, zero cost.
|
|
1246
|
+
*/
|
|
1247
|
+
interface ThemeCustomizationOptions {
|
|
1248
|
+
/** `theme.components` key enabling styleOverrides/variants for this root. */
|
|
1249
|
+
name?: string;
|
|
1250
|
+
/** The `styleOverrides` slot this root maps to. Default: `'root'`. */
|
|
1251
|
+
slot?: string;
|
|
1252
|
+
/**
|
|
1253
|
+
* Styled-system prop parsers (`space`, `layout`, ...) appended AFTER the theme
|
|
1254
|
+
* override resolver, so per-instance props (`m`, `p`, `width`, ...) always beat
|
|
1255
|
+
* theme `styleOverrides`.
|
|
1256
|
+
*/
|
|
1257
|
+
systemProps?: ReadonlyArray<Interpolation<never>>;
|
|
1258
|
+
/**
|
|
1259
|
+
* Custom mapping from render props to applied override styles - replaces the
|
|
1260
|
+
* default `styleOverrides[slot]` lookup (for prop-keyed override keys).
|
|
1261
|
+
*/
|
|
1262
|
+
overridesResolver?: (props: Record<string, unknown>, styleOverrides: Record<string, unknown>) => unknown;
|
|
1263
|
+
}
|
|
1264
|
+
/**
|
|
1265
|
+
* The `styled.div`, `styled.span`, ... tag shorthands - mirrors the engine's own
|
|
1266
|
+
* `StyledTags`, with the `theme` and `as` props a styled component takes.
|
|
1267
|
+
*/
|
|
1268
|
+
type StyledTags = { [Tag in keyof JSX.IntrinsicElements]: CreateStyledComponent<{
|
|
1269
|
+
theme?: AppTheme;
|
|
1270
|
+
as?: React.ElementType;
|
|
1271
|
+
}, JSX.IntrinsicElements[Tag]>; };
|
|
1272
|
+
/** Overloads mirroring the engine's, with the theme-customization options added. */
|
|
1273
|
+
interface CreateThemedStyled extends StyledTags {
|
|
1274
|
+
<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> & {
|
|
1275
|
+
theme?: AppTheme;
|
|
1276
|
+
}, {}, {
|
|
1277
|
+
ref?: Ref<InstanceType<C>>;
|
|
1278
|
+
}>;
|
|
1279
|
+
<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> & {
|
|
1280
|
+
theme?: AppTheme;
|
|
1281
|
+
}>;
|
|
1282
|
+
<C extends ComponentType<ComponentProps<C>>>(component: C, options?: StyledOptions<ComponentProps<C>> & ThemeCustomizationOptions): CreateStyledComponent<PropsOf<C> & {
|
|
1283
|
+
theme?: AppTheme;
|
|
1284
|
+
}>;
|
|
1285
|
+
<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<{
|
|
1286
|
+
theme?: AppTheme;
|
|
1287
|
+
as?: React.ElementType;
|
|
1288
|
+
}, Pick<JSX.IntrinsicElements[Tag], ForwardedProps>>;
|
|
1289
|
+
<Tag extends keyof JSX.IntrinsicElements>(tag: Tag, options?: StyledOptions<JSX.IntrinsicElements[Tag]> & ThemeCustomizationOptions): CreateStyledComponent<{
|
|
1290
|
+
theme?: AppTheme;
|
|
1291
|
+
as?: React.ElementType;
|
|
1292
|
+
}, JSX.IntrinsicElements[Tag]>;
|
|
1293
|
+
}
|
|
1294
|
+
/**
|
|
1295
|
+
* The design system's `styled` - the engine's styled plus theme-level component
|
|
1296
|
+
* customization (`theme.components[name].styleOverrides` / `.variants`).
|
|
1297
|
+
*/
|
|
1298
|
+
declare const styled: CreateThemedStyled;
|
|
1299
|
+
export { TextInputSize as $, ButtonVariant as $i, ModalCloseReason as $n, ContextMenuOwnerState as $r, SkeletonOwnerState as $t, TextColorToken as A, AccordionSummarySlot as Aa, CircularProgressOwnerState as Ai, PopoverSlot as An, FormLabelSlot as Ar, TableCellSlot as At, TooltipOwnerState as B, AccordionActionsThemeConfig as Ba, CardSlot as Bi, NumberInputThemeConfig as Bn, FormThemeConfig as Br, TabScrollButtonThemeConfig as Bt, ThemeProvider$1 as C, AlertTitleOwnerState as Ca, ViewThemeConfig as Ci, QuoteOwnerState as Cn, IconOwnerState as Cr, TableFooterOwnerState as Ct, Theme as D, AlertSlot as Da, CollapseOwnerState as Di, PressableSlot as Dn, GridSlot as Dr, TableContainerSlot as Dt, ComponentConfig as E, AlertOwnerState as Ea, PaperThemeConfig as Ei, PressableOwnerState as En, GridOwnerState as Er, TableContainerOwnerState as Et, TypographyThemeConfig as F, AccordionDetailsOwnerState as Fa, ChipThemeConfig as Fi, PaginationOwnerState as Fn, FormControlOwnerState as Fr, TableOwnerState as Ft, ToggleButtonGroupThemeConfig as G, ButtonColor as Gi, NavLinkSlot as Gn, FabMenuSlot as Gr, TabSlot as Gt, TooltipThemeConfig as H, AccordionSlot as Ha, ButtonGroupOwnerState as Hi, NavTreeSlot as Hn, FocusTrapSlot as Hr, TabPanelSlot as Ht, TypographyVariant as I, AccordionDetailsSlot as Ia, CheckboxOwnerState as Ii, PaginationSlot as In, FormControlSlot as Ir, TableSlot as It, ToggleButtonThemeConfig as J, ButtonProps as Ji, NavGroupSlot as Jn, FabSlot as Jr, SwitchSlot as Jt, ToggleButtonOwnerState as K, ButtonLoadingPosition as Ki, NavLinkThemeConfig as Kn, FabMenuThemeConfig as Kr, TabThemeConfig as Kt, TransferListOwnerState as L, AccordionDetailsThemeConfig as La, CheckboxSlot as Li, PaginationThemeConfig as Ln, FormControlThemeConfig as Lr, TableThemeConfig as Lt, TypographyOwnerState as M, AccordionGroupOwnerState as Ma, CircularProgressThemeConfig as Mi, PaginationItemOwnerState as Mn, FormHelperTextOwnerState as Mr, TableBodyOwnerState as Mt, TypographyProps as N, AccordionGroupSlot as Na, ChipOwnerState as Ni, PaginationItemSlot as Nn, FormHelperTextSlot as Nr, TableBodySlot as Nt, ThemeComponents as O, AlertThemeConfig as Oa, CollapseSlot as Oi, PressableThemeConfig as On, GridThemeConfig as Or, TableContainerThemeConfig as Ot, TypographySlot as P, AccordionGroupThemeConfig as Pa, ChipSlot as Pi, PaginationItemThemeConfig as Pn, FormHelperTextThemeConfig as Pr, TableBodyThemeConfig as Pt, TextInputProps as Q, ButtonThemeConfig as Qi, NativeSelectThemeConfig as Qn, DrawerThemeConfig as Qr, SnackbarThemeConfig as Qt, TransferListSlot as R, AccordionActionsOwnerState as Ra, CheckboxThemeConfig as Ri, NumberInputOwnerState as Rn, FormOwnerState as Rr, TabScrollButtonOwnerState as Rt, withTheme as S, AppBarThemeConfig as Sa, ViewSlot as Si, RadioThemeConfig as Sn, ImageThemeConfig as Sr, TableHeadThemeConfig as St, CSSObject as T, AlertTitleThemeConfig as Ta, PaperSlot as Ti, QuoteThemeConfig as Tn, IconThemeConfig as Tr, TableFooterThemeConfig as Tt, ToggleButtonGroupOwnerState as U, AccordionThemeConfig as Ua, ButtonGroupSlot as Ui, NavTreeThemeConfig as Un, FocusTrapThemeConfig as Ur, TabPanelThemeConfig as Ut, TooltipSlot as V, AccordionOwnerState as Va, CardThemeConfig as Vi, NavTreeOwnerState as Vn, FocusTrapOwnerState as Vr, TabPanelOwnerState as Vt, ToggleButtonGroupSlot as W, Exact as Wa, ButtonGroupThemeConfig as Wi, NavLinkOwnerState as Wn, FabMenuOwnerState as Wr, TabOwnerState as Wt, TextInputColor as X, ButtonSize as Xi, NativeSelectOwnerState as Xn, DrawerOwnerState as Xr, SnackbarOwnerState as Xt, TextInputClasses as Y, ButtonShape as Yi, NavGroupThemeConfig as Yn, FabThemeConfig as Yr, SwitchThemeConfig as Yt, TextInputOwnerState as Z, ButtonSlot as Zi, NativeSelectSlot as Zn, DrawerSlot as Zr, SnackbarSlot as Zt, useStyleValue as _, AutocompleteOwnerState as _a, ViewBorderRadiusToken as _i, RangeInputOwnerState as _n, LinearProgressOwnerState as _r, TablePaginationOwnerState as _t, LiveValue as a, BreadcrumbsOwnerState as aa, Paper as ai, SidebarOwnerState as an, MenuListOwnerState as ar, TabsSlot as at, variable as b, AppBarOwnerState as ba, ViewOwnerState as bi, RadioOwnerState as bn, ImageOwnerState as br, TableHeadOwnerState as bt, asIs as c, BadgeOwnerState as ca, Flex as ci, SelectOwnerState as cn, MenuItemOwnerState as cr, TableSortLabelOwnerState as ct, defineTheme as d, BackdropOwnerState as da, FlexSlot as di, ScrollAreaOwnerState as dn, MenuDividerOwnerState as dr, TableRowOwnerState as dt, GapToken$1 as ea, ContextMenuSlot as ei, SkeletonSlot as en, ModalOwnerState as er, TextInputSlot as et, fallback as f, BackdropSlot as fa, FlexThemeConfig as fi, ScrollAreaSlot as fn, MenuDividerSlot as fr, TableRowSlot as ft, useStyle as g, AvatarThemeConfig as ga, ViewBorderColorToken as gi, RatingThemeConfig as gn, LinkThemeConfig as gr, TablePaginationActionsThemeConfig as gt, setNonceSource as h, AvatarSlot as ha, ViewBackgroundToken as hi, RatingSlot as hn, LinkSlot as hr, TablePaginationActionsSlot as ht, Global as i, StyleOverride as ia, MenuThemeConfig as ii, SidebarItemThemeConfig as in, ModalThemeConfig as ir, TabsOwnerState as it, TypographyAlign as j, AccordionSummaryThemeConfig as ja, CircularProgressSlot as ji, PopoverThemeConfig as jn, FormLabelThemeConfig as jr, TableCellThemeConfig as jt, BackgroundToken as k, AccordionSummaryOwnerState as ka, CollapseThemeConfig as ki, PopoverOwnerState as kn, FormLabelOwnerState as kr, TableCellOwnerState as kt, configureEngine as l, BadgeSlot as la, FlexOwnerState as li, SelectSlot as ln, MenuItemSlot as lr, TableSortLabelSlot as lt, negate as m, AvatarOwnerState as ma, View as mi, RatingOwnerState as mn, LinkOwnerState as mr, TablePaginationActionsOwnerState as mt, useMediaQuery as n, SlotProps as na, MenuOwnerState as ni, SidebarItemOwnerState as nn, ModalScroll as nr, TextInputThemeConfig as nt, StyleSheet as o, BreadcrumbsSlot as oa, PaperElevation as oi, SidebarSlot as on, MenuListSlot as or, TabsThemeConfig as ot, keyframes as p, BackdropThemeConfig as pa, GapToken as pi, ScrollAreaThemeConfig as pn, MenuDividerThemeConfig as pr, TableRowThemeConfig as pt, ToggleButtonSlot as q, ButtonOwnerState as qi, NavGroupOwnerState as qn, FabOwnerState as qr, SwitchOwnerState as qt, useDefaultProps as r, StrictStyled as ra, MenuSlot as ri, SidebarItemSlot as rn, ModalSlot as rr, TextInputVariant as rt, alpha as s, BreadcrumbsThemeConfig as sa, PaperProps as si, SidebarThemeConfig as sn, MenuListThemeConfig as sr, TabsVariant as st, styled as t, SlotOverride as ta, ContextMenuThemeConfig as ti, SkeletonThemeConfig as tn, ModalProps as tr, TextInputTextColor as tt, css as u, BadgeThemeConfig as ua, FlexProps as ui, SelectThemeConfig as un, MenuItemThemeConfig as ur, TableSortLabelThemeConfig as ut, useTheme as v, AutocompleteSlot as va, ViewBorderWidthToken as vi, RangeInputSlot as vn, LinearProgressSlot as vr, TablePaginationSlot as vt, AppTheme as w, AlertTitleSlot as wa, PaperOwnerState as wi, QuoteSlot as wn, IconSlot as wr, TableFooterSlot as wt, withStyle as x, AppBarSlot as xa, ViewProps as xi, RadioSlot as xn, ImageSlot as xr, TableHeadSlot as xt, val as y, AutocompleteThemeConfig as ya, ViewColorToken as yi, RangeInputThemeConfig as yn, LinearProgressThemeConfig as yr, TablePaginationThemeConfig as yt, TransferListThemeConfig as z, AccordionActionsSlot as za, CardOwnerState as zi, NumberInputSlot as zn, FormSlot as zr, TabScrollButtonSlot as zt };
|