@infineon/infineon-design-system-stencil 35.4.2 → 35.4.3--canary.1904.dd7d0b778450bc713aec754a10b39edd5d76243c.0

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 (136) hide show
  1. package/dist/cjs/ifx-alert_4.cjs.entry.js +411 -0
  2. package/dist/cjs/ifx-alert_4.cjs.entry.js.map +1 -0
  3. package/dist/cjs/{ifx-alert_2.cjs.entry.js → ifx-template.cjs.entry.js} +1 -40
  4. package/dist/cjs/ifx-template.cjs.entry.js.map +1 -0
  5. package/dist/cjs/index-7f4df11a.js +6 -14
  6. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/components/alert/alert.js +32 -0
  9. package/dist/collection/components/alert/alert.js.map +1 -1
  10. package/dist/collection/components/badge/badge.js +35 -1
  11. package/dist/collection/components/badge/badge.js.map +1 -1
  12. package/dist/collection/components/button/button.js +33 -1
  13. package/dist/collection/components/button/button.js.map +1 -1
  14. package/dist/collection/components/icon/infineonIconStencil.js +33 -1
  15. package/dist/collection/components/icon/infineonIconStencil.js.map +1 -1
  16. package/dist/components/ifx-accordion-item.js +1 -1
  17. package/dist/components/ifx-alert.js +1 -1
  18. package/dist/components/ifx-badge.js +35 -1
  19. package/dist/components/ifx-badge.js.map +1 -1
  20. package/dist/components/ifx-breadcrumb-item-label.js +1 -1
  21. package/dist/components/ifx-button.js +1 -1
  22. package/dist/components/ifx-checkbox-group.js +1 -1
  23. package/dist/components/ifx-checkbox.js +1 -1
  24. package/dist/components/ifx-chip-item.js +1 -1
  25. package/dist/components/ifx-chip.js +1 -1
  26. package/dist/components/ifx-date-picker.js +1 -1
  27. package/dist/components/ifx-dropdown-item.js +1 -1
  28. package/dist/components/ifx-dropdown-trigger-button.js +2 -2
  29. package/dist/components/ifx-faq.js +2 -2
  30. package/dist/components/ifx-file-upload.js +3 -3
  31. package/dist/components/ifx-filter-accordion.js +1 -1
  32. package/dist/components/ifx-filter-bar.js +2 -2
  33. package/dist/components/ifx-filter-search.js +2 -2
  34. package/dist/components/ifx-icon-button.js +1 -1
  35. package/dist/components/ifx-icon.js +1 -1
  36. package/dist/components/ifx-icons-preview.js +3 -3
  37. package/dist/components/ifx-list-entry.js +2 -2
  38. package/dist/components/ifx-list.js +1 -1
  39. package/dist/components/ifx-modal.js +2 -2
  40. package/dist/components/ifx-multiselect.js +1 -1
  41. package/dist/components/ifx-navbar-item.js +1 -1
  42. package/dist/components/ifx-navbar.js +1 -1
  43. package/dist/components/ifx-notification.js +1 -1
  44. package/dist/components/ifx-overview-table.js +1 -1
  45. package/dist/components/ifx-pagination.js +1 -1
  46. package/dist/components/ifx-radio-button-group.js +1 -1
  47. package/dist/components/ifx-search-bar.js +2 -2
  48. package/dist/components/ifx-search-field.js +1 -1
  49. package/dist/components/ifx-segment.js +1 -1
  50. package/dist/components/ifx-segmented-control.js +1 -1
  51. package/dist/components/ifx-select.js +1 -1
  52. package/dist/components/ifx-set-filter.js +5 -5
  53. package/dist/components/ifx-sidebar-item.js +1 -1
  54. package/dist/components/ifx-slider.js +1 -1
  55. package/dist/components/ifx-step.js +1 -1
  56. package/dist/components/ifx-table.js +8 -8
  57. package/dist/components/ifx-tabs.js +1 -1
  58. package/dist/components/ifx-tag.js +1 -1
  59. package/dist/components/ifx-template.js +1 -1
  60. package/dist/components/ifx-templates-ui.js +6 -6
  61. package/dist/components/ifx-text-field.js +1 -1
  62. package/dist/components/ifx-tooltip.js +1 -1
  63. package/dist/components/ifx-tree-view-item.js +2 -2
  64. package/dist/components/{p-f2f58eb1.js → p-310364fe.js} +2 -2
  65. package/dist/components/{p-f2f58eb1.js.map → p-310364fe.js.map} +1 -1
  66. package/dist/components/{p-80006961.js → p-329a7500.js} +3 -3
  67. package/dist/components/{p-80006961.js.map → p-329a7500.js.map} +1 -1
  68. package/dist/components/{p-6c0ec65a.js → p-4e7857ff.js} +34 -2
  69. package/dist/components/p-4e7857ff.js.map +1 -0
  70. package/dist/components/{p-b6b0d09b.js → p-57dd8b77.js} +2 -2
  71. package/dist/components/{p-b6b0d09b.js.map → p-57dd8b77.js.map} +1 -1
  72. package/dist/components/{p-20d6a006.js → p-613c4d86.js} +2 -2
  73. package/dist/components/{p-20d6a006.js.map → p-613c4d86.js.map} +1 -1
  74. package/dist/components/{p-36e092f8.js → p-6b4c8097.js} +2 -2
  75. package/dist/components/{p-36e092f8.js.map → p-6b4c8097.js.map} +1 -1
  76. package/dist/components/{p-17df0350.js → p-7a680ebb.js} +34 -2
  77. package/dist/components/p-7a680ebb.js.map +1 -0
  78. package/dist/components/{p-2a500ed7.js → p-87a839f0.js} +3 -3
  79. package/dist/components/{p-2a500ed7.js.map → p-87a839f0.js.map} +1 -1
  80. package/dist/components/{p-12e75dad.js → p-98e17d75.js} +34 -2
  81. package/dist/components/p-98e17d75.js.map +1 -0
  82. package/dist/components/{p-ca125a72.js → p-9b5dec46.js} +4 -4
  83. package/dist/components/{p-ca125a72.js.map → p-9b5dec46.js.map} +1 -1
  84. package/dist/components/{p-afd6d4f5.js → p-cb4b6b39.js} +2 -2
  85. package/dist/components/{p-afd6d4f5.js.map → p-cb4b6b39.js.map} +1 -1
  86. package/dist/components/{p-e68ff1c7.js → p-ce281e7f.js} +4 -4
  87. package/dist/components/{p-e68ff1c7.js.map → p-ce281e7f.js.map} +1 -1
  88. package/dist/components/{p-5c96860f.js → p-d1a5bfd2.js} +2 -2
  89. package/dist/components/{p-5c96860f.js.map → p-d1a5bfd2.js.map} +1 -1
  90. package/dist/components/{p-b293963f.js → p-d4b7df30.js} +2 -2
  91. package/dist/components/{p-b293963f.js.map → p-d4b7df30.js.map} +1 -1
  92. package/dist/components/{p-8713a366.js → p-e2b248ca.js} +2 -2
  93. package/dist/components/{p-8713a366.js.map → p-e2b248ca.js.map} +1 -1
  94. package/dist/esm/ifx-alert_4.entry.js +404 -0
  95. package/dist/esm/ifx-alert_4.entry.js.map +1 -0
  96. package/dist/esm/{ifx-alert_2.entry.js → ifx-template.entry.js} +2 -40
  97. package/dist/esm/ifx-template.entry.js.map +1 -0
  98. package/dist/esm/index-6c9eba32.js +6 -14
  99. package/dist/esm/infineon-design-system-stencil.js +1 -1
  100. package/dist/esm/loader.js +1 -1
  101. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  102. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
  103. package/dist/infineon-design-system-stencil/p-baea374a.entry.js +2 -0
  104. package/dist/infineon-design-system-stencil/p-baea374a.entry.js.map +1 -0
  105. package/dist/infineon-design-system-stencil/p-db11ab78.entry.js +2 -0
  106. package/dist/infineon-design-system-stencil/p-db11ab78.entry.js.map +1 -0
  107. package/dist/types/components/alert/alert.d.ts +8 -0
  108. package/dist/types/components/badge/badge.d.ts +2 -0
  109. package/dist/types/components/button/button.d.ts +1 -0
  110. package/dist/types/components/icon/infineonIconStencil.d.ts +1 -0
  111. package/package.json +1 -1
  112. package/dist/cjs/ifx-alert_2.cjs.entry.js.map +0 -1
  113. package/dist/cjs/ifx-badge.cjs.entry.js +0 -22
  114. package/dist/cjs/ifx-badge.cjs.entry.js.map +0 -1
  115. package/dist/cjs/ifx-button.cjs.entry.js +0 -139
  116. package/dist/cjs/ifx-button.cjs.entry.js.map +0 -1
  117. package/dist/cjs/ifx-icon.cjs.entry.js +0 -97
  118. package/dist/cjs/ifx-icon.cjs.entry.js.map +0 -1
  119. package/dist/components/p-12e75dad.js.map +0 -1
  120. package/dist/components/p-17df0350.js.map +0 -1
  121. package/dist/components/p-6c0ec65a.js.map +0 -1
  122. package/dist/esm/ifx-alert_2.entry.js.map +0 -1
  123. package/dist/esm/ifx-badge.entry.js +0 -18
  124. package/dist/esm/ifx-badge.entry.js.map +0 -1
  125. package/dist/esm/ifx-button.entry.js +0 -135
  126. package/dist/esm/ifx-button.entry.js.map +0 -1
  127. package/dist/esm/ifx-icon.entry.js +0 -93
  128. package/dist/esm/ifx-icon.entry.js.map +0 -1
  129. package/dist/infineon-design-system-stencil/p-17f3f2f5.entry.js +0 -2
  130. package/dist/infineon-design-system-stencil/p-17f3f2f5.entry.js.map +0 -1
  131. package/dist/infineon-design-system-stencil/p-3d23deba.entry.js +0 -2
  132. package/dist/infineon-design-system-stencil/p-3d23deba.entry.js.map +0 -1
  133. package/dist/infineon-design-system-stencil/p-74bee1c8.entry.js +0 -2
  134. package/dist/infineon-design-system-stencil/p-74bee1c8.entry.js.map +0 -1
  135. package/dist/infineon-design-system-stencil/p-959285a7.entry.js +0 -2
  136. package/dist/infineon-design-system-stencil/p-959285a7.entry.js.map +0 -1
