@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.
Files changed (83) hide show
  1. package/dist/Badge.css +6 -0
  2. package/dist/Breadcrumb.css +83 -0
  3. package/dist/Checkbox.css +13 -0
  4. package/dist/CodeBlock.css +213 -0
  5. package/dist/CodeBlock.js +11 -8
  6. package/dist/Collapse.css +21 -0
  7. package/dist/DSRoot.css +667 -0
  8. package/dist/DSRoot.js +264 -17
  9. package/dist/DropdownMenu.css +95 -0
  10. package/dist/Empty.css +19 -0
  11. package/dist/Field.css +14 -0
  12. package/dist/Form.css +64 -0
  13. package/dist/IconButton.css +52 -0
  14. package/dist/Modal.css +317 -0
  15. package/dist/Modal.js +256 -9
  16. package/dist/PopupPanel.css +156 -102
  17. package/dist/Radio.css +14 -0
  18. package/dist/ScrollArea.css +64 -0
  19. package/dist/ScrollArea.js +4 -4
  20. package/dist/Segmented.css +16 -0
  21. package/dist/Select.css +24 -0
  22. package/dist/Select.js +4 -3
  23. package/dist/Spin.css +36 -0
  24. package/dist/Splitter.css +6 -0
  25. package/dist/Switch.css +7 -0
  26. package/dist/Table.css +116 -0
  27. package/dist/Tag.css +17 -0
  28. package/dist/ThemeProvider.css +39 -0
  29. package/dist/Toast.css +622 -0
  30. package/dist/Toast.js +264 -17
  31. package/dist/Tooltip.css +6 -0
  32. package/dist/Tour.css +73 -0
  33. package/dist/Tour.js +1 -1
  34. package/dist/Truncate.css +31 -0
  35. package/dist/Truncate.js +75 -19
  36. package/dist/Upload.css +144 -0
  37. package/dist/Upload.js +75 -19
  38. package/dist/VerticalCollapsiblePanel.css +193 -0
  39. package/dist/VerticalCollapsiblePanel.js +75 -19
  40. package/dist/components/Badge/component.d.ts +1 -0
  41. package/dist/components/Breadcrumb/component.d.ts +1 -0
  42. package/dist/components/Button/component.d.ts +1 -0
  43. package/dist/components/Checkbox/component.d.ts +1 -0
  44. package/dist/components/CodeBlock/component.d.ts +2 -1
  45. package/dist/components/CodeBlock/types.d.ts +12 -0
  46. package/dist/components/Collapse/component.d.ts +1 -0
  47. package/dist/components/DSRoot/component.d.ts +1 -0
  48. package/dist/components/DropdownMenu/component.d.ts +1 -0
  49. package/dist/components/Empty/component.d.ts +1 -0
  50. package/dist/components/Field/component.d.ts +1 -0
  51. package/dist/components/Form/component.d.ts +1 -0
  52. package/dist/components/IconButton/component.d.ts +1 -0
  53. package/dist/components/Modal/index.d.ts +1 -0
  54. package/dist/components/Radio/component.d.ts +1 -0
  55. package/dist/components/ScrollArea/component.d.ts +26 -4
  56. package/dist/components/Segmented/component.d.ts +1 -0
  57. package/dist/components/Select/component.d.ts +2 -1
  58. package/dist/components/Spin/component.d.ts +1 -0
  59. package/dist/components/Splitter/component.d.ts +1 -0
  60. package/dist/components/Stack/Stack.d.ts +39 -0
  61. package/dist/components/Stack/StackChild.d.ts +30 -0
  62. package/dist/components/Stack/index.d.ts +8 -0
  63. package/dist/components/Switch/component.d.ts +1 -0
  64. package/dist/components/Table/component.d.ts +1 -0
  65. package/dist/components/Tag/component.d.ts +1 -0
  66. package/dist/components/ThemeProvider/component.d.ts +1 -0
  67. package/dist/components/Toast/component.d.ts +1 -0
  68. package/dist/components/Tooltip/component.d.ts +1 -0
  69. package/dist/components/Tour/component.d.ts +1 -0
  70. package/dist/components/Truncate/component.d.ts +3 -0
  71. package/dist/components/Upload/index.d.ts +1 -0
  72. package/dist/components/VerticalCollapsiblePanel/component.d.ts +1 -0
  73. package/dist/components/index.d.ts +1 -0
  74. package/dist/hooks.js +1 -1
  75. package/dist/index.css +1469 -114
  76. package/dist/index.d.ts +1 -0
  77. package/dist/index.js +788 -159
  78. package/dist/metadata.d.ts +363 -0
  79. package/dist/tailwind.css +118 -1
  80. package/package.json +2 -2
  81. package/dist/style.css +0 -1392
  82. package/dist/style.js +0 -0
  83. 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
