/** * Copyright 2019, SumUp Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** @jsxImportSource @emotion/react */ import { type SerializedStyles } from '@emotion/react'; import type { Theme } from '@sumup-oss/design-tokens'; type ThemeArgs = Theme | { theme: Theme; }; type StyleFn = ((theme: Theme) => SerializedStyles) | ((args: ThemeArgs) => SerializedStyles) | SerializedStyles | false | null | undefined; /** * @deprecated Migrate to CSS Modules and use the `clsx` helper to join class names instead. * * Helper to pass multiple style mixins to the `css` prop. * Mixins can be applied conditionally, falsy values are omitted. */ export declare const cx: (...styleFns: StyleFn[]) => (theme: Theme) => (SerializedStyles | false | null | undefined)[]; type Spacing = keyof Theme['spacings']; export type SpacingValue = Spacing | 'auto' | 0; type SpacingObject = { top?: SpacingValue; bottom?: SpacingValue; right?: SpacingValue; left?: SpacingValue; }; /** * Adds margin to one or more sides of an element. */ export declare const spacing: (size: SpacingValue | SpacingObject) => ((args: ThemeArgs) => SerializedStyles); /** * @deprecated * * Adds a drop shadow to an element to visually elevate it above the * surrounding content. */ export declare function shadow(): SerializedStyles; /** * @deprecated Use the `--cui-body--font-size` and `--cui-body--line-height` CSS custom properties instead. * * Sets the font size and line height matching the Body component. */ export declare function typography(size: keyof Theme['typography']['body']): (args: ThemeArgs) => SerializedStyles; /** * @deprecated Use the `disabled` state of the semantic color tokens instead. * * Visually communicates to the user that an element is disabled * and prevents user interactions. */ export declare const disableVisually: () => SerializedStyles; /** * @deprecated Use the `utilClasses.hideVisually` class name instead. * * Visually hides an element while keeping it accessible to users * who rely on a screen reader. */ export declare const hideVisually: () => SerializedStyles; /** * @deprecated Use the `utilClasses.center` class name instead. * * Centers the content horizontally and vertically. */ export declare const center: () => SerializedStyles; /** * @deprecated Use the `utilClasses.focusVisible` or `utilClasses.focusVisibleInset` class names instead. * * Visually communicates to the user that an element is focused. */ export declare function focusOutline(options?: 'inset' | ThemeArgs): SerializedStyles; /** * @deprecated Use the `utilClasses.focusVisible` or `utilClasses.focusVisibleInset` class names instead. * * Visually communicates to the user that an element is focused when * the user agent determines via heuristics that the focus should be * made evident on the element. */ export declare function focusVisible(options?: 'inset' | ThemeArgs): SerializedStyles; /** * @deprecated * * Forces an element to self-clear its floated children. * Taken from [CSS Tricks](https://css-tricks.com/clearfix-a-lesson-in-web-development-evolution/). */ export declare const clearfix: () => SerializedStyles; /** * @deprecated Use the `utilClasses.hideScrollbar` class name instead. * * Hides the browser scrollbar on a scrollable element, e.g. with overflow. */ export declare const hideScrollbar: () => SerializedStyles; /** * Visually communicates to the user that an element is hovered, focused, or * active in the disabled, invalid, and warning states. */ export declare const inputOutline: (options: { disabled?: boolean; invalid?: boolean; hasWarning?: boolean; }) => SerializedStyles; export {};