@bioturing/components 0.21.2 → 0.23.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/index.d.ts CHANGED
@@ -82,6 +82,7 @@ import { Dropdown } from 'antd';
82
82
  import { DropDownProps } from 'antd';
83
83
  import { DropdownProps } from 'antd';
84
84
  import { ElementType } from 'react';
85
+ import { ElementTypeToDOMType as ElementTypeToDOMType_2 } from '..';
85
86
  import { EmptyProps as EmptyProps_2 } from 'antd/es/empty';
86
87
  import { ErrorListProps } from 'antd/es/form';
87
88
  import { EventDataNode } from 'antd/es/tree';
@@ -94,6 +95,7 @@ import { FloatButtonProps } from 'antd';
94
95
  import { FloatButtonRef } from 'antd';
95
96
  import { FormInstance } from 'antd';
96
97
  import { FormItemProps as FormItemProps_2 } from 'antd/es/form/FormItem';
98
+ import { FormLabelProps } from './label';
97
99
  import { FormListFieldData } from 'antd';
98
100
  import { FormListOperation } from 'antd';
99
101
  import { FormListProps } from 'antd/es/form';
@@ -456,9 +458,9 @@ export declare function clsx(...args: ClassValue[]): string;
456
458
 
457
459
  export declare function cn(...args: ClassValue[]): string;
458
460
 
459
- export declare const CodeBlock: ({ code, children, lang: defaultLang, className, options, activeOption: controlledActiveOption, defaultActiveOption, onActiveOptionChange, copyText, copySuccessText, classNames, maxHeight, ...rest }: CodeBlockProps) => JSX.Element;
461
+ export declare const CodeBlock: ({ code, children, lang: defaultLang, className, options, activeOption: controlledActiveOption, defaultActiveOption, onActiveOptionChange, copyText, copySuccessText, classNames, maxHeight, onCopy, ...rest }: CodeBlockProps) => JSX.Element;
460
462
 
