@dubai-design-system/components-js 5.2.0 → 5.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/MIGRATION.md +153 -18
  3. package/dist/cjs/dda-accordion.cjs.entry.js +3 -3
  4. package/dist/cjs/dda-alert.cjs.entry.js +5 -5
  5. package/dist/cjs/dda-attach-file.cjs.entry.js +3 -3
  6. package/dist/cjs/dda-avatar.cjs.entry.js +8 -8
  7. package/dist/{dda/dda-credit-card.entry.js → cjs/dda-banner-card.cjs.entry.js} +16 -16
  8. package/dist/cjs/dda-banner.cjs.entry.js +3 -3
  9. package/dist/cjs/dda-breadcrumb.cjs.entry.js +2 -2
  10. package/dist/cjs/dda-button.cjs.entry.js +3 -3
  11. package/dist/cjs/dda-checkbox.cjs.entry.js +3 -3
  12. package/dist/cjs/dda-chip.cjs.entry.js +3 -3
  13. package/dist/cjs/dda-credit-card.cjs.entry.js +3 -3
  14. package/dist/cjs/dda-creditcard-field.cjs.entry.js +4 -4
  15. package/dist/cjs/dda-dropdown.cjs.entry.js +4 -4
  16. package/dist/cjs/dda-footer.cjs.entry.js +3 -3
  17. package/dist/cjs/dda-header.cjs.entry.js +208 -23
  18. package/dist/cjs/dda-home-banner.cjs.entry.js +9 -5
  19. package/dist/{dda/dda-tooltip.entry.js → cjs/dda-home-carousel.cjs.entry.js} +18 -36
  20. package/dist/cjs/dda-horizontal-stepper.cjs.entry.js +3 -3
  21. package/dist/cjs/dda-input.cjs.entry.js +3 -3
  22. package/dist/cjs/dda-link-button_2.cjs.entry.js +6 -6
  23. package/dist/cjs/dda-number-field.cjs.entry.js +3 -3
  24. package/dist/cjs/dda-pagination.cjs.entry.js +4 -4
  25. package/dist/cjs/dda-phonefield.cjs.entry.js +3 -3
  26. package/dist/cjs/dda-progressbar.cjs.entry.js +3 -3
  27. package/dist/cjs/dda-range-slider.cjs.entry.js +3 -3
  28. package/dist/cjs/dda-scroll-icon.cjs.entry.js +32 -0
  29. package/dist/cjs/dda-search-input.cjs.entry.js +2 -2
  30. package/dist/cjs/dda-segmented-tabs.cjs.entry.js +5 -5
  31. package/dist/cjs/dda-select.cjs.entry.js +84 -15
  32. package/dist/cjs/dda-sticky-footer.cjs.entry.js +41 -4
  33. package/dist/cjs/dda-tabs.cjs.entry.js +4 -4
  34. package/dist/cjs/dda-textarea.cjs.entry.js +1351 -16189
  35. package/dist/cjs/dda-toggle.cjs.entry.js +3 -3
  36. package/dist/cjs/dda-tooltip.cjs.entry.js +3 -3
  37. package/dist/cjs/dda-ui-card.cjs.entry.js +3 -3
  38. package/dist/cjs/dda-vertical-stepper.cjs.entry.js +2 -2
  39. package/dist/cjs/dda.cjs.js +3 -30
  40. package/dist/cjs/{index-Na_7EWDR.js → index-CM4T__Je.js} +1 -1
  41. package/dist/cjs/index.cjs.js +0 -10
  42. package/dist/cjs/loader.cjs.js +2 -2
  43. package/dist/cjs/parse-json-prop-B0KWD8qe.js +38 -0
  44. package/dist/collection/collection-manifest.json +7 -4
  45. package/dist/collection/components/dda-accordion/dda-accordion.js +1 -1
  46. package/dist/collection/components/dda-alert/dda-alert.js +1 -1
  47. package/dist/collection/components/dda-attach-file/dda-attach-file.js +1 -1
  48. package/dist/collection/components/dda-avatar/dda-avatar.js +5 -5
  49. package/dist/collection/components/dda-banner/dda-banner.js +1 -1
  50. package/dist/collection/components/dda-banner-card/dda-banner-card.js +243 -0
  51. package/dist/collection/components/dda-button/dda-button.js +1 -1
  52. package/dist/collection/components/dda-checkbox/dda-checkbox.js +1 -1
  53. package/dist/collection/components/dda-chip/dda-chip.js +1 -1
  54. package/dist/collection/components/dda-credit-card/dda-credit-card.js +1 -1
  55. package/dist/collection/components/dda-creditcard-field/dda-creditcard-field.js +1 -1
  56. package/dist/collection/components/dda-dropdown/dda-dropdown.js +1 -1
  57. package/dist/collection/components/dda-footer/dda-footer.js +1 -1
  58. package/dist/collection/components/dda-header/dda-header.js +838 -88
  59. package/dist/collection/components/dda-header/dda-header.stories.js +200 -35
  60. package/dist/collection/components/dda-header/nav-model.js +69 -0
  61. package/dist/collection/components/dda-home-banner/dda-home-banner.js +46 -2
  62. package/dist/collection/components/dda-home-banner/dda-home-banner.stories.js +6 -0
  63. package/dist/collection/components/dda-home-banner/home-banner.css +10 -0
  64. package/dist/collection/components/dda-home-carousel/dda-home-carousel.js +164 -0
  65. package/dist/collection/components/dda-home-carousel/dda-home-carousel.stories.js +24 -0
  66. package/dist/collection/components/dda-input/dda-input.js +1 -1
  67. package/dist/collection/components/dda-link-button/dda-link-button.js +2 -2
  68. package/dist/collection/components/dda-number-field/dda-number-field.js +1 -1
  69. package/dist/collection/components/dda-pagination/dda-pagination.js +1 -1
  70. package/dist/collection/components/dda-phonefield/dda-phonefield.js +1 -1
  71. package/dist/collection/components/dda-progressbar/dda-progressbar.js +1 -1
  72. package/dist/collection/components/dda-radiobutton/dda-radiobutton.css +233 -6
  73. package/dist/collection/components/dda-radiobutton/dda-radiobutton.js +1 -1
  74. package/dist/collection/components/dda-range-slider/dda-range-slider.js +2 -2
  75. package/dist/collection/components/dda-scroll-icon/dda-scroll-icon.css +72 -0
  76. package/dist/collection/components/dda-scroll-icon/dda-scroll-icon.js +120 -0
  77. package/dist/collection/components/dda-scroll-icon/dda-scroll-icon.stories.js +17 -0
  78. package/dist/collection/components/dda-select/dda-select.js +209 -18
  79. package/dist/collection/components/dda-select/dda-select.stories.js +68 -10
  80. package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.js +496 -5
  81. package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.stories.js +12 -1
  82. package/dist/collection/components/dda-tabs/dda-tabs.js +1 -1
  83. package/dist/collection/components/dda-textarea/dda-textarea.js +2 -2
  84. package/dist/collection/components/dda-toggle/dda-toggle.js +1 -1
  85. package/dist/collection/components/dda-tooltip/dda-tooltip.js +1 -1
  86. package/dist/collection/components/dda-ui-card/dda-ui-card.js +1 -1
  87. package/dist/collection/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.css +29 -9
  88. package/dist/collection/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.js +1 -1
  89. package/dist/collection/components/stepper/dda-horizontal-stepper/dda-horizontal-stepper.js +1 -1
  90. package/dist/collection/components/stepper/dda-vertical-stepper/dda-vertical-stepper.js +1 -1
  91. package/dist/collection/global/global.css +233 -6
  92. package/dist/collection/utils/parse-json-prop.js +34 -0
  93. package/dist/components/dda-accordion.js +1 -59
  94. package/dist/components/dda-alert.js +1 -94
  95. package/dist/components/dda-attach-file.js +1 -138
  96. package/dist/components/dda-avatar.js +1 -107
  97. package/dist/components/dda-banner-card.d.ts +11 -0
  98. package/dist/components/dda-banner-card.js +1 -0
  99. package/dist/components/dda-banner.js +1 -57
  100. package/dist/components/dda-breadcrumb.js +1 -66
  101. package/dist/components/dda-button.js +1 -6
  102. package/dist/components/dda-checkbox.js +1 -59
  103. package/dist/components/dda-chip.js +1 -55
  104. package/dist/components/dda-credit-card.js +1 -54
  105. package/dist/components/dda-creditcard-field.js +1 -133
  106. package/dist/components/dda-dropdown.js +1 -113
  107. package/dist/components/dda-footer.js +1 -72
  108. package/dist/components/dda-header.js +1 -367
  109. package/dist/components/dda-home-banner.js +1 -249
  110. package/dist/components/dda-home-carousel.d.ts +11 -0
  111. package/dist/components/dda-home-carousel.js +1 -0
  112. package/dist/components/dda-horizontal-stepper.js +1 -69
  113. package/dist/components/dda-input.js +1 -92
  114. package/dist/components/dda-link-button.js +1 -6
  115. package/dist/components/dda-number-field.js +1 -127
  116. package/dist/components/dda-pagination.js +1 -133
  117. package/dist/components/dda-phonefield.js +1 -316
  118. package/dist/components/dda-progressbar.js +1 -58
  119. package/dist/components/dda-radiobutton.js +1 -6
  120. package/dist/components/dda-range-slider.js +1 -93
  121. package/dist/components/dda-scroll-icon.d.ts +11 -0
  122. package/dist/components/dda-scroll-icon.js +1 -0
  123. package/dist/components/dda-search-input.js +1 -102
  124. package/dist/components/dda-segmented-tabs.js +1 -133
  125. package/dist/components/dda-select.js +1 -219
  126. package/dist/components/dda-sticky-footer.js +1 -132
  127. package/dist/components/dda-tabs.js +1 -91
  128. package/dist/components/dda-textarea.js +1 -31277
  129. package/dist/components/dda-toggle.js +1 -55
  130. package/dist/components/dda-tooltip.js +1 -6
  131. package/dist/components/dda-ui-card.js +1 -71
  132. package/dist/components/dda-vertical-stepper.js +1 -72
  133. package/dist/components/index.js +1 -34
  134. package/dist/components/p-BUv5-HOm.js +1 -0
  135. package/dist/components/p-BvEnF2US.js +1 -0
  136. package/dist/components/{p-C2Cs3ruo.js → p-C8EPNbJC.js} +1 -1
  137. package/dist/components/p-CS5LPB9B.js +1 -0
  138. package/dist/components/p-CedhFs0i.js +1 -0
  139. package/dist/components/p-CvcFE821.js +1 -0
  140. package/dist/components/{p-D7sJgBDk.js → p-DHgv6zQy.js} +1 -1
  141. package/dist/components/p-kJRBkcMn.js +1 -0
  142. package/dist/dda/dda.css +46 -6385
  143. package/dist/dda/dda.esm.js +1 -47
  144. package/dist/dda/index.esm.js +1 -29
  145. package/dist/dda/p-074f8dab.entry.js +1 -0
  146. package/dist/dda/p-1a0d490e.entry.js +1 -0
  147. package/dist/dda/p-1c42a19b.entry.js +1 -0
  148. package/dist/dda/p-1eb0af5a.entry.js +1 -0
  149. package/dist/dda/p-215629d6.entry.js +1 -0
  150. package/dist/dda/{p-eed4a104.entry.js → p-221613e8.entry.js} +1 -1
  151. package/dist/dda/{p-3835f3b7.entry.js → p-284bc873.entry.js} +1 -1
  152. package/dist/dda/{p-98c59aa8.entry.js → p-2f99af01.entry.js} +1 -1
  153. package/dist/dda/p-3003acb0.entry.js +1 -0
  154. package/dist/dda/p-5b314403.entry.js +1 -0
  155. package/dist/dda/{p-32746429.entry.js → p-5b669c2f.entry.js} +1 -1
  156. package/dist/dda/p-5fe5c488.entry.js +1 -0
  157. package/dist/dda/{p-95b87c55.entry.js → p-6577d6b5.entry.js} +1 -1
  158. package/dist/dda/{p-95e1a389.entry.js → p-6b358fa8.entry.js} +1 -1
  159. package/dist/dda/{p-eecfe091.entry.js → p-6e6ce5c8.entry.js} +1 -1
  160. package/dist/dda/{p-d8fd3f73.entry.js → p-70a20025.entry.js} +1 -1
  161. package/dist/dda/p-78ff5172.entry.js +1 -0
  162. package/dist/dda/{p-489a3711.entry.js → p-7afdde8a.entry.js} +1 -1
  163. package/dist/dda/{p-1acc0fda.entry.js → p-7ba8071a.entry.js} +1 -1
  164. package/dist/dda/{p-96741f45.entry.js → p-7d20f926.entry.js} +1 -1
  165. package/dist/dda/p-806de72d.entry.js +1 -0
  166. package/dist/dda/{p-0a86a74c.entry.js → p-922d33f8.entry.js} +1 -1
  167. package/dist/dda/{p-c39d196d.entry.js → p-9a9e372d.entry.js} +1 -1
  168. package/dist/dda/{p-0574c9df.entry.js → p-9c3b7bf8.entry.js} +1 -1
  169. package/dist/dda/p-BJOt1fv7.js +2 -0
  170. package/dist/dda/p-CvcFE821.js +1 -0
  171. package/dist/dda/{p-ee6d56fc.entry.js → p-a19303b5.entry.js} +1 -1
  172. package/dist/dda/{p-87d647e7.entry.js → p-c7a4e410.entry.js} +1 -1
  173. package/dist/dda/{p-8de4f35e.entry.js → p-c9e411cb.entry.js} +1 -1
  174. package/dist/dda/{p-3d57e957.entry.js → p-cd1d47cb.entry.js} +1 -1
  175. package/dist/dda/p-cfdbbd1a.entry.js +1 -0
  176. package/dist/dda/{p-e660a594.entry.js → p-d114dea3.entry.js} +1 -1
  177. package/dist/dda/{p-16f94322.entry.js → p-db565a30.entry.js} +1 -1
  178. package/dist/dda/{p-d06c5daf.entry.js → p-e6043272.entry.js} +1 -1
  179. package/dist/dda/p-ef52ec1e.entry.js +1 -0
  180. package/dist/dda/{p-9c86dc30.entry.js → p-f2c9d77a.entry.js} +1 -1
  181. package/dist/dda/{p-2630152f.entry.js → p-faccb313.entry.js} +1 -1
  182. package/dist/dda/{p-9416d8ec.entry.js → p-fdf0dce8.entry.js} +1 -1
  183. package/dist/esm/dda-accordion.entry.js +3 -3
  184. package/dist/esm/dda-alert.entry.js +5 -5
  185. package/dist/esm/dda-attach-file.entry.js +3 -3
  186. package/dist/esm/dda-avatar.entry.js +8 -8
  187. package/dist/{dda/dda-tabs.entry.js → esm/dda-banner-card.entry.js} +14 -49
  188. package/dist/esm/dda-banner.entry.js +3 -3
  189. package/dist/esm/dda-breadcrumb.entry.js +2 -2
  190. package/dist/esm/dda-button.entry.js +3 -3
  191. package/dist/esm/dda-checkbox.entry.js +3 -3
  192. package/dist/esm/dda-chip.entry.js +3 -3
  193. package/dist/esm/dda-credit-card.entry.js +3 -3
  194. package/dist/esm/dda-creditcard-field.entry.js +4 -4
  195. package/dist/esm/dda-dropdown.entry.js +4 -4
  196. package/dist/esm/dda-footer.entry.js +3 -3
  197. package/dist/esm/dda-header.entry.js +208 -23
  198. package/dist/esm/dda-home-banner.entry.js +9 -5
  199. package/dist/{dda/dda-breadcrumb.entry.js → esm/dda-home-carousel.entry.js} +16 -30
  200. package/dist/esm/dda-horizontal-stepper.entry.js +3 -3
  201. package/dist/esm/dda-input.entry.js +3 -3
  202. package/dist/esm/dda-link-button_2.entry.js +6 -6
  203. package/dist/esm/dda-number-field.entry.js +3 -3
  204. package/dist/esm/dda-pagination.entry.js +4 -4
  205. package/dist/esm/dda-phonefield.entry.js +3 -3
  206. package/dist/esm/dda-progressbar.entry.js +3 -3
  207. package/dist/esm/dda-range-slider.entry.js +3 -3
  208. package/dist/esm/dda-scroll-icon.entry.js +30 -0
  209. package/dist/esm/dda-search-input.entry.js +2 -2
  210. package/dist/esm/dda-segmented-tabs.entry.js +5 -5
  211. package/dist/esm/dda-select.entry.js +84 -15
  212. package/dist/esm/dda-sticky-footer.entry.js +41 -4
  213. package/dist/esm/dda-tabs.entry.js +4 -4
  214. package/dist/esm/dda-textarea.entry.js +1351 -16189
  215. package/dist/esm/dda-toggle.entry.js +3 -3
  216. package/dist/esm/dda-tooltip.entry.js +3 -3
  217. package/dist/esm/dda-ui-card.entry.js +3 -3
  218. package/dist/esm/dda-vertical-stepper.entry.js +2 -2
  219. package/dist/esm/dda.js +4 -31
  220. package/dist/esm/{index-CI_UcUy5.js → index-BJOt1fv7.js} +1 -1
  221. package/dist/esm/index.js +0 -10
  222. package/dist/esm/loader.js +3 -3
  223. package/dist/esm/parse-json-prop-CvcFE821.js +36 -0
  224. package/dist/types/components/dda-banner-card/dda-banner-card.d.ts +25 -0
  225. package/dist/types/components/dda-header/dda-header.d.ts +114 -4
  226. package/dist/types/components/dda-header/dda-header.stories.d.ts +187 -0
  227. package/dist/types/components/dda-header/nav-model.d.ts +19 -0
  228. package/dist/types/components/dda-home-banner/dda-home-banner.d.ts +4 -0
  229. package/dist/types/components/dda-home-banner/dda-home-banner.stories.d.ts +8 -0
  230. package/dist/types/components/dda-home-carousel/dda-home-carousel.d.ts +29 -0
  231. package/dist/types/components/dda-home-carousel/dda-home-carousel.stories.d.ts +20 -0
  232. package/dist/types/components/dda-scroll-icon/dda-scroll-icon.d.ts +11 -0
  233. package/dist/types/components/dda-scroll-icon/dda-scroll-icon.stories.d.ts +20 -0
  234. package/dist/types/components/dda-select/dda-select.d.ts +40 -5
  235. package/dist/types/components/dda-select/dda-select.stories.d.ts +25 -0
  236. package/dist/types/components/dda-sticky-footer/dda-sticky-footer.d.ts +70 -1
  237. package/dist/types/components/dda-sticky-footer/dda-sticky-footer.stories.d.ts +4 -0
  238. package/dist/types/components.d.ts +863 -21
  239. package/dist/types/utils/parse-json-prop.d.ts +1 -0
  240. package/package.json +4 -2
  241. package/dist/cjs/dda-link-button.cjs.entry.js +0 -51
  242. package/dist/cjs/dda-radiobutton.cjs.entry.js +0 -27
  243. package/dist/cjs/index-DXyiIgGK.js +0 -4637
  244. package/dist/components/dda-button2.js +0 -80
  245. package/dist/components/dda-link-button2.js +0 -81
  246. package/dist/components/dda-radiobutton2.js +0 -54
  247. package/dist/components/dda-tooltip2.js +0 -70
  248. package/dist/components/index2.js +0 -4622
  249. package/dist/components/p-C520q-ka.js +0 -1
  250. package/dist/components/p-CZO9Eawo.js +0 -1
  251. package/dist/components/p-_-I_65FG.js +0 -1
  252. package/dist/components/unique-id.js +0 -12
  253. package/dist/dda/dda-accordion.entry.js +0 -31
  254. package/dist/dda/dda-alert.entry.js +0 -57
  255. package/dist/dda/dda-attach-file.entry.js +0 -102
  256. package/dist/dda/dda-avatar.entry.js +0 -70
  257. package/dist/dda/dda-banner.entry.js +0 -30
  258. package/dist/dda/dda-button.entry.js +0 -47
  259. package/dist/dda/dda-checkbox.entry.js +0 -27
  260. package/dist/dda/dda-chip.entry.js +0 -25
  261. package/dist/dda/dda-creditcard-field.entry.js +0 -94
  262. package/dist/dda/dda-dropdown.entry.js +0 -75
  263. package/dist/dda/dda-footer.entry.js +0 -34
  264. package/dist/dda/dda-header.entry.js +0 -282
  265. package/dist/dda/dda-home-banner.entry.js +0 -208
  266. package/dist/dda/dda-horizontal-stepper.entry.js +0 -39
  267. package/dist/dda/dda-input.entry.js +0 -56
  268. package/dist/dda/dda-link-button.entry.js +0 -49
  269. package/dist/dda/dda-number-field.entry.js +0 -86
  270. package/dist/dda/dda-pagination.entry.js +0 -86
  271. package/dist/dda/dda-phonefield.entry.js +0 -271
  272. package/dist/dda/dda-progressbar.entry.js +0 -30
  273. package/dist/dda/dda-radiobutton.entry.js +0 -25
  274. package/dist/dda/dda-range-slider.entry.js +0 -55
  275. package/dist/dda/dda-search-input.entry.js +0 -63
  276. package/dist/dda/dda-segmented-tabs.entry.js +0 -96
  277. package/dist/dda/dda-select.entry.js +0 -183
  278. package/dist/dda/dda-sticky-footer.entry.js +0 -61
  279. package/dist/dda/dda-textarea.entry.js +0 -31241
  280. package/dist/dda/dda-toggle.entry.js +0 -25
  281. package/dist/dda/dda-ui-card.entry.js +0 -41
  282. package/dist/dda/dda-vertical-stepper.entry.js +0 -41
  283. package/dist/dda/index-CFIwfRqf.js +0 -4622
  284. package/dist/dda/p-271c5f91.entry.js +0 -1
  285. package/dist/dda/p-58de747b.entry.js +0 -1
  286. package/dist/dda/p-63754a93.entry.js +0 -1
  287. package/dist/dda/p-9541e108.entry.js +0 -1
  288. package/dist/dda/p-CI_UcUy5.js +0 -2
  289. package/dist/dda/p-b6190656.entry.js +0 -1
  290. package/dist/dda/p-c0da1e14.entry.js +0 -1
  291. package/dist/dda/p-c5ebf7df.entry.js +0 -1
  292. package/dist/dda/p-e8ca224f.entry.js +0 -1
  293. package/dist/dda/p-ea1720d2.entry.js +0 -1
  294. package/dist/dda/unique-id-B-I003EB.js +0 -12
  295. package/dist/esm/dda-link-button.entry.js +0 -49
  296. package/dist/esm/dda-radiobutton.entry.js +0 -25
  297. package/dist/esm/index-CFIwfRqf.js +0 -4622
