@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
@@ -2,64 +2,79 @@
2
2
  import { __decorate } from 'tslib';
3
3
  import { ScopedElementsMixin } from '@open-wc/scoped-elements';
4
4
  import { html } from 'lit';
5
- import { property } from 'lit/decorators.js';
5
+ import { property, state } from 'lit/decorators.js';
6
6
  import { createRef, ref } from 'lit/directives/ref.js';
7
- import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
8
- import SgdsElement from '../../base/sgds-element.js';
7
+ import { SgdsCloseButton } from '../../internals/CloseButton/sgds-close-button.js';
9
8
  import { SgdsButton } from '../Button/sgds-button.js';
10
- import css_248z$2 from './file-upload.js';
11
- import genId from '../../utils/generateId.js';
12
- import css_248z from '../../styles/svg.js';
13
- import css_248z$1 from '../../styles/form-hint.js';
9
+ import css_248z from './file-upload.js';
10
+ import FormControlElement from '../../base/form-control-element.js';
11
+ import { SgdsFormValidatorMixin } from '../../utils/validatorMixin.js';
12
+ import { watch } from '../../utils/watch.js';
14
13
 
15
14
  /**
16
15
  * @summary Allows users to upload files of various sizes and formats
17
16
  * @slot default - Label for file upload button
18
17
  *
19
- * @event sgds-files-selected - Emitted when files are selected for uploading
20
- *
21
- * @cssproperty --file-upload-file-icon-color - Left icon color
22
- * @cssproperty --file-upload-remove-icon-color - Remove icon color
23
- * @cssproperty --file-upload-remove-icon-hover-color - Remove icon hover color
18
+ * @event sgds-files-selected - Emitted when files are selected for uploading. Access the selected files with event.target.detail
24
19
  */
