@elliemae/ds-system 3.70.0-next.60 → 3.70.0-next.62

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/styled/system-types.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type {\n SpaceProps as XstyledSpace,\n MarginProps,\n MarginTopProps,\n MarginRightProps,\n MarginBottomProps,\n MarginLeftProps,\n MarginXProps,\n MarginYProps,\n PaddingProps,\n PaddingTopProps,\n PaddingRightProps,\n PaddingBottomProps,\n PaddingLeftProps,\n PaddingXProps,\n PaddingYProps,\n ColorProps as XstyledColor,\n TypographyProps,\n FlexboxesProps,\n} from '@xstyled/system';\nimport type { Theme } from './types.js';\n\nexport type { FlattenSimpleInterpolation, FlattenInterpolation } from 'styled-components';\n\nexport type {\n LayoutProps,\n SizingProps,\n FontSizeProps,\n FontWeightProps,\n PositionProps,\n BoxShadowProps,\n LineHeightProps,\n TextAlignProps,\n} from '@xstyled/system';\n\nexport interface 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\ntype AllColors =\n | keyof DummyColorTheme\n | `${keyof DummyColorTheme}-${string}`\n | `#${string}`\n | `rgba(${string})`\n | `rgb(${string})`;\n\ntype AllMeasures =\n | keyof Theme['space']\n | `${number}%`\n | `${number}em`\n | `${number}px`\n | `${number}rem`\n | `${number}vh`\n | `${number}vw`\n | `${number}vmin`\n | `${number}vmax`;\n\n// Redeclaring types as interfaces to prevent TS errors\n\ninterface MarginAndPaddings\n extends MarginProps,\n MarginTopProps,\n MarginRightProps,\n MarginBottomProps,\n MarginLeftProps,\n MarginXProps,\n MarginYProps,\n PaddingProps,\n PaddingTopProps,\n PaddingRightProps,\n PaddingBottomProps,\n PaddingLeftProps,\n PaddingXProps,\n PaddingYProps {}\n\ntype SpacePropsT = {\n [key in keyof XstyledSpace]?: XstyledSpace[key];\n} & {\n [key in keyof MarginAndPaddings]?: XstyledSpace[key] | AllMeasures;\n};\n\ntype ColorPropsT = {\n [key in keyof XstyledColor]?: XstyledColor[key] | AllColors;\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\nexport interface BorderProps {\n border?: string;\n borderTop?: string;\n borderBottom?: string;\n borderRight?: string;\n borderLeft?: string;\n borderColor?: AllColors;\n borderTopColor?: AllColors;\n borderBottomColor?: AllColors;\n borderRightColor?: AllColors;\n borderLeftColor?: AllColors;\n borderStyle?: string;\n borderTopStyle?: string;\n borderBottomStyle?: string;\n borderRightStyle?: string;\n borderLeftStyle?: string;\n borderWidth?: AllMeasures;\n borderTopWidth?: AllMeasures;\n borderBottomWidth?: AllMeasures;\n borderRightWidth?: AllMeasures;\n borderLeftWidth?: AllMeasures;\n borderRadius?: string;\n}\n\nexport interface BackgroundProps {\n backgroundColor?: AllColors;\n bg?: AllColors;\n}\n\nexport type { TypographyProps, FlexboxesProps };\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import type {\n SpaceProps as XstyledSpace,\n MarginProps,\n MarginTopProps,\n MarginRightProps,\n MarginBottomProps,\n MarginLeftProps,\n MarginXProps,\n MarginYProps,\n PaddingProps,\n PaddingTopProps,\n PaddingRightProps,\n PaddingBottomProps,\n PaddingLeftProps,\n PaddingXProps,\n PaddingYProps,\n ColorProps as XstyledColor,\n TypographyProps,\n FlexboxesProps,\n} from '@xstyled/system';\nimport type { Theme } from './types.js';\n\nexport type { FlattenSimpleInterpolation, FlattenInterpolation } from 'styled-components';\n\nexport type {\n LayoutProps,\n SizingProps,\n FontSizeProps,\n FontWeightProps,\n PositionProps,\n BoxShadowProps,\n LineHeightProps,\n TextAlignProps,\n} from '@xstyled/system';\n\nexport interface 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\ntype AllColors =\n keyof DummyColorTheme | `${keyof DummyColorTheme}-${string}` | `#${string}` | `rgba(${string})` | `rgb(${string})`;\n\ntype AllMeasures =\n | keyof Theme['space']\n | `${number}%`\n | `${number}em`\n | `${number}px`\n | `${number}rem`\n | `${number}vh`\n | `${number}vw`\n | `${number}vmin`\n | `${number}vmax`;\n\n// Redeclaring types as interfaces to prevent TS errors\n\ninterface MarginAndPaddings\n extends\n MarginProps,\n MarginTopProps,\n MarginRightProps,\n MarginBottomProps,\n MarginLeftProps,\n MarginXProps,\n MarginYProps,\n PaddingProps,\n PaddingTopProps,\n PaddingRightProps,\n PaddingBottomProps,\n PaddingLeftProps,\n PaddingXProps,\n PaddingYProps {}\n\ntype SpacePropsT = {\n [key in keyof XstyledSpace]?: XstyledSpace[key];\n} & {\n [key in keyof MarginAndPaddings]?: XstyledSpace[key] | AllMeasures;\n};\n\ntype ColorPropsT = {\n [key in keyof XstyledColor]?: XstyledColor[key] | AllColors;\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\nexport interface BorderProps {\n border?: string;\n borderTop?: string;\n borderBottom?: string;\n borderRight?: string;\n borderLeft?: string;\n borderColor?: AllColors;\n borderTopColor?: AllColors;\n borderBottomColor?: AllColors;\n borderRightColor?: AllColors;\n borderLeftColor?: AllColors;\n borderStyle?: string;\n borderTopStyle?: string;\n borderBottomStyle?: string;\n borderRightStyle?: string;\n borderLeftStyle?: string;\n borderWidth?: AllMeasures;\n borderTopWidth?: AllMeasures;\n borderBottomWidth?: AllMeasures;\n borderRightWidth?: AllMeasures;\n borderLeftWidth?: AllMeasures;\n borderRadius?: string;\n}\n\nexport interface BackgroundProps {\n backgroundColor?: AllColors;\n bg?: AllColors;\n}\n\nexport type { TypographyProps, FlexboxesProps };\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/styled/types.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { Theme as PuiTheme } from '@elliemae/pui-theme';\nimport type React from 'react';\nimport type { ElementType, Ref } from 'react';\nimport type {\n AnyStyledComponent,\n CSSObject,\n Interpolation,\n InterpolationFunction,\n StyledComponent,\n StyledComponentInnerComponent,\n StyledComponentPropsWithRef,\n ThemedStyledProps,\n} from 'styled-components';\n\nexport interface Options {\n name: string | null;\n slot: string | null;\n preserveLegacyDataTestId?: boolean;\n}\n\nexport interface Theme extends PuiTheme {\n layoutMode?: 'l' | 'm' | 's' | 'xs';\n components?: {\n [componentName: string]: {\n styleOverrides?: CSSObject;\n variants?: { props: Record<string, { toString: () => string }>; style: CSSObject }[];\n };\n };\n}\n\nexport type AnyStyledRef<T extends HTMLElement> =\n | React.MutableRefObject<T | null>\n | ((_ref: T | null) => void)\n | false\n | null;\n\nexport type StyleArg<T = any> = TemplateStringsArray | CSSObject | InterpolationFunction<T>;\nexport type Expression<T = any> = Interpolation<T>;\nexport type Expressions<T = any> = Array<Expression<T>>;\nexport type ThemedExpression<T = unknown> = Interpolation<ThemedStyledProps<T, Theme>>;\nexport type PropsWithTheme<T = Record<string, unknown>> = T & { theme: Theme };\n\ntype ComponentInnerRef<T extends ElementType> = T extends new (props: infer P) => React.Component<any, any>\n ? Ref<InstanceType<T>> | undefined\n : React.PropsWithRef<React.ComponentProps<T>>['ref'];\n\nexport type StyledComponentInnerRef<C extends keyof React.JSX.IntrinsicElements | React.ComponentType<any>> =\n C extends AnyStyledComponent ? ComponentInnerRef<StyledComponentInnerComponent<C>> : ComponentInnerRef<C>;\n\nexport interface ThemedStyledFunctionBase<\n C extends keyof React.JSX.IntrinsicElements | React.ComponentType<any>,\n T extends object,\n O extends object = {},\n A extends keyof any = never,\n> {\n <U extends object>(\n first: StyleArg<\n ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U & OwnerInterface & InnerRefInterface<C>, T>\n >,\n ...rest: Expressions<\n ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U & OwnerInterface & InnerRefInterface<C>, T>\n >\n ): StyledComponent<C, T, O & U & OwnerInterface & InnerRefInterface<C>, A>;\n}\n\nexport type AttrsFunc<T extends object = Record<string, unknown>> = (\n props: StyledComponentPropsWithRef<StyledComponentInnerComponent<React.ComponentType<T>>>,\n) => Partial<StyledComponentPropsWithRef<StyledComponentInnerComponent<any>>>;\n\nexport type InternalAttrsFunc<T extends object = Record<string, unknown>> = (\n props: StyledComponentPropsWithRef<\n StyledComponentInnerComponent<React.ComponentType<T & { ref?: AnyStyledRef<HTMLElement> }>>\n >,\n meta: {\n options: Options;\n displayName: string | null;\n },\n) => Partial<StyledComponentPropsWithRef<StyledComponentInnerComponent<any>>>;\n\nexport interface InnerRefInterface<C extends keyof React.JSX.IntrinsicElements | React.ComponentType<any>> {\n innerRef?: StyledComponentInnerRef<C>;\n ref?: never;\n}\n\nexport interface OwnerInterface {\n getOwnerProps?: () => object;\n getOwnerPropsArguments?: () => object;\n}\n\nexport type PartProps = Record<string, unknown> | ((args: object) => Record<string, unknown>) | null | undefined;\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { Theme as PuiTheme } from '@elliemae/pui-theme';\nimport type React from 'react';\nimport type { ElementType, Ref } from 'react';\nimport type {\n AnyStyledComponent,\n CSSObject,\n Interpolation,\n InterpolationFunction,\n StyledComponent,\n StyledComponentInnerComponent,\n StyledComponentPropsWithRef,\n ThemedStyledProps,\n} from 'styled-components';\n\nexport interface Options {\n name: string | null;\n slot: string | null;\n preserveLegacyDataTestId?: boolean;\n}\n\nexport interface Theme extends PuiTheme {\n layoutMode?: 'l' | 'm' | 's' | 'xs';\n components?: {\n [componentName: string]: {\n styleOverrides?: CSSObject;\n variants?: { props: Record<string, { toString: () => string }>; style: CSSObject }[];\n };\n };\n}\n\nexport type AnyStyledRef<T extends HTMLElement> =\n React.MutableRefObject<T | null> | ((_ref: T | null) => void) | false | null;\n\nexport type StyleArg<T = any> = TemplateStringsArray | CSSObject | InterpolationFunction<T>;\nexport type Expression<T = any> = Interpolation<T>;\nexport type Expressions<T = any> = Array<Expression<T>>;\nexport type ThemedExpression<T = unknown> = Interpolation<ThemedStyledProps<T, Theme>>;\nexport type PropsWithTheme<T = Record<string, unknown>> = T & { theme: Theme };\n\ntype ComponentInnerRef<T extends ElementType> = T extends new (props: infer P) => React.Component<any, any>\n ? Ref<InstanceType<T>> | undefined\n : React.PropsWithRef<React.ComponentProps<T>>['ref'];\n\nexport type StyledComponentInnerRef<C extends keyof React.JSX.IntrinsicElements | React.ComponentType<any>> =\n C extends AnyStyledComponent ? ComponentInnerRef<StyledComponentInnerComponent<C>> : ComponentInnerRef<C>;\n\nexport interface ThemedStyledFunctionBase<\n C extends keyof React.JSX.IntrinsicElements | React.ComponentType<any>,\n T extends object,\n O extends object = {},\n A extends keyof any = never,\n> {\n <U extends object>(\n first: StyleArg<\n ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U & OwnerInterface & InnerRefInterface<C>, T>\n >,\n ...rest: Expressions<\n ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U & OwnerInterface & InnerRefInterface<C>, T>\n >\n ): StyledComponent<C, T, O & U & OwnerInterface & InnerRefInterface<C>, A>;\n}\n\nexport type AttrsFunc<T extends object = Record<string, unknown>> = (\n props: StyledComponentPropsWithRef<StyledComponentInnerComponent<React.ComponentType<T>>>,\n) => Partial<StyledComponentPropsWithRef<StyledComponentInnerComponent<any>>>;\n\nexport type InternalAttrsFunc<T extends object = Record<string, unknown>> = (\n props: StyledComponentPropsWithRef<\n StyledComponentInnerComponent<React.ComponentType<T & { ref?: AnyStyledRef<HTMLElement> }>>\n >,\n meta: {\n options: Options;\n displayName: string | null;\n },\n) => Partial<StyledComponentPropsWithRef<StyledComponentInnerComponent<any>>>;\n\nexport interface InnerRefInterface<C extends keyof React.JSX.IntrinsicElements | React.ComponentType<any>> {\n innerRef?: StyledComponentInnerRef<C>;\n ref?: never;\n}\n\nexport interface OwnerInterface {\n getOwnerProps?: () => object;\n getOwnerPropsArguments?: () => object;\n}\n\nexport type PartProps = Record<string, unknown> | ((args: object) => Record<string, unknown>) | null | undefined;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
6
6
  "names": []
