@atlaskit/forge-react-types 0.48.0 → 0.49.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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # @atlaskit/forge-react-types
2
2
 
3
+ ## 0.49.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`e45f66913297e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e45f66913297e) -
8
+ Import emotion box into Forge UI Kit library
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
3
14
  ## 0.48.0
4
15
 
5
16
  ### Minor Changes
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
8
8
  *
9
9
  * Extract component prop types from UIKit 2 components - BoxProps
10
10
  *
11
- * @codegen <<SignedSource::2aa8902478f587c656a335fdbf945043>>
11
+ * @codegen <<SignedSource::2576658a875b738553fdb3ccfa41acd1>>
12
12
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
13
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/box/__generated__/index.partial.tsx <<SignedSource::8e5857e8580db0dac17ebc42ab6115c9>>
13
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/box/index.tsx <<SignedSource::6b375bb57ecf19919f9e1b65e899fd96>>
14
14
  */
15
15
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
16
16
 
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - BoxProps
5
5
  *
6
- * @codegen <<SignedSource::2aa8902478f587c656a335fdbf945043>>
6
+ * @codegen <<SignedSource::2576658a875b738553fdb3ccfa41acd1>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/box/__generated__/index.partial.tsx <<SignedSource::8e5857e8580db0dac17ebc42ab6115c9>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/box/index.tsx <<SignedSource::6b375bb57ecf19919f9e1b65e899fd96>>
9
9
  */
10
10
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
11
11
 
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - BoxProps
5
5
  *
6
- * @codegen <<SignedSource::2aa8902478f587c656a335fdbf945043>>
6
+ * @codegen <<SignedSource::2576658a875b738553fdb3ccfa41acd1>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/box/__generated__/index.partial.tsx <<SignedSource::8e5857e8580db0dac17ebc42ab6115c9>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/box/index.tsx <<SignedSource::6b375bb57ecf19919f9e1b65e899fd96>>
9
9
  */
10
10
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
11
11
 
@@ -3,12 +3,12 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - BoxProps
5
5
  *
6
- * @codegen <<SignedSource::2aa8902478f587c656a335fdbf945043>>
6
+ * @codegen <<SignedSource::2576658a875b738553fdb3ccfa41acd1>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/box/__generated__/index.partial.tsx <<SignedSource::8e5857e8580db0dac17ebc42ab6115c9>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/box/index.tsx <<SignedSource::6b375bb57ecf19919f9e1b65e899fd96>>
9
9
  */
10
10
  import React from 'react';
11
- import { Box as PlatformBox } from '@atlaskit/primitives';
11
+ import type { Box as PlatformBox } from '@atlaskit/primitives';
12
12
  import type * as CSS from 'csstype';
13
13
  import type { MediaQuery } from '@atlaskit/primitives';
14
14
  import { tokensMap } from '@atlaskit/primitives';
@@ -1525,6 +1525,20 @@ declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof
1525
1525
  type XCSSProp = ReturnType<typeof xcssValidator>;
1526
1526
  type PlatformBoxProps = React.ComponentProps<typeof PlatformBox>;
