@atlaskit/forge-react-types 0.37.13 → 0.37.14

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,11 @@
1
1
  # @atlaskit/forge-react-types
2
2
 
3
+ ## 0.37.14
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 0.37.13
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/forge-react-types",
3
- "version": "0.37.13",
3
+ "version": "0.37.14",
4
4
  "description": "Component types for Forge UI Kit React components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,23 +28,23 @@
28
28
  "@atlaskit/button": "^21.1.0",
29
29
  "@atlaskit/calendar": "^17.1.0",
30
30
  "@atlaskit/checkbox": "^17.0.0",
31
- "@atlaskit/code": "^16.0.0",
32
- "@atlaskit/datetime-picker": "^16.1.0",
31
+ "@atlaskit/code": "^16.1.0",
32
+ "@atlaskit/datetime-picker": "^16.2.0",
33
33
  "@atlaskit/dynamic-table": "^18.0.0",
34
34
  "@atlaskit/empty-state": "^9.0.0",
35
35
  "@atlaskit/form": "^12.0.0",
36
36
  "@atlaskit/heading": "^5.1.0",
37
37
  "@atlaskit/inline-edit": "^15.1.0",
38
38
  "@atlaskit/lozenge": "^12.2.0",
39
- "@atlaskit/modal-dialog": "^13.1.0",
39
+ "@atlaskit/modal-dialog": "^14.0.0",
40
40
  "@atlaskit/popup": "^2.0.0",
41
- "@atlaskit/primitives": "^14.1.0",
41
+ "@atlaskit/primitives": "^14.2.0",
42
42
  "@atlaskit/progress-bar": "^4.0.0",
43
43
  "@atlaskit/progress-tracker": "^10.0.0",
44
44
  "@atlaskit/radio": "^8.0.0",
45
45
  "@atlaskit/range": "^9.0.0",
46
- "@atlaskit/renderer": "^114.3.0",
47
- "@atlaskit/section-message": "^8.1.0",
46
+ "@atlaskit/renderer": "^114.5.0",
47
+ "@atlaskit/section-message": "^8.2.0",
48
48
  "@atlaskit/select": "^20.0.0",
49
49
  "@atlaskit/spinner": "^18.0.0",
50
50
  "@atlaskit/tabs": "^18.0.0",
