@workday/canvas-kit-react 7.0.0-alpha.0-next.5 → 7.0.0-alpha.0-next.6

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.
Files changed (52) hide show
  1. package/dist/commonjs/index.d.ts +0 -2
  2. package/dist/commonjs/index.d.ts.map +1 -1
  3. package/dist/commonjs/index.js +0 -2
  4. package/dist/es6/index.d.ts +0 -2
  5. package/dist/es6/index.d.ts.map +1 -1
  6. package/dist/es6/index.js +0 -2
  7. package/index.ts +0 -2
  8. package/package.json +5 -5
  9. package/ts3.5/dist/commonjs/index.d.ts +0 -2
  10. package/ts3.5/dist/es6/index.d.ts +0 -2
  11. package/cookie-banner/LICENSE +0 -51
  12. package/cookie-banner/README.md +0 -104
  13. package/cookie-banner/index.ts +0 -5
  14. package/cookie-banner/lib/CookieBanner.tsx +0 -152
  15. package/cookie-banner/package.json +0 -5
  16. package/dist/commonjs/cookie-banner/index.d.ts +0 -5
  17. package/dist/commonjs/cookie-banner/index.d.ts.map +0 -1
  18. package/dist/commonjs/cookie-banner/index.js +0 -20
  19. package/dist/commonjs/cookie-banner/lib/CookieBanner.d.ts +0 -48
  20. package/dist/commonjs/cookie-banner/lib/CookieBanner.d.ts.map +0 -1
  21. package/dist/commonjs/cookie-banner/lib/CookieBanner.js +0 -143
  22. package/dist/commonjs/page-header/index.d.ts +0 -5
  23. package/dist/commonjs/page-header/index.d.ts.map +0 -1
  24. package/dist/commonjs/page-header/index.js +0 -20
  25. package/dist/commonjs/page-header/lib/PageHeader.d.ts +0 -39
  26. package/dist/commonjs/page-header/lib/PageHeader.d.ts.map +0 -1
  27. package/dist/commonjs/page-header/lib/PageHeader.js +0 -142
  28. package/dist/es6/cookie-banner/index.d.ts +0 -5
  29. package/dist/es6/cookie-banner/index.d.ts.map +0 -1
  30. package/dist/es6/cookie-banner/index.js +0 -4
  31. package/dist/es6/cookie-banner/lib/CookieBanner.d.ts +0 -48
  32. package/dist/es6/cookie-banner/lib/CookieBanner.d.ts.map +0 -1
  33. package/dist/es6/cookie-banner/lib/CookieBanner.js +0 -119
  34. package/dist/es6/page-header/index.d.ts +0 -5
  35. package/dist/es6/page-header/index.d.ts.map +0 -1
  36. package/dist/es6/page-header/index.js +0 -4
  37. package/dist/es6/page-header/lib/PageHeader.d.ts +0 -39
  38. package/dist/es6/page-header/lib/PageHeader.d.ts.map +0 -1
  39. package/dist/es6/page-header/lib/PageHeader.js +0 -118
  40. package/page-header/LICENSE +0 -51
  41. package/page-header/README.md +0 -72
  42. package/page-header/index.ts +0 -5
  43. package/page-header/lib/PageHeader.tsx +0 -126
  44. package/page-header/package.json +0 -5
  45. package/ts3.5/dist/commonjs/cookie-banner/index.d.ts +0 -5
  46. package/ts3.5/dist/commonjs/cookie-banner/lib/CookieBanner.d.ts +0 -48
  47. package/ts3.5/dist/commonjs/page-header/index.d.ts +0 -5
  48. package/ts3.5/dist/commonjs/page-header/lib/PageHeader.d.ts +0 -39
  49. package/ts3.5/dist/es6/cookie-banner/index.d.ts +0 -5
  50. package/ts3.5/dist/es6/cookie-banner/lib/CookieBanner.d.ts +0 -48
  51. package/ts3.5/dist/es6/page-header/index.d.ts +0 -5
  52. package/ts3.5/dist/es6/page-header/lib/PageHeader.d.ts +0 -39
