@sapudex/web-components 2.2.0 → 2.3.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 (176) hide show
  1. package/bundle.esm.js +1 -0
  2. package/cypress/fixtures/event-ribbon-links.ts +5 -0
  3. package/cypress/specs/Accordion.cy.tsx +1 -2
  4. package/cypress/specs/AccordionItem.cy.tsx +1 -1
  5. package/cypress/specs/Avatar.cy.tsx +1 -1
  6. package/cypress/specs/AvatarGroup.cy.tsx +1 -2
  7. package/cypress/specs/Badge.cy.tsx +1 -1
  8. package/cypress/specs/CountrySelector.cy.tsx +10 -4
  9. package/cypress/specs/EventRibbon.cy.tsx +110 -0
  10. package/cypress/specs/Footer.cy.tsx +1 -1
  11. package/cypress/specs/ListItem.cy.tsx +1 -1
  12. package/cypress/specs/PhoneNumberField.cy.tsx +4 -2
  13. package/cypress/specs/Review.cy.tsx +1 -3
  14. package/cypress/specs/ReviewItem.cy.tsx +1 -1
  15. package/cypress/specs/SecondaryNavigationDesktop.cy.tsx +123 -116
  16. package/cypress/specs/SecondaryNavigationMobile.cy.tsx +27 -38
  17. package/cypress/specs/SelectBox.cy.tsx +93 -88
  18. package/cypress/specs/Slider.cy.tsx +1 -1
  19. package/cypress/specs/StatusBadge.cy.tsx +1 -1
  20. package/cypress/specs/StatusMessage.cy.tsx +1 -1
  21. package/cypress/specs/Switch.cy.tsx +1 -2
  22. package/cypress/specs/Table.cy.tsx +1 -9
  23. package/cypress/specs/Tag.cy.tsx +1 -1
  24. package/cypress/specs/TagGroup.cy.tsx +1 -2
  25. package/cypress/specs/TextField.cy.tsx +1 -1
  26. package/cypress/specs/Textarea.cy.tsx +1 -1
  27. package/cypress/specs/Toast.cy.tsx +1 -1
  28. package/cypress/specs/Tooltip.cy.tsx +1 -2
  29. package/cypress/specs/TruncatedText.cy.tsx +2 -1
  30. package/cypress/specs/Upload.cy.tsx +1 -2
  31. package/cypress/specs/UploadItem.cy.tsx +1 -1
  32. package/cypress/specs/Wizard.cy.tsx +7 -4
  33. package/cypress/support/component-imports.instrumented.ts +91 -0
  34. package/cypress/support/component-imports.src.ts +91 -0
  35. package/cypress/support/component.ts +1 -1
  36. package/cypress.config.ts +6 -0
  37. package/dist/AssetsVariables.js +4 -0
  38. package/dist/AssetsVariables.js.map +1 -1
  39. package/dist/Button.d.ts +7 -0
  40. package/dist/Button.js +3 -0
  41. package/dist/Button.js.map +1 -1
  42. package/dist/CountrySelector.d.ts +2 -2
  43. package/dist/CountrySelector.js +3 -1
  44. package/dist/CountrySelector.js.map +1 -1
  45. package/dist/DatePicker.js +2 -1
  46. package/dist/DatePicker.js.map +1 -1
  47. package/dist/EventRibbon.d.ts +80 -0
  48. package/dist/EventRibbon.js +111 -0
  49. package/dist/EventRibbon.js.map +1 -0
  50. package/dist/EventRibbonTemplate.d.ts +2 -0
  51. package/dist/EventRibbonTemplate.js +7 -0
  52. package/dist/EventRibbonTemplate.js.map +1 -0
  53. package/dist/HeroBanner.d.ts +1 -1
  54. package/dist/MastheadShell.d.ts +4 -1
  55. package/dist/MastheadShell.js +21 -5
  56. package/dist/MastheadShell.js.map +1 -1
  57. package/dist/Pagination.d.ts +17 -3
  58. package/dist/Pagination.js +33 -31
  59. package/dist/Pagination.js.map +1 -1
  60. package/dist/PhoneNumberField.d.ts +5 -5
  61. package/dist/PhoneNumberField.js +1 -1
  62. package/dist/PhoneNumberField.js.map +1 -1
  63. package/dist/SearchableListBase.d.ts +9 -0
  64. package/dist/SearchableListBase.js +10 -2
  65. package/dist/SearchableListBase.js.map +1 -1
  66. package/dist/TextField.d.ts +7 -0
  67. package/dist/TextField.js +3 -0
  68. package/dist/TextField.js.map +1 -1
  69. package/dist/Wizard.d.ts +20 -1
  70. package/dist/Wizard.js +22 -9
  71. package/dist/Wizard.js.map +1 -1
  72. package/dist/WizardTemplate.js +1 -1
  73. package/dist/WizardTemplate.js.map +1 -1
  74. package/dist/assets/{InputSuggestions-KGCQrV_T.js → InputSuggestions-BgbbJ4tc.js} +1 -1
  75. package/dist/assets/{ListItemStandardExpandableTextTemplate-D4zLIdLd.js → ListItemStandardExpandableTextTemplate-onAnn1Tj.js} +1 -1
  76. package/dist/assets/{bundle.esm-Diw1zQ-o.js → bundle.esm-CwUfibNQ.js} +228 -223
  77. package/dist/css/themes/Button.css +1 -1
  78. package/dist/css/themes/DatePickerPopover.css +1 -1
  79. package/dist/css/themes/EventRibbon.css +1 -0
  80. package/dist/css/themes/MastheadCountrySelector.css +1 -1
  81. package/dist/css/themes/MastheadItem.css +1 -1
  82. package/dist/css/themes/MastheadShell.css +1 -1
  83. package/dist/css/themes/Modal.css +1 -1
  84. package/dist/css/themes/Pagination.css +1 -1
  85. package/dist/css/themes/RatingIndicator.css +1 -1
  86. package/dist/css/themes/Slider.css +1 -1
  87. package/dist/css/themes/TextField.css +1 -1
  88. package/dist/custom-elements-internal.json +342 -0
  89. package/dist/custom-elements.json +341 -0
  90. package/dist/data/CountryListISO3166.d.ts +13 -4
  91. package/dist/data/CountryListISO3166.js +8 -0
  92. package/dist/data/CountryListISO3166.js.map +1 -1
  93. package/dist/generated/templates/PaginationTemplate.lit.js +1 -1
  94. package/dist/generated/templates/PaginationTemplate.lit.js.map +1 -1
  95. package/dist/generated/templates/PhoneNumberFieldTemplate.lit.js +2 -2
  96. package/dist/generated/templates/PhoneNumberFieldTemplate.lit.js.map +1 -1
  97. package/dist/generated/themes/Button.css.d.ts +1 -1
  98. package/dist/generated/themes/Button.css.js +1 -1
  99. package/dist/generated/themes/Button.css.js.map +1 -1
  100. package/dist/generated/themes/DatePickerPopover.css.d.ts +1 -1
  101. package/dist/generated/themes/DatePickerPopover.css.js +1 -1
  102. package/dist/generated/themes/DatePickerPopover.css.js.map +1 -1
  103. package/dist/generated/themes/EventRibbon.css.d.ts +2 -0
  104. package/dist/generated/themes/EventRibbon.css.js +8 -0
  105. package/dist/generated/themes/EventRibbon.css.js.map +1 -0
  106. package/dist/generated/themes/MastheadCountrySelector.css.d.ts +1 -1
  107. package/dist/generated/themes/MastheadCountrySelector.css.js +1 -1
  108. package/dist/generated/themes/MastheadCountrySelector.css.js.map +1 -1
  109. package/dist/generated/themes/MastheadItem.css.d.ts +1 -1
  110. package/dist/generated/themes/MastheadItem.css.js +1 -1
  111. package/dist/generated/themes/MastheadItem.css.js.map +1 -1
  112. package/dist/generated/themes/MastheadShell.css.d.ts +1 -1
  113. package/dist/generated/themes/MastheadShell.css.js +1 -1
  114. package/dist/generated/themes/MastheadShell.css.js.map +1 -1
  115. package/dist/generated/themes/Modal.css.d.ts +1 -1
  116. package/dist/generated/themes/Modal.css.js +1 -1
  117. package/dist/generated/themes/Modal.css.js.map +1 -1
  118. package/dist/generated/themes/Pagination.css.d.ts +1 -1
  119. package/dist/generated/themes/Pagination.css.js +1 -1
  120. package/dist/generated/themes/Pagination.css.js.map +1 -1
  121. package/dist/generated/themes/RatingIndicator.css.d.ts +1 -1
  122. package/dist/generated/themes/RatingIndicator.css.js +1 -1
  123. package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
  124. package/dist/generated/themes/Slider.css.d.ts +1 -1
  125. package/dist/generated/themes/Slider.css.js +1 -1
  126. package/dist/generated/themes/Slider.css.js.map +1 -1
  127. package/dist/generated/themes/TextField.css.d.ts +1 -1
  128. package/dist/generated/themes/TextField.css.js +1 -1
  129. package/dist/generated/themes/TextField.css.js.map +1 -1
  130. package/dist/types/EventRibbon.d.ts +37 -0
  131. package/dist/types/EventRibbon.js +43 -0
  132. package/dist/types/EventRibbon.js.map +1 -0
  133. package/dist/vscode.html-custom-data.json +99 -0
  134. package/dist/web-types.json +150 -1
  135. package/filter-coverage.js +58 -0
  136. package/package.json +7 -2
  137. package/src/AssetsVariables.ts +4 -0
  138. package/src/Button.ts +9 -0
  139. package/src/CountrySelector.ts +5 -3
  140. package/src/DatePicker.ts +2 -1
  141. package/src/EventRibbon.ts +143 -0
  142. package/src/EventRibbonTemplate.tsx +18 -0
  143. package/src/MastheadShell.ts +25 -5
  144. package/src/Pagination.hbs +7 -3
  145. package/src/Pagination.ts +48 -31
  146. package/src/PhoneNumberField.hbs +1 -1
  147. package/src/PhoneNumberField.ts +7 -2
  148. package/src/SearchableListBase.ts +18 -2
  149. package/src/TextField.ts +9 -0
  150. package/src/Wizard.ts +39 -11
  151. package/src/WizardTemplate.tsx +5 -1
  152. package/src/data/CountryListISO3166.ts +10 -2
  153. package/src/generated/templates/PaginationTemplate.lit.ts +1 -1
  154. package/src/generated/templates/PhoneNumberFieldTemplate.lit.ts +1 -1
  155. package/src/generated/themes/Button.css.ts +1 -1
  156. package/src/generated/themes/DatePickerPopover.css.ts +1 -1
  157. package/src/generated/themes/EventRibbon.css.ts +9 -0
  158. package/src/generated/themes/MastheadCountrySelector.css.ts +1 -1
  159. package/src/generated/themes/MastheadItem.css.ts +1 -1
  160. package/src/generated/themes/MastheadShell.css.ts +1 -1
  161. package/src/generated/themes/Modal.css.ts +1 -1
  162. package/src/generated/themes/Pagination.css.ts +1 -1
  163. package/src/generated/themes/RatingIndicator.css.ts +1 -1
  164. package/src/generated/themes/Slider.css.ts +1 -1
  165. package/src/generated/themes/TextField.css.ts +1 -1
  166. package/src/themes/Button.css +69 -27
  167. package/src/themes/DatePickerPopover.css +64 -6
  168. package/src/themes/EventRibbon.css +411 -0
  169. package/src/themes/MastheadCountrySelector.css +8 -5
  170. package/src/themes/MastheadItem.css +12 -4
  171. package/src/themes/MastheadShell.css +3 -1
  172. package/src/themes/Modal.css +4 -0
  173. package/src/themes/Pagination.css +19 -0
  174. package/src/themes/TextField.css +2 -13
  175. package/src/types/EventRibbon.ts +51 -0
  176. package/swap-component-imports.js +18 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@sapudex/web-components",
