@govtechsg/sgds-web-component 3.0.0-rc.1 → 3.0.0-rc.2

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 (478) hide show
  1. package/README.md +5 -5
  2. package/base/button.js +1 -1
  3. package/base/form-control-element.d.ts +4 -11
  4. package/base/form-control-element.js +13 -23
  5. package/base/form-control-element.js.map +1 -1
  6. package/components/Accordion/accordion-item.js +1 -1
  7. package/components/Accordion/index.umd.js +7 -19
  8. package/components/Accordion/index.umd.js.map +1 -1
  9. package/components/Accordion/sgds-accordion-item.d.ts +3 -7
  10. package/components/Accordion/sgds-accordion-item.js +6 -18
  11. package/components/Accordion/sgds-accordion-item.js.map +1 -1
  12. package/components/ActionCard/index.umd.js +407 -329
  13. package/components/ActionCard/index.umd.js.map +1 -1
  14. package/components/Alert/alert.js +1 -1
  15. package/components/Alert/index.umd.js +553 -485
  16. package/components/Alert/index.umd.js.map +1 -1
  17. package/components/Alert/sgds-alert.d.ts +2 -2
  18. package/components/Alert/sgds-alert.js +6 -13
  19. package/components/Alert/sgds-alert.js.map +1 -1
  20. package/components/Badge/badge.js +1 -1
  21. package/components/Badge/index.umd.js +8 -9
  22. package/components/Badge/index.umd.js.map +1 -1
  23. package/components/Badge/sgds-badge.d.ts +4 -5
  24. package/components/Badge/sgds-badge.js +5 -6
  25. package/components/Badge/sgds-badge.js.map +1 -1
  26. package/components/Button/index.umd.js +8 -81
  27. package/components/Button/index.umd.js.map +1 -1
  28. package/components/Button/sgds-button.js +1 -1
  29. package/components/Button/sgds-button.js.map +1 -1
  30. package/components/Checkbox/checkbox.js +1 -1
  31. package/components/Checkbox/index.umd.js +541 -475
  32. package/components/Checkbox/index.umd.js.map +1 -1
  33. package/components/Checkbox/sgds-checkbox-group.d.ts +7 -1
  34. package/components/Checkbox/sgds-checkbox-group.js +15 -4
  35. package/components/Checkbox/sgds-checkbox-group.js.map +1 -1
  36. package/components/Checkbox/sgds-checkbox.d.ts +30 -21
  37. package/components/Checkbox/sgds-checkbox.js +77 -60
  38. package/components/Checkbox/sgds-checkbox.js.map +1 -1
  39. package/components/ComboBox/index.umd.js +385 -216
  40. package/components/ComboBox/index.umd.js.map +1 -1
  41. package/components/Datepicker/datepicker-input.d.ts +4 -2
  42. package/components/Datepicker/datepicker-input.js +24 -7
  43. package/components/Datepicker/datepicker-input.js.map +1 -1
  44. package/components/Datepicker/index.umd.js +433 -244
  45. package/components/Datepicker/index.umd.js.map +1 -1
  46. package/components/Datepicker/sgds-datepicker.d.ts +1 -1
  47. package/components/Datepicker/sgds-datepicker.js.map +1 -1
  48. package/components/Drawer/index.umd.js +2 -2
  49. package/components/Drawer/index.umd.js.map +1 -1
  50. package/components/Dropdown/index.umd.js +8 -81
  51. package/components/Dropdown/index.umd.js.map +1 -1
  52. package/components/FileUpload/file-upload.js +1 -1
  53. package/components/FileUpload/index.umd.js +579 -272
  54. package/components/FileUpload/index.umd.js.map +1 -1
  55. package/components/FileUpload/sgds-file-upload.d.ts +42 -30
  56. package/components/FileUpload/sgds-file-upload.js +147 -103
  57. package/components/FileUpload/sgds-file-upload.js.map +1 -1
  58. package/components/Footer/footer-item.js +6 -0
  59. package/components/Footer/footer-item.js.map +1 -0
  60. package/components/Footer/footer.js +1 -1
  61. package/components/Footer/index.d.ts +2 -0
  62. package/components/Footer/index.js +2 -0
  63. package/components/Footer/index.js.map +1 -1
  64. package/components/Footer/index.umd.js +93 -94
  65. package/components/Footer/index.umd.js.map +1 -1
  66. package/components/Footer/sgds-footer-item.d.ts +13 -0
  67. package/components/Footer/sgds-footer-item.js +27 -0
  68. package/components/Footer/sgds-footer-item.js.map +1 -0
  69. package/components/Footer/sgds-footer.d.ts +9 -30
  70. package/components/Footer/sgds-footer.js +65 -90
  71. package/components/Footer/sgds-footer.js.map +1 -1
  72. package/components/Icon/icon.js +6 -0
  73. package/components/Icon/icon.js.map +1 -0
  74. package/components/Icon/index.d.ts +6 -0
  75. package/components/Icon/index.js +4 -0
  76. package/components/Icon/index.js.map +1 -0
  77. package/components/Icon/index.umd.js +4389 -0
  78. package/components/Icon/index.umd.js.map +1 -0
  79. package/components/Icon/sgds-icon.d.ts +21 -0
  80. package/components/Icon/sgds-icon.js +64 -0
  81. package/components/Icon/sgds-icon.js.map +1 -0
  82. package/components/IconButton/icon-button.js +1 -1
  83. package/components/IconButton/index.umd.js +6 -9
  84. package/components/IconButton/index.umd.js.map +1 -1
  85. package/components/IconButton/sgds-icon-button.d.ts +2 -2
  86. package/components/IconButton/sgds-icon-button.js +4 -9
  87. package/components/IconButton/sgds-icon-button.js.map +1 -1
  88. package/components/Input/index.umd.js +1734 -1376
  89. package/components/Input/index.umd.js.map +1 -1
  90. package/components/Input/sgds-input.d.ts +41 -21
  91. package/components/Input/sgds-input.js +103 -66
  92. package/components/Input/sgds-input.js.map +1 -1
  93. package/components/Modal/index.umd.js +2 -2
  94. package/components/Modal/index.umd.js.map +1 -1
  95. package/components/QuantityToggle/index.umd.js +894 -316
  96. package/components/QuantityToggle/index.umd.js.map +1 -1
  97. package/components/QuantityToggle/sgds-quantity-toggle.d.ts +42 -15
  98. package/components/QuantityToggle/sgds-quantity-toggle.js +129 -62
  99. package/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
  100. package/components/Radio/index.umd.js +516 -203
  101. package/components/Radio/index.umd.js.map +1 -1
  102. package/components/Radio/sgds-radio-group.d.ts +38 -27
  103. package/components/Radio/sgds-radio-group.js +100 -84
  104. package/components/Radio/sgds-radio-group.js.map +1 -1
  105. package/components/Radio/sgds-radio.js +1 -1
  106. package/components/Radio/sgds-radio.js.map +1 -1
  107. package/components/Stepper/index.umd.js +1 -0
  108. package/components/Stepper/index.umd.js.map +1 -1
  109. package/components/Stepper/sgds-stepper.d.ts +1 -0
  110. package/components/Stepper/sgds-stepper.js +1 -0
  111. package/components/Stepper/sgds-stepper.js.map +1 -1
  112. package/components/Switch/index.umd.js +21 -321
  113. package/components/Switch/index.umd.js.map +1 -1
  114. package/components/Switch/sgds-switch.js +1 -2
  115. package/components/Switch/sgds-switch.js.map +1 -1
  116. package/components/Textarea/index.umd.js +1554 -1336
  117. package/components/Textarea/index.umd.js.map +1 -1
  118. package/components/Textarea/sgds-textarea.d.ts +33 -22
  119. package/components/Textarea/sgds-textarea.js +78 -75
  120. package/components/Textarea/sgds-textarea.js.map +1 -1
  121. package/components/Textarea/textarea.js +1 -1
  122. package/components/Toast/index.umd.js +9 -21
  123. package/components/Toast/index.umd.js.map +1 -1
  124. package/components/Toast/sgds-toast.d.ts +2 -1
  125. package/components/Toast/sgds-toast.js +6 -18
  126. package/components/Toast/sgds-toast.js.map +1 -1
  127. package/components/Toast/toast.js +1 -1
  128. package/components/Tooltip/index.umd.js +14 -14
  129. package/components/Tooltip/index.umd.js.map +1 -1
  130. package/components/Tooltip/sgds-tooltip.d.ts +4 -7
  131. package/components/Tooltip/sgds-tooltip.js +14 -14
  132. package/components/Tooltip/sgds-tooltip.js.map +1 -1
  133. package/components/index.d.ts +1 -0
  134. package/components/index.js +1 -0
  135. package/components/index.js.map +1 -1
  136. package/components/index.umd.js +1318 -1124
  137. package/components/index.umd.js.map +1 -1
  138. package/icons/arrow-bar-down.svg +3 -0
  139. package/icons/arrow-bar-left.svg +3 -0
  140. package/icons/arrow-bar-right.svg +3 -0
  141. package/icons/arrow-bar-up.svg +3 -0
  142. package/icons/arrow-clockwise.svg +3 -0
  143. package/icons/arrow-down.svg +3 -0
  144. package/icons/arrow-left.svg +3 -0
  145. package/icons/arrow-repeat.svg +3 -0
  146. package/icons/arrow-right.svg +3 -0
  147. package/icons/arrow-up.svg +3 -0
  148. package/icons/bank-fill.svg +3 -0
  149. package/icons/bell-slash.svg +3 -0
  150. package/icons/bell.svg +3 -0
  151. package/icons/bi-funnel.svg +3 -0
  152. package/icons/bookmark-fill.svg +3 -0
  153. package/icons/bookmark.svg +3 -0
  154. package/icons/box-arrow-up-right.svg +3 -0
  155. package/icons/box-seam.svg +3 -0
  156. package/icons/building.svg +3 -0
  157. package/icons/calculator.svg +3 -0
  158. package/icons/calendar-check.svg +4 -0
  159. package/icons/calendar-x.svg +4 -0
  160. package/icons/calendar.svg +3 -0
  161. package/icons/camera.svg +3 -0
  162. package/icons/chat-left-text.svg +3 -0
  163. package/icons/check-circle-fill.svg +3 -0
  164. package/icons/check-circle.svg +3 -0
  165. package/icons/check.svg +3 -0
  166. package/icons/chevron-down.svg +3 -0
  167. package/icons/chevron-left.svg +3 -0
  168. package/icons/chevron-right.svg +3 -0
  169. package/icons/chevron-up .svg +3 -0
  170. package/icons/clock.svg +4 -0
  171. package/icons/cloud-check.svg +4 -0
  172. package/icons/cloud-download.svg +3 -0
  173. package/icons/cloud-upload.svg +3 -0
  174. package/icons/cloud.svg +3 -0
  175. package/icons/compass.svg +4 -0
  176. package/icons/cross.svg +3 -0
  177. package/icons/cursor-fill.svg +3 -0
  178. package/icons/cursor.svg +3 -0
  179. package/icons/dash-circle.svg +3 -0
  180. package/icons/dash-square.svg +3 -0
  181. package/icons/dash.svg +3 -0
  182. package/icons/download.svg +3 -0
  183. package/icons/exclamation-circle-fill.svg +3 -0
  184. package/icons/exclamation-circle.svg +4 -0
  185. package/icons/exclamation-triangle-fill.svg +3 -0
  186. package/icons/exclamation-triangle.svg +4 -0
  187. package/icons/exclamation.svg +4 -0
  188. package/icons/eye-fill.svg +3 -0
  189. package/icons/eye-slash-fill.svg +4 -0
  190. package/icons/eye-slash.svg +3 -0
  191. package/icons/eye.svg +3 -0
  192. package/icons/facebook.svg +3 -0
  193. package/icons/file-earmark-text.svg +3 -0
  194. package/icons/file-pdf.svg +4 -0
  195. package/icons/file-plus.svg +4 -0
  196. package/icons/file-text.svg +3 -0
  197. package/icons/file.svg +3 -0
  198. package/icons/files.svg +4 -0
  199. package/icons/folder-check.svg +4 -0
  200. package/icons/folder-minus.svg +4 -0
  201. package/icons/folder-plus.svg +4 -0
  202. package/icons/folder.svg +3 -0
  203. package/icons/gear.svg +3 -0
  204. package/icons/geo-alt.svg +4 -0
  205. package/icons/geo-fill.svg +4 -0
  206. package/icons/geo.svg +4 -0
  207. package/icons/google.svg +3 -0
  208. package/icons/grid-fill.svg +3 -0
  209. package/icons/hand-thumbs-down.svg +3 -0
  210. package/icons/hand-thumbs-up.svg +3 -0
  211. package/icons/hdd.svg +3 -0
  212. package/icons/house-door.svg +3 -0
  213. package/icons/house.svg +3 -0
  214. package/icons/image.svg +3 -0
  215. package/icons/inbox.svg +3 -0
  216. package/icons/info-circle-fill.svg +3 -0
  217. package/icons/info-circle.svg +4 -0
  218. package/icons/instagram.svg +3 -0
  219. package/icons/layers.svg +3 -0
  220. package/icons/layout-text-window-reverse.svg +3 -0
  221. package/icons/layout-text-window.svg +3 -0
  222. package/icons/layout.svg +3 -0
  223. package/icons/link.svg +3 -0
  224. package/icons/linkedin.svg +3 -0
  225. package/icons/list.svg +3 -0
  226. package/icons/lock-fill.svg +3 -0
  227. package/icons/lock.svg +3 -0
  228. package/icons/mail.svg +3 -0
  229. package/icons/map.svg +3 -0
  230. package/icons/paperclip.svg +3 -0
  231. package/icons/pencil.svg +3 -0
  232. package/icons/pending-circle.svg +3 -0
  233. package/icons/person-dash.svg +3 -0
  234. package/icons/person-plus.svg +3 -0
  235. package/icons/person-x.svg +3 -0
  236. package/icons/person.svg +3 -0
  237. package/icons/pin-map-fill.svg +3 -0
  238. package/icons/pin.svg +3 -0
  239. package/icons/placeholder.svg +3 -0
  240. package/icons/plus-circle.svg +3 -0
  241. package/icons/plus-square.svg +3 -0
  242. package/icons/plus.svg +3 -0
  243. package/icons/printer.svg +3 -0
  244. package/icons/question-circle.svg +4 -0
  245. package/icons/save.svg +3 -0
  246. package/icons/search.svg +3 -0
  247. package/icons/share.svg +3 -0
  248. package/icons/slash-circle.svg +3 -0
  249. package/icons/sliders.svg +3 -0
  250. package/icons/speedometer.svg +3 -0
  251. package/icons/star-fill.svg +3 -0
  252. package/icons/star.svg +3 -0
  253. package/icons/stoplights.svg +4 -0
  254. package/icons/telephone.svg +3 -0
  255. package/icons/three-dots-vertical.svg +3 -0
  256. package/icons/three-dots.svg +3 -0
  257. package/icons/toggle-off.svg +3 -0
  258. package/icons/toggle-on.svg +3 -0
  259. package/icons/trash.svg +3 -0
  260. package/icons/twitter-x.svg +3 -0
  261. package/icons/unlock.svg +3 -0
  262. package/icons/upload.svg +3 -0
  263. package/icons/window-dash.svg +4 -0
  264. package/icons/window-desktop.svg +4 -0
  265. package/icons/window-dock.svg +4 -0
  266. package/icons/window-fullscreen.svg +3 -0
  267. package/icons/window-plus.svg +4 -0
  268. package/icons/window-sidebar.svg +3 -0
  269. package/icons/window-split.svg +3 -0
  270. package/icons/window-stack.svg +3 -0
  271. package/icons/window-x.svg +4 -0
  272. package/icons/window.svg +3 -0
  273. package/icons/x-circle-fill.svg +3 -0
  274. package/icons/x-circle.svg +3 -0
  275. package/icons/youtube.svg +3 -0
  276. package/icons/zoom-in.svg +3 -0
  277. package/icons/zoom-out.svg +3 -0
  278. package/index.d.ts +1 -0
  279. package/index.js +1 -0
  280. package/index.js.map +1 -1
  281. package/index.umd.js +1338 -1119
  282. package/index.umd.js.map +1 -1
  283. package/internals/CloseButton/close-button.js +1 -1
  284. package/internals/CloseButton/sgds-close-button.js +1 -1
  285. package/internals/CloseButton/sgds-close-button.js.map +1 -1
  286. package/package.json +1 -1
  287. package/react/base/button.cjs.js +1 -1
  288. package/react/base/button.js +1 -1
  289. package/react/base/form-control-element.cjs.js +13 -23
  290. package/react/base/form-control-element.cjs.js.map +1 -1
  291. package/react/base/form-control-element.js +13 -23
  292. package/react/base/form-control-element.js.map +1 -1
  293. package/react/checkbox/index.cjs.js +2 -0
  294. package/react/checkbox/index.cjs.js.map +1 -1
  295. package/react/checkbox/index.d.ts +2 -0
  296. package/react/checkbox/index.js +2 -0
  297. package/react/checkbox/index.js.map +1 -1
  298. package/react/components/Accordion/accordion-item.cjs.js +1 -1
  299. package/react/components/Accordion/accordion-item.js +1 -1
  300. package/react/components/Accordion/sgds-accordion-item.cjs.js +6 -18
  301. package/react/components/Accordion/sgds-accordion-item.cjs.js.map +1 -1
  302. package/react/components/Accordion/sgds-accordion-item.js +6 -18
  303. package/react/components/Accordion/sgds-accordion-item.js.map +1 -1
  304. package/react/components/Alert/alert.cjs.js +1 -1
  305. package/react/components/Alert/alert.js +1 -1
  306. package/react/components/Alert/sgds-alert.cjs.js +5 -12
  307. package/react/components/Alert/sgds-alert.cjs.js.map +1 -1
  308. package/react/components/Alert/sgds-alert.js +6 -13
  309. package/react/components/Alert/sgds-alert.js.map +1 -1
  310. package/react/components/Badge/badge.cjs.js +1 -1
  311. package/react/components/Badge/badge.js +1 -1
  312. package/react/components/Badge/sgds-badge.cjs.js +5 -6
  313. package/react/components/Badge/sgds-badge.cjs.js.map +1 -1
  314. package/react/components/Badge/sgds-badge.js +5 -6
  315. package/react/components/Badge/sgds-badge.js.map +1 -1
  316. package/react/components/Button/sgds-button.cjs.js +2 -2
  317. package/react/components/Button/sgds-button.cjs.js.map +1 -1
  318. package/react/components/Button/sgds-button.js +1 -1
  319. package/react/components/Button/sgds-button.js.map +1 -1
  320. package/react/components/Checkbox/checkbox.cjs.js +1 -1
  321. package/react/components/Checkbox/checkbox.js +1 -1
  322. package/react/components/Checkbox/sgds-checkbox-group.cjs.js +15 -4
  323. package/react/components/Checkbox/sgds-checkbox-group.cjs.js.map +1 -1
  324. package/react/components/Checkbox/sgds-checkbox-group.js +15 -4
  325. package/react/components/Checkbox/sgds-checkbox-group.js.map +1 -1
  326. package/react/components/Checkbox/sgds-checkbox.cjs.js +77 -60
  327. package/react/components/Checkbox/sgds-checkbox.cjs.js.map +1 -1
  328. package/react/components/Checkbox/sgds-checkbox.js +77 -60
  329. package/react/components/Checkbox/sgds-checkbox.js.map +1 -1
  330. package/react/components/Datepicker/datepicker-input.cjs.js +24 -7
  331. package/react/components/Datepicker/datepicker-input.cjs.js.map +1 -1
  332. package/react/components/Datepicker/datepicker-input.js +24 -7
  333. package/react/components/Datepicker/datepicker-input.js.map +1 -1
  334. package/react/components/Datepicker/sgds-datepicker.cjs.js.map +1 -1
  335. package/react/components/Datepicker/sgds-datepicker.js.map +1 -1
  336. package/react/components/FileUpload/file-upload.cjs.js +1 -1
  337. package/react/components/FileUpload/file-upload.js +1 -1
  338. package/react/components/FileUpload/sgds-file-upload.cjs.js +145 -101
  339. package/react/components/FileUpload/sgds-file-upload.cjs.js.map +1 -1
  340. package/react/components/FileUpload/sgds-file-upload.js +147 -103
  341. package/react/components/FileUpload/sgds-file-upload.js.map +1 -1
  342. package/react/components/Footer/footer-item.cjs.js +11 -0
  343. package/react/components/Footer/footer-item.cjs.js.map +1 -0
  344. package/react/components/Footer/footer-item.js +7 -0
  345. package/react/components/Footer/footer-item.js.map +1 -0
  346. package/react/components/Footer/footer.cjs.js +1 -1
  347. package/react/components/Footer/footer.js +1 -1
  348. package/react/components/Footer/sgds-footer-item.cjs.js +33 -0
  349. package/react/components/Footer/sgds-footer-item.cjs.js.map +1 -0
  350. package/react/components/Footer/sgds-footer-item.js +28 -0
  351. package/react/components/Footer/sgds-footer-item.js.map +1 -0
  352. package/react/components/Footer/sgds-footer.cjs.js +65 -90
  353. package/react/components/Footer/sgds-footer.cjs.js.map +1 -1
  354. package/react/components/Footer/sgds-footer.js +65 -90
  355. package/react/components/Footer/sgds-footer.js.map +1 -1
  356. package/react/components/Icon/icon.cjs.js +11 -0
  357. package/react/components/Icon/icon.cjs.js.map +1 -0
  358. package/react/components/Icon/icon.js +7 -0
  359. package/react/components/Icon/icon.js.map +1 -0
  360. package/react/components/Icon/sgds-icon.cjs.js +70 -0
  361. package/react/components/Icon/sgds-icon.cjs.js.map +1 -0
  362. package/react/components/Icon/sgds-icon.js +65 -0
  363. package/react/components/Icon/sgds-icon.js.map +1 -0
  364. package/react/components/IconButton/icon-button.cjs.js +1 -1
  365. package/react/components/IconButton/icon-button.js +1 -1
  366. package/react/components/IconButton/sgds-icon-button.cjs.js +4 -9
  367. package/react/components/IconButton/sgds-icon-button.cjs.js.map +1 -1
  368. package/react/components/IconButton/sgds-icon-button.js +4 -9
  369. package/react/components/IconButton/sgds-icon-button.js.map +1 -1
  370. package/react/components/Input/sgds-input.cjs.js +101 -64
  371. package/react/components/Input/sgds-input.cjs.js.map +1 -1
  372. package/react/components/Input/sgds-input.js +103 -66
  373. package/react/components/Input/sgds-input.js.map +1 -1
  374. package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js +128 -61
  375. package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js.map +1 -1
  376. package/react/components/QuantityToggle/sgds-quantity-toggle.js +129 -62
  377. package/react/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
  378. package/react/components/Radio/sgds-radio-group.cjs.js +99 -83
  379. package/react/components/Radio/sgds-radio-group.cjs.js.map +1 -1
  380. package/react/components/Radio/sgds-radio-group.js +100 -84
  381. package/react/components/Radio/sgds-radio-group.js.map +1 -1
  382. package/react/components/Radio/sgds-radio.cjs.js +1 -1
  383. package/react/components/Radio/sgds-radio.cjs.js.map +1 -1
  384. package/react/components/Radio/sgds-radio.js +1 -1
  385. package/react/components/Radio/sgds-radio.js.map +1 -1
  386. package/react/components/Stepper/sgds-stepper.cjs.js +1 -0
  387. package/react/components/Stepper/sgds-stepper.cjs.js.map +1 -1
  388. package/react/components/Stepper/sgds-stepper.js +1 -0
  389. package/react/components/Stepper/sgds-stepper.js.map +1 -1
  390. package/react/components/Switch/sgds-switch.cjs.js +1 -2
  391. package/react/components/Switch/sgds-switch.cjs.js.map +1 -1
  392. package/react/components/Switch/sgds-switch.js +1 -2
  393. package/react/components/Switch/sgds-switch.js.map +1 -1
  394. package/react/components/Textarea/sgds-textarea.cjs.js +76 -73
  395. package/react/components/Textarea/sgds-textarea.cjs.js.map +1 -1
  396. package/react/components/Textarea/sgds-textarea.js +78 -75
  397. package/react/components/Textarea/sgds-textarea.js.map +1 -1
  398. package/react/components/Textarea/textarea.cjs.js +1 -1
  399. package/react/components/Textarea/textarea.js +1 -1
  400. package/react/components/Toast/sgds-toast.cjs.js +6 -18
  401. package/react/components/Toast/sgds-toast.cjs.js.map +1 -1
  402. package/react/components/Toast/sgds-toast.js +6 -18
  403. package/react/components/Toast/sgds-toast.js.map +1 -1
  404. package/react/components/Toast/toast.cjs.js +1 -1
  405. package/react/components/Toast/toast.js +1 -1
  406. package/react/components/Tooltip/sgds-tooltip.cjs.js +14 -14
  407. package/react/components/Tooltip/sgds-tooltip.cjs.js.map +1 -1
  408. package/react/components/Tooltip/sgds-tooltip.js +14 -14
  409. package/react/components/Tooltip/sgds-tooltip.js.map +1 -1
  410. package/react/footer-item/index.cjs.js +39 -0
  411. package/react/footer-item/index.cjs.js.map +1 -0
  412. package/react/footer-item/index.d.ts +3 -0
  413. package/react/footer-item/index.js +15 -0
  414. package/react/footer-item/index.js.map +1 -0
  415. package/react/icon/index.cjs.js +42 -0
  416. package/react/icon/index.cjs.js.map +1 -0
  417. package/react/icon/index.d.ts +6 -0
  418. package/react/icon/index.js +18 -0
  419. package/react/icon/index.js.map +1 -0
  420. package/react/index.cjs.js +64 -60
  421. package/react/index.cjs.js.map +1 -1
  422. package/react/index.d.ts +2 -0
  423. package/react/index.js +2 -0
  424. package/react/index.js.map +1 -1
  425. package/react/input/index.cjs.js +3 -1
  426. package/react/input/index.cjs.js.map +1 -1
  427. package/react/input/index.d.ts +2 -0
  428. package/react/input/index.js +3 -1
  429. package/react/input/index.js.map +1 -1
  430. package/react/internals/CloseButton/close-button.cjs.js +1 -1
  431. package/react/internals/CloseButton/close-button.js +1 -1
  432. package/react/internals/CloseButton/sgds-close-button.cjs.js +1 -1
  433. package/react/internals/CloseButton/sgds-close-button.cjs.js.map +1 -1
  434. package/react/internals/CloseButton/sgds-close-button.js +1 -1
  435. package/react/internals/CloseButton/sgds-close-button.js.map +1 -1
  436. package/react/styles/form-hint.cjs.js +1 -1
  437. package/react/styles/form-hint.js +1 -1
  438. package/react/styles/form-label.cjs.js +1 -1
  439. package/react/styles/form-label.js +1 -1
  440. package/react/utils/formSubmitController.cjs.js +64 -0
  441. package/react/utils/formSubmitController.cjs.js.map +1 -0
  442. package/react/utils/formSubmitController.js +60 -0
  443. package/react/utils/formSubmitController.js.map +1 -0
  444. package/react/utils/inputValidationController.cjs.js +130 -0
  445. package/react/utils/inputValidationController.cjs.js.map +1 -0
  446. package/react/utils/inputValidationController.js +126 -0
  447. package/react/utils/inputValidationController.js.map +1 -0
  448. package/react/utils/validatorMixin.cjs.js +108 -0
  449. package/react/utils/validatorMixin.cjs.js.map +1 -0
  450. package/react/utils/validatorMixin.js +104 -0
  451. package/react/utils/validatorMixin.js.map +1 -0
  452. package/styles/form-hint.js +1 -1
  453. package/styles/form-label.js +1 -1
  454. package/themes/day.css +1 -1
  455. package/themes/night.css +3 -2
  456. package/themes/root.css +1 -0
  457. package/utils/{form.d.ts → formSubmitController.d.ts} +10 -20
  458. package/utils/formSubmitController.js +59 -0
  459. package/utils/formSubmitController.js.map +1 -0
  460. package/utils/inputValidationController.d.ts +70 -0
  461. package/utils/inputValidationController.js +125 -0
  462. package/utils/inputValidationController.js.map +1 -0
  463. package/utils/validatorMixin.d.ts +24 -0
  464. package/utils/validatorMixin.js +103 -0
  465. package/utils/validatorMixin.js.map +1 -0
  466. package/base/form-check-element.d.ts +0 -50
  467. package/base/form-check-element.js +0 -169
  468. package/base/form-check-element.js.map +0 -1
  469. package/react/base/form-check-element.cjs.js +0 -175
  470. package/react/base/form-check-element.cjs.js.map +0 -1
  471. package/react/base/form-check-element.js +0 -170
  472. package/react/base/form-check-element.js.map +0 -1
  473. package/react/utils/form.cjs.js +0 -137
  474. package/react/utils/form.cjs.js.map +0 -1
  475. package/react/utils/form.js +0 -133
  476. package/react/utils/form.js.map +0 -1
  477. package/utils/form.js +0 -132
  478. package/utils/form.js.map +0 -1