1527
1527
  export type BoxProps = Pick<PlatformBoxProps, 'children' | 'ref' | 'testId'> & {
1528
+ /**
1529
+ * A token alias for background color. See: [Design tokens](https://atlassian.design/components/tokens/all-tokens)
1530
+ * for a list of available colors.
1531
+ *
1532
+ * When the background color is set to a surface token, the current surface CSS variable
1533
+ * will also be set to this value in the `Box` styles.
1534
+ *
1535
+ * @type [Background color tokens](https://atlassian.design/components/tokens/all-tokens#color-background)
1536
+ */
1537
+ backgroundColor?: PlatformBoxProps['backgroundColor'];
1538
+ /**
1539
+ * @type ForgeComponent
1540
+ */
1541
+ children?: PlatformBoxProps['children'];
1528
1542
  /**
1529
1543
  * A shorthand for `paddingBlock` and `paddingInline` together.
1530
1544
  *
@@ -1538,17 +1552,17 @@ export type BoxProps = Pick<PlatformBoxProps, 'children' | 'ref' | 'testId'> & {
1538
1552
  */
1539
1553
  paddingBlock?: PlatformBoxProps['paddingBlock'];
1540
1554
  /**
1541
- * The logical block start padding of an element.
1555
+ * The logical block end padding of an element.
1542
1556
  *
1543
1557
  * @type [Space tokens](https://atlassian.design/components/tokens/all-tokens#space)
1544
1558
  */
1545
- paddingBlockStart?: PlatformBoxProps['paddingBlockStart'];
1559
+ paddingBlockEnd?: PlatformBoxProps['paddingBlockEnd'];
1546
1560
  /**
1547
- * The logical block end padding of an element.
1561
+ * The logical block start padding of an element.
1548
1562
  *
1549
1563
  * @type [Space tokens](https://atlassian.design/components/tokens/all-tokens#space)
1550
1564
  */
1551
- paddingBlockEnd?: PlatformBoxProps['paddingBlockEnd'];
1565
+ paddingBlockStart?: PlatformBoxProps['paddingBlockStart'];
1552
1566
  /**
1553
1567
  * The logical inline start and end padding of an element.
1554
1568
  *
@@ -1568,15 +1582,11 @@ export type BoxProps = Pick<PlatformBoxProps, 'children' | 'ref' | 'testId'> & {
1568
1582
  */
1569
1583
  paddingInlineStart?: PlatformBoxProps['paddingInlineStart'];
1570
1584
  /**
1571
- * A token alias for background color. See: [Design tokens](https://atlassian.design/components/tokens/all-tokens)
1572
- * for a list of available colors.
1573
- *
1574
- * When the background color is set to a surface token, the current surface CSS variable
1575
- * will also be set to this value in the `Box` styles.
1585
+ * Accessible role.
1576
1586
  *
1577
- * @type [Background color tokens](https://atlassian.design/components/tokens/all-tokens#color-background)
1587
+ * @type string
1578
1588
  */
1579
- backgroundColor?: PlatformBoxProps['backgroundColor'];
1589
+ role?: PlatformBoxProps['role'];
1580
1590
  /**
1581
1591
  * Apply a subset of permitted styles, powered by Atlassian Design System tokens.
1582
1592
  * For a list of supported style properties on this component, see [here](https://developer.atlassian.com/platform/forge/ui-kit/components/xcss).
@@ -1584,14 +1594,6 @@ export type BoxProps = Pick<PlatformBoxProps, 'children' | 'ref' | 'testId'> & {
1584
1594
  * @type XCSSProp
1585
1595
  */
1586
1596
  xcss?: XCSSProp;
1587
- /**
1588
- * @type string
1589
- */
1590
- role?: PlatformBoxProps['role'];
1591
- /**
1592
- * @type ForgeComponent
1593
- */
1594
- children?: PlatformBoxProps['children'];
1595
1597
  };
1596
1598
  /**
1597
1599
  * A box is a generic container that provides managed access to design tokens.
@@ -3,12 +3,12 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - BoxProps
5
5
  *
6
- * @codegen <<SignedSource::2aa8902478f587c656a335fdbf945043>>
6
+ * @codegen <<SignedSource::2576658a875b738553fdb3ccfa41acd1>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/box/__generated__/index.partial.tsx <<SignedSource::8e5857e8580db0dac17ebc42ab6115c9>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/box/index.tsx <<SignedSource::6b375bb57ecf19919f9e1b65e899fd96>>
9
9
  */
10
10
  import React from 'react';
11
- import { Box as PlatformBox } from '@atlaskit/primitives';
11
+ import type { Box as PlatformBox } from '@atlaskit/primitives';
12
12
  import type * as CSS from 'csstype';
13
13
  import type { MediaQuery } from '@atlaskit/primitives';
14
14
  import { tokensMap } from '@atlaskit/primitives';
@@ -1525,6 +1525,20 @@ declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof
1525
1525
  type XCSSProp = ReturnType<typeof xcssValidator>;
1526
1526
  type PlatformBoxProps = React.ComponentProps<typeof PlatformBox>;
