@financial-times/o-labels 7.1.2 → 8.0.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.
- package/CHANGELOG.md +11 -0
- package/MIGRATION.md +9 -0
- package/demos/src/data/states-content.json +1 -1
- package/package.json +1 -1
- package/src/scss/_brand.scss +2 -2
- package/src/scss/_variables.scss +1 -1
- package/src/tsx/label.tsx +28 -32
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [8.0.0](https://github.com/Financial-Times/origami/compare/o-labels-v7.1.2...o-labels-v8.0.0) (2026-02-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* Replace `scoop` with `exclusive`
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Replace `scoop` with `exclusive` ([8ff2c0d](https://github.com/Financial-Times/origami/commit/8ff2c0d3cfd25cec7d3d5046ca66134fc1af1633))
|
|
13
|
+
|
|
3
14
|
## [7.1.2](https://github.com/Financial-Times/origami/compare/o-labels-v7.1.1...o-labels-v7.1.2) (2025-10-28)
|
|
4
15
|
|
|
5
16
|
|
package/MIGRATION.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Migration Guide
|
|
2
2
|
|
|
3
|
+
## Migrating from v7 to v8
|
|
4
|
+
|
|
5
|
+
This release removes the `content-scoop` label and replaces with `content-exclusive'. Ensure any references to `content-scoop` are updated:
|
|
6
|
+
|
|
7
|
+
```diff
|
|
8
|
+
- <span class="o-labels o-labels--content-scoop">Exclusive</span>
|
|
9
|
+
+ <span class="o-labels o-labels--content-exclusive">Exclusive</span>
|
|
10
|
+
```
|
|
11
|
+
|
|
3
12
|
## Migrating from v6 to v7
|
|
4
13
|
|
|
5
14
|
This major release introduces a new design language and visually breaking changes. This includes mobile optimised typography, icons, and buttons. It also removes peer dependencies from deprecated "o2" components.
|
package/package.json
CHANGED
package/src/scss/_brand.scss
CHANGED
|
@@ -47,7 +47,7 @@ $_o-labels-shared-brand-config: (
|
|
|
47
47
|
background-color: oPrivateFoundationGet('o3-color-palette-slate'),
|
|
48
48
|
border-color: oPrivateFoundationGet('o3-color-palette-slate')
|
|
49
49
|
),
|
|
50
|
-
'content-
|
|
50
|
+
'content-exclusive': (
|
|
51
51
|
background-color: oPrivateFoundationGet('o3-color-palette-ft-pink'),
|
|
52
52
|
border-color: oPrivateFoundationGet('o3-color-palette-ft-pink'),
|
|
53
53
|
text-color: oPrivateFoundationGet('o3-color-palette-black-80')
|
|
@@ -68,7 +68,7 @@ $_o-labels-shared-brand-config: (
|
|
|
68
68
|
'small',
|
|
69
69
|
'content-commercial',
|
|
70
70
|
'content-premium',
|
|
71
|
-
'content-
|
|
71
|
+
'content-exclusive',
|
|
72
72
|
'lifecycle-beta'
|
|
73
73
|
)
|
|
74
74
|
));
|
package/src/scss/_variables.scss
CHANGED
package/src/tsx/label.tsx
CHANGED
|
@@ -9,14 +9,10 @@ export interface SupportLabelProps extends BaseLabelProps {
|
|
|
9
9
|
| 'support-dead'
|
|
10
10
|
| 'support-deprecated'
|
|
11
11
|
| 'support-experimental'
|
|
12
|
-
| 'support-maintained'
|
|
12
|
+
| 'support-maintained';
|
|
13
13
|
}
|
|
14
14
|
export interface ServiceLabelProps extends BaseLabelProps {
|
|
15
|
-
state:
|
|
16
|
-
| 'tier-bronze'
|
|
17
|
-
| 'tier-gold'
|
|
18
|
-
| 'tier-platinum'
|
|
19
|
-
| 'tier-silver'
|
|
15
|
+
state: 'tier-bronze' | 'tier-gold' | 'tier-platinum' | 'tier-silver';
|
|
20
16
|
}
|
|
21
17
|
export interface ColourLabelProps extends BaseLabelProps {
|
|
22
18
|
state:
|
|
@@ -26,24 +22,24 @@ export interface ColourLabelProps extends BaseLabelProps {
|
|
|
26
22
|
| 'slate'
|
|
27
23
|
| 'jade'
|
|
28
24
|
| 'crimson'
|
|
29
|
-
| 'mandarin'
|
|
25
|
+
| 'mandarin';
|
|
30
26
|
}
|
|
31
27
|
export interface ContentLabelProps extends BaseLabelProps {
|
|
32
|
-
state:
|
|
33
|
-
| 'content-commercial'
|
|
34
|
-
| 'content-premium'
|
|
35
|
-
| 'content-scoop'
|
|
28
|
+
state: 'content-commercial' | 'content-premium' | 'content-exclusive';
|
|
36
29
|
}
|
|
37
30
|
export interface LifeCycleLabelProps extends BaseLabelProps {
|
|
38
|
-
state:
|
|
39
|
-
| 'lifecycle-beta'
|
|
31
|
+
state: 'lifecycle-beta';
|
|
40
32
|
}
|
|
41
33
|
|
|
42
34
|
function SimpleLabel({
|
|
43
35
|
size,
|
|
44
36
|
state,
|
|
45
37
|
children,
|
|
46
|
-
}: {
|
|
38
|
+
}: {
|
|
39
|
+
size?: string;
|
|
40
|
+
state?: string;
|
|
41
|
+
children: string;
|
|
42
|
+
}): React.JSX.Element {
|
|
47
43
|
const classNames = ['o-labels'];
|
|
48
44
|
if (size) {
|
|
49
45
|
classNames.push(`o-labels--${size}`);
|
|
@@ -55,23 +51,23 @@ function SimpleLabel({
|
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
export function BaseLabel(props: BaseLabelProps): React.JSX.Element {
|
|
58
|
-
return SimpleLabel(props)
|
|
54
|
+
return SimpleLabel(props);
|
|
59
55
|
}
|
|
60
56
|
|
|
61
57
|
export function SupportLabel(props: SupportLabelProps): React.JSX.Element {
|
|
62
|
-
return SimpleLabel(props)
|
|
58
|
+
return SimpleLabel(props);
|
|
63
59
|
}
|
|
64
60
|
export function ServiceLabel(props: ServiceLabelProps): React.JSX.Element {
|
|
65
|
-
return SimpleLabel(props)
|
|
61
|
+
return SimpleLabel(props);
|
|
66
62
|
}
|
|
67
63
|
export function ColourLabel(props: ColourLabelProps): React.JSX.Element {
|
|
68
|
-
return SimpleLabel(props)
|
|
64
|
+
return SimpleLabel(props);
|
|
69
65
|
}
|
|
70
66
|
export function ContentLabel(props: ContentLabelProps): React.JSX.Element {
|
|
71
|
-
return SimpleLabel(props)
|
|
67
|
+
return SimpleLabel(props);
|
|
72
68
|
}
|
|
73
69
|
export function LifeCycleLabel(props: LifeCycleLabelProps): React.JSX.Element {
|
|
74
|
-
return SimpleLabel(props)
|
|
70
|
+
return SimpleLabel(props);
|
|
75
71
|
}
|
|
76
72
|
|
|
77
73
|
export interface IndicatorLabelProps {
|
|
@@ -93,16 +89,17 @@ export function IndicatorLabel({
|
|
|
93
89
|
if (inverse) {
|
|
94
90
|
classNames.push('o-labels-indicator--inverse');
|
|
95
91
|
}
|
|
96
|
-
if(badge) {
|
|
92
|
+
if (badge) {
|
|
97
93
|
classNames.push('o-labels-indicator--badge');
|
|
98
94
|
}
|
|
99
95
|
return (
|
|
100
96
|
<span className={classNames.join(' ')}>
|
|
101
|
-
<span className="o-labels-indicator__status">
|
|
97
|
+
<span className="o-labels-indicator__status">
|
|
98
|
+
{' '}
|
|
99
|
+
{status || indicator}{' '}
|
|
100
|
+
</span>
|
|
102
101
|
{timestamp && (
|
|
103
|
-
<span className="o-labels-indicator__timestamp">
|
|
104
|
-
{timestamp}
|
|
105
|
-
</span>
|
|
102
|
+
<span className="o-labels-indicator__timestamp">{timestamp}</span>
|
|
106
103
|
)}
|
|
107
104
|
</span>
|
|
108
105
|
);
|
|
@@ -110,17 +107,16 @@ export function IndicatorLabel({
|
|
|
110
107
|
|
|
111
108
|
export interface TimestampLabelProps {
|
|
112
109
|
inverse?: boolean;
|
|
113
|
-
children?: React.JSX.Element | React.JSX.Element[]
|
|
110
|
+
children?: React.JSX.Element | React.JSX.Element[];
|
|
114
111
|
}
|
|
115
112
|
|
|
116
|
-
export function TimestampLabel({
|
|
113
|
+
export function TimestampLabel({
|
|
114
|
+
inverse,
|
|
115
|
+
children,
|
|
116
|
+
}: TimestampLabelProps): React.JSX.Element {
|
|
117
117
|
const classNames = ['o-labels-timestamp'];
|
|
118
118
|
if (inverse) {
|
|
119
119
|
classNames.push('o-labels-timestamp--inverse');
|
|
120
120
|
}
|
|
121
|
-
return (
|
|
122
|
-
<span className={classNames.join(' ')}>
|
|
123
|
-
{children}
|
|
124
|
-
</span>
|
|
125
|
-
);
|
|
121
|
+
return <span className={classNames.join(' ')}>{children}</span>;
|
|
126
122
|
}
|