@workday/canvas-kit-react 8.0.0-alpha.203-next.3 → 8.0.0-alpha.204-next.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/dist/commonjs/modal/lib/ModalCard.d.ts.map +1 -1
- package/dist/commonjs/modal/lib/ModalCard.js +2 -1
- package/dist/commonjs/modal/lib/ModalHeading.d.ts.map +1 -1
- package/dist/commonjs/modal/lib/ModalHeading.js +11 -1
- package/dist/es6/modal/lib/ModalCard.d.ts.map +1 -1
- package/dist/es6/modal/lib/ModalCard.js +2 -1
- package/dist/es6/modal/lib/ModalHeading.d.ts.map +1 -1
- package/dist/es6/modal/lib/ModalHeading.js +12 -2
- package/modal/lib/ModalCard.tsx +2 -1
- package/modal/lib/ModalHeading.tsx +14 -2
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalCard.d.ts","sourceRoot":"","sources":["../../../../modal/lib/ModalCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAItD,MAAM,WAAW,cAAe,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC;CAAG;
|
|
1
|
+
{"version":3,"file":"ModalCard.d.ts","sourceRoot":"","sources":["../../../../modal/lib/ModalCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAItD,MAAM,WAAW,cAAe,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC;CAAG;AAYjF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;EAMpB,CAAC"}
|
|
@@ -45,7 +45,8 @@ var ResponsiveModalCard = common_1.styled(popup_1.Popup.Card)(function (_a) {
|
|
|
45
45
|
},
|
|
46
46
|
_b[theme.canvas.breakpoints.down('s')] = {
|
|
47
47
|
margin: "0 0 " + tokens_1.space.xl,
|
|
48
|
-
padding: tokens_1.space.
|
|
48
|
+
padding: tokens_1.space.s,
|
|
49
|
+
borderRadius: tokens_1.space.m,
|
|
49
50
|
},
|
|
50
51
|
_b);
|
|
51
52
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalHeading.d.ts","sourceRoot":"","sources":["../../../../modal/lib/ModalHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,
|
|
1
|
+
{"version":3,"file":"ModalHeading.d.ts","sourceRoot":"","sources":["../../../../modal/lib/ModalHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAKtD,MAAM,WAAW,iBAAkB,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC;CAAG;AAQvF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;EAMvB,CAAC"}
|
|
@@ -34,11 +34,21 @@ exports.ModalHeading = void 0;
|
|
|
34
34
|
var React = __importStar(require("react"));
|
|
35
35
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
36
36
|
var popup_1 = require("@workday/canvas-kit-react/popup");
|
|
37
|
+
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
37
38
|
var hooks_1 = require("./hooks");
|
|
39
|
+
var ResponsiveModalHeading = common_1.styled(popup_1.Popup.Heading)(function (_a) {
|
|
40
|
+
var _b;
|
|
41
|
+
var theme = _a.theme;
|
|
42
|
+
return (_b = {},
|
|
43
|
+
_b[theme.canvas.breakpoints.down('s')] = {
|
|
44
|
+
marginBottom: tokens_1.space.zero,
|
|
45
|
+
},
|
|
46
|
+
_b);
|
|
47
|
+
});
|
|
38
48
|
exports.ModalHeading = common_1.createSubcomponent('h2')({
|
|
39
49
|
displayName: 'Modal.Heading',
|
|
40
50
|
modelHook: hooks_1.useModalModel,
|
|
41
51
|
elemPropsHook: hooks_1.useModalHeading,
|
|
42
52
|
})(function (elemProps, Element) {
|
|
43
|
-
return React.createElement(
|
|
53
|
+
return React.createElement(ResponsiveModalHeading, __assign({ as: Element }, elemProps));
|
|
44
54
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalCard.d.ts","sourceRoot":"","sources":["../../../../modal/lib/ModalCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAItD,MAAM,WAAW,cAAe,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC;CAAG;
|
|
1
|
+
{"version":3,"file":"ModalCard.d.ts","sourceRoot":"","sources":["../../../../modal/lib/ModalCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAItD,MAAM,WAAW,cAAe,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC;CAAG;AAYjF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;EAMpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalHeading.d.ts","sourceRoot":"","sources":["../../../../modal/lib/ModalHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,
|
|
1
|
+
{"version":3,"file":"ModalHeading.d.ts","sourceRoot":"","sources":["../../../../modal/lib/ModalHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAKtD,MAAM,WAAW,iBAAkB,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC;CAAG;AAQvF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;EAMvB,CAAC"}
|
|
@@ -10,13 +10,23 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import * as React from 'react';
|
|
13
|
-
import { createSubcomponent } from '@workday/canvas-kit-react/common';
|
|
13
|
+
import { createSubcomponent, styled, } from '@workday/canvas-kit-react/common';
|
|
14
14
|
import { Popup } from '@workday/canvas-kit-react/popup';
|
|
15
|
+
import { space } from '@workday/canvas-kit-react/tokens';
|
|
15
16
|
import { useModalHeading, useModalModel } from './hooks';
|
|
17
|
+
var ResponsiveModalHeading = styled(Popup.Heading)(function (_a) {
|
|
18
|
+
var _b;
|
|
19
|
+
var theme = _a.theme;
|
|
20
|
+
return (_b = {},
|
|
21
|
+
_b[theme.canvas.breakpoints.down('s')] = {
|
|
22
|
+
marginBottom: space.zero,
|
|
23
|
+
},
|
|
24
|
+
_b);
|
|
25
|
+
});
|
|
16
26
|
export var ModalHeading = createSubcomponent('h2')({
|
|
17
27
|
displayName: 'Modal.Heading',
|
|
18
28
|
modelHook: useModalModel,
|
|
19
29
|
elemPropsHook: useModalHeading,
|
|
20
30
|
})(function (elemProps, Element) {
|
|
21
|
-
return React.createElement(
|
|
31
|
+
return React.createElement(ResponsiveModalHeading, __assign({ as: Element }, elemProps));
|
|
22
32
|
});
|
package/modal/lib/ModalCard.tsx
CHANGED
|
@@ -18,7 +18,8 @@ const ResponsiveModalCard = styled(Popup.Card)<ModalCardProps & StyledType>(({th
|
|
|
18
18
|
padding: space.l,
|
|
19
19
|
[theme.canvas.breakpoints.down('s')]: {
|
|
20
20
|
margin: `0 0 ${space.xl}`,
|
|
21
|
-
padding: space.
|
|
21
|
+
padding: space.s,
|
|
22
|
+
borderRadius: space.m, // matches mobile specs
|
|
22
23
|
},
|
|
23
24
|
}));
|
|
24
25
|
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
createSubcomponent,
|
|
5
|
+
ExtractProps,
|
|
6
|
+
styled,
|
|
7
|
+
StyledType,
|
|
8
|
+
} from '@workday/canvas-kit-react/common';
|
|
4
9
|
import {Popup} from '@workday/canvas-kit-react/popup';
|
|
10
|
+
import {space} from '@workday/canvas-kit-react/tokens';
|
|
5
11
|
|
|
6
12
|
import {useModalHeading, useModalModel} from './hooks';
|
|
7
13
|
|
|
8
14
|
export interface ModalHeadingProps extends ExtractProps<typeof Popup.Heading, never> {}
|
|
9
15
|
|
|
16
|
+
const ResponsiveModalHeading = styled(Popup.Heading)<ModalHeadingProps & StyledType>(({theme}) => ({
|
|
17
|
+
[theme.canvas.breakpoints.down('s')]: {
|
|
18
|
+
marginBottom: space.zero,
|
|
19
|
+
},
|
|
20
|
+
}));
|
|
21
|
+
|
|
10
22
|
export const ModalHeading = createSubcomponent('h2')({
|
|
11
23
|
displayName: 'Modal.Heading',
|
|
12
24
|
modelHook: useModalModel,
|
|
13
25
|
elemPropsHook: useModalHeading,
|
|
14
26
|
})<ModalHeadingProps>((elemProps, Element) => {
|
|
15
|
-
return <
|
|
27
|
+
return <ResponsiveModalHeading as={Element} {...elemProps} />;
|
|
16
28
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.204-next.4+87a19905",
|
|
4
4
|
"description": "The parent module that contains all Workday Canvas Kit React components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@emotion/styled": "^11.6.0",
|
|
50
50
|
"@popperjs/core": "^2.5.4",
|
|
51
51
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
52
|
-
"@workday/canvas-kit-popup-stack": "^8.0.0-alpha.
|
|
52
|
+
"@workday/canvas-kit-popup-stack": "^8.0.0-alpha.204-next.4+87a19905",
|
|
53
53
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
54
54
|
"@workday/design-assets-types": "^0.2.8",
|
|
55
55
|
"chroma-js": "^2.1.0",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
68
68
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "87a19905dbc3451603468e413e77408da56bf836"
|
|
71
71
|
}
|