@@ -59,6 +59,132 @@ export default {
59
59
  control: { type: 'text' },
60
60
  description: 'Name for the toggle accessibility button',
61
61
  },
62
+ // 3.x accessibility-panel and toolbar text props (Tasks 2-4): every one falls back to the
63
+ // English default when it is absent, and removes the text it names when it is empty ("").
64
+ read_speaker_link: {
65
+ control: { type: 'text' },
66
+ description: '3.x name of `readSpeakerLink`, as an attribute: `read_speaker_link`. `readSpeakerLink` wins when both are set.',
67
+ },
68
+ contrast_title: {
69
+ control: { type: 'text' },
70
+ description: 'Heading of the contrast column in the accessibility panel. Default: `Contrast`. An empty value removes the heading.',
71
+ },
72
+ contrast_description: {
73
+ control: { type: 'text' },
74
+ description: 'Text above the contrast options. Default: `Select your preferred contrast setting`.',
75
+ },
76
+ contrast_normal_text: {
77
+ control: { type: 'text' },
78
+ description: 'Label of the normal contrast option. Default: `Normal`.',
79
+ },
80
+ contrast_noraml_text: {
81
+ control: { type: 'text' },
82
+ description: '3.x spelling of `contrast_normal_text`. `contrast_normal_text` wins when both are set.',
83
+ },
84
+ contrast_color_blind_text: {
85
+ control: { type: 'text' },
86
+ description: 'Label of the colour-blind contrast option. Default: `Colours Blind`.',
87
+ },
88
+ contrast_red_weakness_text: {
89
+ control: { type: 'text' },
90
+ description: 'Label of the red-weakness contrast option. Default: `Red Weakness`.',
91
+ },
92
+ contrast_green_weakness_text: {
93
+ control: { type: 'text' },
94
+ description: 'Label of the green-weakness contrast option. Default: `Green Weakness`.',
95
+ },
96
+ screen_reader_title: {
97
+ control: { type: 'text' },
98
+ description: 'Heading of the screen reader column. Default: `Screen Reader`.',
99
+ },
100
+ screen_reader_description: {
101
+ control: { type: 'text' },
102
+ description: 'Text in the screen reader column. Default: `Listen to the content of the page by clicking play or listen`.',
103
+ },
104
+ screen_reader_link_label: {
105
+ control: { type: 'text' },
106
+ description: 'Accessible name of the ReadSpeaker play link. Default: `Listen to this page using ReadSpeaker`.',
107
+ },
108
+ text_size_title: {
109
+ control: { type: 'text' },
110
+ description: 'Heading of the text size column. Default: `Text Size`.',
111
+ },
112
+ text_size_description: {
113
+ control: { type: 'text' },
114
+ description: 'Text in the text size column. Default: `Use the buttons below to increase or decrease the text size`.',
115
+ },
116
+ selected_contrast: {
117
+ control: { type: 'text' },
118
+ description: 'The contrast option shown as selected. The header updates it when the user picks an option. Default: `normal`.',
119
+ },
120
+ selected_text_size: {
121
+ control: { type: 'text' },
122
+ description: 'The text size button shown as selected (`default-primary`). The header updates it on each click. Default: none.',
123
+ },
124
+ accessibility_tooltip: {
125
+ control: { type: 'text' },
126
+ description: 'Tooltip of the desktop accessibility button. Default: `Accessibility`.',
127
+ },
128
+ accessibility_button_text: {
129
+ control: { type: 'text' },
130
+ description: 'Accessible name (visually hidden text) of both accessibility buttons. Default: `Accessibility`.',
131
+ },
132
+ accessibility_button_id: {
133
+ control: { type: 'text' },
134
+ description: '`id` of the desktop accessibility button. The side-menu button gets this id plus `-sidemenu`.',
135
+ },
136
+ accessibility_button_icon_family: {
137
+ control: { type: 'text' },
138
+ description: '`class` of the accessibility button icon. Default: `material-icons material-symbols-outlined`.',
139
+ },
140
+ accessibility_button_icon_name: {
141
+ control: { type: 'text' },
142
+ description: 'Material icon name of the accessibility buttons. Default: `accessibility`.',
143
+ },
144
+ search_tooltip: {
145
+ control: { type: 'text' },
146
+ description: 'Tooltip of the desktop search. Default: `Search`.',
147
+ },
148
+ search_input_placeholder: {
149
+ control: { type: 'text' },
150
+ description: 'Placeholder of the search inputs. Default: the `searchText` value, else `Search`.',
151
+ },
152
+ language_tooltip: {
153
+ control: { type: 'text' },
154
+ description: 'Tooltip of the desktop language button. Default: `Language`.',
155
+ },
156
+ login_tooltip: {
157
+ control: { type: 'text' },
158
+ description: 'Tooltip of the desktop Login link. Default: the Login label.',
159
+ },
160
+ usePredesignedAccessibilityMenu: {
161
+ control: { type: 'text' },
162
+ description: 'When `false`, the header renders no accessibility panel; the buttons only emit `accessibilitymenufunctionality`, so the page can open its own panel. Default: `true`.',
163
+ },
164
+ sideMainMenuTitle: {
165
+ control: { type: 'text' },
166
+ description: 'Title above the side-menu links. Default: `Quick Links`. An empty value removes it.',
167
+ },
168
+ sideOtherMenuTitle: {
169
+ control: { type: 'text' },
170
+ description: 'Title above the "other" side-menu links. It shows only when there are other links.',
171
+ },
172
+ otherMenuItems: {
173
+ control: { type: 'text' },
174
+ description: 'Second list in the side menu. JSON array (or array property) of `{ label, href, active }`; `active: "true"` marks the current page.',
175
+ },
176
+ hideOtherMenu: {
177
+ control: { type: 'text' },
178
+ description: 'Hides the "other" side-menu links and their title. Default: `false`.',
179
+ },
180
+ mobileMenuSearchId: {
181
+ control: { type: 'text' },
182
+ description: '`id` of the mobile search control.',
183
+ },
184
+ mobileMenuSearchUrl: {
185
+ control: { type: 'text' },
186
+ description: "3.x mobile search: when set, the mobile search is a plain link to this URL (with `mobileMenuSearchId` as its id) and the header's own search panel is not rendered.",
187
+ },
62
188
  },