@@ -60,10 +60,16 @@ const getDependentTypeDeclarations = (baseComponentPropSymbol: Symbol, sourceFil
60
60
  for (const declaration of declarations) {
61
61
  // further extract dependent types from the dependent type declarations, if it is not yet the base component prop symbol
62
62
  // e.g. Text component depends on OriginalPlatformProps which depends on PlatformTextProps
63
- if (!declaration.getName().startsWith('_Platform') && !declaration.getName().startsWith('Platform')) {
63
+ if (
64
+ !declaration.getName().startsWith('_Platform') &&
65
+ !declaration.getName().startsWith('Platform')
66
+ ) {
64
67
  const typeAliasSymbol = declaration.getSymbolOrThrow();
65
68
  const baseComponentPropCode = getDeclaration(baseComponentPropSymbol).getText();
66
- for (const dependentTypeAliasDeclaration of getDependentTypeDeclarationsBase(typeAliasSymbol, sourceFile)) {
69
+ for (const dependentTypeAliasDeclaration of getDependentTypeDeclarationsBase(
70
+ typeAliasSymbol,
71
+ sourceFile,
72
+ )) {
67
73
  if (baseComponentPropCode !== dependentTypeAliasDeclaration.getText()) {
68
74
  declarations.push(dependentTypeAliasDeclaration);
69
75
  }
@@ -73,7 +79,10 @@ const getDependentTypeDeclarations = (baseComponentPropSymbol: Symbol, sourceFil
73
79
  return declarations;
74
80
  };
75
81
 
76
- const getDependentTypeDeclarationsBase = (baseComponentPropSymbol: Symbol, sourceFile: SourceFile) => {
82
+ const getDependentTypeDeclarationsBase = (
83
+ baseComponentPropSymbol: Symbol,
84
+ sourceFile: SourceFile,
85
+ ) => {
77
86
  return sourceFile.getTypeAliases().reduce((declarations, typeAlias) => {
78
87
  const typeAliasName = typeAlias.getName();
79
88
  if (typeAliasName !== baseComponentPropSymbol.getName()) {
@@ -438,7 +447,9 @@ const getUIKitComponentDocUrl = (componentName: string) => {
438
447
  return null;
439
448
  }
440
449
  const baseComponentPath = matchedComponentPath ?? kebabCase(componentName);
441
- const componentPath = baseComponentPath.includes('/#') ? baseComponentPath : `${baseComponentPath}/`;
450
+ const componentPath = baseComponentPath.includes('/#')
451
+ ? baseComponentPath
452
+ : `${baseComponentPath}/`;
442
453
 
443
454
  return `/platform/forge/ui-kit/components/${componentPath}`;
444
455
  };
@@ -0,0 +1,82 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * Extract component prop types from UIKit 2 components - PressableProps
5
+ *
6
+ * @codegen <<SignedSource::7718a6c12cf7232dc9e82a226b7af971>>
7
+ * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/pressable/__generated__/index.partial.tsx <<SignedSource::428e189d3e2a55cdd7cf86aef5a1eed7>>
9
+ */
10
+ /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
11
+
12
+ import React from 'react';
13
+ import { Pressable as PlatformPressable } from '@atlaskit/primitives';
14
+
15
+ type _PlatformPressableProps = React.ComponentProps<typeof PlatformPressable>;
16
+ export type PlatformPressableProps = Omit<_PlatformPressableProps, 'backgroundColor' | 'isDisabled' | 'onClick' | 'padding' | 'paddingBlock' | 'paddingBlockEnd' | 'paddingBlockStart' | 'paddingInline' | 'paddingInlineEnd' | 'paddingInlineStart' | 'testId'> & {
17
+ /**
18
+ * Token representing background color with a built-in fallback value.
19
+ */
20
+ backgroundColor?: _PlatformPressableProps['backgroundColor'];
21
+ /**
22
+ * Whether the button is disabled.
23
+ */
24
+ isDisabled?: _PlatformPressableProps['isDisabled'];
25
+ /**
26
+ * Handler called on click. The second argument provides an Atlaskit UI analytics event that can be fired to a listening channel. See the ['analytics-next' package](https://atlaskit.atlassian.com/packages/analytics/analytics-next) documentation for more information.
27
+ */
28
+ onClick?: _PlatformPressableProps['onClick'];
29
+ /**
30
+ * Tokens representing CSS shorthand for `paddingBlock` and `paddingInline` together.
31
+ *
32
+ * @see paddingBlock
33
+ * @see paddingInline
34
+ */
35
+ padding?: _PlatformPressableProps['padding'];
36
+ /**
37
+ * Tokens representing CSS shorthand `paddingBlock`.
38
+ *
39
+ * @see paddingBlockStart
40
+ * @see paddingBlockEnd
41
+ */
42
+ paddingBlock?: _PlatformPressableProps['paddingBlock'];
43
+ /**
44
+ * Tokens representing CSS `paddingBlockEnd`.
45
+ */
46
+ paddingBlockEnd?: _PlatformPressableProps['paddingBlockEnd'];
47
+ /**
48
+ * Tokens representing CSS `paddingBlockStart`.
49
+ */
50
+ paddingBlockStart?: _PlatformPressableProps['paddingBlockStart'];
51
+ /**
52
+ * Tokens representing CSS shorthand `paddingInline`.
53
+ *
54
+ * @see paddingInlineStart
55
+ * @see paddingInlineEnd
56
+ */
57
+ paddingInline?: _PlatformPressableProps['paddingInline'];
58
+ /**
59
+ * Tokens representing CSS `paddingInlineEnd`.
60
+ */
61
+ paddingInlineEnd?: _PlatformPressableProps['paddingInlineEnd'];
62
+ /**
63
+ * Tokens representing CSS `paddingInlineStart`.
64
+ */
65
+ paddingInlineStart?: _PlatformPressableProps['paddingInlineStart'];
66
+ /**
67
+ * A unique string that appears as data attribute data-testid in the rendered code, serving as a hook for automated tests.
68
+ */
69
+ testId?: _PlatformPressableProps['testId'];
70
+ }
71
+
72
+ export type PressableProps = Pick<
73
+ PlatformPressableProps,
74
+ 'backgroundColor' | 'children' | 'isDisabled' | 'onClick' | 'padding' | 'paddingBlock' | 'paddingBlockEnd' | 'paddingBlockStart' | 'paddingInline' | 'paddingInlineEnd' | 'paddingInlineStart' | 'testId'
75
+ >;
76
+
77
+ /**
78
+ * A pressable is a primitive for building custom buttons.
79
+ *
80
+ * @codegenId #pressable
81
+ */
82
+ export type TPressable<T> = (props: PressableProps) => T;