@dubai-design-system/components-js 5.2.0 → 5.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 (274) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/MIGRATION.md +138 -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-tooltip.entry.js → cjs/dda-banner-card.cjs.entry.js} +16 -36
  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 +4 -4
  19. package/dist/{dda/dda-tabs.entry.js → cjs/dda-home-carousel.cjs.entry.js} +18 -49
  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-search-input.cjs.entry.js +3 -3
  29. package/dist/cjs/dda-segmented-tabs.cjs.entry.js +5 -5
  30. package/dist/cjs/dda-select.cjs.entry.js +4 -6
  31. package/dist/cjs/dda-sticky-footer.cjs.entry.js +41 -4
  32. package/dist/cjs/dda-tabs.cjs.entry.js +4 -4
  33. package/dist/cjs/dda-textarea.cjs.entry.js +1351 -16189
  34. package/dist/cjs/dda-toggle.cjs.entry.js +3 -3
  35. package/dist/cjs/dda-tooltip.cjs.entry.js +3 -3
  36. package/dist/cjs/dda-ui-card.cjs.entry.js +3 -3
  37. package/dist/cjs/dda-vertical-stepper.cjs.entry.js +2 -2
  38. package/dist/cjs/dda.cjs.js +3 -30
  39. package/dist/cjs/{index-Na_7EWDR.js → index-DD8fdSxb.js} +1 -1
  40. package/dist/cjs/index.cjs.js +0 -10
  41. package/dist/cjs/loader.cjs.js +2 -2
  42. package/dist/cjs/parse-json-prop-B0KWD8qe.js +38 -0
  43. package/dist/collection/collection-manifest.json +5 -3
  44. package/dist/collection/components/dda-accordion/dda-accordion.js +1 -1
  45. package/dist/collection/components/dda-alert/dda-alert.js +1 -1
  46. package/dist/collection/components/dda-attach-file/dda-attach-file.js +1 -1
  47. package/dist/collection/components/dda-avatar/dda-avatar.js +5 -5
  48. package/dist/collection/components/dda-banner/dda-banner.js +1 -1
  49. package/dist/collection/components/dda-banner-card/dda-banner-card.js +243 -0
  50. package/dist/collection/components/dda-button/dda-button.js +1 -1
  51. package/dist/collection/components/dda-checkbox/dda-checkbox.js +1 -1
  52. package/dist/collection/components/dda-chip/dda-chip.js +1 -1
  53. package/dist/collection/components/dda-credit-card/dda-credit-card.js +1 -1
  54. package/dist/collection/components/dda-creditcard-field/dda-creditcard-field.js +1 -1
  55. package/dist/collection/components/dda-dropdown/dda-dropdown.js +1 -1
  56. package/dist/collection/components/dda-footer/dda-footer.js +1 -1
  57. package/dist/collection/components/dda-header/dda-header.js +838 -88
  58. package/dist/collection/components/dda-header/dda-header.stories.js +200 -35
  59. package/dist/collection/components/dda-header/nav-model.js +69 -0
  60. package/dist/collection/components/dda-home-banner/dda-home-banner.js +2 -2
  61. package/dist/collection/components/dda-home-carousel/dda-home-carousel.js +164 -0
  62. package/dist/collection/components/dda-home-carousel/dda-home-carousel.stories.js +24 -0
  63. package/dist/collection/components/dda-input/dda-input.js +1 -1
  64. package/dist/collection/components/dda-link-button/dda-link-button.js +2 -2
  65. package/dist/collection/components/dda-number-field/dda-number-field.js +1 -1
  66. package/dist/collection/components/dda-pagination/dda-pagination.js +1 -1
  67. package/dist/collection/components/dda-phonefield/dda-phonefield.js +1 -1
  68. package/dist/collection/components/dda-progressbar/dda-progressbar.js +1 -1
  69. package/dist/collection/components/dda-radiobutton/dda-radiobutton.css +228 -6
  70. package/dist/collection/components/dda-radiobutton/dda-radiobutton.js +1 -1
  71. package/dist/collection/components/dda-range-slider/dda-range-slider.js +2 -2
  72. package/dist/collection/components/dda-search-input/dda-search-input.js +1 -1
  73. package/dist/collection/components/dda-select/dda-select.js +1 -1
  74. package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.js +496 -5
  75. package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.stories.js +12 -1
  76. package/dist/collection/components/dda-tabs/dda-tabs.js +1 -1
  77. package/dist/collection/components/dda-textarea/dda-textarea.js +2 -2
  78. package/dist/collection/components/dda-toggle/dda-toggle.js +1 -1
  79. package/dist/collection/components/dda-tooltip/dda-tooltip.js +1 -1
  80. package/dist/collection/components/dda-ui-card/dda-ui-card.js +1 -1
  81. package/dist/collection/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.css +29 -9
  82. package/dist/collection/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.js +1 -1
  83. package/dist/collection/components/stepper/dda-horizontal-stepper/dda-horizontal-stepper.js +1 -1
  84. package/dist/collection/components/stepper/dda-vertical-stepper/dda-vertical-stepper.js +1 -1
  85. package/dist/collection/global/global.css +228 -6
  86. package/dist/collection/utils/parse-json-prop.js +34 -0
  87. package/dist/components/dda-accordion.js +1 -59
  88. package/dist/components/dda-alert.js +1 -94
  89. package/dist/components/dda-attach-file.js +1 -138
  90. package/dist/components/dda-avatar.js +1 -107
  91. package/dist/components/dda-banner-card.d.ts +11 -0
  92. package/dist/components/dda-banner-card.js +1 -0
  93. package/dist/components/dda-banner.js +1 -57
  94. package/dist/components/dda-breadcrumb.js +1 -66
  95. package/dist/components/dda-button.js +1 -6
  96. package/dist/components/dda-checkbox.js +1 -59
  97. package/dist/components/dda-chip.js +1 -55
  98. package/dist/components/dda-credit-card.js +1 -54
  99. package/dist/components/dda-creditcard-field.js +1 -133
  100. package/dist/components/dda-dropdown.js +1 -113
  101. package/dist/components/dda-footer.js +1 -72
  102. package/dist/components/dda-header.js +1 -367
  103. package/dist/components/dda-home-banner.js +1 -249
  104. package/dist/components/dda-home-carousel.d.ts +11 -0
  105. package/dist/components/dda-home-carousel.js +1 -0
  106. package/dist/components/dda-horizontal-stepper.js +1 -69
  107. package/dist/components/dda-input.js +1 -92
  108. package/dist/components/dda-link-button.js +1 -6
  109. package/dist/components/dda-number-field.js +1 -127
  110. package/dist/components/dda-pagination.js +1 -133
  111. package/dist/components/dda-phonefield.js +1 -316
  112. package/dist/components/dda-progressbar.js +1 -58
  113. package/dist/components/dda-radiobutton.js +1 -6
  114. package/dist/components/dda-range-slider.js +1 -93
  115. package/dist/components/dda-search-input.js +1 -102
  116. package/dist/components/dda-segmented-tabs.js +1 -133
  117. package/dist/components/dda-select.js +1 -219
  118. package/dist/components/dda-sticky-footer.js +1 -132
  119. package/dist/components/dda-tabs.js +1 -91
  120. package/dist/components/dda-textarea.js +1 -31277
  121. package/dist/components/dda-toggle.js +1 -55
  122. package/dist/components/dda-tooltip.js +1 -6
  123. package/dist/components/dda-ui-card.js +1 -71
  124. package/dist/components/dda-vertical-stepper.js +1 -72
  125. package/dist/components/index.js +1 -34
  126. package/dist/components/{p-D7sJgBDk.js → p-BCtBptNq.js} +1 -1
  127. package/dist/components/p-BP6BxgDV.js +1 -0
  128. package/dist/components/p-BZzFtOHg.js +1 -0
  129. package/dist/components/p-CvcFE821.js +1 -0
  130. package/dist/components/{p-_-I_65FG.js → p-D3e_hki9.js} +1 -1
  131. package/dist/components/{p-C2Cs3ruo.js → p-DCwxgkNU.js} +1 -1
  132. package/dist/components/{p-C520q-ka.js → p-R9p4F9Pi.js} +1 -1
  133. package/dist/dda/dda.css +2 -6393
  134. package/dist/dda/dda.esm.js +1 -47
  135. package/dist/dda/index.esm.js +1 -29
  136. package/dist/dda/{p-ee6d56fc.entry.js → p-0480f0a9.entry.js} +1 -1
  137. package/dist/dda/{p-0a86a74c.entry.js → p-06188c4c.entry.js} +1 -1
  138. package/dist/dda/p-08e1892a.entry.js +1 -0
  139. package/dist/dda/{p-0574c9df.entry.js → p-10c5a752.entry.js} +1 -1
  140. package/dist/dda/{p-2630152f.entry.js → p-169ba650.entry.js} +1 -1
  141. package/dist/dda/{p-9c86dc30.entry.js → p-25058697.entry.js} +1 -1
  142. package/dist/dda/{p-e8ca224f.entry.js → p-32a7c588.entry.js} +1 -1
  143. package/dist/dda/{p-95e1a389.entry.js → p-333205aa.entry.js} +1 -1
  144. package/dist/dda/{p-3835f3b7.entry.js → p-46df4933.entry.js} +1 -1
  145. package/dist/dda/{p-eecfe091.entry.js → p-47322b02.entry.js} +1 -1
  146. package/dist/dda/{p-489a3711.entry.js → p-4e717a2e.entry.js} +1 -1
  147. package/dist/dda/{p-271c5f91.entry.js → p-5840fad9.entry.js} +1 -1
  148. package/dist/dda/p-5bb62ef7.entry.js +1 -0
  149. package/dist/dda/p-5e757702.entry.js +1 -0
  150. package/dist/dda/{p-32746429.entry.js → p-6430c363.entry.js} +1 -1
  151. package/dist/dda/{p-8de4f35e.entry.js → p-6d4f5672.entry.js} +1 -1
  152. package/dist/dda/{p-9416d8ec.entry.js → p-6db5588a.entry.js} +1 -1
  153. package/dist/dda/{p-16f94322.entry.js → p-76859bf8.entry.js} +1 -1
  154. package/dist/dda/p-7c1abbd2.entry.js +1 -0
  155. package/dist/dda/{p-eed4a104.entry.js → p-7ffce954.entry.js} +1 -1
  156. package/dist/dda/{p-58de747b.entry.js → p-8108c4ed.entry.js} +1 -1
  157. package/dist/dda/{p-95b87c55.entry.js → p-8852dafb.entry.js} +1 -1
  158. package/dist/dda/{p-98c59aa8.entry.js → p-8dbbc0ca.entry.js} +1 -1
  159. package/dist/dda/{p-3d57e957.entry.js → p-95100f73.entry.js} +1 -1
  160. package/dist/dda/{p-b6190656.entry.js → p-9a4e34d1.entry.js} +1 -1
  161. package/dist/dda/p-9b234635.entry.js +1 -0
  162. package/dist/dda/{p-d06c5daf.entry.js → p-9d9834ff.entry.js} +1 -1
  163. package/dist/dda/{p-1acc0fda.entry.js → p-9f01cb56.entry.js} +1 -1
  164. package/dist/dda/{p-c39d196d.entry.js → p-9ff8dc84.entry.js} +1 -1
  165. package/dist/dda/p-BnrqwGTj.js +2 -0
  166. package/dist/dda/p-CvcFE821.js +1 -0
  167. package/dist/dda/{p-e660a594.entry.js → p-a8a1ee5d.entry.js} +1 -1
  168. package/dist/dda/{p-d8fd3f73.entry.js → p-b37f40a9.entry.js} +1 -1
  169. package/dist/dda/p-eaffd32d.entry.js +1 -0
  170. package/dist/dda/{p-63754a93.entry.js → p-f2efc121.entry.js} +1 -1
  171. package/dist/dda/{p-96741f45.entry.js → p-faed59dd.entry.js} +1 -1
  172. package/dist/dda/p-fb00dec4.entry.js +1 -0
  173. package/dist/esm/dda-accordion.entry.js +3 -3
  174. package/dist/esm/dda-alert.entry.js +5 -5
  175. package/dist/esm/dda-attach-file.entry.js +3 -3
  176. package/dist/esm/dda-avatar.entry.js +8 -8
  177. package/dist/{dda/dda-credit-card.entry.js → esm/dda-banner-card.entry.js} +14 -16
  178. package/dist/esm/dda-banner.entry.js +3 -3
  179. package/dist/esm/dda-breadcrumb.entry.js +2 -2
  180. package/dist/esm/dda-button.entry.js +3 -3
  181. package/dist/esm/dda-checkbox.entry.js +3 -3
  182. package/dist/esm/dda-chip.entry.js +3 -3
  183. package/dist/esm/dda-credit-card.entry.js +3 -3
  184. package/dist/esm/dda-creditcard-field.entry.js +4 -4
  185. package/dist/esm/dda-dropdown.entry.js +4 -4
  186. package/dist/esm/dda-footer.entry.js +3 -3
  187. package/dist/esm/dda-header.entry.js +208 -23
  188. package/dist/esm/dda-home-banner.entry.js +4 -4
  189. package/dist/{dda/dda-breadcrumb.entry.js → esm/dda-home-carousel.entry.js} +16 -30
  190. package/dist/esm/dda-horizontal-stepper.entry.js +3 -3
  191. package/dist/esm/dda-input.entry.js +3 -3
  192. package/dist/esm/dda-link-button_2.entry.js +6 -6
  193. package/dist/esm/dda-number-field.entry.js +3 -3
  194. package/dist/esm/dda-pagination.entry.js +4 -4
  195. package/dist/esm/dda-phonefield.entry.js +3 -3
  196. package/dist/esm/dda-progressbar.entry.js +3 -3
  197. package/dist/esm/dda-range-slider.entry.js +3 -3
  198. package/dist/esm/dda-search-input.entry.js +3 -3
  199. package/dist/esm/dda-segmented-tabs.entry.js +5 -5
  200. package/dist/esm/dda-select.entry.js +4 -6
  201. package/dist/esm/dda-sticky-footer.entry.js +41 -4
  202. package/dist/esm/dda-tabs.entry.js +4 -4
  203. package/dist/esm/dda-textarea.entry.js +1351 -16189
  204. package/dist/esm/dda-toggle.entry.js +3 -3
  205. package/dist/esm/dda-tooltip.entry.js +3 -3
  206. package/dist/esm/dda-ui-card.entry.js +3 -3
  207. package/dist/esm/dda-vertical-stepper.entry.js +2 -2
  208. package/dist/esm/dda.js +4 -31
  209. package/dist/esm/{index-CI_UcUy5.js → index-BnrqwGTj.js} +1 -1
  210. package/dist/esm/index.js +0 -10
  211. package/dist/esm/loader.js +3 -3
  212. package/dist/esm/parse-json-prop-CvcFE821.js +36 -0
  213. package/dist/types/components/dda-banner-card/dda-banner-card.d.ts +25 -0
  214. package/dist/types/components/dda-header/dda-header.d.ts +114 -4
  215. package/dist/types/components/dda-header/dda-header.stories.d.ts +187 -0
  216. package/dist/types/components/dda-header/nav-model.d.ts +19 -0
  217. package/dist/types/components/dda-home-carousel/dda-home-carousel.d.ts +29 -0
  218. package/dist/types/components/dda-home-carousel/dda-home-carousel.stories.d.ts +20 -0
  219. package/dist/types/components/dda-sticky-footer/dda-sticky-footer.d.ts +70 -1
  220. package/dist/types/components/dda-sticky-footer/dda-sticky-footer.stories.d.ts +4 -0
  221. package/dist/types/components.d.ts +726 -11
  222. package/dist/types/utils/parse-json-prop.d.ts +1 -0
  223. package/package.json +4 -2
  224. package/dist/cjs/dda-link-button.cjs.entry.js +0 -51
  225. package/dist/cjs/dda-radiobutton.cjs.entry.js +0 -27
  226. package/dist/cjs/index-DXyiIgGK.js +0 -4637
  227. package/dist/components/dda-button2.js +0 -80
  228. package/dist/components/dda-link-button2.js +0 -81
  229. package/dist/components/dda-radiobutton2.js +0 -54
  230. package/dist/components/dda-tooltip2.js +0 -70
  231. package/dist/components/index2.js +0 -4622
  232. package/dist/components/p-CZO9Eawo.js +0 -1
  233. package/dist/components/unique-id.js +0 -12
  234. package/dist/dda/dda-accordion.entry.js +0 -31
  235. package/dist/dda/dda-alert.entry.js +0 -57
  236. package/dist/dda/dda-attach-file.entry.js +0 -102
  237. package/dist/dda/dda-avatar.entry.js +0 -70
  238. package/dist/dda/dda-banner.entry.js +0 -30
  239. package/dist/dda/dda-button.entry.js +0 -47
  240. package/dist/dda/dda-checkbox.entry.js +0 -27
  241. package/dist/dda/dda-chip.entry.js +0 -25
  242. package/dist/dda/dda-creditcard-field.entry.js +0 -94
  243. package/dist/dda/dda-dropdown.entry.js +0 -75
  244. package/dist/dda/dda-footer.entry.js +0 -34
  245. package/dist/dda/dda-header.entry.js +0 -282
  246. package/dist/dda/dda-home-banner.entry.js +0 -208
  247. package/dist/dda/dda-horizontal-stepper.entry.js +0 -39
  248. package/dist/dda/dda-input.entry.js +0 -56
  249. package/dist/dda/dda-link-button.entry.js +0 -49
  250. package/dist/dda/dda-number-field.entry.js +0 -86
  251. package/dist/dda/dda-pagination.entry.js +0 -86
  252. package/dist/dda/dda-phonefield.entry.js +0 -271
  253. package/dist/dda/dda-progressbar.entry.js +0 -30
  254. package/dist/dda/dda-radiobutton.entry.js +0 -25
  255. package/dist/dda/dda-range-slider.entry.js +0 -55
  256. package/dist/dda/dda-search-input.entry.js +0 -63
  257. package/dist/dda/dda-segmented-tabs.entry.js +0 -96
  258. package/dist/dda/dda-select.entry.js +0 -183
  259. package/dist/dda/dda-sticky-footer.entry.js +0 -61
  260. package/dist/dda/dda-textarea.entry.js +0 -31241
  261. package/dist/dda/dda-toggle.entry.js +0 -25
  262. package/dist/dda/dda-ui-card.entry.js +0 -41
  263. package/dist/dda/dda-vertical-stepper.entry.js +0 -41
  264. package/dist/dda/index-CFIwfRqf.js +0 -4622
  265. package/dist/dda/p-87d647e7.entry.js +0 -1
  266. package/dist/dda/p-9541e108.entry.js +0 -1
  267. package/dist/dda/p-CI_UcUy5.js +0 -2
  268. package/dist/dda/p-c0da1e14.entry.js +0 -1
  269. package/dist/dda/p-c5ebf7df.entry.js +0 -1
  270. package/dist/dda/p-ea1720d2.entry.js +0 -1
  271. package/dist/dda/unique-id-B-I003EB.js +0 -12
  272. package/dist/esm/dda-link-button.entry.js +0 -49
  273. package/dist/esm/dda-radiobutton.entry.js +0 -25
  274. 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
