@carbon/ibm-products-web-components 0.10.0 → 0.11.0-rc.1

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 (112) hide show
  1. package/custom-elements.json +250 -0
  2. package/es/components/about-modal/about-modal.d.ts +418 -0
  3. package/es/components/about-modal/about-modal.js +143 -0
  4. package/es/components/about-modal/about-modal.js.map +1 -0
  5. package/es/components/about-modal/about-modal.scss.js +13 -0
  6. package/es/components/about-modal/about-modal.scss.js.map +1 -0
  7. package/es/components/about-modal/about-modal.test.d.ts +7 -0
  8. package/es/components/about-modal/about-modal.test.js +87 -0
  9. package/es/components/about-modal/about-modal.test.js.map +1 -0
  10. package/es/components/about-modal/defs.d.ts +8 -0
  11. package/es/components/about-modal/defs.js +8 -0
  12. package/es/components/about-modal/defs.js.map +1 -0
  13. package/es/components/about-modal/index.d.ts +9 -0
  14. package/es/components/about-modal/index.js +9 -0
  15. package/es/components/about-modal/index.js.map +1 -0
  16. package/es/components/side-panel/side-panel.d.ts +87 -61
  17. package/es/components/side-panel/side-panel.js +64 -63
  18. package/es/components/side-panel/side-panel.js.map +1 -1
  19. package/es/components/side-panel/side-panel.scss.js +1 -1
  20. package/es/components/side-panel/side-panel.test.js +2 -3
  21. package/es/components/side-panel/side-panel.test.js.map +1 -1
  22. package/es/components/tearsheet/tearsheet.d.ts +87 -61
  23. package/es/components/tearsheet/tearsheet.js +37 -37
  24. package/es/components/tearsheet/tearsheet.js.map +1 -1
  25. package/es/components/tearsheet/tearsheet.scss.js +1 -1
  26. package/es/components/tearsheet/tearsheet.test.js +2 -3
  27. package/es/components/tearsheet/tearsheet.test.js.map +1 -1
  28. package/es/components/user-avatar/user-avatar.d.ts +92 -61
  29. package/es/components/user-avatar/user-avatar.js +21 -19
  30. package/es/components/user-avatar/user-avatar.js.map +1 -1
  31. package/es/components/user-avatar/user-avatar.scss.js +1 -1
  32. package/es/index.d.ts +1 -0
  33. package/es/index.js +1 -0
  34. package/es/index.js.map +1 -1
  35. package/es/package.json.js +1 -1
  36. package/es-custom/components/about-modal/about-modal.d.ts +418 -0
  37. package/es-custom/components/about-modal/about-modal.js +143 -0
  38. package/es-custom/components/about-modal/about-modal.js.map +1 -0
  39. package/es-custom/components/about-modal/about-modal.scss.js +13 -0
  40. package/es-custom/components/about-modal/about-modal.scss.js.map +1 -0
  41. package/es-custom/components/about-modal/about-modal.test.d.ts +7 -0
  42. package/es-custom/components/about-modal/about-modal.test.js +87 -0
  43. package/es-custom/components/about-modal/about-modal.test.js.map +1 -0
  44. package/es-custom/components/about-modal/defs.d.ts +8 -0
  45. package/es-custom/components/about-modal/defs.js +8 -0
  46. package/es-custom/components/about-modal/defs.js.map +1 -0
  47. package/es-custom/components/about-modal/index.d.ts +9 -0
  48. package/es-custom/components/about-modal/index.js +9 -0
  49. package/es-custom/components/about-modal/index.js.map +1 -0
  50. package/es-custom/components/side-panel/defs.d.ts +39 -0
  51. package/es-custom/components/side-panel/defs.js +51 -0
  52. package/es-custom/components/side-panel/defs.js.map +1 -0
  53. package/es-custom/components/side-panel/index.d.ts +9 -0
  54. package/es-custom/components/side-panel/index.js +9 -0
  55. package/es-custom/components/side-panel/index.js.map +1 -0
  56. package/es-custom/components/side-panel/side-panel.d.ts +546 -0
  57. package/es-custom/components/side-panel/side-panel.js +828 -0
  58. package/es-custom/components/side-panel/side-panel.js.map +1 -0
  59. package/es-custom/components/side-panel/side-panel.scss.js +13 -0
  60. package/es-custom/components/side-panel/side-panel.scss.js.map +1 -0
  61. package/es-custom/components/side-panel/side-panel.test.d.ts +7 -0
  62. package/es-custom/components/side-panel/side-panel.test.js +56 -0
  63. package/es-custom/components/side-panel/side-panel.test.js.map +1 -0
  64. package/es-custom/components/tearsheet/defs.d.ts +26 -0
  65. package/es-custom/components/tearsheet/defs.js +39 -0
  66. package/es-custom/components/tearsheet/defs.js.map +1 -0
  67. package/es-custom/components/tearsheet/index.d.ts +9 -0
  68. package/es-custom/components/tearsheet/index.js +9 -0
  69. package/es-custom/components/tearsheet/index.js.map +1 -0
  70. package/es-custom/components/tearsheet/tearsheet.d.ts +516 -0
  71. package/es-custom/components/tearsheet/tearsheet.js +676 -0
  72. package/es-custom/components/tearsheet/tearsheet.js.map +1 -0
  73. package/es-custom/components/tearsheet/tearsheet.scss.js +13 -0
  74. package/es-custom/components/tearsheet/tearsheet.scss.js.map +1 -0
  75. package/es-custom/components/tearsheet/tearsheet.test.d.ts +7 -0
  76. package/es-custom/components/tearsheet/tearsheet.test.js +121 -0
  77. package/es-custom/components/tearsheet/tearsheet.test.js.map +1 -0
  78. package/es-custom/components/user-avatar/index.d.ts +9 -0
  79. package/es-custom/components/user-avatar/index.js +9 -0
  80. package/es-custom/components/user-avatar/index.js.map +1 -0
  81. package/es-custom/components/user-avatar/user-avatar.d.ts +405 -0
  82. package/es-custom/components/user-avatar/user-avatar.js +151 -0
  83. package/es-custom/components/user-avatar/user-avatar.js.map +1 -0
  84. package/es-custom/components/user-avatar/user-avatar.scss.js +13 -0
  85. package/es-custom/components/user-avatar/user-avatar.scss.js.map +1 -0
  86. package/es-custom/globals/internal/handle.d.ts +18 -0
  87. package/es-custom/globals/internal/handle.js +8 -0
  88. package/es-custom/globals/internal/handle.js.map +1 -0
  89. package/es-custom/globals/internal/storybook-cdn.js +78 -0
  90. package/es-custom/globals/internal/storybook-cdn.js.map +1 -0
  91. package/es-custom/globals/settings.d.ts +15 -0
  92. package/es-custom/globals/settings.js +28 -0
  93. package/es-custom/globals/settings.js.map +1 -0
  94. package/es-custom/index.d.ts +12 -0
  95. package/es-custom/index.js +12 -0
  96. package/es-custom/index.js.map +1 -0
  97. package/es-custom/package.json.js +13 -0
  98. package/es-custom/package.json.js.map +1 -0
  99. package/lib/components/about-modal/about-modal.d.ts +418 -0
  100. package/lib/components/about-modal/about-modal.test.d.ts +7 -0
  101. package/lib/components/about-modal/defs.d.ts +8 -0
  102. package/lib/components/about-modal/defs.js +10 -0
  103. package/lib/components/about-modal/defs.js.map +1 -0
  104. package/lib/components/about-modal/index.d.ts +9 -0
  105. package/lib/components/side-panel/side-panel.d.ts +87 -61
  106. package/lib/components/tearsheet/tearsheet.d.ts +87 -61
  107. package/lib/components/user-avatar/user-avatar.d.ts +92 -61
  108. package/lib/index.d.ts +1 -0
  109. package/package.json +17 -13
  110. package/scss/components/about-modal/about-modal.scss +117 -0
  111. package/scss/components/about-modal/story-styles.scss +34 -0
  112. package/scss/components/user-avatar/user-avatar.scss +17 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"about-modal.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
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
+ export {};
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Copyright IBM Corp. 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 { vi, describe, it, expect } from 'vitest';
9
+ import { html, render } from 'lit';
10
+
11
+ /**
12
+ * Copyright IBM Corp. 2025
13
+ *
14
+ * This source code is licensed under the Apache-2.0 license found in the
15
+ * LICENSE file in the root directory of this source tree.
16
+ */
17
+ vi.mock('@carbon/icons/lib/close/20', () => vi.fn().mockReturnValue({}));
18
+ const logo = html `
19
+ <img
20
+ src="./_story-assets/example-logo.svg"
21
+ alt="Example product or service logo"
22
+ style="max-width: 6rem"
23
+ />
24
+ `;
25
+ const additionalInfo = html `
26
+ <p class="c4p__footer-label">Powered by</p>
27
+ <img
28
+ src="./_story-assets/ansible-logo.png"
29
+ alt="Grafana"
30
+ class="c4p__footer--tech-logo"
31
+ />
32
+ <img
33
+ src="./_story-assets/ansible-logo.png"
34
+ alt="Ansible"
35
+ class="c4p__footer--tech-logo"
36
+ />
37
+ <img
38
+ src="./_story-assets/js-logo.png"
39
+ alt="JavaScript"
40
+ class="c4p__footer--tech-logo"
41
+ />
42
+ `;
43
+ const content = html `This Web site contains proprietary notices and copyright
44
+ information, the terms of which must be observed and followed. Please see the
45
+ tab entitled 'Copyright and trademark information' for related information. IBM
46
+ grants you a non-exclusive, non-transferable, limited permission to access and
47
+ display the Web pages within this site as a customer or potential customer of
48
+ IBM provided you comply with these Terms of Use, and all copyright, trademark,
49
+ and other proprietary notices remain intact.`;
50
+ const defaultProps = {
51
+ closeIconDescription: 'close',
52
+ copyrightText: 'Copyright © IBM Corp. 2020, 2023',
53
+ logo: logo,
54
+ title: 'IBM Product name',
55
+ version: 'Version 0.0.0',
56
+ additionalInfo: additionalInfo,
57
+ content: content,
58
+ links: false,
59
+ };
60
+ const index = 3;
61
+ for (let i = 0; i < index; i++) {
62
+ html `<cds-custom-link href="#"> Link action </cds-custom-link>`;
63
+ }
64
+ const template = (props = defaultProps) => html `
65
+ <c4p-about-modal
66
+ open
67
+ closeIconDescription=${props.closeIconDescription}
68
+ copyrightText=${props.copyrightText}
69
+ .logo=${props.logo}
70
+ .title=${props.title}
71
+ .version=${props.version}
72
+ .additionalInfo=${props.additionalInfo}
73
+ .content=${props.content}
74
+ .links=${props.links}
75
+ aria-label="label"
76
+ >
77
+ </c4p-about-modal>
78
+ `;
79
+ describe('c4p-about-modal', () => {
80
+ it('should render about modal', async () => {
81
+ render(template(), document.body);
82
+ await Promise.resolve();
83
+ const elem = document.body.querySelector('c4p-about-modal');
84
+ expect(elem).toBeDefined();
85
+ });
86
+ });
87
+ //# sourceMappingURL=about-modal.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"about-modal.test.js","sources":["../../../src/components/about-modal/about-modal.test.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;AAAA;;;;;AAKG;AAEH,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;AAIxE,MAAM,IA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CAAC,IAAI,CAAC,CAAC,WAAW,EAAE;AAC5B,KAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2025
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
+ */
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright IBM Corp. 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
+ //# sourceMappingURL=defs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2025
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
+ import './about-modal';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 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 './about-modal.js';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2023, 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
+ * Modal size.
11
+ */
12
+ export declare enum SIDE_PANEL_SIZE {
13
+ /**
14
+ * Extra small size.
15
+ */
16
+ EXTRA_SMALL = "xs",
17
+ /**
18
+ * Small size.
19
+ */
20
+ SMALL = "sm",
21
+ /**
22
+ * Medium size.
23
+ */
24
+ MEDIUM = "md",
25
+ /**
26
+ * Large size.
27
+ */
28
+ LARGE = "lg",
29
+ /**
30
+ * 2X-Large size.
31
+ */
32
+ EXTRA_EXTRA_LARGE = "2xl"
33
+ }
34
+ export declare enum SIDE_PANEL_PLACEMENT {
35
+ /** right / default */
36
+ RIGHT = "right",
37
+ /** left */
38
+ LEFT = "left"
39
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Copyright IBM Corp. 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
+ /**
9
+ * @license
10
+ *
11
+ * Copyright IBM Corp. 2023, 2024
12
+ *
13
+ * This source code is licensed under the Apache-2.0 license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */
16
+ /**
17
+ * Modal size.
18
+ */
19
+ var SIDE_PANEL_SIZE;
20
+ (function (SIDE_PANEL_SIZE) {
21
+ /**
22
+ * Extra small size.
23
+ */
24
+ SIDE_PANEL_SIZE["EXTRA_SMALL"] = "xs";
25
+ /**
26
+ * Small size.
27
+ */
28
+ SIDE_PANEL_SIZE["SMALL"] = "sm";
29
+ /**
30
+ * Medium size.
31
+ */
32
+ SIDE_PANEL_SIZE["MEDIUM"] = "md";
33
+ /**
34
+ * Large size.
35
+ */
36
+ SIDE_PANEL_SIZE["LARGE"] = "lg";
37
+ /**
38
+ * 2X-Large size.
39
+ */
40
+ SIDE_PANEL_SIZE["EXTRA_EXTRA_LARGE"] = "2xl";
41
+ })(SIDE_PANEL_SIZE || (SIDE_PANEL_SIZE = {}));
42
+ var SIDE_PANEL_PLACEMENT;
43
+ (function (SIDE_PANEL_PLACEMENT) {
44
+ /** right / default */
45
+ SIDE_PANEL_PLACEMENT["RIGHT"] = "right";
46
+ /** left */
47
+ SIDE_PANEL_PLACEMENT["LEFT"] = "left";
48
+ })(SIDE_PANEL_PLACEMENT || (SIDE_PANEL_PLACEMENT = {}));
49
+
50
+ export { SIDE_PANEL_PLACEMENT, SIDE_PANEL_SIZE };
51
+ //# sourceMappingURL=defs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.js","sources":["../../../src/components/side-panel/defs.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;AAEG;IACS;AAAZ,CAAA,UAAY,eAAe,EAAA;AACzB;;AAEG;AACH,IAAA,eAAA,CAAA,aAAA,CAAA,GAAA,IAAkB;AAElB;;AAEG;AACH,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,IAAY;AAEZ;;AAEG;AACH,IAAA,eAAA,CAAA,QAAA,CAAA,GAAA,IAAa;AAEb;;AAEG;AACH,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,IAAY;AAEZ;;AAEG;AACH,IAAA,eAAA,CAAA,mBAAA,CAAA,GAAA,KAAyB;AAC3B,CAAC,EAzBW,eAAe,KAAf,eAAe,GAyB1B,EAAA,CAAA,CAAA;IAEW;AAAZ,CAAA,UAAY,oBAAoB,EAAA;;AAE9B,IAAA,oBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;;AAGf,IAAA,oBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EANW,oBAAoB,KAApB,oBAAoB,GAM/B,EAAA,CAAA,CAAA;;;;"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2023, 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
+ import './side-panel';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 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 './side-panel.js';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}