uikit-react-public 0.50.4 → 0.50.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.
@@ -5,22 +5,31 @@ import { default as AlertMessage } from './AlertMessage';
5
5
  import { default as AlertTitle } from './AlertTitle';
6
6
  import { MarginProps } from '../common/marginsStyle';
7
7
  export declare const NAME = "ucl-uikit-alert";
8
- export type AlertType = 'info' | 'success' | 'warning' | 'error';
8
+ export type AlertVariant = 'info' | 'success' | 'warning' | 'error';
9
+ /** @deprecated Use AlertVariant instead. */
10
+ export type AlertType = AlertVariant;
9
11
  export interface AlertContextProps {
10
- type: AlertType;
12
+ type: AlertVariant;
11
13
  }
12
14
  export declare const AlertContext: import('react').Context<AlertContextProps | null>;
13
15
  export declare function useAlertContext(): AlertContextProps;
14
16
  export interface AlertBaseProps extends HTMLAttributes<HTMLDivElement> {
15
- type: AlertType;
17
+ variant?: AlertVariant;
18
+ /** @deprecated Use variant instead. */
19
+ type?: AlertVariant;
16
20
  iconProps?: Omit<IconProps, 'svg'>;
17
21
  contentProps?: HTMLAttributes<HTMLDivElement>;
18
22
  actionButton?: ReactElement<ButtonProps>;
19
23
  testId?: string;
20
24
  }
21
- export type AlertProps = AlertBaseProps & MarginProps;
25
+ export type AlertProps = AlertBaseProps & MarginProps & ({
26
+ variant: AlertVariant;
27
+ } | {
28
+ variant?: undefined;
29
+ type: AlertVariant;
30
+ });
22
31
  declare const Alert: {
23
- ({ type, iconProps, contentProps, actionButton, children, testId, className, ...props }: AlertProps): import("react").JSX.Element;
32
+ ({ variant, type: deprecatedType, iconProps, contentProps, actionButton, children, testId, className, ...props }: AlertProps): import("react").JSX.Element;
24
33
  Title: ({ children, testId, className, ...props }: import('./AlertTitle').AlertTitleProps) => import("react").JSX.Element;
25
34
  Message: ({ testId, className, children, ...props }: import('./AlertMessage').AlertMessageProps) => import("react").JSX.Element;
26
35
  };
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
2
2
  declare const meta: {
3
3
  title: string;
4
4
  component: {
5
- ({ type, iconProps, contentProps, actionButton, children, testId, className, ...props }: import('./Alert').AlertProps): import("react").JSX.Element;
5
+ ({ variant, type: deprecatedType, iconProps, contentProps, actionButton, children, testId, className, ...props }: import('./Alert').AlertProps): import("react").JSX.Element;
6
6
  Title: ({ children, testId, className, ...props }: import('./AlertTitle').AlertTitleProps) => import("react").JSX.Element;
7
7
  Message: ({ testId, className, children, ...props }: import('./AlertMessage').AlertMessageProps) => import("react").JSX.Element;
8
8
  } & import('./Alert').IAlertSubComponents;
@@ -10,12 +10,20 @@ declare const meta: {
10
10
  layout: string;
11
11
  };
12
12
  argTypes: {
13
+ variant: {
14
+ options: string[];
15
+ control: {
16
+ type: "select";
17
+ };
18
+ type: "string";
19
+ };
13
20
  type: {
14
21
  options: string[];
15
22
  control: {
16
23
  type: "select";
17
24
  };
18
25
  type: "string";
26
+ description: string;
19
27
  };
20
28
  className: {
21
29
  control: {
@@ -140,7 +148,7 @@ declare const meta: {
140
148
  };
141
149
  };
142
150
  args: {
143
- type: "info";
151
+ variant: "info";
144
152
  testId: string;
145
153
  };
146
154
  tags: string[];
@@ -1,6 +1,6 @@
1
1
  export { default } from './Alert';
2
2
  export { default as AlertTitle } from './AlertTitle';
3
3
  export { default as AlertMessage } from './AlertMessage';
4
- export type { AlertProps } from './Alert';
4
+ export type { AlertProps, AlertVariant, AlertType } from './Alert';
5
5
  export type { AlertTitleProps } from './AlertTitle';
6
6
  export type { AlertMessageProps } from './AlertMessage';
@@ -108,7 +108,7 @@ export type { HeaderDraftProps } from './HeaderDraft';
108
108
  export { default as Table } from './Table';
109
109
  export type { TableProps } from './Table';
110
110
  export { default as Alert } from './Alert';
111
- export type { AlertProps } from './Alert';
111
+ export type { AlertProps, AlertVariant, AlertType } from './Alert';
112
112
  export { default as Tabs } from './Tabs';
113
113
  export type { TabsActivationMode, TabsListProps, TabsOrientation, TabsPanelProps, TabsProps, } from './Tabs';
114
114
  export type { TabProps } from './Tabs/Tab';