import { createStrictAPI, type CSSPseudos, type StrictCSSProperties, type XCSSAllProperties, type XCSSAllPseudos } from '@compiled/react'; import { type DesignTokenStyles } from '@atlaskit/tokens/css-type-schema'; export { jsx } from '@compiled/react'; type MediaQuery = '(min-width: 30rem)' | '(min-width: 48rem)' | '(min-width: 64rem)' | '(min-width: 90rem)' | '(min-width: 110.5rem)' | 'not all and (min-width: 30rem)' | 'not all and (min-width: 48rem)' | 'not all and (min-width: 64rem)' | 'not all and (min-width: 90rem)' | 'not all and (min-width: 110.5rem)' | '(min-width: 0rem) and (max-width: 29.99rem)' | '(min-width: 30rem) and (max-width: 47.99rem)' | '(min-width: 48rem) and (max-width: 63.99rem)' | '(min-width: 64rem) and (max-width: 89.99rem)' | '(min-width: 90rem) and (max-width: 110.49rem)' | '(prefers-reduced-motion: reduce)' | 'screen and (forced-colors: active), screen and (-ms-high-contrast: active)'; declare const strictApi: ReturnType>; export declare const css: typeof strictApi.css; export declare const cssMap: typeof strictApi.cssMap; export declare const cx: typeof strictApi.cx; declare const XCSSProp: typeof strictApi.XCSSProp; export type { XCSSAllProperties, XCSSAllPseudos }; type LocalXCSSProp = ReturnType>; /** * ## StrictXCSSProp * * Declare styles your component takes with all other styles marked as violations * by the TypeScript compiler. There are two primary use cases for xcss prop: * * - safe style overrides * - inverting style declarations * * Interverting style declarations is interesting for platform teams as * it means apps only pay for styles they use as they're now the ones who declare * the styles! * * The {@link StrictXCSSProp} type has generics two of which must be defined — use to explicitly * set what you want to maintain as API. Use {@link XCSSAllProperties} and {@link XCSSAllPseudos} * to enable all properties and pseudos. * * The third generic is used to declare what properties and pseudos should be required. * * ```tsx * interface MyComponentProps { * // Color is accepted, all other properties / pseudos are considered violations. * xcss?: StrictXCSSProp<'color', never>; * * // Only background color and hover pseudo are accepted. * xcss?: StrictXCSSProp<'backgroundColor', '&:hover'>; * * // All properties are accepted, all pseudos are considered violations. * xcss?: StrictXCSSProp; * * // All properties are accepted, only the hover pseudo is accepted. * xcss?: StrictXCSSProp; * * // The xcss prop is required as well as the color property. No pseudos are required. * xcss: StrictXCSSProp< * XCSSAllProperties, * '&:hover', * { requiredProperties: 'color', requiredPseudos: never } * >; * } * * function MyComponent({ xcss }: MyComponentProps) { * return
* } * ``` * * The xcss prop works with static inline objects and the [cssMap](https://compiledcssinjs.com/docs/api-cssmap) API. * * ```jsx * // Declared as an inline object * * * // Declared with the cssMap API * const styles = cssMap({ text: { color: 'var(--ds-text)' } }); * * ``` * * To concatenate and conditonally apply styles use the {@link cssMap} and {@link cx} functions. */ export type StrictXCSSProp = LocalXCSSProp;