25
- class SgdsFileUpload extends ScopedElementsMixin(SgdsElement) {
20
+ class SgdsFileUpload extends SgdsFormValidatorMixin(ScopedElementsMixin(FormControlElement)) {
26
21
  constructor() {
27
22
  super(...arguments);
28
- /** The button's variant. */
29
- this.variant = "primary";
30
- //** Disable the fileuploader button */
31
- this.disabled = false;
32
23
  /** Allows multiple files to be listed for uploading */
33
24
  this.multiple = false;
34
25
  /** Specify the acceptable file type */
35
26
  this.accept = "";
36
- /** Customize the check icon with SVG */
37
- this.checkedIcon = "";
38
- /** Customize the cancel icon with SVG */
39
- this.cancelIcon = "";
40
- /** The input's hint text below the label */
41
- this.hintText = "";
42
- /** @internal */
27
+ // /** Customize the check icon with SVG */
28
+ // @property({ type: String }) checkedIcon = "";
29
+ /** Allows invalidFeedback, invalid and valid styles to be visible with the input */
30
+ this.hasFeedback = false;
31
+ /** Makes the input as a required field. */
32
+ this.required = false;
43
33
  this.selectedFiles = [];
44
- // Create a ref to the input element
45
- /** @internal */
46
34
  this.inputRef = createRef();
47
- /**@internal */
48
- this.inputId = genId("input", "file");
49
35
  }
50
36
  /**@internal */
51
37
  static get scopedElements() {
52
38
  return {
53
- "sgds-button": SgdsButton
39
+ "sgds-button": SgdsButton,
40
+ "sgds-close-button": SgdsCloseButton
54
41
  };
55
42
  }
43
+ /**
44
+ * Checks for validity. Under the hood, HTMLFormElement's reportValidity method calls this method to check for component's validity state
45
+ * Note that the native error popup is prevented for SGDS form components by default. Instead the validation message shows up in the feedback container of SgdsInput
46
+ */
47
+ reportValidity() {
48
+ return this._mixinReportValidity();
49
+ }
50
+ /**
51
+ * Checks for validity without any native error popup message
52
+ */
53
+ checkValidity() {
54
+ return this._mixinCheckValidity();
55
+ }
56
+ /**
57
+ * Returns the ValidityState object
58
+ */
59
+ get validity() {
60
+ return this._mixinGetValidity();
61
+ }
62
+ /**
63
+ * Returns the validation message based on the ValidityState
64
+ */
65
+ get validationMessage() {
66
+ return this._mixinGetValidationMessage();
67
+ }
68
+ /**
69
+ * Returns files selected for upload
70
+ */
71
+ get files() {
72
+ return this.selectedFiles;
73
+ }
56
74
  _setFileList(files) {
57
- this.files = files;
58
- this.emit("sgds-files-selected");
59
- //Possible to pass in the files
75
+ this.emit("sgds-files-selected", { detail: files });
60
76
  }
61
- /** @internal */
62
- handleClick(event) {
77
+ _handleClick(event) {
63
78
  event.preventDefault();
64
79
  if (!this.disabled) {
65
80
  // Get a reference to the input element using the inputRef
@@ -68,8 +83,7 @@ class SgdsFileUpload extends ScopedElementsMixin(SgdsElement) {
68
83
  inputElement.click();
69
84
  }
70
85
  }
71
- /** @internal */
72
- handleInputChange(event) {
86
+ _handleChange(event) {
73
87
  const inputElement = event.target;
74
88
  const files = inputElement.files;
75
89
  if (files.length > 0) {
@@ -78,6 +92,7 @@ class SgdsFileUpload extends ScopedElementsMixin(SgdsElement) {
78
92
  // Trigger a re-render of the component to update the list of selected files
79
93
  this._setFileList(files);
80
94
  this.requestUpdate();
95
+ super._mixinHandleChange(event);
81
96
  }
82
97
  _removeFileHandler(index) {
83
98
  const inputElement = this.inputRef.value;
@@ -94,19 +109,56 @@ class SgdsFileUpload extends ScopedElementsMixin(SgdsElement) {
94
109
  this.selectedFiles = Array.from(fileBuffer.files);
95
110
  // Trigger a re-render of the component to update the list of selected files
96
111
  this.requestUpdate();
112
+ this._mixinValidate(this.input);
113
+ }
114
+ _clearAllFiles() {
115
+ const inputElement = this.inputRef.value;
116
+ const fileBuffer = new DataTransfer();
117
+ inputElement.files = fileBuffer.files;
118
+ this._setFileList(fileBuffer.files);
119
+ this.selectedFiles = Array.from(fileBuffer.files);
120
+ }
121
+ /**
122
+ * fileupload requries a custom _mixinResetFormControl for clearing files
123
+ */
124
+ _mixinResetFormControl() {
125
+ this._clearAllFiles();
126
+ this._mixinResetValidity(this.input);
127
+ }
128
+ _handleDisabledChange() {
129
+ // Disabled form controls are always valid, so we need to recheck validity when the state changes
130
+ this.setInvalid(false);
131
+ }
132
+ _renderLabel() {
133
+ const labelTemplate = html `
134
+ <label for=${this._controlId} id=${this._labelId} class="form-label"> ${this.label} </label>
135
+ `;
136
+ return this.label && labelTemplate;
97
137
  }
98
138
  _renderHintText() {
99
- const hintTextTemplate = html ` <small id="${this.inputId}Help" class="form-text">${this.hintText}</small> `;
139
+ const hintTextTemplate = html ` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;
100
140
  return this.hintText && hintTextTemplate;
101
141
  }
102
- _sanitizeVariant(variant) {
103
- return variant.replace("outline-", "");
142
+ _renderFeedback() {
143
+ return html `
144
+ <div class="invalid-feedback-container">
145
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
146
+ <path
147
+ d="M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10ZM10 6.25C9.49805 6.25 9.10584 6.68339 9.15578 7.18285L9.48461 10.4711C9.51109 10.7359 9.7339 10.9375 10 10.9375C10.2661 10.9375 10.4889 10.7359 10.5154 10.4711L10.8442 7.18285C10.8942 6.68339 10.5019 6.25 10 6.25ZM10.0014 11.875C9.48368 11.875 9.06394 12.2947 9.06394 12.8125C9.06394 13.3303 9.48368 13.75 10.0014 13.75C10.5192 13.75 10.9389 13.3303 10.9389 12.8125C10.9389 12.2947 10.5192 11.875 10.0014 11.875Z"
148
+ fill="#B90000"
149
+ />
150
+ </svg>
151
+ <div id="${this._controlId}-invalid" class="invalid-feedback">
152
+ ${this.invalidFeedback ? this.invalidFeedback : this.input.validationMessage}
153
+ </div>
154
+ </div>
155
+ `;
104
156
  }
105
157
  render() {
106
- const getCheckedIcon = (checkedIcon) => {
107
- if (checkedIcon) {
108
- return html `${unsafeSVG(checkedIcon)}`;
109
- }
158
+ const getCheckedIcon = () => {
159
+ // if (checkedIcon) {
160
+ // return html`${unsafeSVG(checkedIcon)}`;
161
+ // }
110
162
  return html ` <svg
111
163
  xmlns="http://www.w3.org/2000/svg"
112
164
  width="16"
@@ -118,67 +170,62 @@ class SgdsFileUpload extends ScopedElementsMixin(SgdsElement) {
118
170
  <path
119
171
  d="M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022Z"
120
172
  />
121
- </svg>`;
122
- };
123
- const getCancelIcon = (cancelIcon) => {
124
- if (cancelIcon) {
125
- return html `${unsafeSVG(cancelIcon)}`;
126
- }
127
- return html `<svg
128
- xmlns="http://www.w3.org/2000/svg"
129
- width="16"
130
- height="16"
131
- fill="currentColor"
132
- class="bi bi-x-circle"
133
- viewBox="0 0 16 16"
134
- >
135
- <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" />
136
- <path
137
- d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"
138
- />
139
173
  </svg>`;
140
174
  };
141
175
  const listItems = this.selectedFiles.map((file, index) => html `
142
- <li key=${index} class="fileupload-list-item">
143
- <span>${getCheckedIcon(this.checkedIcon)}</span>
176
+ <li key=${index} class="file-upload-list-item">
177
+ <span>${getCheckedIcon()}</span>
144
178
  <span class="filename">${file.name}</span>
145
- <span @click=${() => this._removeFileHandler(index)}>${getCancelIcon(this.cancelIcon)}</span>
179
+ <sgds-close-button
180
+ aria-label="remove the file"
181
+ @click=${() => this._removeFileHandler(index)}
182
+ ></sgds-close-button>
146
183
  </li>
147
184
  `);
148
185
  return html `
149
- <input
150
- ${ref(this.inputRef)}
151
- type="file"
152
- @change=${this.handleInputChange}
153
- ?multiple=${this.multiple}
154
- accept=${this.accept}
155
- id=${this.inputId}
156
- />
157
- <div class="fileupload-container">
158
- <sgds-button
159
- size=${this.size}
160
- variant=${this._sanitizeVariant(this.variant)}
161
- ?outlined=${this.variant.includes("outline")}
186
+ <div class="file-upload">
187
+ <input
188
+ ${ref(this.inputRef)}
189
+ type="file"
190
+ @change=${this._handleChange}
191
+ ?multiple=${this.multiple}
192
+ accept=${this.accept}
193
+ id=${this._controlId}
194
+ ?required=${this.required}
162
195
  ?disabled=${this.disabled}
163
- @click=${this.handleClick}
164
- >
165
- <label for=${this.inputId} class="file-upload-label"><slot></slot></label>
166
- </sgds-button>
167
- ${this._renderHintText()}
168
- <ul class="sgds fileupload-list">
196
+ />
197
+ <div class="file-upload-container">
198
+ ${this._renderLabel()}
199
+ <sgds-button variant="outline" ?disabled=${this.disabled} @click=${this._handleClick}>
200
+ <label for=${this._controlId}><slot></slot></label>
201
+ <svg
202
+ slot="rightIcon"
203
+ xmlns="http://www.w3.org/2000/svg"
204
+ width="24"
205
+ height="24"
206
+ viewBox="0 0 24 24"
207
+ fill="none"
208
+ >
209
+ <path
210
+ d="M3.5625 14.1943C3.71168 14.1943 3.85476 14.2535 3.96025 14.359C4.06574 14.4645 4.125 14.6076 4.125 14.7568V17.5693C4.125 17.8677 4.24353 18.1538 4.4545 18.3648C4.66548 18.5758 4.95163 18.6943 5.25 18.6943H18.75C19.0484 18.6943 19.3345 18.5758 19.5455 18.3648C19.7565 18.1538 19.875 17.8677 19.875 17.5693V14.7568C19.875 14.6076 19.9343 14.4645 20.0398 14.359C20.1452 14.2535 20.2883 14.1943 20.4375 14.1943C20.5867 14.1943 20.7298 14.2535 20.8352 14.359C20.9407 14.4645 21 14.6076 21 14.7568V17.5693C21 18.166 20.7629 18.7383 20.341 19.1603C19.919 19.5822 19.3467 19.8193 18.75 19.8193H5.25C4.65326 19.8193 4.08097 19.5822 3.65901 19.1603C3.23705 18.7383 3 18.166 3 17.5693V14.7568C3 14.6076 3.05926 14.4645 3.16475 14.359C3.27024 14.2535 3.41332 14.1943 3.5625 14.1943Z"
211
+ fill="currentColor"
212
+ />
213
+ <path
214
+ d="M11.6018 4.34604C11.654 4.29366 11.7161 4.2521 11.7844 4.22374C11.8528 4.19538 11.926 4.18079 12 4.18079C12.074 4.18079 12.1473 4.19538 12.2156 4.22374C12.2839 4.2521 12.346 4.29366 12.3983 4.34604L15.7733 7.72104C15.8789 7.82666 15.9382 7.96992 15.9382 8.11929C15.9382 8.26866 15.8789 8.41192 15.7733 8.51754C15.6676 8.62316 15.5244 8.6825 15.375 8.6825C15.2256 8.6825 15.0824 8.62316 14.9768 8.51754L12.5625 6.10217V15.9943C12.5625 16.1435 12.5032 16.2866 12.3978 16.392C12.2923 16.4975 12.1492 16.5568 12 16.5568C11.8508 16.5568 11.7077 16.4975 11.6023 16.392C11.4968 16.2866 11.4375 16.1435 11.4375 15.9943V6.10217L9.02326 8.51754C8.97096 8.56984 8.90887 8.61133 8.84054 8.63963C8.77221 8.66793 8.69897 8.6825 8.62501 8.6825C8.55105 8.6825 8.47781 8.66793 8.40948 8.63963C8.34114 8.61133 8.27906 8.56984 8.22676 8.51754C8.17446 8.46524 8.13297 8.40316 8.10467 8.33482C8.07636 8.26649 8.0618 8.19325 8.0618 8.11929C8.0618 8.04533 8.07636 7.97209 8.10467 7.90376C8.13297 7.83543 8.17446 7.77334 8.22676 7.72104L11.6018 4.34604Z"
215
+ fill="currentColor"
216
+ />
217
+ </svg>
218
+ </sgds-button>
219
+ ${this.hasFeedback && this.invalid ? this._renderFeedback() : this._renderHintText()}
220
+ </div>
221
+ <ul class="file-upload-list">
169
222
  ${listItems}
170
223
  </ul>
171
224
  </div>
172
225
  `;
173
226
  }
174
227
  }
175
- SgdsFileUpload.styles = [...SgdsElement.styles, css_248z, css_248z$1, css_248z$2];
176
- __decorate([
177
- property({ reflect: true })
178
- ], SgdsFileUpload.prototype, "variant", void 0);
179
- __decorate([
180
- property({ type: Boolean, reflect: true })
181
- ], SgdsFileUpload.prototype, "disabled", void 0);
228
+ SgdsFileUpload.styles = [...FormControlElement.styles, css_248z];
182
229
  __decorate([
183
230
  property({ type: Boolean, reflect: true })
184
231
  ], SgdsFileUpload.prototype, "multiple", void 0);
@@ -186,23 +233,20 @@ __decorate([
186
233
  property({ type: String, reflect: true })
187
234
  ], SgdsFileUpload.prototype, "accept", void 0);
188
235
  __decorate([
189
- property({ reflect: true })
190
- ], SgdsFileUpload.prototype, "size", void 0);
191
- __decorate([
192
- property({ type: String })
193
- ], SgdsFileUpload.prototype, "checkedIcon", void 0);
194
- __decorate([
195
- property({ type: String })
196
- ], SgdsFileUpload.prototype, "cancelIcon", void 0);
236
+ property({ type: Boolean, reflect: true })
237
+ ], SgdsFileUpload.prototype, "hasFeedback", void 0);
197
238
  __decorate([
198
- property({ reflect: true })
199
- ], SgdsFileUpload.prototype, "hintText", void 0);
239
+ property({ type: String, reflect: true })
240
+ ], SgdsFileUpload.prototype, "invalidFeedback", void 0);
200
241
  __decorate([
201
- property({ type: Object, state: true })
202
- ], SgdsFileUpload.prototype, "files", void 0);
242
+ property({ type: Boolean, reflect: true })
243
+ ], SgdsFileUpload.prototype, "required", void 0);
203
244
  __decorate([
204
- property({ type: Array })
245
+ state()
205
246
  ], SgdsFileUpload.prototype, "selectedFiles", void 0);
247
+ __decorate([
248
+ watch("disabled", { waitUntilFirstUpdate: true })
249
+ ], SgdsFileUpload.prototype, "_handleDisabledChange", null);
206
250
 
207
251
  export { SgdsFileUpload, SgdsFileUpload as default };
208
252
  //# sourceMappingURL=sgds-file-upload.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sgds-file-upload.js","sources":["../../../../src/components/FileUpload/sgds-file-upload.ts"],"sourcesContent":["import { ScopedElementsMixin } from \"@open-wc/scoped-elements\";\nimport { html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { createRef, ref } from \"lit/directives/ref.js\";\nimport { unsafeSVG } from \"lit/directives/unsafe-svg.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport { SgdsButton, type ButtonVariant } from \"../Button/sgds-button\";\nimport fileUploadStyle from \"./file-upload.css\";\nimport genId from \"../../utils/generateId\";\nimport svgStyles from \"../../styles/svg.css\";\nimport formHintStyles from \"../../styles/form-hint.css\";\nexport type FileUploadButtonVariant =\n | \"primary\"\n | \"secondary\"\n | \"success\"\n | \"danger\"\n | \"warning\"\n | \"info\"\n | \"light\"\n | \"dark\"\n | \"link\"\n | \"outline-primary\"\n | \"outline-secondary\"\n | \"outline-success\"\n | \"outline-danger\"\n | \"outline-warning\"\n | \"outline-info\"\n | \"outline-light\"\n | \"outline-dark\";\n\n/**\n * @summary Allows users to upload files of various sizes and formats\n * @slot default - Label for file upload button\n *\n * @event sgds-files-selected - Emitted when files are selected for uploading\n *\n * @cssproperty --file-upload-file-icon-color - Left icon color\n * @cssproperty --file-upload-remove-icon-color - Remove icon color\n * @cssproperty --file-upload-remove-icon-hover-color - Remove icon hover color\n */\n\nexport class SgdsFileUpload extends ScopedElementsMixin(SgdsElement) {\n static styles = [...SgdsElement.styles, svgStyles, formHintStyles, fileUploadStyle];\n /**@internal */\n static get scopedElements() {\n return {\n \"sgds-button\": SgdsButton\n };\n }\n /** The button's variant. */\n @property({ reflect: true }) variant: FileUploadButtonVariant = \"primary\";\n\n //** Disable the fileuploader button */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /** Allows multiple files to be listed for uploading */\n @property({ type: Boolean, reflect: true })\n multiple = false;\n\n /** Specify the acceptable file type */\n @property({ type: String, reflect: true })\n accept = \"\";\n\n /** Specifies a large or small button */\n @property({ reflect: true }) size: \"sm\" | \"lg\";\n\n /** Customize the check icon with SVG */\n @property({ type: String })\n checkedIcon = \"\";\n\n /** Customize the cancel icon with SVG */\n @property({ type: String })\n cancelIcon = \"\";\n\n /** The input's hint text below the label */\n @property({ reflect: true }) hintText = \"\";\n\n /** @internal */\n @property({ type: Object, state: true })\n private files: FileList | undefined;\n\n /** @internal */\n @property({ type: Array })\n private selectedFiles: File[] = [];\n\n private _setFileList(files: FileList) {\n this.files = files;\n this.emit(\"sgds-files-selected\");\n //Possible to pass in the files\n }\n\n // Create a ref to the input element\n /** @internal */\n private inputRef = createRef<HTMLInputElement>();\n\n /** @internal */\n private handleClick(event: Event) {\n event.preventDefault();\n if (!this.disabled) {\n // Get a reference to the input element using the inputRef\n const inputElement = this.inputRef.value;\n // Do something with the input element\n inputElement.click();\n }\n }\n\n /** @internal */\n private handleInputChange(event: Event) {\n const inputElement = event.target as HTMLInputElement;\n const files = inputElement.files as FileList;\n\n if (files.length > 0) {\n this.selectedFiles = Array.from(files);\n }\n // Trigger a re-render of the component to update the list of selected files\n this._setFileList(files);\n this.requestUpdate();\n }\n\n private _removeFileHandler(index: number) {\n const inputElement = this.inputRef.value;\n const attachments = inputElement.files;\n\n const fileBuffer = new DataTransfer();\n for (let i = 0; i < attachments.length; i++) {\n if (index !== i) fileBuffer.items.add(attachments[i]);\n }\n\n // Assign buffer to file input\n inputElement.files = fileBuffer.files;\n // Re-populate selected files to the lists\n this._setFileList(fileBuffer.files);\n this.selectedFiles = Array.from(fileBuffer.files);\n\n // Trigger a re-render of the component to update the list of selected files\n this.requestUpdate();\n }\n\n /**@internal */\n protected inputId: string = genId(\"input\", \"file\");\n\n protected _renderHintText() {\n const hintTextTemplate = html` <small id=\"${this.inputId}Help\" class=\"form-text\">${this.hintText}</small> `;\n return this.hintText && hintTextTemplate;\n }\n\n private _sanitizeVariant(variant: FileUploadButtonVariant) {\n return variant.replace(\"outline-\", \"\") as ButtonVariant;\n }\n render() {\n const getCheckedIcon = (checkedIcon: string) => {\n if (checkedIcon) {\n return html`${unsafeSVG(checkedIcon)}`;\n }\n return html` <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-check-lg\"\n viewBox=\"0 0 16 16\"\n >\n <path\n d=\"M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022Z\"\n />\n </svg>`;\n };\n\n const getCancelIcon = (cancelIcon: string) => {\n if (cancelIcon) {\n return html`${unsafeSVG(cancelIcon)}`;\n }\n return html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-x-circle\"\n viewBox=\"0 0 16 16\"\n >\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\" />\n <path\n d=\"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\"\n />\n </svg>`;\n };\n\n const listItems = this.selectedFiles.map(\n (file, index) => html`\n <li key=${index} class=\"fileupload-list-item\">\n <span>${getCheckedIcon(this.checkedIcon)}</span>\n <span class=\"filename\">${file.name}</span>\n <span @click=${() => this._removeFileHandler(index)}>${getCancelIcon(this.cancelIcon)}</span>\n </li>\n `\n );\n\n return html`\n <input\n ${ref(this.inputRef)}\n type=\"file\"\n @change=${this.handleInputChange}\n ?multiple=${this.multiple}\n accept=${this.accept}\n id=${this.inputId}\n />\n <div class=\"fileupload-container\">\n <sgds-button\n size=${this.size}\n variant=${this._sanitizeVariant(this.variant)}\n ?outlined=${this.variant.includes(\"outline\")}\n ?disabled=${this.disabled}\n @click=${this.handleClick}\n >\n <label for=${this.inputId} class=\"file-upload-label\"><slot></slot></label>\n </sgds-button>\n ${this._renderHintText()}\n <ul class=\"sgds fileupload-list\">\n ${listItems}\n </ul>\n </div>\n `;\n }\n}\n\nexport default SgdsFileUpload;\n"],"names":["svgStyles","formHintStyles","fileUploadStyle"],"mappings":";;;;;;;;;;;;;;AA8BA;;;;;;;;;AASG;MAEU,cAAe,SAAQ,mBAAmB,CAAC,WAAW,CAAC,CAAA;AAApE,IAAA,WAAA,GAAA;;;QAS+B,IAAO,CAAA,OAAA,GAA4B,SAAS,CAAC;;QAI1E,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAIjB,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAIjB,IAAM,CAAA,MAAA,GAAG,EAAE,CAAC;;QAOZ,IAAW,CAAA,WAAA,GAAG,EAAE,CAAC;;QAIjB,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;;QAGa,IAAQ,CAAA,QAAA,GAAG,EAAE,CAAC;;QAQnC,IAAa,CAAA,aAAA,GAAW,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,IAAI,EAAE,CAAC;AAAe,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAInC,UAAA,CAAA;IADP,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACJ,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAI5B,UAAA,CAAA;AADP,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACS,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,eAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"sgds-file-upload.js","sources":["../../../../src/components/FileUpload/sgds-file-upload.ts"],"sourcesContent":["import { ScopedElementsMixin } from \"@open-wc/scoped-elements\";\nimport { html } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { createRef, ref } from \"lit/directives/ref.js\";\nimport SgdsCloseButton from \"../../internals/CloseButton/sgds-close-button\";\nimport { SgdsButton } from \"../Button/sgds-button\";\nimport fileUploadStyles from \"./file-upload.css\";\n\nimport FormControlElement from \"../../base/form-control-element\";\nimport { SgdsFormValidatorMixin } from \"../../utils/validatorMixin\";\nimport { watch } from \"../../utils/watch\";\n\n/**\n * @summary Allows users to upload files of various sizes and formats\n * @slot default - Label for file upload button\n *\n * @event sgds-files-selected - Emitted when files are selected for uploading. Access the selected files with event.target.detail\n */\n\nexport class SgdsFileUpload extends SgdsFormValidatorMixin(ScopedElementsMixin(FormControlElement)) {\n static styles = [...FormControlElement.styles, fileUploadStyles];\n /**@internal */\n static get scopedElements() {\n return {\n \"sgds-button\": SgdsButton,\n \"sgds-close-button\": SgdsCloseButton\n };\n }\n\n /** Allows multiple files to be listed for uploading */\n @property({ type: Boolean, reflect: true }) multiple = false;\n\n /** Specify the acceptable file type */\n @property({ type: String, reflect: true }) accept = \"\";\n\n // /** Customize the check icon with SVG */\n // @property({ type: String }) checkedIcon = \"\";\n\n /** Allows invalidFeedback, invalid and valid styles to be visible with the input */\n @property({ type: Boolean, reflect: true }) hasFeedback = false;\n\n /**Feedback text for error state when validated */\n @property({ type: String, reflect: true }) invalidFeedback: string;\n\n /** Makes the input as a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n @state()\n private selectedFiles: File[] = [];\n\n /**\n * Checks for validity. Under the hood, HTMLFormElement's reportValidity method calls this method to check for component's validity state\n * Note that the native error popup is prevented for SGDS form components by default. Instead the validation message shows up in the feedback container of SgdsInput\n */\n public reportValidity(): boolean {\n return this._mixinReportValidity();\n }\n /**\n * Checks for validity without any native error popup message\n */\n public checkValidity(): boolean {\n return this._mixinCheckValidity();\n }\n /**\n * Returns the ValidityState object\n */\n public get validity(): ValidityState {\n return this._mixinGetValidity();\n }\n /**\n * Returns the validation message based on the ValidityState\n */\n public get validationMessage(): string {\n return this._mixinGetValidationMessage();\n }\n /**\n * Returns files selected for upload\n */\n public get files(): File[] {\n return this.selectedFiles;\n }\n\n private _setFileList(files: FileList) {\n this.emit(\"sgds-files-selected\", { detail: files });\n }\n\n private inputRef = createRef<HTMLInputElement>();\n\n private _handleClick(event: Event) {\n event.preventDefault();\n if (!this.disabled) {\n // Get a reference to the input element using the inputRef\n const inputElement = this.inputRef.value;\n // Do something with the input element\n inputElement.click();\n }\n }\n\n private _handleChange(event: Event) {\n const inputElement = event.target as HTMLInputElement;\n const files = inputElement.files as FileList;\n\n if (files.length > 0) {\n this.selectedFiles = Array.from(files);\n }\n // Trigger a re-render of the component to update the list of selected files\n this._setFileList(files);\n this.requestUpdate();\n super._mixinHandleChange(event);\n }\n\n private _removeFileHandler(index: number) {\n const inputElement = this.inputRef.value;\n const attachments = inputElement.files;\n\n const fileBuffer = new DataTransfer();\n for (let i = 0; i < attachments.length; i++) {\n if (index !== i) fileBuffer.items.add(attachments[i]);\n }\n\n // Assign buffer to file input\n inputElement.files = fileBuffer.files;\n // Re-populate selected files to the lists\n this._setFileList(fileBuffer.files);\n this.selectedFiles = Array.from(fileBuffer.files);\n\n // Trigger a re-render of the component to update the list of selected files\n this.requestUpdate();\n this._mixinValidate(this.input);\n }\n\n private _clearAllFiles() {\n const inputElement = this.inputRef.value;\n const fileBuffer = new DataTransfer();\n inputElement.files = fileBuffer.files;\n this._setFileList(fileBuffer.files);\n this.selectedFiles = Array.from(fileBuffer.files);\n }\n\n /**\n * fileupload requries a custom _mixinResetFormControl for clearing files\n */\n private _mixinResetFormControl() {\n this._clearAllFiles();\n this._mixinResetValidity(this.input);\n }\n @watch(\"disabled\", { waitUntilFirstUpdate: true })\n _handleDisabledChange() {\n // Disabled form controls are always valid, so we need to recheck validity when the state changes\n this.setInvalid(false);\n }\n protected _renderLabel() {\n const labelTemplate = html`\n <label for=${this._controlId} id=${this._labelId} class=\"form-label\"> ${this.label} </label>\n `;\n return this.label && labelTemplate;\n }\n\n protected _renderHintText() {\n const hintTextTemplate = html` <div id=\"${this._controlId}Help\" class=\"form-text\">${this.hintText}</div> `;\n return this.hintText && hintTextTemplate;\n }\n\n protected _renderFeedback() {\n return html`\n <div class=\"invalid-feedback-container\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10ZM10 6.25C9.49805 6.25 9.10584 6.68339 9.15578 7.18285L9.48461 10.4711C9.51109 10.7359 9.7339 10.9375 10 10.9375C10.2661 10.9375 10.4889 10.7359 10.5154 10.4711L10.8442 7.18285C10.8942 6.68339 10.5019 6.25 10 6.25ZM10.0014 11.875C9.48368 11.875 9.06394 12.2947 9.06394 12.8125C9.06394 13.3303 9.48368 13.75 10.0014 13.75C10.5192 13.75 10.9389 13.3303 10.9389 12.8125C10.9389 12.2947 10.5192 11.875 10.0014 11.875Z\"\n fill=\"#B90000\"\n />\n </svg>\n <div id=\"${this._controlId}-invalid\" class=\"invalid-feedback\">\n ${this.invalidFeedback ? this.invalidFeedback : this.input.validationMessage}\n </div>\n </div>\n `;\n }\n render() {\n const getCheckedIcon = () => {\n // if (checkedIcon) {\n // return html`${unsafeSVG(checkedIcon)}`;\n // }\n return html` <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-check-lg\"\n viewBox=\"0 0 16 16\"\n >\n <path\n d=\"M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022Z\"\n />\n </svg>`;\n };\n\n const listItems = this.selectedFiles.map(\n (file, index) => html`\n <li key=${index} class=\"file-upload-list-item\">\n <span>${getCheckedIcon()}</span>\n <span class=\"filename\">${file.name}</span>\n <sgds-close-button\n aria-label=\"remove the file\"\n @click=${() => this._removeFileHandler(index)}\n ></sgds-close-button>\n </li>\n `\n );\n\n return html`\n <div class=\"file-upload\">\n <input\n ${ref(this.inputRef)}\n type=\"file\"\n @change=${this._handleChange}\n ?multiple=${this.multiple}\n accept=${this.accept}\n id=${this._controlId}\n ?required=${this.required}\n ?disabled=${this.disabled}\n />\n <div class=\"file-upload-container\">\n ${this._renderLabel()}\n <sgds-button variant=\"outline\" ?disabled=${this.disabled} @click=${this._handleClick}>\n <label for=${this._controlId}><slot></slot></label>\n <svg\n slot=\"rightIcon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n d=\"M3.5625 14.1943C3.71168 14.1943 3.85476 14.2535 3.96025 14.359C4.06574 14.4645 4.125 14.6076 4.125 14.7568V17.5693C4.125 17.8677 4.24353 18.1538 4.4545 18.3648C4.66548 18.5758 4.95163 18.6943 5.25 18.6943H18.75C19.0484 18.6943 19.3345 18.5758 19.5455 18.3648C19.7565 18.1538 19.875 17.8677 19.875 17.5693V14.7568C19.875 14.6076 19.9343 14.4645 20.0398 14.359C20.1452 14.2535 20.2883 14.1943 20.4375 14.1943C20.5867 14.1943 20.7298 14.2535 20.8352 14.359C20.9407 14.4645 21 14.6076 21 14.7568V17.5693C21 18.166 20.7629 18.7383 20.341 19.1603C19.919 19.5822 19.3467 19.8193 18.75 19.8193H5.25C4.65326 19.8193 4.08097 19.5822 3.65901 19.1603C3.23705 18.7383 3 18.166 3 17.5693V14.7568C3 14.6076 3.05926 14.4645 3.16475 14.359C3.27024 14.2535 3.41332 14.1943 3.5625 14.1943Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M11.6018 4.34604C11.654 4.29366 11.7161 4.2521 11.7844 4.22374C11.8528 4.19538 11.926 4.18079 12 4.18079C12.074 4.18079 12.1473 4.19538 12.2156 4.22374C12.2839 4.2521 12.346 4.29366 12.3983 4.34604L15.7733 7.72104C15.8789 7.82666 15.9382 7.96992 15.9382 8.11929C15.9382 8.26866 15.8789 8.41192 15.7733 8.51754C15.6676 8.62316 15.5244 8.6825 15.375 8.6825C15.2256 8.6825 15.0824 8.62316 14.9768 8.51754L12.5625 6.10217V15.9943C12.5625 16.1435 12.5032 16.2866 12.3978 16.392C12.2923 16.4975 12.1492 16.5568 12 16.5568C11.8508 16.5568 11.7077 16.4975 11.6023 16.392C11.4968 16.2866 11.4375 16.1435 11.4375 15.9943V6.10217L9.02326 8.51754C8.97096 8.56984 8.90887 8.61133 8.84054 8.63963C8.77221 8.66793 8.69897 8.6825 8.62501 8.6825C8.55105 8.6825 8.47781 8.66793 8.40948 8.63963C8.34114 8.61133 8.27906 8.56984 8.22676 8.51754C8.17446 8.46524 8.13297 8.40316 8.10467 8.33482C8.07636 8.26649 8.0618 8.19325 8.0618 8.11929C8.0618 8.04533 8.07636 7.97209 8.10467 7.90376C8.13297 7.83543 8.17446 7.77334 8.22676 7.72104L11.6018 4.34604Z\"\n fill=\"currentColor\"\n />\n </svg>\n </sgds-button>\n ${this.hasFeedback && this.invalid ? this._renderFeedback() : this._renderHintText()}\n </div>\n <ul class=\"file-upload-list\">\n ${listItems}\n </ul>\n </div>\n `;\n }\n}\n\nexport default SgdsFileUpload;\n"],"names":["fileUploadStyles"],"mappings":";;;;;;;;;;;;;AAYA;;;;;AAKG;AAEG,MAAO,cAAe,SAAQ,sBAAsB,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC,CAAA;AAAnG,IAAA,WAAA,GAAA;;;QAW8C,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAGlB,IAAM,CAAA,MAAA,GAAG,EAAE,CAAC;;;;QAMX,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;;QAMpB,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;QAGrD,IAAa,CAAA,aAAA,GAAW,EAAE,CAAC;QAsC3B,IAAQ,CAAA,QAAA,GAAG,SAAS,EAAoB,CAAC;KAsKlD;;AAtOC,IAAA,WAAW,cAAc,GAAA;QACvB,OAAO;AACL,YAAA,aAAa,EAAE,UAAU;AACzB,YAAA,mBAAmB,EAAE,eAAe;SACrC,CAAC;KACH;AAuBD;;;AAGG;IACI,cAAc,GAAA;AACnB,QAAA,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC;KACpC;AACD;;AAEG;IACI,aAAa,GAAA;AAClB,QAAA,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;KACnC;AACD;;AAEG;AACH,IAAA,IAAW,QAAQ,GAAA;AACjB,QAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;KACjC;AACD;;AAEG;AACH,IAAA,IAAW,iBAAiB,GAAA;AAC1B,QAAA,OAAO,IAAI,CAAC,0BAA0B,EAAE,CAAC;KAC1C;AACD;;AAEG;AACH,IAAA,IAAW,KAAK,GAAA;QACd,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AAC;AAAkB,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGrD,UAAA,CAAA;AADP,IAAA,KAAK,EAAE;AAC2B,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,eAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAmGnC,UAAA,CAAA;IADC,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;AAIjD,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,uBAAA,EAAA,IAAA,CAAA;;;;"}
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var lit = require('lit');
7
+
8
+ var css_248z = lit.css`.footer-item{margin-bottom:var(--sgds-margin-3-xs)}.footer-item,.links{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}slot[name=title]::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none);--sgds-font-weight-regular:var(--sgds-font-weight-semibold);color:var(--sgds-default-color-inverse);font-weight:var(--sgds-font-weight-regular,--sgds-font-weight-semibold);margin:var(--sgds-paragraph-spacing-xl,--sgds-margin-none)}.links{margin:0;padding:0}.links slot::slotted(a){--sgds-link-color:var(--sgds-default-color-muted);color:var(--sgds-link-color,--sgds-default-color-muted);text-decoration:none!important;width:fit-content}.links slot::slotted(a:focus),.links slot::slotted(a:focus-visible),slot::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-default-color-inverse);color:var(--sgds-link-color-emphasis,--sgds-default-color-inverse)}.links slot::slotted(a:focus),.links slot::slotted(a:focus-visible){box-shadow:var(--sgds-box-shadow-focus);outline:0}`;
9
+
10
+ exports["default"] = css_248z;
11
+ //# sourceMappingURL=footer-item.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footer-item.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import { css } from 'lit';
3
+
4
+ var css_248z = css`.footer-item{margin-bottom:var(--sgds-margin-3-xs)}.footer-item,.links{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}slot[name=title]::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none);--sgds-font-weight-regular:var(--sgds-font-weight-semibold);color:var(--sgds-default-color-inverse);font-weight:var(--sgds-font-weight-regular,--sgds-font-weight-semibold);margin:var(--sgds-paragraph-spacing-xl,--sgds-margin-none)}.links{margin:0;padding:0}.links slot::slotted(a){--sgds-link-color:var(--sgds-default-color-muted);color:var(--sgds-link-color,--sgds-default-color-muted);text-decoration:none!important;width:fit-content}.links slot::slotted(a:focus),.links slot::slotted(a:focus-visible),slot::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-default-color-inverse);color:var(--sgds-link-color-emphasis,--sgds-default-color-inverse)}.links slot::slotted(a:focus),.links slot::slotted(a:focus-visible){box-shadow:var(--sgds-box-shadow-focus);outline:0}`;
5
+
6
+ export { css_248z as default };
7
+ //# sourceMappingURL=footer-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footer-item.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var lit = require('lit');
7
7
 
8
- var css_248z = lit.css`*,:after,:before{box-sizing:border-box}.sgds.footer .footer-header .title{color:var(--sgds-heading-color);font-size:calc(1.275rem + .3vw);font-weight:700;line-height:1.2;margin-bottom:.5rem;margin-top:0}@media (min-width:1200px){.sgds.footer .footer-header .title{font-size:1.5rem}}.sgds.footer .footer-header .title{line-height:1.33}.container-fluid{margin-left:auto;margin-right:auto;padding-left:var(--sgds-gutter-x,1.5rem);padding-right:var(--sgds-gutter-x,1.5rem);width:100%}.row{--sgds-gutter-x:1.5rem;--sgds-gutter-y:0;display:flex;flex-wrap:wrap;margin-left:calc(var(--sgds-gutter-x)*-.5);margin-right:calc(var(--sgds-gutter-x)*-.5);margin-top:calc(var(--sgds-gutter-y)*-1)}.row>*{flex-shrink:0;margin-top:var(--sgds-gutter-y);max-width:100%;padding-left:calc(var(--sgds-gutter-x)*.5);padding-right:calc(var(--sgds-gutter-x)*.5);width:100%}.col{flex:1 0 0%}@media (min-width:768px){.col-md-4{flex:0 0 auto;width:33.33333333%}}@media (min-width:1400px){.col-xxl-2{flex:0 0 auto;width:16.66666667%}}.sgds.footer .footer-contact-links ul,.sgds.footer .footer-items ul,.sgds.footer .footer-mandatory-links ul{margin:0;padding:0}.sgds.footer .footer-contact-links ul li,.sgds.footer .footer-items ul li,.sgds.footer .footer-mandatory-links ul li{font-size:1rem;line-height:1.5;list-style-type:none}.sgds.footer .footer-contact-links ul li+li,.sgds.footer .footer-items ul li+li,.sgds.footer .footer-mandatory-links ul li+li{margin-top:1rem}.sgds.footer .footer-contact-links ul li a,.sgds.footer .footer-items ul li a,.sgds.footer .footer-mandatory-links ul li a{color:#d0d5dd;text-decoration:none}.sgds.footer,.sgds.footer .footer-contact-links ul li a:hover,.sgds.footer .footer-items ul li a:hover,.sgds.footer .footer-mandatory-links ul li a:hover{color:#f7f7f7}.sgds.footer{height:auto}.sgds.footer .footer-top{background-color:#111;padding:3rem 0 1.5rem}.sgds.footer .footer-header{margin-bottom:1.5rem}.sgds.footer .footer-header .title{margin-bottom:1rem}.sgds.footer .footer-header .description{color:#d0d5dd}@media (max-width:575.98px){.sgds.footer .footer-items>div[class*=col]+div[class*=col]{margin-top:2rem}}.sgds.footer .footer-items .title{font-weight:700}.sgds.footer .footer-items .links{margin-top:1rem}.sgds.footer .footer-contact-links{margin-top:2rem}@media (min-width:992px){.sgds.footer .footer-contact-links ul li{display:inline-block}.sgds.footer .footer-contact-links ul li+li{margin-left:1rem}}.sgds.footer .footer-bottom{background-color:#111;padding:1.5rem 0}@media (min-width:992px){.sgds.footer .footer-mandatory-links ul li{display:inline-block}.sgds.footer .footer-mandatory-links ul li+li{margin-left:1rem}}@media (max-width:991.98px){.sgds.footer .footer-copyrights{margin-top:1rem}}.d-flex{display:flex!important}.text-end{text-align:right!important}@media (min-width:992px){.justify-content-lg-end{justify-content:flex-end!important}}`;
8
+ var css_248z = lit.css`.footer{container:footer/inline-size;height:auto}.footer-top{background-color:var(--sgds-default-bg-emphasis);border-bottom:var(--sgds-border-width-1) solid var(--sgds-default-border-color);gap:var(--sgds-gap-md);padding:var(--sgds-padding-xl) var(--sgds-padding-2-xl)}.footer-header,.footer-top{display:flex;flex-direction:column}.footer-header{gap:var(--sgds-gap-xs);margin:var(--sgds-margin-3-xs) 0}slot[name=title]::slotted(*){--sgds-header-color:var(--sgds-default-color-inverse);--sgds-font-size-6:var(--sgds-font-size-5);--sgds-margin-2-xs:var(--sgds-margin-none);--sgds-line-height-heading:var(--sgds-line-height-body);color:var(--sgds-header-color,--sgds-default-color-inverse);font-size:var(--sgds-font-size-6,--sgds-font-size-5);font-weight:var(--sgds-font-weight-bold);letter-spacing:var(--sgds-letter-spacing-tight);line-height:var(--sgds-line-height-heading,--sgds-line-height-body);margin-bottom:var(--sgds-margin-2-xs,--sgds-margin-none);margin-top:var(--sgds-margin-none)}slot[name=description]::slotted(*){--sgds-font-size-2:var(--sgds-font-size-3);--sgds-paragraph-spacing-xl:var(--sgds-margin-none);color:var(--sgds-default-color-muted);font-size:var(--sgds-font-size-2,--sgds-font-size-3);margin-bottom:var(--sgds-paragraph-spacing-xl,--sgds-margin-none);margin-top:var(--sgds-margin-none)}.footer-items{display:grid;gap:var(--sgds-gap-md) var(--sgds-gap-lg);grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}.footer ul{margin:0;padding:0}.footer ul li{list-style-type:none}.footer-mandatory-links ul li a{color:var(--sgds-default-color-muted);text-decoration:none}.footer-mandatory-links ul li a:focus,.footer-mandatory-links ul li a:hover{color:var(--sgds-default-color-inverse)}.footer-mandatory-links ul li a:focus,.footer-mandatory-links ul li a:focus-visible{box-shadow:var(--sgds-box-shadow-focus);outline:0}.footer-bottom{background-color:var(--sgds-default-bg-emphasis);display:flex;flex-direction:column;gap:var(--sgds-gap-md);padding:var(--sgds-padding-xl) var(--sgds-padding-2-xl)}.social-media{display:flex;gap:var(--sgds-gap-sm)}slot[name=social-media]::slotted(a){--sgds-link-color:light-dark(var(--sgds-gray-000),var(--sgds-gray-900));--sgds-body-color:light-dark(var(--sgds-gray-000),var(--sgds-gray-900));color:var(--sgds-body-color,--sgds-link-color);display:inline-flex}slot[name=social-media]::slotted(a:hover){--sgds-link-color-emphasis:light-dark(var(--sgds-gray-000),var(--sgds-gray-900));color:var(--sgds-link-color-emphasis)}slot[name=social-media]::slotted(a:focus),slot[name=social-media]::slotted(a:focus-visible){--sgds-link-color-emphasis:light-dark(var(--sgds-gray-000),var(--sgds-gray-900));box-shadow:var(--sgds-box-shadow-focus);color:var(--sgds-link-color-emphasis);outline:0}.footer-mandatory-links{display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xl) var(--sgds-gap-lg);justify-content:space-between}.footer-mandatory-links ul{display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs) var(--sgds-gap-xl)}.footer-copyrights{color:var(--sgds-default-color-muted)}@container footer (max-width: 711px){.footer-bottom,.footer-top{padding:var(--sgds-padding-lg)}.footer-top{gap:var(--sgds-gap-lg)}.footer-mandatory-links,.footer-mandatory-links ul{flex-direction:column}}`;
9
9
 
10
10
  exports["default"] = css_248z;
11
11
  //# sourceMappingURL=footer.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { css } from 'lit';
3
3
 
4
- var css_248z = css`*,:after,:before{box-sizing:border-box}.sgds.footer .footer-header .title{color:var(--sgds-heading-color);font-size:calc(1.275rem + .3vw);font-weight:700;line-height:1.2;margin-bottom:.5rem;margin-top:0}@media (min-width:1200px){.sgds.footer .footer-header .title{font-size:1.5rem}}.sgds.footer .footer-header .title{line-height:1.33}.container-fluid{margin-left:auto;margin-right:auto;padding-left:var(--sgds-gutter-x,1.5rem);padding-right:var(--sgds-gutter-x,1.5rem);width:100%}.row{--sgds-gutter-x:1.5rem;--sgds-gutter-y:0;display:flex;flex-wrap:wrap;margin-left:calc(var(--sgds-gutter-x)*-.5);margin-right:calc(var(--sgds-gutter-x)*-.5);margin-top:calc(var(--sgds-gutter-y)*-1)}.row>*{flex-shrink:0;margin-top:var(--sgds-gutter-y);max-width:100%;padding-left:calc(var(--sgds-gutter-x)*.5);padding-right:calc(var(--sgds-gutter-x)*.5);width:100%}.col{flex:1 0 0%}@media (min-width:768px){.col-md-4{flex:0 0 auto;width:33.33333333%}}@media (min-width:1400px){.col-xxl-2{flex:0 0 auto;width:16.66666667%}}.sgds.footer .footer-contact-links ul,.sgds.footer .footer-items ul,.sgds.footer .footer-mandatory-links ul{margin:0;padding:0}.sgds.footer .footer-contact-links ul li,.sgds.footer .footer-items ul li,.sgds.footer .footer-mandatory-links ul li{font-size:1rem;line-height:1.5;list-style-type:none}.sgds.footer .footer-contact-links ul li+li,.sgds.footer .footer-items ul li+li,.sgds.footer .footer-mandatory-links ul li+li{margin-top:1rem}.sgds.footer .footer-contact-links ul li a,.sgds.footer .footer-items ul li a,.sgds.footer .footer-mandatory-links ul li a{color:#d0d5dd;text-decoration:none}.sgds.footer,.sgds.footer .footer-contact-links ul li a:hover,.sgds.footer .footer-items ul li a:hover,.sgds.footer .footer-mandatory-links ul li a:hover{color:#f7f7f7}.sgds.footer{height:auto}.sgds.footer .footer-top{background-color:#111;padding:3rem 0 1.5rem}.sgds.footer .footer-header{margin-bottom:1.5rem}.sgds.footer .footer-header .title{margin-bottom:1rem}.sgds.footer .footer-header .description{color:#d0d5dd}@media (max-width:575.98px){.sgds.footer .footer-items>div[class*=col]+div[class*=col]{margin-top:2rem}}.sgds.footer .footer-items .title{font-weight:700}.sgds.footer .footer-items .links{margin-top:1rem}.sgds.footer .footer-contact-links{margin-top:2rem}@media (min-width:992px){.sgds.footer .footer-contact-links ul li{display:inline-block}.sgds.footer .footer-contact-links ul li+li{margin-left:1rem}}.sgds.footer .footer-bottom{background-color:#111;padding:1.5rem 0}@media (min-width:992px){.sgds.footer .footer-mandatory-links ul li{display:inline-block}.sgds.footer .footer-mandatory-links ul li+li{margin-left:1rem}}@media (max-width:991.98px){.sgds.footer .footer-copyrights{margin-top:1rem}}.d-flex{display:flex!important}.text-end{text-align:right!important}@media (min-width:992px){.justify-content-lg-end{justify-content:flex-end!important}}`;
4
+ var css_248z = css`.footer{container:footer/inline-size;height:auto}.footer-top{background-color:var(--sgds-default-bg-emphasis);border-bottom:var(--sgds-border-width-1) solid var(--sgds-default-border-color);gap:var(--sgds-gap-md);padding:var(--sgds-padding-xl) var(--sgds-padding-2-xl)}.footer-header,.footer-top{display:flex;flex-direction:column}.footer-header{gap:var(--sgds-gap-xs);margin:var(--sgds-margin-3-xs) 0}slot[name=title]::slotted(*){--sgds-header-color:var(--sgds-default-color-inverse);--sgds-font-size-6:var(--sgds-font-size-5);--sgds-margin-2-xs:var(--sgds-margin-none);--sgds-line-height-heading:var(--sgds-line-height-body);color:var(--sgds-header-color,--sgds-default-color-inverse);font-size:var(--sgds-font-size-6,--sgds-font-size-5);font-weight:var(--sgds-font-weight-bold);letter-spacing:var(--sgds-letter-spacing-tight);line-height:var(--sgds-line-height-heading,--sgds-line-height-body);margin-bottom:var(--sgds-margin-2-xs,--sgds-margin-none);margin-top:var(--sgds-margin-none)}slot[name=description]::slotted(*){--sgds-font-size-2:var(--sgds-font-size-3);--sgds-paragraph-spacing-xl:var(--sgds-margin-none);color:var(--sgds-default-color-muted);font-size:var(--sgds-font-size-2,--sgds-font-size-3);margin-bottom:var(--sgds-paragraph-spacing-xl,--sgds-margin-none);margin-top:var(--sgds-margin-none)}.footer-items{display:grid;gap:var(--sgds-gap-md) var(--sgds-gap-lg);grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}.footer ul{margin:0;padding:0}.footer ul li{list-style-type:none}.footer-mandatory-links ul li a{color:var(--sgds-default-color-muted);text-decoration:none}.footer-mandatory-links ul li a:focus,.footer-mandatory-links ul li a:hover{color:var(--sgds-default-color-inverse)}.footer-mandatory-links ul li a:focus,.footer-mandatory-links ul li a:focus-visible{box-shadow:var(--sgds-box-shadow-focus);outline:0}.footer-bottom{background-color:var(--sgds-default-bg-emphasis);display:flex;flex-direction:column;gap:var(--sgds-gap-md);padding:var(--sgds-padding-xl) var(--sgds-padding-2-xl)}.social-media{display:flex;gap:var(--sgds-gap-sm)}slot[name=social-media]::slotted(a){--sgds-link-color:light-dark(var(--sgds-gray-000),var(--sgds-gray-900));--sgds-body-color:light-dark(var(--sgds-gray-000),var(--sgds-gray-900));color:var(--sgds-body-color,--sgds-link-color);display:inline-flex}slot[name=social-media]::slotted(a:hover){--sgds-link-color-emphasis:light-dark(var(--sgds-gray-000),var(--sgds-gray-900));color:var(--sgds-link-color-emphasis)}slot[name=social-media]::slotted(a:focus),slot[name=social-media]::slotted(a:focus-visible){--sgds-link-color-emphasis:light-dark(var(--sgds-gray-000),var(--sgds-gray-900));box-shadow:var(--sgds-box-shadow-focus);color:var(--sgds-link-color-emphasis);outline:0}.footer-mandatory-links{display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xl) var(--sgds-gap-lg);justify-content:space-between}.footer-mandatory-links ul{display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs) var(--sgds-gap-xl)}.footer-copyrights{color:var(--sgds-default-color-muted)}@container footer (max-width: 711px){.footer-bottom,.footer-top{padding:var(--sgds-padding-lg)}.footer-top{gap:var(--sgds-gap-lg)}.footer-mandatory-links,.footer-mandatory-links ul{flex-direction:column}}`;
5
5
 
6
6
  export { css_248z as default };
7
7
  //# sourceMappingURL=footer.js.map
@@ -0,0 +1,33 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var lit = require('lit');
7
+ var sgdsElement = require('../../base/sgds-element.cjs.js');
8
+ var footerItem = require('./footer-item.cjs.js');
9
+
10
+ /**
11
+ * @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.
12
+ *
13
+ * @slot default - The slot for the list of link items
14
+ * @slot title - The slot for the title of the list of items
15
+ *
16
+ */
17
+ class SgdsFooterItem extends sgdsElement["default"] {
18
+ render() {
19
+ return lit.html `
20
+ <div class="footer-item">
21
+ <slot name="title"></slot>
22
+ <div class="links">
23
+ <slot></slot>
24
+ </div>
25
+ </div>
26
+ `;
27
+ }
28
+ }
29
+ SgdsFooterItem.styles = [...sgdsElement["default"].styles, footerItem["default"]];
30
+
31
+ exports.SgdsFooterItem = SgdsFooterItem;
32
+ exports["default"] = SgdsFooterItem;
33
+ //# sourceMappingURL=sgds-footer-item.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sgds-footer-item.cjs.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":["SgdsElement","html","footerLinkStyle"],"mappings":";;;;;;;;;AAIA;;;;;;AAMG;AACG,MAAO,cAAe,SAAQA,sBAAW,CAAA;IAG7C,MAAM,GAAA;AACJ,QAAA,OAAOC,QAAI,CAAA,CAAA;;;;;;;KAOV,CAAC;KACH;;AAXM,cAAM,CAAA,MAAA,GAAG,CAAC,GAAGD,sBAAW,CAAC,MAAM,EAAEE,qBAAe,CAAC;;;;;"}
@@ -0,0 +1,28 @@
1
+ 'use client';
2
+ import { html } from 'lit';
3
+ import SgdsElement from '../../base/sgds-element.js';
4
+ import css_248z from './footer-item.js';
5
+
6
+ /**
7
+ * @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.
8
+ *
9
+ * @slot default - The slot for the list of link items
10
+ * @slot title - The slot for the title of the list of items
11
+ *
12
+ */
13
+ class SgdsFooterItem extends SgdsElement {
14
+ render() {
15
+ return html `
16
+ <div class="footer-item">
17
+ <slot name="title"></slot>
18
+ <div class="links">
19
+ <slot></slot>
20
+ </div>
21
+ </div>
22
+ `;
23
+ }
24
+ }
25
+ SgdsFooterItem.styles = [...SgdsElement.styles, css_248z];
26
+
27
+ export { SgdsFooterItem, SgdsFooterItem as default };
28
+ //# 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;;;;"}