4
- "version": "2.2.0",
4
+ "version": "2.3.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -690,6 +690,11 @@
690
690
  "description": "Defines if the component would display a loading indicator.",
691
691
  "value": { "type": "boolean | undefined", "default": "false" }
692
692
  },
693
+ {
694
+ "name": "show-search-input",
695
+ "description": "Defines if the search input is visible.",
696
+ "value": { "type": "boolean", "default": "false" }
697
+ },
693
698
  {
694
699
  "name": "busy-delay",
695
700
  "description": "Defines the delay in milliseconds, after which the busy indicator will show up for this component.",
@@ -838,6 +843,11 @@
838
843
  "description": "Defines if the component would display a loading indicator.",
839
844
  "value": { "type": "boolean | undefined" }
840
845
  },
846
+ {
847
+ "name": "show-search-input",
848
+ "description": "Defines if the search input is visible.",
849
+ "value": { "type": "boolean" }
850
+ },
841
851
  {
842
852
  "name": "busy-delay",
843
853
  "description": "Defines the delay in milliseconds, after which the busy indicator will show up for this component.",
@@ -1103,6 +1113,105 @@
1103
1113
  "events": []
1104
1114
  }
1105
1115
  },
1116
+ {
1117
+ "name": "udex-event-ribbon",
1118
+ "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-event-ribbon</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/EventRibbon.js\";</code>\n---\n",
1119
+ "doc-url": "",
1120
+ "attributes": [
1121
+ {
1122
+ "name": "event-logo",
1123
+ "description": "Defines the text of the event logo.",
1124
+ "value": {
1125
+ "type": "\"sapphire\" | \"sapphire-stacked\" | \"connect\" | \"connect-stacked\" | \"teched\" | \"teched-stacked\" | \"now\"",
1126
+ "default": "\"\""
1127
+ }
1128
+ },
1129
+ {
1130
+ "name": "event-link",
1131
+ "description": "Defines the link details of the event ribbon.",
1132
+ "value": { "type": "string", "default": "\"{}\"" }
1133
+ },
1134
+ {
1135
+ "name": "event-link-icon",
1136
+ "description": "Defines the icon displayed next to the link.",
1137
+ "value": {
1138
+ "type": "\"add-calendar\" | \"media-play\"",
1139
+ "default": "\"\""
1140
+ }
1141
+ },
1142
+ {
1143
+ "name": "event-text",
1144
+ "description": "Defines the text displayed in event ribbon.",
1145
+ "value": { "type": "string", "default": "\"\"" }
1146
+ },
1147
+ {
1148
+ "name": "mode",
1149
+ "description": "Defines whether event-ribbon uses dark or light theme.",
1150
+ "value": {
1151
+ "type": "\"dark\" | \"light\"",
1152
+ "default": "\"light\""
1153
+ }
1154
+ },
1155
+ {
1156
+ "name": "background-color-scheme",
1157
+ "description": "Defines the solid background color.",
1158
+ "value": {
1159
+ "type": "\"Mango1\" | \"Mango2\" | \"Mango3\" | \"Mango4\" | \"Red1\" | \"Red2\" | \"Red3\" | \"Red4\" | \"Raspberry1\" | \"Raspberry2\" | \"Raspberry3\" | \"Raspberry4\" | \"Pink1\" | \"Pink2\" | \"Pink3\" | \"Pink4\" | ... 19 more ... | \"Grey4\"",
1160
+ "default": "\"Blue\""
1161
+ }
1162
+ },
1163
+ {
1164
+ "name": "background-image",
1165
+ "description": "Allows control over the background image source.",
1166
+ "value": { "type": "string | undefined" }
1167
+ }
1168
+ ],
1169
+ "events": [],
1170
+ "js": {
1171
+ "properties": [
1172
+ {
1173
+ "name": "event-logo",
1174
+ "description": "Defines the text of the event logo.",
1175
+ "value": {
1176
+ "type": "\"sapphire\" | \"sapphire-stacked\" | \"connect\" | \"connect-stacked\" | \"teched\" | \"teched-stacked\" | \"now\""
1177
+ }
1178
+ },
1179
+ {
1180
+ "name": "event-link",
1181
+ "description": "Defines the link details of the event ribbon.",
1182
+ "value": { "type": "string" }
1183
+ },
1184
+ {
1185
+ "name": "event-link-icon",
1186
+ "description": "Defines the icon displayed next to the link.",
1187
+ "value": { "type": "\"add-calendar\" | \"media-play\"" }
1188
+ },
1189
+ {
1190
+ "name": "event-text",
1191
+ "description": "Defines the text displayed in event ribbon.",
1192
+ "value": { "type": "string" }
1193
+ },
1194
+ {
1195
+ "name": "mode",
1196
+ "description": "Defines whether event-ribbon uses dark or light theme.",
1197
+ "value": { "type": "\"dark\" | \"light\"" }
1198
+ },
1199
+ {
1200
+ "name": "background-color-scheme",
1201
+ "description": "Defines the solid background color.",
1202
+ "value": {
1203
+ "type": "\"Mango1\" | \"Mango2\" | \"Mango3\" | \"Mango4\" | \"Red1\" | \"Red2\" | \"Red3\" | \"Red4\" | \"Raspberry1\" | \"Raspberry2\" | \"Raspberry3\" | \"Raspberry4\" | \"Pink1\" | \"Pink2\" | \"Pink3\" | \"Pink4\" | ... 19 more ... | \"Grey4\""
1204
+ }
1205
+ },
1206
+ {
1207
+ "name": "background-image",
1208
+ "description": "Allows control over the background image source.",
1209
+ "value": { "type": "string | undefined" }
1210
+ }
1211
+ ],
1212
+ "events": []
1213
+ }
1214
+ },
1106
1215
  {
1107
1216
  "name": "udex-filter-menu",
1108
1217
  "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-filter-menu</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/UDExFilterMenu.js\";</code>\n---\n\n\n### **Events:**\n - **reset-click** - Fired event when the user click on a reset button on the footer.\n- **result-click** - Fired event when the user click on a result button on the footer.\n- **select-all** - Fired event when the user click on Select All header item.\n- **before-open** - Fired before the dropdown pane is opened.\n- **after-open** - Fired after the dropdown pane is opened.\n- **before-close** - Fired before the dropdown pane is closed.\n- **after-close** - Fired after the dropdown pane is closed.\n- **selection-change** - \n- **submit-search** - Fired event when the user clicks on the submitted icon in the search.\n- **reset-search** - Fired event when the user clicks on the reset button in the search.\n- **change-search** - Fired event when the user submitted the value in the search.\n\n### **Methods:**\n - **resetSearch()** - Reset the search value.\n\n### **Slots:**\n - **default** - Slot for items.",
@@ -1213,6 +1322,11 @@
1213
1322
  "description": "Defines if the component would display a loading indicator.",
1214
1323
  "value": { "type": "boolean | undefined", "default": "false" }
1215
1324
  },
