@996-design/996-ui 0.1.0

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.
Files changed (110) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE.md +35 -0
  3. package/README.md +31 -0
  4. package/dist/cjs/index.cjs +4228 -0
  5. package/dist/cjs/index.cjs.map +41 -0
  6. package/dist/cjs/legacy-index.cjs +17297 -0
  7. package/dist/cjs/legacy-index.cjs.map +96 -0
  8. package/dist/cjs/pro/index.cjs +8544 -0
  9. package/dist/cjs/pro/index.cjs.map +35 -0
  10. package/dist/esm/index.js +4063 -0
  11. package/dist/esm/index.js.map +41 -0
  12. package/dist/esm/legacy-index.js +17294 -0
  13. package/dist/esm/legacy-index.js.map +96 -0
  14. package/dist/esm/pro/index.js +8554 -0
  15. package/dist/esm/pro/index.js.map +35 -0
  16. package/dist/styles.css +5816 -0
  17. package/dist/theme.css +601 -0
  18. package/dist/types/ConfigProvider.d.ts +195 -0
  19. package/dist/types/antd-theme.d.ts +12 -0
  20. package/dist/types/components/Alert.d.ts +51 -0
  21. package/dist/types/components/Avatar.d.ts +44 -0
  22. package/dist/types/components/Badge.d.ts +31 -0
  23. package/dist/types/components/Breadcrumb.d.ts +45 -0
  24. package/dist/types/components/Button.d.ts +42 -0
  25. package/dist/types/components/ButtonGroup.d.ts +13 -0
  26. package/dist/types/components/Card.d.ts +55 -0
  27. package/dist/types/components/Carousel.d.ts +70 -0
  28. package/dist/types/components/Checkbox.d.ts +43 -0
  29. package/dist/types/components/Collapse.d.ts +23 -0
  30. package/dist/types/components/ColorPicker.d.ts +143 -0
  31. package/dist/types/components/DataDisplayPrimitives.d.ts +205 -0
  32. package/dist/types/components/DataEntryPrimitives.d.ts +454 -0
  33. package/dist/types/components/Divider.d.ts +24 -0
  34. package/dist/types/components/Drawer.d.ts +68 -0
  35. package/dist/types/components/Dropdown.d.ts +41 -0
  36. package/dist/types/components/Empty.d.ts +14 -0
  37. package/dist/types/components/EmptyState.d.ts +6 -0
  38. package/dist/types/components/FeedbackPrimitives.d.ts +102 -0
  39. package/dist/types/components/Form.d.ts +67 -0
  40. package/dist/types/components/GameCover.d.ts +8 -0
  41. package/dist/types/components/Grid.d.ts +50 -0
  42. package/dist/types/components/Icon.d.ts +13 -0
  43. package/dist/types/components/IconButton.d.ts +14 -0
  44. package/dist/types/components/Input.d.ts +110 -0
  45. package/dist/types/components/InputNumber.d.ts +29 -0
  46. package/dist/types/components/LayoutPrimitives.d.ts +130 -0
  47. package/dist/types/components/List.d.ts +64 -0
  48. package/dist/types/components/Masonry.d.ts +43 -0
  49. package/dist/types/components/MenuList.d.ts +24 -0
  50. package/dist/types/components/Message.d.ts +58 -0
  51. package/dist/types/components/MessageToast.d.ts +27 -0
  52. package/dist/types/components/Modal.d.ts +123 -0
  53. package/dist/types/components/NavigationPrimitives.d.ts +73 -0
  54. package/dist/types/components/OtherPrimitives.d.ts +36 -0
  55. package/dist/types/components/Pagination.d.ts +18 -0
  56. package/dist/types/components/Panel.d.ts +8 -0
  57. package/dist/types/components/Popconfirm.d.ts +18 -0
  58. package/dist/types/components/Popover.d.ts +10 -0
  59. package/dist/types/components/PriceText.d.ts +9 -0
  60. package/dist/types/components/Progress.d.ts +57 -0
  61. package/dist/types/components/ProgressBar.d.ts +8 -0
  62. package/dist/types/components/ProgressButton.d.ts +9 -0
  63. package/dist/types/components/Radio.d.ts +67 -0
  64. package/dist/types/components/Rate.d.ts +17 -0
  65. package/dist/types/components/Result.d.ts +11 -0
  66. package/dist/types/components/SectionHeader.d.ts +11 -0
  67. package/dist/types/components/Segmented.d.ts +41 -0
  68. package/dist/types/components/SegmentedTabs.d.ts +42 -0
  69. package/dist/types/components/SelectInput.d.ts +33 -0
  70. package/dist/types/components/Skeleton.d.ts +54 -0
  71. package/dist/types/components/Slider.d.ts +48 -0
  72. package/dist/types/components/Spin.d.ts +21 -0
  73. package/dist/types/components/Splitter.d.ts +7 -0
  74. package/dist/types/components/StatCard.d.ts +10 -0
  75. package/dist/types/components/Statistic.d.ts +48 -0
  76. package/dist/types/components/StatusItem.d.ts +12 -0
  77. package/dist/types/components/Steps.d.ts +40 -0
  78. package/dist/types/components/Switch.d.ts +41 -0
  79. package/dist/types/components/Table.d.ts +61 -0
  80. package/dist/types/components/Tabs.d.ts +50 -0
  81. package/dist/types/components/Tag.d.ts +52 -0
  82. package/dist/types/components/TagPill.d.ts +7 -0
  83. package/dist/types/components/Tooltip.d.ts +64 -0
  84. package/dist/types/components/Typography.d.ts +374 -0
  85. package/dist/types/components/affix/utils.d.ts +10 -0
  86. package/dist/types/components/feedback/FloatButton.d.ts +51 -0
  87. package/dist/types/components/feedback/Watermark.d.ts +33 -0
  88. package/dist/types/components/feedback/globalHolder.d.ts +17 -0
  89. package/dist/types/components/form/statusContext.d.ts +18 -0
  90. package/dist/types/components/form/statusContext.type-smoke.d.ts +24 -0
  91. package/dist/types/components/splitter/Panel.d.ts +6 -0
  92. package/dist/types/components/splitter/SplitBar.d.ts +32 -0
  93. package/dist/types/components/splitter/interface.d.ts +89 -0
  94. package/dist/types/components/splitter/sizeUtil.d.ts +5 -0
  95. package/dist/types/components/splitter/useItems.d.ts +3 -0
  96. package/dist/types/components/splitter/useResizable.d.ts +9 -0
  97. package/dist/types/components/splitter/useResize.d.ts +9 -0
  98. package/dist/types/components/splitter/useSizes.d.ts +11 -0
  99. package/dist/types/components/table/columnState.d.ts +36 -0
  100. package/dist/types/components/table/pagination.d.ts +34 -0
  101. package/dist/types/components/table/selection.d.ts +23 -0
  102. package/dist/types/components/table/types.d.ts +163 -0
  103. package/dist/types/hooks/useReducedMotion.d.ts +1 -0
  104. package/dist/types/index.d.ts +44 -0
  105. package/dist/types/legacy-index.d.ts +136 -0
  106. package/dist/types/pro/index.d.ts +17 -0
  107. package/dist/types/tokens.d.ts +266 -0
  108. package/dist/types/utils/cn.d.ts +3 -0
  109. package/dist/types/utils/slots.d.ts +5 -0
  110. package/package.json +126 -0