@@ -0,0 +1,411 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-7f4df11a.js');
6
+ const index$1 = require('./index-5b0b9d4c.js');
7
+ const icons = require('./icons-2cd72a7d.js');
8
+
9
+ const alertCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}:host{display:block}.alert__info-wrapper{display:flex;padding:16px 24px;font-family:var(--ifx-font-family);box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1019607843)}.alert__info-wrapper .info__text-wrapper{display:flex;flex-direction:column;gap:8px;width:100%}.alert__info-wrapper .info__text-wrapper .info__headline-wrapper{display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.alert__info-wrapper .info__text-wrapper .info__headline-wrapper,.alert__info-wrapper .info__text-wrapper .info__description-wrapper{color:#1D1D1D;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.alert__info-wrapper .info__text-wrapper .info__headline-wrapper ::slotted(p),.alert__info-wrapper .info__text-wrapper .info__description-wrapper ::slotted(p){padding:0;margin:0}.alert__info-wrapper .info__text-wrapper .info__description-wrapper{font-weight:400}.alert__info-wrapper .close-icon-wrapper{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}.alert__info-wrapper .close-icon-wrapper button{all:unset;display:flex;align-items:center;justify-content:center;line-height:0;color:#1D1D1D;height:24px;width:24px}.alert__info-wrapper .close-icon-wrapper button:focus{outline:2px solid #0A8276;outline-offset:2px}.alert{display:flex;border:1px solid #0A8276;border-radius:1px;color:#1D1D1D;background-color:#FFFFFF;font-family:var(--ifx-font-family);box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1019607843)}.alert .close-icon-wrapper{display:flex;align-items:center;justify-content:center;min-width:40px}.alert .close-icon-wrapper button{all:unset;display:flex;align-items:center;justify-content:center;line-height:0;color:#1D1D1D;height:24px;width:24px}.alert .close-icon-wrapper button:focus{outline:2px solid #0A8276;outline-offset:2px}.alert .icon-wrapper{position:relative;min-width:48px;display:flex;justify-content:center;align-items:center;background-color:#0A8276}.alert .alert-text{font-size:16px;width:100%;padding:12px 0px 12px 12px;color:#1D1D1D;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;}.alert.primary{border:1px solid #0A8276}.alert.primary .icon-wrapper{background-color:#0A8276;color:#FFFFFF}.alert.success{border:1px solid #4CA460}.alert.success .icon-wrapper{background-color:#4CA460;color:#FFFFFF}.alert.danger{border:1px solid #CD002F}.alert.danger .icon-wrapper{background-color:#CD002F;color:#FFFFFF}.alert.warning{border:1px solid #E16B25}.alert.warning .icon-wrapper{background-color:#E16B25;color:#FFFFFF}.close-icon-wrapper ifx-icon:hover{cursor:pointer}";
10
+ const IfxAlertStyle0 = alertCss;
11
+
12
+ const Alert = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.ifxClose = index.createEvent(this, "ifxClose", 7);
16
+ this.variant = 'primary';
17
+ this.closable = true;
18
+ this.AriaLive = 'assertive';
19
+ this.alertTypeDescription = {
20
+ "primary": 'Neutral alert',
21
+ "success": 'Success Alert',
22
+ "danger": 'Error Alert',
23
+ "warning": 'Warning Alert',
24
+ "info": 'Neutral alert',
25
+ };
26
+ }
27
+ handleClose() {
28
+ this.ifxClose.emit();
29
+ }
30
+ renderCloseButton() {
31
+ return (index.h("div", { class: "close-icon-wrapper" }, index.h("button", { onClick: this.handleClose.bind(this), "aria-label": "Dismiss alert" }, index.h("ifx-icon", { icon: "cross-16" }))));
32
+ }
33
+ generateUniqueId(prefix = 'id') {
34
+ return `${prefix}-${Math.random().toString(36).substring(2, 9)}`;
35
+ }
36
+ componentWillLoad() {
37
+ if (!this.uniqueId) {
38
+ this.uniqueId = this.generateUniqueId('alert');
39
+ }
40
+ this.initalizeTracking();
41
+ }
42
+ initalizeTracking() {
43
+ (function (t, r, kk, n, pp) {
44
+ if (typeof window.btntConfig !== "object") {
45
+ window.btntConfig = {
46
+ domain: "https://ssgtm.infineon.com",
47
+ withCookies: true,
48
+ maxBatchSize: 10
49
+ };
50
+ }
51
+ if (window["btnt"])
52
+ return;
53
+ window["btnt"] = function (z) {
54
+ if (typeof z !== "object") {
55
+ z = {};
56
+ }
57
+ if (typeof window.btntQueue !== "object") {
58
+ window.btntQueue = [];
59
+ }
60
+ window.btntQueue.push(z);
61
+ };
62
+ n = t.createElement(r);
63
+ pp = t.getElementsByTagName(r)[0];
64
+ n.async = 1;
65
+ n.src = window.btntConfig.domain + "/btnt.js";
66
+ pp.parentNode.insertBefore(n, pp);
67
+ })(document, "script");
68
+ window.btnt({
69
+ event_name: "component_initialized",
70
+ component_name: 'ifx-alert',
71
+ });
72
+ }
73
+ render() {
74
+ return this.variant === 'info' ? (index.h("div", { class: "alert__info-wrapper", role: "alert", "aria-live": this.AriaLive, "aria-describedby": this.alertTypeDescription[this.variant], "aria-labelledby": "alert-text alert-description" }, index.h("div", { class: "info__text-wrapper" }, index.h("div", { class: "info__headline-wrapper" }, index.h("slot", { name: "headline" })), index.h("div", { id: `alert-description-${this.uniqueId}`, class: "info__description-wrapper" }, index.h("slot", { name: "desc" }))), this.closable ? this.renderCloseButton() : null)) : (index.h("div", { class: `alert ${this.variant}`, role: "alert" }, this.icon && (index.h("div", { class: "icon-wrapper" }, index.h("ifx-icon", { icon: this.icon }))), index.h("div", { class: "alert-text", id: `alert-text-${this.uniqueId}` }, index.h("slot", null)), this.closable ? this.renderCloseButton() : null));
75
+ }
76
+ };
77
+ Alert.style = IfxAlertStyle0;
78
+
79
+ const badgeCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}:host{display:inline-flex}.badge__container{display:inline-flex;justify-content:center;align-items:center;padding:4px 8px;gap:8px;border:1px solid #EEEDED;background-color:#EEEDED;border-radius:100px;font-family:var(--ifx-font-family);font-size:0.875rem;line-height:1.25rem;font-weight:400;color:#1D1D1D}";
80
+ const IfxBadgeStyle0 = badgeCss;
81
+
82
+ const Badge = class {
83
+ constructor(hostRef) {
84
+ index.registerInstance(this, hostRef);
85
+ }
86
+ componentWillLoad() {
87
+ this.initalizeTracking();
88
+ }
89
+ initalizeTracking() {
90
+ (function (t, r, kk, n, pp) {
91
+ if (typeof window.btntConfig !== "object") {
92
+ window.btntConfig = {
93
+ domain: "https://ssgtm.infineon.com",
94
+ withCookies: true,
95
+ maxBatchSize: 10
96
+ };
97
+ }
98
+ if (window["btnt"])
99
+ return;
100
+ window["btnt"] = function (z) {
101
+ if (typeof z !== "object") {
102
+ z = {};
103
+ }
104
+ if (typeof window.btntQueue !== "object") {
105
+ window.btntQueue = [];
106
+ }
107
+ window.btntQueue.push(z);
108
+ };
109
+ n = t.createElement(r);
110
+ pp = t.getElementsByTagName(r)[0];
111
+ n.async = 1;
112
+ n.src = window.btntConfig.domain + "/btnt.js";
113
+ pp.parentNode.insertBefore(n, pp);
114
+ })(document, "script");
115
+ window.btnt({
116
+ event_name: "component_initialized",
117
+ component_name: 'ifx-badge',
118
+ });
119
+ }
120
+ render() {
121
+ return (index.h("div", { key: '33d86090a07544f1948ed7cb0f8333797e3dc906', class: "badge__container" }, index.h("slot", { key: 'ff850dd8ca84d733e48e6b8ba64bf9a6906fa65f' })));
122
+ }
123
+ };
124
+ Badge.style = IfxBadgeStyle0;
125
+
126
+ const buttonCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}:host{vertical-align:bottom;display:inline-flex;width:var(--bw, fit-content)}.btn{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0px 16px;gap:8px;color:#FFFFFF;font-weight:600;border-radius:1px;line-height:1.5rem;font-family:var(--ifx-font-family);font-style:normal;text-decoration:none;user-select:none;font-size:1rem;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;width:var(--bw, fit-content)}.btn:not(.disabled){cursor:pointer}.btn.disabled{pointer-events:none}.btn-default{color:#FFFFFF;background-color:#0A8276}.btn-default:disabled,.btn-default.disabled{background-color:#BFBBBB;color:#FFFFFF;pointer-events:none}.btn-secondary-default{background-color:#FFFFFF;color:#0A8276;border:1px solid #0A8276}.btn-secondary-default:disabled,.btn-secondary-default.disabled{background-color:#FFFFFF;border:1px solid #BFBBBB;color:#BFBBBB;pointer-events:none}.btn-tertiary-default{background-color:transparent;color:#0A8276}.btn-tertiary-default:disabled,.btn-tertiary-default.disabled{color:#BFBBBB;pointer-events:none}.btn-danger{color:#FFFFFF;background-color:#CD002F;border-color:#CD002F}.btn-danger:disabled,.btn-danger.disabled{background-color:#BFBBBB;color:#FFFFFF;pointer-events:none}.btn-secondary-danger{background-color:#FFFFFF;color:#CD002F;border:1px solid #CD002F}.btn-secondary-danger:disabled,.btn-secondary-danger.disabled{background-color:#FFFFFF;border:1px solid #BFBBBB;color:#BFBBBB;pointer-events:none}.btn-tertiary-danger{background-color:transparent;color:#CD002F}.btn-tertiary-danger:disabled,.btn-tertiary-danger.disabled{background-color:#FFFFFF;color:#BFBBBB;pointer-events:none}.btn-inverse{color:#0A8276;background-color:#FFFFFF}.btn-inverse:disabled,.btn-inverse.disabled{opacity:1;background-color:#FFFFFF;color:#0A8276;pointer-events:none}.btn-secondary-inverse{color:#FFFFFF;border:1px solid #FFFFFF}.btn-secondary-inverse:disabled,.btn-secondary-inverse.disabled{border:1px solid #FFFFFF;color:#FFFFFF;pointer-events:none}.btn-tertiary-inverse{color:#FFFFFF}.btn-tertiary-inverse:disabled,.btn-tertiary-inverse.disabled{color:#FFFFFF;opacity:1;pointer-events:none}.btn ifx-icon:empty{display:none}.btn.btn-xs{font-size:0.875rem;height:32px;line-height:1rem}.btn.btn-s{font-size:0.875rem;height:36px;line-height:1.25rem}.btn.btn-l{font-size:1.25rem;height:48px;line-height:1.75rem}.btn.btn-default:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-default:not(:disabled,.disabled):hover{background-color:#08665C}.btn.btn-default:not(:disabled,.disabled):active,.btn.btn-default:not(:disabled,.disabled).active{background-color:#06534B}.btn.btn-secondary-default:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-secondary-default:not(:disabled,.disabled):hover{color:#FFFFFF;background-color:#08665C}.btn.btn-secondary-default:not(:disabled,.disabled):active,.btn.btn-secondary-default:not(:disabled,.disabled).active{background-color:#06534B}.btn.btn-secondary:not(:disabled,.disabled):hover{background-color:#9C216E}.btn.btn-secondary:not(:disabled,.disabled):active,.btn.btn-secondary:not(:disabled,.disabled).active{background-color:#9C216E}.btn.btn-danger:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-danger:not(:disabled,.disabled):hover{background-color:#A2001E}.btn.btn-danger:not(:disabled,.disabled):active,.btn.btn-danger:not(:disabled,.disabled).active{background-color:#900021}.btn.btn-secondary-danger:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-secondary-danger:not(:disabled,.disabled):hover{color:#FFFFFF;background-color:#A2001E}.btn.btn-secondary-danger:not(:disabled,.disabled):active,.btn.btn-secondary-danger:not(:disabled,.disabled).active{background-color:#900021}.btn.btn-inverse:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #0A8276, 0 0 0 4px #FFFFFF}.btn.btn-inverse:not(:disabled,.disabled):hover{background-color:#EEEDED}.btn.btn-inverse:not(:disabled,.disabled):active,.btn.btn-inverse:not(:disabled,.disabled).active{background-color:#BFBBBB}.btn.btn-secondary-inverse:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #0A8276, 0 0 0 4px #FFFFFF}.btn.btn-secondary-inverse:not(:disabled,.disabled):hover{color:#0A8276;background-color:#EEEDED}.btn.btn-secondary-inverse:not(:disabled,.disabled):active,.btn.btn-secondary-inverse:not(:disabled,.disabled).active{color:#0A8276;background-color:#BFBBBB}.btn.btn-tertiary-default:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #08665C}.btn.btn-tertiary-default:not(:disabled,.disabled):hover{color:#08665C}.btn.btn-tertiary-default:not(:disabled,.disabled):active,.btn.btn-tertiary-default:not(:disabled,.disabled).active{color:#06534B}.btn.btn-tertiary-danger:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #A2001E}.btn.btn-tertiary-danger:not(:disabled,.disabled):hover{color:#A2001E}.btn.btn-tertiary-danger:not(:disabled,.disabled):active,.btn.btn-tertiary-danger:not(:disabled,.disabled).active{color:#900021}.btn.btn-tertiary-inverse:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #0A8276, 0 0 0 4px #FFFFFF}.btn.btn-tertiary-inverse:not(:disabled,.disabled):hover{color:#EEEDED}.btn.btn-tertiary-inverse:not(:disabled,.disabled):active,.btn.btn-tertiary-inverse:not(:disabled,.disabled).active{color:#BFBBBB}";
127
+ const IfxButtonStyle0 = buttonCss;
128
+
129
+ const Button = class {
130
+ constructor(hostRef) {
131
+ index.registerInstance(this, hostRef);
132
+ this.variant = 'primary';
133
+ this.theme = 'default';
134
+ this.size = 'm';
135
+ this.disabled = false;
136
+ this.target = '_self';
137
+ this.type = "button";
138
+ this.fullWidth = false;
139
+ this.handleClick = (ev) => {
140
+ if (this.el.shadowRoot) {
141
+ const parentForm = this.el.closest('form');
142
+ if (parentForm) {
143
+ ev.preventDefault();
144
+ if (this.type === 'reset') {
145
+ // If the button type is 'reset', manually reset all custom form fields
146
+ this.resetClickHandler(); //this will reset all ifx-text-fields within a form
147
+ }
148
+ else {
149
+ const fakeButton = document.createElement('button');
150
+ if (this.type) {
151
+ fakeButton.type = this.type;
152
+ }
153
+ fakeButton.style.display = 'none';
154
+ parentForm.appendChild(fakeButton);
155
+ fakeButton.click();
156
+ fakeButton.remove();
157
+ }
158
+ }
159
+ }
160
+ };
161
+ }
162
+ setInternalHref(newValue) {
163
+ this.internalHref = newValue;
164
+ }
165
+ async setFocus() {
166
+ this.focusableElement.focus();
167
+ }
168
+ initalizeTracking() {
169
+ (function (t, r, kk, n, pp) {
170
+ if (typeof window.btntConfig !== "object") {
171
+ window.btntConfig = {
172
+ domain: "https://ssgtm.infineon.com",
173
+ withCookies: true,
174
+ maxBatchSize: 10
175
+ };
176
+ }
177
+ if (window["btnt"])
178
+ return;
179
+ window["btnt"] = function (z) {
180
+ if (typeof z !== "object") {
181
+ z = {};
182
+ }
183
+ if (typeof window.btntQueue !== "object") {
184
+ window.btntQueue = [];
185
+ }
186
+ window.btntQueue.push(z);
187
+ };
188
+ n = t.createElement(r);
189
+ pp = t.getElementsByTagName(r)[0];
190
+ n.async = 1;
191
+ n.src = window.btntConfig.domain + "/btnt.js";
192
+ pp.parentNode.insertBefore(n, pp);
193
+ })(document, "script");
194
+ window.btnt({
195
+ event_name: "component_initialized",
196
+ component_name: 'ifx-button',
197
+ });
198
+ }
199
+ insertNativeButton() {
200
+ this.nativeButton = document.createElement('button');
201
+ this.nativeButton.type = this.type;
202
+ this.nativeButton.style.display = 'none';
203
+ this.el.closest('form').appendChild(this.nativeButton);
204
+ }
205
+ handleFormAndInternalHref() {
206
+ if (this.el.closest('form')) {
207
+ if (this.el.href) {
208
+ this.el.internalHref = undefined;
209
+ }
210
+ this.insertNativeButton();
211
+ }
212
+ else {
213
+ this.internalHref = this.href;
214
+ }
215
+ }
216
+ handleButtonWidth() {
217
+ if (this.fullWidth) {
218
+ this.el.style.setProperty('--bw', '100%');
219
+ }
220
+ else {
221
+ this.el.style.setProperty('--bw', 'fit-content');
222
+ }
223
+ }
224
+ componentWillLoad() {
225
+ this.handleFormAndInternalHref();
226
+ this.initalizeTracking();
227
+ }
228
+ componentWillRender() {
229
+ this.handleButtonWidth();
230
+ }
231
+ resetClickHandler() {
232
+ const formElement = this.el.closest('form');
233
+ const customElements = formElement.querySelectorAll('ifx-text-field, ifx-textarea');
234
+ customElements.forEach(element => {
235
+ element.reset();
236
+ });
237
+ }
238
+ handleKeyDown(ev) {
239
+ if (ev.key === " " || ev.key === 'Enter' && !this.disabled) {
240
+ this.focusableElement.click();
241
+ }
242
+ }
243
+ handleHostClick(event) {
244
+ if (this.disabled === true) {
245
+ event.stopImmediatePropagation();
246
+ }
247
+ }
248
+ handleFocus(event) {
249
+ if (this.disabled) {
250
+ event.preventDefault();
251
+ this.focusableElement.blur();
252
+ }
253
+ }
254
+ render() {
255
+ return (index.h(index.Host, { key: '35119e058b606986485a2791ac639a9d3281fab2' }, index.h("a", { key: '026da4c0ce3c1b5bfc6cd25b4157d3b770796982', role: this.href ? 'link' : 'button', tabIndex: this.disabled ? -1 : 0, ref: (el) => (this.focusableElement = el), class: this.getClassNames(), href: !this.disabled ? this.internalHref : undefined, target: this.target, onClick: this.handleClick, rel: this.target === '_blank' ? 'noopener noreferrer' : undefined, onFocus: (event) => this.handleFocus(event), "aria-disabled": this.disabled ? 'true' : null, "aria-describedby": this.theme === 'danger' ? 'Dangerous action' : undefined, "aria-label": this.ariaLabel || undefined }, index.h("slot", { key: '163281db6953552956521e744e3c0cac7d278639' }))));
256
+ }
257
+ getVariantClass() {
258
+ return `${this.variant}` === "secondary"
259
+ ? `secondary-${this.theme}`
260
+ : `${this.variant}` === 'tertiary'
261
+ ? `tertiary-${this.theme}`
262
+ : `${this.theme}`;
263
+ }
264
+ getSizeClass() {
265
+ if (`${this.size}` === "xs") {
266
+ return "xs";
267
+ }
268
+ else if (`${this.size}` === "s") {
269
+ return "s";
270
+ }
271
+ else if (`${this.size}` === "l") {
272
+ return "l";
273
+ }
274
+ else
275
+ return "";
276
+ }
277
+ getClassNames() {
278
+ return index$1.classNames('btn', this.size && `btn-${this.getSizeClass()}`, `btn-${this.getVariantClass()}`, this.disabled ? 'disabled' : '');
279
+ }
280
+ get el() { return index.getElement(this); }
281
+ static get watchers() { return {
282
+ "href": ["setInternalHref"]
283
+ }; }
284
+ };
285
+ Button.style = IfxButtonStyle0;
286
+
287
+ const infineonIconStencilCss = "ifx-icon{display:inline-flex;justify-content:center}ifx-icon:empty{display:none}";
288
+ const IfxIconStyle0 = infineonIconStencilCss;
289
+
290
+ const InfineonIconStencil = class {
291
+ constructor(hostRef) {
292
+ index.registerInstance(this, hostRef);
293
+ this.consoleError = index.createEvent(this, "consoleError", 7);
294
+ this.icon = "";
295
+ }
296
+ updateIcon(newIcon) {
297
+ this.internalIcon = newIcon;
298
+ this.setIcon();
299
+ }
300
+ convertStringToHtml(htmlString) {
301
+ const div = document.createElement('div');
302
+ div.innerHTML = htmlString;
303
+ return div.firstChild;
304
+ }
305
+ convertHtmlToObject(htmlElement) {
306
+ let pathToObject = Array
307
+ .from(htmlElement.attributes, ({ name, value }) => ({ name, value }))
308
+ .reduce((acc, current) => {
309
+ acc[current.name] = current.value;
310
+ return acc;
311
+ }, {});
312
+ return pathToObject;
313
+ }
314
+ convertPathsToVnode(htmlPath) {
315
+ let svgPaths = [];
316
+ const parentPath = this.convertHtmlToObject(htmlPath);
317
+ const parentPathToVnode = index.h("path", parentPath);
318
+ svgPaths.push(parentPathToVnode);
319
+ if (htmlPath.firstChild) {
320
+ const paths = htmlPath.querySelectorAll('path');
321
+ const pathLength = htmlPath.querySelectorAll('path').length;
322
+ for (let i = 0; i < pathLength; i++) {
323
+ let pathToObject = this.convertHtmlToObject(paths[i]);
324
+ let objToVnode = index.h("path", pathToObject);
325
+ svgPaths.push(objToVnode);
326
+ }
327
+ }
328
+ return svgPaths;
329
+ }
330
+ getSVG(svgPath) {
331
+ const htmlPath = this.convertStringToHtml(this.ifxIcon);
332
+ const width = htmlPath.getAttribute('width');
333
+ const height = htmlPath.getAttribute('height');
334
+ const fill = htmlPath.getAttribute('fill');
335
+ const viewBox = htmlPath.getAttribute('viewBox');
336
+ return index.h("svg", { class: "inline-svg", width: width, height: height, xmlns: "http://www.w3.org/2000/svg", fill: fill, viewBox: viewBox }, ...svgPath);
337
+ }
338
+ constructIcon() {
339
+ if (this.ifxIcon) {
340
+ const htmlPath = this.convertStringToHtml(this.ifxIcon);
341
+ const svgPath = this.convertPathsToVnode(htmlPath);
342
+ const SVG = this.getSVG(svgPath);
343
+ return SVG;
344
+ }
345
+ else if (this.icon !== "") {
346
+ console.error('Icon not found!');
347
+ this.consoleError.emit(true);
348
+ return;
349
+ }
350
+ else {
351
+ return;
352
+ }
353
+ }
354
+ setIcon() {
355
+ const toCamelCase = str => str
356
+ .replace(/[-_]+(.)/g, (_, chr) => chr.toUpperCase()) // handle - and _ to uppercase
357
+ .replace(/^(.)/, (m) => m.toLowerCase()); // ensure first letter is lowercase
358
+ const iconName = toCamelCase(this.internalIcon);
359
+ this.ifxIcon = icons.getIcon(iconName);
360
+ }
361
+ initalizeTracking() {
362
+ (function (t, r, kk, n, pp) {
363
+ if (typeof window.btntConfig !== "object") {
364
+ window.btntConfig = {
365
+ domain: "https://ssgtm.infineon.com",
366
+ withCookies: true,
367
+ maxBatchSize: 10
368
+ };
369
+ }
370
+ if (window["btnt"])
371
+ return;
372
+ window["btnt"] = function (z) {
373
+ if (typeof z !== "object") {
374
+ z = {};
375
+ }
376
+ if (typeof window.btntQueue !== "object") {
377
+ window.btntQueue = [];
378
+ }
379
+ window.btntQueue.push(z);
380
+ };
381
+ n = t.createElement(r);
382
+ pp = t.getElementsByTagName(r)[0];
383
+ n.async = 1;
384
+ n.src = window.btntConfig.domain + "/btnt.js";
385
+ pp.parentNode.insertBefore(n, pp);
386
+ })(document, "script");
387
+ window.btnt({
388
+ event_name: "component_initialized",
389
+ component_name: 'ifx-icon',
390
+ });
391
+ }
392
+ componentWillLoad() {
393
+ this.internalIcon = this.icon;
394
+ this.setIcon();
395
+ this.initalizeTracking();
396
+ }
397
+ render() {
398
+ return (index.h(index.Host, { key: 'f0a6089e9bb17666f4f69940dca6b55612016fb3' }, this.constructIcon()));
399
+ }
400
+ static get watchers() { return {
401
+ "icon": ["updateIcon"]
402
+ }; }
403
+ };
404
+ InfineonIconStencil.style = IfxIconStyle0;
405
+
406
+ exports.ifx_alert = Alert;
407
+ exports.ifx_badge = Badge;
408
+ exports.ifx_button = Button;
409
+ exports.ifx_icon = InfineonIconStencil;
410
+
411
+ //# sourceMappingURL=ifx-alert_4.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"ifx-alert.ifx-badge.ifx-button.ifx-icon.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,QAAQ,GAAG,8mFAA8mF,CAAC;AAChoF,uBAAe,QAAQ;;MCcV,KAAK;IALlB;;;QAMU,YAAO,GAA0D,SAAS,CAAC;QAG3E,aAAQ,GAAY,IAAI,CAAC;QACzB,aAAQ,GAAG,WAAW,CAAC;QAG/B,yBAAoB,GAAG;YACrB,SAAS,EAAE,eAAe;YAC1B,SAAS,EAAE,eAAe;YAC1B,QAAQ,EAAE,aAAa;YACvB,SAAS,EAAE,eAAe;YAC1B,MAAM,EAAE,eAAe;SACxB,CAAC;KA6FH;IA3FC,WAAW;QACT,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;KACtB;IAED,iBAAiB;QACf,QACEA,iBAAK,KAAK,EAAC,oBAAoB,IAC7BA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CAAC;YACZ,UAAU,EAAE,uBAAuB;YACnC,cAAc,EAAE,UAAU;SACzB,CAAC,CAAA;KACH;IAED,iBAAiB;QACf,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC;QAC9B,IAAI,CAAC,OAAO,EAAE,CAAA;QACd,IAAI,CAAC,iBAAiB,EAAE,CAAA;KACzB;IAED,MAAM;QACJ,QACEH,QAACC,UAAI,uDACJ,IAAI,CAAC,aAAa,EAAE,CACd,EACP;KACH;;;;;;;;;;;;","names":["h","Host","classNames","getIcon"],"sources":["src/components/alert/alert.scss?tag=ifx-alert&encapsulation=shadow","src/components/alert/alert.tsx","src/components/badge/badge.scss?tag=ifx-badge&encapsulation=shadow","src/components/badge/badge.tsx","src/components/button/button.scss?tag=ifx-button&encapsulation=shadow","src/components/button/button.tsx","src/components/icon/infineonIconStencil.scss?tag=ifx-icon","src/components/icon/infineonIconStencil.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: block;\n}\n\n.alert__info-wrapper {\n display: flex;\n padding: 16px 24px;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n\n box-shadow: 0px 6px 9px 0px #1D1D1D1A;\n\n & .info__text-wrapper {\n display: flex;\n flex-direction: column;\n gap: tokens.$ifxSpace100;\n width: 100%;\n\n & .info__headline-wrapper {\n display: -webkit-box;\n -webkit-line-clamp: 1;\n line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n & .info__headline-wrapper,\n .info__description-wrapper {\n color: #1D1D1D;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 24px;\n\n ::slotted(p) {\n padding: 0;\n margin: 0;\n }\n }\n\n & .info__description-wrapper {\n font-weight: 400;\n }\n }\n\n & .close-icon-wrapper {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: flex-start;\n //min-width: tokens.$ifxSize500;\n\n & button {\n all: unset;\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 0;\n color: tokens.$ifxColorBaseBlack;\n height: tokens.$ifxSize300;\n width: tokens.$ifxSize300;\n\n\n &:focus {\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 2px;\n }\n }\n }\n}\n\n.alert {\n display: flex;\n border: 1px solid tokens.$ifxColorOcean500;\n border-radius: tokens.$ifxBorderRadius12;\n color: tokens.$ifxColorBaseBlack;\n background-color: tokens.$ifxColorBaseWhite;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n\n box-shadow: 0px 6px 9px 0px #1D1D1D1A;\n\n\n & .close-icon-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: tokens.$ifxSize500;\n\n & button {\n all: unset;\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 0;\n color: tokens.$ifxColorBaseBlack;\n height: tokens.$ifxSize300;\n width: tokens.$ifxSize300;\n\n &:focus {\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 2px;\n }\n }\n }\n\n & .icon-wrapper {\n position: relative;\n min-width: tokens.$ifxSize600;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: tokens.$ifxColorOcean500;\n }\n\n & .alert-text {\n font-size: 16px;\n width: 100%;\n padding: 12px 0px 12px 12px;\n color: tokens.$ifxColorBaseBlack;\n\n white-space: pre-wrap;\n /* wraps text at spaces and within words */\n word-wrap: break-word;\n /* breaks text within a word if necessary */\n overflow-wrap: anywhere;\n /* breaks text at arbitrary points when needed */\n }\n\n &.primary {\n border: 1px solid tokens.$ifxColorOcean500;\n\n & .icon-wrapper {\n background-color: tokens.$ifxColorOcean500;\n color: tokens.$ifxColorBaseWhite;\n }\n }\n\n &.success {\n border: 1px solid tokens.$ifxColorGreen500;\n\n & .icon-wrapper {\n background-color: tokens.$ifxColorGreen500;\n color: tokens.$ifxColorBaseWhite;\n }\n }\n\n &.danger {\n border: 1px solid tokens.$ifxColorRed500;\n\n & .icon-wrapper {\n background-color: tokens.$ifxColorRed500;\n color: tokens.$ifxColorBaseWhite;\n }\n }\n\n &.warning {\n border: 1px solid tokens.$ifxColorOrange500;\n\n & .icon-wrapper {\n background-color: tokens.$ifxColorOrange500;\n color: tokens.$ifxColorBaseWhite;\n }\n }\n}\n\n.close-icon-wrapper {\n & ifx-icon {\n &:hover {\n cursor: pointer;\n }\n }\n}","import { Component, Prop, h, Event, EventEmitter, State } from '@stencil/core';\n\ndeclare global {\n interface Window {\n btntConfig?: any;\n btntQueue?: any;\n btnt?: any;\n }\n}\n\n@Component({\n tag: 'ifx-alert',\n styleUrl: 'alert.scss',\n shadow: true,\n})\nexport class Alert {\n @Prop() variant: 'primary' | 'success' | 'danger' | 'warning' | 'info' = 'primary';\n @Prop() icon: string;\n @Event() ifxClose: EventEmitter;\n @Prop() closable: boolean = true;\n @Prop() AriaLive = 'assertive';\n @State() uniqueId: string;\n\n alertTypeDescription = {\n \"primary\": 'Neutral alert',\n \"success\": 'Success Alert',\n \"danger\": 'Error Alert',\n \"warning\": 'Warning Alert',\n \"info\": 'Neutral alert',\n };\n\n handleClose() {\n this.ifxClose.emit();\n }\n\n renderCloseButton() {\n return (\n <div class=\"close-icon-wrapper\">\n <button onClick={this.handleClose.bind(this)} aria-label=\"Dismiss alert\">\n <ifx-icon icon=\"cross-16\" />\n </button>\n </div>\n );\n }\n\n generateUniqueId(prefix = 'id') {\n return `${prefix}-${Math.random().toString(36).substring(2, 9)}`;\n }\n\n componentWillLoad() { \n if (!this.uniqueId) {\n this.uniqueId = this.generateUniqueId('alert');\n }\n\n this.initalizeTracking()\n \n\n }\n\n initalizeTracking() { \n (function (t, r, kk, n, pp) {\n if (typeof window.btntConfig !== \"object\") {\n window.btntConfig = {\n domain: \"https://ssgtm.infineon.com\",\n withCookies: true,\n maxBatchSize: 10\n };\n }\n\n if (window[\"btnt\"]) return;\n\n window[\"btnt\"] = function (z) {\n if (typeof z !== \"object\") {\n z = {};\n }\n if (typeof window.btntQueue !== \"object\") {\n window.btntQueue = [];\n }\n window.btntQueue.push(z);\n };\n\n n = t.createElement(r);\n pp = t.getElementsByTagName(r)[0];\n n.async = 1;\n n.src = window.btntConfig.domain + \"/btnt.js\";\n pp.parentNode.insertBefore(n, pp);\n \n })(document, \"script\", );\n\n window.btnt({\n event_name: \"component_initialized\",\n component_name: 'ifx-alert',\n })\n }\n\n render() {\n return this.variant === 'info' ? (\n <div class=\"alert__info-wrapper\" role=\"alert\" aria-live={this.AriaLive} aria-describedby={this.alertTypeDescription[this.variant]} aria-labelledby=\"alert-text alert-description\">\n <div class=\"info__text-wrapper\">\n <div class=\"info__headline-wrapper\">\n <slot name=\"headline\" />\n </div>\n <div id={`alert-description-${this.uniqueId}`} class=\"info__description-wrapper\">\n <slot name=\"desc\" />\n </div>\n </div>\n {this.closable ? this.renderCloseButton() : null}\n </div>\n ) : (\n <div class={`alert ${this.variant}`} role=\"alert\">\n {this.icon && (\n <div class=\"icon-wrapper\">\n <ifx-icon icon={this.icon} />\n </div>\n )}\n <div class=\"alert-text\" id={`alert-text-${this.uniqueId}`}>\n <slot />\n </div>\n {this.closable ? this.renderCloseButton() : null}\n </div>\n );\n }\n}\n","@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: inline-flex;\n}\n\n.badge__container {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 4px 8px;\n gap: tokens.$ifxSpace100;\n border: 1px solid tokens.$ifxColorEngineering200;\n background-color: tokens.$ifxColorEngineering200;\n border-radius: 100px;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n font-size: tokens.$ifxFontSizeS;\n line-height: tokens.$ifxLineHeightS;\n font-weight: 400;\n color: tokens.$ifxColorBaseBlack;\n}","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'ifx-badge',\n styleUrl: 'badge.scss',\n shadow: true\n})\nexport class Badge {\n\n componentWillLoad() { \n this.initalizeTracking()\n }\n\n initalizeTracking() { \n (function (t, r, kk, n, pp) {\n if (typeof window.btntConfig !== \"object\") {\n window.btntConfig = {\n domain: \"https://ssgtm.infineon.com\",\n withCookies: true,\n maxBatchSize: 10\n };\n }\n\n if (window[\"btnt\"]) return;\n\n window[\"btnt\"] = function (z) {\n if (typeof z !== \"object\") {\n z = {};\n }\n if (typeof window.btntQueue !== \"object\") {\n window.btntQueue = [];\n }\n window.btntQueue.push(z);\n };\n\n n = t.createElement(r);\n pp = t.getElementsByTagName(r)[0];\n n.async = 1;\n n.src = window.btntConfig.domain + \"/btnt.js\";\n pp.parentNode.insertBefore(n, pp);\n \n })(document, \"script\", );\n\n window.btnt({\n event_name: \"component_initialized\",\n component_name: 'ifx-badge',\n })\n }\n\n render() {\n return (\n <div class=\"badge__container\">\n <slot />\n </div>\n );\n }\n}","@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n vertical-align: bottom;\n display: inline-flex;\n width: var(--bw, fit-content);\n}\n\n.btn {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: tokens.$ifxSize500;\n padding: 0px tokens.$ifxSpace200;\n gap: tokens.$ifxSpace100;\n color: tokens.$ifxColorBaseWhite;\n font-weight: tokens.$ifxFontWeightSemibold;\n border-radius: tokens.$ifxBorderRadius12;\n line-height: tokens.$ifxLineHeightM;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n\n font-style: normal;\n text-decoration: none;\n user-select: none;\n font-size: tokens.$ifxFontSizeM;\n transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;\n width: var(--bw, fit-content);\n}\n\n.btn:not(.disabled) {\n cursor: pointer;\n}\n\n.btn.disabled {\n pointer-events: none;\n}\n\n.btn-default {\n //default variant=primary; default color=default\n color: tokens.$ifxColorBaseWhite;\n background-color: tokens.$ifxColorOcean500;\n\n &:disabled,\n &.disabled {\n background-color: tokens.$ifxColorEngineering300;\n color: tokens.$ifxColorBaseWhite;\n pointer-events: none;\n\n }\n}\n\n.btn-secondary-default {\n background-color: tokens.$ifxColorBaseWhite;\n color: tokens.$ifxColorOcean500;\n border: 1px solid tokens.$ifxColorOcean500;\n\n &:disabled,\n &.disabled {\n background-color: tokens.$ifxColorBaseWhite;\n border: 1px solid tokens.$ifxColorEngineering300;\n color: tokens.$ifxColorEngineering300;\n pointer-events: none;\n\n }\n}\n\n.btn-tertiary-default {\n background-color: tokens.$ifxColorBaseTransparent;\n color: tokens.$ifxColorOcean500;\n\n &:disabled,\n &.disabled {\n color: tokens.$ifxColorEngineering300;\n pointer-events: none;\n\n }\n}\n\n\n.btn-danger {\n color: tokens.$ifxColorBaseWhite;\n background-color: tokens.$ifxColorRed500;\n border-color: tokens.$ifxColorRed500;\n\n &:disabled,\n &.disabled {\n background-color: tokens.$ifxColorEngineering300;\n color: tokens.$ifxColorBaseWhite;\n pointer-events: none;\n\n }\n}\n\n.btn-secondary-danger {\n background-color: tokens.$ifxColorBaseWhite;\n color: tokens.$ifxColorRed500;\n border: 1px solid tokens.$ifxColorRed500;\n\n &:disabled,\n &.disabled {\n background-color: tokens.$ifxColorBaseWhite;\n border: 1px solid tokens.$ifxColorEngineering300;\n color: tokens.$ifxColorEngineering300;\n pointer-events: none;\n\n }\n}\n\n.btn-tertiary-danger {\n //combination tertiary + danger not in design\n background-color: tokens.$ifxColorBaseTransparent;\n color: tokens.$ifxColorRed500;\n\n &:disabled,\n &.disabled {\n background-color: tokens.$ifxColorBaseWhite;\n color: tokens.$ifxColorEngineering300;\n pointer-events: none;\n\n }\n}\n\n.btn-inverse {\n color: tokens.$ifxColorOcean500;\n background-color: tokens.$ifxColorBaseWhite;\n\n &:disabled,\n &.disabled {\n opacity: tokens.$ifxOpacity100;\n background-color: tokens.$ifxColorBaseWhite;\n color: tokens.$ifxColorOcean500;\n pointer-events: none;\n }\n}\n\n.btn-secondary-inverse {\n color: tokens.$ifxColorBaseWhite;\n border: 1px solid tokens.$ifxColorBaseWhite;\n\n &:disabled,\n &.disabled {\n border: 1px solid tokens.$ifxColorBaseWhite;\n color: tokens.$ifxColorBaseWhite;\n pointer-events: none;\n\n }\n}\n\n\n.btn-tertiary-inverse {\n color: tokens.$ifxColorBaseWhite;\n\n &:disabled,\n &.disabled {\n color: tokens.$ifxColorBaseWhite;\n opacity: tokens.$ifxOpacity100;\n pointer-events: none;\n\n }\n}\n\n.btn {\n & ifx-icon:empty {\n display: none;\n }\n\n &.btn-xs {\n font-size: tokens.$ifxFontSizeS;\n height: tokens.$ifxSize400;\n line-height: tokens.$ifxLineHeightXs;\n }\n\n &.btn-s {\n font-size: tokens.$ifxFontSizeS;\n height: tokens.$ifxSize450;\n line-height: tokens.$ifxLineHeightS;\n }\n\n // &.btn-m { //default\n // font-size: tokens.$ifxFontSizeM;\n // height: tokens.$ifxSize400;\n // line-height: tokens.$ifxLineHeightM;\n // }\n\n\n &.btn-l {\n font-size: tokens.$ifxFontSizeXl;\n height: tokens.$ifxSize600;\n line-height: tokens.$ifxLineHeightXl;\n }\n\n\n\n &.btn-default:not(:disabled, .disabled) {\n &:focus:not(:active, .active) {\n outline: none;\n box-shadow: 0 0 0 2px tokens.$ifxColorBaseWhite, 0 0 0 4px tokens.$ifxColorOcean500;\n }\n\n &:hover {\n background-color: tokens.$ifxColorOcean600;\n }\n\n &:active,\n &.active {\n background-color: tokens.$ifxColorOcean700;\n }\n }\n\n &.btn-secondary-default:not(:disabled, .disabled) {\n &:focus:not(:active, .active) {\n outline: none;\n box-shadow: 0 0 0 2px tokens.$ifxColorBaseWhite, 0 0 0 4px tokens.$ifxColorOcean500;\n }\n\n &:hover {\n color: tokens.$ifxColorBaseWhite;\n background-color: tokens.$ifxColorOcean600;\n }\n\n &:active,\n &.active {\n background-color: tokens.$ifxColorOcean700;\n }\n }\n\n &.btn-secondary:not(:disabled, .disabled) {\n\n &:hover {\n background-color: tokens.$ifxColorBerry500;\n }\n\n &:active,\n &.active {\n background-color: tokens.$ifxColorBerry500;\n }\n }\n\n\n\n &.btn-danger:not(:disabled, .disabled) {\n &:focus:not(:active, .active) {\n outline: none;\n box-shadow: 0 0 0 2px tokens.$ifxColorBaseWhite, 0 0 0 4px tokens.$ifxColorOcean500;\n }\n\n &:hover {\n background-color: tokens.$ifxColorRed600;\n }\n\n &:active,\n &.active {\n background-color: tokens.$ifxColorRed700;\n }\n }\n\n &.btn-secondary-danger:not(:disabled, .disabled) {\n\n &:focus:not(:active, .active) {\n outline: none;\n box-shadow: 0 0 0 2px tokens.$ifxColorBaseWhite, 0 0 0 4px tokens.$ifxColorOcean500;\n }\n\n &:hover {\n color: tokens.$ifxColorBaseWhite;\n background-color: tokens.$ifxColorRed600;\n }\n\n &:active,\n &.active {\n background-color: tokens.$ifxColorRed700;\n }\n }\n\n\n &.btn-inverse:not(:disabled, .disabled) {\n &:focus:not(:active, .active) {\n outline: none;\n box-shadow: 0 0 0 2px tokens.$ifxColorOcean500, 0 0 0 4px tokens.$ifxColorBaseWhite;\n }\n\n &:hover {\n background-color: tokens.$ifxColorEngineering200;\n }\n\n &:active,\n &.active {\n background-color: tokens.$ifxColorEngineering300;\n }\n }\n\n &.btn-secondary-inverse:not(:disabled, .disabled) {\n &:focus:not(:active, .active) {\n outline: none;\n box-shadow: 0 0 0 2px tokens.$ifxColorOcean500, 0 0 0 4px tokens.$ifxColorBaseWhite;\n }\n\n &:hover {\n color: tokens.$ifxColorOcean500;\n background-color: tokens.$ifxColorEngineering200;\n }\n\n &:active,\n &.active {\n color: tokens.$ifxColorOcean500;\n background-color: tokens.$ifxColorEngineering300;\n }\n }\n\n\n\n &.btn-tertiary-default:not(:disabled, .disabled) {\n &:focus:not(:active, .active) {\n outline: none;\n box-shadow: 0 0 0 2px tokens.$ifxColorBaseWhite, 0 0 0 4px tokens.$ifxColorOcean600;\n }\n\n &:hover {\n color: tokens.$ifxColorOcean600;\n }\n\n &:active,\n &.active {\n color: tokens.$ifxColorOcean700;\n }\n\n\n }\n\n\n\n\n\n &.btn-tertiary-danger:not(:disabled, .disabled) {\n &:focus:not(:active, .active) {\n outline: none;\n box-shadow: 0 0 0 2px tokens.$ifxColorBaseWhite, 0 0 0 4px tokens.$ifxColorRed600;\n }\n\n &:hover {\n color: tokens.$ifxColorRed600;\n }\n\n &:active,\n &.active {\n color: tokens.$ifxColorRed700;\n }\n\n }\n\n\n &.btn-tertiary-inverse:not(:disabled, .disabled) {\n &:focus:not(:active, .active) {\n outline: none;\n box-shadow: 0 0 0 2px tokens.$ifxColorOcean500, 0 0 0 4px tokens.$ifxColorBaseWhite;\n }\n\n &:hover {\n color: tokens.$ifxColorEngineering200;\n\n }\n\n &:active,\n &.active {\n color: tokens.$ifxColorEngineering300;\n }\n }\n}","import { Component, Prop, h, Host, Method, Element, Listen, State, Watch } from '@stencil/core';\nimport classNames from 'classnames';\n \n\n@Component({\n tag: 'ifx-button',\n styleUrl: 'button.scss',\n shadow: true,\n})\nexport class Button {\n @Prop() variant: 'primary' | 'secondary' | 'tertiary' = 'primary';\n @Prop() theme: 'default' | 'danger' | 'inverse' = 'default';\n @Prop() size: string = 'm';\n @Prop() disabled: boolean = false;\n @State() internalHref: string;\n @Prop() href: string;\n @Prop() target: string = '_self';\n @Prop() type: \"button\" | \"submit\" | \"reset\" = \"button\";\n @Prop() fullWidth: boolean = false;\n @Prop() ariaLabel: string | null;\n @Element() el;\n\n private focusableElement: HTMLElement;\n private nativeButton: HTMLButtonElement | HTMLInputElement;\n\n @Watch('href')\n setInternalHref(newValue: string) {\n this.internalHref = newValue;\n }\n\n @Method()\n async setFocus() {\n this.focusableElement.focus();\n }\n\n initalizeTracking() { \n (function (t, r, kk, n, pp) {\n if (typeof window.btntConfig !== \"object\") {\n window.btntConfig = {\n domain: \"https://ssgtm.infineon.com\",\n withCookies: true,\n maxBatchSize: 10\n };\n }\n\n if (window[\"btnt\"]) return;\n\n window[\"btnt\"] = function (z) {\n if (typeof z !== \"object\") {\n z = {};\n }\n if (typeof window.btntQueue !== \"object\") {\n window.btntQueue = [];\n }\n window.btntQueue.push(z);\n };\n\n n = t.createElement(r);\n pp = t.getElementsByTagName(r)[0];\n n.async = 1;\n n.src = window.btntConfig.domain + \"/btnt.js\";\n pp.parentNode.insertBefore(n, pp);\n \n })(document, \"script\", );\n\n window.btnt({\n event_name: \"component_initialized\",\n component_name: 'ifx-button',\n })\n }\n\n insertNativeButton() {\n this.nativeButton = document.createElement('button');\n this.nativeButton.type = this.type;\n this.nativeButton.style.display = 'none';\n this.el.closest('form').appendChild(this.nativeButton);\n }\n\n handleFormAndInternalHref() {\n if (this.el.closest('form')) {\n if (this.el.href) {\n this.el.internalHref = undefined;\n }\n this.insertNativeButton()\n } else {\n this.internalHref = this.href;\n }\n }\n\n handleButtonWidth() {\n if (this.fullWidth) {\n this.el.style.setProperty('--bw', '100%');\n } else {\n this.el.style.setProperty('--bw', 'fit-content');\n }\n }\n\n componentWillLoad() {\n this.handleFormAndInternalHref()\n this.initalizeTracking()\n }\n\n componentWillRender() {\n this.handleButtonWidth()\n }\n\n\n\n handleClick = (ev: Event) => {\n if (this.el.shadowRoot) {\n const parentForm = this.el.closest('form');\n if (parentForm) {\n ev.preventDefault();\n\n if (this.type === 'reset') {\n // If the button type is 'reset', manually reset all custom form fields\n this.resetClickHandler(); //this will reset all ifx-text-fields within a form\n } else {\n const fakeButton = document.createElement('button');\n if (this.type) {\n fakeButton.type = this.type;\n }\n fakeButton.style.display = 'none';\n parentForm.appendChild(fakeButton);\n fakeButton.click();\n fakeButton.remove();\n }\n }\n }\n }\n\n resetClickHandler() {\n const formElement = this.el.closest('form');\n const customElements = formElement.querySelectorAll('ifx-text-field, ifx-textarea');\n customElements.forEach(element => {\n element.reset();\n });\n }\n\n @Listen('keydown')\n handleKeyDown(ev: KeyboardEvent) {\n if ( ev.key === \" \" || ev.key === 'Enter' && !this.disabled) {\n this.focusableElement.click();\n }\n }\n\n @Listen('click', { capture: true })\n handleHostClick(event: Event) {\n if (this.disabled === true) {\n event.stopImmediatePropagation();\n }\n }\n\n handleFocus(event: FocusEvent) {\n if (this.disabled) {\n event.preventDefault();\n this.focusableElement.blur();\n }\n }\n\n render() {\n return (\n <Host>\n <a\n role={this.href ? 'link' : 'button'}\n tabIndex={this.disabled ? -1 : 0}\n ref={(el) => (this.focusableElement = el)}\n class={this.getClassNames()}\n href={!this.disabled ? this.internalHref : undefined}\n target={this.target}\n onClick={this.handleClick}\n rel={this.target === '_blank' ? 'noopener noreferrer' : undefined}\n onFocus={(event) => this.handleFocus(event)}\n aria-disabled={this.disabled ? 'true' : null}\n aria-describedby={this.theme === 'danger' ? 'Dangerous action' : undefined}\n aria-label={this.ariaLabel || undefined}\n >\n <slot></slot>\n </a>\n </Host>\n );\n }\n\n\n getVariantClass() {\n return `${this.variant}` === \"secondary\"\n ? `secondary-${this.theme}`\n : `${this.variant}` === 'tertiary'\n ? `tertiary-${this.theme}`\n : `${this.theme}`;\n }\n\n getSizeClass() {\n if (`${this.size}` === \"xs\") {\n return \"xs\"\n }\n else if (`${this.size}` === \"s\") {\n return \"s\"\n }\n else if (`${this.size}` === \"l\") {\n return \"l\"\n }\n else return \"\";\n }\n\n getClassNames() {\n return classNames(\n 'btn',\n this.size && `btn-${this.getSizeClass()}`,\n `btn-${this.getVariantClass()}`,\n this.disabled ? 'disabled' : ''\n );\n }\n}","ifx-icon {\n display: inline-flex;\n justify-content: center;\n\n &:empty {\n display: none;\n }\n}","import { Component, Prop, h, Host, Event, EventEmitter, Watch, State } from '@stencil/core';\nimport { getIcon } from '@infineon/infineon-icons'\n \n\n\n@Component({\n tag: 'ifx-icon',\n styleUrl: './infineonIconStencil.scss'\n})\n\nexport class InfineonIconStencil {\n @Prop({ mutable: true }) icon: string = \"\"\n @Prop({ mutable: true }) ifxIcon: any;\n @State() internalIcon: string;\n @Event() consoleError: EventEmitter<boolean>;\n\n @Watch('icon')\n updateIcon(newIcon: string) { \n this.internalIcon = newIcon;\n this.setIcon()\n }\n\n convertStringToHtml(htmlString) { \n const div = document.createElement('div')\n div.innerHTML = htmlString\n return div.firstChild\n }\n\n convertHtmlToObject(htmlElement) { \n let pathToObject = Array\n .from(htmlElement.attributes, ({ name, value }) => ({ name, value }))\n .reduce((acc, current) => {\n acc[current.name] = current.value\n return acc\n }, {})\n\n return pathToObject\n }\n\n convertPathsToVnode(htmlPath) { \n let svgPaths = []\n const parentPath = this.convertHtmlToObject(htmlPath);\n const parentPathToVnode = h(\"path\", parentPath);\n svgPaths.push(parentPathToVnode)\n if(htmlPath.firstChild) { \n const paths = htmlPath.querySelectorAll('path');\n const pathLength = htmlPath.querySelectorAll('path').length;\n for(let i = 0; i < pathLength; i++) { \n let pathToObject = this.convertHtmlToObject(paths[i])\n let objToVnode = h(\"path\", pathToObject)\n svgPaths.push(objToVnode)\n } \n }\n return svgPaths\n }\n\n getSVG(svgPath) {\n const htmlPath = this.convertStringToHtml(this.ifxIcon) as SVGElement;\n const width = htmlPath.getAttribute('width');\n const height = htmlPath.getAttribute('height');\n const fill = htmlPath.getAttribute('fill');\n const viewBox = htmlPath.getAttribute('viewBox');\n \n return <svg class=\"inline-svg\" width={width} height={height} xmlns=\"http://www.w3.org/2000/svg\" fill={fill} viewBox={viewBox}>{...svgPath}</svg>\n }\n\n constructIcon() {\n if(this.ifxIcon) {\n const htmlPath = this.convertStringToHtml(this.ifxIcon)\n const svgPath = this.convertPathsToVnode(htmlPath)\n const SVG = this.getSVG(svgPath)\n return SVG;\n } else if(this.icon !== \"\") {\n console.error('Icon not found!')\n this.consoleError.emit(true)\n return;\n } else { \n return;\n }\n }\n\nsetIcon() { \n const toCamelCase = str =>\n str\n .replace(/[-_]+(.)/g, (_, chr) => chr.toUpperCase()) // handle - and _ to uppercase\n .replace(/^(.)/, (m) => m.toLowerCase()); // ensure first letter is lowercase\n\n const iconName = toCamelCase(this.internalIcon);\n this.ifxIcon = getIcon(iconName);\n}\n\n initalizeTracking() { \n (function (t, r, kk, n, pp) {\n if (typeof window.btntConfig !== \"object\") {\n window.btntConfig = {\n domain: \"https://ssgtm.infineon.com\",\n withCookies: true,\n maxBatchSize: 10\n };\n }\n\n if (window[\"btnt\"]) return;\n\n window[\"btnt\"] = function (z) {\n if (typeof z !== \"object\") {\n z = {};\n }\n if (typeof window.btntQueue !== \"object\") {\n window.btntQueue = [];\n }\n window.btntQueue.push(z);\n };\n\n n = t.createElement(r);\n pp = t.getElementsByTagName(r)[0];\n n.async = 1;\n n.src = window.btntConfig.domain + \"/btnt.js\";\n pp.parentNode.insertBefore(n, pp);\n \n })(document, \"script\", );\n\n window.btnt({\n event_name: \"component_initialized\",\n component_name: 'ifx-icon',\n })\n }\n\n componentWillLoad() {\n this.internalIcon = this.icon;\n this.setIcon()\n this.initalizeTracking()\n }\n\n render() {\n return (\n <Host>\n {this.constructIcon()}\n </Host>\n );\n }\n}"],"version":3}
@@ -4,44 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-7f4df11a.js');
6
6
 
7
- const alertCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}:host{display:block}.alert__info-wrapper{display:flex;padding:16px 24px;font-family:var(--ifx-font-family);box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1019607843)}.alert__info-wrapper .info__text-wrapper{display:flex;flex-direction:column;gap:8px;width:100%}.alert__info-wrapper .info__text-wrapper .info__headline-wrapper{display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.alert__info-wrapper .info__text-wrapper .info__headline-wrapper,.alert__info-wrapper .info__text-wrapper .info__description-wrapper{color:#1D1D1D;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.alert__info-wrapper .info__text-wrapper .info__headline-wrapper ::slotted(p),.alert__info-wrapper .info__text-wrapper .info__description-wrapper ::slotted(p){padding:0;margin:0}.alert__info-wrapper .info__text-wrapper .info__description-wrapper{font-weight:400}.alert__info-wrapper .close-icon-wrapper{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}.alert__info-wrapper .close-icon-wrapper button{all:unset;display:flex;align-items:center;justify-content:center;line-height:0;color:#1D1D1D;height:24px;width:24px}.alert__info-wrapper .close-icon-wrapper button:focus{outline:2px solid #0A8276;outline-offset:2px}.alert{display:flex;border:1px solid #0A8276;border-radius:1px;color:#1D1D1D;background-color:#FFFFFF;font-family:var(--ifx-font-family);box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1019607843)}.alert .close-icon-wrapper{display:flex;align-items:center;justify-content:center;min-width:40px}.alert .close-icon-wrapper button{all:unset;display:flex;align-items:center;justify-content:center;line-height:0;color:#1D1D1D;height:24px;width:24px}.alert .close-icon-wrapper button:focus{outline:2px solid #0A8276;outline-offset:2px}.alert .icon-wrapper{position:relative;min-width:48px;display:flex;justify-content:center;align-items:center;background-color:#0A8276}.alert .alert-text{font-size:16px;width:100%;padding:12px 0px 12px 12px;color:#1D1D1D;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;}.alert.primary{border:1px solid #0A8276}.alert.primary .icon-wrapper{background-color:#0A8276;color:#FFFFFF}.alert.success{border:1px solid #4CA460}.alert.success .icon-wrapper{background-color:#4CA460;color:#FFFFFF}.alert.danger{border:1px solid #CD002F}.alert.danger .icon-wrapper{background-color:#CD002F;color:#FFFFFF}.alert.warning{border:1px solid #E16B25}.alert.warning .icon-wrapper{background-color:#E16B25;color:#FFFFFF}.close-icon-wrapper ifx-icon:hover{cursor:pointer}";
8
- const IfxAlertStyle0 = alertCss;
9
-
10
- const Alert = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.ifxClose = index.createEvent(this, "ifxClose", 7);
14
- this.variant = 'primary';
15
- this.closable = true;
16
- this.AriaLive = 'assertive';
17
- this.alertTypeDescription = {
18
- "primary": 'Neutral alert',
19
- "success": 'Success Alert',
20
- "danger": 'Error Alert',
21
- "warning": 'Warning Alert',
22
- "info": 'Neutral alert',
23
- };
24
- }
25
- handleClose() {
26
- this.ifxClose.emit();
27
- }
28
- renderCloseButton() {
29
- return (index.h("div", { class: "close-icon-wrapper" }, index.h("button", { onClick: this.handleClose.bind(this), "aria-label": "Dismiss alert" }, index.h("ifx-icon", { icon: "cross-16" }))));
30
- }
31
- generateUniqueId(prefix = 'id') {
32
- return `${prefix}-${Math.random().toString(36).substring(2, 9)}`;
33
- }
34
- componentWillLoad() {
35
- if (!this.uniqueId) {
36
- this.uniqueId = this.generateUniqueId('alert');
37
- }
38
- }
39
- render() {
40
- return this.variant === 'info' ? (index.h("div", { class: "alert__info-wrapper", role: "alert", "aria-live": this.AriaLive, "aria-describedby": this.alertTypeDescription[this.variant], "aria-labelledby": "alert-text alert-description" }, index.h("div", { class: "info__text-wrapper" }, index.h("div", { class: "info__headline-wrapper" }, index.h("slot", { name: "headline" })), index.h("div", { id: `alert-description-${this.uniqueId}`, class: "info__description-wrapper" }, index.h("slot", { name: "desc" }))), this.closable ? this.renderCloseButton() : null)) : (index.h("div", { class: `alert ${this.variant}`, role: "alert" }, this.icon && (index.h("div", { class: "icon-wrapper" }, index.h("ifx-icon", { icon: this.icon }))), index.h("div", { class: "alert-text", id: `alert-text-${this.uniqueId}` }, index.h("slot", null)), this.closable ? this.renderCloseButton() : null));
41
- }
42
- };
43
- Alert.style = IfxAlertStyle0;
44
-
45
7
  const templateCss = ".react__template-wrapper{display:flex;width:300px;height:200px;border-radius:3px;border:1px solid #ccc}.react__template-wrapper.hide{display:none}.react__template-wrapper:hover{cursor:pointer}.template__page-wrapper{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.template__page-wrapper .repository__url{text-decoration:none}.input__fields-wrapper{display:flex;flex-direction:column;gap:10px}.details__wrapper{display:flex;flex-direction:column;gap:10px}.selection__buttons-wrapper{display:flex;gap:10px;padding-top:10px;align-items:center}.selection__buttons-wrapper .vue__label{color:#ccc}.selection__buttons-wrapper label:not(.vue__label):hover{cursor:pointer}.selection__buttons-wrapper .selection__input{display:flex;align-items:center;gap:5px}.selection__buttons-wrapper .selection__input input{margin:0;height:20px;width:20px}.selection__buttons-wrapper .selection__input input:hover:not(.vue__input){cursor:pointer}.image__wrapper img{position:relative;width:300px;height:100%;border-radius:3px;object-fit:contain;transition:transform 0.2s}.image__wrapper img:hover{transform:scale(2);top:50px;z-index:100}";
