@mirohq/design-system-stitches 2.3.15 → 2.4.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 CHANGED
@@ -43,6 +43,7 @@ const themeMap = {
43
43
  borderRightColor: "colors",
44
44
  borderRightStyle: "border-styles",
45
45
  borderRightWidth: "border-widths",
46
+ borderSpacing: "space-offset",
46
47
  borderStyle: "border-styles",
47
48
  borderTop: "colors",
48
49
  borderTopColor: "colors",
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 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-gap',\n columnRuleColor: 'colors',\n fill: 'colors',\n flexBasis: 'sizes',\n fontFamily: 'fonts',\n fontSize: 'font-sizes',\n fontWeight: 'font-weights',\n gap: 'space-gap',\n gridColumnGap: 'space-gap',\n gridGap: 'space-gap',\n gridRowGap: 'space-gap',\n gridTemplateColumns: 'sizes',\n gridTemplateRows: 'sizes',\n height: 'sizes',\n inlineSize: 'sizes',\n inset: 'space-inset',\n insetBlock: 'space-inset',\n insetBlockEnd: 'space-inset',\n insetBlockStart: 'space-inset',\n insetInline: 'space-inset',\n insetInlineEnd: 'space-inset',\n insetInlineStart: 'space-inset',\n left: 'space',\n letterSpacing: 'letter-spacings',\n lineHeight: 'line-heights',\n margin: 'space-offset',\n marginBlock: 'space-offset',\n marginBlockEnd: 'space-offset',\n marginBlockStart: 'space-offset',\n marginBottom: 'space-offset',\n marginInline: 'space-offset',\n marginInlineEnd: 'space-offset',\n marginInlineStart: 'space-offset',\n marginLeft: 'space-offset',\n marginRight: 'space-offset',\n marginTop: 'space-offset',\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-inset',\n paddingBlock: 'space-inset',\n paddingBlockEnd: 'space-inset',\n paddingBlockStart: 'space-inset',\n paddingBottom: 'space-inset',\n paddingInline: 'space-inset',\n paddingInlineEnd: 'space-inset',\n paddingInlineStart: 'space-inset',\n paddingLeft: 'space-inset',\n paddingRight: 'space-inset',\n paddingTop: 'space-inset',\n right: 'space',\n rowGap: 'space-gap',\n scrollMargin: 'space-offset',\n scrollMarginBlock: 'space-offset',\n scrollMarginBlockEnd: 'space-offset',\n scrollMarginBlockStart: 'space-offset',\n scrollMarginBottom: 'space-offset',\n scrollMarginInline: 'space-offset',\n scrollMarginInlineEnd: 'space-offset',\n scrollMarginInlineStart: 'space-offset',\n scrollMarginLeft: 'space-offset',\n scrollMarginRight: 'space-offset',\n scrollMarginTop: 'space-offset',\n scrollPadding: 'space-inset',\n scrollPaddingBlock: 'space-inset',\n scrollPaddingBlockEnd: 'space-inset',\n scrollPaddingBlockStart: 'space-inset',\n scrollPaddingBottom: 'space-inset',\n scrollPaddingInline: 'space-inset',\n scrollPaddingInlineEnd: 'space-inset',\n scrollPaddingInlineStart: 'space-inset',\n scrollPaddingLeft: 'space-inset',\n scrollPaddingRight: 'space-inset',\n scrollPaddingTop: 'space-inset',\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 { tokens } from '@mirohq/design-tokens'\nimport type { AliasColors } from '@mirohq/design-system-themes'\nimport { base } from '@mirohq/design-system-themes'\nimport merge from 'lodash.merge'\n\nexport interface Theme {\n 'border-widths': typeof tokens.borderWidths\n colors: typeof tokens.colors & AliasColors\n 'font-sizes': typeof tokens.fontSizes\n fonts: typeof tokens.fonts\n radii: typeof tokens.radii\n shadows: typeof tokens.shadows\n sizes: typeof tokens.sizes\n space: typeof tokens.space\n 'space-gap': typeof tokens.spaceGap\n 'space-inset': typeof tokens.spaceInset\n 'space-offset': typeof tokens.spaceOffset\n 'stroke-width': typeof tokens.strokeWidths\n 'z-indices': typeof tokens.zIndices\n}\n\nexport const theme: Theme = {\n 'border-widths': tokens.borderWidths,\n colors: merge({}, tokens.colors, base.colors),\n 'font-sizes': tokens.fontSizes,\n fonts: tokens.fonts,\n radii: tokens.radii,\n shadows: tokens.shadows,\n sizes: tokens.sizes,\n space: tokens.space,\n 'space-gap': tokens.spaceGap,\n 'space-inset': tokens.spaceInset,\n 'space-offset': tokens.spaceOffset,\n 'stroke-width': tokens.strokeWidths,\n 'z-indices': tokens.zIndices,\n}\n","import type { PropertyValue } 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}\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 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 StitchesProps = StitchesStyledComponentProps<[Composers]>\n type VariantProps = TransformProps<\n StitchesProps,\n typeof stitches.config.media\n >\n type ComponentProps = StyledComponentProps<typeof StyledComponent>\n\n type Props = Omit<StitchesProps, keyof VariantProps> &\n VariantProps &\n ComponentProps &\n CustomStylesProps\n\n const Component = React.forwardRef<ElementRef<typeof StyledComponent>, 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<ElementRef<typeof StyledComponent>>\n > &\n StitchesInternals<\n Element,\n StitchesStyledComponentProps<[Composers]>,\n typeof stitches.config.media\n >\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","merge","base","createStitches","defaultTheme","styled","stitches.theme","stitches.styled","React","stitches.prefix","stitches.config","jsx","stitchesTheme"],"mappings":";;;;;;;;;;;;;;;;AAAO,MAAM,QAAW,GAAA;AAAA,EACtB,UAAY,EAAA,QAAA;AAAA,EACZ,eAAiB,EAAA,QAAA;AAAA,EACjB,eAAiB,EAAA,QAAA;AAAA,EACjB,SAAW,EAAA,OAAA;AAAA,EACX,MAAQ,EAAA,QAAA;AAAA,EACR,WAAa,EAAA,QAAA;AAAA,EACb,cAAgB,EAAA,QAAA;AAAA,EAChB,gBAAkB,EAAA,QAAA;AAAA,EAClB,YAAc,EAAA,QAAA;AAAA,EACd,iBAAmB,EAAA,QAAA;AAAA,EACnB,sBAAwB,EAAA,OAAA;AAAA,EACxB,uBAAyB,EAAA,OAAA;AAAA,EACzB,iBAAmB,EAAA,eAAA;AAAA,EACnB,iBAAmB,EAAA,eAAA;AAAA,EACnB,WAAa,EAAA,QAAA;AAAA,EACb,WAAa,EAAA,QAAA;AAAA,E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AAAA,QAAC,eAAA;AAAA,QAAA;AAAA,UACE,GAAI,SAAA;AAAA,UACL,SAAW,EAAA,iBAAA;AAAA,UACX,KAAO,EAAA,WAAA;AAAA,UACP,GAAK,EAAA,UAAA;AAAA,SAAA;AAAA,OACP,CAAA;AAAA,KAEJ;AAAA,GACF,CAAA;AASA,EAAA,SAAA,CAAU,WAAc,GAAA,mBAAA,CAAA;AACxB,EAAA,SAAA,CAAU,WAAW,eAAgB,CAAA,QAAA,CAAA;AACrC,EAAA,SAAA,CAAU,YAAY,eAAgB,CAAA,SAAA,CAAA;AACtC,EAAA,SAAA,CAAU,WAAW,eAAgB,CAAA,QAAA,CAAA;AAErC,EAAO,OAAA,SAAA,CAAA;AACT;;ACxMO,MAAM,eAAkB,GAAA;AAAA,EAC7B,MAAA;AAAA,EACA,UAAUC,KAAc,CAAA,QAAA;AAAA,EACxB,WAAWA,KAAc,CAAA,SAAA;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-offset',\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-gap',\n columnRuleColor: 'colors',\n fill: 'colors',\n flexBasis: 'sizes',\n fontFamily: 'fonts',\n fontSize: 'font-sizes',\n fontWeight: 'font-weights',\n gap: 'space-gap',\n gridColumnGap: 'space-gap',\n gridGap: 'space-gap',\n gridRowGap: 'space-gap',\n gridTemplateColumns: 'sizes',\n gridTemplateRows: 'sizes',\n height: 'sizes',\n inlineSize: 'sizes',\n inset: 'space-inset',\n insetBlock: 'space-inset',\n insetBlockEnd: 'space-inset',\n insetBlockStart: 'space-inset',\n insetInline: 'space-inset',\n insetInlineEnd: 'space-inset',\n insetInlineStart: 'space-inset',\n left: 'space',\n letterSpacing: 'letter-spacings',\n lineHeight: 'line-heights',\n margin: 'space-offset',\n marginBlock: 'space-offset',\n marginBlockEnd: 'space-offset',\n marginBlockStart: 'space-offset',\n marginBottom: 'space-offset',\n marginInline: 'space-offset',\n marginInlineEnd: 'space-offset',\n marginInlineStart: 'space-offset',\n marginLeft: 'space-offset',\n marginRight: 'space-offset',\n marginTop: 'space-offset',\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-inset',\n paddingBlock: 'space-inset',\n paddingBlockEnd: 'space-inset',\n paddingBlockStart: 'space-inset',\n paddingBottom: 'space-inset',\n paddingInline: 'space-inset',\n paddingInlineEnd: 'space-inset',\n paddingInlineStart: 'space-inset',\n paddingLeft: 'space-inset',\n paddingRight: 'space-inset',\n paddingTop: 'space-inset',\n right: 'space',\n rowGap: 'space-gap',\n scrollMargin: 'space-offset',\n scrollMarginBlock: 'space-offset',\n scrollMarginBlockEnd: 'space-offset',\n scrollMarginBlockStart: 'space-offset',\n scrollMarginBottom: 'space-offset',\n scrollMarginInline: 'space-offset',\n scrollMarginInlineEnd: 'space-offset',\n scrollMarginInlineStart: 'space-offset',\n scrollMarginLeft: 'space-offset',\n scrollMarginRight: 'space-offset',\n scrollMarginTop: 'space-offset',\n scrollPadding: 'space-inset',\n scrollPaddingBlock: 'space-inset',\n scrollPaddingBlockEnd: 'space-inset',\n scrollPaddingBlockStart: 'space-inset',\n scrollPaddingBottom: 'space-inset',\n scrollPaddingInline: 'space-inset',\n scrollPaddingInlineEnd: 'space-inset',\n scrollPaddingInlineStart: 'space-inset',\n scrollPaddingLeft: 'space-inset',\n scrollPaddingRight: 'space-inset',\n scrollPaddingTop: 'space-inset',\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 { tokens } from '@mirohq/design-tokens'\nimport type { AliasColors } from '@mirohq/design-system-themes'\nimport { base } from '@mirohq/design-system-themes'\nimport merge from 'lodash.merge'\n\nexport interface Theme {\n 'border-widths': typeof tokens.borderWidths\n colors: typeof tokens.colors & AliasColors\n 'font-sizes': typeof tokens.fontSizes\n fonts: typeof tokens.fonts\n radii: typeof tokens.radii\n shadows: typeof tokens.shadows\n sizes: typeof tokens.sizes\n space: typeof tokens.space\n 'space-gap': typeof tokens.spaceGap\n 'space-inset': typeof tokens.spaceInset\n 'space-offset': typeof tokens.spaceOffset\n 'stroke-width': typeof tokens.strokeWidths\n 'z-indices': typeof tokens.zIndices\n}\n\nexport const theme: Theme = {\n 'border-widths': tokens.borderWidths,\n colors: merge({}, tokens.colors, base.colors),\n 'font-sizes': tokens.fontSizes,\n fonts: tokens.fonts,\n radii: tokens.radii,\n shadows: tokens.shadows,\n sizes: tokens.sizes,\n space: tokens.space,\n 'space-gap': tokens.spaceGap,\n 'space-inset': tokens.spaceInset,\n 'space-offset': tokens.spaceOffset,\n 'stroke-width': tokens.strokeWidths,\n 'z-indices': tokens.zIndices,\n}\n","import type { PropertyValue } 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}\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 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 StitchesProps = StitchesStyledComponentProps<[Composers]>\n type VariantProps = TransformProps<\n StitchesProps,\n typeof stitches.config.media\n >\n type ComponentProps = StyledComponentProps<typeof StyledComponent>\n\n type Props = Omit<StitchesProps, keyof VariantProps> &\n VariantProps &\n ComponentProps &\n CustomStylesProps\n\n const Component = React.forwardRef<ElementRef<typeof StyledComponent>, 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<ElementRef<typeof StyledComponent>>\n > &\n StitchesInternals<\n Element,\n StitchesStyledComponentProps<[Composers]>,\n typeof stitches.config.media\n >\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","merge","base","createStitches","defaultTheme","styled","stitches.theme","stitches.styled","React","stitches.prefix","stitches.config","jsx","stitchesTheme"],"mappings":";;;;;;;;;;;;;;;;AAAO,MAAM,QAAW,GAAA;AAAA,EACtB,UAAY,EAAA,QAAA;AAAA,EACZ,eAAiB,EAAA,QAAA;AAAA,EACjB,eAAiB,EAAA,QAAA;AAAA,EACjB,SAAW,EAAA,OAAA;AAAA,EACX,MAAQ,EAAA,QAAA;AAAA,EACR,WAAa,EAAA,QAAA;AAAA,EACb,cAAgB,EAAA,QAAA;AAAA,EAChB,gBAA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AAA,KAAA,KAAU,IACV,IAAA,MAAA,CAAO,KAAK,KAAK,CAAA,CAAE,MAAS,GAAA,CAAA,IAC5B,sBAAsB,EACxB,EAAA;AACA,QAAA,OAAA,CAAQ,MAAM,mBAAmB,CAAA,CAAA;AAAA,OACnC;AAEA,MAAA,IAAI,OAAO,KAAW,CAAA,EAAA;AACpB,QAAA,OAAA,CAAQ,MAAM,QAAQ,CAAA,CAAA;AAAA,OACxB;AAEA,MACE,uBAAAC,cAAA;AAAA,QAAC,eAAA;AAAA,QAAA;AAAA,UACE,GAAI,SAAA;AAAA,UACL,SAAW,EAAA,iBAAA;AAAA,UACX,KAAO,EAAA,WAAA;AAAA,UACP,GAAK,EAAA,UAAA;AAAA,SAAA;AAAA,OACP,CAAA;AAAA,KAEJ;AAAA,GACF,CAAA;AASA,EAAA,SAAA,CAAU,WAAc,GAAA,mBAAA,CAAA;AACxB,EAAA,SAAA,CAAU,WAAW,eAAgB,CAAA,QAAA,CAAA;AACrC,EAAA,SAAA,CAAU,YAAY,eAAgB,CAAA,SAAA,CAAA;AACtC,EAAA,SAAA,CAAU,WAAW,eAAgB,CAAA,QAAA,CAAA;AAErC,EAAO,OAAA,SAAA,CAAA;AACT;;ACxMO,MAAM,eAAkB,GAAA;AAAA,EAC7B,MAAA;AAAA,EACA,UAAUC,KAAc,CAAA,QAAA;AAAA,EACxB,WAAWA,KAAc,CAAA,SAAA;AAC3B;;;;;;;;;;;;;;;;;"}
package/dist/module.js CHANGED
@@ -34,6 +34,7 @@ const themeMap = {
34
34
  borderRightColor: "colors",
35
35
  borderRightStyle: "border-styles",
36
36
  borderRightWidth: "border-widths",
37
+ borderSpacing: "space-offset",
37
38
  borderStyle: "border-styles",
38
39
  borderTop: "colors",
39
40
  borderTopColor: "colors",
@@ -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 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-gap',\n columnRuleColor: 'colors',\n fill: 'colors',\n flexBasis: 'sizes',\n fontFamily: 'fonts',\n fontSize: 'font-sizes',\n fontWeight: 'font-weights',\n gap: 'space-gap',\n gridColumnGap: 'space-gap',\n gridGap: 'space-gap',\n gridRowGap: 'space-gap',\n gridTemplateColumns: 'sizes',\n gridTemplateRows: 'sizes',\n height: 'sizes',\n inlineSize: 'sizes',\n inset: 'space-inset',\n insetBlock: 'space-inset',\n insetBlockEnd: 'space-inset',\n insetBlockStart: 'space-inset',\n insetInline: 'space-inset',\n insetInlineEnd: 'space-inset',\n insetInlineStart: 'space-inset',\n left: 'space',\n letterSpacing: 'letter-spacings',\n lineHeight: 'line-heights',\n margin: 'space-offset',\n marginBlock: 'space-offset',\n marginBlockEnd: 'space-offset',\n marginBlockStart: 'space-offset',\n marginBottom: 'space-offset',\n marginInline: 'space-offset',\n marginInlineEnd: 'space-offset',\n marginInlineStart: 'space-offset',\n marginLeft: 'space-offset',\n marginRight: 'space-offset',\n marginTop: 'space-offset',\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-inset',\n paddingBlock: 'space-inset',\n paddingBlockEnd: 'space-inset',\n paddingBlockStart: 'space-inset',\n paddingBottom: 'space-inset',\n paddingInline: 'space-inset',\n paddingInlineEnd: 'space-inset',\n paddingInlineStart: 'space-inset',\n paddingLeft: 'space-inset',\n paddingRight: 'space-inset',\n paddingTop: 'space-inset',\n right: 'space',\n rowGap: 'space-gap',\n scrollMargin: 'space-offset',\n scrollMarginBlock: 'space-offset',\n scrollMarginBlockEnd: 'space-offset',\n scrollMarginBlockStart: 'space-offset',\n scrollMarginBottom: 'space-offset',\n scrollMarginInline: 'space-offset',\n scrollMarginInlineEnd: 'space-offset',\n scrollMarginInlineStart: 'space-offset',\n scrollMarginLeft: 'space-offset',\n scrollMarginRight: 'space-offset',\n scrollMarginTop: 'space-offset',\n scrollPadding: 'space-inset',\n scrollPaddingBlock: 'space-inset',\n scrollPaddingBlockEnd: 'space-inset',\n scrollPaddingBlockStart: 'space-inset',\n scrollPaddingBottom: 'space-inset',\n scrollPaddingInline: 'space-inset',\n scrollPaddingInlineEnd: 'space-inset',\n scrollPaddingInlineStart: 'space-inset',\n scrollPaddingLeft: 'space-inset',\n scrollPaddingRight: 'space-inset',\n scrollPaddingTop: 'space-inset',\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 { tokens } from '@mirohq/design-tokens'\nimport type { AliasColors } from '@mirohq/design-system-themes'\nimport { base } from '@mirohq/design-system-themes'\nimport merge from 'lodash.merge'\n\nexport interface Theme {\n 'border-widths': typeof tokens.borderWidths\n colors: typeof tokens.colors & AliasColors\n 'font-sizes': typeof tokens.fontSizes\n fonts: typeof tokens.fonts\n radii: typeof tokens.radii\n shadows: typeof tokens.shadows\n sizes: typeof tokens.sizes\n space: typeof tokens.space\n 'space-gap': typeof tokens.spaceGap\n 'space-inset': typeof tokens.spaceInset\n 'space-offset': typeof tokens.spaceOffset\n 'stroke-width': typeof tokens.strokeWidths\n 'z-indices': typeof tokens.zIndices\n}\n\nexport const theme: Theme = {\n 'border-widths': tokens.borderWidths,\n colors: merge({}, tokens.colors, base.colors),\n 'font-sizes': tokens.fontSizes,\n fonts: tokens.fonts,\n radii: tokens.radii,\n shadows: tokens.shadows,\n sizes: tokens.sizes,\n space: tokens.space,\n 'space-gap': tokens.spaceGap,\n 'space-inset': tokens.spaceInset,\n 'space-offset': tokens.spaceOffset,\n 'stroke-width': tokens.strokeWidths,\n 'z-indices': tokens.zIndices,\n}\n","import type { PropertyValue } 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}\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 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 StitchesProps = StitchesStyledComponentProps<[Composers]>\n type VariantProps = TransformProps<\n StitchesProps,\n typeof stitches.config.media\n >\n type ComponentProps = StyledComponentProps<typeof StyledComponent>\n\n type Props = Omit<StitchesProps, keyof VariantProps> &\n VariantProps &\n ComponentProps &\n CustomStylesProps\n\n const Component = React.forwardRef<ElementRef<typeof StyledComponent>, 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<ElementRef<typeof StyledComponent>>\n > &\n StitchesInternals<\n Element,\n StitchesStyledComponentProps<[Composers]>,\n typeof stitches.config.media\n >\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,QAAW,GAAA;AAAA,EACtB,UAAY,EAAA,QAAA;AAAA,EACZ,eAAiB,EAAA,QAAA;AAAA,EACjB,eAAiB,EAAA,QAAA;AAAA,EACjB,SAAW,EAAA,OAAA;AAAA,EACX,MAAQ,EAAA,QAAA;AAAA,EACR,WAAa,EAAA,QAAA;AAAA,EACb,cAAgB,EAAA,QAAA;AAAA,EAChB,gBAAkB,EAAA,QAAA;AAAA,EAClB,YAAc,EAAA,QAAA;AAAA,EACd,iBAAmB,EAAA,QAAA;AAAA,EACnB,sBAAwB,EAAA,OAAA;AAAA,EACxB,uBAAyB,EAAA,OAAA;AAAA,EACzB,iBAAmB,EAAA,eAAA;AAAA,EACnB,iBAAmB,EAAA,eAAA;AAAA,EACnB,WAAa,EAAA,QAAA;AAAA,EACb,WAAa,EAAA,QAAA;AAAA,EACb,YAAc,EAAA,QAAA;AAAA,EACd,eAAiB,EAAA,QAAA;AAAA,EACjB,iBAAmB,EAAA,QAAA;AAAA,EACnB,UAAY,EAAA,QAAA;AAAA,EACZ,eAAiB,EAAA,QAAA;AAAA,EACjB,eAAiB,EAAA,eAAA;AAAA,EACjB,eAAiB,EAAA,eAAA;AAAA,EACjB,YAAc,EAAA,OAAA;AAAA,EACd,WAAa,EAAA,QAAA;AAAA,EACb,gBAAkB,EAAA,QAAA;AAAA,EAClB,gBAAkB,EAAA,eAAA;AAAA,EAClB,gBAAkB,EAAA,eAAA;AAAA,EAClB,WAAa,EAAA,eAAA;AAAA,EACb,SAAW,EAAA,QAAA;AAAA,EACX,cAAgB,EAAA,QAAA;AAAA,EAChB,mBAAqB,EAAA,OAAA;AAAA,EACrB,oBAA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ACxB,WAAWA,KAAc,CAAA,SAAA;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-offset',\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-gap',\n columnRuleColor: 'colors',\n fill: 'colors',\n flexBasis: 'sizes',\n fontFamily: 'fonts',\n fontSize: 'font-sizes',\n fontWeight: 'font-weights',\n gap: 'space-gap',\n gridColumnGap: 'space-gap',\n gridGap: 'space-gap',\n gridRowGap: 'space-gap',\n gridTemplateColumns: 'sizes',\n gridTemplateRows: 'sizes',\n height: 'sizes',\n inlineSize: 'sizes',\n inset: 'space-inset',\n insetBlock: 'space-inset',\n insetBlockEnd: 'space-inset',\n insetBlockStart: 'space-inset',\n insetInline: 'space-inset',\n insetInlineEnd: 'space-inset',\n insetInlineStart: 'space-inset',\n left: 'space',\n letterSpacing: 'letter-spacings',\n lineHeight: 'line-heights',\n margin: 'space-offset',\n marginBlock: 'space-offset',\n marginBlockEnd: 'space-offset',\n marginBlockStart: 'space-offset',\n marginBottom: 'space-offset',\n marginInline: 'space-offset',\n marginInlineEnd: 'space-offset',\n marginInlineStart: 'space-offset',\n marginLeft: 'space-offset',\n marginRight: 'space-offset',\n marginTop: 'space-offset',\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-inset',\n paddingBlock: 'space-inset',\n paddingBlockEnd: 'space-inset',\n paddingBlockStart: 'space-inset',\n paddingBottom: 'space-inset',\n paddingInline: 'space-inset',\n paddingInlineEnd: 'space-inset',\n paddingInlineStart: 'space-inset',\n paddingLeft: 'space-inset',\n paddingRight: 'space-inset',\n paddingTop: 'space-inset',\n right: 'space',\n rowGap: 'space-gap',\n scrollMargin: 'space-offset',\n scrollMarginBlock: 'space-offset',\n scrollMarginBlockEnd: 'space-offset',\n scrollMarginBlockStart: 'space-offset',\n scrollMarginBottom: 'space-offset',\n scrollMarginInline: 'space-offset',\n scrollMarginInlineEnd: 'space-offset',\n scrollMarginInlineStart: 'space-offset',\n scrollMarginLeft: 'space-offset',\n scrollMarginRight: 'space-offset',\n scrollMarginTop: 'space-offset',\n scrollPadding: 'space-inset',\n scrollPaddingBlock: 'space-inset',\n scrollPaddingBlockEnd: 'space-inset',\n scrollPaddingBlockStart: 'space-inset',\n scrollPaddingBottom: 'space-inset',\n scrollPaddingInline: 'space-inset',\n scrollPaddingInlineEnd: 'space-inset',\n scrollPaddingInlineStart: 'space-inset',\n scrollPaddingLeft: 'space-inset',\n scrollPaddingRight: 'space-inset',\n scrollPaddingTop: 'space-inset',\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 { tokens } from '@mirohq/design-tokens'\nimport type { AliasColors } from '@mirohq/design-system-themes'\nimport { base } from '@mirohq/design-system-themes'\nimport merge from 'lodash.merge'\n\nexport interface Theme {\n 'border-widths': typeof tokens.borderWidths\n colors: typeof tokens.colors & AliasColors\n 'font-sizes': typeof tokens.fontSizes\n fonts: typeof tokens.fonts\n radii: typeof tokens.radii\n shadows: typeof tokens.shadows\n sizes: typeof tokens.sizes\n space: typeof tokens.space\n 'space-gap': typeof tokens.spaceGap\n 'space-inset': typeof tokens.spaceInset\n 'space-offset': typeof tokens.spaceOffset\n 'stroke-width': typeof tokens.strokeWidths\n 'z-indices': typeof tokens.zIndices\n}\n\nexport const theme: Theme = {\n 'border-widths': tokens.borderWidths,\n colors: merge({}, tokens.colors, base.colors),\n 'font-sizes': tokens.fontSizes,\n fonts: tokens.fonts,\n radii: tokens.radii,\n shadows: tokens.shadows,\n sizes: tokens.sizes,\n space: tokens.space,\n 'space-gap': tokens.spaceGap,\n 'space-inset': tokens.spaceInset,\n 'space-offset': tokens.spaceOffset,\n 'stroke-width': tokens.strokeWidths,\n 'z-indices': tokens.zIndices,\n}\n","import type { PropertyValue } 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}\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 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 StitchesProps = StitchesStyledComponentProps<[Composers]>\n type VariantProps = TransformProps<\n StitchesProps,\n typeof stitches.config.media\n >\n type ComponentProps = StyledComponentProps<typeof StyledComponent>\n\n type Props = Omit<StitchesProps, keyof VariantProps> &\n VariantProps &\n ComponentProps &\n CustomStylesProps\n\n const Component = React.forwardRef<ElementRef<typeof StyledComponent>, 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<ElementRef<typeof StyledComponent>>\n > &\n StitchesInternals<\n Element,\n StitchesStyledComponentProps<[Composers]>,\n typeof stitches.config.media\n >\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,QAAW,GAAA;AAAA,EACtB,UAAY,EAAA,QAAA;AAAA,EACZ,eAAiB,EAAA,QAAA;AAAA,EACjB,eAAiB,EAAA,QAAA;AAAA,EACjB,SAAW,EAAA,OAAA;AAAA,EACX,MAAQ,EAAA,QAAA;AAAA,EACR,WAAa,EAAA,QAAA;AAAA,EACb,cAAgB,EAAA,QAAA;AAAA,EAChB,gBAAkB,EAAA,QAAA;AAAA,EAClB,YAAc,EAAA,QAAA;AAAA,EACd,iBAAmB,EAAA,QAAA;AAAA,EACnB,sBAAwB,EAAA,OAAA;AAAA,EACxB,uBAAyB,EAAA,OAAA;AAAA,EACzB,iBAAmB,EAAA,eAAA;AAAA,EACnB,iBAAmB,EAAA,eAAA;AAAA,EACnB,WAAa,EAAA,QAAA;AAAA,EACb,WAAa,EAAA,QAAA;AAAA,EACb,YAAc,EAAA,QAAA;AAAA,EACd,eAAiB,EAAA,QAAA;AAAA,EACjB,iBAAmB,EAAA,QAAA;AAAA,EACnB,UAAY,EAAA,QAAA;AAAA,EACZ,eAAiB,EAAA,QAAA;AAAA,EACjB,eAAiB,EAAA,eAAA;AAAA,EACjB,eAAiB,EAAA,eAAA;AAAA,EACjB,YAAc,EAAA,OAAA;AAAA,EACd,WAAa,EAAA,QAAA;AAAA,EACb,gBAAkB,EAAA,QAAA;AAAA,EAClB,gBAAk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U,YAAY,eAAgB,CAAA,SAAA,CAAA;AACtC,EAAA,SAAA,CAAU,WAAW,eAAgB,CAAA,QAAA,CAAA;AAErC,EAAO,OAAA,SAAA,CAAA;AACT;;ACxMO,MAAM,eAAkB,GAAA;AAAA,EAC7B,MAAA;AAAA,EACA,UAAUC,KAAc,CAAA,QAAA;AAAA,EACxB,WAAWA,KAAc,CAAA,SAAA;AAC3B;;;;"}
package/dist/types.d.ts CHANGED
@@ -241,6 +241,7 @@ declare const config: {
241
241
  readonly 'focus-large': "0 0 0 4px $colors$border-focus-inner, inset 0 0 0 2px $colors$border-focus-middle, inset 0 0 0 3px $colors$border-focus-outer";
242
242
  readonly 'focus-controls': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-focus-middle, 0 0 0 5px $colors$border-focus-outer";
243
243
  readonly 'focus-controls-error': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-danger, 0 0 0 5px $colors$background-danger-subtle-hover";
244
+ readonly 'focus-controls-success': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$background-success-prominent, 0 0 0 5px $colors$background-success";
244
245
  };
