uikit-react-public 0.40.5 → 0.42.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.
@@ -0,0 +1,13 @@
1
+ import { HTMLAttributes, ReactNode, Ref } from 'react';
2
+ import { MarginProps } from '../common/marginsStyle';
3
+ export declare const NAME = "ucl-uikit-callout";
4
+ export interface CalloutBaseProps extends HTMLAttributes<HTMLDivElement> {
5
+ heading?: ReactNode;
6
+ icon?: ReactNode;
7
+ showIcon?: boolean;
8
+ testId?: string;
9
+ ref?: Ref<HTMLDivElement>;
10
+ }
11
+ export type CalloutProps = CalloutBaseProps & MarginProps;
12
+ declare const _default: import('react').MemoExoticComponent<({ heading, icon, showIcon, testId, className, children, ref, ...props }: CalloutProps) => import("react").JSX.Element>;
13
+ export default _default;
@@ -0,0 +1,48 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').MemoExoticComponent<({ heading, icon, showIcon, testId, className, children, ref, ...props }: import('./Callout').CalloutProps) => import("react").JSX.Element>;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ argTypes: {
9
+ heading: {
10
+ control: {
11
+ type: "text";
12
+ };
13
+ };
14
+ children: {
15
+ control: {
16
+ type: "text";
17
+ };
18
+ };
19
+ showIcon: {
20
+ control: {
21
+ type: "boolean";
22
+ };
23
+ };
24
+ icon: {
25
+ control: false;
26
+ };
27
+ testId: {
28
+ control: {
29
+ type: "text";
30
+ };
31
+ };
32
+ className: {
33
+ control: false;
34
+ };
35
+ };
36
+ args: {
37
+ heading: string;
38
+ children: string;
39
+ showIcon: true;
40
+ };
41
+ tags: string[];
42
+ };
43
+ export default meta;
44
+ type Story = StoryObj<typeof meta>;
45
+ export declare const Default: Story;
46
+ export declare const WithoutIcon: Story;
47
+ export declare const CustomIcon: Story;
48
+ export declare const ConstrainedWidth: Story;
@@ -0,0 +1,2 @@
1
+ export { default } from './Callout';
2
+ export type { CalloutProps } from './Callout';
@@ -0,0 +1,24 @@
1
+ import { HTMLAttributes, ReactNode, Ref } from 'react';
2
+ import { ThemeType } from '../../theme';
3
+ import { MarginProps } from '../common/marginsStyle';
4
+ export declare const NAME = "ucl-uikit-progress-bar";
5
+ export type ProgressBarVariant = 'info' | 'success' | 'critical' | 'warning';
6
+ export type ProgressBarSize = 'small' | 'large';
7
+ export interface ProgressBarBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'title' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'role'> {
8
+ value?: number | null;
9
+ max?: number;
10
+ variant?: ProgressBarVariant;
11
+ size?: ProgressBarSize;
12
+ title?: ReactNode;
13
+ label?: ReactNode;
14
+ valueLabel?: ReactNode;
15
+ testId?: string;
16
+ ref?: Ref<HTMLDivElement>;
17
+ 'aria-label'?: string;
18
+ 'aria-labelledby'?: string;
19
+ 'aria-describedby'?: string;
20
+ }
21
+ export type ProgressBarProps = ProgressBarBaseProps & MarginProps;
22
+ export declare const getProgressBarVariantColour: (theme: ThemeType, variant: ProgressBarVariant) => string;
23
+ declare const _default: import('react').MemoExoticComponent<({ value, max, variant, size, title, label, valueLabel, testId, className, ref, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...props }: ProgressBarProps) => import("react").JSX.Element>;
24
+ export default _default;
@@ -0,0 +1,77 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { ProgressBarSize, ProgressBarVariant } from './ProgressBar';
3
+ declare const meta: {
4
+ title: string;
5
+ component: import('react').MemoExoticComponent<({ value, max, variant, size, title, label, valueLabel, testId, className, ref, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...props }: import('./ProgressBar').ProgressBarProps) => import("react").JSX.Element>;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ argTypes: {
10
+ value: {
11
+ control: {
12
+ type: "number";
13
+ min: number;
14
+ max: number;
15
+ };
16
+ };
17
+ max: {
18
+ control: {
19
+ type: "number";
20
+ min: number;
21
+ };
22
+ };
23
+ variant: {
24
+ options: ProgressBarVariant[];
25
+ control: {
26
+ type: "radio";
27
+ };
28
+ };
29
+ size: {
30
+ options: ProgressBarSize[];
31
+ control: {
32
+ type: "radio";
33
+ };
34
+ };
35
+ title: {
36
+ control: {
37
+ type: "text";
38
+ };
39
+ };
40
+ label: {
41
+ control: {
42
+ type: "text";
43
+ };
44
+ };
45
+ valueLabel: {
46
+ control: {
47
+ type: "text";
48
+ };
49
+ };
50
+ testId: {
51
+ control: {
52
+ type: "text";
53
+ };
54
+ };
55
+ className: {
56
+ control: false;
57
+ };
58
+ };
59
+ args: {
60
+ value: number;
61
+ max: number;
62
+ variant: "info";
63
+ size: "small";
64
+ title: string;
65
+ valueLabel: string;
66
+ label: string;
67
+ 'aria-label': string;
68
+ };
69
+ tags: string[];
70
+ };
71
+ export default meta;
72
+ type Story = StoryObj<typeof meta>;
73
+ export declare const Default: Story;
74
+ export declare const Large: Story;
75
+ export declare const Indeterminate: Story;
76
+ export declare const Variants: Story;
77
+ export declare const Sizes: Story;
@@ -0,0 +1,2 @@
1
+ export { default } from './ProgressBar';
2
+ export type { ProgressBarProps, ProgressBarSize, ProgressBarVariant, } from './ProgressBar';
@@ -8,6 +8,8 @@ export { default as StandaloneLink } from './StandaloneLink';
8
8
  export type { StandaloneLinkProps } from './StandaloneLink';
9
9
  export { default as Button } from './Button';
10
10
  export type { ButtonProps } from './Button';
11
+ export { default as Callout } from './Callout';
12
+ export type { CalloutProps } from './Callout';
11
13
  export { default as Label } from './Label';
12
14
  export type { LabelProps } from './Label';
13
15
  export { default as IconButton } from './IconButton';
@@ -27,6 +29,8 @@ export { default as BaseCheckbox } from './BaseCheckbox';
27
29
  export type { BaseCheckboxProps, BaseCheckboxState } from './BaseCheckbox';
28
30
  export { default as Spinner } from './Spinner';
29
31
  export type { SpinnerProps } from './Spinner';
32
+ export { default as ProgressBar } from './ProgressBar';
33
+ export type { ProgressBarProps, ProgressBarSize, ProgressBarVariant, } from './ProgressBar';
30
34
  export { default as Textarea } from './Textarea';
31
35
  export type { TextareaProps } from './Textarea';
32
36
  export { default as Heading } from './Heading';