@pega/cosmos-react-core 4.0.0-dev.13.0 → 4.0.0-dev.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/README.md +2 -2
  2. package/lib/components/AppShell/AppShell.js.map +1 -1
  3. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  4. package/lib/components/AppShell/AppShell.styles.js +10 -12
  5. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  6. package/lib/components/AppShell/AppShell.types.d.ts +6 -6
  7. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  8. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  9. package/lib/components/AppShell/AppShellContext.d.ts +1 -1
  10. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  11. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  12. package/lib/components/AppShell/AppShellList.styles.js +1 -1
  13. package/lib/components/AppShell/AppShellList.styles.js.map +1 -1
  14. package/lib/components/AppShell/NavigationList.js.map +1 -1
  15. package/lib/components/Banner/Banner.d.ts.map +1 -1
  16. package/lib/components/Banner/Banner.js +3 -3
  17. package/lib/components/Banner/Banner.js.map +1 -1
  18. package/lib/components/Boolean/BooleanDisplay.js +2 -2
  19. package/lib/components/Boolean/BooleanDisplay.js.map +1 -1
  20. package/lib/components/Button/Button.d.ts +3 -1
  21. package/lib/components/Button/Button.d.ts.map +1 -1
  22. package/lib/components/Button/Button.js +168 -142
  23. package/lib/components/Button/Button.js.map +1 -1
  24. package/lib/components/ColorPicker/ColorPicker.js +1 -1
  25. package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
  26. package/lib/components/ColorPicker/ColorPicker.test-ids.d.ts +1 -1
  27. package/lib/components/ColorPicker/ColorPicker.test-ids.d.ts.map +1 -1
  28. package/lib/components/ColorPicker/ColorPicker.test-ids.js +5 -1
  29. package/lib/components/ColorPicker/ColorPicker.test-ids.js.map +1 -1
  30. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  31. package/lib/components/ComboBox/ComboBox.js +2 -10
  32. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  33. package/lib/components/ComboBox/ComboxBox.test-ids.d.ts +1 -1
  34. package/lib/components/ComboBox/ComboxBox.test-ids.d.ts.map +1 -1
  35. package/lib/components/ComboBox/ComboxBox.test-ids.js +2 -1
  36. package/lib/components/ComboBox/ComboxBox.test-ids.js.map +1 -1
  37. package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
  38. package/lib/components/CompositeInput/CompositeInput.js +8 -10
  39. package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
  40. package/lib/components/CompositeInput/CompositeInput.test-ids.d.ts +1 -1
  41. package/lib/components/CompositeInput/CompositeInput.test-ids.d.ts.map +1 -1
  42. package/lib/components/CompositeInput/CompositeInput.test-ids.js +5 -1
  43. package/lib/components/CompositeInput/CompositeInput.test-ids.js.map +1 -1
  44. package/lib/components/Configuration/Configuration.d.ts.map +1 -1
  45. package/lib/components/Configuration/Configuration.js +5 -1
  46. package/lib/components/Configuration/Configuration.js.map +1 -1
  47. package/lib/components/Currency/Currency.test-ids.d.ts +1 -1
  48. package/lib/components/Currency/Currency.test-ids.d.ts.map +1 -1
  49. package/lib/components/Currency/Currency.test-ids.js +5 -1
  50. package/lib/components/Currency/Currency.test-ids.js.map +1 -1
  51. package/lib/components/Currency/CurrencyInput.js +1 -1
  52. package/lib/components/Currency/CurrencyInput.js.map +1 -1
  53. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  54. package/lib/components/DateTime/Input/DateInput.js +25 -32
  55. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  56. package/lib/components/DateTime/Input/DateTime.styles.d.ts +1 -0
  57. package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
  58. package/lib/components/DateTime/Input/DateTime.styles.js +3 -0
  59. package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
  60. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  61. package/lib/components/DateTime/Input/DateTimeInput.js +20 -27
  62. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  63. package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
  64. package/lib/components/DateTime/Input/TimeInput.js +1 -9
  65. package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
  66. package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
  67. package/lib/components/DateTime/Input/WeekInput.js +11 -17
  68. package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
  69. package/lib/components/DateTime/Picker/Calendar.js +1 -1
  70. package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
  71. package/lib/components/DateTime/Picker/Weeks.js +1 -1
  72. package/lib/components/DateTime/Picker/Weeks.js.map +1 -1
  73. package/lib/components/DateTime/utils.d.ts.map +1 -1
  74. package/lib/components/DateTime/utils.js +8 -6
  75. package/lib/components/DateTime/utils.js.map +1 -1
  76. package/lib/components/Dialog/Dialog.d.ts.map +1 -1
  77. package/lib/components/Dialog/Dialog.js +2 -2
  78. package/lib/components/Dialog/Dialog.js.map +1 -1
  79. package/lib/components/Dialog/Dialog.styles.d.ts +3 -0
  80. package/lib/components/Dialog/Dialog.styles.d.ts.map +1 -1
  81. package/lib/components/Dialog/Dialog.styles.js +29 -2
  82. package/lib/components/Dialog/Dialog.styles.js.map +1 -1
  83. package/lib/components/Dialog/Dialog.types.d.ts +36 -14
  84. package/lib/components/Dialog/Dialog.types.d.ts.map +1 -1
  85. package/lib/components/Dialog/Dialog.types.js +0 -1
  86. package/lib/components/Dialog/Dialog.types.js.map +1 -1
  87. package/lib/components/Dialog/FormDialog.d.ts +4 -1
  88. package/lib/components/Dialog/FormDialog.d.ts.map +1 -1
  89. package/lib/components/Dialog/FormDialog.js +4 -5
  90. package/lib/components/Dialog/FormDialog.js.map +1 -1
  91. package/lib/components/Dialog/InfoDialog.d.ts +0 -1
  92. package/lib/components/Dialog/InfoDialog.d.ts.map +1 -1
  93. package/lib/components/Dialog/InfoDialog.js +15 -13
  94. package/lib/components/Dialog/InfoDialog.js.map +1 -1
  95. package/lib/components/Dialog/InfoDialog.styles.d.ts +6 -0
  96. package/lib/components/Dialog/InfoDialog.styles.d.ts.map +1 -0
  97. package/lib/components/Dialog/InfoDialog.styles.js +18 -0
  98. package/lib/components/Dialog/InfoDialog.styles.js.map +1 -0
  99. package/lib/components/EmojiPicker/EmojiPicker.styles.js +1 -1
  100. package/lib/components/EmojiPicker/EmojiPicker.styles.js.map +1 -1
  101. package/lib/components/FieldValueList/FieldValueList.d.ts +4 -2
  102. package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
  103. package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
  104. package/lib/components/FieldValueList/FieldValueList.test-ids.d.ts +2 -2
  105. package/lib/components/FieldValueList/FieldValueList.test-ids.d.ts.map +1 -1
  106. package/lib/components/FieldValueList/index.d.ts +1 -1
  107. package/lib/components/FieldValueList/index.d.ts.map +1 -1
  108. package/lib/components/FieldValueList/index.js.map +1 -1
  109. package/lib/components/File/File.test-ids.d.ts +1 -1
  110. package/lib/components/File/File.test-ids.d.ts.map +1 -1
  111. package/lib/components/File/File.test-ids.js +6 -1
  112. package/lib/components/File/File.test-ids.js.map +1 -1
  113. package/lib/components/File/FileInput.js +1 -1
  114. package/lib/components/File/FileInput.js.map +1 -1
  115. package/lib/components/Flex/Flex.d.ts +7 -1
  116. package/lib/components/Flex/Flex.d.ts.map +1 -1
  117. package/lib/components/Flex/Flex.js +37 -10
  118. package/lib/components/Flex/Flex.js.map +1 -1
  119. package/lib/components/FormField/FormField.d.ts +2 -1
  120. package/lib/components/FormField/FormField.d.ts.map +1 -1
  121. package/lib/components/FormField/FormField.js.map +1 -1
  122. package/lib/components/FormField/FormField.test-ids.d.ts +2 -1
  123. package/lib/components/FormField/FormField.test-ids.d.ts.map +1 -1
  124. package/lib/components/FormField/FormField.test-ids.js +3 -2
  125. package/lib/components/FormField/FormField.test-ids.js.map +1 -1
  126. package/lib/components/Icon/iconNames.d.ts +2 -2
  127. package/lib/components/Icon/iconNames.d.ts.map +1 -1
  128. package/lib/components/Icon/iconNames.js +2 -0
  129. package/lib/components/Icon/iconNames.js.map +1 -1
  130. package/lib/components/Icon/icons/phone-merge-solid.icon.d.ts +4 -0
  131. package/lib/components/Icon/icons/phone-merge-solid.icon.d.ts.map +1 -0
  132. package/lib/components/Icon/icons/phone-merge-solid.icon.js +6 -0
  133. package/lib/components/Icon/icons/phone-merge-solid.icon.js.map +1 -0
  134. package/lib/components/Icon/icons/phone-merge.icon.d.ts +4 -0
  135. package/lib/components/Icon/icons/phone-merge.icon.d.ts.map +1 -0
  136. package/lib/components/Icon/icons/phone-merge.icon.js +6 -0
  137. package/lib/components/Icon/icons/phone-merge.icon.js.map +1 -0
  138. package/lib/components/IconPicker/IconPicker.js +2 -2
  139. package/lib/components/IconPicker/IconPicker.js.map +1 -1
  140. package/lib/components/Input/Input.js +1 -1
  141. package/lib/components/Input/Input.js.map +1 -1
  142. package/lib/components/Input/Input.test-ids.d.ts +1 -1
  143. package/lib/components/Input/Input.test-ids.d.ts.map +1 -1
  144. package/lib/components/Input/Input.test-ids.js +2 -1
  145. package/lib/components/Input/Input.test-ids.js.map +1 -1
  146. package/lib/components/List/List.d.ts.map +1 -1
  147. package/lib/components/List/List.js.map +1 -1
  148. package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
  149. package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
  150. package/lib/components/ListToolbar/ListToolbar.js +49 -17
  151. package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
  152. package/lib/components/ListToolbar/ListToolbar.styles.d.ts +3 -1
  153. package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
  154. package/lib/components/ListToolbar/ListToolbar.styles.js +2 -3
  155. package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
  156. package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts +2 -0
  157. package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts.map +1 -0
  158. package/lib/components/ListToolbar/ListToolbar.test-ids.js +7 -0
  159. package/lib/components/ListToolbar/ListToolbar.test-ids.js.map +1 -0
  160. package/lib/components/ListToolbar/ListToolbar.types.d.ts +31 -8
  161. package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
  162. package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
  163. package/lib/components/ListToolbar/helpers.d.ts +10 -0
  164. package/lib/components/ListToolbar/helpers.d.ts.map +1 -0
  165. package/lib/components/ListToolbar/helpers.js +46 -0
  166. package/lib/components/ListToolbar/helpers.js.map +1 -0
  167. package/lib/components/ListToolbar/index.d.ts +1 -0
  168. package/lib/components/ListToolbar/index.d.ts.map +1 -1
  169. package/lib/components/ListToolbar/index.js +1 -0
  170. package/lib/components/ListToolbar/index.js.map +1 -1
  171. package/lib/components/LiveLog/LiveLog.d.ts.map +1 -1
  172. package/lib/components/LiveLog/LiveLog.js +17 -16
  173. package/lib/components/LiveLog/LiveLog.js.map +1 -1
  174. package/lib/components/Location/Location.test-ids.d.ts +1 -1
  175. package/lib/components/Location/Location.test-ids.d.ts.map +1 -1
  176. package/lib/components/Location/Location.test-ids.js +5 -1
  177. package/lib/components/Location/Location.test-ids.js.map +1 -1
  178. package/lib/components/Location/LocationInput.js +1 -1
  179. package/lib/components/Location/LocationInput.js.map +1 -1
  180. package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
  181. package/lib/components/Menu/Menu.styles.js +1 -4
  182. package/lib/components/Menu/Menu.styles.js.map +1 -1
  183. package/lib/components/Menu/Menu.test-ids.d.ts +2 -2
  184. package/lib/components/Menu/Menu.test-ids.d.ts.map +1 -1
  185. package/lib/components/Menu/NavItemsList.d.ts.map +1 -1
  186. package/lib/components/Menu/NavItemsList.js +2 -0
  187. package/lib/components/Menu/NavItemsList.js.map +1 -1
  188. package/lib/components/MenuButton/MenuButton.d.ts +2 -2
  189. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  190. package/lib/components/MenuButton/MenuButton.js +6 -4
  191. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  192. package/lib/components/MenuButton/MenuButton.test-ids.d.ts +2 -0
  193. package/lib/components/MenuButton/MenuButton.test-ids.d.ts.map +1 -0
  194. package/lib/components/MenuButton/MenuButton.test-ids.js +3 -0
  195. package/lib/components/MenuButton/MenuButton.test-ids.js.map +1 -0
  196. package/lib/components/MetaList/MetaList.test-ids.d.ts +1 -1
  197. package/lib/components/MetaList/MetaList.test-ids.d.ts.map +1 -1
  198. package/lib/components/Modal/Modal.styles.js +1 -1
  199. package/lib/components/Modal/Modal.styles.js.map +1 -1
  200. package/lib/components/Modal/ModalManager.d.ts.map +1 -1
  201. package/lib/components/Modal/ModalManager.js +5 -2
  202. package/lib/components/Modal/ModalManager.js.map +1 -1
  203. package/lib/components/Number/Number.test-ids.d.ts +2 -2
  204. package/lib/components/Number/Number.test-ids.d.ts.map +1 -1
  205. package/lib/components/Number/Number.test-ids.js +8 -2
  206. package/lib/components/Number/Number.test-ids.js.map +1 -1
  207. package/lib/components/Number/NumberInput.js +1 -1
  208. package/lib/components/Number/NumberInput.js.map +1 -1
  209. package/lib/components/Number/NumberRangeInput.js +1 -1
  210. package/lib/components/Number/NumberRangeInput.js.map +1 -1
  211. package/lib/components/PageTemplates/PageTemplates.js +2 -2
  212. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  213. package/lib/components/Phone/Phone.test-ids.d.ts +1 -1
  214. package/lib/components/Phone/Phone.test-ids.d.ts.map +1 -1
  215. package/lib/components/Phone/Phone.test-ids.js +3 -1
  216. package/lib/components/Phone/Phone.test-ids.js.map +1 -1
  217. package/lib/components/Phone/PhoneInput.js +2 -2
  218. package/lib/components/Phone/PhoneInput.js.map +1 -1
  219. package/lib/components/Popover/Popover.d.ts +1 -0
  220. package/lib/components/Popover/Popover.d.ts.map +1 -1
  221. package/lib/components/Popover/Popover.js +37 -40
  222. package/lib/components/Popover/Popover.js.map +1 -1
  223. package/lib/components/Popover/PopoverManager.d.ts.map +1 -1
  224. package/lib/components/Popover/PopoverManager.js +11 -10
  225. package/lib/components/Popover/PopoverManager.js.map +1 -1
  226. package/lib/components/Popover/modifiers.d.ts +1 -0
  227. package/lib/components/Popover/modifiers.d.ts.map +1 -1
  228. package/lib/components/Popover/modifiers.js +97 -1
  229. package/lib/components/Popover/modifiers.js.map +1 -1
  230. package/lib/components/Progress/Progress.styles.d.ts.map +1 -1
  231. package/lib/components/Progress/Progress.styles.js +25 -20
  232. package/lib/components/Progress/Progress.styles.js.map +1 -1
  233. package/lib/components/RadioCheck/RadioCheck.js +2 -2
  234. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  235. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  236. package/lib/components/SearchInput/SearchInput.js +1 -9
  237. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  238. package/lib/components/Select/Select.js +2 -2
  239. package/lib/components/Select/Select.js.map +1 -1
  240. package/lib/components/Select/Select.test-ids.d.ts +1 -1
  241. package/lib/components/Select/Select.test-ids.d.ts.map +1 -1
  242. package/lib/components/Select/Select.test-ids.js +2 -1
  243. package/lib/components/Select/Select.test-ids.js.map +1 -1
  244. package/lib/components/Slider/Slider.js +1 -1
  245. package/lib/components/Slider/Slider.js.map +1 -1
  246. package/lib/components/Slider/Slider.styles.d.ts.map +1 -1
  247. package/lib/components/Slider/Slider.styles.js +114 -128
  248. package/lib/components/Slider/Slider.styles.js.map +1 -1
  249. package/lib/components/Slider/Slider.test-ids.d.ts +1 -1
  250. package/lib/components/Slider/Slider.test-ids.d.ts.map +1 -1
  251. package/lib/components/Slider/Slider.test-ids.js +2 -1
  252. package/lib/components/Slider/Slider.test-ids.js.map +1 -1
  253. package/lib/components/Slider/utils.d.ts.map +1 -1
  254. package/lib/components/Slider/utils.js +0 -1
  255. package/lib/components/Slider/utils.js.map +1 -1
  256. package/lib/components/SummaryItem/SummaryItem.test-ids.d.ts +1 -1
  257. package/lib/components/SummaryItem/SummaryItem.test-ids.d.ts.map +1 -1
  258. package/lib/components/Tabs/Tab.d.ts.map +1 -1
  259. package/lib/components/Tabs/Tab.js +21 -18
  260. package/lib/components/Tabs/Tab.js.map +1 -1
  261. package/lib/components/TextArea/TextArea.js +1 -1
  262. package/lib/components/TextArea/TextArea.js.map +1 -1
  263. package/lib/components/TextArea/TextArea.test-ids.d.ts +1 -1
  264. package/lib/components/TextArea/TextArea.test-ids.d.ts.map +1 -1
  265. package/lib/components/TextArea/TextArea.test-ids.js +2 -1
  266. package/lib/components/TextArea/TextArea.test-ids.js.map +1 -1
  267. package/lib/hooks/index.d.ts +1 -0
  268. package/lib/hooks/index.d.ts.map +1 -1
  269. package/lib/hooks/index.js +1 -0
  270. package/lib/hooks/index.js.map +1 -1
  271. package/lib/hooks/useBreakpoint.d.ts.map +1 -1
  272. package/lib/hooks/useBreakpoint.js +4 -1
  273. package/lib/hooks/useBreakpoint.js.map +1 -1
  274. package/lib/hooks/useChToPxConversionFactor.d.ts +3 -0
  275. package/lib/hooks/useChToPxConversionFactor.d.ts.map +1 -0
  276. package/lib/hooks/useChToPxConversionFactor.js +13 -0
  277. package/lib/hooks/useChToPxConversionFactor.js.map +1 -0
  278. package/lib/hooks/useElement.d.ts +1 -1
  279. package/lib/hooks/useElement.d.ts.map +1 -1
  280. package/lib/hooks/useI18n.d.ts +13 -0
  281. package/lib/hooks/useI18n.d.ts.map +1 -1
  282. package/lib/hooks/useScrollToggle.d.ts.map +1 -1
  283. package/lib/hooks/useScrollToggle.js +0 -1
  284. package/lib/hooks/useScrollToggle.js.map +1 -1
  285. package/lib/hooks/useTestIds.d.ts +1 -1
  286. package/lib/hooks/useTestIds.d.ts.map +1 -1
  287. package/lib/hooks/useTestIds.js +3 -0
  288. package/lib/hooks/useTestIds.js.map +1 -1
  289. package/lib/i18n/default.d.ts +13 -0
  290. package/lib/i18n/default.d.ts.map +1 -1
  291. package/lib/i18n/default.js +14 -0
  292. package/lib/i18n/default.js.map +1 -1
  293. package/lib/i18n/i18n.d.ts +13 -0
  294. package/lib/i18n/i18n.d.ts.map +1 -1
  295. package/lib/styles/gradients.d.ts.map +1 -1
  296. package/lib/styles/gradients.js.map +1 -1
  297. package/lib/theme/ThemeMachine.js.map +1 -1
  298. package/lib/types/types.d.ts +7 -2
  299. package/lib/types/types.d.ts.map +1 -1
  300. package/lib/types/types.js.map +1 -1
  301. package/lib/utils/createTestIds.d.ts +1 -6
  302. package/lib/utils/createTestIds.d.ts.map +1 -1
  303. package/lib/utils/createTestIds.js +2 -4
  304. package/lib/utils/createTestIds.js.map +1 -1
  305. package/lib/utils/debounce.d.ts +2 -2
  306. package/lib/utils/debounce.d.ts.map +1 -1
  307. package/lib/utils/debounce.js +9 -10
  308. package/lib/utils/debounce.js.map +1 -1
  309. package/lib/utils/getEdge.d.ts +7 -0
  310. package/lib/utils/getEdge.d.ts.map +1 -0
  311. package/lib/utils/getEdge.js +9 -0
  312. package/lib/utils/getEdge.js.map +1 -0
  313. package/lib/utils/index.d.ts +2 -1
  314. package/lib/utils/index.d.ts.map +1 -1
  315. package/lib/utils/index.js +2 -0
  316. package/lib/utils/index.js.map +1 -1
  317. package/lib/utils/throttle.d.ts +4 -0
  318. package/lib/utils/throttle.d.ts.map +1 -0
  319. package/lib/utils/throttle.js +15 -0
  320. package/lib/utils/throttle.js.map +1 -0
  321. package/package.json +2 -2
