@npm-questionpro/wick-ui-lib 0.3.0 → 0.4.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.
@@ -3,12 +3,12 @@ import { VariantProps } from 'class-variance-authority';
3
3
  import * as React from 'react';
4
4
  declare const buttonVariants: (props?: ({
5
5
  size?: "md" | "sm" | "mobile" | null | undefined;
6
- color?: "primary" | "accent" | "error" | null | undefined;
6
+ color?: "primary" | "upgrade" | "error" | null | undefined;
7
7
  variant?: "link" | "primary" | "secondary" | "outline" | "rounded" | "iconOnly" | null | undefined;
8
8
  } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
9
9
  export interface IButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
10
  asChild?: boolean;
11
- color?: 'primary' | 'accent' | 'error';
11
+ color?: 'primary' | 'upgrade' | 'error';
12
12
  }
13
13
  declare const Button: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>>;
14
14
  export { Button };
@@ -5,7 +5,7 @@ import { IWuAppHeaderMenuItem } from './types/WuAppHeaderMenuItem';
5
5
 
6
6
  export interface IWuAppHeaderProps extends React.HTMLAttributes<HTMLBaseElement> {
7
7
  productName: string;
8
- catagories: IWuAppHeaderMenuItem[];
8
+ categories: IWuAppHeaderMenuItem[];
9
9
  user?: IWuAppHeaderAccount;
10
10
  breadcrumbs?: IWuAppHeaderBreadcrumbItem[];
11
11
  children?: React.ReactNode;
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
3
3
  export interface IWuButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
4
  variant?: 'primary' | 'secondary' | 'outline' | 'rounded' | 'link' | 'iconOnly';
5
5
  size?: 'md' | 'sm' | 'mobile';
6
- color?: 'primary' | 'accent' | 'error';
6
+ color?: 'primary' | 'upgrade' | 'error';
7
7
  icon?: ReactNode;
8
8
  iconPosition?: 'left' | 'right';
9
9
  floating?: boolean;
@@ -1,15 +1,16 @@
1
1
  import { default as React } from 'react';
2
2
  import { IWuSwitcherOptions } from './types/IWuSwitcherOptions';
3
3
 
4
- export interface IWuSwitcherProps<T extends string | number | boolean> {
4
+ export interface IWuSwitcherProps<T> {
5
5
  options: IWuSwitcherOptions<T>;
6
6
  onChange?: (value: T) => void;
7
- type?: 'tab' | 'toggle';
7
+ type?: 'tab' | 'toggle' | 'iconTab';
8
8
  disabled?: boolean;
9
9
  value: T;
10
10
  dir?: 'ltr' | 'rtl';
11
+ size?: 'sm' | 'md' | 'lg';
11
12
  }
12
13
  /**
13
14
  * WuSwitcher does not support any custom design.
14
15
  */
15
- export declare const WuSwitcher: React.ForwardRefExoticComponent<IWuSwitcherProps<string | number | boolean> & React.RefAttributes<HTMLDivElement>>;
16
+ export declare const WuSwitcher: React.ForwardRefExoticComponent<IWuSwitcherProps<unknown> & React.RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,6 @@
1
- export interface IWuSwitcherOption<T extends string | boolean | number> {
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface IWuSwitcherOption<T> {
2
4
  value: T;
3
- label: string;
5
+ label: ReactNode;
4
6
  }
@@ -1,6 +1,3 @@
1
1
  import { IWuSwitcherOption } from './IWuSwitcherOption';
2
2
 
3
- export type IWuSwitcherOptions<T extends string | boolean | number> = [
4
- IWuSwitcherOption<T>,
5
- IWuSwitcherOption<T>
6
- ];
3
+ export type IWuSwitcherOptions<T> = [IWuSwitcherOption<T>, IWuSwitcherOption<T>];
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { IWuSwitcherOptions } from '../types/IWuSwitcherOptions';
3
+
4
+ interface IIconTabProps<T> {
5
+ value: string;
6
+ options: IWuSwitcherOptions<T>;
7
+ onChange: (e: string) => void;
8
+ disabled?: boolean;
9
+ dir?: 'ltr' | 'rtl';
10
+ }
11
+ export declare const _IconTab: React.ForwardRefExoticComponent<IIconTabProps<unknown> & React.RefAttributes<HTMLDivElement>>;
12
+ export {};
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { IWuSwitcherOptions } from '../types/IWuSwitcherOptions';
3
+
4
+ interface ITabProps<T> {
5
+ value: string;
6
+ options: IWuSwitcherOptions<T>;
7
+ onChange: (e: string) => void;
8
+ disabled?: boolean;
9
+ dir?: 'ltr' | 'rtl';
10
+ size?: 'sm' | 'md' | 'lg';
11
+ }
12
+ export declare const _Tab: React.ForwardRefExoticComponent<ITabProps<unknown> & React.RefAttributes<HTMLDivElement>>;
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { IWuSwitcherOptions } from '../types/IWuSwitcherOptions';
3
+
4
+ interface IToggleProps<T> {
5
+ value: string;
6
+ options: IWuSwitcherOptions<T>;
7
+ onChange: (e: string) => void;
8
+ disabled?: boolean;
9
+ dir?: 'ltr' | 'rtl';
10
+ }
11
+ export declare const _Toggle: React.ForwardRefExoticComponent<IToggleProps<unknown> & React.RefAttributes<HTMLDivElement>>;
12
+ export {};
@@ -0,0 +1 @@
1
+ export declare const IconExample: () => JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const MediumLight: () => JSX.Element;
2
+ export declare const StylesAndFormat: () => JSX.Element;
3
+ export declare const Colors: () => JSX.Element;
@@ -4,3 +4,4 @@ export declare function cn(...inputs: ClassValue[]): string;
4
4
  export declare const openInNewWindow: (url: string) => void;
5
5
  export declare function randomId(): string;
6
6
  export declare function spaceInCamelCase(str: string): string;
7
+ export declare function findKeyByValue<T>(obj: Record<string, T>, value: T): string | undefined;