- viewportClassName?: string;
6
- scrollbarClassName?: string;
7
- thumbClassName?: string;
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, viewportClassName, thumbClassName, scrollbarClassName, orientation, }: ScrollAreaProps) => import("react/jsx-runtime").JSX.Element;
32
+ export declare const ScrollArea: ({ children, className, classNames, orientation, }: ScrollAreaProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { default as AntSegmented, type SegmentedProps as AntSegmentedProps } from "antd/es/segmented";
2
+ import "./style.css";
2
3
  export type RcSegmentedValue = string | number;
3
4
  export interface SegmentedProps<T = RcSegmentedValue> extends AntSegmentedProps<T> {
4
5
  }
@@ -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,3 +1,4 @@
1
1
  import { SpinProps as AntdSpinProps } from "antd/es/spin";
2
+ import "./style.css";
2
3
  export type SpinProps = AntdSpinProps;
3
4
  export declare const Spin: ({ indicator, ...rest }: SpinProps) => import("react/jsx-runtime").JSX.Element;
@@ -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 { default as AntTable, type TableProps as AntTableProps } from "antd/es/table";
2
+ import "./style.css";
2
3
  export interface TableProps<RecordType extends object = object> extends AntTableProps<RecordType> {
3
4
  /**
4
5
  * Add empty description for the table
@@ -1,4 +1,5 @@
1
1
  import { type TagProps as AntTagProps } from "antd/es/tag";
2
+ import "./style.css";
2
3
  export interface TagProps extends AntTagProps {
3
4
  /**
4
5
  * Indicates if the tag is active
@@ -1,4 +1,5 @@
1
1
  import { type ConfigProviderProps } from "antd/es/config-provider";
2
+ import "./style.css";
2
3
  export interface ThemeProviderProps extends Omit<ConfigProviderProps, "theme" | "prefixCls"> {
3
4
  theme: "light" | "dark";
4
5
  appendClassesTo?: string | HTMLElement;
@@ -1,5 +1,6 @@
1
1
  import { Toast as BaseToast } from "@base-ui-components/react";
2
2
  import { ToastData } from "./types";
3
+ import "./style.css";
3
4
  declare function InnerToast({ toast, }: {
4
5
  toast: BaseToast.Root.ToastObject<ToastData>;
5
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { type TooltipProps as AntTooltipProps } from "antd/es/tooltip";
2
+ import "./style.css";
2
3
  export type TooltipProps = AntTooltipProps & {
3
4
  /**
4
5
  * Arrow config for of the tooltip
@@ -1,4 +1,5 @@
1
1
  import { type TourProps as AntTourProps, type TourStepProps as AntTourStepProps } from "antd/es/tour/interface";
2
+ import "./style.css";
2
3
  export interface TourProps extends AntTourProps {
3
4
  }
4
5
  export interface TourStepProps extends AntTourStepProps {
@@ -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>;
@@ -1,3 +1,4 @@
1
+ import "./style.css";
1
2
  export * from "./component";
2
3
  export * from "./hooks";
3
4
  export * from "../utils";
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import "./style.css";
2
3
  export interface VerticalCollapsiblePanelProps {
3
4
  /**
4
5
  * The content of the panel that will be toggled
@@ -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";
package/dist/hooks.js CHANGED
@@ -944,7 +944,7 @@ const useCharts = ()=>{
944
944
  },
945
945
  axisLabel: {
946
946
  color: axisLabelColor,
947
- fontFamily: "InterVariable"
947
+ fontFamily: "InterVariable, Inter, Helvetica, Arial, sans-serif"
948
948
  }
949
949
  };
950
950
  return {