@@ -1,16 +1,14 @@
1
+ import { ReactNode } from 'react';
1
2
  import { OmitStrict } from '../../types';
2
3
  import { PopoverProps } from '../Popover';
3
4
  import { ProgressProps } from '../Progress';
4
5
  export interface BaseDialogProps {
5
6
  /**
6
- * A string to indicate context for the dialog. The dialog will be labelled by this value.
7
+ * Certain uses of dialogs require a linear edge with an input like control.
8
+ * There an arrow is not desired.
9
+ * @default true
7
10
  */
8
- heading: string;
9
- /**
10
- * In specific circumstances the heading can be visually hidden.
11
- * @default false
12
- */
13
- headingHidden?: boolean;
11
+ arrow?: PopoverProps['arrow'];
14
12
  /**
15
13
  * An element the dialog is contextually and visually associated with. Normally a triggering button.
16
14
  * Components rendering Dialog should mount and unmount instances based on this value.
@@ -38,12 +36,16 @@ export interface BaseDialogProps {
38
36
  */
39
37
  ref?: PopoverProps['ref'];
40
38
  }
41
- export interface DialogProps extends OmitStrict<BaseDialogProps, 'heading' | 'headingHidden'> {
39
+ export type DialogProps = BaseDialogProps & {
42
40
  /**
43
- * The DOM id for the dialog's labelling element.
41
+ * The DOM id for the dialog's visible labelling element.
44
42
  */
45
- labelledbyId: string;
46
- }
43
+ labelledbyId?: string;
44
+ /**
45
+ * Provide a contextually sufficient aria label if a visible labelling element is not present.
46
+ */
47
+ ariaLabel?: string;
48
+ };
47
49
  /**
48
50
  * A simple callback or an object to customize a subset button properties.
49
51
  */
@@ -52,7 +54,7 @@ type FormAction = (() => void) | {
52
54
  disabled?: boolean;
53
55
  handler: () => void;
54
56
  };
