cekat-ui 1.2.0 → 1.2.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/components/Alert/Alert.d.ts +6 -0
- package/dist/components/Alert/alert.styles.d.ts +47 -0
- package/dist/components/Alert/alert.types.d.ts +46 -0
- package/dist/components/Alert/index.d.ts +3 -0
- package/dist/components/Button/Button.d.ts +7 -1
- package/dist/components/Button/button.types.d.ts +2 -1
- package/dist/components/Input/Input.d.ts +7 -1
- package/dist/components/Textarea/textarea.styles.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +1193 -912
- package/dist/index.umd.js +1 -1
- package/dist/style.css +163 -0
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AlertProps } from './alert.types';
|
|
2
|
+
declare const Alert: {
|
|
3
|
+
({ title, description, color, layout, background, icon, iconVariant, showIcon, primaryAction, secondaryAction, actionVariant, actions, onClose, closeLabel, className, ...props }: AlertProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default Alert;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { AlertColor } from './alert.types';
|
|
2
|
+
export declare const alertStyles: (props?: {
|
|
3
|
+
layout?: "full-width" | "floating";
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Per-color surfaces. `surface`/`border` are only applied when the alert opts into
|
|
7
|
+
* `background="light"`; otherwise the card stays white with a neutral border.
|
|
8
|
+
*/
|
|
9
|
+
export declare const alertColorStyles: Record<AlertColor, {
|
|
10
|
+
/** Card fill for `background="light"`. */
|
|
11
|
+
surface: string;
|
|
12
|
+
/** Card border for `background="light"`. */
|
|
13
|
+
border: string;
|
|
14
|
+
/** Featured icon fill on a white card. */
|
|
15
|
+
iconSurface: string;
|
|
16
|
+
/** Featured icon fill on a tinted card, so the badge stays readable. */
|
|
17
|
+
iconSurfaceOnLight: string;
|
|
18
|
+
iconText: string;
|
|
19
|
+
}>;
|
|
20
|
+
/** Card fill/border used when `background="white"` (the Figma default). */
|
|
21
|
+
export declare const alertWhiteSurfaceStyles = "bg-white border-light-200";
|
|
22
|
+
/** Inner max-width container, only used by the `full-width` layout. */
|
|
23
|
+
export declare const alertContainerStyles = "relative mx-auto flex w-full max-w-[1280px] flex-col gap-4 px-4 py-4 sm:flex-row sm:items-center sm:gap-3 sm:px-8 sm:py-3";
|
|
24
|
+
export declare const featuredIconStyles: (props?: {
|
|
25
|
+
layout?: "full-width" | "floating";
|
|
26
|
+
shape?: "square" | "circle";
|
|
27
|
+
variant?: "plain" | "featured";
|
|
28
|
+
} & import('class-variance-authority/types').ClassProp) => string;
|
|
29
|
+
export declare const alertContentStyles: (props?: {
|
|
30
|
+
layout?: "full-width" | "floating";
|
|
31
|
+
} & import('class-variance-authority/types').ClassProp) => string;
|
|
32
|
+
export declare const alertTextStyles: (props?: {
|
|
33
|
+
layout?: "full-width" | "floating";
|
|
34
|
+
closable?: boolean;
|
|
35
|
+
} & import('class-variance-authority/types').ClassProp) => string;
|
|
36
|
+
export declare const alertTitleStyles = "text-caption-lg font-bold text-light-800";
|
|
37
|
+
export declare const alertDescriptionStyles = "text-caption-lg text-light-600";
|
|
38
|
+
export declare const alertActionsStyles: (props?: {
|
|
39
|
+
layout?: "full-width" | "floating";
|
|
40
|
+
actionVariant?: "link" | "button";
|
|
41
|
+
} & import('class-variance-authority/types').ClassProp) => string;
|
|
42
|
+
export declare const alertLinkActionStyles: (props?: {
|
|
43
|
+
emphasis?: "primary" | "secondary";
|
|
44
|
+
} & import('class-variance-authority/types').ClassProp) => string;
|
|
45
|
+
export declare const alertCloseButtonStyles: (props?: {
|
|
46
|
+
layout?: "full-width" | "floating";
|
|
47
|
+
} & import('class-variance-authority/types').ClassProp) => string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type AlertColor = "default" | "brand" | "gray" | "error" | "warning" | "success";
|
|
3
|
+
/** Figma "Size" variant: a rounded floating card, or an edge-to-edge page banner. */
|
|
4
|
+
export type AlertLayout = "floating" | "full-width";
|
|
5
|
+
/**
|
|
6
|
+
* Card surface. `white` is the Figma default; `light` tints the card with the
|
|
7
|
+
* light shade of the current `color`.
|
|
8
|
+
*/
|
|
9
|
+
export type AlertBackground = "white" | "light";
|
|
10
|
+
export type AlertActionVariant = "link" | "button";
|
|
11
|
+
/**
|
|
12
|
+
* `featured` wraps the icon in the Figma "Featured icon" badge (fixed size, tinted
|
|
13
|
+
* fill, rounded shape). `plain` drops the badge so a custom illustration can be
|
|
14
|
+
* dropped straight in at its own size.
|
|
15
|
+
*/
|
|
16
|
+
export type AlertIconVariant = "featured" | "plain";
|
|
17
|
+
export interface AlertAction {
|
|
18
|
+
label: React.ReactNode;
|
|
19
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
20
|
+
}
|
|
21
|
+
export interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "color"> {
|
|
22
|
+
title: React.ReactNode;
|
|
23
|
+
/** Supporting text rendered under (floating) or beside (full-width) the title. */
|
|
24
|
+
description?: React.ReactNode;
|
|
25
|
+
color?: AlertColor;
|
|
26
|
+
layout?: AlertLayout;
|
|
27
|
+
/** Set to `light` to fill the card with the light shade of `color`. Defaults to `white`. */
|
|
28
|
+
background?: AlertBackground;
|
|
29
|
+
/** Overrides the default featured icon for the current `color`. */
|
|
30
|
+
icon?: React.ReactNode;
|
|
31
|
+
/** Set to `plain` to render `icon` without the featured-icon badge. Defaults to `featured`. */
|
|
32
|
+
iconVariant?: AlertIconVariant;
|
|
33
|
+
showIcon?: boolean;
|
|
34
|
+
/** Emphasised action, e.g. "View changes". */
|
|
35
|
+
primaryAction?: AlertAction;
|
|
36
|
+
/** Low-emphasis action, e.g. "Dismiss". */
|
|
37
|
+
secondaryAction?: AlertAction;
|
|
38
|
+
/** Defaults to `link` for `floating` and `button` for `full-width`. */
|
|
39
|
+
actionVariant?: AlertActionVariant;
|
|
40
|
+
/** Replaces the rendered actions entirely, ignoring `primaryAction`/`secondaryAction`. */
|
|
41
|
+
actions?: React.ReactNode;
|
|
42
|
+
/** Renders the close (X) button when provided. */
|
|
43
|
+
onClose?: () => void;
|
|
44
|
+
closeLabel?: string;
|
|
45
|
+
className?: string;
|
|
46
|
+
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { ButtonProps } from './button.types';
|
|
2
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Forwards its ref to the underlying `<button>`, so callers can focus or measure it
|
|
5
|
+
* and so libraries that clone the trigger and attach a ref — Tippy, Radix, and the
|
|
6
|
+
* like — can use a `Button` directly as their child.
|
|
7
|
+
*/
|
|
8
|
+
declare const ButtonBase: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
3
9
|
export default ButtonBase;
|
|
@@ -11,7 +11,8 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
11
11
|
export interface ButtonSubComponentProps {
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
/** `ForwardRefExoticComponent` rather than `FC`: the base forwards a ref to its `<button>`. */
|
|
15
|
+
export type ButtonCompound = React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>> & {
|
|
15
16
|
Icon: React.FC<ButtonSubComponentProps>;
|
|
16
17
|
Text: React.FC<ButtonSubComponentProps>;
|
|
17
18
|
};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { InputProps } from './input.types';
|
|
2
|
-
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Forwards its ref to the inner `<input>`, so callers can focus, select, or measure
|
|
5
|
+
* the field — inline-edit affordances and autofocus need this.
|
|
6
|
+
*/
|
|
7
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
8
|
+
export default Input;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const textareaWrapperStyles = "flex flex-col gap-1 w-full
|
|
1
|
+
export declare const textareaWrapperStyles = "flex flex-col gap-1 w-full";
|
|
2
2
|
export declare const textareaLabelStyles: (props?: {
|
|
3
3
|
error?: boolean;
|
|
4
4
|
} & import('class-variance-authority/types').ClassProp) => string;
|
package/dist/index.d.ts
CHANGED