+ }
@@ -182,10 +182,10 @@ export class DdaHomeBanner {
182
182
  render() {
183
183
  const total = this.slides.length;
184
184
  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) => {
185
+ return (h(Host, { key: '55af6c4a8e1fed6935eda674d5bbd51204814277', class: "home-slider", role: "region", "aria-roledescription": "carousel", "aria-label": this.aria_label }, h("div", { key: '790cdee9cb0c382ba87e0a1dd980023e86340bbf', class: "dda-slider-container" }, h("div", { key: 'bf9986414f25e2127d194860df875b171eb97880', class: "dda-slides", style: { width: total * 100 + 'vw', left: this.currentSlide * -100 + '%' } }, h("slot", { key: '380c1b2915568c3662e491eb0f6084428dc0365a' })), h("div", { key: 'd75bdafad8323981b67f7d618e22d73dd2bce5d9', class: 'slider-nav' }, showAutoplayToggle && (h("button", { key: '1a5bdeeb6a7b7cbe4f21c997e1b66795e1ace3e0', class: "pause", type: "button", "aria-label": this.isPaused ? this.play_button_label : this.pause_button_label, onClick: this.togglePause }, h("i", { key: 'fc59a1f184e6dd2bf2fb0a29615f65ec02c9b804', class: "material-icons", "aria-hidden": "true" }, this.isPaused ? 'play_arrow' : 'pause'))), h("button", { key: '3f8c87ccb3bf0c82551d24da0bb33a01b2df8071', class: "prev", type: "button", "aria-label": this.previous_button_label, onClick: () => this.prevSlide() }, h("i", { key: '8f3f95d4a1caf4a5b71051c7684e5c801b848c83', class: "material-icons", "aria-hidden": "true" }, "chevron_left")), h("ul", { key: 'de0771580040c02d8a16b71b86bbb36ecdad5f35' }, this.slides.map((_, index) => {
186
186
  const isCurrent = this.currentSlide === index;
187
187
  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) : ''))));
188
+ })), h("button", { key: '0c5c03b4283cb4eebd37d5ceba09429ea6164743', class: "next", type: "button", "aria-label": this.next_button_label, onClick: () => this.nextSlide() }, h("i", { key: '88e68e9d597893a55ab7f3e4d440ba409bae27de', class: "material-icons", "aria-hidden": "true" }, "chevron_right"))), h("div", { key: 'c9c2a5b02f68eedc517f02acac754438240af2c6', class: "visually-hidden", role: "status", "aria-live": this.isRotating ? 'off' : 'polite' }, total ? this.statusText(this.currentSlide + 1, total) : ''))));
189
189
  }
