@atlaskit/primitives 16.4.0 → 16.4.2

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/primitives
2
2
 
3
+ ## 16.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a60a82196851a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a60a82196851a) -
8
+ Internal refactors to remove unused variables. No functional or public changes.
9
+ - Updated dependencies
10
+
11
+ ## 16.4.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [`0d73beb2f9401`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0d73beb2f9401) -
16
+ Added `fontVariantNumeric` as an allowed property to Text's `xcss` prop to allow for tabular
17
+ numbers and slashed zeros. This is only available to the Compiled version of the Text component.
18
+
3
19
  ## 16.4.0
4
20
 
5
21
  ### Minor Changes
@@ -14,7 +14,7 @@ import TextSpacing from '../../examples/constellation/text/text-spacing';
14
14
  import TextTruncation from '../../examples/constellation/text/text-truncation';
15
15
  import TextCustomization from '../../examples/constellation/text/text-customization';
16
16
 
17
- ## Basic
17
+ ## Size
18
18
 
19
19
  Use a Text component for main content. Text typically appears after headings or subheadings as
20
20
  detailed descriptions and messages, but also as standalone text in components.
@@ -94,4 +94,11 @@ If truncation cannot be avoided, for example when displaying user-generated cont
94
94
  A restricted set of styles can be customized using the `xcss` prop, using
95
95
  [cssMap](/components/css/overview#cssmap).
96
96
 
97
+ The allowed customizations are:
98
+
99
+ - font modifications via `fontVariantNumeric: 'tabular-nums'` and
100
+ `fontVariantNumeric: 'slashed-zero'`
101
+ - strikethrough via `textDecorationLine`
102
+ - line breaks via `overflowWrap`
103
+
97
104
  <Example Component={TextCustomization} packageName="@atlaskit/primitives" />
@@ -70,7 +70,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
70
70
  action: 'clicked',
71
71
  componentName: componentName || 'Anchor',
72
72
  packageName: "@atlaskit/primitives",
73
- packageVersion: "0.0.0-development",
73
+ packageVersion: "16.4.1",
74
74
  analyticsData: analyticsContext,
75
75
  actionSubject: 'link'
76
76
  });
@@ -61,7 +61,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
61
61
  action: 'clicked',
62
62
  componentName: componentName || 'Pressable',
63
63
  packageName: "@atlaskit/primitives",
64
- packageVersion: "0.0.0-development",
64
+ packageVersion: "16.4.1",
65
65
  analyticsData: analyticsContext,
66
66
  actionSubject: 'button'
67
67
  });
@@ -105,7 +105,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
105
105
  action: 'clicked',
106
106
  componentName: componentName || 'Anchor',
107
107
  packageName: "@atlaskit/primitives",
108
- packageVersion: "0.0.0-development",
108
+ packageVersion: "16.4.1",
109
109
  analyticsData: analyticsContext,
110
110
  actionSubject: 'link'
111
111
  });
@@ -97,7 +97,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
97
97
  action: 'clicked',
98
98
  componentName: componentName || 'Pressable',
99
99
  packageName: "@atlaskit/primitives",
100
- packageVersion: "0.0.0-development",
100
+ packageVersion: "16.4.1",
101
101
  analyticsData: analyticsContext,
102
102
  actionSubject: 'button'
103
103
  });
@@ -56,7 +56,7 @@ const AnchorNoRef = ({
56
56
  action: 'clicked',
57
57
  componentName: componentName || 'Anchor',
58
58
  packageName: "@atlaskit/primitives",
59
- packageVersion: "0.0.0-development",
59
+ packageVersion: "16.4.1",
60
60
  analyticsData: analyticsContext,
61
61
  actionSubject: 'link'
62
62
  });
@@ -48,7 +48,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
48
48
  action: 'clicked',
49
49
  componentName: componentName || 'Pressable',
50
50
  packageName: "@atlaskit/primitives",
51
- packageVersion: "0.0.0-development",
51
+ packageVersion: "16.4.1",
52
52
  analyticsData: analyticsContext,
53
53
  actionSubject: 'button'
54
54
  });
@@ -94,7 +94,7 @@ const AnchorNoRef = ({
94
94
  action: 'clicked',
95
95
  componentName: componentName || 'Anchor',
96
96
  packageName: "@atlaskit/primitives",
97
- packageVersion: "0.0.0-development",
97
+ packageVersion: "16.4.1",
98
98
  analyticsData: analyticsContext,
99
99
  actionSubject: 'link'
100
100
  });
@@ -86,7 +86,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
86
86
  action: 'clicked',
87
87
  componentName: componentName || 'Pressable',
88
88
  packageName: "@atlaskit/primitives",
89
- packageVersion: "0.0.0-development",
89
+ packageVersion: "16.4.1",
90
90
  analyticsData: analyticsContext,
91
91
  actionSubject: 'button'
92
92
  });
@@ -61,7 +61,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
61
61
  action: 'clicked',
62
62
  componentName: componentName || 'Anchor',