63
189
  parameters: {
64
190
  docs: {
@@ -135,27 +261,27 @@ const Template = args => `
135
261
  `;
136
262
  export const Default = Template.bind({});
137
263
  Default.args = {
138
- firstlogoSrc: "https://www.dof.gov.ae/Style Library/img/gov-logo.svg",
139
- firstLogoWhiteSrc: "https://www.dof.gov.ae/Style Library/img/gov-logo-white.svg",
140
- firstLogoAlt: "Dubai-Digital-Authority",
141
- secondLogoSrc: "https://www.digitaldubai.ae/ResourcePackages/Theme/assets/dist/images/logo.svg",
142
- secondLogoWhiteSrc: "https://www.digitaldubai.ae/ResourcePackages/Theme/assets/dist/images/logo.svg",
143
- secondLogoAlt: "Dubai-Digital-Authority",
144
- loginLink: "/login",
145
- loginText: "Login",
146
- loginIcon: "sentiment_satisfied",
264
+ firstlogoSrc: 'https://www.dof.gov.ae/Style Library/img/gov-logo.svg',
265
+ firstLogoWhiteSrc: 'https://www.dof.gov.ae/Style Library/img/gov-logo-white.svg',
266
+ firstLogoAlt: 'Dubai-Digital-Authority',
267
+ secondLogoSrc: 'https://www.digitaldubai.ae/ResourcePackages/Theme/assets/dist/images/logo.svg',
268
+ secondLogoWhiteSrc: 'https://www.digitaldubai.ae/ResourcePackages/Theme/assets/dist/images/logo.svg',
269
+ secondLogoAlt: 'Dubai-Digital-Authority',
270
+ loginLink: '/login',
271
+ loginText: 'Login',
272
+ loginIcon: 'sentiment_satisfied',
147
273
  hide_login: false,
148
- language_text: "العربية",
149
- hamburger_menu_button_name: "hamburger_menu_button_name",
150
- accessibility_button_name: "accessibility_button_name",
151
- search_button_name: "search_button_name",
152
- search_input_name: "q",
153
- search_action: "",
154
- language_button_name: "language_button_name",
155
- close_menu_button_name: "close_menu_button_name",
156
- close_accessibility_button_name: "close_accessibility_button_name",
157
- close_sidebar_button_name: "close_sidebar_button_name",
158
- toggle_accessibility_button_name: "toggle_accessibility_button_name",
274
+ language_text: 'العربية',
275
+ hamburger_menu_button_name: 'hamburger_menu_button_name',
276
+ accessibility_button_name: 'accessibility_button_name',
277
+ search_button_name: 'search_button_name',
278
+ search_input_name: 'q',
279
+ search_action: '',
280
+ language_button_name: 'language_button_name',
281
+ close_menu_button_name: 'close_menu_button_name',
282
+ close_accessibility_button_name: 'close_accessibility_button_name',
283
+ close_sidebar_button_name: 'close_sidebar_button_name',
284
+ toggle_accessibility_button_name: 'toggle_accessibility_button_name',
159
285
  languageSwitch: "() => console.log('Language Switcher')",
160
286
  smTextSize: "() => console.log('Small Text')",
161
287
  baseTextSize: "() => console.log('Base Text')",
@@ -164,7 +290,7 @@ Default.args = {
164
290
  blindContrast: "() => console.log('Blind Contrast')",
165
291
  redContrast: "() => console.log('Red Contrast')",
166
292
  greenContrast: "() => console.log('Green Contrast')",
167
- readSpeakerLink: "app-eu.readspeaker.com",
293
+ readSpeakerLink: 'app-eu.readspeaker.com',
168
294
  quickLinks: [
169
295
  { label: 'Home', href: '#', subMenu: [] },
170
296
  {
@@ -185,24 +311,34 @@ Default.args = {
185
311
  label: 'Initiatives',
186
312
  href: '#',
187
313
  subMenu: [
188
- { headerLabel: 'Initiatives', label: 'Submenu-1', href: '#', subMenu: [
189
- { headerLabel: 'Initiatives', label: 'Submenu-2', href: '#', subMenu: [
190
- { headerLabel: 'Initiatives', label: 'Submenu-4', href: '#' }
191
- ] },
192
- { headerLabel: 'Initiatives', label: 'Submenu-3', href: '#' }
193
- ] },
194
- { headerLabel: 'Initiatives', label: 'Submenu-1', href: '#', subMenu: [
195
- { headerLabel: 'Initiatives', label: 'Submenu-2', href: '#', subMenu: [
196
- { headerLabel: 'Initiatives', label: 'Submenu-4', href: '#' }
197
- ] },
198
- { headerLabel: 'Initiatives', label: 'Submenu-3', href: '#' }
199
- ] },
314
+ {
315
+ headerLabel: 'Initiatives',
316
+ label: 'Submenu-1',
317
+ href: '#',
318
+ subMenu: [
319
+ { headerLabel: 'Initiatives', label: 'Submenu-2', href: '#', subMenu: [{ headerLabel: 'Initiatives', label: 'Submenu-4', href: '#' }] },
320
+ { headerLabel: 'Initiatives', label: 'Submenu-3', href: '#' },
321
+ ],
322
+ },
323
+ {
324
+ headerLabel: 'Initiatives',
325
+ label: 'Submenu-1',
326
+ href: '#',
327
+ subMenu: [
328
+ { headerLabel: 'Initiatives', label: 'Submenu-2', href: '#', subMenu: [{ headerLabel: 'Initiatives', label: 'Submenu-4', href: '#' }] },
329
+ { headerLabel: 'Initiatives', label: 'Submenu-3', href: '#' },
330
+ ],
331
+ },
200
332
  ],
201
333
  },
202
- { label: 'Services', href: '#', subMenu: [
334
+ {
335
+ label: 'Services',
336
+ href: '#',
337
+ subMenu: [
203
338
  { headerLabel: 'Service', label: 'Service-1', href: '#' },
204
339
  { headerLabel: 'Service', label: 'Service-2', href: '#' },
205
- ] },
340
+ ],
341
+ },
206
342
  { label: 'Data', href: '#', subMenu: [] },
207
343
  { label: 'Government Services', href: '#', subMenu: [] },
208
344
  { label: 'Investor Relations', href: '#', subMenu: [] },
@@ -214,3 +350,32 @@ Default.args = {
214
350
  // A site without sign-in: hide_login removes the Login link from the toolbar and the side menu.
215
351
  export const WithoutLogin = Template.bind({});
216
352
  WithoutLogin.args = Object.assign(Object.assign({}, Default.args), { hide_login: true });
353
+ // A page built on the 3.x attributes, in Arabic: every settable text in the accessibility panel,
354
+ // the toolbar and the side menu comes from an attribute. A few close-button labels (for example
355
+ // "Close Sidebar") have no attribute and stay fixed English text.
356
+ export const Arabic3x = () => `
357
+ <div dir="rtl" lang="ar">
358
+ <dda-header
359
+ contrast_title="تباين الألوان" contrast_description="حدد إعداد تباين الألوان المفضل لديك"
360
+ contrast_noraml_text="الألوان العادية" contrast_color_blind_text="عمى الألوان"
361
+ contrast_red_weakness_text="ضعف أحمر" contrast_green_weakness_text="الضعف الأخضر"
362
+ screen_reader_title="قارئ الشاشة" screen_reader_description="استمع إلى محتوى الصفحة بالضغط على تشغيل أو استماع"
363
+ read_speaker_link="#" text_size_title="حجم النص" text_size_description="استخدم الأزرار أدناه لزيادة أو تقليل حجم النص"
364
+ accessibility_tooltip="إمكانية الوصول" accessibility_button_text="إمكانية الوصول إلى الموقع الإلكتروني"
365
+ accessibility_button_icon_name="accessible_forward"
366
+ search_tooltip="بحث" search_input_placeholder="يبحث" language_text="English" language_lang="en" language_tooltip="تغيير اللغة"
367
+ login-text="" side-main-menu-title="قائمة الموقع" menu_button_label="القائمة"
368
+ quick-links='${JSON.stringify([
369
+ { type: 'dda_default_submenu', headerMenuLabel: 'الصفحة الرئيسية', url: '#', children: [] },
370
+ {
371
+ type: 'dda_default_submenu',
372
+ headerMenuLabel: 'عن الدائرة',
373
+ url: '#',
374
+ children: [
375
+ { type: 'dda_default_submenu', headerMenuLabel: 'استراتيجية الدائرة', url: '#', children: [] },
376
+ { type: 'dda_default_submenu', headerMenuLabel: 'السياسات', url: '#', children: [{ headerMenuLabel: 'سياسة الجودة', url: '#', children: [] }] },
377
+ ],
378
+ },
379
+ ])}'
380
+ ></dda-header>
381
+ </div>`;
@@ -0,0 +1,69 @@
1
+ import { parseJsonProp } from "../../utils/parse-json-prop";
2
+ const clean = (value) => (typeof value === 'string' ? value.trim() : '');
3
+ const optional = (value) => clean(value) || undefined;
4
+ const isPlainObject = (value) => Boolean(value) && typeof value === 'object' && !Array.isArray(value);
5
+ // An array field (children, mega-menu columns/items, 5.x subMenu) may contain a bad entry (null, a
6
+ // number, ...) even when the field itself is a valid array. Each bad entry is skipped, with one
7
+ // warning, rather than reaching a raw.<prop> access on a non-object and throwing.
8
+ const asArray = (value) => {
9
+ if (!Array.isArray(value))
10
+ return [];
11
+ return value.filter(item => {
12
+ if (isPlainObject(item))
13
+ return true;
14
+ console.warn('quick-links: an item is not an object; it is ignored.');
15
+ return false;
16
+ });
17
+ };
18
+ const isLegacy = (raw) => raw.headerMenuLabel !== undefined || raw.type !== undefined;
19
+ function legacyItem(raw) {
20
+ const children = asArray(raw.children);
21
+ const base = {
22
+ label: clean(raw.headerMenuLabel),
23
+ href: clean(raw.url) || '#',
24
+ active: raw.active === 'true' || raw.active === true,
25
+ id: optional(raw.headerMenuId),
26
+ description: optional(raw.description),
27
+ icon: optional(raw.quickLinksIcon),
28
+ kind: 'link',
29
+ submenuTitle: optional(raw.defaultSubMenuTitle),
30
+ children: [],
31
+ columns: [],
32
+ };
33
+ if (children.length === 0)
34
+ return base;
35
+ if (raw.type === 'dda_main_megamenu') {
36
+ return Object.assign(Object.assign({}, base), { kind: 'mega', columns: children.map(col => ({
37
+ title: optional(col.title),
38
+ links: asArray(col.items).map(link => {
39
+ var _a;
40
+ return ({
41
+ label: clean(link.headerMenuLabel),
42
+ href: clean(link.url) || '#',
43
+ description: optional(link.description),
44
+ // 3.x always showed an icon in the mega menu, defaulting to 'sentiment_satisfied' when
45
+ // none was set; the 5.x subMenu shape never had a default, so this fallback stays scoped
46
+ // to the 3.x mapping (see modernItem below, which leaves icon undefined).
47
+ icon: (_a = optional(link.quickLinksIcon)) !== null && _a !== void 0 ? _a : 'sentiment_satisfied',
48
+ active: false,
49
+ });
50
+ }),
51
+ })) });
52
+ }
53
+ return Object.assign(Object.assign({}, base), { kind: 'dropdown', children: children.map(legacyItem) });
54
+ }
55
+ function modernItem(raw) {
56
+ const sub = asArray(raw.subMenu);
57
+ const base = { label: clean(raw.label), href: clean(raw.href) || '#', active: false, kind: 'link', children: [], columns: [] };
58
+ if (sub.length === 0)
59
+ return base;
60
+ return Object.assign(Object.assign({}, base), { kind: 'mega', columns: [
61
+ {
62
+ title: optional(raw.menuLabel),
63
+ links: sub.map(link => ({ label: clean(link.title), href: clean(link.href) || '#', description: optional(link.description), icon: optional(link.icon), active: false })),
64
+ },
65
+ ] });
66
+ }
67
+ export function normalizeQuickLinks(value) {
68
+ return asArray(parseJsonProp(value, 'quick-links')).map(raw => (isLegacy(raw) ? legacyItem(raw) : modernItem(raw)));
69
+ }
@@ -20,6 +20,10 @@ export class DdaHomeBanner {
20
20
  this.slide_button_label = 'Go to slide';
21
21
  /** Template for the screen-reader slide announcement. `{current}` and `{total}` are substituted. */
22
22
  this.slide_status_label = 'Slide {current} of {total}';
23
+ /** Shows the decorative scroll icon at the end of the slide controls (hidden at 992px and below unless `show_scroll_icon_mobile` is set). Default: `true`. */
24
+ this.show_scroll_icon = true;
25
+ /** Also shows the scroll icon at 992px and below. Default: `false`. */
26
+ this.show_scroll_icon_mobile = false;
23
27
  this.currentSlide = 0;
24
28
  this.slides = [];
25
29
  this.isPaused = false;
@@ -182,10 +186,10 @@ export class DdaHomeBanner {
182
186
  render() {
183
187
  const total = this.slides.length;
184
188
  const showAutoplayToggle = this.autoplay && !this.reducedMotion;
185
- return (h(Host, { key: '337ecda1c81691400d3cf4368ae74baeaf997ad1', class: "home-slider", role: "region", "aria-roledescription": "carousel", "aria-label": this.aria_label }, h("div", { key: 'c916baad761db8b607c783f2fd58dcf0eda9c2ee', class: "dda-slider-container" }, h("div", { key: '7ce645f06a4a83d78185563d0d99e472aee19dce', class: "dda-slides", style: { width: total * 100 + 'vw', left: this.currentSlide * -100 + '%' } }, h("slot", { key: 'f946bde4fcf2ae779a96dc6d2a99bc68ab358fd2' })), h("div", { key: 'eb981c8e7753780a5c1d80f9f3651a8797e480eb', class: 'slider-nav' }, showAutoplayToggle && (h("button", { key: '3bbdc0f9fd960df2037deb65e4ddace5055d28bb', class: "pause", type: "button", "aria-label": this.isPaused ? this.play_button_label : this.pause_button_label, onClick: this.togglePause }, h("i", { key: 'c9d122cd73a083a871f3ba390987cb5e7aa3a1b6', class: "material-icons", "aria-hidden": "true" }, this.isPaused ? 'play_arrow' : 'pause'))), h("button", { key: '24f4655bc2a97cbe43e5d9c666b800be75e4d18d', class: "prev", type: "button", "aria-label": this.previous_button_label, onClick: () => this.prevSlide() }, h("i", { key: '028e2fffddc89b3679051f528245a931c4e6dc4d', class: "material-icons", "aria-hidden": "true" }, "chevron_left")), h("ul", { key: 'bbda2847681926070012d86593892b4788d409f0' }, this.slides.map((_, index) => {
189
+ return (h(Host, { key: '44c4c55938a8ba6d6974780e92cfdc02479afb8a', class: "home-slider", role: "region", "aria-roledescription": "carousel", "aria-label": this.aria_label }, h("div", { key: '18314d56093e75acab6394769984de61cc133e4c', class: "dda-slider-container" }, h("div", { key: '6dca34903300349e02527a809be5cae94878831d', class: "dda-slides", style: { width: total * 100 + 'vw', left: this.currentSlide * -100 + '%' } }, h("slot", { key: 'a9df2fcbbcdaba8f79f29fa8ff3cbcd163eaa9d4' })), h("div", { key: '37a9054da4e5dcad38d83a8decd80635ef26cdf2', class: 'slider-nav' }, showAutoplayToggle && (h("button", { key: '94718488655c71f3a38baabadb3bfe945cf1e7ca', class: "pause", type: "button", "aria-label": this.isPaused ? this.play_button_label : this.pause_button_label, onClick: this.togglePause }, h("i", { key: 'ff629d0378a36110f00bb8f17f358a37dd3cd7d0', class: "material-icons", "aria-hidden": "true" }, this.isPaused ? 'play_arrow' : 'pause'))), h("button", { key: '76227e52e94f08a416b56680f61ac5a76c6ef1ba', class: "prev", type: "button", "aria-label": this.previous_button_label, onClick: () => this.prevSlide() }, h("i", { key: '19f8f4da320613319482f4da4e4367a0ff1ea887', class: "material-icons", "aria-hidden": "true" }, "chevron_left")), h("ul", { key: '32ae627535ab523d85ad33d658523095f9ff9e45' }, this.slides.map((_, index) => {
186
190
  const isCurrent = this.currentSlide === index;
187
191
  return (h("li", null, h("button", { type: "button", class: isCurrent ? 'dots active' : 'dots', "aria-label": `${this.slide_button_label} ${index + 1}`, "aria-current": isCurrent ? 'true' : null, onClick: () => this.setSlide(index) })));
188
- })), h("button", { key: '64f35b47bf5ed0fc6a2f6cec8fe709ff45e3909f', class: "next", type: "button", "aria-label": this.next_button_label, onClick: () => this.nextSlide() }, h("i", { key: 'd733c1fc3970f2d4f5319e8215636cdea0a2d9f9', class: "material-icons", "aria-hidden": "true" }, "chevron_right"))), h("div", { key: '8c66648d97b0c82868b7162486d8e91eb6e46a39', class: "visually-hidden", role: "status", "aria-live": this.isRotating ? 'off' : 'polite' }, total ? this.statusText(this.currentSlide + 1, total) : ''))));
192
+ })), h("button", { key: '60ce3c8766da6e41c43fed8b2896289592b2b21f', class: "next", type: "button", "aria-label": this.next_button_label, onClick: () => this.nextSlide() }, h("i", { key: 'ce7a17d796ae162e53b3ed26aea0b48a3be907f1', class: "material-icons", "aria-hidden": "true" }, "chevron_right")), this.show_scroll_icon && (h("div", { key: '2280a7a5818da850449da17792d5d6d9fd5740fe', class: { 'dda-mouse-scroll': true, 'dda-mouse-scroll-mobile': this.show_scroll_icon_mobile }, "aria-hidden": "true" }, h("dda-scroll-icon", { key: 'd0f4be0b232c881c71c2c3469c47c019de021acf', scroll_icon_size: "sm", scroll_icon_color: "white" })))), h("div", { key: '1438d05ca350cd7a98c343bd6dd3b549fbfa75f3', class: "visually-hidden", role: "status", "aria-live": this.isRotating ? 'off' : 'polite' }, total ? this.statusText(this.currentSlide + 1, total) : ''))));
189
193
  }
190
194
  static get is() { return "dda-home-banner"; }
191
195
  static get originalStyleUrls() {
@@ -379,6 +383,46 @@ export class DdaHomeBanner {
379
383
  "reflect": false,
380
384
  "attribute": "slide_status_label",
381
385
  "defaultValue": "'Slide {current} of {total}'"
386
+ },
387
+ "show_scroll_icon": {
388
+ "type": "boolean",
389
+ "mutable": false,
390
+ "complexType": {
391
+ "original": "boolean",
392
+ "resolved": "boolean",
393
+ "references": {}
394
+ },
395
+ "required": false,
396
+ "optional": false,
397
+ "docs": {
398
+ "tags": [],
399
+ "text": "Shows the decorative scroll icon at the end of the slide controls (hidden at 992px and below unless `show_scroll_icon_mobile` is set). Default: `true`."
400
+ },
401
+ "getter": false,
402
+ "setter": false,
403
+ "reflect": false,
404
+ "attribute": "show_scroll_icon",
405
+ "defaultValue": "true"
406
+ },
407
+ "show_scroll_icon_mobile": {
408
+ "type": "boolean",
409
+ "mutable": false,
410
+ "complexType": {
411
+ "original": "boolean",
412
+ "resolved": "boolean",
413
+ "references": {}
414
+ },
415
+ "required": false,
416
+ "optional": false,
417
+ "docs": {
418
+ "tags": [],
419
+ "text": "Also shows the scroll icon at 992px and below. Default: `false`."
420
+ },
421
+ "getter": false,
422
+ "setter": false,
423
+ "reflect": false,
424
+ "attribute": "show_scroll_icon_mobile",
425
+ "defaultValue": "false"
382
426
  }
383
427
  };
384
428
  }
@@ -24,6 +24,8 @@ export default {
24
24
  pause_button_label: { control: 'text', description: 'Accessible name for the pause button' },
25
25
  play_button_label: { control: 'text', description: 'Accessible name for the play button' },
26
26
  slide_button_label: { control: 'text', description: 'Prefix for each dot’s accessible name' },
27
+ show_scroll_icon: { control: 'boolean', description: 'Show the decorative scroll icon after the slide controls' },
28
+ show_scroll_icon_mobile: { control: 'boolean', description: 'Also show the scroll icon at 992px and below' },
27
29
  },
28
30
  parameters: {
29
31
  docs: {
@@ -64,6 +66,8 @@ const Template = args => `
64
66
  pause_button_label="${args.pause_button_label}"
65
67
  play_button_label="${args.play_button_label}"
66
68
  slide_button_label="${args.slide_button_label}"
69
+ show_scroll_icon="${args.show_scroll_icon}"
70
+ show_scroll_icon_mobile="${args.show_scroll_icon_mobile}"
67
71
  >
68
72
  ${slide(IMG_1, 'Aerial view of Dubai at sunset', 'Digitalizing Life In Dubai', 'Pioneering and accelerating the pace of digital transformation in the city')}
69
73
  ${slide(IMG_2, 'Dubai skyline at dusk', 'Explore More', 'Find the services you need')}
@@ -78,6 +82,8 @@ const defaultArgs = {
78
82
  pause_button_label: 'Pause slideshow',
79
83
  play_button_label: 'Play slideshow',
80
84
  slide_button_label: 'Go to slide',
85
+ show_scroll_icon: true,
86
+ show_scroll_icon_mobile: false,
81
87
  };
82
88
  export const Default = Template.bind({});
83
89
  Default.args = Object.assign({}, defaultArgs);
@@ -160,6 +160,13 @@
160
160
  height: 25px;
161
161
  overflow: hidden;
162
162
  }
163
+
164
+ .slider-nav .dda-mouse-scroll {
165
+ display: flex;
166
+ align-items: center;
167
+ margin-inline-start: 8px;
168
+ }
169
+
163
170
  .slider-nav ul {
164
171
  display: flex;
165
172
  align-items: center;
@@ -208,6 +215,9 @@
208
215
  .slider-nav {
209
216
  bottom: 100px;
210
217
  }
218
+ .slider-nav .dda-mouse-scroll:not(.dda-mouse-scroll-mobile) {
219
+ display: none;
220
+ }
211
221
  }
212
222
  /* On taller small screens the quick-link cards sit on the banner (dda.css), so the controls sit
213
223
  16px above them. The two custom properties are the cards' gap above the bar and their height. */
@@ -0,0 +1,164 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- h is the Stencil JSX pragma; this repo's eslint config does not recognize it as used (same false positive on every other component file).
2
+ import { h } from "@stencil/core";
3
+ import { parseJsonProp } from "../../utils/parse-json-prop";
4
+ // The 3.x home-page card row, rebuilt on the .quick-links row in dda.css: the same cards, scroll
5
+ // indicators and banner position as plain-HTML quick links. No mouse-driven scrolling, no timers.
6
+ export class DdaHomeCarousel {
7
+ constructor() {
8
+ /** Cards shown at once on wide screens. A card is never narrower than 220px. Default: `5`. */
9
+ this.items_in_view = 5;
10
+ /** Accessible name of the card list. Default: `Quick links`. */
11
+ this.aria_label = 'Quick links';
12
+ /** Extra CSS classes on the list. */
13
+ this.custom_class = '';
14
+ }
15
+ render() {
16
+ const items = parseJsonProp(this.bannercardlist, 'bannercardlist');
17
+ const perView = Math.max(1, Math.round(Number(this.items_in_view)) || 5);
18
+ const listClass = ['quick-links', 'dda-home-carousel-track', this.custom_class, this.component_mode].filter(Boolean).join(' ');
19
+ return (h("nav", { key: '1e6d6b2d6dde778e65bd639ea753597f8d072366', class: "dda-home-carousel", "aria-label": this.aria_label }, h("ul", { key: 'b41e6812130fdc4a49b27a78202c6502191c79e4', class: listClass, style: { '--dda-home-carousel-per-view': String(perView) } }, items.map((item, index) => (h("li", { class: "dda-home-carousel-item", key: item.banner_card_id || index }, h("dda-banner-card", { onClick: () => this.cardClick.emit(item), banner_card_href: item.banner_card_href, banner_card_url: item.banner_card_url, banner_card_id: item.banner_card_id, image_src: item.image_src, image_alt: item.image_alt, banner_card_title: item.banner_card_title, banner_card_description: item.banner_card_description, banner_card_value: item.banner_card_value, banner_card_name: item.banner_card_name, custom_class: item.custom_class || '', component_mode: item.component_mode })))))));
20
+ }
21
+ static get is() { return "dda-home-carousel"; }
22
+ static get originalStyleUrls() {
23
+ return {
24
+ "$": ["../../global/global.css"]
25
+ };
26
+ }
27
+ static get styleUrls() {
28
+ return {
29
+ "$": ["../../global/global.css"]
30
+ };
31
+ }
32
+ static get properties() {
33
+ return {
34
+ "bannercardlist": {
35
+ "type": "string",
36
+ "mutable": false,
37
+ "complexType": {
38
+ "original": "string | BannerCardItem[]",
39
+ "resolved": "BannerCardItem[] | string",
40
+ "references": {
41
+ "BannerCardItem": {
42
+ "location": "local",
43
+ "path": "/root/Coding/dubai-design-system/packages/stencil/src/components/dda-home-carousel/dda-home-carousel.tsx",
44
+ "id": "src/components/dda-home-carousel/dda-home-carousel.tsx::BannerCardItem"
45
+ }
46
+ }
47
+ },
48
+ "required": false,
49
+ "optional": false,
50
+ "docs": {
51
+ "tags": [],
52
+ "text": "The cards. JSON array, or array property, of `{ banner_card_href, banner_card_title, banner_card_description, image_src, image_alt, banner_card_id, banner_card_value, banner_card_name, custom_class, component_mode }`."
53
+ },
54
+ "getter": false,
55
+ "setter": false,
56
+ "reflect": false,
57
+ "attribute": "bannercardlist"
58
+ },
59
+ "items_in_view": {
60
+ "type": "number",
61
+ "mutable": false,
62
+ "complexType": {
63
+ "original": "number",
64
+ "resolved": "number",
65
+ "references": {}
66
+ },
67
+ "required": false,
68
+ "optional": false,
69
+ "docs": {
70
+ "tags": [],
71
+ "text": "Cards shown at once on wide screens. A card is never narrower than 220px. Default: `5`."
72
+ },
73
+ "getter": false,
74
+ "setter": false,
75
+ "reflect": false,
76
+ "attribute": "items_in_view",
77
+ "defaultValue": "5"
78
+ },
79
+ "aria_label": {
80
+ "type": "string",
81
+ "mutable": false,
82
+ "complexType": {
83
+ "original": "string",
84
+ "resolved": "string",
85
+ "references": {}
86
+ },
87
+ "required": false,
88
+ "optional": false,
89
+ "docs": {
90
+ "tags": [],
91
+ "text": "Accessible name of the card list. Default: `Quick links`."
92
+ },
93
+ "getter": false,
94
+ "setter": false,
95
+ "reflect": false,
96
+ "attribute": "aria_label",
97
+ "defaultValue": "'Quick links'"
98
+ },
99
+ "custom_class": {
100
+ "type": "string",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "string",
104
+ "resolved": "string",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": false,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": "Extra CSS classes on the list."
112
+ },
113
+ "getter": false,
114
+ "setter": false,
115
+ "reflect": false,
116
+ "attribute": "custom_class",
117
+ "defaultValue": "''"
118
+ },
119
+ "component_mode": {
120
+ "type": "string",
121
+ "mutable": false,
122
+ "complexType": {
123
+ "original": "string",
124
+ "resolved": "string",
125
+ "references": {}
126
+ },
127
+ "required": false,
128
+ "optional": false,
129
+ "docs": {
130
+ "tags": [],
131
+ "text": "Theme override class, e.g. `light-mode`."
132
+ },
133
+ "getter": false,
134
+ "setter": false,
135
+ "reflect": false,
136
+ "attribute": "component_mode"
137
+ }
138
+ };
139
+ }
140
+ static get events() {
141
+ return [{
142
+ "method": "cardClick",
143
+ "name": "cardClick",
144
+ "bubbles": true,
145
+ "cancelable": true,
146
+ "composed": true,
147
+ "docs": {
148
+ "tags": [],
149
+ "text": "Emitted when a card is clicked, with its item. A link card still navigates."
150
+ },
151
+ "complexType": {
152
+ "original": "BannerCardItem",
153
+ "resolved": "BannerCardItem",
154
+ "references": {
155
+ "BannerCardItem": {
156
+ "location": "local",
157
+ "path": "/root/Coding/dubai-design-system/packages/stencil/src/components/dda-home-carousel/dda-home-carousel.tsx",
158
+ "id": "src/components/dda-home-carousel/dda-home-carousel.tsx::BannerCardItem"
159
+ }
160
+ }
161
+ }
162
+ }];
163
+ }
164
+ }