@dubai-design-system/components-js 5.1.1 → 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 (259) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/MIGRATION.md +196 -15
  3. package/dist/cjs/dda-accordion.cjs.entry.js +3 -3
  4. package/dist/cjs/dda-alert.cjs.entry.js +3 -3
  5. package/dist/cjs/dda-attach-file.cjs.entry.js +3 -3
  6. package/dist/cjs/dda-avatar.cjs.entry.js +7 -7
  7. package/dist/cjs/dda-banner-card.cjs.entry.js +26 -0
  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 +3 -3
  15. package/dist/cjs/dda-dropdown.cjs.entry.js +3 -3
  16. package/dist/cjs/dda-footer.cjs.entry.js +3 -3
  17. package/dist/cjs/dda-header.cjs.entry.js +201 -14
  18. package/dist/cjs/dda-home-banner.cjs.entry.js +5 -5
  19. package/dist/cjs/dda-home-carousel.cjs.entry.js +28 -0
  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 +3 -3
  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 +4 -4
  30. package/dist/cjs/dda-select.cjs.entry.js +3 -3
  31. package/dist/cjs/dda-sticky-footer.cjs.entry.js +52 -4
  32. package/dist/cjs/dda-tabs.cjs.entry.js +3 -3
  33. package/dist/cjs/dda-textarea.cjs.entry.js +4 -4
  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 +2 -2
  37. package/dist/cjs/dda-vertical-stepper.cjs.entry.js +2 -2
  38. package/dist/cjs/dda.cjs.js +2 -2
  39. package/dist/cjs/{index-Bgd2iAET.js → index-DD8fdSxb.js} +1 -1
  40. package/dist/cjs/loader.cjs.js +2 -2
  41. package/dist/cjs/parse-json-prop-B0KWD8qe.js +38 -0
  42. package/dist/collection/collection-manifest.json +5 -3
  43. package/dist/collection/components/dda-accordion/dda-accordion.js +1 -1
  44. package/dist/collection/components/dda-alert/dda-alert.js +1 -1
  45. package/dist/collection/components/dda-alert/dda-alert.stories.js +27 -20
  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 +853 -81
  58. package/dist/collection/components/dda-header/dda-header.stories.js +219 -33
  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-banner/home-banner.css +12 -2
  62. package/dist/collection/components/dda-home-carousel/dda-home-carousel.js +164 -0
  63. package/dist/collection/components/dda-home-carousel/dda-home-carousel.stories.js +24 -0
  64. package/dist/collection/components/dda-input/dda-input.js +1 -1
  65. package/dist/collection/components/dda-link-button/dda-link-button.js +2 -2
  66. package/dist/collection/components/dda-number-field/dda-number-field.js +1 -1
  67. package/dist/collection/components/dda-pagination/dda-pagination.js +1 -1
  68. package/dist/collection/components/dda-phonefield/dda-phonefield.js +1 -1
  69. package/dist/collection/components/dda-progressbar/dda-progressbar.js +1 -1
  70. package/dist/collection/components/dda-radiobutton/dda-radiobutton.css +355 -9
  71. package/dist/collection/components/dda-radiobutton/dda-radiobutton.js +1 -1
  72. package/dist/collection/components/dda-range-slider/dda-range-slider.js +2 -2
  73. package/dist/collection/components/dda-search-input/dda-search-input.js +1 -1
  74. package/dist/collection/components/dda-select/dda-select.js +1 -1
  75. package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.js +511 -9
  76. package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.stories.js +24 -2
  77. package/dist/collection/components/dda-tabs/dda-tabs.js +1 -1
  78. package/dist/collection/components/dda-textarea/dda-textarea.js +2 -2
  79. package/dist/collection/components/dda-toggle/dda-toggle.js +1 -1
  80. package/dist/collection/components/dda-tooltip/dda-tooltip.js +1 -1
  81. package/dist/collection/components/dda-ui-card/dda-ui-card.js +1 -1
  82. package/dist/collection/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.css +29 -9
  83. package/dist/collection/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.js +1 -1
  84. package/dist/collection/components/stepper/dda-horizontal-stepper/dda-horizontal-stepper.js +1 -1
  85. package/dist/collection/components/stepper/dda-vertical-stepper/dda-vertical-stepper.js +1 -1
  86. package/dist/collection/global/global.css +355 -9
  87. package/dist/collection/utils/parse-json-prop.js +34 -0
  88. package/dist/components/dda-accordion.js +1 -1
  89. package/dist/components/dda-alert.js +1 -1
  90. package/dist/components/dda-attach-file.js +1 -1
  91. package/dist/components/dda-avatar.js +1 -1
  92. package/dist/components/dda-banner-card.d.ts +11 -0
  93. package/dist/components/dda-banner-card.js +1 -0
  94. package/dist/components/dda-banner.js +1 -1
  95. package/dist/components/dda-breadcrumb.js +1 -1
  96. package/dist/components/dda-button.js +1 -1
  97. package/dist/components/dda-checkbox.js +1 -1
  98. package/dist/components/dda-chip.js +1 -1
  99. package/dist/components/dda-credit-card.js +1 -1
  100. package/dist/components/dda-creditcard-field.js +1 -1
  101. package/dist/components/dda-dropdown.js +1 -1
  102. package/dist/components/dda-footer.js +1 -1
  103. package/dist/components/dda-header.js +1 -1
  104. package/dist/components/dda-home-banner.js +1 -1
  105. package/dist/components/dda-home-carousel.d.ts +11 -0
  106. package/dist/components/dda-home-carousel.js +1 -0
  107. package/dist/components/dda-horizontal-stepper.js +1 -1
  108. package/dist/components/dda-input.js +1 -1
  109. package/dist/components/dda-link-button.js +1 -1
  110. package/dist/components/dda-number-field.js +1 -1
  111. package/dist/components/dda-pagination.js +1 -1
  112. package/dist/components/dda-phonefield.js +1 -1
  113. package/dist/components/dda-progressbar.js +1 -1
  114. package/dist/components/dda-radiobutton.js +1 -1
  115. package/dist/components/dda-range-slider.js +1 -1
  116. package/dist/components/dda-search-input.js +1 -1
  117. package/dist/components/dda-segmented-tabs.js +1 -1
  118. package/dist/components/dda-select.js +1 -1
  119. package/dist/components/dda-sticky-footer.js +1 -1
  120. package/dist/components/dda-tabs.js +1 -1
  121. package/dist/components/dda-textarea.js +1 -1
  122. package/dist/components/dda-toggle.js +1 -1
  123. package/dist/components/dda-tooltip.js +1 -1
  124. package/dist/components/dda-ui-card.js +1 -1
  125. package/dist/components/dda-vertical-stepper.js +1 -1
  126. package/dist/components/index.js +1 -1
  127. package/dist/components/p-BCtBptNq.js +1 -0
  128. package/dist/components/p-BP6BxgDV.js +1 -0
  129. package/dist/components/p-BZzFtOHg.js +1 -0
  130. package/dist/components/p-CvcFE821.js +1 -0
  131. package/dist/components/p-D3e_hki9.js +1 -0
  132. package/dist/components/p-DCwxgkNU.js +1 -0
  133. package/dist/components/p-R9p4F9Pi.js +1 -0
  134. package/dist/dda/dda.css +1 -53
  135. package/dist/dda/dda.esm.js +1 -1
  136. package/dist/dda/p-0480f0a9.entry.js +1 -0
  137. package/dist/dda/p-06188c4c.entry.js +1 -0
  138. package/dist/dda/p-08e1892a.entry.js +1 -0
  139. package/dist/dda/p-10c5a752.entry.js +1 -0
  140. package/dist/dda/p-169ba650.entry.js +1 -0
  141. package/dist/dda/p-25058697.entry.js +1 -0
  142. package/dist/dda/p-32a7c588.entry.js +1 -0
  143. package/dist/dda/{p-fb4db977.entry.js → p-333205aa.entry.js} +1 -1
  144. package/dist/dda/p-46df4933.entry.js +1 -0
  145. package/dist/dda/p-47322b02.entry.js +1 -0
  146. package/dist/dda/{p-04bcda8a.entry.js → p-4e717a2e.entry.js} +1 -1
  147. package/dist/dda/p-5840fad9.entry.js +1 -0
  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-6430c363.entry.js +1 -0
  151. package/dist/dda/p-6d4f5672.entry.js +1 -0
  152. package/dist/dda/p-6db5588a.entry.js +1 -0
  153. package/dist/dda/p-76859bf8.entry.js +1 -0
  154. package/dist/dda/p-7c1abbd2.entry.js +1 -0
  155. package/dist/dda/p-7ffce954.entry.js +1 -0
  156. package/dist/dda/p-8108c4ed.entry.js +1 -0
  157. package/dist/dda/p-8852dafb.entry.js +1 -0
  158. package/dist/dda/p-8dbbc0ca.entry.js +1 -0
  159. package/dist/dda/p-95100f73.entry.js +1 -0
  160. package/dist/dda/p-9a4e34d1.entry.js +1 -0
  161. package/dist/dda/p-9b234635.entry.js +1 -0
  162. package/dist/dda/p-9d9834ff.entry.js +1 -0
  163. package/dist/dda/p-9f01cb56.entry.js +1 -0
  164. package/dist/dda/p-9ff8dc84.entry.js +1 -0
  165. package/dist/dda/p-BnrqwGTj.js +2 -0
  166. package/dist/dda/p-CvcFE821.js +1 -0
  167. package/dist/dda/p-a8a1ee5d.entry.js +1 -0
  168. package/dist/dda/p-b37f40a9.entry.js +1 -0
  169. package/dist/dda/{p-c77282be.entry.js → p-eaffd32d.entry.js} +1 -1
  170. package/dist/dda/p-f2efc121.entry.js +1 -0
  171. package/dist/dda/p-faed59dd.entry.js +1 -0
  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 +3 -3
  175. package/dist/esm/dda-attach-file.entry.js +3 -3
  176. package/dist/esm/dda-avatar.entry.js +7 -7
  177. package/dist/esm/dda-banner-card.entry.js +24 -0
  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 +3 -3
  185. package/dist/esm/dda-dropdown.entry.js +3 -3
  186. package/dist/esm/dda-footer.entry.js +3 -3
  187. package/dist/esm/dda-header.entry.js +201 -14
  188. package/dist/esm/dda-home-banner.entry.js +5 -5
  189. package/dist/esm/dda-home-carousel.entry.js +26 -0
  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 +3 -3
  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 +4 -4
  200. package/dist/esm/dda-select.entry.js +3 -3
  201. package/dist/esm/dda-sticky-footer.entry.js +52 -4
  202. package/dist/esm/dda-tabs.entry.js +3 -3
  203. package/dist/esm/dda-textarea.entry.js +4 -4
  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 +2 -2
  207. package/dist/esm/dda-vertical-stepper.entry.js +2 -2
  208. package/dist/esm/dda.js +3 -3
  209. package/dist/esm/{index-D6L6zgH9.js → index-BnrqwGTj.js} +1 -1
  210. package/dist/esm/loader.js +3 -3
  211. package/dist/esm/parse-json-prop-CvcFE821.js +36 -0
  212. package/dist/types/components/dda-alert/dda-alert.stories.d.ts +5 -1
  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 +117 -5
  215. package/dist/types/components/dda-header/dda-header.stories.d.ts +206 -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 +75 -5
  220. package/dist/types/components/dda-sticky-footer/dda-sticky-footer.stories.d.ts +17 -0
  221. package/dist/types/components.d.ts +747 -21
  222. package/dist/types/utils/parse-json-prop.d.ts +1 -0
  223. package/package.json +3 -1
  224. package/dist/components/p-Bc2V1U4_.js +0 -1
  225. package/dist/components/p-Bzqf-PpF.js +0 -1
  226. package/dist/components/p-D-CHT-as.js +0 -1
  227. package/dist/components/p-DJw8qV7U.js +0 -1
  228. package/dist/components/p-DpwQ9sGp.js +0 -1
  229. package/dist/dda/p-03400387.entry.js +0 -1
  230. package/dist/dda/p-18a3d7b1.entry.js +0 -1
  231. package/dist/dda/p-1f7b8486.entry.js +0 -1
  232. package/dist/dda/p-3024288f.entry.js +0 -1
  233. package/dist/dda/p-41b8ed7d.entry.js +0 -1
  234. package/dist/dda/p-56f60336.entry.js +0 -1
  235. package/dist/dda/p-65776d80.entry.js +0 -1
  236. package/dist/dda/p-73611084.entry.js +0 -1
  237. package/dist/dda/p-7ad8cde9.entry.js +0 -1
  238. package/dist/dda/p-8134e59d.entry.js +0 -1
  239. package/dist/dda/p-8494fd9e.entry.js +0 -1
  240. package/dist/dda/p-876d55b2.entry.js +0 -1
  241. package/dist/dda/p-88d884a8.entry.js +0 -1
  242. package/dist/dda/p-8b25ae94.entry.js +0 -1
  243. package/dist/dda/p-8f376986.entry.js +0 -1
  244. package/dist/dda/p-90019b80.entry.js +0 -1
  245. package/dist/dda/p-92fa4777.entry.js +0 -1
  246. package/dist/dda/p-97431faf.entry.js +0 -1
  247. package/dist/dda/p-D6L6zgH9.js +0 -2
  248. package/dist/dda/p-a5456de2.entry.js +0 -1
  249. package/dist/dda/p-aa7b4c13.entry.js +0 -1
  250. package/dist/dda/p-ad40eb27.entry.js +0 -1
  251. package/dist/dda/p-c055f0d2.entry.js +0 -1
  252. package/dist/dda/p-c42c8733.entry.js +0 -1
  253. package/dist/dda/p-ca64abe6.entry.js +0 -1
  254. package/dist/dda/p-ceca8088.entry.js +0 -1
  255. package/dist/dda/p-d6786b43.entry.js +0 -1
  256. package/dist/dda/p-e2113e42.entry.js +0 -1
  257. package/dist/dda/p-ee862207.entry.js +0 -1
  258. package/dist/dda/p-ef38e28b.entry.js +0 -1
  259. package/dist/dda/p-f43fb910.entry.js +0 -1
