@elliemae/ds-system 3.22.0-next.3 → 3.22.0-next.30
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/arithmetic.js.map +1 -1
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/globalStyles.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/mobileUtilities.js.map +1 -1
- package/dist/cjs/spaceUtilities.js.map +1 -1
- package/dist/cjs/styled/checkNamingConvention.js.map +1 -1
- package/dist/cjs/styled/coerceWithDefaultTheme.js.map +1 -1
- package/dist/cjs/styled/expressions/genStyleOverridesExpression.js.map +1 -1
- package/dist/cjs/styled/expressions/genVariantOverridesExpression.js +18 -12
- package/dist/cjs/styled/expressions/genVariantOverridesExpression.js.map +3 -3
- package/dist/cjs/styled/expressions/index.js.map +1 -1
- package/dist/cjs/styled/fixStyleArg.js.map +1 -1
- package/dist/cjs/styled/generated-attributes/generateAttributes.js.map +1 -1
- package/dist/cjs/styled/generated-attributes/generateAutoCalculated.js.map +1 -1
- package/dist/cjs/styled/generated-attributes/generateDisplayName.js.map +1 -1
- package/dist/cjs/styled/generated-attributes/index.js.map +1 -1
- package/dist/cjs/styled/generated-attributes/utils/callbackMerger.js.map +1 -1
- package/dist/cjs/styled/generated-attributes/utils/refMerger.js.map +1 -1
- package/dist/cjs/styled/helpers.js.map +1 -1
- package/dist/cjs/styled/index.js.map +1 -1
- package/dist/cjs/styled/styled.js.map +1 -1
- package/dist/cjs/styled/styledFunction.js.map +1 -1
- package/dist/cjs/styled/styledObject.js.map +1 -1
- package/dist/cjs/styled/system-types.js.map +1 -1
- package/dist/cjs/styled/system-utilities/background.js.map +1 -1
- package/dist/cjs/styled/system-utilities/border.js.map +1 -1
- package/dist/cjs/styled/system-utilities/color.js.map +1 -1
- package/dist/cjs/styled/system-utilities/index.js.map +1 -1
- package/dist/cjs/styled/system-utilities/sizing.js.map +1 -1
- package/dist/cjs/styled/system-utilities/space.js.map +1 -1
- package/dist/cjs/styled/system.js.map +1 -1
- package/dist/cjs/styled/transformers/index.js.map +1 -1
- package/dist/cjs/styled/transformers/magicCssTransform.js.map +1 -1
- package/dist/cjs/styled/types.js.map +1 -1
- package/dist/cjs/th.js.map +1 -1
- package/dist/cjs/theme.js.map +1 -1
- package/dist/cjs/themeProviderHOC.js.map +1 -1
- package/dist/cjs/utils.js.map +1 -1
- package/dist/cjs/xStyledWrapper.js.map +1 -1
- package/dist/esm/arithmetic.js.map +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/globalStyles.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/mobileUtilities.js.map +1 -1
- package/dist/esm/spaceUtilities.js.map +1 -1
- package/dist/esm/styled/checkNamingConvention.js.map +1 -1
- package/dist/esm/styled/coerceWithDefaultTheme.js.map +1 -1
- package/dist/esm/styled/expressions/genStyleOverridesExpression.js.map +1 -1
- package/dist/esm/styled/expressions/genVariantOverridesExpression.js +18 -12
- package/dist/esm/styled/expressions/genVariantOverridesExpression.js.map +3 -3
- package/dist/esm/styled/expressions/index.js.map +1 -1
- package/dist/esm/styled/fixStyleArg.js.map +1 -1
- package/dist/esm/styled/generated-attributes/generateAttributes.js.map +1 -1
- package/dist/esm/styled/generated-attributes/generateAutoCalculated.js.map +1 -1
- package/dist/esm/styled/generated-attributes/generateDisplayName.js.map +1 -1
- package/dist/esm/styled/generated-attributes/index.js.map +1 -1
- package/dist/esm/styled/generated-attributes/utils/callbackMerger.js.map +1 -1
- package/dist/esm/styled/generated-attributes/utils/refMerger.js.map +1 -1
- package/dist/esm/styled/helpers.js.map +1 -1
- package/dist/esm/styled/index.js.map +1 -1
- package/dist/esm/styled/styled.js.map +1 -1
- package/dist/esm/styled/styledFunction.js.map +1 -1
- package/dist/esm/styled/styledObject.js.map +1 -1
- package/dist/esm/styled/system-types.js.map +1 -1
- package/dist/esm/styled/system-utilities/background.js.map +1 -1
- package/dist/esm/styled/system-utilities/border.js.map +1 -1
- package/dist/esm/styled/system-utilities/color.js.map +1 -1
- package/dist/esm/styled/system-utilities/index.js.map +1 -1
- package/dist/esm/styled/system-utilities/sizing.js.map +1 -1
- package/dist/esm/styled/system-utilities/space.js.map +1 -1
- package/dist/esm/styled/system.js.map +1 -1
- package/dist/esm/styled/transformers/index.js.map +1 -1
- package/dist/esm/styled/transformers/magicCssTransform.js.map +1 -1
- package/dist/esm/styled/types.js.map +1 -1
- package/dist/esm/th.js.map +1 -1
- package/dist/esm/theme.js.map +1 -1
- package/dist/esm/themeProviderHOC.js.map +1 -1
- package/dist/esm/utils.js.map +1 -1
- package/dist/esm/xStyledWrapper.js.map +1 -1
- package/dist/types/styled/styledObject.d.ts +1 -0
- package/package.json +9 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/arithmetic.tsx", "
|
|
3
|
+
"sources": ["../../src/arithmetic.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export function getNumberAndUnit(numberStrWithUnit: string | number): { number: string; unit: string } {\n const matchResult = String(numberStrWithUnit).match(/[a-z]+|[(/^\\-?\\d*.\\d+|\\d+),?]+/gi);\n let number = '0';\n let unit = 'px';\n if (matchResult) {\n [number, unit] = matchResult;\n }\n\n return { number, unit };\n}\n\nexport function op(operator: string, n1: string, n2: string | number): string {\n const { number, unit } = getNumberAndUnit(n1);\n const { number: number2, unit: unit2 } = getNumberAndUnit(n2);\n switch (operator) {\n case '*':\n return `${Number(number) * Number(number2)}${unit || unit2}`;\n case '+':\n return `${Number(number) + Number(number2)}${unit || unit2}`;\n case '-':\n return `${Number(number) - Number(number2)}${unit || unit2}`;\n case '/':\n return `${Number(number) / Number(number2)}${unit || unit2}`;\n default:\n return `${Number(number) + Number(number2)}${unit || unit2}`;\n }\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,SAAS,iBAAiB,mBAAsE;AACrG,QAAM,cAAc,OAAO,iBAAiB,EAAE,MAAM,kCAAkC;AACtF,MAAI,SAAS;AACb,MAAI,OAAO;AACX,MAAI,aAAa;AACf,KAAC,QAAQ,IAAI,IAAI;AAAA,EACnB;AAEA,SAAO,EAAE,QAAQ,KAAK;AACxB;AAEO,SAAS,GAAG,UAAkB,IAAY,IAA6B;AAC5E,QAAM,EAAE,QAAQ,KAAK,IAAI,iBAAiB,EAAE;AAC5C,QAAM,EAAE,QAAQ,SAAS,MAAM,MAAM,IAAI,iBAAiB,EAAE;AAC5D,UAAQ,UAAU;AAAA,IAChB,KAAK;AACH,aAAO,GAAG,OAAO,MAAM,IAAI,OAAO,OAAO,IAAI,QAAQ;AAAA,IACvD,KAAK;AACH,aAAO,GAAG,OAAO,MAAM,IAAI,OAAO,OAAO,IAAI,QAAQ;AAAA,IACvD,KAAK;AACH,aAAO,GAAG,OAAO,MAAM,IAAI,OAAO,OAAO,IAAI,QAAQ;AAAA,IACvD,KAAK;AACH,aAAO,GAAG,OAAO,MAAM,IAAI,OAAO,OAAO,IAAI,QAAQ;AAAA,IACvD;AACE,aAAO,GAAG,OAAO,MAAM,IAAI,OAAO,OAAO,IAAI,QAAQ;AAAA,EACzD;AACF;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/constants.ts", "
|
|
3
|
+
"sources": ["../../src/constants.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const desktopBaseFont = 13;\n\nexport const mobileBaseFont = 16;\n\nexport const translateUnits = {\n '8px': '4px',\n '16px': '8px',\n '32px': '16px',\n '48px': '24px',\n '56px': '32px',\n '64px': '48px',\n '72px': '64px',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,kBAAkB;AAExB,MAAM,iBAAiB;AAEvB,MAAM,iBAAiB;AAAA,EAC5B,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AACV;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/globalStyles.tsx", "
|
|
3
|
+
"sources": ["../../src/globalStyles.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { createGlobalStyle } from './styled/index.js';\nimport { th } from './th.js';\n\nexport const GlobalStyles = createGlobalStyle<{ device: 'desktop' | 'mobile' }>`\n // Here we setup the root font-sizes for mobile vs desktop\n :root {\n font-size: ${(props) => (props.device === 'desktop' ? '81.25%' : '100%')};\n\n @media(min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => (props.device === 'mobile' ? '100%' : '81.25%')};\n }\n }\n\n body {\n overscroll-behavior-y: none;\n\n font-size: 1rem; // since we correctly have set up the root font-sizes, we can use 1rem\n }\n\n /* fix sanitize */\n ::placeholder {\n font-weight: ${th.fontWeight('regular')};\n color: ${th.color('neutral-500')};\n }\n ::-webkit-input-placeholder {\n opacity: 1;\n }\n\n :where(svg:not([fill])) {\n fill: unset;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAkC;AAClC,gBAAmB;AAEZ,MAAM,eAAe;AAAA;AAAA;AAAA,iBAGX,CAAC,UAAW,MAAM,WAAW,YAAY,WAAW;AAAA;AAAA,wBAE7C,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACtC,CAAC,UAAW,MAAM,WAAW,WAAW,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAYjD,aAAG,WAAW,SAAS;AAAA,aAC7B,aAAG,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.tsx", "
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './globalStyles.js';\nexport * from './spaceUtilities.js';\nexport * from './mobileUtilities.js';\nexport * from './utils.js';\nexport * from './arithmetic.js';\nexport * from './th.js';\nexport * from './theme.js';\nexport * from './styled/index.js';\nexport { position, typography } from '@xstyled/system';\nexport { themeProviderHOC } from './themeProviderHOC.js';\nexport { ThemeContext } from '@xstyled/styled-components';\nexport { xStyledCommonProps, XStyledWrapper } from './xStyledWrapper.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,8BAAd;AACA,wBAAc,gCADd;AAEA,wBAAc,iCAFd;AAGA,wBAAc,uBAHd;AAIA,wBAAc,4BAJd;AAKA,wBAAc,oBALd;AAMA,wBAAc,uBANd;AAOA,wBAAc,8BAPd;AAQA,oBAAqC;AACrC,8BAAiC;AACjC,+BAA6B;AAC7B,4BAAmD;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/mobileUtilities.tsx", "
|
|
3
|
+
"sources": ["../../src/mobileUtilities.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable @typescript-eslint/naming-convention */\nimport { useState, useEffect } from 'react';\nimport { theme } from './theme.js';\nimport { desktopBaseFont, mobileBaseFont, translateUnits } from './constants.js';\n\n// eslint-disable-next-line no-underscore-dangle\nexport function __UNSAFE_SPACE_TO_DIMSUM(unit: string): string {\n if (unit in translateUnits) return translateUnits[unit as keyof typeof translateUnits];\n return `${(parseFloat(unit) * (mobileBaseFont / desktopBaseFont)) / 2}px`;\n}\n\nexport const isMobile = (): boolean => {\n if (!window) return false;\n return Number(theme.breakpoints.medium.split('px')[0]) - window.innerWidth >= 0;\n};\n\nexport function toMobile(unit: string): string {\n if (!isMobile()) return unit;\n return `${parseFloat(unit) * (desktopBaseFont / mobileBaseFont)}rem`;\n}\n\nexport const useIsMobile = (): boolean => {\n const [mobile, setMobile] = useState<boolean>(isMobile());\n\n useEffect(() => {\n function handleResize() {\n setMobile(isMobile());\n }\n window?.addEventListener('resize', handleResize);\n return () => {\n window?.removeEventListener('resize', handleResize);\n };\n }, []);\n\n if (!window) return false;\n return mobile;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAoC;AACpC,mBAAsB;AACtB,uBAAgE;AAGzD,SAAS,yBAAyB,MAAsB;AAC7D,MAAI,QAAQ;AAAgB,WAAO,gCAAe,IAAmC;AACrF,SAAO,GAAI,WAAW,IAAI,KAAK,kCAAiB,oCAAoB;AACtE;AAEO,MAAM,WAAW,MAAe;AACrC,MAAI,CAAC;AAAQ,WAAO;AACpB,SAAO,OAAO,mBAAM,YAAY,OAAO,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,OAAO,cAAc;AAChF;AAEO,SAAS,SAAS,MAAsB;AAC7C,MAAI,CAAC,SAAS;AAAG,WAAO;AACxB,SAAO,GAAG,WAAW,IAAI,KAAK,mCAAkB;AAClD;AAEO,MAAM,cAAc,MAAe;AACxC,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAkB,SAAS,CAAC;AAExD,8BAAU,MAAM;AACd,aAAS,eAAe;AACtB,gBAAU,SAAS,CAAC;AAAA,IACtB;AACA,YAAQ,iBAAiB,UAAU,YAAY;AAC/C,WAAO,MAAM;AACX,cAAQ,oBAAoB,UAAU,YAAY;AAAA,IACpD;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,MAAI,CAAC;AAAQ,WAAO;AACpB,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/spaceUtilities.tsx", "
|
|
3
|
+
"sources": ["../../src/spaceUtilities.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { get } from 'lodash';\nimport { theme } from './theme.js';\n\nexport function mapGap(gutter: number | string): number | string {\n if (!gutter) return '0rem';\n if (String(gutter).includes('rem') || String(gutter).includes('px')) return gutter;\n return `${theme.space[gutter as keyof typeof theme.space]}`;\n}\n\nexport function mapGutter(gutter: string | number | undefined): string {\n if (!gutter) return '0rem';\n return `${theme.space[gutter as keyof typeof theme.space]} * 2`;\n}\n\nexport function mapSpace(width: string | number): string {\n if (typeof width === 'string') return get(theme, width) ? `${get(theme, width)}` : width;\n return `${width * 100}%`;\n}\n\nexport function fixSpaceGutter(\n width: string | number | string[] | number[],\n gutter?: string | number,\n): string | string[] {\n if (!width) return '';\n if (width === 'fit-content') return width;\n if (Array.isArray(width)) return width.map((w) => `calc(${mapSpace(w)} - (${mapGutter(gutter)}))`);\n return `calc(${mapSpace(width)} - (${mapGutter(gutter)}))`;\n}\n\nexport function fixSpace(width: string | number | string[] | number[]): string | string[] {\n if (!width) return '';\n if (Array.isArray(width)) return width.map((w) => mapSpace(w));\n return mapSpace(width);\n}\n\nexport function numbersToFr(grid: number[]): string[] {\n const den = grid.map((f) => (f < 1 ? Math.floor(1 / f) : f));\n return den.map((d) => `${d}fr`);\n}\nexport function mapGrid(width: string | number): string {\n if (get(theme, width)) return `${get(theme, width)}`;\n if (typeof width === 'string') return width;\n const den = width < 1 ? Math.floor(1 / width) : width;\n return `${den}fr`;\n}\n\nexport function mapTemplateGrid(grid: number | string | (number | string)[]): string | string[] {\n if (Array.isArray(grid)) {\n if (grid.some((w) => typeof w === 'string')) return grid.map((w) => mapGrid(w));\n return numbersToFr(grid as number[]);\n }\n return mapGrid(grid);\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAoB;AACpB,mBAAsB;AAEf,SAAS,OAAO,QAA0C;AAC/D,MAAI,CAAC;AAAQ,WAAO;AACpB,MAAI,OAAO,MAAM,EAAE,SAAS,KAAK,KAAK,OAAO,MAAM,EAAE,SAAS,IAAI;AAAG,WAAO;AAC5E,SAAO,GAAG,mBAAM,MAAM,MAAkC;AAC1D;AAEO,SAAS,UAAU,QAA6C;AACrE,MAAI,CAAC;AAAQ,WAAO;AACpB,SAAO,GAAG,mBAAM,MAAM,MAAkC;AAC1D;AAEO,SAAS,SAAS,OAAgC;AACvD,MAAI,OAAO,UAAU;AAAU,eAAO,mBAAI,oBAAO,KAAK,IAAI,OAAG,mBAAI,oBAAO,KAAK,MAAM;AACnF,SAAO,GAAG,QAAQ;AACpB;AAEO,SAAS,eACd,OACA,QACmB;AACnB,MAAI,CAAC;AAAO,WAAO;AACnB,MAAI,UAAU;AAAe,WAAO;AACpC,MAAI,MAAM,QAAQ,KAAK;AAAG,WAAO,MAAM,IAAI,CAAC,MAAM,QAAQ,SAAS,CAAC,QAAQ,UAAU,MAAM,KAAK;AACjG,SAAO,QAAQ,SAAS,KAAK,QAAQ,UAAU,MAAM;AACvD;AAEO,SAAS,SAAS,OAAiE;AACxF,MAAI,CAAC;AAAO,WAAO;AACnB,MAAI,MAAM,QAAQ,KAAK;AAAG,WAAO,MAAM,IAAI,CAAC,MAAM,SAAS,CAAC,CAAC;AAC7D,SAAO,SAAS,KAAK;AACvB;AAEO,SAAS,YAAY,MAA0B;AACpD,QAAM,MAAM,KAAK,IAAI,CAAC,MAAO,IAAI,IAAI,KAAK,MAAM,IAAI,CAAC,IAAI,CAAE;AAC3D,SAAO,IAAI,IAAI,CAAC,MAAM,GAAG,KAAK;AAChC;AACO,SAAS,QAAQ,OAAgC;AACtD,UAAI,mBAAI,oBAAO,KAAK;AAAG,WAAO,OAAG,mBAAI,oBAAO,KAAK;AACjD,MAAI,OAAO,UAAU;AAAU,WAAO;AACtC,QAAM,MAAM,QAAQ,IAAI,KAAK,MAAM,IAAI,KAAK,IAAI;AAChD,SAAO,GAAG;AACZ;AAEO,SAAS,gBAAgB,MAAgE;AAC9F,MAAI,MAAM,QAAQ,IAAI,GAAG;AACvB,QAAI,KAAK,KAAK,CAAC,MAAM,OAAO,MAAM,QAAQ;AAAG,aAAO,KAAK,IAAI,CAAC,MAAM,QAAQ,CAAC,CAAC;AAC9E,WAAO,YAAY,IAAgB;AAAA,EACrC;AACA,SAAO,QAAQ,IAAI;AACrB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/styled/checkNamingConvention.ts", "
|
|
3
|
+
"sources": ["../../../src/styled/checkNamingConvention.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable no-console */\n\nexport const checkNamingConvention = (componentName: string | null, componentSlot: string | null): void => {\n // We just check that the name is correctly written, should be removed in the future\n if (componentName !== null) {\n const matches = componentName.match(/DS([A-Z]|[a-z]|[0-9])*/);\n if (!matches || matches.length === 0 || matches[0].length !== componentName.length) {\n console.warn(`BAD FORMAT FOR COMPONENT NAME ${componentName}, use DSWhateverComponentTitled`);\n }\n }\n if (componentSlot !== null) {\n const isValid = /([a-z]-)*/.test(componentSlot);\n if (!isValid) {\n console.warn(`BAD FORMAT FOR COMPONENT SLOT ${componentSlot}, use any-component-slot`);\n }\n }\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEhB,MAAM,wBAAwB,CAAC,eAA8B,kBAAuC;AAEzG,MAAI,kBAAkB,MAAM;AAC1B,UAAM,UAAU,cAAc,MAAM,wBAAwB;AAC5D,QAAI,CAAC,WAAW,QAAQ,WAAW,KAAK,QAAQ,CAAC,EAAE,WAAW,cAAc,QAAQ;AAClF,cAAQ,KAAK,iCAAiC,8CAA8C;AAAA,IAC9F;AAAA,EACF;AACA,MAAI,kBAAkB,MAAM;AAC1B,UAAM,UAAU,YAAY,KAAK,aAAa;AAC9C,QAAI,CAAC,SAAS;AACZ,cAAQ,KAAK,iCAAiC,uCAAuC;AAAA,IACvF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/styled/coerceWithDefaultTheme.ts", "
|
|
3
|
+
"sources": ["../../../src/styled/coerceWithDefaultTheme.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { theme as defaultTheme } from '../theme.js';\nimport type { Expressions, Expression, PropsWithTheme } from './types.js';\n\nconst coerceSingleExpressionWithDefaultTheme = (expression: Expression): Expression => {\n if (typeof expression === 'function') {\n return (props: PropsWithTheme) =>\n expression({\n ...props,\n theme: props.theme ?? defaultTheme,\n });\n }\n return expression;\n};\n\nexport const coerceWithDefaultTheme = (expressions: Expressions): Expressions =>\n expressions ? expressions.map(coerceSingleExpressionWithDefaultTheme) : [];\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAsC;AAGtC,MAAM,yCAAyC,CAAC,eAAuC;AACrF,MAAI,OAAO,eAAe,YAAY;AACpC,WAAO,CAAC,UACN,WAAW;AAAA,MACT,GAAG;AAAA,MACH,OAAO,MAAM,SAAS,aAAAA;AAAA,IACxB,CAAC;AAAA,EACL;AACA,SAAO;AACT;AAEO,MAAM,yBAAyB,CAAC,gBACrC,cAAc,YAAY,IAAI,sCAAsC,IAAI,CAAC;",
|
|
6
6
|
"names": ["defaultTheme"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/expressions/genStyleOverridesExpression.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/expressions/genStyleOverridesExpression.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import type { PropsWithTheme, Theme } from '../types.js';\nimport { theme as defaultTheme } from '../../theme.js';\nimport type { CSSObject } from 'styled-components';\n\nconst getStyleOverrides = (name: string, theme: Theme): CSSObject | null =>\n theme.components?.[name]?.styleOverrides || null;\n\nexport const genStyleOverridesExpression =\n (componentName: string, componentSlot: string) => (props: PropsWithTheme) => {\n const styleOverrides = getStyleOverrides(componentName, props.theme ?? defaultTheme);\n if (styleOverrides) {\n return [styleOverrides[componentSlot]];\n }\n return null;\n };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAsC;AAGtC,MAAM,oBAAoB,CAAC,MAAc,UACvC,MAAM,aAAa,IAAI,GAAG,kBAAkB;AAEvC,MAAM,8BACX,CAAC,eAAuB,kBAA0B,CAAC,UAA0B;AAC3E,QAAM,iBAAiB,kBAAkB,eAAe,MAAM,SAAS,aAAAA,KAAY;AACnF,MAAI,gBAAgB;AAClB,WAAO,CAAC,eAAe,aAAa,CAAC;AAAA,EACvC;AACA,SAAO;AACT;",
|
|
6
6
|
"names": ["defaultTheme"]
|
|
@@ -36,22 +36,28 @@ var import_theme = require("../../theme.js");
|
|
|
36
36
|
var import_helpers = require("../helpers.js");
|
|
37
37
|
const getVariantStyles = (name, theme) => {
|
|
38
38
|
const variants = theme.components?.[name]?.variants || [];
|
|
39
|
-
return variants.reduce(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
return variants.reduce(
|
|
40
|
+
(styles, definition) => {
|
|
41
|
+
const key = (0, import_helpers.propsToClassKey)(definition.props);
|
|
42
|
+
styles[key] = definition.style;
|
|
43
|
+
return styles;
|
|
44
|
+
},
|
|
45
|
+
{}
|
|
46
|
+
);
|
|
44
47
|
};
|
|
45
48
|
const genVariantOverridesExpression = (componentName) => (props) => {
|
|
46
49
|
const theme = props.theme ?? import_theme.theme;
|
|
47
50
|
const variantStyles = getVariantStyles(componentName, theme);
|
|
48
51
|
const themeVariants = theme?.components?.[componentName]?.variants || [];
|
|
49
|
-
return themeVariants.reduce(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
return themeVariants.reduce(
|
|
53
|
+
(resultingStyles, themeVariant) => {
|
|
54
|
+
const isMatch = Object.keys(themeVariant.props).every((key) => props[key] === themeVariant.props[key]);
|
|
55
|
+
if (isMatch) {
|
|
56
|
+
resultingStyles.push(variantStyles[(0, import_helpers.propsToClassKey)(themeVariant.props)]);
|
|
57
|
+
}
|
|
58
|
+
return resultingStyles;
|
|
59
|
+
},
|
|
60
|
+
[]
|
|
61
|
+
);
|
|
56
62
|
};
|
|
57
63
|
//# sourceMappingURL=genVariantOverridesExpression.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/expressions/genVariantOverridesExpression.ts", "
|
|
4
|
-
"sourcesContent": ["import type { PropsWithTheme, Theme } from '../types.js';\nimport { theme as defaultTheme } from '../../theme.js';\nimport type { CSSObject } from 'styled-components';\nimport { propsToClassKey } from '../helpers.js';\n\nconst getVariantStyles = (name: string, theme: Theme): Record<string, CSSObject> => {\n const variants = theme.components?.[name]?.variants || [];\n\n return variants.reduce((styles, definition) => {\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAsC;AAEtC,qBAAgC;AAEhC,MAAM,mBAAmB,CAAC,MAAc,UAA4C;AAClF,QAAM,WAAW,MAAM,aAAa,IAAI,GAAG,YAAY,CAAC;AAExD,SAAO,SAAS,
|
|
3
|
+
"sources": ["../../../../src/styled/expressions/genVariantOverridesExpression.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import type { PropsWithTheme, Theme } from '../types.js';\nimport { theme as defaultTheme } from '../../theme.js';\nimport type { CSSObject } from 'styled-components';\nimport { propsToClassKey } from '../helpers.js';\n\nconst getVariantStyles = (name: string, theme: Theme): Record<string, CSSObject> => {\n const variants = theme.components?.[name]?.variants || [];\n\n return variants.reduce(\n (styles, definition) => {\n const key = propsToClassKey(definition.props);\n styles[key] = definition.style;\n return styles;\n },\n {} as Record<string, CSSObject>,\n );\n};\n\nexport const genVariantOverridesExpression = (componentName: string) => (props: PropsWithTheme) => {\n const theme = props.theme ?? defaultTheme;\n const variantStyles = getVariantStyles(componentName, theme);\n\n const themeVariants = theme?.components?.[componentName]?.variants || [];\n\n return themeVariants.reduce(\n (resultingStyles, themeVariant) => {\n const isMatch = Object.keys(themeVariant.props).every((key) => props[key] === themeVariant.props[key]);\n if (isMatch) {\n resultingStyles.push(variantStyles[propsToClassKey(themeVariant.props)]);\n }\n return resultingStyles;\n },\n [] as CSSObject[keyof CSSObject][],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAsC;AAEtC,qBAAgC;AAEhC,MAAM,mBAAmB,CAAC,MAAc,UAA4C;AAClF,QAAM,WAAW,MAAM,aAAa,IAAI,GAAG,YAAY,CAAC;AAExD,SAAO,SAAS;AAAA,IACd,CAAC,QAAQ,eAAe;AACtB,YAAM,UAAM,gCAAgB,WAAW,KAAK;AAC5C,aAAO,GAAG,IAAI,WAAW;AACzB,aAAO;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EACH;AACF;AAEO,MAAM,gCAAgC,CAAC,kBAA0B,CAAC,UAA0B;AACjG,QAAM,QAAQ,MAAM,SAAS,aAAAA;AAC7B,QAAM,gBAAgB,iBAAiB,eAAe,KAAK;AAE3D,QAAM,gBAAgB,OAAO,aAAa,aAAa,GAAG,YAAY,CAAC;AAEvE,SAAO,cAAc;AAAA,IACnB,CAAC,iBAAiB,iBAAiB;AACjC,YAAM,UAAU,OAAO,KAAK,aAAa,KAAK,EAAE,MAAM,CAAC,QAAQ,MAAM,GAAG,MAAM,aAAa,MAAM,GAAG,CAAC;AACrG,UAAI,SAAS;AACX,wBAAgB,KAAK,kBAAc,gCAAgB,aAAa,KAAK,CAAC,CAAC;AAAA,MACzE;AACA,aAAO;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EACH;AACF;",
|
|
6
6
|
"names": ["defaultTheme"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/expressions/index.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/expressions/index.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export { genStyleOverridesExpression } from './genStyleOverridesExpression.js';\nexport { genVariantOverridesExpression } from './genVariantOverridesExpression.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yCAA4C;AAC5C,2CAA8C;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/styled/fixStyleArg.ts", "
|
|
3
|
+
"sources": ["../../../src/styled/fixStyleArg.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { theme as defaultTheme } from '../theme.js';\nimport type { PropsWithTheme, StyleArg } from './types.js';\n\nconst isTemplateStringsArray = (styleArg: StyleArg): styleArg is TemplateStringsArray => Array.isArray(styleArg);\n\nexport const fixStyleArg = (styleArg: StyleArg, numberOfNewExpressions: number): StyleArg => {\n if (isTemplateStringsArray(styleArg) && numberOfNewExpressions > 0) {\n // Here we are adding placeholders for all the new functions that we are gonna call\n const placeholders = new Array(numberOfNewExpressions).fill('') as string[];\n return Object.assign([...styleArg, ...placeholders], {\n raw: [...styleArg.raw, ...placeholders],\n });\n } else if (typeof styleArg === 'function') {\n // Here we just coerce with the default theme\n return (props: PropsWithTheme) => styleArg({ ...props, theme: props.theme ?? defaultTheme });\n }\n return styleArg;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAsC;AAGtC,MAAM,yBAAyB,CAAC,aAAyD,MAAM,QAAQ,QAAQ;AAExG,MAAM,cAAc,CAAC,UAAoB,2BAA6C;AAC3F,MAAI,uBAAuB,QAAQ,KAAK,yBAAyB,GAAG;AAElE,UAAM,eAAe,IAAI,MAAM,sBAAsB,EAAE,KAAK,EAAE;AAC9D,WAAO,OAAO,OAAO,CAAC,GAAG,UAAU,GAAG,YAAY,GAAG;AAAA,MACnD,KAAK,CAAC,GAAG,SAAS,KAAK,GAAG,YAAY;AAAA,IACxC,CAAC;AAAA,EACH,WAAW,OAAO,aAAa,YAAY;AAEzC,WAAO,CAAC,UAA0B,SAAS,EAAE,GAAG,OAAO,OAAO,MAAM,SAAS,aAAAA,MAAa,CAAC;AAAA,EAC7F;AACA,SAAO;AACT;",
|
|
6
6
|
"names": ["defaultTheme"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/generated-attributes/generateAttributes.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/generated-attributes/generateAttributes.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { displayNameToKebabCase } from '../helpers.js';\nimport type { AttrsFunc, InternalAttrsFunc, Options, OwnerInterface, PartProps } from '../types.js';\nimport { callbackMerger } from './utils/callbackMerger.js';\nimport { refMerger } from './utils/refMerger.js';\n\nconst generateClassName: InternalAttrsFunc = (props, meta) => {\n if (meta.displayName === null) return {};\n return {\n className: meta.displayName,\n };\n};\n\nconst generateDataTestId: InternalAttrsFunc<{ 'data-testid': string }> = (props, meta) => {\n if (meta.displayName === null) return {};\n return {\n 'data-testid': props['data-testid'] ?? displayNameToKebabCase(meta.displayName),\n };\n};\n\nconst generateGlobalAttributes: InternalAttrsFunc<{ 'data-testid': string } & OwnerInterface> = (props) => {\n const { getOwnerProps, getOwnerPropsArguments } = props;\n\n // If no ownerProps are provided, we won't add global attributes\n if (getOwnerProps === undefined) return {};\n\n const ownerPropsValue = getOwnerProps() as Record<string, PartProps>;\n const ownerPropsArgumentsValue = getOwnerPropsArguments?.() ?? {};\n\n const elementProps = ownerPropsValue[props['data-testid']];\n\n // If no elementProps are present, we won't add global attributes either\n if (elementProps === undefined || elementProps === null) return {};\n\n // If elementProps is a function, we call it with the ownerPropsArguments\n // Otherwise we assign it directly\n const resultingObject = typeof elementProps === 'function' ? elementProps(ownerPropsArgumentsValue) : elementProps;\n\n const resultingObjectWithRefMerged = refMerger(props, resultingObject);\n\n const resultingObjectWithCallbackMerged = callbackMerger(props, resultingObjectWithRefMerged);\n\n return resultingObjectWithCallbackMerged;\n};\n\nconst wrap =\n <T extends object>(\n func: InternalAttrsFunc<T>,\n meta: { options: Options; displayName: string | null },\n ): AttrsFunc<T> =>\n (props) =>\n func(props, meta);\n\nexport const generateAttributes = (options: Options, displayName: string | null): AttrsFunc<any>[] => {\n const meta = { options, displayName };\n\n // Comprehensive list of all the generators above\n // ORDER MATTERS: the attributes returned by previous functions, are received as props by the next ones\n return [wrap(generateClassName, meta), wrap(generateDataTestId, meta), wrap(generateGlobalAttributes, meta)];\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,qBAAuC;AAEvC,4BAA+B;AAC/B,uBAA0B;AAE1B,MAAM,oBAAuC,CAAC,OAAO,SAAS;AAC5D,MAAI,KAAK,gBAAgB;AAAM,WAAO,CAAC;AACvC,SAAO;AAAA,IACL,WAAW,KAAK;AAAA,EAClB;AACF;AAEA,MAAM,qBAAmE,CAAC,OAAO,SAAS;AACxF,MAAI,KAAK,gBAAgB;AAAM,WAAO,CAAC;AACvC,SAAO;AAAA,IACL,eAAe,MAAM,aAAa,SAAK,uCAAuB,KAAK,WAAW;AAAA,EAChF;AACF;AAEA,MAAM,2BAA0F,CAAC,UAAU;AACzG,QAAM,EAAE,eAAe,uBAAuB,IAAI;AAGlD,MAAI,kBAAkB;AAAW,WAAO,CAAC;AAEzC,QAAM,kBAAkB,cAAc;AACtC,QAAM,2BAA2B,yBAAyB,KAAK,CAAC;AAEhE,QAAM,eAAe,gBAAgB,MAAM,aAAa,CAAC;AAGzD,MAAI,iBAAiB,UAAa,iBAAiB;AAAM,WAAO,CAAC;AAIjE,QAAM,kBAAkB,OAAO,iBAAiB,aAAa,aAAa,wBAAwB,IAAI;AAEtG,QAAM,mCAA+B,4BAAU,OAAO,eAAe;AAErE,QAAM,wCAAoC,sCAAe,OAAO,4BAA4B;AAE5F,SAAO;AACT;AAEA,MAAM,OACJ,CACE,MACA,SAEF,CAAC,UACC,KAAK,OAAO,IAAI;AAEb,MAAM,qBAAqB,CAAC,SAAkB,gBAAiD;AACpG,QAAM,OAAO,EAAE,SAAS,YAAY;AAIpC,SAAO,CAAC,KAAK,mBAAmB,IAAI,GAAG,KAAK,oBAAoB,IAAI,GAAG,KAAK,0BAA0B,IAAI,CAAC;AAC7G;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/generated-attributes/generateAutoCalculated.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/generated-attributes/generateAutoCalculated.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import type { Options } from '../types.js';\nimport { generateDisplayName } from './generateDisplayName.js';\nimport { generateAttributes } from './generateAttributes.js';\n\nexport const generateAutoCalculated = (options: Options) => {\n const displayName = generateDisplayName(options);\n\n const attributes = generateAttributes(options, displayName);\n\n return [displayName, attributes] as const;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,iCAAoC;AACpC,gCAAmC;AAE5B,MAAM,yBAAyB,CAAC,YAAqB;AAC1D,QAAM,kBAAc,gDAAoB,OAAO;AAE/C,QAAM,iBAAa,8CAAmB,SAAS,WAAW;AAE1D,SAAO,CAAC,aAAa,UAAU;AACjC;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/generated-attributes/generateDisplayName.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/generated-attributes/generateDisplayName.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import type { Options } from '../types.js';\n\nexport const generateDisplayName = (options: Options) => {\n const { name: componentName, slot: componentSlot } = options;\n\n if (componentName === null || componentSlot === null) return null;\n\n return `${componentName}-${componentSlot}`;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEhB,MAAM,sBAAsB,CAAC,YAAqB;AACvD,QAAM,EAAE,MAAM,eAAe,MAAM,cAAc,IAAI;AAErD,MAAI,kBAAkB,QAAQ,kBAAkB;AAAM,WAAO;AAE7D,SAAO,GAAG,iBAAiB;AAC7B;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/generated-attributes/index.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/generated-attributes/index.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export { generateAutoCalculated } from './generateAutoCalculated.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oCAAuC;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/styled/generated-attributes/utils/callbackMerger.ts", "
|
|
3
|
+
"sources": ["../../../../../src/styled/generated-attributes/utils/callbackMerger.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import type { StyledComponentInnerComponent, StyledComponentPropsWithRef } from 'styled-components';\n\nconst notARefKey = (key: string) => !['ref', 'innerRef'].includes(key);\n\nexport const callbackMerger = <T>(\n props: StyledComponentPropsWithRef<StyledComponentInnerComponent<React.ComponentType<T>>>,\n object: Record<string, unknown>,\n) => {\n const newObject: Record<string, unknown> = { ...object };\n\n Object.keys(object).forEach((key) => {\n const propsValue = (props as unknown as Record<string, unknown>)[key];\n const resultingObjectValue = object[key];\n // If the value is a function and the resultingObject has a function with the same key\n // We merge the 2 functions (we also check that the key is not a ref key)\n if (typeof propsValue === 'function' && typeof resultingObjectValue === 'function' && notARefKey(key)) {\n newObject[key] = (...args: unknown[]) => {\n propsValue(...args);\n resultingObjectValue(...args);\n };\n }\n });\n return newObject;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,MAAM,aAAa,CAAC,QAAgB,CAAC,CAAC,OAAO,UAAU,EAAE,SAAS,GAAG;AAE9D,MAAM,iBAAiB,CAC5B,OACA,WACG;AACH,QAAM,YAAqC,EAAE,GAAG,OAAO;AAEvD,SAAO,KAAK,MAAM,EAAE,QAAQ,CAAC,QAAQ;AACnC,UAAM,aAAc,MAA6C,GAAG;AACpE,UAAM,uBAAuB,OAAO,GAAG;AAGvC,QAAI,OAAO,eAAe,cAAc,OAAO,yBAAyB,cAAc,WAAW,GAAG,GAAG;AACrG,gBAAU,GAAG,IAAI,IAAI,SAAoB;AACvC,mBAAW,GAAG,IAAI;AAClB,6BAAqB,GAAG,IAAI;AAAA,MAC9B;AAAA,IACF;AAAA,EACF,CAAC;AACD,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/styled/generated-attributes/utils/refMerger.ts", "
|
|
3
|
+
"sources": ["../../../../../src/styled/generated-attributes/utils/refMerger.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import type { StyledComponentInnerComponent, StyledComponentPropsWithRef } from 'styled-components';\nimport type { AnyStyledRef } from '../../types.js';\n\nconst mergeRefs =\n <T extends HTMLElement>(ref1: AnyStyledRef<T>, ref2: AnyStyledRef<T>) =>\n (_ref: T | null) => {\n if (typeof ref1 === 'function') ref1(_ref);\n else if (ref1) ref1.current = _ref;\n\n if (typeof ref2 === 'function') ref2(_ref);\n else if (ref2) ref2.current = _ref;\n };\n\nexport const refMerger = <T extends { ref?: AnyStyledRef<HTMLElement>; innerRef?: AnyStyledRef<HTMLElement> }>(\n props: StyledComponentPropsWithRef<StyledComponentInnerComponent<React.ComponentType<T>>>,\n object: Record<string, unknown>,\n) => {\n const newObject: Record<string, unknown> = { ...object };\n\n newObject.ref = mergeRefs(props.ref as AnyStyledRef<HTMLElement>, object.ref as AnyStyledRef<HTMLElement>);\n newObject.innerRef = mergeRefs(\n props.innerRef as AnyStyledRef<HTMLElement>,\n object.innerRef as AnyStyledRef<HTMLElement>,\n );\n\n return newObject;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,MAAM,YACJ,CAAwB,MAAuB,SAC/C,CAAC,SAAmB;AAClB,MAAI,OAAO,SAAS;AAAY,SAAK,IAAI;AAAA,WAChC;AAAM,SAAK,UAAU;AAE9B,MAAI,OAAO,SAAS;AAAY,SAAK,IAAI;AAAA,WAChC;AAAM,SAAK,UAAU;AAChC;AAEK,MAAM,YAAY,CACvB,OACA,WACG;AACH,QAAM,YAAqC,EAAE,GAAG,OAAO;AAEvD,YAAU,MAAM,UAAU,MAAM,KAAkC,OAAO,GAAgC;AACzG,YAAU,WAAW;AAAA,IACnB,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/styled/helpers.ts", "
|
|
3
|
+
"sources": ["../../../src/styled/helpers.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["const capitalize = (string: string): string => string.charAt(0).toUpperCase() + string.slice(1);\n\nconst isEmpty = (string: string): boolean => string.length === 0;\n\nexport const propsToClassKey = (props: Record<string, { toString: () => string }>): string =>\n Object.keys(props)\n .sort()\n .reduce((classKey, key) => {\n if (key === 'color') {\n return classKey + (isEmpty(String(classKey)) ? String(props[key]) : capitalize(String(props[key])));\n }\n return `${classKey}${isEmpty(String(classKey)) ? key : capitalize(key)}${capitalize(props[key].toString())}`;\n }, '');\n\nexport const displayNameToKebabCase = (displayName: string) => {\n // We also remove \"DS\" preffix\n const displayNameSplitOnUppercase = displayName.split(/(?=[A-Z])/).slice(2);\n\n return `ds-${displayNameSplitOnUppercase.map((part) => part.toLowerCase()).join('-')}`;\n};\n\nexport const slotObjectToDataTestIds = (\n componentName: string,\n slotObject: Record<string, string>,\n): Record<string, string> => {\n const obj = {} as Record<string, string>;\n Object.keys(slotObject).forEach((slotName) => {\n const displayName = `${componentName}-${slotObject[slotName]}`;\n obj[slotName] = displayNameToKebabCase(displayName);\n });\n return obj;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,MAAM,aAAa,CAAC,WAA2B,OAAO,OAAO,CAAC,EAAE,YAAY,IAAI,OAAO,MAAM,CAAC;AAE9F,MAAM,UAAU,CAAC,WAA4B,OAAO,WAAW;AAExD,MAAM,kBAAkB,CAAC,UAC9B,OAAO,KAAK,KAAK,EACd,KAAK,EACL,OAAO,CAAC,UAAU,QAAQ;AACzB,MAAI,QAAQ,SAAS;AACnB,WAAO,YAAY,QAAQ,OAAO,QAAQ,CAAC,IAAI,OAAO,MAAM,GAAG,CAAC,IAAI,WAAW,OAAO,MAAM,GAAG,CAAC,CAAC;AAAA,EACnG;AACA,SAAO,GAAG,WAAW,QAAQ,OAAO,QAAQ,CAAC,IAAI,MAAM,WAAW,GAAG,IAAI,WAAW,MAAM,GAAG,EAAE,SAAS,CAAC;AAC3G,GAAG,EAAE;AAEF,MAAM,yBAAyB,CAAC,gBAAwB;AAE7D,QAAM,8BAA8B,YAAY,MAAM,WAAW,EAAE,MAAM,CAAC;AAE1E,SAAO,MAAM,4BAA4B,IAAI,CAAC,SAAS,KAAK,YAAY,CAAC,EAAE,KAAK,GAAG;AACrF;AAEO,MAAM,0BAA0B,CACrC,eACA,eAC2B;AAC3B,QAAM,MAAM,CAAC;AACb,SAAO,KAAK,UAAU,EAAE,QAAQ,CAAC,aAAa;AAC5C,UAAM,cAAc,GAAG,iBAAiB,WAAW,QAAQ;AAC3D,QAAI,QAAQ,IAAI,uBAAuB,WAAW;AAAA,EACpD,CAAC;AACD,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/styled/index.ts", "
|
|
3
|
+
"sources": ["../../../src/styled/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export { styled } from './styled.js';\nexport {\n background,\n borders,\n boxShadows,\n color,\n flexboxes,\n fontSize,\n grids,\n layout,\n sizing,\n space,\n} from './system-utilities/index.js';\nexport { slotObjectToDataTestIds } from './helpers.js';\nexport * from './types.js';\nexport * from './system-types.js';\nexport { css, createGlobalStyle } from './system.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAuB;AACvB,8BAWO;AACP,qBAAwC;AACxC,2BAAc,uBAdd;AAeA,2BAAc,8BAfd;AAgBA,oBAAuC;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/styled/styled.ts", "
|
|
3
|
+
"sources": ["../../../src/styled/styled.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { styledFunction } from './styledFunction.js';\nimport { styledObject } from './styledObject.js';\n\nexport const styled = Object.assign(styledFunction, styledObject);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,4BAA+B;AAC/B,0BAA6B;AAEtB,MAAM,SAAS,OAAO,OAAO,sCAAgB,gCAAY;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/styled/styledFunction.ts", "
|
|
3
|
+
"sources": ["../../../src/styled/styledFunction.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { AnyStyledComponent, ThemedStyledFunction } from 'styled-components';\nimport { checkNamingConvention } from './checkNamingConvention.js';\nimport { styled as baseStyled } from './system.js';\nimport { magicCssTransform } from './transformers/index.js';\nimport type { Options, Theme, ThemedStyledFunctionBase } from './types.js';\nimport { coerceWithDefaultTheme } from './coerceWithDefaultTheme.js';\nimport { genStyleOverridesExpression, genVariantOverridesExpression } from './expressions/index.js';\nimport { fixStyleArg } from './fixStyleArg.js';\nimport { generateAutoCalculated } from './generated-attributes/index.js';\n\nconst defaultOptions: Options = {\n name: null,\n slot: null,\n};\n\nexport const styledFunction = <C extends AnyStyledComponent | keyof JSX.IntrinsicElements | React.ComponentType<any>>(\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 // Here we use arrow functions to preserve the `this` context\n const styledAttributes = {\n attrs: ((...args) => baseStyledResolver.attrs(...args)) as (typeof baseStyledResolver)['attrs'],\n withConfig: ((...args) => baseStyledResolver.withConfig(...args)) as (typeof baseStyledResolver)['withConfig'],\n };\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 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, expressions);\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 if (displayName !== null) {\n Component.displayName = displayName;\n }\n\n return Component;\n };\n\n return Object.assign(dsStyledResolver, styledAttributes);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mCAAsC;AACtC,oBAAqC;AACrC,0BAAkC;AAElC,oCAAuC;AACvC,yBAA2E;AAC3E,yBAA4B;AAC5B,kCAAuC;AAEvC,MAAM,iBAA0B;AAAA,EAC9B,MAAM;AAAA,EACN,MAAM;AACR;AAEO,MAAM,iBAAiB,CAC5B,KACA,UAAmB,mBAChB;AACH,QAAM,EAAE,MAAM,eAAe,MAAM,cAAc,IAAI;AAErD,0DAAsB,eAAe,aAAa;AAIlD,QAAM,yBAAqB,cAAAA,QAAW,GAAG;AAGzC,QAAM,mBAAmB;AAAA,IACvB,OAAQ,IAAI,SAAS,mBAAmB,MAAM,GAAG,IAAI;AAAA,IACrD,YAAa,IAAI,SAAS,mBAAmB,WAAW,GAAG,IAAI;AAAA,EACjE;AAKA,QAAM,mBAAuD,CAAC,aAAa,gBAAgB;AAOzF,UAAM,CAAC,mBAAmB,oBAAoB,QAAI,uCAAkB,UAAU,WAAW;AAOzF,UAAM,kCAA8B,sDAAuB,oBAAoB;AAE/E,QAAI,iBAAiB,eAAe;AAElC,kCAA4B,SAAK,gDAA4B,eAAe,aAAa,CAAC;AAAA,IAC5F;AAEA,QAAI,iBAAiB,kBAAkB,QAAQ;AAE7C,kCAA4B,SAAK,kDAA8B,aAAa,CAAC;AAAA,IAC/E;AAOA,UAAM,wBAAwB,4BAA4B,SAAS,qBAAqB;AAExF,UAAM,oBAAgB,gCAAY,mBAAmB,qBAAqB;AAG1E,UAAM,CAAC,aAAa,UAAU,QAAI,oDAAuB,OAAO;AAIhE,UAAM,mCAAmC,WAAW;AAAA,MAClD,CAAC,mBAAmB,kBAAkB,kBAAkB,MAAM,aAAa;AAAA,MAC3E;AAAA,IACF;AAEA,UAAM,YAAY,iCAAiC,eAAe,GAAG,2BAA2B;AAEhG,QAAI,gBAAgB,MAAM;AACxB,gBAAU,cAAc;AAAA,IAC1B;AAEA,WAAO;AAAA,EACT;AAEA,SAAO,OAAO,OAAO,kBAAkB,gBAAgB;AACzD;",
|
|
6
6
|
"names": ["baseStyled"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/styled/styledObject.ts", "
|
|
3
|
+
"sources": ["../../../src/styled/styledObject.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,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"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/styled/system-types.ts", "
|
|
3
|
+
"sources": ["../../../src/styled/system-types.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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 PositionProps,\n BoxShadowProps,\n LineHeightProps,\n} from '@xstyled/system';\n\ninterface DummyColorTheme {\n 'neutral-100': true;\n 'neutral-200': true;\n 'neutral-300': true;\n 'neutral-400': true;\n 'neutral-500': true;\n 'neutral-600': true;\n 'neutral-700': true;\n 'neutral-800': true;\n 'neutral-000': true;\n 'neutral-050': true;\n 'neutral-080': true;\n 'brand-100': true;\n 'brand-200': true;\n 'brand-300': true;\n 'brand-400': true;\n 'brand-500': true;\n 'brand-600': true;\n 'brand-700': true;\n 'brand-800': true;\n 'success-300': true;\n 'success-900': true;\n 'warning-400': true;\n 'warning-600': true;\n 'warning-900': true;\n 'danger-200': true;\n 'danger-900': true;\n}\n\n// Redeclaring types as interfaces to prevent TS errors\n\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] | keyof Theme['space'];\n};\n\ntype ColorPropsT = {\n [key in keyof XstyledColor]?: XstyledColor[key] | keyof DummyColorTheme;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface SpaceProps extends SpacePropsT {}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface ColorProps extends ColorPropsT {}\n\nexport interface BorderProps {\n border?: string;\n borderTop?: string;\n borderBottom?: string;\n borderRight?: string;\n borderLeft?: string;\n borderColor?: keyof DummyColorTheme;\n borderTopColor?: keyof DummyColorTheme;\n borderBottomColor?: keyof DummyColorTheme;\n borderRightColor?: keyof DummyColorTheme;\n borderLeftColor?: keyof DummyColorTheme;\n borderStyle?: string;\n borderTopStyle?: string;\n borderBottomStyle?: string;\n borderRightStyle?: string;\n borderLeftStyle?: string;\n borderWidth?: keyof Theme['space'];\n borderTopWidth?: keyof Theme['space'];\n borderBottomWidth?: keyof Theme['space'];\n borderRightWidth?: keyof Theme['space'];\n borderLeftWidth?: keyof Theme['space'];\n borderRadius?: keyof Theme['space'];\n}\n\nexport interface BackgroundProps {\n backgroundColor?: keyof DummyColorTheme;\n bg?: keyof DummyColorTheme;\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": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/system-utilities/background.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/system-utilities/background.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { style, compose, type ThemeGetter } from '@xstyled/system';\nimport { th } from '../../th.js';\nimport type { PropsWithTheme } from '../types.js';\nimport type { BackgroundProps } from '../system-types.js';\n\ninterface DSThemeGetter extends ThemeGetter {\n (value: string): (props: PropsWithTheme) => string;\n meta: Record<string, unknown>;\n}\n\nconst bgColorGetter: DSThemeGetter = (value: string) => (props) => `${th.color(value, value)(props as PropsWithTheme)}`;\n\nbgColorGetter.meta = {};\n\nconst bg = style({\n prop: ['backgroundColor', 'bg'],\n css: 'background-color',\n themeGet: bgColorGetter,\n});\n\nexport const background = compose<BackgroundProps>(bg);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAiD;AACjD,gBAAmB;AASnB,MAAM,gBAA+B,CAAC,UAAkB,CAAC,UAAU,GAAG,aAAG,MAAM,OAAO,KAAK,EAAE,KAAuB;AAEpH,cAAc,OAAO,CAAC;AAEtB,MAAM,SAAK,qBAAM;AAAA,EACf,MAAM,CAAC,mBAAmB,IAAI;AAAA,EAC9B,KAAK;AAAA,EACL,UAAU;AACZ,CAAC;AAEM,MAAM,iBAAa,uBAAyB,EAAE;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/system-utilities/border.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/system-utilities/border.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable prettier/prettier */\n/* eslint-disable max-lines */\nimport { style, compose, type ThemeGetter } from '@xstyled/system';\nimport { th } from '../../th.js';\nimport type { PropsWithTheme } from '../types.js';\ninterface DSThemeGetter extends ThemeGetter {\n (value: string): (props: PropsWithTheme) => string;\n}\nconst colorReg = /(?:neutral|brand|success|danger|warning)-[0-9]{3}(?:-a[0-9]{2})?/;\n\nconst borderGetter: DSThemeGetter =\n (value: string) =>\n (props): string => {\n const color = value?.match?.(colorReg);\n let borderCss = ``;\n\n if (color) {\n const widthAndStyle = value.replace(color[0], '').trim();\n borderCss = `${th.color(color[0])(props as PropsWithTheme)} ${widthAndStyle}`;\n } else {\n borderCss = value;\n }\n\n return borderCss;\n };\n\nborderGetter.meta = {};\n\nconst borderColorGetter: DSThemeGetter =\n (value: string) =>\n (props): string =>\n `${th.color(value, value)(props as PropsWithTheme)}`;\n\nborderColorGetter.meta = {};\n\nfunction borderStyleGetter(value: string) {\n return (): string => value;\n}\n\nborderStyleGetter.meta = {};\n\nconst borderWidthGetter: DSThemeGetter =\n (value: string) =>\n (props): string =>\n `${th.space(value, value)(props as PropsWithTheme)}`;\n\nborderWidthGetter.meta = {};\n\nconst borderRadiusGetter: DSThemeGetter =\n (value: string) =>\n (props): string =>\n `${th.space(value, value)(props as PropsWithTheme)}`;\n\nborderRadiusGetter.meta = {};\n\nconst border = style({\n prop: 'border',\n css: 'border',\n themeGet: borderGetter,\n});\n\nconst borderTop = style({\n prop: 'borderTop',\n css: 'border-top',\n themeGet: borderGetter,\n});\n\nconst borderBottom = style({\n prop: 'borderBottom',\n css: 'border-bottom',\n themeGet: borderGetter,\n});\n\nconst borderRight = style({\n prop: 'borderRight',\n css: 'border-right',\n themeGet: borderGetter,\n});\n\nconst borderLeft = style({\n prop: 'borderLeft',\n css: 'border-left',\n themeGet: borderGetter,\n});\n\nconst borderColor = style({\n prop: 'borderColor',\n css: 'border-color',\n themeGet: borderColorGetter,\n});\n\nconst borderTopColor = style({\n prop: 'borderTopColor',\n css: 'border-top-color',\n themeGet: borderColorGetter,\n});\n\nconst borderBottomColor = style({\n prop: 'borderBottomColor',\n css: 'border-bottom-color',\n themeGet: borderColorGetter,\n});\n\nconst borderRightColor = style({\n prop: 'borderRightColor',\n css: 'border-right-color',\n themeGet: borderColorGetter,\n});\n\nconst borderLeftColor = style({\n prop: 'borderLeftColor',\n css: 'border-left-color',\n themeGet: borderColorGetter,\n});\n\nconst borderStyle = style({\n prop: 'borderStyle',\n css: 'border-style',\n themeGet: borderStyleGetter,\n});\n\nconst borderTopStyle = style({\n prop: 'borderTopStyle',\n css: 'border-top-style',\n themeGet: borderStyleGetter,\n});\n\nconst borderBottomStyle = style({\n prop: 'borderBottomStyle',\n css: 'border-bottom-style',\n themeGet: borderStyleGetter,\n});\n\nconst borderRightStyle = style({\n prop: 'borderRightStyle',\n css: 'border-right-style',\n themeGet: borderStyleGetter,\n});\n\nconst borderLeftStyle = style({\n prop: 'borderLeftStyle',\n css: 'border-left-style',\n themeGet: borderStyleGetter,\n});\n\nconst borderWidth = style({\n prop: 'borderWidth',\n css: 'border-width',\n themeGet: borderWidthGetter,\n});\n\nconst borderTopWidth = style({\n prop: 'borderTopWidth',\n css: 'border-top-width',\n themeGet: borderWidthGetter,\n});\n\nconst borderBottomWidth = style({\n prop: 'borderBottomWidth',\n css: 'border-bottom-width',\n themeGet: borderWidthGetter,\n});\n\nconst borderRightWidth = style({\n prop: 'borderRightWidth',\n css: 'border-right-width',\n themeGet: borderWidthGetter,\n});\n\nconst borderLeftWidth = style({\n prop: 'borderLeftWidth',\n css: 'border-left-width',\n themeGet: borderWidthGetter,\n});\n\nconst borderRadius = style({\n prop: 'borderRadius',\n css: 'border-radius',\n themeGet: borderRadiusGetter,\n});\n\nexport const borders = compose(\n border,\n borderTop,\n borderBottom,\n borderLeft,\n borderRight,\n borderColor,\n borderTopColor,\n borderBottomColor,\n borderLeftColor,\n borderRightColor,\n borderStyle,\n borderTopStyle,\n borderBottomStyle,\n borderLeftStyle,\n borderRightStyle,\n borderWidth,\n borderTopWidth,\n borderBottomWidth,\n borderLeftWidth,\n borderRightWidth,\n borderRadius,\n);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": "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",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/system-utilities/color.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/system-utilities/color.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import type { Theme, Props } from '@xstyled/system';\nimport { style, compose } from '@xstyled/system';\nimport { th } from '../../th.js';\nimport type { PropsWithTheme } from '../types.js';\nimport type { ColorProps } from '../system-types.js';\n\nfunction colorGetter(value: string) {\n return (props: PropsWithTheme | Props<Theme>): string => `${th.color(value, value)(props as PropsWithTheme)}`;\n}\n\ncolorGetter.meta = {};\n\nconst colorStyled = style<ColorProps>({\n prop: ['color'],\n css: ['color'],\n themeGet: colorGetter,\n});\n\nexport const color = compose(colorStyled);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,oBAA+B;AAC/B,gBAAmB;AAInB,SAAS,YAAY,OAAe;AAClC,SAAO,CAAC,UAAiD,GAAG,aAAG,MAAM,OAAO,KAAK,EAAE,KAAuB;AAC5G;AAEA,YAAY,OAAO,CAAC;AAEpB,MAAM,kBAAc,qBAAkB;AAAA,EACpC,MAAM,CAAC,OAAO;AAAA,EACd,KAAK,CAAC,OAAO;AAAA,EACb,UAAU;AACZ,CAAC;AAEM,MAAM,YAAQ,uBAAQ,WAAW;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/system-utilities/index.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/system-utilities/index.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export { layout, flexboxes, grids, boxShadow as boxShadows, fontSize } from '@xstyled/system';\nexport { background } from './background.js';\nexport { borders } from './border.js';\nexport { color } from './color.js';\nexport { sizing } from './sizing.js';\nexport { space } from './space.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAA4E;AAC5E,wBAA2B;AAC3B,oBAAwB;AACxB,mBAAsB;AACtB,oBAAuB;AACvB,mBAAsB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/system-utilities/sizing.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/system-utilities/sizing.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { style, compose, getSize } from '@xstyled/system';\n\nconst width = style({\n prop: ['width', 'w'],\n css: 'width',\n themeGet: getSize,\n});\n\nconst height = style({\n prop: ['height', 'h'],\n css: 'height',\n themeGet: getSize,\n});\n\nconst maxHeight = style({\n prop: ['maxH', 'maxHeight'],\n css: 'max-height',\n themeGet: getSize,\n});\n\nconst maxWidth = style({\n prop: ['maxW', 'maxWidth'],\n css: 'max-width',\n themeGet: getSize,\n});\n\nconst minHeight = style({\n prop: ['minH', 'minHeight'],\n css: 'min-height',\n themeGet: getSize,\n});\n\nconst minWidth = style({\n prop: ['minW', 'minWidth'],\n css: 'min-width',\n themeGet: getSize,\n});\n\nexport const sizing = compose(width, maxWidth, height, maxHeight, minHeight, minWidth);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAwC;AAExC,MAAM,YAAQ,qBAAM;AAAA,EAClB,MAAM,CAAC,SAAS,GAAG;AAAA,EACnB,KAAK;AAAA,EACL,UAAU;AACZ,CAAC;AAED,MAAM,aAAS,qBAAM;AAAA,EACnB,MAAM,CAAC,UAAU,GAAG;AAAA,EACpB,KAAK;AAAA,EACL,UAAU;AACZ,CAAC;AAED,MAAM,gBAAY,qBAAM;AAAA,EACtB,MAAM,CAAC,QAAQ,WAAW;AAAA,EAC1B,KAAK;AAAA,EACL,UAAU;AACZ,CAAC;AAED,MAAM,eAAW,qBAAM;AAAA,EACrB,MAAM,CAAC,QAAQ,UAAU;AAAA,EACzB,KAAK;AAAA,EACL,UAAU;AACZ,CAAC;AAED,MAAM,gBAAY,qBAAM;AAAA,EACtB,MAAM,CAAC,QAAQ,WAAW;AAAA,EAC1B,KAAK;AAAA,EACL,UAAU;AACZ,CAAC;AAED,MAAM,eAAW,qBAAM;AAAA,EACrB,MAAM,CAAC,QAAQ,UAAU;AAAA,EACzB,KAAK;AAAA,EACL,UAAU;AACZ,CAAC;AAEM,MAAM,aAAS,uBAAQ,OAAO,UAAU,QAAQ,WAAW,WAAW,QAAQ;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/system-utilities/space.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/system-utilities/space.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { space as xstyledSpace, type StyleGenerator } from '@xstyled/system';\nimport type { SpaceProps } from '../system-types.js';\n\nexport const space = xstyledSpace as unknown as StyleGenerator<SpaceProps>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAA2D;AAGpD,MAAM,QAAQ,cAAAA;",
|
|
6
6
|
"names": ["xstyledSpace"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/styled/system.ts", "
|
|
3
|
+
"sources": ["../../../src/styled/system.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { createCss } from '@xstyled/styled-components';\nimport { system, compose } from '@xstyled/system';\n\n// We create our own system from the default xstyled system\nexport const { css, styled, createGlobalStyle } = createCss(compose(system));\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAA0B;AAC1B,oBAAgC;AAGzB,MAAM,EAAE,KAAK,QAAQ,kBAAkB,QAAI,wCAAU,uBAAQ,oBAAM,CAAC;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/transformers/index.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/transformers/index.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export { magicCssTransform } from './magicCssTransform.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAkC;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/styled/transformers/magicCssTransform.ts", "
|
|
3
|
+
"sources": ["../../../../src/styled/transformers/magicCssTransform.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { th } from '../../th.js';\nimport type { Expressions, StyleArg } from '../types.js';\n\ntype MagicCssTransform = (styleArg: StyleArg, expressions: Expressions) => [StyleArg, Expressions];\n\n// This file is heavily inspired by https://github.com/gregberge/xstyled/blob/c0c92b459bb3a5de46d7854be3667861f816baa5/packages/core/src/transform.ts#L65\n// Please refer to that file to understand of the idea of the css transformer\n\nconst COLOR_REGEX = /(neutral|brand|success|warning|danger)-(100|200|300|400|500|600|700|800|900|000|050|080)/g;\n\nconst magicfyCss = (rawValue: string): [string[], Expressions] => {\n let matches;\n let lastIndex = 0;\n const splittedValue: string[] = [];\n const themeGetters = [];\n while ((matches = COLOR_REGEX.exec(rawValue))) {\n const [match] = matches;\n splittedValue.push(rawValue.slice(lastIndex, matches.index));\n\n themeGetters.push(th.color(match, match));\n\n lastIndex = matches.index + match.length;\n }\n splittedValue.push(rawValue.slice(lastIndex, rawValue.length));\n return [splittedValue, themeGetters];\n};\n\nexport const magicCssTransform: MagicCssTransform = (styleArg, expressions) => {\n if (!Array.isArray(styleArg)) return [styleArg, expressions];\n\n const magicStyleArg: string[] = [];\n const magicExpressions: Expressions = [];\n\n const templateStringArray = styleArg as TemplateStringsArray;\n\n templateStringArray.forEach((templateString, index) => {\n const [splittedTemplateString, themeGetters] = magicfyCss(templateString);\n magicStyleArg.push(...splittedTemplateString);\n magicExpressions.push(...themeGetters);\n if (index < expressions.length) magicExpressions.push(expressions[index]);\n });\n\n return [Object.assign(magicStyleArg, { raw: [...magicStyleArg] }), magicExpressions];\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,gBAAmB;AAQnB,MAAM,cAAc;AAEpB,MAAM,aAAa,CAAC,aAA8C;AAChE,MAAI;AACJ,MAAI,YAAY;AAChB,QAAM,gBAA0B,CAAC;AACjC,QAAM,eAAe,CAAC;AACtB,SAAQ,UAAU,YAAY,KAAK,QAAQ,GAAI;AAC7C,UAAM,CAAC,KAAK,IAAI;AAChB,kBAAc,KAAK,SAAS,MAAM,WAAW,QAAQ,KAAK,CAAC;AAE3D,iBAAa,KAAK,aAAG,MAAM,OAAO,KAAK,CAAC;AAExC,gBAAY,QAAQ,QAAQ,MAAM;AAAA,EACpC;AACA,gBAAc,KAAK,SAAS,MAAM,WAAW,SAAS,MAAM,CAAC;AAC7D,SAAO,CAAC,eAAe,YAAY;AACrC;AAEO,MAAM,oBAAuC,CAAC,UAAU,gBAAgB;AAC7E,MAAI,CAAC,MAAM,QAAQ,QAAQ;AAAG,WAAO,CAAC,UAAU,WAAW;AAE3D,QAAM,gBAA0B,CAAC;AACjC,QAAM,mBAAgC,CAAC;AAEvC,QAAM,sBAAsB;AAE5B,sBAAoB,QAAQ,CAAC,gBAAgB,UAAU;AACrD,UAAM,CAAC,wBAAwB,YAAY,IAAI,WAAW,cAAc;AACxE,kBAAc,KAAK,GAAG,sBAAsB;AAC5C,qBAAiB,KAAK,GAAG,YAAY;AACrC,QAAI,QAAQ,YAAY;AAAQ,uBAAiB,KAAK,YAAY,KAAK,CAAC;AAAA,EAC1E,CAAC;AAED,SAAO,CAAC,OAAO,OAAO,eAAe,EAAE,KAAK,CAAC,GAAG,aAAa,EAAE,CAAC,GAAG,gBAAgB;AACrF;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/styled/types.ts", "
|
|
3
|
+
"sources": ["../../../src/styled/types.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type {\n CSSObject,\n Interpolation,\n InterpolationFunction,\n StyledComponent,\n StyledComponentInnerComponent,\n StyledComponentPropsWithRef,\n ThemedStyledProps,\n} from 'styled-components';\nimport type { Theme as PuiTheme } from '@elliemae/pui-theme';\n\nexport interface Options {\n name: string | null;\n slot: string | null;\n}\n\nexport interface Theme extends PuiTheme {\n components?: {\n [componentName: string]: {\n styleOverrides?: CSSObject;\n variants?: { props: Record<string, { toString: () => string }>; style: CSSObject }[];\n };\n };\n}\n\nexport type AnyStyledRef<T extends HTMLElement> =\n | React.MutableRefObject<T | null>\n | ((_ref: T | null) => void)\n | React.Dispatch<React.SetStateAction<T | null>>\n | false;\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 PropsWithTheme<T = Record<string, unknown>> = T & { theme: Theme };\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<ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U & OwnerInterface, T>>,\n ...rest: Expressions<ThemedStyledProps<StyledComponentPropsWithRef<C> & O & U & OwnerInterface, T>>\n ): StyledComponent<C, T, O & U & OwnerInterface, 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 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": []
|
package/dist/cjs/th.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/th.tsx", "
|
|
3
|
+
"sources": ["../../src/th.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable indent */\nimport type { Theme } from '@elliemae/pui-theme';\nimport type { PropsWithTheme } from './styled/index.js';\n\nexport const hexToRgba = (hex: string, alpha: string) => {\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n\n if (result) {\n return `rgba(${parseInt(result[1], 16)}, ${parseInt(result[2], 16)}, ${parseInt(result[3], 16)}, ${alpha})`;\n }\n return ``;\n};\n\ntype ThemeStringGetter = <T>({ theme }: PropsWithTheme<T>) => string;\n\ntype ThGetter = (value: string, dfault?: string) => ThemeStringGetter;\n\ntype ThConstructor = ((property: keyof Theme) => ThGetter) & {\n space: ThGetter;\n fontSize: ThGetter;\n fontWeight: ThGetter;\n lineHeight: ThGetter;\n letterSpacing: ThGetter;\n font: ThGetter;\n color: ThGetter;\n breakpoint: ThGetter;\n media: ThGetter;\n zIndex: ThGetter;\n};\n\nconst colorGetter: ThGetter =\n (value, dfault = '') =>\n ({ theme }) => {\n const colorValues = value.split('-');\n\n if (colorValues.length === 1) return colorValues[0];\n\n if (colorValues.length > 3) return dfault;\n\n const [colorType, colorValue, alpha] = colorValues as [\n keyof Theme['colors'],\n keyof Theme['colors'][keyof Theme['colors']],\n string,\n ];\n\n const themeColor = theme.colors && theme.colors[colorType]?.[colorValue];\n\n if (!themeColor) return dfault;\n\n if (alpha) {\n const alphaFloatingNumber = `0.${alpha.slice(1)}`;\n\n return hexToRgba(themeColor, alphaFloatingNumber);\n }\n\n return themeColor;\n };\n\nconst genericGetter =\n (property: keyof Theme) =>\n <T,>(value: string, dfault = ''): ThemeStringGetter<T> =>\n ({ theme }) => {\n const parts = value.split('-');\n let result = theme[property];\n parts.forEach((part) => {\n if (result) result = result[part as keyof typeof result];\n });\n return (result as unknown as string) ?? dfault;\n };\n\nexport const th: ThConstructor = (property): ThGetter => {\n switch (property) {\n case 'colors' as keyof Theme:\n return colorGetter;\n default:\n return genericGetter(property);\n }\n};\n\nth.space = th('space');\nth.fontSize = th('fontSizes');\nth.fontWeight = th('fontWeights');\nth.lineHeight = th('lineHeights');\nth.letterSpacing = th('letterSpacings');\nth.font = th('fonts');\nth.color = th('colors');\nth.breakpoint = th('breakpoints');\nth.media = th('media');\nth.zIndex = th('zIndex');\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIhB,MAAM,YAAY,CAAC,KAAa,UAAkB;AACvD,QAAM,SAAS,4CAA4C,KAAK,GAAG;AAEnE,MAAI,QAAQ;AACV,WAAO,QAAQ,SAAS,OAAO,CAAC,GAAG,EAAE,MAAM,SAAS,OAAO,CAAC,GAAG,EAAE,MAAM,SAAS,OAAO,CAAC,GAAG,EAAE,MAAM;AAAA,EACrG;AACA,SAAO;AACT;AAmBA,MAAM,cACJ,CAAC,OAAO,SAAS,OACjB,CAAC,EAAE,MAAM,MAAM;AACb,QAAM,cAAc,MAAM,MAAM,GAAG;AAEnC,MAAI,YAAY,WAAW;AAAG,WAAO,YAAY,CAAC;AAElD,MAAI,YAAY,SAAS;AAAG,WAAO;AAEnC,QAAM,CAAC,WAAW,YAAY,KAAK,IAAI;AAMvC,QAAM,aAAa,MAAM,UAAU,MAAM,OAAO,SAAS,IAAI,UAAU;AAEvE,MAAI,CAAC;AAAY,WAAO;AAExB,MAAI,OAAO;AACT,UAAM,sBAAsB,KAAK,MAAM,MAAM,CAAC;AAE9C,WAAO,UAAU,YAAY,mBAAmB;AAAA,EAClD;AAEA,SAAO;AACT;AAEF,MAAM,gBACJ,CAAC,aACD,CAAK,OAAe,SAAS,OAC7B,CAAC,EAAE,MAAM,MAAM;AACb,QAAM,QAAQ,MAAM,MAAM,GAAG;AAC7B,MAAI,SAAS,MAAM,QAAQ;AAC3B,QAAM,QAAQ,CAAC,SAAS;AACtB,QAAI;AAAQ,eAAS,OAAO,IAA2B;AAAA,EACzD,CAAC;AACD,SAAQ,UAAgC;AAC1C;AAEK,MAAM,KAAoB,CAAC,aAAuB;AACvD,UAAQ,UAAU;AAAA,IAChB,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO,cAAc,QAAQ;AAAA,EACjC;AACF;AAEA,GAAG,QAAQ,GAAG,OAAO;AACrB,GAAG,WAAW,GAAG,WAAW;AAC5B,GAAG,aAAa,GAAG,aAAa;AAChC,GAAG,aAAa,GAAG,aAAa;AAChC,GAAG,gBAAgB,GAAG,gBAAgB;AACtC,GAAG,OAAO,GAAG,OAAO;AACpB,GAAG,QAAQ,GAAG,QAAQ;AACtB,GAAG,aAAa,GAAG,aAAa;AAChC,GAAG,QAAQ,GAAG,OAAO;AACrB,GAAG,SAAS,GAAG,QAAQ;",
|
|
6
6
|
"names": []
|
package/dist/cjs/theme.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/theme.tsx", "
|
|
3
|
+
"sources": ["../../src/theme.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { getDefaultTheme } from '@elliemae/pui-theme';\nimport type { Theme } from '@elliemae/pui-theme';\n\nexport const theme = getDefaultTheme() as Theme;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAgC;AAGzB,MAAM,YAAQ,kCAAgB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/themeProviderHOC.tsx", "
|
|
3
|
+
"sources": ["../../src/themeProviderHOC.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { ThemeProvider } from '@xstyled/styled-components';\nimport { theme } from './theme.js';\n\nexport const themeProviderHOC = (Component: React.ElementType) => {\n const WrappedComponent = (props: Record<string, unknown>): JSX.Element => (\n <ThemeProvider theme={theme}>\n <Component {...props} />\n </ThemeProvider>\n );\n return WrappedComponent;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOjB;AANN,+BAA8B;AAC9B,mBAAsB;AAEf,MAAM,mBAAmB,CAAC,cAAiC;AAChE,QAAM,mBAAmB,CAAC,UACxB,4CAAC,0CAAc,OAAO,oBACpB,sDAAC,aAAW,GAAG,OAAO,GACxB;AAEF,SAAO;AACT;",
|
|
6
6
|
"names": []
|
package/dist/cjs/utils.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/utils.tsx", "
|
|
3
|
+
"sources": ["../../src/utils.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable no-shadow */\n/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-shadow */\n\n// https://github.com/styled-components/babel-plugin-styled-components/issues/216#issuecomment-516941240\n\nimport type { Theme } from '@elliemae/pui-theme';\nimport { lighten, rgba } from 'polished';\nimport { reduce } from 'lodash';\nimport type { Keyframes, FlattenSimpleInterpolation } from 'styled-components';\nimport { css, withTheme, keyframes as kfrm, useTheme } from '@xstyled/styled-components';\nimport { theme } from './theme.js';\nimport { toMobile } from './mobileUtilities.js';\nimport { th } from './th.js';\n\nexport { withTheme, rgba, useTheme, kfrm };\n\ntype PropsWithTheme<T = Record<string, unknown>> = T & { theme: Theme };\n\nexport function truncate(width?: string) {\n return (props: PropsWithTheme<{ width?: string }>) => css`\n ${!!width || props.width ? `width: ${(props.width || width) as string};` : ''}\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n `;\n}\n\nexport function flexCenter(): string {\n return `\n display: flex;\n justify-content: center;\n align-items: center;\n `;\n}\n\nexport function disabled(): string {\n return `\n cursor: not-allowed;\n pointer-events: none;\n `;\n}\n\nexport function keyframes(obj: Record<string, string>): Keyframes {\n return kfrm`${reduce(\n obj,\n (result, value, key) => `\n ${result}\n ${key}% {\n ${value}\n }\n `,\n '',\n )}\n `;\n}\n\n// eslint-disable-next-line max-params\nexport function boxShadow(top: string, left: string, blur: string, color: string, inset = false): string {\n return `box-shadow: ${inset ? 'inset' : ''} ${top} ${left} ${blur} ${color};`;\n}\n\n// export function color(variant = 'neutral', type: string | number = 400) {\n// return css`\n// color: ${th.color(`${variant}-${type}`)};\n// `;\n// }\n\nexport function border(color = theme.colors.brand[600], size = '1px', type = 'solid'): string {\n return `${size} ${type} ${color}`;\n}\n\nexport function animation(animationKeyframes: string, animationLength: string, animationTimingFn: string) {\n return (props: { animationKeyframes?: string; animationLength?: string; animationTimingFn?: string }) => css`\n animation: ${props.animationKeyframes || animationKeyframes} ${props.animationLength || animationLength}\n ${props.animationTimingFn || animationTimingFn};\n `;\n}\n// 0.0769\nexport function focus(color: string = theme.colors.brand[600]) {\n return () => css`\n outline: none;\n border: 1px solid ${color};\n box-shadow: inset 0 0 0 1px ${lighten(0.3, color)};\n border-radius: 2px;\n `;\n}\n\nexport function focusAfter(color: string) {\n return css`\n outline: none;\n position: relative;\n &:after {\n content: '';\n z-index: 10;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n ${focus(color)}\n }\n `;\n}\n\nexport function active() {\n return (props: PropsWithTheme) => css`\n outline: none;\n border: 1px solid ${props.theme.colors.brand[700]};\n border-radius: 2px;\n `;\n}\n\nexport function hover() {\n return (props: PropsWithTheme) => css`\n outline: 1px solid ${props.theme.colors.brand[600]};\n outline-offset: -1px;\n `;\n}\n\nexport function textStyle(type: string, weight: keyof Theme['fontWeights'] = 'regular') {\n // eslint-disable-next-line complexity\n return (props: { theme: Theme }): string => {\n let cssVar = `font-weight: ${props.theme.fontWeights[weight]};`;\n // eslint-disable-next-line default-case\n switch (type) {\n case 'h1':\n cssVar += `\n font-size: ${toMobile('2.7692rem')};\n line-height: normal;\n `;\n break;\n case 'h2':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.title[800])};\n line-height: normal;\n `;\n break;\n case 'h3':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.title[700])};\n line-height: 1.2;\n `;\n break;\n case 'h4':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.title[600])};\n line-height: normal;\n `;\n break;\n case 'h5':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.title[500])};\n line-height: normal;\n `;\n break;\n case 'section-header':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.title[500])};\n line-height: normal;\n text-transform: uppercase;\n `;\n break;\n case 'body':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.value[400])};\n line-height: normal;\n `;\n break;\n case 'body-small':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.value[300])};\n line-height: normal;\n `;\n break;\n case 'body-micro':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.microText[200])};\n line-height: normal;\n `;\n break;\n case 'list':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.value[400])};\n line-height: normal;\n `;\n break;\n case 'link':\n cssVar += `\n line-height: ${props.theme.space.xl};\n color: ${props.theme.colors.brand[600]};\n cursor: pointer;\n `;\n break;\n }\n return cssVar;\n };\n}\n\nexport function iconColor(variant = 'neutral', type = 400) {\n return css`\n fill: ${th.color(`${variant}-${type}`)};\n `;\n}\n\nexport function fakeBorder() {\n return css`\n box-shadow: inset 0 0 0 1px ${(props) => props.theme.colors.neutral[200]};\n border-radius: 2px;\n `;\n}\n\nexport function fakeActive() {\n return css`\n outline: none;\n box-shadow: inset 0 0 0 1px ${(props) => props.theme.colors.brand[700]};\n border-radius: 2px;\n `;\n}\n\nexport function clearFocus(): string {\n return `\n border: none;\n box-shadow: none;\n `;\n}\n\nexport function buttonLink(): string {\n return `\n background-color: transparent;\n border: 1px solid transparent;\n cursor: pointer;\n `;\n}\n\nexport function transition(t = 'all 1s ease'): string {\n return `\n transition: ${t};\n `;\n}\n\nexport const onlySafariAndFirefox = (styles: string): FlattenSimpleInterpolation => css`\n @media not all and (min-resolution: 0.001dpcm) {\n ${styles}\n }\n @media screen and (min--moz-device-pixel-ratio: 0) {\n ${styles}\n }\n`;\n\nexport const onlySafari = (styles: string): string => `\n @media not all and (min-resolution: 0.001dpcm) {\n ${styles}\n }\n `;\n\nexport const onlyFirefox = (styles: string): string => `\n @media screen and (min--moz-device-pixel-ratio: 0) {\n ${styles}\n }\n `;\n\nexport const safariAndFirefoxBold = (color: string): string => `\n @media not all and (min-resolution: 0.001dpcm) {\n font-weight: 400;\n -webkit-font-smoothing: subpixel-antialiased;\n -webkit-text-stroke: 0.4px ${color};\n }\n @media screen and (min--moz-device-pixel-ratio: 0) {\n font-weight: 400;\n -webkit-font-smoothing: subpixel-antialiased;\n -webkit-text-stroke: 0.4px ${color};\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": "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",
|
|
6
6
|
"names": ["kfrm", "kfrm"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/xStyledWrapper.tsx", "
|
|
3
|
+
"sources": ["../../src/xStyledWrapper.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import {\n styled,\n typography,\n background,\n borders,\n sizing,\n space,\n boxShadows,\n flexboxes,\n layout,\n color,\n} from './index.js';\nimport type {} from '@xstyled/util';\nimport type {} from '@xstyled/system';\nimport { compose } from '@xstyled/system';\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);\n\nexport default XStyledWrapper;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAWO;AAGP,oBAAwB;AAEjB,MAAM,qBAAiB,qBAAO,KAAK;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,yBAAqB;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": []
|