@carbon/ibm-products-web-components 0.0.1-canary.3564

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. package/.storybook/Preview.ts +161 -0
  2. package/.storybook/_container.scss +73 -0
  3. package/.storybook/container.ts +41 -0
  4. package/.storybook/main.ts +25 -0
  5. package/.storybook/manager.ts +13 -0
  6. package/.storybook/preview-head.html +3 -0
  7. package/.storybook/templates/with-layer.scss +38 -0
  8. package/.storybook/templates/with-layer.ts +90 -0
  9. package/.storybook/theme.ts +12 -0
  10. package/LICENSE +201 -0
  11. package/es/components/side-panel/defs.d.ts +39 -0
  12. package/es/components/side-panel/defs.js +51 -0
  13. package/es/components/side-panel/defs.js.map +1 -0
  14. package/es/components/side-panel/index.d.ts +9 -0
  15. package/es/components/side-panel/index.js +9 -0
  16. package/es/components/side-panel/index.js.map +1 -0
  17. package/es/components/side-panel/side-panel.d.ts +539 -0
  18. package/es/components/side-panel/side-panel.js +837 -0
  19. package/es/components/side-panel/side-panel.js.map +1 -0
  20. package/es/components/side-panel/side-panel.scss.js +13 -0
  21. package/es/components/side-panel/side-panel.scss.js.map +1 -0
  22. package/es/components/side-panel/side-panel.test.d.ts +7 -0
  23. package/es/components/side-panel/side-panel.test.js +56 -0
  24. package/es/components/side-panel/side-panel.test.js.map +1 -0
  25. package/es/globals/internal/handle.d.ts +18 -0
  26. package/es/globals/internal/handle.js +8 -0
  27. package/es/globals/internal/handle.js.map +1 -0
  28. package/es/globals/settings.d.ts +15 -0
  29. package/es/globals/settings.js +28 -0
  30. package/es/globals/settings.js.map +1 -0
  31. package/es/index.d.ts +9 -0
  32. package/es/index.js +9 -0
  33. package/es/index.js.map +1 -0
  34. package/lib/components/side-panel/defs.d.ts +39 -0
  35. package/lib/components/side-panel/defs.js +51 -0
  36. package/lib/components/side-panel/defs.js.map +1 -0
  37. package/lib/components/side-panel/index.d.ts +9 -0
  38. package/lib/components/side-panel/side-panel.d.ts +539 -0
  39. package/lib/components/side-panel/side-panel.test.d.ts +7 -0
  40. package/lib/globals/internal/handle.d.ts +18 -0
  41. package/lib/globals/settings.d.ts +15 -0
  42. package/lib/globals/settings.js +32 -0
  43. package/lib/globals/settings.js.map +1 -0
  44. package/lib/index.d.ts +9 -0
  45. package/netlify.toml +8 -0
  46. package/package.json +96 -0
  47. package/scss/components/side-panel/side-panel.scss +302 -0
  48. package/scss/components/side-panel/story-styles.scss +46 -0
  49. package/src/components/side-panel/defs.ts +46 -0
  50. package/src/components/side-panel/index.ts +10 -0
  51. package/src/components/side-panel/side-panel.mdx +106 -0
  52. package/src/components/side-panel/side-panel.scss +302 -0
  53. package/src/components/side-panel/side-panel.stories.ts +525 -0
  54. package/src/components/side-panel/side-panel.test.ts +52 -0
  55. package/src/components/side-panel/side-panel.ts +980 -0
  56. package/src/components/side-panel/story-styles.scss +46 -0
  57. package/src/globals/internal/handle.ts +19 -0
  58. package/src/globals/settings.ts +22 -0
  59. package/src/index.ts +10 -0
  60. package/src/typings/resources.d.ts +26 -0
  61. package/tasks/build.js +165 -0
  62. package/tools/rollup-plugin-icon-paths.js +39 -0
  63. package/tools/rollup-plugin-icons.js +73 -0
  64. package/tools/rollup-plugin-lit-scss.js +89 -0
  65. package/tools/svg-result-carbon-icon-loader.js +28 -0
  66. package/tools/svg-result-carbon-icon.js +42 -0
  67. package/tools/vite-svg-result-carbon-icon-loader.ts +65 -0
  68. package/tsconfig.json +36 -0
  69. package/vite.config.ts +32 -0