1325
+ {
1326
+ "name": "show-search-input",
1327
+ "description": "Defines if the search input is visible.",
1328
+ "value": { "type": "boolean", "default": "false" }
1329
+ },
1216
1330
  {
1217
1331
  "name": "busy-delay",
1218
1332
  "description": "Defines the delay in milliseconds, after which the busy indicator will show up for this component.",
@@ -1386,6 +1500,11 @@
1386
1500
  "description": "Defines if the component would display a loading indicator.",
1387
1501
  "value": { "type": "boolean | undefined" }
1388
1502
  },
1503
+ {
1504
+ "name": "show-search-input",
1505
+ "description": "Defines if the search input is visible.",
1506
+ "value": { "type": "boolean" }
1507
+ },
1389
1508
  {
1390
1509
  "name": "busy-delay",
1391
1510
  "description": "Defines the delay in milliseconds, after which the busy indicator will show up for this component.",
@@ -5390,6 +5509,11 @@
5390
5509
  "description": "Defines if the component would display a loading indicator.",
5391
5510
  "value": { "type": "boolean | undefined", "default": "false" }
5392
5511
  },
5512
+ {
5513
+ "name": "show-search-input",
5514
+ "description": "Defines if the search input is visible.",
5515
+ "value": { "type": "boolean", "default": "false" }
5516
+ },
5393
5517
  {
5394
5518
  "name": "busy-delay",
5395
5519
  "description": "Defines the delay in milliseconds, after which the busy indicator will show up for this component.",
@@ -5528,6 +5652,11 @@
5528
5652
  "description": "Defines if the component would display a loading indicator.",
5529
5653
  "value": { "type": "boolean | undefined" }
5530
5654
  },
