@sb1/ffe-core-react 7.2.11 → 8.0.1
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/es/Wave.js +37 -48
- package/es/index.js +11 -11
- package/es/typography/DividerLine.js +25 -16
- package/es/typography/EmphasizedText.js +25 -16
- package/es/typography/Heading.js +33 -44
- package/es/typography/LinkIcon.js +26 -21
- package/es/typography/LinkText.js +26 -26
- package/es/typography/MicroText.js +25 -16
- package/es/typography/Paragraph.js +30 -41
- package/es/typography/PreformattedText.js +25 -16
- package/es/typography/SmallText.js +26 -19
- package/es/typography/StrongText.js +25 -16
- package/es/typography/types.js +1 -0
- package/lib/Wave.js +45 -56
- package/lib/index.js +29 -99
- package/lib/typography/DividerLine.js +33 -24
- package/lib/typography/EmphasizedText.js +33 -24
- package/lib/typography/Heading.js +39 -51
- package/lib/typography/LinkIcon.js +32 -27
- package/lib/typography/LinkText.js +32 -32
- package/lib/typography/MicroText.js +32 -23
- package/lib/typography/Paragraph.js +37 -48
- package/lib/typography/PreformattedText.js +32 -23
- package/lib/typography/SmallText.js +32 -25
- package/lib/typography/StrongText.js +32 -23
- package/lib/typography/types.js +2 -0
- package/package.json +7 -8
- package/types/Wave.d.ts +22 -0
- package/types/index.d.ts +11 -119
- package/types/typography/DividerLine.d.ts +4 -0
- package/types/typography/EmphasizedText.d.ts +4 -0
- package/types/typography/Heading.d.ts +17 -0
- package/types/typography/LinkIcon.d.ts +6 -0
- package/types/typography/LinkText.d.ts +8 -0
- package/types/typography/MicroText.d.ts +8 -0
- package/types/typography/Paragraph.d.ts +12 -0
- package/types/typography/PreformattedText.d.ts +4 -0
- package/types/typography/SmallText.d.ts +8 -0
- package/types/typography/StrongText.d.ts +4 -0
- package/types/typography/types.d.ts +2 -0
package/types/index.d.ts
CHANGED
|
@@ -1,119 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface HeadingProps extends React.ComponentProps<'header'> {
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
className?: string;
|
|
15
|
-
error?: boolean;
|
|
16
|
-
inline?: boolean;
|
|
17
|
-
lookLike?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
18
|
-
noMargin?: boolean;
|
|
19
|
-
withBorder?: boolean;
|
|
20
|
-
textCenter?: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface LinkTextProps extends React.ComponentProps<'a'> {
|
|
24
|
-
children: React.ReactNode;
|
|
25
|
-
className?: string;
|
|
26
|
-
element?: HTMLElement | string | React.ElementType;
|
|
27
|
-
underline?: boolean;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface LinkIconProps extends React.ComponentProps<'a'> {
|
|
31
|
-
children: React.ReactNode;
|
|
32
|
-
className?: string;
|
|
33
|
-
element?: HTMLElement | string | React.ElementType;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface SimpleElementProps {
|
|
37
|
-
children: React.ReactNode;
|
|
38
|
-
className?: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface SmallTextProps {
|
|
42
|
-
element?: HTMLElement | string | React.ElementType;
|
|
43
|
-
className?: string;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface ParagraphProps extends React.ComponentProps<'p'> {
|
|
47
|
-
children: React.ReactNode;
|
|
48
|
-
className?: string;
|
|
49
|
-
lead?: boolean;
|
|
50
|
-
subLead?: boolean;
|
|
51
|
-
textCenter?: boolean;
|
|
52
|
-
textLeft?: boolean;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface WaveProps {
|
|
56
|
-
className?: string;
|
|
57
|
-
position?: string;
|
|
58
|
-
flip?: boolean;
|
|
59
|
-
color:
|
|
60
|
-
| 'hvit'
|
|
61
|
-
| 'frost-30'
|
|
62
|
-
| 'sand-30'
|
|
63
|
-
| 'sand-70'
|
|
64
|
-
| 'syrin-30'
|
|
65
|
-
| 'syrin-70'
|
|
66
|
-
| 'vann'
|
|
67
|
-
| 'vann-30'
|
|
68
|
-
| 'fjell';
|
|
69
|
-
bgColor?:
|
|
70
|
-
| 'hvit'
|
|
71
|
-
| 'frost-30'
|
|
72
|
-
| 'sand-30'
|
|
73
|
-
| 'sand-70'
|
|
74
|
-
| 'syrin-30'
|
|
75
|
-
| 'syrin-70'
|
|
76
|
-
| 'vann'
|
|
77
|
-
| 'vann-30'
|
|
78
|
-
| 'fjell';
|
|
79
|
-
darkmodeColor?: 'svart' | 'natt';
|
|
80
|
-
bgDarkmodeColor?: 'svart' | 'natt';
|
|
81
|
-
children?: React.ReactNode;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
85
|
-
|
|
86
|
-
declare class DividerLine extends React.Component<DividerLineProps, any> {}
|
|
87
|
-
declare class EmphasizedText extends React.Component<
|
|
88
|
-
EmphasizedTextProps,
|
|
89
|
-
any
|
|
90
|
-
> {}
|
|
91
|
-
declare class Heading1 extends React.Component<HeadingProps, any> {}
|
|
92
|
-
declare class Heading2 extends React.Component<HeadingProps, any> {}
|
|
93
|
-
declare class Heading3 extends React.Component<HeadingProps, any> {}
|
|
94
|
-
declare class Heading4 extends React.Component<HeadingProps, any> {}
|
|
95
|
-
declare class Heading5 extends React.Component<HeadingProps, any> {}
|
|
96
|
-
declare class Heading6 extends React.Component<HeadingProps, any> {}
|
|
97
|
-
declare class LinkText<T = {}> extends React.Component<
|
|
98
|
-
NoInfer<T> & LinkTextProps,
|
|
99
|
-
any
|
|
100
|
-
> {}
|
|
101
|
-
declare class LinkIcon extends React.Component<LinkIconProps, any> {}
|
|
102
|
-
declare class MicroText extends React.Component<
|
|
103
|
-
SimpleElementProps & React.ComponentProps<'span'>,
|
|
104
|
-
any
|
|
105
|
-
> {}
|
|
106
|
-
declare class Paragraph extends React.Component<ParagraphProps, any> {}
|
|
107
|
-
declare class PreformattedText extends React.Component<
|
|
108
|
-
SimpleElementProps & React.ComponentProps<'pre'>,
|
|
109
|
-
any
|
|
110
|
-
> {}
|
|
111
|
-
declare class SmallText extends React.Component<
|
|
112
|
-
SmallTextProps & React.ComponentProps<'span'>,
|
|
113
|
-
any
|
|
114
|
-
> {}
|
|
115
|
-
declare class StrongText extends React.Component<
|
|
116
|
-
SimpleElementProps & React.ComponentProps<'strong'>,
|
|
117
|
-
any
|
|
118
|
-
> {}
|
|
119
|
-
declare class Wave extends React.Component<WaveProps, any> {}
|
|
1
|
+
export { DividerLine, DividerLineProps } from './typography/DividerLine';
|
|
2
|
+
export { EmphasizedText, EmphasizedTextProps, } from './typography/EmphasizedText';
|
|
3
|
+
export { Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, HeadingProps, } from './typography/Heading';
|
|
4
|
+
export { LinkText, LinkTextProp } from './typography/LinkText';
|
|
5
|
+
export { LinkIcon, LinkIconProp } from './typography/LinkIcon';
|
|
6
|
+
export { MicroText, MicroTextProps } from './typography/MicroText';
|
|
7
|
+
export { Paragraph, ParagraphProps } from './typography/Paragraph';
|
|
8
|
+
export { PreformattedText, PreformattedTextProps, } from './typography/PreformattedText';
|
|
9
|
+
export { SmallText, SmallTextProps } from './typography/SmallText';
|
|
10
|
+
export { StrongText, StrongTextProps } from './typography/StrongText';
|
|
11
|
+
export { Wave, WaveProps } from './Wave';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
|
+
export interface HeadingProps extends React.ComponentProps<'header'> {
|
|
4
|
+
error?: boolean;
|
|
5
|
+
inline?: boolean;
|
|
6
|
+
lookLike?: HeadingLevel;
|
|
7
|
+
noMargin?: boolean;
|
|
8
|
+
withBorder?: boolean;
|
|
9
|
+
textCenter?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const Heading1: React.ForwardRefExoticComponent<Omit<HeadingProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
12
|
+
export declare const Heading2: React.ForwardRefExoticComponent<Omit<HeadingProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
13
|
+
export declare const Heading3: React.ForwardRefExoticComponent<Omit<HeadingProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
14
|
+
export declare const Heading4: React.ForwardRefExoticComponent<Omit<HeadingProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
15
|
+
export declare const Heading5: React.ForwardRefExoticComponent<Omit<HeadingProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
16
|
+
export declare const Heading6: React.ForwardRefExoticComponent<Omit<HeadingProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { ComponentProps, ElementType } from 'react';
|
|
2
|
+
import { DistributiveOmit } from './types';
|
|
3
|
+
export type LinkIconProp<As extends ElementType = 'a'> = {
|
|
4
|
+
as?: As;
|
|
5
|
+
} & DistributiveOmit<ComponentProps<ElementType extends As ? 'a' : As>, 'as' | 'ref'>;
|
|
6
|
+
export declare function LinkIcon<As extends ElementType>(props: LinkIconProp<As>): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { ComponentProps, ElementType } from 'react';
|
|
2
|
+
import { DistributiveOmit } from './types';
|
|
3
|
+
export type LinkTextProp<As extends ElementType = 'a'> = {
|
|
4
|
+
as?: As;
|
|
5
|
+
} & DistributiveOmit<ComponentProps<ElementType extends As ? 'a' : As>, 'as' | 'ref'> & {
|
|
6
|
+
underline?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function LinkText<As extends ElementType>(props: LinkTextProp<As>): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { ComponentProps, ElementType } from 'react';
|
|
2
|
+
import { DistributiveOmit } from './types';
|
|
3
|
+
export type MicroTextProps<As extends ElementType = 'span'> = {
|
|
4
|
+
as?: As;
|
|
5
|
+
} & DistributiveOmit<ComponentProps<ElementType extends As ? 'span' : As>, 'as' | 'ref'> & {
|
|
6
|
+
underline?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function MicroText<As extends ElementType>(props: MicroTextProps<As>): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface ParagraphProps extends ComponentPropsWithoutRef<'p'> {
|
|
3
|
+
/** Makes this paragraph a lead paragraph, typically used directly below a heading. */
|
|
4
|
+
lead?: boolean;
|
|
5
|
+
/** Makes this paragraph a sub-lead paragraph, typically used directly below a lead paragraph. */
|
|
6
|
+
subLead?: boolean;
|
|
7
|
+
/** Use if text alignment should override that of its container. */
|
|
8
|
+
textCenter?: boolean;
|
|
9
|
+
/** Use if text alignment should override that of its container. */
|
|
10
|
+
textLeft?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function Paragraph(props: ParagraphProps): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { ComponentProps, ElementType } from 'react';
|
|
2
|
+
import { DistributiveOmit } from './types';
|
|
3
|
+
export type SmallTextProps<As extends ElementType = 'span'> = {
|
|
4
|
+
as?: As;
|
|
5
|
+
} & DistributiveOmit<ComponentProps<ElementType extends As ? 'span' : As>, 'as' | 'ref'> & {
|
|
6
|
+
underline?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function SmallText<As extends ElementType>(props: SmallTextProps<As>): React.JSX.Element;
|