@workday/canvas-kit-labs-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.
- package/dist/commonjs/index.d.ts +0 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +0 -1
- package/dist/es6/index.d.ts +0 -1
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +0 -1
- package/index.ts +0 -1
- package/package.json +4 -4
- package/ts3.5/dist/commonjs/index.d.ts +0 -1
- package/ts3.5/dist/es6/index.d.ts +0 -1
- package/dist/commonjs/header/index.d.ts +0 -9
- package/dist/commonjs/header/index.d.ts.map +0 -1
- package/dist/commonjs/header/index.js +0 -24
- package/dist/commonjs/header/lib/GlobalHeader.d.ts +0 -38
- package/dist/commonjs/header/lib/GlobalHeader.d.ts.map +0 -1
- package/dist/commonjs/header/lib/GlobalHeader.js +0 -86
- package/dist/commonjs/header/lib/Header.d.ts +0 -76
- package/dist/commonjs/header/lib/Header.d.ts.map +0 -1
- package/dist/commonjs/header/lib/Header.js +0 -333
- package/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts +0 -30
- package/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts.map +0 -1
- package/dist/commonjs/header/lib/parts/DubLogoTitle.js +0 -118
- package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts +0 -31
- package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts.map +0 -1
- package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.js +0 -137
- package/dist/commonjs/header/lib/parts/index.d.ts +0 -3
- package/dist/commonjs/header/lib/parts/index.d.ts.map +0 -1
- package/dist/commonjs/header/lib/parts/index.js +0 -7
- package/dist/commonjs/header/lib/shared/themes.d.ts +0 -43
- package/dist/commonjs/header/lib/shared/themes.d.ts.map +0 -1
- package/dist/commonjs/header/lib/shared/themes.js +0 -63
- package/dist/commonjs/header/lib/shared/types.d.ts +0 -15
- package/dist/commonjs/header/lib/shared/types.d.ts.map +0 -1
- package/dist/commonjs/header/lib/shared/types.js +0 -20
- package/dist/es6/header/index.d.ts +0 -9
- package/dist/es6/header/index.d.ts.map +0 -1
- package/dist/es6/header/index.js +0 -8
- package/dist/es6/header/lib/GlobalHeader.d.ts +0 -38
- package/dist/es6/header/lib/GlobalHeader.d.ts.map +0 -1
- package/dist/es6/header/lib/GlobalHeader.js +0 -62
- package/dist/es6/header/lib/Header.d.ts +0 -76
- package/dist/es6/header/lib/Header.d.ts.map +0 -1
- package/dist/es6/header/lib/Header.js +0 -309
- package/dist/es6/header/lib/parts/DubLogoTitle.d.ts +0 -30
- package/dist/es6/header/lib/parts/DubLogoTitle.d.ts.map +0 -1
- package/dist/es6/header/lib/parts/DubLogoTitle.js +0 -93
- package/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts +0 -31
- package/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts.map +0 -1
- package/dist/es6/header/lib/parts/WorkdayLogoTitle.js +0 -112
- package/dist/es6/header/lib/parts/index.d.ts +0 -3
- package/dist/es6/header/lib/parts/index.d.ts.map +0 -1
- package/dist/es6/header/lib/parts/index.js +0 -2
- package/dist/es6/header/lib/shared/themes.d.ts +0 -43
- package/dist/es6/header/lib/shared/themes.d.ts.map +0 -1
- package/dist/es6/header/lib/shared/themes.js +0 -57
- package/dist/es6/header/lib/shared/types.d.ts +0 -15
- package/dist/es6/header/lib/shared/types.d.ts.map +0 -1
- package/dist/es6/header/lib/shared/types.js +0 -17
- package/header/LICENSE +0 -51
- package/header/README.md +0 -359
- package/header/index.ts +0 -9
- package/header/lib/GlobalHeader.tsx +0 -73
- package/header/lib/Header.tsx +0 -429
- package/header/lib/parts/DubLogoTitle.tsx +0 -99
- package/header/lib/parts/WorkdayLogoTitle.tsx +0 -120
- package/header/lib/parts/index.ts +0 -2
- package/header/lib/shared/themes.tsx +0 -97
- package/header/lib/shared/types.tsx +0 -16
- package/header/package.json +0 -5
- package/ts3.5/dist/commonjs/header/index.d.ts +0 -9
- package/ts3.5/dist/commonjs/header/lib/GlobalHeader.d.ts +0 -38
- package/ts3.5/dist/commonjs/header/lib/Header.d.ts +0 -76
- package/ts3.5/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts +0 -30
- package/ts3.5/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts +0 -31
- package/ts3.5/dist/commonjs/header/lib/parts/index.d.ts +0 -3
- package/ts3.5/dist/commonjs/header/lib/shared/themes.d.ts +0 -43
- package/ts3.5/dist/commonjs/header/lib/shared/types.d.ts +0 -15
- package/ts3.5/dist/es6/header/index.d.ts +0 -9
- package/ts3.5/dist/es6/header/lib/GlobalHeader.d.ts +0 -38
- package/ts3.5/dist/es6/header/lib/Header.d.ts +0 -76
- package/ts3.5/dist/es6/header/lib/parts/DubLogoTitle.d.ts +0 -30
- package/ts3.5/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts +0 -31
- package/ts3.5/dist/es6/header/lib/parts/index.d.ts +0 -3
- package/ts3.5/dist/es6/header/lib/shared/themes.d.ts +0 -43
- package/ts3.5/dist/es6/header/lib/shared/types.d.ts +0 -15
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
import { colors, gradients, iconColors, depth, } from '@workday/canvas-kit-react/tokens';
|
|
3
|
-
import chroma from 'chroma-js';
|
|
4
|
-
import { DeprecatedHeaderTheme } from './types';
|
|
5
|
-
/**
|
|
6
|
-
* ### Deprecated Header Themes
|
|
7
|
-
*
|
|
8
|
-
* As of Canvas Kit v6, this theme object is being soft-deprecated along with the rest of the labs/header package.
|
|
9
|
-
* It will be hard-deprecated (completely removed) in v7. Please see the
|
|
10
|
-
* [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
|
|
11
|
-
* for more information.
|
|
12
|
-
*/
|
|
13
|
-
export var deprecatedHeaderThemes = (_a = {},
|
|
14
|
-
_a[DeprecatedHeaderTheme.White] = {
|
|
15
|
-
color: colors.blackPepper400,
|
|
16
|
-
background: colors.frenchVanilla100,
|
|
17
|
-
depth: depth['1'],
|
|
18
|
-
systemIcon: {
|
|
19
|
-
color: iconColors.standard,
|
|
20
|
-
colorHover: iconColors.hover,
|
|
21
|
-
},
|
|
22
|
-
linkColor: colors.blackPepper400,
|
|
23
|
-
linkFadeOutColor: colors.licorice200,
|
|
24
|
-
currentLinkColor: colors.blueberry500,
|
|
25
|
-
chipColor: colors.blueberry400,
|
|
26
|
-
},
|
|
27
|
-
_a[DeprecatedHeaderTheme.Blue] = {
|
|
28
|
-
color: colors.frenchVanilla100,
|
|
29
|
-
background: gradients.blueberry,
|
|
30
|
-
depth: depth['3'],
|
|
31
|
-
systemIcon: {
|
|
32
|
-
color: colors.frenchVanilla100,
|
|
33
|
-
colorHover: colors.blueberry200,
|
|
34
|
-
},
|
|
35
|
-
linkColor: colors.frenchVanilla100,
|
|
36
|
-
linkFadeOutColor: chroma(colors.frenchVanilla100)
|
|
37
|
-
.alpha(0.5)
|
|
38
|
-
.css(),
|
|
39
|
-
currentLinkColor: colors.frenchVanilla100,
|
|
40
|
-
chipColor: colors.frenchVanilla100,
|
|
41
|
-
},
|
|
42
|
-
_a[DeprecatedHeaderTheme.Transparent] = {
|
|
43
|
-
color: colors.frenchVanilla100,
|
|
44
|
-
background: 'transparent',
|
|
45
|
-
depth: { boxShadow: 'none' },
|
|
46
|
-
systemIcon: {
|
|
47
|
-
color: colors.frenchVanilla100,
|
|
48
|
-
colorHover: colors.blueberry200,
|
|
49
|
-
},
|
|
50
|
-
linkColor: colors.frenchVanilla100,
|
|
51
|
-
linkFadeOutColor: chroma(colors.frenchVanilla100)
|
|
52
|
-
.alpha(0.5)
|
|
53
|
-
.css(),
|
|
54
|
-
currentLinkColor: colors.frenchVanilla100,
|
|
55
|
-
chipColor: colors.frenchVanilla100,
|
|
56
|
-
},
|
|
57
|
-
_a);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare enum DeprecatedHeaderTheme {
|
|
2
|
-
White = 0,
|
|
3
|
-
Blue = 1,
|
|
4
|
-
Transparent = 2
|
|
5
|
-
}
|
|
6
|
-
export declare enum DeprecatedHeaderVariant {
|
|
7
|
-
Dub = 0,
|
|
8
|
-
Full = 1,
|
|
9
|
-
Global = 2
|
|
10
|
-
}
|
|
11
|
-
export declare enum DeprecatedHeaderHeight {
|
|
12
|
-
Small = "64px",
|
|
13
|
-
Large = "80px"
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../header/lib/shared/types.tsx"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC/B,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,WAAW,IAAA;CACZ;AAED,oBAAY,uBAAuB;IACjC,GAAG,IAAA;IACH,IAAI,IAAA;IACJ,MAAM,IAAA;CACP;AAED,oBAAY,sBAAsB;IAChC,KAAK,SAAS;IACd,KAAK,SAAS;CACf"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export var DeprecatedHeaderTheme;
|
|
2
|
-
(function (DeprecatedHeaderTheme) {
|
|
3
|
-
DeprecatedHeaderTheme[DeprecatedHeaderTheme["White"] = 0] = "White";
|
|
4
|
-
DeprecatedHeaderTheme[DeprecatedHeaderTheme["Blue"] = 1] = "Blue";
|
|
5
|
-
DeprecatedHeaderTheme[DeprecatedHeaderTheme["Transparent"] = 2] = "Transparent";
|
|
6
|
-
})(DeprecatedHeaderTheme || (DeprecatedHeaderTheme = {}));
|
|
7
|
-
export var DeprecatedHeaderVariant;
|
|
8
|
-
(function (DeprecatedHeaderVariant) {
|
|
9
|
-
DeprecatedHeaderVariant[DeprecatedHeaderVariant["Dub"] = 0] = "Dub";
|
|
10
|
-
DeprecatedHeaderVariant[DeprecatedHeaderVariant["Full"] = 1] = "Full";
|
|
11
|
-
DeprecatedHeaderVariant[DeprecatedHeaderVariant["Global"] = 2] = "Global";
|
|
12
|
-
})(DeprecatedHeaderVariant || (DeprecatedHeaderVariant = {}));
|
|
13
|
-
export var DeprecatedHeaderHeight;
|
|
14
|
-
(function (DeprecatedHeaderHeight) {
|
|
15
|
-
DeprecatedHeaderHeight["Small"] = "64px";
|
|
16
|
-
DeprecatedHeaderHeight["Large"] = "80px";
|
|
17
|
-
})(DeprecatedHeaderHeight || (DeprecatedHeaderHeight = {}));
|
package/header/LICENSE
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
Apache License, Version 2.0 Apache License Version 2.0, January 2004
|
|
2
|
-
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
9
|
-
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
10
|
-
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
11
|
-
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
12
|
-
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
13
|
-
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
14
|
-
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
15
|
-
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
16
|
-
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
17
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
18
|
-
|
|
19
|
-
2. Grant of Copyright License.
|
|
20
|
-
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
21
|
-
|
|
22
|
-
3. Grant of Patent License.
|
|
23
|
-
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
24
|
-
|
|
25
|
-
4. Redistribution.
|
|
26
|
-
You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
27
|
-
You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
28
|
-
|
|
29
|
-
5. Submission of Contributions.
|
|
30
|
-
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
31
|
-
|
|
32
|
-
6. Trademarks.
|
|
33
|
-
This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
34
|
-
|
|
35
|
-
7. Disclaimer of Warranty.
|
|
36
|
-
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
37
|
-
|
|
38
|
-
8. Limitation of Liability.
|
|
39
|
-
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
40
|
-
|
|
41
|
-
9. Accepting Warranty or Additional Liability.
|
|
42
|
-
While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
43
|
-
|
|
44
|
-
END OF TERMS AND CONDITIONS
|
|
45
|
-
|
|
46
|
-
©2020. Workday, Inc. All rights reserved. Workday and the Workday logo are registered trademarks of Workday, Inc. All other brand and product names are trademarks or registered trademarks of their respective holders.
|
|
47
|
-
|
|
48
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
|
49
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
50
|
-
|
|
51
|
-
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
package/header/README.md
DELETED
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
# Canvas Kit Labs React Header (Deprecated)
|
|
2
|
-
|
|
3
|
-
<a href="https://github.com/Workday/canvas-kit/tree/master/modules/labs-react/README.md">
|
|
4
|
-
<img src="https://img.shields.io/badge/LABS-alpha-orange" alt="LABS: Alpha" />
|
|
5
|
-
</a> This component is work in progress and currently in pre-release.
|
|
6
|
-
|
|
7
|
-
A set of components to create headers for various Workday applications and sites.
|
|
8
|
-
|
|
9
|
-
For a full suite of examples, have a look at the [Header Stories](./stories.tsx).
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
yarn add @workday/canvas-kit-labs-react
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
# Header
|
|
18
|
-
|
|
19
|
-
This component renders a responsive, Canvas-style header.
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
22
|
-
|
|
23
|
-
```tsx
|
|
24
|
-
import * as React from 'react';
|
|
25
|
-
import {DeprecatedHeader} from '@workday/canvas-kit-labs-react/header';
|
|
26
|
-
import {IconButton} from '@workday/canvas-kit-react/button';
|
|
27
|
-
import {Avatar} from '@workday/canvas-kit-react/avatar';
|
|
28
|
-
import {notificationsIcon} from '@workday/canvas-system-icons-web';
|
|
29
|
-
import {PrimaryButton} from '@workday/canvas-kit-react/button';
|
|
30
|
-
|
|
31
|
-
<DeprecatedHeader title="Header" brandUrl="#">
|
|
32
|
-
<nav>
|
|
33
|
-
<ul>
|
|
34
|
-
<li className="current">
|
|
35
|
-
<a href="#">Discover</a>
|
|
36
|
-
</li>
|
|
37
|
-
<li>
|
|
38
|
-
<a href="#">Library</a>
|
|
39
|
-
</li>
|
|
40
|
-
<li>
|
|
41
|
-
<a href="#">Create</a>
|
|
42
|
-
</li>
|
|
43
|
-
<li>
|
|
44
|
-
<a href="#">Manage</a>
|
|
45
|
-
</li>
|
|
46
|
-
</ul>
|
|
47
|
-
</nav>
|
|
48
|
-
<IconButton
|
|
49
|
-
icon={notificationsIcon}
|
|
50
|
-
variant="circle"
|
|
51
|
-
title="Notifications"
|
|
52
|
-
aria-label="Notifications"
|
|
53
|
-
/>
|
|
54
|
-
<Avatar
|
|
55
|
-
onClick={() => {
|
|
56
|
-
alert('clicked avatar');
|
|
57
|
-
}}
|
|
58
|
-
altText="Profile"
|
|
59
|
-
/>
|
|
60
|
-
<PrimaryButton>Sign Up</PrimaryButton>
|
|
61
|
-
</DeprecatedHeader>;
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Special Children
|
|
65
|
-
|
|
66
|
-
### `nav, ul, li`
|
|
67
|
-
|
|
68
|
-
> For a semantic navigation menu, this component will style a child `<nav>` element with an
|
|
69
|
-
> un-ordered list inside (`<ul>`). This list can contain any number of `<li>` elements with `<a>`
|
|
70
|
-
> elements. You can visually distinguish the link that your page is currently on by adding the class
|
|
71
|
-
> name: `"current"` to the `<li>` element containing the current page link.
|
|
72
|
-
|
|
73
|
-
### `SystemIcon`
|
|
74
|
-
|
|
75
|
-
_Deprecated (but supported) - please use `IconButton` instead._
|
|
76
|
-
|
|
77
|
-
> The Header supports Canvas `SystemIcon` components, but will convert them into an `IconButton`
|
|
78
|
-
> with the correct styling for the theme you've provided.
|
|
79
|
-
|
|
80
|
-
### A Note About `Buttons`
|
|
81
|
-
|
|
82
|
-
> Please use a `Primary` Canvas `Button` for this component's call-to-action buttons (see the
|
|
83
|
-
> [usage example](#usage) below).
|
|
84
|
-
|
|
85
|
-
## Static Properties
|
|
86
|
-
|
|
87
|
-
#### `Theme: DeprecatedHeaderTheme`
|
|
88
|
-
|
|
89
|
-
```tsx
|
|
90
|
-
<DeprecatedHeader title="Blue Header" themeColor={DeprecatedHeader.Theme.Blue} />
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
#### `Variant: DeprecatedHeaderVariant`
|
|
96
|
-
|
|
97
|
-
```tsx
|
|
98
|
-
<DeprecatedHeader title="Marketing Header" variant={DeprecatedHeader.Variant.Full} />
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Component Props
|
|
102
|
-
|
|
103
|
-
### Required
|
|
104
|
-
|
|
105
|
-
> None
|
|
106
|
-
|
|
107
|
-
### Optional
|
|
108
|
-
|
|
109
|
-
#### `title: string`
|
|
110
|
-
|
|
111
|
-
> The title displayed on the header next to the logo.
|
|
112
|
-
|
|
113
|
-
Default: `''`
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
#### `themeColor: DeprecatedHeaderTheme`
|
|
118
|
-
|
|
119
|
-
> The theme of the header (White, Blue, or Transparent).
|
|
120
|
-
|
|
121
|
-
| Theme | Description |
|
|
122
|
-
| ----------- | ------------------------------------------------------------------------------------------------ |
|
|
123
|
-
| White | White background with dark-colored text, blue system icons. |
|
|
124
|
-
| Blue | Dark blue gradient background with white text, white system icons. |
|
|
125
|
-
| Transparent | Transparent background (intended for dark-colored overlays) with white text, white system icons. |
|
|
126
|
-
|
|
127
|
-
Default: `DeprecatedHeaderTheme.White`
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
#### `variant: DeprecatedHeaderVariant`
|
|
132
|
-
|
|
133
|
-
> Specifies the variation of the header.
|
|
134
|
-
|
|
135
|
-
| Variant | Description |
|
|
136
|
-
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
137
|
-
| Dub | "Dub" headers have a singular "Dub" logo and a title, separated by a equivalent-height divider. It is shorter in height (64px) than the "Full" variant. |
|
|
138
|
-
| Full | "Full" headers have the full Workday logo and an optional title at minimum, separated by an equivalent-height divider (when a title is defined). It is taller in height (80px) than the "Dub" variant. |
|
|
139
|
-
|
|
140
|
-
Default: `DeprecatedHeaderVariant.Dub`
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
#### `brandUrl: string`
|
|
145
|
-
|
|
146
|
-
> The href attribute when clicking on the title logo. Default: `'#'`
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
#### `brand: React.ReactNode`
|
|
151
|
-
|
|
152
|
-
> If specified, this replaces the contents of the Dub logo and title. Used for replacing Dub + title
|
|
153
|
-
> with a `contained lockup` and/or for adding custon design elements next to the Dub + title lockup.
|
|
154
|
-
|
|
155
|
-
Default: `DeprecatedDubLogoTitle` (for "Dub" variants) or `DeprecatedWorkdayLogoTitle` (for "Full" variants)
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
#### `isCollapsed: boolean`
|
|
160
|
-
|
|
161
|
-
> Indicates whether the children in the header should be collapsed.
|
|
162
|
-
>
|
|
163
|
-
> - The `nav` element collapses into a hamburger icon menu. Any `IconButton` or `SystemIcon` will
|
|
164
|
-
> also collapse.
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
#### `onMenuClick: (React.MouseEvent) => void`
|
|
169
|
-
|
|
170
|
-
> A click handler for when the user clicks the mobile collapsed nav icon.
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
#### `centeredNav: boolean`
|
|
175
|
-
|
|
176
|
-
> When true, the header centers the nav in the middle of the header.
|
|
177
|
-
|
|
178
|
-
#### `leftSlot: React.ReactElement`
|
|
179
|
-
|
|
180
|
-
> A React element for the left of the header, this is typically a search bar component
|
|
181
|
-
|
|
182
|
-
# Global Header (Deprecated)
|
|
183
|
-
|
|
184
|
-
The Global Header (or App Header) is used for Workday applications.
|
|
185
|
-
|
|
186
|
-
## Usage
|
|
187
|
-
|
|
188
|
-
```tsx
|
|
189
|
-
import {Avatar} from '@workday/canvas-kit-react/avatar';
|
|
190
|
-
import {DeprecatedGlobalHeader, DeprecatedDubLogoTitle} from '@workday/canvas-kit-labs-react/header';
|
|
191
|
-
import {SearchForm} from '@workday/canvas-kit-labs-react/search-form';
|
|
192
|
-
import {Avatar} from '@workday/canvas-kit-react/avatar';
|
|
193
|
-
import {IconButton} from '@workday/canvas-kit-react/button';
|
|
194
|
-
import {notificationsIcon, inboxIcon} from '@workday/canvas-system-icons-web';
|
|
195
|
-
|
|
196
|
-
const HeaderBrand = () => <DeprecatedDubLogoTitle themeColor={Header.Theme.White} />
|
|
197
|
-
const HeaderAvatar = () => <Avatar onClick={handleMenuClick} url="https://my.cdn.amazonaws.com/assets/avatar_pic.png" />
|
|
198
|
-
const handleSearchSubmit = event => {
|
|
199
|
-
const query = (event.target as HTMLFormElement).getElementsByTagName('input')[0].value;
|
|
200
|
-
console.log("Submitted query: ", query)
|
|
201
|
-
}
|
|
202
|
-
const openMenu = e => console.log("Menu opened")
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* In this instance, the right-most child will be an Avatar component, when the DeprecatedGlobalHeader
|
|
206
|
-
* shrinks below the specified breakpoint (720 in this case), the children get replaced by a menuToggle.
|
|
207
|
-
* For most DeprecatedGlobalHeader implementations, the menuToggle is also the Avatar component.
|
|
208
|
-
*/
|
|
209
|
-
<DeprecatedGlobalHeader
|
|
210
|
-
brand={<HeaderBrand />}
|
|
211
|
-
menuToggle={<HeaderAvatar />}
|
|
212
|
-
onMenuClick={openMenu}
|
|
213
|
-
leftSlot={<SearchForm
|
|
214
|
-
isCollapsed={false}
|
|
215
|
-
grow={true}
|
|
216
|
-
onSubmit={handleSearchSubmit}
|
|
217
|
-
/>}
|
|
218
|
-
isCollapsed={false}
|
|
219
|
-
>
|
|
220
|
-
<IconButton icon={notificationsIcon} variant={IconButton.Variant.Circle} />
|
|
221
|
-
<IconButton icon={inboxIcon} variant={IconButton.Variant.Circle} />
|
|
222
|
-
<HeaderAvatar />
|
|
223
|
-
</DeprecatedGlobalHeader>
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
## Static Properties
|
|
227
|
-
|
|
228
|
-
> None
|
|
229
|
-
|
|
230
|
-
## Component Props
|
|
231
|
-
|
|
232
|
-
### Required
|
|
233
|
-
|
|
234
|
-
> None
|
|
235
|
-
|
|
236
|
-
### Optional
|
|
237
|
-
|
|
238
|
-
#### `brand: React.ReactNode`
|
|
239
|
-
|
|
240
|
-
> If specified, this replaces the contents of the Dub logo and title. Used for replacing Dub + title
|
|
241
|
-
> with a branded element and/or for adding custon design elements next to the Dub + title lockup.
|
|
242
|
-
|
|
243
|
-
Default: `<DeprecatedDubLogoTitle />`
|
|
244
|
-
|
|
245
|
-
#### `menuToggle: React.ReactNode`
|
|
246
|
-
|
|
247
|
-
> _Note: This `menuToggle` slot only appears when the screen size shrinks below the `breakpoint`._
|
|
248
|
-
>
|
|
249
|
-
> For most `DeprecatedGlobalHeader` implementations, this is generally the same as the users' `Avatar`. If not
|
|
250
|
-
> specified, `menuToggle` defaults to a "hamburger" menu icon or "justify" icon.
|
|
251
|
-
|
|
252
|
-
Default: `justifyIcon` from `@workday/canvas-system-icons-web`
|
|
253
|
-
|
|
254
|
-
#### `onMenuClick: (React.MouseEvent) => void`
|
|
255
|
-
|
|
256
|
-
> A click handler for when the user clicks the `menuToggle` element.
|
|
257
|
-
|
|
258
|
-
Default: `<DeprecatedDubLogoTitle />`
|
|
259
|
-
|
|
260
|
-
#### `leftSlot: React.ReactElement`
|
|
261
|
-
|
|
262
|
-
> A React element for the left of the header, this is typically a search bar component
|
|
263
|
-
|
|
264
|
-
#### `isCollapsed: boolean`
|
|
265
|
-
|
|
266
|
-
> If true, renders the header with the children collapsed.
|
|
267
|
-
|
|
268
|
-
# "Dub" Logo and Title
|
|
269
|
-
|
|
270
|
-
_Intended to be used in conjunction with the `DeprecatedHeader` component_
|
|
271
|
-
|
|
272
|
-
A component that encapsulates the 'Dub' logo and a title (we call this the contained lockup). This
|
|
273
|
-
is used whenever you want to override the contained lockup that comes default with a header, or if
|
|
274
|
-
you want to add more elements next to the title with custom components or markup, or change the
|
|
275
|
-
background color of the contained lockup
|
|
276
|
-
|
|
277
|
-
## Usage
|
|
278
|
-
|
|
279
|
-
```tsx
|
|
280
|
-
import {DeprecatedHeader, DeprecatedDubLogoTitle} from '@workday/canvas-kit-labs-react/header';
|
|
281
|
-
import {colors} from '@workday/canvas-kit-react/tokens';
|
|
282
|
-
|
|
283
|
-
<DeprecatedHeader
|
|
284
|
-
brand={<DeprecatedDubLogoTitle title="This title will show up instead" bgColor={colors.blueberry600} />}
|
|
285
|
-
/>;
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
## Static Properties
|
|
289
|
-
|
|
290
|
-
> None
|
|
291
|
-
|
|
292
|
-
## Component Props
|
|
293
|
-
|
|
294
|
-
### Required
|
|
295
|
-
|
|
296
|
-
#### `title: string`
|
|
297
|
-
|
|
298
|
-
> The title displayed on the header next to the logo.
|
|
299
|
-
|
|
300
|
-
Default: `''`
|
|
301
|
-
|
|
302
|
-
### Optional
|
|
303
|
-
|
|
304
|
-
#### `themeColor: DeprecatedHeaderTheme`
|
|
305
|
-
|
|
306
|
-
> The theme of the header (White, Blue, or Transparent).
|
|
307
|
-
|
|
308
|
-
Default: `DeprecatedHeaderTheme.White`
|
|
309
|
-
|
|
310
|
-
---
|
|
311
|
-
|
|
312
|
-
#### `bgColor: string`
|
|
313
|
-
|
|
314
|
-
> Sets the `background` CSS property for the contained lockup.
|
|
315
|
-
|
|
316
|
-
Default: `'none'`
|
|
317
|
-
|
|
318
|
-
# Workday Logo and Title
|
|
319
|
-
|
|
320
|
-
_Intended to be used in conjunction with the `DeprecatedHeader` component_
|
|
321
|
-
|
|
322
|
-
A component that contains the full Workday logo and a title. This is used whenever you want to
|
|
323
|
-
override the contained lockup that comes default with a header, or if you want to add more elements
|
|
324
|
-
next to the title with custom components or markup.
|
|
325
|
-
|
|
326
|
-
## Usage
|
|
327
|
-
|
|
328
|
-
```tsx
|
|
329
|
-
import {DeprecatedHeader, DeprecatedWorkdayLogoTitle} from '@workday/canvas-kit-labs-react/header';
|
|
330
|
-
|
|
331
|
-
<DeprecatedHeader brand={<DeprecatedWorkdayLogoTitle title="Display Title" />} />;
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
## Static Properties
|
|
335
|
-
|
|
336
|
-
> None
|
|
337
|
-
|
|
338
|
-
## Component Props
|
|
339
|
-
|
|
340
|
-
### Required
|
|
341
|
-
|
|
342
|
-
> None
|
|
343
|
-
|
|
344
|
-
### Optional
|
|
345
|
-
|
|
346
|
-
#### `themeColor: DeprecatedHeaderTheme`
|
|
347
|
-
|
|
348
|
-
> The theme of the header (White, Blue, or Transparent). See the
|
|
349
|
-
> [`themeColor`](#themecolor-headertheme) prop on the `DeprecatedHeader` component.
|
|
350
|
-
|
|
351
|
-
Default: `DeprecatedHeaderTheme.White`
|
|
352
|
-
|
|
353
|
-
---
|
|
354
|
-
|
|
355
|
-
#### `title: string`
|
|
356
|
-
|
|
357
|
-
> The title displayed on the header next to the logo.
|
|
358
|
-
|
|
359
|
-
Default `''`
|
package/header/index.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import DeprecatedHeader from './lib/Header';
|
|
2
|
-
import DeprecatedGlobalHeader from './lib/GlobalHeader';
|
|
3
|
-
|
|
4
|
-
export default DeprecatedHeader;
|
|
5
|
-
export {DeprecatedHeader};
|
|
6
|
-
export {DeprecatedGlobalHeader};
|
|
7
|
-
export * from './lib/parts';
|
|
8
|
-
export * from './lib/shared/themes';
|
|
9
|
-
export * from './lib/shared/types';
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import DeprecatedHeader from './Header';
|
|
3
|
-
import {DeprecatedHeaderVariant} from './shared/types';
|
|
4
|
-
import {DeprecatedDubLogoTitle} from './parts';
|
|
5
|
-
|
|
6
|
-
export interface GlobalHeaderProps {
|
|
7
|
-
/**
|
|
8
|
-
* The custom brand node of the GlobalHeader. This React node replaces the dub logo and title.
|
|
9
|
-
* @default DubLogoTitle
|
|
10
|
-
*/
|
|
11
|
-
brand?: React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* The custom menu toggle node of the GlobalHeader. This React node replaces the default menu toggle.
|
|
14
|
-
*/
|
|
15
|
-
menuToggle?: React.ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* The function called when the responsive menu icon is clicked.
|
|
18
|
-
*/
|
|
19
|
-
onMenuClick?: (e: React.MouseEvent) => void;
|
|
20
|
-
/**
|
|
21
|
-
* If true, render the GlobalHeader in collapsed mode.
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
isCollapsed?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* The React element to render in the left slot of the GlobalHeader. This is typically a SearchForm component.
|
|
27
|
-
*/
|
|
28
|
-
leftSlot?: React.ReactElement;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* ### Deprecated Global Header
|
|
33
|
-
*
|
|
34
|
-
* As of Canvas Kit v6, this component is being soft-deprecated.
|
|
35
|
-
* It will be hard-deprecated (completely removed) in v7. Please see the
|
|
36
|
-
* [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
|
|
37
|
-
* for more information.
|
|
38
|
-
*/
|
|
39
|
-
export default class DeprecatedGlobalHeader extends React.Component<GlobalHeaderProps> {
|
|
40
|
-
componentDidMount() {
|
|
41
|
-
console.warn(
|
|
42
|
-
`GlobalHeader is being deprecated and will be removed in Canvas Kit V7.\n
|
|
43
|
-
For more information, please see the V6 migration guide:\n
|
|
44
|
-
https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page
|
|
45
|
-
`
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
public render() {
|
|
50
|
-
const {
|
|
51
|
-
brand = <DeprecatedDubLogoTitle />,
|
|
52
|
-
menuToggle,
|
|
53
|
-
onMenuClick,
|
|
54
|
-
isCollapsed,
|
|
55
|
-
leftSlot,
|
|
56
|
-
children,
|
|
57
|
-
...elemProps
|
|
58
|
-
} = this.props;
|
|
59
|
-
return (
|
|
60
|
-
<DeprecatedHeader
|
|
61
|
-
brand={brand}
|
|
62
|
-
menuToggle={menuToggle}
|
|
63
|
-
leftSlot={leftSlot}
|
|
64
|
-
onMenuClick={onMenuClick}
|
|
65
|
-
variant={DeprecatedHeaderVariant.Global}
|
|
66
|
-
isCollapsed={isCollapsed}
|
|
67
|
-
{...elemProps}
|
|
68
|
-
>
|
|
69
|
-
{children}
|
|
70
|
-
</DeprecatedHeader>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
}
|