55
- export interface FormDialogProps extends BaseDialogProps {
57
+ export type FormDialogProps = BaseDialogProps & {
56
58
  /**
57
59
  * Called when the user presses escape or clicks away.
58
60
  */
@@ -68,8 +70,28 @@ export interface FormDialogProps extends BaseDialogProps {
68
70
  * Invocation of this indicates the user wishes to submit any changes and close the dialog. Please consider progress states after submit.
69
71
  */
70
72
  onSubmit: FormAction;
71
- }
72
- export interface InfoDialogProps extends BaseDialogProps {
73
+ } & ({
74
+ /**
75
+ * A string to indicate context for the dialog. The dialog will be labelled by this value.
76
+ */
77
+ heading: string;
78
+ ariaLabel?: never;
79
+ } | {
80
+ /**
81
+ * Provide a contextually sufficient aria label if a visible heading is not provided.
82
+ */
83
+ heading?: never;
84
+ ariaLabel: string;
85
+ });
86
+ export interface InfoDialogProps extends OmitStrict<BaseDialogProps, 'arrow'> {
87
+ /**
88
+ * A string or summary item like props to indicate context for the dialog. The dialog will be labelled by either the heading element or primary property.
89
+ */
90
+ heading?: string | {
91
+ primary: string;
92
+ secondary?: string;
93
+ visual?: ReactNode;
94
+ };
73
95
  /**
74
96
  * Renders a standard design system dismiss button to close the dialog when the user clicks this button, presses escape or clicks away.
75
97
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.types.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,MAAM,EAAE,WAAW,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAEnC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;IAE9C,iGAAiG;IACjG,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;IAEhC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAEpC;;;OAGG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAEtC;;OAEG;IACH,GAAG,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU,CAAC,eAAe,EAAE,SAAS,GAAG,eAAe,CAAC;IAC3F;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,KAAK,UAAU,GACX,CAAC,MAAM,IAAI,CAAC,GACZ;IACE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEN,MAAM,WA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{"version":3,"file":"Dialog.types.js","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.types.ts"],"names":[],"mappings":"AAAA,wBAAwB","sourcesContent":["// cSpell:words dialog's\n\nimport { OmitStrict } from '../../types';\nimport { PopoverProps } from '../Popover';\nimport { ProgressProps } from '../Progress';\n\nexport interface BaseDialogProps {\n /**\n * A string to indicate context for the dialog. The dialog will be labelled by this value.\n */\n heading: string;\n\n /**\n * In specific circumstances the heading can be visually hidden.\n * @default false\n */\n headingHidden?: boolean;\n\n /**\n * An element the dialog is contextually and visually associated with. Normally a triggering button.\n * Components rendering Dialog should mount and unmount instances based on this value.\n */\n target: HTMLElement;\n\n /**\n * Content for the dialog. Avoid form control buttons within as those should be rendered by way of onCancel and onSubmit with FormDialog.\n */\n children: PopoverProps['children'];\n\n /**\n * If there is a progress state either on opening, or after submit, you must indicate as such. A custom message is supported as well.\n */\n progress?: boolean | ProgressProps['message'];\n\n /** Optionally render the dialog element at the end of the body or within a specified element. */\n portal?: PopoverProps['portal'];\n\n /** Positioning strategy for solving rendering scenarios. */\n strategy?: PopoverProps['strategy'];\n\n /**\n * Intended positioning placement for the dialog element.\n * Placement may auto adjust based on screen position and other layout variables.\n */\n placement?: PopoverProps['placement'];\n\n /**\n * Reference to the dialog's root element.\n */\n ref?: PopoverProps['ref'];\n}\n\nexport interface DialogProps extends OmitStrict<BaseDialogProps, 'heading' | 'headingHidden'> {\n /**\n * The DOM id for the dialog's labelling element.\n */\n labelledbyId: string;\n}\n\n/**\n * A simple callback or an object to customize a subset button properties.\n */\ntype FormAction =\n | (() => void)\n | {\n text?: string;\n disabled?: boolean;\n handler: () => void;\n };\n\nexport interface FormDialogProps extends BaseDialogProps {\n /**\n * Called when the user presses escape or clicks away.\n */\n onDismiss?: () => void;\n\n /**\n * Renders a standard design system cancel button.\n * If onDismiss is not provided, onCancel will be invoked when the user presses the Escape key or clicks outside of the dialog.\n * Invocation of this indicates the user wishes to cancel any changes and close the dialog.\n */\n onCancel: FormAction;\n\n /**\n * Renders a standard design system submit button.\n * Invocation of this indicates the user wishes to submit any changes and close the dialog. Please consider progress states after submit.\n */\n onSubmit: FormAction;\n}\n\nexport interface InfoDialogProps extends BaseDialogProps {\n /**\n * Renders a standard design system dismiss button to close the dialog when the user clicks this button, presses escape or clicks away.\n */\n onDismiss: () => void;\n}\n\n/**\n * Components which render Dialog internally may need to offer some control to consuming components.\n * Use this interface to offer an imperative handle for shared control.\n */\nexport interface DialogHandleValue {\n open: () => void;\n close: () => void;\n}\n"]}
1
+ {"version":3,"file":"Dialog.types.js","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ReactNode } from 'react';\n\nimport { OmitStrict } from '../../types';\nimport { PopoverProps } from '../Popover';\nimport { ProgressProps } from '../Progress';\n\nexport interface BaseDialogProps {\n /**\n * Certain uses of dialogs require a linear edge with an input like control.\n * There an arrow is not desired.\n * @default true\n */\n arrow?: PopoverProps['arrow'];\n\n /**\n * An element the dialog is contextually and visually associated with. Normally a triggering button.\n * Components rendering Dialog should mount and unmount instances based on this value.\n */\n target: HTMLElement;\n\n /**\n * Content for the dialog. Avoid form control buttons within as those should be rendered by way of onCancel and onSubmit with FormDialog.\n */\n children: PopoverProps['children'];\n\n /**\n * If there is a progress state either on opening, or after submit, you must indicate as such. A custom message is supported as well.\n */\n progress?: boolean | ProgressProps['message'];\n\n /** Optionally render the dialog element at the end of the body or within a specified element. */\n portal?: PopoverProps['portal'];\n\n /** Positioning strategy for solving rendering scenarios. */\n strategy?: PopoverProps['strategy'];\n\n /**\n * Intended positioning placement for the dialog element.\n * Placement may auto adjust based on screen position and other layout variables.\n */\n placement?: PopoverProps['placement'];\n\n /**\n * Reference to the dialog's root element.\n */\n ref?: PopoverProps['ref'];\n}\n\nexport type DialogProps = BaseDialogProps & {\n /**\n * The DOM id for the dialog's visible labelling element.\n */\n labelledbyId?: string;\n\n /**\n * Provide a contextually sufficient aria label if a visible labelling element is not present.\n */\n ariaLabel?: string;\n};\n\n/**\n * A simple callback or an object to customize a subset button properties.\n */\ntype FormAction =\n | (() => void)\n | {\n text?: string;\n disabled?: boolean;\n handler: () => void;\n };\n\nexport type FormDialogProps = BaseDialogProps & {\n /**\n * Called when the user presses escape or clicks away.\n */\n onDismiss?: () => void;\n\n /**\n * Renders a standard design system cancel button.\n * If onDismiss is not provided, onCancel will be invoked when the user presses the Escape key or clicks outside of the dialog.\n * Invocation of this indicates the user wishes to cancel any changes and close the dialog.\n */\n onCancel: FormAction;\n\n /**\n * Renders a standard design system submit button.\n * Invocation of this indicates the user wishes to submit any changes and close the dialog. Please consider progress states after submit.\n */\n onSubmit: FormAction;\n} & (\n | {\n /**\n * A string to indicate context for the dialog. The dialog will be labelled by this value.\n */\n heading: string;\n ariaLabel?: never;\n }\n | {\n /**\n * Provide a contextually sufficient aria label if a visible heading is not provided.\n */\n heading?: never;\n ariaLabel: string;\n }\n );\n\nexport interface InfoDialogProps extends OmitStrict<BaseDialogProps, 'arrow'> {\n /**\n * A string or summary item like props to indicate context for the dialog. The dialog will be labelled by either the heading element or primary property.\n */\n heading?:\n | string\n | {\n primary: string;\n secondary?: string;\n visual?: ReactNode;\n };\n\n /**\n * Renders a standard design system dismiss button to close the dialog when the user clicks this button, presses escape or clicks away.\n */\n onDismiss: () => void;\n}\n\n/**\n * Components which render Dialog internally may need to offer some control to consuming components.\n * Use this interface to offer an imperative handle for shared control.\n */\nexport interface DialogHandleValue {\n open: () => void;\n close: () => void;\n}\n"]}
@@ -1,7 +1,10 @@
1
1
  import { FC, HTMLAttributes } from 'react';
2
2
  import { OmitStrict } from '../../types';
3
3
  import { FormDialogProps } from './Dialog.types';
4
- export declare const StyledFormDialog: import("styled-components").StyledComponent<FC<import("./Dialog.types").DialogProps & HTMLAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const StyledFormDialog: import("styled-components").StyledComponent<FC<import("./Dialog.types").BaseDialogProps & {
5
+ labelledbyId?: string | undefined;
6
+ ariaLabel?: string | undefined;
7
+ } & HTMLAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
5
8
  declare const FormDialog: FC<FormDialogProps & OmitStrict<HTMLAttributes<HTMLDivElement>, 'onSubmit'>>;
6
9
  export default FormDialog;
7
10
  //# sourceMappingURL=FormDialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormDialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/FormDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,EAAE,EAAa,cAAc,EAAE,MAAM,OAAO,CAAC;AAiB3F,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,eAAO,MAAM,gBAAgB,6KAAmB,CAAC;AAEjD,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,GAAG,UAAU,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CA6G1F,CAAC;AAEJ,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"FormDialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/FormDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,EAAE,EAAa,cAAc,EAAE,MAAM,OAAO,CAAC;AAe3F,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AASzC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,eAAO,MAAM,gBAAgB;;;yFAAmB,CAAC;AAEjD,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,GAAG,UAAU,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAmH1F,CAAC;AAEJ,eAAe,UAAU,CAAC"}
@@ -5,13 +5,12 @@ import { useConsolidatedRef, useEscape, useFocusTrap, useI18n, useOuterEvent, us
5
5
  import { getFocusables } from '../../utils';
6
6
  import Button from '../Button';
7
7
  import Text from '../Text';
8
- import { CardContent, CardFooter, CardHeader } from '../Card';
9
8
  import Progress from '../Progress';
10
- import VisuallyHiddenText from '../VisuallyHiddenText';
11
- import { StyledChildrenWrap } from './Dialog.styles';
9
+ import Flex from '../Flex';
10
+ import { StyledChildrenWrap, StyledDialogContent, StyledDialogFooter, StyledDialogHeader } from './Dialog.styles';
12
11
  import Dialog from './Dialog';
13
12
  export const StyledFormDialog = styled(Dialog) ``;
14
- const FormDialog = forwardRef(({ target, heading, headingHidden = false, children, progress, onDismiss, onCancel, onSubmit, ...restProps }, ref) => {
13
+ const FormDialog = forwardRef(({ arrow = true, target, heading, ariaLabel, children, progress, onDismiss, onCancel, onSubmit, ...restProps }, ref) => {
15
14
  const t = useI18n();
16
15
  const headingId = useUID();
17
16
  const dialogRef = useConsolidatedRef(ref);
@@ -48,7 +47,7 @@ const FormDialog = forwardRef(({ target, heading, headingHidden = false, childre
48
47
  }
49
48
  };
50
49
  }, []);
51
- return (_jsxs(StyledFormDialog, { ...restProps, target: target, labelledbyId: headingId, progress: progress, ref: dialogRef, children: [_jsx(CardHeader, { forwardedAs: 'div', children: headingHidden ? (_jsx(VisuallyHiddenText, { forwardedAs: 'h2', id: headingId, children: heading })) : (_jsx(Text, { id: headingId, variant: 'h2', children: heading })) }), _jsxs(CardContent, { children: [children && _jsx(StyledChildrenWrap, { children: children }), _jsx(Progress, { visible: !!progress, focusOnVisible: true, placement: children ? 'local' : 'block', message: typeof progress === 'string' ? progress : undefined })] }), _jsxs(CardFooter, { justify: 'between', forwardedAs: 'div', children: [_jsx(Button, { onClick: () => {
50
+ return (_jsxs(StyledFormDialog, { ...restProps, ...(heading === undefined ? { ariaLabel } : { labelledbyId: headingId }), arrow: arrow, target: target, progress: progress, ref: dialogRef, children: [heading !== undefined && (_jsx(Flex, { container: { alignItems: 'center', justify: 'between', pad: 2 }, item: { shrink: 0 }, as: StyledDialogHeader, children: _jsx(Text, { id: headingId, variant: 'h2', children: heading }) })), _jsxs(Flex, { item: { grow: 1 }, as: StyledDialogContent, children: [children && _jsx(StyledChildrenWrap, { children: children }), _jsx(Progress, { visible: !!progress, focusOnVisible: true, placement: children ? 'local' : 'block', message: typeof progress === 'string' ? progress : undefined })] }), _jsxs(Flex, { container: { alignItems: 'center', justify: 'between', pad: 2 }, item: { shrink: 0 }, as: StyledDialogFooter, children: [_jsx(Button, { onClick: () => {
52
51
  onCancelHandler();
53
52
  }, disabled: typeof onCancel !== 'function' ? onCancel.disabled : undefined, ref: cancelButtonRef, children: typeof onCancel !== 'function' && onCancel.text ? onCancel.text : t('cancel') }), _jsx(Button, { variant: 'primary', onClick: () => {
54
53
  (typeof onSubmit !== 'function' ? onSubmit.handler : onSubmit)();
@@ -1 +1 @@
1
- {"version":3,"file":"FormDialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/FormDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,EAAM,SAAS,EAAkB,MAAM,OAAO,CAAC;AAC3F,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,YAAY,EACZ,OAAO,EACP,aAAa,EACb,MAAM,EACP,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA,EAAE,CAAC;AAEjD,MAAM,UAAU,GACd,UA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ACvE,EAET,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,GAAG,EAAE;4BACZ,CAAC,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;wBACnE,CAAC,EACD,QAAQ,EAAE,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,YAEvE,OAAO,QAAQ,KAAK,UAAU,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GACvE,IACE,IACI,CACpB,CAAC;AACJ,CAAC,CACF,CAAC;AAEJ,eAAe,UAAU,CAAC","sourcesContent":["import { forwardRef, PropsWithoutRef, useRef, FC, useEffect, HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nimport {\n useConsolidatedRef,\n useEscape,\n useFocusTrap,\n useI18n,\n useOuterEvent,\n useUID\n} from '../../hooks';\nimport { getFocusables } from '../../utils';\nimport Button from '../Button';\nimport Text from '../Text';\nimport { CardContent, CardFooter, CardHeader } from '../Card';\nimport Progress from '../Progress';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport { OmitStrict } from '../../types';\n\nimport { StyledChildrenWrap } from './Dialog.styles';\nimport { FormDialogProps } from './Dialog.types';\nimport Dialog from './Dialog';\n\nexport const StyledFormDialog = styled(Dialog)``;\n\nconst FormDialog: FC<FormDialogProps & OmitStrict<HTMLAttributes<HTMLDivElement>, 'onSubmit'>> =\n forwardRef(\n (\n {\n target,\n heading,\n headingHidden = false,\n children,\n progress,\n onDismiss,\n onCancel,\n onSubmit,\n ...restProps\n }: PropsWithoutRef<FormDialogProps>,\n ref: FormDialogProps['ref']\n ) => {\n const t = useI18n();\n const headingId = useUID();\n const dialogRef = useConsolidatedRef(ref);\n const cancelButtonRef = useRef<HTMLButtonElement>(null);\n const onCancelHandler = typeof onCancel === 'function' ? onCancel : onCancel.handler;\n\n useEscape(() => {\n if (onDismiss) {\n onDismiss();\n } else {\n onCancelHandler();\n }\n });\n\n useOuterEvent('mousedown', [target, dialogRef], () => {\n if (onDismiss) {\n onDismiss();\n } else {\n onCancelHandler();\n }\n });\n\n useFocusTrap(dialogRef);\n\n useEffect(() => {\n if (!progress) {\n const focusables = getFocusables(dialogRef);\n if (focusables[0]) focusables[0].focus();\n }\n }, [progress]);\n\n useEffect(() => {\n return () => {\n if (document.contains(target)) {\n target.focus();\n }\n };\n }, []);\n\n return (\n <StyledFormDialog\n {...restProps}\n target={target}\n labelledbyId={headingId}\n progress={progress}\n ref={dialogRef}\n >\n <CardHeader forwardedAs='div'>\n {headingHidden ? (\n <VisuallyHiddenText forwardedAs='h2' id={headingId}>\n {heading}\n </VisuallyHiddenText>\n ) : (\n <Text id={headingId} variant='h2'>\n {heading}\n </Text>\n )}\n </CardHeader>\n\n <CardContent>\n {children && <StyledChildrenWrap>{children}</StyledChildrenWrap>}\n <Progress\n visible={!!progress}\n focusOnVisible\n placement={children ? 'local' : 'block'}\n message={typeof progress === 'string' ? progress : undefined}\n />\n </CardContent>\n\n <CardFooter justify='between' forwardedAs='div'>\n <Button\n onClick={() => {\n onCancelHandler();\n }}\n disabled={typeof onCancel !== 'function' ? onCancel.disabled : undefined}\n ref={cancelButtonRef}\n >\n {typeof onCancel !== 'function' && onCancel.text ? onCancel.text : t('cancel')}\n </Button>\n\n <Button\n variant='primary'\n onClick={() => {\n (typeof onSubmit !== 'function' ? onSubmit.handler : onSubmit)();\n }}\n disabled={typeof onSubmit !== 'function' ? onSubmit.disabled : undefined}\n >\n {typeof onSubmit !== 'function' && onSubmit.text ? onSubmit.text : t('submit')}\n </Button>\n </CardFooter>\n </StyledFormDialog>\n );\n }\n );\n\nexport default FormDialog;\n"]}
1
+ {"version":3,"file":"FormDialog.js","sourceRoot":"","sources":["../../../src/components/Dial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Q,CAAC,EAAE,CAAC;wBACnE,CAAC,EACD,QAAQ,EAAE,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,YAEvE,OAAO,QAAQ,KAAK,UAAU,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GACvE,IACJ,IACU,CACpB,CAAC;AACJ,CAAC,CACF,CAAC;AAEJ,eAAe,UAAU,CAAC","sourcesContent":["import { forwardRef, PropsWithoutRef, useRef, FC, useEffect, HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nimport {\n useConsolidatedRef,\n useEscape,\n useFocusTrap,\n useI18n,\n useOuterEvent,\n useUID\n} from '../../hooks';\nimport { getFocusables } from '../../utils';\nimport Button from '../Button';\nimport Text from '../Text';\nimport Progress from '../Progress';\nimport { OmitStrict } from '../../types';\nimport Flex from '../Flex';\n\nimport {\n StyledChildrenWrap,\n StyledDialogContent,\n StyledDialogFooter,\n StyledDialogHeader\n} from './Dialog.styles';\nimport { FormDialogProps } from './Dialog.types';\nimport Dialog from './Dialog';\n\nexport const StyledFormDialog = styled(Dialog)``;\n\nconst FormDialog: FC<FormDialogProps & OmitStrict<HTMLAttributes<HTMLDivElement>, 'onSubmit'>> =\n forwardRef(\n (\n {\n arrow = true,\n target,\n heading,\n ariaLabel,\n children,\n progress,\n onDismiss,\n onCancel,\n onSubmit,\n ...restProps\n }: PropsWithoutRef<FormDialogProps>,\n ref: FormDialogProps['ref']\n ) => {\n const t = useI18n();\n const headingId = useUID();\n const dialogRef = useConsolidatedRef(ref);\n const cancelButtonRef = useRef<HTMLButtonElement>(null);\n const onCancelHandler = typeof onCancel === 'function' ? onCancel : onCancel.handler;\n\n useEscape(() => {\n if (onDismiss) {\n onDismiss();\n } else {\n onCancelHandler();\n }\n });\n\n useOuterEvent('mousedown', [target, dialogRef], () => {\n if (onDismiss) {\n onDismiss();\n } else {\n onCancelHandler();\n }\n });\n\n useFocusTrap(dialogRef);\n\n useEffect(() => {\n if (!progress) {\n const focusables = getFocusables(dialogRef);\n if (focusables[0]) focusables[0].focus();\n }\n }, [progress]);\n\n useEffect(() => {\n return () => {\n if (document.contains(target)) {\n target.focus();\n }\n };\n }, []);\n\n return (\n <StyledFormDialog\n {...restProps}\n {...(heading === undefined ? { ariaLabel } : { labelledbyId: headingId })}\n arrow={arrow}\n target={target}\n progress={progress}\n ref={dialogRef}\n >\n {heading !== undefined && (\n <Flex\n container={{ alignItems: 'center', justify: 'between', pad: 2 }}\n item={{ shrink: 0 }}\n as={StyledDialogHeader}\n >\n <Text id={headingId} variant='h2'>\n {heading}\n </Text>\n </Flex>\n )}\n\n <Flex item={{ grow: 1 }} as={StyledDialogContent}>\n {children && <StyledChildrenWrap>{children}</StyledChildrenWrap>}\n <Progress\n visible={!!progress}\n focusOnVisible\n placement={children ? 'local' : 'block'}\n message={typeof progress === 'string' ? progress : undefined}\n />\n </Flex>\n\n <Flex\n container={{ alignItems: 'center', justify: 'between', pad: 2 }}\n item={{ shrink: 0 }}\n as={StyledDialogFooter}\n >\n <Button\n onClick={() => {\n onCancelHandler();\n }}\n disabled={typeof onCancel !== 'function' ? onCancel.disabled : undefined}\n ref={cancelButtonRef}\n >\n {typeof onCancel !== 'function' && onCancel.text ? onCancel.text : t('cancel')}\n </Button>\n\n <Button\n variant='primary'\n onClick={() => {\n (typeof onSubmit !== 'function' ? onSubmit.handler : onSubmit)();\n }}\n disabled={typeof onSubmit !== 'function' ? onSubmit.disabled : undefined}\n >\n {typeof onSubmit !== 'function' && onSubmit.text ? onSubmit.text : t('submit')}\n </Button>\n </Flex>\n </StyledFormDialog>\n );\n }\n );\n\nexport default FormDialog;\n"]}
@@ -1,6 +1,5 @@
1
1
  import { FC, HTMLAttributes } from 'react';
2
2
  import { InfoDialogProps } from './Dialog.types';
3
- export declare const StyledInfoDialog: import("styled-components").StyledComponent<FC<import("./Dialog.types").DialogProps & HTMLAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
4
3
  declare const InfoDialog: FC<InfoDialogProps & HTMLAttributes<HTMLDivElement>>;
5
4
  export default InfoDialog;
6
5
  //# sourceMappingURL=InfoDialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InfoDialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/InfoDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,EAAE,EAAa,cAAc,EAAE,MAAM,OAAO,CAAC;AAoB3F,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,eAAO,MAAM,gBAAgB,6KAAmB,CAAC;AAEjD,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,GAAG,cAAc,CAAC,cAAc,CAAC,CAyFpE,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"InfoDialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/InfoDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,EAAE,EAAa,cAAc,EAAE,MAAM,OAAO,CAAC;AAiB3F,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,GAAG,cAAc,CAAC,cAAc,CAAC,CAgHpE,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,17 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, useRef, useEffect } from 'react';
3
- import styled from 'styled-components';
4
3
  import { useConsolidatedRef, useEscape, useFocusTrap, useI18n, useOuterEvent, useUID } from '../../hooks';
5
- import Button from '../Button';
6
4
  import Text from '../Text';
7
- import { CardContent, CardHeader } from '../Card';
8
5
  import Icon from '../Icon';
9
6
  import Progress from '../Progress';
10
- import VisuallyHiddenText from '../VisuallyHiddenText';
11
- import Dialog from './Dialog';
12
- import { StyledChildrenWrap } from './Dialog.styles';
13
- export const StyledInfoDialog = styled(Dialog) ``;
14
- const InfoDialog = forwardRef(({ target, heading, headingHidden = false, children, progress, onDismiss, ...restProps }, ref) => {
7
+ import Flex from '../Flex';
8
+ import SummaryItem from '../SummaryItem';
9
+ import { StyledChildrenWrap, StyledDialogContent, StyledDialogHeader } from './Dialog.styles';
10
+ import { StyledDismissButton, StyledInfoDialog } from './InfoDialog.styles';
11
+ const InfoDialog = forwardRef(({ target, heading: headingProp, children, progress: progressProp, onDismiss, ...restProps }, ref) => {
15
12
  const t = useI18n();
16
13
  const headingId = useUID();
17
14
  const dialogRef = useConsolidatedRef(ref);
@@ -24,10 +21,10 @@ const InfoDialog = forwardRef(({ target, heading, headingHidden = false, childre
24
21
  });
25
22
  useFocusTrap(dialogRef);
26
23
  useEffect(() => {
27
- if (!progress) {
24
+ if (!progressProp) {
28
25
  closeButtonRef.current?.focus();
29
26
  }
30
- }, [progress]);
27
+ }, [progressProp]);
31
28
  useEffect(() => {
32
29
  return () => {
33
30
  if (document.contains(target)) {
@@ -35,9 +32,14 @@ const InfoDialog = forwardRef(({ target, heading, headingHidden = false, childre
35
32
  }
36
33
  };
37
34
  }, []);
38
- return (_jsxs(StyledInfoDialog, { ...restProps, target: target, labelledbyId: headingId, progress: progress, ref: dialogRef, children: [_jsx(CardHeader, { forwardedAs: 'div', actions: _jsx(Button, { icon: true, variant: 'simple', onClick: () => {
39
- onDismiss();
40
- }, label: t('close'), ref: closeButtonRef, children: _jsx(Icon, { name: 'times' }) }), children: headingHidden ? (_jsx(VisuallyHiddenText, { forwardedAs: 'h2', id: headingId, children: heading })) : (_jsx(Text, { id: headingId, variant: 'h2', children: heading })) }), _jsxs(CardContent, { children: [children && _jsx(StyledChildrenWrap, { children: children }), _jsx(Progress, { visible: !!progress, focusOnVisible: true, placement: children ? 'local' : 'block', message: typeof progress === 'string' ? progress : undefined })] })] }));
35
+ const heading = headingProp ? (_jsx(Text, { id: headingId, variant: 'h2', children: typeof headingProp === 'string' ? headingProp : headingProp.primary })) : null;
36
+ const progress = (_jsx(Progress, { visible: !!progressProp, focusOnVisible: true, placement: children ? 'local' : 'block', message: typeof progressProp === 'string' ? progressProp : undefined }));
37
+ const dismissButton = (_jsx(StyledDismissButton, { icon: true, variant: 'simple', onClick: () => {
38
+ onDismiss();
39
+ }, label: t('close'), ref: closeButtonRef, children: _jsx(Icon, { name: 'times' }) }));
40
+ return (_jsxs(StyledInfoDialog, { ...restProps, ...(typeof headingProp === 'string'
41
+ ? { labelledbyId: headingId }
42
+ : { ariaLabel: headingProp?.primary }), arrow: true, target: target, progress: progressProp, ref: dialogRef, children: [headingProp && heading && (_jsxs(Flex, { container: { alignItems: 'center', justify: 'between', pad: 2 }, item: { shrink: 0 }, as: StyledDialogHeader, children: [typeof headingProp === 'string' ? (heading) : (_jsx(SummaryItem, { primary: heading, secondary: headingProp.secondary ? (_jsx(Text, { variant: 'secondary', children: headingProp.secondary })) : undefined, visual: headingProp.visual })), dismissButton] })), _jsxs(Flex, { container: { direction: 'column' }, item: { grow: 1 }, as: StyledDialogContent, children: [!headingProp && dismissButton, children && _jsx(StyledChildrenWrap, { children: children }), progress] })] }));
41
43
  });
42
44
  export default InfoDialog;
43
45
  //# sourceMappingURL=InfoDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InfoDialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/InfoDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,EAAM,SAAS,EAAkB,MAAM,OAAO,CAAC;AAC3F,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,YAAY,EACZ,OAAO,EACP,aAAa,EACb,MAAM,EACP,MAAM,aAAa,CAAC;AACrB,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,UA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AK,EAAE,CAAC;aAChB;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,MAAC,gBAAgB,OACX,SAAS,EACb,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,SAAS,EACvB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,SAAS,aAEd,KAAC,UAAU,IACT,WAAW,EAAC,KAAK,EACjB,OAAO,EACL,KAAC,MAAM,IACL,IAAI,QACJ,OAAO,EAAC,QAAQ,EAChB,OAAO,EAAE,GAAG,EAAE;wBACZ,SAAS,EAAE,CAAC;oBACd,CAAC,EACD,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,EACjB,GAAG,EAAE,cAAc,YAEnB,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GACd,YAGV,aAAa,CAAC,CAAC,CAAC,CACf,KAAC,kBAAkB,IAAC,WAAW,EAAC,IAAI,EAAC,EAAE,EAAE,SAAS,YAC/C,OAAO,GACW,CACtB,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAC,IAAI,YAC9B,OAAO,GACH,CACR,GACU,EAEb,MAAC,WAAW,eACT,QAAQ,IAAI,KAAC,kBAAkB,cAAE,QAAQ,GAAsB,EAChE,KAAC,QAAQ,IACP,OAAO,EAAE,CAAC,CAAC,QAAQ,EACnB,cAAc,QACd,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EACvC,OAAO,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,GAC5D,IACU,IACG,CACpB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { forwardRef, PropsWithoutRef, useRef, FC, useEffect, HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nimport {\n useConsolidatedRef,\n useEscape,\n useFocusTrap,\n useI18n,\n useOuterEvent,\n useUID\n} from '../../hooks';\nimport Button from '../Button';\nimport Text from '../Text';\nimport { CardContent, CardHeader } from '../Card';\nimport Icon from '../Icon';\nimport Progress from '../Progress';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\n\nimport Dialog from './Dialog';\nimport { StyledChildrenWrap } from './Dialog.styles';\nimport { InfoDialogProps } from './Dialog.types';\n\nexport const StyledInfoDialog = styled(Dialog)``;\n\nconst InfoDialog: FC<InfoDialogProps & HTMLAttributes<HTMLDivElement>> = forwardRef(\n (\n {\n target,\n heading,\n headingHidden = false,\n children,\n progress,\n onDismiss,\n ...restProps\n }: PropsWithoutRef<InfoDialogProps>,\n ref: InfoDialogProps['ref']\n ) => {\n const t = useI18n();\n const headingId = useUID();\n const dialogRef = useConsolidatedRef(ref);\n const closeButtonRef = useRef<HTMLButtonElement>(null);\n\n useEscape(() => {\n onDismiss?.();\n });\n\n useOuterEvent('mousedown', [target, dialogRef], () => {\n onDismiss?.();\n });\n\n useFocusTrap(dialogRef);\n\n useEffect(() => {\n if (!progress) {\n closeButtonRef.current?.focus();\n }\n }, [progress]);\n\n useEffect(() => {\n return () => {\n if (document.contains(target)) {\n target.focus();\n }\n };\n }, []);\n\n return (\n <StyledInfoDialog\n {...restProps}\n target={target}\n labelledbyId={headingId}\n progress={progress}\n ref={dialogRef}\n >\n <CardHeader\n forwardedAs='div'\n actions={\n <Button\n icon\n variant='simple'\n onClick={() => {\n onDismiss();\n }}\n label={t('close')}\n ref={closeButtonRef}\n >\n <Icon name='times' />\n </Button>\n }\n >\n {headingHidden ? (\n <VisuallyHiddenText forwardedAs='h2' id={headingId}>\n {heading}\n </VisuallyHiddenText>\n ) : (\n <Text id={headingId} variant='h2'>\n {heading}\n </Text>\n )}\n </CardHeader>\n\n <CardContent>\n {children && <StyledChildrenWrap>{children}</StyledChildrenWrap>}\n <Progress\n visible={!!progress}\n focusOnVisible\n placement={children ? 'local' : 'block'}\n message={typeof progress === 'string' ? progress : undefined}\n />\n </CardContent>\n </StyledInfoDialog>\n );\n }\n);\n\nexport default InfoDialog;\n"]}
1
+ {"version":3,"file":"InfoDialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/InfoDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,EAAM,SAAS,EAAkB,MAAM,OAAO,CAAC;AAE3F,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,YAAY,EACZ,OAAO,EACP,aAAa,EACb,MAAM,EACP,MAAM,aAAa,CAAC;AACrB,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE9F,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,UAAU,GAAyD,UAAU,CACjF,CACE,EACE,MAAM,EACN,OAAO,EAAE,WAAW,EACpB,QAAQ,EACR,QAAQ,EAAE,YAAY,EACtB,SAAS,EACT,GAAG,SAAS,EACqB,EACnC,GAA2B,EAC3B,EAAE;IACF,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;IAC3B,MAAM,SAAS,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAC1C,MAAM,cAAc,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAEvD,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,EAAE,EAAE,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,aAAa,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE;QACnD,SAAS,EAAE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{\n useConsolidatedRef,\n useEscape,\n useFocusTrap,\n useI18n,\n useOuterEvent,\n useUID\n} from '../../hooks';\nimport Text from '../Text';\nimport Icon from '../Icon';\nimport Progress from '../Progress';\nimport Flex from '../Flex';\nimport SummaryItem from '../SummaryItem';\n\nimport { StyledChildrenWrap, StyledDialogContent, StyledDialogHeader } from './Dialog.styles';\nimport { InfoDialogProps } from './Dialog.types';\nimport { StyledDismissButton, StyledInfoDialog } from './InfoDialog.styles';\n\nconst InfoDialog: FC<InfoDialogProps & HTMLAttributes<HTMLDivElement>> = forwardRef(\n (\n {\n target,\n heading: headingProp,\n children,\n progress: progressProp,\n onDismiss,\n ...restProps\n }: PropsWithoutRef<InfoDialogProps>,\n ref: InfoDialogProps['ref']\n ) => {\n const t = useI18n();\n const headingId = useUID();\n const dialogRef = useConsolidatedRef(ref);\n const closeButtonRef = useRef<HTMLButtonElement>(null);\n\n useEscape(() => {\n onDismiss?.();\n });\n\n useOuterEvent('mousedown', [target, dialogRef], () => {\n onDismiss?.();\n });\n\n useFocusTrap(dialogRef);\n\n useEffect(() => {\n if (!progressProp) {\n closeButtonRef.current?.focus();\n }\n }, [progressProp]);\n\n useEffect(() => {\n return () => {\n if (document.contains(target)) {\n target.focus();\n }\n };\n }, []);\n\n const heading = headingProp ? (\n <Text id={headingId} variant='h2'>\n {typeof headingProp === 'string' ? headingProp : headingProp.primary}\n </Text>\n ) : null;\n\n const progress = (\n <Progress\n visible={!!progressProp}\n focusOnVisible\n placement={children ? 'local' : 'block'}\n message={typeof progressProp === 'string' ? progressProp : undefined}\n />\n );\n\n const dismissButton = (\n <StyledDismissButton\n icon\n variant='simple'\n onClick={() => {\n onDismiss();\n }}\n label={t('close')}\n ref={closeButtonRef}\n >\n <Icon name='times' />\n </StyledDismissButton>\n );\n\n return (\n <StyledInfoDialog\n {...restProps}\n {...(typeof headingProp === 'string'\n ? { labelledbyId: headingId }\n : { ariaLabel: headingProp?.primary })}\n arrow\n target={target}\n progress={progressProp}\n ref={dialogRef}\n >\n {headingProp && heading && (\n <Flex\n container={{ alignItems: 'center', justify: 'between', pad: 2 }}\n item={{ shrink: 0 }}\n as={StyledDialogHeader}\n >\n {typeof headingProp === 'string' ? (\n heading\n ) : (\n <SummaryItem\n primary={heading}\n secondary={\n headingProp.secondary ? (\n <Text variant='secondary'>{headingProp.secondary}</Text>\n ) : undefined\n }\n visual={headingProp.visual}\n />\n )}\n {dismissButton}\n </Flex>\n )}\n\n <Flex container={{ direction: 'column' }} item={{ grow: 1 }} as={StyledDialogContent}>\n {!headingProp && dismissButton}\n {children && <StyledChildrenWrap>{children}</StyledChildrenWrap>}\n {progress}\n </Flex>\n </StyledInfoDialog>\n );\n }\n);\n\nexport default InfoDialog;\n"]}
@@ -0,0 +1,6 @@
1
+ export declare const StyledDismissButton: import("styled-components").StyledComponent<import("react").FunctionComponent<import("../Button").ButtonProps & import("../..").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const StyledInfoDialog: import("styled-components").StyledComponent<import("react").FC<import("./Dialog.types").BaseDialogProps & {
3
+ labelledbyId?: string | undefined;
4
+ ariaLabel?: string | undefined;
5
+ } & import("react").HTMLAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
6
+ //# sourceMappingURL=InfoDialog.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoDialog.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/InfoDialog.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,mBAAmB,qMAAmB,CAAC;AAEpD,eAAO,MAAM,gBAAgB;;;yGAS3B,CAAC"}
@@ -0,0 +1,18 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { defaultThemeProp } from '../../theme';
3
+ import Button from '../Button';
4
+ import Dialog from './Dialog';
5
+ import { StyledDialogContent } from './Dialog.styles';
6
+ export const StyledDismissButton = styled(Button) ``;
7
+ export const StyledInfoDialog = styled(Dialog)(({ theme }) => {
8
+ return css `
9
+ /* When a header is not rendered(e.g. progress state) the button must positioned atop. */
10
+ ${StyledDialogContent} > ${StyledDismissButton} {
11
+ position: relative;
12
+ z-index: calc(${theme.base['z-index'].backdrop} + 1);
13
+ align-self: end;
14
+ }
15
+ `;
16
+ });
17
+ StyledInfoDialog.defaultProps = defaultThemeProp;
18
+ //# sourceMappingURL=InfoDialog.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoDialog.styles.js","sourceRoot":"","sources":["../../../src/components/Dialog/InfoDialog.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA,EAAE,CAAC;AAEpD,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3D,OAAO,GAAG,CAAA;;MAEN,mBAAmB,MAAM,mBAAmB;;sBAE5B,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ;;;GAGjD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport Button from '../Button';\n\nimport Dialog from './Dialog';\nimport { StyledDialogContent } from './Dialog.styles';\n\nexport const StyledDismissButton = styled(Button)``;\n\nexport const StyledInfoDialog = styled(Dialog)(({ theme }) => {\n return css`\n /* When a header is not rendered(e.g. progress state) the button must positioned atop. */\n ${StyledDialogContent} > ${StyledDismissButton} {\n position: relative;\n z-index: calc(${theme.base['z-index'].backdrop} + 1);\n align-self: end;\n }\n `;\n});\n\nStyledInfoDialog.defaultProps = defaultThemeProp;\n"]}
@@ -230,7 +230,7 @@ const StyledEmojiPicker = styled.div(({ showFooter, theme: { base: { animation:
230
230
  .emoji-mart-emoji-native {
231
231
  /* stylelint-disable font-family-no-missing-generic-family-keyword */
232
232
  font-family: 'Segoe UI Emoji', 'Segoe UI Symbol', 'Segoe UI', 'Apple Color Emoji',
233
- 'Twemoji Mozilla', 'Noto Color Emoji', 'Android Emoji'; /* cSpell:disable-line */
233
+ 'Twemoji Mozilla', 'Noto Color Emoji', 'Android Emoji'; /* cspell:disable-line */
234
234
 
235
235
  /* stylelint-enable font-family-no-missing-generic-family-keyword */
236
236
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EmojiPicker.styles.js","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPicker.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAClC,CAAC,EACC,UAAU,EACV,KAAK,EAAE,EACL,IAAI,EAAE,EACJ,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAC5B,WAAW,EAAE,QAAQ,EACrB,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,UAAU,EACzB,aAAa,EAAE,UAAU,EACzB,OAAO,EACP,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAC9B,OAAO,EACP,eAAe,EAAE,YAAY,EAC7B,YAAY,EACb,EACD,UAAU,EAAE,EACV,cAAc,EAAE,EAAE,eAAe,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iCAOxB,OAAO;;;;mBAIrB,YAAY,CAAC,eAAe,CAAC;;;;;;;iBAO/B,kBAAkB;qBACd,SAAS,CAAC,GAAG;gCACF,OAAO,iBAAiB,OAAO;;;;4BAInC,OAAO,CAAC,oBAAoB,CAAC;;;;;;;gCAOzB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;UAyB7B,YAAY;;;;;;;;;;;;;;;;;;;;;;;;KAwBjB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,eAAe,iBAAiB,CAAC","sourcesContent":["import { hideVisually, transparentize } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { getHoverColors, calculateFontSize } from '../../styles';\nimport { defaultThemeProp } from '../../theme';\n\nconst StyledEmojiPicker = styled.div<{ showFooter: boolean }>(\n ({\n showFooter,\n theme: {\n base: {\n animation: { speed, timing },\n 'font-size': fontSize,\n 'font-scale': fontScale,\n 'font-family': fontFamily,\n 'font-weight': fontWeight,\n palette,\n shadow: { focus: focusShadow },\n spacing,\n 'border-radius': borderRadius,\n transparency\n },\n components: {\n 'search-input': { 'border-radius': searchInputRadius }\n }\n }\n }) => {\n const hoverColor = getHoverColors(palette['primary-background']).background;\n const secondaryTextColor = transparentize(\n 1 - transparency['transparent-2'],\n palette['foreground-color']\n );\n\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n border-radius: inherit;\n\n /* stylelint-disable no-descending-specificity */\n\n /* stylelint-disable no-duplicate-selectors */\n\n /* stylelint-disable selector-max-class */\n\n .emoji-mart,\n .emoji-mart * {\n box-sizing: border-box;\n line-height: 1.15;\n }\n\n .emoji-mart {\n font-family: ${fontFamily};\n font-size: ${fontSizes.l};\n display: inline-block;\n color: ${palette['foreground-color']};\n border: 0.0625rem solid ${palette['border-line']};\n border-radius: inherit;\n background: ${palette['primary-background']};\n }\n\n .emoji-mart .emoji-mart-emoji {\n padding: calc(0.75 * ${spacing});\n }\n\n .emoji-mart-bar {\n border: 0 solid ${palette['border-line']};\n }\n .emoji-mart-bar:first-child {\n border-bottom-width: 0.0625rem;\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n .emoji-mart-bar:last-child {\n border-top-width: 0.0625rem;\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n ${!showFooter &&\n css`\n display: none;\n `}\n }\n\n .emoji-mart-anchors {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0 calc(0.75 * ${spacing});\n line-height: 0;\n }\n\n .emoji-mart-anchor {\n position: relative;\n display: block;\n flex: 1 1 auto;\n color: ${secondaryTextColor};\n text-align: center;\n padding: calc(1.5 * ${spacing}) calc(0.5 * ${spacing});\n overflow: hidden;\n transition: color calc(0.4 * ${speed}) ${timing['ease-out']};\n margin: 0;\n box-shadow: none;\n background: none;\n border: none;\n }\n .emoji-mart-anchor:focus {\n outline: 0;\n }\n .emoji-mart-anchor:hover,\n .emoji-mart-anchor:focus,\n .emoji-mart-anchor-selected {\n color: ${palette.interactive};\n }\n\n .emoji-mart-anchor-selected .emoji-mart-anchor-bar {\n bottom: 0;\n }\n\n .emoji-mart-anchor-bar {\n position: absolute;\n bottom: calc(-0.375 * ${spacing});\n left: 0;\n width: 100%;\n height: calc(0.375 * ${spacing});\n background-color: ${palette.interactive};\n }\n\n .emoji-mart-anchors i {\n display: inline-block;\n width: 100%;\n max-width: calc(2.75 * ${spacing});\n }\n\n .emoji-mart-anchors svg,\n .emoji-mart-anchors img {\n fill: currentColor;\n height: calc(2.25 * ${spacing});\n width: calc(2.25 * ${spacing});\n }\n\n .emoji-mart-scroll {\n overflow-y: scroll;\n overflow-x: hidden;\n height: 16.875rem;\n padding: 0 calc(0.75 * ${spacing});\n will-change: transform; /* avoids \"repaints on scroll\" in mobile Chrome */\n }\n\n .emoji-mart-search {\n padding: ${spacing};\n position: relative;\n }\n\n .emoji-mart-search input {\n font-size: ${fontSizes.l};\n color: ${palette['foreground-color']};\n display: block;\n width: 100%;\n padding: calc(0.625 * ${spacing}) calc(3.125 * ${spacing}) calc(0.75 * ${spacing})\n calc(1.25 * ${spacing});\n border-radius: calc(${borderRadius} * ${searchInputRadius});\n border: 0.0625rem solid ${palette['border-line']};\n background-color: ${palette['primary-background']};\n outline: 0;\n }\n\n .emoji-mart-search input:hover {\n border-color: ${palette['foreground-color']};\n }\n\n .emoji-mart-search input,\n .emoji-mart-search input::-webkit-search-decoration,\n .emoji-mart-search input::-webkit-search-cancel-button,\n .emoji-mart-search input::-webkit-search-results-button,\n .emoji-mart-search input::-webkit-search-results-decoration {\n /*\n remove webkit/blink styles for <input type=\"search\">\n via https://stackoverflow.com/a/9422689\n */\n -webkit-appearance: none;\n }\n\n .emoji-mart-search-icon {\n position: absolute;\n top: calc(1.875 * ${spacing});\n right: calc(2.25 * ${spacing});\n z-index: 2;\n border: none;\n background: none;\n }\n\n .emoji-mart-search-icon svg {\n fill: ${secondaryTextColor};\n }\n\n .emoji-mart-category .emoji-mart-emoji span {\n z-index: 1;\n position: relative;\n text-align: center;\n cursor: default;\n }\n\n .emoji-mart-category .emoji-mart-emoji:hover::before {\n z-index: 0;\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: ${hoverColor};\n border-radius: 100%;\n }\n\n .emoji-mart-category-label {\n z-index: 2;\n top: 0;\n\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: -webkit-sticky;\n position: sticky;\n\n /* stylelint-enable declaration-block-no-duplicate-properties */\n }\n\n .emoji-mart-category-label span {\n display: block;\n width: 100%;\n font-weight: ${fontWeight['semi-bold']};\n padding: ${spacing} calc(0.25 * ${spacing});\n background-color: ${transparentize(0.05, palette['primary-background'])};\n }\n\n .emoji-mart-category-list {\n margin: 0;\n padding: calc(0.375 * ${spacing}) 0;\n }\n\n .emoji-mart-category-list li {\n list-style: none;\n margin: 0;\n padding: 0;\n display: inline-block;\n }\n\n .emoji-mart-emoji {\n position: relative;\n display: inline-block;\n font-size: 0;\n margin: 0;\n padding: 0;\n border: none;\n background: none;\n box-shadow: none;\n }\n\n .emoji-mart-emoji-native {\n /* stylelint-disable font-family-no-missing-generic-family-keyword */\n font-family: 'Segoe UI Emoji', 'Segoe UI Symbol', 'Segoe UI', 'Apple Color Emoji',\n 'Twemoji Mozilla', 'Noto Color Emoji', 'Android Emoji'; /* cSpell:disable-line */\n\n /* stylelint-enable font-family-no-missing-generic-family-keyword */\n }\n\n .emoji-mart-category .emoji-mart-emoji:focus,\n .emoji-mart-category .emoji-mart-emoji-native:focus,\n .emoji-mart-skin:focus,\n .emoji-mart-search input:focus {\n outline: 0;\n border-color: transparent;\n box-shadow: ${focusShadow};\n }\n\n .emoji-mart-category .emoji-mart-emoji:focus,\n .emoji-mart-category .emoji-mart-emoji-native:focus {\n border-radius: 100%;\n }\n\n .emoji-mart-no-results {\n font-size: ${fontSizes.s};\n text-align: center;\n padding-top: 4.375rem;\n color: ${secondaryTextColor};\n }\n .emoji-mart-no-results-img {\n display: block;\n margin-left: auto;\n margin-right: auto;\n width: 50%;\n }\n .emoji-mart-no-results .emoji-mart-category-label {\n display: none;\n }\n .emoji-mart-no-results .emoji-mart-no-results-label {\n margin-top: 0.2em;\n }\n .emoji-mart-no-results .emoji-mart-emoji:hover::before {\n content: none;\n }\n\n .emoji-mart-preview {\n position: relative;\n min-height: 2.5rem;\n height: fit-content;\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n\n .emoji-mart-preview-emoji {\n left: calc(1.5 * ${spacing});\n }\n\n .emoji-mart-preview-data {\n left: calc(8.5 * ${spacing});\n right: calc(1.5 * ${spacing});\n word-break: break-all;\n flex: 1;\n }\n\n .emoji-mart-preview-skins {\n position: absolute;\n right: calc(3.75 * ${spacing});\n text-align: right;\n }\n\n .emoji-mart-preview-skins.custom {\n right: calc(1.25 * ${spacing});\n text-align: right;\n }\n\n .emoji-mart-preview-name {\n font-size: ${fontSizes.s};\n }\n\n .emoji-mart-preview-shortname {\n font-size: ${fontSizes.xxs};\n color: ${secondaryTextColor};\n }\n .emoji-mart-preview-shortname + .emoji-mart-preview-shortname,\n .emoji-mart-preview-shortname + .emoji-mart-preview-emoticon,\n .emoji-mart-preview-emoticon + .emoji-mart-preview-emoticon {\n margin-left: 0.5em;\n }\n\n .emoji-mart-preview-emoticon {\n font-size: ${fontSizes.xxs};\n color: ${secondaryTextColor};\n }\n\n .emoji-mart-title span {\n display: inline-block;\n vertical-align: middle;\n }\n\n .emoji-mart-title .emoji-mart-emoji {\n padding: 0;\n }\n\n .emoji-mart-title-label {\n color: ${secondaryTextColor};\n font-size: ${fontSizes.xxl};\n font-weight: ${fontWeight.normal};\n }\n\n .emoji-mart-skin-swatches {\n font-size: 0;\n padding: calc(0.25 * ${spacing}) 0;\n border: 0.0625rem solid ${palette['border-line']};\n border-radius: calc(1.5 * ${spacing});\n background-color: ${palette['secondary-background']};\n }\n\n .emoji-mart-skin-swatches.custom {\n font-size: 0;\n border: none;\n background-color: ${palette['secondary-background']};\n }\n\n .emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch {\n width: calc(2 * ${spacing});\n padding: 0 calc(0.25 * ${spacing});\n }\n\n .emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch.selected::after {\n opacity: ${transparency['transparent-2']};\n }\n\n .emoji-mart-skin-swatch {\n display: inline-block;\n width: 0;\n vertical-align: middle;\n transition-property: width, padding;\n transition-duration: calc(0.5 * ${speed});\n transition-timing-function: ${timing['ease-out']};\n }\n\n .emoji-mart-skin-swatch:nth-child(1) {\n transition-delay: 0s;\n }\n .emoji-mart-skin-swatch:nth-child(2) {\n transition-delay: 0.03s;\n }\n .emoji-mart-skin-swatch:nth-child(3) {\n transition-delay: 0.06s;\n }\n .emoji-mart-skin-swatch:nth-child(4) {\n transition-delay: 0.09s;\n }\n .emoji-mart-skin-swatch:nth-child(5) {\n transition-delay: 0.12s;\n }\n .emoji-mart-skin-swatch:nth-child(6) {\n transition-delay: 0.15s;\n }\n\n .emoji-mart-skin-swatch.selected {\n position: relative;\n width: calc(2 * ${spacing});\n padding: 0 calc(0.25 * ${spacing});\n }\n\n .emoji-mart-skin-swatch.selected::after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: calc(0.5 * ${spacing});\n height: calc(0.5 * ${spacing});\n margin: calc(-0.25 * ${spacing}) 0 0 calc(-0.25 * ${spacing});\n background-color: ${palette['primary-background']};\n border-radius: 100%;\n pointer-events: none;\n opacity: 0;\n transition: opacity ${speed} ${timing['ease-out']};\n }\n\n .emoji-mart-skin-swatch.custom {\n display: inline-block;\n width: 0;\n height: 2.375rem;\n overflow: hidden;\n vertical-align: middle;\n transition-property: width, height;\n transition-duration: calc(0.5 * ${speed});\n transition-timing-function: ${timing['ease-out']};\n cursor: default;\n }\n\n .emoji-mart-skin-swatch.custom.selected {\n position: relative;\n width: 2.25rem;\n height: 2.375rem;\n padding: 0 calc(0.25 * ${spacing}) 0 0;\n }\n\n .emoji-mart-skin-swatch.custom.selected::after {\n content: '';\n width: 0;\n height: 0;\n }\n\n .emoji-mart-skin-swatches.custom .emoji-mart-skin-swatch.custom:hover {\n background-color: ${palette['primary-background']};\n border-radius: 10%;\n }\n\n .emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom {\n width: 2.25rem;\n height: 2.375rem;\n padding: 0 calc(0.25 * ${spacing}) 0 0;\n }\n\n .emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom.selected::after {\n opacity: ${transparency['transparent-2']};\n }\n\n .emoji-mart-skin-text.opened {\n display: inline-block;\n vertical-align: middle;\n text-align: left;\n color: ${secondaryTextColor};\n font-size: ${fontSizes.xxs};\n padding: calc(0.625 * ${spacing}) calc(0.25 * ${spacing});\n width: 6rem;\n height: 2.5rem;\n border-radius: 10%;\n background-color: ${palette['primary-background']};\n }\n\n .emoji-mart-skin {\n display: inline-block;\n width: 100%;\n padding-top: 100%;\n max-width: calc(1.5 * ${spacing});\n border-radius: 100%;\n }\n\n .emoji-mart-skin-tone-1 {\n background-color: #ffc93a;\n }\n .emoji-mart-skin-tone-2 {\n background-color: #fadcbc;\n }\n .emoji-mart-skin-tone-3 {\n background-color: #e0bb95;\n }\n .emoji-mart-skin-tone-4 {\n background-color: #bf8f68;\n }\n .emoji-mart-skin-tone-5 {\n background-color: #9b643d;\n }\n .emoji-mart-skin-tone-6 {\n background-color: #594539;\n }\n\n /* For screen readers only */\n .emoji-mart-sr-only {\n ${hideVisually}\n }\n\n /*\n https://github.com/missive/emoji-mart/issues/319\n https://github.com/missive/emoji-mart/pull/442\n */\n .emoji-mart-emoji-native {\n height: var(--emoji-size);\n width: var(--emoji-size);\n position: relative;\n display: inline-block;\n box-sizing: content-box;\n vertical-align: bottom;\n }\n\n .emoji-mart-emoji-native > span {\n position: absolute !important;\n top: 50%;\n left: 50%;\n height: initial !important;\n width: initial !important;\n transform: translate(-50%, -50%);\n }\n `;\n }\n);\n\nStyledEmojiPicker.defaultProps = defaultThemeProp;\n\nexport default StyledEmojiPicker;\n"]}
1
+ {"version":3,"file":"EmojiPicker.styles.js","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPicker.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAClC,CAAC,EACC,UAAU,EACV,KAAK,EAAE,EACL,IAAI,EAAE,EACJ,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAC5B,WAAW,EAAE,QAAQ,EACrB,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,UAAU,EACzB,aAAa,EAAE,UAAU,EACzB,OAAO,EACP,MAAM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,CAAC;;;;;;;;;;0CAUf,KAAK;sCACT,MAAM,CAAC,UAAU,CAAC;;;;;;;;iCAQvB,OAAO;;;;;;;;;;4BAUZ,OAAO,CAAC,oBAAoB,CAAC;;;;;;;iCAOxB,OAAO;;;;mBAIrB,YAAY,CAAC,eAAe,CAAC;;;;;;;iBAO/B,kBAAkB;qBACd,SAAS,CAAC,GAAG;gCACF,OAAO,iBAAiB,OAAO;;;;4BAInC,OAAO,CAAC,oBAAoB,CAAC;;;;;;;gCAOzB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;UAyB7B,YAAY;;;;;;;;;;;;;;;;;;;;;;;;KAwBjB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,eAAe,iBAAiB,CAAC","sourcesContent":["import { hideVisually, transparentize } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { getHoverColors, calculateFontSize } from '../../styles';\nimport { defaultThemeProp } from '../../theme';\n\nconst StyledEmojiPicker = styled.div<{ showFooter: boolean }>(\n ({\n showFooter,\n theme: {\n base: {\n animation: { speed, timing },\n 'font-size': fontSize,\n 'font-scale': fontScale,\n 'font-family': fontFamily,\n 'font-weight': fontWeight,\n palette,\n shadow: { focus: focusShadow },\n spacing,\n 'border-radius': borderRadius,\n transparency\n },\n components: {\n 'search-input': { 'border-radius': searchInputRadius }\n }\n }\n }) => {\n const hoverColor = getHoverColors(palette['primary-background']).background;\n const secondaryTextColor = transparentize(\n 1 - transparency['transparent-2'],\n palette['foreground-color']\n );\n\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n border-radius: inherit;\n\n /* stylelint-disable no-descending-specificity */\n\n /* stylelint-disable no-duplicate-selectors */\n\n /* stylelint-disable selector-max-class */\n\n .emoji-mart,\n .emoji-mart * {\n box-sizing: border-box;\n line-height: 1.15;\n }\n\n .emoji-mart {\n font-family: ${fontFamily};\n font-size: ${fontSizes.l};\n display: inline-block;\n color: ${palette['foreground-color']};\n border: 0.0625rem solid ${palette['border-line']};\n border-radius: inherit;\n background: ${palette['primary-background']};\n }\n\n .emoji-mart .emoji-mart-emoji {\n padding: calc(0.75 * ${spacing});\n }\n\n .emoji-mart-bar {\n border: 0 solid ${palette['border-line']};\n }\n .emoji-mart-bar:first-child {\n border-bottom-width: 0.0625rem;\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n .emoji-mart-bar:last-child {\n border-top-width: 0.0625rem;\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n ${!showFooter &&\n css`\n display: none;\n `}\n }\n\n .emoji-mart-anchors {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0 calc(0.75 * ${spacing});\n line-height: 0;\n }\n\n .emoji-mart-anchor {\n position: relative;\n display: block;\n flex: 1 1 auto;\n color: ${secondaryTextColor};\n text-align: center;\n padding: calc(1.5 * ${spacing}) calc(0.5 * ${spacing});\n overflow: hidden;\n transition: color calc(0.4 * ${speed}) ${timing['ease-out']};\n margin: 0;\n box-shadow: none;\n background: none;\n border: none;\n }\n .emoji-mart-anchor:focus {\n outline: 0;\n }\n .emoji-mart-anchor:hover,\n .emoji-mart-anchor:focus,\n .emoji-mart-anchor-selected {\n color: ${palette.interactive};\n }\n\n .emoji-mart-anchor-selected .emoji-mart-anchor-bar {\n bottom: 0;\n }\n\n .emoji-mart-anchor-bar {\n position: absolute;\n bottom: calc(-0.375 * ${spacing});\n left: 0;\n width: 100%;\n height: calc(0.375 * ${spacing});\n background-color: ${palette.interactive};\n }\n\n .emoji-mart-anchors i {\n display: inline-block;\n width: 100%;\n max-width: calc(2.75 * ${spacing});\n }\n\n .emoji-mart-anchors svg,\n .emoji-mart-anchors img {\n fill: currentColor;\n height: calc(2.25 * ${spacing});\n width: calc(2.25 * ${spacing});\n }\n\n .emoji-mart-scroll {\n overflow-y: scroll;\n overflow-x: hidden;\n height: 16.875rem;\n padding: 0 calc(0.75 * ${spacing});\n will-change: transform; /* avoids \"repaints on scroll\" in mobile Chrome */\n }\n\n .emoji-mart-search {\n padding: ${spacing};\n position: relative;\n }\n\n .emoji-mart-search input {\n font-size: ${fontSizes.l};\n color: ${palette['foreground-color']};\n display: block;\n width: 100%;\n padding: calc(0.625 * ${spacing}) calc(3.125 * ${spacing}) calc(0.75 * ${spacing})\n calc(1.25 * ${spacing});\n border-radius: calc(${borderRadius} * ${searchInputRadius});\n border: 0.0625rem solid ${palette['border-line']};\n background-color: ${palette['primary-background']};\n outline: 0;\n }\n\n .emoji-mart-search input:hover {\n border-color: ${palette['foreground-color']};\n }\n\n .emoji-mart-search input,\n .emoji-mart-search input::-webkit-search-decoration,\n .emoji-mart-search input::-webkit-search-cancel-button,\n .emoji-mart-search input::-webkit-search-results-button,\n .emoji-mart-search input::-webkit-search-results-decoration {\n /*\n remove webkit/blink styles for <input type=\"search\">\n via https://stackoverflow.com/a/9422689\n */\n -webkit-appearance: none;\n }\n\n .emoji-mart-search-icon {\n position: absolute;\n top: calc(1.875 * ${spacing});\n right: calc(2.25 * ${spacing});\n z-index: 2;\n border: none;\n background: none;\n }\n\n .emoji-mart-search-icon svg {\n fill: ${secondaryTextColor};\n }\n\n .emoji-mart-category .emoji-mart-emoji span {\n z-index: 1;\n position: relative;\n text-align: center;\n cursor: default;\n }\n\n .emoji-mart-category .emoji-mart-emoji:hover::before {\n z-index: 0;\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: ${hoverColor};\n border-radius: 100%;\n }\n\n .emoji-mart-category-label {\n z-index: 2;\n top: 0;\n\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: -webkit-sticky;\n position: sticky;\n\n /* stylelint-enable declaration-block-no-duplicate-properties */\n }\n\n .emoji-mart-category-label span {\n display: block;\n width: 100%;\n font-weight: ${fontWeight['semi-bold']};\n padding: ${spacing} calc(0.25 * ${spacing});\n background-color: ${transparentize(0.05, palette['primary-background'])};\n }\n\n .emoji-mart-category-list {\n margin: 0;\n padding: calc(0.375 * ${spacing}) 0;\n }\n\n .emoji-mart-category-list li {\n list-style: none;\n margin: 0;\n padding: 0;\n display: inline-block;\n }\n\n .emoji-mart-emoji {\n position: relative;\n display: inline-block;\n font-size: 0;\n margin: 0;\n padding: 0;\n border: none;\n background: none;\n box-shadow: none;\n }\n\n .emoji-mart-emoji-native {\n /* stylelint-disable font-family-no-missing-generic-family-keyword */\n font-family: 'Segoe UI Emoji', 'Segoe UI Symbol', 'Segoe UI', 'Apple Color Emoji',\n 'Twemoji Mozilla', 'Noto Color Emoji', 'Android Emoji'; /* cspell:disable-line */\n\n /* stylelint-enable font-family-no-missing-generic-family-keyword */\n }\n\n .emoji-mart-category .emoji-mart-emoji:focus,\n .emoji-mart-category .emoji-mart-emoji-native:focus,\n .emoji-mart-skin:focus,\n .emoji-mart-search input:focus {\n outline: 0;\n border-color: transparent;\n box-shadow: ${focusShadow};\n }\n\n .emoji-mart-category .emoji-mart-emoji:focus,\n .emoji-mart-category .emoji-mart-emoji-native:focus {\n border-radius: 100%;\n }\n\n .emoji-mart-no-results {\n font-size: ${fontSizes.s};\n text-align: center;\n padding-top: 4.375rem;\n color: ${secondaryTextColor};\n }\n .emoji-mart-no-results-img {\n display: block;\n margin-left: auto;\n margin-right: auto;\n width: 50%;\n }\n .emoji-mart-no-results .emoji-mart-category-label {\n display: none;\n }\n .emoji-mart-no-results .emoji-mart-no-results-label {\n margin-top: 0.2em;\n }\n .emoji-mart-no-results .emoji-mart-emoji:hover::before {\n content: none;\n }\n\n .emoji-mart-preview {\n position: relative;\n min-height: 2.5rem;\n height: fit-content;\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n\n .emoji-mart-preview-emoji {\n left: calc(1.5 * ${spacing});\n }\n\n .emoji-mart-preview-data {\n left: calc(8.5 * ${spacing});\n right: calc(1.5 * ${spacing});\n word-break: break-all;\n flex: 1;\n }\n\n .emoji-mart-preview-skins {\n position: absolute;\n right: calc(3.75 * ${spacing});\n text-align: right;\n }\n\n .emoji-mart-preview-skins.custom {\n right: calc(1.25 * ${spacing});\n text-align: right;\n }\n\n .emoji-mart-preview-name {\n font-size: ${fontSizes.s};\n }\n\n .emoji-mart-preview-shortname {\n font-size: ${fontSizes.xxs};\n color: ${secondaryTextColor};\n }\n .emoji-mart-preview-shortname + .emoji-mart-preview-shortname,\n .emoji-mart-preview-shortname + .emoji-mart-preview-emoticon,\n .emoji-mart-preview-emoticon + .emoji-mart-preview-emoticon {\n margin-left: 0.5em;\n }\n\n .emoji-mart-preview-emoticon {\n font-size: ${fontSizes.xxs};\n color: ${secondaryTextColor};\n }\n\n .emoji-mart-title span {\n display: inline-block;\n vertical-align: middle;\n }\n\n .emoji-mart-title .emoji-mart-emoji {\n padding: 0;\n }\n\n .emoji-mart-title-label {\n color: ${secondaryTextColor};\n font-size: ${fontSizes.xxl};\n font-weight: ${fontWeight.normal};\n }\n\n .emoji-mart-skin-swatches {\n font-size: 0;\n padding: calc(0.25 * ${spacing}) 0;\n border: 0.0625rem solid ${palette['border-line']};\n border-radius: calc(1.5 * ${spacing});\n background-color: ${palette['secondary-background']};\n }\n\n .emoji-mart-skin-swatches.custom {\n font-size: 0;\n border: none;\n background-color: ${palette['secondary-background']};\n }\n\n .emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch {\n width: calc(2 * ${spacing});\n padding: 0 calc(0.25 * ${spacing});\n }\n\n .emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch.selected::after {\n opacity: ${transparency['transparent-2']};\n }\n\n .emoji-mart-skin-swatch {\n display: inline-block;\n width: 0;\n vertical-align: middle;\n transition-property: width, padding;\n transition-duration: calc(0.5 * ${speed});\n transition-timing-function: ${timing['ease-out']};\n }\n\n .emoji-mart-skin-swatch:nth-child(1) {\n transition-delay: 0s;\n }\n .emoji-mart-skin-swatch:nth-child(2) {\n transition-delay: 0.03s;\n }\n .emoji-mart-skin-swatch:nth-child(3) {\n transition-delay: 0.06s;\n }\n .emoji-mart-skin-swatch:nth-child(4) {\n transition-delay: 0.09s;\n }\n .emoji-mart-skin-swatch:nth-child(5) {\n transition-delay: 0.12s;\n }\n .emoji-mart-skin-swatch:nth-child(6) {\n transition-delay: 0.15s;\n }\n\n .emoji-mart-skin-swatch.selected {\n position: relative;\n width: calc(2 * ${spacing});\n padding: 0 calc(0.25 * ${spacing});\n }\n\n .emoji-mart-skin-swatch.selected::after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: calc(0.5 * ${spacing});\n height: calc(0.5 * ${spacing});\n margin: calc(-0.25 * ${spacing}) 0 0 calc(-0.25 * ${spacing});\n background-color: ${palette['primary-background']};\n border-radius: 100%;\n pointer-events: none;\n opacity: 0;\n transition: opacity ${speed} ${timing['ease-out']};\n }\n\n .emoji-mart-skin-swatch.custom {\n display: inline-block;\n width: 0;\n height: 2.375rem;\n overflow: hidden;\n vertical-align: middle;\n transition-property: width, height;\n transition-duration: calc(0.5 * ${speed});\n transition-timing-function: ${timing['ease-out']};\n cursor: default;\n }\n\n .emoji-mart-skin-swatch.custom.selected {\n position: relative;\n width: 2.25rem;\n height: 2.375rem;\n padding: 0 calc(0.25 * ${spacing}) 0 0;\n }\n\n .emoji-mart-skin-swatch.custom.selected::after {\n content: '';\n width: 0;\n height: 0;\n }\n\n .emoji-mart-skin-swatches.custom .emoji-mart-skin-swatch.custom:hover {\n background-color: ${palette['primary-background']};\n border-radius: 10%;\n }\n\n .emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom {\n width: 2.25rem;\n height: 2.375rem;\n padding: 0 calc(0.25 * ${spacing}) 0 0;\n }\n\n .emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom.selected::after {\n opacity: ${transparency['transparent-2']};\n }\n\n .emoji-mart-skin-text.opened {\n display: inline-block;\n vertical-align: middle;\n text-align: left;\n color: ${secondaryTextColor};\n font-size: ${fontSizes.xxs};\n padding: calc(0.625 * ${spacing}) calc(0.25 * ${spacing});\n width: 6rem;\n height: 2.5rem;\n border-radius: 10%;\n background-color: ${palette['primary-background']};\n }\n\n .emoji-mart-skin {\n display: inline-block;\n width: 100%;\n padding-top: 100%;\n max-width: calc(1.5 * ${spacing});\n border-radius: 100%;\n }\n\n .emoji-mart-skin-tone-1 {\n background-color: #ffc93a;\n }\n .emoji-mart-skin-tone-2 {\n background-color: #fadcbc;\n }\n .emoji-mart-skin-tone-3 {\n background-color: #e0bb95;\n }\n .emoji-mart-skin-tone-4 {\n background-color: #bf8f68;\n }\n .emoji-mart-skin-tone-5 {\n background-color: #9b643d;\n }\n .emoji-mart-skin-tone-6 {\n background-color: #594539;\n }\n\n /* For screen readers only */\n .emoji-mart-sr-only {\n ${hideVisually}\n }\n\n /*\n https://github.com/missive/emoji-mart/issues/319\n https://github.com/missive/emoji-mart/pull/442\n */\n .emoji-mart-emoji-native {\n height: var(--emoji-size);\n width: var(--emoji-size);\n position: relative;\n display: inline-block;\n box-sizing: content-box;\n vertical-align: bottom;\n }\n\n .emoji-mart-emoji-native > span {\n position: absolute !important;\n top: 50%;\n left: 50%;\n height: initial !important;\n width: initial !important;\n transform: translate(-50%, -50%);\n }\n `;\n }\n);\n\nStyledEmojiPicker.defaultProps = defaultThemeProp;\n\nexport default StyledEmojiPicker;\n"]}
@@ -2,14 +2,16 @@ import { ReactNode, FunctionComponent } from 'react';
2
2
  import { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';
3
3
  export type FieldValueVariant = 'inline' | 'stacked';
4
4
  export interface FieldValueListItemProps extends TestIdProp {
5
- id?: string;
6
5
  name: string;
7
6
  value?: ReactNode;
8
7
  variant?: FieldValueVariant;
9
8
  }
9
+ export interface FieldValueListItem extends FieldValueListItemProps {
10
+ id?: string;
11
+ }
10
12
  export interface FieldValueListProps extends BaseProps, NoChildrenProp, TestIdProp {
11
13
  /** The set of field values to render in the list. */
12
- fields: FieldValueListItemProps[];
14
+ fields: FieldValueListItem[];
13
15
  /**
14
16
  * Determines if the field and values should be displayed on the same line, or stacked with the field above the value.
15
17
  * @default "inline"
@@ -1 +1 @@
1
- {"version":3,"file":"FieldValueList.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAY,iBAAiB,EAAmB,MAAM,OAAO,CAAC;AAGhF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AASlF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErD,MAAM,WAAW,uBAAwB,SAAQ,UAAU;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAoB,SAAQ,SAAS,EAAE,cAAc,EAAE,UAAU;IAChF,qDAAqD;IACrD,MAAM,EAAE,uBAAuB,EAAE,CAAC;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,GAAG,kBAAkB,CAAC;CAClD;AAED,eAAO,MAAM,eAAe,wGAE3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,wGAE5B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC;AAE7E,eAAO,MAAM,oBAAoB,+HAuB/B,CAAC;AAIH,eAAO,MAAM,uBAAuB,yGAAe,CAAC;AAEpD,eAAO,MAAM,cAAc,qCAKxB,uBAAuB,gBAsBzB,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,GAAG,YAAY,CA+CzE,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"FieldValueList.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAm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AAC,CAAC,CAAC;YAC9C,MAAM,EAAE,OAAO,KAAK,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;SACjD,EACD,EAAE,EAAE,oBAAoB,EACxB,OAAO,EAAE,OAAO,YAEf,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;YACzD,OAAO,CACL,KAAC,cAAc,IACb,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EACL,CAAC,YAAY,IAAI,OAAO,CAAC,KAAK,SAAS,IAAI,CAAC,uBAAuB;oBACjE,CAAC,CAAC,SAAS;oBACX,CAAC,CAAC,QAAQ,IAET,EAAE,IAAI,IAAI,CACf,CACH,CAAC;QACJ,CAAC,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { ReactNode, Fragment, FunctionComponent, Ref, forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';\nimport Grid from '../Grid';\nimport { StyledLabel } from '../Label';\nimport { useBreakpoint, useConsolidatedRef, useTestIds } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport ShowMoreLess from '../ShowMoreLess';\n\nimport { getFieldValueListTestIds, getFieldValueItemTestIds } from './FieldValueList.test-ids';\n\nexport type FieldValueVariant = 'inline' | 'stacked';\n\nexport interface FieldValueListItemProps extends TestIdProp {\n id?: string;\n name: string;\n value?: ReactNode;\n variant?: FieldValueVariant;\n}\n\nexport interface FieldValueListProps extends BaseProps, NoChildrenProp, TestIdProp {\n /** The set of field values to render in the list. */\n fields: FieldValueListItemProps[];\n /**\n * Determines if the field and values should be displayed on the same line, or stacked with the field above the value.\n * @default \"inline\"\n */\n variant?: FieldValueVariant | 'value-comparison';\n}\n\nexport const StyledFieldName = styled.dt`\n word-break: break-word;\n`;\n\nexport const StyledFieldValue = styled.dd`\n word-break: break-word;\n`;\n\nexport type StyledFieldValueListProps = Pick<FieldValueListProps, 'variant'>;\n\nexport const StyledFieldValueList = styled.dl<StyledFieldValueListProps>(({ variant, theme }) => {\n return css`\n width: 100%;\n\n ${variant === 'value-comparison' &&\n css`\n dt {\n width: 100%;\n }\n dd {\n text-align: end;\n padding-inline-start: calc(2 * ${theme.base.spacing});\n }\n ${StyledLabel} {\n max-width: unset;\n }\n dd:not(:last-of-type),\n dt:not(:last-of-type) {\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n padding-bottom: calc(0.5 * ${theme.base.spacing});\n }\n `}\n `;\n});\n\nStyledFieldValueList.defaultProps = defaultThemeProp;\n\nexport const StyledStackedFieldValue = styled.div``;\n\nexport const FieldValueItem = ({\n testId,\n name,\n value,\n variant = 'inline'\n}: FieldValueListItemProps) => {\n const testIds = useTestIds(testId, getFieldValueItemTestIds);\n\n const displayValue =\n typeof value === 'string' ? <ShowMoreLess lines={3}>{value}</ShowMoreLess> : value;\n\n const labelAndValue = (\n <>\n <StyledLabel data-testid={testIds.name} as={StyledFieldName}>\n {name}\n </StyledLabel>\n <StyledFieldValue data-testid={testIds.value}>\n {value ? displayValue : <span aria-hidden='true'>&ndash;&ndash;</span>}\n </StyledFieldValue>\n </>\n );\n\n return variant === 'stacked' ? (\n <StyledStackedFieldValue data-testid={testIds.root}>{labelAndValue}</StyledStackedFieldValue>\n ) : (\n <>{labelAndValue}</>\n );\n};\n\nconst FieldValueList: FunctionComponent<FieldValueListProps & ForwardProps> = forwardRef(\n (\n { testId, fields, variant = 'inline', ...restProps }: FieldValueListProps,\n ref: Ref<HTMLDivElement>\n ) => {\n const testIds = useTestIds(testId, getFieldValueListTestIds);\n\n const fieldValueListRef = useConsolidatedRef<HTMLDivElement>(ref);\n\n const isXSContentWidthOrAbove = useBreakpoint('xs', {\n breakpointRef: fieldValueListRef,\n themeProp: 'content-width'\n });\n\n return (\n <Grid\n data-testid={testIds.root}\n {...restProps}\n ref={fieldValueListRef}\n container={{\n cols:\n ['inline', 'value-comparison'].includes(variant) && isXSContentWidthOrAbove\n ? '16ch minmax(0, 1fr)'\n : 'minmax(0, 1fr)',\n colGap: variant !== 'value-comparison' ? 2 : 0,\n rowGap: variant !== 'value-comparison' ? 1 : 0.5\n }}\n as={StyledFieldValueList}\n variant={variant}\n >\n {fields.map(({ id, name, value, variant: fieldVariant }) => {\n return (\n <FieldValueItem\n name={name}\n value={value}\n variant={\n (fieldVariant ?? variant) === 'stacked' || !isXSContentWidthOrAbove\n ? 'stacked'\n : 'inline'\n }\n key={id ?? name}\n />\n );\n })}\n </Grid>\n );\n }\n);\n\nexport default FieldValueList;\n"]}
1
+ {"version":3,"file":"FieldValueList.js","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqC,UAAU,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAwB/F,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,EAAE,CAAA;;CAEvC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,EAAE,CAAA;;CAExC,CAAC;AAIF,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,EAAE,CAA4B,CAAC,EAAE,OAAO,EAAE,KAAK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,GACG,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { ReactNode, FunctionComponent, Ref, forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';\nimport Grid from '../Grid';\nimport { StyledLabel } from '../Label';\nimport { useBreakpoint, useConsolidatedRef, useTestIds } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport ShowMoreLess from '../ShowMoreLess';\n\nimport { getFieldValueListTestIds, getFieldValueItemTestIds } from './FieldValueList.test-ids';\n\nexport type FieldValueVariant = 'inline' | 'stacked';\n\nexport interface FieldValueListItemProps extends TestIdProp {\n name: string;\n value?: ReactNode;\n variant?: FieldValueVariant;\n}\n\nexport interface FieldValueListItem extends FieldValueListItemProps {\n id?: string;\n}\n\nexport interface FieldValueListProps extends BaseProps, NoChildrenProp, TestIdProp {\n /** The set of field values to render in the list. */\n fields: FieldValueListItem[];\n /**\n * Determines if the field and values should be displayed on the same line, or stacked with the field above the value.\n * @default \"inline\"\n */\n variant?: FieldValueVariant | 'value-comparison';\n}\n\nexport const StyledFieldName = styled.dt`\n word-break: break-word;\n`;\n\nexport const StyledFieldValue = styled.dd`\n word-break: break-word;\n`;\n\nexport type StyledFieldValueListProps = Pick<FieldValueListProps, 'variant'>;\n\nexport const StyledFieldValueList = styled.dl<StyledFieldValueListProps>(({ variant, theme }) => {\n return css`\n width: 100%;\n\n ${variant === 'value-comparison' &&\n css`\n dt {\n width: 100%;\n }\n dd {\n text-align: end;\n padding-inline-start: calc(2 * ${theme.base.spacing});\n }\n ${StyledLabel} {\n max-width: unset;\n }\n dd:not(:last-of-type),\n dt:not(:last-of-type) {\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n padding-bottom: calc(0.5 * ${theme.base.spacing});\n }\n `}\n `;\n});\n\nStyledFieldValueList.defaultProps = defaultThemeProp;\n\nexport const StyledStackedFieldValue = styled.div``;\n\nexport const FieldValueItem = ({\n testId,\n name,\n value,\n variant = 'inline'\n}: FieldValueListItemProps) => {\n const testIds = useTestIds(testId, getFieldValueItemTestIds);\n\n const displayValue =\n typeof value === 'string' ? <ShowMoreLess lines={3}>{value}</ShowMoreLess> : value;\n\n const labelAndValue = (\n <>\n <StyledLabel data-testid={testIds.name} as={StyledFieldName}>\n {name}\n </StyledLabel>\n <StyledFieldValue data-testid={testIds.value}>\n {value ? displayValue : <span aria-hidden='true'>&ndash;&ndash;</span>}\n </StyledFieldValue>\n </>\n );\n\n return variant === 'stacked' ? (\n <StyledStackedFieldValue data-testid={testIds.root}>{labelAndValue}</StyledStackedFieldValue>\n ) : (\n <>{labelAndValue}</>\n );\n};\n\nconst FieldValueList: FunctionComponent<FieldValueListProps & ForwardProps> = forwardRef(\n (\n { testId, fields, variant = 'inline', ...restProps }: FieldValueListProps,\n ref: Ref<HTMLDivElement>\n ) => {\n const testIds = useTestIds(testId, getFieldValueListTestIds);\n\n const fieldValueListRef = useConsolidatedRef<HTMLDivElement>(ref);\n\n const isXSContentWidthOrAbove = useBreakpoint('xs', {\n breakpointRef: fieldValueListRef,\n themeProp: 'content-width'\n });\n\n return (\n <Grid\n data-testid={testIds.root}\n {...restProps}\n ref={fieldValueListRef}\n container={{\n cols:\n ['inline', 'value-comparison'].includes(variant) && isXSContentWidthOrAbove\n ? '16ch minmax(0, 1fr)'\n : 'minmax(0, 1fr)',\n colGap: variant !== 'value-comparison' ? 2 : 0,\n rowGap: variant !== 'value-comparison' ? 1 : 0.5\n }}\n as={StyledFieldValueList}\n variant={variant}\n >\n {fields.map(({ id, name, value, variant: fieldVariant }) => {\n return (\n <FieldValueItem\n name={name}\n value={value}\n variant={\n (fieldVariant ?? variant) === 'stacked' || !isXSContentWidthOrAbove\n ? 'stacked'\n : 'inline'\n }\n key={id ?? name}\n />\n );\n })}\n </Grid>\n );\n }\n);\n\nexport default FieldValueList;\n"]}
@@ -1,3 +1,3 @@
1
- export declare const getFieldValueListTestIds: (testIdProp?: string | undefined) => import("../../utils").TestIdsRecord<readonly []>;
2
- export declare const getFieldValueItemTestIds: (testIdProp?: string | undefined) => import("../../utils").TestIdsRecord<readonly ["name", "value"]>;
1
+ export declare const getFieldValueListTestIds: (testIdProp?: string | undefined) => import("../..").TestIdsRecord<readonly []>;
2
+ export declare const getFieldValueItemTestIds: (testIdProp?: string | undefined) => import("../..").TestIdsRecord<readonly ["name", "value"]>;
3
3
  //# sourceMappingURL=FieldValueList.test-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldValueList.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,uFAAiD,CAAC;AAEvF,eAAO,MAAM,wBAAwB,sGAG1B,CAAC"}
1
+ {"version":3,"file":"FieldValueList.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,iFAAiD,CAAC;AAEvF,eAAO,MAAM,wBAAwB,gGAG1B,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export { default, FieldValueItem } from './FieldValueList';
2
- export { FieldValueListProps, FieldValueListItemProps, StyledFieldValueListProps } from './FieldValueList';
2
+ export { FieldValueListProps, FieldValueListItem, FieldValueListItemProps, StyledFieldValueListProps } from './FieldValueList';
3
3
  export { StyledFieldValueList, StyledFieldName, StyledFieldValue, StyledStackedFieldValue } from './FieldValueList';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FieldValueList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAM3D,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC","sourcesContent":["export { default, FieldValueItem } from './FieldValueList';\nexport {\n FieldValueListProps,\n FieldValueListItemProps,\n StyledFieldValueListProps\n} from './FieldValueList';\nexport {\n StyledFieldValueList,\n StyledFieldName,\n StyledFieldValue,\n StyledStackedFieldValue\n} from './FieldValueList';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FieldValueList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAO3D,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC","sourcesContent":["export { default, FieldValueItem } from './FieldValueList';\nexport {\n FieldValueListProps,\n FieldValueListItem,\n FieldValueListItemProps,\n StyledFieldValueListProps\n} from './FieldValueList';\nexport {\n StyledFieldValueList,\n StyledFieldName,\n StyledFieldValue,\n StyledStackedFieldValue\n} from './FieldValueList';\n"]}
@@ -1,2 +1,2 @@
1
- export declare const getFileInputTestIds: (testIdProp?: string | undefined) => import("../../utils").TestIdsRecord<readonly ["control", "files"]>;
1
+ export declare const getFileInputTestIds: (testIdProp?: string | undefined) => import("../..").TestIdsRecord<readonly ["control", "files", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
2
2
  //# sourceMappingURL=File.test-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"File.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/File/File.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,yGAA6D,CAAC"}
1
+ {"version":3,"file":"File.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/File/File.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,iLAIrB,CAAC"}