@@ -1,143 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
- var __assign = (this && this.__assign) || function () {
16
- __assign = Object.assign || function(t) {
17
- for (var s, i = 1, n = arguments.length; i < n; i++) {
18
- s = arguments[i];
19
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
20
- t[p] = s[p];
21
- }
22
- return t;
23
- };
24
- return __assign.apply(this, arguments);
25
- };
26
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
27
- if (k2 === undefined) k2 = k;
28
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
29
- }) : (function(o, m, k, k2) {
30
- if (k2 === undefined) k2 = k;
31
- o[k2] = m[k];
32
- }));
33
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
34
- Object.defineProperty(o, "default", { enumerable: true, value: v });
35
- }) : function(o, v) {
36
- o["default"] = v;
37
- });
38
- var __importStar = (this && this.__importStar) || function (mod) {
39
- if (mod && mod.__esModule) return mod;
40
- var result = {};
41
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
42
- __setModuleDefault(result, mod);
43
- return result;
44
- };
45
- var __rest = (this && this.__rest) || function (s, e) {
46
- var t = {};
47
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
- t[p] = s[p];
49
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
- t[p[i]] = s[p[i]];
53
- }
54
- return t;
55
- };
56
- var __importDefault = (this && this.__importDefault) || function (mod) {
57
- return (mod && mod.__esModule) ? mod : { "default": mod };
58
- };
59
- Object.defineProperty(exports, "__esModule", { value: true });
60
- /* @jsxRuntime classic */
61
- /** @jsx jsx */
62
- var react_1 = require("@emotion/react");
63
- var React = __importStar(require("react"));
64
- var styled_1 = __importDefault(require("@emotion/styled"));
65
- var tokens_1 = require("@workday/canvas-kit-react/tokens");
66
- var button_1 = require("@workday/canvas-kit-react/button");
67
- var Banner = styled_1.default('div')(tokens_1.type.levels.subtext.medium, {
68
- backgroundColor: tokens_1.commonColors.background,
69
- borderTop: "1px solid " + tokens_1.colors.soap400,
70
- display: 'flex',
71
- padding: tokens_1.space.m,
72
- alignItems: 'center',
73
- justifyContent: 'space-between',
74
- position: 'fixed',
75
- bottom: 0,
76
- left: 0,
77
- right: 0,
78
- zIndex: 99,
79
- transition: 'transform 0.2s ease-out',
80
- '@media (max-width: 450px)': {
81
- flexDirection: 'column',
82
- alignItems: 'stretch',
83
- textAlign: 'center',
84
- padding: tokens_1.space.s + " 0",
85
- },
86
- }, function (_a) {
87
- var isClosed = _a.isClosed;
88
- return isClosed ? { transform: 'translateY(100%)' } : null;
89
- });
90
- var BannerItem = styled_1.default('div')({
91
- marginLeft: tokens_1.space.s,
92
- marginRight: tokens_1.space.s,
93
- '@media (max-width: 450px)': {
94
- '&:not(:first-of-type)': {
95
- marginTop: tokens_1.space.s,
96
- },
97
- },
98
- });
99
- var rowStyle = react_1.css({
100
- display: 'flex',
101
- });
102
- var cookieSettingsStyles = react_1.css({
103
- marginRight: tokens_1.space.s,
104
- border: 0,
105
- fontWeight: 500,
106
- whiteSpace: 'nowrap',
107
- cursor: 'pointer',
108
- padding: 0,
109
- height: '0%',
110
- alignSelf: 'center',
111
- backgroundColor: 'transparent',
112
- });
113
- var CookieSettings = function (props) {
114
- return react_1.jsx(button_1.Hyperlink, __assign({ as: "button", css: cookieSettingsStyles }, props));
115
- };
116
- /**
117
- * ### Deprecated Cookie Banner
118
- *
119
- * As of Canvas Kit v6, this component is being soft-deprecated.
120
- * It will be hard-deprecated (completely removed) in v7. Please see the
121
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
122
- * for more information.
123
- */
124
- var DeprecatedCookieBanner = /** @class */ (function (_super) {
125
- __extends(DeprecatedCookieBanner, _super);
126
- function DeprecatedCookieBanner() {
127
- return _super !== null && _super.apply(this, arguments) || this;
128
- }
129
- DeprecatedCookieBanner.prototype.componentDidMount = function () {
130
- console.warn("This component is being deprecated and will be removed in Canvas Kit V7.\n\n For more information, please see the V6 migration guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page\n ");
131
- };
132
- DeprecatedCookieBanner.prototype.render = function () {
133
- var _a = this.props, _b = _a.notice, notice = _b === void 0 ? DeprecatedCookieBanner.DefaultNotice : _b, _c = _a.settingsLabel, settingsLabel = _c === void 0 ? 'Cookie Settings' : _c, isClosed = _a.isClosed, onAccept = _a.onAccept, onClickSettings = _a.onClickSettings, elemProps = __rest(_a, ["notice", "settingsLabel", "isClosed", "onAccept", "onClickSettings"]);
134
- return (react_1.jsx(Banner, __assign({ isClosed: isClosed }, elemProps),
135
- react_1.jsx(BannerItem, null, notice),
136
- react_1.jsx(BannerItem, { css: rowStyle },
137
- onClickSettings && (react_1.jsx(CookieSettings, { onClick: onClickSettings }, settingsLabel)),
138
- react_1.jsx(button_1.PrimaryButton, { onClick: onAccept, grow: true }, "Continue"))));
139
- };
140
- DeprecatedCookieBanner.DefaultNotice = 'We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we’ll assume that you are willing to receive cookies.';
141
- return DeprecatedCookieBanner;
142
- }(React.Component));
143
- exports.default = DeprecatedCookieBanner;
@@ -1,5 +0,0 @@
1
- import DeprecatedPageHeader from './lib/PageHeader';
2
- export default DeprecatedPageHeader;
3
- export { DeprecatedPageHeader };
4
- export * from './lib/PageHeader';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../page-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,kBAAkB,CAAC;AAEpD,eAAe,oBAAoB,CAAC;AACpC,OAAO,EAAC,oBAAoB,EAAC,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- var __importDefault = (this && this.__importDefault) || function (mod) {
13
- return (mod && mod.__esModule) ? mod : { "default": mod };
14
- };
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.DeprecatedPageHeader = void 0;
17
- var PageHeader_1 = __importDefault(require("./lib/PageHeader"));
18
- exports.DeprecatedPageHeader = PageHeader_1.default;
19
- exports.default = PageHeader_1.default;
20
- __exportStar(require("./lib/PageHeader"), exports);
@@ -1,39 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * ### Deprecated Page Header Props
4
- *
5
- * As of Canvas Kit v6, PageHeader is being soft-deprecated.
6
- * It will be hard-deprecated (completely removed) in v7. Please see the
7
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
8
- * for more information.
9
- */
10
- export interface DeprecatedPageHeaderProps {
11
- /**
12
- * The text of the PageHeader title.
13
- */
14
- title: string;
15
- /**
16
- * If true, center the PageHeader content and make the PageHeader responsive in all three breakpoints. Enable this for PageHeaders in non-product pages.
17
- * @default false
18
- */
19
- capWidth?: boolean;
20
- /**
21
- * The breakpoint (in `px`) at which the PageHeader's container spacing increases from size `s` to size `xl`.
22
- * @default 768
23
- */
24
- breakpoint?: number;
25
- }
26
- /**
27
- * ### Deprecated Page Header
28
- *
29
- * As of Canvas Kit v6, this component is being soft-deprecated.
30
- * It will be hard-deprecated (completely removed) in v7. Please see the
31
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
32
- * for more information.
33
- */
34
- export default class DeprecatedPageHeader extends React.Component<DeprecatedPageHeaderProps> {
35
- componentDidMount(): void;
36
- private renderChildren;
37
- render(): JSX.Element;
38
- }
39
- //# sourceMappingURL=PageHeader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../../page-header/lib/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAkDD;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,KAAK,CAAC,SAAS,CAAC,yBAAyB,CAAC;IAC1F,iBAAiB;IASjB,OAAO,CAAC,cAAc;IAgBf,MAAM;CAad"}
@@ -1,142 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
- var __assign = (this && this.__assign) || function () {
16
- __assign = Object.assign || function(t) {
17
- for (var s, i = 1, n = arguments.length; i < n; i++) {
18
- s = arguments[i];
19
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
20
- t[p] = s[p];
21
- }
22
- return t;
23
- };
24
- return __assign.apply(this, arguments);
25
- };
26
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
27
- if (k2 === undefined) k2 = k;
28
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
29
- }) : (function(o, m, k, k2) {
30
- if (k2 === undefined) k2 = k;
31
- o[k2] = m[k];
32
- }));
33
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
34
- Object.defineProperty(o, "default", { enumerable: true, value: v });
35
- }) : function(o, v) {
36
- o["default"] = v;
37
- });
38
- var __importStar = (this && this.__importStar) || function (mod) {
39
- if (mod && mod.__esModule) return mod;
40
- var result = {};
41
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
42
- __setModuleDefault(result, mod);
43
- return result;
44
- };
45
- var __rest = (this && this.__rest) || function (s, e) {
46
- var t = {};
47
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
- t[p] = s[p];
49
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
- t[p[i]] = s[p[i]];
53
- }
54
- return t;
55
- };
56
- var __importDefault = (this && this.__importDefault) || function (mod) {
57
- return (mod && mod.__esModule) ? mod : { "default": mod };
58
- };
59
- Object.defineProperty(exports, "__esModule", { value: true });
60
- var React = __importStar(require("react"));
61
- var styled_1 = __importDefault(require("@emotion/styled"));
62
- var tokens_1 = require("@workday/canvas-kit-react/tokens");
63
- var button_1 = require("@workday/canvas-kit-react/button");
64
- var Header = styled_1.default('header')({
65
- height: 84,
66
- backgroundImage: tokens_1.gradients.blueberry,
67
- color: tokens_1.colors.frenchVanilla100,
68
- WebkitFontSmoothing: 'antialiased',
69
- MozOsxFontSmoothing: 'grayscale',
70
- });
71
- var Container = styled_1.default('div')({
72
- display: 'flex',
73
- alignItems: 'center',
74
- justifyContent: 'space-between',
75
- height: '100%',
76
- overflow: 'hidden',
77
- padding: "0 " + tokens_1.space.s,
78
- }, function (_a) {
79
- var _b;
80
- var breakpoint = _a.breakpoint;
81
- return (_b = {},
82
- _b["@media (min-width: " + breakpoint + "px)"] = {
83
- padding: "0 " + tokens_1.space.xl,
84
- },
85
- _b);
86
- }, function (_a) {
87
- var capWidth = _a.capWidth;
88
- return capWidth && {
89
- boxSizing: 'border-box',
90
- margin: '0 auto',
91
- width: '100%',
92
- maxWidth: 1440,
93
- };
94
- });
95
- var Title = styled_1.default('h2')(__assign(__assign({}, tokens_1.type.levels.heading.medium), { color: tokens_1.colors.frenchVanilla100, padding: tokens_1.space.xs + " 0", margin: 0, whiteSpace: 'nowrap' }));
96
- var IconList = styled_1.default('div')({
97
- display: 'flex',
98
- marginLeft: tokens_1.space.l,
99
- '> *:not(:last-child)': {
100
- marginRight: tokens_1.space.xxs,
101
- },
102
- });
103
- /**
104
- * ### Deprecated Page Header
105
- *
106
- * As of Canvas Kit v6, this component is being soft-deprecated.
107
- * It will be hard-deprecated (completely removed) in v7. Please see the
108
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
109
- * for more information.
110
- */
111
- var DeprecatedPageHeader = /** @class */ (function (_super) {
112
- __extends(DeprecatedPageHeader, _super);
113
- function DeprecatedPageHeader() {
114
- return _super !== null && _super.apply(this, arguments) || this;
115
- }
116
- DeprecatedPageHeader.prototype.componentDidMount = function () {
117
- console.warn("This component is being deprecated and will be removed in Canvas Kit V7.\n\n For more information, please see the V6 migration guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page\n ");
118
- };
119
- DeprecatedPageHeader.prototype.renderChildren = function (children) {
120
- return React.Children.map(children, function (child) {
121
- if (!React.isValidElement(child)) {
122
- return child;
123
- }
124
- if (child.type === button_1.IconButton) {
125
- return React.cloneElement(child, {
126
- variant: 'inverse',
127
- });
128
- }
129
- return child;
130
- });
131
- };
132
- DeprecatedPageHeader.prototype.render = function () {
133
- // TODO: Standardize on prop spread location (see #150)
134
- var _a = this.props, _b = _a.title, title = _b === void 0 ? '' : _b, _c = _a.breakpoint, breakpoint = _c === void 0 ? 768 : _c, _d = _a.capWidth, capWidth = _d === void 0 ? false : _d, children = _a.children, elemProps = __rest(_a, ["title", "breakpoint", "capWidth", "children"]);
135
- return (React.createElement(Header, null,
136
- React.createElement(Container, __assign({ breakpoint: breakpoint, capWidth: capWidth }, elemProps),
137
- React.createElement(Title, null, title),
138
- React.createElement(IconList, null, this.renderChildren(children)))));
139
- };
140
- return DeprecatedPageHeader;
141
- }(React.Component));
142
- exports.default = DeprecatedPageHeader;
@@ -1,5 +0,0 @@
1
- import DeprecatedCookieBanner from './lib/CookieBanner';
2
- export default DeprecatedCookieBanner;
3
- export { DeprecatedCookieBanner };
4
- export * from './lib/CookieBanner';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../cookie-banner/index.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,oBAAoB,CAAC;AAExD,eAAe,sBAAsB,CAAC;AACtC,OAAO,EAAC,sBAAsB,EAAC,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
@@ -1,4 +0,0 @@
1
- import DeprecatedCookieBanner from './lib/CookieBanner';
2
- export default DeprecatedCookieBanner;
3
- export { DeprecatedCookieBanner };
4
- export * from './lib/CookieBanner';
@@ -1,48 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * ### Deprecated Cookie Banner Props
4
- *
5
- * As of Canvas Kit v6, CookieBanner is being soft-deprecated.
6
- * It will be hard-deprecated (completely removed) in v7. Please see the
7
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
8
- * for more information.
9
- */
10
- export interface DeprecatedCookieBannerProps {
11
- /**
12
- * If true, set the CookieBanner to the closed state.
13
- * @default false
14
- */
15
- isClosed?: boolean;
16
- /**
17
- * The function called when cookies are accepted via the CookieBanner. This callback function should set `isClosed` to `true`.
18
- */
19
- onAccept: (e: React.MouseEvent<HTMLButtonElement>) => void;
20
- /**
21
- * The function called when the CookieBanner settings button is clicked. The settings button is automatically displayed if this callback function is provided.
22
- */
23
- onClickSettings?: (e: React.MouseEvent<HTMLButtonElement>) => void;
24
- /**
25
- * The notice text or element of the CookieBanner.
26
- * @default CookieBanner.DefaultNotice
27
- */
28
- notice?: string | React.ReactNode;
29
- /**
30
- * The text of the CookieBanner settings button.
31
- * @default 'Cookie Settings'
32
- */
33
- settingsLabel?: string;
34
- }
35
- /**
36
- * ### Deprecated Cookie Banner
37
- *
38
- * As of Canvas Kit v6, this component is being soft-deprecated.
39
- * It will be hard-deprecated (completely removed) in v7. Please see the
40
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
41
- * for more information.
42
- */
43
- export default class DeprecatedCookieBanner extends React.Component<DeprecatedCookieBannerProps> {
44
- componentDidMount(): void;
45
- static DefaultNotice: string;
46
- render(): React.ReactNode;
47
- }
48
- //# sourceMappingURL=CookieBanner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CookieBanner.d.ts","sourceRoot":"","sources":["../../../../cookie-banner/lib/CookieBanner.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;GAOG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAE3D;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAEnE;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAElC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA8DD;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,KAAK,CAAC,SAAS,CAAC,2BAA2B,CAAC;IAC9F,iBAAiB;IASjB,OAAc,aAAa,SAC6J;IAEjL,MAAM,IAAI,KAAK,CAAC,SAAS;CAwBjC"}
@@ -1,119 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
- var __assign = (this && this.__assign) || function () {
15
- __assign = Object.assign || function(t) {
16
- for (var s, i = 1, n = arguments.length; i < n; i++) {
17
- s = arguments[i];
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19
- t[p] = s[p];
20
- }
21
- return t;
22
- };
23
- return __assign.apply(this, arguments);
24
- };
25
- var __rest = (this && this.__rest) || function (s, e) {
26
- var t = {};
27
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
- t[p] = s[p];
29
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
- t[p[i]] = s[p[i]];
33
- }
34
- return t;
35
- };
36
- /* @jsxRuntime classic */
37
- /** @jsx jsx */
38
- import { css, jsx } from '@emotion/react';
39
- import * as React from 'react';
40
- import styled from '@emotion/styled';
41
- import { colors, commonColors, type, space } from '@workday/canvas-kit-react/tokens';
42
- import { Hyperlink, PrimaryButton } from '@workday/canvas-kit-react/button';
43
- var Banner = styled('div')(type.levels.subtext.medium, {
44
- backgroundColor: commonColors.background,
45
- borderTop: "1px solid " + colors.soap400,
46
- display: 'flex',
47
- padding: space.m,
48
- alignItems: 'center',
49
- justifyContent: 'space-between',
50
- position: 'fixed',
51
- bottom: 0,
52
- left: 0,
53
- right: 0,
54
- zIndex: 99,
55
- transition: 'transform 0.2s ease-out',
56
- '@media (max-width: 450px)': {
57
- flexDirection: 'column',
58
- alignItems: 'stretch',
59
- textAlign: 'center',
60
- padding: space.s + " 0",
61
- },
62
- }, function (_a) {
63
- var isClosed = _a.isClosed;
64
- return isClosed ? { transform: 'translateY(100%)' } : null;
65
- });
66
- var BannerItem = styled('div')({
67
- marginLeft: space.s,
68
- marginRight: space.s,
69
- '@media (max-width: 450px)': {
70
- '&:not(:first-of-type)': {
71
- marginTop: space.s,
72
- },
73
- },
74
- });
75
- var rowStyle = css({
76
- display: 'flex',
77
- });
78
- var cookieSettingsStyles = css({
79
- marginRight: space.s,
80
- border: 0,
81
- fontWeight: 500,
82
- whiteSpace: 'nowrap',
83
- cursor: 'pointer',
84
- padding: 0,
85
- height: '0%',
86
- alignSelf: 'center',
87
- backgroundColor: 'transparent',
88
- });
89
- var CookieSettings = function (props) {
90
- return jsx(Hyperlink, __assign({ as: "button", css: cookieSettingsStyles }, props));
91
- };
92
- /**
93
- * ### Deprecated Cookie Banner
94
- *
95
- * As of Canvas Kit v6, this component is being soft-deprecated.
96
- * It will be hard-deprecated (completely removed) in v7. Please see the
97
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
98
- * for more information.
99
- */
100
- var DeprecatedCookieBanner = /** @class */ (function (_super) {
101
- __extends(DeprecatedCookieBanner, _super);
102
- function DeprecatedCookieBanner() {
103
- return _super !== null && _super.apply(this, arguments) || this;
104
- }
105
- DeprecatedCookieBanner.prototype.componentDidMount = function () {
106
- console.warn("This component is being deprecated and will be removed in Canvas Kit V7.\n\n For more information, please see the V6 migration guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page\n ");
107
- };
108
- DeprecatedCookieBanner.prototype.render = function () {
109
- var _a = this.props, _b = _a.notice, notice = _b === void 0 ? DeprecatedCookieBanner.DefaultNotice : _b, _c = _a.settingsLabel, settingsLabel = _c === void 0 ? 'Cookie Settings' : _c, isClosed = _a.isClosed, onAccept = _a.onAccept, onClickSettings = _a.onClickSettings, elemProps = __rest(_a, ["notice", "settingsLabel", "isClosed", "onAccept", "onClickSettings"]);
110
- return (jsx(Banner, __assign({ isClosed: isClosed }, elemProps),
111
- jsx(BannerItem, null, notice),
112
- jsx(BannerItem, { css: rowStyle },
113
- onClickSettings && (jsx(CookieSettings, { onClick: onClickSettings }, settingsLabel)),
114
- jsx(PrimaryButton, { onClick: onAccept, grow: true }, "Continue"))));
115
- };
116
- DeprecatedCookieBanner.DefaultNotice = 'We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we’ll assume that you are willing to receive cookies.';
117
- return DeprecatedCookieBanner;
118
- }(React.Component));
119
- export default DeprecatedCookieBanner;
@@ -1,5 +0,0 @@
1
- import DeprecatedPageHeader from './lib/PageHeader';
2
- export default DeprecatedPageHeader;
3
- export { DeprecatedPageHeader };
4
- export * from './lib/PageHeader';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../page-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,kBAAkB,CAAC;AAEpD,eAAe,oBAAoB,CAAC;AACpC,OAAO,EAAC,oBAAoB,EAAC,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
@@ -1,4 +0,0 @@
1
- import DeprecatedPageHeader from './lib/PageHeader';
2
- export default DeprecatedPageHeader;
3
- export { DeprecatedPageHeader };
4
- export * from './lib/PageHeader';
@@ -1,39 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * ### Deprecated Page Header Props
4
- *
5
- * As of Canvas Kit v6, PageHeader is being soft-deprecated.
6
- * It will be hard-deprecated (completely removed) in v7. Please see the
7
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
8
- * for more information.
9
- */
10
- export interface DeprecatedPageHeaderProps {
11
- /**
12
- * The text of the PageHeader title.
13
- */
14
- title: string;
15
- /**
16
- * If true, center the PageHeader content and make the PageHeader responsive in all three breakpoints. Enable this for PageHeaders in non-product pages.
17
- * @default false
18
- */
19
- capWidth?: boolean;
20
- /**
21
- * The breakpoint (in `px`) at which the PageHeader's container spacing increases from size `s` to size `xl`.
22
- * @default 768
23
- */
24
- breakpoint?: number;
25
- }
26
- /**
27
- * ### Deprecated Page Header
28
- *
29
- * As of Canvas Kit v6, this component is being soft-deprecated.
30
- * It will be hard-deprecated (completely removed) in v7. Please see the
31
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
32
- * for more information.
33
- */
34
- export default class DeprecatedPageHeader extends React.Component<DeprecatedPageHeaderProps> {
35
- componentDidMount(): void;
36
- private renderChildren;
37
- render(): JSX.Element;
38
- }
39
- //# sourceMappingURL=PageHeader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../../page-header/lib/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAkDD;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,KAAK,CAAC,SAAS,CAAC,yBAAyB,CAAC;IAC1F,iBAAiB;IASjB,OAAO,CAAC,cAAc;IAgBf,MAAM;CAad"}