@@ -0,0 +1,161 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { setCustomElementsManifest } from '@storybook/web-components';
9
+ import customElements from '../custom-elements.json';
10
+ import container from './container';
11
+ import { white, g10, g90, g100 } from '@carbon/themes';
12
+ import { breakpoints } from '@carbon/layout';
13
+ import theme from './theme';
14
+ import './templates/with-layer';
15
+
16
+ setCustomElementsManifest(customElements);
17
+
18
+ export const globalTypes = {
19
+ theme: {
20
+ name: 'Theme',
21
+ description: 'Set the global theme for displaying components',
22
+ defaultValue: 'white',
23
+ toolbar: {
24
+ icon: 'paintbrush',
25
+ title: 'Theme',
26
+ items: ['white', 'g10', 'g90', 'g100'],
27
+ },
28
+ },
29
+ };
30
+
31
+ export const parameters = {
32
+ a11y: {
33
+ // Can specify engine as "axe" or "accessibility-checker" (axe default)
34
+ engine: 'accessibility-checker',
35
+ config: {
36
+ rules: [
37
+ {
38
+ // To disable a rule across all stories, set `enabled` to `false`.
39
+ // Use with caution: all violations of this rule will be ignored!
40
+ id: 'html_lang_exists',
41
+ enabled: false,
42
+ },
43
+ { id: 'page_title_exists', enabled: false },
44
+ { id: 'skip_main_exists', enabled: false },
45
+ { id: 'html_skipnav_exists', enabled: false },
46
+ { id: 'aria_content_in_landmark', enabled: false },
47
+ { id: 'aria_child_tabbable', enabled: false },
48
+ ],
49
+ },
50
+ },
51
+ actions: { argTypesRegex: '^on.*' },
52
+ backgrounds: {
53
+ // https://storybook.js.org/docs/react/essentials/backgrounds#grid
54
+ grid: {
55
+ cellSize: 8,
56
+ opacity: 0.5,
57
+ },
58
+ values: [
59
+ {
60
+ name: 'white',
61
+ value: white.background,
62
+ },
63
+ {
64
+ name: 'g10',
65
+ value: g10.background,
66
+ },
67
+ {
68
+ name: 'g90',
69
+ value: g90.background,
70
+ },
71
+ {
72
+ name: 'g100',
73
+ value: g100.background,
74
+ },
75
+ ],
76
+ },
77
+ controls: {
78
+ expanded: true,
79
+ sort: 'alpha',
80
+ hideNoControlsWarning: true,
81
+ },
82
+ docs: {
83
+ theme,
84
+ },
85
+ viewport: {
86
+ viewports: {
87
+ sm: {
88
+ name: 'Small',
89
+ styles: {
90
+ width: breakpoints.sm.width,
91
+ height: '100%',
92
+ },
93
+ },
94
+ md: {
95
+ name: 'Medium',
96
+ styles: {
97
+ width: breakpoints.md.width,
98
+ height: '100%',
99
+ },
100
+ },
101
+ lg: {
102
+ name: 'Large',
103
+ styles: {
104
+ width: breakpoints.lg.width,
105
+ height: '100%',
106
+ },
107
+ },
108
+ xlg: {
109
+ name: 'X-Large',
110
+ styles: {
111
+ width: breakpoints.xlg.width,
112
+ height: '100%',
113
+ },
114
+ },
115
+ Max: {
116
+ name: 'Max',
117
+ styles: {
118
+ width: breakpoints.max.width,
119
+ height: '100%',
120
+ },
121
+ },
122
+ },
123
+ },
124
+ options: {
125
+ storySort: {
126
+ method: 'alphabetical',
127
+ order: [
128
+ 'Introduction',
129
+ [
130
+ 'Welcome',
131
+ 'Custom styles',
132
+ 'Carbon CDN style helpers',
133
+ 'Form Participation',
134
+ ],
135
+ 'Components',
136
+ 'Layout',
137
+ ],
138
+ },
139
+ },
140
+ };
141
+
142
+ export const decorators = [
143
+ function decoratorContainer(story, context) {
144
+ const result = story();
145
+ const { hasMainTag } = result;
146
+ const { locale, dir, theme } = context.globals;
147
+
148
+ document.documentElement.setAttribute('storybook-carbon-theme', theme);
149
+
150
+ document.documentElement.lang = locale;
151
+ document.documentElement.dir = dir;
152
+
153
+ return container({ hasMainTag, children: result });
154
+ },
155
+ ];
156
+
157
+ export default {
158
+ parameters,
159
+ globalTypes,
160
+ decorators,
161
+ };
@@ -0,0 +1,73 @@
1
+ //
2
+ // @license
3
+ //
4
+ // Copyright IBM Corp. 2024, 2024
5
+ //
6
+ // This source code is licensed under the Apache-2.0 license found in the
7
+ // LICENSE file in the root directory of this source tree.
8
+ //
9
+
10
+ @use '@carbon/styles' with ($font-path: '@ibm/plex');
11
+ @use '@carbon/styles/scss/config' as *;
12
+ @use '@carbon/themes/scss/themes';
13
+ @use '@carbon/styles/scss/theme';
14
+ @use '@carbon/grid';
15
+
16
+ @use '@carbon/styles/scss/components/button/tokens' as button-tokens;
17
+ @use '@carbon/styles/scss/components/notification/tokens' as notification-tokens;
18
+ @use '@carbon/styles/scss/components/tag/tokens' as tag-tokens;
19
+ @include theme.add-component-tokens(button-tokens.$button-tokens);
20
+ @include theme.add-component-tokens(notification-tokens.$notification-tokens);
21
+ @include theme.add-component-tokens(tag-tokens.$tag-tokens);
22
+
23
+ // Emit the flex-grid styles
24
+ @include grid.flex-grid();
25
+
26
+ *,
27
+ *::before,
28
+ *::after {
29
+ box-sizing: border-box;
30
+ }
31
+
32
+ // The default theme is "white" (White)
33
+ :root {
34
+ @include theme.theme(themes.$white);
35
+ }
36
+ // Set the <html> theme attribute to "g10" to use the Gray 10 theme
37
+ // <html theme="g10">
38
+ :root[storybook-carbon-theme='g10'] {
39
+ @include theme.theme(themes.$g10);
40
+ }
41
+
42
+ // Set the <html> theme attribute to "g90" to use the Gray 90 theme
43
+ // <html theme="g90">
44
+ :root[storybook-carbon-theme='g90'] {
45
+ @include theme.theme(themes.$g90);
46
+ }
47
+
48
+ // Set the <html> theme attribute to "g100" to use the Gray 100 theme
49
+ // <html theme="g100">
50
+ :root[storybook-carbon-theme='g100'] {
51
+ @include theme.theme(themes.$g100);
52
+ }
53
+
54
+ body {
55
+ background-color: theme.$background;
56
+ color: theme.$text-primary;
57
+ }
58
+
59
+ .sb-show-main.sb-main-padded {
60
+ padding: 0;
61
+ }
62
+
63
+ #main-content {
64
+ position: relative;
65
+ padding: 42px;
66
+ }
67
+
68
+ .#{$prefix}--content.#{$prefix}-ce-demo-devenv--ui-shell-content {
69
+ padding: 2rem;
70
+ margin: 0;
71
+ block-size: 100vh;
72
+ inline-size: 100%;
73
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2020, 2023
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import { html, TemplateResult } from 'lit';
11
+ import containerStyles from './_container.scss?lit';
12
+ import '@carbon/web-components/es/components/skip-to-content/index.js';
13
+
14
+ /**
15
+ * @param options The rendering options.
16
+ * @param [options.hasMainTag] `true` if the story itself has `<main>` tag.
17
+ * @param [options.children] The story content.
18
+ * @returns The content that wraps the story.
19
+ */
20
+ const container = ({
21
+ hasMainTag,
22
+ children,
23
+ }: {
24
+ hasMainTag?: boolean;
25
+ children: TemplateResult;
26
+ }) => html`
27
+ <style>
28
+ ${containerStyles}
29
+ </style>
30
+ <!-- <cds-skip-to-content href="#main-content"></cds-skip-to-content> -->
31
+ <div
32
+ id="main-content"
33
+ name="main-content"
34
+ data-floating-menu-container
35
+ role="${hasMainTag ? 'none' : 'main'}"
36
+ >
37
+ ${children}
38
+ </div>
39
+ `;
40
+
41
+ export default container;
@@ -0,0 +1,25 @@
1
+ import { mergeConfig } from 'vite';
2
+ import { litStyleLoader, litTemplateLoader } from '@mordech/vite-lit-loader';
3
+ import viteSVGResultCarbonIconLoader from '../tools/vite-svg-result-carbon-icon-loader';
4
+
5
+ const config = {
6
+ stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
7
+ addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
8
+ framework: {
9
+ name: '@storybook/web-components-vite',
10
+ options: {},
11
+ },
12
+ docs: {
13
+ autodocs: 'tag',
14
+ },
15
+ async viteFinal(config) {
16
+ return mergeConfig(config, {
17
+ plugins: [
18
+ litStyleLoader(),
19
+ litTemplateLoader(),
20
+ viteSVGResultCarbonIconLoader(),
21
+ ],
22
+ });
23
+ },
24
+ };
25
+ export default config;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { addons } from '@storybook/manager-api';
9
+ import sbTheme from './theme';
10
+
11
+ addons.setConfig({
12
+ theme: sbTheme,
13
+ });
@@ -0,0 +1,3 @@
1
+ <script>
2
+ window.global = window;
3
+ </script>
@@ -0,0 +1,38 @@
1
+ //
2
+ // Copyright IBM Corp. 2019, 2023
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @use '@carbon/styles/scss/colors';
9
+ @use '@carbon/styles/scss/theme';
10
+ @use '@carbon/styles/scss/spacing';
11
+ @use '@carbon/styles/scss/type';
12
+ @use '@carbon/styles/scss/components/tag';
13
+
14
+ @use '@carbon/styles/scss/config' as *;
15
+
16
+ .#{$prefix}--with-layer__layer {
17
+ position: relative;
18
+ border: 1px dashed colors.$purple-50;
19
+ }
20
+
21
+ .#{$prefix}--with-layer__layer .#{$prefix}--with-layer__layer {
22
+ background-color: theme.$layer;
23
+ margin-block-start: spacing.$spacing-07;
24
+ }
25
+
26
+ .#{$prefix}--with-layer__label {
27
+ @include type.type-style('code-01');
28
+
29
+ display: inline-flex;
30
+ padding: spacing.$spacing-02;
31
+ background-color: tag.$tag-background-purple;
32
+ color: tag.$tag-color-purple;
33
+ column-gap: spacing.$spacing-02;
34
+ }
35
+
36
+ .#{$prefix}--with-layer__content {
37
+ padding: spacing.$spacing-05;
38
+ }
@@ -0,0 +1,90 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2024, 2024
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import { LitElement, html } from 'lit';
11
+ import { customElement, property } from 'lit/decorators.js';
12
+ import Layers from '@carbon/icons/lib/layers/16';
13
+ import { prefix } from '../../src/globals/settings';
14
+
15
+ import styles from './with-layer.scss?lit';
16
+
17
+ /**
18
+ * Storybook template layer component, strictly for presentation purposes
19
+ *
20
+ * @element sb-template-layers
21
+ * @slot The elements contained within the component.
22
+ */
23
+ @customElement(`sb-template-layers`)
24
+ class CDSLayer extends LitElement {
25
+ @property()
26
+ content;
27
+
28
+ private _handleSlotChange({ target }: Event) {
29
+ if (!this.content) {
30
+ const content = (target as HTMLSlotElement)
31
+ .assignedNodes()
32
+ .filter(
33
+ (node) =>
34
+ node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()
35
+ );
36
+
37
+ this.content = content[0];
38
+ }
39
+ }
40
+
41
+ updated() {
42
+ if (this.content) {
43
+ const layer2 = this.content.cloneNode(true) as HTMLElement;
44
+ const layer3 = this.content.cloneNode(true) as HTMLElement;
45
+ layer2.setAttribute('slot', 'layer-2');
46
+ layer3.setAttribute('slot', 'layer-3');
47
+ this.appendChild(layer2);
48
+ this.appendChild(layer3);
49
+ }
50
+ }
51
+
52
+ render() {
53
+ return html`
54
+ <div class="${prefix}--with-layer">
55
+ <div class="${prefix}--with-layer__layer">
56
+ <div class="${prefix}--with-layer__label">${Layers()} Layer 1</div>
57
+ <div class="${prefix}--with-layer__content">
58
+ <cds-layer>
59
+ <slot @slotchange="${this._handleSlotChange}"></slot>
60
+ <div class="${prefix}--with-layer__layer">
61
+ <div class="${prefix}--with-layer__label">
62
+ ${Layers()} Layer 2
63
+ </div>
64
+ <div class="${prefix}--with-layer__content">
65
+ <cds-layer>
66
+ <slot name="layer-2"></slot>
67
+ <div class="${prefix}--with-layer__layer">
68
+ <div class="${prefix}--with-layer__label">
69
+ ${Layers()} Layer 3
70
+ </div>
71
+ <div class="${prefix}--with-layer__content">
72
+ <cds-layer>
73
+ <slot name="layer-3"></slot>
74
+ </cds-layer>
75
+ </div>
76
+ </div>
77
+ </cds-layer>
78
+ </div>
79
+ </div>
80
+ </cds-layer>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ `;
85
+ }
86
+
87
+ static styles = styles;
88
+ }
89
+
90
+ export default CDSLayer;
@@ -0,0 +1,12 @@
1
+ import { create } from '@storybook/theming';
2
+ import packageInfo from '../package.json';
3
+
4
+ const { description, version } = packageInfo;
5
+
6
+ export default create({
7
+ base: 'light',
8
+ brandTitle: `${description} v${version}`,
9
+ fontBase: "'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif",
10
+ fontCode: "'IBM Plex Mono', Menlo, 'DejaVu Sans Mono', Courier, monospace",
11
+ brandUrl: packageInfo.repository.url,
12
+ });
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2020 IBM Corp.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.