@ws-ui/ui-components 1.0.3 → 1.0.5

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
@@ -1,6 +1,7 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { default as default_2 } from 'react';
3
3
  import { ForwardRefExoticComponent } from 'react';
4
+ import { HTMLAttributes } from 'react';
4
5
  import { JSX } from 'react';
5
6
  import { JSX as JSX_2 } from 'react/jsx-runtime';
6
7
  import { default as Qodly } from './Qodly.svg?react';
@@ -2595,6 +2596,11 @@ declare interface HandleProps {
2595
2596
 
2596
2597
  export declare type IconType = (props: JSX.IntrinsicElements['svg']) => JSX.Element;
2597
2598
 
2599
+ export declare interface IMultilineMessage {
2600
+ title?: string;
2601
+ messages: string[];
2602
+ }
2603
+
2598
2604
  export declare const Input: {
2599
2605
  Root: ({ size, color, isInvalid, isDisabled, className, children, ...props }: InputRootProps) => JSX_2.Element;
2600
2606
  Group: ({ className, children, ...props }: InputGroupProps) => JSX_2.Element;
@@ -2762,6 +2768,72 @@ export declare type NumberSize = {
2762
2768
  height: number;
2763
2769
  };
2764
2770
 
2771
+ export declare const Pill: ForwardRefExoticComponent<PillProps & RefAttributes<HTMLDivElement>> & {
2772
+ Root: ForwardRefExoticComponent<PillRootProps & RefAttributes<HTMLDivElement>>;
2773
+ Text: ForwardRefExoticComponent<PillTextProps & RefAttributes<HTMLSpanElement>>;
2774
+ Icon: ForwardRefExoticComponent<PillIconProps & RefAttributes<HTMLSpanElement>>;
2775
+ Button: ForwardRefExoticComponent<PillButtonProps & RefAttributes<HTMLButtonElement>>;
2776
+ Close: ForwardRefExoticComponent<PillCloseProps & RefAttributes<HTMLButtonElement>>;
2777
+ };
2778
+
2779
+ export declare interface PillButtonProps extends HTMLAttributes<HTMLButtonElement> {
2780
+ children: ReactNode;
2781
+ }
2782
+
2783
+ export declare interface PillCloseProps extends HTMLAttributes<HTMLButtonElement> {
2784
+ onClose?: () => void;
2785
+ 'aria-label'?: string;
2786
+ children?: ReactNode;
2787
+ }
2788
+
2789
+ export declare type PillColor = 'primary' | 'white' | 'positive' | 'warning' | 'negative';
2790
+
2791
+ export declare interface PillColorConfig {
2792
+ bg: string;
2793
+ text: string;
2794
+ border: string;
2795
+ buttonHover: string;
2796
+ }
2797
+
2798
+ export declare interface PillContextValue {
2799
+ size: PillSize;
2800
+ color: PillColor;
2801
+ }
2802
+
2803
+ export declare interface PillIconProps extends HTMLAttributes<HTMLSpanElement> {
2804
+ label?: string;
2805
+ position?: TooltipPosition;
2806
+ children: ReactNode;
2807
+ }
2808
+
2809
+ export declare interface PillProps extends React.HTMLAttributes<HTMLDivElement> {
2810
+ size?: PillSize;
2811
+ color?: PillColor;
2812
+ label: string;
2813
+ icon?: React.ReactNode;
2814
+ onClose?: () => void;
2815
+ closable?: boolean;
2816
+ }
2817
+
2818
+ export declare interface PillRootProps extends HTMLAttributes<HTMLDivElement> {
2819
+ size?: PillSize;
2820
+ color?: PillColor;
2821
+ children: ReactNode;
2822
+ }
2823
+
2824
+ export declare type PillSize = 'sm' | 'md' | 'lg';
2825
+
2826
+ export declare interface PillSizeConfig {
2827
+ container: string;
2828
+ text: string;
2829
+ icon: string;
2830
+ iconButton: string;
2831
+ }
2832
+
2833
+ export declare interface PillTextProps extends HTMLAttributes<HTMLSpanElement> {
2834
+ children: ReactNode;
2835
+ }
2836
+
2765
2837
  export { Qodly }
2766
2838
 
2767
2839
  export declare const Radio: {
@@ -3012,6 +3084,28 @@ export declare type Size = {
3012
3084
  height: number | string;
3013
3085
  };
3014
3086
 
3087
+ export declare const Snackbar: default_2.FC<SnackbarProps>;
3088
+
3089
+ export declare type SnackbarCustomIcon = default_2.FC<{
3090
+ className?: string;
3091
+ }>;
3092
+
3093
+ export declare type SnackbarKind = 'warning' | 'info' | 'danger' | 'message' | 'error';
3094
+
3095
+ export declare type SnackbarMessage = string | default_2.ReactElement | default_2.ReactElement[] | IMultilineMessage[];
3096
+
3097
+ export declare interface SnackbarProps extends default_2.HTMLAttributes<HTMLDivElement> {
3098
+ kind?: SnackbarKind;
3099
+ message?: SnackbarMessage;
3100
+ markdown?: boolean;
3101
+ snackbarId?: number | string;
3102
+ size?: SnackbarSize;
3103
+ onClose?(): void;
3104
+ customIcon?: SnackbarCustomIcon;
3105
+ }
3106
+
3107
+ export declare type SnackbarSize = 'sm' | 'md' | 'lg';
3108
+
3015
3109
  export declare interface SubMenuProps {
3016
3110
  label: string;
3017
3111
  icon?: React.ReactNode;