@@ -3,6 +3,18 @@ export default {
3
3
  tags: ['autodocs'],
4
4
  component: 'dda-header',
5
5
  argTypes: {
6
+ loginText: {
7
+ control: { type: 'text' },
8
+ description: 'Label of the Login link in the desktop toolbar and the side menu (default Login)',
9
+ },
10
+ loginIcon: {
11
+ control: { type: 'text' },
12
+ description: 'Material Symbols icon name of the Login link (default sentiment_satisfied)',
13
+ },
14
+ hide_login: {
15
+ control: { type: 'boolean' },
16
+ description: 'Removes the Login link from the desktop toolbar and the side menu',
17
+ },
6
18
  hamburger_menu_button_name: {
7
19
  control: { type: 'text' },
8
20
  description: 'Name for the hamburger menu button',
@@ -47,6 +59,132 @@ export default {
47
59
  control: { type: 'text' },
48
60
  description: 'Name for the toggle accessibility button',
49
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
+ },
50
188
  },
51
189
  parameters: {
52
190
  docs: {
@@ -90,6 +228,9 @@ const Template = args => `
90
228
  second-logo-white-src="${args.secondLogoWhiteSrc}"
91
229
  second-logo-alt="${args.secondLogoAlt}"
92
230
  login-link="${args.loginLink}"
231
+ login-text="${args.loginText}"
232
+ login-icon="${args.loginIcon}"
233
+ ${args.hide_login ? 'hide_login' : ''}
93
234
  language_text="${args.language_text}"
94
235
  hamburger_menu_button_name="${args.hamburger_menu_button_name}"
95
236
  accessibility_button_name="${args.accessibility_button_name}"
@@ -120,24 +261,27 @@ const Template = args => `
120
261
  `;
121
262
  export const Default = Template.bind({});
122
263
  Default.args = {
123
- firstlogoSrc: "https://www.dof.gov.ae/Style Library/img/gov-logo.svg",
124
- firstLogoWhiteSrc: "https://www.dof.gov.ae/Style Library/img/gov-logo-white.svg",
125
- firstLogoAlt: "Dubai-Digital-Authority",
126
- secondLogoSrc: "https://www.digitaldubai.ae/ResourcePackages/Theme/assets/dist/images/logo.svg",
127
- secondLogoWhiteSrc: "https://www.digitaldubai.ae/ResourcePackages/Theme/assets/dist/images/logo.svg",
128
- secondLogoAlt: "Dubai-Digital-Authority",
129
- loginLink: "/login",
130
- language_text: "العربية",
131
- hamburger_menu_button_name: "hamburger_menu_button_name",
132
- accessibility_button_name: "accessibility_button_name",
133
- search_button_name: "search_button_name",
134
- search_input_name: "q",
135
- search_action: "",
136
- language_button_name: "language_button_name",
137
- close_menu_button_name: "close_menu_button_name",
138
- close_accessibility_button_name: "close_accessibility_button_name",
139
- close_sidebar_button_name: "close_sidebar_button_name",
140
- toggle_accessibility_button_name: "toggle_accessibility_button_name",
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',
273
+ hide_login: false,
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',
141
285
  languageSwitch: "() => console.log('Language Switcher')",
142
286
  smTextSize: "() => console.log('Small Text')",
143
287
  baseTextSize: "() => console.log('Base Text')",
@@ -146,7 +290,7 @@ Default.args = {
146
290
  blindContrast: "() => console.log('Blind Contrast')",
147
291
  redContrast: "() => console.log('Red Contrast')",
148
292
  greenContrast: "() => console.log('Green Contrast')",
149
- readSpeakerLink: "app-eu.readspeaker.com",
293
+ readSpeakerLink: 'app-eu.readspeaker.com',
150
294
  quickLinks: [
151
295
  { label: 'Home', href: '#', subMenu: [] },
152
296
  {
@@ -167,24 +311,34 @@ Default.args = {
167
311
  label: 'Initiatives',
168
312
  href: '#',
169
313
  subMenu: [
170
- { headerLabel: 'Initiatives', label: 'Submenu-1', href: '#', subMenu: [
171
- { headerLabel: 'Initiatives', label: 'Submenu-2', href: '#', subMenu: [
172
- { headerLabel: 'Initiatives', label: 'Submenu-4', href: '#' }
173
- ] },
174
- { headerLabel: 'Initiatives', label: 'Submenu-3', href: '#' }
175
- ] },
176
- { headerLabel: 'Initiatives', label: 'Submenu-1', href: '#', subMenu: [
177
- { headerLabel: 'Initiatives', label: 'Submenu-2', href: '#', subMenu: [
178
- { headerLabel: 'Initiatives', label: 'Submenu-4', href: '#' }
179
- ] },
180
- { headerLabel: 'Initiatives', label: 'Submenu-3', href: '#' }
181
- ] },
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
+ },
182
332
  ],
183
333
  },
184
- { label: 'Services', href: '#', subMenu: [
334
+ {
335
+ label: 'Services',
336
+ href: '#',
337
+ subMenu: [
185
338
  { headerLabel: 'Service', label: 'Service-1', href: '#' },
186
339
  { headerLabel: 'Service', label: 'Service-2', href: '#' },
187
- ] },
340
+ ],
341
+ },
188
342
  { label: 'Data', href: '#', subMenu: [] },
189
343
  { label: 'Government Services', href: '#', subMenu: [] },
190
344
  { label: 'Investor Relations', href: '#', subMenu: [] },
@@ -193,3 +347,35 @@ Default.args = {
193
347
  { label: 'Contact Us', href: '#', subMenu: [] },
194
348
  ],
195
349
  };
350
+ // A site without sign-in: hide_login removes the Login link from the toolbar and the side menu.
351
+ export const WithoutLogin = Template.bind({});
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() {
@@ -106,8 +106,9 @@
106
106
  width: 100%;
107
107
  text-align: center;
108
108
  position: absolute;
109
- /* The quick-link cards over the banner rise by the sticky footer height, so the controls do too. */
110
- bottom: calc(250px + var(--dda-sticky-footer-height, 0px));
109
+ /* The quick-link cards over the banner rise by the sticky footer height, so the controls do too.
110
+ 274px keeps the controls above the cards, which sit at 69px (.quick-links-wrap in dda.css). */
111
+ bottom: calc(274px + var(--dda-sticky-footer-height, 0px));
111
112
  left: 0;
112
113
  display: flex;
113
114
  justify-content: center;
@@ -207,6 +208,15 @@
207
208
  .slider-nav {
208
209
  bottom: 100px;
209
210
  }
211
+ }
212
+ /* On taller small screens the quick-link cards sit on the banner (dda.css), so the controls sit
213
+ 16px above them. The two custom properties are the cards' gap above the bar and their height. */
214
+ @media screen and (max-width:992px) and (min-height:601px) {
215
+ .slider-nav {
216
+ bottom: calc(var(--dda-sticky-footer-height, 0px) + var(--dda-quick-links-gap-sm, 12px) + var(--dda-quick-links-card-height-sm, 112px) + 16px);
217
+ }
218
+ }
219
+ @media screen and (max-width:992px) {
210
220
  /* Below 992px the text runs the full width, so the scrim must too. */
211
221
  .home-slider .slide-wrap,
212
222
  [dir='rtl'] .home-slider .slide-wrap,
@@ -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() {