@elliemae/ds-system 3.14.0-next.9 → 3.14.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/globalStyles.js +11 -2
- package/dist/cjs/globalStyles.js.map +2 -2
- package/dist/esm/globalStyles.js +11 -2
- package/dist/esm/globalStyles.js.map +2 -2
- package/dist/types/arithmetic.d.ts +5 -0
- package/dist/types/constants.d.ts +11 -0
- package/dist/types/ds-styled/attributes.d.ts +9 -0
- package/dist/types/ds-styled/index.d.ts +4 -0
- package/dist/types/ds-styled/styled.d.ts +4 -0
- package/dist/types/ds-styled/types.d.ts +109 -0
- package/dist/types/ds-styled/utilities/background.d.ts +1 -0
- package/dist/types/ds-styled/utilities/border.d.ts +1 -0
- package/dist/types/ds-styled/utilities/checkNamingConvention.d.ts +1 -0
- package/dist/types/ds-styled/utilities/color.d.ts +2 -0
- package/dist/types/ds-styled/utilities/helpers.d.ts +10 -0
- package/dist/types/ds-styled/utilities/index.d.ts +9 -0
- package/dist/types/ds-styled/utilities/magicCssTransform.d.ts +6 -0
- package/dist/types/ds-styled/utilities/resolvers.d.ts +5 -0
- package/dist/types/ds-styled/utilities/sizing.d.ts +1 -0
- package/dist/types/ds-styled/utilities/space.d.ts +3 -0
- package/dist/types/globalStyles.d.ts +3 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/mobileUtilities.d.ts +4 -0
- package/dist/types/spaceUtilities.d.ts +8 -0
- package/dist/types/tests/arithmetic.test.d.ts +1 -0
- package/dist/types/th.d.ts +19 -0
- package/dist/types/theme.d.ts +2 -0
- package/dist/types/themeProviderHOC.d.ts +2 -0
- package/dist/types/utils.d.ts +41 -0
- package/dist/types/xStyledWrapper.d.ts +3 -0
- package/package.json +1 -1
package/dist/cjs/globalStyles.js
CHANGED
|
@@ -30,15 +30,24 @@ module.exports = __toCommonJS(globalStyles_exports);
|
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
31
|
var import_ds_styled = require("./ds-styled");
|
|
32
32
|
const GlobalStyles = import_ds_styled.createGlobalStyle`
|
|
33
|
+
:root * {
|
|
34
|
+
font-size: 1rem;
|
|
35
|
+
}
|
|
33
36
|
:root, body {
|
|
37
|
+
|
|
34
38
|
overscroll-behavior-y: none;
|
|
35
39
|
|
|
36
|
-
font-size: ${(props) => props.device === "desktop" ? "
|
|
40
|
+
font-size: ${(props) => props.device === "desktop" ? "0.813rem" : "1rem"};
|
|
37
41
|
|
|
38
42
|
@media(min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
39
|
-
font-size: ${(props) => props.device === "mobile" ? "
|
|
43
|
+
font-size: ${(props) => props.device === "mobile" ? "1rem" : "0.813rem"};
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
}
|
|
47
|
+
|
|
48
|
+
/* fix sanitize */
|
|
49
|
+
::-webkit-input-placeholder {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
43
52
|
`;
|
|
44
53
|
//# sourceMappingURL=globalStyles.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/globalStyles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { createGlobalStyle } from './ds-styled';\n\nexport const GlobalStyles = createGlobalStyle<{ device: 'desktop' | 'mobile' }>`\n :root, body {\n overscroll-behavior-y: none;\n\n font-size: ${(props) => (props.device === 'desktop' ? '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAkC;AAE3B,MAAM,eAAe;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import { createGlobalStyle } from './ds-styled';\n\nexport const GlobalStyles = createGlobalStyle<{ device: 'desktop' | 'mobile' }>`\n :root * {\n font-size: 1rem;\n }\n :root, body {\n\n overscroll-behavior-y: none;\n\n font-size: ${(props) => (props.device === 'desktop' ? '0.813rem' : '1rem')};\n\n @media(min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => (props.device === 'mobile' ? '1rem' : '0.813rem')};\n }\n\n }\n\n /* fix sanitize */\n ::-webkit-input-placeholder {\n opacity: 1;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAkC;AAE3B,MAAM,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAQX,CAAC,UAAW,MAAM,WAAW,YAAY,aAAa;AAAA;AAAA,wBAE/C,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACtC,CAAC,UAAW,MAAM,WAAW,WAAW,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/globalStyles.js
CHANGED
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { createGlobalStyle } from "./ds-styled";
|
|
3
3
|
const GlobalStyles = createGlobalStyle`
|
|
4
|
+
:root * {
|
|
5
|
+
font-size: 1rem;
|
|
6
|
+
}
|
|
4
7
|
:root, body {
|
|
8
|
+
|
|
5
9
|
overscroll-behavior-y: none;
|
|
6
10
|
|
|
7
|
-
font-size: ${(props) => props.device === "desktop" ? "
|
|
11
|
+
font-size: ${(props) => props.device === "desktop" ? "0.813rem" : "1rem"};
|
|
8
12
|
|
|
9
13
|
@media(min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
10
|
-
font-size: ${(props) => props.device === "mobile" ? "
|
|
14
|
+
font-size: ${(props) => props.device === "mobile" ? "1rem" : "0.813rem"};
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
}
|
|
18
|
+
|
|
19
|
+
/* fix sanitize */
|
|
20
|
+
::-webkit-input-placeholder {
|
|
21
|
+
opacity: 1;
|
|
22
|
+
}
|
|
14
23
|
`;
|
|
15
24
|
export {
|
|
16
25
|
GlobalStyles
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/globalStyles.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createGlobalStyle } from './ds-styled';\n\nexport const GlobalStyles = createGlobalStyle<{ device: 'desktop' | 'mobile' }>`\n :root, body {\n overscroll-behavior-y: none;\n\n font-size: ${(props) => (props.device === 'desktop' ? '
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,yBAAyB;AAE3B,MAAM,eAAe;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createGlobalStyle } from './ds-styled';\n\nexport const GlobalStyles = createGlobalStyle<{ device: 'desktop' | 'mobile' }>`\n :root * {\n font-size: 1rem;\n }\n :root, body {\n\n overscroll-behavior-y: none;\n\n font-size: ${(props) => (props.device === 'desktop' ? '0.813rem' : '1rem')};\n\n @media(min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => (props.device === 'mobile' ? '1rem' : '0.813rem')};\n }\n\n }\n\n /* fix sanitize */\n ::-webkit-input-placeholder {\n opacity: 1;\n }\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,yBAAyB;AAE3B,MAAM,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAQX,CAAC,UAAW,MAAM,WAAW,YAAY,aAAa;AAAA;AAAA,wBAE/C,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACtC,CAAC,UAAW,MAAM,WAAW,WAAW,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const desktopBaseFont = 13;
|
|
2
|
+
export declare const mobileBaseFont = 16;
|
|
3
|
+
export declare const translateUnits: {
|
|
4
|
+
'8px': string;
|
|
5
|
+
'16px': string;
|
|
6
|
+
'32px': string;
|
|
7
|
+
'48px': string;
|
|
8
|
+
'56px': string;
|
|
9
|
+
'64px': string;
|
|
10
|
+
'72px': string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { DSStyledConfig } from './types';
|
|
3
|
+
import type { StyledComponentInnerComponent, StyledComponentPropsWithRef } from 'styled-components';
|
|
4
|
+
type AttrsFunc = (props: StyledComponentPropsWithRef<StyledComponentInnerComponent<React.ComponentType<Record<string, unknown>>>>) => Partial<StyledComponentPropsWithRef<StyledComponentInnerComponent<any>>>;
|
|
5
|
+
export declare const generateAutoCalculatedProperties: (options: DSStyledConfig) => {
|
|
6
|
+
displayName: string | null;
|
|
7
|
+
attributes: AttrsFunc;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DSStyledFunction, DSStyledObject } from './types';
|
|
2
|
+
declare const css: import("styled-components").BaseThemedCssFunction<import("@xstyled/system").Theme>, createGlobalStyle: typeof import("styled-components").createGlobalStyle;
|
|
3
|
+
export declare const styled: DSStyledFunction & DSStyledObject;
|
|
4
|
+
export { css, createGlobalStyle };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AnyStyledComponent, StyledComponentInnerAttrs, StyledComponentInnerComponent, StyledComponentInnerOtherProps, CSSObject, StyledComponent, StyledComponentPropsWithRef, ThemedStyledProps, Interpolation, InterpolationFunction, StyledConfig } from 'styled-components';
|
|
3
|
+
import type { SpaceProps as XstyledSpace, MarginProps, MarginTopProps, MarginRightProps, MarginBottomProps, MarginLeftProps, MarginXProps, MarginYProps, PaddingProps, PaddingTopProps, PaddingRightProps, PaddingBottomProps, PaddingLeftProps, PaddingXProps, PaddingYProps, ColorProps as XstyledColor } from '@xstyled/system';
|
|
4
|
+
import type { Theme as PuiTheme } from '@elliemae/pui-theme';
|
|
5
|
+
export interface Theme extends PuiTheme {
|
|
6
|
+
components?: {
|
|
7
|
+
[componentName: string]: {
|
|
8
|
+
styleOverrides?: CSSObject;
|
|
9
|
+
variants?: {
|
|
10
|
+
props: Record<string, {
|
|
11
|
+
toString: () => string;
|
|
12
|
+
}>;
|
|
13
|
+
style: CSSObject;
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
type Attrs<P, A extends Partial<P>, T> = ((props: ThemedStyledProps<P, T>) => A) | A;
|
|
19
|
+
export interface DSStyledConfig {
|
|
20
|
+
name: string | null;
|
|
21
|
+
slot: string | null;
|
|
22
|
+
}
|
|
23
|
+
type ThemedStyledFunctionBase<C extends keyof JSX.IntrinsicElements | React.ComponentType<any>, T extends object, O extends object = Record<string, unknown>, A extends keyof any = never> = <U extends object>(first: TemplateStringsArray | CSSObject | InterpolationFunction<ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U, T>>, ...rest: Array<Interpolation<ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U, T>>>) => StyledComponent<C, T, O & U, A>;
|
|
24
|
+
interface ThemedStyledFunction<C extends keyof JSX.IntrinsicElements | React.ComponentType<any>, T extends object, O extends object = Record<string, unknown>, A extends keyof any = never> extends ThemedStyledFunctionBase<C, T, O, A> {
|
|
25
|
+
attrs<U, NewA extends Partial<StyledComponentPropsWithRef<C> & U> & {
|
|
26
|
+
[others: string]: any;
|
|
27
|
+
} = any>(attrs: Attrs<StyledComponentPropsWithRef<C> & U, NewA, T>): ThemedStyledFunction<C, T, O & NewA, A | keyof NewA>;
|
|
28
|
+
withConfig: <Props extends O = O>(config: StyledConfig<StyledComponentPropsWithRef<C> & Props>) => ThemedStyledFunction<C, T, Props, A>;
|
|
29
|
+
}
|
|
30
|
+
export type DSStyledFunction = <C extends AnyStyledComponent | keyof JSX.IntrinsicElements | React.ComponentType<any>>(tag: C, options?: DSStyledConfig) => ThemedStyledFunction<C extends AnyStyledComponent ? StyledComponentInnerComponent<C> : C, Theme, C extends AnyStyledComponent ? StyledComponentInnerOtherProps<C> : unknown, C extends AnyStyledComponent ? StyledComponentInnerAttrs<C> : never>;
|
|
31
|
+
export type DSStyledObject = {
|
|
32
|
+
[TTag in keyof JSX.IntrinsicElements]: ThemedStyledFunction<keyof JSX.IntrinsicElements, Theme>;
|
|
33
|
+
};
|
|
34
|
+
export type DSStyledFunctionInternal = (...args: Parameters<ReturnType<DSStyledFunction>>) => ReturnType<ReturnType<DSStyledFunction>>;
|
|
35
|
+
export type PropsWithTheme<T = Record<string, unknown>> = {
|
|
36
|
+
theme: Theme;
|
|
37
|
+
} & T;
|
|
38
|
+
export type ThProps = Required<PropsWithTheme>;
|
|
39
|
+
export type { FlattenSimpleInterpolation, FlattenInterpolation } from 'styled-components';
|
|
40
|
+
export type { LayoutProps, SizingProps, FontSizeProps, PositionProps, BoxShadowProps } from '@xstyled/system';
|
|
41
|
+
interface DummyColorTheme {
|
|
42
|
+
'neutral-100': true;
|
|
43
|
+
'neutral-200': true;
|
|
44
|
+
'neutral-300': true;
|
|
45
|
+
'neutral-400': true;
|
|
46
|
+
'neutral-500': true;
|
|
47
|
+
'neutral-600': true;
|
|
48
|
+
'neutral-700': true;
|
|
49
|
+
'neutral-800': true;
|
|
50
|
+
'neutral-000': true;
|
|
51
|
+
'neutral-050': true;
|
|
52
|
+
'neutral-080': true;
|
|
53
|
+
'brand-100': true;
|
|
54
|
+
'brand-200': true;
|
|
55
|
+
'brand-300': true;
|
|
56
|
+
'brand-400': true;
|
|
57
|
+
'brand-500': true;
|
|
58
|
+
'brand-600': true;
|
|
59
|
+
'brand-700': true;
|
|
60
|
+
'brand-800': true;
|
|
61
|
+
'success-300': true;
|
|
62
|
+
'success-900': true;
|
|
63
|
+
'warning-400': true;
|
|
64
|
+
'warning-600': true;
|
|
65
|
+
'warning-900': true;
|
|
66
|
+
'danger-200': true;
|
|
67
|
+
'danger-900': true;
|
|
68
|
+
}
|
|
69
|
+
interface MarginAndPaddings extends MarginProps, MarginTopProps, MarginRightProps, MarginBottomProps, MarginLeftProps, MarginXProps, MarginYProps, PaddingProps, PaddingTopProps, PaddingRightProps, PaddingBottomProps, PaddingLeftProps, PaddingXProps, PaddingYProps {
|
|
70
|
+
}
|
|
71
|
+
type SpacePropsT = {
|
|
72
|
+
[key in keyof XstyledSpace]?: XstyledSpace[key];
|
|
73
|
+
} & {
|
|
74
|
+
[key in keyof MarginAndPaddings]?: XstyledSpace[key] | keyof Theme['space'];
|
|
75
|
+
};
|
|
76
|
+
type ColorPropsT = {
|
|
77
|
+
[key in keyof XstyledColor]?: XstyledColor[key] | keyof DummyColorTheme;
|
|
78
|
+
};
|
|
79
|
+
export interface SpaceProps extends SpacePropsT {
|
|
80
|
+
}
|
|
81
|
+
export interface ColorProps extends ColorPropsT {
|
|
82
|
+
}
|
|
83
|
+
export interface BorderProps {
|
|
84
|
+
border?: string;
|
|
85
|
+
borderTop?: string;
|
|
86
|
+
borderBottom?: string;
|
|
87
|
+
borderRight?: string;
|
|
88
|
+
borderLeft?: string;
|
|
89
|
+
borderColor?: keyof DummyColorTheme;
|
|
90
|
+
borderTopColor?: keyof DummyColorTheme;
|
|
91
|
+
borderBottomColor?: keyof DummyColorTheme;
|
|
92
|
+
borderRightColor?: keyof DummyColorTheme;
|
|
93
|
+
borderLeftColor?: keyof DummyColorTheme;
|
|
94
|
+
borderStyle?: string;
|
|
95
|
+
borderTopStyle?: string;
|
|
96
|
+
borderBottomStyle?: string;
|
|
97
|
+
borderRightStyle?: string;
|
|
98
|
+
borderLeftStyle?: string;
|
|
99
|
+
borderWidth?: keyof Theme['space'];
|
|
100
|
+
borderTopWidth?: keyof Theme['space'];
|
|
101
|
+
borderBottomWidth?: keyof Theme['space'];
|
|
102
|
+
borderRightWidth?: keyof Theme['space'];
|
|
103
|
+
borderLeftWidth?: keyof Theme['space'];
|
|
104
|
+
borderRadius?: keyof Theme['space'];
|
|
105
|
+
}
|
|
106
|
+
export interface BackgroundProps {
|
|
107
|
+
backgroundColor?: keyof DummyColorTheme;
|
|
108
|
+
bg?: keyof DummyColorTheme;
|
|
109
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const background: import("@xstyled/system").StyleGenerator<{}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const borders: import("@xstyled/system").StyleGenerator<{}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const checkNamingConvention: (componentName: string | null, componentSlot: string | null) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Interpolation } from 'styled-components';
|
|
2
|
+
import type { Theme } from '../types';
|
|
3
|
+
export declare const isEmpty: (string: string) => boolean;
|
|
4
|
+
export declare const coerceWithDefaultTheme: (themeInput: Theme | undefined) => Theme;
|
|
5
|
+
export declare const stylesArgThemeCoercion: (stylesArg: Interpolation<any>) => Interpolation<any>;
|
|
6
|
+
export declare const propsToClassKey: (props: Record<string, {
|
|
7
|
+
toString: () => string;
|
|
8
|
+
}>) => string;
|
|
9
|
+
export declare const displayNameToKebabCase: (displayName: string) => string;
|
|
10
|
+
export declare const slotObjectToDataTestIds: (componentName: string, slotObject: Record<string, string>) => Record<string, string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './background';
|
|
2
|
+
export * from './border';
|
|
3
|
+
export * from './checkNamingConvention';
|
|
4
|
+
export * from './color';
|
|
5
|
+
export * from './helpers';
|
|
6
|
+
export * from './magicCssTransform';
|
|
7
|
+
export * from './resolvers';
|
|
8
|
+
export * from './sizing';
|
|
9
|
+
export * from './space';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CSSObject, Interpolation, InterpolationFunction } from 'styled-components';
|
|
2
|
+
type StyleArg = CSSObject | InterpolationFunction<any> | TemplateStringsArray;
|
|
3
|
+
type Expressions = Interpolation<any>[];
|
|
4
|
+
type MagicCssTransform = (styleArg: StyleArg, expressions: Expressions) => [StyleArg, Expressions];
|
|
5
|
+
export declare const magicCssTransform: MagicCssTransform;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CSSObject } from 'styled-components';
|
|
2
|
+
import type { Theme } from '../types';
|
|
3
|
+
export declare const getStyleOverrides: (name: string, theme: Theme) => CSSObject | null;
|
|
4
|
+
export declare const getVariantStyles: (name: string, theme: Theme) => Record<string, CSSObject>;
|
|
5
|
+
export declare const variantsResolver: (props: Record<string, unknown>, styles: CSSObject, theme: Theme, name: string) => CSSObject[keyof CSSObject][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sizing: import("@xstyled/system").StyleGenerator<{}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './globalStyles';
|
|
2
|
+
export * from './spaceUtilities';
|
|
3
|
+
export * from './mobileUtilities';
|
|
4
|
+
export * from './utils';
|
|
5
|
+
export * from './arithmetic';
|
|
6
|
+
export * from './th';
|
|
7
|
+
export * from './theme';
|
|
8
|
+
export * from './ds-styled';
|
|
9
|
+
export { position, typography } from '@xstyled/system';
|
|
10
|
+
export { themeProviderHOC } from './themeProviderHOC';
|
|
11
|
+
export { ThemeContext } from '@xstyled/styled-components';
|
|
12
|
+
export { xStyledCommonProps, XStyledWrapper } from './xStyledWrapper';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function mapGap(gutter: number | string): number | string;
|
|
2
|
+
export declare function mapGutter(gutter: string | number | undefined): string;
|
|
3
|
+
export declare function mapSpace(width: string | number): string;
|
|
4
|
+
export declare function fixSpaceGutter(width: string | number | string[] | number[], gutter?: string | number): string | string[];
|
|
5
|
+
export declare function fixSpace(width: string | number | string[] | number[]): string | string[];
|
|
6
|
+
export declare function numbersToFr(grid: number[]): string[];
|
|
7
|
+
export declare function mapGrid(width: string | number): string;
|
|
8
|
+
export declare function mapTemplateGrid(grid: (number | string)[]): string | string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Theme } from '@elliemae/pui-theme';
|
|
2
|
+
import type { PropsWithTheme } from './ds-styled';
|
|
3
|
+
export declare const hexToRgba: (hex: string, alpha: string) => string;
|
|
4
|
+
type ThemeStringGetter = ({ theme }: PropsWithTheme) => string;
|
|
5
|
+
type ThGetter = (value: string, dfault?: string) => ThemeStringGetter;
|
|
6
|
+
type ThConstructor = ((property: keyof Theme) => ThGetter) & {
|
|
7
|
+
space: ThGetter;
|
|
8
|
+
fontSize: ThGetter;
|
|
9
|
+
fontWeight: ThGetter;
|
|
10
|
+
lineHeight: ThGetter;
|
|
11
|
+
letterSpacing: ThGetter;
|
|
12
|
+
font: ThGetter;
|
|
13
|
+
color: ThGetter;
|
|
14
|
+
breakpoint: ThGetter;
|
|
15
|
+
media: ThGetter;
|
|
16
|
+
zIndex: ThGetter;
|
|
17
|
+
};
|
|
18
|
+
export declare const th: ThConstructor;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Theme } from '@elliemae/pui-theme';
|
|
2
|
+
import { rgba } from 'polished';
|
|
3
|
+
import type { Keyframes, FlattenSimpleInterpolation } from 'styled-components';
|
|
4
|
+
import { withTheme, keyframes as kfrm, useTheme } from '@xstyled/styled-components';
|
|
5
|
+
import { theme } from './theme';
|
|
6
|
+
export { withTheme, rgba, useTheme, kfrm };
|
|
7
|
+
type PropsWithTheme<T = Record<string, unknown>> = T & {
|
|
8
|
+
theme: Theme;
|
|
9
|
+
};
|
|
10
|
+
export declare function truncate(width?: string): (props: PropsWithTheme<{
|
|
11
|
+
width?: string;
|
|
12
|
+
}>) => FlattenSimpleInterpolation;
|
|
13
|
+
export declare function flexCenter(): string;
|
|
14
|
+
export declare function disabled(): string;
|
|
15
|
+
export declare function keyframes(obj: Record<string, string>): Keyframes;
|
|
16
|
+
export declare function boxShadow(top: string, left: string, blur: string, color: string, inset?: boolean): string;
|
|
17
|
+
export declare function border(color?: string, size?: string, type?: string): string;
|
|
18
|
+
export declare function animation(animationKeyframes: string, animationLength: string, animationTimingFn: string): (props: {
|
|
19
|
+
animationKeyframes?: string;
|
|
20
|
+
animationLength?: string;
|
|
21
|
+
animationTimingFn?: string;
|
|
22
|
+
}) => FlattenSimpleInterpolation;
|
|
23
|
+
export declare function focus(color?: string): () => FlattenSimpleInterpolation;
|
|
24
|
+
export declare function focusAfter(color: string): import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<import("@xstyled/system").Theme>>;
|
|
25
|
+
export declare function active(): (props: PropsWithTheme) => FlattenSimpleInterpolation;
|
|
26
|
+
export declare function hover(): (props: PropsWithTheme) => FlattenSimpleInterpolation;
|
|
27
|
+
export declare function textStyle(type: string, weight?: keyof Theme['fontWeights']): (props: {
|
|
28
|
+
theme: Theme;
|
|
29
|
+
}) => string;
|
|
30
|
+
export declare function iconColor(variant?: string, type?: number): import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<{
|
|
31
|
+
theme: import("./ds-styled").Theme;
|
|
32
|
+
} & Record<string, unknown>, import("@xstyled/system").Theme>>;
|
|
33
|
+
export declare function fakeBorder(): import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<import("@xstyled/system").Theme>>;
|
|
34
|
+
export declare function fakeActive(): import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<import("@xstyled/system").Theme>>;
|
|
35
|
+
export declare function clearFocus(): string;
|
|
36
|
+
export declare function buttonLink(): string;
|
|
37
|
+
export declare function transition(t?: string): string;
|
|
38
|
+
export declare const onlySafariAndFirefox: (styles: string) => FlattenSimpleInterpolation;
|
|
39
|
+
export declare const onlySafari: (styles: string) => string;
|
|
40
|
+
export declare const onlyFirefox: (styles: string) => string;
|
|
41
|
+
export declare const safariAndFirefoxBold: (color: string) => string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const XStyledWrapper: import("styled-components").StyledComponent<"div", import(".").Theme, import("@xstyled/util").Props<import("@xstyled/system").Theme> & import("@xstyled/system").TypographyProps<import("@xstyled/system").Theme>, never>;
|
|
2
|
+
export declare const xStyledCommonProps: import("@xstyled/system").StyleGenerator<import("@xstyled/system").TypographyProps<import("@xstyled/system").Theme> & import(".").SpaceProps & import("@xstyled/system").BoxShadowProps<import("@xstyled/system").Theme> & import("@xstyled/system").FlexboxesProps<import("@xstyled/system").Theme> & import("@xstyled/system").LayoutProps<import("@xstyled/system").Theme> & import(".").ColorProps>;
|
|
3
|
+
export default XStyledWrapper;
|