1527
1527
  export type BoxProps = Pick<PlatformBoxProps, 'children' | 'ref' | 'testId'> & {
1528
+ /**
1529
+ * A token alias for background color. See: [Design tokens](https://atlassian.design/components/tokens/all-tokens)
1530
+ * for a list of available colors.
1531
+ *
1532
+ * When the background color is set to a surface token, the current surface CSS variable
1533
+ * will also be set to this value in the `Box` styles.
1534
+ *
1535
+ * @type [Background color tokens](https://atlassian.design/components/tokens/all-tokens#color-background)
1536
+ */
1537
+ backgroundColor?: PlatformBoxProps['backgroundColor'];
1538
+ /**
1539
+ * @type ForgeComponent
1540
+ */
1541
+ children?: PlatformBoxProps['children'];
1528
1542
  /**
1529
1543
  * A shorthand for `paddingBlock` and `paddingInline` together.
1530
1544
  *
@@ -1538,17 +1552,17 @@ export type BoxProps = Pick<PlatformBoxProps, 'children' | 'ref' | 'testId'> & {
1538
1552
  */
1539
1553
  paddingBlock?: PlatformBoxProps['paddingBlock'];
1540
1554
  /**
1541
- * The logical block start padding of an element.
1555
+ * The logical block end padding of an element.
1542
1556
  *
1543
1557
  * @type [Space tokens](https://atlassian.design/components/tokens/all-tokens#space)
1544
1558
  */
1545
- paddingBlockStart?: PlatformBoxProps['paddingBlockStart'];
1559
+ paddingBlockEnd?: PlatformBoxProps['paddingBlockEnd'];
1546
1560
  /**
1547
- * The logical block end padding of an element.
1561
+ * The logical block start padding of an element.
1548
1562
  *
1549
1563
  * @type [Space tokens](https://atlassian.design/components/tokens/all-tokens#space)
1550
1564
  */
1551
- paddingBlockEnd?: PlatformBoxProps['paddingBlockEnd'];
1565
+ paddingBlockStart?: PlatformBoxProps['paddingBlockStart'];
1552
1566
  /**
1553
1567
  * The logical inline start and end padding of an element.
1554
1568
  *
@@ -1568,15 +1582,11 @@ export type BoxProps = Pick<PlatformBoxProps, 'children' | 'ref' | 'testId'> & {
1568
1582
  */
1569
1583
  paddingInlineStart?: PlatformBoxProps['paddingInlineStart'];
1570
1584
  /**
1571
- * A token alias for background color. See: [Design tokens](https://atlassian.design/components/tokens/all-tokens)
1572
- * for a list of available colors.
1573
- *
1574
- * When the background color is set to a surface token, the current surface CSS variable
1575
- * will also be set to this value in the `Box` styles.
1585
+ * Accessible role.
1576
1586
  *
1577
- * @type [Background color tokens](https://atlassian.design/components/tokens/all-tokens#color-background)
1587
+ * @type string
1578
1588
  */
1579
- backgroundColor?: PlatformBoxProps['backgroundColor'];
1589
+ role?: PlatformBoxProps['role'];
1580
1590
  /**
1581
1591
  * Apply a subset of permitted styles, powered by Atlassian Design System tokens.
1582
1592
  * For a list of supported style properties on this component, see [here](https://developer.atlassian.com/platform/forge/ui-kit/components/xcss).
@@ -1584,14 +1594,6 @@ export type BoxProps = Pick<PlatformBoxProps, 'children' | 'ref' | 'testId'> & {
1584
1594
  * @type XCSSProp
1585
1595
  */
1586
1596
  xcss?: XCSSProp;
1587
- /**
1588
- * @type string
1589
- */
1590
- role?: PlatformBoxProps['role'];
1591
- /**
1592
- * @type ForgeComponent
1593
- */
1594
- children?: PlatformBoxProps['children'];
1595
1597
  };