5655
+ {
5656
+ "name": "show-search-input",
5657
+ "description": "Defines if the search input is visible.",
5658
+ "value": { "type": "boolean" }
5659
+ },
5531
5660
  {
5532
5661
  "name": "busy-delay",
5533
5662
  "description": "Defines the delay in milliseconds, after which the busy indicator will show up for this component.",
@@ -7436,6 +7565,11 @@
7436
7565
  "description": "Defines if the text-field is active",
7437
7566
  "value": { "type": "boolean", "default": "false" }
7438
7567
  },
7568
+ {
7569
+ "name": "icon-active",
7570
+ "description": "Defines if dropdown associated with text-field trigger has opened dropdown. It indicates active state of control button.",
7571
+ "value": { "type": "boolean", "default": "false" }
7572
+ },
7439
7573
  {
7440
7574
  "name": "autocomplete",
7441
7575
  "description": "Defines the behaviour of autocomplete.",
@@ -7536,6 +7670,11 @@
7536
7670
  "description": "Defines if the text-field is active",
7537
7671
  "value": { "type": "boolean" }
7538
7672
  },
7673
+ {
7674
+ "name": "icon-active",
7675
+ "description": "Defines if dropdown associated with text-field trigger has opened dropdown. It indicates active state of control button.",
7676
+ "value": { "type": "boolean" }
7677
+ },
7539
7678
  {
7540
7679
  "name": "autocomplete",
7541
7680
  "description": "Defines the behaviour of autocomplete.",
@@ -8110,6 +8249,11 @@
8110
8249
  "name": "indeterminate",
8111
8250
  "description": "Defines whether the component has unknown number of steps.",
8112
8251
  "value": { "type": "boolean", "default": "false" }
8252
+ },
8253
+ {
8254
+ "name": "accessible-name",
8255
+ "description": "Defines aria-label of the wizard, read by screen readers with the first step.",
8256
+ "value": { "type": "string" }
8113
8257
  }