63
63
  packageName: "@atlaskit/primitives",
64
- packageVersion: "0.0.0-development",
64
+ packageVersion: "16.4.1",
65
65
  analyticsData: analyticsContext,
66
66
  actionSubject: 'link'
67
67
  });
@@ -52,7 +52,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
52
52
  action: 'clicked',
53
53
  componentName: componentName || 'Pressable',
54
54
  packageName: "@atlaskit/primitives",
55
- packageVersion: "0.0.0-development",
55
+ packageVersion: "16.4.1",
56
56
  analyticsData: analyticsContext,
57
57
  actionSubject: 'button'
58
58
  });
@@ -99,7 +99,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
99
99
  action: 'clicked',
100
100
  componentName: componentName || 'Anchor',
101
101
  packageName: "@atlaskit/primitives",
102
- packageVersion: "0.0.0-development",
102
+ packageVersion: "16.4.1",
103
103
  analyticsData: analyticsContext,
104
104
  actionSubject: 'link'
105
105
  });
@@ -91,7 +91,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
91
91
  action: 'clicked',
92
92
  componentName: componentName || 'Pressable',
93
93
  packageName: "@atlaskit/primitives",
94
- packageVersion: "0.0.0-development",
94
+ packageVersion: "16.4.1",
95
95
  analyticsData: analyticsContext,
96
96
  actionSubject: 'button'
97
97
  });