190
190
  static get is() { return "dda-home-banner"; }
191
191
  static get originalStyleUrls() {
@@ -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
+ }
@@ -0,0 +1,24 @@
1
+ const cards = [
2
+ { banner_card_href: '#', image_src: '', banner_card_title: 'About us', banner_card_description: 'Who we are and what we do' },
3
+ { banner_card_href: '#', image_src: '', banner_card_title: 'Open data', banner_card_description: 'Download public data sets' },
4
+ { banner_card_href: '#', image_src: '', banner_card_title: 'Partnerships', banner_card_description: 'Public and private projects' },
5
+ { banner_card_href: '#', image_src: '', banner_card_title: 'Maliyoun', banner_card_description: 'Finance careers programme' },
6
+ { banner_card_href: '#', image_src: '', banner_card_title: 'Services', banner_card_description: 'All services in one place' },
7
+ ];
8
+ export default {
9
+ title: 'Components/Home Carousel',
10
+ tags: ['autodocs'],
11
+ component: 'dda-home-carousel',
12
+ argTypes: {
13
+ items_in_view: { control: { type: 'number', min: 1 }, description: 'Cards shown at once on wide screens' },
14
+ aria_label: { control: 'text', description: 'Accessible name of the card list' },
15
+ },
16
+ };
17
+ const Template = args => `
18
+ <div class="home-intros" style="position: relative; height: 480px; background: #1d211b;">
19
+ <div class="dda-home-quick-links-wrap"><div class="dda-home-quick-links">
20
+ <dda-home-carousel items_in_view="${args.items_in_view}" aria_label="${args.aria_label}" bannercardlist='${JSON.stringify(cards)}'></dda-home-carousel>
21
+ </div></div>
22
+ </div>`;
23
+ export const Default = Template.bind({});
24
+ Default.args = { items_in_view: 4, aria_label: 'Quick links' };
@@ -42,7 +42,7 @@ export class DdaInput {
42
42
  this.input_name,
43
43
  ].filter(Boolean).join(' ');
