@elliemae/ds-system 3.9.0 → 3.10.0-next.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/ds-styled/types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type {\n AnyStyledComponent,\n StyledComponentInnerAttrs,\n StyledComponentInnerComponent,\n StyledComponentInnerOtherProps,\n CSSObject,\n StyledComponent,\n StyledComponentPropsWithRef,\n ThemedStyledProps,\n Interpolation,\n InterpolationFunction,\n StyledConfig,\n} from 'styled-components';\nimport type { SpaceProps as XstyledSpace, ColorProps as XstyledColor } from '@xstyled/system';\nimport type { Theme as PuiTheme } from '@elliemae/pui-theme';\n\nexport interface Theme extends PuiTheme {\n components?: {\n [componentName: string]: {\n styleOverrides?: CSSObject;\n variants?: { props: Record<string, { toString: () => string }>; style: CSSObject }[];\n };\n };\n}\n\ntype Attrs<P, A extends Partial<P>, T> = ((props: ThemedStyledProps<P, T>) => A) | A;\n\ninterface DSStyledConfig {\n name: string | null;\n slot: string | null;\n}\n\ntype ThemedStyledFunctionBase<\n C extends keyof JSX.IntrinsicElements | React.ComponentType<any>,\n T extends object,\n O extends object = Record<string, unknown>,\n A extends keyof any = never,\n> = <U extends object>(\n first:\n | TemplateStringsArray\n | CSSObject\n | InterpolationFunction<ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U, T>>,\n ...rest: Array<Interpolation<ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U, T>>>\n) => StyledComponent<C, T, O & U, A>;\n\ninterface ThemedStyledFunction<\n C extends keyof JSX.IntrinsicElements | React.ComponentType<any>,\n T extends object,\n O extends object = Record<string, unknown>,\n A extends keyof any = never,\n> extends ThemedStyledFunctionBase<C, T, O, A> {\n // Fun thing: 'attrs' can also provide a polymorphic 'as' prop\n // My head already hurts enough so maybe later...\n attrs<\n U,\n NewA extends Partial<StyledComponentPropsWithRef<C> & U> & {\n [others: string]: any;\n } = any,\n >(\n attrs: Attrs<StyledComponentPropsWithRef<C> & U, NewA, T>,\n ): ThemedStyledFunction<C, T, O & NewA, A | keyof NewA>;\n\n withConfig: <Props extends O = O>(\n config: StyledConfig<StyledComponentPropsWithRef<C> & Props>,\n ) => ThemedStyledFunction<C, T, Props, A>;\n}\n\nexport type DSStyledFunction = <C extends AnyStyledComponent | keyof JSX.IntrinsicElements | React.ComponentType<any>>(\n tag: C,\n options?: DSStyledConfig,\n) => ThemedStyledFunction<\n C extends AnyStyledComponent ? StyledComponentInnerComponent<C> : C,\n Theme,\n C extends AnyStyledComponent ? StyledComponentInnerOtherProps<C> : unknown,\n C extends AnyStyledComponent ? StyledComponentInnerAttrs<C> : never\n>;\n\nexport type DSStyledObject = {\n [TTag in keyof JSX.IntrinsicElements]: ThemedStyledFunction<keyof JSX.IntrinsicElements, Theme>;\n};\n\nexport type DSStyledFunctionInternal = (\n ...args: Parameters<ReturnType<DSStyledFunction>>\n) => ReturnType<ReturnType<DSStyledFunction>>;\n\nexport type PropsWithTheme<T = Record<string, unknown>> = { theme: Theme } & T;\n\nexport type ThProps = Required<PropsWithTheme>;\n\nexport type { FlattenSimpleInterpolation, FlattenInterpolation } from 'styled-components';\n\nexport type { LayoutProps, SizingProps, FontSizeProps } from '@xstyled/system';\n\ninterface DummyColorTheme {\n 'neutral-100': true;\n 'neutral-200': true;\n 'neutral-300': true;\n 'neutral-400': true;\n 'neutral-500': true;\n 'neutral-600': true;\n 'neutral-700': true;\n 'neutral-800': true;\n 'neutral-000': true;\n 'neutral-050': true;\n 'neutral-080': true;\n 'brand-100': true;\n 'brand-200': true;\n 'brand-300': true;\n 'brand-400': true;\n 'brand-500': true;\n 'brand-600': true;\n 'brand-700': true;\n 'brand-800': true;\n 'success-300': true;\n 'success-900': true;\n 'warning-400': true;\n 'warning-600': true;\n 'warning-900': true;\n 'danger-200': true;\n 'danger-900': true;\n}\n\n// Redeclaring types as interfaces to prevent TS errors\n\ntype SpacePropsT = XstyledSpace & {\n [key in keyof XstyledSpace]: keyof Theme['space'];\n};\n\ntype ColorPropsT = XstyledColor & {\n [key in keyof XstyledColor]: keyof DummyColorTheme;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface SpaceProps extends SpacePropsT {}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface ColorProps extends ColorPropsT {}\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type {\n AnyStyledComponent,\n StyledComponentInnerAttrs,\n StyledComponentInnerComponent,\n StyledComponentInnerOtherProps,\n CSSObject,\n StyledComponent,\n StyledComponentPropsWithRef,\n ThemedStyledProps,\n Interpolation,\n InterpolationFunction,\n StyledConfig,\n} from 'styled-components';\nimport type { SpaceProps as XstyledSpace, ColorProps as XstyledColor } from '@xstyled/system';\nimport type { Theme as PuiTheme } from '@elliemae/pui-theme';\n\nexport interface Theme extends PuiTheme {\n components?: {\n [componentName: string]: {\n styleOverrides?: CSSObject;\n variants?: { props: Record<string, { toString: () => string }>; style: CSSObject }[];\n };\n };\n}\n\ntype Attrs<P, A extends Partial<P>, T> = ((props: ThemedStyledProps<P, T>) => A) | A;\n\ninterface DSStyledConfig {\n name: string | null;\n slot: string | null;\n}\n\ntype ThemedStyledFunctionBase<\n C extends keyof JSX.IntrinsicElements | React.ComponentType<any>,\n T extends object,\n O extends object = Record<string, unknown>,\n A extends keyof any = never,\n> = <U extends object>(\n first:\n | TemplateStringsArray\n | CSSObject\n | InterpolationFunction<ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U, T>>,\n ...rest: Array<Interpolation<ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U, T>>>\n) => StyledComponent<C, T, O & U, A>;\n\ninterface ThemedStyledFunction<\n C extends keyof JSX.IntrinsicElements | React.ComponentType<any>,\n T extends object,\n O extends object = Record<string, unknown>,\n A extends keyof any = never,\n> extends ThemedStyledFunctionBase<C, T, O, A> {\n // Fun thing: 'attrs' can also provide a polymorphic 'as' prop\n // My head already hurts enough so maybe later...\n attrs<\n U,\n NewA extends Partial<StyledComponentPropsWithRef<C> & U> & {\n [others: string]: any;\n } = any,\n >(\n attrs: Attrs<StyledComponentPropsWithRef<C> & U, NewA, T>,\n ): ThemedStyledFunction<C, T, O & NewA, A | keyof NewA>;\n\n withConfig: <Props extends O = O>(\n config: StyledConfig<StyledComponentPropsWithRef<C> & Props>,\n ) => ThemedStyledFunction<C, T, Props, A>;\n}\n\nexport type DSStyledFunction = <C extends AnyStyledComponent | keyof JSX.IntrinsicElements | React.ComponentType<any>>(\n tag: C,\n options?: DSStyledConfig,\n) => ThemedStyledFunction<\n C extends AnyStyledComponent ? StyledComponentInnerComponent<C> : C,\n Theme,\n C extends AnyStyledComponent ? StyledComponentInnerOtherProps<C> : unknown,\n C extends AnyStyledComponent ? StyledComponentInnerAttrs<C> : never\n>;\n\nexport type DSStyledObject = {\n [TTag in keyof JSX.IntrinsicElements]: ThemedStyledFunction<keyof JSX.IntrinsicElements, Theme>;\n};\n\nexport type DSStyledFunctionInternal = (\n ...args: Parameters<ReturnType<DSStyledFunction>>\n) => ReturnType<ReturnType<DSStyledFunction>>;\n\nexport type PropsWithTheme<T = Record<string, unknown>> = { theme: Theme } & T;\n\nexport type ThProps = Required<PropsWithTheme>;\n\nexport type { FlattenSimpleInterpolation, FlattenInterpolation } from 'styled-components';\n\nexport type { LayoutProps, SizingProps, FontSizeProps, PositionProps } from '@xstyled/system';\n\ninterface DummyColorTheme {\n 'neutral-100': true;\n 'neutral-200': true;\n 'neutral-300': true;\n 'neutral-400': true;\n 'neutral-500': true;\n 'neutral-600': true;\n 'neutral-700': true;\n 'neutral-800': true;\n 'neutral-000': true;\n 'neutral-050': true;\n 'neutral-080': true;\n 'brand-100': true;\n 'brand-200': true;\n 'brand-300': true;\n 'brand-400': true;\n 'brand-500': true;\n 'brand-600': true;\n 'brand-700': true;\n 'brand-800': true;\n 'success-300': true;\n 'success-900': true;\n 'warning-400': true;\n 'warning-600': true;\n 'warning-900': true;\n 'danger-200': true;\n 'danger-900': true;\n}\n\n// Redeclaring types as interfaces to prevent TS errors\n\ntype SpacePropsT = XstyledSpace & {\n [key in keyof XstyledSpace]: keyof Theme['space'];\n};\n\ntype ColorPropsT = XstyledColor & {\n [key in keyof XstyledColor]: keyof DummyColorTheme;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface SpaceProps extends SpacePropsT {}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface ColorProps extends ColorPropsT {}\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-system",
3
- "version": "3.9.0",
3
+ "version": "3.10.0-next.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - System",
6
6
  "files": [