@atlaskit/ds-explorations 5.1.0 → 5.1.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,17 @@
1
1
  # @atlaskit/ds-explorations
2
2
 
3
+ ## 5.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 5.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 5.1.0
4
16
 
5
17
  ### Minor Changes
@@ -3,7 +3,6 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type ReactNode } from 'react';
6
- import { jsx } from '@emotion/react';
7
6
  import { type BasePrimitiveProps } from './types';
8
7
  interface InteractionSurfaceProps extends BasePrimitiveProps {
9
8
  children: ReactNode;
@@ -21,7 +20,7 @@ interface InteractionSurfaceProps extends BasePrimitiveProps {
21
20
  * </Pressable>
22
21
  * ```
23
22
  */
24
- declare const InteractionSurface: ({ appearance, children, testId }: InteractionSurfaceProps) => jsx.JSX.Element;
23
+ declare const InteractionSurface: ({ appearance, children, testId }: InteractionSurfaceProps) => React.JSX.Element;
25
24
  export default InteractionSurface;
26
25
  /**
27
26
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
@@ -3,7 +3,6 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type ReactNode } from 'react';
6
- import { jsx } from '@emotion/react';
7
6
  import { type BasePrimitiveProps } from './types';
8
7
  interface InteractionSurfaceProps extends BasePrimitiveProps {
9
8
  children: ReactNode;
@@ -21,7 +20,7 @@ interface InteractionSurfaceProps extends BasePrimitiveProps {
21
20
  * </Pressable>
22
21
  * ```
23
22
  */
24
- declare const InteractionSurface: ({ appearance, children, testId }: InteractionSurfaceProps) => jsx.JSX.Element;
23
+ declare const InteractionSurface: ({ appearance, children, testId }: InteractionSurfaceProps) => React.JSX.Element;
25
24
  export default InteractionSurface;
26
25
  /**
27
26
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/ds-explorations",
3
- "version": "5.1.0",
3
+ "version": "5.1.2",
4
4
  "description": "DEPRECATED. Use @atlaskit/primitives. An experimental package for exploration and validation of spacing / typography foundations.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -25,7 +25,7 @@
25
25
  "prepare": "yarn ak-postbuild"
26
26
  },
27
27
  "dependencies": {
28
- "@atlaskit/tokens": "^8.3.0",
28
+ "@atlaskit/tokens": "^10.0.0",
29
29
  "@babel/runtime": "^7.0.0",
30
30
  "@emotion/react": "^11.7.1"
31
31
  },
@@ -35,10 +35,10 @@
35
35
  "devDependencies": {
36
36
  "@af/formatting": "workspace:^",
37
37
  "@atlaskit/ds-lib": "^5.3.0",
38
- "@atlaskit/primitives": "^16.3.0",
39
- "@atlaskit/textfield": "^8.1.0",
38
+ "@atlaskit/primitives": "^17.1.0",
39
+ "@atlaskit/textfield": "^8.2.0",
40
40
  "@atlassian/codegen": "^0.1.0",
41
- "@testing-library/react": "^13.4.0",
41
+ "@testing-library/react": "^16.3.0",
42
42
  "fs-extra": "^4.0.2",
43
43
  "react-dom": "^18.2.0",
44
44
  "ts-node": "^10.9.1"
@@ -63,7 +63,7 @@ const activeTokens = bothTokens
63
63
  .filter(compose(pick('token'), not(isPressed)))
64
64
  .filter(compose(pick('token'), not(isHovered)));
65
65
 
66
- export const createColorStylesFromTemplate = (colorProperty: keyof typeof tokenStyles) => {
66
+ export const createColorStylesFromTemplate = (colorProperty: keyof typeof tokenStyles): string => {
67
67
  if (!tokenStyles[colorProperty]) {
68
68
  throw new Error(`[codegen] Unknown option found "${colorProperty}"`);
69
69
  }
@@ -22,7 +22,7 @@ const activeTokens = tokens
22
22
  // @ts-ignore
23
23
  .map((t) => ({ ...t, token: t.token.replaceAll('.[default]', '') }));
24
24
 
25
- export const createColorMapTemplate = () => {
25
+ export const createColorMapTemplate = (): string => {
26
26
  return format(
27
27
  `
28
28
  export default {
@@ -30,7 +30,7 @@ const activeTokens = Object.entries(dimensions).map(([name, value]) => ({
30
30
 
31
31
  export const createDimensionStylesFromTemplate = (
32
32
  spacingProperty: keyof typeof dimensionProperties,
33
- ) => {
33
+ ): string => {
34
34
  if (!dimensionProperties[spacingProperty]) {
35
35
  throw new Error(`[codegen] Unknown option found "${spacingProperty}"`);
36
36
  }
@@ -43,7 +43,7 @@ const activeTokens = tokens
43
43
  const pressedTokens = activeTokens.filter(compose(pick('token'), isPressed));
44
44
  const hoveredTokens = activeTokens.filter(compose(pick('token'), isHovered));
45
45
 
46
- export const createInteractionStylesFromTemplate = (colorProperty: keyof typeof colors) => {
46
+ export const createInteractionStylesFromTemplate = (colorProperty: keyof typeof colors): string => {
47
47
  if (!colors[colorProperty]) {
48
48
  throw new Error(`[codegen] Unknown option found "${colorProperty}"`);
49
49
  }
@@ -16,7 +16,7 @@ const styleProperties: Record<'layer', Record<Layer, number>> = {
16
16
  },
17
17
  };
18
18
 
19
- export const createStylesFromTemplate = (property: keyof typeof styleProperties) => {
19
+ export const createStylesFromTemplate = (property: keyof typeof styleProperties): string => {
20
20
  if (!styleProperties[property]) {
21
21
  throw new Error(`[codegen] Unknown option found "${property}"`);
22
22
  }
package/scripts/utils.tsx CHANGED
@@ -31,7 +31,7 @@ type BooleanCallback<T> = (args: T) => boolean;
31
31
 
32
32
  export const compose =
33
33
  (...fns: ((...any: any[]) => any)[]) =>
34
- (x: any) =>
34
+ (x: any): any =>
35
35
  fns.reduce((res, fn) => fn(res), x);
36
36
  export const pick =
37
37
  <T extends any>(key: keyof T) =>
@@ -48,4 +48,4 @@ export const or =
48
48
  <T extends any>(...fns: BooleanCallback<T>[]) =>
49
49
  (val: T) =>
50
50
  fns.some((fn) => fn(val));
51
- export const capitalize = (str: string) => str.charAt(0).toUpperCase() + str.slice(1);
51
+ export const capitalize = (str: string): string => str.charAt(0).toUpperCase() + str.slice(1);