7
7
  }
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(useGetLayoutMode_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_styled_components = require("@xstyled/styled-components");
36
36
  const useGetLayoutMode = () => {
37
- const { layoutMode } = (0, import_styled_components.useTheme)();
38
- return layoutMode;
37
+ const theme = (0, import_styled_components.useTheme)();
38
+ return theme?.layoutMode;
39
39
  };
40
40
  //# sourceMappingURL=useGetLayoutMode.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/useGetLayoutMode.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useTheme } from '@xstyled/styled-components';\n\nexport const useGetLayoutMode = () => {\n const { layoutMode } = useTheme();\n return layoutMode;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAyB;AAElB,MAAM,mBAAmB,MAAM;AACpC,QAAM,EAAE,WAAW,QAAI,mCAAS;AAChC,SAAO;AACT;",
4
+ "sourcesContent": ["import { useTheme } from '@xstyled/styled-components';\n\nexport const useGetLayoutMode = () => {\n const theme = useTheme();\n // when running useTheme, it may return undefined if executed without a ThemeProvider wrapping.\n // if that is the case, theme will be undefined and layoutMode will also be undefined.\n return theme?.layoutMode;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAyB;AAElB,MAAM,mBAAmB,MAAM;AACpC,QAAM,YAAQ,mCAAS;AAGvB,SAAO,OAAO;AAChB;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { useTheme } from "@xstyled/styled-components";
3
3
  const useGetLayoutMode = () => {
4
- const { layoutMode } = useTheme();
5
- return layoutMode;
4
+ const theme = useTheme();
5
+ return theme?.layoutMode;
6
6
  };
7
7
  export {
8
8
  useGetLayoutMode
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/useGetLayoutMode.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useTheme } from '@xstyled/styled-components';\n\nexport const useGetLayoutMode = () => {\n const { layoutMode } = useTheme();\n return layoutMode;\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,gBAAgB;AAElB,MAAM,mBAAmB,MAAM;AACpC,QAAM,EAAE,WAAW,IAAI,SAAS;AAChC,SAAO;AACT;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useTheme } from '@xstyled/styled-components';\n\nexport const useGetLayoutMode = () => {\n const theme = useTheme();\n // when running useTheme, it may return undefined if executed without a ThemeProvider wrapping.\n // if that is the case, theme will be undefined and layoutMode will also be undefined.\n return theme?.layoutMode;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,gBAAgB;AAElB,MAAM,mBAAmB,MAAM;AACpC,QAAM,QAAQ,SAAS;AAGvB,SAAO,OAAO;AAChB;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-system",
3
- "version": "3.70.0-next.60",
3
+ "version": "3.70.0-next.62",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - System",
6
6
  "files": [
@@ -48,8 +48,8 @@
48
48
  "@elliemae/pui-theme": "~2.13.0",
49
49
  "jest": "^30.0.0",
50
50
  "styled-components": "~5.3.11",
51
- "@elliemae/ds-monorepo-devops": "3.70.0-next.60",
52
- "@elliemae/ds-typescript-helpers": "3.70.0-next.60"
51
+ "@elliemae/ds-monorepo-devops": "3.70.0-next.62",
52
+ "@elliemae/ds-typescript-helpers": "3.70.0-next.62"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@elliemae/pui-theme": "~2.13.0",