@@ -0,0 +1,13 @@
1
+ import SgdsElement from "../../base/sgds-element";
2
+ /**
3
+ * @summary The footer item component organizes links under a clear, descriptive title within the footer. It helps users easily navigate to related resources or information, ensuring clarity and accessibility.
4
+ *
5
+ * @slot default - The slot for the list of link items
6
+ * @slot title - The slot for the title of the list of items
7
+ *
8
+ */
9
+ export declare class SgdsFooterItem extends SgdsElement {
10
+ static styles: import("lit").CSSResult[];
11
+ render(): import("lit-html").TemplateResult<1>;
12
+ }
13
+ export default SgdsFooterItem;
@@ -0,0 +1,27 @@
1
+ import { html } from 'lit';
2
+ import SgdsElement from '../../base/sgds-element.js';
3
+ import css_248z from './footer-item.js';
4
+
5
+ /**
6
+ * @summary The footer item component organizes links under a clear, descriptive title within the footer. It helps users easily navigate to related resources or information, ensuring clarity and accessibility.
7
+ *
8
+ * @slot default - The slot for the list of link items
9
+ * @slot title - The slot for the title of the list of items
10
+ *
11
+ */
12
+ class SgdsFooterItem extends SgdsElement {
13
+ render() {
14
+ return html `
15
+ <div class="footer-item">
16
+ <slot name="title"></slot>
17
+ <div class="links">
18
+ <slot></slot>
19
+ </div>
20
+ </div>
21
+ `;
22
+ }
23
+ }
24
+ SgdsFooterItem.styles = [...SgdsElement.styles, css_248z];
25
+
26
+ export { SgdsFooterItem, SgdsFooterItem as default };
27
+ //# sourceMappingURL=sgds-footer-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sgds-footer-item.js","sources":["../../../src/components/Footer/sgds-footer-item.ts"],"sourcesContent":["import { html } from \"lit\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport footerLinkStyle from \"./footer-item.css\";\n\n/**\n * @summary The footer item component organizes links under a clear, descriptive title within the footer. It helps users easily navigate to related resources or information, ensuring clarity and accessibility.\n *\n * @slot default - The slot for the list of link items\n * @slot title - The slot for the title of the list of items\n *\n */\nexport class SgdsFooterItem extends SgdsElement {\n static styles = [...SgdsElement.styles, footerLinkStyle];\n\n render() {\n return html`\n <div class=\"footer-item\">\n <slot name=\"title\"></slot>\n <div class=\"links\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n}\n\nexport default SgdsFooterItem;\n"],"names":["footerLinkStyle"],"mappings":";;;;AAIA;;;;;;AAMG;AACG,MAAO,cAAe,SAAQ,WAAW,CAAA;IAG7C,MAAM,GAAA;AACJ,QAAA,OAAO,IAAI,CAAA,CAAA;;;;;;;KAOV,CAAC;KACH;;AAXM,cAAM,CAAA,MAAA,GAAG,CAAC,GAAG,WAAW,CAAC,MAAM,EAAEA,QAAe,CAAC;;;;"}
@@ -1,45 +1,19 @@
1
1
  import SgdsElement from "../../base/sgds-element";
