no-frills-ui 0.0.14-alpha.4 → 0.0.14-alpha.6

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 (323) hide show
  1. package/dist/index.js +2841 -2786
  2. package/dist/index.js.map +1 -1
  3. package/lib-esm/components/Accordion/Accordion.d.ts +0 -1
  4. package/lib-esm/components/Accordion/Accordion.js +26 -26
  5. package/lib-esm/components/Accordion/AccordionStep.d.ts +0 -1
  6. package/lib-esm/components/Accordion/AccordionStep.js +98 -114
  7. package/lib-esm/components/Accordion/index.d.ts +0 -1
  8. package/lib-esm/components/Badge/Badge.d.ts +0 -1
  9. package/lib-esm/components/Badge/Badge.js +37 -43
  10. package/lib-esm/components/Badge/index.d.ts +0 -1
  11. package/lib-esm/components/Button/ActionButton.d.ts +0 -1
  12. package/lib-esm/components/Button/ActionButton.js +6 -38
  13. package/lib-esm/components/Button/Button.d.ts +0 -1
  14. package/lib-esm/components/Button/Button.js +8 -43
  15. package/lib-esm/components/Button/IconButton.d.ts +0 -1
  16. package/lib-esm/components/Button/IconButton.js +6 -42
  17. package/lib-esm/components/Button/LinkButton.d.ts +0 -1
  18. package/lib-esm/components/Button/LinkButton.js +6 -33
  19. package/lib-esm/components/Button/RaisedButton.d.ts +0 -1
  20. package/lib-esm/components/Button/RaisedButton.js +6 -46
  21. package/lib-esm/components/Button/index.d.ts +0 -1
  22. package/lib-esm/components/Card/Card.d.ts +0 -1
  23. package/lib-esm/components/Card/Card.js +8 -13
  24. package/lib-esm/components/Card/index.d.ts +0 -1
  25. package/lib-esm/components/Chip/Chip.d.ts +0 -1
  26. package/lib-esm/components/Chip/Chip.js +35 -43
  27. package/lib-esm/components/Chip/index.d.ts +0 -1
  28. package/lib-esm/components/ChipInput/ChipInput.d.ts +0 -1
  29. package/lib-esm/components/ChipInput/ChipInput.js +107 -167
  30. package/lib-esm/components/ChipInput/index.d.ts +0 -1
  31. package/lib-esm/components/Dialog/AlertDialog.d.ts +0 -1
  32. package/lib-esm/components/Dialog/AlertDialog.js +47 -25
  33. package/lib-esm/components/Dialog/ConfirmDialog.d.ts +0 -1
  34. package/lib-esm/components/Dialog/ConfirmDialog.js +49 -31
  35. package/lib-esm/components/Dialog/Dialog.d.ts +27 -2
  36. package/lib-esm/components/Dialog/Dialog.js +120 -67
  37. package/lib-esm/components/Dialog/PromptDialog.d.ts +0 -1
  38. package/lib-esm/components/Dialog/PromptDialog.js +82 -44
  39. package/lib-esm/components/Dialog/index.d.ts +0 -1
  40. package/lib-esm/components/DragAndDrop/DragAndDrop.d.ts +0 -1
  41. package/lib-esm/components/DragAndDrop/DragAndDrop.js +66 -71
  42. package/lib-esm/components/DragAndDrop/DragItem.d.ts +0 -1
  43. package/lib-esm/components/DragAndDrop/DragItem.js +106 -118
  44. package/lib-esm/components/DragAndDrop/index.d.ts +0 -1
  45. package/lib-esm/components/DragAndDrop/types.d.ts +0 -1
  46. package/lib-esm/components/DragAndDrop/types.js +7 -5
  47. package/lib-esm/components/Drawer/Drawer.d.ts +76 -2
  48. package/lib-esm/components/Drawer/Drawer.js +176 -96
  49. package/lib-esm/components/Drawer/index.d.ts +0 -1
  50. package/lib-esm/components/Groups/Group.d.ts +0 -1
  51. package/lib-esm/components/Groups/Group.js +32 -88
  52. package/lib-esm/components/Groups/GroupLabel.d.ts +0 -1
  53. package/lib-esm/components/Groups/GroupLabel.js +7 -17
  54. package/lib-esm/components/Groups/index.d.ts +0 -1
  55. package/lib-esm/components/Input/Checkbox.d.ts +0 -1
  56. package/lib-esm/components/Input/Checkbox.js +39 -110
  57. package/lib-esm/components/Input/Dropdown.d.ts +8 -1
  58. package/lib-esm/components/Input/Dropdown.js +109 -49
  59. package/lib-esm/components/Input/Input.d.ts +0 -1
  60. package/lib-esm/components/Input/Input.js +61 -113
  61. package/lib-esm/components/Input/Radio.d.ts +0 -1
  62. package/lib-esm/components/Input/Radio.js +31 -76
  63. package/lib-esm/components/Input/RadioButton.d.ts +0 -1
  64. package/lib-esm/components/Input/RadioButton.js +30 -67
  65. package/lib-esm/components/Input/Select.d.ts +0 -1
  66. package/lib-esm/components/Input/Select.js +74 -126
  67. package/lib-esm/components/Input/TextArea.d.ts +0 -1
  68. package/lib-esm/components/Input/TextArea.js +60 -111
  69. package/lib-esm/components/Input/Toggle.d.ts +0 -1
  70. package/lib-esm/components/Input/Toggle.js +29 -77
  71. package/lib-esm/components/Input/index.d.ts +0 -1
  72. package/lib-esm/components/Menu/Menu.d.ts +13 -2
  73. package/lib-esm/components/Menu/Menu.js +107 -27
  74. package/lib-esm/components/Menu/MenuContext.d.ts +0 -1
  75. package/lib-esm/components/Menu/MenuContext.js +4 -2
  76. package/lib-esm/components/Menu/MenuItem.d.ts +6 -4
  77. package/lib-esm/components/Menu/MenuItem.js +36 -51
  78. package/lib-esm/components/Menu/index.d.ts +0 -1
  79. package/lib-esm/components/Modal/Modal.d.ts +70 -2
  80. package/lib-esm/components/Modal/Modal.js +149 -52
  81. package/lib-esm/components/Modal/index.d.ts +0 -1
  82. package/lib-esm/components/Notification/Notification.d.ts +3 -2
  83. package/lib-esm/components/Notification/Notification.js +54 -64
  84. package/lib-esm/components/Notification/NotificationManager.d.ts +15 -2
  85. package/lib-esm/components/Notification/NotificationManager.js +169 -77
  86. package/lib-esm/components/Notification/index.d.ts +0 -1
  87. package/lib-esm/components/Notification/style.d.ts +4 -1
  88. package/lib-esm/components/Notification/style.js +63 -142
  89. package/lib-esm/components/Notification/types.d.ts +2 -1
  90. package/lib-esm/components/Notification/types.js +8 -9
  91. package/lib-esm/components/Popover/Popover.d.ts +0 -1
  92. package/lib-esm/components/Popover/Popover.js +146 -111
  93. package/lib-esm/components/Popover/index.d.ts +0 -1
  94. package/lib-esm/components/Spinner/Spinner.d.ts +3 -1
  95. package/lib-esm/components/Spinner/Spinner.js +19 -24
  96. package/lib-esm/components/Spinner/index.d.ts +0 -1
  97. package/lib-esm/components/Stepper/Step.d.ts +0 -1
  98. package/lib-esm/components/Stepper/Step.js +15 -22
  99. package/lib-esm/components/Stepper/Stepper.d.ts +0 -1
  100. package/lib-esm/components/Stepper/Stepper.js +100 -102
  101. package/lib-esm/components/Stepper/index.d.ts +0 -1
  102. package/lib-esm/components/Tabs/Tab.d.ts +0 -1
  103. package/lib-esm/components/Tabs/Tab.js +11 -10
  104. package/lib-esm/components/Tabs/Tabs.d.ts +0 -1
  105. package/lib-esm/components/Tabs/Tabs.js +88 -50
  106. package/lib-esm/components/Tabs/index.d.ts +0 -1
  107. package/lib-esm/components/Toast/Toast.d.ts +30 -5
  108. package/lib-esm/components/Toast/Toast.js +196 -108
  109. package/lib-esm/components/Toast/ToastStory.d.ts +0 -1
  110. package/lib-esm/components/Toast/index.d.ts +0 -1
  111. package/lib-esm/components/Tooltip/Tooltip.d.ts +0 -1
  112. package/lib-esm/components/Tooltip/Tooltip.js +60 -61
  113. package/lib-esm/components/Tooltip/index.d.ts +0 -1
  114. package/lib-esm/components/index.d.ts +0 -1
  115. package/lib-esm/components/index.js +42 -21
  116. package/lib-esm/icons/CheckCircle.d.ts +0 -1
  117. package/lib-esm/icons/CheckCircle.js +21 -4
  118. package/lib-esm/icons/Close.d.ts +0 -1
  119. package/lib-esm/icons/Close.js +21 -4
  120. package/lib-esm/icons/DragIndicator.d.ts +0 -1
  121. package/lib-esm/icons/DragIndicator.js +21 -4
  122. package/lib-esm/icons/ErrorOutline.d.ts +0 -1
  123. package/lib-esm/icons/ErrorOutline.js +15 -4
  124. package/lib-esm/icons/ExpandMore.d.ts +0 -1
  125. package/lib-esm/icons/ExpandMore.js +21 -4
  126. package/lib-esm/icons/FiberManualRecord.d.ts +0 -1
  127. package/lib-esm/icons/FiberManualRecord.js +23 -4
  128. package/lib-esm/icons/Info.d.ts +0 -1
  129. package/lib-esm/icons/Info.js +21 -4
  130. package/lib-esm/icons/ReportProblem.d.ts +0 -1
  131. package/lib-esm/icons/ReportProblem.js +21 -4
  132. package/lib-esm/icons/index.d.ts +0 -1
  133. package/lib-esm/index.d.ts +0 -1
  134. package/lib-esm/shared/LayerManager.d.ts +3 -1
  135. package/lib-esm/shared/LayerManager.js +158 -87
  136. package/lib-esm/shared/constants.d.ts +58 -28
  137. package/lib-esm/shared/constants.js +61 -26
  138. package/lib-esm/shared/styles.d.ts +1 -2
  139. package/lib-esm/shared/styles.js +20 -24
  140. package/package.json +15 -5
  141. package/lib-esm/components/Accordion/Accordion.d.ts.map +0 -1
  142. package/lib-esm/components/Accordion/Accordion.js.map +0 -1
  143. package/lib-esm/components/Accordion/AccordionStep.d.ts.map +0 -1
  144. package/lib-esm/components/Accordion/AccordionStep.js.map +0 -1
  145. package/lib-esm/components/Accordion/index.d.ts.map +0 -1
  146. package/lib-esm/components/Accordion/index.js +0 -3
  147. package/lib-esm/components/Accordion/index.js.map +0 -1
  148. package/lib-esm/components/Badge/Badge.d.ts.map +0 -1
  149. package/lib-esm/components/Badge/Badge.js.map +0 -1
  150. package/lib-esm/components/Badge/index.d.ts.map +0 -1
  151. package/lib-esm/components/Badge/index.js +0 -2
  152. package/lib-esm/components/Badge/index.js.map +0 -1
  153. package/lib-esm/components/Button/ActionButton.d.ts.map +0 -1
  154. package/lib-esm/components/Button/ActionButton.js.map +0 -1
  155. package/lib-esm/components/Button/Button.d.ts.map +0 -1
  156. package/lib-esm/components/Button/Button.js.map +0 -1
  157. package/lib-esm/components/Button/IconButton.d.ts.map +0 -1
  158. package/lib-esm/components/Button/IconButton.js.map +0 -1
  159. package/lib-esm/components/Button/LinkButton.d.ts.map +0 -1
  160. package/lib-esm/components/Button/LinkButton.js.map +0 -1
  161. package/lib-esm/components/Button/RaisedButton.d.ts.map +0 -1
  162. package/lib-esm/components/Button/RaisedButton.js.map +0 -1
  163. package/lib-esm/components/Button/index.d.ts.map +0 -1
  164. package/lib-esm/components/Button/index.js +0 -6
  165. package/lib-esm/components/Button/index.js.map +0 -1
  166. package/lib-esm/components/Card/Card.d.ts.map +0 -1
  167. package/lib-esm/components/Card/Card.js.map +0 -1
  168. package/lib-esm/components/Card/index.d.ts.map +0 -1
  169. package/lib-esm/components/Card/index.js +0 -3
  170. package/lib-esm/components/Card/index.js.map +0 -1
  171. package/lib-esm/components/Chip/Chip.d.ts.map +0 -1
  172. package/lib-esm/components/Chip/Chip.js.map +0 -1
  173. package/lib-esm/components/Chip/index.d.ts.map +0 -1
  174. package/lib-esm/components/Chip/index.js +0 -2
  175. package/lib-esm/components/Chip/index.js.map +0 -1
  176. package/lib-esm/components/ChipInput/ChipInput.d.ts.map +0 -1
  177. package/lib-esm/components/ChipInput/ChipInput.js.map +0 -1
  178. package/lib-esm/components/ChipInput/index.d.ts.map +0 -1
  179. package/lib-esm/components/ChipInput/index.js +0 -2
  180. package/lib-esm/components/ChipInput/index.js.map +0 -1
  181. package/lib-esm/components/Dialog/AlertDialog.d.ts.map +0 -1
  182. package/lib-esm/components/Dialog/AlertDialog.js.map +0 -1
  183. package/lib-esm/components/Dialog/ConfirmDialog.d.ts.map +0 -1
  184. package/lib-esm/components/Dialog/ConfirmDialog.js.map +0 -1
  185. package/lib-esm/components/Dialog/Dialog.d.ts.map +0 -1
  186. package/lib-esm/components/Dialog/Dialog.js.map +0 -1
  187. package/lib-esm/components/Dialog/PromptDialog.d.ts.map +0 -1
  188. package/lib-esm/components/Dialog/PromptDialog.js.map +0 -1
  189. package/lib-esm/components/Dialog/index.d.ts.map +0 -1
  190. package/lib-esm/components/Dialog/index.js +0 -5
  191. package/lib-esm/components/Dialog/index.js.map +0 -1
  192. package/lib-esm/components/DragAndDrop/DragAndDrop.d.ts.map +0 -1
  193. package/lib-esm/components/DragAndDrop/DragAndDrop.js.map +0 -1
  194. package/lib-esm/components/DragAndDrop/DragItem.d.ts.map +0 -1
  195. package/lib-esm/components/DragAndDrop/DragItem.js.map +0 -1
  196. package/lib-esm/components/DragAndDrop/index.d.ts.map +0 -1
  197. package/lib-esm/components/DragAndDrop/index.js +0 -3
  198. package/lib-esm/components/DragAndDrop/index.js.map +0 -1
  199. package/lib-esm/components/DragAndDrop/types.d.ts.map +0 -1
  200. package/lib-esm/components/DragAndDrop/types.js.map +0 -1
  201. package/lib-esm/components/Drawer/Drawer.d.ts.map +0 -1
  202. package/lib-esm/components/Drawer/Drawer.js.map +0 -1
  203. package/lib-esm/components/Drawer/index.d.ts.map +0 -1
  204. package/lib-esm/components/Drawer/index.js +0 -2
  205. package/lib-esm/components/Drawer/index.js.map +0 -1
  206. package/lib-esm/components/Groups/Group.d.ts.map +0 -1
  207. package/lib-esm/components/Groups/Group.js.map +0 -1
  208. package/lib-esm/components/Groups/GroupLabel.d.ts.map +0 -1
  209. package/lib-esm/components/Groups/GroupLabel.js.map +0 -1
  210. package/lib-esm/components/Groups/index.d.ts.map +0 -1
  211. package/lib-esm/components/Groups/index.js +0 -3
  212. package/lib-esm/components/Groups/index.js.map +0 -1
  213. package/lib-esm/components/Input/Checkbox.d.ts.map +0 -1
  214. package/lib-esm/components/Input/Checkbox.js.map +0 -1
  215. package/lib-esm/components/Input/Dropdown.d.ts.map +0 -1
  216. package/lib-esm/components/Input/Dropdown.js.map +0 -1
  217. package/lib-esm/components/Input/Input.d.ts.map +0 -1
  218. package/lib-esm/components/Input/Input.js.map +0 -1
  219. package/lib-esm/components/Input/Radio.d.ts.map +0 -1
  220. package/lib-esm/components/Input/Radio.js.map +0 -1
  221. package/lib-esm/components/Input/RadioButton.d.ts.map +0 -1
  222. package/lib-esm/components/Input/RadioButton.js.map +0 -1
  223. package/lib-esm/components/Input/Select.d.ts.map +0 -1
  224. package/lib-esm/components/Input/Select.js.map +0 -1
  225. package/lib-esm/components/Input/TextArea.d.ts.map +0 -1
  226. package/lib-esm/components/Input/TextArea.js.map +0 -1
  227. package/lib-esm/components/Input/Toggle.d.ts.map +0 -1
  228. package/lib-esm/components/Input/Toggle.js.map +0 -1
  229. package/lib-esm/components/Input/index.d.ts.map +0 -1
  230. package/lib-esm/components/Input/index.js +0 -9
  231. package/lib-esm/components/Input/index.js.map +0 -1
  232. package/lib-esm/components/Menu/Menu.d.ts.map +0 -1
  233. package/lib-esm/components/Menu/Menu.js.map +0 -1
  234. package/lib-esm/components/Menu/MenuContext.d.ts.map +0 -1
  235. package/lib-esm/components/Menu/MenuContext.js.map +0 -1
  236. package/lib-esm/components/Menu/MenuItem.d.ts.map +0 -1
  237. package/lib-esm/components/Menu/MenuItem.js.map +0 -1
  238. package/lib-esm/components/Menu/index.d.ts.map +0 -1
  239. package/lib-esm/components/Menu/index.js +0 -3
  240. package/lib-esm/components/Menu/index.js.map +0 -1
  241. package/lib-esm/components/Modal/Modal.d.ts.map +0 -1
  242. package/lib-esm/components/Modal/Modal.js.map +0 -1
  243. package/lib-esm/components/Modal/index.d.ts.map +0 -1
  244. package/lib-esm/components/Modal/index.js +0 -2
  245. package/lib-esm/components/Modal/index.js.map +0 -1
  246. package/lib-esm/components/Notification/Notification.d.ts.map +0 -1
  247. package/lib-esm/components/Notification/Notification.js.map +0 -1
  248. package/lib-esm/components/Notification/NotificationManager.d.ts.map +0 -1
  249. package/lib-esm/components/Notification/NotificationManager.js.map +0 -1
  250. package/lib-esm/components/Notification/index.d.ts.map +0 -1
  251. package/lib-esm/components/Notification/index.js +0 -3
  252. package/lib-esm/components/Notification/index.js.map +0 -1
  253. package/lib-esm/components/Notification/style.d.ts.map +0 -1
  254. package/lib-esm/components/Notification/style.js.map +0 -1
  255. package/lib-esm/components/Notification/types.d.ts.map +0 -1
  256. package/lib-esm/components/Notification/types.js.map +0 -1
  257. package/lib-esm/components/Popover/Popover.d.ts.map +0 -1
  258. package/lib-esm/components/Popover/Popover.js.map +0 -1
  259. package/lib-esm/components/Popover/index.d.ts.map +0 -1
  260. package/lib-esm/components/Popover/index.js +0 -2
  261. package/lib-esm/components/Popover/index.js.map +0 -1
  262. package/lib-esm/components/Spinner/Spinner.d.ts.map +0 -1
  263. package/lib-esm/components/Spinner/Spinner.js.map +0 -1
  264. package/lib-esm/components/Spinner/index.d.ts.map +0 -1
  265. package/lib-esm/components/Spinner/index.js +0 -2
  266. package/lib-esm/components/Spinner/index.js.map +0 -1
  267. package/lib-esm/components/Stepper/Step.d.ts.map +0 -1
  268. package/lib-esm/components/Stepper/Step.js.map +0 -1
  269. package/lib-esm/components/Stepper/Stepper.d.ts.map +0 -1
  270. package/lib-esm/components/Stepper/Stepper.js.map +0 -1
  271. package/lib-esm/components/Stepper/index.d.ts.map +0 -1
  272. package/lib-esm/components/Stepper/index.js +0 -4
  273. package/lib-esm/components/Stepper/index.js.map +0 -1
  274. package/lib-esm/components/Tabs/Tab.d.ts.map +0 -1
  275. package/lib-esm/components/Tabs/Tab.js.map +0 -1
  276. package/lib-esm/components/Tabs/Tabs.d.ts.map +0 -1
  277. package/lib-esm/components/Tabs/Tabs.js.map +0 -1
  278. package/lib-esm/components/Tabs/index.d.ts.map +0 -1
  279. package/lib-esm/components/Tabs/index.js +0 -3
  280. package/lib-esm/components/Tabs/index.js.map +0 -1
  281. package/lib-esm/components/Toast/Toast.d.ts.map +0 -1
  282. package/lib-esm/components/Toast/Toast.js.map +0 -1
  283. package/lib-esm/components/Toast/ToastStory.d.ts.map +0 -1
  284. package/lib-esm/components/Toast/ToastStory.js +0 -35
  285. package/lib-esm/components/Toast/ToastStory.js.map +0 -1
  286. package/lib-esm/components/Toast/index.d.ts.map +0 -1
  287. package/lib-esm/components/Toast/index.js +0 -2
  288. package/lib-esm/components/Toast/index.js.map +0 -1
  289. package/lib-esm/components/Tooltip/Tooltip.d.ts.map +0 -1
  290. package/lib-esm/components/Tooltip/Tooltip.js.map +0 -1
  291. package/lib-esm/components/Tooltip/index.d.ts.map +0 -1
  292. package/lib-esm/components/Tooltip/index.js +0 -2
  293. package/lib-esm/components/Tooltip/index.js.map +0 -1
  294. package/lib-esm/components/index.d.ts.map +0 -1
  295. package/lib-esm/components/index.js.map +0 -1
  296. package/lib-esm/icons/CheckCircle.d.ts.map +0 -1
  297. package/lib-esm/icons/CheckCircle.js.map +0 -1
  298. package/lib-esm/icons/Close.d.ts.map +0 -1
  299. package/lib-esm/icons/Close.js.map +0 -1
  300. package/lib-esm/icons/DragIndicator.d.ts.map +0 -1
  301. package/lib-esm/icons/DragIndicator.js.map +0 -1
  302. package/lib-esm/icons/ErrorOutline.d.ts.map +0 -1
  303. package/lib-esm/icons/ErrorOutline.js.map +0 -1
  304. package/lib-esm/icons/ExpandMore.d.ts.map +0 -1
  305. package/lib-esm/icons/ExpandMore.js.map +0 -1
  306. package/lib-esm/icons/FiberManualRecord.d.ts.map +0 -1
  307. package/lib-esm/icons/FiberManualRecord.js.map +0 -1
  308. package/lib-esm/icons/Info.d.ts.map +0 -1
  309. package/lib-esm/icons/Info.js.map +0 -1
  310. package/lib-esm/icons/ReportProblem.d.ts.map +0 -1
  311. package/lib-esm/icons/ReportProblem.js.map +0 -1
  312. package/lib-esm/icons/index.d.ts.map +0 -1
  313. package/lib-esm/icons/index.js +0 -9
  314. package/lib-esm/icons/index.js.map +0 -1
  315. package/lib-esm/index.d.ts.map +0 -1
  316. package/lib-esm/index.js +0 -2
  317. package/lib-esm/index.js.map +0 -1
  318. package/lib-esm/shared/LayerManager.d.ts.map +0 -1
  319. package/lib-esm/shared/LayerManager.js.map +0 -1
  320. package/lib-esm/shared/constants.d.ts.map +0 -1
  321. package/lib-esm/shared/constants.js.map +0 -1
  322. package/lib-esm/shared/styles.d.ts.map +0 -1
  323. package/lib-esm/shared/styles.js.map +0 -1