461
- export declare interface CodeBlockProps extends React.ComponentPropsWithRef<"div"> {
463
+ export declare interface CodeBlockProps extends Omit<React.ComponentPropsWithRef<"div">, "onCopy"> {
462
464
  /**
463
465
  * The code to be highlighted
464
466
  */
@@ -510,6 +512,10 @@ export declare interface CodeBlockProps extends React.ComponentPropsWithRef<"div
510
512
  * Maximum height of the code block
511
513
  */
512
514
  maxHeight?: string | number;
515
+ /**
516
+ * Copy callback function
517
+ */
518
+ onCopy?: (code?: string) => void;
513
519
  }
514
520
 
515
521
  export declare interface CodeOption {
@@ -1714,7 +1720,7 @@ export { FloatButtonProps }
1714
1720
 
1715
1721
  export { FloatButtonRef }
1716
1722
 
1717
- export declare const Form: (<Values = any>({ ...rest }: InternalFormProps<Values>) => JSX.Element) & {
1723
+ export declare const Form: (<Values = unknown>({ ...rest }: InternalFormProps<Values>) => JSX.Element) & {
1718
1724
  useForm: typeof useForm;
1719
1725
  useFormInstance: typeof default_9;
1720
1726
  useWatch: typeof useWatch;
@@ -1722,6 +1728,9 @@ export declare const Form: (<Values = any>({ ...rest }: InternalFormProps<Values
1722
1728
  List: React_2.FC<FormListProps>;
1723
1729
  ErrorList: React_2.FC<ErrorListProps>;
1724
1730
  Provider: React_2.FC<FormProviderProps>;
1731
+ Label: <E extends React_2.ElementType = "label">(props: FormLabelProps<E> & {
1732
+ ref?: React_2.ComponentPropsWithRef<E>["ref"];
1733
+ }) => ReturnType<(<E_1 extends React_2.ElementType = "label">({ label, tooltip, optionalMark, requiredMark, className, as, render, ...rest }: FormLabelProps<E_1>, ref: React_2.Ref<ElementTypeToDOMType_2<E_1>>) => JSX.Element)>;
1725
1734
  };
1726
1735
 
1727
1736
  export { FormInstance }
@@ -1791,7 +1800,7 @@ export declare const IconButton: <E extends ElementType = "button">(props: IconB
1791
1800
  /**
1792
1801
  * Implementation of the IconButton component
1793
1802
  */
1794
- declare const IconButtonImpl: <E extends ElementType = "button">({ label, size, negativeMargin, children, className, tooltipProps, as, href, target, rel, download, hrefLang, referrerPolicy, loading, render, ...rest }: IconButtonProps<E>, ref: Ref<ElementTypeToDOMType<E>>) => JSX.Element;
1803
+ declare const IconButtonImpl: <E extends ElementType = "button">({ label, size, negativeMargin, children, className, tooltipProps, active, as, href, target, rel, download, hrefLang, referrerPolicy, loading, render, ...rest }: IconButtonProps<E>, ref: Ref<ElementTypeToDOMType<E>>) => JSX.Element;
1795
1804
 
1796
1805
  export declare type IconButtonProps<E extends ElementType = "button"> = WithRenderPropProps<E, {
1797
1806
  loading: boolean;
@@ -1820,6 +1829,11 @@ export declare type IconButtonProps<E extends ElementType = "button"> = WithRend
1820
1829
  * Props to pass to the Tooltip component when wrapping the button
1821
1830
  */
1822
1831
  tooltipProps?: TooltipProps;
1832
+ /**
1833
+ * Whether to show active state
1834
+ * @default false
1835
+ */
1836
+ active?: boolean;
1823
1837
  };
1824
1838
 
1825
1839
  declare const InnerInternalTable: <RecordType extends object = object>({ columns, locale, emptyDescription, loading, virtual, scroll: scrollProp, className, variant, ...rest }: TableProps<RecordType>, ref: Ref<TableRef>) => JSX.Element;
@@ -1856,7 +1870,7 @@ export declare interface InputProps extends InputProps_2 {
1856
1870
 
1857
1871
  export declare const InternalBadge: ({ count, showZero, ...rest }: BadgeProps) => JSX.Element;
1858
1872
 
1859
- declare interface InternalFormProps<Values = any> extends React_2.ComponentProps<typeof default_8<Values>> {
1873
+ declare interface InternalFormProps<Values = unknown> extends React_2.ComponentProps<typeof default_8<Values>> {
1860
1874
  }
1861
1875
 
1862
1876
  declare const InternalTable: <RecordType extends object = object>(props: TableProps<RecordType> & {
@@ -2925,7 +2939,7 @@ export declare interface ScrollAreaProps {
2925
2939
  orientation?: "vertical" | "horizontal";
2926
2940
  }
2927
2941
 
2928
- declare const SearchInner: (props: SearchProps, ref: React.Ref<InputRef>) => JSX.Element;
2942
+ declare const SearchInner: ({ enterButton, onSearch, prefix, onPressEnter, onClear, loading, ...rest }: SearchProps, ref: React.Ref<InputRef>) => JSX.Element;
2929
2943
 
2930
2944
  export declare interface SearchProps extends SearchProps_2 {
2931
2945
  }
@@ -2990,9 +3004,11 @@ export { Space }
2990
3004
 
2991
3005
  export { SpaceProps }
2992
3006
 
2993
- export declare const Spin: ({ indicator, ...rest }: SpinProps) => JSX.Element;
3007
+ export declare const Spin: ({ indicator, size, ...rest }: SpinProps) => JSX.Element;
2994
3008
 
2995
- export declare type SpinProps = SpinProps_2;
3009
+ export declare type SpinProps = Omit<SpinProps_2, "size"> & {
3010
+ size?: "small" | "default" | "large" | number;
3011
+ };
2996
3012
 
2997
3013
  export declare const Split: default_2.FC<SplitterProps> & {
2998
3014
  Panel: default_2.FC<SplitterPanelProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bioturing/components",
3
- "version": "0.21.2",
3
+ "version": "0.23.0",
4
4
  "type": "module",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.js",
@@ -17,8 +17,8 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@ant-design/cssinjs": "^1.23.0",
20
- "@base-ui-components/react": "1.0.0-beta.0",
21
- "@floating-ui/react": "^0.27.8",
20
+ "@base-ui-components/react": "1.0.0-beta.1",
21
+ "@floating-ui/react": "^0.27.13",
22
22
  "cmdk": "^1.1.1",
23
23
  "es-toolkit": "^1.37.2",
24
24
  "merge-refs": "^2.0.0",
@@ -27,8 +27,8 @@
27
27
  "rc-table": "^7.50.4",
28
28
  "rc-tree": "^5.13.1",
29
29
  "react-use-resizable": "^0.2.0",
30
- "tailwind-merge": "^3.2.0",
31
- "@bioturing/assets": "0.17.0"
30
+ "tailwind-merge": "^3.3.1",
31
+ "@bioturing/assets": "0.18.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "antd": "^5.25.0",