uikit-react-public 0.21.8 → 0.21.9
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/components/Heading/Heading.d.ts +6 -4
- package/dist/components/Heading/Heading.stories.d.ts +8 -6
- package/dist/components/Paragraph/Paragraph.d.ts +5 -2
- package/dist/components/Paragraph/Paragraph.stories.d.ts +6 -3
- package/dist/components/index.d.ts +4 -4
- package/dist/index.js +3852 -3952
- package/lib/components/Heading/Heading.stories.tsx +34 -41
- package/lib/components/Heading/Heading.tsx +180 -49
- package/lib/components/Heading/__tests__/__snapshots__/Heading.test.tsx.snap +4 -4
- package/lib/components/Paragraph/Paragraph.stories.tsx +29 -27
- package/lib/components/Paragraph/Paragraph.tsx +212 -81
- package/lib/components/Paragraph/__tests__/__snapshots__/Paragraph.test.tsx.snap +5 -5
- package/lib/components/index.ts +4 -4
- package/package.json +1 -1
- package/dist/components/HeadingNew/Heading.d.ts +0 -13
- package/dist/components/HeadingNew/index.d.ts +0 -2
- package/dist/components/ParagraphNew/Paragraph.d.ts +0 -13
- package/dist/components/ParagraphNew/index.d.ts +0 -4
- package/lib/components/HeadingNew/Heading.tsx +0 -208
- package/lib/components/HeadingNew/index.ts +0 -2
- package/lib/components/ParagraphNew/Paragraph.tsx +0 -200
- package/lib/components/ParagraphNew/index.ts +0 -6
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { MarginProps } from '../common/marginsStyle';
|
|
3
3
|
export declare const NAME = "ucl-uikit-heading";
|
|
4
|
+
export type HeadingLevel = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
4
5
|
export interface HeadingBaseProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
5
|
-
level?: 1 | 2 | 3 | 4;
|
|
6
|
+
level?: HeadingLevel | 1 | 2 | 3 | 4;
|
|
7
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'span';
|
|
6
8
|
margins?: boolean;
|
|
7
9
|
testId?: string;
|
|
10
|
+
ref?: React.Ref<HTMLHeadingElement>;
|
|
8
11
|
}
|
|
9
12
|
export type HeadingProps = HeadingBaseProps & MarginProps;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export default _default;
|
|
13
|
+
declare const Heading: import('react').MemoExoticComponent<({ level, as, margins, testId, className, ref, noMargins, ...props }: HeadingProps) => import("react/jsx-runtime").JSX.Element>;
|
|
14
|
+
export default Heading;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import('react').
|
|
4
|
+
component: import('react').MemoExoticComponent<({ level, as, margins, testId, className, ref, noMargins, ...props }: import('./Heading').HeadingProps) => import("react/jsx-runtime").JSX.Element>;
|
|
5
5
|
parameters: {
|
|
6
6
|
layout: string;
|
|
7
7
|
};
|
|
@@ -10,9 +10,11 @@ declare const meta: {
|
|
|
10
10
|
export default meta;
|
|
11
11
|
type Story = StoryObj<typeof meta>;
|
|
12
12
|
export declare const Default: Story;
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
13
|
+
export declare const LevelXxl: Story;
|
|
14
|
+
export declare const LevelXl: Story;
|
|
15
|
+
export declare const LevelLg: Story;
|
|
16
|
+
export declare const LevelMd: Story;
|
|
17
|
+
export declare const LevelSm: Story;
|
|
18
|
+
export declare const LevelXs: Story;
|
|
19
|
+
export declare const AsSpan: Story;
|
|
18
20
|
export declare const NoMargins: Story;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { MarginProps } from '../common/marginsStyle';
|
|
3
3
|
export declare const NAME = "ucl-uikit-paragrah";
|
|
4
|
+
export type ParagraphLevel = 'lg' | 'lg-medium' | 'lg-semibold' | 'lg-bold' | 'md' | 'md-medium' | 'md-semibold' | 'md-semibold' | 'md-medium-numeric' | 'sm' | 'sm-medium' | 'sm-semibold' | 'xs' | 'xs-medium';
|
|
4
5
|
export interface ParagraphBaseProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
6
|
+
level?: ParagraphLevel;
|
|
5
7
|
size?: 'standfirst' | 'body' | 'small';
|
|
6
8
|
emphasis?: 'high' | 'medium';
|
|
9
|
+
as?: 'p' | 'div' | 'span';
|
|
7
10
|
margins?: boolean;
|
|
8
11
|
testId?: string;
|
|
12
|
+
ref?: React.Ref<HTMLParagraphElement>;
|
|
9
13
|
}
|
|
10
14
|
export type ParagraphProps = ParagraphBaseProps & MarginProps;
|
|
11
|
-
|
|
12
|
-
declare const _default: import('react').NamedExoticComponent<ParagraphBaseProps & MarginProps & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
15
|
+
declare const _default: import('react').MemoExoticComponent<({ level, size, emphasis, as, margins, testId, className, ref, noMargins, ...props }: ParagraphProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
16
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import('react').
|
|
4
|
+
component: import('react').MemoExoticComponent<({ level, size, emphasis, as, margins, testId, className, ref, noMargins, ...props }: import('./Paragraph').ParagraphProps) => import("react/jsx-runtime").JSX.Element>;
|
|
5
5
|
args: {
|
|
6
6
|
children: string;
|
|
7
7
|
};
|
|
@@ -12,8 +12,11 @@ declare const meta: {
|
|
|
12
12
|
export default meta;
|
|
13
13
|
type Story = StoryObj<typeof meta>;
|
|
14
14
|
export declare const Default: Story;
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
15
|
+
export declare const LevelLg: Story;
|
|
16
|
+
export declare const LevelMd: Story;
|
|
17
|
+
export declare const LevelSm: Story;
|
|
18
|
+
export declare const AsSpan: Story;
|
|
19
|
+
export declare const NoMargins: Story;
|
|
17
20
|
export declare const WithRichText: Story;
|
|
18
21
|
export declare const WithLongText: Story;
|
|
19
22
|
export declare const MultipleParagraphs: Story;
|
|
@@ -26,12 +26,12 @@ export { default as Textarea } from './Textarea';
|
|
|
26
26
|
export type { TextareaProps } from './Textarea';
|
|
27
27
|
export { default as Heading } from './Heading';
|
|
28
28
|
export type { HeadingProps } from './Heading';
|
|
29
|
-
export { default as HeadingNew } from './
|
|
30
|
-
export type { HeadingProps as HeadingNewProps } from './
|
|
29
|
+
export { default as HeadingNew } from './Heading';
|
|
30
|
+
export type { HeadingProps as HeadingNewProps } from './Heading';
|
|
31
31
|
export { default as Paragraph } from './Paragraph';
|
|
32
32
|
export type { ParagraphProps } from './Paragraph';
|
|
33
|
-
export { default as ParagraphNew } from './
|
|
34
|
-
export type { ParagraphProps as ParagraphNewProps } from './
|
|
33
|
+
export { default as ParagraphNew } from './Paragraph';
|
|
34
|
+
export type { ParagraphProps as ParagraphNewProps } from './Paragraph';
|
|
35
35
|
export { default as Text } from './Paragraph';
|
|
36
36
|
export type { TextProps } from './Paragraph';
|
|
37
37
|
export { default as Modal } from './Modal';
|