8114
8258
  ],
8115
8259
  "events": [],
@@ -8119,6 +8263,11 @@
8119
8263
  "name": "indeterminate",
8120
8264
  "description": "Defines whether the component has unknown number of steps.",
8121
8265
  "value": { "type": "boolean" }
8266
+ },
8267
+ {
8268
+ "name": "accessible-name",
8269
+ "description": "Defines aria-label of the wizard, read by screen readers with the first step.",
8270
+ "value": { "type": "string" }
8122
8271
  }
8123
8272
  ],
8124
8273
  "events": []
@@ -0,0 +1,58 @@
1
+ import fs from "fs";
2
+ import path from "path";
3
+
4
+ const coveragePath = path.resolve("coverage/coverage-summary.json");
5
+ const outputPath = path.resolve("coverage/filtered-coverage-summary.json");
6
+
7
+ const raw = JSON.parse(fs.readFileSync(coveragePath, "utf-8"));
8
+
9
+ const excludedDirs = [
10
+ "/generated/",
11
+ "/types/",
12
+ "/data/",
13
+ "/utils/",
14
+ ];
15
+
16
+ const filtered = {};
17
+ Object.entries(raw).forEach(([file, stats]) => {
18
+ const normalizedPath = file.replace(/\\/g, "/");
19
+ const isExcluded = excludedDirs.some(dir => normalizedPath.includes(dir));
20
+
21
+ if (!isExcluded) {
22
+ filtered[file] = stats;
23
+ }
24
+ });
25
+
26
+ const metrics = ["lines", "statements", "functions", "branches"];
27
+
28
+ const total = {
29
+ lines: {
30
+ total: 0, covered: 0, skipped: 0, pct: 100,
31
+ },
32
+ statements: {
33
+ total: 0, covered: 0, skipped: 0, pct: 100,
34
+ },
35
+ functions: {
36
+ total: 0, covered: 0, skipped: 0, pct: 100,
37
+ },
38
+ branches: {
39
+ total: 0, covered: 0, skipped: 0, pct: 100,
40
+ },
41
+ };
42
+
43
+ Object.values(filtered).forEach(file => {
44
+ metrics.forEach(metric => {
45
+ total[metric].total += file[metric].total;
46
+ total[metric].covered += file[metric].covered;
47
+ total[metric].skipped += file[metric].skipped;
48
+ });
49
+ });
50
+
51
+ metrics.forEach(metric => {
52
+ const { total: t, covered: c } = total[metric];
53
+ total[metric].pct = t === 0 ? 100 : +((100 * c) / t).toFixed(2);
54
+ });
55
+
56
+ filtered.total = total;
57
+
58
+ fs.writeFileSync(outputPath, JSON.stringify(filtered, null, 2));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@sapudex/web-components",
4
- "version": "2.2.0",
4
+ "version": "2.3.0",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
7
7
  },
@@ -17,9 +17,13 @@
17
17
  "start": "wc-dev watch",
18
18
  "start:devserver": "wc-dev start",
19
19
  "build": "wc-dev build",
20
+ "swap-imports": "node swap-component-imports.js",
20
21
  "test": "wc-dev test",
