@atlaskit/badge 18.7.0 → 19.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 +34 -0
- package/badge/package.json +1 -8
- package/new/package.json +1 -8
- package/package.json +9 -17
- package/types/package.json +1 -8
- package/dist/types-ts4.5/appearance-mapping-to-old.d.ts +0 -15
- package/dist/types-ts4.5/appearance-mapping.d.ts +0 -13
- package/dist/types-ts4.5/badge-new.d.ts +0 -23
- package/dist/types-ts4.5/badge.d.ts +0 -12
- package/dist/types-ts4.5/entry-points/badge.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/new.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -2
- package/dist/types-ts4.5/internal/format-value-with-negative-support.d.ts +0 -1
- package/dist/types-ts4.5/internal/format-value.d.ts +0 -1
- package/dist/types-ts4.5/types.d.ts +0 -69
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @atlaskit/badge
|
|
2
2
|
|
|
3
|
+
## 19.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
8
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
9
|
+
|
|
10
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
11
|
+
|
|
12
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
- "typesVersions": {
|
|
16
|
+
- ">=4.5 <4.9": {
|
|
17
|
+
- "*": [
|
|
18
|
+
- "dist/types-ts4.5/*",
|
|
19
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
20
|
+
- ]
|
|
21
|
+
- }
|
|
22
|
+
- },
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
29
|
+
## 18.7.1
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- [`5dd8cc218e393`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5dd8cc218e393) -
|
|
34
|
+
Release packages affected by an issue blocking you from installing <@compiled>/react due to a yarn
|
|
35
|
+
patch.
|
|
36
|
+
|
|
3
37
|
## 18.7.0
|
|
4
38
|
|
|
5
39
|
### Minor Changes
|
package/badge/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/badge.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/badge.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/badge.d.ts"
|
|
17
10
|
}
|
package/new/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/new.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/new.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/new.d.ts"
|
|
17
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/badge",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.0",
|
|
4
4
|
"description": "A badge is a visual indicator for numeric values such as tallies and scores.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,14 +12,6 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
-
"typesVersions": {
|
|
16
|
-
">=4.5 <4.9": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.5/*",
|
|
19
|
-
"dist/types-ts4.5/index.d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"sideEffects": [
|
|
24
16
|
"**/*.compiled.css"
|
|
25
17
|
],
|
|
@@ -49,11 +41,11 @@
|
|
|
49
41
|
}
|
|
50
42
|
},
|
|
51
43
|
"dependencies": {
|
|
52
|
-
"@atlaskit/platform-feature-flags": "^
|
|
53
|
-
"@atlaskit/primitives": "^
|
|
54
|
-
"@atlaskit/tokens": "^
|
|
44
|
+
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
45
|
+
"@atlaskit/primitives": "^20.0.0",
|
|
46
|
+
"@atlaskit/tokens": "^14.0.0",
|
|
55
47
|
"@babel/runtime": "^7.0.0",
|
|
56
|
-
"@compiled/react": "
|
|
48
|
+
"@compiled/react": "^0.20.0"
|
|
57
49
|
},
|
|
58
50
|
"peerDependencies": {
|
|
59
51
|
"react": "^18.2.0"
|
|
@@ -62,10 +54,10 @@
|
|
|
62
54
|
"@af/accessibility-testing": "workspace:^",
|
|
63
55
|
"@af/integration-testing": "workspace:^",
|
|
64
56
|
"@af/visual-regression": "workspace:^",
|
|
65
|
-
"@atlaskit/docs": "^
|
|
66
|
-
"@atlaskit/link": "^
|
|
67
|
-
"@atlaskit/section-message": "^
|
|
68
|
-
"@atlaskit/theme": "^
|
|
57
|
+
"@atlaskit/docs": "^12.0.0",
|
|
58
|
+
"@atlaskit/link": "^4.0.0",
|
|
59
|
+
"@atlaskit/section-message": "^9.0.0",
|
|
60
|
+
"@atlaskit/theme": "^26.0.0",
|
|
69
61
|
"@atlassian/feature-flags-test-utils": "^1.1.0",
|
|
70
62
|
"@atlassian/react-compiler-gating": "workspace:^",
|
|
71
63
|
"@atlassian/ssr-tests": "workspace:*",
|
package/types/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/types.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/types.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/types.d.ts"
|
|
17
10
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import type { NewAppearance } from './types';
|
|
6
|
-
type OldAppearance = 'added' | 'removed' | 'default' | 'primary' | 'primaryInverted' | 'important';
|
|
7
|
-
export declare const appearanceMappingToOld: Record<NewAppearance, OldAppearance> & {
|
|
8
|
-
added: OldAppearance;
|
|
9
|
-
removed: OldAppearance;
|
|
10
|
-
default: OldAppearance;
|
|
11
|
-
primary: OldAppearance;
|
|
12
|
-
primaryInverted: OldAppearance;
|
|
13
|
-
important: OldAppearance;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import type { NewAppearance } from './types';
|
|
6
|
-
export declare const appearanceMapping: Record<NewAppearance, NewAppearance> & {
|
|
7
|
-
added: NewAppearance;
|
|
8
|
-
removed: NewAppearance;
|
|
9
|
-
default: NewAppearance;
|
|
10
|
-
primary: NewAppearance;
|
|
11
|
-
primaryInverted: NewAppearance;
|
|
12
|
-
important: NewAppearance;
|
|
13
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { BadgeNewProps } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* __BadgeNew__
|
|
4
|
-
*
|
|
5
|
-
* New visual refresh implementation of Badge component for the labelling system.
|
|
6
|
-
* This component is used when the 'platform-dst-lozenge-tag-badge-visual-uplifts' feature flag is enabled.
|
|
7
|
-
*
|
|
8
|
-
* Uses new appearance naming convention:
|
|
9
|
-
* - success (green)
|
|
10
|
-
* - danger (red)
|
|
11
|
-
* - neutral (gray)
|
|
12
|
-
* - information (blue)
|
|
13
|
-
* - inverse (inverted colors)
|
|
14
|
-
* - warning (orange/yellow)
|
|
15
|
-
* - discovery (purple)
|
|
16
|
-
* - informationBold (bold blue, color.background.information.subtle)
|
|
17
|
-
* - successBold (bold green, color.background.success.subtle)
|
|
18
|
-
* - dangerBold (bold red, color.background.danger.subtle)
|
|
19
|
-
* - warningBold (bold warning, color.background.warning.bold)
|
|
20
|
-
* - discoveryBold (bold purple, color.background.discovery.subtle)
|
|
21
|
-
*/
|
|
22
|
-
declare const BadgeNew: import('react').NamedExoticComponent<BadgeNewProps>;
|
|
23
|
-
export default BadgeNew;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { BadgeProps } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* __Badge__
|
|
4
|
-
*
|
|
5
|
-
* This component gives you the full badge functionality and automatically formats the number you provide in \`children\`.
|
|
6
|
-
*
|
|
7
|
-
* - [Examples](https://atlassian.design/components/badge/examples)
|
|
8
|
-
* - [Code](https://atlassian.design/components/badge/code)
|
|
9
|
-
* - [Usage](https://atlassian.design/components/badge/usage)
|
|
10
|
-
*/
|
|
11
|
-
declare const Badge: import('react').NamedExoticComponent<BadgeProps>;
|
|
12
|
-
export default Badge;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../badge';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { BadgeNewProps, BadgeProps, NewAppearance, ThemeAppearance } from '../types';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function formatValueWithNegativeSupport(value?: string | number, max?: number): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function formatValue(value?: string | number, max?: number): string;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
export type ThemeAppearance = 'added' | 'default' | 'important' | 'primary' | 'primaryInverted' | 'removed' | 'warning' | 'discovery' | 'danger' | 'neutral' | 'success' | 'information' | 'inverse';
|
|
3
|
-
export interface BadgeProps {
|
|
4
|
-
/**
|
|
5
|
-
* Affects the visual style of the badge.
|
|
6
|
-
*/
|
|
7
|
-
appearance?: ThemeAppearance | NewAppearance;
|
|
8
|
-
/**
|
|
9
|
-
* The value displayed within the badge. A `ReactNode` can be provided for
|
|
10
|
-
* custom-formatted numbers, however, badge should only be used in cases where you want to represent
|
|
11
|
-
* a number.
|
|
12
|
-
* Use a [lozenge](/packages/design-system/lozenge) for non-numeric information.
|
|
13
|
-
*/
|
|
14
|
-
children?: number | ReactNode;
|
|
15
|
-
/**
|
|
16
|
-
* The maximum value to display. Defaults to `99`. If the value is 100, and max is 50, "50+" will be displayed.
|
|
17
|
-
* This value should be greater than 0. If set to `false` the original value will be displayed regardless of
|
|
18
|
-
* whether it is larger than the default maximum value.
|
|
19
|
-
*/
|
|
20
|
-
max?: number | false;
|
|
21
|
-
/**
|
|
22
|
-
* Style customization to apply to the badge. Only `backgroundColor` and `color` are supported.
|
|
23
|
-
*/
|
|
24
|
-
style?: Pick<CSSProperties, 'backgroundColor' | 'color'>;
|
|
25
|
-
/**
|
|
26
|
-
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
|
|
27
|
-
*/
|
|
28
|
-
testId?: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* New appearance types for visual refresh.
|
|
32
|
-
*/
|
|
33
|
-
export type NewAppearance = 'success' | 'danger' | 'neutral' | 'information' | 'inverse' | 'warning' | 'discovery' | 'informationBold' | 'successBold' | 'dangerBold' | 'warningBold' | 'discoveryBold';
|
|
34
|
-
/**
|
|
35
|
-
* Props for BadgeNew component with new appearance names.
|
|
36
|
-
*/
|
|
37
|
-
export interface BadgeNewProps {
|
|
38
|
-
/**
|
|
39
|
-
* Affects the visual style of the badge.
|
|
40
|
-
* Uses the new naming convention:
|
|
41
|
-
* - success: Green (replaces "added")
|
|
42
|
-
* - danger: Red (replaces "removed" and "important")
|
|
43
|
-
* - neutral: Gray (replaces "default")
|
|
44
|
-
* - information: Blue (replaces "primary")
|
|
45
|
-
* - inverse: Inverted colors (replaces "primaryInverted")
|
|
46
|
-
*/
|
|
47
|
-
appearance?: NewAppearance;
|
|
48
|
-
/**
|
|
49
|
-
* The value displayed within the badge. A `ReactNode` can be provided for
|
|
50
|
-
* custom-formatted numbers, however, badge should only be used in cases where you want to represent
|
|
51
|
-
* a number.
|
|
52
|
-
* Use a [lozenge](/packages/design-system/lozenge/lozenge) for non-numeric information.
|
|
53
|
-
*/
|
|
54
|
-
children?: number | ReactNode;
|
|
55
|
-
/**
|
|
56
|
-
* The maximum value to display. Defaults to `99`. If the value is 100, and max is 50, "50+" will be displayed.
|
|
57
|
-
* This value should be greater than 0. If set to `false` the original value will be displayed regardless of
|
|
58
|
-
* whether it is larger than the default maximum value.
|
|
59
|
-
*/
|
|
60
|
-
max?: number | false;
|
|
61
|
-
/**
|
|
62
|
-
* Style customization to apply to the badge. Only `backgroundColor` and `color` are supported.
|
|
63
|
-
*/
|
|
64
|
-
style?: Pick<CSSProperties, 'backgroundColor' | 'color'>;
|
|
65
|
-
/**
|
|
66
|
-
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
|
|
67
|
-
*/
|
|
68
|
-
testId?: string;
|
|
69
|
-
}
|