1596
1598
  /**
1597
1599
  * A box is a generic container that provides managed access to design tokens.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/forge-react-types",
3
- "version": "0.48.0",
3
+ "version": "0.49.0",
4
4
  "description": "Component types for Forge UI Kit React components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -25,12 +25,12 @@
25
25
  "@atlaskit/comment": "^13.1.0",
26
26
  "@atlaskit/datetime-picker": "^17.1.0",
27
27
  "@atlaskit/dynamic-table": "^18.3.0",
28
- "@atlaskit/form": "^14.2.0",
28
+ "@atlaskit/form": "^14.3.0",
29
29
  "@atlaskit/inline-edit": "^15.3.0",
30
30
  "@atlaskit/modal-dialog": "^14.7.0",
31
- "@atlaskit/navigation-system": "^5.5.0",
31
+ "@atlaskit/navigation-system": "^5.9.0",
32
32
  "@atlaskit/popup": "^4.6.0",
33
- "@atlaskit/primitives": "^16.1.0",
33
+ "@atlaskit/primitives": "^16.4.0",
34
34
  "@atlaskit/progress-bar": "^4.0.0",
35
35
  "@atlaskit/progress-tracker": "^10.3.0",
36
36
  "@atlaskit/radio": "^8.3.0",
@@ -43,8 +43,8 @@
43
43
  "@atlaskit/textarea": "^8.1.0",
44
44
  "@atlaskit/textfield": "^8.1.0",
45
45
  "@atlaskit/toggle": "^15.1.0",
46
- "@atlaskit/tokens": "^8.0.0",
47
- "@atlaskit/tooltip": "^20.8.0",
46
+ "@atlaskit/tokens": "^8.3.0",
47
+ "@atlaskit/tooltip": "^20.10.0",
48
48
  "@babel/runtime": "^7.0.0"
49
49
  },
50
50
  "peerDependencies": {
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "@atlassian/codegen": "^0.1.0",
55
- "@atlassian/forge-ui": "^32.48.0",
55
+ "@atlassian/forge-ui": "^32.49.0",
56
56
  "@types/node": "~22.17.1",
57
57
  "lodash": "^4.17.21",
58
58
  "react": "^18.2.0",
@@ -195,6 +195,7 @@ class ImportDeclarationProxy implements IImportDeclaration {
195
195
  .map((text) => text.trim());
196
196
 
197
197
  if (isSharedUIKit2TypesImport(this.base)) {
198
+ // Map shared UIKit type imports to types.codegen
198
199
  packageName = './types.codegen';
199
200
  }
200
201
 
@@ -245,12 +246,11 @@ class SimpleImportDeclaration implements IImportDeclaration {
245
246
 
246
247
  // handles type imports from platform/packages/forge/forge-ui/src/components/UIKit/types.ts
247
248
  const isSharedUIKit2TypesImport = (importDeclaration: ImportDeclaration) => {
249
+ const fileName = importDeclaration.getModuleSpecifierValue().split('/').pop();
248
250
  return (
249
251
  importDeclaration.isTypeOnly() &&
250
- // file is a relative import
251
252
  importDeclaration.getModuleSpecifierValue().charAt(0) === '.' &&
252
- // file is named types
253
- importDeclaration.getModuleSpecifierValue().split('/').pop() === 'types'
253
+ fileName === 'types'
254
254
  );
255
255
  };
256
256
 
@@ -221,7 +221,7 @@ const generateComponentPropTypes = (componentNames?: string) => {
221
221
  })
222
222
  .sort((a, b) => a.getName().localeCompare(b.getName()));
223
223
 
224
- // generate share types file first
224
+ // generate shared files first
225
225
  generateSharedTypesFile(componentOutputDir);
226
226
 
227
227
  generateComponentPropTypeSourceFiles(componentOutputDir, componentPropTypeSymbols);
@@ -3,14 +3,14 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - BoxProps
5
5
  *
6
- * @codegen <<SignedSource::2aa8902478f587c656a335fdbf945043>>
6
+ * @codegen <<SignedSource::2576658a875b738553fdb3ccfa41acd1>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/box/__generated__/index.partial.tsx <<SignedSource::8e5857e8580db0dac17ebc42ab6115c9>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/box/index.tsx <<SignedSource::6b375bb57ecf19919f9e1b65e899fd96>>
9
9
  */
10
10
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
11
11
 