21
- "test:cypress": "node run-cypress.js",
22
+ "test:cypress": "yarn swap-imports && node run-cypress.js",
23
+ "test:coverage": "yarn instrument && USE_INSTRUMENTED=1 yarn test:cypress",
24
+ "filter:coverage": "node filter-coverage.js",
22
25
  "test:cypress-open": "cypress open --component --browser chrome",
26
+ "instrument": "npx nyc instrument ./dist ./instrumented",
23
27
  "create-ui5-element": "wc-create-ui5-element",
24
28
  "prepack": "npm run build"
25
29
  },
@@ -43,6 +47,7 @@
43
47
  "video.js": "8.22.0"
44
48
  },
45
49
  "devDependencies": {
50
+ "@cypress/code-coverage": "^3.14.5",
46
51
  "@ui5/cypress-ct-ui5-webc": "^0.0.4",
47
52
  "@ui5/webcomponents-tools": "2.12.0",
48
53
  "chromedriver": "138.0.1",
@@ -23,6 +23,8 @@ const variablesOverwrite = `:root {
23
23
  ${getScopedVarName("--_ui5_calendar_header_middle_button_focus_outline")}: 1px solid var(--udexColorBlue9, #0040B0);
24
24
  ${getScopedVarName("--_ui5_calendar_header_arrow_button_box_shadow")}: none;
25
25
  ${getScopedVarName("--_ui5_calendar_header_padding")}: 0;
26
+ ${getScopedVarName("--_ui5_calendar_left_right_padding")}: 0;
27
+ ${getScopedVarName("--_ui5_calendar_top_bottom_padding")}: 0;
26
28
 
27
29
  udex-search {
28
30
  ${getScopedVarName("--_ui5_button_pressed_focused_border_color")}: transparent;
@@ -46,6 +48,8 @@ const variablesOverwrite = `:root {
46
48
  ${getScopedVarName("--_ui5_monthpicker_item_margin")}: -8px 0 var(--udexSpacer16, 16px) 0;
47
49
  ${getScopedVarName("--_ui5_year_picker_item_height")}: 36px;
48
50
  ${getScopedVarName("--_ui5_yearpicker_item_margin")}: -8px 0 var(--udexSpacer16, 16px) 0;
51
+ ${getScopedVarName("--_ui5_calendar_left_right_padding")}: 0;
52
+ ${getScopedVarName("--_ui5_calendar_top_bottom_padding")}: 0;
49
53
  }
50
54
  `;
51
55
 
package/src/Button.ts CHANGED
@@ -68,6 +68,15 @@ class UDExButton extends Button {
68
68
  /** @ts-expect-error */
69
69
  design: `${UDExButtonDesign}` = UDExButtonDesign.Primary;
70
70
 
71
+ /**
72
+ * Defines if button is in pseudo-disabled state.
73
+ *
74
+ * @default false
75
+ * @private
76
+ */
77
+ @property({ type: Boolean })
78
+ _ariaDisabled!: boolean;
79
+
71
80
  @i18n("@sapudex/web-components")
72
81
  static i18nBundle: I18nBundle;
73
82
 
@@ -267,7 +267,7 @@ class UDExCountrySelector extends UDExSearchableListBase {
267
267
 
268
268
  countryList: Country[] = CountryListDB;
269
269
  selectedCountry!: Country | undefined;
270
- _trigger!: HTMLElement;
270
+ _trigger!: UDExTextField;
271
271
 
272
272
  _dropdown!: UDExDropdown;
273
273
  _search!: Search;
@@ -314,16 +314,18 @@ class UDExCountrySelector extends UDExSearchableListBase {
314
314
  this._trigger = this.getTrigger();
315
315
  }
316
316
 
317
- getTrigger(): HTMLElement {
318
- return this.shadowRoot!.querySelector(".udex-country-selector__dropdown")!;
317
+ getTrigger(): UDExTextField {
318
+ return this.shadowRoot!.querySelector<UDExTextField>("[udex-text-field]")!;
319
319
  }
320
320
 
321
321
  _dropdownClose() {
322
322
  this.fireDecoratorEvent("close");
323
+ this._trigger.iconActive = false;
323
324
  }
324
325
 
325
326
  _dropdownOpen() {
326
327
  this.fireDecoratorEvent("open");
328
+ this._trigger.iconActive = true;
327
329
  }
328
330
 
329
331
  _dropdownBeforeOpen() {
package/src/DatePicker.ts CHANGED
@@ -230,12 +230,13 @@ class UDExDatePicker extends DateComponentBase {
230
230
 
231
231
  _afterDropdownClose(): void {
232
232
  this._dropdownTrigger.active = false;
233
+ this._dropdownTrigger.iconActive = false;
233
234
  this._dropdownTrigger.shadowRoot?.querySelector("input")?.blur();
234
235
  this._tempValue = "";
235
236
  }
236
237
 
237
238
  _afterDropdownOpen(): void {
238
- this._dropdownTrigger.active = true;
239
+ this._dropdownTrigger.iconActive = true;
239
240
  }
240
241
 
241
242
  _closeRespPopover(): void {
@@ -0,0 +1,143 @@
1
+ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
+ import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
3
+ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
4
+ import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
5
+ import type {
6
+ UDExEventRibbonColorSheme, UDExEventRibbonLink, UDExEventRibbonIcon, UDExEventRibbonLogo,
7
+ } from "./types/EventRibbon.js";
8
+ import { eventLogoText, UDExEventRibbonMode } from "./types/EventRibbon.js";
9
+ import "@ui5/webcomponents-icons/add-calendar.js";
10
+ import "@ui5/webcomponents-icons/media-play.js";
11
+ import EventRibbonTemplate from "./EventRibbonTemplate.js";
12
+
13
+ // Styles
14
+ import EventRibbonCss from "./generated/themes/EventRibbon.css.js";
15
+ import { isEnter, isSpace } from "@ui5/webcomponents-base/dist/Keys.js";
16
+
17
+ /**
18
+ * @class
19
+ *
20
+ * <h3 class="comment-api-title">Overview</h3>
21
+ *
22
+ *
23
+ * <h3>Usage</h3>
24
+ *
25
+ * For the <code>udex-event-ribbon</code>
26
+ * <h3>ES6 Module Import</h3>
27
+ *
28
+ * <code>import "@sapudex/web-components/dist/EventRibbon.js";</code>
29
+ *
30
+ * @constructor
31
+ * @extends UI5Element
32
+ * @public
33
+ */
34
+ @customElement({
35
+ tag: "udex-event-ribbon",
36
+ renderer: jsxRenderer,
37
+ styles: EventRibbonCss,
38
+ template: EventRibbonTemplate,
39
+ })
40
+
41
+ class UDExEventRibbon extends UI5Element {
42
+ /**
43
+ * Defines the text of the event logo.
44
+ *
45
+ * @default ""
46
+ * @public
47
+ */
48
+ @property({ type: String })
49
+ eventLogo!: `${UDExEventRibbonLogo}`;
50
+
51
+ /**
52
+ * Defines the link details of the event ribbon.
53
+ *
54
+ * @default "{}"
55
+ * @public
56
+ */
57
+ @property({ type: String })
58
+ eventLink: string = "{}";
59
+
60
+ /**
61
+ * Defines the icon displayed next to the link.
62
+ *
63
+ * @default ""
64
+ * @public
65
+ */
66
+ @property({ type: String })
67
+ eventLinkIcon!: `${UDExEventRibbonIcon}`;
68
+
69
+ /**
70
+ * Defines the text displayed in event ribbon.
71
+ *
72
+ * @default ""
73
+ * @public
74
+ */
75
+ @property({ type: String })
76
+ eventText!: string;
77
+
78
+ /**
79
+ * Defines whether event-ribbon uses dark or light theme.
80
+ *
81
+ * @default "light"
82
+ * @public
83
+ */
84
+ @property({ type: String })
85
+ mode: `${UDExEventRibbonMode}` = UDExEventRibbonMode.light;
86
+
87
+ /**
88
+ * Defines the solid background color.
89
+ *
90
+ * @default "Blue"
91
+ * @public
92
+ */
93
+ @property({ type: String })
94
+ backgroundColorScheme!: UDExEventRibbonColorSheme;
95
+
96
+ /**
97
+ * Allows control over the background image source.
98
+ *
99
+ * @public
100
+ */
101
+ @property({ type: String })
102
+ backgroundImage?: string;
103
+
104
+ _eventLink!: UDExEventRibbonLink;
105
+
106
+ onBeforeRendering(): void {
107
+ this._eventLink = JSON.parse(this.eventLink);
108
+ }
109
+
110
+ onAfterRendering(): void {
111
+ this.applyColorScheme();
112
+ }
113
+
114
+ applyColorScheme(): void {
115
+ const backgroundColorLowercase = this.backgroundColorScheme.toLowerCase();
116
+ const backgroundColor: string = `var(--udex-event-ribbon-${this.mode}-${backgroundColorLowercase}-default-background-color)`;
117
+ const backgroundColorHover: string = `var(--udex-event-ribbon-${this.mode}-${backgroundColorLowercase}-hover-background-color)`;
118
+
119
+ this.style.setProperty("--udex-event-ribbon-background-color", backgroundColor);
120
+ this.style.setProperty("--udex-event-ribbon-hover-background-color", backgroundColorHover);
121
+
122
+ this.style.setProperty("--udex-event-ribbon-background-image", `url("${this.backgroundImage}")`);
123
+ }
124
+
125
+ handleKeyDown(e: KeyboardEvent): void {
126
+ if (isSpace(e) || isEnter(e)) {
127
+ e.preventDefault();
128
+ this.shadowRoot!.querySelector("a")?.click();
129
+ }
130
+ }
131
+
132
+ get eventLogoAlt(): string {
133
+ return eventLogoText[this.eventLogo];
134
+ }
135
+
136
+ get eventLogoPath(): string {
137
+ return `https://cdn.udex.services.sap.com/dds/design-tokens/assets/logos/event-ribbon-logo-${this.eventLogo}.svg`;
138
+ }
139
+ }
140
+
141
+ UDExEventRibbon.define();
142
+
143
+ export default UDExEventRibbon;
@@ -0,0 +1,18 @@
1
+ import Icon from "@ui5/webcomponents/dist/Icon.js";
2
+ import type UDExEventRibbon from "./EventRibbon.js";
3
+
4
+ export default function EventRibbonTemplate(this: UDExEventRibbon) {
5
+ const { text, target, url } = this._eventLink;
6
+ return (
7
+ <a onKeyDown={this.handleKeyDown} role="banner" aria-label={this.eventText} class= {{ "udex-event-ribbon__container": true, "udex-event-ribbon__container-with-background-image": this.backgroundImage }} target={target} href={url} title={text}>
8
+ <div class="udex-event-ribbon__logo">
9
+ <img src={this.eventLogoPath} alt={this.eventLogoAlt}/>
10
+ </div>
11
+ {this.eventText && <p class="udex-event-ribbon__text">{this.eventText}</p>}
12
+ <div class="udex-event-ribbon__link-container">
13
+ {this.eventLinkIcon && <Icon name={this.eventLinkIcon}></Icon>}
14
+ <span>{text}</span>
15
+ </div>
16
+ </a>
17
+ );
18
+ }
@@ -387,6 +387,12 @@ class UDExMastheadShell extends UI5Element {
387
387
  this._handleResizeBound = this._handleResize.bind(this);
388
388
  }