@@ -1,51 +1,58 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from '@emotion/react/jsx-runtime';
13
2
  import React from 'react';
14
3
  import PropTypes from 'prop-types';
15
- import LayerManager, { LAYER_POSITION } from '../../shared/LayerManager';
16
- export { Header as ModalHeader, Body as ModalBody, Footer as ModalFooter, } from '../../shared/styles';
17
- import { DialogContainer as ModalContainer } from '../Dialog/Dialog';
4
+ import LayerManager, { LAYER_POSITION } from '../../shared/LayerManager.js';
5
+ import { DialogContainer } from '../Dialog/Dialog.js';
6
+
7
+ const modalPropTypes = {
8
+ /** Opens the modal */ open: PropTypes.bool.isRequired,
9
+ /** Closes the modal on esc */ closeOnEsc: PropTypes.bool,
10
+ /** Closes the modal on overlay click */ closeOnOverlayClick: PropTypes.bool,
11
+ /** Call back function called when the modal closes. */ onClose: PropTypes.func
12
+ };
18
13
  class Modal extends React.Component {
19
- constructor() {
20
- super(...arguments);
21
- this.state = {
22
- open: false,
23
- };
24
- this.onClose = () => {
25
- var _a, _b;
26
- this.setState({
27
- open: false,
28
- });
29
- (_b = (_a = this.props).onClose) === null || _b === void 0 ? void 0 : _b.call(_a);
30
- this.closeCallback = null;
31
- this.layer = null;
32
- };
33
- }
34
- static getDerivedStateFromProps(props) {
14
+ /**
15
+ * Syncs state with props.
16
+ */ static getDerivedStateFromProps(props) {
35
17
  if (props.open) {
36
18
  return {
37
- open: true,
19
+ open: true
38
20
  };
39
21
  }
40
22
  return null;
41
23
  }
42
- getSnapshotBeforeUpdate(prevProps) {
43
- var _a;
44
- const _b = this.props, { open, closeOnEsc, closeOnOverlayClick, children } = _b, rest = __rest(_b, ["open", "closeOnEsc", "closeOnOverlayClick", "children"]);
24
+ /**
25
+ * Lifecycle method to save the currently focused element when the modal mounts while open.
26
+ */ componentDidMount() {
27
+ if (this.props.open) {
28
+ this.lastFocusedElement = document.activeElement;
29
+ }
30
+ }
31
+ /**
32
+ * Lifecycle method to restore focus when the modal unmounts.
33
+ */ componentWillUnmount() {
34
+ if (this.props.open) {
35
+ this.restoreFocus();
36
+ }
37
+ // Clean up layer references
38
+ if (this.closeCallback) {
39
+ this.closeCallback();
40
+ this.closeCallback = null;
41
+ }
42
+ this.layer = null;
43
+ }
44
+ /**
45
+ * Lifecycle method to handle Modal updates.
46
+ * Manages opening/closing logic via LayerManager and focus preservation.
47
+ */ getSnapshotBeforeUpdate(prevProps) {
48
+ const { open, closeOnEsc, closeOnOverlayClick, children, ...rest } = this.props;
45
49
  if (prevProps.open && !open) {
46
- (_a = this.closeCallback) === null || _a === void 0 ? void 0 : _a.call(this);
50
+ this.closeCallback?.();
51
+ this.restoreFocus();
47
52
  }
48
53
  if (!prevProps.open && open) {
54
+ // Save current focus
55
+ this.lastFocusedElement = document.activeElement;
49
56
  this.layer = LayerManager.renderLayer({
50
57
  overlay: true,
51
58
  exitDelay: 300,
@@ -53,33 +60,123 @@ class Modal extends React.Component {
53
60
  closeCallback: this.onClose,
54
61
  closeOnEsc: closeOnEsc,
55
62
  closeOnOverlayClick: closeOnOverlayClick,
56
- component: (_jsx(ModalContainer, Object.assign({}, rest, { onClick: (e) => e.stopPropagation(), elevated: true, children: children }))),
63
+ component: /*#__PURE__*/ jsx(DialogContainer, {
64
+ ...rest,
65
+ ref: this.setModalRef,
66
+ role: "dialog",
67
+ "aria-modal": "true",
68
+ tabIndex: -1,
69
+ onKeyDown: this.handleKeyDown,
70
+ onClick: (e)=>e.stopPropagation(),
71
+ elevated: true,
72
+ children: children
73
+ })
57
74
  });
58
75
  this.closeCallback = this.layer[1];
59
76
  this.forceUpdate();
60
77
  }
61
78
  }
62
- render() {
79
+ /**
80
+ * Renders the Modal component via the LayerManager portal.
81
+ */ render() {
63
82
  if (this.state.open && this.layer) {
64
83
  const [Component] = this.layer;
65
- return _jsx(Component, {});
84
+ return /*#__PURE__*/ jsx(Component, {});
66
85
  }
67
86
  return null;
68
87
  }
88
+ constructor(...args){
89
+ super(...args), this.state = {
90
+ open: false
91
+ }, /**
92
+ * Internal close handler.
93
+ * Restores focus and calls the external onClose callback.
94
+ */ this.onClose = ()=>{
95
+ this.restoreFocus();
96
+ this.setState({
97
+ open: false
98
+ });
99
+ this.props.onClose?.();
100
+ this.closeCallback = null;
101
+ this.layer = null;
102
+ }, this.lastFocusedElement = null, this.modalRef = /*#__PURE__*/ React.createRef(), /**
103
+ * Retrieves all focusable elements within the modal.
104
+ */ this.getFocusableElements = ()=>{
105
+ if (!this.modalRef.current) return [];
106
+ return Array.from(this.modalRef.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));
107
+ }, /**
108
+ * Handles keydown events to implement the focus trap.
109
+ * Traps Tab and Shift+Tab within the modal.
110
+ */ this.handleKeyDown = (e)=>{
111
+ if (e.key === 'Tab') {
112
+ const focusableElements = this.getFocusableElements();
113
+ if (focusableElements.length === 0) return;
114
+ const firstElement = focusableElements[0];
115
+ const lastElement = focusableElements[focusableElements.length - 1];
116
+ if (e.shiftKey) {
117
+ if (document.activeElement === firstElement) {
118
+ lastElement.focus();
119
+ e.preventDefault();
120
+ }
121
+ } else {
122
+ if (document.activeElement === lastElement) {
123
+ firstElement.focus();
124
+ e.preventDefault();
125
+ }
126
+ }
127
+ }
128
+ }, /**
129
+ * Restores focus to the element that was focused before the modal opened.
130
+ */ this.restoreFocus = ()=>{
131
+ if (this.lastFocusedElement) {
132
+ // Check if the element is still in the document
133
+ const elementToBeFocused = this.lastFocusedElement;
134
+ this.lastFocusedElement = null;
135
+ setTimeout(()=>{
136
+ if (document.body.contains(elementToBeFocused)) {
137
+ elementToBeFocused.focus();
138
+ }
139
+ }, 100);
140
+ }
141
+ }, /**
142
+ * Callback ref to capture the Modal DOM element.
143
+ * Triggers initial focus setting when the element mounts.
144
+ */ this.setModalRef = (node)=>{
145
+ // Update ref
146
+ this.modalRef.current = node;
147
+ if (node) {
148
+ // Set initial focus when the node is mounted
149
+ this.setInitialFocus(node);
150
+ }
151
+ }, /**
152
+ * Sets initial focus within the modal.
153
+ * Tries to focus the header (first child) first, then the first interactive element, or falls back to the container.
154
+ */ this.setInitialFocus = (root)=>{
155
+ // Try to find the header (assumed to be the first child)
156
+ const firstChild = root.firstElementChild;
157
+ if (firstChild) {
158
+ // Ensure it's focusable
159
+ if (firstChild.getAttribute('tabindex') === null) {
160
+ firstChild.setAttribute('tabindex', '-1');
161
+ }
162
+ firstChild.focus();
163
+ return;
164
+ }
165
+ // Fallback to focusable elements
166
+ const focusableElements = this.getFocusableElements();
167
+ if (focusableElements.length > 0) {
168
+ focusableElements[0].focus();
169
+ } else {
170
+ // Fallback to container
171
+ root.focus();
172
+ }
173
+ };
174
+ }
69
175
  }
70
- Modal.propTypes = {
71
- /** Opens the modal */
72
- open: PropTypes.bool.isRequired,
73
- /** Closes the modal on esc */
74
- closeOnEsc: PropTypes.bool,
75
- /** Closes the modal on overlay click */
76
- closeOnOverlayClick: PropTypes.bool,
77
- /** Call back function called when the modal closes. */
78
- onClose: PropTypes.func,
79
- };
176
+ Modal.propTypes = modalPropTypes;
80
177
  Modal.defaultProps = {
81
178
  closeOnEsc: true,
82
- closeOnOverlayClick: true,
179
+ closeOnOverlayClick: true
83
180
  };
84
- export default Modal;
85
- //# sourceMappingURL=Modal.js.map
181
+
182
+ export { Modal as default };
@@ -1,2 +1 @@
1
1
  export { default as Modal, ModalHeader, ModalBody, ModalFooter } from './Modal';
2
- //# sourceMappingURL=index.d.ts.map
@@ -23,6 +23,8 @@ export declare class StoryProps extends React.Component<NotificationProps> {
23
23
  buttonClick: PropTypes.Requireable<(...args: any[]) => any>;
24
24
  /** Notification close callback. */
25
25
  onClose: PropTypes.Requireable<(...args: any[]) => any>;
26
+ /** Aria label for the close button on the notification. Defaults to "Close notification" */
27
+ closeButtonAriaLabel: PropTypes.Requireable<string>;
26
28
  };
27
29
  static defaultProps: {
28
30
  duration: number;
@@ -42,7 +44,7 @@ declare class Notification {
42
44
  * @param options - Configuration options for the notification
43
45
  * @returns The notification ID or a promise that resolves to the notification ID
44
46
  */
45
- add: (position: NOTIFICATION_POSITION, options: NotificationOptions) => string | Promise<unknown>;
47
+ add: (position: NOTIFICATION_POSITION, options: NotificationOptions, ariaLabel?: string) => Promise<string>;
46
48
  /**
47
49
  * Removes a notification
48
50
  *
@@ -61,4 +63,3 @@ declare class Notification {
61
63
  /** Export a singleton instance */
62
64
  declare const _default: Notification;
63
65
  export default _default;
64
- //# sourceMappingURL=Notification.d.ts.map
@@ -1,70 +1,57 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { flushSync } from 'react-dom';
5
5
  import { createRoot } from 'react-dom/client';
6
- import LayerManager, { LAYER_POSITION } from '../../shared/LayerManager';
7
- import NotificationManager from './NotificationManager';
8
- import { NOTIFICATION_POSITION, NOTIFICATION_TYPE } from './types';
9
- /** This component is only used for storybook documentation */
10
- export class StoryProps extends React.Component {
6
+ import LayerManager, { LAYER_POSITION } from '../../shared/LayerManager.js';
7
+ import NotificationManager from './NotificationManager.js';
8
+ import { NOTIFICATION_POSITION, NOTIFICATION_TYPE } from './types.js';
9
+
10
+ /** This component is only used for storybook documentation */ class StoryProps extends React.Component {
11
11
  render() {
12
12
  return null;
13
13
  }
14
14
  }
15
15
  StoryProps.propTypes = {
16
- /** Title of the notification */
17
- title: PropTypes.string.isRequired,
18
- /** Body of the notification */
19
- description: PropTypes.string.isRequired,
20
- /** Id for the notification, helps in de-duplication. */
21
- id: PropTypes.string,
22
- /** Duration for the notification in milliseconds */
23
- duration: PropTypes.number,
24
- /** Creates sticky notification */
25
- sticky: PropTypes.bool,
26
- /** Type of notification */
27
- type: PropTypes.oneOf([
16
+ /** Title of the notification */ title: PropTypes.string.isRequired,
17
+ /** Body of the notification */ description: PropTypes.string.isRequired,
18
+ /** Id for the notification, helps in de-duplication. */ id: PropTypes.string,
19
+ /** Duration for the notification in milliseconds */ duration: PropTypes.number,
20
+ /** Creates sticky notification */ sticky: PropTypes.bool,
21
+ /** Type of notification */ type: PropTypes.oneOf([
28
22
  NOTIFICATION_TYPE.INFO,
29
23
  NOTIFICATION_TYPE.SUCCESS,
30
24
  NOTIFICATION_TYPE.WARNING,
31
- NOTIFICATION_TYPE.DANGER,
25
+ NOTIFICATION_TYPE.DANGER
32
26
  ]),
33
- /** Action button text */
34
- buttonText: PropTypes.string,
35
- /** Action button click callback */
36
- buttonClick: PropTypes.func,
37
- /** Notification close callback. */
38
- onClose: PropTypes.func,
27
+ /** Action button text */ buttonText: PropTypes.string,
28
+ /** Action button click callback */ buttonClick: PropTypes.func,
29
+ /** Notification close callback. */ onClose: PropTypes.func,
30
+ /** Aria label for the close button on the notification. Defaults to "Close notification" */ closeButtonAriaLabel: PropTypes.string
39
31
  };
40
32
  StoryProps.defaultProps = {
41
33
  duration: 5000,
42
34
  sticky: false,
43
- type: NOTIFICATION_TYPE.INFO,
35
+ type: NOTIFICATION_TYPE.INFO
44
36
  };
45
- /** Maps notification position to layer position */
46
- const positionMap = {
37
+ /** Maps notification position to layer position */ const positionMap = {
47
38
  [NOTIFICATION_POSITION.TOP_LEFT]: LAYER_POSITION.TOP_LEFT,
48
39
  [NOTIFICATION_POSITION.TOP_RIGHT]: LAYER_POSITION.TOP_RIGHT,
49
40
  [NOTIFICATION_POSITION.BOTTOM_LEFT]: LAYER_POSITION.BOTTOM_LEFT,
50
- [NOTIFICATION_POSITION.BOTTOM_RIGHT]: LAYER_POSITION.BOTTOM_RIGHT,
41
+ [NOTIFICATION_POSITION.BOTTOM_RIGHT]: LAYER_POSITION.BOTTOM_RIGHT
51
42
  };
52
- /** Notification class */
53
- class Notification {
54
- constructor() {
55
- /** Helps in maintaining single instance for different positions. */
56
- this.containers = new Map();
43
+ /** Notification class */ class Notification {
44
+ constructor(){
45
+ /** Helps in maintaining single instance for different positions. */ this.containers = new Map();
57
46
  /**
58
- * Adds a notification
59
- *
60
- * @param position - The position where the notification should appear
61
- * @param options - Configuration options for the notification
62
- * @returns The notification ID or a promise that resolves to the notification ID
63
- */
64
- this.add = (position, options) => {
47
+ * Adds a notification
48
+ *
49
+ * @param position - The position where the notification should appear
50
+ * @param options - Configuration options for the notification
51
+ * @returns The notification ID or a promise that resolves to the notification ID
52
+ */ this.add = (position, options, ariaLabel = 'Notifications')=>{
65
53
  if (!this.containers.has(position)) {
66
- /** Callback ref to capture the NotificationManager instance when it mounts */
67
- const refCallback = (instance) => {
54
+ /** Callback ref to capture the NotificationManager instance when it mounts */ const refCallback = (instance)=>{
68
55
  if (instance) {
69
56
  const container = this.containers.get(position);
70
57
  if (container) {
@@ -77,7 +64,12 @@ class Notification {
77
64
  closeOnOverlayClick: false,
78
65
  position: positionMap[position],
79
66
  alwaysOnTop: true,
80
- component: (_jsx(NotificationManager, { ref: refCallback, position: position, onEmpty: () => this.destroy(position) })),
67
+ component: /*#__PURE__*/ jsx(NotificationManager, {
68
+ ref: refCallback,
69
+ position: position,
70
+ onEmpty: ()=>this.destroy(position),
71
+ ariaLabel: ariaLabel
72
+ })
81
73
  });
82
74
  // Create a div to mount the Component
83
75
  const div = document.createElement('div');
@@ -86,11 +78,11 @@ class Notification {
86
78
  this.containers.set(position, {
87
79
  manager: null,
88
80
  root,
89
- div,
81
+ div
90
82
  });
91
83
  // Render the Component which will trigger the LayerManager's useEffect
92
- flushSync(() => {
93
- root.render(_jsx(Component, {}));
84
+ flushSync(()=>{
85
+ root.render(/*#__PURE__*/ jsx(Component, {}));
94
86
  });
95
87
  }
96
88
  const container = this.containers.get(position);
@@ -98,8 +90,8 @@ class Notification {
98
90
  return container.manager.add(options);
99
91
  }
100
92
  // If manager is not ready yet, wait a bit and retry
101
- return new Promise((resolve) => {
102
- setTimeout(() => {
93
+ return new Promise((resolve)=>{
94
+ setTimeout(()=>{
103
95
  const container = this.containers.get(position);
104
96
  if (container && container.manager) {
105
97
  resolve(container.manager.add(options));
@@ -108,24 +100,22 @@ class Notification {
108
100
  });
109
101
  };
110
102
  /**
111
- * Removes a notification
112
- *
113
- * @param position - The position of the notification container
114
- * @param id - The unique ID of the notification to remove
115
- */
116
- this.remove = (position, id) => {
103
+ * Removes a notification
104
+ *
105
+ * @param position - The position of the notification container
106
+ * @param id - The unique ID of the notification to remove
107
+ */ this.remove = (position, id)=>{
117
108
  const container = this.containers.get(position);
118
109
  if (container && container.manager) {
119
110
  container.manager.remove(id);
120
111
  }
121
112
  };
122
113
  /**
123
- * Destroys entire stack of notifications at a position.
124
- * Unmounts the React root and cleans up DOM elements.
125
- *
126
- * @param position - The position of the notification container to destroy
127
- */
128
- this.destroy = (position) => {
114
+ * Destroys entire stack of notifications at a position.
115
+ * Unmounts the React root and cleans up DOM elements.
116
+ *
117
+ * @param position - The position of the notification container to destroy
118
+ */ this.destroy = (position)=>{
129
119
  const container = this.containers.get(position);
130
120
  if (container) {
131
121
  container.root.unmount();
@@ -137,6 +127,6 @@ class Notification {
137
127
  };
138
128
  }
139
129
  }
140
- /** Export a singleton instance */
141
- export default new Notification();
142
- //# sourceMappingURL=Notification.js.map
130
+ /** Export a singleton instance */ var Notification$1 = new Notification();
131
+
132
+ export { StoryProps, Notification$1 as default };
@@ -3,6 +3,7 @@ import { NOTIFICATION_POSITION, NotificationOptions } from './types';
3
3
  interface NotificationManagerProps {
4
4
  position: NOTIFICATION_POSITION;
5
5
  onEmpty: () => void;
6
+ ariaLabel?: string;
6
7
  }
7
8
  interface NoticeProp extends NotificationOptions {
8
9
  leaving?: boolean;
@@ -17,6 +18,8 @@ declare class NotificationManager extends React.Component<NotificationManagerPro
17
18
  state: NotificationManagerState;
18
19
  private timeouts;
19
20
  private set;
21
+ private politeRegionRef;
22
+ private assertiveRegionRef;
20
23
  /**
21
24
  * Removes a notification from stack if the notification with the given id is found.
22
25
  *
@@ -28,7 +31,14 @@ declare class NotificationManager extends React.Component<NotificationManagerPro
28
31
  *
29
32
  * @param notice
30
33
  */
31
- add: (notice: NotificationOptions) => string;
34
+ add: (notice: NotificationOptions) => Promise<string>;
35
+ /**
36
+ * Update live region content with clear-then-set pattern for reliable VoiceOver announcements.
37
+ *
38
+ * @param content - The text content to announce
39
+ * @param isAssertive - Whether to use assertive (alert) or polite (log) live region
40
+ */
41
+ private updateLiveRegion;
32
42
  /**
33
43
  * Handler for close button click.
34
44
  *
@@ -47,7 +57,10 @@ declare class NotificationManager extends React.Component<NotificationManagerPro
47
57
  * @param id
48
58
  */
49
59
  resume: (id: string) => () => void;
60
+ /**
61
+ * Clean up all pending timeouts when component unmounts
62
+ */
63
+ componentWillUnmount(): void;
50
64
  render(): import("@emotion/react/jsx-runtime").JSX.Element;
51
65
  }
52
66
  export default NotificationManager;
53
- //# sourceMappingURL=NotificationManager.d.ts.map