@@ -0,0 +1,42 @@
1
+ import type { ReactNode } from "react";
2
+ import type { SegmentedLabeledOption, SegmentedProps, SegmentedSize, SegmentedValue } from "./Segmented";
3
+ export type SegmentedTabSize = SegmentedSize;
4
+ export type SegmentedTabAppearance = "boxed" | "glow-pill" | "plain" | "segmented";
5
+ /**
6
+ * @deprecated Use `SegmentedTabAppearance`. This alias only selects a legacy
7
+ * Segmented visual and does not provide Tabs behavior.
8
+ */
9
+ export type SegmentedTabsType = "line" | "boxed" | "segmented" | "glow-pill";
10
+ /**
11
+ * @deprecated SegmentedTabs does not render a Tabs indicator. This type is
12
+ * retained only for the legacy `indicator` visual adapter.
13
+ */
14
+ export type SegmentedTabIndicator = "ink" | "none";
15
+ export interface SegmentedTabItem<T extends SegmentedValue> extends Omit<SegmentedLabeledOption<T>, "label" | "value"> {
16
+ readonly id: T;
17
+ readonly label: ReactNode;
18
+ }
19
+ export interface SegmentedTabsProps<T extends SegmentedValue = SegmentedValue> extends Omit<SegmentedProps<T>, "items" | "options" | "shape" | "size"> {
20
+ /** 996-owned visual treatment over the Segmented selection control. */
21
+ readonly appearance?: SegmentedTabAppearance;
22
+ /**
23
+ * @deprecated SegmentedTabs does not expose Tabs animation contracts.
24
+ * `false` only disables the legacy rc-segmented thumb transition class.
25
+ */
26
+ readonly animated?: boolean;
27
+ /** @deprecated Use the native Segmented `block` prop. */
28
+ readonly fullWidth?: boolean;
29
+ /**
30
+ * @deprecated SegmentedTabs does not render a Tabs indicator. `none` only
31
+ * suppresses the rc-segmented thumb for the plain legacy appearance.
32
+ */
33
+ readonly indicator?: SegmentedTabIndicator;
34
+ readonly items: readonly SegmentedTabItem<T>[];
35
+ readonly size?: SegmentedTabSize;
36
+ /**
37
+ * @deprecated Use `appearance`. This prop is a visual compatibility adapter
38
+ * only and does not provide Tabs type or pane behavior.
39
+ */
40
+ readonly type?: SegmentedTabsType;
41
+ }
42
+ export declare function SegmentedTabs<T extends SegmentedValue>(props: SegmentedTabsProps<T>): import("react").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import type { ReactNode } from "react";
2
+ import type { SlotClassNames, SlotStyles } from "../utils/slots";
3
+ import type { InputProps, InputSize, InputStatus, InputVariant } from "./Input";
4
+ export interface SelectInputOption {
5
+ readonly disabled?: boolean;
6
+ readonly label: ReactNode;
7
+ readonly suffix?: ReactNode;
8
+ readonly value: string;
9
+ }
10
+ type SelectInputSlot = "root" | "input" | "popup" | "option" | "suffix";
11
+ export interface SelectInputProps extends Omit<InputProps, "classNames" | "onChange" | "styles" | "suffix" | "value"> {
12
+ readonly activeFirstOption?: boolean;
13
+ readonly activeValue?: string;
14
+ readonly classNames?: SlotClassNames<SelectInputSlot>;
15
+ readonly defaultValue?: string;
16
+ readonly defaultPopupOpen?: boolean;
17
+ readonly displayValue?: string;
18
+ readonly onChange?: (value: string, option?: SelectInputOption) => void;
19
+ readonly onPopupOpenChange?: (open: boolean) => void;
20
+ readonly options: readonly SelectInputOption[];
21
+ readonly popupMatchInputWidth?: boolean;
22
+ readonly popupOffset?: number;
23
+ readonly popupOpen?: boolean;
24
+ readonly placeholder?: string;
25
+ readonly size?: InputSize;
26
+ readonly status?: InputStatus;
27
+ readonly styles?: SlotStyles<SelectInputSlot>;
28
+ readonly suffixIcon?: ReactNode;
29
+ readonly value?: string;
30
+ readonly variant?: InputVariant;
31
+ }
32
+ export declare function SelectInput({ activeFirstOption, activeValue, allowClear, autoFocus, className, classNames, defaultPopupOpen, defaultValue, disabled, displayValue, id, onBlur, onChange, onClick, onFocus, onKeyDown, onPopupOpenChange, options, placeholder, popupMatchInputWidth, popupOffset, popupOpen, prefix, size, status, style, styles, suffixIcon, tabIndex, title, value, variant, }: SelectInputProps): import("react").JSX.Element;
33
+ export {};
@@ -0,0 +1,54 @@
1
+ import type { CSSProperties, ReactNode } from "react";
2
+ import type { SlotClassNames, SlotStyles } from "../utils/slots";
3
+ type SkeletonSlot = "root" | "header" | "avatar" | "section" | "title" | "paragraph" | "row" | "element";
4
+ export type SkeletonSize = "small" | "medium" | "middle" | "default" | "large" | "sm" | "md" | "lg" | number;
5
+ export type SkeletonShape = "circle" | "square" | "round" | "default";
6
+ export interface SkeletonProps {
7
+ readonly active?: boolean;
8
+ readonly avatar?: boolean | {
9
+ readonly size?: SkeletonSize;
10
+ readonly shape?: "circle" | "square";
11
+ };
12
+ readonly children?: ReactNode;
13
+ readonly className?: string;
14
+ readonly classNames?: SlotClassNames<SkeletonSlot>;
15
+ readonly loading?: boolean;
16
+ readonly paragraph?: boolean | {
17
+ readonly rows?: number;
18
+ readonly width?: number | string | readonly (number | string)[];
19
+ };
20
+ readonly round?: boolean;
21
+ readonly style?: CSSProperties;
22
+ readonly styles?: SlotStyles<SkeletonSlot>;
23
+ readonly title?: boolean | {
24
+ readonly width?: number | string;
25
+ };
26
+ }
27
+ export interface SkeletonElementProps {
28
+ readonly active?: boolean;
29
+ readonly className?: string;
30
+ readonly shape?: SkeletonShape;
31
+ readonly size?: SkeletonSize;
32
+ readonly style?: CSSProperties;
33
+ }
34
+ export interface SkeletonButtonProps extends SkeletonElementProps {
35
+ readonly block?: boolean;
36
+ }
37
+ declare function SkeletonElement({ active, className, shape, size, style, }: SkeletonElementProps): import("react").JSX.Element;
38
+ declare function SkeletonButton({ active, block, className, shape, size, style, }: SkeletonButtonProps): import("react").JSX.Element;
39
+ declare function SkeletonAvatar(props: SkeletonElementProps): import("react").JSX.Element;
40
+ declare function SkeletonInput({ active, block, className, size, style, }: SkeletonButtonProps): import("react").JSX.Element;
41
+ declare function SkeletonImage({ active, className, style }: SkeletonElementProps): import("react").JSX.Element;
42
+ declare function SkeletonNode({ active, children, className, style, }: SkeletonElementProps & {
43
+ readonly children?: ReactNode;
44
+ }): import("react").JSX.Element;
45
+ declare function SkeletonRoot({ active, avatar, children, className, classNames, loading, paragraph, round, style, styles, title, }: SkeletonProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null;
46
+ export declare const Skeleton: typeof SkeletonRoot & {
47
+ Avatar: typeof SkeletonAvatar;
48
+ Button: typeof SkeletonButton;
49
+ Element: typeof SkeletonElement;
50
+ Image: typeof SkeletonImage;
51
+ Input: typeof SkeletonInput;
52
+ Node: typeof SkeletonNode;
53
+ };
54
+ export {};
@@ -0,0 +1,48 @@
1
+ import type { SliderProps as RcSliderProps, SliderRef as RcSliderRef } from "@rc-component/slider";
2
+ import type { CSSProperties, ReactElement, ReactNode, RefAttributes } from "react";
3
+ import type { TooltipProps } from "./Tooltip";
4
+ export type SliderValue = number | number[];
5
+ export type SliderRef = RcSliderRef;
6
+ export type SliderMarks = RcSliderProps["marks"];
7
+ export type SliderFormatter = ((value?: number) => ReactNode) | null;
8
+ export type SliderSemanticSlot = "root" | "tracks" | "track" | "rail" | "handle";
9
+ type SliderSemanticClassNameMap = Partial<Record<SliderSemanticSlot, string>>;
10
+ type SliderSemanticStyleMap = Partial<Record<SliderSemanticSlot, CSSProperties>>;
11
+ export type SliderClassNames = SliderSemanticClassNameMap | ((info: {
12
+ props: SliderProps<SliderValue>;
13
+ }) => SliderSemanticClassNameMap);
14
+ export type SliderStyles = SliderSemanticStyleMap | ((info: {
15
+ props: SliderProps<SliderValue>;
16
+ }) => SliderSemanticStyleMap);
17
+ export interface SliderTooltipProps extends Omit<TooltipProps, "children" | "title"> {
18
+ readonly formatter?: SliderFormatter;
19
+ }
20
+ export type SliderProps<ValueType extends SliderValue = number> = Omit<RcSliderProps<ValueType>, "classNames" | "prefixCls" | "styles"> & {
21
+ readonly classNames?: SliderClassNames;
22
+ readonly orientation?: "horizontal" | "vertical";
23
+ readonly rootClassName?: string;
24
+ readonly styles?: SliderStyles;
25
+ readonly tooltip?: SliderTooltipProps;
26
+ /** @deprecated Use `tooltip.formatter`. */
27
+ readonly tipFormatter?: SliderFormatter;
28
+ /** @deprecated Use `tooltip.getPopupContainer`. */
29
+ readonly getTooltipPopupContainer?: SliderTooltipProps["getPopupContainer"];
30
+ /** @deprecated Use `tooltip.placement`. */
31
+ readonly tooltipPlacement?: SliderTooltipProps["placement"];
32
+ /** @deprecated Use `tooltip.open`. */
33
+ readonly tooltipVisible?: boolean;
34
+ };
35
+ export type SliderRange = Exclude<NonNullable<RcSliderProps<number[]>["range"]>, boolean>;
36
+ export type SliderSingleProps = SliderProps<number> & {
37
+ readonly range?: false;
38
+ };
39
+ export type SliderRangeProps = SliderProps<number[]> & {
40
+ readonly range: true | SliderRange;
41
+ };
42
+ type SliderComponent = {
43
+ (props: SliderRangeProps & RefAttributes<RcSliderRef>): ReactElement;
44
+ (props: SliderSingleProps & RefAttributes<RcSliderRef>): ReactElement;
45
+ <ValueType extends SliderValue = number>(props: SliderProps<ValueType> & RefAttributes<RcSliderRef>): ReactElement;
46
+ };
47
+ export declare const Slider: SliderComponent;
48
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ export type SpinSize = "small" | "medium" | "middle" | "default" | "large";
3
+ export interface SpinProps extends HTMLAttributes<HTMLDivElement> {
4
+ readonly delay?: number;
5
+ readonly description?: ReactNode;
6
+ readonly fullscreen?: boolean;
7
+ readonly indicator?: ReactNode;
8
+ readonly percent?: number | "auto";
9
+ readonly rootClassName?: string;
10
+ readonly size?: SpinSize;
11
+ readonly spinning?: boolean;
12
+ /** @deprecated Use `description` instead. */
13
+ readonly tip?: ReactNode;
14
+ /** @deprecated Use the root semantic class in AntD-compatible code. */
15
+ readonly wrapperClassName?: string;
16
+ }
17
+ declare function SpinRoot({ children, className, delay, description, fullscreen, indicator, percent, rootClassName, size, spinning, style, tip, wrapperClassName, ...props }: SpinProps): import("react").JSX.Element | null;
18
+ export declare const Spin: typeof SpinRoot & {
19
+ setDefaultIndicator(indicator: ReactNode): void;
20
+ };
21
+ export {};
@@ -0,0 +1,7 @@
1
+ import { SplitterPanel } from "./splitter/Panel";
2
+ import type { SplitterPanelProps, SplitterProps } from "./splitter/interface";
3
+ export type { ShowCollapsibleIconMode, SplitterClassNames, SplitterDraggerClassName, SplitterDraggerStyle, SplitterOrientation, SplitterPanelProps, SplitterProps, SplitterStyles, } from "./splitter/interface";
4
+ export declare const Splitter: import("react").ForwardRefExoticComponent<SplitterProps & import("react").RefAttributes<HTMLDivElement>> & {
5
+ Panel: typeof SplitterPanel;
6
+ };
7
+ export type { SplitterPanelProps as PanelProps };
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from "react";
2
+ interface StatCardProps {
3
+ readonly accent?: ReactNode;
4
+ readonly className?: string;
5
+ readonly label: ReactNode;
6
+ readonly meta?: ReactNode;
7
+ readonly value: ReactNode;
8
+ }
9
+ export declare function StatCard({ accent, className, label, meta, value }: StatCardProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,48 @@
1
+ import type { CSSProperties, HTMLAttributes, ReactNode } from "react";
2
+ export type StatisticValue = number | string;
3
+ export type StatisticSemanticSlot = "root" | "header" | "title" | "content" | "value" | "prefix" | "suffix";
4
+ export interface StatisticRef {
5
+ readonly nativeElement: HTMLDivElement;
6
+ }
7
+ export interface StatisticFormatConfig {
8
+ readonly decimalSeparator?: string;
9
+ readonly formatter?: StatisticFormatter;
10
+ readonly groupSeparator?: string;
11
+ readonly precision?: number;
12
+ }
13
+ export type StatisticFormatter = false | "number" | "countdown" | ((value: StatisticValue, config?: StatisticFormatConfig) => ReactNode);
14
+ export interface StatisticProps extends Omit<HTMLAttributes<HTMLDivElement>, "prefix" | "title">, StatisticFormatConfig {
15
+ readonly loading?: boolean;
16
+ readonly classNames?: Partial<Record<StatisticSemanticSlot, string>>;
17
+ readonly prefix?: ReactNode;
18
+ readonly rootClassName?: string;
19
+ readonly styles?: Partial<Record<StatisticSemanticSlot, CSSProperties>>;
20
+ readonly suffix?: ReactNode;
21
+ readonly title?: ReactNode;
22
+ readonly value?: StatisticValue;
23
+ readonly valueRender?: (node: ReactNode) => ReactNode;
24
+ /** @deprecated Use `styles.content` in AntD-compatible code. */
25
+ readonly valueStyle?: CSSProperties;
26
+ }
27
+ export type StatisticTimerType = "countdown" | "countup";
28
+ export interface StatisticTimerProps extends Omit<StatisticProps, "onChange"> {
29
+ readonly format?: string;
30
+ readonly onChange?: (value?: StatisticValue) => void;
31
+ /** Called only when a countdown crosses its target time. */
32
+ readonly onFinish?: () => void;
33
+ readonly type: StatisticTimerType;
34
+ }
35
+ export interface CountdownProps extends Omit<StatisticProps, "onChange"> {
36
+ readonly format?: string;
37
+ readonly onChange?: (value?: StatisticValue) => void;
38
+ readonly onFinish?: () => void;
39
+ }
40
+ export declare function formatStatisticTime(duration: number, format: string): string;
41
+ declare function StatisticTimer({ format, onChange, onFinish, type, value, ...props }: StatisticTimerProps): import("react").JSX.Element;
42
+ declare function StatisticCountdown(props: CountdownProps): import("react").JSX.Element;
43
+ export declare const Statistic: import("react").ForwardRefExoticComponent<StatisticProps & import("react").RefAttributes<StatisticRef>> & {
44
+ /** @deprecated Use `Statistic.Timer` with `type="countdown"`. */
45
+ Countdown: import("react").MemoExoticComponent<typeof StatisticCountdown>;
46
+ Timer: typeof StatisticTimer;
47
+ };
48
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from "react";
2
+ interface StatusItemProps {
3
+ readonly className?: string;
4
+ readonly icon?: ReactNode;
5
+ readonly label: string;
6
+ readonly max?: number;
7
+ readonly orientation?: "column" | "row";
8
+ readonly progress?: number;
9
+ readonly value: string;
10
+ }
11
+ export declare function StatusItem({ className, icon, label, max, orientation, progress, value, }: StatusItemProps): import("react").JSX.Element;
12
+ export {};
@@ -0,0 +1,40 @@
1
+ import type { StepsProps as RcStepsProps } from "@rc-component/steps";
2
+ import type { Key, ReactNode } from "react";
3
+ export type StepStatus = "wait" | "process" | "finish" | "error";
4
+ export type StepsSize = "small" | "medium" | "middle" | "default";
5
+ export type StepsType = "default" | "navigation" | "inline" | "panel" | "dot";
6
+ export type StepsVariant = "filled" | "outlined";
7
+ export type StepsOrientation = "horizontal" | "vertical";
8
+ export type StepsTitlePlacement = "horizontal" | "vertical";
9
+ type RcStepItem = NonNullable<RcStepsProps["items"]>[number];
10
+ type RcIconRenderInfo = Parameters<NonNullable<RcStepsProps["iconRender"]>>[1];
11
+ export type StepItem = RcStepItem & {
12
+ readonly key?: Key;
13
+ };
14
+ export type ProgressDotRender = (iconDot: ReactNode, info: {
15
+ readonly content: ReactNode;
16
+ readonly description: ReactNode;
17
+ readonly index: number;
18
+ readonly status: StepStatus;
19
+ readonly title: ReactNode;
20
+ }) => ReactNode;
21
+ export type StepsIconRender = (originNode: ReactNode, info: Pick<RcIconRenderInfo, "active" | "index" | "item" | "components">) => ReactNode;
22
+ export interface StepsProps extends Omit<RcStepsProps, "iconRender" | "items" | "orientation" | "prefixCls" | "titlePlacement"> {
23
+ readonly direction?: StepsOrientation;
24
+ readonly ellipsis?: boolean;
25
+ readonly iconRender?: StepsIconRender;
26
+ readonly items?: readonly StepItem[];
27
+ readonly labelPlacement?: StepsTitlePlacement;
28
+ readonly maxCount?: number;
29
+ readonly offset?: number;
30
+ readonly orientation?: StepsOrientation;
31
+ readonly percent?: number;
32
+ readonly progressDot?: boolean | ProgressDotRender;
33
+ readonly responsive?: boolean;
34
+ readonly size?: StepsSize;
35
+ readonly titlePlacement?: StepsTitlePlacement;
36
+ readonly type?: StepsType;
37
+ readonly variant?: StepsVariant;
38
+ }
39
+ export declare function Steps({ className, current, direction, ellipsis, iconRender, initial, items, labelPlacement, maxCount, offset, onChange, orientation, percent, progressDot, responsive, rootClassName, size, style, titlePlacement, type, variant, ...props }: StepsProps): import("react").JSX.Element;
40
+ export {};
@@ -0,0 +1,41 @@
1
+ import RcSwitch from "@rc-component/switch";
2
+ import type { SwitchChangeEventHandler, SwitchClickEventHandler } from "@rc-component/switch";
3
+ import type { CSSProperties, ComponentPropsWithoutRef, ReactNode } from "react";
4
+ export type SwitchStatus = "default" | "hover" | "active";
5
+ export type SwitchSize = "small" | "medium" | "middle" | "default";
6
+ export type SwitchSemanticSlot = "root" | "content" | "indicator";
7
+ type SwitchLegacySemanticSlot = SwitchSemanticSlot | "thumb";
8
+ export type SwitchClassNames = Partial<Record<SwitchLegacySemanticSlot, string>> | ((info: {
9
+ props: SwitchProps;
10
+ }) => Partial<Record<SwitchLegacySemanticSlot, string>>);
11
+ export type SwitchStyles = Partial<Record<SwitchLegacySemanticSlot, CSSProperties>> | ((info: {
12
+ props: SwitchProps;
13
+ }) => Partial<Record<SwitchLegacySemanticSlot, CSSProperties>>);
14
+ export type { SwitchChangeEventHandler, SwitchClickEventHandler };
15
+ export interface SwitchProps extends Omit<ComponentPropsWithoutRef<typeof RcSwitch>, "checked" | "className" | "classNames" | "defaultChecked" | "defaultValue" | "disabled" | "loadingIcon" | "onChange" | "onClick" | "prefixCls" | "style" | "styles" | "value"> {
16
+ readonly checked?: boolean;
17
+ readonly checkedChildren?: ReactNode;
18
+ readonly className?: string;
19
+ readonly classNames?: SwitchClassNames;
20
+ readonly defaultChecked?: boolean;
21
+ readonly defaultValue?: boolean;
22
+ readonly disabled?: boolean;
23
+ readonly loading?: boolean;
24
+ /** @deprecated Prefer `loading`; this remains an additive 996 adapter. */
25
+ readonly loadingIcon?: ReactNode;
26
+ readonly rootClassName?: string;
27
+ readonly size?: SwitchSize;
28
+ readonly status?: SwitchStatus;
29
+ readonly style?: CSSProperties;
30
+ readonly styles?: SwitchStyles;
31
+ readonly unCheckedChildren?: ReactNode;
32
+ readonly value?: boolean;
33
+ readonly onChange?: SwitchChangeEventHandler;
34
+ readonly onClick?: SwitchClickEventHandler;
35
+ }
36
+ declare const InternalSwitch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLButtonElement>>;
37
+ type SwitchComponent = typeof InternalSwitch & {
38
+ /** @internal AntD-compatible marker used by compact/form integrations. */
39
+ __ANT_SWITCH: boolean;
40
+ };
41
+ export declare const Switch: SwitchComponent;
@@ -0,0 +1,61 @@
1
+ import { EXPAND_COLUMN, Summary } from "@rc-component/table";
2
+ import type { TableProps as RcTableProps, Reference as RcTableReference } from "@rc-component/table";
3
+ import type { CSSProperties, Key, ReactElement, ReactNode, RefAttributes } from "react";
4
+ import { type SpinProps } from "./Spin";
5
+ import { SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE } from "./table/selection";
6
+ import type { ColumnsType, FilterValue, SortOrder, TableChangeExtra, TableColumn, TableLocale, TablePaginationConfig, TableRowSelection, TableSorterResult, TableSorterTooltipProps } from "./table/types";
7
+ export type { ColumnFilterItem, ColumnsType, FilterValue, RowSelectMethod, SortOrder, TableAction, TableChangeExtra, TableColumn, TableFilterDropdownProps, TableLocale, TablePaginationConfig, TablePaginationProps, TableRowSelection, TableSelectionItem, TableSelectionPreset, TableSorterResult, TableSorterTooltipProps, TableSorterTooltipTarget, } from "./table/types";
8
+ export type TableRef = RcTableReference;
9
+ type LegacyTableSlot = "root" | "table" | "thead" | "tbody" | "row" | "cell" | "pagination" | "empty" | "loading";
10
+ type TableClassNames<T> = NonNullable<RcTableProps<T>["classNames"]> & Partial<Record<LegacyTableSlot, string>>;
11
+ type TableStyles<T> = NonNullable<RcTableProps<T>["styles"]> & Partial<Record<LegacyTableSlot, CSSProperties>>;
12
+ type ChangeSorter<T> = TableSorterResult<T> | TableSorterResult<T>[];
13
+ export interface TableProps<T> extends Omit<RcTableProps<T>, "className" | "classNames" | "columns" | "data" | "emptyText" | "footer" | "prefixCls" | "rowKey" | "scroll" | "style" | "styles" | "title"> {
14
+ readonly className?: string;
15
+ readonly classNames?: TableClassNames<T>;
16
+ readonly columns?: ColumnsType<T>;
17
+ readonly data?: readonly T[];
18
+ readonly dataSource?: readonly T[];
19
+ readonly emptyText?: ReactNode | (() => ReactNode);
20
+ readonly footer?: (data: readonly T[]) => ReactNode;
21
+ readonly getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
22
+ readonly hidePaginationWhenSinglePage?: boolean;
23
+ readonly loading?: boolean | SpinProps;
24
+ readonly loadingText?: string;
25
+ readonly locale?: TableLocale;
26
+ readonly minWidth?: string;
27
+ readonly pagination?: false | TablePaginationConfig;
28
+ readonly pageSizeOptions?: readonly number[];
29
+ readonly rowKey?: keyof T | string | ((record: T, index: number) => Key);
30
+ readonly rowSelection?: TableRowSelection<T>;
31
+ readonly scroll?: NonNullable<RcTableProps<T>["scroll"]> & {
32
+ readonly scrollToFirstRowOnChange?: boolean;
33
+ };
34
+ readonly showSorterTooltip?: boolean | TableSorterTooltipProps;
35
+ readonly sortDirections?: readonly Exclude<SortOrder, null>[];
36
+ readonly style?: CSSProperties;
37
+ readonly styles?: TableStyles<T>;
38
+ readonly title?: (data: readonly T[]) => ReactNode;
39
+ readonly truncate?: boolean;
40
+ readonly virtual?: boolean;
41
+ readonly onChange?: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: ChangeSorter<T>, extra: TableChangeExtra<T>) => void;
42
+ }
43
+ type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
44
+ export type TableColumnProps<T> = DistributiveOmit<TableColumn<T>, "children"> & {
45
+ readonly children?: null;
46
+ };
47
+ export type TableColumnGroupProps<T> = DistributiveOmit<TableColumn<T>, "children"> & {
48
+ readonly children: ReactNode;
49
+ };
50
+ type TableComponent = (<T>(props: TableProps<T> & RefAttributes<RcTableReference>) => ReactElement) & {
51
+ Column: <T>(props: TableColumnProps<T>) => ReactElement | null;
52
+ ColumnGroup: <T>(props: TableColumnGroupProps<T>) => ReactElement | null;
53
+ EXPAND_COLUMN: typeof EXPAND_COLUMN;
54
+ SELECTION_ALL: typeof SELECTION_ALL;
55
+ SELECTION_COLUMN: typeof SELECTION_COLUMN;
56
+ SELECTION_INVERT: typeof SELECTION_INVERT;
57
+ SELECTION_NONE: typeof SELECTION_NONE;
58
+ Summary: typeof Summary;
59
+ displayName?: string;
60
+ };
61
+ export declare const Table: TableComponent;
@@ -0,0 +1,50 @@
1
+ import RcTabs from "@rc-component/tabs";
2
+ import type { AnimatedConfig, MoreProps, TabPaneProps as RcTabPaneProps, TabsProps as RcTabsProps, Tab } from "@rc-component/tabs";
3
+ import type { CSSProperties, ComponentRef, FC, KeyboardEvent, MouseEvent, ReactNode } from "react";
4
+ export type AntdTabsType = "line" | "card" | "editable-card";
5
+ export type TabsExtensionType = "boxed" | "segmented" | "glow-pill";
6
+ export type TabsType = AntdTabsType | TabsExtensionType;
7
+ export type TabsPosition = "top" | "right" | "bottom" | "left";
8
+ export interface CompatibilityProps {
9
+ /** @deprecated Use `destroyOnHidden` instead. */
10
+ readonly destroyInactiveTabPane?: boolean;
11
+ }
12
+ export type TabPaneProps = RcTabPaneProps & CompatibilityProps;
13
+ export type RcTabsRef = ComponentRef<typeof RcTabs>;
14
+ export interface TabsItem extends Omit<Tab, "children" | "key" | "label">, CompatibilityProps {
15
+ readonly children?: ReactNode;
16
+ readonly closable?: boolean;
17
+ readonly closeIcon?: ReactNode;
18
+ readonly disabled?: boolean;
19
+ readonly forceRender?: boolean;
20
+ readonly icon?: ReactNode;
21
+ readonly key: string;
22
+ readonly label: ReactNode;
23
+ }
24
+ type TabsSlot = "root" | "item" | "remove" | "indicator" | "body" | "content" | "header" | "popup";
25
+ export interface TabsProps extends CompatibilityProps, Omit<RcTabsProps, "animated" | "classNames" | "editable" | "items" | "more" | "onEdit" | "popupClassName" | "styles" | "tabPosition"> {
26
+ readonly addIcon?: ReactNode;
27
+ readonly animated?: boolean | AnimatedConfig;
28
+ readonly centered?: boolean;
29
+ readonly classNames?: Partial<Record<TabsSlot, string>>;
30
+ readonly children?: ReactNode;
31
+ readonly fullWidth?: boolean;
32
+ readonly hideAdd?: boolean;
33
+ readonly items?: readonly TabsItem[];
34
+ readonly more?: MoreProps;
35
+ readonly moreIcon?: ReactNode;
36
+ readonly popupClassName?: string;
37
+ readonly removeIcon?: ReactNode;
38
+ readonly rootClassName?: string;
39
+ readonly styles?: Partial<Record<TabsSlot, CSSProperties>>;
40
+ readonly tabPosition?: TabsPosition;
41
+ readonly type?: TabsType;
42
+ readonly onEdit?: (targetKey: MouseEvent | KeyboardEvent | string, action: "add" | "remove") => void;
43
+ }
44
+ declare const TabPane: FC<TabPaneProps>;
45
+ declare const InternalTabs: import("react").ForwardRefExoticComponent<TabsProps & import("react").RefAttributes<HTMLDivElement>>;
46
+ type CompoundedTabs = typeof InternalTabs & {
47
+ TabPane: typeof TabPane;
48
+ };
49
+ export declare const Tabs: CompoundedTabs;
50
+ export {};
@@ -0,0 +1,52 @@
1
+ import type { AriaAttributes, HTMLAttributes, MouseEvent, ReactElement, ReactNode } from "react";
2
+ export type TagPresetColor = "default" | "success" | "processing" | "error" | "warning" | "gold";
3
+ export type TagColor = TagPresetColor | (string & {});
4
+ export type TagVariant = "filled" | "solid" | "outlined";
5
+ export interface TagClosableConfig extends AriaAttributes {
6
+ readonly afterClose?: () => void;
7
+ readonly closeIcon?: ReactNode;
8
+ readonly disabled?: boolean;
9
+ }
10
+ export interface TagProps extends HTMLAttributes<HTMLSpanElement> {
11
+ /** @deprecated Use `variant` instead. */
12
+ readonly bordered?: boolean;
13
+ readonly closable?: boolean | TagClosableConfig;
14
+ readonly closeIcon?: ReactNode;
15
+ readonly color?: TagColor;
16
+ readonly disabled?: boolean;
17
+ readonly href?: string;
18
+ readonly icon?: ReactNode;
19
+ readonly rootClassName?: string;
20
+ readonly target?: string;
21
+ readonly variant?: TagVariant;
22
+ readonly onClose?: (event: MouseEvent<HTMLElement>) => void;
23
+ }
24
+ export interface CheckableTagProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange"> {
25
+ readonly checked: boolean;
26
+ readonly disabled?: boolean;
27
+ readonly icon?: ReactNode;
28
+ /** Legacy button prop retained as a no-op for source compatibility. */
29
+ readonly type?: "button" | "reset" | "submit";
30
+ readonly onChange?: (checked: boolean) => void;
31
+ }
32
+ export interface CheckableTagOption<Value extends string | number = string | number> {
33
+ readonly disabled?: boolean;
34
+ readonly label: ReactNode;
35
+ readonly value: Value;
36
+ }
37
+ export interface CheckableTagGroupProps<Value extends string | number = string | number> extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
38
+ readonly defaultValue?: Value | readonly Value[];
39
+ readonly disabled?: boolean;
40
+ readonly multiple?: boolean;
41
+ readonly options?: readonly CheckableTagOption<Value>[];
42
+ readonly value?: Value | readonly Value[];
43
+ readonly onChange?: (value: Value | Value[]) => void;
44
+ }
45
+ declare function TagRoot({ bordered, children, className, closable, closeIcon, color, disabled, href, icon, onClick, onClose, rootClassName, style, target, variant: customVariant, ...props }: TagProps): ReactElement | null;
46
+ declare function CheckableTag({ checked, children, className, disabled, icon, onChange, onClick, onKeyDown, type: _type, ...props }: CheckableTagProps): import("react").JSX.Element;
47
+ declare function CheckableTagGroup<Value extends string | number = string | number>({ className, defaultValue, disabled, multiple, onChange, options, value, ...props }: CheckableTagGroupProps<Value>): import("react").JSX.Element;
48
+ export declare const Tag: typeof TagRoot & {
49
+ CheckableTag: typeof CheckableTag;
50
+ CheckableTagGroup: typeof CheckableTagGroup;
51
+ };
52
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from "react";
2
+ type TagTone = "amber" | "slate" | "green" | "red";
3
+ export declare function TagPill({ children, tone, }: {
4
+ readonly children: ReactNode;
5
+ readonly tone?: TagTone;
6
+ }): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,64 @@
1
+ import type { TooltipRef as RcTooltipRef } from "@rc-component/tooltip";
2
+ import type { TooltipProps as RcTooltipProps } from "@rc-component/tooltip/es/Tooltip";
3
+ import type { CSSProperties, ReactNode } from "react";
4
+ import type { SlotClassNames, SlotStyles } from "../utils/slots";
5
+ export type TooltipPlacement = "topLeft" | "top" | "topRight" | "bottomLeft" | "bottom" | "bottomRight" | "leftTop" | "left" | "leftBottom" | "rightTop" | "right" | "rightBottom";
6
+ export type TooltipTrigger = "hover" | "focus" | "click" | "contextMenu";
7
+ export interface TooltipArrowOptions {
8
+ readonly pointAtCenter?: boolean;
9
+ }
10
+ export interface TooltipAdjustOverflow {
11
+ readonly adjustX?: 0 | 1;
12
+ readonly adjustY?: 0 | 1;
13
+ }
14
+ export type TooltipRef = RcTooltipRef;
15
+ type TooltipSlot = "root" | "trigger" | "popup" | "arrow" | "content";
16
+ export interface TooltipProps {
17
+ readonly afterOpenChange?: (open: boolean) => void;
18
+ readonly afterVisibleChange?: (open: boolean) => void;
19
+ readonly align?: RcTooltipProps["align"];
20
+ readonly arrow?: boolean | TooltipArrowOptions;
21
+ readonly autoAdjustOverflow?: boolean | TooltipAdjustOverflow;
22
+ readonly builtinPlacements?: RcTooltipProps["builtinPlacements"];
23
+ readonly children: ReactNode;
24
+ readonly className?: string;
25
+ readonly classNames?: SlotClassNames<TooltipSlot>;
26
+ readonly color?: string;
27
+ readonly defaultOpen?: boolean;
28
+ readonly defaultVisible?: boolean;
29
+ readonly disabled?: boolean;
30
+ readonly destroyOnHidden?: boolean;
31
+ readonly destroyTooltipOnHide?: boolean | {
32
+ readonly keepParent?: boolean;
33
+ };
34
+ readonly forceRender?: boolean;
35
+ readonly fresh?: boolean;
36
+ readonly getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
37
+ readonly getTooltipContainer?: (triggerNode: HTMLElement) => HTMLElement;
38
+ readonly id?: string;
39
+ readonly maxWidth?: number | string;
40
+ readonly motion?: RcTooltipProps["motion"];
41
+ readonly mouseEnterDelay?: number;
42
+ readonly mouseLeaveDelay?: number;
43
+ readonly open?: boolean;
44
+ readonly openClassName?: string;
45
+ readonly overlay?: ReactNode | (() => ReactNode);
46
+ readonly overlayClassName?: string;
47
+ readonly overlayInnerStyle?: CSSProperties;
48
+ readonly overlayStyle?: CSSProperties;
49
+ readonly placement?: TooltipPlacement;
50
+ readonly rootClassName?: string;
51
+ readonly style?: CSSProperties;
52
+ readonly styles?: SlotStyles<TooltipSlot>;
53
+ readonly title?: ReactNode | (() => ReactNode);
54
+ readonly trigger?: TooltipTrigger | readonly TooltipTrigger[];
55
+ readonly unique?: RcTooltipProps["unique"];
56
+ readonly variant?: "dark" | "light";
57
+ readonly visible?: boolean;
58
+ readonly zIndex?: number;
59
+ readonly onOpenChange?: (open: boolean) => void;
60
+ readonly onPopupAlign?: RcTooltipProps["onPopupAlign"];
61
+ readonly onVisibleChange?: (open: boolean) => void;
62
+ }
63
+ export declare const Tooltip: import("react").ForwardRefExoticComponent<TooltipProps & import("react").RefAttributes<RcTooltipRef>>;
64
+ export {};