44
44
  const id = this.inputId;
45
- return (h(Host, { key: '98dd445b764af2df20af7e95dbc49ef74013e312' }, h("div", { key: '7a83ce0abcd733095f27d5c3275d31548acff4ae', class: inputClass }, this.label && h("label", { key: 'ddea5a3451bf37ce1c753d4bddb32cef4a2baa2e', htmlFor: id, class: "dda-input-label" }, this.label), h("input", { key: 'b8c1062b1609e72c4b87f43c4ead4b63ce35262a', "aria-label": this.aria_label, id: id, name: this.input_name, type: this.type, autocomplete: this.autocomplete, placeholder: this.placeholder, value: this.value, onInput: (event) => this.handleInput(event), class: "dda-input-field dda-input-text", "aria-describedby": this.describedBy, "aria-invalid": this.error_message ? 'true' : undefined }), this.helper_text && h("span", { key: 'af728d433f267c7e8c81e8b5894df4a17154faa7', id: this.helperId, class: "dda-helper-text" }, this.helper_text), this.error_message && h("span", { key: '94ad0af0de6d1d02860e6432684b79ca137b61ad', id: this.errorId, class: "dda-error-message" }, this.error_message))));
45
+ return (h(Host, { key: 'b36592f3d8f701d0adf836057c3d3d2073ad64e6' }, h("div", { key: 'f5f37555cc31612fe697cfe4a26aacb273a76acb', class: inputClass }, this.label && h("label", { key: '54f1595fd236e6987e6b347dcecff8c95562e4e7', htmlFor: id, class: "dda-input-label" }, this.label), h("input", { key: '36a393c6dba904336066803822a3efcf0e02ffae', "aria-label": this.aria_label, id: id, name: this.input_name, type: this.type, autocomplete: this.autocomplete, placeholder: this.placeholder, value: this.value, onInput: (event) => this.handleInput(event), class: "dda-input-field dda-input-text", "aria-describedby": this.describedBy, "aria-invalid": this.error_message ? 'true' : undefined }), this.helper_text && h("span", { key: '9ddd9e935c97814b24d238f44f5d73fc232e5c5a', id: this.helperId, class: "dda-helper-text" }, this.helper_text), this.error_message && h("span", { key: '7c3f9642076e69314f2356fb9ad471f75b2b1f08', id: this.errorId, class: "dda-error-message" }, this.error_message))));
46
46
  }
