styled-components 6.3.12 → 6.4.0-prerelease.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.
- package/README.md +35 -104
- package/dist/constructors/constructWithOptions.d.ts +6 -6
- package/dist/constructors/css.d.ts +1 -1
- package/dist/constructors/styled.d.ts +1 -1
- package/dist/models/ServerStyleSheet.d.ts +3 -1
- package/dist/models/StyleSheetManager.d.ts +6 -0
- package/dist/native/index.d.ts +1 -1
- package/dist/sheet/Sheet.d.ts +1 -0
- package/dist/sheet/Tag.d.ts +3 -3
- package/dist/sheet/dom.d.ts +1 -1
- package/dist/sheet/types.d.ts +1 -0
- package/dist/styled-components.browser.cjs.js +1 -1
- package/dist/styled-components.browser.cjs.js.map +1 -1
- package/dist/styled-components.browser.esm.js +1 -1
- package/dist/styled-components.browser.esm.js.map +1 -1
- package/dist/styled-components.cjs.js +1 -1
- package/dist/styled-components.cjs.js.map +1 -1
- package/dist/styled-components.esm.js +1 -1
- package/dist/styled-components.esm.js.map +1 -1
- package/dist/styled-components.js +48 -20
- package/dist/styled-components.js.map +1 -1
- package/dist/styled-components.min.js +1 -1
- package/dist/styled-components.min.js.map +1 -1
- package/dist/types.d.ts +15 -3
- package/dist/utils/nonce.d.ts +3 -1
- package/native/dist/bench/run.d.ts +5 -0
- package/native/dist/constructors/constructWithOptions.d.ts +6 -6
- package/native/dist/constructors/css.d.ts +1 -1
- package/native/dist/constructors/styled.d.ts +1 -1
- package/native/dist/dist/bench/run.d.ts +5 -0
- package/native/dist/dist/constructors/constructWithOptions.d.ts +6 -6
- package/native/dist/dist/constructors/css.d.ts +1 -1
- package/native/dist/dist/constructors/styled.d.ts +1 -1
- package/native/dist/dist/models/ServerStyleSheet.d.ts +3 -1
- package/native/dist/dist/models/StyleSheetManager.d.ts +6 -0
- package/native/dist/dist/native/index.d.ts +1 -1
- package/native/dist/dist/sheet/Sheet.d.ts +1 -0
- package/native/dist/dist/sheet/Tag.d.ts +3 -3
- package/native/dist/dist/sheet/dom.d.ts +1 -1
- package/native/dist/dist/sheet/types.d.ts +1 -0
- package/native/dist/dist/test/globals.d.ts +2 -0
- package/native/dist/dist/test/utils.d.ts +163 -0
- package/native/dist/dist/test/veryLargeUnionType.d.ts +1 -0
- package/native/dist/dist/types.d.ts +15 -3
- package/native/dist/dist/utils/nonce.d.ts +3 -1
- package/native/dist/dist/utils/rawElement.d.ts +11 -0
- package/native/dist/models/ServerStyleSheet.d.ts +3 -1
- package/native/dist/models/StyleSheetManager.d.ts +6 -0
- package/native/dist/native/index.d.ts +1 -1
- package/native/dist/sheet/Sheet.d.ts +1 -0
- package/native/dist/sheet/Tag.d.ts +3 -3
- package/native/dist/sheet/dom.d.ts +1 -1
- package/native/dist/sheet/types.d.ts +1 -0
- package/native/dist/styled-components.native.cjs.js.map +1 -1
- package/native/dist/styled-components.native.esm.js.map +1 -1
- package/native/dist/test/globals.d.ts +2 -0
- package/native/dist/test/utils.d.ts +163 -0
- package/native/dist/test/veryLargeUnionType.d.ts +1 -0
- package/native/dist/types.d.ts +15 -3
- package/native/dist/utils/nonce.d.ts +3 -1
- package/native/dist/utils/rawElement.d.ts +11 -0
- package/package.json +23 -17
package/dist/types.d.ts
CHANGED
|
@@ -132,8 +132,11 @@ export type PolymorphicComponentProps<R extends Runtime, BaseProps extends BaseO
|
|
|
132
132
|
* props from the given rendering target to get proper typing for
|
|
133
133
|
* any specialized props in the target component.
|
|
134
134
|
*/
|
|
135
|
-
export interface PolymorphicComponent<R extends Runtime, BaseProps extends BaseObject> extends React.ForwardRefExoticComponent<BaseProps
|
|
136
|
-
|
|
135
|
+
export interface PolymorphicComponent<R extends Runtime, BaseProps extends BaseObject> extends React.ForwardRefExoticComponent<BaseProps & {
|
|
136
|
+
as?: StyledTarget<R> | undefined;
|
|
137
|
+
forwardedAs?: StyledTarget<R> | undefined;
|
|
138
|
+
}> {
|
|
139
|
+
<AsTarget extends StyledTarget<R> | void = void, ForwardedAsTarget extends StyledTarget<R> | void = void>(props: PolymorphicComponentProps<R, BaseProps, AsTarget, ForwardedAsTarget> & React.RefAttributes<any>): React.JSX.Element;
|
|
137
140
|
}
|
|
138
141
|
export interface IStyledComponentBase<R extends Runtime, Props extends BaseObject = BaseObject> extends PolymorphicComponent<R, Props>, IStyledStatics<R, Props>, StyledComponentBrand {
|
|
139
142
|
defaultProps?: (ExecutionProps & Partial<Props>) | undefined;
|
|
@@ -210,6 +213,15 @@ export interface StyledObject<Props extends BaseObject = BaseObject> extends CSS
|
|
|
210
213
|
* {@link DefaultTheme}.
|
|
211
214
|
*/
|
|
212
215
|
export type CSSProp = Interpolation<any>;
|
|
216
|
+
/**
|
|
217
|
+
* @deprecated Use the built-in NoInfer from TypeScript 5.4+ directly.
|
|
218
|
+
* Kept for backward compatibility.
|
|
219
|
+
*/
|
|
213
220
|
export type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
214
|
-
export type Substitute<A extends BaseObject, B extends BaseObject> = FastOmit<A, keyof B> & B;
|
|
221
|
+
export type Substitute<A extends BaseObject, B extends BaseObject> = keyof B extends never ? A : FastOmit<A, keyof B> & B;
|
|
222
|
+
/**
|
|
223
|
+
* Makes keys in K optional while keeping all others required.
|
|
224
|
+
* Used to make attrs-provided props optional on the final component.
|
|
225
|
+
*/
|
|
226
|
+
export type MakeAttrsOptional<P extends BaseObject, K extends keyof any> = keyof K extends never ? P : FastOmit<P, K & keyof P> & Partial<Pick<P, K & keyof P>>;
|
|
215
227
|
export type InsertionTarget = HTMLElement | ShadowRoot;
|
package/dist/utils/nonce.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Attrs, BaseObject, ExecutionProps, Interpolation, IStyledComponent, IStyledComponentFactory, KnownTarget,
|
|
1
|
+
import { Attrs, BaseObject, ExecutionProps, Interpolation, IStyledComponent, IStyledComponentFactory, KnownTarget, MakeAttrsOptional, Runtime, StyledOptions, StyledTarget, Styles, Substitute } from '../types';
|
|
2
2
|
type AttrsResult<T extends Attrs<any>> = T extends (...args: any) => infer P ? P extends object ? P : never : T extends object ? T : never;
|
|
3
3
|
/**
|
|
4
4
|
* Based on Attrs being a simple object or function that returns
|
|
@@ -8,10 +8,10 @@ type AttrsResult<T extends Attrs<any>> = T extends (...args: any) => infer P ? P
|
|
|
8
8
|
type AttrsTarget<R extends Runtime, T extends Attrs<any>, FallbackTarget extends StyledTarget<R>, Result extends ExecutionProps = AttrsResult<T>> = Result extends {
|
|
9
9
|
as: infer RuntimeTarget;
|
|
10
10
|
} ? RuntimeTarget extends KnownTarget ? RuntimeTarget : FallbackTarget : FallbackTarget;
|
|
11
|
-
export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject> {
|
|
12
|
-
<Props extends object = BaseObject, Statics extends object = BaseObject>(initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>, ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]): IStyledComponent<R, Substitute<OuterProps, Props>> & OuterStatics & Statics & (R extends 'web' ? Target extends string ? {} : Omit<Target, keyof React.Component<any>> : {});
|
|
13
|
-
attrs: <Props extends object = BaseObject, PrivateMergedProps extends object = Substitute<OuterProps, Props>, PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>, PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>>(attrs: PrivateAttrsArg) => Styled<R, PrivateResolvedTarget, PrivateResolvedTarget extends KnownTarget ? Substitute<Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>, Props> : PrivateMergedProps, OuterStatics
|
|
14
|
-
withConfig: (config: StyledOptions<R, OuterProps>) => Styled<R, Target, OuterProps, OuterStatics>;
|
|
11
|
+
export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject, AttrsKeys extends keyof any = never> {
|
|
12
|
+
<Props extends object = BaseObject, Statics extends object = BaseObject>(initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>, ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]): IStyledComponent<R, MakeAttrsOptional<Substitute<OuterProps, Props>, AttrsKeys>> & OuterStatics & Statics & (R extends 'web' ? Target extends string ? {} : Omit<Target, keyof React.Component<any>> : {});
|
|
13
|
+
attrs: <Props extends object = BaseObject, PrivateMergedProps extends object = Substitute<OuterProps, Props>, PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>, PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>>(attrs: PrivateAttrsArg) => Styled<R, PrivateResolvedTarget, PrivateResolvedTarget extends KnownTarget ? Substitute<Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>, Props> : PrivateMergedProps, OuterStatics, AttrsKeys | keyof AttrsResult<PrivateAttrsArg>>;
|
|
14
|
+
withConfig: (config: StyledOptions<R, OuterProps>) => Styled<R, Target, OuterProps, OuterStatics, AttrsKeys>;
|
|
15
15
|
}
|
|
16
|
-
export default function constructWithOptions<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? React.ComponentPropsWithRef<Target> : BaseObject, OuterStatics extends object = BaseObject>(componentConstructor: IStyledComponentFactory<R, StyledTarget<R>, object, any>, tag: StyledTarget<R>, options?: StyledOptions<R, OuterProps>): Styled<R, Target, OuterProps, OuterStatics>;
|
|
16
|
+
export default function constructWithOptions<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? React.ComponentPropsWithRef<Target> : BaseObject, OuterStatics extends object = BaseObject, AttrsKeys extends keyof any = never>(componentConstructor: IStyledComponentFactory<R, StyledTarget<R>, object, any>, tag: StyledTarget<R>, options?: StyledOptions<R, OuterProps>): Styled<R, Target, OuterProps, OuterStatics, AttrsKeys>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Interpolation,
|
|
1
|
+
import { Interpolation, RuleSet, Styles } from '../types';
|
|
2
2
|
declare function css(styles: Styles<object>, ...interpolations: Interpolation<object>[]): RuleSet<object>;
|
|
3
3
|
declare function css<Props extends object>(styles: Styles<NoInfer<Props>>, ...interpolations: Interpolation<NoInfer<Props>>[]): RuleSet<NoInfer<Props>>;
|
|
4
4
|
export default css;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { BaseObject, KnownTarget, WebTarget } from '../types';
|
|
3
3
|
import { SupportedHTMLElements } from '../utils/domElements';
|
|
4
4
|
import { Styled as StyledInstance } from './constructWithOptions';
|
|
5
|
-
declare const baseStyled: <Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject>;
|
|
5
|
+
declare const baseStyled: <Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject, never>;
|
|
6
6
|
declare const styled: typeof baseStyled & { [E in SupportedHTMLElements]: StyledInstance<"web", E, React.JSX.IntrinsicElements[E]>; };
|
|
7
7
|
export default styled;
|
|
8
8
|
export { StyledInstance };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Attrs, BaseObject, ExecutionProps, Interpolation, IStyledComponent, IStyledComponentFactory, KnownTarget,
|
|
1
|
+
import { Attrs, BaseObject, ExecutionProps, Interpolation, IStyledComponent, IStyledComponentFactory, KnownTarget, MakeAttrsOptional, Runtime, StyledOptions, StyledTarget, Styles, Substitute } from '../types';
|
|
2
2
|
type AttrsResult<T extends Attrs<any>> = T extends (...args: any) => infer P ? P extends object ? P : never : T extends object ? T : never;
|
|
3
3
|
/**
|
|
4
4
|
* Based on Attrs being a simple object or function that returns
|
|
@@ -8,10 +8,10 @@ type AttrsResult<T extends Attrs<any>> = T extends (...args: any) => infer P ? P
|
|
|
8
8
|
type AttrsTarget<R extends Runtime, T extends Attrs<any>, FallbackTarget extends StyledTarget<R>, Result extends ExecutionProps = AttrsResult<T>> = Result extends {
|
|
9
9
|
as: infer RuntimeTarget;
|
|
10
10
|
} ? RuntimeTarget extends KnownTarget ? RuntimeTarget : FallbackTarget : FallbackTarget;
|
|
11
|
-
export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject> {
|
|
12
|
-
<Props extends object = BaseObject, Statics extends object = BaseObject>(initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>, ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]): IStyledComponent<R, Substitute<OuterProps, Props>> & OuterStatics & Statics & (R extends 'web' ? Target extends string ? {} : Omit<Target, keyof React.Component<any>> : {});
|
|
13
|
-
attrs: <Props extends object = BaseObject, PrivateMergedProps extends object = Substitute<OuterProps, Props>, PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>, PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>>(attrs: PrivateAttrsArg) => Styled<R, PrivateResolvedTarget, PrivateResolvedTarget extends KnownTarget ? Substitute<Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>, Props> : PrivateMergedProps, OuterStatics
|
|
14
|
-
withConfig: (config: StyledOptions<R, OuterProps>) => Styled<R, Target, OuterProps, OuterStatics>;
|
|
11
|
+
export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject, AttrsKeys extends keyof any = never> {
|
|
12
|
+
<Props extends object = BaseObject, Statics extends object = BaseObject>(initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>, ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]): IStyledComponent<R, MakeAttrsOptional<Substitute<OuterProps, Props>, AttrsKeys>> & OuterStatics & Statics & (R extends 'web' ? Target extends string ? {} : Omit<Target, keyof React.Component<any>> : {});
|
|
13
|
+
attrs: <Props extends object = BaseObject, PrivateMergedProps extends object = Substitute<OuterProps, Props>, PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>, PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>>(attrs: PrivateAttrsArg) => Styled<R, PrivateResolvedTarget, PrivateResolvedTarget extends KnownTarget ? Substitute<Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>, Props> : PrivateMergedProps, OuterStatics, AttrsKeys | keyof AttrsResult<PrivateAttrsArg>>;
|
|
14
|
+
withConfig: (config: StyledOptions<R, OuterProps>) => Styled<R, Target, OuterProps, OuterStatics, AttrsKeys>;
|
|
15
15
|
}
|
|
16
|
-
export default function constructWithOptions<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? React.ComponentPropsWithRef<Target> : BaseObject, OuterStatics extends object = BaseObject>(componentConstructor: IStyledComponentFactory<R, StyledTarget<R>, object, any>, tag: StyledTarget<R>, options?: StyledOptions<R, OuterProps>): Styled<R, Target, OuterProps, OuterStatics>;
|
|
16
|
+
export default function constructWithOptions<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? React.ComponentPropsWithRef<Target> : BaseObject, OuterStatics extends object = BaseObject, AttrsKeys extends keyof any = never>(componentConstructor: IStyledComponentFactory<R, StyledTarget<R>, object, any>, tag: StyledTarget<R>, options?: StyledOptions<R, OuterProps>): Styled<R, Target, OuterProps, OuterStatics, AttrsKeys>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Interpolation,
|
|
1
|
+
import { Interpolation, RuleSet, Styles } from '../types';
|
|
2
2
|
declare function css(styles: Styles<object>, ...interpolations: Interpolation<object>[]): RuleSet<object>;
|
|
3
3
|
declare function css<Props extends object>(styles: Styles<NoInfer<Props>>, ...interpolations: Interpolation<NoInfer<Props>>[]): RuleSet<NoInfer<Props>>;
|
|
4
4
|
export default css;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { BaseObject, KnownTarget, WebTarget } from '../types';
|
|
3
3
|
import { SupportedHTMLElements } from '../utils/domElements';
|
|
4
4
|
import { Styled as StyledInstance } from './constructWithOptions';
|
|
5
|
-
declare const baseStyled: <Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject>;
|
|
5
|
+
declare const baseStyled: <Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject, never>;
|
|
6
6
|
declare const styled: typeof baseStyled & { [E in SupportedHTMLElements]: StyledInstance<"web", E, React.JSX.IntrinsicElements[E]>; };
|
|
7
7
|
export default styled;
|
|
8
8
|
export { StyledInstance };
|
|
@@ -4,7 +4,9 @@ import StyleSheet from '../sheet';
|
|
|
4
4
|
export default class ServerStyleSheet {
|
|
5
5
|
instance: StyleSheet;
|
|
6
6
|
sealed: boolean;
|
|
7
|
-
constructor(
|
|
7
|
+
constructor({ nonce }?: {
|
|
8
|
+
nonce?: string;
|
|
9
|
+
});
|
|
8
10
|
_emitSheetCSS: () => string;
|
|
9
11
|
collectStyles(children: any): React.JSX.Element;
|
|
10
12
|
getStyleTags: () => string;
|
|
@@ -33,6 +33,7 @@ export type IStyleSheetManager = React.PropsWithChildren<{
|
|
|
33
33
|
namespace?: undefined | string;
|
|
34
34
|
/**
|
|
35
35
|
* Create and provide your own `StyleSheet` if necessary for advanced SSR scenarios.
|
|
36
|
+
* When provided, `target` and `nonce` props are ignored (configure them on the sheet directly).
|
|
36
37
|
*/
|
|
37
38
|
sheet?: undefined | StyleSheet;
|
|
38
39
|
/**
|
|
@@ -57,6 +58,11 @@ export type IStyleSheetManager = React.PropsWithChildren<{
|
|
|
57
58
|
* \* The plugin(s) must be compatible with stylis v4 or above.
|
|
58
59
|
*/
|
|
59
60
|
stylisPlugins?: undefined | stylis.Middleware[];
|
|
61
|
+
/**
|
|
62
|
+
* CSP nonce to attach to injected `<style>` tags. Overrides auto-detection
|
|
63
|
+
* from `<meta name="sc-nonce">`, `<meta property="csp-nonce">`, or `__webpack_nonce__`.
|
|
64
|
+
*/
|
|
65
|
+
nonce?: undefined | string;
|
|
60
66
|
/**
|
|
61
67
|
* Provide an alternate DOM node to host generated styles; useful for iframes.
|
|
62
68
|
*/
|
|
@@ -6,7 +6,7 @@ import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from '../models/
|
|
|
6
6
|
import { NativeTarget, RuleSet } from '../types';
|
|
7
7
|
import isStyledComponent from '../utils/isStyledComponent';
|
|
8
8
|
declare const reactNative: Awaited<typeof import("react-native")>;
|
|
9
|
-
declare const baseStyled: <Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? React.ComponentPropsWithRef<Target> : import("../types").BaseObject, import("../types").BaseObject>;
|
|
9
|
+
declare const baseStyled: <Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? React.ComponentPropsWithRef<Target> : import("../types").BaseObject, import("../types").BaseObject, never>;
|
|
10
10
|
declare const aliases: readonly ["ActivityIndicator", "Button", "DatePickerIOS", "DrawerLayoutAndroid", "FlatList", "Image", "ImageBackground", "KeyboardAvoidingView", "Modal", "Pressable", "ProgressBarAndroid", "ProgressViewIOS", "RefreshControl", "SafeAreaView", "ScrollView", "SectionList", "Slider", "Switch", "Text", "TextInput", "TouchableHighlight", "TouchableOpacity", "View", "VirtualizedList"];
|
|
11
11
|
type KnownComponents = (typeof aliases)[number];
|
|
12
12
|
/** Isolates RN-provided components since they don't expose a helper type for this. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InsertionTarget } from '../types';
|
|
2
2
|
import { SheetOptions } from './types';
|
|
3
3
|
/** Create a CSSStyleSheet-like tag depending on the environment */
|
|
4
|
-
export declare const makeTag: ({ isServer, useCSSOMInjection, target }: SheetOptions) => {
|
|
4
|
+
export declare const makeTag: ({ isServer, useCSSOMInjection, target, nonce }: SheetOptions) => {
|
|
5
5
|
rules: string[];
|
|
6
6
|
length: number;
|
|
7
7
|
insertRule(index: number, rule: string): boolean;
|
|
@@ -23,7 +23,7 @@ export declare const makeTag: ({ isServer, useCSSOMInjection, target }: SheetOpt
|
|
|
23
23
|
getRule(index: number): string;
|
|
24
24
|
};
|
|
25
25
|
export declare const CSSOMTag: {
|
|
26
|
-
new (target?: InsertionTarget | undefined): {
|
|
26
|
+
new (target?: InsertionTarget | undefined, nonce?: string | undefined): {
|
|
27
27
|
element: HTMLStyleElement;
|
|
28
28
|
sheet: CSSStyleSheet;
|
|
29
29
|
length: number;
|
|
@@ -34,7 +34,7 @@ export declare const CSSOMTag: {
|
|
|
34
34
|
};
|
|
35
35
|
/** A Tag that emulates the CSSStyleSheet API but uses text nodes */
|
|
36
36
|
export declare const TextTag: {
|
|
37
|
-
new (target?: InsertionTarget | undefined): {
|
|
37
|
+
new (target?: InsertionTarget | undefined, nonce?: string | undefined): {
|
|
38
38
|
element: HTMLStyleElement;
|
|
39
39
|
nodes: NodeListOf<Node>;
|
|
40
40
|
length: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InsertionTarget } from '../types';
|
|
2
2
|
/** Create a style element inside `target` or <head> after the last */
|
|
3
|
-
export declare const makeStyleTag: (target?: InsertionTarget | undefined) => HTMLStyleElement;
|
|
3
|
+
export declare const makeStyleTag: (target?: InsertionTarget | undefined, nonce?: string | undefined) => HTMLStyleElement;
|
|
4
4
|
/** Get the CSSStyleSheet instance for a given style element */
|
|
5
5
|
export declare const getSheet: (tag: HTMLStyleElement) => CSSStyleSheet;
|
|
6
6
|
/** Remove a GlobalStyle's SSR-rendered inline style tag(s) from the DOM */
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
export declare const seedNextClassnames: (names: string[]) => string[];
|
|
2
|
+
export declare const resetStyled: (isServer?: boolean) => (<Target extends import("..").WebTarget, InjectedProps extends object = import("../types").BaseObject>(tag: Target) => import("../constructors/constructWithOptions").Styled<"web", Target, Target extends import("../types").KnownTarget ? import("react").ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, import("../types").BaseObject>) & {
|
|
3
|
+
symbol: import("../constructors/constructWithOptions").Styled<"web", "symbol", import("react").SVGProps<SVGSymbolElement>, import("../types").BaseObject>;
|
|
4
|
+
object: import("../constructors/constructWithOptions").Styled<"web", "object", import("react").DetailedHTMLProps<import("react").ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>, import("../types").BaseObject>;
|
|
5
|
+
slot: import("../constructors/constructWithOptions").Styled<"web", "slot", import("react").DetailedHTMLProps<import("react").SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>, import("../types").BaseObject>;
|
|
6
|
+
button: import("../constructors/constructWithOptions").Styled<"web", "button", import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, import("../types").BaseObject>;
|
|
7
|
+
meter: import("../constructors/constructWithOptions").Styled<"web", "meter", import("react").DetailedHTMLProps<import("react").MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>, import("../types").BaseObject>;
|
|
8
|
+
textarea: import("../constructors/constructWithOptions").Styled<"web", "textarea", import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, import("../types").BaseObject>;
|
|
9
|
+
progress: import("../constructors/constructWithOptions").Styled<"web", "progress", import("react").DetailedHTMLProps<import("react").ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>, import("../types").BaseObject>;
|
|
10
|
+
text: import("../constructors/constructWithOptions").Styled<"web", "text", import("react").SVGTextElementAttributes<SVGTextElement>, import("../types").BaseObject>;
|
|
11
|
+
ruby: import("../constructors/constructWithOptions").Styled<"web", "ruby", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
12
|
+
table: import("../constructors/constructWithOptions").Styled<"web", "table", import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, import("../types").BaseObject>;
|
|
13
|
+
small: import("../constructors/constructWithOptions").Styled<"web", "small", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
14
|
+
sub: import("../constructors/constructWithOptions").Styled<"web", "sub", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
15
|
+
circle: import("../constructors/constructWithOptions").Styled<"web", "circle", import("react").SVGProps<SVGCircleElement>, import("../types").BaseObject>;
|
|
16
|
+
embed: import("../constructors/constructWithOptions").Styled<"web", "embed", import("react").DetailedHTMLProps<import("react").EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>, import("../types").BaseObject>;
|
|
17
|
+
pre: import("../constructors/constructWithOptions").Styled<"web", "pre", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLPreElement>, HTMLPreElement>, import("../types").BaseObject>;
|
|
18
|
+
caption: import("../constructors/constructWithOptions").Styled<"web", "caption", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
19
|
+
menu: import("../constructors/constructWithOptions").Styled<"web", "menu", import("react").DetailedHTMLProps<import("react").MenuHTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
20
|
+
a: import("../constructors/constructWithOptions").Styled<"web", "a", import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, import("../types").BaseObject>;
|
|
21
|
+
abbr: import("../constructors/constructWithOptions").Styled<"web", "abbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
22
|
+
address: import("../constructors/constructWithOptions").Styled<"web", "address", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
23
|
+
area: import("../constructors/constructWithOptions").Styled<"web", "area", import("react").DetailedHTMLProps<import("react").AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>, import("../types").BaseObject>;
|
|
24
|
+
article: import("../constructors/constructWithOptions").Styled<"web", "article", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
25
|
+
aside: import("../constructors/constructWithOptions").Styled<"web", "aside", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
26
|
+
audio: import("../constructors/constructWithOptions").Styled<"web", "audio", import("react").DetailedHTMLProps<import("react").AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, import("../types").BaseObject>;
|
|
27
|
+
b: import("../constructors/constructWithOptions").Styled<"web", "b", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
28
|
+
bdi: import("../constructors/constructWithOptions").Styled<"web", "bdi", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
29
|
+
bdo: import("../constructors/constructWithOptions").Styled<"web", "bdo", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
30
|
+
blockquote: import("../constructors/constructWithOptions").Styled<"web", "blockquote", import("react").DetailedHTMLProps<import("react").BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, import("../types").BaseObject>;
|
|
31
|
+
body: import("../constructors/constructWithOptions").Styled<"web", "body", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>, import("../types").BaseObject>;
|
|
32
|
+
canvas: import("../constructors/constructWithOptions").Styled<"web", "canvas", import("react").DetailedHTMLProps<import("react").CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>, import("../types").BaseObject>;
|
|
33
|
+
cite: import("../constructors/constructWithOptions").Styled<"web", "cite", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
34
|
+
code: import("../constructors/constructWithOptions").Styled<"web", "code", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
35
|
+
col: import("../constructors/constructWithOptions").Styled<"web", "col", import("react").DetailedHTMLProps<import("react").ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, import("../types").BaseObject>;
|
|
36
|
+
colgroup: import("../constructors/constructWithOptions").Styled<"web", "colgroup", import("react").DetailedHTMLProps<import("react").ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, import("../types").BaseObject>;
|
|
37
|
+
data: import("../constructors/constructWithOptions").Styled<"web", "data", import("react").DetailedHTMLProps<import("react").DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>, import("../types").BaseObject>;
|
|
38
|
+
datalist: import("../constructors/constructWithOptions").Styled<"web", "datalist", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>, import("../types").BaseObject>;
|
|
39
|
+
dd: import("../constructors/constructWithOptions").Styled<"web", "dd", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
40
|
+
del: import("../constructors/constructWithOptions").Styled<"web", "del", import("react").DetailedHTMLProps<import("react").DelHTMLAttributes<HTMLModElement>, HTMLModElement>, import("../types").BaseObject>;
|
|
41
|
+
details: import("../constructors/constructWithOptions").Styled<"web", "details", import("react").DetailedHTMLProps<import("react").DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>, import("../types").BaseObject>;
|
|
42
|
+
dfn: import("../constructors/constructWithOptions").Styled<"web", "dfn", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
43
|
+
dialog: import("../constructors/constructWithOptions").Styled<"web", "dialog", import("react").DetailedHTMLProps<import("react").DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>, import("../types").BaseObject>;
|
|
44
|
+
div: import("../constructors/constructWithOptions").Styled<"web", "div", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("../types").BaseObject>;
|
|
45
|
+
dl: import("../constructors/constructWithOptions").Styled<"web", "dl", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDListElement>, HTMLDListElement>, import("../types").BaseObject>;
|
|
46
|
+
dt: import("../constructors/constructWithOptions").Styled<"web", "dt", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
47
|
+
em: import("../constructors/constructWithOptions").Styled<"web", "em", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
48
|
+
fieldset: import("../constructors/constructWithOptions").Styled<"web", "fieldset", import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, import("../types").BaseObject>;
|
|
49
|
+
figcaption: import("../constructors/constructWithOptions").Styled<"web", "figcaption", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
50
|
+
figure: import("../constructors/constructWithOptions").Styled<"web", "figure", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
51
|
+
footer: import("../constructors/constructWithOptions").Styled<"web", "footer", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
52
|
+
form: import("../constructors/constructWithOptions").Styled<"web", "form", import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, import("../types").BaseObject>;
|
|
53
|
+
h1: import("../constructors/constructWithOptions").Styled<"web", "h1", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
54
|
+
h2: import("../constructors/constructWithOptions").Styled<"web", "h2", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
55
|
+
h3: import("../constructors/constructWithOptions").Styled<"web", "h3", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
56
|
+
h4: import("../constructors/constructWithOptions").Styled<"web", "h4", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
57
|
+
h5: import("../constructors/constructWithOptions").Styled<"web", "h5", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
58
|
+
h6: import("../constructors/constructWithOptions").Styled<"web", "h6", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
59
|
+
header: import("../constructors/constructWithOptions").Styled<"web", "header", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
60
|
+
hgroup: import("../constructors/constructWithOptions").Styled<"web", "hgroup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
61
|
+
hr: import("../constructors/constructWithOptions").Styled<"web", "hr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, import("../types").BaseObject>;
|
|
62
|
+
html: import("../constructors/constructWithOptions").Styled<"web", "html", import("react").DetailedHTMLProps<import("react").HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>, import("../types").BaseObject>;
|
|
63
|
+
i: import("../constructors/constructWithOptions").Styled<"web", "i", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
64
|
+
iframe: import("../constructors/constructWithOptions").Styled<"web", "iframe", import("react").DetailedHTMLProps<import("react").IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>, import("../types").BaseObject>;
|
|
65
|
+
img: import("../constructors/constructWithOptions").Styled<"web", "img", import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, import("../types").BaseObject>;
|
|
66
|
+
input: import("../constructors/constructWithOptions").Styled<"web", "input", import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, import("../types").BaseObject>;
|
|
67
|
+
ins: import("../constructors/constructWithOptions").Styled<"web", "ins", import("react").DetailedHTMLProps<import("react").InsHTMLAttributes<HTMLModElement>, HTMLModElement>, import("../types").BaseObject>;
|
|
68
|
+
kbd: import("../constructors/constructWithOptions").Styled<"web", "kbd", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
69
|
+
label: import("../constructors/constructWithOptions").Styled<"web", "label", import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, import("../types").BaseObject>;
|
|
70
|
+
legend: import("../constructors/constructWithOptions").Styled<"web", "legend", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, import("../types").BaseObject>;
|
|
71
|
+
li: import("../constructors/constructWithOptions").Styled<"web", "li", import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, import("../types").BaseObject>;
|
|
72
|
+
main: import("../constructors/constructWithOptions").Styled<"web", "main", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
73
|
+
map: import("../constructors/constructWithOptions").Styled<"web", "map", import("react").DetailedHTMLProps<import("react").MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>, import("../types").BaseObject>;
|
|
74
|
+
mark: import("../constructors/constructWithOptions").Styled<"web", "mark", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
75
|
+
nav: import("../constructors/constructWithOptions").Styled<"web", "nav", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
76
|
+
ol: import("../constructors/constructWithOptions").Styled<"web", "ol", import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, import("../types").BaseObject>;
|
|
77
|
+
optgroup: import("../constructors/constructWithOptions").Styled<"web", "optgroup", import("react").DetailedHTMLProps<import("react").OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>, import("../types").BaseObject>;
|
|
78
|
+
option: import("../constructors/constructWithOptions").Styled<"web", "option", import("react").DetailedHTMLProps<import("react").OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, import("../types").BaseObject>;
|
|
79
|
+
output: import("../constructors/constructWithOptions").Styled<"web", "output", import("react").DetailedHTMLProps<import("react").OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>, import("../types").BaseObject>;
|
|
80
|
+
p: import("../constructors/constructWithOptions").Styled<"web", "p", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, import("../types").BaseObject>;
|
|
81
|
+
picture: import("../constructors/constructWithOptions").Styled<"web", "picture", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
82
|
+
q: import("../constructors/constructWithOptions").Styled<"web", "q", import("react").DetailedHTMLProps<import("react").QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, import("../types").BaseObject>;
|
|
83
|
+
rp: import("../constructors/constructWithOptions").Styled<"web", "rp", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
84
|
+
rt: import("../constructors/constructWithOptions").Styled<"web", "rt", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
85
|
+
s: import("../constructors/constructWithOptions").Styled<"web", "s", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
86
|
+
samp: import("../constructors/constructWithOptions").Styled<"web", "samp", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
87
|
+
search: import("../constructors/constructWithOptions").Styled<"web", "search", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
88
|
+
section: import("../constructors/constructWithOptions").Styled<"web", "section", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
89
|
+
select: import("../constructors/constructWithOptions").Styled<"web", "select", import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, import("../types").BaseObject>;
|
|
90
|
+
span: import("../constructors/constructWithOptions").Styled<"web", "span", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, import("../types").BaseObject>;
|
|
91
|
+
strong: import("../constructors/constructWithOptions").Styled<"web", "strong", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
92
|
+
summary: import("../constructors/constructWithOptions").Styled<"web", "summary", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
93
|
+
sup: import("../constructors/constructWithOptions").Styled<"web", "sup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
94
|
+
tbody: import("../constructors/constructWithOptions").Styled<"web", "tbody", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
|
|
95
|
+
td: import("../constructors/constructWithOptions").Styled<"web", "td", import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, import("../types").BaseObject>;
|
|
96
|
+
template: import("../constructors/constructWithOptions").Styled<"web", "template", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>, import("../types").BaseObject>;
|
|
97
|
+
tfoot: import("../constructors/constructWithOptions").Styled<"web", "tfoot", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
|
|
98
|
+
th: import("../constructors/constructWithOptions").Styled<"web", "th", import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, import("../types").BaseObject>;
|
|
99
|
+
thead: import("../constructors/constructWithOptions").Styled<"web", "thead", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
|
|
100
|
+
time: import("../constructors/constructWithOptions").Styled<"web", "time", import("react").DetailedHTMLProps<import("react").TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>, import("../types").BaseObject>;
|
|
101
|
+
tr: import("../constructors/constructWithOptions").Styled<"web", "tr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, import("../types").BaseObject>;
|
|
102
|
+
u: import("../constructors/constructWithOptions").Styled<"web", "u", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
103
|
+
ul: import("../constructors/constructWithOptions").Styled<"web", "ul", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, import("../types").BaseObject>;
|
|
104
|
+
var: import("../constructors/constructWithOptions").Styled<"web", "var", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
105
|
+
video: import("../constructors/constructWithOptions").Styled<"web", "video", import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, import("../types").BaseObject>;
|
|
106
|
+
wbr: import("../constructors/constructWithOptions").Styled<"web", "wbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
107
|
+
clipPath: import("../constructors/constructWithOptions").Styled<"web", "clipPath", import("react").SVGProps<SVGClipPathElement>, import("../types").BaseObject>;
|
|
108
|
+
defs: import("../constructors/constructWithOptions").Styled<"web", "defs", import("react").SVGProps<SVGDefsElement>, import("../types").BaseObject>;
|
|
109
|
+
ellipse: import("../constructors/constructWithOptions").Styled<"web", "ellipse", import("react").SVGProps<SVGEllipseElement>, import("../types").BaseObject>;
|
|
110
|
+
feBlend: import("../constructors/constructWithOptions").Styled<"web", "feBlend", import("react").SVGProps<SVGFEBlendElement>, import("../types").BaseObject>;
|
|
111
|
+
feColorMatrix: import("../constructors/constructWithOptions").Styled<"web", "feColorMatrix", import("react").SVGProps<SVGFEColorMatrixElement>, import("../types").BaseObject>;
|
|
112
|
+
feComponentTransfer: import("../constructors/constructWithOptions").Styled<"web", "feComponentTransfer", import("react").SVGProps<SVGFEComponentTransferElement>, import("../types").BaseObject>;
|
|
113
|
+
feComposite: import("../constructors/constructWithOptions").Styled<"web", "feComposite", import("react").SVGProps<SVGFECompositeElement>, import("../types").BaseObject>;
|
|
114
|
+
feConvolveMatrix: import("../constructors/constructWithOptions").Styled<"web", "feConvolveMatrix", import("react").SVGProps<SVGFEConvolveMatrixElement>, import("../types").BaseObject>;
|
|
115
|
+
feDiffuseLighting: import("../constructors/constructWithOptions").Styled<"web", "feDiffuseLighting", import("react").SVGProps<SVGFEDiffuseLightingElement>, import("../types").BaseObject>;
|
|
116
|
+
feDisplacementMap: import("../constructors/constructWithOptions").Styled<"web", "feDisplacementMap", import("react").SVGProps<SVGFEDisplacementMapElement>, import("../types").BaseObject>;
|
|
117
|
+
feDistantLight: import("../constructors/constructWithOptions").Styled<"web", "feDistantLight", import("react").SVGProps<SVGFEDistantLightElement>, import("../types").BaseObject>;
|
|
118
|
+
feDropShadow: import("../constructors/constructWithOptions").Styled<"web", "feDropShadow", import("react").SVGProps<SVGFEDropShadowElement>, import("../types").BaseObject>;
|
|
119
|
+
feFlood: import("../constructors/constructWithOptions").Styled<"web", "feFlood", import("react").SVGProps<SVGFEFloodElement>, import("../types").BaseObject>;
|
|
120
|
+
feFuncA: import("../constructors/constructWithOptions").Styled<"web", "feFuncA", import("react").SVGProps<SVGFEFuncAElement>, import("../types").BaseObject>;
|
|
121
|
+
feFuncB: import("../constructors/constructWithOptions").Styled<"web", "feFuncB", import("react").SVGProps<SVGFEFuncBElement>, import("../types").BaseObject>;
|
|
122
|
+
feFuncG: import("../constructors/constructWithOptions").Styled<"web", "feFuncG", import("react").SVGProps<SVGFEFuncGElement>, import("../types").BaseObject>;
|
|
123
|
+
feFuncR: import("../constructors/constructWithOptions").Styled<"web", "feFuncR", import("react").SVGProps<SVGFEFuncRElement>, import("../types").BaseObject>;
|
|
124
|
+
feGaussianBlur: import("../constructors/constructWithOptions").Styled<"web", "feGaussianBlur", import("react").SVGProps<SVGFEGaussianBlurElement>, import("../types").BaseObject>;
|
|
125
|
+
feImage: import("../constructors/constructWithOptions").Styled<"web", "feImage", import("react").SVGProps<SVGFEImageElement>, import("../types").BaseObject>;
|
|
126
|
+
feMerge: import("../constructors/constructWithOptions").Styled<"web", "feMerge", import("react").SVGProps<SVGFEMergeElement>, import("../types").BaseObject>;
|
|
127
|
+
feMergeNode: import("../constructors/constructWithOptions").Styled<"web", "feMergeNode", import("react").SVGProps<SVGFEMergeNodeElement>, import("../types").BaseObject>;
|
|
128
|
+
feMorphology: import("../constructors/constructWithOptions").Styled<"web", "feMorphology", import("react").SVGProps<SVGFEMorphologyElement>, import("../types").BaseObject>;
|
|
129
|
+
feOffset: import("../constructors/constructWithOptions").Styled<"web", "feOffset", import("react").SVGProps<SVGFEOffsetElement>, import("../types").BaseObject>;
|
|
130
|
+
fePointLight: import("../constructors/constructWithOptions").Styled<"web", "fePointLight", import("react").SVGProps<SVGFEPointLightElement>, import("../types").BaseObject>;
|
|
131
|
+
feSpecularLighting: import("../constructors/constructWithOptions").Styled<"web", "feSpecularLighting", import("react").SVGProps<SVGFESpecularLightingElement>, import("../types").BaseObject>;
|
|
132
|
+
feSpotLight: import("../constructors/constructWithOptions").Styled<"web", "feSpotLight", import("react").SVGProps<SVGFESpotLightElement>, import("../types").BaseObject>;
|
|
133
|
+
feTile: import("../constructors/constructWithOptions").Styled<"web", "feTile", import("react").SVGProps<SVGFETileElement>, import("../types").BaseObject>;
|
|
134
|
+
feTurbulence: import("../constructors/constructWithOptions").Styled<"web", "feTurbulence", import("react").SVGProps<SVGFETurbulenceElement>, import("../types").BaseObject>;
|
|
135
|
+
filter: import("../constructors/constructWithOptions").Styled<"web", "filter", import("react").SVGProps<SVGFilterElement>, import("../types").BaseObject>;
|
|
136
|
+
foreignObject: import("../constructors/constructWithOptions").Styled<"web", "foreignObject", import("react").SVGProps<SVGForeignObjectElement>, import("../types").BaseObject>;
|
|
137
|
+
g: import("../constructors/constructWithOptions").Styled<"web", "g", import("react").SVGProps<SVGGElement>, import("../types").BaseObject>;
|
|
138
|
+
image: import("../constructors/constructWithOptions").Styled<"web", "image", import("react").SVGProps<SVGImageElement>, import("../types").BaseObject>;
|
|
139
|
+
line: import("../constructors/constructWithOptions").Styled<"web", "line", import("react").SVGLineElementAttributes<SVGLineElement>, import("../types").BaseObject>;
|
|
140
|
+
linearGradient: import("../constructors/constructWithOptions").Styled<"web", "linearGradient", import("react").SVGProps<SVGLinearGradientElement>, import("../types").BaseObject>;
|
|
141
|
+
marker: import("../constructors/constructWithOptions").Styled<"web", "marker", import("react").SVGProps<SVGMarkerElement>, import("../types").BaseObject>;
|
|
142
|
+
mask: import("../constructors/constructWithOptions").Styled<"web", "mask", import("react").SVGProps<SVGMaskElement>, import("../types").BaseObject>;
|
|
143
|
+
path: import("../constructors/constructWithOptions").Styled<"web", "path", import("react").SVGProps<SVGPathElement>, import("../types").BaseObject>;
|
|
144
|
+
pattern: import("../constructors/constructWithOptions").Styled<"web", "pattern", import("react").SVGProps<SVGPatternElement>, import("../types").BaseObject>;
|
|
145
|
+
polygon: import("../constructors/constructWithOptions").Styled<"web", "polygon", import("react").SVGProps<SVGPolygonElement>, import("../types").BaseObject>;
|
|
146
|
+
polyline: import("../constructors/constructWithOptions").Styled<"web", "polyline", import("react").SVGProps<SVGPolylineElement>, import("../types").BaseObject>;
|
|
147
|
+
radialGradient: import("../constructors/constructWithOptions").Styled<"web", "radialGradient", import("react").SVGProps<SVGRadialGradientElement>, import("../types").BaseObject>;
|
|
148
|
+
rect: import("../constructors/constructWithOptions").Styled<"web", "rect", import("react").SVGProps<SVGRectElement>, import("../types").BaseObject>;
|
|
149
|
+
stop: import("../constructors/constructWithOptions").Styled<"web", "stop", import("react").SVGProps<SVGStopElement>, import("../types").BaseObject>;
|
|
150
|
+
svg: import("../constructors/constructWithOptions").Styled<"web", "svg", import("react").SVGProps<SVGSVGElement>, import("../types").BaseObject>;
|
|
151
|
+
switch: import("../constructors/constructWithOptions").Styled<"web", "switch", import("react").SVGProps<SVGSwitchElement>, import("../types").BaseObject>;
|
|
152
|
+
textPath: import("../constructors/constructWithOptions").Styled<"web", "textPath", import("react").SVGProps<SVGTextPathElement>, import("../types").BaseObject>;
|
|
153
|
+
tspan: import("../constructors/constructWithOptions").Styled<"web", "tspan", import("react").SVGProps<SVGTSpanElement>, import("../types").BaseObject>;
|
|
154
|
+
use: import("../constructors/constructWithOptions").Styled<"web", "use", import("react").SVGProps<SVGUseElement>, import("../types").BaseObject>;
|
|
155
|
+
};
|
|
156
|
+
export declare const rehydrateTestStyles: () => void;
|
|
157
|
+
export declare const stripComments: (str: string) => string;
|
|
158
|
+
export declare const stripWhitespace: (str: string) => string;
|
|
159
|
+
export declare const getCSS: (scope: Document | HTMLElement) => string;
|
|
160
|
+
export declare const expectCSSMatches: (_expectation: string, opts?: {
|
|
161
|
+
ignoreWhitespace: boolean;
|
|
162
|
+
}) => string;
|
|
163
|
+
export declare const getRenderedCSS: () => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type VeryLargeUnionType = 'add-clip' | 'add-column-left' | 'add-column-right' | 'add-location' | 'add-row-bottom' | 'add-row-top' | 'add-to-artifact' | 'add-to-folder' | 'add' | 'aimpoints-target' | 'airplane' | 'align-center' | 'align-justify' | 'align-left' | 'align-right' | 'alignment-bottom' | 'alignment-horizontal-center' | 'alignment-left' | 'alignment-right' | 'alignment-top' | 'alignment-vertical-center' | 'anchor' | 'annotation' | 'antenna' | 'app-header' | 'application' | 'applications' | 'archive' | 'area-of-interest' | 'array-boolean' | 'array-date' | 'array-floating-point' | 'array-numeric' | 'array-string' | 'array-timestamp' | 'array' | 'arrow-bottom-left' | 'arrow-bottom-right' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-top-left' | 'arrow-top-right' | 'arrow-up' | 'arrows-horizontal' | 'arrows-vertical' | 'asterisk' | 'at' | 'automatic-updates' | 'axle' | 'backlink' | 'badge' | 'ban-circle' | 'bank-account' | 'barcode' | 'blank' | 'blocked-person' | 'bold' | 'book' | 'bookmark' | 'box' | 'briefcase' | 'bring-data' | 'bug' | 'buggy' | 'build' | 'calculator' | 'calendar' | 'camera' | 'caret-down' | 'caret-left' | 'caret-right' | 'caret-up' | 'cargo-ship' | 'cell-tower' | 'changes' | 'chart' | 'chat' | 'chevron-backward' | 'chevron-down' | 'chevron-forward' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle-arrow-down' | 'circle-arrow-left' | 'circle-arrow-right' | 'circle-arrow-up' | 'circle' | 'citation' | 'clean' | 'clip' | 'clipboard' | 'cloud-download' | 'cloud-upload' | 'cloud' | 'code-block' | 'code' | 'cog' | 'collapse-all' | 'color-fill' | 'column-layout' | 'comment' | 'comparison' | 'compass' | 'compressed' | 'confirm' | 'console' | 'contrast' | 'control' | 'credit-card' | 'cross-circle' | 'cross' | 'crown' | 'cube-add' | 'cube-remove' | 'cube' | 'curved-range-chart' | 'cut' | 'cycle' | 'dashboard' | 'data-connection' | 'data-lineage' | 'database' | 'delete' | 'delta' | 'derive-column' | 'desktop' | 'diagnosis' | 'diagram-tree' | 'direction-left' | 'direction-right' | 'disable' | 'divide' | 'document-open' | 'document-share' | 'document' | 'dollar' | 'dot' | 'double-caret-horizontal' | 'double-caret-vertical' | 'double-chevron-down' | 'double-chevron-left' | 'double-chevron-right' | 'double-chevron-up' | 'doughnut-chart' | 'download' | 'drag-handle-horizontal' | 'drag-handle-vertical' | 'draw' | 'drawer-left-filled' | 'drawer-left' | 'drawer-right-filled' | 'drawer-right' | 'drive-time' | 'duplicate' | 'edit' | 'eject' | 'emoji' | 'endorsed' | 'envelope' | 'equals' | 'eraser' | 'error' | 'euro' | 'exchange' | 'exclude-row' | 'expand-all' | 'export' | 'eye-off' | 'eye-on' | 'eye-open' | 'fast-backward' | 'fast-forward' | 'feed-subscribed' | 'feed' | 'film' | 'filter-keep' | 'filter-list' | 'filter-open' | 'filter-remove' | 'filter' | 'flag' | 'flame' | 'flash' | 'floating-point' | 'floppy-disk' | 'flow-branch' | 'flow-end' | 'flow-linear' | 'flow-review-branch' | 'flow-review' | 'flows' | 'folder-close' | 'folder-new' | 'folder-open' | 'folder-shared-open' | 'folder-shared' | 'follower' | 'following' | 'font' | 'fork' | 'form' | 'fuel' | 'full-circle' | 'full-stacked-chart' | 'fullscreen' | 'function' | 'gantt-chart' | 'geofence' | 'geolocation' | 'geosearch' | 'git-branch' | 'git-commit' | 'git-merge' | 'git-new-branch' | 'git-pull' | 'git-push' | 'git-repo' | 'glass' | 'globe-network' | 'globe' | 'graph-remove' | 'graph' | 'greater-than-or-equal-to' | 'greater-than' | 'grid-view' | 'grid' | 'group-objects' | 'grouped-bar-chart' | 'hand-down' | 'hand-left' | 'hand-right' | 'hand-up' | 'hand' | 'hat' | 'header-one' | 'header-three' | 'header-two' | 'header' | 'headset' | 'heart-broken' | 'heart' | 'heat-grid' | 'heatmap' | 'helicopter' | 'help' | 'helper-management' | 'high-priority' | 'high-voltage-pole' | 'highlight' | 'history' | 'home' | 'horizontal-bar-chart-asc' | 'horizontal-bar-chart-desc' | 'horizontal-bar-chart' | 'horizontal-distribution' | 'horizontal-inbetween' | 'hurricane' | 'id-number' | 'image-rotate-left' | 'image-rotate-right' | 'import' | 'inbox-filtered' | 'inbox-geo' | 'inbox-search' | 'inbox-update' | 'inbox' | 'info-sign' | 'inheritance' | 'inherited-group' | 'inner-join' | 'insert' | 'intelligence' | 'intersection' | 'ip-address' | 'issue-closed' | 'issue-new' | 'issue' | 'italic' | 'join-table' | 'key-backspace' | 'key-command' | 'key-control' | 'key-delete' | 'key-enter' | 'key-escape' | 'key-option' | 'key-shift' | 'key-tab' | 'key' | 'known-vehicle' | 'lab-test' | 'label' | 'layer-outline' | 'layer' | 'layers' | 'layout-auto' | 'layout-balloon' | 'layout-circle' | 'layout-grid' | 'layout-group-by' | 'layout-hierarchy' | 'layout-linear' | 'layout-skew-grid' | 'layout-sorted-clusters' | 'layout' | 'learning' | 'left-join' | 'less-than-or-equal-to' | 'less-than' | 'lifesaver' | 'lightbulb' | 'lightning' | 'link' | 'list-columns' | 'list-detail-view' | 'list' | 'locate' | 'lock' | 'locomotive' | 'log-in' | 'log-out' | 'low-voltage-pole' | 'manual' | 'manually-entered-data' | 'many-to-many' | 'many-to-one' | 'map-create' | 'map-marker' | 'map' | 'maximize' | 'media' | 'menu-closed' | 'menu-open' | 'menu' | 'merge-columns' | 'merge-links' | 'minimize' | 'minus' | 'mobile-phone' | 'mobile-video' | 'modal-filled' | 'modal' | 'model' | 'moon' | 'more' | 'mountain' | 'move' | 'mugshot' | 'multi-select' | 'music' | 'nest' | 'new-drawing' | 'new-grid-item' | 'new-layer' | 'new-layers' | 'new-link' | 'new-object' | 'new-person' | 'new-prescription' | 'new-text-box' | 'ninja' | 'not-equal-to' | 'notifications-snooze' | 'notifications-updated' | 'notifications' | 'numbered-list' | 'numerical' | 'office' | 'offline' | 'oil-field' | 'one-column' | 'one-to-many' | 'one-to-one' | 'open-application' | 'outdated' | 'page-layout' | 'panel-stats' | 'panel-table' | 'paperclip' | 'paragraph' | 'path-search' | 'path' | 'pause' | 'people' | 'percentage' | 'person' | 'phone' | 'pie-chart' | 'pin' | 'pivot-table' | 'pivot' | 'play' | 'playbook' | 'plus' | 'polygon-filter' | 'power' | 'predictive-analysis' | 'prescription' | 'presentation' | 'print' | 'projects' | 'properties' | 'property' | 'publish-function' | 'pulse' | 'rain' | 'random' | 'record' | 'rect-height' | 'rect-width' | 'rectangle' | 'redo' | 'refresh' | 'regex' | 'regression-chart' | 'remove-column-left' | 'remove-column-right' | 'remove-column' | 'remove-row-bottom' | 'remove-row-top' | 'remove' | 'repeat' | 'reset' | 'resolve' | 'rig' | 'right-join' | 'ring' | 'rocket-slant' | 'rocket' | 'rotate-document' | 'rotate-page' | 'route' | 'satellite' | 'saved' | 'scatter-plot' | 'search-around' | 'search-template' | 'search-text' | 'search' | 'segmented-control' | 'select' | 'selection' | 'send-message' | 'send-to-graph' | 'send-to-map' | 'send-to' | 'sensor' | 'series-add' | 'series-configuration' | 'series-derived' | 'series-filtered' | 'series-search' | 'settings' | 'shapes' | 'share' | 'shared-filter' | 'shield' | 'ship' | 'shop' | 'shopping-cart' | 'signal-search' | 'sim-card' | 'slash' | 'small-cross' | 'small-info-sign' | 'small-minus' | 'small-plus' | 'small-square' | 'small-tick' | 'snowflake' | 'social-media' | 'sort-alphabetical-desc' | 'sort-alphabetical' | 'sort-asc' | 'sort-desc' | 'sort-numerical-desc' | 'sort-numerical' | 'sort' | 'split-columns' | 'square' | 'stacked-chart' | 'stadium-geometry' | 'star-empty' | 'star' | 'step-backward' | 'step-chart' | 'step-forward' | 'stop' | 'stopwatch' | 'strikethrough' | 'style' | 'subscript' | 'superscript' | 'swap-horizontal' | 'swap-vertical' | 'switch' | 'symbol-circle' | 'symbol-cross' | 'symbol-diamond' | 'symbol-rectangle' | 'symbol-square' | 'symbol-triangle-down' | 'symbol-triangle-up' | 'syringe' | 'tag' | 'take-action' | 'tank' | 'target' | 'taxi' | 'temperature' | 'text-highlight' | 'th-derived' | 'th-disconnect' | 'th-filtered' | 'th-list' | 'th' | 'third-party' | 'thumbs-down' | 'thumbs-up' | 'tick-circle' | 'tick' | 'time' | 'timeline-area-chart' | 'timeline-bar-chart' | 'timeline-events' | 'timeline-line-chart' | 'tint' | 'torch' | 'tractor' | 'train' | 'translate' | 'trash' | 'tree' | 'trending-down' | 'trending-up' | 'truck' | 'two-columns' | 'unarchive' | 'underline' | 'undo' | 'ungroup-objects' | 'unknown-vehicle' | 'unlock' | 'unpin' | 'unresolve' | 'updated' | 'upload' | 'user' | 'variable' | 'vertical-bar-chart-asc' | 'vertical-bar-chart-desc' | 'vertical-distribution' | 'vertical-inbetween' | 'video' | 'virus' | 'volume-down' | 'volume-off' | 'volume-up' | 'walk' | 'warning-sign' | 'waterfall-chart' | 'waves' | 'widget-button' | 'widget-footer' | 'widget-header' | 'widget' | 'wind' | 'wrench' | 'zoom-in' | 'zoom-out' | 'zoom-to-fit';
|
|
@@ -132,8 +132,11 @@ export type PolymorphicComponentProps<R extends Runtime, BaseProps extends BaseO
|
|
|
132
132
|
* props from the given rendering target to get proper typing for
|
|
133
133
|
* any specialized props in the target component.
|
|
134
134
|
*/
|
|
135
|
-
export interface PolymorphicComponent<R extends Runtime, BaseProps extends BaseObject> extends React.ForwardRefExoticComponent<BaseProps
|
|
136
|
-
|
|
135
|
+
export interface PolymorphicComponent<R extends Runtime, BaseProps extends BaseObject> extends React.ForwardRefExoticComponent<BaseProps & {
|
|
136
|
+
as?: StyledTarget<R> | undefined;
|
|
137
|
+
forwardedAs?: StyledTarget<R> | undefined;
|
|
138
|
+
}> {
|
|
139
|
+
<AsTarget extends StyledTarget<R> | void = void, ForwardedAsTarget extends StyledTarget<R> | void = void>(props: PolymorphicComponentProps<R, BaseProps, AsTarget, ForwardedAsTarget> & React.RefAttributes<any>): React.JSX.Element;
|
|
137
140
|
}
|
|
138
141
|
export interface IStyledComponentBase<R extends Runtime, Props extends BaseObject = BaseObject> extends PolymorphicComponent<R, Props>, IStyledStatics<R, Props>, StyledComponentBrand {
|
|
139
142
|
defaultProps?: (ExecutionProps & Partial<Props>) | undefined;
|
|
@@ -210,6 +213,15 @@ export interface StyledObject<Props extends BaseObject = BaseObject> extends CSS
|
|
|
210
213
|
* {@link DefaultTheme}.
|
|
211
214
|
*/
|
|
212
215
|
export type CSSProp = Interpolation<any>;
|
|
216
|
+
/**
|
|
217
|
+
* @deprecated Use the built-in NoInfer from TypeScript 5.4+ directly.
|
|
218
|
+
* Kept for backward compatibility.
|
|
219
|
+
*/
|
|
213
220
|
export type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
214
|
-
export type Substitute<A extends BaseObject, B extends BaseObject> = FastOmit<A, keyof B> & B;
|
|
221
|
+
export type Substitute<A extends BaseObject, B extends BaseObject> = keyof B extends never ? A : FastOmit<A, keyof B> & B;
|
|
222
|
+
/**
|
|
223
|
+
* Makes keys in K optional while keeping all others required.
|
|
224
|
+
* Used to make attrs-provided props optional on the final component.
|
|
225
|
+
*/
|
|
226
|
+
export type MakeAttrsOptional<P extends BaseObject, K extends keyof any> = keyof K extends never ? P : FastOmit<P, K & keyof P> & Partial<Pick<P, K & keyof P>>;
|
|
215
227
|
export type InsertionTarget = HTMLElement | ShadowRoot;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a React element as a raw object, bypassing React.createElement.
|
|
4
|
+
* ~60-120x faster than React.createElement for the same output.
|
|
5
|
+
*
|
|
6
|
+
* Compatibility: React 16.8+. The $$typeof symbol is auto-detected.
|
|
7
|
+
* - React 16-18: reads ref from element.ref
|
|
8
|
+
* - React 19: reads ref from element.props.ref
|
|
9
|
+
* Both are set correctly when ref is in props AND on the element.
|
|
10
|
+
*/
|
|
11
|
+
export declare function rawElement(type: any, props: any, ref?: any, key?: any): React.ReactElement;
|
|
@@ -4,7 +4,9 @@ import StyleSheet from '../sheet';
|
|
|
4
4
|
export default class ServerStyleSheet {
|
|
5
5
|
instance: StyleSheet;
|
|
6
6
|
sealed: boolean;
|
|
7
|
-
constructor(
|
|
7
|
+
constructor({ nonce }?: {
|
|
8
|
+
nonce?: string;
|
|
9
|
+
});
|
|
8
10
|
_emitSheetCSS: () => string;
|
|
9
11
|
collectStyles(children: any): React.JSX.Element;
|
|
10
12
|
getStyleTags: () => string;
|
|
@@ -33,6 +33,7 @@ export type IStyleSheetManager = React.PropsWithChildren<{
|
|
|
33
33
|
namespace?: undefined | string;
|
|
34
34
|
/**
|
|
35
35
|
* Create and provide your own `StyleSheet` if necessary for advanced SSR scenarios.
|
|
36
|
+
* When provided, `target` and `nonce` props are ignored (configure them on the sheet directly).
|
|
36
37
|
*/
|
|
37
38
|
sheet?: undefined | StyleSheet;
|
|
38
39
|
/**
|
|
@@ -57,6 +58,11 @@ export type IStyleSheetManager = React.PropsWithChildren<{
|
|
|
57
58
|
* \* The plugin(s) must be compatible with stylis v4 or above.
|
|
58
59
|
*/
|
|
59
60
|
stylisPlugins?: undefined | stylis.Middleware[];
|
|
61
|
+
/**
|
|
62
|
+
* CSP nonce to attach to injected `<style>` tags. Overrides auto-detection
|
|
63
|
+
* from `<meta name="sc-nonce">`, `<meta property="csp-nonce">`, or `__webpack_nonce__`.
|
|
64
|
+
*/
|
|
65
|
+
nonce?: undefined | string;
|
|
60
66
|
/**
|
|
61
67
|
* Provide an alternate DOM node to host generated styles; useful for iframes.
|
|
62
68
|
*/
|