12
12
  import React from 'react';
13
- import { Box as PlatformBox } from '@atlaskit/primitives';
13
+ import type { Box as PlatformBox } from '@atlaskit/primitives';
14
14
 
15
15
  import type * as CSS from 'csstype';
16
16
  import type { MediaQuery } from '@atlaskit/primitives';
@@ -207,6 +207,22 @@ type XCSSProp = ReturnType<typeof xcssValidator>;
207
207
  type PlatformBoxProps = React.ComponentProps<typeof PlatformBox>;
208
208
 
209
209
  export type BoxProps = Pick<PlatformBoxProps, 'children' | 'ref' | 'testId'> & {
210
+ /**
211
+ * A token alias for background color. See: [Design tokens](https://atlassian.design/components/tokens/all-tokens)
212
+ * for a list of available colors.
213
+ *
214
+ * When the background color is set to a surface token, the current surface CSS variable
215
+ * will also be set to this value in the `Box` styles.
216
+ *
217
+ * @type [Background color tokens](https://atlassian.design/components/tokens/all-tokens#color-background)
218
+ */
219
+ backgroundColor?: PlatformBoxProps['backgroundColor'];
220
+
221
+ /**
222
+ * @type ForgeComponent
223
+ */
224
+ children?: PlatformBoxProps['children'];
225
+
210
226
  /**
211
227
  * A shorthand for `paddingBlock` and `paddingInline` together.
212
228
  *
@@ -222,18 +238,18 @@ export type BoxProps = Pick<PlatformBoxProps, 'children' | 'ref' | 'testId'> & {
222
238
  paddingBlock?: PlatformBoxProps['paddingBlock'];
223
239
 
224
240
  /**
225
- * The logical block start padding of an element.
241
+ * The logical block end padding of an element.
226
242
  *
227
243
  * @type [Space tokens](https://atlassian.design/components/tokens/all-tokens#space)
228
244
  */
229
- paddingBlockStart?: PlatformBoxProps['paddingBlockStart'];
245
+ paddingBlockEnd?: PlatformBoxProps['paddingBlockEnd'];
230
246
 
231
247
  /**
232
- * The logical block end padding of an element.
248
+ * The logical block start padding of an element.
233
249
  *
234
250
  * @type [Space tokens](https://atlassian.design/components/tokens/all-tokens#space)
235
251
  */
236
- paddingBlockEnd?: PlatformBoxProps['paddingBlockEnd'];
252
+ paddingBlockStart?: PlatformBoxProps['paddingBlockStart'];
237
253
 
238
254
  /**
239
255
  * The logical inline start and end padding of an element.
@@ -257,15 +273,11 @@ export type BoxProps = Pick<PlatformBoxProps, 'children' | 'ref' | 'testId'> & {
257
273
  paddingInlineStart?: PlatformBoxProps['paddingInlineStart'];
258
274
 
259
275
  /**
260
- * A token alias for background color. See: [Design tokens](https://atlassian.design/components/tokens/all-tokens)
261
- * for a list of available colors.
276
+ * Accessible role.
262
277
  *
263
- * When the background color is set to a surface token, the current surface CSS variable
264
- * will also be set to this value in the `Box` styles.
265
- *
266
- * @type [Background color tokens](https://atlassian.design/components/tokens/all-tokens#color-background)
278
+ * @type string
267
279
  */
268
- backgroundColor?: PlatformBoxProps['backgroundColor'];
280
+ role?: PlatformBoxProps['role'];
269
281
 
270
282
  /**
271
283
  * Apply a subset of permitted styles, powered by Atlassian Design System tokens.
@@ -274,16 +286,6 @@ export type BoxProps = Pick<PlatformBoxProps, 'children' | 'ref' | 'testId'> & {
274
286
  * @type XCSSProp
275
287
  */
276
288
  xcss?: XCSSProp;
277
-
278
- /**
279
- * @type string
280
- */
281
- role?: PlatformBoxProps['role'];
282
-
283
- /**
284
- * @type ForgeComponent
285
- */
286
- children?: PlatformBoxProps['children'];
287
289
  };
288
290
 
289
291
  /**