@mirohq/design-system-stitches 3.2.0-fix-stitches-types.1 → 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 +1 -1
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +75 -94
- package/package.json +1 -1
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,EAAq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CAAA,CAAA,CACtD,KAAK,GAAA,CAAA,GACR,EAAA;AAEN,MAAA,MAAM,WAAA,GACJ,YAAA,KAAiB,MAAA,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,QAA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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;;;;;;;;;;;;;;;;;"}
|
package/dist/module.js.map
CHANGED
|
@@ -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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,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":"module.js","sources":["../src/config/theme-map.ts","../src/config/theme.ts","../src/config/utils.ts","../src/config/media.ts","../src/stitches.ts","../src/custom.ts","../src/styled.tsx","../src/index.ts"],"sourcesContent":["export const themeMap = {\n background: 'colors',\n backgroundColor: 'colors',\n backgroundImage: 'colors',\n blockSize: 'sizes',\n border: 'colors',\n borderBlock: 'colors',\n borderBlockEnd: 'colors',\n borderBlockStart: 'colors',\n borderBottom: 'colors',\n borderBottomColor: 'colors',\n borderBottomLeftRadius: 'radii',\n borderBottomRightRadius: 'radii',\n borderBottomStyle: 'border-styles',\n borderBottomWidth: 'border-widths',\n borderColor: 'colors',\n borderImage: 'colors',\n borderInline: 'colors',\n borderInlineEnd: 'colors',\n borderInlineStart: 'colors',\n borderLeft: 'colors',\n borderLeftColor: 'colors',\n borderLeftStyle: 'border-styles',\n borderLeftWidth: 'border-widths',\n borderRadius: 'radii',\n borderRight: 'colors',\n borderRightColor: 'colors',\n borderRightStyle: 'border-styles',\n borderRightWidth: 'border-widths',\n borderSpacing: 'space',\n borderStyle: 'border-styles',\n borderTop: 'colors',\n borderTopColor: 'colors',\n borderTopLeftRadius: 'radii',\n borderTopRightRadius: 'radii',\n borderTopStyle: 'border-styles',\n borderTopWidth: 'border-widths',\n borderWidth: 'border-widths',\n bottom: 'space',\n boxShadow: 'shadows',\n caretColor: 'colors',\n color: 'colors',\n columnGap: 'space',\n columnRuleColor: 'colors',\n fill: 'colors',\n flexBasis: 'sizes',\n fontFamily: 'fonts',\n fontSize: 'font-sizes',\n fontWeight: 'font-weights',\n gap: 'space',\n gridColumnGap: 'space',\n gridGap: 'space',\n gridRowGap: 'space',\n gridTemplateColumns: 'sizes',\n gridTemplateRows: 'sizes',\n height: 'sizes',\n inlineSize: 'sizes',\n inset: 'space',\n insetBlock: 'space',\n insetBlockEnd: 'space',\n insetBlockStart: 'space',\n insetInline: 'space',\n insetInlineEnd: 'space',\n insetInlineStart: 'space',\n left: 'space',\n letterSpacing: 'letter-spacings',\n lineHeight: 'line-heights',\n margin: 'space',\n marginBlock: 'space',\n marginBlockEnd: 'space',\n marginBlockStart: 'space',\n marginBottom: 'space',\n marginInline: 'space',\n marginInlineEnd: 'space',\n marginInlineStart: 'space',\n marginLeft: 'space',\n marginRight: 'space',\n marginTop: 'space',\n maxBlockSize: 'sizes',\n maxHeight: 'sizes',\n maxInlineSize: 'sizes',\n maxWidth: 'sizes',\n minBlockSize: 'sizes',\n minHeight: 'sizes',\n minInlineSize: 'sizes',\n minWidth: 'sizes',\n outline: 'colors',\n outlineColor: 'colors',\n padding: 'space',\n paddingBlock: 'space',\n paddingBlockEnd: 'space',\n paddingBlockStart: 'space',\n paddingBottom: 'space',\n paddingInline: 'space',\n paddingInlineEnd: 'space',\n paddingInlineStart: 'space',\n paddingLeft: 'space',\n paddingRight: 'space',\n paddingTop: 'space',\n right: 'space',\n rowGap: 'space',\n scrollMargin: 'space',\n scrollMarginBlock: 'space',\n scrollMarginBlockEnd: 'space',\n scrollMarginBlockStart: 'space',\n scrollMarginBottom: 'space',\n scrollMarginInline: 'space',\n scrollMarginInlineEnd: 'space',\n scrollMarginInlineStart: 'space',\n scrollMarginLeft: 'space',\n scrollMarginRight: 'space',\n scrollMarginTop: 'space',\n scrollPadding: 'space',\n scrollPaddingBlock: 'space',\n scrollPaddingBlockEnd: 'space',\n scrollPaddingBlockStart: 'space',\n scrollPaddingBottom: 'space',\n scrollPaddingInline: 'space',\n scrollPaddingInlineEnd: 'space',\n scrollPaddingInlineStart: 'space',\n scrollPaddingLeft: 'space',\n scrollPaddingRight: 'space',\n scrollPaddingTop: 'space',\n stroke: 'colors',\n strokeWidth: 'stroke-width',\n textDecorationColor: 'colors',\n textShadow: 'shadows',\n top: 'space',\n transition: 'transitions',\n width: 'sizes',\n zIndex: 'z-indices',\n} as const\n\nexport type ThemeMap = typeof themeMap\n","import * as tokens from '@mirohq/design-tokens'\nimport { base } from '@mirohq/design-system-themes'\nimport type { Theme as DS_Theme } from '@mirohq/design-system-themes'\nimport merge from 'lodash.merge'\n\nexport const theme = {\n 'border-widths': tokens.borderWidths,\n colors: merge({}, tokens.colors, base.colors),\n 'font-sizes': tokens.fontSizes,\n 'font-weights': tokens.fontWeights,\n 'line-heights': tokens.lineHeights,\n fonts: tokens.fonts,\n radii: tokens.radii,\n shadows: base.shadows as Required<DS_Theme['shadows']>,\n sizes: tokens.sizes,\n space: tokens.space,\n 'stroke-width': tokens.strokeWidths,\n 'z-indices': tokens.zIndices,\n}\n\nexport type Theme = typeof theme\n","import type { CSSProperties } from '@stitches/react'\n\nexport const utils = {\n paddingX: (value: CSSProperties['padding']) => ({\n paddingLeft: value,\n paddingRight: value,\n }),\n paddingY: (value: CSSProperties['padding']) => ({\n paddingTop: value,\n paddingBottom: value,\n }),\n marginX: (value: CSSProperties['margin']) => ({\n marginLeft: value,\n marginRight: value,\n }),\n marginY: (value: CSSProperties['margin']) => ({\n marginTop: value,\n marginBottom: value,\n }),\n square: (value: CSSProperties['width']) => ({\n width: value,\n height: value,\n }),\n _hover: (css: CSSProperties) => ({\n '&:hover, &[data-hovered]': css,\n }),\n}\n","/**\n * Commenting out due to performance problems\n * Please check the thread for more info:\n * https://miro.slack.com/archives/C03SJ1S209M/p1669821558087279\n */\n\nexport const media = {\n // reducedMotion: '(prefers-reduced-motion: reduce)',\n // motion: '(prefers-reduced-motion: no-preference)',\n // hover: '(any-hover: hover)',\n}\n","import { createStitches } from '@stitches/react'\nimport type * as CSSUtil from '@stitches/react/types/css-util'\n\nimport { utils, theme as defaultTheme, themeMap, media } from './config'\n\nconst stitches = createStitches({\n theme: defaultTheme,\n media,\n utils,\n themeMap,\n})\n\nexport const {\n config,\n createTheme,\n css,\n getCssText,\n globalCss,\n keyframes,\n prefix,\n styled,\n theme,\n} = stitches\n\nexport type FontFace = CSSUtil.Native.AtRule.FontFace\n\nexport const fontFace = (...fonts: FontFace[]): string =>\n globalCss({\n '@font-face': fonts,\n })()\n","import type { ConfigType } from '@stitches/react/types/config'\n\nimport { config } from './stitches'\n\nexport function setMedia<Media extends {} = {}>(\n media: ConfigType.Media<Media>\n): void {\n config.media = {\n ...config.media,\n ...media,\n }\n}\n\nexport function setCssUtils<Utils extends {} = {}>(\n utils: ConfigType.Utils<Utils>\n): void {\n config.utils = {\n ...config.utils,\n ...utils,\n }\n}\n","import React from 'react'\nimport type {\n CSSProperties,\n ComponentType,\n ElementRef,\n ElementType,\n ExoticComponent,\n ForwardRefExoticComponent,\n JSXElementConstructor,\n PropsWithoutRef,\n RefAttributes,\n} from 'react'\nimport type { RemoveIndex } from '@stitches/react/types/stitches'\nimport type { Token } from '@stitches/react/types/theme'\nimport type {\n StyledComponentProps as StitchesStyledComponentProps,\n $$StyledComponentMedia,\n $$StyledComponentProps,\n $$StyledComponentType,\n TransformProps,\n} from '@stitches/react/types/styled-component'\nimport type * as Util from '@stitches/react/types/util'\n\nimport * as stitches from './stitches'\nimport type { CSS, StyledComponentProps, ForbiddenProps } from './types'\n\n// Error messages\n// -----------------------------------------------------------------------------\n\nexport const AS_ERROR =\n 'Polymorphism via `as` prop is not available in styled components.'\n\nexport const STYLING_ATTRS_ERROR =\n 'The `className` and `style` attributes are not avaialable in styled components.'\n\n// Utils\n// -----------------------------------------------------------------------------\n\nconst styleWithCssVars = (\n style: CSS,\n themeMap: typeof stitches.config.themeMap\n): CSSProperties =>\n (Object.entries(style) as Array<[string, unknown]>).reduce(\n (acc, [prop, value]) => {\n // @ts-expect-error\n const mapKeyForProp = themeMap[prop]\n const mapping = stitches.theme[mapKeyForProp] as unknown as {\n [Prop: string]: { [K in keyof Token]: Token[K] }\n }\n\n const parsedValue =\n typeof value === 'string' && /^\\$.+$/.test(value)\n ? mapping[value.replace('$', '')]?.computedValue\n : value\n\n return {\n ...acc,\n [prop]: parsedValue,\n }\n },\n {}\n ) as CSSProperties\n\n// Styled\n// -----------------------------------------------------------------------------\n\ntype Variants<T> = 'variants' extends keyof T\n ? {\n [Name in keyof T['variants']]?:\n | Util.Widen<keyof T['variants'][Name]>\n | Util.String\n }\n : Util.WideObject\n\ntype Styles<Composers> = Composers extends\n | string\n | ComponentType<any>\n | Util.Function\n ? Composers\n : RemoveIndex<CSS> & {\n variants?: {\n [Name in string]: {\n [Pair in number | string]: CSS\n }\n }\n compoundVariants?: Array<Variants<Composers> & { css: CSS }>\n defaultVariants?: Variants<Composers>\n } & CSS & {\n [K in keyof Composers]: K extends\n | 'compoundVariants'\n | 'defaultVariants'\n | 'variants'\n ? unknown\n : K extends keyof CSS\n ? CSS[K]\n : unknown\n }\n\n// This interface is only needed to fix TS4023\nexport interface StitchesInternals<\n Type extends\n | keyof JSX.IntrinsicElements\n | React.ComponentType<any>\n | Util.Function,\n Props extends {},\n Media extends typeof stitches.config.media\n> {\n className: string\n selector: string\n [$$StyledComponentType]: Type\n [$$StyledComponentProps]: Props\n [$$StyledComponentMedia]: Media\n}\n\nexport interface CustomStylesProps {\n css?: CSS\n UNSAFE_style?: CSS\n}\n\n// TS is infering the return type correctly, no need to make things uglier here\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const styled = <\n Element extends\n | keyof JSX.IntrinsicElements\n | React.ComponentType<any>\n | Util.Function = 'span',\n Composers extends\n | string\n | ExoticComponent<any>\n | JSXElementConstructor<any>\n | Util.Function\n | { [name: string]: unknown } = {}\n>(\n element: Element,\n composers?: Styles<Composers>\n) => {\n const StyledComponent = stitches.styled(element, composers ?? {})\n\n type __Element = Element extends ElementType ? Element : any\n type StyledElementRef = ElementRef<__Element>\n type StitchesProps = StitchesStyledComponentProps<[Composers]>\n type VariantProps = TransformProps<\n StitchesProps,\n typeof stitches.config.media\n >\n type ComponentProps = StyledComponentProps<__Element>\n\n type Props = Omit<ComponentProps, keyof VariantProps> &\n VariantProps &\n CustomStylesProps\n\n const Component = React.forwardRef<StyledElementRef, Props>(\n (props, forwardRef) => {\n const {\n as,\n className,\n style,\n UNSAFE_style, // eslint-disable-line @typescript-eslint/naming-convention\n ...restProps\n } = props as Props & {\n [K in ForbiddenProps]?: unknown\n }\n\n // based on https://github.com/modulz/stitches/blob/v1.2.8/packages/core/src/features/css.js#L71\n const onlyStyledClasses =\n typeof className === 'string'\n ? className\n ?.split(' ')\n .filter((x: string) => x.match(`${stitches.prefix}c-.+`))\n .join(' ')\n : ''\n\n const parsedStyle =\n UNSAFE_style !== undefined\n ? styleWithCssVars(UNSAFE_style, stitches.config.themeMap)\n : onlyStyledClasses !== ''\n ? style\n : undefined\n\n if (\n (className !== undefined && onlyStyledClasses !== className) ||\n (typeof style === 'object' &&\n style !== null &&\n Object.keys(style).length > 0 &&\n onlyStyledClasses === '')\n ) {\n console.error(STYLING_ATTRS_ERROR)\n }\n\n if (as !== undefined) {\n console.error(AS_ERROR)\n }\n\n return (\n <StyledComponent\n {...(restProps as any)}\n className={onlyStyledClasses}\n style={parsedStyle}\n ref={forwardRef}\n />\n )\n }\n ) as ForwardRefExoticComponent<\n PropsWithoutRef<Props> & RefAttributes<StyledElementRef>\n > &\n StitchesInternals<Element, StitchesProps, typeof stitches.config.media>\n\n Component.displayName = 'Styled.ForwardRef'\n Component.toString = StyledComponent.toString\n Component.className = StyledComponent.className\n Component.selector = StyledComponent.selector\n\n return Component\n}\n","import { prefix, theme as stitchesTheme } from './stitches'\n\nexport * from './types'\n\nexport {\n createTheme,\n css,\n getCssText,\n globalCss,\n keyframes,\n fontFace,\n} from './stitches'\n\nexport type { FontFace } from './stitches'\n\nexport const stitchesCssRoot = {\n prefix,\n selector: stitchesTheme.selector,\n className: stitchesTheme.className,\n}\n\nexport { theme, themeMap } from './config'\nexport type { Theme, ThemeMap } from './config'\n\nexport * from './custom'\nexport * from './styled'\n"],"names":["theme","defaultTheme","styled","stitches.theme","stitches.styled","stitches.prefix","stitches.config","stitchesTheme"],"mappings":";;;;;;;AAAO,MAAM,QAAA,GAAW;AAAA,EACtB,UAAA,EAAY,QAAA;AAAA,EACZ,eAAA,EAAiB,QAAA;AAAA,EACjB,eAAA,EAAiB,QAAA;AAAA,EACjB,SAAA,EAAW,OAAA;AAAA,EACX,MAAA,EAAQ,QAAA;AAAA,EACR,WAAA,EAAa,QAAA;AAAA,EACb,cAAA,EAAgB,QAAA;AAAA,EAChB,gBAAA,EAAkB,QAAA;AAAA,EAClB,YAAA,EAAc,QAAA;AAAA,EACd,iBAAA,EAAmB,QAAA;AAAA,EACnB,sBAAA,EAAwB,OAAA;AAAA,EACxB,uBAAA,EAAyB,OAAA;AAAA,EACzB,iBAAA,EAAmB,eAAA;AAAA,EACnB,iBAAA,EAAmB,eAAA;AAAA,EACnB,WAAA,EAAa,QAAA;AAAA,EACb,WAAA,EAAa,QAAA;AAAA,EACb,YAAA,EAAc,QAAA;AAAA,EACd,eAAA,EAAiB,QAAA;AAAA,EACjB,iBAAA,EAAmB,QAAA;AAAA,EACnB,UAAA,EAAY,QAAA;AAAA,EACZ,eAAA,EAAiB,QAAA;AAAA,EACjB,eAAA,EAAiB,eAAA;AAAA,EACjB,eAAA,EAAiB,eAAA;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,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AAiB,MAAA,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,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
|
@@ -6106,11 +6106,6 @@ declare const $$ScaleValue: unique symbol
|
|
|
6106
6106
|
/** Unique symbol used to reference a token value. */
|
|
6107
6107
|
type $$ScaleValue = typeof $$ScaleValue
|
|
6108
6108
|
|
|
6109
|
-
// https://github.com/microsoft/TypeScript/issues/50720#issuecomment-1367227930
|
|
6110
|
-
type WithPropertyValue<T> = {
|
|
6111
|
-
readonly [K in $$PropertyValue]: T
|
|
6112
|
-
}
|
|
6113
|
-
|
|
6114
6109
|
/** Remove an index signature from a type */
|
|
6115
6110
|
type RemoveIndex<T> = {[k in keyof T as string extends k ? never : number extends k ? never : k]: T[k]}
|
|
6116
6111
|
|
|
@@ -6127,20 +6122,6 @@ type ThemeTokens<Values, Prefix> = {
|
|
|
6127
6122
|
|
|
6128
6123
|
type CSSProperties = CSSProperties$1
|
|
6129
6124
|
|
|
6130
|
-
/** Returns a type that expects a value to be a kind of CSS property value. */
|
|
6131
|
-
type PropertyValue<Property extends keyof CSSProperties$1, Config = null> = (
|
|
6132
|
-
Config extends null
|
|
6133
|
-
? WithPropertyValue<Property>
|
|
6134
|
-
: Config extends { [K: string]: any }
|
|
6135
|
-
? CSS$1<
|
|
6136
|
-
Config['media'],
|
|
6137
|
-
Config['theme'],
|
|
6138
|
-
Config['themeMap'],
|
|
6139
|
-
Config['utils']
|
|
6140
|
-
>[Property]
|
|
6141
|
-
: never
|
|
6142
|
-
)
|
|
6143
|
-
|
|
6144
6125
|
declare const config: {
|
|
6145
6126
|
prefix: "";
|
|
6146
6127
|
media: {};
|
|
@@ -7104,25 +7085,25 @@ declare const config: {
|
|
|
7104
7085
|
readonly zIndex: "z-indices";
|
|
7105
7086
|
};
|
|
7106
7087
|
utils: {
|
|
7107
|
-
paddingX: (value:
|
|
7108
|
-
paddingLeft:
|
|
7109
|
-
paddingRight:
|
|
7088
|
+
paddingX: (value: CSSProperties["padding"]) => {
|
|
7089
|
+
paddingLeft: OnlyStringNumeric | undefined;
|
|
7090
|
+
paddingRight: OnlyStringNumeric | undefined;
|
|
7110
7091
|
};
|
|
7111
|
-
paddingY: (value:
|
|
7112
|
-
paddingTop:
|
|
7113
|
-
paddingBottom:
|
|
7092
|
+
paddingY: (value: CSSProperties["padding"]) => {
|
|
7093
|
+
paddingTop: OnlyStringNumeric | undefined;
|
|
7094
|
+
paddingBottom: OnlyStringNumeric | undefined;
|
|
7114
7095
|
};
|
|
7115
|
-
marginX: (value:
|
|
7116
|
-
marginLeft:
|
|
7117
|
-
marginRight:
|
|
7096
|
+
marginX: (value: CSSProperties["margin"]) => {
|
|
7097
|
+
marginLeft: Property.Margin | undefined;
|
|
7098
|
+
marginRight: Property.Margin | undefined;
|
|
7118
7099
|
};
|
|
7119
|
-
marginY: (value:
|
|
7120
|
-
marginTop:
|
|
7121
|
-
marginBottom:
|
|
7100
|
+
marginY: (value: CSSProperties["margin"]) => {
|
|
7101
|
+
marginTop: Property.Margin | undefined;
|
|
7102
|
+
marginBottom: Property.Margin | undefined;
|
|
7122
7103
|
};
|
|
7123
|
-
square: (value:
|
|
7124
|
-
width:
|
|
7125
|
-
height:
|
|
7104
|
+
square: (value: CSSProperties["width"]) => {
|
|
7105
|
+
width: Property.Width | undefined;
|
|
7106
|
+
height: Property.Width | undefined;
|
|
7126
7107
|
};
|
|
7127
7108
|
_hover: (css: CSSProperties) => {
|
|
7128
7109
|
'&:hover, &[data-hovered]': CSSProperties$1;
|
|
@@ -9755,25 +9736,25 @@ declare const css: <Composers extends (string | React.ExoticComponent<any> | Rea
|
|
|
9755
9736
|
readonly width: "sizes";
|
|
9756
9737
|
readonly zIndex: "z-indices";
|
|
9757
9738
|
}, {
|
|
9758
|
-
paddingX: (value:
|
|
9759
|
-
paddingLeft:
|
|
9760
|
-
paddingRight:
|
|
9739
|
+
paddingX: (value: CSSProperties["padding"]) => {
|
|
9740
|
+
paddingLeft: OnlyStringNumeric | undefined;
|
|
9741
|
+
paddingRight: OnlyStringNumeric | undefined;
|
|
9761
9742
|
};
|
|
9762
|
-
paddingY: (value:
|
|
9763
|
-
paddingTop:
|
|
9764
|
-
paddingBottom:
|
|
9743
|
+
paddingY: (value: CSSProperties["padding"]) => {
|
|
9744
|
+
paddingTop: OnlyStringNumeric | undefined;
|
|
9745
|
+
paddingBottom: OnlyStringNumeric | undefined;
|
|
9765
9746
|
};
|
|
9766
|
-
marginX: (value:
|
|
9767
|
-
marginLeft:
|
|
9768
|
-
marginRight:
|
|
9747
|
+
marginX: (value: CSSProperties["margin"]) => {
|
|
9748
|
+
marginLeft: Property.Margin | undefined;
|
|
9749
|
+
marginRight: Property.Margin | undefined;
|
|
9769
9750
|
};
|
|
9770
|
-
marginY: (value:
|
|
9771
|
-
marginTop:
|
|
9772
|
-
marginBottom:
|
|
9751
|
+
marginY: (value: CSSProperties["margin"]) => {
|
|
9752
|
+
marginTop: Property.Margin | undefined;
|
|
9753
|
+
marginBottom: Property.Margin | undefined;
|
|
9773
9754
|
};
|
|
9774
|
-
square: (value:
|
|
9775
|
-
width:
|
|
9776
|
-
height:
|
|
9755
|
+
square: (value: CSSProperties["width"]) => {
|
|
9756
|
+
width: Property.Width | undefined;
|
|
9757
|
+
height: Property.Width | undefined;
|
|
9777
9758
|
};
|
|
9778
9759
|
_hover: (css: CSSProperties) => {
|
|
9779
9760
|
'&:hover, &[data-hovered]': CSSProperties$1;
|
|
@@ -10755,25 +10736,25 @@ declare const globalCss: <Styles extends {
|
|
|
10755
10736
|
readonly width: "sizes";
|
|
10756
10737
|
readonly zIndex: "z-indices";
|
|
10757
10738
|
}, {
|
|
10758
|
-
paddingX: (value:
|
|
10759
|
-
paddingLeft:
|
|
10760
|
-
paddingRight:
|
|
10739
|
+
paddingX: (value: CSSProperties["padding"]) => {
|
|
10740
|
+
paddingLeft: OnlyStringNumeric | undefined;
|
|
10741
|
+
paddingRight: OnlyStringNumeric | undefined;
|
|
10761
10742
|
};
|
|
10762
|
-
paddingY: (value:
|
|
10763
|
-
paddingTop:
|
|
10764
|
-
paddingBottom:
|
|
10743
|
+
paddingY: (value: CSSProperties["padding"]) => {
|
|
10744
|
+
paddingTop: OnlyStringNumeric | undefined;
|
|
10745
|
+
paddingBottom: OnlyStringNumeric | undefined;
|
|
10765
10746
|
};
|
|
10766
|
-
marginX: (value:
|
|
10767
|
-
marginLeft:
|
|
10768
|
-
marginRight:
|
|
10747
|
+
marginX: (value: CSSProperties["margin"]) => {
|
|
10748
|
+
marginLeft: Property.Margin | undefined;
|
|
10749
|
+
marginRight: Property.Margin | undefined;
|
|
10769
10750
|
};
|
|
10770
|
-
marginY: (value:
|
|
10771
|
-
marginTop:
|
|
10772
|
-
marginBottom:
|
|
10751
|
+
marginY: (value: CSSProperties["margin"]) => {
|
|
10752
|
+
marginTop: Property.Margin | undefined;
|
|
10753
|
+
marginBottom: Property.Margin | undefined;
|
|
10773
10754
|
};
|
|
10774
|
-
square: (value:
|
|
10775
|
-
width:
|
|
10776
|
-
height:
|
|
10755
|
+
square: (value: CSSProperties["width"]) => {
|
|
10756
|
+
width: Property.Width | undefined;
|
|
10757
|
+
height: Property.Width | undefined;
|
|
10777
10758
|
};
|
|
10778
10759
|
_hover: (css: CSSProperties) => {
|
|
10779
10760
|
'&:hover, &[data-hovered]': CSSProperties$1;
|
|
@@ -11737,25 +11718,25 @@ declare const globalCss: <Styles extends {
|
|
|
11737
11718
|
readonly width: "sizes";
|
|
11738
11719
|
readonly zIndex: "z-indices";
|
|
11739
11720
|
}, {
|
|
11740
|
-
paddingX: (value:
|
|
11741
|
-
paddingLeft:
|
|
11742
|
-
paddingRight:
|
|
11721
|
+
paddingX: (value: CSSProperties["padding"]) => {
|
|
11722
|
+
paddingLeft: OnlyStringNumeric | undefined;
|
|
11723
|
+
paddingRight: OnlyStringNumeric | undefined;
|
|
11743
11724
|
};
|
|
11744
|
-
paddingY: (value:
|
|
11745
|
-
paddingTop:
|
|
11746
|
-
paddingBottom:
|
|
11725
|
+
paddingY: (value: CSSProperties["padding"]) => {
|
|
11726
|
+
paddingTop: OnlyStringNumeric | undefined;
|
|
11727
|
+
paddingBottom: OnlyStringNumeric | undefined;
|
|
11747
11728
|
};
|
|
11748
|
-
marginX: (value:
|
|
11749
|
-
marginLeft:
|
|
11750
|
-
marginRight:
|
|
11729
|
+
marginX: (value: CSSProperties["margin"]) => {
|
|
11730
|
+
marginLeft: Property.Margin | undefined;
|
|
11731
|
+
marginRight: Property.Margin | undefined;
|
|
11751
11732
|
};
|
|
11752
|
-
marginY: (value:
|
|
11753
|
-
marginTop:
|
|
11754
|
-
marginBottom:
|
|
11733
|
+
marginY: (value: CSSProperties["margin"]) => {
|
|
11734
|
+
marginTop: Property.Margin | undefined;
|
|
11735
|
+
marginBottom: Property.Margin | undefined;
|
|
11755
11736
|
};
|
|
11756
|
-
square: (value:
|
|
11757
|
-
width:
|
|
11758
|
-
height:
|
|
11737
|
+
square: (value: CSSProperties["width"]) => {
|
|
11738
|
+
width: Property.Width | undefined;
|
|
11739
|
+
height: Property.Width | undefined;
|
|
11759
11740
|
};
|
|
11760
11741
|
_hover: (css: CSSProperties) => {
|
|
11761
11742
|
'&:hover, &[data-hovered]': CSSProperties$1;
|
|
@@ -12722,25 +12703,25 @@ declare const keyframes: (style: {
|
|
|
12722
12703
|
readonly width: "sizes";
|
|
12723
12704
|
readonly zIndex: "z-indices";
|
|
12724
12705
|
}, {
|
|
12725
|
-
paddingX: (value:
|
|
12726
|
-
paddingLeft:
|
|
12727
|
-
paddingRight:
|
|
12706
|
+
paddingX: (value: CSSProperties["padding"]) => {
|
|
12707
|
+
paddingLeft: OnlyStringNumeric | undefined;
|
|
12708
|
+
paddingRight: OnlyStringNumeric | undefined;
|
|
12728
12709
|
};
|
|
12729
|
-
paddingY: (value:
|
|
12730
|
-
paddingTop:
|
|
12731
|
-
paddingBottom:
|
|
12710
|
+
paddingY: (value: CSSProperties["padding"]) => {
|
|
12711
|
+
paddingTop: OnlyStringNumeric | undefined;
|
|
12712
|
+
paddingBottom: OnlyStringNumeric | undefined;
|
|
12732
12713
|
};
|
|
12733
|
-
marginX: (value:
|
|
12734
|
-
marginLeft:
|
|
12735
|
-
marginRight:
|
|
12714
|
+
marginX: (value: CSSProperties["margin"]) => {
|
|
12715
|
+
marginLeft: Property.Margin | undefined;
|
|
12716
|
+
marginRight: Property.Margin | undefined;
|
|
12736
12717
|
};
|
|
12737
|
-
marginY: (value:
|
|
12738
|
-
marginTop:
|
|
12739
|
-
marginBottom:
|
|
12718
|
+
marginY: (value: CSSProperties["margin"]) => {
|
|
12719
|
+
marginTop: Property.Margin | undefined;
|
|
12720
|
+
marginBottom: Property.Margin | undefined;
|
|
12740
12721
|
};
|
|
12741
|
-
square: (value:
|
|
12742
|
-
width:
|
|
12743
|
-
height:
|
|
12722
|
+
square: (value: CSSProperties["width"]) => {
|
|
12723
|
+
width: Property.Width | undefined;
|
|
12724
|
+
height: Property.Width | undefined;
|
|
12744
12725
|
};
|
|
12745
12726
|
_hover: (css: CSSProperties) => {
|
|
12746
12727
|
'&:hover, &[data-hovered]': CSSProperties$1;
|