@gild-ui/react-native 0.0.0-stage → 0.1.0-alpha.0

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.
Files changed (64) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +79 -2
  3. package/dist/Button.cjs +193 -0
  4. package/dist/Button.d.cts +3 -0
  5. package/dist/Button.d.mts +3 -0
  6. package/dist/Button.mjs +192 -0
  7. package/dist/Button.types-Bb9gBlbS.d.mts +1402 -0
  8. package/dist/Flex.cjs +18 -0
  9. package/dist/Flex.d.cts +2 -0
  10. package/dist/Flex.d.mts +2 -0
  11. package/dist/Flex.mjs +17 -0
  12. package/dist/Modal.cjs +56 -0
  13. package/dist/Modal.d.cts +7 -0
  14. package/dist/Modal.d.mts +7 -0
  15. package/dist/Modal.mjs +55 -0
  16. package/dist/TextInput.cjs +169 -0
  17. package/dist/TextInput.d.cts +3 -0
  18. package/dist/TextInput.d.mts +3 -0
  19. package/dist/TextInput.mjs +169 -0
  20. package/dist/ThemeProvider-BgTIjOfL.mjs +49 -0
  21. package/dist/ThemeProvider-CsfZi16_.cjs +53 -0
  22. package/dist/ThemeProvider.cjs +3 -0
  23. package/dist/ThemeProvider.d.cts +2 -0
  24. package/dist/ThemeProvider.d.mts +2 -0
  25. package/dist/ThemeProvider.mjs +1 -0
  26. package/dist/Typography.cjs +68 -0
  27. package/dist/Typography.d.cts +3 -0
  28. package/dist/Typography.d.mts +3 -0
  29. package/dist/Typography.mjs +68 -0
  30. package/dist/View-B1PzjpDr.cjs +76 -0
  31. package/dist/View-tHL6rDa8.mjs +65 -0
  32. package/dist/View.cjs +3 -0
  33. package/dist/View.d.cts +2 -0
  34. package/dist/View.d.mts +2 -0
  35. package/dist/View.mjs +1 -0
  36. package/dist/bridge-B_MGN7QY.d.mts +10 -0
  37. package/dist/bridge-CH-RnxIe.d.cts +10 -0
  38. package/dist/engine-CpEhmg4W.mjs +38 -0
  39. package/dist/engine-D9Z9l9JU.cjs +42 -0
  40. package/dist/engine.cjs +49 -0
  41. package/dist/engine.d.cts +66 -0
  42. package/dist/engine.d.mts +66 -0
  43. package/dist/engine.mjs +19 -0
  44. package/dist/exact-DOxXx2ZR.d.cts +9 -0
  45. package/dist/exact-DOxXx2ZR.d.mts +9 -0
  46. package/dist/index-BqhozwWy.d.mts +41 -0
  47. package/dist/index-DcHJkXar.d.cts +41 -0
  48. package/dist/index.cjs +67 -0
  49. package/dist/index.d.cts +14 -0
  50. package/dist/index.d.mts +14 -0
  51. package/dist/index.mjs +5 -0
  52. package/dist/phoneTheme-RIafDzgw.mjs +12 -0
  53. package/dist/phoneTheme-kvZTk6l5.cjs +29 -0
  54. package/dist/styled-CmWGOVKb.cjs +174 -0
  55. package/dist/styled-k66N0ABX.mjs +163 -0
  56. package/dist/themes-DK6h0IiW.d.cts +1402 -0
  57. package/dist/themes-rGHVhV5e.mjs +8 -0
  58. package/dist/useDefaultProps-1josiKIp.mjs +13 -0
  59. package/dist/useDefaultProps-DzaUOADT.cjs +18 -0
  60. package/dist/useTheme.cjs +8 -0
  61. package/dist/useTheme.d.cts +3 -0
  62. package/dist/useTheme.d.mts +3 -0
  63. package/dist/useTheme.mjs +1 -0
  64. package/package.json +172 -3
