@mirohq/design-system-stitches 3.2.0-fix-stitches-types.2 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sources":["../src/config/theme-map.ts","../src/config/theme.ts","../src/config/utils.ts","../src/config/media.ts","../src/stitches.ts","../src/custom.ts","../src/styled.tsx","../src/index.ts"],"sourcesContent":["export const themeMap = {\n background: 'colors',\n backgroundColor: 'colors',\n backgroundImage: 'colors',\n blockSize: 'sizes',\n border: 'colors',\n borderBlock: 'colors',\n borderBlockEnd: 'colors',\n borderBlockStart: 'colors',\n borderBottom: 'colors',\n borderBottomColor: 'colors',\n borderBottomLeftRadius: 'radii',\n borderBottomRightRadius: 'radii',\n borderBottomStyle: 'border-styles',\n borderBottomWidth: 'border-widths',\n borderColor: 'colors',\n borderImage: 'colors',\n borderInline: 'colors',\n borderInlineEnd: 'colors',\n borderInlineStart: 'colors',\n borderLeft: 'colors',\n borderLeftColor: 'colors',\n borderLeftStyle: 'border-styles',\n borderLeftWidth: 'border-widths',\n borderRadius: 'radii',\n borderRight: 'colors',\n borderRightColor: 'colors',\n borderRightStyle: 'border-styles',\n borderRightWidth: 'border-widths',\n borderSpacing: 'space',\n borderStyle: 'border-styles',\n borderTop: 'colors',\n borderTopColor: 'colors',\n borderTopLeftRadius: 'radii',\n borderTopRightRadius: 'radii',\n borderTopStyle: 'border-styles',\n borderTopWidth: 'border-widths',\n borderWidth: 'border-widths',\n bottom: 'space',\n boxShadow: 'shadows',\n caretColor: 'colors',\n color: 'colors',\n columnGap: 'space',\n columnRuleColor: 'colors',\n fill: 'colors',\n flexBasis: 'sizes',\n fontFamily: 'fonts',\n fontSize: 'font-sizes',\n fontWeight: 'font-weights',\n gap: 'space',\n gridColumnGap: 'space',\n gridGap: 'space',\n gridRowGap: 'space',\n gridTemplateColumns: 'sizes',\n gridTemplateRows: 'sizes',\n height: 'sizes',\n inlineSize: 'sizes',\n inset: 'space',\n insetBlock: 'space',\n insetBlockEnd: 'space',\n insetBlockStart: 'space',\n insetInline: 'space',\n insetInlineEnd: 'space',\n insetInlineStart: 'space',\n left: 'space',\n letterSpacing: 'letter-spacings',\n lineHeight: 'line-heights',\n margin: 'space',\n marginBlock: 'space',\n marginBlockEnd: 'space',\n marginBlockStart: 'space',\n marginBottom: 'space',\n marginInline: 'space',\n marginInlineEnd: 'space',\n marginInlineStart: 'space',\n marginLeft: 'space',\n marginRight: 'space',\n marginTop: 'space',\n maxBlockSize: 'sizes',\n maxHeight: 'sizes',\n maxInlineSize: 'sizes',\n maxWidth: 'sizes',\n minBlockSize: 'sizes',\n minHeight: 'sizes',\n minInlineSize: 'sizes',\n minWidth: 'sizes',\n outline: 'colors',\n outlineColor: 'colors',\n padding: 'space',\n paddingBlock: 'space',\n paddingBlockEnd: 'space',\n paddingBlockStart: 'space',\n paddingBottom: 'space',\n paddingInline: 'space',\n paddingInlineEnd: 'space',\n paddingInlineStart: 'space',\n paddingLeft: 'space',\n paddingRight: 'space',\n paddingTop: 'space',\n right: 'space',\n rowGap: 'space',\n scrollMargin: 'space',\n scrollMarginBlock: 'space',\n scrollMarginBlockEnd: 'space',\n scrollMarginBlockStart: 'space',\n scrollMarginBottom: 'space',\n scrollMarginInline: 'space',\n scrollMarginInlineEnd: 'space',\n scrollMarginInlineStart: 'space',\n scrollMarginLeft: 'space',\n scrollMarginRight: 'space',\n scrollMarginTop: 'space',\n scrollPadding: 'space',\n scrollPaddingBlock: 'space',\n scrollPaddingBlockEnd: 'space',\n scrollPaddingBlockStart: 'space',\n scrollPaddingBottom: 'space',\n scrollPaddingInline: 'space',\n scrollPaddingInlineEnd: 'space',\n scrollPaddingInlineStart: 'space',\n scrollPaddingLeft: 'space',\n scrollPaddingRight: 'space',\n scrollPaddingTop: 'space',\n stroke: 'colors',\n strokeWidth: 'stroke-width',\n textDecorationColor: 'colors',\n textShadow: 'shadows',\n top: 'space',\n transition: 'transitions',\n width: 'sizes',\n zIndex: 'z-indices',\n} as const\n\nexport type ThemeMap = typeof themeMap\n","import * as tokens from '@mirohq/design-tokens'\nimport { base } from '@mirohq/design-system-themes'\nimport type { Theme as DS_Theme } from '@mirohq/design-system-themes'\nimport merge from 'lodash.merge'\n\nexport const theme = {\n 'border-widths': tokens.borderWidths,\n colors: merge({}, tokens.colors, base.colors),\n 'font-sizes': tokens.fontSizes,\n 'font-weights': tokens.fontWeights,\n 'line-heights': tokens.lineHeights,\n fonts: tokens.fonts,\n radii: tokens.radii,\n shadows: base.shadows as Required<DS_Theme['shadows']>,\n sizes: tokens.sizes,\n space: tokens.space,\n 'stroke-width': tokens.strokeWidths,\n 'z-indices': tokens.zIndices,\n}\n\nexport type Theme = typeof theme\n","import type { CSSProperties } from '@stitches/react'\n\nexport const utils = {\n paddingX: (value: CSSProperties['padding']) => ({\n paddingLeft: value,\n paddingRight: value,\n }),\n paddingY: (value: CSSProperties['padding']) => ({\n paddingTop: value,\n paddingBottom: value,\n }),\n marginX: (value: CSSProperties['margin']) => ({\n marginLeft: value,\n marginRight: value,\n }),\n marginY: (value: CSSProperties['margin']) => ({\n marginTop: value,\n marginBottom: value,\n }),\n square: (value: CSSProperties['width']) => ({\n width: value,\n height: value,\n }),\n _hover: (css: CSSProperties) => ({\n '&:hover, &[data-hovered]': css,\n }),\n}\n","/**\n * Commenting out due to performance problems\n * Please check the thread for more info:\n * https://miro.slack.com/archives/C03SJ1S209M/p1669821558087279\n */\n\nexport const media = {\n // reducedMotion: '(prefers-reduced-motion: reduce)',\n // motion: '(prefers-reduced-motion: no-preference)',\n // hover: '(any-hover: hover)',\n}\n","import { createStitches } from '@stitches/react'\nimport type * as CSSUtil from '@stitches/react/types/css-util'\n\nimport { utils, theme as defaultTheme, themeMap, media } from './config'\n\nconst stitches = createStitches({\n theme: defaultTheme,\n media,\n utils,\n themeMap,\n})\n\nexport const {\n config,\n createTheme,\n css,\n getCssText,\n globalCss,\n keyframes,\n prefix,\n styled,\n theme,\n} = stitches\n\nexport type FontFace = CSSUtil.Native.AtRule.FontFace\n\nexport const fontFace = (...fonts: FontFace[]): string =>\n globalCss({\n '@font-face': fonts,\n })()\n","import type { ConfigType } from '@stitches/react/types/config'\n\nimport { config } from './stitches'\n\nexport function setMedia<Media extends {} = {}>(\n media: ConfigType.Media<Media>\n): void {\n config.media = {\n ...config.media,\n ...media,\n }\n}\n\nexport function setCssUtils<Utils extends {} = {}>(\n utils: ConfigType.Utils<Utils>\n): void {\n config.utils = {\n ...config.utils,\n ...utils,\n }\n}\n","import React from 'react'\nimport type {\n CSSProperties,\n ComponentType,\n ElementRef,\n ElementType,\n ExoticComponent,\n ForwardRefExoticComponent,\n JSXElementConstructor,\n PropsWithoutRef,\n RefAttributes,\n} from 'react'\nimport type { RemoveIndex } from '@stitches/react/types/stitches'\nimport type { Token } from '@stitches/react/types/theme'\nimport type {\n StyledComponentProps as StitchesStyledComponentProps,\n $$StyledComponentMedia,\n $$StyledComponentProps,\n $$StyledComponentType,\n TransformProps,\n} from '@stitches/react/types/styled-component'\nimport type * as Util from '@stitches/react/types/util'\n\nimport * as stitches from './stitches'\nimport type { CSS, StyledComponentProps, ForbiddenProps } from './types'\n\n// Error messages\n// -----------------------------------------------------------------------------\n\nexport const AS_ERROR =\n 'Polymorphism via `as` prop is not available in styled components.'\n\nexport const STYLING_ATTRS_ERROR =\n 'The `className` and `style` attributes are not avaialable in styled components.'\n\n// Utils\n// -----------------------------------------------------------------------------\n\nconst styleWithCssVars = (\n style: CSS,\n themeMap: typeof stitches.config.themeMap\n): CSSProperties =>\n (Object.entries(style) as Array<[string, unknown]>).reduce(\n (acc, [prop, value]) => {\n // @ts-expect-error\n const mapKeyForProp = themeMap[prop]\n const mapping = stitches.theme[mapKeyForProp] as unknown as {\n [Prop: string]: { [K in keyof Token]: Token[K] }\n }\n\n const parsedValue =\n typeof value === 'string' && /^\\$.+$/.test(value)\n ? mapping[value.replace('$', '')]?.computedValue\n : value\n\n return {\n ...acc,\n [prop]: parsedValue,\n }\n },\n {}\n ) as CSSProperties\n\n// Styled\n// -----------------------------------------------------------------------------\n\ntype Variants<T> = 'variants' extends keyof T\n ? {\n [Name in keyof T['variants']]?:\n | Util.Widen<keyof T['variants'][Name]>\n | Util.String\n }\n : Util.WideObject\n\ntype Styles<Composers> = Composers extends\n | string\n | ComponentType<any>\n | Util.Function\n ? Composers\n : RemoveIndex<CSS> & {\n variants?: {\n [Name in string]: {\n [Pair in number | string]: CSS\n }\n }\n compoundVariants?: Array<Variants<Composers> & { css: CSS }>\n defaultVariants?: Variants<Composers>\n } & CSS & {\n [K in keyof Composers]: K extends\n | 'compoundVariants'\n | 'defaultVariants'\n | 'variants'\n ? unknown\n : K extends keyof CSS\n ? CSS[K]\n : unknown\n }\n\n// This interface is only needed to fix TS4023\nexport interface StitchesInternals<\n Type extends\n | keyof JSX.IntrinsicElements\n | React.ComponentType<any>\n | Util.Function,\n Props extends {},\n Media extends typeof stitches.config.media\n> {\n className: string\n selector: string\n [$$StyledComponentType]: Type\n [$$StyledComponentProps]: Props\n [$$StyledComponentMedia]: Media\n}\n\nexport interface CustomStylesProps {\n css?: CSS\n UNSAFE_style?: CSS\n}\n\n// TS is infering the return type correctly, no need to make things uglier here\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const styled = <\n Element extends\n | keyof JSX.IntrinsicElements\n | React.ComponentType<any>\n | Util.Function = 'span',\n Composers extends\n | string\n | ExoticComponent<any>\n | JSXElementConstructor<any>\n | Util.Function\n | { [name: string]: unknown } = {}\n>(\n element: Element,\n composers?: Styles<Composers>\n) => {\n const StyledComponent = stitches.styled(element, composers ?? {})\n\n type __Element = Element extends ElementType ? Element : any\n type StyledElementRef = ElementRef<__Element>\n type StitchesProps = StitchesStyledComponentProps<[Composers]>\n type VariantProps = TransformProps<\n StitchesProps,\n typeof stitches.config.media\n >\n type ComponentProps = StyledComponentProps<__Element>\n\n type Props = Omit<ComponentProps, keyof VariantProps> &\n VariantProps &\n CustomStylesProps\n\n const Component = React.forwardRef<StyledElementRef, Props>(\n (props, forwardRef) => {\n const {\n as,\n className,\n style,\n UNSAFE_style, // eslint-disable-line @typescript-eslint/naming-convention\n ...restProps\n } = props as Props & {\n [K in ForbiddenProps]?: unknown\n }\n\n // based on https://github.com/modulz/stitches/blob/v1.2.8/packages/core/src/features/css.js#L71\n const onlyStyledClasses =\n typeof className === 'string'\n ? className\n ?.split(' ')\n .filter((x: string) => x.match(`${stitches.prefix}c-.+`))\n .join(' ')\n : ''\n\n const parsedStyle =\n UNSAFE_style !== undefined\n ? styleWithCssVars(UNSAFE_style, stitches.config.themeMap)\n : onlyStyledClasses !== ''\n ? style\n : undefined\n\n if (\n (className !== undefined && onlyStyledClasses !== className) ||\n (typeof style === 'object' &&\n style !== null &&\n Object.keys(style).length > 0 &&\n onlyStyledClasses === '')\n ) {\n console.error(STYLING_ATTRS_ERROR)\n }\n\n if (as !== undefined) {\n console.error(AS_ERROR)\n }\n\n return (\n <StyledComponent\n {...(restProps as any)}\n className={onlyStyledClasses}\n style={parsedStyle}\n ref={forwardRef}\n />\n )\n }\n ) as ForwardRefExoticComponent<\n PropsWithoutRef<Props> & RefAttributes<StyledElementRef>\n > &\n StitchesInternals<Element, StitchesProps, typeof stitches.config.media>\n\n Component.displayName = 'Styled.ForwardRef'\n Component.toString = StyledComponent.toString\n Component.className = StyledComponent.className\n Component.selector = StyledComponent.selector\n\n return Component\n}\n","import { prefix, theme as stitchesTheme } from './stitches'\n\nexport * from './types'\n\nexport {\n createTheme,\n css,\n getCssText,\n globalCss,\n keyframes,\n fontFace,\n} from './stitches'\n\nexport type { FontFace } from './stitches'\n\nexport const stitchesCssRoot = {\n prefix,\n selector: stitchesTheme.selector,\n className: stitchesTheme.className,\n}\n\nexport { theme, themeMap } from './config'\nexport type { Theme, ThemeMap } from './config'\n\nexport * from './custom'\nexport * from './styled'\n"],"names":["theme","tokens","base","createStitches","defaultTheme","styled","stitches.theme","stitches.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cC,MAAS,CAAO,QAAQ,CAAA,GACvD,iBAAA,KAAsB,EAAA,GACtB,KAAA,GACA,MAAA;AAEN,MAAA,IACG,cAAc,MAAA,IAAa,iBAAA,KAAsB,SAAA,IACjD,OAAO,UAAU,QAAA,IAChB,KAAA,KAAU,IAAA,IACV,MAAA,CAAO,KAAK,KAAK,CAAA,CAAE,MAAA,GAAS,CAAA,IAC5B,sBAAsB,EAAA,EACxB;AACA,QAAA,OAAA,CAAQ,MAAM,mBAAmB,CAAA;AAAA,MACnC;AAEA,MAAA,IAAI,OAAO,MAAA,EAAW;AACpB,QAAA,OAAA,CAAQ,MAAM,QAAQ,CAAA;AAAA,MACxB;AAEA,MAAA,uBACEC,cAAA;AAAA,QAAC,eAAA;AAAA,QAAA;AAAA,UACE,GAAI,SAAA;AAAA,UACL,SAAA,EAAW,iBAAA;AAAA,UACX,KAAA,EAAO,WAAA;AAAA,UACP,GAAA,EAAK;AAAA;AAAA,OACP;AAAA,IAEJ;AAAA,GACF;AAKA,EAAA,SAAA,CAAU,WAAA,GAAc,mBAAA;AACxB,EAAA,SAAA,CAAU,WAAW,eAAA,CAAgB,QAAA;AACrC,EAAA,SAAA,CAAU,YAAY,eAAA,CAAgB,SAAA;AACtC,EAAA,SAAA,CAAU,WAAW,eAAA,CAAgB,QAAA;AAErC,EAAA,OAAO,SAAA;AACT;;ACtMO,MAAM,eAAA,GAAkB;AAAA,EAC7B,MAAA;AAAA,EACA,UAAUC,KAAA,CAAc,QAAA;AAAA,EACxB,WAAWA,KAAA,CAAc;AAC3B;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"main.js","sources":["../src/config/theme-map.ts","../src/config/theme.ts","../src/config/utils.ts","../src/config/media.ts","../src/stitches.ts","../src/custom.ts","../src/styled.tsx","../src/index.ts"],"sourcesContent":["export const themeMap = {\n background: 'colors',\n backgroundColor: 'colors',\n backgroundImage: 'colors',\n blockSize: 'sizes',\n border: 'colors',\n borderBlock: 'colors',\n borderBlockEnd: 'colors',\n borderBlockStart: 'colors',\n borderBottom: 'colors',\n borderBottomColor: 'colors',\n borderBottomLeftRadius: 'radii',\n borderBottomRightRadius: 'radii',\n borderBottomStyle: 'border-styles',\n borderBottomWidth: 'border-widths',\n borderColor: 'colors',\n borderImage: 'colors',\n borderInline: 'colors',\n borderInlineEnd: 'colors',\n borderInlineStart: 'colors',\n borderLeft: 'colors',\n borderLeftColor: 'colors',\n borderLeftStyle: 'border-styles',\n borderLeftWidth: 'border-widths',\n borderRadius: 'radii',\n borderRight: 'colors',\n borderRightColor: 'colors',\n borderRightStyle: 'border-styles',\n borderRightWidth: 'border-widths',\n borderSpacing: 'space',\n borderStyle: 'border-styles',\n borderTop: 'colors',\n borderTopColor: 'colors',\n borderTopLeftRadius: 'radii',\n borderTopRightRadius: 'radii',\n borderTopStyle: 'border-styles',\n borderTopWidth: 'border-widths',\n borderWidth: 'border-widths',\n bottom: 'space',\n boxShadow: 'shadows',\n caretColor: 'colors',\n color: 'colors',\n columnGap: 'space',\n columnRuleColor: 'colors',\n fill: 'colors',\n flexBasis: 'sizes',\n fontFamily: 'fonts',\n fontSize: 'font-sizes',\n fontWeight: 'font-weights',\n gap: 'space',\n gridColumnGap: 'space',\n gridGap: 'space',\n gridRowGap: 'space',\n gridTemplateColumns: 'sizes',\n gridTemplateRows: 'sizes',\n height: 'sizes',\n inlineSize: 'sizes',\n inset: 'space',\n insetBlock: 'space',\n insetBlockEnd: 'space',\n insetBlockStart: 'space',\n insetInline: 'space',\n insetInlineEnd: 'space',\n insetInlineStart: 'space',\n left: 'space',\n letterSpacing: 'letter-spacings',\n lineHeight: 'line-heights',\n margin: 'space',\n marginBlock: 'space',\n marginBlockEnd: 'space',\n marginBlockStart: 'space',\n marginBottom: 'space',\n marginInline: 'space',\n marginInlineEnd: 'space',\n marginInlineStart: 'space',\n marginLeft: 'space',\n marginRight: 'space',\n marginTop: 'space',\n maxBlockSize: 'sizes',\n maxHeight: 'sizes',\n maxInlineSize: 'sizes',\n maxWidth: 'sizes',\n minBlockSize: 'sizes',\n minHeight: 'sizes',\n minInlineSize: 'sizes',\n minWidth: 'sizes',\n outline: 'colors',\n outlineColor: 'colors',\n padding: 'space',\n paddingBlock: 'space',\n paddingBlockEnd: 'space',\n paddingBlockStart: 'space',\n paddingBottom: 'space',\n paddingInline: 'space',\n paddingInlineEnd: 'space',\n paddingInlineStart: 'space',\n paddingLeft: 'space',\n paddingRight: 'space',\n paddingTop: 'space',\n right: 'space',\n rowGap: 'space',\n scrollMargin: 'space',\n scrollMarginBlock: 'space',\n scrollMarginBlockEnd: 'space',\n scrollMarginBlockStart: 'space',\n scrollMarginBottom: 'space',\n scrollMarginInline: 'space',\n scrollMarginInlineEnd: 'space',\n scrollMarginInlineStart: 'space',\n scrollMarginLeft: 'space',\n scrollMarginRight: 'space',\n scrollMarginTop: 'space',\n scrollPadding: 'space',\n scrollPaddingBlock: 'space',\n scrollPaddingBlockEnd: 'space',\n scrollPaddingBlockStart: 'space',\n scrollPaddingBottom: 'space',\n scrollPaddingInline: 'space',\n scrollPaddingInlineEnd: 'space',\n scrollPaddingInlineStart: 'space',\n scrollPaddingLeft: 'space',\n scrollPaddingRight: 'space',\n scrollPaddingTop: 'space',\n stroke: 'colors',\n strokeWidth: 'stroke-width',\n textDecorationColor: 'colors',\n textShadow: 'shadows',\n top: 'space',\n transition: 'transitions',\n width: 'sizes',\n zIndex: 'z-indices',\n} as const\n\nexport type ThemeMap = typeof themeMap\n","import * as tokens from '@mirohq/design-tokens'\nimport { base } from '@mirohq/design-system-themes'\nimport type { Theme as DS_Theme } from '@mirohq/design-system-themes'\nimport merge from 'lodash.merge'\n\nexport const theme = {\n 'border-widths': tokens.borderWidths,\n colors: merge({}, tokens.colors, base.colors),\n 'font-sizes': tokens.fontSizes,\n 'font-weights': tokens.fontWeights,\n 'line-heights': tokens.lineHeights,\n fonts: tokens.fonts,\n radii: tokens.radii,\n shadows: base.shadows as Required<DS_Theme['shadows']>,\n sizes: tokens.sizes,\n space: tokens.space,\n 'stroke-width': tokens.strokeWidths,\n 'z-indices': tokens.zIndices,\n}\n\nexport type Theme = typeof theme\n","import type { CSSProperties } from '@stitches/react'\n\nexport const utils = {\n paddingX: (value: CSSProperties['padding']) => ({\n paddingLeft: value,\n paddingRight: value,\n }),\n paddingY: (value: CSSProperties['padding']) => ({\n paddingTop: value,\n paddingBottom: value,\n }),\n marginX: (value: CSSProperties['margin']) => ({\n marginLeft: value,\n marginRight: value,\n }),\n marginY: (value: CSSProperties['margin']) => ({\n marginTop: value,\n marginBottom: value,\n }),\n square: (value: CSSProperties['width']) => ({\n width: value,\n height: value,\n }),\n _hover: (css: CSSProperties) => ({\n '&:hover, &[data-hovered]': css,\n }),\n}\n","/**\n * Commenting out due to performance problems\n * Please check the thread for more info:\n * https://miro.slack.com/archives/C03SJ1S209M/p1669821558087279\n */\n\nexport const media = {\n // reducedMotion: '(prefers-reduced-motion: reduce)',\n // motion: '(prefers-reduced-motion: no-preference)',\n // hover: '(any-hover: hover)',\n}\n","import { createStitches } from '@stitches/react'\nimport type * as CSSUtil from '@stitches/react/types/css-util'\n\nimport { utils, theme as defaultTheme, themeMap, media } from './config'\n\nconst stitches = createStitches({\n theme: defaultTheme,\n media,\n utils,\n themeMap,\n})\n\nexport const {\n config,\n createTheme,\n css,\n getCssText,\n globalCss,\n keyframes,\n prefix,\n styled,\n theme,\n} = stitches\n\nexport type FontFace = CSSUtil.Native.AtRule.FontFace\n\nexport const fontFace = (...fonts: FontFace[]): string =>\n globalCss({\n '@font-face': fonts,\n })()\n","import type { ConfigType } from '@stitches/react/types/config'\n\nimport { config } from './stitches'\n\nexport function setMedia<Media extends {} = {}>(\n media: ConfigType.Media<Media>\n): void {\n config.media = {\n ...config.media,\n ...media,\n }\n}\n\nexport function setCssUtils<Utils extends {} = {}>(\n utils: ConfigType.Utils<Utils>\n): void {\n config.utils = {\n ...config.utils,\n ...utils,\n }\n}\n","import React from 'react'\nimport type {\n CSSProperties,\n ComponentType,\n ElementRef,\n ElementType,\n ExoticComponent,\n ForwardRefExoticComponent,\n JSXElementConstructor,\n PropsWithoutRef,\n RefAttributes,\n} from 'react'\nimport type { RemoveIndex } from '@stitches/react/types/stitches'\nimport type { Token } from '@stitches/react/types/theme'\nimport type {\n StyledComponentProps as StitchesStyledComponentProps,\n $$StyledComponentMedia,\n $$StyledComponentProps,\n $$StyledComponentType,\n TransformProps,\n} from '@stitches/react/types/styled-component'\nimport type * as Util from '@stitches/react/types/util'\nimport type { OmitFromUnion } from '@mirohq/design-system-types'\n\nimport * as stitches from './stitches'\nimport type { CSS, StyledComponentProps, ForbiddenProps } from './types'\n\n// Error messages\n// -----------------------------------------------------------------------------\n\nexport const AS_ERROR =\n 'Polymorphism via `as` prop is not available in styled components.'\n\nexport const STYLING_ATTRS_ERROR =\n 'The `className` and `style` attributes are not avaialable in styled components.'\n\n// Utils\n// -----------------------------------------------------------------------------\n\nconst styleWithCssVars = (\n style: CSS,\n themeMap: typeof stitches.config.themeMap\n): CSSProperties =>\n (Object.entries(style) as Array<[string, unknown]>).reduce(\n (acc, [prop, value]) => {\n // @ts-expect-error\n const mapKeyForProp = themeMap[prop]\n const mapping = stitches.theme[mapKeyForProp] as unknown as {\n [Prop: string]: { [K in keyof Token]: Token[K] }\n }\n\n const parsedValue =\n typeof value === 'string' && /^\\$.+$/.test(value)\n ? mapping[value.replace('$', '')]?.computedValue\n : value\n\n return {\n ...acc,\n [prop]: parsedValue,\n }\n },\n {}\n ) as CSSProperties\n\n// Styled\n// -----------------------------------------------------------------------------\n\ntype Variants<T> = 'variants' extends keyof T\n ? {\n [Name in keyof T['variants']]?:\n | Util.Widen<keyof T['variants'][Name]>\n | Util.String\n }\n : Util.WideObject\n\ntype Styles<Composers> = Composers extends\n | string\n | ComponentType<any>\n | Util.Function\n ? Composers\n : RemoveIndex<CSS> & {\n variants?: {\n [Name in string]: {\n [Pair in number | string]: CSS\n }\n }\n compoundVariants?: Array<Variants<Composers> & { css: CSS }>\n defaultVariants?: Variants<Composers>\n } & CSS & {\n [K in keyof Composers]: K extends\n | 'compoundVariants'\n | 'defaultVariants'\n | 'variants'\n ? unknown\n : K extends keyof CSS\n ? CSS[K]\n : unknown\n }\n\n// This interface is only needed to fix TS4023\nexport interface StitchesInternals<\n Type extends\n | keyof JSX.IntrinsicElements\n | React.ComponentType<any>\n | Util.Function,\n Props extends {},\n Media extends typeof stitches.config.media\n> {\n className: string\n selector: string\n [$$StyledComponentType]: Type\n [$$StyledComponentProps]: Props\n [$$StyledComponentMedia]: Media\n}\n\nexport interface CustomStylesProps {\n css?: CSS\n UNSAFE_style?: CSS\n}\n\n// TS is infering the return type correctly, no need to make things uglier here\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const styled = <\n Element extends\n | keyof JSX.IntrinsicElements\n | React.ComponentType<any>\n | Util.Function = 'span',\n Composers extends\n | string\n | ExoticComponent<any>\n | JSXElementConstructor<any>\n | Util.Function\n | { [name: string]: unknown } = {}\n>(\n element: Element,\n composers?: Styles<Composers>\n) => {\n const StyledComponent = stitches.styled(element, composers ?? {})\n\n type __Element = Element extends ElementType ? Element : any\n type StyledElementRef = ElementRef<__Element>\n type StitchesProps = StitchesStyledComponentProps<[Composers]>\n type VariantProps = TransformProps<\n StitchesProps,\n typeof stitches.config.media\n >\n type ComponentProps = StyledComponentProps<__Element>\n\n type Props = OmitFromUnion<ComponentProps, keyof VariantProps> &\n VariantProps &\n CustomStylesProps\n\n const Component = React.forwardRef<StyledElementRef, Props>(\n (props, forwardRef) => {\n const {\n as,\n className,\n style,\n UNSAFE_style, // eslint-disable-line @typescript-eslint/naming-convention\n ...restProps\n } = props as Props & {\n [K in ForbiddenProps]?: unknown\n }\n\n // based on https://github.com/modulz/stitches/blob/v1.2.8/packages/core/src/features/css.js#L71\n const onlyStyledClasses =\n typeof className === 'string'\n ? className\n ?.split(' ')\n .filter((x: string) => x.match(`${stitches.prefix}c-.+`))\n .join(' ')\n : ''\n\n const parsedStyle =\n UNSAFE_style !== undefined\n ? styleWithCssVars(UNSAFE_style, stitches.config.themeMap)\n : onlyStyledClasses !== ''\n ? style\n : undefined\n\n if (\n (className !== undefined && onlyStyledClasses !== className) ||\n (typeof style === 'object' &&\n style !== null &&\n Object.keys(style).length > 0 &&\n onlyStyledClasses === '')\n ) {\n console.error(STYLING_ATTRS_ERROR)\n }\n\n if (as !== undefined) {\n console.error(AS_ERROR)\n }\n\n return (\n <StyledComponent\n {...(restProps as any)}\n className={onlyStyledClasses}\n style={parsedStyle}\n ref={forwardRef}\n />\n )\n }\n ) as ForwardRefExoticComponent<\n PropsWithoutRef<Props> & RefAttributes<StyledElementRef>\n > &\n StitchesInternals<Element, StitchesProps, typeof stitches.config.media>\n\n Component.displayName = 'Styled.ForwardRef'\n Component.toString = StyledComponent.toString\n Component.className = StyledComponent.className\n Component.selector = StyledComponent.selector\n\n return Component\n}\n","import { prefix, theme as stitchesTheme } from './stitches'\n\nexport * from './types'\n\nexport {\n createTheme,\n css,\n getCssText,\n globalCss,\n keyframes,\n fontFace,\n} from './stitches'\n\nexport type { FontFace } from './stitches'\n\nexport const stitchesCssRoot = {\n prefix,\n selector: stitchesTheme.selector,\n className: stitchesTheme.className,\n}\n\nexport { theme, themeMap } from './config'\nexport type { Theme, ThemeMap } from './config'\n\nexport * from './custom'\nexport * from './styled'\n"],"names":["theme","tokens","base","createStitches","defaultTheme","styled","stitches.theme","stitches.styled","stitches.prefix","stitches.config","jsx","stitchesTheme"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,QAAA,GAAW;AAAA,EACtB,UAAA,EAAY,QAAA;AAAA,EACZ,eAAA,EAAiB,QAAA;AAAA,EACjB,eAAA,EAAiB,QAAA;AAAA,EACjB,SAAA,EAAW,OAAA;AAAA,EACX,MAAA,EAAQ,QAAA;AAAA,EACR,WAAA,EAAa,QAAA;AAAA,EACb,cAAA,EAAgB,QAAA;AAAA,EAChB,gBAAA,EAAkB,QAAA;AAAA,EAClB,YAAA,EAAc,QA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A,OAAA,CAAQ,MAAM,QAAQ,CAAA;AAAA,MACxB;AAEA,MAAA,uBACEC,cAAA;AAAA,QAAC,eAAA;AAAA,QAAA;AAAA,UACE,GAAI,SAAA;AAAA,UACL,SAAA,EAAW,iBAAA;AAAA,UACX,KAAA,EAAO,WAAA;AAAA,UACP,GAAA,EAAK;AAAA;AAAA,OACP;AAAA,IAEJ;AAAA,GACF;AAKA,EAAA,SAAA,CAAU,WAAA,GAAc,mBAAA;AACxB,EAAA,SAAA,CAAU,WAAW,eAAA,CAAgB,QAAA;AACrC,EAAA,SAAA,CAAU,YAAY,eAAA,CAAgB,SAAA;AACtC,EAAA,SAAA,CAAU,WAAW,eAAA,CAAgB,QAAA;AAErC,EAAA,OAAO,SAAA;AACT;;ACvMO,MAAM,eAAA,GAAkB;AAAA,EAC7B,MAAA;AAAA,EACA,UAAUC,KAAA,CAAc,QAAA;AAAA,EACxB,WAAWA,KAAA,CAAc;AAC3B;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../src/config/theme-map.ts","../src/config/theme.ts","../src/config/utils.ts","../src/config/media.ts","../src/stitches.ts","../src/custom.ts","../src/styled.tsx","../src/index.ts"],"sourcesContent":["export const themeMap = {\n background: 'colors',\n backgroundColor: 'colors',\n backgroundImage: 'colors',\n blockSize: 'sizes',\n border: 'colors',\n borderBlock: 'colors',\n borderBlockEnd: 'colors',\n borderBlockStart: 'colors',\n borderBottom: 'colors',\n borderBottomColor: 'colors',\n borderBottomLeftRadius: 'radii',\n borderBottomRightRadius: 'radii',\n borderBottomStyle: 'border-styles',\n borderBottomWidth: 'border-widths',\n borderColor: 'colors',\n borderImage: 'colors',\n borderInline: 'colors',\n borderInlineEnd: 'colors',\n borderInlineStart: 'colors',\n borderLeft: 'colors',\n borderLeftColor: 'colors',\n borderLeftStyle: 'border-styles',\n borderLeftWidth: 'border-widths',\n borderRadius: 'radii',\n borderRight: 'colors',\n borderRightColor: 'colors',\n borderRightStyle: 'border-styles',\n borderRightWidth: 'border-widths',\n borderSpacing: 'space',\n borderStyle: 'border-styles',\n borderTop: 'colors',\n borderTopColor: 'colors',\n borderTopLeftRadius: 'radii',\n borderTopRightRadius: 'radii',\n borderTopStyle: 'border-styles',\n borderTopWidth: 'border-widths',\n borderWidth: 'border-widths',\n bottom: 'space',\n boxShadow: 'shadows',\n caretColor: 'colors',\n color: 'colors',\n columnGap: 'space',\n columnRuleColor: 'colors',\n fill: 'colors',\n flexBasis: 'sizes',\n fontFamily: 'fonts',\n fontSize: 'font-sizes',\n fontWeight: 'font-weights',\n gap: 'space',\n gridColumnGap: 'space',\n gridGap: 'space',\n gridRowGap: 'space',\n gridTemplateColumns: 'sizes',\n gridTemplateRows: 'sizes',\n height: 'sizes',\n inlineSize: 'sizes',\n inset: 'space',\n insetBlock: 'space',\n insetBlockEnd: 'space',\n insetBlockStart: 'space',\n insetInline: 'space',\n insetInlineEnd: 'space',\n insetInlineStart: 'space',\n left: 'space',\n letterSpacing: 'letter-spacings',\n lineHeight: 'line-heights',\n margin: 'space',\n marginBlock: 'space',\n marginBlockEnd: 'space',\n marginBlockStart: 'space',\n marginBottom: 'space',\n marginInline: 'space',\n marginInlineEnd: 'space',\n marginInlineStart: 'space',\n marginLeft: 'space',\n marginRight: 'space',\n marginTop: 'space',\n maxBlockSize: 'sizes',\n maxHeight: 'sizes',\n maxInlineSize: 'sizes',\n maxWidth: 'sizes',\n minBlockSize: 'sizes',\n minHeight: 'sizes',\n minInlineSize: 'sizes',\n minWidth: 'sizes',\n outline: 'colors',\n outlineColor: 'colors',\n padding: 'space',\n paddingBlock: 'space',\n paddingBlockEnd: 'space',\n paddingBlockStart: 'space',\n paddingBottom: 'space',\n paddingInline: 'space',\n paddingInlineEnd: 'space',\n paddingInlineStart: 'space',\n paddingLeft: 'space',\n paddingRight: 'space',\n paddingTop: 'space',\n right: 'space',\n rowGap: 'space',\n scrollMargin: 'space',\n scrollMarginBlock: 'space',\n scrollMarginBlockEnd: 'space',\n scrollMarginBlockStart: 'space',\n scrollMarginBottom: 'space',\n scrollMarginInline: 'space',\n scrollMarginInlineEnd: 'space',\n scrollMarginInlineStart: 'space',\n scrollMarginLeft: 'space',\n scrollMarginRight: 'space',\n scrollMarginTop: 'space',\n scrollPadding: 'space',\n scrollPaddingBlock: 'space',\n scrollPaddingBlockEnd: 'space',\n scrollPaddingBlockStart: 'space',\n scrollPaddingBottom: 'space',\n scrollPaddingInline: 'space',\n scrollPaddingInlineEnd: 'space',\n scrollPaddingInlineStart: 'space',\n scrollPaddingLeft: 'space',\n scrollPaddingRight: 'space',\n scrollPaddingTop: 'space',\n stroke: 'colors',\n strokeWidth: 'stroke-width',\n textDecorationColor: 'colors',\n textShadow: 'shadows',\n top: 'space',\n transition: 'transitions',\n width: 'sizes',\n zIndex: 'z-indices',\n} as const\n\nexport type ThemeMap = typeof themeMap\n","import * as tokens from '@mirohq/design-tokens'\nimport { base } from '@mirohq/design-system-themes'\nimport type { Theme as DS_Theme } from '@mirohq/design-system-themes'\nimport merge from 'lodash.merge'\n\nexport const theme = {\n 'border-widths': tokens.borderWidths,\n colors: merge({}, tokens.colors, base.colors),\n 'font-sizes': tokens.fontSizes,\n 'font-weights': tokens.fontWeights,\n 'line-heights': tokens.lineHeights,\n fonts: tokens.fonts,\n radii: tokens.radii,\n shadows: base.shadows as Required<DS_Theme['shadows']>,\n sizes: tokens.sizes,\n space: tokens.space,\n 'stroke-width': tokens.strokeWidths,\n 'z-indices': tokens.zIndices,\n}\n\nexport type Theme = typeof theme\n","import type { CSSProperties } from '@stitches/react'\n\nexport const utils = {\n paddingX: (value: CSSProperties['padding']) => ({\n paddingLeft: value,\n paddingRight: value,\n }),\n paddingY: (value: CSSProperties['padding']) => ({\n paddingTop: value,\n paddingBottom: value,\n }),\n marginX: (value: CSSProperties['margin']) => ({\n marginLeft: value,\n marginRight: value,\n }),\n marginY: (value: CSSProperties['margin']) => ({\n marginTop: value,\n marginBottom: value,\n }),\n square: (value: CSSProperties['width']) => ({\n width: value,\n height: value,\n }),\n _hover: (css: CSSProperties) => ({\n '&:hover, &[data-hovered]': css,\n }),\n}\n","/**\n * Commenting out due to performance problems\n * Please check the thread for more info:\n * https://miro.slack.com/archives/C03SJ1S209M/p1669821558087279\n */\n\nexport const media = {\n // reducedMotion: '(prefers-reduced-motion: reduce)',\n // motion: '(prefers-reduced-motion: no-preference)',\n // hover: '(any-hover: hover)',\n}\n","import { createStitches } from '@stitches/react'\nimport type * as CSSUtil from '@stitches/react/types/css-util'\n\nimport { utils, theme as defaultTheme, themeMap, media } from './config'\n\nconst stitches = createStitches({\n theme: defaultTheme,\n media,\n utils,\n themeMap,\n})\n\nexport const {\n config,\n createTheme,\n css,\n getCssText,\n globalCss,\n keyframes,\n prefix,\n styled,\n theme,\n} = stitches\n\nexport type FontFace = CSSUtil.Native.AtRule.FontFace\n\nexport const fontFace = (...fonts: FontFace[]): string =>\n globalCss({\n '@font-face': fonts,\n })()\n","import type { ConfigType } from '@stitches/react/types/config'\n\nimport { config } from './stitches'\n\nexport function setMedia<Media extends {} = {}>(\n media: ConfigType.Media<Media>\n): void {\n config.media = {\n ...config.media,\n ...media,\n }\n}\n\nexport function setCssUtils<Utils extends {} = {}>(\n utils: ConfigType.Utils<Utils>\n): void {\n config.utils = {\n ...config.utils,\n ...utils,\n }\n}\n","import React from 'react'\nimport type {\n CSSProperties,\n ComponentType,\n ElementRef,\n ElementType,\n ExoticComponent,\n ForwardRefExoticComponent,\n JSXElementConstructor,\n PropsWithoutRef,\n RefAttributes,\n} from 'react'\nimport type { RemoveIndex } from '@stitches/react/types/stitches'\nimport type { Token } from '@stitches/react/types/theme'\nimport type {\n StyledComponentProps as StitchesStyledComponentProps,\n $$StyledComponentMedia,\n $$StyledComponentProps,\n $$StyledComponentType,\n TransformProps,\n} from '@stitches/react/types/styled-component'\nimport type * as Util from '@stitches/react/types/util'\n\nimport * as stitches from './stitches'\nimport type { CSS, StyledComponentProps, ForbiddenProps } from './types'\n\n// Error messages\n// -----------------------------------------------------------------------------\n\nexport const AS_ERROR =\n 'Polymorphism via `as` prop is not available in styled components.'\n\nexport const STYLING_ATTRS_ERROR =\n 'The `className` and `style` attributes are not avaialable in styled components.'\n\n// Utils\n// -----------------------------------------------------------------------------\n\nconst styleWithCssVars = (\n style: CSS,\n themeMap: typeof stitches.config.themeMap\n): CSSProperties =>\n (Object.entries(style) as Array<[string, unknown]>).reduce(\n (acc, [prop, value]) => {\n // @ts-expect-error\n const mapKeyForProp = themeMap[prop]\n const mapping = stitches.theme[mapKeyForProp] as unknown as {\n [Prop: string]: { [K in keyof Token]: Token[K] }\n }\n\n const parsedValue =\n typeof value === 'string' && /^\\$.+$/.test(value)\n ? mapping[value.replace('$', '')]?.computedValue\n : value\n\n return {\n ...acc,\n [prop]: parsedValue,\n }\n },\n {}\n ) as CSSProperties\n\n// Styled\n// -----------------------------------------------------------------------------\n\ntype Variants<T> = 'variants' extends keyof T\n ? {\n [Name in keyof T['variants']]?:\n | Util.Widen<keyof T['variants'][Name]>\n | Util.String\n }\n : Util.WideObject\n\ntype Styles<Composers> = Composers extends\n | string\n | ComponentType<any>\n | Util.Function\n ? Composers\n : RemoveIndex<CSS> & {\n variants?: {\n [Name in string]: {\n [Pair in number | string]: CSS\n }\n }\n compoundVariants?: Array<Variants<Composers> & { css: CSS }>\n defaultVariants?: Variants<Composers>\n } & CSS & {\n [K in keyof Composers]: K extends\n | 'compoundVariants'\n | 'defaultVariants'\n | 'variants'\n ? unknown\n : K extends keyof CSS\n ? CSS[K]\n : unknown\n }\n\n// This interface is only needed to fix TS4023\nexport interface StitchesInternals<\n Type extends\n | keyof JSX.IntrinsicElements\n | React.ComponentType<any>\n | Util.Function,\n Props extends {},\n Media extends typeof stitches.config.media\n> {\n className: string\n selector: string\n [$$StyledComponentType]: Type\n [$$StyledComponentProps]: Props\n [$$StyledComponentMedia]: Media\n}\n\nexport interface CustomStylesProps {\n css?: CSS\n UNSAFE_style?: CSS\n}\n\n// TS is infering the return type correctly, no need to make things uglier here\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const styled = <\n Element extends\n | keyof JSX.IntrinsicElements\n | React.ComponentType<any>\n | Util.Function = 'span',\n Composers extends\n | string\n | ExoticComponent<any>\n | JSXElementConstructor<any>\n | Util.Function\n | { [name: string]: unknown } = {}\n>(\n element: Element,\n composers?: Styles<Composers>\n) => {\n const StyledComponent = stitches.styled(element, composers ?? {})\n\n type __Element = Element extends ElementType ? Element : any\n type StyledElementRef = ElementRef<__Element>\n type StitchesProps = StitchesStyledComponentProps<[Composers]>\n type VariantProps = TransformProps<\n StitchesProps,\n typeof stitches.config.media\n >\n type ComponentProps = StyledComponentProps<__Element>\n\n type Props = Omit<ComponentProps, keyof VariantProps> &\n VariantProps &\n CustomStylesProps\n\n const Component = React.forwardRef<StyledElementRef, Props>(\n (props, forwardRef) => {\n const {\n as,\n className,\n style,\n UNSAFE_style, // eslint-disable-line @typescript-eslint/naming-convention\n ...restProps\n } = props as Props & {\n [K in ForbiddenProps]?: unknown\n }\n\n // based on https://github.com/modulz/stitches/blob/v1.2.8/packages/core/src/features/css.js#L71\n const onlyStyledClasses =\n typeof className === 'string'\n ? className\n ?.split(' ')\n .filter((x: string) => x.match(`${stitches.prefix}c-.+`))\n .join(' ')\n : ''\n\n const parsedStyle =\n UNSAFE_style !== undefined\n ? styleWithCssVars(UNSAFE_style, stitches.config.themeMap)\n : onlyStyledClasses !== ''\n ? style\n : undefined\n\n if (\n (className !== undefined && onlyStyledClasses !== className) ||\n (typeof style === 'object' &&\n style !== null &&\n Object.keys(style).length > 0 &&\n onlyStyledClasses === '')\n ) {\n console.error(STYLING_ATTRS_ERROR)\n }\n\n if (as !== undefined) {\n console.error(AS_ERROR)\n }\n\n return (\n <StyledComponent\n {...(restProps as any)}\n className={onlyStyledClasses}\n style={parsedStyle}\n ref={forwardRef}\n />\n )\n }\n ) as ForwardRefExoticComponent<\n PropsWithoutRef<Props> & RefAttributes<StyledElementRef>\n > &\n StitchesInternals<Element, StitchesProps, typeof stitches.config.media>\n\n Component.displayName = 'Styled.ForwardRef'\n Component.toString = StyledComponent.toString\n Component.className = StyledComponent.className\n Component.selector = StyledComponent.selector\n\n return Component\n}\n","import { prefix, theme as stitchesTheme } from './stitches'\n\nexport * from './types'\n\nexport {\n createTheme,\n css,\n getCssText,\n globalCss,\n keyframes,\n fontFace,\n} from './stitches'\n\nexport type { FontFace } from './stitches'\n\nexport const stitchesCssRoot = {\n prefix,\n selector: stitchesTheme.selector,\n className: stitchesTheme.className,\n}\n\nexport { theme, themeMap } from './config'\nexport type { Theme, ThemeMap } from './config'\n\nexport * from './custom'\nexport * from './styled'\n"],"names":["theme","defaultTheme","styled","stitches.theme","stitches.styled","stitches.prefix","stitches.config","stitchesTheme"],"mappings":";;;;;;;AAAO,MAAM,QAAA,GAAW;AAAA,EACtB,UAAA,EAAY,QAAA;AAAA,EACZ,eAAA,EAAiB,QAAA;AAAA,EACjB,eAAA,EAAiB,QAAA;AAAA,EACjB,SAAA,EAAW,OAAA;AAAA,EACX,MAAA,EAAQ,QAAA;AAAA,EACR,WAAA,EAAa,QAAA;AAAA,EACb,cAAA,EAAgB,QAAA;AAAA,EAChB,gBAAA,EAAkB,QAAA;AAAA,EAClB,YAAA,EAAc,QAAA;AAAA,EACd,iBAAA,EAAmB,QAAA;AAAA,EACnB,sBAAA,EAAwB,OAAA;AAAA,EACxB,uBAAA,EAAyB,OAAA;AAAA,EACzB,iBAAA,EAAmB,eAAA;AAAA,EACnB,iBAAA,EAAmB,eAAA;AAAA,EACnB,WAAA,EAAa,QAAA;AAAA,EACb,WAAA,EAAa,QAAA;AAAA,EACb,YAAA,EAAc,QAAA;AAAA,EACd,eAAA,EAAiB,QAAA;AAAA,EACjB,iBAAA,EAAmB,QAAA;AAAA,EACnB,UAAA,EAAY,QAAA;AAAA,EACZ,eAAA,EAAiB,QAAA;AAAA,EACjB,eAAA,EAAiB,eAAA;AAAA,EACjB,eAAA,EAAiB,eAAA;AA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O,MAAM,eAAA,GAAkB;AAAA,EAC7B,MAAA;AAAA,EACA,UAAUC,KAAA,CAAc,QAAA;AAAA,EACxB,WAAWA,KAAA,CAAc;AAC3B;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../src/config/theme-map.ts","../src/config/theme.ts","../src/config/utils.ts","../src/config/media.ts","../src/stitches.ts","../src/custom.ts","../src/styled.tsx","../src/index.ts"],"sourcesContent":["export const themeMap = {\n background: 'colors',\n backgroundColor: 'colors',\n backgroundImage: 'colors',\n blockSize: 'sizes',\n border: 'colors',\n borderBlock: 'colors',\n borderBlockEnd: 'colors',\n borderBlockStart: 'colors',\n borderBottom: 'colors',\n borderBottomColor: 'colors',\n borderBottomLeftRadius: 'radii',\n borderBottomRightRadius: 'radii',\n borderBottomStyle: 'border-styles',\n borderBottomWidth: 'border-widths',\n borderColor: 'colors',\n borderImage: 'colors',\n borderInline: 'colors',\n borderInlineEnd: 'colors',\n borderInlineStart: 'colors',\n borderLeft: 'colors',\n borderLeftColor: 'colors',\n borderLeftStyle: 'border-styles',\n borderLeftWidth: 'border-widths',\n borderRadius: 'radii',\n borderRight: 'colors',\n borderRightColor: 'colors',\n borderRightStyle: 'border-styles',\n borderRightWidth: 'border-widths',\n borderSpacing: 'space',\n borderStyle: 'border-styles',\n borderTop: 'colors',\n borderTopColor: 'colors',\n borderTopLeftRadius: 'radii',\n borderTopRightRadius: 'radii',\n borderTopStyle: 'border-styles',\n borderTopWidth: 'border-widths',\n borderWidth: 'border-widths',\n bottom: 'space',\n boxShadow: 'shadows',\n caretColor: 'colors',\n color: 'colors',\n columnGap: 'space',\n columnRuleColor: 'colors',\n fill: 'colors',\n flexBasis: 'sizes',\n fontFamily: 'fonts',\n fontSize: 'font-sizes',\n fontWeight: 'font-weights',\n gap: 'space',\n gridColumnGap: 'space',\n gridGap: 'space',\n gridRowGap: 'space',\n gridTemplateColumns: 'sizes',\n gridTemplateRows: 'sizes',\n height: 'sizes',\n inlineSize: 'sizes',\n inset: 'space',\n insetBlock: 'space',\n insetBlockEnd: 'space',\n insetBlockStart: 'space',\n insetInline: 'space',\n insetInlineEnd: 'space',\n insetInlineStart: 'space',\n left: 'space',\n letterSpacing: 'letter-spacings',\n lineHeight: 'line-heights',\n margin: 'space',\n marginBlock: 'space',\n marginBlockEnd: 'space',\n marginBlockStart: 'space',\n marginBottom: 'space',\n marginInline: 'space',\n marginInlineEnd: 'space',\n marginInlineStart: 'space',\n marginLeft: 'space',\n marginRight: 'space',\n marginTop: 'space',\n maxBlockSize: 'sizes',\n maxHeight: 'sizes',\n maxInlineSize: 'sizes',\n maxWidth: 'sizes',\n minBlockSize: 'sizes',\n minHeight: 'sizes',\n minInlineSize: 'sizes',\n minWidth: 'sizes',\n outline: 'colors',\n outlineColor: 'colors',\n padding: 'space',\n paddingBlock: 'space',\n paddingBlockEnd: 'space',\n paddingBlockStart: 'space',\n paddingBottom: 'space',\n paddingInline: 'space',\n paddingInlineEnd: 'space',\n paddingInlineStart: 'space',\n paddingLeft: 'space',\n paddingRight: 'space',\n paddingTop: 'space',\n right: 'space',\n rowGap: 'space',\n scrollMargin: 'space',\n scrollMarginBlock: 'space',\n scrollMarginBlockEnd: 'space',\n scrollMarginBlockStart: 'space',\n scrollMarginBottom: 'space',\n scrollMarginInline: 'space',\n scrollMarginInlineEnd: 'space',\n scrollMarginInlineStart: 'space',\n scrollMarginLeft: 'space',\n scrollMarginRight: 'space',\n scrollMarginTop: 'space',\n scrollPadding: 'space',\n scrollPaddingBlock: 'space',\n scrollPaddingBlockEnd: 'space',\n scrollPaddingBlockStart: 'space',\n scrollPaddingBottom: 'space',\n scrollPaddingInline: 'space',\n scrollPaddingInlineEnd: 'space',\n scrollPaddingInlineStart: 'space',\n scrollPaddingLeft: 'space',\n scrollPaddingRight: 'space',\n scrollPaddingTop: 'space',\n stroke: 'colors',\n strokeWidth: 'stroke-width',\n textDecorationColor: 'colors',\n textShadow: 'shadows',\n top: 'space',\n transition: 'transitions',\n width: 'sizes',\n zIndex: 'z-indices',\n} as const\n\nexport type ThemeMap = typeof themeMap\n","import * as tokens from '@mirohq/design-tokens'\nimport { base } from '@mirohq/design-system-themes'\nimport type { Theme as DS_Theme } from '@mirohq/design-system-themes'\nimport merge from 'lodash.merge'\n\nexport const theme = {\n 'border-widths': tokens.borderWidths,\n colors: merge({}, tokens.colors, base.colors),\n 'font-sizes': tokens.fontSizes,\n 'font-weights': tokens.fontWeights,\n 'line-heights': tokens.lineHeights,\n fonts: tokens.fonts,\n radii: tokens.radii,\n shadows: base.shadows as Required<DS_Theme['shadows']>,\n sizes: tokens.sizes,\n space: tokens.space,\n 'stroke-width': tokens.strokeWidths,\n 'z-indices': tokens.zIndices,\n}\n\nexport type Theme = typeof theme\n","import type { CSSProperties } from '@stitches/react'\n\nexport const utils = {\n paddingX: (value: CSSProperties['padding']) => ({\n paddingLeft: value,\n paddingRight: value,\n }),\n paddingY: (value: CSSProperties['padding']) => ({\n paddingTop: value,\n paddingBottom: value,\n }),\n marginX: (value: CSSProperties['margin']) => ({\n marginLeft: value,\n marginRight: value,\n }),\n marginY: (value: CSSProperties['margin']) => ({\n marginTop: value,\n marginBottom: value,\n }),\n square: (value: CSSProperties['width']) => ({\n width: value,\n height: value,\n }),\n _hover: (css: CSSProperties) => ({\n '&:hover, &[data-hovered]': css,\n }),\n}\n","/**\n * Commenting out due to performance problems\n * Please check the thread for more info:\n * https://miro.slack.com/archives/C03SJ1S209M/p1669821558087279\n */\n\nexport const media = {\n // reducedMotion: '(prefers-reduced-motion: reduce)',\n // motion: '(prefers-reduced-motion: no-preference)',\n // hover: '(any-hover: hover)',\n}\n","import { createStitches } from '@stitches/react'\nimport type * as CSSUtil from '@stitches/react/types/css-util'\n\nimport { utils, theme as defaultTheme, themeMap, media } from './config'\n\nconst stitches = createStitches({\n theme: defaultTheme,\n media,\n utils,\n themeMap,\n})\n\nexport const {\n config,\n createTheme,\n css,\n getCssText,\n globalCss,\n keyframes,\n prefix,\n styled,\n theme,\n} = stitches\n\nexport type FontFace = CSSUtil.Native.AtRule.FontFace\n\nexport const fontFace = (...fonts: FontFace[]): string =>\n globalCss({\n '@font-face': fonts,\n })()\n","import type { ConfigType } from '@stitches/react/types/config'\n\nimport { config } from './stitches'\n\nexport function setMedia<Media extends {} = {}>(\n media: ConfigType.Media<Media>\n): void {\n config.media = {\n ...config.media,\n ...media,\n }\n}\n\nexport function setCssUtils<Utils extends {} = {}>(\n utils: ConfigType.Utils<Utils>\n): void {\n config.utils = {\n ...config.utils,\n ...utils,\n }\n}\n","import React from 'react'\nimport type {\n CSSProperties,\n ComponentType,\n ElementRef,\n ElementType,\n ExoticComponent,\n ForwardRefExoticComponent,\n JSXElementConstructor,\n PropsWithoutRef,\n RefAttributes,\n} from 'react'\nimport type { RemoveIndex } from '@stitches/react/types/stitches'\nimport type { Token } from '@stitches/react/types/theme'\nimport type {\n StyledComponentProps as StitchesStyledComponentProps,\n $$StyledComponentMedia,\n $$StyledComponentProps,\n $$StyledComponentType,\n TransformProps,\n} from '@stitches/react/types/styled-component'\nimport type * as Util from '@stitches/react/types/util'\nimport type { OmitFromUnion } from '@mirohq/design-system-types'\n\nimport * as stitches from './stitches'\nimport type { CSS, StyledComponentProps, ForbiddenProps } from './types'\n\n// Error messages\n// -----------------------------------------------------------------------------\n\nexport const AS_ERROR =\n 'Polymorphism via `as` prop is not available in styled components.'\n\nexport const STYLING_ATTRS_ERROR =\n 'The `className` and `style` attributes are not avaialable in styled components.'\n\n// Utils\n// -----------------------------------------------------------------------------\n\nconst styleWithCssVars = (\n style: CSS,\n themeMap: typeof stitches.config.themeMap\n): CSSProperties =>\n (Object.entries(style) as Array<[string, unknown]>).reduce(\n (acc, [prop, value]) => {\n // @ts-expect-error\n const mapKeyForProp = themeMap[prop]\n const mapping = stitches.theme[mapKeyForProp] as unknown as {\n [Prop: string]: { [K in keyof Token]: Token[K] }\n }\n\n const parsedValue =\n typeof value === 'string' && /^\\$.+$/.test(value)\n ? mapping[value.replace('$', '')]?.computedValue\n : value\n\n return {\n ...acc,\n [prop]: parsedValue,\n }\n },\n {}\n ) as CSSProperties\n\n// Styled\n// -----------------------------------------------------------------------------\n\ntype Variants<T> = 'variants' extends keyof T\n ? {\n [Name in keyof T['variants']]?:\n | Util.Widen<keyof T['variants'][Name]>\n | Util.String\n }\n : Util.WideObject\n\ntype Styles<Composers> = Composers extends\n | string\n | ComponentType<any>\n | Util.Function\n ? Composers\n : RemoveIndex<CSS> & {\n variants?: {\n [Name in string]: {\n [Pair in number | string]: CSS\n }\n }\n compoundVariants?: Array<Variants<Composers> & { css: CSS }>\n defaultVariants?: Variants<Composers>\n } & CSS & {\n [K in keyof Composers]: K extends\n | 'compoundVariants'\n | 'defaultVariants'\n | 'variants'\n ? unknown\n : K extends keyof CSS\n ? CSS[K]\n : unknown\n }\n\n// This interface is only needed to fix TS4023\nexport interface StitchesInternals<\n Type extends\n | keyof JSX.IntrinsicElements\n | React.ComponentType<any>\n | Util.Function,\n Props extends {},\n Media extends typeof stitches.config.media\n> {\n className: string\n selector: string\n [$$StyledComponentType]: Type\n [$$StyledComponentProps]: Props\n [$$StyledComponentMedia]: Media\n}\n\nexport interface CustomStylesProps {\n css?: CSS\n UNSAFE_style?: CSS\n}\n\n// TS is infering the return type correctly, no need to make things uglier here\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const styled = <\n Element extends\n | keyof JSX.IntrinsicElements\n | React.ComponentType<any>\n | Util.Function = 'span',\n Composers extends\n | string\n | ExoticComponent<any>\n | JSXElementConstructor<any>\n | Util.Function\n | { [name: string]: unknown } = {}\n>(\n element: Element,\n composers?: Styles<Composers>\n) => {\n const StyledComponent = stitches.styled(element, composers ?? {})\n\n type __Element = Element extends ElementType ? Element : any\n type StyledElementRef = ElementRef<__Element>\n type StitchesProps = StitchesStyledComponentProps<[Composers]>\n type VariantProps = TransformProps<\n StitchesProps,\n typeof stitches.config.media\n >\n type ComponentProps = StyledComponentProps<__Element>\n\n type Props = OmitFromUnion<ComponentProps, keyof VariantProps> &\n VariantProps &\n CustomStylesProps\n\n const Component = React.forwardRef<StyledElementRef, Props>(\n (props, forwardRef) => {\n const {\n as,\n className,\n style,\n UNSAFE_style, // eslint-disable-line @typescript-eslint/naming-convention\n ...restProps\n } = props as Props & {\n [K in ForbiddenProps]?: unknown\n }\n\n // based on https://github.com/modulz/stitches/blob/v1.2.8/packages/core/src/features/css.js#L71\n const onlyStyledClasses =\n typeof className === 'string'\n ? className\n ?.split(' ')\n .filter((x: string) => x.match(`${stitches.prefix}c-.+`))\n .join(' ')\n : ''\n\n const parsedStyle =\n UNSAFE_style !== undefined\n ? styleWithCssVars(UNSAFE_style, stitches.config.themeMap)\n : onlyStyledClasses !== ''\n ? style\n : undefined\n\n if (\n (className !== undefined && onlyStyledClasses !== className) ||\n (typeof style === 'object' &&\n style !== null &&\n Object.keys(style).length > 0 &&\n onlyStyledClasses === '')\n ) {\n console.error(STYLING_ATTRS_ERROR)\n }\n\n if (as !== undefined) {\n console.error(AS_ERROR)\n }\n\n return (\n <StyledComponent\n {...(restProps as any)}\n className={onlyStyledClasses}\n style={parsedStyle}\n ref={forwardRef}\n />\n )\n }\n ) as ForwardRefExoticComponent<\n PropsWithoutRef<Props> & RefAttributes<StyledElementRef>\n > &\n StitchesInternals<Element, StitchesProps, typeof stitches.config.media>\n\n Component.displayName = 'Styled.ForwardRef'\n Component.toString = StyledComponent.toString\n Component.className = StyledComponent.className\n Component.selector = StyledComponent.selector\n\n return Component\n}\n","import { prefix, theme as stitchesTheme } from './stitches'\n\nexport * from './types'\n\nexport {\n createTheme,\n css,\n getCssText,\n globalCss,\n keyframes,\n fontFace,\n} from './stitches'\n\nexport type { FontFace } from './stitches'\n\nexport const stitchesCssRoot = {\n prefix,\n selector: stitchesTheme.selector,\n className: stitchesTheme.className,\n}\n\nexport { theme, themeMap } from './config'\nexport type { Theme, ThemeMap } from './config'\n\nexport * from './custom'\nexport * from './styled'\n"],"names":["theme","defaultTheme","styled","stitches.theme","stitches.styled","stitches.prefix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AAA;AAEN,MAAA,IACG,cAAc,MAAA,IAAa,iBAAA,KAAsB,SAAA,IACjD,OAAO,UAAU,QAAA,IAChB,KAAA,KAAU,IAAA,IACV,MAAA,CAAO,KAAK,KAAK,CAAA,CAAE,MAAA,GAAS,CAAA,IAC5B,sBAAsB,EAAA,EACxB;AACA,QAAA,OAAA,CAAQ,MAAM,mBAAmB,CAAA;AAAA,MACnC;AAEA,MAAA,IAAI,OAAO,MAAA,EAAW;AACpB,QAAA,OAAA,CAAQ,MAAM,QAAQ,CAAA;AAAA,MACxB;AAEA,MAAA,uBACE,GAAA;AAAA,QAAC,eAAA;AAAA,QAAA;AAAA,UACE,GAAI,SAAA;AAAA,UACL,SAAA,EAAW,iBAAA;AAAA,UACX,KAAA,EAAO,WAAA;AAAA,UACP,GAAA,EAAK;AAAA;AAAA,OACP;AAAA,IAEJ;AAAA,GACF;AAKA,EAAA,SAAA,CAAU,WAAA,GAAc,mBAAA;AACxB,EAAA,SAAA,CAAU,WAAW,eAAA,CAAgB,QAAA;AACrC,EAAA,SAAA,CAAU,YAAY,eAAA,CAAgB,SAAA;AACtC,EAAA,SAAA,CAAU,WAAW,eAAA,CAAgB,QAAA;AAErC,EAAA,OAAO,SAAA;AACT;;ACvMO,MAAM,eAAA,GAAkB;AAAA,EAC7B,MAAA;AAAA,EACA,UAAUC,KAAA,CAAc,QAAA;AAAA,EACxB,WAAWA,KAAA,CAAc;AAC3B;;;;"}
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { ElementType, ComponentPropsWithRef, ExoticComponent, JSXElementConstructor, ComponentType } from 'react';
3
3
  import { CSS as CSS$2, VariantProps } from '@stitches/react';
4
- import { OnlyHTMLAttributes, ExtractValidKeys } from '@mirohq/design-system-types';
4
+ import { OmitFromUnion, OnlyHTMLAttributes, ExtractValidKeys } from '@mirohq/design-system-types';
5
5
  import * as _mirohq_design_system_themes_web from '@mirohq/design-tokens';
6
6
  import * as _mirohq_design_system_themes from '@mirohq/design-system-themes';
7
7
  import { Theme as Theme$1 } from '@mirohq/design-system-themes';
@@ -12736,7 +12736,7 @@ declare const fontFace: (...fonts: FontFace[]) => string;
12736
12736
 
12737
12737
  type ForbiddenProps = 'className' | 'style' | 'as';
12738
12738
  type AllowedProps = 'css' | 'asChild' | 'UNSAFE_style' | 'children';
12739
- type SafeProps<T> = Omit<T, ForbiddenProps>;
12739
+ type SafeProps<T> = OmitFromUnion<T, ForbiddenProps>;
12740
12740
  type CSS = CSS$2<typeof config>;
12741
12741
  /**
12742
12742
  * Build a type with all props from a element and Stitches CSS keys
@@ -13762,7 +13762,7 @@ interface CustomStylesProps {
13762
13762
  }
13763
13763
  declare const styled: <Element extends keyof JSX.IntrinsicElements | React__default.ComponentType<any> | Function = "span", Composers extends string | ExoticComponent<any> | JSXElementConstructor<any> | Function | {
13764
13764
  [name: string]: unknown;
13765
- } = {}>(element: Element, composers?: Styles<Composers>) => React__default.ForwardRefExoticComponent<React__default.PropsWithoutRef<Omit<StyledComponentProps<Element extends React__default.ElementType ? Element : any>, keyof StyledComponentProps$1<[Composers]>> & TransformProps<StyledComponentProps$1<[Composers]>, {}> & CustomStylesProps> & React__default.RefAttributes<React__default.ElementRef<Element extends React__default.ElementType ? Element : any>>> & StitchesInternals<Element, StyledComponentProps$1<[Composers]>, {}>;
13765
+ } = {}>(element: Element, composers?: Styles<Composers>) => React__default.ForwardRefExoticComponent<React__default.PropsWithoutRef<OmitFromUnion<StyledComponentProps<Element extends React__default.ElementType ? Element : any>, keyof StyledComponentProps$1<[Composers]>> & TransformProps<StyledComponentProps$1<[Composers]>, {}> & CustomStylesProps> & React__default.RefAttributes<React__default.ElementRef<Element extends React__default.ElementType ? Element : any>>> & StitchesInternals<Element, StyledComponentProps$1<[Composers]>, {}>;
13766
13766
 
13767
13767
  declare const stitchesCssRoot: {
13768
13768
  prefix: "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirohq/design-system-stitches",
3
- "version": "3.2.0-fix-stitches-types.2",
3
+ "version": "3.2.0",
4
4
  "description": "",
5
5
  "author": "Miro",
6
6
  "source": "src/index.ts",
@@ -28,8 +28,8 @@
28
28
  "dependencies": {
29
29
  "lodash.merge": "^4.6.2",
30
30
  "@mirohq/design-system-themes": "^1.1.1",
31
- "@mirohq/design-system-types": "^1.0.1",
32
- "@mirohq/design-tokens": "^7.0.1"
31
+ "@mirohq/design-tokens": "^7.0.1",
32
+ "@mirohq/design-system-types": "^1.0.1"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/lodash.merge": "^4.6.7"