@bioturing/components 0.14.0 → 0.15.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.
- package/dist/Badge.css +6 -0
- package/dist/Breadcrumb.css +83 -0
- package/dist/Checkbox.css +13 -0
- package/dist/CodeBlock.css +213 -0
- package/dist/CodeBlock.js +11 -8
- package/dist/Collapse.css +21 -0
- package/dist/DSRoot.css +667 -0
- package/dist/DSRoot.js +264 -17
- package/dist/DropdownMenu.css +95 -0
- package/dist/Empty.css +19 -0
- package/dist/Field.css +14 -0
- package/dist/Form.css +64 -0
- package/dist/IconButton.css +52 -0
- package/dist/Modal.css +317 -0
- package/dist/Modal.js +256 -9
- package/dist/PopupPanel.css +156 -102
- package/dist/Radio.css +14 -0
- package/dist/ScrollArea.css +64 -0
- package/dist/ScrollArea.js +4 -4
- package/dist/Segmented.css +16 -0
- package/dist/Select.css +24 -0
- package/dist/Select.js +4 -3
- package/dist/Spin.css +36 -0
- package/dist/Splitter.css +6 -0
- package/dist/Switch.css +7 -0
- package/dist/Table.css +116 -0
- package/dist/Tag.css +17 -0
- package/dist/ThemeProvider.css +39 -0
- package/dist/Toast.css +622 -0
- package/dist/Toast.js +264 -17
- package/dist/Tooltip.css +6 -0
- package/dist/Tour.css +73 -0
- package/dist/Tour.js +1 -1
- package/dist/Truncate.css +31 -0
- package/dist/Truncate.js +75 -19
- package/dist/Upload.css +144 -0
- package/dist/Upload.js +75 -19
- package/dist/VerticalCollapsiblePanel.css +193 -0
- package/dist/VerticalCollapsiblePanel.js +75 -19
- package/dist/components/Badge/component.d.ts +1 -0
- package/dist/components/Breadcrumb/component.d.ts +1 -0
- package/dist/components/Button/component.d.ts +1 -0
- package/dist/components/Checkbox/component.d.ts +1 -0
- package/dist/components/CodeBlock/component.d.ts +2 -1
- package/dist/components/CodeBlock/types.d.ts +12 -0
- package/dist/components/Collapse/component.d.ts +1 -0
- package/dist/components/DSRoot/component.d.ts +1 -0
- package/dist/components/DropdownMenu/component.d.ts +1 -0
- package/dist/components/Empty/component.d.ts +1 -0
- package/dist/components/Field/component.d.ts +1 -0
- package/dist/components/Form/component.d.ts +1 -0
- package/dist/components/IconButton/component.d.ts +1 -0
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/Radio/component.d.ts +1 -0
- package/dist/components/ScrollArea/component.d.ts +26 -4
- package/dist/components/Segmented/component.d.ts +1 -0
- package/dist/components/Select/component.d.ts +2 -1
- package/dist/components/Spin/component.d.ts +1 -0
- package/dist/components/Splitter/component.d.ts +1 -0
- package/dist/components/Stack/Stack.d.ts +39 -0
- package/dist/components/Stack/StackChild.d.ts +30 -0
- package/dist/components/Stack/index.d.ts +8 -0
- package/dist/components/Switch/component.d.ts +1 -0
- package/dist/components/Table/component.d.ts +1 -0
- package/dist/components/Tag/component.d.ts +1 -0
- package/dist/components/ThemeProvider/component.d.ts +1 -0
- package/dist/components/Toast/component.d.ts +1 -0
- package/dist/components/Tooltip/component.d.ts +1 -0
- package/dist/components/Tour/component.d.ts +1 -0
- package/dist/components/Truncate/component.d.ts +3 -0
- package/dist/components/Upload/index.d.ts +1 -0
- package/dist/components/VerticalCollapsiblePanel/component.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/hooks.js +1 -1
- package/dist/index.css +1469 -114
- package/dist/index.d.ts +1 -0
- package/dist/index.js +788 -159
- package/dist/metadata.d.ts +363 -0
- package/dist/tailwind.css +118 -1
- package/package.json +2 -2
- package/dist/style.css +0 -1392
- package/dist/style.js +0 -0
- package/dist/tailwind.js +0 -0
|
@@ -2,6 +2,7 @@ import type { InputProps, InputRef, SelectProps } from "antd";
|
|
|
2
2
|
import { SizeType } from "antd/es/config-provider/SizeContext";
|
|
3
3
|
import { RefSelectProps } from "antd/es/select";
|
|
4
4
|
import { ForwardedRef } from "react";
|
|
5
|
+
import "./style.css";
|
|
5
6
|
export type FieldType = "input" | "select";
|
|
6
7
|
type RefType<T extends FieldType> = T extends "input" ? InputRef : T extends "select" ? RefSelectProps : never;
|
|
7
8
|
interface BaseFieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -2,6 +2,7 @@ import { FormProps as AntdFormProps, default as AntdInternalForm, useForm, useWa
|
|
|
2
2
|
import useFormInstance from "antd/es/form/hooks/useFormInstance";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { type FormItemProps } from "./item";
|
|
5
|
+
import "./style.css";
|
|
5
6
|
export interface FormProps<Values = any> extends AntdFormProps<Values> {
|
|
6
7
|
}
|
|
7
8
|
interface InternalFormProps<Values = any> extends React.ComponentProps<typeof AntdInternalForm<Values>> {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { type ElementType, type ComponentPropsWithoutRef, type ReactElement, type AnchorHTMLAttributes, ComponentPropsWithRef } from "react";
|
|
2
2
|
import { Tooltip } from "antd";
|
|
3
|
+
import "./style.css";
|
|
3
4
|
type IconButtonBaseProps = {
|
|
4
5
|
label?: React.ReactNode;
|
|
5
6
|
size?: "small" | "medium";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ModalFuncProps } from "./functions";
|
|
2
2
|
import { type ModalProviderProps } from "./ModalProvider";
|
|
3
|
+
import "./style.css";
|
|
3
4
|
export declare const Modal: (({ open: externalOpen, closeIcon, children, size: sizeProp, footer, width, style, styles, classNames, okButtonProps, cancelButtonProps, loading, onOk, onCancel, okText, okType, confirmLoading, cancelText, hideOkButton, hideCancelButton, contentPadding, title, afterTitle, beforeCloseButton, afterCloseButton, defaultFixedHeaderFooter, centered, type, defaultOpen, background: backgroundProp, bodyScrollable, ...rest }: import("./Modal").ModalProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
5
|
Provider: import("react").FC<ModalProviderProps>;
|
|
5
6
|
open: (config: ModalFuncProps) => import("./functions").ModalRef;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RadioGroupProps } from "./interface";
|
|
2
|
+
import "./style.css";
|
|
2
3
|
export declare const Radio: import("react").ForwardRefExoticComponent<import("antd/es/radio").RadioProps & import("react").RefAttributes<import("antd/es/radio").RadioRef>> & {
|
|
3
4
|
Group: (props: RadioGroupProps & {
|
|
4
5
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import "./style.css";
|
|
2
3
|
export interface ScrollAreaProps {
|
|
3
4
|
children: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* Additional class name for the root component
|
|
7
|
+
*/
|
|
4
8
|
className?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Custom class names for each part of the scroll area
|
|
11
|
+
*/
|
|
12
|
+
classNames?: {
|
|
13
|
+
/**
|
|
14
|
+
* Class name for the viewport element
|
|
15
|
+
*/
|
|
16
|
+
viewport?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Class name for the scrollbar element
|
|
19
|
+
*/
|
|
20
|
+
scrollbar?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Class name for the thumb element
|
|
23
|
+
*/
|
|
24
|
+
thumb?: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Orientation of the scrollbar
|
|
28
|
+
* @default "vertical"
|
|
29
|
+
*/
|
|
8
30
|
orientation?: "vertical" | "horizontal";
|
|
9
31
|
}
|
|
10
|
-
export declare const ScrollArea: ({ children, className,
|
|
32
|
+
export declare const ScrollArea: ({ children, className, classNames, orientation, }: ScrollAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as AntSelect, type BaseOptionType, type DefaultOptionType, type SelectProps as AntSelectProps } from "antd/es/select";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { PopupPanelSize } from "../PopupPanel/constants";
|
|
4
|
+
import "./style.css";
|
|
4
5
|
export interface SelectProps<ValueType = unknown, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType> extends AntSelectProps<ValueType, OptionType> {
|
|
5
6
|
/**
|
|
6
7
|
* Whether to enhance the positioner using floating-ui
|
|
@@ -14,7 +15,7 @@ export interface SelectProps<ValueType = unknown, OptionType extends BaseOptionT
|
|
|
14
15
|
popupSize?: string | number | PopupPanelSize;
|
|
15
16
|
}
|
|
16
17
|
export type { BaseOptionType as SelectBaseOptionType, DefaultOptionType as SelectDefaultOptionType, };
|
|
17
|
-
declare const MainSelectInner: <ValueType = unknown, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType>({ mode, className, open: openProp, defaultOpen, onOpenChange, popupClassName, onDropdownVisibleChange, enhancePositioner, getPopupContainer, popupSize, popupRender, classNames, styles, ...rest }: SelectProps<ValueType, OptionType>, ref: React.Ref<React.ComponentRef<typeof AntSelect>>) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare const MainSelectInner: <ValueType = unknown, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType>({ mode, className, open: openProp, defaultOpen, onOpenChange, popupClassName, onDropdownVisibleChange, enhancePositioner, getPopupContainer, popupSize, popupRender, dropdownRender, classNames, styles, ...rest }: SelectProps<ValueType, OptionType>, ref: React.Ref<React.ComponentRef<typeof AntSelect>>) => import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export declare const Select: (<ValueType = unknown, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType>(props: SelectProps<ValueType, OptionType> & {
|
|
19
20
|
ref?: React.ForwardedRef<React.ComponentRef<typeof AntSelect>>;
|
|
20
21
|
}) => ReturnType<typeof MainSelectInner>) & {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { SplitterProps as AntdSplitterProps, PanelProps as AntdSplitterPanelProps } from "antd/es/splitter/interface";
|
|
3
|
+
import "./style.css";
|
|
3
4
|
export type SplitterProps = React.PropsWithChildren<AntdSplitterProps> & {
|
|
4
5
|
showSplitBar?: boolean;
|
|
5
6
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type StackGap = 0 | 1 | 2 | 4 | 8 | 12 | 16 | 24;
|
|
3
|
+
export interface StackProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the stack should hug its content (inline-flex) instead of filling available space
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
8
|
+
hug?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Vertical alignment of items within the stack
|
|
11
|
+
* @default "flex-start"
|
|
12
|
+
*/
|
|
13
|
+
align?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
|
|
14
|
+
/**
|
|
15
|
+
* Horizontal alignment of items within the stack
|
|
16
|
+
* @default "flex-start"
|
|
17
|
+
*/
|
|
18
|
+
justify?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
|
|
19
|
+
/**
|
|
20
|
+
* Whether the stack should render items vertically
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
vertical?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Gap between stack items in pixels
|
|
26
|
+
* @default 0
|
|
27
|
+
*/
|
|
28
|
+
gap?: StackGap;
|
|
29
|
+
/**
|
|
30
|
+
* Wrap items to multiple lines if needed
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
wrap?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Children of the stack
|
|
36
|
+
*/
|
|
37
|
+
children?: React.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
export declare const Stack: React.FC<StackProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StackProps } from "./Stack";
|
|
3
|
+
export interface StackChildProps extends StackProps {
|
|
4
|
+
/**
|
|
5
|
+
* CSS flex property value (e.g. "1", "1 0 auto", "0 1 auto")
|
|
6
|
+
* When boolean: true = 1, false = 0
|
|
7
|
+
* @default undefined
|
|
8
|
+
*/
|
|
9
|
+
flex?: string | number | boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Whether this child should grow to fill available space
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
grow?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether this child should shrink if necessary
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
shrink?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Children of the stack child
|
|
22
|
+
*/
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to render the child with a stack wrapper
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
stack?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const StackChild: React.FC<StackChildProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type StackProps } from "./Stack";
|
|
2
|
+
import { StackChild, type StackChildProps } from "./StackChild";
|
|
3
|
+
import "./style.css";
|
|
4
|
+
export { StackChild };
|
|
5
|
+
export { StackProps, StackChildProps };
|
|
6
|
+
export declare const Stack: import("react").FC<StackProps> & {
|
|
7
|
+
Child: import("react").FC<StackChildProps>;
|
|
8
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as AntSwitch, type SwitchProps as AntSwitchProps } from "antd/es/switch";
|
|
2
|
+
import "./style.css";
|
|
2
3
|
export interface SwitchProps extends AntSwitchProps {
|
|
3
4
|
}
|
|
4
5
|
declare const MainSwitchInner: ({ ...rest }: SwitchProps, ref: React.Ref<React.ComponentRef<typeof AntSwitch>>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import "./style.css";
|
|
2
3
|
export type TruncatePosition = "middle" | "end";
|
|
3
4
|
export type Props = {
|
|
4
5
|
text: string;
|
|
@@ -8,5 +9,7 @@ export interface TruncateProps extends Omit<React.ComponentPropsWithoutRef<"span
|
|
|
8
9
|
children: string;
|
|
9
10
|
/** Where to truncate the text: start, middle, or end */
|
|
10
11
|
position?: TruncatePosition;
|
|
12
|
+
/** Number of lines to display before truncating (default: 1, 'auto' to fit parent height) */
|
|
13
|
+
lines?: number | "auto";
|
|
11
14
|
}
|
|
12
15
|
export declare const Truncate: React.FC<TruncateProps>;
|
|
@@ -29,6 +29,7 @@ export * from "./Toast/index";
|
|
|
29
29
|
export * from "./VerticalCollapsiblePanel/index";
|
|
30
30
|
export * from "./PopupPanel/index";
|
|
31
31
|
export * from "./CodeBlock/index";
|
|
32
|
+
export * from "./Stack/index";
|
|
32
33
|
export * from "./Collapse/index";
|
|
33
34
|
export * from "./Empty/index";
|
|
34
35
|
export * from "./Input/index";
|