@workday/canvas-kit-labs-react 8.0.0-alpha.166-next.1 → 8.0.0-alpha.170-next.3
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/dist/commonjs/expandable/lib/ExpandableAvatar.d.ts.map +1 -1
- package/dist/commonjs/expandable/lib/ExpandableAvatar.js +10 -6
- package/dist/es6/expandable/lib/ExpandableAvatar.d.ts.map +1 -1
- package/dist/es6/expandable/lib/ExpandableAvatar.js +7 -6
- package/expandable/lib/ExpandableAvatar.tsx +5 -6
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableAvatar.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableAvatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExpandableAvatar.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAqB,MAAM,kCAAkC,CAAC;AACnG,OAAO,EAAC,MAAM,EAAC,MAAM,kCAAkC,CAAC;AAGxD,MAAM,WAAW,qBACf,SAAQ,IAAI,CACV,YAAY,CAAC,OAAO,MAAM,EAAE,KAAK,CAAC,EAClC,MAAM,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CACpD;CAAG;AAUN,eAAO,MAAM,gBAAgB,8FAK3B,CAAC"}
|
|
@@ -21,11 +21,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
}
|
|
22
22
|
return t;
|
|
23
23
|
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
24
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
28
|
exports.ExpandableAvatar = void 0;
|
|
26
|
-
|
|
27
|
-
/** @jsx jsx */
|
|
28
|
-
var react_1 = require("@emotion/react");
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
29
30
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
30
31
|
var avatar_1 = require("@workday/canvas-kit-react/avatar");
|
|
31
32
|
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
@@ -33,10 +34,13 @@ var StyledAvatar = common_1.styled(avatar_1.Avatar)({
|
|
|
33
34
|
marginRight: tokens_1.space.xxs,
|
|
34
35
|
flexShrink: 0,
|
|
35
36
|
});
|
|
37
|
+
// When the component is created, it needs to be a button element to match AvatarProps.
|
|
38
|
+
// Once Avatar becomes a `createComponent` we can default the element type to a `div`
|
|
39
|
+
// and the types should be properly extracted
|
|
36
40
|
exports.ExpandableAvatar = common_1.createComponent('button')({
|
|
37
41
|
displayName: 'Expandable.Avatar',
|
|
38
|
-
Component: function (_a, ref
|
|
39
|
-
var elemProps = __rest(_a, []);
|
|
40
|
-
return react_1.
|
|
42
|
+
Component: function (_a, ref) {
|
|
43
|
+
var altText = _a.altText, elemProps = __rest(_a, ["altText"]);
|
|
44
|
+
return react_1.default.createElement(StyledAvatar, __assign({ altText: undefined, as: "div", ref: ref, size: 32 }, elemProps));
|
|
41
45
|
},
|
|
42
46
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableAvatar.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableAvatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExpandableAvatar.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAqB,MAAM,kCAAkC,CAAC;AACnG,OAAO,EAAC,MAAM,EAAC,MAAM,kCAAkC,CAAC;AAGxD,MAAM,WAAW,qBACf,SAAQ,IAAI,CACV,YAAY,CAAC,OAAO,MAAM,EAAE,KAAK,CAAC,EAClC,MAAM,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CACpD;CAAG;AAUN,eAAO,MAAM,gBAAgB,8FAK3B,CAAC"}
|
|
@@ -20,9 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
|
|
24
|
-
/** @jsx jsx */
|
|
25
|
-
import { jsx } from '@emotion/react';
|
|
23
|
+
import React from 'react';
|
|
26
24
|
import { createComponent, styled } from '@workday/canvas-kit-react/common';
|
|
27
25
|
import { Avatar } from '@workday/canvas-kit-react/avatar';
|
|
28
26
|
import { space } from '@workday/canvas-kit-react/tokens';
|
|
@@ -30,10 +28,13 @@ var StyledAvatar = styled(Avatar)({
|
|
|
30
28
|
marginRight: space.xxs,
|
|
31
29
|
flexShrink: 0,
|
|
32
30
|
});
|
|
31
|
+
// When the component is created, it needs to be a button element to match AvatarProps.
|
|
32
|
+
// Once Avatar becomes a `createComponent` we can default the element type to a `div`
|
|
33
|
+
// and the types should be properly extracted
|
|
33
34
|
export var ExpandableAvatar = createComponent('button')({
|
|
34
35
|
displayName: 'Expandable.Avatar',
|
|
35
|
-
Component: function (_a, ref
|
|
36
|
-
var elemProps = __rest(_a, []);
|
|
37
|
-
return
|
|
36
|
+
Component: function (_a, ref) {
|
|
37
|
+
var altText = _a.altText, elemProps = __rest(_a, ["altText"]);
|
|
38
|
+
return React.createElement(StyledAvatar, __assign({ altText: undefined, as: "div", ref: ref, size: 32 }, elemProps));
|
|
38
39
|
},
|
|
39
40
|
});
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/** @jsxRuntime classic */
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
import {jsx} from '@emotion/react';
|
|
4
|
-
|
|
5
1
|
import React from 'react';
|
|
6
2
|
|
|
7
3
|
import {createComponent, ExtractProps, styled, StyledType} from '@workday/canvas-kit-react/common';
|
|
@@ -19,9 +15,12 @@ const StyledAvatar = styled(Avatar)<StyledType>({
|
|
|
19
15
|
flexShrink: 0,
|
|
20
16
|
});
|
|
21
17
|
|
|
18
|
+
// When the component is created, it needs to be a button element to match AvatarProps.
|
|
19
|
+
// Once Avatar becomes a `createComponent` we can default the element type to a `div`
|
|
20
|
+
// and the types should be properly extracted
|
|
22
21
|
export const ExpandableAvatar = createComponent('button')({
|
|
23
22
|
displayName: 'Expandable.Avatar',
|
|
24
|
-
Component: ({...elemProps}: ExpandableAvatarProps, ref
|
|
25
|
-
return <StyledAvatar altText={undefined} as=
|
|
23
|
+
Component: ({altText, ...elemProps}: ExpandableAvatarProps, ref) => {
|
|
24
|
+
return <StyledAvatar altText={undefined} as="div" ref={ref} size={32} {...elemProps} />;
|
|
26
25
|
},
|
|
27
26
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-labs-react",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.170-next.3+5a6d1f8b",
|
|
4
4
|
"description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@emotion/react": "^11.7.1",
|
|
48
48
|
"@emotion/styled": "^11.6.0",
|
|
49
|
-
"@workday/canvas-kit-react": "^8.0.0-alpha.
|
|
49
|
+
"@workday/canvas-kit-react": "^8.0.0-alpha.170-next.3+5a6d1f8b",
|
|
50
50
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
51
51
|
"@workday/design-assets-types": "^0.2.8",
|
|
52
52
|
"chroma-js": "^2.1.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/lodash.flatten": "^4.4.6"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "5a6d1f8bce5cc7ec386c6e5f78ba8e87a3873592"
|
|
60
60
|
}
|