2
- export interface ColumnLinks {
3
- title: string;
4
- links: Links[];
5
- }
6
- export interface Links {
7
- href: string;
8
- label: string;
9
- }
10
2
  /**
11
3
  * @summary The footer contains supporting information for your service at the bottom of your website. All .gov.sg digital services shall contain a Global Footer Bar across all pages. The Global Footer Bar should include the name of the digital service, contact information, a privacy statement and the terms of use.
12
4
  *
13
- * @csspart footer-top - The component's footer-top section container.
14
- * @csspart footer-bottom - The component's footer-bottom section container.
5
+ * @slot title - The slot for title
6
+ * @slot description - The slot for description
7
+ * @slot items - The slot for the list of footer items
8
+ * @slot social-media - The slot for the list of social media with icons
15
9
  *
16
- * @cssproperty footer-top - The component's footer-top section container.
17
- * @cssproperty footer-bottom - The component's footer-bottom section container.
18
10
  */
19
11
  export declare class SgdsFooter extends SgdsElement {
20
12
  static styles: import("lit").CSSResult[];
21
- /**
22
- * Sets title of SgdsFooter
23
- */
24
- title: string;
25
- /**
26
- * Sets description of SgdsFooter
27
- */
28
- description: string;
29
13
  /**
30
14
  * Sets copyrightLiner of SgdsFooter
31
15
  */
32
16
  copyrightLiner: string;
33
- /**
34
- * Array of type
35
- *
36
- * `interface ColumnLinks { title: string; links : Links[] } interface Links { href: string; label: string; }`
37
- */
38
- links: ColumnLinks[];
39
- /**
40
- * String date for last updated date
41
- */
42
- lastUpdatedDate: string;
43
17
  /**
44
18
  * href link for contacts
45
19
  */
@@ -48,6 +22,10 @@ export declare class SgdsFooter extends SgdsElement {
48
22
  * href link for feedback
49
23
  */
50
24
  feedbackHref: string;
25
+ /**
26
+ * href link for faq
27
+ */
28
+ faqHref: string;
51
29
  /**
52
30
  * href link for privacy statement
53
31
  */
@@ -56,6 +34,7 @@ export declare class SgdsFooter extends SgdsElement {
56
34
  * href link for terms of use
57
35
  */
58
36
  termsOfUseHref: string;
37
+ firstUpdated(): void;
59
38
  render(): import("lit-html").TemplateResult<1>;
60
39
  }
61
40
  export default SgdsFooter;
@@ -7,37 +7,19 @@ import css_248z from './footer.js';
7
7
  /**
8
8
  * @summary The footer contains supporting information for your service at the bottom of your website. All .gov.sg digital services shall contain a Global Footer Bar across all pages. The Global Footer Bar should include the name of the digital service, contact information, a privacy statement and the terms of use.
9
9
  *
10
- * @csspart footer-top - The component's footer-top section container.
11
- * @csspart footer-bottom - The component's footer-bottom section container.
10
+ * @slot title - The slot for title
11
+ * @slot description - The slot for description
12
+ * @slot items - The slot for the list of footer items
13
+ * @slot social-media - The slot for the list of social media with icons
12
14
  *
13
- * @cssproperty footer-top - The component's footer-top section container.
14
- * @cssproperty footer-bottom - The component's footer-bottom section container.
15
15
  */
16
16
  class SgdsFooter extends SgdsElement {
17
17
  constructor() {
18
18
  super(...arguments);
19
- /**
20
- * Sets title of SgdsFooter
21
- */
22
- this.title = "";
23
- /**
24
- * Sets description of SgdsFooter
25
- */
26
- this.description = "";
27
19
  /**
28
20
  * Sets copyrightLiner of SgdsFooter
29
21
  */
30
22
  this.copyrightLiner = "Government of Singapore";
31
- /**
32
- * Array of type
33
- *
34
- * `interface ColumnLinks { title: string; links : Links[] } interface Links { href: string; label: string; }`
35
- */
36
- this.links = [];
37
- /**
38
- * String date for last updated date
39
- */
40
- this.lastUpdatedDate = "";
41
23
  /**
42
24
  * href link for contacts
43
25
  */
@@ -46,6 +28,10 @@ class SgdsFooter extends SgdsElement {
46
28
  * href link for feedback
47
29
  */
48
30
  this.feedbackHref = "#";
31
+ /**
32
+ * href link for faq
33
+ */
34
+ this.faqHref = "#";
49
35
  /**
50
36
  * href link for privacy statement
51
37
  */
@@ -55,64 +41,64 @@ class SgdsFooter extends SgdsElement {
55
41
  */
56
42
  this.termsOfUseHref = "#";
57
43
  }
44
+ firstUpdated() {
45
+ const socialMediaSlot = this.shadowRoot.querySelector("slot[name='social-media']");
46
+ const footerTitleSlot = this.shadowRoot.querySelector("slot[name='title']");
47
+ const footerDescriptionSlot = this.shadowRoot.querySelector("slot[name='description']");
48
+ const footerItemsSlot = this.shadowRoot.querySelector("slot[name='items']");
49
+ const socialMediaChildNodes = socialMediaSlot.assignedNodes({ flatten: true });
50
+ const footerTitleChildNodes = footerTitleSlot.assignedNodes({ flatten: true });
51
+ const footerDescriptionChildNodes = footerDescriptionSlot.assignedNodes({ flatten: true });
52
+ const footerItemsChildNodes = footerItemsSlot.assignedNodes({ flatten: true });
53
+ if (socialMediaChildNodes.length === 0) {
54
+ const socialMediaContainer = this.shadowRoot.querySelector(".social-media");
55
+ socialMediaContainer.style.display = "none";
56
+ }
57
+ if (footerTitleChildNodes.length === 0 && footerDescriptionChildNodes.length === 0) {
58
+ const footerHeaderContainer = this.shadowRoot.querySelector(".footer-header");
59
+ footerHeaderContainer.style.display = "none";
60
+ }
61
+ if (footerItemsChildNodes.length === 0) {
62
+ const footerItemsContainer = this.shadowRoot.querySelector(".footer-items");
63
+ footerItemsContainer.style.display = "none";
64
+ }
65
+ if (footerTitleChildNodes.length === 0 &&
66
+ footerDescriptionChildNodes.length === 0 &&
67
+ footerItemsChildNodes.length === 0) {
68
+ const footerTopContainer = this.shadowRoot.querySelector(".footer-top");
69
+ footerTopContainer.style.display = "none";
70
+ }
71
+ }
58
72
  render() {
59
- // if description is defined
60
- const hasDescription = html ` <div class="description">${this.description}</div>`;
61
73
  return html `
62
- <footer class="sgds footer">
63
- <section class="footer-top" part="footer-top">
64
- <div class="container-fluid">
65
- <div class="row footer-header">
66
- <div class="col col-lg-6 col-md-12">
67
- <div class="title">${this.title ? this.title : "Footer title"}</div>
68
- ${this.description ? hasDescription : undefined}
69
- </div>
70
- </div>
71
- <div class="row footer-items">
72
- ${this.links.map((item) => html `
73
- <div class="col-xxl-2 col-md-4 mb-3">
74
- <div class="title">${item.title}</div>
75
- <ul class="links">
76
- ${item.links.map((link) => html ` <li><a href=${link.href}>${link.label}</a></li> `)}
77
- </ul>
78
- </div>
79
- `)}
80
- </div>
81
- <div class="row footer-contact-links">
82
- <div class="col">
83
- <div class="d-flex justify-content-lg-end">
84
- <ul>
85
- <li><a href=${this.contactHref}>Contact</a></li>
86
- <li><a href=${this.feedbackHref}>Feedback</a></li>
87
- </ul>
88
- </div>
89
- </div>
90
- </div>
74
+ <footer class="footer">
75
+ <section class="footer-top">
76
+ <div class="footer-header">
77
+ <slot name="title"></slot>
78
+ <slot name="description"></slot>
79
+ </div>
80
+ <div class="footer-items">
81
+ <slot name="items"></slot>
91
82
  </div>
92
83
  </section>
93
- <section class="footer-bottom" part="footer-bottom">
94
- <div class="container-fluid">
95
- <div class="row footer-mandatory-links">
96
- <div class="col">
97
- <ul>
98
- <li>
99
- <a href="https://tech.gov.sg/report_vulnerability" target="_blank" rel="noopener noreferrer"
100
- >Report Vulnerability</a
101
- >
102
- </li>
103
- <li><a href=${this.privacyHref}>Privacy Statement</a></li>
104
- <li><a href=${this.termsOfUseHref}>Terms of use</a></li>
105
- </ul>
106
- </div>
107
- </div>
108
- <div class="row footer-copyrights">
109
- <div class="col">
110
- <div class="d-flex justify-content-lg-end text-end">
111
- © ${new Date().getFullYear()} ${this.copyrightLiner}<br />
112
- Last Updated ${this.lastUpdatedDate}
113
- </div>
114
- </div>
115
- </div>
84
+ <section class="footer-bottom">
85
+ <div class="social-media">
86
+ <slot name="social-media"></slot>
87
+ </div>
88
+ <div class="footer-mandatory-links">
89
+ <ul>
90
+ <li><a href=${this.contactHref}>Contact</a></li>
91
+ <li><a href=${this.feedbackHref}>Feedback</a></li>
92
+ <li><a href=${this.faqHref}>FAQ</a></li>
93
+ <li>
94
+ <a href="https://tech.gov.sg/report_vulnerability" target="_blank" rel="noopener noreferrer">
95
+ Report Vulnerability
96
+ </a>
97
+ </li>
98
+ <li><a href=${this.privacyHref}>Privacy Statement</a></li>
99
+ <li><a href=${this.termsOfUseHref}>Terms of use</a></li>
100
+ </ul>
101
+ <div class="footer-copyrights">© ${new Date().getFullYear()}, ${this.copyrightLiner}</div>
116
102
  </div>
117
103
  </section>
118
104
  </footer>
@@ -120,29 +106,18 @@ class SgdsFooter extends SgdsElement {
120
106
  }
121
107
  }
122
108
  SgdsFooter.styles = [...SgdsElement.styles, css_248z];
123
- __decorate([
124
- property({ type: String })
125
- ], SgdsFooter.prototype, "title", void 0);
126
- __decorate([
127
- property({ type: String })
128
- ], SgdsFooter.prototype, "description", void 0);
129
109
  __decorate([
130
110
  property({ type: String })
131
111
  ], SgdsFooter.prototype, "copyrightLiner", void 0);
132
- __decorate([
133
- property({
134
- type: Array
135
- })
136
- ], SgdsFooter.prototype, "links", void 0);
137
- __decorate([
138
- property({ type: String })
139
- ], SgdsFooter.prototype, "lastUpdatedDate", void 0);
140
112
  __decorate([
141
113
  property({ type: String })
142
114
  ], SgdsFooter.prototype, "contactHref", void 0);
143
115
  __decorate([
144
116
  property({ type: String })
145
117
  ], SgdsFooter.prototype, "feedbackHref", void 0);
118
+ __decorate([
119
+ property({ type: String })
120
+ ], SgdsFooter.prototype, "faqHref", void 0);
146
121
  __decorate([
147
122
  property({ type: String })
148
123
  ], SgdsFooter.prototype, "privacyHref", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"sgds-footer.js","sources":["../../../src/components/Footer/sgds-footer.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport footerStyle from \"./footer.css\";\nexport interface ColumnLinks {\n title: string;\n links: Links[];\n}\nexport interface Links {\n href: string;\n label: string;\n}\n\n/**\n * @summary The footer contains supporting information for your service at the bottom of your website. All .gov.sg digital services shall contain a Global Footer Bar across all pages. The Global Footer Bar should include the name of the digital service, contact information, a privacy statement and the terms of use.\n *\n * @csspart footer-top - The component's footer-top section container.\n * @csspart footer-bottom - The component's footer-bottom section container.\n *\n * @cssproperty footer-top - The component's footer-top section container.\n * @cssproperty footer-bottom - The component's footer-bottom section container.\n */\nexport class SgdsFooter extends SgdsElement {\n static styles = [...SgdsElement.styles, footerStyle];\n\n /**\n * \tSets title of SgdsFooter\n */\n @property({ type: String })\n title = \"\";\n\n /**\n * \tSets description of SgdsFooter\n */\n @property({ type: String })\n description = \"\";\n\n /**\n * \tSets copyrightLiner of SgdsFooter\n */\n @property({ type: String })\n copyrightLiner = \"Government of Singapore\";\n\n /**\n * Array of type\n *\n * `interface ColumnLinks { title: string; links : Links[] } interface Links { href: string; label: string; }`\n */\n @property({\n type: Array\n })\n links: ColumnLinks[] = [];\n\n /**\n * String date for last updated date\n */\n @property({ type: String })\n lastUpdatedDate = \"\";\n\n /**\n * \thref link for contacts\n */\n @property({ type: String })\n contactHref = \"#\";\n\n /**\n * \thref link for feedback\n */\n @property({ type: String })\n feedbackHref = \"#\";\n\n /**\n * \thref link for privacy statement\n */\n @property({ type: String })\n privacyHref = \"#\";\n\n /**\n * \thref link for terms of use\n */\n @property({ type: String })\n termsOfUseHref = \"#\";\n\n render() {\n // if description is defined\n const hasDescription = html` <div class=\"description\">${this.description}</div>`;\n\n return html`\n <footer class=\"sgds footer\">\n <section class=\"footer-top\" part=\"footer-top\">\n <div class=\"container-fluid\">\n <div class=\"row footer-header\">\n <div class=\"col col-lg-6 col-md-12\">\n <div class=\"title\">${this.title ? this.title : \"Footer title\"}</div>\n ${this.description ? hasDescription : undefined}\n </div>\n </div>\n <div class=\"row footer-items\">\n ${this.links.map(\n (item: ColumnLinks) =>\n html`\n <div class=\"col-xxl-2 col-md-4 mb-3\">\n <div class=\"title\">${item.title}</div>\n <ul class=\"links\">\n ${item.links.map((link: Links) => html` <li><a href=${link.href}>${link.label}</a></li> `)}\n </ul>\n </div>\n `\n )}\n </div>\n <div class=\"row footer-contact-links\">\n <div class=\"col\">\n <div class=\"d-flex justify-content-lg-end\">\n <ul>\n <li><a href=${this.contactHref}>Contact</a></li>\n <li><a href=${this.feedbackHref}>Feedback</a></li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n </section>\n <section class=\"footer-bottom\" part=\"footer-bottom\">\n <div class=\"container-fluid\">\n <div class=\"row footer-mandatory-links\">\n <div class=\"col\">\n <ul>\n <li>\n <a href=\"https://tech.gov.sg/report_vulnerability\" target=\"_blank\" rel=\"noopener noreferrer\"\n >Report Vulnerability</a\n >\n </li>\n <li><a href=${this.privacyHref}>Privacy Statement</a></li>\n <li><a href=${this.termsOfUseHref}>Terms of use</a></li>\n </ul>\n </div>\n </div>\n <div class=\"row footer-copyrights\">\n <div class=\"col\">\n <div class=\"d-flex justify-content-lg-end text-end\">\n © ${new Date().getFullYear()} ${this.copyrightLiner}<br />\n Last Updated ${this.lastUpdatedDate}\n </div>\n </div>\n </div>\n </div>\n </section>\n </footer>\n `;\n }\n}\n\nexport default SgdsFooter;\n"],"names":["footerStyle"],"mappings":";;;;;;AAaA;;;;;;;;AAQG;AACG,MAAO,UAAW,SAAQ,WAAW,CAAA;AAA3C,IAAA,WAAA,GAAA;;AAGE;;AAEG;QAEH,IAAK,CAAA,KAAA,GAAG,EAAE,CAAC;AAEX;;AAEG;QAEH,IAAW,CAAA,WAAA,GAAG,EAAE,CAAC;AAEjB;;AAEG;QAEH,IAAc,CAAA,cAAA,GAAG,yBAAyB,CAAC;AAE3C;;;;AAIG;QAIH,IAAK,CAAA,KAAA,GAAkB,EAAE,CAAC;AAE1B;;AAEG;QAEH,IAAe,CAAA,eAAA,GAAG,EAAE,CAAC;AAErB;;AAEG;QAEH,IAAW,CAAA,WAAA,GAAG,GAAG,CAAC;AAElB;;AAEG;QAEH,IAAY,CAAA,YAAA,GAAG,GAAG,CAAC;AAEnB;;AAEG;QAEH,IAAW,CAAA,WAAA,GAAG,GAAG,CAAC;AAElB;;AAEG;QAEH,IAAc,CAAA,cAAA,GAAG,GAAG,CAAC;KAqEtB;IAnEC,MAAM,GAAA;;QAEJ,MAAM,cAAc,GAA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../../src/components/Footer/sgds-footer.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport footerStyle from \"./footer.css\";\n\n/**\n * @summary The footer contains supporting information for your service at the bottom of your website. All .gov.sg digital services shall contain a Global Footer Bar across all pages. The Global Footer Bar should include the name of the digital service, contact information, a privacy statement and the terms of use.\n *\n * @slot title - The slot for title\n * @slot description - The slot for description\n * @slot items - The slot for the list of footer items\n * @slot social-media - The slot for the list of social media with icons\n *\n */\nexport class SgdsFooter extends SgdsElement {\n static styles = [...SgdsElement.styles, footerStyle];\n\n /**\n * \tSets copyrightLiner of SgdsFooter\n */\n @property({ type: String })\n copyrightLiner = \"Government of Singapore\";\n\n /**\n * \thref link for contacts\n */\n @property({ type: String })\n contactHref = \"#\";\n\n /**\n * \thref link for feedback\n */\n @property({ type: String })\n feedbackHref = \"#\";\n\n /**\n * \thref link for faq\n */\n @property({ type: String })\n faqHref = \"#\";\n\n /**\n * \thref link for privacy statement\n */\n @property({ type: String })\n privacyHref = \"#\";\n\n /**\n * \thref link for terms of use\n */\n @property({ type: String })\n termsOfUseHref = \"#\";\n\n firstUpdated() {\n const socialMediaSlot = this.shadowRoot.querySelector(\"slot[name='social-media']\") as HTMLSlotElement;\n const footerTitleSlot = this.shadowRoot.querySelector(\"slot[name='title']\") as HTMLSlotElement;\n const footerDescriptionSlot = this.shadowRoot.querySelector(\"slot[name='description']\") as HTMLSlotElement;\n const footerItemsSlot = this.shadowRoot.querySelector(\"slot[name='items']\") as HTMLSlotElement;\n const socialMediaChildNodes = socialMediaSlot.assignedNodes({ flatten: true });\n const footerTitleChildNodes = footerTitleSlot.assignedNodes({ flatten: true });\n const footerDescriptionChildNodes = footerDescriptionSlot.assignedNodes({ flatten: true });\n const footerItemsChildNodes = footerItemsSlot.assignedNodes({ flatten: true });\n if (socialMediaChildNodes.length === 0) {\n const socialMediaContainer = this.shadowRoot.querySelector(\".social-media\") as HTMLDivElement;\n socialMediaContainer.style.display = \"none\";\n }\n\n if (footerTitleChildNodes.length === 0 && footerDescriptionChildNodes.length === 0) {\n const footerHeaderContainer = this.shadowRoot.querySelector(\".footer-header\") as HTMLDivElement;\n footerHeaderContainer.style.display = \"none\";\n }\n\n if (footerItemsChildNodes.length === 0) {\n const footerItemsContainer = this.shadowRoot.querySelector(\".footer-items\") as HTMLDivElement;\n footerItemsContainer.style.display = \"none\";\n }\n\n if (\n footerTitleChildNodes.length === 0 &&\n footerDescriptionChildNodes.length === 0 &&\n footerItemsChildNodes.length === 0\n ) {\n const footerTopContainer = this.shadowRoot.querySelector(\".footer-top\") as HTMLDivElement;\n footerTopContainer.style.display = \"none\";\n }\n }\n\n render() {\n return html`\n <footer class=\"footer\">\n <section class=\"footer-top\">\n <div class=\"footer-header\">\n <slot name=\"title\"></slot>\n <slot name=\"description\"></slot>\n </div>\n <div class=\"footer-items\">\n <slot name=\"items\"></slot>\n </div>\n </section>\n <section class=\"footer-bottom\">\n <div class=\"social-media\">\n <slot name=\"social-media\"></slot>\n </div>\n <div class=\"footer-mandatory-links\">\n <ul>\n <li><a href=${this.contactHref}>Contact</a></li>\n <li><a href=${this.feedbackHref}>Feedback</a></li>\n <li><a href=${this.faqHref}>FAQ</a></li>\n <li>\n <a href=\"https://tech.gov.sg/report_vulnerability\" target=\"_blank\" rel=\"noopener noreferrer\">\n Report Vulnerability\n </a>\n </li>\n <li><a href=${this.privacyHref}>Privacy Statement</a></li>\n <li><a href=${this.termsOfUseHref}>Terms of use</a></li>\n </ul>\n <div class=\"footer-copyrights\" ${new Date().getFullYear()}, ${this.copyrightLiner}</div>\n </div>\n </section>\n </footer>\n `;\n }\n}\n\nexport default SgdsFooter;\n"],"names":["footerStyle"],"mappings":";;;;;;AAKA;;;;;;;;AAQG;AACG,MAAO,UAAW,SAAQ,WAAW,CAAA;AAA3C,IAAA,WAAA,GAAA;;AAGE;;AAEG;QAEH,IAAc,CAAA,cAAA,GAAG,yBAAyB,CAAC;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M,EAAEA,QAAW,CAAtC,CAAwC;AAMrD,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACgB,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAM3C,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACT,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,aAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAMlB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACR,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,cAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAMnB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACb,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAMd,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACT,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,aAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAMlB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACN,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
@@ -0,0 +1,6 @@
1
+ import { css } from 'lit';
2
+
3
+ var css_248z = css`:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;
4
+
5
+ export { css_248z as default };
6
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,6 @@
1
+ import { SgdsIcon } from "./sgds-icon";
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ "sgds-icon": SgdsIcon;
5
+ }
6
+ }
@@ -0,0 +1,4 @@
1
+ import { SgdsIcon } from './sgds-icon.js';
2
+
3
+ customElements.define("sgds-icon", SgdsIcon);
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Icon/index.ts"],"sourcesContent":["import { SgdsIcon } from \"./sgds-icon\";\n\ncustomElements.define(\"sgds-icon\", SgdsIcon);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sgds-icon\": SgdsIcon;\n }\n}\n"],"names":[],"mappings":";;AAEA,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC"}