389
389
 
390
+ onBeforeRendering() {
391
+ if (this.isMobileMenuMode) {
392
+ this.setMobileMenuHeight();
393
+ }
394
+ }
395
+
390
396
  onAfterRendering() {
391
397
  this._rootHolder = this.mastheadHolder;
392
398
  this._searchOpener = this.searchOpener;
@@ -414,7 +420,7 @@ class UDExMastheadShell extends UI5Element {
414
420
  this.handleMobileMode();
415
421
  }
416
422
 
417
- if (this.isBreakpointSizeM) {
423
+ if (this.isAtMostBreakpointSizeM) {
418
424
  this._isSearchOpened = false;
419
425
  }
420
426
 
@@ -424,6 +430,10 @@ class UDExMastheadShell extends UI5Element {
424
430
  return;
425
431
  }
426
432
 
433
+ if (this.isMobileMenuMode) {
434
+ this.setMobileMenuHeight();
435
+ }
436
+
427
437
  this._shouldHandleResize = true;
428
438
  }
429
439
 
@@ -713,6 +723,12 @@ class UDExMastheadShell extends UI5Element {
713
723
  });
714
724
  }
715
725
 
726
+ setMobileMenuHeight(): void {
727
+ const mastheadHeight = parseInt(window.getComputedStyle(this).getPropertyValue("--udex-masthead-shell-height"));
728
+ const mobileMenuHeight = `${window.innerHeight - mastheadHeight}px`;
729
+ this.style.setProperty("--udex-masthead-shell-mobile-menu-height", mobileMenuHeight);
730
+ }
731
+
716
732
  removeMobileMode(): void {
717
733
  this._isMobileMode = false;
718
734
  this.slottedItems.forEach((item: MastheadSlottedItem) => {
@@ -735,7 +751,7 @@ class UDExMastheadShell extends UI5Element {
735
751
  */
736
752
  openSearch(): void {
737
753
  const shouldPreventOpeningSearch = this._isSearchOpened
738
- || (this.isBreakpointSizeM && !this.showSearchByDefault)
754
+ || (this.isAtMostBreakpointSizeM && !this.showSearchByDefault)
739
755
  || this._isMobileMode
740
756
  || (this.isAtLeastBreakpointSizeM && this.showSearchByDefault);
741
757
 
@@ -758,7 +774,7 @@ class UDExMastheadShell extends UI5Element {
758
774
  * @public
759
775
  */
760
776
  openMobileMenu(): void {
761
- if (!this._isMobileMenuOpen && (this._isMobileMode || this.isBreakpointSizeM)) {
777
+ if (!this._isMobileMenuOpen && this.isMobileMenuMode) {
762
778
  this.mobileBtn?.handleSelectedChange();
763
779
  this.handleOpenMobileMenu();
764
780
  }
@@ -873,7 +889,7 @@ class UDExMastheadShell extends UI5Element {
873
889
  return !!this.mobileMenu.length;
874
890
  }
875
891
 
876
- get isBreakpointSizeM(): boolean {
892
+ get isAtMostBreakpointSizeM(): boolean {
877
893
  return BreakpointUtils.isAtMost("M");
878
894
  }
879
895
 
@@ -881,6 +897,10 @@ class UDExMastheadShell extends UI5Element {
881
897
  return BreakpointUtils.isAtLeast("M");
882
898
  }
883
899
 
900
+ get isMobileMenuMode(): boolean {
901
+ return this._isMobileMode || this.isAtMostBreakpointSizeM;
902
+ }
903
+
884
904
  get isMainMenuVisible(): boolean {
885
905
  return !this.showSearchByDefault && !this._isSearchOpened;
886
906
  }
@@ -890,7 +910,7 @@ class UDExMastheadShell extends UI5Element {
890
910
  }
891
911
 
892
912
  get shouldHandleMobileView(): boolean {
893
- return !this.isBreakpointSizeM && !this.showSearchByDefault;
913
+ return !this.isAtMostBreakpointSizeM && !this.showSearchByDefault;
894
914
  }
895
915
 
896
916
  get mainNavigationAriaLabel(): string {