@npm-questionpro/wick-ui-lib 0.2.6 → 0.3.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/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
@@ -14,4 +14,4 @@ export interface IWuButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEle
14
14
  /**
15
15
  * This extends to HTML button. So it supports all attributes of button. Styles can be customized using className & style props.
16
16
  */
17
- export declare const WuButton: React.FC<IWuButtonProps>;
17
+ export declare const WuButton: import('react').ForwardRefExoticComponent<IWuButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -14,4 +14,4 @@ export interface IWuCheckboxProps extends Omit<React.ButtonHTMLAttributes<HTMLBu
14
14
  * This extends to HTML button. So it supports all attributes of button.
15
15
  * Note: className will apply to container. Style will apply to checkbox.
16
16
  */
17
- export declare const WuCheckbox: React.FC<IWuCheckboxProps>;
17
+ export declare const WuCheckbox: React.ForwardRefExoticComponent<IWuCheckboxProps & React.RefAttributes<HTMLButtonElement>>;
@@ -14,4 +14,4 @@ export interface IWuInputProps extends React.InputHTMLAttributes<HTMLInputElemen
14
14
  * This extends to HTML input. So it supports all attributes of input.
15
15
  * Note: Custom design by className & style. Can't style the container..
16
16
  */
17
- export declare const WuInput: React.FC<IWuInputProps>;
17
+ export declare const WuInput: React.ForwardRefExoticComponent<IWuInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -10,4 +10,4 @@ export interface IWuTextareaProps extends React.TextareaHTMLAttributes<HTMLTextA
10
10
  * This extends the native textarea.
11
11
  * Note: Supports custom className and style. Can't style the container.
12
12
  */
13
- export declare const WuTextarea: React.FC<IWuTextareaProps>;
13
+ export declare const WuTextarea: React.ForwardRefExoticComponent<IWuTextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
@@ -1,3 +1,3 @@
1
- export declare const WuInputError: React.FC<{
1
+ export declare const WuInputError: import('react').ForwardRefExoticComponent<{
2
2
  msg?: string;
3
- }>;
3
+ } & import('react').RefAttributes<HTMLParagraphElement>>;
@@ -2,4 +2,4 @@ export type IWuInputHintProps = {
2
2
  length: number;
3
3
  maxLength: number;
4
4
  };
5
- export declare const WuInputHint: React.FC<IWuInputHintProps>;
5
+ export declare const WuInputHint: import('react').ForwardRefExoticComponent<IWuInputHintProps & import('react').RefAttributes<HTMLParagraphElement>>;
@@ -1,3 +1,5 @@
1
- import { Label } from '../../../base/ui/label';
1
+ import { default as React } from 'react';
2
2
 
