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.
@@ -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
- export type Ref = HTMLHeadingElement;
11
- declare const _default: import('react').NamedExoticComponent<HeadingBaseProps & MarginProps & import('react').RefAttributes<HTMLHeadingElement>>;
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').NamedExoticComponent<import('./Heading').HeadingBaseProps & import('../common/marginsStyle').MarginProps & import('react').RefAttributes<HTMLHeadingElement>>;
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 Level1: Story;
14
- export declare const Level2: Story;
15
- export declare const Level3: Story;
16
- export declare const Level4: Story;
17
- export declare const Margins: Story;
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
- export type Ref = HTMLParagraphElement;
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').NamedExoticComponent<import('./Paragraph').ParagraphBaseProps & import('../common/marginsStyle').MarginProps & import('react').RefAttributes<HTMLParagraphElement>>;
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 WithMargins: Story;
16
- export declare const WithoutMargins: Story;
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 './HeadingNew';
30
- export type { HeadingProps as HeadingNewProps } from './HeadingNew';
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 './ParagraphNew';
34
- export type { ParagraphProps as ParagraphNewProps } from './ParagraphNew';
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';