@elliemae/ds-system 3.51.0-next.2 → 3.51.0-next.3
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/HtmlComponents.js +1 -1
- package/dist/cjs/HtmlComponents.js.map +2 -2
- package/dist/cjs/styled/styledFunction.js +4 -4
- package/dist/cjs/styled/styledFunction.js.map +2 -2
- package/dist/cjs/styled/styledObject.js.map +2 -2
- package/dist/cjs/styled/types.js.map +1 -1
- package/dist/cjs/themeProviderHOC.js.map +2 -2
- package/dist/cjs/xStyledWrapper.js.map +2 -2
- package/dist/esm/HtmlComponents.js +1 -1
- package/dist/esm/HtmlComponents.js.map +2 -2
- package/dist/esm/styled/styledFunction.js +4 -4
- package/dist/esm/styled/styledFunction.js.map +2 -2
- package/dist/esm/styled/styledObject.js.map +2 -2
- package/dist/esm/themeProviderHOC.js.map +2 -2
- package/dist/esm/xStyledWrapper.js.map +2 -2
- package/dist/types/HtmlComponents.d.ts +58 -58
- package/dist/types/styled/styled.d.ts +1 -1
- package/dist/types/styled/styledFunction.d.ts +2 -2
- package/dist/types/styled/styledObject.d.ts +2 -2
- package/dist/types/styled/types.d.ts +3 -3
- package/dist/types/themeProviderHOC.d.ts +1 -1
- package/dist/types/useGetLayoutMode.d.ts +1 -1
- package/package.json +2 -54
|
@@ -89,7 +89,7 @@ __export(HtmlComponents_exports, {
|
|
|
89
89
|
});
|
|
90
90
|
module.exports = __toCommonJS(HtmlComponents_exports);
|
|
91
91
|
var React = __toESM(require("react"));
|
|
92
|
-
var import_styled = require("./styled/
|
|
92
|
+
var import_styled = require("./styled/styled.js");
|
|
93
93
|
var import_xStyledWrapper = require("./xStyledWrapper.js");
|
|
94
94
|
const Address = (0, import_styled.styled)("address")`
|
|
95
95
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/HtmlComponents.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type {} from '@xstyled/system';\nimport type {} from '@xstyled/util';\nimport { styled } from './styled/styled.js';\nimport { xStyledCommonProps } from './xStyledWrapper.js';\n\nexport const Address = styled('address')`\n ${xStyledCommonProps}\n`;\nexport const Article = styled('article')`\n ${xStyledCommonProps}\n`;\nexport const Aside = styled('aside')`\n ${xStyledCommonProps}\n`;\nexport const Footer = styled('footer')`\n ${xStyledCommonProps}\n`;\nexport const Header = styled('header')`\n ${xStyledCommonProps}\n`;\nexport const H1 = styled('h1')`\n ${xStyledCommonProps}\n`;\nexport const H2 = styled('h2')`\n ${xStyledCommonProps}\n`;\nexport const H3 = styled('h3')`\n ${xStyledCommonProps}\n`;\nexport const H4 = styled('h4')`\n ${xStyledCommonProps}\n`;\nexport const H5 = styled('h5')`\n ${xStyledCommonProps}\n`;\nexport const H6 = styled('h6')`\n ${xStyledCommonProps}\n`;\nexport const Hgroup = styled('hgroup')`\n ${xStyledCommonProps}\n`;\nexport const Main = styled('main')`\n ${xStyledCommonProps}\n`;\nexport const Nav = styled('nav')`\n ${xStyledCommonProps}\n`;\nexport const Section = styled('section')`\n ${xStyledCommonProps}\n`;\n\nexport const Search = styled('search')`\n ${xStyledCommonProps}\n`;\nexport const Blockquote = styled('blockquote')`\n ${xStyledCommonProps}\n`;\nexport const Dd = styled('dd')`\n ${xStyledCommonProps}\n`;\nexport const Div = styled('div')`\n ${xStyledCommonProps}\n`;\nexport const Dl = styled('dl')`\n ${xStyledCommonProps}\n`;\nexport const Dt = styled('dt')`\n ${xStyledCommonProps}\n`;\nexport const Figcaption = styled('figcaption')`\n ${xStyledCommonProps}\n`;\nexport const Figure = styled('figure')`\n ${xStyledCommonProps}\n`;\nexport const Hr = styled('hr')`\n ${xStyledCommonProps}\n`;\nexport const Li = styled('li')`\n ${xStyledCommonProps}\n`;\nexport const Menu = styled('menu')`\n ${xStyledCommonProps}\n`;\nexport const Ol = styled('ol')`\n ${xStyledCommonProps}\n`;\nexport const P = styled('p')`\n ${xStyledCommonProps}\n`;\nexport const Pre = styled('pre')`\n ${xStyledCommonProps}\n`;\nexport const Ul = styled('ul')`\n ${xStyledCommonProps}\n`;\nexport const A = styled('a')`\n ${xStyledCommonProps}\n`;\nexport const Abbr = styled('abbr')`\n ${xStyledCommonProps}\n`;\nexport const B = styled('b')`\n ${xStyledCommonProps}\n`;\nexport const Bdi = styled('bdi')`\n ${xStyledCommonProps}\n`;\nexport const Bdo = styled('bdo')`\n ${xStyledCommonProps}\n`;\nexport const Br = styled('br')`\n ${xStyledCommonProps}\n`;\nexport const Cite = styled('cite')`\n ${xStyledCommonProps}\n`;\nexport const Code = styled('code')`\n ${xStyledCommonProps}\n`;\nexport const Data = styled('data')`\n ${xStyledCommonProps}\n`;\nexport const Dfn = styled('dfn')`\n ${xStyledCommonProps}\n`;\nexport const Em = styled('em')`\n ${xStyledCommonProps}\n`;\nexport const I = styled('i')`\n ${xStyledCommonProps}\n`;\nexport const Kbd = styled('kbd')`\n ${xStyledCommonProps}\n`;\nexport const Mark = styled('mark')`\n ${xStyledCommonProps}\n`;\nexport const Q = styled('q')`\n ${xStyledCommonProps}\n`;\nexport const Rp = styled('rp')`\n ${xStyledCommonProps}\n`;\nexport const Rt = styled('rt')`\n ${xStyledCommonProps}\n`;\nexport const Ruby = styled('ruby')`\n ${xStyledCommonProps}\n`;\nexport const S = styled('s')`\n ${xStyledCommonProps}\n`;\nexport const Samp = styled('samp')`\n ${xStyledCommonProps}\n`;\nexport const Small = styled('small')`\n ${xStyledCommonProps}\n`;\nexport const Span = styled('span')`\n ${xStyledCommonProps}\n`;\nexport const Strong = styled('strong')`\n ${xStyledCommonProps}\n`;\nexport const Sub = styled('sub')`\n ${xStyledCommonProps}\n`;\nexport const Sup = styled('sup')`\n ${xStyledCommonProps}\n`;\nexport const Time = styled('time')`\n ${xStyledCommonProps}\n`;\nexport const U = styled('u')`\n ${xStyledCommonProps}\n`;\nexport const Wbr = styled('wbr')`\n ${xStyledCommonProps}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,oBAAuB;AACvB,4BAAmC;AAE5B,MAAM,cAAU,sBAAO,SAAS;AAAA,IACnC,wCAAkB;AAAA;AAEf,MAAM,cAAU,sBAAO,SAAS;AAAA,IACnC,wCAAkB;AAAA;AAEf,MAAM,YAAQ,sBAAO,OAAO;AAAA,IAC/B,wCAAkB;AAAA;AAEf,MAAM,aAAS,sBAAO,QAAQ;AAAA,IACjC,wCAA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,MAAM,SAAK,sBAAO,IAAI;AAAA,IACzB,wCAAkB;AAAA;AAEf,MAAM,WAAO,sBAAO,MAAM;AAAA,IAC7B,wCAAkB;AAAA;AAEf,MAAM,QAAI,sBAAO,GAAG;AAAA,IACvB,wCAAkB;AAAA;AAEf,MAAM,WAAO,sBAAO,MAAM;AAAA,IAC7B,wCAAkB;AAAA;AAEf,MAAM,YAAQ,sBAAO,OAAO;AAAA,IAC/B,wCAAkB;AAAA;AAEf,MAAM,WAAO,sBAAO,MAAM;AAAA,IAC7B,wCAAkB;AAAA;AAEf,MAAM,aAAS,sBAAO,QAAQ;AAAA,IACjC,wCAAkB;AAAA;AAEf,MAAM,UAAM,sBAAO,KAAK;AAAA,IAC3B,wCAAkB;AAAA;AAEf,MAAM,UAAM,sBAAO,KAAK;AAAA,IAC3B,wCAAkB;AAAA;AAEf,MAAM,WAAO,sBAAO,MAAM;AAAA,IAC7B,wCAAkB;AAAA;AAEf,MAAM,QAAI,sBAAO,GAAG;AAAA,IACvB,wCAAkB;AAAA;AAEf,MAAM,UAAM,sBAAO,KAAK;AAAA,IAC3B,wCAAkB;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -35,16 +35,16 @@ var React = __toESM(require("react"));
|
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_react = require("react");
|
|
37
37
|
var import_checkNamingConvention = require("./checkNamingConvention.js");
|
|
38
|
-
var import_system = require("./system.js");
|
|
39
|
-
var import_transformers = require("./transformers/index.js");
|
|
40
38
|
var import_coerceWithDefaultTheme = require("./coerceWithDefaultTheme.js");
|
|
41
39
|
var import_expressions = require("./expressions/index.js");
|
|
42
40
|
var import_fixStyleArg = require("./fixStyleArg.js");
|
|
43
|
-
var import_generated_attributes = require("./generated-attributes/index.js");
|
|
44
41
|
var import_generateAttributes = require("./generated-attributes/generateAttributes.js");
|
|
42
|
+
var import_generated_attributes = require("./generated-attributes/index.js");
|
|
43
|
+
var import_callbackMerger = require("./generated-attributes/utils/callbackMerger.js");
|
|
45
44
|
var import_refMerger = require("./generated-attributes/utils/refMerger.js");
|
|
46
45
|
var import_helpers = require("./helpers.js");
|
|
47
|
-
var
|
|
46
|
+
var import_system = require("./system.js");
|
|
47
|
+
var import_transformers = require("./transformers/index.js");
|
|
48
48
|
const defaultOptions = {
|
|
49
49
|
name: null,
|
|
50
50
|
slot: null
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styled/styledFunction.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useMemo } from 'react';\nimport type { AnyStyledComponent, ThemedStyledFunction } from 'styled-components';\nimport { checkNamingConvention } from './checkNamingConvention.js';\nimport { coerceWithDefaultTheme } from './coerceWithDefaultTheme.js';\nimport { genStyleOverridesExpression, genVariantOverridesExpression } from './expressions/index.js';\nimport { fixStyleArg } from './fixStyleArg.js';\nimport { getPartProps } from './generated-attributes/generateAttributes.js';\nimport { generateAutoCalculated } from './generated-attributes/index.js';\nimport { callbackMerger } from './generated-attributes/utils/callbackMerger.js';\nimport { mergeRefs } from './generated-attributes/utils/refMerger.js';\nimport { displayNameToKebabCase, displayNameToPropCase } from './helpers.js';\nimport { styled as baseStyled } from './system.js';\nimport { dsStyledComponentTransform, magicCssTransform } from './transformers/index.js';\nimport type {\n AnyStyledRef,\n InnerRefInterface,\n Options,\n OwnerInterface,\n Theme,\n ThemedStyledFunctionBase,\n} from './types.js';\n\nconst defaultOptions: Options = {\n name: null,\n slot: null,\n};\n\nexport const styledFunction = <\n C extends AnyStyledComponent | keyof React.JSX.IntrinsicElements | React.ComponentType<any>,\n>(\n tag: C,\n options: Options = defaultOptions,\n) => {\n const { name: componentName, slot: componentSlot } = options;\n\n checkNamingConvention(componentName, componentSlot);\n\n // Here we use the `as` because when C is keyof JSX.IntrinsicElements we get `never` for the attributes generic\n // We want to account for string | number | symbol that's why we transform it to `keyof any`\n const baseStyledResolver = baseStyled(tag) as unknown as ThemedStyledFunction<C, Theme, {}, keyof any>;\n\n // Due to the recursive natura of this function, we can't type it properly\n // Since we can apply .attrs or .withConfig, we are not sure on the type of the returned function\n // @ts-expect-error explained above\n const dsStyledResolver: ThemedStyledFunctionBase<C, Theme> = (styleArg, ...expressions) => {\n /**\n * Here we apply a transformation to the expressions only.\n * Since this resolver is returning a HOC of a styled-component, the syntax support for\n * selecting the className of another styled-component is not available anymore.\n * That's why we assign it a `dsStyledComponnentId`, we will replace the component's call for\n * the corresponding id\n */\n const expressionsWithDsStyledComponentId = dsStyledComponentTransform(expressions);\n\n /**\n * Here we apply a CSS transformation to support MAGIC styled components\n * This makes it possible to use the following syntax:\n * color: neutral-100;\n * background-color: success-900;\n */\n const [styleArgWithMagic, expressionsWithMagic] = magicCssTransform(styleArg, expressionsWithDsStyledComponentId);\n\n /**\n * We coerce all the already written expressions with the default theme\n * This prevents styled components to break when a theme is not provided\n * either with the HOC or the ThemeProvider\n */\n const expressionsWithThemeCoerced = coerceWithDefaultTheme(expressionsWithMagic);\n\n if (componentName && componentSlot) {\n // Here we add the style overrides expression\n expressionsWithThemeCoerced.push(genStyleOverridesExpression(componentName, componentSlot));\n }\n\n if (componentName && componentSlot === 'root') {\n // Here we add the variant overrides from the user (only for the root slot\n expressionsWithThemeCoerced.push(genVariantOverridesExpression(componentName));\n }\n\n /**\n * Here we will fix the format of the style argument\n * We possible added some new expressions into the mix,\n * so we need to properly adjust the style arg\n */\n const numOfExpressionsAdded = expressionsWithThemeCoerced.length - expressionsWithMagic.length;\n\n const fixedStyleArg = fixStyleArg(styleArgWithMagic, numOfExpressionsAdded);\n\n // We will add autocalculated attributes to the styled component\n const [displayName, attributes] = generateAutoCalculated(options);\n\n // For each attribute function, we will call `attrs` func with it\n // This will add the attributes to the styled component\n const baseStyledResolverWithAttributes = attributes.reduce<typeof baseStyledResolver>(\n (curStyledResolver, attributeFunc) => curStyledResolver.attrs(attributeFunc),\n baseStyledResolver,\n );\n\n const Component = baseStyledResolverWithAttributes(fixedStyleArg, ...expressionsWithThemeCoerced);\n\n const ComponentWithRefsMerged = (props: OwnerInterface & InnerRefInterface<C> & { 'data-testid'?: string }) => {\n // we may or not have data-testid at this point, so we need to calculate it\n const dataTestId = props['data-testid'] ?? (displayName !== null ? displayNameToKebabCase(displayName) : '');\n // we also need to calculate dataDimsumSlot at this point\n const dataDimsumSlot = displayName !== null ? displayNameToPropCase(displayName) : '';\n // then we get the part props for this slot, and we cast it to use refs\n const partProps = getPartProps({\n ...props,\n 'data-testid': dataTestId,\n 'data-dimsum-slot': dataDimsumSlot,\n }) as {\n innerRef?: AnyStyledRef<HTMLElement>;\n };\n\n // then we merge the callbacks from the props with the ones from the part\n // this object also has all global props from the parts\n const resultingObjectWithCallbackMerged = callbackMerger(props, partProps);\n\n const mergedRef = useMemo(\n () => mergeRefs(props.innerRef, partProps.innerRef),\n [props.innerRef, partProps.innerRef],\n );\n\n // We don't want to pass the owner props to the component down the line\n const { getOwnerProps, getOwnerPropsArguments, ...restProps } = props;\n // TODO:\n // deploy the following code and see if we break something in a dedicated effort ASAP\n // let ref = undefined;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore : as of thue 16 may 2024, Component.target.$$typeof is undefined for non-native react components\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n // if (typeof Component?.target === 'string') {\n // ref = mergedRef;\n // }\n\n const propsWithRefMerged = {\n ...restProps,\n ...resultingObjectWithCallbackMerged,\n // ref: ref,\n ref: mergedRef,\n innerRef: mergedRef,\n } as React.ComponentProps<C>;\n\n // TODO: check if we need to pass the ref to the component\n // Check $$typeof to see if it's a react-forward-ref\n // Check dsStyledComponentId to see if it's a styled component\n // Check what to do with span, div, etc.\n // Other cases should not receive ref...?\n\n return <Component {...propsWithRefMerged} />;\n };\n\n if (displayName !== null) {\n Component.displayName = displayName;\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore We use dsStyledComponent to access the original's component id\n ComponentWithRefsMerged.dsStyledComponentId = Component.styledComponentId as string;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ComponentWithRefsMerged.toString = Component.toString;\n\n return ComponentWithRefsMerged;\n };\n\n // Here we use arrow functions to preserve the `this` context\n const styledAttributes = {\n attrs: ((...args) => {\n baseStyledResolver.attrs(...args);\n return dsStyledResolver;\n }) as (typeof baseStyledResolver)['attrs'],\n withConfig: ((...args) => {\n baseStyledResolver.withConfig(...args);\n return dsStyledResolver;\n }) as (typeof baseStyledResolver)['withConfig'],\n };\n\n return Object.assign(dsStyledResolver, styledAttributes);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwJV;AArJb,mBAA+B;AAE/B,mCAAsC;AACtC,oCAAuC;AACvC,yBAA2E;AAC3E,yBAA4B;AAC5B,gCAA6B;AAC7B,kCAAuC;AACvC,4BAA+B;AAC/B,uBAA0B;AAC1B,qBAA8D;AAC9D,oBAAqC;AACrC,0BAA8D;AAU9D,MAAM,iBAA0B;AAAA,EAC9B,MAAM;AAAA,EACN,MAAM;AACR;AAEO,MAAM,iBAAiB,CAG5B,KACA,UAAmB,mBAChB;AACH,QAAM,EAAE,MAAM,eAAe,MAAM,cAAc,IAAI;AAErD,0DAAsB,eAAe,aAAa;AAIlD,QAAM,yBAAqB,cAAAA,QA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QACL,UAAU;AAAA,MACZ;AAQA,aAAO,4CAAC,aAAW,GAAG,oBAAoB;AAAA,IAC5C;AAEA,QAAI,gBAAgB,MAAM;AACxB,gBAAU,cAAc;AAAA,IAC1B;AAIA,4BAAwB,sBAAsB,UAAU;AAExD,4BAAwB,WAAW,UAAU;AAE7C,WAAO;AAAA,EACT;AAGA,QAAM,mBAAmB;AAAA,IACvB,OAAQ,IAAI,SAAS;AACnB,yBAAmB,MAAM,GAAG,IAAI;AAChC,aAAO;AAAA,IACT;AAAA,IACA,YAAa,IAAI,SAAS;AACxB,yBAAmB,WAAW,GAAG,IAAI;AACrC,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO,OAAO,OAAO,kBAAkB,gBAAgB;AACzD;",
|
|
6
6
|
"names": ["baseStyled"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styled/styledObject.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { styledFunction } from './styledFunction.js';\nimport { styled as baseStyled } from './system.js';\n\ntype PreStyledObject = {\n [TTag in keyof JSX.IntrinsicElements]: unknown;\n};\n\nexport type StyledObject = {\n [TTag in keyof JSX.IntrinsicElements]: ReturnType<typeof styledFunction<TTag>>;\n};\n\nconst keyofJsxIntrinsicElements = Object.keys(baseStyled) as (keyof JSX.IntrinsicElements)[];\n\nexport const styledObject = keyofJsxIntrinsicElements.reduce((obj, key) => {\n obj[key] = styledFunction(key);\n return obj;\n}, {} as PreStyledObject) as StyledObject;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type React from 'react';\nimport { styledFunction } from './styledFunction.js';\nimport { styled as baseStyled } from './system.js';\n\ntype PreStyledObject = {\n [TTag in keyof React.JSX.IntrinsicElements]: unknown;\n};\n\nexport type StyledObject = {\n [TTag in keyof React.JSX.IntrinsicElements]: ReturnType<typeof styledFunction<TTag>>;\n};\n\nconst keyofJsxIntrinsicElements = Object.keys(baseStyled) as (keyof React.JSX.IntrinsicElements)[];\n\nexport const styledObject = keyofJsxIntrinsicElements.reduce((obj, key) => {\n obj[key] = styledFunction(key);\n return obj;\n}, {} as PreStyledObject) as StyledObject;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,4BAA+B;AAC/B,oBAAqC;AAUrC,MAAM,4BAA4B,OAAO,KAAK,cAAAA,MAAU;AAEjD,MAAM,eAAe,0BAA0B,OAAO,CAAC,KAAK,QAAQ;AACzE,MAAI,GAAG,QAAI,sCAAe,GAAG;AAC7B,SAAO;AACT,GAAG,CAAC,CAAoB;",
|
|
6
6
|
"names": ["baseStyled"]
|
|
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}\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 JSX.IntrinsicElements | React.ComponentType<any>> =\n C extends AnyStyledComponent ? ComponentInnerRef<StyledComponentInnerComponent<C>> : ComponentInnerRef<C>;\n\nexport interface ThemedStyledFunctionBase<\n C extends keyof 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 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}\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"],
|
|
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/themeProviderHOC.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { ThemeProvider } from '@xstyled/styled-components';\nimport { theme } from './theme.js';\n\nexport const themeProviderHOC = <T extends JSX.IntrinsicAttributes>(Component: React.ComponentType<T>) => {\n const WrappedComponent: React.ComponentType<T> = (props) => (\n <ThemeProvider\n theme={{\n ...theme,\n layoutMode: 'l',\n }}\n >\n <Component {...props} />\n </ThemeProvider>\n );\n return WrappedComponent;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADYjB;AAXN,+BAA8B;AAC9B,mBAAsB;AAEf,MAAM,mBAAmB,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { ThemeProvider } from '@xstyled/styled-components';\nimport { theme } from './theme.js';\n\nexport const themeProviderHOC = <T extends React.JSX.IntrinsicAttributes>(Component: React.ComponentType<T>) => {\n const WrappedComponent: React.ComponentType<T> = (props) => (\n <ThemeProvider\n theme={{\n ...theme,\n layoutMode: 'l',\n }}\n >\n <Component {...props} />\n </ThemeProvider>\n );\n return WrappedComponent;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADYjB;AAXN,+BAA8B;AAC9B,mBAAsB;AAEf,MAAM,mBAAmB,CAA0C,cAAsC;AAC9G,QAAM,mBAA2C,CAAC,UAChD;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL,GAAG;AAAA,QACH,YAAY;AAAA,MACd;AAAA,MAEA,sDAAC,aAAW,GAAG,OAAO;AAAA;AAAA,EACxB;AAEF,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/xStyledWrapper.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type {} from '@xstyled/system';\nimport { boxShadow as boxShadows, compose, flexboxes, layout, typography } from '@xstyled/system';\nimport type {} from '@xstyled/util';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,oBAAgF;
|
|
4
|
+
"sourcesContent": ["import type {} from '@xstyled/system';\nimport { boxShadow as boxShadows, compose, flexboxes, layout, typography } from '@xstyled/system';\nimport type {} from '@xstyled/util';\nimport { styled } from './styled/styled.js';\nimport { background } from './styled/system-utilities/background.js';\nimport { borders } from './styled/system-utilities/border.js';\nimport { color } from './styled/system-utilities/color.js';\nimport { sizing } from './styled/system-utilities/sizing.js';\nimport { space } from './styled/system-utilities/space.js';\nimport { type ThemedExpression } from './styled/types.js';\n\nexport const XStyledWrapper = styled('div')`\n ${typography}\n ${layout}\n ${space}\n ${sizing}\n ${background}\n ${borders}\n ${boxShadows}\n ${flexboxes}\n ${color}\n`;\n\nexport const xStyledCommonProps = compose(\n typography,\n background,\n borders,\n sizing,\n space,\n boxShadows,\n flexboxes,\n layout,\n color,\n) as unknown as ThemedExpression<unknown>;\n\nexport default XStyledWrapper;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,oBAAgF;AAEhF,oBAAuB;AACvB,wBAA2B;AAC3B,oBAAwB;AACxB,mBAAsB;AACtB,oBAAuB;AACvB,mBAAsB;AAGf,MAAM,qBAAiB,sBAAO,KAAK;AAAA,IACtC,wBAAU;AAAA,IACV,oBAAM;AAAA,IACN,kBAAK;AAAA,IACL,oBAAM;AAAA,IACN,4BAAU;AAAA,IACV,qBAAO;AAAA,IACP,cAAAA,SAAU;AAAA,IACV,uBAAS;AAAA,IACT,kBAAK;AAAA;AAGF,MAAM,yBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAO,yBAAQ;",
|
|
6
6
|
"names": ["boxShadows"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/HtmlComponents.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@xstyled/system';\nimport type {} from '@xstyled/util';\nimport { styled } from './styled/styled.js';\nimport { xStyledCommonProps } from './xStyledWrapper.js';\n\nexport const Address = styled('address')`\n ${xStyledCommonProps}\n`;\nexport const Article = styled('article')`\n ${xStyledCommonProps}\n`;\nexport const Aside = styled('aside')`\n ${xStyledCommonProps}\n`;\nexport const Footer = styled('footer')`\n ${xStyledCommonProps}\n`;\nexport const Header = styled('header')`\n ${xStyledCommonProps}\n`;\nexport const H1 = styled('h1')`\n ${xStyledCommonProps}\n`;\nexport const H2 = styled('h2')`\n ${xStyledCommonProps}\n`;\nexport const H3 = styled('h3')`\n ${xStyledCommonProps}\n`;\nexport const H4 = styled('h4')`\n ${xStyledCommonProps}\n`;\nexport const H5 = styled('h5')`\n ${xStyledCommonProps}\n`;\nexport const H6 = styled('h6')`\n ${xStyledCommonProps}\n`;\nexport const Hgroup = styled('hgroup')`\n ${xStyledCommonProps}\n`;\nexport const Main = styled('main')`\n ${xStyledCommonProps}\n`;\nexport const Nav = styled('nav')`\n ${xStyledCommonProps}\n`;\nexport const Section = styled('section')`\n ${xStyledCommonProps}\n`;\n\nexport const Search = styled('search')`\n ${xStyledCommonProps}\n`;\nexport const Blockquote = styled('blockquote')`\n ${xStyledCommonProps}\n`;\nexport const Dd = styled('dd')`\n ${xStyledCommonProps}\n`;\nexport const Div = styled('div')`\n ${xStyledCommonProps}\n`;\nexport const Dl = styled('dl')`\n ${xStyledCommonProps}\n`;\nexport const Dt = styled('dt')`\n ${xStyledCommonProps}\n`;\nexport const Figcaption = styled('figcaption')`\n ${xStyledCommonProps}\n`;\nexport const Figure = styled('figure')`\n ${xStyledCommonProps}\n`;\nexport const Hr = styled('hr')`\n ${xStyledCommonProps}\n`;\nexport const Li = styled('li')`\n ${xStyledCommonProps}\n`;\nexport const Menu = styled('menu')`\n ${xStyledCommonProps}\n`;\nexport const Ol = styled('ol')`\n ${xStyledCommonProps}\n`;\nexport const P = styled('p')`\n ${xStyledCommonProps}\n`;\nexport const Pre = styled('pre')`\n ${xStyledCommonProps}\n`;\nexport const Ul = styled('ul')`\n ${xStyledCommonProps}\n`;\nexport const A = styled('a')`\n ${xStyledCommonProps}\n`;\nexport const Abbr = styled('abbr')`\n ${xStyledCommonProps}\n`;\nexport const B = styled('b')`\n ${xStyledCommonProps}\n`;\nexport const Bdi = styled('bdi')`\n ${xStyledCommonProps}\n`;\nexport const Bdo = styled('bdo')`\n ${xStyledCommonProps}\n`;\nexport const Br = styled('br')`\n ${xStyledCommonProps}\n`;\nexport const Cite = styled('cite')`\n ${xStyledCommonProps}\n`;\nexport const Code = styled('code')`\n ${xStyledCommonProps}\n`;\nexport const Data = styled('data')`\n ${xStyledCommonProps}\n`;\nexport const Dfn = styled('dfn')`\n ${xStyledCommonProps}\n`;\nexport const Em = styled('em')`\n ${xStyledCommonProps}\n`;\nexport const I = styled('i')`\n ${xStyledCommonProps}\n`;\nexport const Kbd = styled('kbd')`\n ${xStyledCommonProps}\n`;\nexport const Mark = styled('mark')`\n ${xStyledCommonProps}\n`;\nexport const Q = styled('q')`\n ${xStyledCommonProps}\n`;\nexport const Rp = styled('rp')`\n ${xStyledCommonProps}\n`;\nexport const Rt = styled('rt')`\n ${xStyledCommonProps}\n`;\nexport const Ruby = styled('ruby')`\n ${xStyledCommonProps}\n`;\nexport const S = styled('s')`\n ${xStyledCommonProps}\n`;\nexport const Samp = styled('samp')`\n ${xStyledCommonProps}\n`;\nexport const Small = styled('small')`\n ${xStyledCommonProps}\n`;\nexport const Span = styled('span')`\n ${xStyledCommonProps}\n`;\nexport const Strong = styled('strong')`\n ${xStyledCommonProps}\n`;\nexport const Sub = styled('sub')`\n ${xStyledCommonProps}\n`;\nexport const Sup = styled('sup')`\n ${xStyledCommonProps}\n`;\nexport const Time = styled('time')`\n ${xStyledCommonProps}\n`;\nexport const U = styled('u')`\n ${xStyledCommonProps}\n`;\nexport const Wbr = styled('wbr')`\n ${xStyledCommonProps}\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,cAAc;AACvB,SAAS,0BAA0B;AAE5B,MAAM,UAAU,OAAO,SAAS;AAAA,IACnC,kBAAkB;AAAA;AAEf,MAAM,UAAU,OAAO,SAAS;AAAA,IACnC,kBAAkB;AAAA;AAEf,MAAM,QAAQ,OAAO,OAAO;AAAA,IAC/B,kBAAkB;AAAA;AAEf,MAAM,SAAS,OAAO,QAAQ;AAAA,IACjC,kBAAkB;AAAA;AAEf,MAAM,SAAS,OAAO,QAAQ;AAAA,IACjC,kBAAkB;AAAA;AAEf,MAAM,KAAK,OAAO,IAAI;AAAA,IACzB,kBAAkB;AAAA;AAEf,MAAM,KAAK,OAAO,IAAI;AAAA,IACzB,kBAAkB;AAAA;AAEf,MAAM,KAAK,OAAO,IAAI;AAAA,IACzB,kBAAkB;AAAA;AAEf,MAAM,KAAK,OAAO,IAAI;AAAA,IACzB,kBAAkB;AAAA;AAEf,MAAM,KAAK,OAAO,IAAI;AAAA,IACzB,kBAAkB;AAAA;AAEf,MAAM,KAAK,OAAO,IAAI;AAAA,IACzB,kBAAkB;AAAA;AAEf,MAAM,SAAS,OAAO,QAAQ;AAAA,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B,kBAAkB;AAAA;AAEf,MAAM,OAAO,OAAO,MAAM;AAAA,IAC7B,kBAAkB;AAAA;AAEf,MAAM,IAAI,OAAO,GAAG;AAAA,IACvB,kBAAkB;AAAA;AAEf,MAAM,MAAM,OAAO,KAAK;AAAA,IAC3B,kBAAkB;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,16 +2,16 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { checkNamingConvention } from "./checkNamingConvention.js";
|
|
5
|
-
import { styled as baseStyled } from "./system.js";
|
|
6
|
-
import { dsStyledComponentTransform, magicCssTransform } from "./transformers/index.js";
|
|
7
5
|
import { coerceWithDefaultTheme } from "./coerceWithDefaultTheme.js";
|
|
8
6
|
import { genStyleOverridesExpression, genVariantOverridesExpression } from "./expressions/index.js";
|
|
9
7
|
import { fixStyleArg } from "./fixStyleArg.js";
|
|
10
|
-
import { generateAutoCalculated } from "./generated-attributes/index.js";
|
|
11
8
|
import { getPartProps } from "./generated-attributes/generateAttributes.js";
|
|
9
|
+
import { generateAutoCalculated } from "./generated-attributes/index.js";
|
|
10
|
+
import { callbackMerger } from "./generated-attributes/utils/callbackMerger.js";
|
|
12
11
|
import { mergeRefs } from "./generated-attributes/utils/refMerger.js";
|
|
13
12
|
import { displayNameToKebabCase, displayNameToPropCase } from "./helpers.js";
|
|
14
|
-
import {
|
|
13
|
+
import { styled as baseStyled } from "./system.js";
|
|
14
|
+
import { dsStyledComponentTransform, magicCssTransform } from "./transformers/index.js";
|
|
15
15
|
const defaultOptions = {
|
|
16
16
|
name: null,
|
|
17
17
|
slot: null
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/styled/styledFunction.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useMemo } from 'react';\nimport type { AnyStyledComponent, ThemedStyledFunction } from 'styled-components';\nimport { checkNamingConvention } from './checkNamingConvention.js';\nimport { coerceWithDefaultTheme } from './coerceWithDefaultTheme.js';\nimport { genStyleOverridesExpression, genVariantOverridesExpression } from './expressions/index.js';\nimport { fixStyleArg } from './fixStyleArg.js';\nimport { getPartProps } from './generated-attributes/generateAttributes.js';\nimport { generateAutoCalculated } from './generated-attributes/index.js';\nimport { callbackMerger } from './generated-attributes/utils/callbackMerger.js';\nimport { mergeRefs } from './generated-attributes/utils/refMerger.js';\nimport { displayNameToKebabCase, displayNameToPropCase } from './helpers.js';\nimport { styled as baseStyled } from './system.js';\nimport { dsStyledComponentTransform, magicCssTransform } from './transformers/index.js';\nimport type {\n AnyStyledRef,\n InnerRefInterface,\n Options,\n OwnerInterface,\n Theme,\n ThemedStyledFunctionBase,\n} from './types.js';\n\nconst defaultOptions: Options = {\n name: null,\n slot: null,\n};\n\nexport const styledFunction = <\n C extends AnyStyledComponent | keyof React.JSX.IntrinsicElements | React.ComponentType<any>,\n>(\n tag: C,\n options: Options = defaultOptions,\n) => {\n const { name: componentName, slot: componentSlot } = options;\n\n checkNamingConvention(componentName, componentSlot);\n\n // Here we use the `as` because when C is keyof JSX.IntrinsicElements we get `never` for the attributes generic\n // We want to account for string | number | symbol that's why we transform it to `keyof any`\n const baseStyledResolver = baseStyled(tag) as unknown as ThemedStyledFunction<C, Theme, {}, keyof any>;\n\n // Due to the recursive natura of this function, we can't type it properly\n // Since we can apply .attrs or .withConfig, we are not sure on the type of the returned function\n // @ts-expect-error explained above\n const dsStyledResolver: ThemedStyledFunctionBase<C, Theme> = (styleArg, ...expressions) => {\n /**\n * Here we apply a transformation to the expressions only.\n * Since this resolver is returning a HOC of a styled-component, the syntax support for\n * selecting the className of another styled-component is not available anymore.\n * That's why we assign it a `dsStyledComponnentId`, we will replace the component's call for\n * the corresponding id\n */\n const expressionsWithDsStyledComponentId = dsStyledComponentTransform(expressions);\n\n /**\n * Here we apply a CSS transformation to support MAGIC styled components\n * This makes it possible to use the following syntax:\n * color: neutral-100;\n * background-color: success-900;\n */\n const [styleArgWithMagic, expressionsWithMagic] = magicCssTransform(styleArg, expressionsWithDsStyledComponentId);\n\n /**\n * We coerce all the already written expressions with the default theme\n * This prevents styled components to break when a theme is not provided\n * either with the HOC or the ThemeProvider\n */\n const expressionsWithThemeCoerced = coerceWithDefaultTheme(expressionsWithMagic);\n\n if (componentName && componentSlot) {\n // Here we add the style overrides expression\n expressionsWithThemeCoerced.push(genStyleOverridesExpression(componentName, componentSlot));\n }\n\n if (componentName && componentSlot === 'root') {\n // Here we add the variant overrides from the user (only for the root slot\n expressionsWithThemeCoerced.push(genVariantOverridesExpression(componentName));\n }\n\n /**\n * Here we will fix the format of the style argument\n * We possible added some new expressions into the mix,\n * so we need to properly adjust the style arg\n */\n const numOfExpressionsAdded = expressionsWithThemeCoerced.length - expressionsWithMagic.length;\n\n const fixedStyleArg = fixStyleArg(styleArgWithMagic, numOfExpressionsAdded);\n\n // We will add autocalculated attributes to the styled component\n const [displayName, attributes] = generateAutoCalculated(options);\n\n // For each attribute function, we will call `attrs` func with it\n // This will add the attributes to the styled component\n const baseStyledResolverWithAttributes = attributes.reduce<typeof baseStyledResolver>(\n (curStyledResolver, attributeFunc) => curStyledResolver.attrs(attributeFunc),\n baseStyledResolver,\n );\n\n const Component = baseStyledResolverWithAttributes(fixedStyleArg, ...expressionsWithThemeCoerced);\n\n const ComponentWithRefsMerged = (props: OwnerInterface & InnerRefInterface<C> & { 'data-testid'?: string }) => {\n // we may or not have data-testid at this point, so we need to calculate it\n const dataTestId = props['data-testid'] ?? (displayName !== null ? displayNameToKebabCase(displayName) : '');\n // we also need to calculate dataDimsumSlot at this point\n const dataDimsumSlot = displayName !== null ? displayNameToPropCase(displayName) : '';\n // then we get the part props for this slot, and we cast it to use refs\n const partProps = getPartProps({\n ...props,\n 'data-testid': dataTestId,\n 'data-dimsum-slot': dataDimsumSlot,\n }) as {\n innerRef?: AnyStyledRef<HTMLElement>;\n };\n\n // then we merge the callbacks from the props with the ones from the part\n // this object also has all global props from the parts\n const resultingObjectWithCallbackMerged = callbackMerger(props, partProps);\n\n const mergedRef = useMemo(\n () => mergeRefs(props.innerRef, partProps.innerRef),\n [props.innerRef, partProps.innerRef],\n );\n\n // We don't want to pass the owner props to the component down the line\n const { getOwnerProps, getOwnerPropsArguments, ...restProps } = props;\n // TODO:\n // deploy the following code and see if we break something in a dedicated effort ASAP\n // let ref = undefined;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore : as of thue 16 may 2024, Component.target.$$typeof is undefined for non-native react components\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n // if (typeof Component?.target === 'string') {\n // ref = mergedRef;\n // }\n\n const propsWithRefMerged = {\n ...restProps,\n ...resultingObjectWithCallbackMerged,\n // ref: ref,\n ref: mergedRef,\n innerRef: mergedRef,\n } as React.ComponentProps<C>;\n\n // TODO: check if we need to pass the ref to the component\n // Check $$typeof to see if it's a react-forward-ref\n // Check dsStyledComponentId to see if it's a styled component\n // Check what to do with span, div, etc.\n // Other cases should not receive ref...?\n\n return <Component {...propsWithRefMerged} />;\n };\n\n if (displayName !== null) {\n Component.displayName = displayName;\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore We use dsStyledComponent to access the original's component id\n ComponentWithRefsMerged.dsStyledComponentId = Component.styledComponentId as string;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ComponentWithRefsMerged.toString = Component.toString;\n\n return ComponentWithRefsMerged;\n };\n\n // Here we use arrow functions to preserve the `this` context\n const styledAttributes = {\n attrs: ((...args) => {\n baseStyledResolver.attrs(...args);\n return dsStyledResolver;\n }) as (typeof baseStyledResolver)['attrs'],\n withConfig: ((...args) => {\n baseStyledResolver.withConfig(...args);\n return dsStyledResolver;\n }) as (typeof baseStyledResolver)['withConfig'],\n };\n\n return Object.assign(dsStyledResolver, styledAttributes);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACwJV;AArJb,SAAgB,eAAe;AAE/B,SAAS,6BAA6B;AACtC,SAAS,8BAA8B;AACvC,SAAS,6BAA6B,qCAAqC;AAC3E,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;AACvC,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,wBAAwB,6BAA6B;AAC9D,SAAS,UAAU,kBAAkB;AACrC,SAAS,4BAA4B,yBAAyB;AAU9D,MAAM,iBAA0B;AAAA,EAC9B,MAAM;AAAA,EACN,MAAM;AACR;AAEO,MAAM,iBAAiB,CAG5B,KACA,UAAmB,mBAChB;AACH,QAAM,EAAE,MAAM,eAAe,MAAM,cAAc,IAAI;AAErD,wBAAsB,eAAe,aAAa;AAIlD,QAAM,qBAAqB,WAAW,GAAG;AAKzC,QAAM,mBAAuD,CAAC,aAAa,gBAAgB;AAQzF,UAAM,qCAAqC,2BAA2B,WAAW;AAQjF,UAAM,CAAC,mBAAmB,oBAAoB,IAAI,kBAAkB,UAAU,kCAAkC;AAOhH,UAAM,8BAA8B,uBAAuB,oBAAoB;AAE/E,QAAI,iBAAiB,eAAe;AAElC,kCAA4B,KAAK,4BAA4B,eAAe,aAAa,CAAC;AAAA,IAC5F;AAEA,QAAI,iBAAiB,kBAAkB,QAAQ;AAE7C,kCAA4B,KAAK,8BAA8B,aAAa,CAAC;AAAA,IAC/E;AAOA,UAAM,wBAAwB,4BAA4B,SAAS,qBAAqB;AAExF,UAAM,g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OAAO,kBAAkB,gBAAgB;AACzD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/styled/styledObject.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styledFunction } from './styledFunction.js';\nimport { styled as baseStyled } from './system.js';\n\ntype PreStyledObject = {\n [TTag in keyof JSX.IntrinsicElements]: unknown;\n};\n\nexport type StyledObject = {\n [TTag in keyof JSX.IntrinsicElements]: ReturnType<typeof styledFunction<TTag>>;\n};\n\nconst keyofJsxIntrinsicElements = Object.keys(baseStyled) as (keyof JSX.IntrinsicElements)[];\n\nexport const styledObject = keyofJsxIntrinsicElements.reduce((obj, key) => {\n obj[key] = styledFunction(key);\n return obj;\n}, {} as PreStyledObject) as StyledObject;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport { styledFunction } from './styledFunction.js';\nimport { styled as baseStyled } from './system.js';\n\ntype PreStyledObject = {\n [TTag in keyof React.JSX.IntrinsicElements]: unknown;\n};\n\nexport type StyledObject = {\n [TTag in keyof React.JSX.IntrinsicElements]: ReturnType<typeof styledFunction<TTag>>;\n};\n\nconst keyofJsxIntrinsicElements = Object.keys(baseStyled) as (keyof React.JSX.IntrinsicElements)[];\n\nexport const styledObject = keyofJsxIntrinsicElements.reduce((obj, key) => {\n obj[key] = styledFunction(key);\n return obj;\n}, {} as PreStyledObject) as StyledObject;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,sBAAsB;AAC/B,SAAS,UAAU,kBAAkB;AAUrC,MAAM,4BAA4B,OAAO,KAAK,UAAU;AAEjD,MAAM,eAAe,0BAA0B,OAAO,CAAC,KAAK,QAAQ;AACzE,MAAI,GAAG,IAAI,eAAe,GAAG;AAC7B,SAAO;AACT,GAAG,CAAC,CAAoB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/themeProviderHOC.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ThemeProvider } from '@xstyled/styled-components';\nimport { theme } from './theme.js';\n\nexport const themeProviderHOC = <T extends JSX.IntrinsicAttributes>(Component: React.ComponentType<T>) => {\n const WrappedComponent: React.ComponentType<T> = (props) => (\n <ThemeProvider\n theme={{\n ...theme,\n layoutMode: 'l',\n }}\n >\n <Component {...props} />\n </ThemeProvider>\n );\n return WrappedComponent;\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACYjB;AAXN,SAAS,qBAAqB;AAC9B,SAAS,aAAa;AAEf,MAAM,mBAAmB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ThemeProvider } from '@xstyled/styled-components';\nimport { theme } from './theme.js';\n\nexport const themeProviderHOC = <T extends React.JSX.IntrinsicAttributes>(Component: React.ComponentType<T>) => {\n const WrappedComponent: React.ComponentType<T> = (props) => (\n <ThemeProvider\n theme={{\n ...theme,\n layoutMode: 'l',\n }}\n >\n <Component {...props} />\n </ThemeProvider>\n );\n return WrappedComponent;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACYjB;AAXN,SAAS,qBAAqB;AAC9B,SAAS,aAAa;AAEf,MAAM,mBAAmB,CAA0C,cAAsC;AAC9G,QAAM,mBAA2C,CAAC,UAChD;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL,GAAG;AAAA,QACH,YAAY;AAAA,MACd;AAAA,MAEA,8BAAC,aAAW,GAAG,OAAO;AAAA;AAAA,EACxB;AAEF,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/xStyledWrapper.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@xstyled/system';\nimport { boxShadow as boxShadows, compose, flexboxes, layout, typography } from '@xstyled/system';\nimport type {} from '@xstyled/util';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,aAAa,YAAY,SAAS,WAAW,QAAQ,kBAAkB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@xstyled/system';\nimport { boxShadow as boxShadows, compose, flexboxes, layout, typography } from '@xstyled/system';\nimport type {} from '@xstyled/util';\nimport { styled } from './styled/styled.js';\nimport { background } from './styled/system-utilities/background.js';\nimport { borders } from './styled/system-utilities/border.js';\nimport { color } from './styled/system-utilities/color.js';\nimport { sizing } from './styled/system-utilities/sizing.js';\nimport { space } from './styled/system-utilities/space.js';\nimport { type ThemedExpression } from './styled/types.js';\n\nexport const XStyledWrapper = styled('div')`\n ${typography}\n ${layout}\n ${space}\n ${sizing}\n ${background}\n ${borders}\n ${boxShadows}\n ${flexboxes}\n ${color}\n`;\n\nexport const xStyledCommonProps = compose(\n typography,\n background,\n borders,\n sizing,\n space,\n boxShadows,\n flexboxes,\n layout,\n color,\n) as unknown as ThemedExpression<unknown>;\n\nexport default XStyledWrapper;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,aAAa,YAAY,SAAS,WAAW,QAAQ,kBAAkB;AAEhF,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AACxB,SAAS,aAAa;AACtB,SAAS,cAAc;AACvB,SAAS,aAAa;AAGf,MAAM,iBAAiB,OAAO,KAAK;AAAA,IACtC,UAAU;AAAA,IACV,MAAM;AAAA,IACN,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,IACT,KAAK;AAAA;AAGF,MAAM,qBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAO,yBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
export declare const Address: import("styled-components").StyledComponent<"address", import("./
|
|
2
|
-
export declare const Article: import("styled-components").StyledComponent<"article", import("./
|
|
3
|
-
export declare const Aside: import("styled-components").StyledComponent<"aside", import("./
|
|
4
|
-
export declare const Footer: import("styled-components").StyledComponent<"footer", import("./
|
|
5
|
-
export declare const Header: import("styled-components").StyledComponent<"header", import("./
|
|
6
|
-
export declare const H1: import("styled-components").StyledComponent<"h1", import("./
|
|
7
|
-
export declare const H2: import("styled-components").StyledComponent<"h2", import("./
|
|
8
|
-
export declare const H3: import("styled-components").StyledComponent<"h3", import("./
|
|
9
|
-
export declare const H4: import("styled-components").StyledComponent<"h4", import("./
|
|
10
|
-
export declare const H5: import("styled-components").StyledComponent<"h5", import("./
|
|
11
|
-
export declare const H6: import("styled-components").StyledComponent<"h6", import("./
|
|
12
|
-
export declare const Hgroup: import("styled-components").StyledComponent<"hgroup", import("./
|
|
13
|
-
export declare const Main: import("styled-components").StyledComponent<"main", import("./
|
|
14
|
-
export declare const Nav: import("styled-components").StyledComponent<"nav", import("./
|
|
15
|
-
export declare const Section: import("styled-components").StyledComponent<"section", import("./
|
|
16
|
-
export declare const Search: import("styled-components").StyledComponent<"search", import("./
|
|
17
|
-
export declare const Blockquote: import("styled-components").StyledComponent<"blockquote", import("./
|
|
18
|
-
export declare const Dd: import("styled-components").StyledComponent<"dd", import("./
|
|
19
|
-
export declare const Div: import("styled-components").StyledComponent<"div", import("./
|
|
20
|
-
export declare const Dl: import("styled-components").StyledComponent<"dl", import("./
|
|
21
|
-
export declare const Dt: import("styled-components").StyledComponent<"dt", import("./
|
|
22
|
-
export declare const Figcaption: import("styled-components").StyledComponent<"figcaption", import("./
|
|
23
|
-
export declare const Figure: import("styled-components").StyledComponent<"figure", import("./
|
|
24
|
-
export declare const Hr: import("styled-components").StyledComponent<"hr", import("./
|
|
25
|
-
export declare const Li: import("styled-components").StyledComponent<"li", import("./
|
|
26
|
-
export declare const Menu: import("styled-components").StyledComponent<"menu", import("./
|
|
27
|
-
export declare const Ol: import("styled-components").StyledComponent<"ol", import("./
|
|
28
|
-
export declare const P: import("styled-components").StyledComponent<"p", import("./
|
|
29
|
-
export declare const Pre: import("styled-components").StyledComponent<"pre", import("./
|
|
30
|
-
export declare const Ul: import("styled-components").StyledComponent<"ul", import("./
|
|
31
|
-
export declare const A: import("styled-components").StyledComponent<"a", import("./
|
|
32
|
-
export declare const Abbr: import("styled-components").StyledComponent<"abbr", import("./
|
|
33
|
-
export declare const B: import("styled-components").StyledComponent<"b", import("./
|
|
34
|
-
export declare const Bdi: import("styled-components").StyledComponent<"bdi", import("./
|
|
35
|
-
export declare const Bdo: import("styled-components").StyledComponent<"bdo", import("./
|
|
36
|
-
export declare const Br: import("styled-components").StyledComponent<"br", import("./
|
|
37
|
-
export declare const Cite: import("styled-components").StyledComponent<"cite", import("./
|
|
38
|
-
export declare const Code: import("styled-components").StyledComponent<"code", import("./
|
|
39
|
-
export declare const Data: import("styled-components").StyledComponent<"data", import("./
|
|
40
|
-
export declare const Dfn: import("styled-components").StyledComponent<"dfn", import("./
|
|
41
|
-
export declare const Em: import("styled-components").StyledComponent<"em", import("./
|
|
42
|
-
export declare const I: import("styled-components").StyledComponent<"i", import("./
|
|
43
|
-
export declare const Kbd: import("styled-components").StyledComponent<"kbd", import("./
|
|
44
|
-
export declare const Mark: import("styled-components").StyledComponent<"mark", import("./
|
|
45
|
-
export declare const Q: import("styled-components").StyledComponent<"q", import("./
|
|
46
|
-
export declare const Rp: import("styled-components").StyledComponent<"rp", import("./
|
|
47
|
-
export declare const Rt: import("styled-components").StyledComponent<"rt", import("./
|
|
48
|
-
export declare const Ruby: import("styled-components").StyledComponent<"ruby", import("./
|
|
49
|
-
export declare const S: import("styled-components").StyledComponent<"s", import("./
|
|
50
|
-
export declare const Samp: import("styled-components").StyledComponent<"samp", import("./
|
|
51
|
-
export declare const Small: import("styled-components").StyledComponent<"small", import("./
|
|
52
|
-
export declare const Span: import("styled-components").StyledComponent<"span", import("./
|
|
53
|
-
export declare const Strong: import("styled-components").StyledComponent<"strong", import("./
|
|
54
|
-
export declare const Sub: import("styled-components").StyledComponent<"sub", import("./
|
|
55
|
-
export declare const Sup: import("styled-components").StyledComponent<"sup", import("./
|
|
56
|
-
export declare const Time: import("styled-components").StyledComponent<"time", import("./
|
|
57
|
-
export declare const U: import("styled-components").StyledComponent<"u", import("./
|
|
58
|
-
export declare const Wbr: import("styled-components").StyledComponent<"wbr", import("./
|
|
1
|
+
export declare const Address: import("styled-components").StyledComponent<"address", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"address">, never>;
|
|
2
|
+
export declare const Article: import("styled-components").StyledComponent<"article", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"article">, never>;
|
|
3
|
+
export declare const Aside: import("styled-components").StyledComponent<"aside", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"aside">, never>;
|
|
4
|
+
export declare const Footer: import("styled-components").StyledComponent<"footer", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"footer">, never>;
|
|
5
|
+
export declare const Header: import("styled-components").StyledComponent<"header", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"header">, never>;
|
|
6
|
+
export declare const H1: import("styled-components").StyledComponent<"h1", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"h1">, never>;
|
|
7
|
+
export declare const H2: import("styled-components").StyledComponent<"h2", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"h2">, never>;
|
|
8
|
+
export declare const H3: import("styled-components").StyledComponent<"h3", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"h3">, never>;
|
|
9
|
+
export declare const H4: import("styled-components").StyledComponent<"h4", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"h4">, never>;
|
|
10
|
+
export declare const H5: import("styled-components").StyledComponent<"h5", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"h5">, never>;
|
|
11
|
+
export declare const H6: import("styled-components").StyledComponent<"h6", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"h6">, never>;
|
|
12
|
+
export declare const Hgroup: import("styled-components").StyledComponent<"hgroup", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"hgroup">, never>;
|
|
13
|
+
export declare const Main: import("styled-components").StyledComponent<"main", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"main">, never>;
|
|
14
|
+
export declare const Nav: import("styled-components").StyledComponent<"nav", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"nav">, never>;
|
|
15
|
+
export declare const Section: import("styled-components").StyledComponent<"section", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"section">, never>;
|
|
16
|
+
export declare const Search: import("styled-components").StyledComponent<"search", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"search">, never>;
|
|
17
|
+
export declare const Blockquote: import("styled-components").StyledComponent<"blockquote", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"blockquote">, never>;
|
|
18
|
+
export declare const Dd: import("styled-components").StyledComponent<"dd", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"dd">, never>;
|
|
19
|
+
export declare const Div: import("styled-components").StyledComponent<"div", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"div">, never>;
|
|
20
|
+
export declare const Dl: import("styled-components").StyledComponent<"dl", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"dl">, never>;
|
|
21
|
+
export declare const Dt: import("styled-components").StyledComponent<"dt", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"dt">, never>;
|
|
22
|
+
export declare const Figcaption: import("styled-components").StyledComponent<"figcaption", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"figcaption">, never>;
|
|
23
|
+
export declare const Figure: import("styled-components").StyledComponent<"figure", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"figure">, never>;
|
|
24
|
+
export declare const Hr: import("styled-components").StyledComponent<"hr", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"hr">, never>;
|
|
25
|
+
export declare const Li: import("styled-components").StyledComponent<"li", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"li">, never>;
|
|
26
|
+
export declare const Menu: import("styled-components").StyledComponent<"menu", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"menu">, never>;
|
|
27
|
+
export declare const Ol: import("styled-components").StyledComponent<"ol", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"ol">, never>;
|
|
28
|
+
export declare const P: import("styled-components").StyledComponent<"p", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"p">, never>;
|
|
29
|
+
export declare const Pre: import("styled-components").StyledComponent<"pre", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"pre">, never>;
|
|
30
|
+
export declare const Ul: import("styled-components").StyledComponent<"ul", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"ul">, never>;
|
|
31
|
+
export declare const A: import("styled-components").StyledComponent<"a", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"a">, never>;
|
|
32
|
+
export declare const Abbr: import("styled-components").StyledComponent<"abbr", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"abbr">, never>;
|
|
33
|
+
export declare const B: import("styled-components").StyledComponent<"b", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"b">, never>;
|
|
34
|
+
export declare const Bdi: import("styled-components").StyledComponent<"bdi", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"bdi">, never>;
|
|
35
|
+
export declare const Bdo: import("styled-components").StyledComponent<"bdo", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"bdo">, never>;
|
|
36
|
+
export declare const Br: import("styled-components").StyledComponent<"br", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"br">, never>;
|
|
37
|
+
export declare const Cite: import("styled-components").StyledComponent<"cite", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"cite">, never>;
|
|
38
|
+
export declare const Code: import("styled-components").StyledComponent<"code", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"code">, never>;
|
|
39
|
+
export declare const Data: import("styled-components").StyledComponent<"data", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"data">, never>;
|
|
40
|
+
export declare const Dfn: import("styled-components").StyledComponent<"dfn", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"dfn">, never>;
|
|
41
|
+
export declare const Em: import("styled-components").StyledComponent<"em", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"em">, never>;
|
|
42
|
+
export declare const I: import("styled-components").StyledComponent<"i", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"i">, never>;
|
|
43
|
+
export declare const Kbd: import("styled-components").StyledComponent<"kbd", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"kbd">, never>;
|
|
44
|
+
export declare const Mark: import("styled-components").StyledComponent<"mark", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"mark">, never>;
|
|
45
|
+
export declare const Q: import("styled-components").StyledComponent<"q", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"q">, never>;
|
|
46
|
+
export declare const Rp: import("styled-components").StyledComponent<"rp", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"rp">, never>;
|
|
47
|
+
export declare const Rt: import("styled-components").StyledComponent<"rt", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"rt">, never>;
|
|
48
|
+
export declare const Ruby: import("styled-components").StyledComponent<"ruby", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"ruby">, never>;
|
|
49
|
+
export declare const S: import("styled-components").StyledComponent<"s", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"s">, never>;
|
|
50
|
+
export declare const Samp: import("styled-components").StyledComponent<"samp", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"samp">, never>;
|
|
51
|
+
export declare const Small: import("styled-components").StyledComponent<"small", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"small">, never>;
|
|
52
|
+
export declare const Span: import("styled-components").StyledComponent<"span", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"span">, never>;
|
|
53
|
+
export declare const Strong: import("styled-components").StyledComponent<"strong", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"strong">, never>;
|
|
54
|
+
export declare const Sub: import("styled-components").StyledComponent<"sub", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"sub">, never>;
|
|
55
|
+
export declare const Sup: import("styled-components").StyledComponent<"sup", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"sup">, never>;
|
|
56
|
+
export declare const Time: import("styled-components").StyledComponent<"time", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"time">, never>;
|
|
57
|
+
export declare const U: import("styled-components").StyledComponent<"u", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"u">, never>;
|
|
58
|
+
export declare const Wbr: import("styled-components").StyledComponent<"wbr", import("./index.js").Theme, object & import("./index.js").OwnerInterface & import("./index.js").InnerRefInterface<"wbr">, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const styled: (<C extends import("react").ComponentType<any> |
|
|
2
|
+
export declare const styled: (<C extends keyof import("react").JSX.IntrinsicElements | import("react").ComponentType<any> | import("styled-components").AnyStyledComponent>(tag: C, options?: import("./types.js").Options) => import("./types.js").ThemedStyledFunctionBase<C, import("./types.js").Theme, {}, never> & {
|
|
3
3
|
attrs: <U, NewA extends Partial<import("styled-components").StyledComponentPropsWithRef<C> & U> & {
|
|
4
4
|
[others: string]: any;
|
|
5
5
|
} = {}>(attrs: NewA | ((props: import("styled-components").ThemedStyledProps<import("styled-components").StyledComponentPropsWithRef<C> & U, import("./types.js").Theme>) => NewA)) => import("styled-components").ThemedStyledFunction<C, import("./types.js").Theme, {} & NewA, string | number | symbol | keyof NewA>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AnyStyledComponent, ThemedStyledFunction } from 'styled-components';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import type { AnyStyledComponent, ThemedStyledFunction } from 'styled-components';
|
|
3
3
|
import type { Options, Theme, ThemedStyledFunctionBase } from './types.js';
|
|
4
|
-
export declare const styledFunction: <C extends React.ComponentType<any> |
|
|
4
|
+
export declare const styledFunction: <C extends keyof React.JSX.IntrinsicElements | React.ComponentType<any> | AnyStyledComponent>(tag: C, options?: Options) => ThemedStyledFunctionBase<C, Theme, {}, never> & {
|
|
5
5
|
attrs: <U, NewA extends Partial<import("styled-components").StyledComponentPropsWithRef<C> & U> & {
|
|
6
6
|
[others: string]: any;
|
|
7
7
|
} = {}>(attrs: NewA | ((props: import("styled-components").ThemedStyledProps<import("styled-components").StyledComponentPropsWithRef<C> & U, Theme>) => NewA)) => ThemedStyledFunction<C, Theme, {} & NewA, string | number | symbol | keyof NewA>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
import { styledFunction } from './styledFunction.js';
|
|
3
3
|
export type StyledObject = {
|
|
4
|
-
[TTag in keyof JSX.IntrinsicElements]: ReturnType<typeof styledFunction<TTag>>;
|
|
4
|
+
[TTag in keyof React.JSX.IntrinsicElements]: ReturnType<typeof styledFunction<TTag>>;
|
|
5
5
|
};
|
|
6
6
|
export declare const styledObject: StyledObject;
|
|
@@ -29,8 +29,8 @@ export type PropsWithTheme<T = Record<string, unknown>> = T & {
|
|
|
29
29
|
theme: Theme;
|
|
30
30
|
};
|
|
31
31
|
type ComponentInnerRef<T extends ElementType> = T extends new (props: infer P) => React.Component<any, any> ? Ref<InstanceType<T>> | undefined : React.PropsWithRef<React.ComponentProps<T>>['ref'];
|
|
32
|
-
export type StyledComponentInnerRef<C extends keyof JSX.IntrinsicElements | React.ComponentType<any>> = C extends AnyStyledComponent ? ComponentInnerRef<StyledComponentInnerComponent<C>> : ComponentInnerRef<C>;
|
|
33
|
-
export interface ThemedStyledFunctionBase<C extends keyof JSX.IntrinsicElements | React.ComponentType<any>, T extends object, O extends object = {}, A extends keyof any = never> {
|
|
32
|
+
export type StyledComponentInnerRef<C extends keyof React.JSX.IntrinsicElements | React.ComponentType<any>> = C extends AnyStyledComponent ? ComponentInnerRef<StyledComponentInnerComponent<C>> : ComponentInnerRef<C>;
|
|
33
|
+
export interface ThemedStyledFunctionBase<C extends keyof React.JSX.IntrinsicElements | React.ComponentType<any>, T extends object, O extends object = {}, A extends keyof any = never> {
|
|
34
34
|
<U extends object>(first: StyleArg<ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U & OwnerInterface & InnerRefInterface<C>, T>>, ...rest: Expressions<ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U & OwnerInterface & InnerRefInterface<C>, T>>): StyledComponent<C, T, O & U & OwnerInterface & InnerRefInterface<C>, A>;
|
|
35
35
|
}
|
|
36
36
|
export type AttrsFunc<T extends object = Record<string, unknown>> = (props: StyledComponentPropsWithRef<StyledComponentInnerComponent<React.ComponentType<T>>>) => Partial<StyledComponentPropsWithRef<StyledComponentInnerComponent<any>>>;
|
|
@@ -40,7 +40,7 @@ export type InternalAttrsFunc<T extends object = Record<string, unknown>> = (pro
|
|
|
40
40
|
options: Options;
|
|
41
41
|
displayName: string | null;
|
|
42
42
|
}) => Partial<StyledComponentPropsWithRef<StyledComponentInnerComponent<any>>>;
|
|
43
|
-
export interface InnerRefInterface<C extends keyof JSX.IntrinsicElements | React.ComponentType<any>> {
|
|
43
|
+
export interface InnerRefInterface<C extends keyof React.JSX.IntrinsicElements | React.ComponentType<any>> {
|
|
44
44
|
innerRef?: StyledComponentInnerRef<C>;
|
|
45
45
|
ref?: never;
|
|
46
46
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const themeProviderHOC: <T extends JSX.IntrinsicAttributes>(Component: React.ComponentType<T>) => React.FunctionComponent<T>;
|
|
2
|
+
export declare const themeProviderHOC: <T extends React.JSX.IntrinsicAttributes>(Component: React.ComponentType<T>) => React.FunctionComponent<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useGetLayoutMode: () => "
|
|
1
|
+
export declare const useGetLayoutMode: () => "l" | "m" | "s" | "xs" | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-system",
|
|
3
|
-
"version": "3.51.0-next.
|
|
3
|
+
"version": "3.51.0-next.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - System",
|
|
6
6
|
"files": [
|
|
@@ -14,58 +14,6 @@
|
|
|
14
14
|
"types": "./dist/types/index.d.ts",
|
|
15
15
|
"import": "./dist/esm/index.js",
|
|
16
16
|
"require": "./dist/cjs/index.js"
|
|
17
|
-
},
|
|
18
|
-
"./utils": {
|
|
19
|
-
"import": "./dist/esm/utils.js",
|
|
20
|
-
"require": "./dist/cjs/utils.js"
|
|
21
|
-
},
|
|
22
|
-
"./themeProviderHOC": {
|
|
23
|
-
"import": "./dist/esm/themeProviderHOC.js",
|
|
24
|
-
"require": "./dist/cjs/themeProviderHOC.js"
|
|
25
|
-
},
|
|
26
|
-
"./theme": {
|
|
27
|
-
"import": "./dist/esm/theme.js",
|
|
28
|
-
"require": "./dist/cjs/theme.js"
|
|
29
|
-
},
|
|
30
|
-
"./th": {
|
|
31
|
-
"import": "./dist/esm/th.js",
|
|
32
|
-
"require": "./dist/cjs/th.js"
|
|
33
|
-
},
|
|
34
|
-
"./styled/utils": {
|
|
35
|
-
"import": "./dist/esm/styled/utils.js",
|
|
36
|
-
"require": "./dist/cjs/styled/utils.js"
|
|
37
|
-
},
|
|
38
|
-
"./styled/types": {
|
|
39
|
-
"import": "./dist/esm/styled/types.js",
|
|
40
|
-
"require": "./dist/cjs/styled/types.js"
|
|
41
|
-
},
|
|
42
|
-
"./styled/styleGetters": {
|
|
43
|
-
"import": "./dist/esm/styled/styleGetters.js",
|
|
44
|
-
"require": "./dist/cjs/styled/styleGetters.js"
|
|
45
|
-
},
|
|
46
|
-
"./styled": {
|
|
47
|
-
"import": "./dist/esm/styled/index.js",
|
|
48
|
-
"require": "./dist/cjs/styled/index.js"
|
|
49
|
-
},
|
|
50
|
-
"./spaceUtilities": {
|
|
51
|
-
"import": "./dist/esm/spaceUtilities.js",
|
|
52
|
-
"require": "./dist/cjs/spaceUtilities.js"
|
|
53
|
-
},
|
|
54
|
-
"./mobileUtilities": {
|
|
55
|
-
"import": "./dist/esm/mobileUtilities.js",
|
|
56
|
-
"require": "./dist/cjs/mobileUtilities.js"
|
|
57
|
-
},
|
|
58
|
-
"./globalStyles": {
|
|
59
|
-
"import": "./dist/esm/globalStyles.js",
|
|
60
|
-
"require": "./dist/cjs/globalStyles.js"
|
|
61
|
-
},
|
|
62
|
-
"./constants": {
|
|
63
|
-
"import": "./dist/esm/constants.js",
|
|
64
|
-
"require": "./dist/cjs/constants.js"
|
|
65
|
-
},
|
|
66
|
-
"./arithmetic": {
|
|
67
|
-
"import": "./dist/esm/arithmetic.js",
|
|
68
|
-
"require": "./dist/cjs/arithmetic.js"
|
|
69
17
|
}
|
|
70
18
|
},
|
|
71
19
|
"sideEffects": [
|
|
@@ -102,7 +50,7 @@
|
|
|
102
50
|
"@elliemae/pui-theme": "~2.10.0",
|
|
103
51
|
"jest": "~29.7.0",
|
|
104
52
|
"styled-components": "~5.3.9",
|
|
105
|
-
"@elliemae/ds-monorepo-devops": "3.51.0-next.
|
|
53
|
+
"@elliemae/ds-monorepo-devops": "3.51.0-next.3"
|
|
106
54
|
},
|
|
107
55
|
"peerDependencies": {
|
|
108
56
|
"@elliemae/pui-theme": "~2.10.0",
|