@@ -47,7 +47,7 @@ type TextPropsBase<T extends ElementType = 'span'> = {
47
47
  /**
48
48
  * Bounded style overrides.
49
49
  */
50
- xcss?: StrictXCSSProp<'overflowWrap' | 'textDecorationLine', never>;
50
+ xcss?: StrictXCSSProp<'overflowWrap' | 'textDecorationLine' | 'fontVariantNumeric', never>;
51
51
  /**
52
52
  * Forwarded ref.
53
53
  */
@@ -52,7 +52,7 @@ type TextPropsBase<T extends ElementType = 'span'> = {
52
52
  /**
53
53
  * Bounded style overrides.
54
54
  */
55
- xcss?: StrictXCSSProp<'overflowWrap' | 'textDecorationLine', never>;
55
+ xcss?: StrictXCSSProp<'overflowWrap' | 'textDecorationLine' | 'fontVariantNumeric', never>;
56
56
  /**
57
57
  * Forwarded ref.
58
58
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "16.4.0",
3
+ "version": "16.4.2",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -137,8 +137,7 @@
137
137
  "@atlaskit/css": "^0.17.0",
138
138
  "@atlaskit/ds-lib": "^5.3.0",
139
139
  "@atlaskit/interaction-context": "^3.1.0",
140
- "@atlaskit/platform-feature-flags": "^1.1.0",
141
- "@atlaskit/tokens": "^8.3.0",
140
+ "@atlaskit/tokens": "^8.4.0",
142
141
  "@atlaskit/visually-hidden": "^3.0.0",
143
142
  "@babel/runtime": "^7.0.0",
144
143
  "@compiled/react": "^0.18.6",
@@ -175,10 +174,9 @@
175
174
  "@atlaskit/section-message": "^8.9.0",
176
175
  "@atlaskit/textfield": "^8.1.0",
177
176
  "@atlaskit/toggle": "^15.1.0",
178
- "@atlaskit/tooltip": "^20.10.0",
177
+ "@atlaskit/tooltip": "^20.11.0",
179
178
  "@atlassian/analytics-bridge": "^0.7.0",
180
179
  "@atlassian/codegen": "^0.1.0",
181
- "@atlassian/feature-flags-test-utils": "^1.0.0",
182
180
  "@atlassian/ssr-tests": "workspace:^",
183
181
  "@testing-library/react": "^13.4.0",
184
182
  "@testing-library/react-hooks": "^8.0.1",
@@ -32,19 +32,19 @@ const templateFiles = readdirSync(join(__dirname, 'codegen-file-templates'), {
32
32
  // Output paths for partial codegen
33
33
  const primitivesOutputs = [
34
34
  join(__dirname, '../src/xcss/style-maps.partial.tsx'),
35
- join(
36
- __dirname,
37
- '../../css/codemods/0.5.2-primitives-emotion-to-compiled/style-maps.partial.tsx',
38
- ),
35
+ join(__dirname, '../../css/codemods/0.5.2-primitives-emotion-to-compiled/style-maps.partial.tsx'),
39
36
  ];
40
37
 
41
- const forgeOutputPath = join(__dirname, '../../../forge/forge-ui/src/components/UIKit/tokens.partial.tsx');
38
+ const forgeOutputPath = join(
39
+ __dirname,
40
+ '../../../forge/forge-ui/src/components/UIKit/tokens.partial.tsx',
41
+ );
42
42
 
43
43
  // Generate partial sections for @atlaskit/primitives style-maps
44
44
  const primitivesSourceFns = [
45
45
  // width, height, minWidth, maxWidth, minHeight, maxHeight
46
- ...primitivesOutputs.map((outputPath) =>
47
- () =>
46
+ ...primitivesOutputs.map(
47
+ (outputPath) => () =>
48
48
  createPartialSignedArtifact(
49
49
  (options) => options.map(createStylesFromFileTemplate).join('\n'),
50
50
  'yarn workspace @atlaskit/primitives codegen-styles',
@@ -56,8 +56,8 @@ const primitivesSourceFns = [
56
56
  ),
57
57
  ),
58
58
  // padding*, gap*, inset*
59
- ...primitivesOutputs.map((outputPath) =>
60
- () =>
59
+ ...primitivesOutputs.map(
60
+ (outputPath) => () =>
61
61
  createPartialSignedArtifact(
62
62
  createSpacingStylesFromTemplate,
63
63
  'yarn workspace @atlaskit/primitives codegen-styles',
@@ -69,8 +69,8 @@ const primitivesSourceFns = [
69
69
  ),
70
70
  ),
71
71
  // text color, background-color, border-color
72
- ...primitivesOutputs.map((outputPath) =>
73
- () =>
72
+ ...primitivesOutputs.map(
73
+ (outputPath) => () =>
74
74
  createPartialSignedArtifact(
75
75
  (options) => options.map(createColorStylesFromTemplate).join('\n'),
76
76
  'yarn workspace @atlaskit/primitives codegen-styles',
@@ -82,8 +82,8 @@ const primitivesSourceFns = [
82
82
  ),
83
83
  ),
84
84
  // inverse color map
85
- ...primitivesOutputs.map((outputPath) =>
86
- () =>
85
+ ...primitivesOutputs.map(
86
+ (outputPath) => () =>
87
87
  createPartialSignedArtifact(
88
88
  createInverseColorMapTemplate,
89
89
  'yarn workspace @atlaskit/primitives codegen-styles',
@@ -95,8 +95,8 @@ const primitivesSourceFns = [
95
95
  ),
96
96
  ),
97
97
  // elevation (opacity, shadow, surface)
98
- ...primitivesOutputs.map((outputPath) =>
99
- () =>
98
+ ...primitivesOutputs.map(
99
+ (outputPath) => () =>
100
100
  createPartialSignedArtifact(
101
101
  (options) => options.map(createElevationStylesFromTemplate).join('\n'),
102
102
  'yarn workspace @atlaskit/primitives codegen-styles',
@@ -108,8 +108,8 @@ const primitivesSourceFns = [
108
108
  ),
109
109
  ),
110
110
  // border-width, border-radius
111
- ...primitivesOutputs.map((outputPath) =>
112
- () =>
111
+ ...primitivesOutputs.map(
112
+ (outputPath) => () =>
113
113
  createPartialSignedArtifact(
114
114
  (options) => options.map(createShapeStylesFromTemplate).join('\n'),
115
115
  'yarn workspace @atlaskit/primitives codegen-styles',
@@ -121,8 +121,8 @@ const primitivesSourceFns = [
121
121
  ),
122
122
  ),
123
123
  // border-color, border-radius, border-width, layer
124
- ...primitivesOutputs.map((outputPath) =>
125
- () =>
124
+ ...primitivesOutputs.map(
125
+ (outputPath) => () =>
126
126
  createPartialSignedArtifact(
127
127
  (options) => options.map(createStylesFromFileTemplate).join('\n'),
128
128
  'yarn workspace @atlaskit/primitives codegen-styles',
@@ -134,8 +134,8 @@ const primitivesSourceFns = [
134
134
  ),
135
135
  ),
136
136
  // font*, lineheight
137
- ...primitivesOutputs.map((outputPath) =>
138
- () =>
137
+ ...primitivesOutputs.map(
138
+ (outputPath) => () =>
139
139
  createPartialSignedArtifact(
140
140
  createTypographyStylesFromTemplate,
141
141
  'yarn workspace @atlaskit/primitives codegen-styles',
@@ -147,8 +147,8 @@ const primitivesSourceFns = [
147
147
  ),
148
148
  ),
149
149
  // font and weight map for text primitive
150
- ...primitivesOutputs.map((outputPath) =>
151
- () =>
150
+ ...primitivesOutputs.map(
151
+ (outputPath) => () =>
152
152
  createPartialSignedArtifact(
153
153
  createTextStylesFromTemplate,
154
154
  'yarn workspace @atlaskit/primitives codegen-styles',
@@ -163,11 +163,11 @@ const primitivesSourceFns = [
163
163
 
164
164
  /**
165
165
  * Generate Forge UI Kit tokens using partial codegen
166
- *
166
+ *
167
167
  * Note: Forge uses a SINGLE codegen block (@codegen-start:forge-tokens) with all tokens,
168
168
  * unlike Primitives which uses separate blocks per category. This allows Forge to mix
169
169
  * generated token maps with manual utility functions in one file.
170
- *
170
+ *
171
171
  * @see https://developer.atlassian.com/platform/forge/ui-kit/components/xcss/
172
172
  */
173
173
  const generateForgeTokensContent = (): string => {