@workday/canvas-kit-preview-react
Version:
Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.
117 lines • 5.5 kB
TypeScript
import React from 'react';
import { ExtractProps } from '@workday/canvas-kit-react/common';
import { ExtractStencilProps } from '@workday/canvas-kit-styling';
import { Flex } from '@workday/canvas-kit-react/layout';
/**
* @deprecated This is being deprecated and will be removed in a future release. Use
* `StatusIndicatorProps['variant']` instead.
*/
export type StatusIndicatorVariant = 'info' | 'neutral' | 'caution' | 'positive' | 'critical' | 'ai' | 'transparent' | 'blue' | 'green' | 'orange' | 'red' | 'gray';
export interface StatusIndicatorProps extends ExtractProps<typeof Flex, never>, Omit<ExtractStencilProps<typeof statusIndicatorStencil>, 'variant'> {
/**
* Defines the color of the `StatusIndicator`.
* * `info` | `blue` - Uses the info system color and is used for informational status indications
* * `positive` | `green` - Uses the positive system color and is used for positive status indications
* * `caution` | `orange` - Uses the caution system color and is used for warnings or required actions
* * `critical` | `red` - Uses the error system color and is used for critical or negative status indications
* * `neutral` | `gray` - Uses the neutral system color and generally doesn't have positive or negative connotations
* * `illuminate` - Uses the AI system color and is used for AI generated content
* * `transparent` - Uses the transparent system color and is used for overlays on top of images or videos
*
* @default 'neutral'
*/
variant?: StatusIndicatorVariant;
/**
* Children of the `StatusIndicator`. Can contain a `StatusIndicator.Label` and optionally a `StatusIndicator.Icon`.
*/
children: React.ReactNode;
}
declare const statusIndicatorStencil: import("@workday/canvas-kit-styling").Stencil<{
/**
* Defines the color of the `StatusIndicator`.
* * `info` | `blue` - Uses the info system color and is used for informational status indications
* * `positive` | `green` - Uses the positive system color and is used for positive status indications
* * `caution` | `orange` - Uses the caution system color and is used for warnings or required actions
* * `critical` | `red` - Uses the error system color and is used for critical or negative status indications
* * `neutral` | `gray` - Uses the neutral system color and generally doesn't have positive or negative connotations
* * `illuminate` - Uses the AI system color and is used for AI generated content
* * `transparent` - Uses the transparent system color and is used for overlays on top of images or videos
*
* @default 'neutral'
*/
variant: {
info: {
color: "--cnvs-sys-color-fg-info-strong";
backgroundColor: "--cnvs-sys-color-bg-info-softer";
};
positive: {
color: "--cnvs-sys-color-fg-positive-strong";
backgroundColor: "--cnvs-sys-color-fg-positive-softer";
};
caution: {
color: "--cnvs-sys-color-fg-caution-soft";
backgroundColor: "--cnvs-sys-color-bg-caution-softer";
};
critical: {
color: "--cnvs-sys-color-fg-critical-strong";
backgroundColor: "--cnvs-sys-color-bg-critical-softer";
};
neutral: {
color: "--cnvs-sys-color-fg-muted-strong";
backgroundColor: "--cnvs-sys-color-bg-alt-default";
};
ai: {
color: "--cnvs-sys-color-fg-ai";
backgroundColor: "--cnvs-sys-color-bg-ai-default";
};
transparent: {
color: "--cnvs-sys-color-fg-inverse";
backgroundColor: "--cnvs-sys-color-bg-translucent";
};
};
/**
* Defines the emphasis of the `StatusIndicator`. `low` should be used in almost all cases.
* `high` is being deprecated and will be removed in a future release.
* * `low` - Normal emphasis and will visually fit in with other components.
* * `high` - High emphasis has been used to make the `StatusIndicator` stand out more, but
* tends to overpower other components. It will be removed and should not be used.
*
* @default 'low'
*
*/
emphasis: {
low: {};
high: {};
};
}, {}, {}, never, never>;
/**
* `StatusIndicator` is a container component has a default maximum width of `200px`.
*
* ```tsx
* <StatusIndicator variant="info">
* {Child components}
* </StatusIndicator>
* ```
*/
export declare const StatusIndicator: import("@workday/canvas-kit-react/common").ElementComponent<"div", StatusIndicatorProps> & {
/**
* `StatusIndicator.Label` will apply an ellipsis if its contents exceed the component's maximum
* width.
*
* ```tsx
* <StatusIndicator.Label>{The text to be rendered}</StatusIndicator.Label>
* ```
*/
Label: import("@workday/canvas-kit-react/common").ElementComponent<"span", import("./StatusIndicatorLabel").StatusIndicatorLabelProps>;
/**
* `StatusIndicator.Icon` renders {@link SystemIcon} under the hood. It's used as a decorative
* element to visually support the {@link StatusIndicatorLabel StatusIndicator.Label} text.
*
* ```tsx
* <StatusIndicator.Icon icon={uploadCloudIcon} />
* ```
*/
Icon: import("@workday/canvas-kit-react/common").ElementComponent<"span", import("@workday/canvas-kit-react/icon").SystemIconProps>;
};
export {};
//# sourceMappingURL=StatusIndicator.d.ts.map