@atlaskit/ds-explorations 5.1.3 → 5.1.4
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 +7 -0
- package/dist/types/components/interaction-surface.partial.d.ts +1 -1
- package/dist/types/components/surface-provider.d.ts +1 -1
- package/dist/types-ts4.5/components/interaction-surface.partial.d.ts +1 -1
- package/dist/types-ts4.5/components/surface-provider.d.ts +1 -1
- package/package.json +4 -4
- package/scripts/codegen-styles.tsx +2 -3
- package/scripts/utils.tsx +13 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/ds-explorations
|
|
2
2
|
|
|
3
|
+
## 5.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`22bf79dbdcdca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/22bf79dbdcdca) -
|
|
8
|
+
Internal changes to remove unnecessary token fallbacks and imports from `@atlaskit/theme`
|
|
9
|
+
|
|
3
10
|
## 5.1.3
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -20,7 +20,7 @@ interface InteractionSurfaceProps extends BasePrimitiveProps {
|
|
|
20
20
|
* </Pressable>
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
declare const InteractionSurface: ({ appearance, children, testId }: InteractionSurfaceProps) => React.JSX.Element;
|
|
23
|
+
declare const InteractionSurface: ({ appearance, children, testId, }: InteractionSurfaceProps) => React.JSX.Element;
|
|
24
24
|
export default InteractionSurface;
|
|
25
25
|
/**
|
|
26
26
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
@@ -20,7 +20,7 @@ interface InteractionSurfaceProps extends BasePrimitiveProps {
|
|
|
20
20
|
* </Pressable>
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
declare const InteractionSurface: ({ appearance, children, testId }: InteractionSurfaceProps) => React.JSX.Element;
|
|
23
|
+
declare const InteractionSurface: ({ appearance, children, testId, }: InteractionSurfaceProps) => React.JSX.Element;
|
|
24
24
|
export default InteractionSurface;
|
|
25
25
|
/**
|
|
26
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.
|
|
3
|
+
"version": "5.1.4",
|
|
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": "^11.
|
|
28
|
+
"@atlaskit/tokens": "^11.4.0",
|
|
29
29
|
"@babel/runtime": "^7.0.0",
|
|
30
30
|
"@emotion/react": "^11.7.1"
|
|
31
31
|
},
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@af/formatting": "workspace:^",
|
|
37
|
-
"@atlaskit/ds-lib": "^
|
|
38
|
-
"@atlaskit/primitives": "^18.
|
|
37
|
+
"@atlaskit/ds-lib": "^6.0.0",
|
|
38
|
+
"@atlaskit/primitives": "^18.1.0",
|
|
39
39
|
"@atlaskit/textfield": "^8.2.0",
|
|
40
40
|
"@atlassian/codegen": "^0.1.0",
|
|
41
41
|
"@testing-library/react": "^16.3.0",
|
|
@@ -8,9 +8,8 @@ import { createColorMapTemplate } from './color-map-template';
|
|
|
8
8
|
import { createInteractionStylesFromTemplate } from './interaction-codegen';
|
|
9
9
|
|
|
10
10
|
const colorMapOutputFolder = join(__dirname, '../', 'src', 'internal');
|
|
11
|
-
const colorTokensDependencyPath =
|
|
12
|
-
'../../tokens/src/artifacts/tokens-raw/atlassian-light'
|
|
13
|
-
);
|
|
11
|
+
const colorTokensDependencyPath =
|
|
12
|
+
require.resolve('../../tokens/src/artifacts/tokens-raw/atlassian-light');
|
|
14
13
|
|
|
15
14
|
writeFile(
|
|
16
15
|
join(colorMapOutputFolder, 'color-map.tsx'),
|
package/scripts/utils.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
|
|
3
|
-
export const tokenToStyle
|
|
3
|
+
export const tokenToStyle: (
|
|
4
4
|
prop: keyof CSSProperties,
|
|
5
5
|
token: string,
|
|
6
6
|
fallback: string | ShadowDefintion,
|
|
7
|
-
) => {
|
|
7
|
+
) => string = (prop: keyof CSSProperties, token: string, fallback: string | ShadowDefintion) => {
|
|
8
8
|
if (Array.isArray(fallback)) {
|
|
9
9
|
fallback = constructShadow(fallback);
|
|
10
10
|
}
|
|
@@ -29,23 +29,26 @@ const constructShadow = (shadowObject: ShadowDefintion) => {
|
|
|
29
29
|
|
|
30
30
|
type BooleanCallback<T> = (args: T) => boolean;
|
|
31
31
|
|
|
32
|
-
export const compose =
|
|
32
|
+
export const compose: (...fns: ((...any: any[]) => any)[]) => (x: any) => any =
|
|
33
33
|
(...fns: ((...any: any[]) => any)[]) =>
|
|
34
34
|
(x: any): any =>
|
|
35
35
|
fns.reduce((res, fn) => fn(res), x);
|
|
36
|
-
export const pick =
|
|
36
|
+
export const pick: <T extends any>(key: keyof T) => (obj: T) => T[keyof T] =
|
|
37
37
|
<T extends any>(key: keyof T) =>
|
|
38
38
|
(obj: T) =>
|
|
39
39
|
obj[key];
|
|
40
|
-
export const isAccent = (str: string): boolean => str.includes('accent');
|
|
41
|
-
export const isPressed = (str: string): boolean =>
|
|
42
|
-
|
|
43
|
-
export const
|
|
40
|
+
export const isAccent: (str: string) => boolean = (str: string): boolean => str.includes('accent');
|
|
41
|
+
export const isPressed: (str: string) => boolean = (str: string): boolean =>
|
|
42
|
+
str.includes('pressed');
|
|
43
|
+
export const isHovered: (str: string) => boolean = (str: string): boolean =>
|
|
44
|
+
str.includes('hovered');
|
|
45
|
+
export const not: <T extends any>(cb: BooleanCallback<T>) => (val: T) => boolean =
|
|
44
46
|
<T extends any>(cb: BooleanCallback<T>) =>
|
|
45
47
|
(val: T): boolean =>
|
|
46
48
|
!cb(val);
|
|
47
|
-
export const or =
|
|
49
|
+
export const or: <T extends any>(...fns: BooleanCallback<T>[]) => (val: T) => boolean =
|
|
48
50
|
<T extends any>(...fns: BooleanCallback<T>[]) =>
|
|
49
51
|
(val: T): boolean =>
|
|
50
52
|
fns.some((fn) => fn(val));
|
|
51
|
-
export const capitalize
|
|
53
|
+
export const capitalize: (str: string) => string = (str: string): string =>
|
|
54
|
+
str.charAt(0).toUpperCase() + str.slice(1);
|