46
8
  const IfxTemplateStyle0 = templateCss;
47
9
 
@@ -189,7 +151,6 @@ const Template = class {
189
151
  };
190
152
  Template.style = IfxTemplateStyle0;
191
153
 
192
- exports.ifx_alert = Alert;
193
154
  exports.ifx_template = Template;
194
155
 
195
- //# sourceMappingURL=ifx-alert_2.cjs.entry.js.map
156
+ //# sourceMappingURL=ifx-template.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"ifx-template.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,WAAW,GAAG,4oCAA4oC,CAAC;AACjqC,0BAAe,WAAW;;MCMb,QAAQ;IALrB;;;;QAOW,gBAAW,GAAsD,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;QAEvG,gBAAW,GAAY,KAAK,CAAC;QAC7B,mBAAc,GAAY,KAAK,CAAC;QAChC,cAAS,GAAY,IAAI,CAAC;QAO3B,aAAQ,GAAG,sBAAsB,CAAA;QACjC,gBAAW,GAAG,kGAAkG,CAAC;QACjH,UAAK,GAAG,eAAe,CAAA;QACvB,UAAK,GAAG,aAAa,CAAA;KA8K9B;IA5KC,QAAQ;QACN,MAAM,gBAAgB,GAAG,2CAA2C;YAClE,aAAa,IAAI,CAAC,QAAQ,GAAG;YAC7B,gBAAgB,IAAI,CAAC,WAAW,GAAG;YACnC,SAAS,IAAI,CAAC,KAAK,GAAG;YACtB,SAAS,IAAI,CAAC,KAAK,EAAE,CAAC;QAEtB,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;KAC3C;IAED,gBAAgB;QACd,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC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AE,IAAI,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,cAAc,EAAE,EAAE,OAAO,EAAC,SAAS,wBAA+B,CAC/G,CAEF,CACF,CACF,EACN;KACL;;;;;;;","names":["h"],"sources":["src/components/templates/template/template.scss?tag=ifx-template&encapsulation=shadow","src/components/templates/template/template.tsx"],"sourcesContent":["\n.react__template-wrapper { \n display: flex;\n width: 300px;\n height: 200px;\n border-radius: 3px;\n border: 1px solid #ccc;\n\n &.hide { \n display: none;\n }\n \n &:hover { \n cursor: pointer;\n }\n}\n\n.template__page-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n\n & .repository__url { \n text-decoration: none;\n }\n}\n\n.input__fields-wrapper { \n display: flex;\n flex-direction: column;\n gap: 10px;\n\n}\n\n.details__wrapper { \n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.selection__buttons-wrapper { \n display: flex;\n gap: 10px;\n padding-top: 10px;\n align-items: center;\n & .vue__label { \n color: #ccc;\n }\n\n & label:not(.vue__label) { \n &:hover { \n cursor: pointer;\n }\n }\n\n & .selection__input { \n display: flex;\n align-items: center;\n gap: 5px;\n & input { \n margin: 0;\n height: 20px;\n width: 20px;\n &:hover:not(.vue__input) { \n cursor: pointer;\n }\n }\n }\n}\n\n.image__wrapper { \n img { \n position: relative;\n width: 300px;\n height: 100%;\n border-radius: 3px;\n object-fit: contain;\n transition: transform .2s;\n &:hover { \n transform: scale(2);\n top: 50px;\n z-index: 100;\n }\n }\n}","import { Component, h, Element, State, Prop, Event, EventEmitter, Method } from '@stencil/core';\n\n@Component({\n tag: 'ifx-template',\n styleUrl: 'template.scss',\n shadow: true,\n})\nexport class Template {\n @Element() el: HTMLElement;\n @State() repoDetails: { name: string, desc: string, framework: string } = { name: \"\", desc: \"\", framework: \"\" };\n @State() repoUrl: string;\n @State() showDetails: boolean = false;\n @State() isTemplatePage: boolean = false;\n @State() isLoading: boolean = true;\n @State() repoError: string;\n @Prop() name: string;\n @Event() toggleTemplates: EventEmitter;\n @Event() fieldError: EventEmitter;\n @Prop() thumbnail: string;\n \n private clientId = 'Ov23lixmXiNTTNb6V5W6'\n private redirectUri = 'https://infineon.github.io/infineon-design-system-stencil/?path=/docs/dds-templates--development';\n private scope = 'repo workflow'\n private state = 'template123'\n\n authUser() { \n const authorizationUrl = `https://github.com/login/oauth/authorize?` +\n `client_id=${this.clientId}&` +\n `redirect_uri=${this.redirectUri}&` +\n `scope=${this.scope}&` +\n `state=${this.state}`;\n \n window.open(authorizationUrl, '_blank'); \n }\n\n componentDidLoad() { \n const url = new URL(window.location.href);\n const code = url.searchParams.get('code');\n const { templateName } = this.getLocalStorageValues()\n if(code && this.name === templateName) { \n this.isTemplatePage = true;\n this.toggleTemplates.emit('details')\n this.getUserToken(code)\n } \n }\n\n getLocalStorageValues() { \n const repoName = localStorage.getItem('repo_name');\n const repoDesc = localStorage.getItem('repo_desc');\n const repoFramework = localStorage.getItem('repo_framework');\n const templateName = localStorage.getItem('selectedTemplate');\n return { repoName, repoDesc, repoFramework, templateName }\n }\n\n async getUserToken(authCode) {\n const { repoName, repoDesc, repoFramework, templateName } = this.getLocalStorageValues();\n\n fetch(`https://ddstemplate-srv.cfapps.eu10-004.hana.ondemand.com/token/${authCode}/${repoName}/${repoDesc}/${repoFramework}/${templateName}`)\n .then(response => {\n if (response.ok) {\n return response.text();\n } else {\n return response.text().then(errorMessage => {\n throw new Error(errorMessage);\n });\n }\n })\n .then(data => { \n if(data) { \n this.isLoading = false;\n this.repoUrl = data;\n localStorage.clear();\n } \n })\n .catch(error => {\n this.repoError = error.message;\n console.error('Error:', error.message)\n });\n }\n\n handleUserInput(e, type) { \n if (type === 'name') {\n this.repoDetails = { ...this.repoDetails, name: e.target.value };\n } else if (type === 'desc') {\n this.repoDetails = { ...this.repoDetails, desc: e.target.value };\n } else if(type === 'framework') { \n this.repoDetails = { ...this.repoDetails, framework: e.target.value };\n }\n }\n\n submitUserData() { \n if(this.repoDetails.name && this.repoDetails.desc && this.repoDetails.framework) { \n localStorage.setItem('repo_name', this.repoDetails.name);\n localStorage.setItem('repo_desc', this.repoDetails.desc);\n localStorage.setItem('repo_framework', this.repoDetails.framework);\n localStorage.setItem('selectedTemplate', this.name);\n this.fieldError.emit(false)\n this.authUser()\n } else { \n this.fieldError.emit('All fields are mandatory')\n }\n }\n\n togglePadding(action) { \n let parent = this.el.parentElement;\n if (parent) {\n const rootNode = parent.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n parent = rootNode.host.parentElement;\n } else {\n parent = parent.parentElement;\n }\n if(action === 'remove') { \n parent.parentElement.style.padding = '0px';\n } else if(action === 'add') { \n parent.parentElement.style.padding = '4rem 20px';\n }\n }\n }\n\n handleCurrentTemplate(e) { \n if(e && !this.showDetails) { \n this.togglePadding('remove')\n const targetTemplate = e.currentTarget;\n this.toggleTemplates.emit(targetTemplate)\n this.showDetails = true;\n } \n }\n\n @Method()\n async toggleTemplate(currTemp) { \n const templateWrapper = this.el.shadowRoot.querySelector('.react__template-wrapper');\n if(templateWrapper) { \n if(!templateWrapper.classList.contains('hide') && currTemp ) { \n if(templateWrapper !== currTemp) {\n templateWrapper.classList.add('hide')\n }\n } else { \n if(this.showDetails) { \n this.showDetails = false;\n }\n this.togglePadding('add')\n templateWrapper.classList.remove('hide')\n }\n }\n }\n\n \n render() {\n return (\n <div>\n {this.isTemplatePage \n ? \n <div class=\"template__page-wrapper\">\n {!this.repoUrl && !this.repoError && \n <div>\n <h3>Your repository is getting ready..</h3>\n <p>This will only take a minute.</p>\n </div>}\n {this.isLoading && !this.repoError && <div><ifx-spinner variant='default' size='s' /></div>}\n {this.repoUrl && <ifx-link href={this.repoUrl} target=\"_parent\" size=\"m\" variant=\"underlined\">Your repository</ifx-link>}\n {this.repoError && <div>{this.repoError}</div>}\n </div> \n : \n <div class=\"react__template-container\">\n <div class=\"react__template-wrapper\" onClick={(e) => this.handleCurrentTemplate(e)}>\n <div class=\"image__wrapper\">\n <img src={this.thumbnail} />\n </div>\n </div>\n {this.showDetails && \n <div class=\"details__wrapper\">\n <div class=\"selection__buttons-wrapper\">\n <div class=\"selection__input\">\n <input type=\"radio\" id=\"react\" name=\"chosen_framework\" value=\"react\" onInput={(e) => this.handleUserInput(e, 'framework')} />\n <label htmlFor=\"react\">React</label>\n </div>\n <div class=\"selection__input vue\">\n <input class=\"vue__input\" disabled type=\"radio\" id=\"vue\" name=\"chosen_framework\" value=\"vue\" onInput={(e) => this.handleUserInput(e, 'framework')}/>\n <label class=\"vue__label\" htmlFor=\"vue\">Vue</label> (Soon)\n </div>\n </div>\n \n\n <div class=\"input__fields-wrapper\">\n <ifx-text-field required={true} onInput={(e) => this.handleUserInput(e, 'name')} size=\"m\" icon=\"c-info-16\" placeholder=\"Your repository name\">Repository Name</ifx-text-field>\n\n <ifx-text-field required={true} size=\"m\" icon=\"c-info-16\" onInput={(e) => this.handleUserInput(e, 'desc')} placeholder=\"Your repository description\">Repository Description</ifx-text-field>\n\n <ifx-button fullWidth={true} onClick={() => this.submitUserData()} variant='primary'>Generate template</ifx-button>\n </div>\n \n </div>}\n </div>}\n </div>\n );\n }\n}"],"version":3}