245
246
  sizes: {
246
247
  readonly number: string;
@@ -346,6 +347,7 @@ declare const config: {
346
347
  readonly borderRightColor: "colors";
347
348
  readonly borderRightStyle: "border-styles";
348
349
  readonly borderRightWidth: "border-widths";
350
+ readonly borderSpacing: "space-offset";
349
351
  readonly borderStyle: "border-styles";
350
352
  readonly borderTop: "colors";
351
353
  readonly borderTopColor: "colors";
@@ -727,6 +729,7 @@ declare const createTheme: <Argument0 extends string | ({
727
729
  readonly 'focus-large'?: string | number | boolean | undefined;
728
730
  readonly 'focus-controls'?: string | number | boolean | undefined;
729
731
  readonly 'focus-controls-error'?: string | number | boolean | undefined;
732
+ readonly 'focus-controls-success'?: string | number | boolean | undefined;
730
733
  } | undefined;
731
734
  sizes?: {
732
735
  readonly number?: string | number | boolean | undefined;
@@ -1033,6 +1036,7 @@ declare const createTheme: <Argument0 extends string | ({
1033
1036
  readonly 'focus-large'?: string | number | boolean | undefined;
1034
1037
  readonly 'focus-controls'?: string | number | boolean | undefined;
1035
1038
  readonly 'focus-controls-error'?: string | number | boolean | undefined;
1039
+ readonly 'focus-controls-success'?: string | number | boolean | undefined;
1036
1040
  } | undefined;
1037
1041
  sizes?: {
1038
1042
  readonly number?: string | number | boolean | undefined;
@@ -1345,6 +1349,7 @@ declare const css: <Composers extends (string | _stitches_react_types_util.Funct
1345
1349
  readonly 'focus-large': "0 0 0 4px $colors$border-focus-inner, inset 0 0 0 2px $colors$border-focus-middle, inset 0 0 0 3px $colors$border-focus-outer";
1346
1350
  readonly 'focus-controls': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-focus-middle, 0 0 0 5px $colors$border-focus-outer";
1347
1351
  readonly 'focus-controls-error': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-danger, 0 0 0 5px $colors$background-danger-subtle-hover";
1352
+ readonly 'focus-controls-success': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$background-success-prominent, 0 0 0 5px $colors$background-success";
1348
1353
  };
1349
1354
  sizes: {
1350
1355
  readonly number: string;
@@ -1449,6 +1454,7 @@ declare const css: <Composers extends (string | _stitches_react_types_util.Funct
1449
1454
  readonly borderRightColor: "colors";
1450
1455
  readonly borderRightStyle: "border-styles";
1451
1456
  readonly borderRightWidth: "border-widths";
1457
+ readonly borderSpacing: "space-offset";
1452
1458
  readonly borderStyle: "border-styles";
1453
1459
  readonly borderTop: "colors";
1454
1460
  readonly borderTopColor: "colors";
@@ -1846,6 +1852,7 @@ declare const globalCss: <Styles extends {
1846
1852
  readonly 'focus-large': "0 0 0 4px $colors$border-focus-inner, inset 0 0 0 2px $colors$border-focus-middle, inset 0 0 0 3px $colors$border-focus-outer";
1847
1853
  readonly 'focus-controls': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-focus-middle, 0 0 0 5px $colors$border-focus-outer";
1848
1854
  readonly 'focus-controls-error': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-danger, 0 0 0 5px $colors$background-danger-subtle-hover";
1855
+ readonly 'focus-controls-success': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$background-success-prominent, 0 0 0 5px $colors$background-success";
1849
1856
  };
1850
1857
  sizes: {
1851
1858
  readonly number: string;
@@ -1950,6 +1957,7 @@ declare const globalCss: <Styles extends {
1950
1957
  readonly borderRightColor: "colors";
1951
1958
  readonly borderRightStyle: "border-styles";
1952
1959
  readonly borderRightWidth: "border-widths";
1960
+ readonly borderSpacing: "space-offset";
1953
1961
  readonly borderStyle: "border-styles";
1954
1962
  readonly borderTop: "colors";
1955
1963
  readonly borderTopColor: "colors";
@@ -2329,6 +2337,7 @@ declare const globalCss: <Styles extends {
2329
2337
  readonly 'focus-large': "0 0 0 4px $colors$border-focus-inner, inset 0 0 0 2px $colors$border-focus-middle, inset 0 0 0 3px $colors$border-focus-outer";
2330
2338
  readonly 'focus-controls': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-focus-middle, 0 0 0 5px $colors$border-focus-outer";
2331
2339
  readonly 'focus-controls-error': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-danger, 0 0 0 5px $colors$background-danger-subtle-hover";
2340
+ readonly 'focus-controls-success': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$background-success-prominent, 0 0 0 5px $colors$background-success";
2332
2341
  };
2333
2342
  sizes: {
2334
2343
  readonly number: string;
@@ -2433,6 +2442,7 @@ declare const globalCss: <Styles extends {
2433
2442
  readonly borderRightColor: "colors";
2434
2443
  readonly borderRightStyle: "border-styles";
2435
2444
  readonly borderRightWidth: "border-widths";
2445
+ readonly borderSpacing: "space-offset";
2436
2446
  readonly borderStyle: "border-styles";
2437
2447
  readonly borderTop: "colors";
2438
2448
  readonly borderTopColor: "colors";
@@ -2813,6 +2823,7 @@ declare const keyframes: (style: {
2813
2823
  readonly 'focus-large': "0 0 0 4px $colors$border-focus-inner, inset 0 0 0 2px $colors$border-focus-middle, inset 0 0 0 3px $colors$border-focus-outer";
2814
2824
  readonly 'focus-controls': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-focus-middle, 0 0 0 5px $colors$border-focus-outer";
2815
2825
  readonly 'focus-controls-error': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-danger, 0 0 0 5px $colors$background-danger-subtle-hover";
2826
+ readonly 'focus-controls-success': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$background-success-prominent, 0 0 0 5px $colors$background-success";
2816
2827
  };
2817
2828
  sizes: {
2818
2829
  readonly number: string;
@@ -2917,6 +2928,7 @@ declare const keyframes: (style: {
2917
2928
  readonly borderRightColor: "colors";
2918
2929
  readonly borderRightStyle: "border-styles";
2919
2930
  readonly borderRightWidth: "border-widths";
2931
+ readonly borderSpacing: "space-offset";
2920
2932
  readonly borderStyle: "border-styles";
2921
2933
  readonly borderTop: "colors";
2922
2934
  readonly borderTopColor: "colors";
@@ -3134,6 +3146,7 @@ declare const themeMap: {
3134
3146
  readonly borderRightColor: "colors";
3135
3147
  readonly borderRightStyle: "border-styles";
3136
3148
  readonly borderRightWidth: "border-widths";
3149
+ readonly borderSpacing: "space-offset";
3137
3150
  readonly borderStyle: "border-styles";
3138
3151
  readonly borderTop: "colors";
3139
3152
  readonly borderTopColor: "colors";
@@ -3520,6 +3533,7 @@ declare const styled: <Element_1 extends _stitches_react_types_util.Function | R
3520
3533
  readonly 'focus-large': "0 0 0 4px $colors$border-focus-inner, inset 0 0 0 2px $colors$border-focus-middle, inset 0 0 0 3px $colors$border-focus-outer";
3521
3534
  readonly 'focus-controls': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-focus-middle, 0 0 0 5px $colors$border-focus-outer";
3522
3535
  readonly 'focus-controls-error': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-danger, 0 0 0 5px $colors$background-danger-subtle-hover";
3536
+ readonly 'focus-controls-success': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$background-success-prominent, 0 0 0 5px $colors$background-success";
3523
3537
  };
3524
3538
  sizes: {
3525
3539
  readonly number: string;
@@ -3624,6 +3638,7 @@ declare const styled: <Element_1 extends _stitches_react_types_util.Function | R
3624
3638
  readonly borderRightColor: "colors";
3625
3639
  readonly borderRightStyle: "border-styles";
3626
3640
  readonly borderRightWidth: "border-widths";
3641
+ readonly borderSpacing: "space-offset";
3627
3642
  readonly borderStyle: "border-styles";
3628
3643
  readonly borderTop: "colors";
3629
3644
  readonly borderTopColor: "colors";
@@ -4005,6 +4020,7 @@ declare const styled: <Element_1 extends _stitches_react_types_util.Function | R
4005
4020
  readonly 'focus-large': "0 0 0 4px $colors$border-focus-inner, inset 0 0 0 2px $colors$border-focus-middle, inset 0 0 0 3px $colors$border-focus-outer";
4006
4021
  readonly 'focus-controls': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-focus-middle, 0 0 0 5px $colors$border-focus-outer";
4007
4022
  readonly 'focus-controls-error': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$border-danger, 0 0 0 5px $colors$background-danger-subtle-hover";
4023
+ readonly 'focus-controls-success': "0 0 0 1px $colors$border-focus-inner, 0 0 0 3px $colors$background-success-prominent, 0 0 0 5px $colors$background-success";
4008
4024
  };
4009
4025
  sizes: {
4010
4026
  readonly number: string;
@@ -4109,6 +4125,7 @@ declare const styled: <Element_1 extends _stitches_react_types_util.Function | R
4109
4125
  readonly borderRightColor: "colors";
4110
4126
  readonly borderRightStyle: "border-styles";
4111
4127
  readonly borderRightWidth: "border-widths";
4128
+ readonly borderSpacing: "space-offset";
4112
4129
  readonly borderStyle: "border-styles";
4113
4130
  readonly borderTop: "colors";
4114
4131
  readonly borderTopColor: "colors";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirohq/design-system-stitches",
3
- "version": "2.3.15",
3
+ "version": "2.4.0",
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": "^0.5.2",
31
- "@mirohq/design-tokens": "^3.4.1",
32
- "@mirohq/design-system-types": "^0.6.2"
30
+ "@mirohq/design-system-themes": "^0.5.3",
31
+ "@mirohq/design-system-types": "^0.6.2",
32
+ "@mirohq/design-tokens": "^3.5.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/lodash.merge": "^4.6.7"