@bioturing/components 0.13.1

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 (209) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +91 -0
  3. package/dist/Badge.js +41 -0
  4. package/dist/Breadcrumb.js +92 -0
  5. package/dist/Checkbox.js +13 -0
  6. package/dist/CodeBlock.js +497 -0
  7. package/dist/Collapse.js +50 -0
  8. package/dist/DSRoot.js +1024 -0
  9. package/dist/DropdownMenu.js +206 -0
  10. package/dist/Empty.js +53 -0
  11. package/dist/Field.js +69 -0
  12. package/dist/Form.js +126 -0
  13. package/dist/IconButton.js +83 -0
  14. package/dist/Input.js +49 -0
  15. package/dist/Modal.js +430 -0
  16. package/dist/Popover.js +10 -0
  17. package/dist/Radio.js +24 -0
  18. package/dist/ScrollArea.js +47 -0
  19. package/dist/Segmented.js +10 -0
  20. package/dist/Select.js +41 -0
  21. package/dist/Slider.js +39 -0
  22. package/dist/Spin.js +33 -0
  23. package/dist/Splitter.js +47 -0
  24. package/dist/Switch.js +10 -0
  25. package/dist/Table.js +125 -0
  26. package/dist/Tag.js +24 -0
  27. package/dist/ThemeProvider.js +261 -0
  28. package/dist/Toast.js +1009 -0
  29. package/dist/Tooltip.js +36 -0
  30. package/dist/Tour.js +54 -0
  31. package/dist/Tree.js +318 -0
  32. package/dist/Truncate.js +160 -0
  33. package/dist/Upload.js +419 -0
  34. package/dist/VerticalCollapsiblePanel.js +414 -0
  35. package/dist/assets/src/icons/ANOVAAnalysis.d.ts +7 -0
  36. package/dist/assets/src/icons/AUCell.d.ts +7 -0
  37. package/dist/assets/src/icons/Alphabet.d.ts +7 -0
  38. package/dist/assets/src/icons/BarChart.d.ts +7 -0
  39. package/dist/assets/src/icons/BoxPlot.d.ts +7 -0
  40. package/dist/assets/src/icons/BubbleHeatmap.d.ts +7 -0
  41. package/dist/assets/src/icons/CDR3Spectratyping.d.ts +7 -0
  42. package/dist/assets/src/icons/CancerPrediction.d.ts +7 -0
  43. package/dist/assets/src/icons/Cell.d.ts +7 -0
  44. package/dist/assets/src/icons/CellCellCommunication.d.ts +7 -0
  45. package/dist/assets/src/icons/CellSearch.d.ts +7 -0
  46. package/dist/assets/src/icons/CellTypePrediction.d.ts +7 -0
  47. package/dist/assets/src/icons/Cells.d.ts +7 -0
  48. package/dist/assets/src/icons/Circos.d.ts +7 -0
  49. package/dist/assets/src/icons/Clonotype.d.ts +7 -0
  50. package/dist/assets/src/icons/CoexpressionPlot.d.ts +7 -0
  51. package/dist/assets/src/icons/Composition.d.ts +7 -0
  52. package/dist/assets/src/icons/DEG.d.ts +7 -0
  53. package/dist/assets/src/icons/Digits.d.ts +7 -0
  54. package/dist/assets/src/icons/DiversityAnalysis.d.ts +7 -0
  55. package/dist/assets/src/icons/Embedding.d.ts +7 -0
  56. package/dist/assets/src/icons/EnrichmentTest.d.ts +7 -0
  57. package/dist/assets/src/icons/Eppendorf.d.ts +7 -0
  58. package/dist/assets/src/icons/FileArrowRight.d.ts +7 -0
  59. package/dist/assets/src/icons/FolderArrowRight.d.ts +7 -0
  60. package/dist/assets/src/icons/Heatmap.d.ts +7 -0
  61. package/dist/assets/src/icons/ImageSegmentation.d.ts +7 -0
  62. package/dist/assets/src/icons/IntersectionPlot.d.ts +7 -0
  63. package/dist/assets/src/icons/LouvainClustering.d.ts +7 -0
  64. package/dist/assets/src/icons/MarkerGenes.d.ts +7 -0
  65. package/dist/assets/src/icons/MixedView.d.ts +7 -0
  66. package/dist/assets/src/icons/NeighborhoodAnalysis.d.ts +7 -0
  67. package/dist/assets/src/icons/PenSize.d.ts +7 -0
  68. package/dist/assets/src/icons/Pertubation.d.ts +7 -0
  69. package/dist/assets/src/icons/Pseudotime.d.ts +7 -0
  70. package/dist/assets/src/icons/RegionSegmentation.d.ts +7 -0
  71. package/dist/assets/src/icons/ScatterPlotTissueImageView.d.ts +7 -0
  72. package/dist/assets/src/icons/ScatterPlotView.d.ts +7 -0
  73. package/dist/assets/src/icons/SegmentSelection.d.ts +7 -0
  74. package/dist/assets/src/icons/SpatialCellProportion.d.ts +7 -0
  75. package/dist/assets/src/icons/Species.d.ts +7 -0
  76. package/dist/assets/src/icons/SubClustering.d.ts +7 -0
  77. package/dist/assets/src/icons/TSNEUMAP.d.ts +7 -0
  78. package/dist/assets/src/icons/TissueImageScatterPlotView.d.ts +7 -0
  79. package/dist/assets/src/icons/TissueImageView.d.ts +7 -0
  80. package/dist/assets/src/icons/TwoD.d.ts +7 -0
  81. package/dist/assets/src/icons/VennDiagramAnalysis.d.ts +7 -0
  82. package/dist/assets/src/icons/ViolinPlot.d.ts +7 -0
  83. package/dist/assets/src/icons/custom.d.ts +48 -0
  84. package/dist/assets/src/icons/index.d.ts +2 -0
  85. package/dist/assets/src/icons/phosphor.d.ts +1 -0
  86. package/dist/assets/src/index.d.ts +2 -0
  87. package/dist/assets/src/logos/BBrowserX.d.ts +9 -0
  88. package/dist/assets/src/logos/BioStudio.d.ts +9 -0
  89. package/dist/assets/src/logos/BioTuring.d.ts +9 -0
  90. package/dist/assets/src/logos/BioTuringAlpha.d.ts +9 -0
  91. package/dist/assets/src/logos/Lens.d.ts +9 -0
  92. package/dist/assets/src/logos/Pixel.d.ts +9 -0
  93. package/dist/assets/src/logos/SmartBulk.d.ts +9 -0
  94. package/dist/assets/src/logos/SpatialX.d.ts +9 -0
  95. package/dist/assets/src/logos/Talk2Data.d.ts +9 -0
  96. package/dist/assets/src/logos/Vinci.d.ts +9 -0
  97. package/dist/assets/src/logos/index.d.ts +10 -0
  98. package/dist/components/src/components/Badge/component.d.ts +3 -0
  99. package/dist/components/src/components/Badge/index.d.ts +1 -0
  100. package/dist/components/src/components/Breadcrumb/component.d.ts +5 -0
  101. package/dist/components/src/components/Breadcrumb/index.d.ts +2 -0
  102. package/dist/components/src/components/Breadcrumb/types.d.ts +18 -0
  103. package/dist/components/src/components/Breadcrumb/useItemRender.d.ts +6 -0
  104. package/dist/components/src/components/Button/component.d.ts +7 -0
  105. package/dist/components/src/components/Button/index.d.ts +1 -0
  106. package/dist/components/src/components/Checkbox/component.d.ts +10 -0
  107. package/dist/components/src/components/Checkbox/index.d.ts +1 -0
  108. package/dist/components/src/components/CodeBlock/component.d.ts +2 -0
  109. package/dist/components/src/components/CodeBlock/index.d.ts +2 -0
  110. package/dist/components/src/components/CodeBlock/types.d.ts +47 -0
  111. package/dist/components/src/components/Collapse/component.d.ts +13 -0
  112. package/dist/components/src/components/Collapse/index.d.ts +1 -0
  113. package/dist/components/src/components/DSRoot/component.d.ts +13 -0
  114. package/dist/components/src/components/DSRoot/index.d.ts +1 -0
  115. package/dist/components/src/components/DropdownMenu/component.d.ts +25 -0
  116. package/dist/components/src/components/DropdownMenu/index.d.ts +2 -0
  117. package/dist/components/src/components/DropdownMenu/utils.d.ts +5 -0
  118. package/dist/components/src/components/Empty/component.d.ts +12 -0
  119. package/dist/components/src/components/Empty/index.d.ts +1 -0
  120. package/dist/components/src/components/Field/component.d.ts +41 -0
  121. package/dist/components/src/components/Field/index.d.ts +1 -0
  122. package/dist/components/src/components/Form/component.d.ts +18 -0
  123. package/dist/components/src/components/Form/index.d.ts +1 -0
  124. package/dist/components/src/components/Form/item.d.ts +5 -0
  125. package/dist/components/src/components/IconButton/component.d.ts +29 -0
  126. package/dist/components/src/components/IconButton/index.d.ts +1 -0
  127. package/dist/components/src/components/Input/component.d.ts +30 -0
  128. package/dist/components/src/components/Input/index.d.ts +1 -0
  129. package/dist/components/src/components/Modal/Modal.d.ts +69 -0
  130. package/dist/components/src/components/Modal/ModalProvider.d.ts +5 -0
  131. package/dist/components/src/components/Modal/ModalService.d.ts +33 -0
  132. package/dist/components/src/components/Modal/constants.d.ts +9 -0
  133. package/dist/components/src/components/Modal/functions.d.ts +27 -0
  134. package/dist/components/src/components/Modal/index.d.ts +14 -0
  135. package/dist/components/src/components/Popover/component.d.ts +9 -0
  136. package/dist/components/src/components/Popover/index.d.ts +1 -0
  137. package/dist/components/src/components/Radio/component.d.ts +7 -0
  138. package/dist/components/src/components/Radio/index.d.ts +2 -0
  139. package/dist/components/src/components/Radio/interface.d.ts +5 -0
  140. package/dist/components/src/components/ScrollArea/component.d.ts +10 -0
  141. package/dist/components/src/components/ScrollArea/index.d.ts +1 -0
  142. package/dist/components/src/components/Segmented/component.d.ts +9 -0
  143. package/dist/components/src/components/Segmented/index.d.ts +1 -0
  144. package/dist/components/src/components/Select/component.d.ts +11 -0
  145. package/dist/components/src/components/Select/index.d.ts +1 -0
  146. package/dist/components/src/components/Slider/component.d.ts +5 -0
  147. package/dist/components/src/components/Slider/index.d.ts +1 -0
  148. package/dist/components/src/components/Spin/component.d.ts +3 -0
  149. package/dist/components/src/components/Spin/index.d.ts +1 -0
  150. package/dist/components/src/components/Splitter/component.d.ts +12 -0
  151. package/dist/components/src/components/Splitter/index.d.ts +1 -0
  152. package/dist/components/src/components/Switch/component.d.ts +8 -0
  153. package/dist/components/src/components/Switch/index.d.ts +1 -0
  154. package/dist/components/src/components/Table/component.d.ts +19 -0
  155. package/dist/components/src/components/Table/index.d.ts +1 -0
  156. package/dist/components/src/components/Tag/component.d.ts +11 -0
  157. package/dist/components/src/components/Tag/index.d.ts +1 -0
  158. package/dist/components/src/components/ThemeProvider/component.d.ts +6 -0
  159. package/dist/components/src/components/ThemeProvider/index.d.ts +1 -0
  160. package/dist/components/src/components/Toast/component.d.ts +14 -0
  161. package/dist/components/src/components/Toast/function.d.ts +10 -0
  162. package/dist/components/src/components/Toast/index.d.ts +3 -0
  163. package/dist/components/src/components/Toast/types.d.ts +3 -0
  164. package/dist/components/src/components/Tooltip/component.d.ts +9 -0
  165. package/dist/components/src/components/Tooltip/index.d.ts +1 -0
  166. package/dist/components/src/components/Tour/component.d.ts +7 -0
  167. package/dist/components/src/components/Tour/index.d.ts +1 -0
  168. package/dist/components/src/components/Transition/component.d.ts +17 -0
  169. package/dist/components/src/components/Transition/index.d.ts +1 -0
  170. package/dist/components/src/components/Tree/components.d.ts +13 -0
  171. package/dist/components/src/components/Tree/helpers.d.ts +4 -0
  172. package/dist/components/src/components/Tree/index.d.ts +4 -0
  173. package/dist/components/src/components/Tree/types.d.ts +55 -0
  174. package/dist/components/src/components/Tree/useTreeCommon.d.ts +178 -0
  175. package/dist/components/src/components/Tree/useUniqueKeysTree.d.ts +33 -0
  176. package/dist/components/src/components/Truncate/component.d.ts +12 -0
  177. package/dist/components/src/components/Truncate/helpers.d.ts +5 -0
  178. package/dist/components/src/components/Truncate/index.d.ts +1 -0
  179. package/dist/components/src/components/Upload/component.d.ts +16 -0
  180. package/dist/components/src/components/Upload/dragger.d.ts +13 -0
  181. package/dist/components/src/components/Upload/hooks.d.ts +5 -0
  182. package/dist/components/src/components/Upload/index.d.ts +3 -0
  183. package/dist/components/src/components/Upload/item.d.ts +11 -0
  184. package/dist/components/src/components/Upload/utils.d.ts +1 -0
  185. package/dist/components/src/components/VerticalCollapsiblePanel/component.d.ts +64 -0
  186. package/dist/components/src/components/VerticalCollapsiblePanel/index.d.ts +1 -0
  187. package/dist/components/src/components/hooks/antd.d.ts +11 -0
  188. package/dist/components/src/components/hooks/base-ui.d.ts +7 -0
  189. package/dist/components/src/components/hooks/index.d.ts +3 -0
  190. package/dist/components/src/components/hooks/useControlledState.d.ts +1 -0
  191. package/dist/components/src/components/index.d.ts +39 -0
  192. package/dist/components/src/components/utils/WithAntdTokens.d.ts +7 -0
  193. package/dist/components/src/components/utils/antdUtils.d.ts +10 -0
  194. package/dist/components/src/components/utils/client.d.ts +2 -0
  195. package/dist/components/src/components/utils/cn.d.ts +4 -0
  196. package/dist/components/src/components/utils/index.d.ts +3 -0
  197. package/dist/components/src/components/utils/isTracebackError.d.ts +1 -0
  198. package/dist/components/src/components/utils/main.d.ts +3 -0
  199. package/dist/components/src/components/utils/reactToString.d.ts +2 -0
  200. package/dist/components/src/components/utils/types.d.ts +9 -0
  201. package/dist/components/src/index.d.ts +2 -0
  202. package/dist/components/src/tokens/index.d.ts +3 -0
  203. package/dist/index.js +2430 -0
  204. package/dist/style.css +1242 -0
  205. package/dist/style.js +0 -0
  206. package/dist/tailwind.css +4 -0
  207. package/dist/tailwind.js +0 -0
  208. package/dist/utils.js +78 -0
  209. package/package.json +153 -0
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ import { type EmptyProps as AntEmptyProps } from "antd/es/empty";
3
+ export interface EmptyProps extends AntEmptyProps {
4
+ /**
5
+ * Empty icon size
6
+ * @default 'medium'
7
+ */
8
+ size?: "small" | "medium" | "large";
9
+ }
10
+ export declare const EmptyIcon: React.FC<React.ComponentPropsWithRef<"svg">>;
11
+ export declare const Empty: ({ image, size, className, ...rest }: EmptyProps) => import("react/jsx-runtime").JSX.Element;
12
+ export default Empty;
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,41 @@
1
+ import type { InputProps, InputRef, SelectProps } from "antd";
2
+ import { SizeType } from "antd/es/config-provider/SizeContext";
3
+ import { RefSelectProps } from "antd/es/select";
4
+ import { ForwardedRef } from "react";
5
+ export type FieldType = "input" | "select";
6
+ type RefType<T extends FieldType> = T extends "input" ? InputRef : T extends "select" ? RefSelectProps : never;
7
+ interface BaseFieldProps extends React.HTMLAttributes<HTMLDivElement> {
8
+ label?: React.ReactNode;
9
+ /**
10
+ * Block or inline display
11
+ * @default false
12
+ */
13
+ block?: boolean;
14
+ /**
15
+ * Size of the field
16
+ * @default "small"
17
+ */
18
+ size?: SizeType;
19
+ /**
20
+ * Colon after label
21
+ * @default true
22
+ */
23
+ colon?: boolean;
24
+ }
25
+ type InputFieldProps = BaseFieldProps & {
26
+ type?: "input";
27
+ inputProps: InputProps;
28
+ };
29
+ type SelectFieldProps = BaseFieldProps & {
30
+ type: "select";
31
+ selectProps: SelectProps;
32
+ };
33
+ export type FieldProps<T extends FieldType = "input"> = T extends "input" ? InputFieldProps : SelectFieldProps;
34
+ /**
35
+ * Generic Field component that forwards ref to Input or Select
36
+ */
37
+ declare const FieldInner: <T extends FieldType>({ label, className, size, colon, type, ...rest }: FieldProps<T>, ref: ForwardedRef<RefType<T>>) => import("react/jsx-runtime").JSX.Element;
38
+ export declare const Field: <T extends FieldType>(props: FieldProps<T> & {
39
+ ref?: ForwardedRef<RefType<T>>;
40
+ }) => ReturnType<typeof FieldInner<T>>;
41
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,18 @@
1
+ import { FormProps as AntdFormProps, default as AntdInternalForm, useForm, useWatch } from "antd/es/form/Form";
2
+ import useFormInstance from "antd/es/form/hooks/useFormInstance";
3
+ import * as React from "react";
4
+ import { type FormItemProps } from "./item";
5
+ export interface FormProps<Values = any> extends AntdFormProps<Values> {
6
+ }
7
+ interface InternalFormProps<Values = any> extends React.ComponentProps<typeof AntdInternalForm<Values>> {
8
+ }
9
+ export declare const Form: (<Values = any>({ ...rest }: InternalFormProps<Values>) => import("react/jsx-runtime").JSX.Element) & {
10
+ useForm: typeof useForm;
11
+ useFormInstance: typeof useFormInstance;
12
+ useWatch: typeof useWatch;
13
+ Item: <Values = unknown>({ tooltip, label, optionalMark, ...rest }: FormItemProps<Values>) => import("react/jsx-runtime").JSX.Element;
14
+ List: React.FC<import("antd/es/form/FormList").FormListProps>;
15
+ ErrorList: React.FC<import("antd/es/form/ErrorList").ErrorListProps>;
16
+ Provider: React.FC<import("antd/es/form/context").FormProviderProps>;
17
+ };
18
+ export type { FormItemProps };
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,5 @@
1
+ import { type FormItemProps as AntdFormItemProps } from "antd/es/form/FormItem";
2
+ export interface FormItemProps<Values = unknown> extends AntdFormItemProps<Values> {
3
+ optionalMark?: boolean | React.ReactNode;
4
+ }
5
+ export declare const FormItem: <Values = unknown>({ tooltip, label, optionalMark, ...rest }: FormItemProps<Values>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import React, { type ElementType, type ComponentPropsWithoutRef, type ReactElement, type AnchorHTMLAttributes, ComponentPropsWithRef } from "react";
2
+ import { Tooltip } from "antd";
3
+ type IconButtonBaseProps = {
4
+ label?: React.ReactNode;
5
+ size?: "small" | "medium";
6
+ negativeMargin?: boolean;
7
+ tooltipProps?: React.ComponentProps<typeof Tooltip>;
8
+ };
9
+ type AnchorSpecificProps = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "rel" | "download" | "hrefLang" | "referrerPolicy">;
10
+ type WithHrefProps<E extends ElementType = "a"> = IconButtonBaseProps & {
11
+ href: string;
12
+ as?: E;
13
+ } & AnchorSpecificProps;
14
+ type WithoutHrefProps<E extends ElementType = "button"> = IconButtonBaseProps & {
15
+ href?: undefined;
16
+ as?: E;
17
+ } & {
18
+ [K in keyof AnchorSpecificProps]?: never;
19
+ };
20
+ type IconButtonOwnProps<E extends ElementType = ElementType> = WithHrefProps<E> | WithoutHrefProps<E>;
21
+ export type IconButtonProps<E extends ElementType = "button"> = IconButtonOwnProps<E> & Omit<ComponentPropsWithoutRef<E>, keyof IconButtonOwnProps<E>>;
22
+ /**
23
+ * Type for wrapping the forwardRef implementation
24
+ */
25
+ type IconButtonComponent = <E extends ElementType = "button">(props: IconButtonProps<E> & {
26
+ ref?: ComponentPropsWithRef<E>["ref"];
27
+ }) => ReactElement;
28
+ export declare const IconButton: IconButtonComponent;
29
+ export default IconButton;
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,30 @@
1
+ import { type InputProps as AntInputProps, type InputRef } from "antd";
2
+ import { type PasswordProps as AntPasswordProps } from "antd/es/input";
3
+ import { type SearchProps as AntSearchProps } from "antd/es/input";
4
+ import { type TextAreaProps as AntTextAreaProps } from "antd/es/input";
5
+ export interface InputProps extends AntInputProps {
6
+ }
7
+ export interface PasswordProps extends AntPasswordProps {
8
+ }
9
+ export interface TextAreaProps extends AntTextAreaProps {
10
+ }
11
+ export interface SearchProps extends AntSearchProps {
12
+ }
13
+ declare const MainInputInner: (props: InputProps, ref: React.Ref<InputRef>) => import("react/jsx-runtime").JSX.Element;
14
+ declare const PasswordInner: (props: PasswordProps, ref: React.Ref<InputRef>) => import("react/jsx-runtime").JSX.Element;
15
+ declare const SearchInner: (props: SearchProps, ref: React.Ref<InputRef>) => import("react/jsx-runtime").JSX.Element;
16
+ declare const TextAreaInner: (props: TextAreaProps, ref: React.Ref<HTMLTextAreaElement>) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const Input: ((props: InputProps & {
18
+ ref?: React.ForwardedRef<InputRef>;
19
+ }) => ReturnType<typeof MainInputInner>) & {
20
+ Password: (props: PasswordProps & {
21
+ ref?: React.ForwardedRef<InputRef>;
22
+ }) => ReturnType<typeof PasswordInner>;
23
+ Search: (props: SearchProps & {
24
+ ref?: React.ForwardedRef<InputRef>;
25
+ }) => ReturnType<typeof SearchInner>;
26
+ TextArea: (props: TextAreaProps & {
27
+ ref?: React.ForwardedRef<HTMLTextAreaElement>;
28
+ }) => ReturnType<typeof TextAreaInner>;
29
+ };
30
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,69 @@
1
+ import { type ModalProps as AntModalProps } from "antd/es/modal";
2
+ import React from "react";
3
+ import { ModalType } from "./functions";
4
+ export interface ModalProps extends Omit<AntModalProps, "centered"> {
5
+ /**
6
+ * Predefined sizes for the modal
7
+ * - xsmall: 400px
8
+ * - small: 520px
9
+ * - medium: 640px (default)
10
+ * - large: 840px
11
+ * - xlarge: 1024px
12
+ * - fullscreen: 100vw (takes full screen width with margins)
13
+ * @default "medium" for default type, "xsmall" for other types
14
+ */
15
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge" | "fullscreen";
16
+ /**
17
+ * Mark modal as loading
18
+ * @default false
19
+ */
20
+ loading?: boolean;
21
+ /**
22
+ * Hide Ok button
23
+ * @default false
24
+ */
25
+ hideOkButton?: boolean;
26
+ /**
27
+ * Hide Cancel button
28
+ * @default false
29
+ */
30
+ hideCancelButton?: boolean;
31
+ /**
32
+ * Custom Content Padding
33
+ * @default "24px"
34
+ */
35
+ contentPadding?: number | string | boolean;
36
+ /**
37
+ * Add more content below the title
38
+ */
39
+ afterTitle?: React.ReactNode;
40
+ /**
41
+ * Add more actions before close button
42
+ */
43
+ beforeCloseButton?: React.ReactNode;
44
+ /**
45
+ * Add more actions after close button
46
+ */
47
+ afterCloseButton?: React.ReactNode;
48
+ /**
49
+ * Set header and footer to fixed position
50
+ * @default false
51
+ */
52
+ defaultFixedHeaderFooter?: boolean;
53
+ /**
54
+ * Centered Modal
55
+ * @default true
56
+ */
57
+ centered?: boolean;
58
+ /**
59
+ * Modal type
60
+ * @default "default"
61
+ */
62
+ type?: ModalType;
63
+ /**
64
+ * Default open state for uncontrolled modal
65
+ * @default true
66
+ */
67
+ defaultOpen?: boolean;
68
+ }
69
+ export declare const Modal: ({ open: externalOpen, closeIcon, children, size, footer, width, style, styles, classNames, okButtonProps, cancelButtonProps, loading, onOk, onCancel, onClose, okText, okType, confirmLoading, cancelText, hideOkButton, hideCancelButton, contentPadding, title, afterTitle, beforeCloseButton, afterCloseButton, defaultFixedHeaderFooter, centered, type, defaultOpen, ...rest }: ModalProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ export interface ModalProviderProps {
3
+ children?: React.ReactNode;
4
+ }
5
+ export declare const ModalProvider: React.FC<ModalProviderProps>;
@@ -0,0 +1,33 @@
1
+ import type { ModalFuncProps } from "./functions";
2
+ export type ModalConfig = ModalFuncProps & {
3
+ id: string;
4
+ trigger?: HTMLElement;
5
+ };
6
+ export type UpdateConfig = Partial<ModalFuncProps> | ((prev: ModalFuncProps) => ModalFuncProps);
7
+ export type ModalEvent = {
8
+ type: "add";
9
+ payload: ModalConfig;
10
+ } | {
11
+ type: "update";
12
+ payload: {
13
+ id: string;
14
+ config: UpdateConfig;
15
+ };
16
+ } | {
17
+ type: "destroy";
18
+ payload: {
19
+ id: string;
20
+ };
21
+ } | {
22
+ type: "destroyAll";
23
+ };
24
+ type Listener = (event: ModalEvent) => void;
25
+ declare class ModalManager {
26
+ private listeners;
27
+ private counter;
28
+ subscribe(listener: Listener): () => void;
29
+ emit(event: ModalEvent): void;
30
+ generateId(): string;
31
+ }
32
+ export declare const modalManager: ModalManager;
33
+ export {};
@@ -0,0 +1,9 @@
1
+ export declare enum ModalSize {
2
+ xsmall = "400px",
3
+ small = "520px",
4
+ medium = "640px",
5
+ large = "840px",
6
+ xlarge = "1024px",
7
+ xxlarge = "1280px",
8
+ fullscreen = "100%"
9
+ }
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ import type { ModalFuncProps as AntModalFuncProps } from "antd";
3
+ import { ModalProps } from "./Modal";
4
+ export type ModalType = NonNullable<AntModalFuncProps["type"]> | "default";
5
+ export type ModalFuncProps = ModalProps & {
6
+ /**
7
+ * Content to be displayed in the modal
8
+ * Similar to children prop in Modal component
9
+ * Keep this to be compatible with antd ModalFuncProps
10
+ */
11
+ content?: React.ReactNode;
12
+ };
13
+ export type ModalUpdateConfig = Partial<ModalFuncProps> | ((prev: ModalFuncProps) => ModalFuncProps);
14
+ export interface ModalRef {
15
+ update: (config: ModalUpdateConfig) => void;
16
+ destroy: () => void;
17
+ }
18
+ export declare const confirm: (config: ModalFuncProps) => ModalRef;
19
+ export declare const info: (config: ModalFuncProps) => ModalRef;
20
+ export declare const success: (config: ModalFuncProps) => ModalRef;
21
+ export declare const error: (config: ModalFuncProps) => ModalRef;
22
+ export declare const warning: (config: ModalFuncProps) => ModalRef;
23
+ /**
24
+ * Open a default (normal) modal
25
+ */
26
+ export declare const open: (config: ModalFuncProps) => ModalRef;
27
+ export declare const destroyAll: () => void;
@@ -0,0 +1,14 @@
1
+ import { type ModalFuncProps } from "./functions";
2
+ import { type ModalProviderProps } from "./ModalProvider";
3
+ export declare const Modal: (({ open: externalOpen, closeIcon, children, size, footer, width, style, styles, classNames, okButtonProps, cancelButtonProps, loading, onOk, onCancel, onClose, okText, okType, confirmLoading, cancelText, hideOkButton, hideCancelButton, contentPadding, title, afterTitle, beforeCloseButton, afterCloseButton, defaultFixedHeaderFooter, centered, type, defaultOpen, ...rest }: import("./Modal").ModalProps) => import("react/jsx-runtime").JSX.Element) & {
4
+ Provider: import("react").FC<ModalProviderProps>;
5
+ open: (config: ModalFuncProps) => import("./functions").ModalRef;
6
+ info: (config: ModalFuncProps) => import("./functions").ModalRef;
7
+ success: (config: ModalFuncProps) => import("./functions").ModalRef;
8
+ error: (config: ModalFuncProps) => import("./functions").ModalRef;
9
+ warning: (config: ModalFuncProps) => import("./functions").ModalRef;
10
+ confirm: (config: ModalFuncProps) => import("./functions").ModalRef;
11
+ destroyAll: () => void;
12
+ useModal: () => import("antd/es/modal/useModal").HookAPI;
13
+ };
14
+ export { ModalFuncProps, ModalProviderProps };
@@ -0,0 +1,9 @@
1
+ import { type PopoverProps as AntPopoverProps } from "antd/es/popover";
2
+ export interface PopoverProps extends AntPopoverProps {
3
+ /**
4
+ * Arrow config for of the popover
5
+ * @default false
6
+ */
7
+ arrow?: AntPopoverProps["arrow"];
8
+ }
9
+ export declare const Popover: ({ className, style, arrow, ...rest }: PopoverProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,7 @@
1
+ import type { RadioGroupProps } from "./interface";
2
+ export declare const Radio: import("react").ForwardRefExoticComponent<import("antd/es/radio").RadioProps & import("react").RefAttributes<import("antd/es/radio").RadioRef>> & {
3
+ Group: (props: RadioGroupProps & {
4
+ ref?: React.Ref<HTMLDivElement>;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ Button: import("react").ForwardRefExoticComponent<import("antd/es/radio").RadioProps & import("react").RefAttributes<import("antd/es/radio").RadioRef>>;
7
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./component";
2
+ export * from "./interface";
@@ -0,0 +1,5 @@
1
+ import type { RadioProps as AntdRadioProps, RadioRef as AntdRadioRef, RadioGroupProps as AntdRadioGroupProps, RadioChangeEvent as AntdRadioChangeEvent } from "antd/es/radio";
2
+ export type RadioProps = AntdRadioProps;
3
+ export type RadioRef = AntdRadioRef;
4
+ export type RadioGroupProps = AntdRadioGroupProps;
5
+ export type RadioChangeEvent = AntdRadioChangeEvent;
@@ -0,0 +1,10 @@
1
+ import { type ReactNode } from "react";
2
+ export interface ScrollAreaProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ viewportClassName?: string;
6
+ scrollbarClassName?: string;
7
+ thumbClassName?: string;
8
+ orientation?: "vertical" | "horizontal";
9
+ }
10
+ export declare const ScrollArea: ({ children, className, viewportClassName, thumbClassName, scrollbarClassName, orientation, }: ScrollAreaProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,9 @@
1
+ import { default as AntSegmented, type SegmentedProps as AntSegmentedProps } from "antd/es/segmented";
2
+ export type RcSegmentedValue = string | number;
3
+ export interface SegmentedProps<T = RcSegmentedValue> extends AntSegmentedProps<T> {
4
+ }
5
+ declare const MainSegmentedInner: <T>({ className, ...rest }: SegmentedProps<T>, ref: React.Ref<React.ComponentRef<typeof AntSegmented>>) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const Segmented: <T = RcSegmentedValue>(props: SegmentedProps<T> & {
7
+ ref?: React.Ref<React.ComponentRef<typeof AntSegmented>>;
8
+ }) => ReturnType<typeof MainSegmentedInner>;
9
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,11 @@
1
+ import { default as AntSelect, type BaseOptionType, type DefaultOptionType, type SelectProps as AntSelectProps } from "antd/es/select";
2
+ export interface SelectProps<ValueType = unknown, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType> extends AntSelectProps<ValueType, OptionType> {
3
+ }
4
+ export type { BaseOptionType as SelectBaseOptionType, DefaultOptionType as SelectDefaultOptionType, };
5
+ declare const MainSelectInner: <ValueType = unknown, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType>({ mode, className, popupClassName, ...rest }: SelectProps<ValueType, OptionType>, ref: React.Ref<React.ComponentRef<typeof AntSelect>>) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const Select: (<ValueType = unknown, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType>(props: SelectProps<ValueType, OptionType> & {
7
+ ref?: React.ForwardedRef<React.ComponentRef<typeof AntSelect>>;
8
+ }) => ReturnType<typeof MainSelectInner>) & {
9
+ Option: import("rc-select/lib/Option").OptionFC;
10
+ OptGroup: import("rc-select/lib/OptGroup").OptionGroupFC;
11
+ };
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,5 @@
1
+ import { type SliderSingleProps, type SliderRangeProps } from "antd/es/slider";
2
+ export type SliderProps = SliderSingleProps | SliderRangeProps;
3
+ export type { SliderSingleProps, SliderRangeProps };
4
+ declare const Slider: ({ className, tooltip, style, ...rest }: SliderProps) => import("react/jsx-runtime").JSX.Element;
5
+ export { Slider };
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,3 @@
1
+ import { SpinProps as AntdSpinProps } from "antd/es/spin";
2
+ export type SpinProps = AntdSpinProps;
3
+ export declare const Spin: ({ indicator, ...rest }: SpinProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import type { SplitterProps as AntdSplitterProps, PanelProps as AntdSplitterPanelProps } from "antd/es/splitter/interface";
3
+ export type SplitterProps = React.PropsWithChildren<AntdSplitterProps> & {
4
+ showSplitBar?: boolean;
5
+ };
6
+ export type SplitterPanelProps = React.PropsWithChildren<AntdSplitterPanelProps>;
7
+ export declare const Splitter: React.FC<SplitterProps> & {
8
+ Panel: React.FC<SplitterPanelProps>;
9
+ };
10
+ export declare const Split: React.FC<SplitterProps> & {
11
+ Panel: React.FC<SplitterPanelProps>;
12
+ };
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,8 @@
1
+ import { default as AntSwitch, type SwitchProps as AntSwitchProps } from "antd/es/switch";
2
+ export interface SwitchProps extends AntSwitchProps {
3
+ }
4
+ declare const MainSwitchInner: ({ ...rest }: SwitchProps, ref: React.Ref<React.ComponentRef<typeof AntSwitch>>) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const Switch: (props: SwitchProps & {
6
+ ref?: React.ForwardedRef<React.ComponentRef<typeof AntSwitch>>;
7
+ }) => ReturnType<typeof MainSwitchInner>;
8
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,19 @@
1
+ import { default as AntTable, type TableProps as AntTableProps } from "antd/es/table";
2
+ export interface TableProps<RecordType extends object = object> extends AntTableProps<RecordType> {
3
+ /**
4
+ * Add empty description for the table
5
+ */
6
+ emptyDescription?: React.ReactNode;
7
+ }
8
+ declare const InternalTable: <RecordType extends object = object>({ columns, locale, emptyDescription, loading, ...rest }: TableProps<RecordType>) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const Table: typeof InternalTable & {
10
+ Column: typeof AntTable.Column;
11
+ ColumnGroup: typeof AntTable.ColumnGroup;
12
+ SELECTION_COLUMN: typeof AntTable.SELECTION_COLUMN;
13
+ EXPAND_COLUMN: typeof AntTable.EXPAND_COLUMN;
14
+ SELECTION_ALL: typeof AntTable.SELECTION_ALL;
15
+ SELECTION_INVERT: typeof AntTable.SELECTION_INVERT;
16
+ SELECTION_NONE: typeof AntTable.SELECTION_NONE;
17
+ Summary: typeof AntTable.Summary;
18
+ };
19
+ export default Table;
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,11 @@
1
+ import { type TagProps as AntTagProps } from "antd/es/tag";
2
+ export interface TagProps extends AntTagProps {
3
+ /**
4
+ * Indicates if the tag is active
5
+ * @default false
6
+ */
7
+ active?: boolean;
8
+ }
9
+ export declare const Tag: (({ className, active, color, style, closeIcon, closable, ...rest }: TagProps) => import("react/jsx-runtime").JSX.Element) & {
10
+ CheckableTag: import("react").ForwardRefExoticComponent<import("antd/es/tag").CheckableTagProps & import("react").RefAttributes<HTMLSpanElement>>;
11
+ };
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,6 @@
1
+ import { type ConfigProviderProps } from "antd/es/config-provider";
2
+ export interface ThemeProviderProps extends Omit<ConfigProviderProps, "theme" | "prefixCls"> {
3
+ theme: "light" | "dark";
4
+ appendClassesTo?: string | HTMLElement;
5
+ }
6
+ export declare const ThemeProvider: ({ theme, appendClassesTo, children, }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,14 @@
1
+ import { Toast as BaseToast } from "@base-ui-components/react";
2
+ import { ToastData } from "./types";
3
+ declare function InnerToast({ toast, }: {
4
+ toast: BaseToast.Root.ToastObject<ToastData>;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ declare function ToastList({ className }: {
7
+ className?: string;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ declare function ToastProvider(props: BaseToast.Provider.Props): import("react/jsx-runtime").JSX.Element;
10
+ export declare const Toast: typeof InnerToast & {
11
+ List: typeof ToastList;
12
+ Provider: typeof ToastProvider;
13
+ };
14
+ export {};
@@ -0,0 +1,10 @@
1
+ import { Toast as BaseToast } from "@base-ui-components/react";
2
+ import type { ToastData } from "./types";
3
+ export declare const toastManager: BaseToast.createToastManager.ToastManager;
4
+ export declare const toast: ((message: string, options?: Omit<BaseToast.useToastManager.AddOptions<ToastData>, "data" | "description">) => string) & {
5
+ info: (message: string, options?: Omit<BaseToast.useToastManager.AddOptions<ToastData>, "data" | "description">) => string;
6
+ success: (message: string, options?: Omit<BaseToast.useToastManager.AddOptions<ToastData>, "data" | "description">) => string;
7
+ error: (message: string, options?: Omit<BaseToast.useToastManager.AddOptions<ToastData>, "data" | "description">) => string;
8
+ warning: (message: string, options?: Omit<BaseToast.useToastManager.AddOptions<ToastData>, "data" | "description">) => string;
9
+ progress: (message: string, options?: Omit<BaseToast.useToastManager.AddOptions<ToastData>, "data" | "description">) => string;
10
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./component";
2
+ export * from "./types";
3
+ export * from "./function";
@@ -0,0 +1,3 @@
1
+ export type ToastData = {
2
+ type: "info" | "success" | "error" | "warning" | "progress";
3
+ };
@@ -0,0 +1,9 @@
1
+ import { type TooltipProps as AntTooltipProps } from "antd/es/tooltip";
2
+ export type TooltipProps = AntTooltipProps & {
3
+ /**
4
+ * Arrow config for of the tooltip
5
+ * @default false
6
+ */
7
+ arrow?: AntTooltipProps["arrow"];
8
+ };
9
+ export declare const Tooltip: ({ className, style, arrow, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,7 @@
1
+ import { type TourProps as AntTourProps, type TourStepProps as AntTourStepProps } from "antd/es/tour/interface";
2
+ export interface TourProps extends AntTourProps {
3
+ }
4
+ export interface TourStepProps extends AntTourStepProps {
5
+ }
6
+ declare const Tour: ({ indicatorsRender, ...rest }: TourProps) => import("react/jsx-runtime").JSX.Element;
7
+ export { Tour };
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,17 @@
1
+ import { CSSProperties } from "react";
2
+ import { useRender } from "@base-ui-components/react/use-render";
3
+ export interface TransitionProps extends Omit<useRender.ComponentProps<"div">, "render" | "children"> {
4
+ /** Whether the component should be shown */
5
+ show?: boolean;
6
+ /** CSS classes to apply when the component is opened */
7
+ starting?: string | CSSProperties;
8
+ /** CSS classes to apply when the component is closed */
9
+ ending?: string | CSSProperties;
10
+ /** CSS classes to apply to the component */
11
+ className?: string;
12
+ /** Child component to render */
13
+ children: useRender.ComponentProps<"div">["render"];
14
+ /** Keep mounted */
15
+ keepMounted?: boolean;
16
+ }
17
+ export declare const Transition: (props: TransitionProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,13 @@
1
+ import { default as AntTree, type DataNode as AntTreeDataNode } from "antd/es/tree";
2
+ import type { TreeDataNode, TreeProps, DirectoryTreeProps } from "./types";
3
+ declare const MainTreeInner: <T extends AntTreeDataNode = AntTreeDataNode>(props: TreeProps<T>, ref: React.Ref<React.ComponentRef<typeof AntTree<T>>>) => import("react/jsx-runtime").JSX.Element;
4
+ declare const DirectoryTreeInner: <T extends AntTreeDataNode = AntTreeDataNode>(props: DirectoryTreeProps<T>, ref: React.Ref<React.ComponentRef<typeof AntTree<T>>>) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const Tree: (<T extends AntTreeDataNode = AntTreeDataNode>(props: TreeProps<T> & {
6
+ ref?: React.ForwardedRef<React.ComponentRef<typeof AntTree<T>>>;
7
+ }) => ReturnType<typeof MainTreeInner<T>>) & {
8
+ DirectoryTree: <T extends AntTreeDataNode = AntTreeDataNode>(props: DirectoryTreeProps<T> & {
9
+ ref?: React.ForwardedRef<React.ComponentRef<typeof AntTree<T>>>;
10
+ }) => ReturnType<typeof DirectoryTreeInner<T>>;
11
+ TreeNode: import("react").FC<Readonly<import("rc-tree").TreeNodeProps<AntTreeDataNode>>>;
12
+ };
13
+ export {};
@@ -0,0 +1,4 @@
1
+ import { type Key } from "react";
2
+ import { type DataNode as AntTreeDataNode } from "antd/es/tree";
3
+ export declare const getUniqueKeysFromOriginals: (nodes: AntTreeDataNode[] | undefined, originalKeysToFind: Set<Key>, map: Map<Key, Key>) => Key[];
4
+ export declare const processTreeData: <T extends AntTreeDataNode = AntTreeDataNode>(nodes: T[] | undefined, expandedOriginalKeys: Set<Key>, parentKeyPrefix: string, keyMap: Map<Key, Key>) => T[] | undefined;
@@ -0,0 +1,4 @@
1
+ export * from "./types";
2
+ export * from "./useUniqueKeysTree";
3
+ export * from "./helpers";
4
+ export * from "./components";