47
47
  static get is() { return "dda-input"; }
48
48
  static get originalStyleUrls() {
@@ -33,9 +33,9 @@ export class DdaLinkButton {
33
33
  this.custom_class, // Include custom class
34
34
  this.component_mode,
35
35
  ].filter(Boolean).join(' ');
36
- return (h(Host, { key: '8dc6bd810c9049ea16753e583f3b2459d7be8dce' }, h("a", { key: '8f33348f1cb96c947671cd0041cdfae96f75ce8d',
36
+ return (h(Host, { key: 'e0f1c7a305ff72f3eadf337585da8021e18e4571' }, h("a", { key: 'f2e280df14c0114c54d6e744651bcdfee022b66d',
37
37
  // type={this.type}
38
- id: this.button_id, href: this.href, class: linkbuttonClass, "aria-label": this.aria_label }, this.start_icon && h("i", { key: '2f2a09f7aff30f48cc0e0bebbac6fb8747fec785', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, this.start_icon), h("slot", { key: '7c8c764e2df42a872f8bd5123a8882f6ab30309c' }), this.end_icon && h("i", { key: 'e4892d4cd4b763d4ab306bd60f24b2f25a43ec59', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, this.end_icon))));
38
+ id: this.button_id, href: this.href, class: linkbuttonClass, "aria-label": this.aria_label }, this.start_icon && h("i", { key: '190f9273d127bcf6a9b20882fda5a08d3c4c065b', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, this.start_icon), h("slot", { key: 'ec486bf4bd3b3aee2edf30df7f0677f76f090792' }), this.end_icon && h("i", { key: '0f295c677268f3751175800553566d39a2bc5e59', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, this.end_icon))));
39
39
  }
40
40
  static get is() { return "dda-link-button"; }
41
41
  static get originalStyleUrls() {
@@ -72,7 +72,7 @@ export class DdaNumberField {
72
72
  this.component_mode,
73
73
  ].filter(Boolean).join(' ');
74
74
  const id = this.inputId;
75
- return (h(Host, { key: 'e8e821361d846cd52c01047c1f0648e719e96249' }, h("div", { key: '4141b53316b4dbcd60faa46cf2d2b1c374cef309', class: containerClass }, this.label && h("label", { key: '20593074d31733885d83733dc63cd41376d572dc', htmlFor: id, class: "dda-input-label" }, this.label), h("div", { key: '443763cfb3a895c30815e339cd81d5e9b6de2c3e', class: "dda-input-field-group dda-number-field" }, h("input", { key: '57ed90d585e5a2d4e0c9f39bb1fdb6356d7b50f7', id: id, name: this.input_name, "aria-label": this.aria_label, type: "text", placeholder: this.placeholder, value: this.value, pattern: "[0-9]*", onInput: event => this.handleInput(event), onFocus: this.handleFocus.bind(this), onBlur: this.handleBlur.bind(this), class: "dda-field-group-input", "aria-describedby": this.describedBy, "aria-invalid": this.error_message ? 'true' : undefined }), h("div", { key: 'cd3c78d23ba19978c5b296731192f454db3e5906', class: "dda-input-dropdown-btn" }, h("button", { key: '74d7d3720fcb37122d60ce71155e234393824a26', name: this.toggle_button_name, type: "button", class: "dda-dropdown-select", "aria-label": this.toggle_button_label ? `${this.toggle_button_label}: ${this.selected_currency}` : undefined, "aria-expanded": this.isCurrencyDropdownOpen ? 'true' : 'false', onClick: () => this.toggleCurrencyDropdown() }, this.selected_currency, " ", h("i", { key: 'd2310ea5de9922de9dfab5bac39210921b1be971', class: `material-icons`, "aria-hidden": "true" }, this.isCurrencyDropdownOpen ? 'keyboard_arrow_up' : 'keyboard_arrow_down')), this.isCurrencyDropdownOpen && (h("div", { key: '77491f92b3c065987958c8a0aadead2c941b86be', class: "dda-input-dropdown-list" }, this.parsedCurrencies.length > 0 ? (this.parsedCurrencies.map(option => (h("button", { name: this.currency_button_name, type: "button", class: `dda-input-dropdown-item ${this.selected_currency === option ? 'selected' : ''}`, onClick: () => this.selectCurrency(option) }, option)))) : (h("div", { class: "dda-input-dropdown-item" }, "No options available")))))), this.helper_text && h("span", { key: 'a3e3d37303fac4919afce9a7c6a892de4e8d2771', id: this.helperId, class: "dda-helper-text" }, this.helper_text), this.error_message && h("span", { key: 'da1de1672834e28084e47eb3ae02b6d774b150de', id: this.errorId, class: "dda-error-message" }, this.error_message))));
75
+ return (h(Host, { key: 'f624d00bd4b5e0c29cdf713f837a83be852e8c30' }, h("div", { key: 'bdcbc45802ac76a5b59eecc57514ddfaa29235a7', class: containerClass }, this.label && h("label", { key: '02ef6553822c0a1b9fafc7ccff2038e200e00715', htmlFor: id, class: "dda-input-label" }, this.label), h("div", { key: 'f0c13e421c9de5d60b815efc709f5021ee9b2509', class: "dda-input-field-group dda-number-field" }, h("input", { key: '09a73be6481a4285520150c3f4541a43bc2db872', id: id, name: this.input_name, "aria-label": this.aria_label, type: "text", placeholder: this.placeholder, value: this.value, pattern: "[0-9]*", onInput: event => this.handleInput(event), onFocus: this.handleFocus.bind(this), onBlur: this.handleBlur.bind(this), class: "dda-field-group-input", "aria-describedby": this.describedBy, "aria-invalid": this.error_message ? 'true' : undefined }), h("div", { key: '26db621e11ca058e3758144a20508483dcf33394', class: "dda-input-dropdown-btn" }, h("button", { key: '9ec16119661ba40362ab85c65f2f108ea5dcafff', name: this.toggle_button_name, type: "button", class: "dda-dropdown-select", "aria-label": this.toggle_button_label ? `${this.toggle_button_label}: ${this.selected_currency}` : undefined, "aria-expanded": this.isCurrencyDropdownOpen ? 'true' : 'false', onClick: () => this.toggleCurrencyDropdown() }, this.selected_currency, " ", h("i", { key: '5ed1789d07a7e70bb8e903e2d9c4ee969ea19a75', class: `material-icons`, "aria-hidden": "true" }, this.isCurrencyDropdownOpen ? 'keyboard_arrow_up' : 'keyboard_arrow_down')), this.isCurrencyDropdownOpen && (h("div", { key: '1f212a2cc5a4d71e8d8c463fc10b1ea828b66630', class: "dda-input-dropdown-list" }, this.parsedCurrencies.length > 0 ? (this.parsedCurrencies.map(option => (h("button", { name: this.currency_button_name, type: "button", class: `dda-input-dropdown-item ${this.selected_currency === option ? 'selected' : ''}`, onClick: () => this.selectCurrency(option) }, option)))) : (h("div", { class: "dda-input-dropdown-item" }, "No options available")))))), this.helper_text && h("span", { key: '038ad7c3098d0353d63a85e5fa224c084ec9989f', id: this.helperId, class: "dda-helper-text" }, this.helper_text), this.error_message && h("span", { key: '743f363599d29ff486146638e406053197328204', id: this.errorId, class: "dda-error-message" }, this.error_message))));
76
76
  }
77
77
  static get is() { return "dda-number-field"; }
78
78
  static get originalStyleUrls() {
@@ -63,7 +63,7 @@ export class DdaPagination {
63
63
  }
64
64
  }
65
65
  render() {
66
- return (h(Host, { key: '4de1572ef7acf0cd89b620183a723f8f9598fdf9' }, h("div", { key: '1aad2deab4985aaa29e0cf31790a0e7f3587c0d5', class: `dda-pagination-container` }, this.renderPagination())));
66
+ return (h(Host, { key: '3b11664484e9c91e045896687bce2b2f645c7947' }, h("div", { key: 'e9a932aaa1c53285520a54d2a66d115a86479817', class: `dda-pagination-container` }, this.renderPagination())));
67
67
  }
68
68
  static get is() { return "dda-pagination"; }
69
69
  static get originalStyleUrls() {