3
- export declare const WuLabel: React.FC<React.ComponentPropsWithRef<typeof Label>>;
3
+ export declare const WuLabel: React.ForwardRefExoticComponent<Omit<Omit<Omit<import('@radix-ui/react-label').LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & import('class-variance-authority').VariantProps<(props?: import('class-variance-authority/dist/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>, "ref"> & {
4
+ ref?: ((instance: HTMLLabelElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLLabelElement> | null | undefined;
5
+ }, "ref"> & React.RefAttributes<HTMLLabelElement>>;
@@ -9,4 +9,4 @@ export interface IWuHelpButtonProps extends React.ButtonHTMLAttributes<HTMLButto
9
9
  * WuHelp button extends button element that support all button attributes.
10
10
  * Note: Supports custom design by className & style.
11
11
  */
12
- export declare const WuHelpButton: React.FC<IWuHelpButtonProps>;
12
+ export declare const WuHelpButton: React.ForwardRefExoticComponent<IWuHelpButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -5,4 +5,4 @@ export interface IWuLoaderProps extends React.HTMLAttributes<HTMLDivElement> {
5
5
  color?: string;
6
6
  message?: string;
7
7
  }
8
- export declare const WuLoader: React.FC<IWuLoaderProps>;
8
+ export declare const WuLoader: React.ForwardRefExoticComponent<IWuLoaderProps & React.RefAttributes<HTMLDivElement>>;
@@ -2,7 +2,6 @@ import { default as React } from 'react';
2
2
 
3
3
  export interface IWuStepperProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
4
4
  onChange?: (e: number) => void;
5
- ref?: React.ForwardedRef<HTMLInputElement>;
6
5
  readonly?: boolean;
7
6
  resetInvalidValueOnBlur?: boolean;
8
7
  invalid?: boolean;
@@ -14,4 +13,4 @@ export interface IWuStepperProps extends Omit<React.InputHTMLAttributes<HTMLInpu
14
13
  * This extends the native input element. So it supports all attributes of input.
15
14
  * Note: Custom design by className & style. Can't style the container.
16
15
  */
17
- export declare const WuStepper: React.FC<IWuStepperProps>;
16
+ export declare const WuStepper: React.ForwardRefExoticComponent<IWuStepperProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,3 +1,4 @@
1
+ import { default as React } from 'react';
1
2
  import { IWuSwitcherOptions } from './types/IWuSwitcherOptions';
2
3
 
3
4
  export interface IWuSwitcherProps<T extends string | number | boolean> {
@@ -9,6 +10,6 @@ export interface IWuSwitcherProps<T extends string | number | boolean> {
9
10
  dir?: 'ltr' | 'rtl';
10
11
  }
11
12
  /**
12
- * WuSwitcher do not support any custom design.
13
+ * WuSwitcher does not support any custom design.
13
14
  */
14
- export declare const WuSwitcher: <T extends string | number | boolean>(props: IWuSwitcherProps<T>) => JSX.Element;
15
+ export declare const WuSwitcher: React.ForwardRefExoticComponent<IWuSwitcherProps<string | number | boolean> & React.RefAttributes<HTMLDivElement>>;
@@ -8,7 +8,7 @@ export interface IWuToggleProps extends Omit<React.HTMLAttributes<HTMLButtonElem
8
8
  onChange?: (e: boolean) => void;
9
9
  }
10
10
  /**
11
- * WuToggle extends the native button element. So it supports all attributes of switch.
11
+ * WuToggle extends the native button element, supporting all attributes of switch.
12
12
  * Note: Container can be styled by className & style. Can't style the toggle itself.
13
13
  */
14
- export declare const WuToggle: React.FC<IWuToggleProps>;
14
+ export declare const WuToggle: React.ForwardRefExoticComponent<IWuToggleProps & React.RefAttributes<HTMLButtonElement>>;
@@ -10,4 +10,4 @@ export interface IWuTooltipProps extends React.HTMLAttributes<HTMLBaseElement> {
10
10
  /**
11
11
  * WuTooltip can be designed by className & style. Can't style the container.
12
12
  */
13
- export declare const WuTooltip: React.FC<IWuTooltipProps>;
13
+ export declare const WuTooltip: React.ForwardRefExoticComponent<IWuTooltipProps & React.RefAttributes<HTMLSpanElement>>;
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { VirtuosoHandle } from 'react-virtuoso';
2
3
 
3
4
  export interface IWuVirtualScrollProps {
4
5
  containerHeight?: number;
@@ -6,4 +7,4 @@ export interface IWuVirtualScrollProps {
6
7
  callback: (index: number, item: unknown) => JSX.Element;
7
8
  dir?: 'rtl' | 'ltr';
8
9
  }
9
- export declare const WuVirtualScroll: React.FC<IWuVirtualScrollProps>;
10
+ export declare const WuVirtualScroll: React.ForwardRefExoticComponent<IWuVirtualScrollProps & React.RefAttributes<VirtuosoHandle>>;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ /**
4
+ *
5
+ * @param list the list of items to manipulate
6
+ * @param parentRef the parent div ref, used to calculate the width of the parent div
7
+ * @param childRef the child div ref, this is the div(s) will not be resized i.e. other elements in the parent
8
+ * @param minWidthPerItem minimum width of the item nodes
9
+ * @returns an array of open items and an array of wrapped items
10
+ */
11
+ export declare const useResizeList: (list: React.ReactElement[], parentRef: React.RefObject<HTMLDivElement>, childRef: React.RefObject<HTMLDivElement>, minWidthPerItem?: number) => [React.ReactElement[], React.ReactElement[]];