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

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 { PropertyValue, CSSProperties } from '@stitches/react'\n\nexport const utils = {\n paddingX: (value: PropertyValue<'padding'>) => ({\n paddingLeft: value,\n paddingRight: value,\n }),\n paddingY: (value: PropertyValue<'padding'>) => ({\n paddingTop: value,\n paddingBottom: value,\n }),\n marginX: (value: PropertyValue<'margin'>) => ({\n marginLeft: value,\n marginRight: value,\n }),\n marginY: (value: PropertyValue<'margin'>) => ({\n marginTop: value,\n marginBottom: value,\n }),\n square: (value: PropertyValue<'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.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,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;AAAA,EACjB,YAAA,EAAc,OAAA;AAAA,EACd,WAAA,EAAa,QAAA;AAAA,EACb,gBAAA,EAAkB,QAAA;AAAA,EAClB,gBAAA,EAAkB,eAAA;AAAA,EAClB,gBAAA,EAAkB,eAAA;AAAA,EAClB,aAAA,EAAe,OAAA;AAAA,EACf,WAAA,EAAa,eAAA;AAAA,EACb,SAAA,EAAW,QAAA;AAAA,EACX,cAAA,EAAgB,QAAA;AAAA,EAChB,mBAAA,EAAqB,OAAA;AAAA,EACrB,oBAAA,EAAsB,OAAA;AAAA,EACtB,cAAA,EAAgB,eAAA;AAAA,EAChB,cAAA,E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AAA,GACb,gBAAA,CAAiB,YAAA,EAAcC,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'\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.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,QAAA;AAA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,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 +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 { PropertyValue, CSSProperties } from '@stitches/react'\n\nexport const utils = {\n paddingX: (value: PropertyValue<'padding'>) => ({\n paddingLeft: value,\n paddingRight: value,\n }),\n paddingY: (value: PropertyValue<'padding'>) => ({\n paddingTop: value,\n paddingBottom: value,\n }),\n marginX: (value: PropertyValue<'margin'>) => ({\n marginLeft: value,\n marginRight: value,\n }),\n marginY: (value: PropertyValue<'margin'>) => ({\n marginTop: value,\n marginBottom: value,\n }),\n square: (value: PropertyValue<'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,EA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A;AACT;;ACtMO,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'\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":";;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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;;ACtMO,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,10 +1,180 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { ElementType, ComponentPropsWithRef, ExoticComponent, JSXElementConstructor, ComponentType } from 'react';
3
+ import { CSS as CSS$2, VariantProps } from '@stitches/react';
3
4
  import { OnlyHTMLAttributes, ExtractValidKeys } from '@mirohq/design-system-types';
4
- import * as _mirohq_design_system_themes_web from '@mirohq/design-system-themes/web';
5
+ import * as _mirohq_design_system_themes_web from '@mirohq/design-tokens';
5
6
  import * as _mirohq_design_system_themes from '@mirohq/design-system-themes';
6
7
  import { Theme as Theme$1 } from '@mirohq/design-system-themes';
7
8
 
9
+ interface ScaleValue {
10
+ token: number | string
11
+ value: number | string
12
+ scale: string
13
+ prefix: string
14
+ }
15
+
16
+ interface Token<
17
+ /** Token name. */
18
+ NameType extends number | string = string,
19
+
20
+ /** Token value. */
21
+ ValueType extends number | string = string,
22
+
23
+ /** Token scale. */
24
+ ScaleType extends string | void = void,
25
+
26
+ /** Token prefix. */
27
+ PrefixType extends string | void = void,
28
+ > extends ScaleValue {
29
+ new (name: NameType, value: ValueType, scale?: ScaleType, prefix?: PrefixType): this
30
+
31
+ /** Name of the token. */
32
+ token: NameType
33
+
34
+ /** Value of the token. */
35
+ value: ValueType
36
+
37
+ /** Category of interface the token applies to. */
38
+ scale: ScaleType extends string ? ScaleType : ''
39
+
40
+ /** Prefix added before the serialized custom property. */
41
+ prefix: PrefixType extends string ? PrefixType : ''
42
+
43
+ /** Serialized custom property representing the token. */
44
+ variable: `--${this['prefix'] extends '' ? '' : `${this['prefix']}-`}${this['scale'] extends '' ? '' : `${this['scale']}-`}${this['token']}`
45
+
46
+ /** Serialized CSS var() representing the token. */
47
+ computedValue: `var(${this['variable']})`
48
+
49
+ /** Returns a serialized CSS var() representing the token. */
50
+ toString(): this['computedValue']
51
+ }
52
+
53
+ /* Utilities */
54
+ /* ========================================================================== */
55
+
56
+ /** Returns a string with the given prefix followed by the given values. */
57
+ type Prefixed<K extends string, T> = `${K}${Extract<T, boolean | number | string>}`
58
+
59
+ /** Returns a widened value from the given value. */
60
+ type Widen<T> =
61
+ T extends number
62
+ ? `${T}` | T
63
+ : T extends 'true'
64
+ ? boolean | T
65
+ : T extends 'false'
66
+ ? boolean | T
67
+ : T extends `${number}`
68
+ ? number | T
69
+ : T
70
+
71
+ /** Narrowed string. */
72
+ type String = string & Record<never, never>
73
+
74
+ /** Narrowed number or string. */
75
+ type Index = (number | string) & Record<never, never>
76
+
77
+ /** Narrowed function. */
78
+ type Function = (...args: any[]) => unknown
79
+
80
+ /** Widened object. */
81
+ type WideObject = { [name in number | string]: boolean | number | string | undefined | WideObject }
82
+
83
+ /** Returns a new CSS Component. */
84
+ interface CssComponent<
85
+ Type = 'span',
86
+ Props = {},
87
+ Media = {},
88
+ CSS = {}
89
+ > {
90
+ (
91
+ props?:
92
+ & TransformProps<Props, Media>
93
+ & {
94
+ css?: CSS
95
+ }
96
+ & {
97
+ [name in number | string]: any
98
+ }
99
+ ): string & {
100
+ className: string
101
+ selector: string
102
+ props: {}
103
+ }
104
+
105
+ className: string
106
+ selector: string
107
+
108
+ [$$StyledComponentType]: Type
109
+ [$$StyledComponentProps]: Props
110
+ [$$StyledComponentMedia]: Media
111
+ }
112
+
113
+ type TransformProps<Props, Media> = {
114
+ [K in keyof Props]: (
115
+ | Props[K]
116
+ | (
117
+ & {
118
+ [KMedia in Prefixed<'@', 'initial' | keyof Media>]?: Props[K]
119
+ }
120
+ & {
121
+ [KMedia in string]: Props[K]
122
+ }
123
+ )
124
+ )
125
+ }
126
+
127
+ /** Unique symbol used to reference the type of a Styled Component. */
128
+ declare const $$StyledComponentType: unique symbol
129
+
130
+ /** Unique symbol used to reference the type of a Styled Component. */
131
+ type $$StyledComponentType = typeof $$StyledComponentType
132
+
133
+ /** Unique symbol used to reference the props of a Styled Component. */
134
+ declare const $$StyledComponentProps: unique symbol
135
+
136
+ /** Unique symbol used to reference the props of a Styled Component. */
137
+ type $$StyledComponentProps = typeof $$StyledComponentProps
138
+
139
+ /** Unique symbol used to reference the media passed into a Styled Component. */
140
+ declare const $$StyledComponentMedia: unique symbol
141
+
142
+ /** Unique symbol used to reference the media passed into a Styled Component. */
143
+ type $$StyledComponentMedia = typeof $$StyledComponentMedia
144
+
145
+ /** Returns the first Styled Component type from the given array of compositions. */
146
+ type StyledComponentType<T extends any[]> = (
147
+ T[0] extends never
148
+ ? 'span'
149
+ : T[0] extends string
150
+ ? T[0]
151
+ : T[0] extends (props: any) => any
152
+ ? T[0]
153
+ : T[0] extends { [$$StyledComponentType]: unknown }
154
+ ? T[0][$$StyledComponentType]
155
+ : T extends [lead: any, ...tail: infer V]
156
+ ? StyledComponentType<V>
157
+ : never
158
+ )
159
+
160
+ /** Returns the cumulative variants from the given array of compositions. */
161
+ type StyledComponentProps$1<T extends any[]> = (
162
+ & (
163
+ $$StyledComponentProps extends keyof T[0]
164
+ ? T[0][$$StyledComponentProps]
165
+ : T[0] extends { variants: { [name: string]: unknown } }
166
+ ? {
167
+ [K in keyof T[0]['variants']]?: Widen<keyof T[0]['variants'][K]>
168
+ }
169
+ : {}
170
+ )
171
+ & (
172
+ T extends [lead: any, ...tail: infer V]
173
+ ? StyledComponentProps$1<V>
174
+ : {}
175
+ )
176
+ )
177
+
8
178
  /** @license MIT License
9
179
  * Copyright (c) 2017-present, Fredrik Nicol
10
180
  * Copyright (c) 2021-present, Jonathan Neal
@@ -5827,80 +5997,6 @@ interface DefaultThemeMap {
5827
5997
  zIndex: 'zIndices'
5828
5998
  }
5829
5999
 
5830
- interface ScaleValue {
5831
- token: number | string
5832
- value: number | string
5833
- scale: string
5834
- prefix: string
5835
- }
5836
-
5837
- interface Token<
5838
- /** Token name. */
5839
- NameType extends number | string = string,
5840
-
5841
- /** Token value. */
5842
- ValueType extends number | string = string,
5843
-
5844
- /** Token scale. */
5845
- ScaleType extends string | void = void,
5846
-
5847
- /** Token prefix. */
5848
- PrefixType extends string | void = void,
5849
- > extends ScaleValue {
5850
- new (name: NameType, value: ValueType, scale?: ScaleType, prefix?: PrefixType): this
5851
-
5852
- /** Name of the token. */
5853
- token: NameType
5854
-
5855
- /** Value of the token. */
5856
- value: ValueType
5857
-
5858
- /** Category of interface the token applies to. */
5859
- scale: ScaleType extends string ? ScaleType : ''
5860
-
5861
- /** Prefix added before the serialized custom property. */
5862
- prefix: PrefixType extends string ? PrefixType : ''
5863
-
5864
- /** Serialized custom property representing the token. */
5865
- variable: `--${this['prefix'] extends '' ? '' : `${this['prefix']}-`}${this['scale'] extends '' ? '' : `${this['scale']}-`}${this['token']}`
5866
-
5867
- /** Serialized CSS var() representing the token. */
5868
- computedValue: `var(${this['variable']})`
5869
-
5870
- /** Returns a serialized CSS var() representing the token. */
5871
- toString(): this['computedValue']
5872
- }
5873
-
5874
- /* Utilities */
5875
- /* ========================================================================== */
5876
-
5877
- /** Returns a string with the given prefix followed by the given values. */
5878
- type Prefixed<K extends string, T> = `${K}${Extract<T, boolean | number | string>}`
5879
-
5880
- /** Returns a widened value from the given value. */
5881
- type Widen<T> =
5882
- T extends number
5883
- ? `${T}` | T
5884
- : T extends 'true'
5885
- ? boolean | T
5886
- : T extends 'false'
5887
- ? boolean | T
5888
- : T extends `${number}`
5889
- ? number | T
5890
- : T
5891
-
5892
- /** Narrowed string. */
5893
- type String = string & Record<never, never>
5894
-
5895
- /** Narrowed number or string. */
5896
- type Index = (number | string) & Record<never, never>
5897
-
5898
- /** Narrowed function. */
5899
- type Function = (...args: any[]) => unknown
5900
-
5901
- /** Widened object. */
5902
- type WideObject = { [name in number | string]: boolean | number | string | undefined | WideObject }
5903
-
5904
6000
  /** CSS style declaration object. */
5905
6001
  interface CSSProperties$1 extends StandardLonghandProperties, StandardShorthandProperties, SvgProperties {}
5906
6002
 
@@ -5911,7 +6007,7 @@ type TokenByPropertyName<PropertyName, Theme, ThemeMap> = PropertyName extends k
5911
6007
  type TokenByScaleName<ScaleName, Theme> = ScaleName extends keyof Theme ? Prefixed<'$', keyof Theme[ScaleName]> : never
5912
6008
 
5913
6009
  /** Returns a Style interface, leveraging the given media and style map. */
5914
- type CSS$2<
6010
+ type CSS$1<
5915
6011
  Media = {},
5916
6012
  Theme = {},
5917
6013
  ThemeMap = DefaultThemeMap,
@@ -5919,7 +6015,7 @@ type CSS$2<
5919
6015
  > = (
5920
6016
  // nested at-rule css styles
5921
6017
  & {
5922
- [K in Prefixed<'@', keyof Media>]?: CSS$2<Media, Theme, ThemeMap, Utils>
6018
+ [K in Prefixed<'@', keyof Media>]?: CSS$1<Media, Theme, ThemeMap, Utils>
5923
6019
  }
5924
6020
  // known property styles
5925
6021
  & {
@@ -6010,106 +6106,6 @@ declare const $$ScaleValue: unique symbol
6010
6106
  /** Unique symbol used to reference a token value. */
6011
6107
  type $$ScaleValue = typeof $$ScaleValue
6012
6108
 
6013
- // https://github.com/microsoft/TypeScript/issues/50720#issuecomment-1367227930
6014
- type WithPropertyValue<T> = {
6015
- readonly [K in $$PropertyValue]: T
6016
- }
6017
-
6018
- /** Returns a new CSS Component. */
6019
- interface CssComponent<
6020
- Type = 'span',
6021
- Props = {},
6022
- Media = {},
6023
- CSS = {}
6024
- > {
6025
- (
6026
- props?:
6027
- & TransformProps<Props, Media>
6028
- & {
6029
- css?: CSS
6030
- }
6031
- & {
6032
- [name in number | string]: any
6033
- }
6034
- ): string & {
6035
- className: string
6036
- selector: string
6037
- props: {}
6038
- }
6039
-
6040
- className: string
6041
- selector: string
6042
-
6043
- [$$StyledComponentType]: Type
6044
- [$$StyledComponentProps]: Props
6045
- [$$StyledComponentMedia]: Media
6046
- }
6047
-
6048
- type TransformProps<Props, Media> = {
6049
- [K in keyof Props]: (
6050
- | Props[K]
6051
- | (
6052
- & {
6053
- [KMedia in Prefixed<'@', 'initial' | keyof Media>]?: Props[K]
6054
- }
6055
- & {
6056
- [KMedia in string]: Props[K]
6057
- }
6058
- )
6059
- )
6060
- }
6061
-
6062
- /** Unique symbol used to reference the type of a Styled Component. */
6063
- declare const $$StyledComponentType: unique symbol
6064
-
6065
- /** Unique symbol used to reference the type of a Styled Component. */
6066
- type $$StyledComponentType = typeof $$StyledComponentType
6067
-
6068
- /** Unique symbol used to reference the props of a Styled Component. */
6069
- declare const $$StyledComponentProps: unique symbol
6070
-
6071
- /** Unique symbol used to reference the props of a Styled Component. */
6072
- type $$StyledComponentProps = typeof $$StyledComponentProps
6073
-
6074
- /** Unique symbol used to reference the media passed into a Styled Component. */
6075
- declare const $$StyledComponentMedia: unique symbol
6076
-
6077
- /** Unique symbol used to reference the media passed into a Styled Component. */
6078
- type $$StyledComponentMedia = typeof $$StyledComponentMedia
6079
-
6080
- /** Returns the first Styled Component type from the given array of compositions. */
6081
- type StyledComponentType<T extends any[]> = (
6082
- T[0] extends never
6083
- ? 'span'
6084
- : T[0] extends string
6085
- ? T[0]
6086
- : T[0] extends (props: any) => any
6087
- ? T[0]
6088
- : T[0] extends { [$$StyledComponentType]: unknown }
6089
- ? T[0][$$StyledComponentType]
6090
- : T extends [lead: any, ...tail: infer V]
6091
- ? StyledComponentType<V>
6092
- : never
6093
- )
6094
-
6095
- /** Returns the cumulative variants from the given array of compositions. */
6096
- type StyledComponentProps$1<T extends any[]> = (
6097
- & (
6098
- $$StyledComponentProps extends keyof T[0]
6099
- ? T[0][$$StyledComponentProps]
6100
- : T[0] extends { variants: { [name: string]: unknown } }
6101
- ? {
6102
- [K in keyof T[0]['variants']]?: Widen<keyof T[0]['variants'][K]>
6103
- }
6104
- : {}
6105
- )
6106
- & (
6107
- T extends [lead: any, ...tail: infer V]
6108
- ? StyledComponentProps$1<V>
6109
- : {}
6110
- )
6111
- )
6112
-
6113
6109
  /** Remove an index signature from a type */
6114
6110
  type RemoveIndex<T> = {[k in keyof T as string extends k ? never : number extends k ? never : k]: T[k]}
6115
6111
 
@@ -6126,43 +6122,6 @@ type ThemeTokens<Values, Prefix> = {
6126
6122
 
6127
6123
  type CSSProperties = CSSProperties$1
6128
6124
 
6129
- /** Returns a Style interface from a configuration, leveraging the given media and style map. */
6130
- type CSS$1<
6131
- Config extends {
6132
- media?: {}
6133
- theme?: {}
6134
- themeMap?: {}
6135
- utils?: {}
6136
- } = {
6137
- media: {},
6138
- theme: {},
6139
- themeMap: {},
6140
- utils: {}
6141
- }
6142
- > = CSS$2<
6143
- Config['media'],
6144
- Config['theme'],
6145
- Config['themeMap'],
6146
- Config['utils']
6147
- >
6148
-
6149
- /** Returns a type that expects a value to be a kind of CSS property value. */
6150
- type PropertyValue<Property extends keyof CSSProperties$1, Config = null> = (
6151
- Config extends null
6152
- ? WithPropertyValue<Property>
6153
- : Config extends { [K: string]: any }
6154
- ? CSS$2<
6155
- Config['media'],
6156
- Config['theme'],
6157
- Config['themeMap'],
6158
- Config['utils']
6159
- >[Property]
6160
- : never
6161
- )
6162
-
6163
- /** Returns a type that suggests variants from a component as possible prop values. */
6164
- type VariantProps<Component extends {[key: symbol | string]: any}> = TransformProps<Component[$$StyledComponentProps], Component[$$StyledComponentMedia]>
6165
-
6166
6125
  declare const config: {
6167
6126
  prefix: "";
6168
6127
  media: {};
@@ -7126,25 +7085,25 @@ declare const config: {
7126
7085
  readonly zIndex: "z-indices";
7127
7086
  };
7128
7087
  utils: {
7129
- paddingX: (value: PropertyValue<"padding">) => {
7130
- paddingLeft: WithPropertyValue<"padding">;
7131
- paddingRight: WithPropertyValue<"padding">;
7088
+ paddingX: (value: CSSProperties["padding"]) => {
7089
+ paddingLeft: OnlyStringNumeric | undefined;
7090
+ paddingRight: OnlyStringNumeric | undefined;
7132
7091
  };
7133
- paddingY: (value: PropertyValue<"padding">) => {
7134
- paddingTop: WithPropertyValue<"padding">;
7135
- paddingBottom: WithPropertyValue<"padding">;
7092
+ paddingY: (value: CSSProperties["padding"]) => {
7093
+ paddingTop: OnlyStringNumeric | undefined;
7094
+ paddingBottom: OnlyStringNumeric | undefined;
7136
7095
  };
7137
- marginX: (value: PropertyValue<"margin">) => {
7138
- marginLeft: WithPropertyValue<"margin">;
7139
- marginRight: WithPropertyValue<"margin">;
7096
+ marginX: (value: CSSProperties["margin"]) => {
7097
+ marginLeft: Property.Margin | undefined;
7098
+ marginRight: Property.Margin | undefined;
7140
7099
  };
7141
- marginY: (value: PropertyValue<"margin">) => {
7142
- marginTop: WithPropertyValue<"margin">;
7143
- marginBottom: WithPropertyValue<"margin">;
7100
+ marginY: (value: CSSProperties["margin"]) => {
7101
+ marginTop: Property.Margin | undefined;
7102
+ marginBottom: Property.Margin | undefined;
7144
7103
  };
7145
- square: (value: PropertyValue<"width">) => {
7146
- width: WithPropertyValue<"width">;
7147
- height: WithPropertyValue<"width">;
7104
+ square: (value: CSSProperties["width"]) => {
7105
+ width: Property.Width | undefined;
7106
+ height: Property.Width | undefined;
7148
7107
  };
7149
7108
  _hover: (css: CSSProperties) => {
7150
7109
  '&:hover, &[data-hovered]': CSSProperties$1;
@@ -8819,7 +8778,7 @@ declare const createTheme: <Argument0 extends string | ({
8819
8778
  } & (Argument0 extends string ? ThemeTokens<Argument1, ""> : ThemeTokens<Argument0, "">);
8820
8779
  declare const css: <Composers extends (string | React.ExoticComponent<any> | React.JSXElementConstructor<any> | Function | {
8821
8780
  [name: string]: unknown;
8822
- })[], CSS = CSS$2<{}, {
8781
+ })[], CSS = CSS$1<{}, {
8823
8782
  'border-widths': {
8824
8783
  readonly none: 0;
8825
8784
  readonly sm: "1px";
@@ -9777,25 +9736,25 @@ declare const css: <Composers extends (string | React.ExoticComponent<any> | Rea
9777
9736
  readonly width: "sizes";
9778
9737
  readonly zIndex: "z-indices";
9779
9738
  }, {
9780
- paddingX: (value: PropertyValue<"padding">) => {
9781
- paddingLeft: WithPropertyValue<"padding">;
9782
- paddingRight: WithPropertyValue<"padding">;
9739
+ paddingX: (value: CSSProperties["padding"]) => {
9740
+ paddingLeft: OnlyStringNumeric | undefined;
9741
+ paddingRight: OnlyStringNumeric | undefined;
9783
9742
  };
9784
- paddingY: (value: PropertyValue<"padding">) => {
9785
- paddingTop: WithPropertyValue<"padding">;
9786
- paddingBottom: WithPropertyValue<"padding">;
9743
+ paddingY: (value: CSSProperties["padding"]) => {
9744
+ paddingTop: OnlyStringNumeric | undefined;
9745
+ paddingBottom: OnlyStringNumeric | undefined;
9787
9746
  };
9788
- marginX: (value: PropertyValue<"margin">) => {
9789
- marginLeft: WithPropertyValue<"margin">;
9790
- marginRight: WithPropertyValue<"margin">;
9747
+ marginX: (value: CSSProperties["margin"]) => {
9748
+ marginLeft: Property.Margin | undefined;
9749
+ marginRight: Property.Margin | undefined;
9791
9750
  };
9792
- marginY: (value: PropertyValue<"margin">) => {
9793
- marginTop: WithPropertyValue<"margin">;
9794
- marginBottom: WithPropertyValue<"margin">;
9751
+ marginY: (value: CSSProperties["margin"]) => {
9752
+ marginTop: Property.Margin | undefined;
9753
+ marginBottom: Property.Margin | undefined;
9795
9754
  };
9796
- square: (value: PropertyValue<"width">) => {
9797
- width: WithPropertyValue<"width">;
9798
- height: WithPropertyValue<"width">;
9755
+ square: (value: CSSProperties["width"]) => {
9756
+ width: Property.Width | undefined;
9757
+ height: Property.Width | undefined;
9799
9758
  };
9800
9759
  _hover: (css: CSSProperties) => {
9801
9760
  '&:hover, &[data-hovered]': CSSProperties$1;
@@ -9819,7 +9778,7 @@ declare const globalCss: <Styles extends {
9819
9778
  '@import'?: unknown;
9820
9779
  '@font-face'?: unknown;
9821
9780
  } & { [K in keyof Styles]: K extends "@import" ? string | string[] : K extends "@font-face" ? AtRule.FontFace | AtRule.FontFace[] : K extends `@keyframes ${string}` ? {
9822
- [x: string]: CSS$2<{}, {
9781
+ [x: string]: CSS$1<{}, {
9823
9782
  'border-widths': {
9824
9783
  readonly none: 0;
9825
9784
  readonly sm: "1px";
@@ -10777,31 +10736,31 @@ declare const globalCss: <Styles extends {
10777
10736
  readonly width: "sizes";
10778
10737
  readonly zIndex: "z-indices";
10779
10738
  }, {
10780
- paddingX: (value: PropertyValue<"padding">) => {
10781
- paddingLeft: WithPropertyValue<"padding">;
10782
- paddingRight: WithPropertyValue<"padding">;
10739
+ paddingX: (value: CSSProperties["padding"]) => {
10740
+ paddingLeft: OnlyStringNumeric | undefined;
10741
+ paddingRight: OnlyStringNumeric | undefined;
10783
10742
  };
10784
- paddingY: (value: PropertyValue<"padding">) => {
10785
- paddingTop: WithPropertyValue<"padding">;
10786
- paddingBottom: WithPropertyValue<"padding">;
10743
+ paddingY: (value: CSSProperties["padding"]) => {
10744
+ paddingTop: OnlyStringNumeric | undefined;
10745
+ paddingBottom: OnlyStringNumeric | undefined;
10787
10746
  };
10788
- marginX: (value: PropertyValue<"margin">) => {
10789
- marginLeft: WithPropertyValue<"margin">;
10790
- marginRight: WithPropertyValue<"margin">;
10747
+ marginX: (value: CSSProperties["margin"]) => {
10748
+ marginLeft: Property.Margin | undefined;
10749
+ marginRight: Property.Margin | undefined;
10791
10750
  };
10792
- marginY: (value: PropertyValue<"margin">) => {
10793
- marginTop: WithPropertyValue<"margin">;
10794
- marginBottom: WithPropertyValue<"margin">;
10751
+ marginY: (value: CSSProperties["margin"]) => {
10752
+ marginTop: Property.Margin | undefined;
10753
+ marginBottom: Property.Margin | undefined;
10795
10754
  };
10796
- square: (value: PropertyValue<"width">) => {
10797
- width: WithPropertyValue<"width">;
10798
- height: WithPropertyValue<"width">;
10755
+ square: (value: CSSProperties["width"]) => {
10756
+ width: Property.Width | undefined;
10757
+ height: Property.Width | undefined;
10799
10758
  };
10800
10759
  _hover: (css: CSSProperties) => {
10801
10760
  '&:hover, &[data-hovered]': CSSProperties$1;
10802
10761
  };
10803
10762
  }>;
10804
- } : K extends `@property ${string}` ? AtRule.Property : CSS$2<{}, {
10763
+ } : K extends `@property ${string}` ? AtRule.Property : CSS$1<{}, {
10805
10764
  'border-widths': {
10806
10765
  readonly none: 0;
10807
10766
  readonly sm: "1px";
@@ -11759,25 +11718,25 @@ declare const globalCss: <Styles extends {
11759
11718
  readonly width: "sizes";
11760
11719
  readonly zIndex: "z-indices";
11761
11720
  }, {
11762
- paddingX: (value: PropertyValue<"padding">) => {
11763
- paddingLeft: WithPropertyValue<"padding">;
11764
- paddingRight: WithPropertyValue<"padding">;
11721
+ paddingX: (value: CSSProperties["padding"]) => {
11722
+ paddingLeft: OnlyStringNumeric | undefined;
11723
+ paddingRight: OnlyStringNumeric | undefined;
11765
11724
  };
11766
- paddingY: (value: PropertyValue<"padding">) => {
11767
- paddingTop: WithPropertyValue<"padding">;
11768
- paddingBottom: WithPropertyValue<"padding">;
11725
+ paddingY: (value: CSSProperties["padding"]) => {
11726
+ paddingTop: OnlyStringNumeric | undefined;
11727
+ paddingBottom: OnlyStringNumeric | undefined;
11769
11728
  };
11770
- marginX: (value: PropertyValue<"margin">) => {
11771
- marginLeft: WithPropertyValue<"margin">;
11772
- marginRight: WithPropertyValue<"margin">;
11729
+ marginX: (value: CSSProperties["margin"]) => {
11730
+ marginLeft: Property.Margin | undefined;
11731
+ marginRight: Property.Margin | undefined;
11773
11732
  };
11774
- marginY: (value: PropertyValue<"margin">) => {
11775
- marginTop: WithPropertyValue<"margin">;
11776
- marginBottom: WithPropertyValue<"margin">;
11733
+ marginY: (value: CSSProperties["margin"]) => {
11734
+ marginTop: Property.Margin | undefined;
11735
+ marginBottom: Property.Margin | undefined;
11777
11736
  };
11778
- square: (value: PropertyValue<"width">) => {
11779
- width: WithPropertyValue<"width">;
11780
- height: WithPropertyValue<"width">;
11737
+ square: (value: CSSProperties["width"]) => {
11738
+ width: Property.Width | undefined;
11739
+ height: Property.Width | undefined;
11781
11740
  };
11782
11741
  _hover: (css: CSSProperties) => {
11783
11742
  '&:hover, &[data-hovered]': CSSProperties$1;
@@ -11786,7 +11745,7 @@ declare const globalCss: <Styles extends {
11786
11745
  (): string;
11787
11746
  };
11788
11747
  declare const keyframes: (style: {
11789
- [offset: string]: CSS$2<{}, {
11748
+ [offset: string]: CSS$1<{}, {
11790
11749
  'border-widths': {
11791
11750
  readonly none: 0;
11792
11751
  readonly sm: "1px";
@@ -12744,25 +12703,25 @@ declare const keyframes: (style: {
12744
12703
  readonly width: "sizes";
12745
12704
  readonly zIndex: "z-indices";
12746
12705
  }, {
12747
- paddingX: (value: PropertyValue<"padding">) => {
12748
- paddingLeft: WithPropertyValue<"padding">;
12749
- paddingRight: WithPropertyValue<"padding">;
12706
+ paddingX: (value: CSSProperties["padding"]) => {
12707
+ paddingLeft: OnlyStringNumeric | undefined;
12708
+ paddingRight: OnlyStringNumeric | undefined;
12750
12709
  };
12751
- paddingY: (value: PropertyValue<"padding">) => {
12752
- paddingTop: WithPropertyValue<"padding">;
12753
- paddingBottom: WithPropertyValue<"padding">;
12710
+ paddingY: (value: CSSProperties["padding"]) => {
12711
+ paddingTop: OnlyStringNumeric | undefined;
12712
+ paddingBottom: OnlyStringNumeric | undefined;
12754
12713
  };
12755
- marginX: (value: PropertyValue<"margin">) => {
12756
- marginLeft: WithPropertyValue<"margin">;
12757
- marginRight: WithPropertyValue<"margin">;
12714
+ marginX: (value: CSSProperties["margin"]) => {
12715
+ marginLeft: Property.Margin | undefined;
12716
+ marginRight: Property.Margin | undefined;
12758
12717
  };
12759
- marginY: (value: PropertyValue<"margin">) => {
12760
- marginTop: WithPropertyValue<"margin">;
12761
- marginBottom: WithPropertyValue<"margin">;
12718
+ marginY: (value: CSSProperties["margin"]) => {
12719
+ marginTop: Property.Margin | undefined;
12720
+ marginBottom: Property.Margin | undefined;
12762
12721
  };
12763
- square: (value: PropertyValue<"width">) => {
12764
- width: WithPropertyValue<"width">;
12765
- height: WithPropertyValue<"width">;
12722
+ square: (value: CSSProperties["width"]) => {
12723
+ width: Property.Width | undefined;
12724
+ height: Property.Width | undefined;
12766
12725
  };
12767
12726
  _hover: (css: CSSProperties) => {
12768
12727
  '&:hover, &[data-hovered]': CSSProperties$1;
@@ -12778,7 +12737,7 @@ declare const fontFace: (...fonts: FontFace[]) => string;
12778
12737
  type ForbiddenProps = 'className' | 'style' | 'as';
12779
12738
  type AllowedProps = 'css' | 'asChild' | 'UNSAFE_style' | 'children';
12780
12739
  type SafeProps<T> = Omit<T, ForbiddenProps>;
12781
- type CSS = CSS$1<typeof config>;
12740
+ type CSS = CSS$2<typeof config>;
12782
12741
  /**
12783
12742
  * Build a type with all props from a element and Stitches CSS keys
12784
12743
  * and remove dangerous attributes that could cause styles issues
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.0",
3
+ "version": "3.2.0-fix-stitches-types.2",
4
4
  "description": "",
5
5
  "author": "Miro",
6
6
  "source": "src/index.ts",
@@ -27,9 +27,9 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "lodash.merge": "^4.6.2",
30
+ "@mirohq/design-system-themes": "^1.1.1",
30
31
  "@mirohq/design-system-types": "^1.0.1",
31
- "@mirohq/design-tokens": "^7.0.1",
32
- "@mirohq/design-system-themes": "^1.1.1"
32
+ "@mirohq/design-tokens": "^7.0.1"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/lodash.merge": "^4.6.7"