@@ -0,0 +1,1402 @@
1
+ import { SheetStyleProp } from "@umber-style/react-native";
2
+ import { ButtonVariants, InputVariantKey, OpenScale, Register as Register$1, RegisteredTheme, Theme as Theme$1, ThemeBackground, ThemeColor, ThemeFonts, ThemeRadii, ThemeSize, ThemeSpaceKey, ThemeText, ThemeTransitionEasing, ThemeTypography, ThemeZOrder, TypographyVariant, VariantOf } from "@gild-ui/core/theme";
3
+ import { ButtonHTMLAttributes, CSSProperties, ChangeEventHandler, ComponentProps, ComponentPropsWithRef, ComponentType, ElementType, FunctionComponent, HTMLAttributes, InputHTMLAttributes, JSX, ReactNode, TextareaHTMLAttributes } from "react";
4
+ import { BorderProps, FlexboxProps, LayoutFrameProps, LayoutProps, PositionProps, SpaceProps, SpanProps, TypographyProps as TypographyProps$1 } from "@soroush.tech/styled-system";
5
+ import { BindingOptions as BindingOptions$1, CSSObject as CSSObject$1, ColorScheme as ColorScheme$1, CssArgument as CssArgument$1, GlobalInput as GlobalInput$1, Interpolation as Interpolation$1, InterpolationResult as InterpolationResult$1, PropsTaking as PropsTaking$1, SerializedStyles as SerializedStyles$1, SheetEntry as SheetEntry$1, SheetStyles as SheetStyles$1, StaticTemplateValue as StaticTemplateValue$1, StyleInput as StyleInput$1, StyleTypeOptions as StyleTypeOptions$1, StylerOptions as StylerOptions$1, TemplateValue as TemplateValue$1, Theme as Theme$3, ThemeInput as ThemeInput$1, ThemedEntry as ThemedEntry$1, WebStyleObject as WebStyleObject$1, WrapperOwnStatics as WrapperOwnStatics$1 } from "@umber-style/core";
6
+ /** What the `style` prop of a component takes: an entry of the binding's `StyleSheet`, or a list of them. */
7
+ type StyleOverride = SheetStyleProp;
8
+ /**
9
+ * What one slot of a component takes in `slotProps`: a `style`, a `className` and `data-*` and `aria-*`
10
+ * attributes. A phone has no class names or `data-*` attributes: they are accepted and not passed on.
11
+ */
12
+ type SlotOverride = {
13
+ style?: StyleOverride;
14
+ className?: string;
15
+ } & { [K in `data-${string}` | `aria-${string}`]?: string | number | boolean; };
16
+ /** The `slotProps` of a component: one `SlotOverride` for each slot it declares for the theme (`<Name>Slot`). */
17
+ type SlotProps<Slot extends string> = { [S in Slot]?: SlotOverride; };
18
+ /** A component made by `styled` with its `style` narrowed to `StyleOverride`. */
19
+ type StrictStyled<C extends ElementType> = FunctionComponent<Omit<ComponentProps<C>, 'style' | 'slotProps'> & {
20
+ style?: StyleOverride;
21
+ slotProps?: SlotProps<'root'>;
22
+ }>;
23
+ /** What only the client build of the React binding takes: it can render the style of its classes on a server. */
24
+ interface ServerStyleOptions {
25
+ /**
26
+ * Whether, where there is no `document` (the server render of a client component), a styled element and a
27
+ * theme provider render the `<style href precedence>` elements of their classes, as the server components
28
+ * build does. React moves them to the head and renders each `href` once, so the first HTML of a page
29
+ * is styled whichever build rendered a component. In the browser the client build inserts into its sheet
30
+ * and renders none, whatever this is. Default true. Set it to false when a classic server render
31
+ * puts the CSS of the page into one style element of its own (`extractPageStyles`, `createStyleTag`).
32
+ */
33
+ hasServerStyleElements?: boolean;
34
+ }
35
+ /**
36
+ * The theme of the default style of this binding: what `styled`, `useTheme`, `StyleSheet` and
37
+ * `ThemeProvider` of the default style read. It extends the core's `Theme`, so an app gives it members
38
+ * from either module: `declare module '@umber-style/react' { interface Theme extends MyTheme {} }` for
39
+ * React alone, or `declare module '@umber-style/core'` for a theme that every binding shares. The
40
+ * optional member below only keeps it from being empty.
41
+ */
42
+ interface Theme$2 extends Theme$3 {
43
+ readonly _theme?: never;
44
+ }
45
+ /**
46
+ * A style in any form that `styled` takes: a style object, a `css()` result or a sheet entry, a function
47
+ * of the props and the theme, nothing, or a list of them. The core's `Interpolation`, with this binding's
48
+ * `Theme` unless another is given.
49
+ */
50
+ type Interpolation<Props = unknown, T = Theme$2> = Interpolation$1<Props, T>;
51
+ /**
52
+ * The options of `configure()`: those of `StyleOptions` for the engine of the default style, and the
53
+ * theme of anything with no provider. Call it once for the program, in a `setup` module that runs on the
54
+ * server and in the browser; the options are shared by every build and binding. A second call with the
55
+ * same options does nothing; with other options it replaces the first ones with a warning in development,
56
+ * throws in tests, and anywhere else the first call wins.
57
+ */
58
+ interface DefaultStyleOptions extends BindingOptions$1<Theme$2>, ServerStyleOptions {
59
+ /**
60
+ * The theme of anything with no provider above it, on the server and in the browser: server components
61
+ * (`useTheme()`, `withTheme` and the function styles of the server build), client code with no
62
+ * provider, and the base theme of the engine (`getEngine().givenTheme`). A `ThemeProvider` above gives
63
+ * its own theme to what is below it. When `theme` is given too, `serverTheme` wins, with a warning in
64
+ * development.
65
+ */
66
+ serverTheme?: Theme$2;
67
+ /**
68
+ * The base theme, for an app that has no provider at all.
69
+ * @deprecated The same as `serverTheme`, which is its name now.
70
+ */
71
+ theme?: Theme$2;
72
+ }
73
+ /**
74
+ * The options of `styled(tag, options)`: the label of the class, which props reach the element, and a class
75
+ * of your own. `_Props`, the props of the tag, changes nothing: it lets a wrapper of `styled` write
76
+ * `StyledOptions<ComponentProps<C>>` next to `FilteringStyledOptions<ComponentProps<C>, Forwarded>`.
77
+ */
78
+ interface StyledOptions<_Props = unknown> extends StylerOptions$1 {
79
+ /**
80
+ * Whether a prop is forwarded to the element or component that is rendered. It replaces the default,
81
+ * which forwards to a string tag the attributes of HTML and SVG (by their React names), `data-*`,
82
+ * `aria-*`, event handlers and React's own props, and every prop to a custom element (a tag with a
83
+ * hyphen) and to a component. `theme`, `className` and `style` are the component's own and are never
84
+ * forwarded, and so is `as` where it replaces what is rendered: `as` always replaces a string tag, and
85
+ * replaces a component that is not made by `styled` only when this filter returns false for `as`;
86
+ * without such a filter that component is rendered, and is given `as` as a prop.
87
+ */
88
+ shouldForwardProp?: (prop: string) => boolean;
89
+ /**
90
+ * A class name of your own that the element always has, after the engine's classes: a stable name
91
+ * that a parent's selector or a test can find. It is not a style and has no rule. A component that
92
+ * wraps this one keeps it, and adds its own.
93
+ */
94
+ target?: string;
95
+ }
96
+ /**
97
+ * `StyledOptions` whose `shouldForwardProp` is a type guard: the props of the tag that a styled component
98
+ * then takes are only the ones it names, `Forwarded`.
99
+ */
100
+ interface FilteringStyledOptions<Props = Record<string, unknown>, Forwarded extends keyof Props & string = keyof Props & string> extends StyledOptions<Props> {
101
+ /** A type guard of the props that are forwarded: the component takes only the props of the tag that it names. */
102
+ shouldForwardProp?: (prop: string) => prop is Forwarded;
103
+ }
104
+ /** What a styled component keeps, so that styling it again flattens into one element. */
105
+ interface StyledStatics {
106
+ /** Every style of the component, the styles of the components it wraps first. */
107
+ _styles: readonly StyleInput$1[];
108
+ /** The tag or component that is finally rendered. */
109
+ _tag: ElementType;
110
+ _shouldForwardProp?: (prop: string) => boolean;
111
+ /** The `target` classes of the component and of the components it wraps. */
112
+ _target?: string;
113
+ /** The component as a selector: `.` and a class that every element of it has. Throws when it has none. */
114
+ toString(): string;
115
+ }
116
+ /**
117
+ * What the `style` prop of a styled component takes on the web: sheet entries and plain style
118
+ * objects, in arrays, with falsy values dropped. Nothing is rendered as a style attribute: all of it
119
+ * is merged, in order, into the one class of the element, after its own styles and before
120
+ * `className`. In the browser, a class made with a plain object is removed once no element uses it, so
121
+ * a value that changes often leaves no class behind; each new value still writes a rule. A string is
122
+ * an error. By default it also takes React's `CSSProperties`, what the `style` of a plain element
123
+ * takes, so props spread from `HTMLAttributes` fit; with `isStrict` in `StyleTypeOptions` it does not.
124
+ */
125
+ type StyleProp = SheetEntry$1 | ThemedEntry$1 | WebStyleObject$1 | ElementStyle | false | null | undefined | readonly StyleProp[];
126
+ /**
127
+ * React's `CSSProperties` by default: an interface, which has no index signature and so is not a
128
+ * `WebStyleObject` by itself. Nothing with the strict style types.
129
+ */
130
+ type ElementStyle = StyleTypeOptions$1 extends {
131
+ isStrict: true;
132
+ } ? never : CSSProperties;
133
+ /**
134
+ * The `as` of a styled component whose tag takes the props `Base`: the type of the tag's own `as` when it
135
+ * has one (a component that is not made by `styled` is given `as` as a prop, unless `shouldForwardProp`
136
+ * keeps it off), else any element type.
137
+ */
138
+ type AsProp<Base> = Base extends {
139
+ as?: infer As;
140
+ } ? unknown extends As ? ElementType : As : ElementType;
141
+ /**
142
+ * The component's own props `P` without a `style` of theirs (props that extend `HTMLAttributes` have
143
+ * one): the `style` of a styled component is `StyleProp`. Kept, `style` would be the intersection of
144
+ * the two, a union of intersections that every element of the component is compared with.
145
+ */
146
+ type OwnProps<P extends object> = 'style' extends keyof P ? Omit<P, 'style'> : P;
147
+ /**
148
+ * A component made by `styled`: it takes the props of the tag (`Base`: all of them, unless a
149
+ * `shouldForwardProp` type guard named some), its own props `P`, `as` and `style`. As text it is a
150
+ * selector: `.` and a class that every element of it has (its `target`, else its class when none of its
151
+ * styles is a function).
152
+ */
153
+ type StyledComponent<C extends ElementType, P extends object, Base extends object = ComponentProps<C>> = FunctionComponent<([keyof P] extends [never] ? Omit<Base, 'as' | 'style'> : [Record<never, never>] extends [Record<keyof P, unknown>] ? Omit<Base, keyof P | 'as' | 'style'> : [keyof P] extends [Exclude<keyof P, keyof Base>] ? Omit<Base, 'as' | 'style'> : Omit<Base, keyof P | 'as' | 'style'>) & OwnProps<P> & {
154
+ as?: AsProp<Base>;
155
+ style?: StyleProp;
156
+ }> & StyledStatics;
157
+ /** The props that a function style reads: the props of the tag `Base`, with the component's own `P` over them. */
158
+ type StyleFunctionProps<Base extends object, P extends object> = [keyof P] extends [never] ? Pick<Base, keyof Base> & P : [Record<never, never>] extends [Record<keyof P, unknown>] ? Omit<Base, keyof P> & P : [keyof P] extends [Exclude<keyof P, keyof Base>] ? Pick<Base, keyof Base> & P : Omit<Base, keyof P> & P;
159
+ /** The props that the element of a styled component takes: those of the component, of the tag, and the ones only the element takes. */
160
+ type ElementProps<ComponentProps extends object, SpecificComponentProps extends object, JSXProps extends object> = ComponentProps & SpecificComponentProps & JSXProps;
161
+ /**
162
+ * What `styled(tag, options)` returns, in the form that a wrapper of `styled` names it: the props of the
163
+ * component are `ComponentProps` and `SpecificComponentProps` (a wrapper puts its own, such as `theme`, in
164
+ * the first, and the props of the tag in the second), and `JSXProps` are props that only the element takes
165
+ * (`ref`). It takes the styles and makes the component, or is used as a tag, whose template is one style.
166
+ * The props of the component's own are a type argument, `AdditionalProps`. A function style reads all of
167
+ * them, the component's own over the others, and `theme`, the theme `T`.
168
+ */
169
+ interface CreateStyledComponent<ComponentProps extends object, SpecificComponentProps extends object = object, JSXProps extends object = object, T = Theme$2> {
170
+ <AdditionalProps extends object = object>(style: (props: StyleFunctionProps<ComponentProps & SpecificComponentProps, AdditionalProps> & {
171
+ theme: T;
172
+ }) => InterpolationResult$1, ...styles: Interpolation<StyleFunctionProps<ComponentProps & SpecificComponentProps, AdditionalProps>, T>[]): StyledComponent<ElementType, AdditionalProps, ElementProps<ComponentProps, SpecificComponentProps, JSXProps>>;
173
+ <AdditionalProps extends object = object>(template: TemplateStringsArray, ...values: TemplateValue$1<NoInfer<StyleFunctionProps<ComponentProps & SpecificComponentProps, AdditionalProps>>, T>[]): StyledComponent<ElementType, AdditionalProps, ElementProps<ComponentProps, SpecificComponentProps, JSXProps>>;
174
+ <AdditionalProps extends object = object>(...styles: Interpolation<StyleFunctionProps<ComponentProps & SpecificComponentProps, AdditionalProps>, T>[]): StyledComponent<ElementType, AdditionalProps, ElementProps<ComponentProps, SpecificComponentProps, JSXProps>>;
175
+ }
176
+ /**
177
+ * What `styled(tag, options)` returns for the theme `T` and the tag `C`, whose props the component takes
178
+ * (`Base`: all of them, unless a `shouldForwardProp` type guard named some): `CreateStyledComponent` with
179
+ * the props of the tag.
180
+ */
181
+ type StyledFactory<T, C extends ElementType, Base extends object = ComponentProps<C>> = CreateStyledComponent<object, Base, object, T>;
182
+ /** The shorthand of each HTML and SVG tag: `styled.div(...styles)` is `styled('div')(...styles)`. */
183
+ type StyledTags<T> = { readonly [K in keyof JSX.IntrinsicElements]: StyledFactory<T, K>; };
184
+ /** `styled(tag, options)`: with a `shouldForwardProp` type guard, the component takes only the props of `tag` that it names. */
185
+ interface StyledCall<T> {
186
+ <C extends ElementType, Forwarded extends keyof ComponentProps<C> & string>(tag: C, options: FilteringStyledOptions<ComponentProps<C>, Forwarded> & {
187
+ shouldForwardProp: (prop: string) => prop is Forwarded;
188
+ }): StyledFactory<T, C, Pick<ComponentProps<C>, Forwarded>>;
189
+ <C extends ElementType>(tag: C, options?: StyledOptions): StyledFactory<T, C>;
190
+ }
191
+ /** `styled` of a theme `T`: a call with a tag and options, and the shorthand of each tag. */
192
+ type Styled<T> = StyledCall<T> & StyledTags<T>;
193
+ /** `css()`: one style made once and passed around, from styles or from a tagged template. */
194
+ interface CssFunction {
195
+ (template: TemplateStringsArray, ...values: StaticTemplateValue$1[]): SerializedStyles$1;
196
+ (...styles: CssArgument$1[]): SerializedStyles$1;
197
+ }
198
+ /** A set of named styles; `E` is what one of them becomes: a class name on the web, a style object on React Native. */
199
+ interface SheetDefinition<S extends SheetStyles$1, E> {
200
+ /** Never set at run time: it only carries the types. */
201
+ readonly entries?: { [K in keyof S]: E; };
202
+ }
203
+ /**
204
+ * What the `theme` of a provider of the theme `T` takes: `ThemeInput<T>`. The `Theme` of the default style
205
+ * has no member of its own until an app declares its members in it, and until then no theme of the app
206
+ * would match it (TypeScript rejects an object that shares no member with a type whose members are all
207
+ * optional); so while it has none, the provider takes any theme object, or a function of the theme above
208
+ * whose parameter the app types (`(outer: AppTheme) => AppTheme`).
209
+ */
210
+ type ProviderThemeInput<T> = [Exclude<keyof T, '_theme'>] extends [never] ? object | UntypedThemeFunction['derive'] : ThemeInput$1<T>;
211
+ /**
212
+ * The function form of `ProviderThemeInput` for a theme with no members: its parameter is compared both
213
+ * ways, as a method's is, so a function whose parameter the app types as its own theme is taken.
214
+ */
215
+ interface UntypedThemeFunction {
216
+ derive(outer: object): object;
217
+ }
218
+ /** The props of `ThemeProvider`: the theme of the subtree, and on the web its color scheme and wrapper. */
219
+ interface ThemeProviderProps<T> {
220
+ /**
221
+ * The theme, or the part of it that this subtree changes; or a function of the theme above (the base
222
+ * theme, or an empty object, for the outermost provider) that returns it. It is merged over the theme above.
223
+ */
224
+ readonly theme: ProviderThemeInput<T>;
225
+ /** Web only. */
226
+ readonly colorScheme?: ColorScheme$1;
227
+ /** Web only: a class of the wrapper of a nested provider. */
228
+ readonly className?: string;
229
+ /**
230
+ * Web only. Renders no element, no class and no rule: the app puts `themeClass(theme)` on an ancestor,
231
+ * usually `<html>`. The theme still reaches the engine and the context. Without it the outermost provider
232
+ * declares its theme on `:root`, and renders no element either.
233
+ */
234
+ readonly isRoot?: boolean;
235
+ /** The subtree that the theme applies to. */
236
+ readonly children?: ReactNode;
237
+ }
238
+ /** The props of `ThemeScope`. */
239
+ interface ThemeScopeProps {
240
+ /** The content to wrap in the wrapper of the nearest nested provider: what a portal renders elsewhere. */
241
+ readonly children?: ReactNode;
242
+ }
243
+ /** The props of `Global`. */
244
+ interface GlobalProps<T> {
245
+ /**
246
+ * The global styles: a handle that `globalStyles` made, a style object, a function of the theme, or a
247
+ * list of them, written in the order of the list. A function of the theme reads the nearest provider:
248
+ * tokens are references, raw keys (`breakpoints`) are its real values.
249
+ */
250
+ readonly styles: GlobalInput$1<T>;
251
+ }
252
+ /** The props of `ThemeProvider` on the web: those of every platform, and the element of the wrapper. */
253
+ interface WebThemeProviderProps<T> extends ThemeProviderProps<T> {
254
+ /** The element of the wrapper of a nested provider. Default 'div'. */
255
+ readonly as?: string;
256
+ }
257
+ /**
258
+ * A component that `withTheme` or `withStyle` made from the component `C`: it takes the props of `C` and
259
+ * its `ref` (the instance of a class component), without `Name` (`theme` or `styles`), which it gives
260
+ * itself, and it has the statics of `C` that are not React's.
261
+ */
262
+ type WrappedComponent<C extends ElementType, Name extends string> = FunctionComponent<Omit<ComponentPropsWithRef<C>, Name>> & Omit<C, WrapperOwnStatics$1>;
263
+ /**
264
+ * What `withStyle(sheet)` returns: it wraps a component whose `styles` prop takes `Styles`, the entries
265
+ * that `useStyle(sheet)` returns.
266
+ */
267
+ type StyleWrapper<Styles> = <C extends ComponentType<PropsTaking$1<ComponentProps<C>, 'styles', Styles>>>(component: C) => WrappedComponent<C, 'styles'>;
268
+ /** The setter of `useStyleValue`: a new number, or a function of the number before. */
269
+ type StyleValueSetter = (next: number | ((previous: number) => number)) => void;
270
+ declare const configure: (options: DefaultStyleOptions) => void, getEngine: () => import("@umber-style/core").Engine<Theme$2>, styled: Styled<Theme$2>, StyleSheet: {
271
+ create<K extends string>(styles: import("@umber-style/core").ObjectSheet<K>): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
272
+ create<K extends string>(styles: (theme: Theme$2) => Record<K, import("@umber-style/core").WebStyleObject>): SheetDefinition<Record<K, import("@umber-style/core").WebStyleObject>, import("@umber-style/core").SheetEntry> & import("@umber-style/core").ThemedEntries<K>;
273
+ }, useStyle: {
274
+ <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
275
+ <K extends string>(sheet: SheetDefinition<Record<K, import("@umber-style/core").WebStyleObject>, import("@umber-style/core").SheetEntry> & import("@umber-style/core").ThemedEntries<K>): { [P in K]: import("@umber-style/core").SheetEntry; };
276
+ <S extends import("@umber-style/core").SheetStyles>(sheet: SheetDefinition<S, import("@umber-style/core").SheetEntry>): { [K in keyof S]: import("@umber-style/core").SheetEntry; };
277
+ }, withStyle: {
278
+ <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): StyleWrapper<{ readonly [P in K]: import("@umber-style/core").SheetEntry; }>;
279
+ <K extends string>(sheet: SheetDefinition<Record<K, import("@umber-style/core").WebStyleObject>, import("@umber-style/core").SheetEntry> & import("@umber-style/core").ThemedEntries<K>): StyleWrapper<{ [P in K]: import("@umber-style/core").SheetEntry; }>;
280
+ <S extends import("@umber-style/core").SheetStyles>(sheet: SheetDefinition<S, import("@umber-style/core").SheetEntry>): StyleWrapper<{ [K in keyof S]: import("@umber-style/core").SheetEntry; }>;
281
+ }, useStyleValue: (initial: number, unit?: string) => [import("@umber-style/core").LiveValue, StyleValueSetter], useTheme: () => Theme$2, withTheme: <C extends import("react").ComponentType<import("@umber-style/core").PropsTaking<import("react").ComponentProps<C>, 'theme', Theme$2>>>(component: C) => WrappedComponent<C, "theme">, ThemeProvider: (props: WebThemeProviderProps<Theme$2>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>, ThemeScope: (props: ThemeScopeProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>, useThemeClass: () => string | undefined, ThemeContext: import("react").Context<Theme$2 | undefined>, apply: (...entries: (import("@umber-style/core").SheetEntry | string | null | undefined | false)[]) => {
282
+ className?: string;
283
+ }, css: CssFunction, themeClass: (theme: import("@umber-style/core").DeepPartialObject<Theme$2>, colorScheme?: import("@umber-style/core").ColorScheme) => string, when: (theme: import("@umber-style/core").DeepPartialObject<Theme$2>, colorScheme?: import("@umber-style/core").ColorScheme) => import("@umber-style/core").ThemeKey, whenScheme: (scheme: import("@umber-style/core").SchemeName) => import("@umber-style/core").SchemeKey, keyframes: {
284
+ (steps: (theme: Theme$2) => import("@umber-style/core").KeyframesSteps, options?: import("@umber-style/core").KeyframesOptions): import("@umber-style/core").Keyframes;
285
+ (template: TemplateStringsArray, ...values: import("@umber-style/core").TemplateValue<unknown, Theme$2>[]): import("@umber-style/core").Keyframes;
286
+ (steps: import("@umber-style/core").KeyframesInput<Theme$2>, options?: import("@umber-style/core").KeyframesOptions): import("@umber-style/core").Keyframes;
287
+ }, globalStyles: {
288
+ (styles: (theme: Theme$2) => import("@umber-style/core").GlobalStyleObject): import("@umber-style/core").GlobalStyles<Theme$2>;
289
+ (template: TemplateStringsArray, ...values: import("@umber-style/core").TemplateValue<unknown, Theme$2>[]): import("@umber-style/core").GlobalStyles<Theme$2>;
290
+ (styles: import("@umber-style/core").GlobalStylesInput<Theme$2>): import("@umber-style/core").GlobalStyles<Theme$2>;
291
+ }, Global: (props: GlobalProps<Theme$2>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
292
+ /** The defaults a theme may set for every `Accordion`. */
293
+ interface AccordionOwnerState {
294
+ hasGutters?: boolean;
295
+ borderRadius?: keyof ThemeRadii;
296
+ bg?: keyof ThemeBackground;
297
+ textColor?: keyof ThemeText;
298
+ }
299
+ /** The slots of Accordion a theme can style with `styleOverrides`. */
300
+ type AccordionSlot = 'root' | 'region';
301
+ /** What `theme.components.Accordion` takes. */
302
+ type AccordionThemeConfig = ComponentConfig<AccordionOwnerState, AccordionSlot>;
303
+ /** The resolved props AccordionActions's styled elements receive - what `ownerState` exposes. */
304
+ type AccordionActionsOwnerState = Record<string, unknown>;
305
+ /** The slots of AccordionActions a theme can style with `styleOverrides`. */
306
+ type AccordionActionsSlot = 'root';
307
+ /** What `theme.components.AccordionActions` takes. */
308
+ type AccordionActionsThemeConfig = ComponentConfig<AccordionActionsOwnerState, AccordionActionsSlot>;
309
+ /** The resolved props AccordionDetails's styled elements receive - what `ownerState` exposes. */
310
+ type AccordionDetailsOwnerState = Record<string, unknown>;
311
+ /** The slots of AccordionDetails a theme can style with `styleOverrides`. */
312
+ type AccordionDetailsSlot = 'root';
313
+ /** What `theme.components.AccordionDetails` takes. */
314
+ type AccordionDetailsThemeConfig = ComponentConfig<AccordionDetailsOwnerState, AccordionDetailsSlot>;
315
+ /** The defaults a theme may set for every `AccordionGroup`. */
316
+ interface AccordionGroupOwnerState {
317
+ isExclusive?: boolean;
318
+ variant?: 'separated' | 'attached';
319
+ }
320
+ /** The slots of AccordionGroup a theme can style with `styleOverrides`. */
321
+ type AccordionGroupSlot = 'root';
322
+ /** What `theme.components.AccordionGroup` takes. */
323
+ type AccordionGroupThemeConfig = ComponentConfig<AccordionGroupOwnerState, AccordionGroupSlot>;
324
+ /** The defaults a theme may set for every `AccordionSummary`. */
325
+ interface AccordionSummaryOwnerState {
326
+ headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
327
+ }
328
+ /** The slots of AccordionSummary a theme can style with `styleOverrides`. */
329
+ type AccordionSummarySlot = 'root' | 'button' | 'content' | 'icon';
330
+ /** What `theme.components.AccordionSummary` takes. */
331
+ type AccordionSummaryThemeConfig = ComponentConfig<AccordionSummaryOwnerState, AccordionSummarySlot>;
332
+ /** The defaults a theme may set for every `Alert` - its `closeLabel` gives it a language. */
333
+ interface AlertOwnerState {
334
+ severity?: 'success' | 'info' | 'warning' | 'error';
335
+ variant?: 'standard' | 'contained' | 'outlined';
336
+ closeLabel?: string;
337
+ role?: 'alert' | 'status';
338
+ borderRadius?: keyof ThemeRadii;
339
+ }
340
+ /** The slots of Alert a theme can style with `styleOverrides`. */
341
+ type AlertSlot = 'root' | 'icon' | 'message' | 'action' | 'closeButton';
342
+ /** What `theme.components.Alert` takes. */
343
+ type AlertThemeConfig = ComponentConfig<AlertOwnerState, AlertSlot>;
344
+ /** The resolved props AlertTitle's styled elements receive - what `ownerState` exposes. */
345
+ type AlertTitleOwnerState = Record<string, unknown>;
346
+ /** The slots of AlertTitle a theme can style with `styleOverrides`. */
347
+ type AlertTitleSlot = 'root';
348
+ /** What `theme.components.AlertTitle` takes. */
349
+ type AlertTitleThemeConfig = ComponentConfig<AlertTitleOwnerState, AlertTitleSlot>;
350
+ /** The resolved props AppBar's styled elements receive - what `ownerState` exposes. */
351
+ type AppBarOwnerState = Record<string, unknown>;
352
+ /** The slots of AppBar a theme can style with `styleOverrides`. */
353
+ type AppBarSlot = 'root';
354
+ /** What `theme.components.AppBar` takes. */
355
+ type AppBarThemeConfig = ComponentConfig<AppBarOwnerState, AppBarSlot>;
356
+ /** The defaults a theme may set for every `Autocomplete` - its labels give it a language. */
357
+ interface AutocompleteOwnerState {
358
+ borderRadius?: keyof ThemeRadii;
359
+ bg?: keyof ThemeBackground;
360
+ textColor?: keyof ThemeText;
361
+ variant?: InputVariantKey;
362
+ size?: ThemeSize;
363
+ color?: ThemeColor;
364
+ shouldAllowFreeText?: boolean;
365
+ layer?: keyof ThemeZOrder;
366
+ clearLabel?: string;
367
+ openLabel?: string;
368
+ closeLabel?: string;
369
+ loadingText?: string;
370
+ noOptionsText?: string;
371
+ }
372
+ /** The slots of Autocomplete a theme can style with `styleOverrides`. */
373
+ type AutocompleteSlot = 'root' | 'tags' | 'input' | 'clearIndicator' | 'popupIndicator' | 'popup' | 'listbox' | 'group' | 'groupLabel' | 'groupItems' | 'option' | 'status';
374
+ /** What `theme.components.Autocomplete` takes. */
375
+ type AutocompleteThemeConfig = ComponentConfig<AutocompleteOwnerState, AutocompleteSlot>;
376
+ /** The resolved props Avatar's styled elements receive - what `ownerState` exposes. */
377
+ type AvatarOwnerState = Record<string, unknown>;
378
+ /** The slots of Avatar a theme can style with `styleOverrides`. */
379
+ type AvatarSlot = 'root' | 'img';
380
+ /** What `theme.components.Avatar` takes. */
381
+ type AvatarThemeConfig = ComponentConfig<AvatarOwnerState, AvatarSlot>;
382
+ /** The resolved props Backdrop's styled elements receive - what `ownerState` exposes. */
383
+ type BackdropOwnerState = Record<string, unknown>;
384
+ /** The slots of Backdrop a theme can style with `styleOverrides`. */
385
+ type BackdropSlot = 'root';
386
+ /** What `theme.components.Backdrop` takes. */
387
+ type BackdropThemeConfig = ComponentConfig<BackdropOwnerState, BackdropSlot>;
388
+ /** The defaults a theme may set for every `Badge`. */
389
+ interface BadgeOwnerState {
390
+ max?: number;
391
+ variant?: 'standard' | 'dot';
392
+ color?: ThemeColor;
393
+ anchorOrigin?: {
394
+ vertical: 'top' | 'bottom';
395
+ horizontal: 'start' | 'end';
396
+ };
397
+ overlap?: 'rectangular' | 'circular';
398
+ }
399
+ /** The slots of Badge a theme can style with `styleOverrides`. */
400
+ type BadgeSlot = 'root' | 'badge' | 'label';
401
+ /** What `theme.components.Badge` takes. */
402
+ type BadgeThemeConfig = ComponentConfig<BadgeOwnerState, BadgeSlot>;
403
+ /** The defaults a theme may set for every `Breadcrumbs` - its `expandLabel` gives a trail its language. */
404
+ interface BreadcrumbsOwnerState {
405
+ separator?: ReactNode;
406
+ maxItems?: number;
407
+ itemsBeforeCollapse?: number;
408
+ itemsAfterCollapse?: number;
409
+ expandLabel?: string;
410
+ color?: keyof ThemeText;
411
+ }
412
+ /** The slots of Breadcrumbs a theme can style with `styleOverrides`. */
413
+ type BreadcrumbsSlot = 'root' | 'list' | 'item' | 'separator' | 'collapsed' | 'collapsedIcon';
414
+ /** What `theme.components.Breadcrumbs` takes. */
415
+ type BreadcrumbsThemeConfig = ComponentConfig<BreadcrumbsOwnerState, BreadcrumbsSlot>;
416
+ /** The resolved props ButtonGroup's styled elements receive - what `ownerState` exposes. */
417
+ type ButtonGroupOwnerState = Record<string, unknown>;
418
+ /** The slots of ButtonGroup a theme can style with `styleOverrides`. */
419
+ type ButtonGroupSlot = 'root';
420
+ /** What `theme.components.ButtonGroup` takes. */
421
+ type ButtonGroupThemeConfig = ComponentConfig<ButtonGroupOwnerState, ButtonGroupSlot>;
422
+ /** Card's resolved props / theme-settable defaults. */
423
+ interface CardOwnerState {
424
+ variant?: 'paper' | 'bracketBox' | 'interactive';
425
+ /** Merged under any per-instance `titleProps` (instance wins). */
426
+ titleProps?: CardSlotTypographyProps;
427
+ /** Merged under any per-instance `captionProps` (instance wins). */
428
+ captionProps?: CardSlotTypographyProps;
429
+ /** Merged under any per-instance `iconProps` (instance wins). */
430
+ iconProps?: CardSlotIconProps;
431
+ }
432
+ /** Token-typed Typography props a theme may set for Card's title/caption slots. */
433
+ interface CardSlotTypographyProps {
434
+ variant?: ThemeTypography;
435
+ color?: keyof ThemeText;
436
+ fontFamily?: keyof ThemeFonts;
437
+ mb?: ThemeSpaceKey;
438
+ }
439
+ /** Token-typed Icon props a theme may set for Card's icon slot. */
440
+ interface CardSlotIconProps {
441
+ color?: keyof ThemeText;
442
+ size?: string | number;
443
+ }
444
+ /** The slots of Card a theme can style with `styleOverrides`. */
445
+ type CardSlot = 'root' | 'title' | 'caption' | 'icon';
446
+ /** What `theme.components.Card` takes. */
447
+ type CardThemeConfig = ComponentConfig<CardOwnerState, CardSlot>;
448
+ /** The resolved props Checkbox's styled elements receive - what `ownerState` exposes. */
449
+ type CheckboxOwnerState = Record<string, unknown>;
450
+ /** The slots of Checkbox a theme can style with `styleOverrides`. */
451
+ type CheckboxSlot = 'root' | 'input' | 'icon' | 'label';
452
+ /** What `theme.components.Checkbox` takes. */
453
+ type CheckboxThemeConfig = ComponentConfig<CheckboxOwnerState, CheckboxSlot>;
454
+ /** The corner shapes of a control or a surface. */
455
+ type ShapeKey$2 = 'square' | 'rounded' | 'pill';
456
+ /** The defaults a theme may set for every `Chip` - its `deleteLabel` gives it a language. */
457
+ interface ChipOwnerState {
458
+ variant?: 'contained' | 'outlined' | 'text';
459
+ color?: ThemeColor;
460
+ size?: ThemeSize;
461
+ shape?: ShapeKey$2;
462
+ borderRadius?: keyof ThemeRadii;
463
+ deleteLabel?: string;
464
+ }
465
+ /** The slots of Chip a theme can style with `styleOverrides`. */
466
+ type ChipSlot = 'root' | 'body' | 'label' | 'icon' | 'avatar' | 'deleteIcon';
467
+ /** What `theme.components.Chip` takes. */
468
+ type ChipThemeConfig = ComponentConfig<ChipOwnerState, ChipSlot>;
469
+ /** The resolved props CircularProgress's styled elements receive - what `ownerState` exposes. */
470
+ type CircularProgressOwnerState = Record<string, unknown>;
471
+ /** The slots of CircularProgress a theme can style with `styleOverrides`. */
472
+ type CircularProgressSlot = 'root' | 'track' | 'circle';
473
+ /** What `theme.components.CircularProgress` takes. */
474
+ type CircularProgressThemeConfig = ComponentConfig<CircularProgressOwnerState, CircularProgressSlot>;
475
+ /** The defaults a theme may set for every `Collapse`. */
476
+ interface CollapseOwnerState {
477
+ orientation?: 'vertical' | 'horizontal';
478
+ collapsedSize?: string | number;
479
+ timeout?: number | {
480
+ enter: number;
481
+ exit: number;
482
+ };
483
+ easing?: keyof ThemeTransitionEasing;
484
+ shouldAppear?: boolean;
485
+ }
486
+ /** The slots of Collapse a theme can style with `styleOverrides`. */
487
+ type CollapseSlot = 'root' | 'wrapper' | 'inner';
488
+ /** What `theme.components.Collapse` takes. */
489
+ type CollapseThemeConfig = ComponentConfig<CollapseOwnerState, CollapseSlot>;
490
+ /** The resolved props Paper's styled elements receive - what `ownerState` exposes. */
491
+ type PaperOwnerState = Record<string, unknown>;
492
+ /** The slots of Paper a theme can style with `styleOverrides`. */
493
+ type PaperSlot = 'root';
494
+ /** What `theme.components.Paper` takes. */
495
+ type PaperThemeConfig = ComponentConfig<PaperOwnerState, PaperSlot>;
496
+ /** Valid values for the color prop - derived from theme.text keys. */
497
+ type ViewColorToken = keyof Theme['text'];
498
+ /** Valid values for the bg prop - derived from theme.background keys. */
499
+ type ViewBackgroundToken = keyof Theme['background'];
500
+ /** Valid values for the borderColor prop - derived from theme.border keys. */
501
+ type ViewBorderColorToken = keyof Theme['border'];
502
+ /** Valid values for the borderWidth prop - derived from theme.borderWidths keys. */
503
+ type ViewBorderWidthToken = keyof Theme['borderWidths'];
504
+ /** Valid theme tokens for border-radius. Raw CSS pixel values (e.g. '6px', '9999px') are also accepted. */
505
+ type OrPixels<Token extends PropertyKey> = Token | `${number}px`;
506
+ type ViewBorderRadiusToken = OrPixels<keyof Theme['radii']>;
507
+ interface ViewProps extends Omit<HTMLAttributes<HTMLElement>, 'color' | 'style'>, SpaceProps, LayoutProps, TypographyProps$1, Omit<BorderProps, 'borderColor' | 'borderWidth' | 'borderRadius'>, PositionProps, SpanProps, LayoutFrameProps {
508
+ /** Overrides the CSS of the element: an entry of `StyleSheet.create`, or a list of them. */
509
+ style?: StyleOverride;
510
+ /** Overrides for the slot a theme can style: `style`, `className`, `data-*` and `aria-*`. */
511
+ slotProps?: SlotProps<'root'>;
512
+ bg?: ViewBackgroundToken;
513
+ /** Resolves against theme.border - light · primary · dark */
514
+ borderColor?: ViewBorderColorToken;
515
+ /** Resolves against theme.borderWidths - none · thin · base · thick */
516
+ borderWidth?: ViewBorderWidthToken;
517
+ /** Theme tokens: sq · sm · md · lg. Also accepts raw CSS pixel values e.g. '6px', '9999px'. */
518
+ borderRadius?: ViewBorderRadiusToken;
519
+ opacity?: number;
520
+ cursor?: CSSProperties['cursor'];
521
+ /** CSS order for flex/grid item placement. Accepts responsive arrays. */
522
+ order?: FlexboxProps['order'];
523
+ }
524
+ /** The resolved props View's styled elements receive - what `ownerState` exposes. */
525
+ type ViewOwnerState = Record<string, unknown>;
526
+ /** The slots of View a theme can style with `styleOverrides`. */
527
+ type ViewSlot = 'root';
528
+ /** What `theme.components.View` takes. */
529
+ type ViewThemeConfig = ComponentConfig<ViewOwnerState, ViewSlot>;
530
+ declare const View: StrictStyled<StyledComponent<import("react").ElementType, ViewProps, {
531
+ theme?: AppTheme;
532
+ as?: React.ElementType;
533
+ } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & object>>;
534
+ /** Valid values for the gap prop - derived from theme.space keys. */
535
+ type GapToken$1 = keyof Theme['space'];
536
+ /**
537
+ * `layout` puts the flex container on the page frame, as on any View: the theme's margin and
538
+ * max width per breakpoint. The flexbox stays as set - a column by default, a row with
539
+ * `flexDirection="row"`. Columns are Grid's: content on the page columns uses `<Grid layout>`.
540
+ */
541
+ interface FlexProps extends ViewProps, FlexboxProps {}
542
+ /** The resolved props Flex's styled elements receive - what `ownerState` exposes. */
543
+ type FlexOwnerState = Record<string, unknown>;
544
+ /** The slots of Flex a theme can style with `styleOverrides`. */
545
+ type FlexSlot = 'root';
546
+ /** What `theme.components.Flex` takes. */
547
+ type FlexThemeConfig = ComponentConfig<FlexOwnerState, FlexSlot>;
548
+ declare const Flex: StrictStyled<StyledComponent<import("react").ElementType, FlexProps, Omit<Omit<{
549
+ theme?: AppTheme;
550
+ as?: React.ElementType;
551
+ } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & object, "as" | keyof ViewProps> & Omit<ViewProps, "style"> & {
552
+ 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;
553
+ style?: StyleProp;
554
+ }, "slotProps" | "style"> & {
555
+ style?: StyleOverride;
556
+ slotProps?: SlotProps<'root'>;
557
+ } & {
558
+ theme?: AppTheme;
559
+ } & object>>;
560
+ 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;
561
+ /** The defaults a theme may set for every `Menu`. */
562
+ interface MenuOwnerState {
563
+ align?: 'start' | 'end';
564
+ borderRadius?: keyof ThemeRadii;
565
+ marginThreshold?: ThemeSpaceKey;
566
+ elevation?: PaperElevation;
567
+ layer?: keyof ThemeZOrder;
568
+ color?: ThemeColor;
569
+ textColor?: keyof ThemeText;
570
+ size?: ThemeSize;
571
+ dense?: boolean;
572
+ }
573
+ /** The slots of Menu a theme can style with `styleOverrides`. */
574
+ type MenuSlot = 'root' | 'paper' | 'list';
575
+ /** What `theme.components.Menu` takes. */
576
+ type MenuThemeConfig = ComponentConfig<MenuOwnerState, MenuSlot>;
577
+ /** The defaults a theme may set for every `ContextMenu` - a `Menu`'s, placed at the pointer. */
578
+ type ContextMenuOwnerState = Omit<MenuOwnerState, 'align'>;
579
+ /** The slots of ContextMenu a theme can style with `styleOverrides`. */
580
+ type ContextMenuSlot = 'root' | 'paper' | 'list';
581
+ /** What `theme.components.ContextMenu` takes. */
582
+ type ContextMenuThemeConfig = ComponentConfig<ContextMenuOwnerState, ContextMenuSlot>;
583
+ /** The resolved props Drawer's styled elements receive - what `ownerState` exposes. */
584
+ type DrawerOwnerState = Record<string, unknown>;
585
+ /** The slots of Drawer a theme can style with `styleOverrides`. */
586
+ type DrawerSlot = 'root';
587
+ /** What `theme.components.Drawer` takes. */
588
+ type DrawerThemeConfig = ComponentConfig<DrawerOwnerState, DrawerSlot>;
589
+ /** The defaults a theme may set for every `Fab`. */
590
+ interface FabOwnerState {
591
+ variant?: 'circular' | 'extended';
592
+ color?: ThemeColor;
593
+ size?: ThemeSize;
594
+ }
595
+ /** The slots of Fab a theme can style with `styleOverrides`. */
596
+ type FabSlot = 'root' | 'label' | 'labelText';
597
+ /** What `theme.components.Fab` takes. */
598
+ type FabThemeConfig = ComponentConfig<FabOwnerState, FabSlot>;
599
+ /** The defaults a theme may set for every `FabMenu`. */
600
+ interface FabMenuOwnerState {
601
+ direction?: 'up' | 'down' | 'left' | 'right';
602
+ align?: 'start' | 'end';
603
+ color?: ThemeColor;
604
+ size?: ThemeSize;
605
+ }
606
+ /** The slots of FabMenu a theme can style with `styleOverrides`. */
607
+ type FabMenuSlot = 'root' | 'list';
608
+ /** What `theme.components.FabMenu` takes. */
609
+ type FabMenuThemeConfig = ComponentConfig<FabMenuOwnerState, FabMenuSlot>;
610
+ /** The resolved props FocusTrap's styled elements receive - what `ownerState` exposes. */
611
+ type FocusTrapOwnerState = Record<string, unknown>;
612
+ /** The slots of FocusTrap a theme can style with `styleOverrides`. */
613
+ type FocusTrapSlot = 'root';
614
+ /** What `theme.components.FocusTrap` takes. */
615
+ type FocusTrapThemeConfig = ComponentConfig<FocusTrapOwnerState, FocusTrapSlot>;
616
+ /** The resolved props Form's styled elements receive - what `ownerState` exposes. */
617
+ type FormOwnerState = Record<string, unknown>;
618
+ /** The slots of Form a theme can style with `styleOverrides`. */
619
+ type FormSlot = 'root';
620
+ /** What `theme.components.Form` takes. */
621
+ type FormThemeConfig = ComponentConfig<FormOwnerState, FormSlot>;
622
+ /** The resolved props FormControl's styled elements receive - what `ownerState` exposes. */
623
+ type FormControlOwnerState = Record<string, unknown>;
624
+ /** The slots of FormControl a theme can style with `styleOverrides`. */
625
+ type FormControlSlot = 'root';
626
+ /** What `theme.components.FormControl` takes. */
627
+ type FormControlThemeConfig = ComponentConfig<FormControlOwnerState, FormControlSlot>;
628
+ /** The resolved props FormHelperText's styled elements receive - what `ownerState` exposes. */
629
+ type FormHelperTextOwnerState = Record<string, unknown>;
630
+ /** The slots of FormHelperText a theme can style with `styleOverrides`. */
631
+ type FormHelperTextSlot = 'root';
632
+ /** What `theme.components.FormHelperText` takes. */
633
+ type FormHelperTextThemeConfig = ComponentConfig<FormHelperTextOwnerState, FormHelperTextSlot>;
634
+ /** The resolved props FormLabel's styled elements receive - what `ownerState` exposes. */
635
+ type FormLabelOwnerState = Record<string, unknown>;
636
+ /** The slots of FormLabel a theme can style with `styleOverrides`. */
637
+ type FormLabelSlot = 'root';
638
+ /** What `theme.components.FormLabel` takes. */
639
+ type FormLabelThemeConfig = ComponentConfig<FormLabelOwnerState, FormLabelSlot>;
640
+ /** The resolved props Grid's styled elements receive - what `ownerState` exposes. */
641
+ type GridOwnerState = Record<string, unknown>;
642
+ /** The slots of Grid a theme can style with `styleOverrides`. */
643
+ type GridSlot = 'root';
644
+ /** What `theme.components.Grid` takes. */
645
+ type GridThemeConfig = ComponentConfig<GridOwnerState, GridSlot>;
646
+ /** The resolved props Icon's styled elements receive - what `ownerState` exposes. */
647
+ type IconOwnerState = Record<string, unknown>;
648
+ /** The slots of Icon a theme can style with `styleOverrides`. */
649
+ type IconSlot = 'root';
650
+ /** What `theme.components.Icon` takes. */
651
+ type IconThemeConfig = ComponentConfig<IconOwnerState, IconSlot>;
652
+ /** The resolved props Image's styled elements receive - what `ownerState` exposes. */
653
+ type ImageOwnerState = Record<string, unknown>;
654
+ /** The slots of Image a theme can style with `styleOverrides`. */
655
+ type ImageSlot = 'root';
656
+ /** What `theme.components.Image` takes. */
657
+ type ImageThemeConfig = ComponentConfig<ImageOwnerState, ImageSlot>;
658
+ /** The resolved props LinearProgress's styled elements receive - what `ownerState` exposes. */
659
+ type LinearProgressOwnerState = Record<string, unknown>;
660
+ /** The slots of LinearProgress a theme can style with `styleOverrides`. */
661
+ type LinearProgressSlot = 'root' | 'track' | 'dash' | 'bar' | 'traveler' | 'segment' | 'secondaryBar';
662
+ /** What `theme.components.LinearProgress` takes. */
663
+ type LinearProgressThemeConfig = ComponentConfig<LinearProgressOwnerState, LinearProgressSlot>;
664
+ /** The resolved props Link's styled elements receive - what `ownerState` exposes. */
665
+ type LinkOwnerState = Record<string, unknown>;
666
+ /** The slots of Link a theme can style with `styleOverrides`. */
667
+ type LinkSlot = 'root';
668
+ /** What `theme.components.Link` takes. */
669
+ type LinkThemeConfig = ComponentConfig<LinkOwnerState, LinkSlot>;
670
+ /** The resolved props MenuDivider's styled elements receive - what `ownerState` exposes. */
671
+ type MenuDividerOwnerState = Record<string, unknown>;
672
+ /** The slots of MenuDivider a theme can style with `styleOverrides`. */
673
+ type MenuDividerSlot = 'root';
674
+ /** What `theme.components.MenuDivider` takes. */
675
+ type MenuDividerThemeConfig = ComponentConfig<MenuDividerOwnerState, MenuDividerSlot>;
676
+ /** The defaults a theme may set for every `MenuItem` - a list's own values win. */
677
+ interface MenuItemOwnerState {
678
+ color?: ThemeColor;
679
+ textColor?: keyof ThemeText;
680
+ size?: ThemeSize;
681
+ dense?: boolean;
682
+ }
683
+ /** The slots of MenuItem a theme can style with `styleOverrides`. */
684
+ type MenuItemSlot = 'root' | 'check' | 'startIcon' | 'label' | 'shortcut' | 'submenuIcon' | 'entry' | 'secondaryAction';
685
+ /** What `theme.components.MenuItem` takes. */
686
+ type MenuItemThemeConfig = ComponentConfig<MenuItemOwnerState, MenuItemSlot>;
687
+ /** The defaults a theme may set for every `MenuList` - and so for its rows. */
688
+ interface MenuListOwnerState {
689
+ color?: ThemeColor;
690
+ textColor?: keyof ThemeText;
691
+ size?: ThemeSize;
692
+ dense?: boolean;
693
+ shouldWrap?: boolean;
694
+ }
695
+ /** The slots of MenuList a theme can style with `styleOverrides`. */
696
+ type MenuListSlot = 'root';
697
+ /** What `theme.components.MenuList` takes. */
698
+ type MenuListThemeConfig = ComponentConfig<MenuListOwnerState, MenuListSlot>;
699
+ type ModalCloseReason = 'escapeKey' | 'backdropClick';
700
+ type ModalScroll = 'paper' | 'body';
701
+ interface ModalProps {
702
+ /** If true, the modal is shown. */
703
+ isOpen: boolean;
704
+ /** A single content element. */
705
+ children: ReactNode;
706
+ /** Fired on Escape (top modal only) or backdrop click. */
707
+ onClose?: (event: Event | React.SyntheticEvent, reason: ModalCloseReason) => void;
708
+ /** Render the dimmed backdrop. Default: true. */
709
+ hasBackdrop?: boolean;
710
+ /** Keep the children mounted while closed. Default: false. */
711
+ shouldKeepMounted?: boolean;
712
+ /** Portal the modal into `portalContainer`. Default: true. */
713
+ shouldUsePortal?: boolean;
714
+ /** Portal target, or a function returning one. Defaults to the document body. */
715
+ portalContainer?: HTMLElement | (() => HTMLElement | null) | null;
716
+ /** Lock body scroll while open. Default: true. */
717
+ shouldLockScroll?: boolean;
718
+ /** Skip `aria-hidden` on background content - for non-modal popovers whose trigger stays focused. Default: false. */
719
+ disableAriaHidden?: boolean;
720
+ /** Move focus into the modal on open. Default: true. */
721
+ shouldAutoFocus?: boolean;
722
+ /** Trap Tab focus within the modal. Default: true. */
723
+ shouldTrapFocus?: boolean;
724
+ /** Pull focus back into the modal whenever it escapes. Default: true. */
725
+ shouldEnforceFocus?: boolean;
726
+ /** Restore focus to the trigger on close. Default: true. */
727
+ shouldRestoreFocus?: boolean;
728
+ /** How long content scrolls: within the content (`'paper'`) or the whole root (`'body'`). Default: 'paper'. */
729
+ scroll?: ModalScroll;
730
+ /** Stacking layer from `theme.zOrder`. Default: 'modal'. */
731
+ layer?: keyof Theme['zOrder'];
732
+ /** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
733
+ style?: StyleOverride;
734
+ className?: string;
735
+ /** Overrides for the slots a theme can style: `style`, `className`, `data-*` and `aria-*`. */
736
+ slotProps?: SlotProps<ModalSlot>;
737
+ }
738
+ /** The resolved props Modal's styled elements receive - what `ownerState` exposes. */
739
+ type ModalOwnerState = Record<string, unknown>;
740
+ /** The slots of Modal a theme can style with `styleOverrides`. */
741
+ type ModalSlot = 'root';
742
+ /** What `theme.components.Modal` takes. */
743
+ type ModalThemeConfig = ComponentConfig<ModalOwnerState, ModalSlot>;
744
+ /** The resolved props NativeSelect's styled elements receive - what `ownerState` exposes. */
745
+ type NativeSelectOwnerState = Record<string, unknown>;
746
+ /** The slots of NativeSelect a theme can style with `styleOverrides`. */
747
+ type NativeSelectSlot = 'root' | 'select' | 'icon';
748
+ /** What `theme.components.NativeSelect` takes. */
749
+ type NativeSelectThemeConfig = ComponentConfig<NativeSelectOwnerState, NativeSelectSlot>;
750
+ /** The resolved props NavGroup's styled elements receive - what `ownerState` exposes. */
751
+ type NavGroupOwnerState = Record<string, unknown>;
752
+ /** The slots of NavGroup a theme can style with `styleOverrides`. */
753
+ type NavGroupSlot = 'root' | 'label' | 'list';
754
+ /** What `theme.components.NavGroup` takes. */
755
+ type NavGroupThemeConfig = ComponentConfig<NavGroupOwnerState, NavGroupSlot>;
756
+ /** The resolved props NavLink's styled elements receive - what `ownerState` exposes. */
757
+ type NavLinkOwnerState = Record<string, unknown>;
758
+ /** The slots of NavLink a theme can style with `styleOverrides`. */
759
+ type NavLinkSlot = 'root' | 'label' | 'note';
760
+ /** What `theme.components.NavLink` takes. */
761
+ type NavLinkThemeConfig = ComponentConfig<NavLinkOwnerState, NavLinkSlot>;
762
+ /** The resolved props NavTree's styled elements receive - what `ownerState` exposes. */
763
+ type NavTreeOwnerState = Record<string, unknown>;
764
+ /** The slots of NavTree a theme can style with `styleOverrides`. */
765
+ type NavTreeSlot = 'root';
766
+ /** What `theme.components.NavTree` takes. */
767
+ type NavTreeThemeConfig = ComponentConfig<NavTreeOwnerState, NavTreeSlot>;
768
+ /** The defaults a theme may set for every `NumberInput` - its button labels give it a language. */
769
+ interface NumberInputOwnerState {
770
+ variant?: InputVariantKey;
771
+ size?: ThemeSize;
772
+ color?: ThemeColor;
773
+ spinButtons?: 'stacked' | 'sides' | 'none';
774
+ step?: number;
775
+ smallStep?: number;
776
+ largeStep?: number;
777
+ shouldSnapOnStep?: boolean;
778
+ shouldScrubOnWheel?: boolean;
779
+ incrementLabel?: string;
780
+ decrementLabel?: string;
781
+ }
782
+ /** The slots of NumberInput a theme can style with `styleOverrides`. */
783
+ type NumberInputSlot = 'root' | 'input' | 'content' | 'spinButtons' | 'increment' | 'decrement';
784
+ /** What `theme.components.NumberInput` takes. */
785
+ type NumberInputThemeConfig = ComponentConfig<NumberInputOwnerState, NumberInputSlot>;
786
+ /** The resolved props Pagination's styled elements receive - what `ownerState` exposes. */
787
+ type PaginationOwnerState = Record<string, unknown>;
788
+ /** The slots of Pagination a theme can style with `styleOverrides`. */
789
+ type PaginationSlot = 'root' | 'list';
790
+ /** What `theme.components.Pagination` takes. */
791
+ type PaginationThemeConfig = ComponentConfig<PaginationOwnerState, PaginationSlot>;
792
+ /** The resolved props PaginationItem's styled elements receive - what `ownerState` exposes. */
793
+ type PaginationItemOwnerState = Record<string, unknown>;
794
+ /** The slots of PaginationItem a theme can style with `styleOverrides`. */
795
+ type PaginationItemSlot = 'root' | 'ellipsis';
796
+ /** What `theme.components.PaginationItem` takes. */
797
+ type PaginationItemThemeConfig = ComponentConfig<PaginationItemOwnerState, PaginationItemSlot>;
798
+ /** The resolved props Popover's styled elements receive - what `ownerState` exposes. */
799
+ type PopoverOwnerState = Record<string, unknown>;
800
+ /** The slots of Popover a theme can style with `styleOverrides`. */
801
+ type PopoverSlot = 'root' | 'positioner';
802
+ /** What `theme.components.Popover` takes. */
803
+ type PopoverThemeConfig = ComponentConfig<PopoverOwnerState, PopoverSlot>;
804
+ /**
805
+ * Pressable's resolved props / theme-settable defaults. Only the three keys it
806
+ * actually resolves through `useDefaultProps` - the disabled state reaches the
807
+ * styled root as `isDisabled` and is never read from here, so exposing it would
808
+ * promise theme authors an override that does nothing.
809
+ */
810
+ interface PressableOwnerState {
811
+ feedback?: 'none' | 'opacity' | 'highlight';
812
+ color?: ThemeColor;
813
+ /** Opacity held content fades to under `feedback: 'opacity'`. */
814
+ activeOpacity?: number;
815
+ }
816
+ /** The slots of Pressable a theme can style with `styleOverrides`. */
817
+ type PressableSlot = 'root';
818
+ /** What `theme.components.Pressable` takes. */
819
+ type PressableThemeConfig = ComponentConfig<PressableOwnerState, PressableSlot>;
820
+ /** The resolved props Quote's styled elements receive - what `ownerState` exposes. */
821
+ type QuoteOwnerState = Record<string, unknown>;
822
+ /** The slots of Quote a theme can style with `styleOverrides`. */
823
+ type QuoteSlot = 'root';
824
+ /** What `theme.components.Quote` takes. */
825
+ type QuoteThemeConfig = ComponentConfig<QuoteOwnerState, QuoteSlot>;
826
+ /** The resolved props Radio's styled elements receive - what `ownerState` exposes. */
827
+ type RadioOwnerState = Record<string, unknown>;
828
+ /** The slots of Radio a theme can style with `styleOverrides`. */
829
+ type RadioSlot = 'root' | 'input' | 'icon' | 'label';
830
+ /** What `theme.components.Radio` takes. */
831
+ type RadioThemeConfig = ComponentConfig<RadioOwnerState, RadioSlot>;
832
+ /** The defaults a theme may set for every `RangeInput`. */
833
+ interface RangeInputOwnerState {
834
+ size?: ThemeSize;
835
+ color?: ThemeColor;
836
+ orientation?: 'horizontal' | 'vertical';
837
+ track?: 'normal' | false | 'inverted';
838
+ step?: number | null;
839
+ shiftStep?: number;
840
+ valueLabel?: 'auto' | 'on' | 'off';
841
+ shouldSwapThumbs?: boolean;
842
+ }
843
+ /** The slots of RangeInput a theme can style with `styleOverrides`. */
844
+ type RangeInputSlot = 'root' | 'rail' | 'track' | 'thumb' | 'mark' | 'markLabel' | 'valueLabel' | 'input';
845
+ /** What `theme.components.RangeInput` takes. */
846
+ type RangeInputThemeConfig = ComponentConfig<RangeInputOwnerState, RangeInputSlot>;
847
+ /** The defaults a theme may set for every `Rating`. */
848
+ interface RatingOwnerState {
849
+ max?: number;
850
+ precision?: number;
851
+ highlightSelectedOnly?: boolean;
852
+ size?: ThemeSize;
853
+ color?: ThemeColor;
854
+ }
855
+ /** The slots of Rating a theme can style with `styleOverrides`. */
856
+ type RatingSlot = 'root' | 'item' | 'icon' | 'decimal' | 'input' | 'text' | 'emptyLabel';
857
+ /** What `theme.components.Rating` takes. */
858
+ type RatingThemeConfig = ComponentConfig<RatingOwnerState, RatingSlot>;
859
+ /** The defaults a theme may set for every `ScrollArea`. */
860
+ interface ScrollAreaOwnerState {
861
+ axes?: 'x' | 'y' | 'both';
862
+ }
863
+ /** The slots of ScrollArea a theme can style with `styleOverrides`. */
864
+ type ScrollAreaSlot = 'root' | 'viewport' | 'track' | 'thumb';
865
+ /** What `theme.components.ScrollArea` takes. */
866
+ type ScrollAreaThemeConfig = ComponentConfig<ScrollAreaOwnerState, ScrollAreaSlot>;
867
+ /** The resolved props Select's styled elements receive - what `ownerState` exposes. */
868
+ type SelectOwnerState = Record<string, unknown>;
869
+ /** The slots of Select a theme can style with `styleOverrides`. */
870
+ type SelectSlot = 'root' | 'value' | 'valueArea' | 'valueGhost' | 'listbox';
871
+ /** What `theme.components.Select` takes. */
872
+ type SelectThemeConfig = ComponentConfig<SelectOwnerState, SelectSlot>;
873
+ /** The resolved props Sidebar's styled elements receive - what `ownerState` exposes. */
874
+ type SidebarOwnerState = Record<string, unknown>;
875
+ /** The slots of Sidebar a theme can style with `styleOverrides`. */
876
+ type SidebarSlot = 'root' | 'rail' | 'panel';
877
+ /** What `theme.components.Sidebar` takes. */
878
+ type SidebarThemeConfig = ComponentConfig<SidebarOwnerState, SidebarSlot>;
879
+ /** The resolved props SidebarItem's styled elements receive - what `ownerState` exposes. */
880
+ type SidebarItemOwnerState = Record<string, unknown>;
881
+ /** The slots of SidebarItem a theme can style with `styleOverrides`. */
882
+ type SidebarItemSlot = 'root' | 'pill';
883
+ /** What `theme.components.SidebarItem` takes. */
884
+ type SidebarItemThemeConfig = ComponentConfig<SidebarItemOwnerState, SidebarItemSlot>;
885
+ /** The resolved props Skeleton's styled elements receive - what `ownerState` exposes. */
886
+ type SkeletonOwnerState = Record<string, unknown>;
887
+ /** The slots of Skeleton a theme can style with `styleOverrides`. */
888
+ type SkeletonSlot = 'root' | 'content';
889
+ /** What `theme.components.Skeleton` takes. */
890
+ type SkeletonThemeConfig = ComponentConfig<SkeletonOwnerState, SkeletonSlot>;
891
+ /** The corner shapes of a control or a surface. */
892
+ type ShapeKey$1 = 'square' | 'rounded' | 'pill';
893
+ /** The defaults a theme may set for every `Snackbar`. */
894
+ interface SnackbarOwnerState {
895
+ anchorOrigin?: {
896
+ vertical: 'top' | 'bottom';
897
+ horizontal: 'start' | 'center' | 'end';
898
+ };
899
+ autoHideDuration?: number;
900
+ resumeHideDuration?: number;
901
+ layer?: keyof ThemeZOrder;
902
+ shape?: ShapeKey$1;
903
+ borderRadius?: keyof ThemeRadii;
904
+ bg?: keyof ThemeBackground;
905
+ textColor?: keyof ThemeText;
906
+ }
907
+ /** The slots of Snackbar a theme can style with `styleOverrides`. */
908
+ type SnackbarSlot = 'root' | 'content' | 'message' | 'action';
909
+ /** What `theme.components.Snackbar` takes. */
910
+ type SnackbarThemeConfig = ComponentConfig<SnackbarOwnerState, SnackbarSlot>;
911
+ /** The resolved props Switch's styled elements receive - what `ownerState` exposes. */
912
+ type SwitchOwnerState = Record<string, unknown>;
913
+ /** The slots of Switch a theme can style with `styleOverrides`. */
914
+ type SwitchSlot = 'root' | 'input' | 'track' | 'thumb' | 'label';
915
+ /** What `theme.components.Switch` takes. */
916
+ type SwitchThemeConfig = ComponentConfig<SwitchOwnerState, SwitchSlot>;
917
+ /** The defaults a theme may set for every `Tab`. */
918
+ interface TabOwnerState {
919
+ isWrapped?: boolean;
920
+ bg?: keyof ThemeBackground;
921
+ borderRadius?: keyof ThemeRadii;
922
+ color?: ThemeColor;
923
+ textColor?: keyof ThemeText;
924
+ size?: ThemeSize;
925
+ selectedBg?: keyof ThemeBackground;
926
+ }
927
+ /** The slots of Tab a theme can style with `styleOverrides`. */
928
+ type TabSlot = 'root' | 'label' | 'icon' | 'secondaryAction' | 'close';
929
+ /** What `theme.components.Tab` takes. */
930
+ type TabThemeConfig = ComponentConfig<TabOwnerState, TabSlot>;
931
+ /** The defaults a theme may set for every `TabPanel`. */
932
+ interface TabPanelOwnerState {
933
+ shouldKeepMounted?: boolean;
934
+ }
935
+ /** The slots of TabPanel a theme can style with `styleOverrides`. */
936
+ type TabPanelSlot = 'root';
937
+ /** What `theme.components.TabPanel` takes. */
938
+ type TabPanelThemeConfig = ComponentConfig<TabPanelOwnerState, TabPanelSlot>;
939
+ /** The defaults a theme may set for every `TabScrollButton`. */
940
+ interface TabScrollButtonOwnerState {
941
+ color?: ThemeColor;
942
+ textColor?: keyof ThemeText;
943
+ }
944
+ /** The slots of TabScrollButton a theme can style with `styleOverrides`. */
945
+ type TabScrollButtonSlot = 'root';
946
+ /** What `theme.components.TabScrollButton` takes. */
947
+ type TabScrollButtonThemeConfig = ComponentConfig<TabScrollButtonOwnerState, TabScrollButtonSlot>;
948
+ /** The resolved props Table's styled elements receive - what `ownerState` exposes. */
949
+ type TableOwnerState = Record<string, unknown>;
950
+ /** The slots of Table a theme can style with `styleOverrides`. */
951
+ type TableSlot = 'root';
952
+ /** What `theme.components.Table` takes. */
953
+ type TableThemeConfig = ComponentConfig<TableOwnerState, TableSlot>;
954
+ /** The resolved props TableBody's styled elements receive - what `ownerState` exposes. */
955
+ type TableBodyOwnerState = Record<string, unknown>;
956
+ /** The slots of TableBody a theme can style with `styleOverrides`. */
957
+ type TableBodySlot = 'root';
958
+ /** What `theme.components.TableBody` takes. */
959
+ type TableBodyThemeConfig = ComponentConfig<TableBodyOwnerState, TableBodySlot>;
960
+ /** The resolved props TableCell's styled elements receive - what `ownerState` exposes. */
961
+ type TableCellOwnerState = Record<string, unknown>;
962
+ /** The slots of TableCell a theme can style with `styleOverrides`. */
963
+ type TableCellSlot = 'root';
964
+ /** What `theme.components.TableCell` takes. */
965
+ type TableCellThemeConfig = ComponentConfig<TableCellOwnerState, TableCellSlot>;
966
+ /** The resolved props TableContainer's styled elements receive - what `ownerState` exposes. */
967
+ type TableContainerOwnerState = Record<string, unknown>;
968
+ /** The slots of TableContainer a theme can style with `styleOverrides`. */
969
+ type TableContainerSlot = 'root';
970
+ /** What `theme.components.TableContainer` takes. */
971
+ type TableContainerThemeConfig = ComponentConfig<TableContainerOwnerState, TableContainerSlot>;
972
+ /** The resolved props TableFooter's styled elements receive - what `ownerState` exposes. */
973
+ type TableFooterOwnerState = Record<string, unknown>;
974
+ /** The slots of TableFooter a theme can style with `styleOverrides`. */
975
+ type TableFooterSlot = 'root';
976
+ /** What `theme.components.TableFooter` takes. */
977
+ type TableFooterThemeConfig = ComponentConfig<TableFooterOwnerState, TableFooterSlot>;
978
+ /** The resolved props TableHead's styled elements receive - what `ownerState` exposes. */
979
+ type TableHeadOwnerState = Record<string, unknown>;
980
+ /** The slots of TableHead a theme can style with `styleOverrides`. */
981
+ type TableHeadSlot = 'root';
982
+ /** What `theme.components.TableHead` takes. */
983
+ type TableHeadThemeConfig = ComponentConfig<TableHeadOwnerState, TableHeadSlot>;
984
+ /** The resolved props TablePagination's styled elements receive - what `ownerState` exposes. */
985
+ type TablePaginationOwnerState = Record<string, unknown>;
986
+ /** The slots of TablePagination a theme can style with `styleOverrides`. */
987
+ type TablePaginationSlot = 'root';
988
+ /** What `theme.components.TablePagination` takes. */
989
+ type TablePaginationThemeConfig = ComponentConfig<TablePaginationOwnerState, TablePaginationSlot>;
990
+ /** The resolved props TablePaginationActions's styled elements receive - what `ownerState` exposes. */
991
+ type TablePaginationActionsOwnerState = Record<string, unknown>;
992
+ /** The slots of TablePaginationActions a theme can style with `styleOverrides`. */
993
+ type TablePaginationActionsSlot = 'root';
994
+ /** What `theme.components.TablePaginationActions` takes. */
995
+ type TablePaginationActionsThemeConfig = ComponentConfig<TablePaginationActionsOwnerState, TablePaginationActionsSlot>;
996
+ /** The resolved props TableRow's styled elements receive - what `ownerState` exposes. */
997
+ type TableRowOwnerState = Record<string, unknown>;
998
+ /** The slots of TableRow a theme can style with `styleOverrides`. */
999
+ type TableRowSlot = 'root';
1000
+ /** What `theme.components.TableRow` takes. */
1001
+ type TableRowThemeConfig = ComponentConfig<TableRowOwnerState, TableRowSlot>;
1002
+ /** The resolved props TableSortLabel's styled elements receive - what `ownerState` exposes. */
1003
+ type TableSortLabelOwnerState = Record<string, unknown>;
1004
+ /** The slots of TableSortLabel a theme can style with `styleOverrides`. */
1005
+ type TableSortLabelSlot = 'root' | 'icon';
1006
+ /** What `theme.components.TableSortLabel` takes. */
1007
+ type TableSortLabelThemeConfig = ComponentConfig<TableSortLabelOwnerState, TableSortLabelSlot>;
1008
+ /** The resolved props Tabs' styled elements receive - what `ownerState` exposes. */
1009
+ interface TabsOwnerState {
1010
+ variant?: TabsVariant;
1011
+ color?: ThemeColor;
1012
+ size?: ThemeSize;
1013
+ orientation?: 'horizontal' | 'vertical';
1014
+ fullWidth?: boolean;
1015
+ hasDivider?: boolean;
1016
+ selectedBg?: keyof ThemeBackground;
1017
+ }
1018
+ /** Tabs' look values - augment to register new ones (then style them via `variants`). */
1019
+ interface TabsVariants {
1020
+ underline: true;
1021
+ boxed: true;
1022
+ enclosed: true;
1023
+ tonal: true;
1024
+ }
1025
+ /** Tabs' looks: the built-in ones, those added through `TabsVariants`, and those a registered theme defines. */
1026
+ type TabsVariant = keyof TabsVariants | VariantOf<'Tabs'>;
1027
+ /** The slots of Tabs a theme can style with `styleOverrides`. */
1028
+ type TabsSlot = 'root' | 'list' | 'indicator' | 'startContent' | 'endContent' | 'scrollButton' | 'overflowButton' | 'overflowClose';
1029
+ /** What `theme.components.Tabs` takes. */
1030
+ type TabsThemeConfig = ComponentConfig<TabsOwnerState, TabsSlot>;
1031
+ type TextInputColor = keyof Theme['palette'];
1032
+ type TextInputTextColor = keyof Theme['text'];
1033
+ type TextInputVariant = 'default' | 'outlined' | 'text' | 'underline';
1034
+ type TextInputSize = keyof Theme['sizes'];
1035
+ interface TextInputClasses {
1036
+ root?: string;
1037
+ input?: string;
1038
+ }
1039
+ interface TextInputProps extends SpaceProps, Pick<LayoutProps, 'width' | 'minWidth' | 'maxWidth'> {
1040
+ /** Corner radius - applies only to `default` and `outlined` variants. Resolves against `theme.radii`. */
1041
+ borderRadius?: keyof Theme['radii'];
1042
+ autoComplete?: string;
1043
+ autoFocus?: boolean;
1044
+ /** Class names applied to inner elements. `root` targets the wrapper; `input` targets the native element. */
1045
+ classes?: TextInputClasses;
1046
+ /** Override components for the Root and Input slots. */
1047
+ components?: {
1048
+ Input?: ElementType;
1049
+ Root?: ElementType;
1050
+ };
1051
+ /** Focus/active border color - resolves to `theme.palette[color].main`. Default: 'primary', overridable via `theme.defaults.color`. */
1052
+ color?: TextInputColor;
1053
+ /** Text color of the typed value - resolves against `theme.text`. Default: the accent `color`'s `main`. */
1054
+ textColor?: TextInputTextColor;
1055
+ /** Disables the input. */
1056
+ disabled?: boolean;
1057
+ /** Marks the field as invalid - applies error border color. */
1058
+ error?: boolean;
1059
+ /** Stretches the root to fill its container. */
1060
+ fullWidth?: boolean;
1061
+ id?: string;
1062
+ /** Custom component for the input element. Takes priority over `components.Input`. Default: `'input'`. */
1063
+ inputComponent?: ElementType;
1064
+ /** Native HTML `size` attribute - visible width in character widths. Has no effect with `multiline` or `resize`. */
1065
+ inputSize?: number;
1066
+ /** Extra props spread onto the native element. Explicit top-level props take priority. */
1067
+ inputProps?: Omit<InputHTMLAttributes<HTMLInputElement>, 'style'> & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'style'>;
1068
+ /** Maximum rows before the auto-grow textarea starts scrolling. Only applies when `resize` is set. */
1069
+ maxRows?: number | string;
1070
+ /** Minimum rows for the auto-grow textarea. Only applies when `resize` is set. */
1071
+ minRows?: number | string;
1072
+ /**
1073
+ * Renders a `<textarea>` that grows with its content.
1074
+ * Combine with `rows` to fix the height instead of auto-growing.
1075
+ */
1076
+ multiline?: boolean;
1077
+ name?: string;
1078
+ onChange?: ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
1079
+ placeholder?: string;
1080
+ readOnly?: boolean;
1081
+ required?: boolean;
1082
+ /** Auto-grows the textarea as content increases. Requires `multiline`. */
1083
+ resize?: boolean;
1084
+ /** Controls padding and font size. Default: 'md', overridable via `theme.defaults.size`. */
1085
+ size?: TextInputSize;
1086
+ /**
1087
+ * Fixes the textarea height to this many rows. Also enables `multiline`
1088
+ * when value is greater than 1. Disables resize.
1089
+ */
1090
+ rows?: number | string;
1091
+ /** HTML input type. Ignored when multiline. Default: `'text'`. */
1092
+ type?: string;
1093
+ /**
1094
+ * Visual style of the input.
1095
+ * - `outlined` / `default` - full border box (default)
1096
+ * - `underline` - border on bottom only
1097
+ * - `text` - no border, transparent background
1098
+ */
1099
+ variant?: TextInputVariant;
1100
+ value?: string | number | readonly string[];
1101
+ className?: string;
1102
+ /** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
1103
+ style?: StyleOverride;
1104
+ /** Overrides for the slots a theme can style: `style`, `className`, `data-*` and `aria-*`. */
1105
+ slotProps?: SlotProps<TextInputSlot>;
1106
+ 'data-testid'?: string;
1107
+ }
1108
+ /** The resolved props TextInput's styled elements receive - what `ownerState` exposes. */
1109
+ type TextInputOwnerState = Record<string, unknown>;
1110
+ /** The slots of TextInput a theme can style with `styleOverrides`. */
1111
+ type TextInputSlot = 'root' | 'input';
1112
+ /** What `theme.components.TextInput` takes. */
1113
+ type TextInputThemeConfig = ComponentConfig<TextInputOwnerState, TextInputSlot>;
1114
+ /** The resolved props ToggleButton's styled elements receive - what `ownerState` exposes. */
1115
+ type ToggleButtonOwnerState = Record<string, unknown>;
1116
+ /** The slots of ToggleButton a theme can style with `styleOverrides`. */
1117
+ type ToggleButtonSlot = 'root';
1118
+ /** What `theme.components.ToggleButton` takes. */
1119
+ type ToggleButtonThemeConfig = ComponentConfig<ToggleButtonOwnerState, ToggleButtonSlot>;
1120
+ /** The resolved props ToggleButtonGroup's styled elements receive - what `ownerState` exposes. */
1121
+ type ToggleButtonGroupOwnerState = Record<string, unknown>;
1122
+ /** The slots of ToggleButtonGroup a theme can style with `styleOverrides`. */
1123
+ type ToggleButtonGroupSlot = 'root';
1124
+ /** What `theme.components.ToggleButtonGroup` takes. */
1125
+ type ToggleButtonGroupThemeConfig = ComponentConfig<ToggleButtonGroupOwnerState, ToggleButtonGroupSlot>;
1126
+ /** The defaults a theme may set for every `Tooltip`. */
1127
+ interface TooltipOwnerState {
1128
+ borderRadius?: keyof ThemeRadii;
1129
+ bg?: keyof ThemeBackground;
1130
+ textColor?: keyof ThemeText;
1131
+ 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';
1132
+ hasArrow?: boolean;
1133
+ enterDelay?: number;
1134
+ leaveDelay?: number;
1135
+ enterTouchDelay?: number;
1136
+ leaveTouchDelay?: number;
1137
+ shouldDescribeChild?: boolean;
1138
+ isDescriptionPersistent?: boolean;
1139
+ isInteractive?: boolean;
1140
+ shouldWrapDisabledChild?: boolean;
1141
+ /**
1142
+ * Theme only. With a value above 0, every tooltip under the theme shares one delay window, as in a
1143
+ * `TooltipGroup` of that duration: no enter delay while another is open or within this many
1144
+ * milliseconds of the last close. A `TooltipGroup` around a tooltip wins.
1145
+ */
1146
+ skipDelayDuration?: number;
1147
+ shouldOpenOnHover?: boolean;
1148
+ shouldOpenOnFocus?: boolean;
1149
+ shouldOpenOnTouch?: boolean;
1150
+ layer?: keyof ThemeZOrder;
1151
+ }
1152
+ /** The slots of Tooltip a theme can style with `styleOverrides`. */
1153
+ type TooltipSlot = 'root' | 'arrow';
1154
+ /** What `theme.components.Tooltip` takes. */
1155
+ type TooltipThemeConfig = ComponentConfig<TooltipOwnerState, TooltipSlot>;
1156
+ /** The defaults a theme may set for every `TransferList` - its button labels give it a language. */
1157
+ interface TransferListOwnerState {
1158
+ size?: ThemeSize;
1159
+ color?: ThemeColor;
1160
+ shouldShowMoveAll?: boolean;
1161
+ hasSelectAll?: boolean;
1162
+ moveAllRightLabel?: string;
1163
+ moveRightLabel?: string;
1164
+ moveLeftLabel?: string;
1165
+ moveAllLeftLabel?: string;
1166
+ }
1167
+ /** The slots of TransferList a theme can style with `styleOverrides`. */
1168
+ type TransferListSlot = 'root' | 'list' | 'header' | 'title' | 'count' | 'items' | 'item' | 'controls' | 'icon';
1169
+ /** What `theme.components.TransferList` takes. */
1170
+ type TransferListThemeConfig = ComponentConfig<TransferListOwnerState, TransferListSlot>;
1171
+ type TypographyAlign = 'left' | 'right' | 'center' | 'justify' | 'inherit';
1172
+ /** Valid values for the color prop - derived from theme.text keys. */
1173
+ type TextColorToken = keyof Theme['text'];
1174
+ /** Valid values for the bg prop - derived from theme.background keys. */
1175
+ type BackgroundToken = keyof Theme['background'];
1176
+ interface TypographyProps extends Omit<HTMLAttributes<HTMLElement>, 'color' | 'style'>, SpaceProps, LayoutProps, TypographyProps$1, FlexboxProps, BorderProps, PositionProps {
1177
+ /** Resolves against theme.text - inherit · initial · primary · secondary · error · success */
1178
+ color?: TextColorToken;
1179
+ /** Resolves against theme.background */
1180
+ bg?: BackgroundToken;
1181
+ /** Overrides the CSS of the element: an entry of `StyleSheet.create`, or a list of them. */
1182
+ style?: StyleOverride;
1183
+ /** Overrides for the slots a theme can style: `style`, `className`, `data-*` and `aria-*`. */
1184
+ slotProps?: SlotProps<TypographySlot>;
1185
+ opacity?: number;
1186
+ textTransform?: CSSProperties['textTransform'];
1187
+ variant?: TypographyVariant;
1188
+ align?: TypographyAlign;
1189
+ gutterBottom?: boolean;
1190
+ noWrap?: boolean;
1191
+ /** Machine-readable timestamp - forwarded when rendering as `<time>` (`as="time"`). */
1192
+ dateTime?: string;
1193
+ as?: ElementType;
1194
+ }
1195
+ /** The resolved props Typography's styled elements receive - what `ownerState` exposes. */
1196
+ type TypographyOwnerState = Record<string, unknown>;
1197
+ /** The slots of Typography a theme can style with `styleOverrides`. */
1198
+ type TypographySlot = 'root';
1199
+ /** What `theme.components.Typography` takes. */
1200
+ type TypographyThemeConfig = ComponentConfig<TypographyOwnerState, TypographySlot>;
1201
+ /**
1202
+ * Per-component theme customization, keyed by component name: each key takes the component's
1203
+ * `<Name>ThemeConfig` - its owner state, its slots, its default props and variants. An app checks
1204
+ * its looks against it with `satisfies ThemeComponents`.
1205
+ */
1206
+ interface ThemeComponents {
1207
+ Accordion?: AccordionThemeConfig;
1208
+ AccordionActions?: AccordionActionsThemeConfig;
1209
+ AccordionDetails?: AccordionDetailsThemeConfig;
1210
+ AccordionGroup?: AccordionGroupThemeConfig;
1211
+ AccordionSummary?: AccordionSummaryThemeConfig;
1212
+ Alert?: AlertThemeConfig;
1213
+ AlertTitle?: AlertTitleThemeConfig;
1214
+ AppBar?: AppBarThemeConfig;
1215
+ Autocomplete?: AutocompleteThemeConfig;
1216
+ Avatar?: AvatarThemeConfig;
1217
+ Backdrop?: BackdropThemeConfig;
1218
+ Badge?: BadgeThemeConfig;
1219
+ Breadcrumbs?: BreadcrumbsThemeConfig;
1220
+ Button?: ButtonThemeConfig;
1221
+ ButtonGroup?: ButtonGroupThemeConfig;
1222
+ Card?: CardThemeConfig;
1223
+ Checkbox?: CheckboxThemeConfig;
1224
+ Chip?: ChipThemeConfig;
1225
+ CircularProgress?: CircularProgressThemeConfig;
1226
+ Collapse?: CollapseThemeConfig;
1227
+ ContextMenu?: ContextMenuThemeConfig;
1228
+ Drawer?: DrawerThemeConfig;
1229
+ Fab?: FabThemeConfig;
1230
+ FabMenu?: FabMenuThemeConfig;
1231
+ Flex?: FlexThemeConfig;
1232
+ FocusTrap?: FocusTrapThemeConfig;
1233
+ Form?: FormThemeConfig;
1234
+ FormControl?: FormControlThemeConfig;
1235
+ FormHelperText?: FormHelperTextThemeConfig;
1236
+ FormLabel?: FormLabelThemeConfig;
1237
+ Grid?: GridThemeConfig;
1238
+ Icon?: IconThemeConfig;
1239
+ Image?: ImageThemeConfig;
1240
+ LinearProgress?: LinearProgressThemeConfig;
1241
+ Link?: LinkThemeConfig;
1242
+ Menu?: MenuThemeConfig;
1243
+ MenuDivider?: MenuDividerThemeConfig;
1244
+ MenuItem?: MenuItemThemeConfig;
1245
+ MenuList?: MenuListThemeConfig;
1246
+ Modal?: ModalThemeConfig;
1247
+ NativeSelect?: NativeSelectThemeConfig;
1248
+ NavGroup?: NavGroupThemeConfig;
1249
+ NavLink?: NavLinkThemeConfig;
1250
+ NavTree?: NavTreeThemeConfig;
1251
+ NumberInput?: NumberInputThemeConfig;
1252
+ Pagination?: PaginationThemeConfig;
1253
+ PaginationItem?: PaginationItemThemeConfig;
1254
+ Paper?: PaperThemeConfig;
1255
+ Popover?: PopoverThemeConfig;
1256
+ Pressable?: PressableThemeConfig;
1257
+ Quote?: QuoteThemeConfig;
1258
+ Radio?: RadioThemeConfig;
1259
+ RangeInput?: RangeInputThemeConfig;
1260
+ Rating?: RatingThemeConfig;
1261
+ ScrollArea?: ScrollAreaThemeConfig;
1262
+ Select?: SelectThemeConfig;
1263
+ Sidebar?: SidebarThemeConfig;
1264
+ SidebarItem?: SidebarItemThemeConfig;
1265
+ Skeleton?: SkeletonThemeConfig;
1266
+ Snackbar?: SnackbarThemeConfig;
1267
+ Switch?: SwitchThemeConfig;
1268
+ Tab?: TabThemeConfig;
1269
+ TabPanel?: TabPanelThemeConfig;
1270
+ TabScrollButton?: TabScrollButtonThemeConfig;
1271
+ Table?: TableThemeConfig;
1272
+ TableBody?: TableBodyThemeConfig;
1273
+ TableCell?: TableCellThemeConfig;
1274
+ TableContainer?: TableContainerThemeConfig;
1275
+ TableFooter?: TableFooterThemeConfig;
1276
+ TableHead?: TableHeadThemeConfig;
1277
+ TablePagination?: TablePaginationThemeConfig;
1278
+ TablePaginationActions?: TablePaginationActionsThemeConfig;
1279
+ TableRow?: TableRowThemeConfig;
1280
+ TableSortLabel?: TableSortLabelThemeConfig;
1281
+ Tabs?: TabsThemeConfig;
1282
+ TextInput?: TextInputThemeConfig;
1283
+ ToggleButton?: ToggleButtonThemeConfig;
1284
+ ToggleButtonGroup?: ToggleButtonGroupThemeConfig;
1285
+ Tooltip?: TooltipThemeConfig;
1286
+ TransferList?: TransferListThemeConfig;
1287
+ Typography?: TypographyThemeConfig;
1288
+ View?: ViewThemeConfig;
1289
+ }
1290
+ /** Design-system's own style-object shape - the engine stays an internal implementation detail. */
1291
+ type CSSObject = CSSObject$1;
1292
+ /**
1293
+ * A style contributed from `theme.components` - a plain CSS object, or a
1294
+ * callback receiving the theme and the styled root's resolved props
1295
+ * (`ownerState`) for conditional styling.
1296
+ */
1297
+ type ComponentStyle<OwnerState> = CSSObject | ((args: {
1298
+ theme: Theme;
1299
+ ownerState: OwnerState;
1300
+ }) => CSSObject);
1301
+ /**
1302
+ * The owner-state fields whose types the registered themes widen: the colors, sizes, spacing keys
1303
+ * and looks they add.
1304
+ */
1305
+ type DerivedFields = 'color' | 'size' | 'variant' | 'mb' | 'marginThreshold';
1306
+ type OpenValue = '' | (string & {}) | number | boolean | null | object;
1307
+ /**
1308
+ * The owner state as the theme's own `components` are checked against it. Once themes are
1309
+ * registered, the derived fields are left open: a type that reads the registered themes cannot be
1310
+ * checked while those themes are being written (it would read itself). A misspelt value is checked
1311
+ * where it is used (a component's props), and in development by the validator `ThemeProvider` runs.
1312
+ * Every other field keeps its type.
1313
+ */
1314
+ type OwnerKeys<OwnerState> = keyof Register$1 extends never ? Partial<OwnerState> : { [K in keyof OwnerState]?: K extends DerivedFields ? OpenValue : OwnerState[K]; };
1315
+ /** One theme-contributed variant: applied when every key in `props` matches the render props. */
1316
+ interface ComponentVariant<OwnerState> {
1317
+ props: OwnerKeys<OwnerState>;
1318
+ style: ComponentStyle<OwnerState>;
1319
+ }
1320
+ /** Per-component customization: default prop values, per-slot CSS, extra variants. */
1321
+ interface ComponentConfig<OwnerState = Record<string, unknown>, Slot extends string = 'root'> {
1322
+ /** Default prop values - explicit props and group context always win. */
1323
+ defaultProps?: OwnerKeys<OwnerState>;
1324
+ /** Per-slot CSS merged after the component's own styles (theme wins). */
1325
+ styleOverrides?: Partial<Record<Slot, ComponentStyle<OwnerState>>>;
1326
+ /** Extra variants matched by props. */
1327
+ variants?: ReadonlyArray<ComponentVariant<OwnerState>>;
1328
+ /** Type only, never set: names the owner state, for `useDefaultProps` to type what it hands back. */
1329
+ readonly $owner?: OwnerState;
1330
+ }
1331
+ /** The core's theme, with the typing of `theme.components` that the libraries and the app add. */
1332
+ interface Theme extends Theme$1 {
1333
+ /** Optional per-component customization - see `ThemeComponents`. */
1334
+ components?: OpenScale<ThemeComponents>;
1335
+ }
1336
+ /** 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. */
1337
+ type GildTheme = Theme;
1338
+ /** The theme the app registered (see `Register` in the core), or this package's `Theme` when it registered none. */
1339
+ type AppTheme = RegisteredTheme<Theme>;
1340
+ /** The corner shapes of a control or a surface. */
1341
+ type ShapeKey = 'square' | 'rounded' | 'pill';
1342
+ /** The resolved props Button's styled roots receive - what `ownerState` exposes. */
1343
+ interface ButtonOwnerState {
1344
+ variant?: ButtonVariant;
1345
+ color?: ThemeColor;
1346
+ size?: ThemeSize;
1347
+ shape?: ShapeKey;
1348
+ fullWidth?: boolean;
1349
+ disabled?: boolean;
1350
+ }
1351
+ /** Button's looks: the built-in ones, those added through `ButtonVariants`, and those a registered theme defines. */
1352
+ type ButtonVariant = keyof ButtonVariants | VariantOf<'Button'>;
1353
+ /** The slots of Button a theme can style with `styleOverrides`. */
1354
+ type ButtonSlot = 'root' | 'label' | 'icon' | 'loader';
1355
+ /** What `theme.components.Button` takes. */
1356
+ type ButtonThemeConfig = ComponentConfig<ButtonOwnerState, ButtonSlot>;
1357
+ /** Augmentable via the `ButtonVariants` interface, or defined by a registered theme - style new values through `theme.components.Button.variants`. */
1358
+ type ButtonColor = ThemeColor;
1359
+ type ButtonSize = keyof AppTheme['sizes'];
1360
+ type ButtonShape = 'square' | 'rounded' | 'pill';
1361
+ type ButtonLoadingPosition = 'start' | 'end' | 'center';
1362
+ /** Valid values for the gap prop - resolves against theme.space. Default: `1` (8px). */
1363
+ type GapToken = keyof AppTheme['space'];
1364
+ interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'style'>, SpaceProps, LayoutProps, BorderProps, TypographyProps$1 {
1365
+ /** Visual style - filled, stroked, or ghost. Default: `'contained'`, overridable via `theme.defaults.buttonVariant`. */
1366
+ variant?: ButtonVariant;
1367
+ /** Color palette - maps to `theme.palette[color]`. Default: `'primary'`, overridable via `theme.defaults.color`. */
1368
+ color?: ButtonColor;
1369
+ /** Size token - controls padding and font size. Default: `'md'`, overridable via `theme.defaults.size`. */
1370
+ size?: ButtonSize;
1371
+ /** Gap between icon and label - resolves against theme.space. Default: `1` (8px). */
1372
+ gap?: GapToken;
1373
+ /** Icon rendered before the label. */
1374
+ startIcon?: ReactNode;
1375
+ /** Icon rendered after the label. */
1376
+ endIcon?: ReactNode;
1377
+ /** Stretch button to full container width. */
1378
+ fullWidth?: boolean;
1379
+ /** Shows loading indicator and disables the button. */
1380
+ loading?: boolean;
1381
+ /** Custom loading element. Default: animated spinner. */
1382
+ loadingIndicator?: ReactNode;
1383
+ /**
1384
+ * Corner shape - sets the default `borderRadius`.
1385
+ * `"square"` → 0 · `"rounded"` → `theme.radii.md` (default) · `"pill"` → 9999px
1386
+ * The `borderRadius` prop always overrides this.
1387
+ */
1388
+ shape?: ButtonShape;
1389
+ /** Where the loading indicator appears. Default: `"center"`. */
1390
+ loadingPosition?: ButtonLoadingPosition;
1391
+ /** The URL to link to when the button is clicked. If defined, an `a` element will be used as the root node. */
1392
+ href?: string;
1393
+ /** Anchor `target` - only meaningful when `href` is set. */
1394
+ target?: string;
1395
+ /** Anchor `rel` - only meaningful when `href` is set. */
1396
+ rel?: string;
1397
+ /** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
1398
+ style?: StyleOverride;
1399
+ /** Overrides for the slots a theme can style: `style`, `className`, `data-*` and `aria-*`. */
1400
+ slotProps?: SlotProps<ButtonSlot>;
1401
+ }
1402
+ export { ViewSlot as $, TextInputTextColor as A, FlexOwnerState as B, TypographyVariant as C, TextInputProps as D, TextInputOwnerState as E, ModalProps as F, View as G, FlexSlot as H, ModalScroll as I, ViewBorderRadiusToken as J, ViewBackgroundToken as K, ModalSlot as L, TextInputVariant as M, ModalCloseReason as N, TextInputSize as O, ModalOwnerState as P, ViewProps as Q, ModalThemeConfig as R, TypographyThemeConfig as S, TextInputColor as T, FlexThemeConfig as U, FlexProps as V, GapToken$1 as W, ViewColorToken as X, ViewBorderWidthToken as Y, ViewOwnerState as Z, TextColorToken as _, ButtonShape as a, TypographyProps as b, ButtonThemeConfig as c, AppTheme as d, ViewThemeConfig as et, ComponentConfig as f, BackgroundToken as g, ThemeComponents as h, ButtonProps as i, StyleOverride as it, TextInputThemeConfig as j, TextInputSlot as k, ButtonVariant as l, Theme as m, ButtonLoadingPosition as n, SlotOverride as nt, ButtonSize as o, GildTheme as p, ViewBorderColorToken as q, ButtonOwnerState as r, SlotProps as rt, ButtonSlot as s, ButtonColor as t, configure as tt, GapToken as u, TypographyAlign as v, TextInputClasses as w, TypographySlot as x, TypographyOwnerState as y, Flex as z };