@pega/cosmos-react-core 7.0.0-build.3.4 → 7.0.0-build.30.1

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 (777) hide show
  1. package/lib/components/AIButton/AIButton.d.ts +30 -2
  2. package/lib/components/AIButton/AIButton.d.ts.map +1 -1
  3. package/lib/components/AIButton/AIButton.js +7 -6
  4. package/lib/components/AIButton/AIButton.js.map +1 -1
  5. package/lib/components/Actions/Actions.d.ts +1 -1
  6. package/lib/components/Actions/Actions.d.ts.map +1 -1
  7. package/lib/components/Actions/Actions.js +6 -3
  8. package/lib/components/Actions/Actions.js.map +1 -1
  9. package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
  10. package/lib/components/AppShell/AppHeader.js +9 -7
  11. package/lib/components/AppShell/AppHeader.js.map +1 -1
  12. package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
  13. package/lib/components/AppShell/AppHeader.styles.js +27 -20
  14. package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
  15. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  16. package/lib/components/AppShell/AppShell.js +16 -4
  17. package/lib/components/AppShell/AppShell.js.map +1 -1
  18. package/lib/components/AppShell/AppShell.styles.d.ts +5 -1
  19. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  20. package/lib/components/AppShell/AppShell.styles.js +52 -13
  21. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  22. package/lib/components/AppShell/AppShell.types.d.ts +4 -0
  23. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  24. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  25. package/lib/components/AppShell/AppShellContext.d.ts +3 -1
  26. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  27. package/lib/components/AppShell/AppShellContext.js +3 -1
  28. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  29. package/lib/components/AppShell/AppShellList.styles.d.ts.map +1 -1
  30. package/lib/components/AppShell/AppShellList.styles.js +1 -0
  31. package/lib/components/AppShell/AppShellList.styles.js.map +1 -1
  32. package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
  33. package/lib/components/AppShell/NavigationList.js +3 -3
  34. package/lib/components/AppShell/NavigationList.js.map +1 -1
  35. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
  36. package/lib/components/AppShell/NavigationListItemWrapper.js +1 -0
  37. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
  38. package/lib/components/AppShell/Operator.d.ts +1 -1
  39. package/lib/components/AppShell/style-utils.d.ts +3 -0
  40. package/lib/components/AppShell/style-utils.d.ts.map +1 -1
  41. package/lib/components/AppShell/style-utils.js +42 -3
  42. package/lib/components/AppShell/style-utils.js.map +1 -1
  43. package/lib/components/Avatar/Avatar.d.ts +2 -2
  44. package/lib/components/Avatar/Avatar.d.ts.map +1 -1
  45. package/lib/components/Avatar/Avatar.js +21 -20
  46. package/lib/components/Avatar/Avatar.js.map +1 -1
  47. package/lib/components/Avatar/Avatar.test-ids.d.ts +1 -1
  48. package/lib/components/Avatar/Avatar.test-ids.d.ts.map +1 -1
  49. package/lib/components/Backdrop/Backdrop.d.ts +1 -1
  50. package/lib/components/Backdrop/Backdrop.test-ids.d.ts +1 -1
  51. package/lib/components/Backdrop/Backdrop.test-ids.d.ts.map +1 -1
  52. package/lib/components/Badges/Alert.d.ts +1 -1
  53. package/lib/components/Badges/Badges.test-ids.d.ts +6 -6
  54. package/lib/components/Badges/Badges.test-ids.d.ts.map +1 -1
  55. package/lib/components/Badges/Count.d.ts +1 -1
  56. package/lib/components/Badges/Keyboard.d.ts +1 -1
  57. package/lib/components/Badges/Keyboard.d.ts.map +1 -1
  58. package/lib/components/Badges/Keyboard.js +9 -8
  59. package/lib/components/Badges/Keyboard.js.map +1 -1
  60. package/lib/components/Badges/Selection.d.ts +1 -1
  61. package/lib/components/Badges/Selection.d.ts.map +1 -1
  62. package/lib/components/Badges/Selection.js +3 -1
  63. package/lib/components/Badges/Selection.js.map +1 -1
  64. package/lib/components/Badges/Status.d.ts +1 -1
  65. package/lib/components/Badges/Status.d.ts.map +1 -1
  66. package/lib/components/Badges/Status.js +0 -1
  67. package/lib/components/Badges/Status.js.map +1 -1
  68. package/lib/components/Badges/Tag.d.ts +1 -1
  69. package/lib/components/Banner/Banner.d.ts +1 -1
  70. package/lib/components/Banner/Banner.d.ts.map +1 -1
  71. package/lib/components/Banner/Banner.js +5 -2
  72. package/lib/components/Banner/Banner.js.map +1 -1
  73. package/lib/components/Banner/Banner.test-ids.d.ts +1 -1
  74. package/lib/components/Banner/Banner.test-ids.d.ts.map +1 -1
  75. package/lib/components/Button/Button.d.ts +1 -1
  76. package/lib/components/Button/Button.d.ts.map +1 -1
  77. package/lib/components/Button/Button.js +142 -53
  78. package/lib/components/Button/Button.js.map +1 -1
  79. package/lib/components/Card/Card.d.ts.map +1 -1
  80. package/lib/components/Card/Card.js +8 -0
  81. package/lib/components/Card/Card.js.map +1 -1
  82. package/lib/components/Checkbox/Checkbox.d.ts +3 -33
  83. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  84. package/lib/components/Checkbox/Checkbox.js +1 -5
  85. package/lib/components/Checkbox/Checkbox.js.map +1 -1
  86. package/lib/components/ColorPicker/ColorPicker.d.ts +6 -23
  87. package/lib/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  88. package/lib/components/ColorPicker/ColorPicker.js +3 -4
  89. package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
  90. package/lib/components/ColorPicker/ColorPicker.test-ids.d.ts +1 -1
  91. package/lib/components/ColorPicker/ColorPicker.test-ids.d.ts.map +1 -1
  92. package/lib/components/ComboBox/ComboBox.d.ts +2 -4
  93. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  94. package/lib/components/ComboBox/ComboBox.js +8 -5
  95. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  96. package/lib/components/ComboBox/ComboBox.styles.d.ts.map +1 -1
  97. package/lib/components/ComboBox/ComboBox.styles.js +7 -1
  98. package/lib/components/ComboBox/ComboBox.styles.js.map +1 -1
  99. package/lib/components/ComboBox/ComboBox.types.d.ts +8 -26
  100. package/lib/components/ComboBox/ComboBox.types.d.ts.map +1 -1
  101. package/lib/components/ComboBox/ComboBox.types.js.map +1 -1
  102. package/lib/components/ComboBox/ComboxBox.test-ids.d.ts +1 -1
  103. package/lib/components/ComboBox/ComboxBox.test-ids.d.ts.map +1 -1
  104. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
  105. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +10 -2
  106. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
  107. package/lib/components/CompositeInput/CompositeInput.d.ts +2 -3
  108. package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
  109. package/lib/components/CompositeInput/CompositeInput.js +2 -3
  110. package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
  111. package/lib/components/CompositeInput/CompositeInput.test-ids.d.ts +1 -1
  112. package/lib/components/CompositeInput/CompositeInput.test-ids.d.ts.map +1 -1
  113. package/lib/components/CompositeInput/CompositeInput.types.d.ts +4 -13
  114. package/lib/components/CompositeInput/CompositeInput.types.d.ts.map +1 -1
  115. package/lib/components/CompositeInput/CompositeInput.types.js.map +1 -1
  116. package/lib/components/Configuration/Configuration.d.ts +1 -0
  117. package/lib/components/Configuration/Configuration.d.ts.map +1 -1
  118. package/lib/components/Configuration/Configuration.js +58 -30
  119. package/lib/components/Configuration/Configuration.js.map +1 -1
  120. package/lib/components/Configuration/ThemeOverride.d.ts +11 -0
  121. package/lib/components/Configuration/ThemeOverride.d.ts.map +1 -0
  122. package/lib/components/Configuration/ThemeOverride.js +23 -0
  123. package/lib/components/Configuration/ThemeOverride.js.map +1 -0
  124. package/lib/components/Configuration/connected-watcher.d.ts +17 -0
  125. package/lib/components/Configuration/connected-watcher.d.ts.map +1 -0
  126. package/lib/components/Configuration/connected-watcher.js +13 -0
  127. package/lib/components/Configuration/connected-watcher.js.map +1 -0
  128. package/lib/components/Configuration/index.d.ts +1 -0
  129. package/lib/components/Configuration/index.d.ts.map +1 -1
  130. package/lib/components/Configuration/index.js +1 -0
  131. package/lib/components/Configuration/index.js.map +1 -1
  132. package/lib/components/Configuration/withConfiguration.d.ts.map +1 -1
  133. package/lib/components/Configuration/withConfiguration.js.map +1 -1
  134. package/lib/components/CreditCard/CreditCard.types.d.ts +5 -25
  135. package/lib/components/CreditCard/CreditCard.types.d.ts.map +1 -1
  136. package/lib/components/CreditCard/CreditCard.types.js.map +1 -1
  137. package/lib/components/CreditCard/CreditCardDisplay.d.ts +2 -4
  138. package/lib/components/CreditCard/CreditCardDisplay.d.ts.map +1 -1
  139. package/lib/components/CreditCard/CreditCardDisplay.js +1 -2
  140. package/lib/components/CreditCard/CreditCardDisplay.js.map +1 -1
  141. package/lib/components/CreditCard/CreditCardInput.d.ts +15 -5
  142. package/lib/components/CreditCard/CreditCardInput.d.ts.map +1 -1
  143. package/lib/components/CreditCard/CreditCardInput.js +1 -2
  144. package/lib/components/CreditCard/CreditCardInput.js.map +1 -1
  145. package/lib/components/Currency/Currency.test-ids.d.ts +1 -1
  146. package/lib/components/Currency/Currency.test-ids.d.ts.map +1 -1
  147. package/lib/components/Currency/CurrencyInput.d.ts +1 -1
  148. package/lib/components/Currency/CurrencyInput.js +1 -1
  149. package/lib/components/Currency/CurrencyInput.js.map +1 -1
  150. package/lib/components/DangerButton/DangerButton.js +2 -2
  151. package/lib/components/DangerButton/DangerButton.js.map +1 -1
  152. package/lib/components/DateTime/DateTime.test-ids.d.ts +11 -11
  153. package/lib/components/DateTime/DateTime.test-ids.d.ts.map +1 -1
  154. package/lib/components/DateTime/DateTime.test-ids.js +5 -1
  155. package/lib/components/DateTime/DateTime.test-ids.js.map +1 -1
  156. package/lib/components/DateTime/Input/DateInput.d.ts +1 -1
  157. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  158. package/lib/components/DateTime/Input/DateInput.js +30 -30
  159. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  160. package/lib/components/DateTime/Input/DateRangeInput.d.ts +1 -1
  161. package/lib/components/DateTime/Input/DateRangeInput.js +2 -2
  162. package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
  163. package/lib/components/DateTime/Input/DateTime.styles.d.ts +1 -0
  164. package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
  165. package/lib/components/DateTime/Input/DateTime.styles.js +24 -16
  166. package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
  167. package/lib/components/DateTime/Input/DateTimeInput.d.ts +1 -1
  168. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  169. package/lib/components/DateTime/Input/DateTimeInput.js +28 -22
  170. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  171. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts +1 -1
  172. package/lib/components/DateTime/Input/Duration/DurationInput.d.ts +1 -1
  173. package/lib/components/DateTime/Input/MonthInput.d.ts +1 -1
  174. package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
  175. package/lib/components/DateTime/Input/MonthInput.js +23 -12
  176. package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
  177. package/lib/components/DateTime/Input/PartInput.d.ts +1 -1
  178. package/lib/components/DateTime/Input/PartInput.d.ts.map +1 -1
  179. package/lib/components/DateTime/Input/PartInput.js +13 -7
  180. package/lib/components/DateTime/Input/PartInput.js.map +1 -1
  181. package/lib/components/DateTime/Input/QuarterInput.d.ts +1 -1
  182. package/lib/components/DateTime/Input/TimeInput.d.ts +1 -1
  183. package/lib/components/DateTime/Input/TimeRangeInput.d.ts +1 -1
  184. package/lib/components/DateTime/Input/TimeRangeInput.js +3 -3
  185. package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
  186. package/lib/components/DateTime/Input/WeekInput.d.ts +1 -1
  187. package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
  188. package/lib/components/DateTime/Input/WeekInput.js +17 -6
  189. package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
  190. package/lib/components/DateTime/Input/utils.d.ts +3 -2
  191. package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
  192. package/lib/components/DateTime/Input/utils.js +9 -2
  193. package/lib/components/DateTime/Input/utils.js.map +1 -1
  194. package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
  195. package/lib/components/DateTime/Picker/Calendar.js +5 -4
  196. package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
  197. package/lib/components/DateTime/Picker/Calendar.styles.d.ts.map +1 -1
  198. package/lib/components/DateTime/Picker/Calendar.styles.js +2 -1
  199. package/lib/components/DateTime/Picker/Calendar.styles.js.map +1 -1
  200. package/lib/components/DateTime/Picker/DatePicker.d.ts +1 -1
  201. package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
  202. package/lib/components/DateTime/Picker/DatePicker.js +31 -19
  203. package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
  204. package/lib/components/DateTime/Picker/DatePicker.styles.d.ts +1 -0
  205. package/lib/components/DateTime/Picker/DatePicker.styles.d.ts.map +1 -1
  206. package/lib/components/DateTime/Picker/DatePicker.styles.js +13 -5
  207. package/lib/components/DateTime/Picker/DatePicker.styles.js.map +1 -1
  208. package/lib/components/DateTime/Picker/DateRangePicker.d.ts.map +1 -1
  209. package/lib/components/DateTime/Picker/DateRangePicker.js +18 -11
  210. package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
  211. package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
  212. package/lib/components/DateTime/Picker/TimePicker.js +2 -1
  213. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  214. package/lib/components/DateTime/Picker/utils.d.ts +9 -0
  215. package/lib/components/DateTime/Picker/utils.d.ts.map +1 -1
  216. package/lib/components/DateTime/Picker/utils.js +16 -0
  217. package/lib/components/DateTime/Picker/utils.js.map +1 -1
  218. package/lib/components/DateTime/index.d.ts +1 -1
  219. package/lib/components/DateTime/index.d.ts.map +1 -1
  220. package/lib/components/DateTime/index.js +1 -1
  221. package/lib/components/DateTime/index.js.map +1 -1
  222. package/lib/components/DateTime/utils.d.ts +5 -0
  223. package/lib/components/DateTime/utils.d.ts.map +1 -1
  224. package/lib/components/DateTime/utils.js +21 -11
  225. package/lib/components/DateTime/utils.js.map +1 -1
  226. package/lib/components/Email/EmailDisplay.d.ts.map +1 -1
  227. package/lib/components/Email/EmailDisplay.js +2 -2
  228. package/lib/components/Email/EmailDisplay.js.map +1 -1
  229. package/lib/components/EmptyState/EmptyState.d.ts.map +1 -1
  230. package/lib/components/EmptyState/EmptyState.js +5 -2
  231. package/lib/components/EmptyState/EmptyState.js.map +1 -1
  232. package/lib/components/FieldGroup/FieldGroup.d.ts +6 -0
  233. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  234. package/lib/components/FieldGroup/FieldGroup.js +36 -14
  235. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  236. package/lib/components/FieldGroup/FieldGroupList.d.ts +1 -0
  237. package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
  238. package/lib/components/FieldGroup/FieldGroupList.js +18 -18
  239. package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
  240. package/lib/components/FieldValueList/FieldValueList.d.ts +14 -10
  241. package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
  242. package/lib/components/FieldValueList/FieldValueList.js +13 -5
  243. package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
  244. package/lib/components/FieldValueList/FieldValueList.test-ids.d.ts +2 -2
  245. package/lib/components/FieldValueList/FieldValueList.test-ids.d.ts.map +1 -1
  246. package/lib/components/FieldValueList/index.d.ts +1 -1
  247. package/lib/components/FieldValueList/index.d.ts.map +1 -1
  248. package/lib/components/FieldValueList/index.js.map +1 -1
  249. package/lib/components/File/CompactList.d.ts +15 -0
  250. package/lib/components/File/CompactList.d.ts.map +1 -0
  251. package/lib/components/File/CompactList.js +21 -0
  252. package/lib/components/File/CompactList.js.map +1 -0
  253. package/lib/components/File/File.test-ids.d.ts +1 -1
  254. package/lib/components/File/File.test-ids.d.ts.map +1 -1
  255. package/lib/components/File/FileDisplay.d.ts +5 -0
  256. package/lib/components/File/FileDisplay.d.ts.map +1 -1
  257. package/lib/components/File/FileDisplay.js +2 -2
  258. package/lib/components/File/FileDisplay.js.map +1 -1
  259. package/lib/components/File/FileDisplayList.d.ts +10 -0
  260. package/lib/components/File/FileDisplayList.d.ts.map +1 -0
  261. package/lib/components/File/FileDisplayList.js +14 -0
  262. package/lib/components/File/FileDisplayList.js.map +1 -0
  263. package/lib/components/File/FileInput.d.ts +38 -9
  264. package/lib/components/File/FileInput.d.ts.map +1 -1
  265. package/lib/components/File/FileInput.js +183 -72
  266. package/lib/components/File/FileInput.js.map +1 -1
  267. package/lib/components/File/FileInput.styles.d.ts +26 -0
  268. package/lib/components/File/FileInput.styles.d.ts.map +1 -0
  269. package/lib/components/File/FileInput.styles.js +166 -0
  270. package/lib/components/File/FileInput.styles.js.map +1 -0
  271. package/lib/components/File/FileItem.d.ts +18 -4
  272. package/lib/components/File/FileItem.d.ts.map +1 -1
  273. package/lib/components/File/FileItem.js +84 -30
  274. package/lib/components/File/FileItem.js.map +1 -1
  275. package/lib/components/File/FileList.d.ts +20 -0
  276. package/lib/components/File/FileList.d.ts.map +1 -0
  277. package/lib/components/File/FileList.js +66 -0
  278. package/lib/components/File/FileList.js.map +1 -0
  279. package/lib/components/File/FileUploadItem.d.ts +4 -0
  280. package/lib/components/File/FileUploadItem.d.ts.map +1 -1
  281. package/lib/components/File/FileUploadItem.js +42 -38
  282. package/lib/components/File/FileUploadItem.js.map +1 -1
  283. package/lib/components/File/index.d.ts +4 -0
  284. package/lib/components/File/index.d.ts.map +1 -1
  285. package/lib/components/File/index.js +2 -0
  286. package/lib/components/File/index.js.map +1 -1
  287. package/lib/components/Flex/Flex.js.map +1 -1
  288. package/lib/components/Form/Form.d.ts +1 -1
  289. package/lib/components/Form/Form.test-ids.d.ts +1 -1
  290. package/lib/components/Form/Form.test-ids.d.ts.map +1 -1
  291. package/lib/components/FormField/FormField.d.ts +2 -2
  292. package/lib/components/FormField/FormField.d.ts.map +1 -1
  293. package/lib/components/FormField/FormField.js +45 -60
  294. package/lib/components/FormField/FormField.js.map +1 -1
  295. package/lib/components/FormField/FormField.test-ids.d.ts +1 -1
  296. package/lib/components/FormField/FormField.test-ids.d.ts.map +1 -1
  297. package/lib/components/Fullscreen/Fullscreen.d.ts +18 -0
  298. package/lib/components/Fullscreen/Fullscreen.d.ts.map +1 -0
  299. package/lib/components/Fullscreen/Fullscreen.js +56 -0
  300. package/lib/components/Fullscreen/Fullscreen.js.map +1 -0
  301. package/lib/components/Fullscreen/Fullscreen.test-ids.d.ts +2 -0
  302. package/lib/components/Fullscreen/Fullscreen.test-ids.d.ts.map +1 -0
  303. package/lib/components/Fullscreen/Fullscreen.test-ids.js +3 -0
  304. package/lib/components/Fullscreen/Fullscreen.test-ids.js.map +1 -0
  305. package/lib/components/Fullscreen/FullscreenButton.d.ts +6 -0
  306. package/lib/components/Fullscreen/FullscreenButton.d.ts.map +1 -0
  307. package/lib/components/Fullscreen/FullscreenButton.js +33 -0
  308. package/lib/components/Fullscreen/FullscreenButton.js.map +1 -0
  309. package/lib/components/Fullscreen/index.d.ts +4 -0
  310. package/lib/components/Fullscreen/index.d.ts.map +1 -0
  311. package/lib/components/Fullscreen/index.js +4 -0
  312. package/lib/components/Fullscreen/index.js.map +1 -0
  313. package/lib/components/HTML/HTML.d.ts +1 -1
  314. package/lib/components/HTML/HTML.test-ids.d.ts +1 -1
  315. package/lib/components/HTML/HTML.test-ids.d.ts.map +1 -1
  316. package/lib/components/Icon/Icon.d.ts.map +1 -1
  317. package/lib/components/Icon/Icon.js +1 -1
  318. package/lib/components/Icon/Icon.js.map +1 -1
  319. package/lib/components/Icon/iconNames.d.ts +1 -1
  320. package/lib/components/Icon/iconNames.d.ts.map +1 -1
  321. package/lib/components/Icon/iconNames.js +2 -0
  322. package/lib/components/Icon/iconNames.js.map +1 -1
  323. package/lib/components/Icon/icons/calendar-now.icon.d.ts +5 -0
  324. package/lib/components/Icon/icons/calendar-now.icon.d.ts.map +1 -0
  325. package/lib/components/Icon/icons/calendar-now.icon.js +7 -0
  326. package/lib/components/Icon/icons/calendar-now.icon.js.map +1 -0
  327. package/lib/components/Icon/icons/preview.icon.d.ts +5 -0
  328. package/lib/components/Icon/icons/preview.icon.d.ts.map +1 -0
  329. package/lib/components/Icon/icons/preview.icon.js +7 -0
  330. package/lib/components/Icon/icons/preview.icon.js.map +1 -0
  331. package/lib/components/Icon/streamline-icons/arrow-down.icon.js +1 -1
  332. package/lib/components/Icon/streamline-icons/arrow-down.icon.js.map +1 -1
  333. package/lib/components/Icon/streamline-icons/arrow-left.icon.js +1 -1
  334. package/lib/components/Icon/streamline-icons/arrow-left.icon.js.map +1 -1
  335. package/lib/components/Icon/streamline-icons/arrow-micro-down.icon.js +1 -1
  336. package/lib/components/Icon/streamline-icons/arrow-micro-down.icon.js.map +1 -1
  337. package/lib/components/Icon/streamline-icons/arrow-micro-left.icon.js +1 -1
  338. package/lib/components/Icon/streamline-icons/arrow-micro-left.icon.js.map +1 -1
  339. package/lib/components/Icon/streamline-icons/arrow-micro-right.icon.js +1 -1
  340. package/lib/components/Icon/streamline-icons/arrow-micro-right.icon.js.map +1 -1
  341. package/lib/components/Icon/streamline-icons/arrow-micro-up.icon.js +1 -1
  342. package/lib/components/Icon/streamline-icons/arrow-micro-up.icon.js.map +1 -1
  343. package/lib/components/Icon/streamline-icons/arrow-right.icon.js +1 -1
  344. package/lib/components/Icon/streamline-icons/arrow-right.icon.js.map +1 -1
  345. package/lib/components/Icon/streamline-icons/arrow-up.icon.js +1 -1
  346. package/lib/components/Icon/streamline-icons/arrow-up.icon.js.map +1 -1
  347. package/lib/components/Icon/streamline-icons/calendar-now.icon.d.ts +5 -0
  348. package/lib/components/Icon/streamline-icons/calendar-now.icon.d.ts.map +1 -0
  349. package/lib/components/Icon/streamline-icons/calendar-now.icon.js +7 -0
  350. package/lib/components/Icon/streamline-icons/calendar-now.icon.js.map +1 -0
  351. package/lib/components/Icon/streamline-icons/caret-down.icon.js +1 -1
  352. package/lib/components/Icon/streamline-icons/caret-down.icon.js.map +1 -1
  353. package/lib/components/Icon/streamline-icons/caret-left.icon.js +1 -1
  354. package/lib/components/Icon/streamline-icons/caret-left.icon.js.map +1 -1
  355. package/lib/components/Icon/streamline-icons/caret-right.icon.js +1 -1
  356. package/lib/components/Icon/streamline-icons/caret-right.icon.js.map +1 -1
  357. package/lib/components/Icon/streamline-icons/caret-up.icon.js +1 -1
  358. package/lib/components/Icon/streamline-icons/caret-up.icon.js.map +1 -1
  359. package/lib/components/Icon/streamline-icons/case-solid.icon.d.ts +1 -1
  360. package/lib/components/Icon/streamline-icons/case-solid.icon.d.ts.map +1 -1
  361. package/lib/components/Icon/streamline-icons/case-solid.icon.js +2 -2
  362. package/lib/components/Icon/streamline-icons/case-solid.icon.js.map +1 -1
  363. package/lib/components/Icon/streamline-icons/clipboard-pencil-solid.icon.d.ts.map +1 -1
  364. package/lib/components/Icon/streamline-icons/clipboard-pencil-solid.icon.js +2 -2
  365. package/lib/components/Icon/streamline-icons/clipboard-pencil-solid.icon.js.map +1 -1
  366. package/lib/components/Icon/streamline-icons/clock-solid.icon.d.ts.map +1 -1
  367. package/lib/components/Icon/streamline-icons/clock-solid.icon.js +2 -2
  368. package/lib/components/Icon/streamline-icons/clock-solid.icon.js.map +1 -1
  369. package/lib/components/Icon/streamline-icons/disc-stack-solid.icon.d.ts.map +1 -1
  370. package/lib/components/Icon/streamline-icons/disc-stack-solid.icon.js +2 -2
  371. package/lib/components/Icon/streamline-icons/disc-stack-solid.icon.js.map +1 -1
  372. package/lib/components/Icon/streamline-icons/dock.icon.d.ts +5 -0
  373. package/lib/components/Icon/streamline-icons/dock.icon.d.ts.map +1 -0
  374. package/lib/components/Icon/streamline-icons/dock.icon.js +7 -0
  375. package/lib/components/Icon/streamline-icons/dock.icon.js.map +1 -0
  376. package/lib/components/Icon/streamline-icons/drag.icon.js +1 -1
  377. package/lib/components/Icon/streamline-icons/drag.icon.js.map +1 -1
  378. package/lib/components/Icon/streamline-icons/expression.icon.d.ts +5 -0
  379. package/lib/components/Icon/streamline-icons/expression.icon.d.ts.map +1 -0
  380. package/lib/components/Icon/streamline-icons/expression.icon.js +7 -0
  381. package/lib/components/Icon/streamline-icons/expression.icon.js.map +1 -0
  382. package/lib/components/Icon/streamline-icons/indent.icon.d.ts +5 -0
  383. package/lib/components/Icon/streamline-icons/indent.icon.d.ts.map +1 -0
  384. package/lib/components/Icon/streamline-icons/indent.icon.js +7 -0
  385. package/lib/components/Icon/streamline-icons/indent.icon.js.map +1 -0
  386. package/lib/components/Icon/streamline-icons/information-solid.icon.d.ts +5 -0
  387. package/lib/components/Icon/streamline-icons/information-solid.icon.d.ts.map +1 -0
  388. package/lib/components/Icon/streamline-icons/information-solid.icon.js +7 -0
  389. package/lib/components/Icon/streamline-icons/information-solid.icon.js.map +1 -0
  390. package/lib/components/Icon/streamline-icons/list-number.icon.d.ts +5 -0
  391. package/lib/components/Icon/streamline-icons/list-number.icon.d.ts.map +1 -0
  392. package/lib/components/Icon/streamline-icons/list-number.icon.js +7 -0
  393. package/lib/components/Icon/streamline-icons/list-number.icon.js.map +1 -0
  394. package/lib/components/Icon/streamline-icons/micro-arrow-down.icon.d.ts +5 -0
  395. package/lib/components/Icon/streamline-icons/micro-arrow-down.icon.d.ts.map +1 -0
  396. package/lib/components/Icon/streamline-icons/micro-arrow-down.icon.js +7 -0
  397. package/lib/components/Icon/streamline-icons/micro-arrow-down.icon.js.map +1 -0
  398. package/lib/components/Icon/streamline-icons/micro-arrow-left.icon.d.ts +5 -0
  399. package/lib/components/Icon/streamline-icons/micro-arrow-left.icon.d.ts.map +1 -0
  400. package/lib/components/Icon/streamline-icons/micro-arrow-left.icon.js +7 -0
  401. package/lib/components/Icon/streamline-icons/micro-arrow-left.icon.js.map +1 -0
  402. package/lib/components/Icon/streamline-icons/micro-arrow-right.icon.d.ts +5 -0
  403. package/lib/components/Icon/streamline-icons/micro-arrow-right.icon.d.ts.map +1 -0
  404. package/lib/components/Icon/streamline-icons/micro-arrow-right.icon.js +7 -0
  405. package/lib/components/Icon/streamline-icons/micro-arrow-right.icon.js.map +1 -0
  406. package/lib/components/Icon/streamline-icons/micro-arrow-up.icon.d.ts +5 -0
  407. package/lib/components/Icon/streamline-icons/micro-arrow-up.icon.d.ts.map +1 -0
  408. package/lib/components/Icon/streamline-icons/micro-arrow-up.icon.js +7 -0
  409. package/lib/components/Icon/streamline-icons/micro-arrow-up.icon.js.map +1 -0
  410. package/lib/components/Icon/streamline-icons/minus.icon.d.ts.map +1 -1
  411. package/lib/components/Icon/streamline-icons/minus.icon.js +1 -1
  412. package/lib/components/Icon/streamline-icons/minus.icon.js.map +1 -1
  413. package/lib/components/Icon/streamline-icons/open.icon.js +1 -1
  414. package/lib/components/Icon/streamline-icons/open.icon.js.map +1 -1
  415. package/lib/components/Icon/streamline-icons/plus.icon.d.ts.map +1 -1
  416. package/lib/components/Icon/streamline-icons/plus.icon.js +1 -1
  417. package/lib/components/Icon/streamline-icons/plus.icon.js.map +1 -1
  418. package/lib/components/Icon/streamline-icons/rule-library-solid.icon.d.ts.map +1 -1
  419. package/lib/components/Icon/streamline-icons/rule-library-solid.icon.js +2 -2
  420. package/lib/components/Icon/streamline-icons/rule-library-solid.icon.js.map +1 -1
  421. package/lib/components/Icon/streamline-icons/search-analytics-solid.icon.d.ts.map +1 -1
  422. package/lib/components/Icon/streamline-icons/search-analytics-solid.icon.js +2 -2
  423. package/lib/components/Icon/streamline-icons/search-analytics-solid.icon.js.map +1 -1
  424. package/lib/components/Icon/streamline-icons/times.icon.d.ts.map +1 -1
  425. package/lib/components/Icon/streamline-icons/times.icon.js +1 -1
  426. package/lib/components/Icon/streamline-icons/times.icon.js.map +1 -1
  427. package/lib/components/Icon/streamline-icons/undock.icon.d.ts +5 -0
  428. package/lib/components/Icon/streamline-icons/undock.icon.d.ts.map +1 -0
  429. package/lib/components/Icon/streamline-icons/undock.icon.js +7 -0
  430. package/lib/components/Icon/streamline-icons/undock.icon.js.map +1 -0
  431. package/lib/components/Icon/streamline-icons/unindent.icon.d.ts +5 -0
  432. package/lib/components/Icon/streamline-icons/unindent.icon.d.ts.map +1 -0
  433. package/lib/components/Icon/streamline-icons/unindent.icon.js +7 -0
  434. package/lib/components/Icon/streamline-icons/unindent.icon.js.map +1 -0
  435. package/lib/components/Icon/streamline-icons/warn-solid.icon.d.ts.map +1 -1
  436. package/lib/components/Icon/streamline-icons/warn-solid.icon.js +2 -2
  437. package/lib/components/Icon/streamline-icons/warn-solid.icon.js.map +1 -1
  438. package/lib/components/Icon/streamlineIconNames.d.ts +1 -1
  439. package/lib/components/Icon/streamlineIconNames.d.ts.map +1 -1
  440. package/lib/components/Icon/streamlineIconNames.js +12 -0
  441. package/lib/components/Icon/streamlineIconNames.js.map +1 -1
  442. package/lib/components/IconPicker/IconPicker.d.ts +7 -1
  443. package/lib/components/IconPicker/IconPicker.d.ts.map +1 -1
  444. package/lib/components/IconPicker/IconPicker.js +20 -14
  445. package/lib/components/IconPicker/IconPicker.js.map +1 -1
  446. package/lib/components/Input/Input.d.ts +5 -8
  447. package/lib/components/Input/Input.d.ts.map +1 -1
  448. package/lib/components/Input/Input.js +2 -3
  449. package/lib/components/Input/Input.js.map +1 -1
  450. package/lib/components/Input/Input.test-ids.d.ts +1 -1
  451. package/lib/components/Input/Input.test-ids.d.ts.map +1 -1
  452. package/lib/components/Label/Label.js +2 -2
  453. package/lib/components/Label/Label.js.map +1 -1
  454. package/lib/components/Lightbox/Lightbox.d.ts +1 -1
  455. package/lib/components/Lightbox/Lightbox.d.ts.map +1 -1
  456. package/lib/components/Lightbox/Lightbox.js +21 -12
  457. package/lib/components/Lightbox/Lightbox.js.map +1 -1
  458. package/lib/components/Lightbox/Lightbox.styles.d.ts +1 -1
  459. package/lib/components/Lightbox/Lightbox.test-ids.d.ts +1 -1
  460. package/lib/components/Lightbox/Lightbox.test-ids.d.ts.map +1 -1
  461. package/lib/components/Lightbox/Lightbox.types.d.ts +1 -1
  462. package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -1
  463. package/lib/components/Lightbox/Lightbox.types.js.map +1 -1
  464. package/lib/components/Link/Link.d.ts +5 -2
  465. package/lib/components/Link/Link.d.ts.map +1 -1
  466. package/lib/components/Link/Link.js +28 -16
  467. package/lib/components/Link/Link.js.map +1 -1
  468. package/lib/components/Link/Link.test-ids.d.ts +1 -1
  469. package/lib/components/Link/Link.test-ids.d.ts.map +1 -1
  470. package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
  471. package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
  472. package/lib/components/ListToolbar/ListToolbar.js +9 -8
  473. package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
  474. package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
  475. package/lib/components/ListToolbar/ListToolbar.styles.js +6 -9
  476. package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
  477. package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts +1 -1
  478. package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts.map +1 -1
  479. package/lib/components/ListToolbar/ListToolbar.test-ids.js +4 -1
  480. package/lib/components/ListToolbar/ListToolbar.test-ids.js.map +1 -1
  481. package/lib/components/ListToolbar/ListToolbar.types.d.ts +7 -3
  482. package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
  483. package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
  484. package/lib/components/ListToolbar/PresetMenuPopover.d.ts.map +1 -1
  485. package/lib/components/ListToolbar/PresetMenuPopover.js +2 -2
  486. package/lib/components/ListToolbar/PresetMenuPopover.js.map +1 -1
  487. package/lib/components/ListToolbar/helpers.d.ts.map +1 -1
  488. package/lib/components/ListToolbar/helpers.js.map +1 -1
  489. package/lib/components/Location/CurrentLocationButton.d.ts +1 -6
  490. package/lib/components/Location/CurrentLocationButton.d.ts.map +1 -1
  491. package/lib/components/Location/CurrentLocationButton.js +10 -20
  492. package/lib/components/Location/CurrentLocationButton.js.map +1 -1
  493. package/lib/components/Location/Location.test-ids.d.ts +1 -1
  494. package/lib/components/Location/Location.test-ids.d.ts.map +1 -1
  495. package/lib/components/Location/Location.types.d.ts +49 -17
  496. package/lib/components/Location/Location.types.d.ts.map +1 -1
  497. package/lib/components/Location/Location.types.js +9 -1
  498. package/lib/components/Location/Location.types.js.map +1 -1
  499. package/lib/components/Location/LocationDisplay.d.ts +5 -4
  500. package/lib/components/Location/LocationDisplay.d.ts.map +1 -1
  501. package/lib/components/Location/LocationDisplay.js +17 -4
  502. package/lib/components/Location/LocationDisplay.js.map +1 -1
  503. package/lib/components/Location/LocationInput.d.ts +23 -18
  504. package/lib/components/Location/LocationInput.d.ts.map +1 -1
  505. package/lib/components/Location/LocationInput.js +37 -15
  506. package/lib/components/Location/LocationInput.js.map +1 -1
  507. package/lib/components/Location/LocationView.d.ts +26 -12
  508. package/lib/components/Location/LocationView.d.ts.map +1 -1
  509. package/lib/components/Location/LocationView.js +103 -50
  510. package/lib/components/Location/LocationView.js.map +1 -1
  511. package/lib/components/Location/index.d.ts +2 -2
  512. package/lib/components/Location/index.d.ts.map +1 -1
  513. package/lib/components/Location/index.js +1 -1
  514. package/lib/components/Location/index.js.map +1 -1
  515. package/lib/components/Location/utils.d.ts +20 -2
  516. package/lib/components/Location/utils.d.ts.map +1 -1
  517. package/lib/components/Location/utils.js +184 -41
  518. package/lib/components/Location/utils.js.map +1 -1
  519. package/lib/components/Menu/Menu.context.d.ts.map +1 -1
  520. package/lib/components/Menu/Menu.context.js +1 -0
  521. package/lib/components/Menu/Menu.context.js.map +1 -1
  522. package/lib/components/Menu/Menu.d.ts +1 -1
  523. package/lib/components/Menu/Menu.d.ts.map +1 -1
  524. package/lib/components/Menu/Menu.js +6 -2
  525. package/lib/components/Menu/Menu.js.map +1 -1
  526. package/lib/components/Menu/Menu.styles.d.ts +0 -1
  527. package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
  528. package/lib/components/Menu/Menu.styles.js +5 -12
  529. package/lib/components/Menu/Menu.styles.js.map +1 -1
  530. package/lib/components/Menu/Menu.test-ids.d.ts +2 -2
  531. package/lib/components/Menu/Menu.test-ids.d.ts.map +1 -1
  532. package/lib/components/Menu/Menu.types.d.ts +14 -2
  533. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  534. package/lib/components/Menu/Menu.types.js.map +1 -1
  535. package/lib/components/Menu/Menu.utils.d.ts +4 -0
  536. package/lib/components/Menu/Menu.utils.d.ts.map +1 -0
  537. package/lib/components/Menu/Menu.utils.js +6 -0
  538. package/lib/components/Menu/Menu.utils.js.map +1 -0
  539. package/lib/components/Menu/MenuGroup.js +2 -2
  540. package/lib/components/Menu/MenuGroup.js.map +1 -1
  541. package/lib/components/Menu/MenuItem.d.ts +1 -1
  542. package/lib/components/Menu/MenuItem.d.ts.map +1 -1
  543. package/lib/components/Menu/MenuItem.js +3 -3
  544. package/lib/components/Menu/MenuItem.js.map +1 -1
  545. package/lib/components/Menu/MenuList.d.ts.map +1 -1
  546. package/lib/components/Menu/MenuList.js +3 -3
  547. package/lib/components/Menu/MenuList.js.map +1 -1
  548. package/lib/components/Menu/NavItemsList.d.ts.map +1 -1
  549. package/lib/components/Menu/NavItemsList.js +1 -3
  550. package/lib/components/Menu/NavItemsList.js.map +1 -1
  551. package/lib/components/Menu/index.d.ts +1 -0
  552. package/lib/components/Menu/index.d.ts.map +1 -1
  553. package/lib/components/Menu/index.js +1 -0
  554. package/lib/components/Menu/index.js.map +1 -1
  555. package/lib/components/MenuButton/MenuButton.d.ts +8 -1
  556. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  557. package/lib/components/MenuButton/MenuButton.js +15 -5
  558. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  559. package/lib/components/MenuButton/MenuButton.test-ids.d.ts +1 -1
  560. package/lib/components/MenuButton/MenuButton.test-ids.d.ts.map +1 -1
  561. package/lib/components/MetaList/MetaList.d.ts +1 -1
  562. package/lib/components/MetaList/MetaList.test-ids.d.ts +1 -1
  563. package/lib/components/MetaList/MetaList.test-ids.d.ts.map +1 -1
  564. package/lib/components/Modal/Modal.d.ts.map +1 -1
  565. package/lib/components/Modal/Modal.js +10 -3
  566. package/lib/components/Modal/Modal.js.map +1 -1
  567. package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
  568. package/lib/components/Modal/Modal.styles.js +24 -3
  569. package/lib/components/Modal/Modal.styles.js.map +1 -1
  570. package/lib/components/Modal/ModalManager.d.ts.map +1 -1
  571. package/lib/components/Modal/ModalManager.js +5 -1
  572. package/lib/components/Modal/ModalManager.js.map +1 -1
  573. package/lib/components/Number/Number.test-ids.d.ts +2 -2
  574. package/lib/components/Number/Number.test-ids.d.ts.map +1 -1
  575. package/lib/components/Number/NumberInput.d.ts +1 -1
  576. package/lib/components/Number/NumberInput.d.ts.map +1 -1
  577. package/lib/components/Number/NumberInput.js +11 -3
  578. package/lib/components/Number/NumberInput.js.map +1 -1
  579. package/lib/components/Number/NumberRangeInput.d.ts +1 -1
  580. package/lib/components/Number/NumberRangeInput.d.ts.map +1 -1
  581. package/lib/components/Number/NumberRangeInput.js +5 -69
  582. package/lib/components/Number/NumberRangeInput.js.map +1 -1
  583. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts +3 -1
  584. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
  585. package/lib/components/PageTemplates/CategorySubPage.styles.js +3 -2
  586. package/lib/components/PageTemplates/CategorySubPage.styles.js.map +1 -1
  587. package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
  588. package/lib/components/PageTemplates/DashboardPage.js +41 -6
  589. package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
  590. package/lib/components/PageTemplates/PageTemplates.d.ts +1 -0
  591. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  592. package/lib/components/PageTemplates/PageTemplates.js +84 -31
  593. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  594. package/lib/components/Phone/Phone.test-ids.d.ts +1 -1
  595. package/lib/components/Phone/Phone.test-ids.d.ts.map +1 -1
  596. package/lib/components/Phone/PhoneDisplay.d.ts.map +1 -1
  597. package/lib/components/Phone/PhoneDisplay.js +2 -2
  598. package/lib/components/Phone/PhoneDisplay.js.map +1 -1
  599. package/lib/components/Phone/PhoneInput.d.ts +1 -1
  600. package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
  601. package/lib/components/Phone/PhoneInput.js +8 -3
  602. package/lib/components/Phone/PhoneInput.js.map +1 -1
  603. package/lib/components/Popover/Popover.d.ts +2 -0
  604. package/lib/components/Popover/Popover.d.ts.map +1 -1
  605. package/lib/components/Popover/Popover.js +20 -3
  606. package/lib/components/Popover/Popover.js.map +1 -1
  607. package/lib/components/Popover/Popover.styles.d.ts.map +1 -1
  608. package/lib/components/Popover/Popover.styles.js +2 -2
  609. package/lib/components/Popover/Popover.styles.js.map +1 -1
  610. package/lib/components/Popover/modifiers.d.ts.map +1 -1
  611. package/lib/components/Popover/modifiers.js +11 -5
  612. package/lib/components/Popover/modifiers.js.map +1 -1
  613. package/lib/components/Progress/Progress.d.ts.map +1 -1
  614. package/lib/components/Progress/Progress.js +2 -2
  615. package/lib/components/Progress/Progress.js.map +1 -1
  616. package/lib/components/Progress/Progress.styles.d.ts +1 -1
  617. package/lib/components/Progress/Progress.styles.d.ts.map +1 -1
  618. package/lib/components/Progress/Progress.styles.js +9 -9
  619. package/lib/components/Progress/Progress.styles.js.map +1 -1
  620. package/lib/components/Progress/Progress.types.d.ts +4 -0
  621. package/lib/components/Progress/Progress.types.d.ts.map +1 -1
  622. package/lib/components/Progress/Progress.types.js.map +1 -1
  623. package/lib/components/RadioCheck/RadioCheck.d.ts +6 -30
  624. package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
  625. package/lib/components/RadioCheck/RadioCheck.js +3 -4
  626. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  627. package/lib/components/SearchInput/SearchInput.d.ts +19 -6
  628. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  629. package/lib/components/SearchInput/SearchInput.js +5 -1
  630. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  631. package/lib/components/SearchInput/SearchInput.styles.d.ts +3 -3
  632. package/lib/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
  633. package/lib/components/SearchInput/SearchInput.styles.js +15 -15
  634. package/lib/components/SearchInput/SearchInput.styles.js.map +1 -1
  635. package/lib/components/Select/Select.d.ts +1 -1
  636. package/lib/components/Select/Select.test-ids.d.ts +1 -1
  637. package/lib/components/Select/Select.test-ids.d.ts.map +1 -1
  638. package/lib/components/Slider/Slider.d.ts +1 -1
  639. package/lib/components/Slider/Slider.test-ids.d.ts +1 -1
  640. package/lib/components/Slider/Slider.test-ids.d.ts.map +1 -1
  641. package/lib/components/SummaryItem/SummaryItem.d.ts +6 -1
  642. package/lib/components/SummaryItem/SummaryItem.d.ts.map +1 -1
  643. package/lib/components/SummaryItem/SummaryItem.js +13 -5
  644. package/lib/components/SummaryItem/SummaryItem.js.map +1 -1
  645. package/lib/components/SummaryItem/SummaryItem.test-ids.d.ts +1 -1
  646. package/lib/components/SummaryItem/SummaryItem.test-ids.d.ts.map +1 -1
  647. package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
  648. package/lib/components/SummaryList/SummaryList.js +9 -9
  649. package/lib/components/SummaryList/SummaryList.js.map +1 -1
  650. package/lib/components/Switch/Switch.js +2 -2
  651. package/lib/components/Switch/Switch.js.map +1 -1
  652. package/lib/components/Tabs/Tab.d.ts +7 -3
  653. package/lib/components/Tabs/Tab.d.ts.map +1 -1
  654. package/lib/components/Tabs/Tab.js +83 -23
  655. package/lib/components/Tabs/Tab.js.map +1 -1
  656. package/lib/components/Tabs/TabPanel.d.ts +13 -2
  657. package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
  658. package/lib/components/Tabs/TabPanel.js +60 -5
  659. package/lib/components/Tabs/TabPanel.js.map +1 -1
  660. package/lib/components/Tabs/Tabs.d.ts +0 -1
  661. package/lib/components/Tabs/Tabs.d.ts.map +1 -1
  662. package/lib/components/Tabs/Tabs.js +97 -35
  663. package/lib/components/Tabs/Tabs.js.map +1 -1
  664. package/lib/components/Tabs/Tabs.styles.d.ts +17 -0
  665. package/lib/components/Tabs/Tabs.styles.d.ts.map +1 -0
  666. package/lib/components/Tabs/Tabs.styles.js +110 -0
  667. package/lib/components/Tabs/Tabs.styles.js.map +1 -0
  668. package/lib/components/Tabs/TabsContext.d.ts +6 -0
  669. package/lib/components/Tabs/TabsContext.d.ts.map +1 -0
  670. package/lib/components/Tabs/TabsContext.js +6 -0
  671. package/lib/components/Tabs/TabsContext.js.map +1 -0
  672. package/lib/components/Tabs/index.d.ts +1 -0
  673. package/lib/components/Tabs/index.d.ts.map +1 -1
  674. package/lib/components/Tabs/index.js +1 -0
  675. package/lib/components/Tabs/index.js.map +1 -1
  676. package/lib/components/Text/Text.js +1 -1
  677. package/lib/components/Text/Text.js.map +1 -1
  678. package/lib/components/TextArea/TextArea.d.ts +1 -1
  679. package/lib/components/TextArea/TextArea.test-ids.d.ts +1 -1
  680. package/lib/components/TextArea/TextArea.test-ids.d.ts.map +1 -1
  681. package/lib/components/Toaster/Toaster.d.ts +1 -1
  682. package/lib/components/Toaster/Toaster.d.ts.map +1 -1
  683. package/lib/components/Toaster/Toaster.js +88 -19
  684. package/lib/components/Toaster/Toaster.js.map +1 -1
  685. package/lib/components/Toaster/Toaster.test-ids.d.ts +1 -1
  686. package/lib/components/Toaster/Toaster.test-ids.d.ts.map +1 -1
  687. package/lib/components/Toaster/Toaster.types.d.ts +17 -4
  688. package/lib/components/Toaster/Toaster.types.d.ts.map +1 -1
  689. package/lib/components/Toaster/Toaster.types.js.map +1 -1
  690. package/lib/components/Tooltip/Tooltip.d.ts +3 -3
  691. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  692. package/lib/components/Tooltip/Tooltip.js +19 -4
  693. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  694. package/lib/components/Tooltip/Tooltip.test-ids.d.ts +1 -1
  695. package/lib/components/Tooltip/Tooltip.test-ids.d.ts.map +1 -1
  696. package/lib/components/Tree/StandardTree.styles.d.ts +1 -1
  697. package/lib/components/Tree/Tree.d.ts +1 -1
  698. package/lib/components/Tree/Tree.test-ids.d.ts +2 -2
  699. package/lib/components/Tree/Tree.test-ids.d.ts.map +1 -1
  700. package/lib/hooks/index.d.ts +1 -0
  701. package/lib/hooks/index.d.ts.map +1 -1
  702. package/lib/hooks/index.js +1 -0
  703. package/lib/hooks/index.js.map +1 -1
  704. package/lib/hooks/useArrows.d.ts.map +1 -1
  705. package/lib/hooks/useArrows.js +3 -1
  706. package/lib/hooks/useArrows.js.map +1 -1
  707. package/lib/hooks/useEvent.d.ts +5 -0
  708. package/lib/hooks/useEvent.d.ts.map +1 -1
  709. package/lib/hooks/useEvent.js.map +1 -1
  710. package/lib/hooks/useFocusWithin.d.ts.map +1 -1
  711. package/lib/hooks/useFocusWithin.js +14 -8
  712. package/lib/hooks/useFocusWithin.js.map +1 -1
  713. package/lib/hooks/useI18n.d.ts +146 -3
  714. package/lib/hooks/useI18n.d.ts.map +1 -1
  715. package/lib/hooks/useScrollStick.d.ts +3 -3
  716. package/lib/hooks/useScrollStick.d.ts.map +1 -1
  717. package/lib/hooks/useScrollStick.js +6 -5
  718. package/lib/hooks/useScrollStick.js.map +1 -1
  719. package/lib/hooks/useScrollToggle.d.ts.map +1 -1
  720. package/lib/hooks/useScrollToggle.js +1 -0
  721. package/lib/hooks/useScrollToggle.js.map +1 -1
  722. package/lib/hooks/useSimpleStoreInstance.d.ts +9 -0
  723. package/lib/hooks/useSimpleStoreInstance.d.ts.map +1 -0
  724. package/lib/hooks/useSimpleStoreInstance.js +13 -0
  725. package/lib/hooks/useSimpleStoreInstance.js.map +1 -0
  726. package/lib/hooks/useTestIds.d.ts +1 -1
  727. package/lib/hooks/useTestIds.d.ts.map +1 -1
  728. package/lib/hooks/useTestIds.js +1 -1
  729. package/lib/hooks/useTestIds.js.map +1 -1
  730. package/lib/i18n/default.d.ts +146 -3
  731. package/lib/i18n/default.d.ts.map +1 -1
  732. package/lib/i18n/default.js +169 -11
  733. package/lib/i18n/default.js.map +1 -1
  734. package/lib/i18n/i18n.d.ts +146 -3
  735. package/lib/i18n/i18n.d.ts.map +1 -1
  736. package/lib/index.d.ts +2 -0
  737. package/lib/index.d.ts.map +1 -1
  738. package/lib/index.js +2 -0
  739. package/lib/index.js.map +1 -1
  740. package/lib/styles/GlobalStyle.d.ts +1 -1
  741. package/lib/styles/GlobalStyle.d.ts.map +1 -1
  742. package/lib/styles/GlobalStyle.js +6 -1
  743. package/lib/styles/GlobalStyle.js.map +1 -1
  744. package/lib/styles/mixins.d.ts +3 -0
  745. package/lib/styles/mixins.d.ts.map +1 -0
  746. package/lib/styles/mixins.js +14 -0
  747. package/lib/styles/mixins.js.map +1 -0
  748. package/lib/styles/utils.d.ts +11 -5
  749. package/lib/styles/utils.d.ts.map +1 -1
  750. package/lib/styles/utils.js +28 -12
  751. package/lib/styles/utils.js.map +1 -1
  752. package/lib/theme/ThemeMachine.d.ts.map +1 -1
  753. package/lib/theme/ThemeMachine.js.map +1 -1
  754. package/lib/theme/theme.d.ts +18 -0
  755. package/lib/theme/theme.d.ts.map +1 -1
  756. package/lib/theme/themeDefinition.json +9 -2
  757. package/lib/theme/themeOverrides.schema.json +13 -0
  758. package/lib/types/types.d.ts +4 -2
  759. package/lib/types/types.d.ts.map +1 -1
  760. package/lib/types/types.js.map +1 -1
  761. package/lib/utils/formatListToLocaleString.d.ts.map +1 -1
  762. package/lib/utils/formatListToLocaleString.js +5 -2
  763. package/lib/utils/formatListToLocaleString.js.map +1 -1
  764. package/lib/utils/index.d.ts +1 -0
  765. package/lib/utils/index.d.ts.map +1 -1
  766. package/lib/utils/index.js +1 -0
  767. package/lib/utils/index.js.map +1 -1
  768. package/lib/utils/isPositionWithinRect.d.ts +12 -0
  769. package/lib/utils/isPositionWithinRect.d.ts.map +1 -0
  770. package/lib/utils/isPositionWithinRect.js +11 -0
  771. package/lib/utils/isPositionWithinRect.js.map +1 -0
  772. package/lib/utils/withTestIds.d.ts +1 -1
  773. package/package.json +9 -6
  774. package/lib/components/Location/types.d.ts +0 -45
  775. package/lib/components/Location/types.d.ts.map +0 -1
  776. package/lib/components/Location/types.js +0 -10
  777. package/lib/components/Location/types.js.map +0 -1
@@ -17,10 +17,10 @@ import Button from '../Button';
17
17
  import ErrorState from '../ErrorState';
18
18
  import { StyledCardFooter } from '../Card/CardFooter';
19
19
  export const StyledSummaryListHeader = styled(CardHeader)(({ theme }) => css `
20
- &:not(${StyledCard} ${StyledCard} > &) {
21
- padding-block-end: calc(${theme.base.spacing} / 2);
22
- }
23
- `);
20
+ &:not(${StyledCard} ${StyledCard} > &) {
21
+ padding-block-end: calc(${theme.base.spacing} / 2);
22
+ }
23
+ `);
24
24
  StyledSummaryListHeader.defaultProps = defaultThemeProp;
25
25
  export const StyledSummaryListContent = styled(CardContent).withConfig(omitProps('loading'))(({ theme, loading }) => css `
26
26
  ${loading &&
@@ -42,12 +42,12 @@ export const StyledSummaryListContent = styled(CardContent).withConfig(omitProps
42
42
  `);
43
43
  StyledSummaryListContent.defaultProps = defaultThemeProp;
44
44
  export const StyledSummaryListItem = styled(SummaryItem)(({ theme }) => css `
45
- padding-block: ${theme.base.spacing};
45
+ padding-block: ${theme.base.spacing};
46
46
 
47
- &:not(:last-child) {
48
- border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};
49
- }
50
- `);
47
+ &:not(:last-child) {
48
+ border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};
49
+ }
50
+ `);
51
51
  StyledSummaryListItem.defaultProps = defaultThemeProp;
52
52
  export const SummaryListItems = ({ name, items }) => {
53
53
  const t = useI18n();
@@ -1 +1 @@
1
- {"version":3,"file":"SummaryList.js","sourceRoot":"","sources":["../../../src/components/SummaryList/SummaryList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,UAAU,MAAM,eAAe,CAAC;AAGvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,UAAU,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA2CtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,UAAU,CAAC,CACvD,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACZ,GAAG,CAAA;cACO,UAAU,IAAI,UAAU;kCACJ,KAAK,CAAC,IAAI,CAAC,OAAO;;KAE/C,CACJ,CAAC;AAEF,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CA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BAAuB,eACtB,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aAC9C,IAAI,IAAI,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAI,EAC5B,IAAI,IAAI,KAAC,IAAI,IAAC,OAAO,EAAE,UAAU,YAAG,IAAI,GAAQ,EAChD,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAC,KAAK,cAAE,KAAK,GAAS,IAC/C,EACN,OAAO,IAAI,KAAC,OAAO,IAAC,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,GAAI,IACtC,CAC3B,EAED,KAAC,wBAAwB,IAAC,OAAO,EAAE,OAAO,YAAG,OAAO,GAA4B,EAE/E,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,IAAI,SAAS,IAAI,CAC3E,KAAC,UAAU,IAAC,OAAO,EAAC,QAAQ,YAC1B,KAAC,MAAM,IACL,OAAO,EAAC,MAAM,gBACF,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAC3E,OAAO,EAAE,SAAS,YAEjB,CAAC,CAAC,UAAU,CAAC,GACP,GACE,CACd,IACI,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef, useMemo } from 'react';\nimport type { PropsWithoutRef, Ref, FC } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Actions from '../Actions';\nimport type { ActionsProps } from '../Actions';\nimport Flex from '../Flex';\nimport Text from '../Text';\nimport Count from '../Badges/Count';\nimport Icon from '../Icon';\nimport Card, { CardHeader, CardContent, CardFooter, StyledCard } from '../Card';\nimport EmptyState from '../EmptyState';\nimport type { EmptyStateProps } from '../EmptyState';\nimport type { ForwardProps, NoChildrenProp, OmitStrict, Action, HeadingTag } from '../../types';\nimport { omitProps } from '../../styles';\nimport { useI18n } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport SummaryItem from '../SummaryItem';\nimport type { SummaryItemProps } from '../SummaryItem';\nimport Progress from '../Progress';\nimport Button from '../Button';\nimport ErrorState from '../ErrorState';\nimport type { ErrorStateProps } from '../ErrorState';\nimport { StyledCardFooter } from '../Card/CardFooter';\n\nexport interface SummaryListProps extends NoChildrenProp {\n /** Name of the utility to be used as its heading along with associated actions and aria attributes. */\n name?: string;\n /**\n * The heading tag to render the provided name as with.\n * @default 'h2'\n */\n headingTag?: HeadingTag;\n /** Identifier for the icon within Pega icons. */\n icon?: string;\n /** Integer representing the total count of items for a list utility dataset. */\n count?: number;\n /** Top level actions for the utility. If more than one action is passed a consolidated ActionMenu will be generated. */\n actions?: Action[];\n /** If the utility is in a state of fetching data. */\n loading?: boolean | string;\n /** An array of SummaryListItem objects to render. Pass an appropriately limited length array with a desired sort order based on design system defaults or config. */\n items: SummaryListItem[];\n /** User click initiated callback for when to show view all modal. List lengths less than the count prop will display a \"View all\" button with this function is bound to. */\n onViewAll?: (callback: Function) => void;\n /** A simple message to display when there are no items. */\n noItemsText?: EmptyStateProps['message'];\n /**\n * Indicate an error occurred while acquiring data for the list.\n * The default error state may be overridden with custom props.\n */\n error?: boolean | ErrorStateProps;\n /** Ref for the SummaryList's root element. */\n ref?: Ref<HTMLElement>;\n}\n\nexport interface SummaryListItem\n extends OmitStrict<SummaryItemProps, 'actions'>,\n Pick<ActionsProps, 'contextualLabel'>,\n ForwardProps {\n /** A unique id to represent the item. */\n id: string;\n /** A set of Actions to render alongside the item. If more than one action is passed a consolidated ActionMenu will be generated. */\n actions?: Action[];\n}\n\nexport const StyledSummaryListHeader = styled(CardHeader)(\n ({ theme }) =>\n css`\n &:not(${StyledCard} ${StyledCard} > &) {\n padding-block-end: calc(${theme.base.spacing} / 2);\n }\n `\n);\n\nStyledSummaryListHeader.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryListContent = styled(CardContent).withConfig<{ loading?: boolean }>(\n omitProps('loading')\n)(\n ({ theme, loading }) => css`\n ${loading &&\n css`\n min-height: 4rem;\n `}\n\n &:not(:last-child) > ul > li:last-child {\n border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n\n &:not(${StyledCard} ${StyledCard} > &) {\n padding-block-end: calc(${theme.base.spacing} / 2);\n\n & + ${StyledCardFooter} {\n padding-block-start: ${theme.base.spacing};\n }\n }\n `\n);\n\nStyledSummaryListContent.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryListItem: typeof SummaryItem = styled(SummaryItem)(\n ({ theme }) =>\n css`\n padding-block: ${theme.base.spacing};\n\n &:not(:last-child) {\n border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n `\n);\n\nStyledSummaryListItem.defaultProps = defaultThemeProp;\n\nexport const SummaryListItems = ({ name, items }: Pick<SummaryListProps, 'items' | 'name'>) => {\n const t = useI18n();\n return (\n <ul>\n {items.map(({ id, actions: itemActions, contextualLabel, ...restItemProps }) => {\n return (\n <StyledSummaryListItem\n key={id}\n {...restItemProps}\n forwardedAs='li'\n actions={\n itemActions && (\n <Actions\n items={itemActions}\n contextualLabel={\n name && contextualLabel\n ? t('action_from_summarylist_heading', [contextualLabel, name])\n : contextualLabel\n }\n />\n )\n }\n />\n );\n })}\n </ul>\n );\n};\n\nconst SummaryList: FC<SummaryListProps & ForwardProps> = forwardRef(function SummaryList(\n {\n icon,\n name,\n headingTag = 'h2',\n count,\n actions,\n items,\n onViewAll,\n loading,\n noItemsText,\n error,\n ...restProps\n }: PropsWithoutRef<SummaryListProps>,\n ref: SummaryListProps['ref']\n) {\n const t = useI18n();\n\n const content = useMemo(() => {\n if (loading) {\n return (\n <Progress placement='local' message={typeof loading === 'string' ? loading : undefined} />\n );\n }\n\n if (error) {\n return <ErrorState {...(error === true ? {} : error)} />;\n }\n\n return items.length > 0 ? (\n <SummaryListItems name={name} items={items} />\n ) : (\n <EmptyState message={noItemsText} />\n );\n }, [loading, items, noItemsText, error]);\n\n return (\n <Card ref={ref} {...restProps}>\n {(icon || name || typeof count === 'number' || actions) && (\n <StyledSummaryListHeader>\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n {icon && <Icon name={icon} />}\n {name && <Text variant={headingTag}>{name}</Text>}\n {typeof count === 'number' && <Count>{count}</Count>}\n </Flex>\n {actions && <Actions items={actions} contextualLabel={name} />}\n </StyledSummaryListHeader>\n )}\n\n <StyledSummaryListContent loading={loading}>{content}</StyledSummaryListContent>\n\n {!error && typeof count === 'number' && count > items.length && onViewAll && (\n <CardFooter justify='center'>\n <Button\n variant='link'\n aria-label={name ? t('view_all_noun', [name.toLowerCase()]) : t('view_all')}\n onClick={onViewAll}\n >\n {t('view_all')}\n </Button>\n </CardFooter>\n )}\n </Card>\n );\n});\n\nexport default SummaryList;\n"]}
1
+ {"version":3,"file":"SummaryList.js","sourceRoot":"","sources":["../../../src/components/SummaryList/SummaryList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,UAAU,MAAM,eAAe,CAAC;AAGvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE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E,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAC3E,OAAO,EAAE,SAAS,YAEjB,CAAC,CAAC,UAAU,CAAC,GACP,GACE,CACd,IACI,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef, useMemo } from 'react';\nimport type { PropsWithoutRef, Ref, FC } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Actions from '../Actions';\nimport type { ActionsProps } from '../Actions';\nimport Flex from '../Flex';\nimport Text from '../Text';\nimport Count from '../Badges/Count';\nimport Icon from '../Icon';\nimport Card, { CardHeader, CardContent, CardFooter, StyledCard } from '../Card';\nimport EmptyState from '../EmptyState';\nimport type { EmptyStateProps } from '../EmptyState';\nimport type { ForwardProps, NoChildrenProp, OmitStrict, Action, HeadingTag } from '../../types';\nimport { omitProps } from '../../styles';\nimport { useI18n } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport SummaryItem from '../SummaryItem';\nimport type { SummaryItemProps } from '../SummaryItem';\nimport Progress from '../Progress';\nimport Button from '../Button';\nimport ErrorState from '../ErrorState';\nimport type { ErrorStateProps } from '../ErrorState';\nimport { StyledCardFooter } from '../Card/CardFooter';\n\nexport interface SummaryListProps extends NoChildrenProp {\n /** Name of the utility to be used as its heading along with associated actions and aria attributes. */\n name?: string;\n /**\n * The heading tag to render the provided name as with.\n * @default 'h2'\n */\n headingTag?: HeadingTag;\n /** Identifier for the icon within Pega icons. */\n icon?: string;\n /** Integer representing the total count of items for a list utility dataset. */\n count?: number;\n /** Top level actions for the utility. If more than one action is passed a consolidated ActionMenu will be generated. */\n actions?: Action[];\n /** If the utility is in a state of fetching data. */\n loading?: boolean | string;\n /** An array of SummaryListItem objects to render. Pass an appropriately limited length array with a desired sort order based on design system defaults or config. */\n items: SummaryListItem[];\n /** User click initiated callback for when to show view all modal. List lengths less than the count prop will display a \"View all\" button with this function is bound to. */\n onViewAll?: (callback: Function) => void;\n /** A simple message to display when there are no items. */\n noItemsText?: EmptyStateProps['message'];\n /**\n * Indicate an error occurred while acquiring data for the list.\n * The default error state may be overridden with custom props.\n */\n error?: boolean | ErrorStateProps;\n /** Ref for the SummaryList's root element. */\n ref?: Ref<HTMLElement>;\n}\n\nexport interface SummaryListItem\n extends OmitStrict<SummaryItemProps, 'actions'>,\n Pick<ActionsProps, 'contextualLabel'>,\n ForwardProps {\n /** A unique id to represent the item. */\n id: string;\n /** A set of Actions to render alongside the item. If more than one action is passed a consolidated ActionMenu will be generated. */\n actions?: Action[];\n}\n\nexport const StyledSummaryListHeader = styled(CardHeader)(\n ({ theme }) => css`\n &:not(${StyledCard} ${StyledCard} > &) {\n padding-block-end: calc(${theme.base.spacing} / 2);\n }\n `\n);\n\nStyledSummaryListHeader.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryListContent = styled(CardContent).withConfig<{ loading?: boolean }>(\n omitProps('loading')\n)(\n ({ theme, loading }) => css`\n ${loading &&\n css`\n min-height: 4rem;\n `}\n\n &:not(:last-child) > ul > li:last-child {\n border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n\n &:not(${StyledCard} ${StyledCard} > &) {\n padding-block-end: calc(${theme.base.spacing} / 2);\n\n & + ${StyledCardFooter} {\n padding-block-start: ${theme.base.spacing};\n }\n }\n `\n);\n\nStyledSummaryListContent.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryListItem: typeof SummaryItem = styled(SummaryItem)(\n ({ theme }) => css`\n padding-block: ${theme.base.spacing};\n\n &:not(:last-child) {\n border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n `\n);\n\nStyledSummaryListItem.defaultProps = defaultThemeProp;\n\nexport const SummaryListItems = ({ name, items }: Pick<SummaryListProps, 'items' | 'name'>) => {\n const t = useI18n();\n return (\n <ul>\n {items.map(({ id, actions: itemActions, contextualLabel, ...restItemProps }) => {\n return (\n <StyledSummaryListItem\n key={id}\n {...restItemProps}\n forwardedAs='li'\n actions={\n itemActions && (\n <Actions\n items={itemActions}\n contextualLabel={\n name && contextualLabel\n ? t('action_from_summarylist_heading', [contextualLabel, name])\n : contextualLabel\n }\n />\n )\n }\n />\n );\n })}\n </ul>\n );\n};\n\nconst SummaryList: FC<SummaryListProps & ForwardProps> = forwardRef(function SummaryList(\n {\n icon,\n name,\n headingTag = 'h2',\n count,\n actions,\n items,\n onViewAll,\n loading,\n noItemsText,\n error,\n ...restProps\n }: PropsWithoutRef<SummaryListProps>,\n ref: SummaryListProps['ref']\n) {\n const t = useI18n();\n\n const content = useMemo(() => {\n if (loading) {\n return (\n <Progress placement='local' message={typeof loading === 'string' ? loading : undefined} />\n );\n }\n\n if (error) {\n return <ErrorState {...(error === true ? {} : error)} />;\n }\n\n return items.length > 0 ? (\n <SummaryListItems name={name} items={items} />\n ) : (\n <EmptyState message={noItemsText} />\n );\n }, [loading, items, noItemsText, error]);\n\n return (\n <Card ref={ref} {...restProps}>\n {(icon || name || typeof count === 'number' || actions) && (\n <StyledSummaryListHeader>\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n {icon && <Icon name={icon} />}\n {name && <Text variant={headingTag}>{name}</Text>}\n {typeof count === 'number' && <Count>{count}</Count>}\n </Flex>\n {actions && <Actions items={actions} contextualLabel={name} />}\n </StyledSummaryListHeader>\n )}\n\n <StyledSummaryListContent loading={loading}>{content}</StyledSummaryListContent>\n\n {!error && typeof count === 'number' && count > items.length && onViewAll && (\n <CardFooter justify='center'>\n <Button\n variant='link'\n aria-label={name ? t('view_all_noun', [name.toLowerCase()]) : t('view_all')}\n onClick={onViewAll}\n >\n {t('view_all')}\n </Button>\n </CardFooter>\n )}\n </Card>\n );\n});\n\nexport default SummaryList;\n"]}
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
3
  import styled, { css } from 'styled-components';
4
- import { hideVisually, readableColor } from 'polished';
4
+ import { hideVisually } from 'polished';
5
5
  import { defaultThemeProp } from '../../theme';
6
6
  import { useDirection, useUID } from '../../hooks';
7
7
  import Flex from '../Flex';
8
- import { getHoverColors } from '../../styles';
8
+ import { getHoverColors, readableColor } from '../../styles';
9
9
  import Icon, { StyledIcon, registerIcon } from '../Icon';
10
10
  import * as checkIcon from '../Icon/icons/check.icon';
11
11
  import { tryCatch } from '../../utils';
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,YAAY,CAAC,SAAS,CAAC,CAAC;AA0BxB,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CACrC,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EACJ,UAAU,EAAE,EACV,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,GAAG,EAAE,EACvF,EACF,EACF,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;;;iCAGmB,KAAK;gBACtB,MAAM;;;;mCAIa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AC,UAAU,EACf,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,EAAE,kBACG,EAAE,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,GAAG,GACR,EACF,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,aACpE,KAAK,EACL,EAAE,IAAI,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,IACvB,IACM,CAChB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { ChangeEvent, FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\nimport { hideVisually, readableColor } from 'polished';\n\nimport type { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport type { FormControlProps } from '../FormControl';\nimport { useDirection, useUID } from '../../hooks';\nimport Flex from '../Flex';\nimport { getHoverColors } from '../../styles';\nimport Icon, { StyledIcon, registerIcon } from '../Icon';\nimport * as checkIcon from '../Icon/icons/check.icon';\nimport { tryCatch } from '../../utils';\n\nregisterIcon(checkIcon);\n\nexport interface SwitchProps extends BaseProps, NoChildrenProp {\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /**\n * Disables the control.\n * @default false\n */\n disabled?: FormControlProps['disabled'];\n /**\n * Sets checked prop via onChange.\n * @default false\n */\n on?: boolean;\n /** Callback that is triggered when the Switch is toggled. */\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\n /** Ref for the input element. */\n ref?: Ref<HTMLInputElement>;\n}\n\nexport const SwitchLabel = styled.label(\n ({\n theme: {\n base,\n components: {\n switch: { width, height, 'touch-width': touchWidth, 'touch-height': touchHeight, off }\n }\n }\n }) => {\n return css`\n position: relative;\n cursor: pointer;\n padding-inline-end: calc(${width} + 0.5rem);\n height: ${height};\n width: 100%;\n\n @media (pointer: coarse) {\n padding-inline-end: calc(${touchWidth} + 0.5rem);\n height: ${touchHeight};\n }\n\n /** Checkmark */\n & > ${StyledIcon} {\n position: absolute;\n inset-inline-end: calc(0.5 * ${width} + 0.25rem);\n height: calc(0.5 * ${height});\n width: calc(0.5 * ${height});\n\n @media (pointer: coarse) {\n inset-inline-end: calc(0.5 * ${touchWidth} + 0.25rem);\n height: calc(0.5 * ${touchHeight});\n width: calc(0.5 * ${touchHeight});\n }\n }\n\n /** Track */\n &::before {\n position: absolute;\n content: '';\n inset-inline-end: 0;\n width: ${width};\n height: ${height};\n background-color: ${off.color};\n transition: background-color calc(0.5 * ${base.animation.speed})\n ${base.animation.timing.ease};\n border-radius: calc(9999 * ${base['border-radius']});\n\n @media (pointer: coarse) {\n width: ${touchWidth};\n height: ${touchHeight};\n }\n }\n\n /** Switch */\n &::after {\n position: absolute;\n content: '';\n inset-inline-end: calc(${width} - ${height} + 0.0625rem);\n height: calc(${height} - 0.125rem);\n width: calc(${height} - 0.125rem);\n background-color: ${base.palette['primary-background']};\n transition: transform calc(0.5 * ${base.animation.speed}) ${base.animation.timing.ease};\n border-radius: calc(9999 * ${base['border-radius']});\n\n @media (pointer: coarse) {\n inset-inline-end: calc(${touchWidth} - ${touchHeight} + 0.0625rem);\n height: calc(${touchHeight} - 0.125rem);\n width: calc(${touchHeight} - 0.125rem);\n }\n }\n `;\n }\n);\n\nSwitchLabel.defaultProps = defaultThemeProp;\n\nexport const SwitchInput = styled.input(\n ({\n theme: {\n base,\n components: {\n 'form-control': {\n ':focus': { 'box-shadow': shadow }\n },\n switch: { height, width, 'touch-height': touchHeight, 'touch-width': touchWidth, on, off }\n }\n }\n }) => {\n const { ltr } = useDirection();\n\n const checkmarkColor = tryCatch(() => readableColor(on.color));\n\n const onHoverColors = getHoverColors(on.color);\n const offHoverColors = getHoverColors(off.color);\n\n return css`\n ${hideVisually}\n\n & + ${SwitchLabel} {\n min-height: ${base['hit-area']['mouse-min']};\n @media (pointer: coarse) {\n min-height: ${base['hit-area']['finger-min']};\n }\n }\n\n & + ${SwitchLabel} > ${StyledIcon} {\n color: ${checkmarkColor};\n }\n\n &:checked + ${SwitchLabel}::before {\n background-color: ${on.color};\n }\n\n &:checked + ${SwitchLabel}::after {\n transform: translateX(calc((${width} - ${height}) * ${ltr ? '1' : '-1'}));\n\n @media (pointer: coarse) {\n transform: translateX(calc((${touchWidth} - ${touchHeight}) * ${ltr ? '1' : '-1'}));\n }\n }\n\n &:hover + ${SwitchLabel} > ${StyledIcon} {\n color: ${onHoverColors.foreground};\n }\n\n &:hover:checked + ${SwitchLabel}::before {\n background-color: ${onHoverColors.background};\n }\n\n &:hover + ${SwitchLabel}::before {\n background-color: ${offHoverColors.background};\n }\n\n &:focus + ${SwitchLabel}::before {\n box-shadow: ${shadow};\n }\n\n &:disabled + ${SwitchLabel} {\n opacity: ${base['disabled-opacity']};\n }\n `;\n }\n);\n\nSwitchInput.defaultProps = defaultThemeProp;\n\nexport const StyledSwitch = styled.div``;\n\nconst Switch: FunctionComponent<SwitchProps & ForwardProps> = forwardRef(function Switch(\n props: PropsWithoutRef<SwitchProps>,\n ref: SwitchProps['ref']\n) {\n const uid = useUID();\n const { id = uid, label, disabled = false, on = false, onChange, ...restProps } = props;\n\n return (\n <StyledSwitch>\n <SwitchInput\n {...restProps}\n id={id}\n type='checkbox'\n role='switch'\n checked={on}\n aria-checked={on}\n disabled={disabled}\n onChange={onChange}\n ref={ref}\n />\n <Flex container={{ alignItems: 'center' }} as={SwitchLabel} htmlFor={id}>\n {label}\n {on && <Icon name='check' />}\n </Flex>\n </StyledSwitch>\n );\n});\n\nexport default Switch;\n"]}
1
+ {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":";AAAA,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,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { ChangeEvent, FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\nimport { hideVisually } from 'polished';\n\nimport type { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport type { FormControlProps } from '../FormControl';\nimport { useDirection, useUID } from '../../hooks';\nimport Flex from '../Flex';\nimport { getHoverColors, readableColor } from '../../styles';\nimport Icon, { StyledIcon, registerIcon } from '../Icon';\nimport * as checkIcon from '../Icon/icons/check.icon';\nimport { tryCatch } from '../../utils';\n\nregisterIcon(checkIcon);\n\nexport interface SwitchProps extends BaseProps, NoChildrenProp {\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /**\n * Disables the control.\n * @default false\n */\n disabled?: FormControlProps['disabled'];\n /**\n * Sets checked prop via onChange.\n * @default false\n */\n on?: boolean;\n /** Callback that is triggered when the Switch is toggled. */\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\n /** Ref for the input element. */\n ref?: Ref<HTMLInputElement>;\n}\n\nexport const SwitchLabel = styled.label(\n ({\n theme: {\n base,\n components: {\n switch: { width, height, 'touch-width': touchWidth, 'touch-height': touchHeight, off }\n }\n }\n }) => {\n return css`\n position: relative;\n cursor: pointer;\n padding-inline-end: calc(${width} + 0.5rem);\n height: ${height};\n width: 100%;\n\n @media (pointer: coarse) {\n padding-inline-end: calc(${touchWidth} + 0.5rem);\n height: ${touchHeight};\n }\n\n /** Checkmark */\n & > ${StyledIcon} {\n position: absolute;\n inset-inline-end: calc(0.5 * ${width} + 0.25rem);\n height: calc(0.5 * ${height});\n width: calc(0.5 * ${height});\n\n @media (pointer: coarse) {\n inset-inline-end: calc(0.5 * ${touchWidth} + 0.25rem);\n height: calc(0.5 * ${touchHeight});\n width: calc(0.5 * ${touchHeight});\n }\n }\n\n /** Track */\n &::before {\n position: absolute;\n content: '';\n inset-inline-end: 0;\n width: ${width};\n height: ${height};\n background-color: ${off.color};\n transition: background-color calc(0.5 * ${base.animation.speed})\n ${base.animation.timing.ease};\n border-radius: calc(9999 * ${base['border-radius']});\n\n @media (pointer: coarse) {\n width: ${touchWidth};\n height: ${touchHeight};\n }\n }\n\n /** Switch */\n &::after {\n position: absolute;\n content: '';\n inset-inline-end: calc(${width} - ${height} + 0.0625rem);\n height: calc(${height} - 0.125rem);\n width: calc(${height} - 0.125rem);\n background-color: ${base.palette['primary-background']};\n transition: transform calc(0.5 * ${base.animation.speed}) ${base.animation.timing.ease};\n border-radius: calc(9999 * ${base['border-radius']});\n\n @media (pointer: coarse) {\n inset-inline-end: calc(${touchWidth} - ${touchHeight} + 0.0625rem);\n height: calc(${touchHeight} - 0.125rem);\n width: calc(${touchHeight} - 0.125rem);\n }\n }\n `;\n }\n);\n\nSwitchLabel.defaultProps = defaultThemeProp;\n\nexport const SwitchInput = styled.input(\n ({\n theme: {\n base,\n components: {\n 'form-control': {\n ':focus': { 'box-shadow': shadow }\n },\n switch: { height, width, 'touch-height': touchHeight, 'touch-width': touchWidth, on, off }\n }\n }\n }) => {\n const { ltr } = useDirection();\n\n const checkmarkColor = tryCatch(() => readableColor(on.color));\n\n const onHoverColors = getHoverColors(on.color);\n const offHoverColors = getHoverColors(off.color);\n\n return css`\n ${hideVisually}\n\n & + ${SwitchLabel} {\n min-height: ${base['hit-area']['mouse-min']};\n @media (pointer: coarse) {\n min-height: ${base['hit-area']['finger-min']};\n }\n }\n\n & + ${SwitchLabel} > ${StyledIcon} {\n color: ${checkmarkColor};\n }\n\n &:checked + ${SwitchLabel}::before {\n background-color: ${on.color};\n }\n\n &:checked + ${SwitchLabel}::after {\n transform: translateX(calc((${width} - ${height}) * ${ltr ? '1' : '-1'}));\n\n @media (pointer: coarse) {\n transform: translateX(calc((${touchWidth} - ${touchHeight}) * ${ltr ? '1' : '-1'}));\n }\n }\n\n &:hover + ${SwitchLabel} > ${StyledIcon} {\n color: ${onHoverColors.foreground};\n }\n\n &:hover:checked + ${SwitchLabel}::before {\n background-color: ${onHoverColors.background};\n }\n\n &:hover + ${SwitchLabel}::before {\n background-color: ${offHoverColors.background};\n }\n\n &:focus + ${SwitchLabel}::before {\n box-shadow: ${shadow};\n }\n\n &:disabled + ${SwitchLabel} {\n opacity: ${base['disabled-opacity']};\n }\n `;\n }\n);\n\nSwitchInput.defaultProps = defaultThemeProp;\n\nexport const StyledSwitch = styled.div``;\n\nconst Switch: FunctionComponent<SwitchProps & ForwardProps> = forwardRef(function Switch(\n props: PropsWithoutRef<SwitchProps>,\n ref: SwitchProps['ref']\n) {\n const uid = useUID();\n const { id = uid, label, disabled = false, on = false, onChange, ...restProps } = props;\n\n return (\n <StyledSwitch>\n <SwitchInput\n {...restProps}\n id={id}\n type='checkbox'\n role='switch'\n checked={on}\n aria-checked={on}\n disabled={disabled}\n onChange={onChange}\n ref={ref}\n />\n <Flex container={{ alignItems: 'center' }} as={SwitchLabel} htmlFor={id}>\n {label}\n {on && <Icon name='check' />}\n </Flex>\n </StyledSwitch>\n );\n});\n\nexport default Switch;\n"]}
@@ -1,7 +1,7 @@
1
- import type { FC, ReactNode } from 'react';
1
+ import type { FC, ReactNode, Ref } from 'react';
2
2
  import type { ForwardProps } from '../../types';
3
3
  import type { TabsProps } from './Tabs.types';
4
- interface TabProps {
4
+ export interface TabProps {
5
5
  /** Indicates if this Tab is active. */
6
6
  selected: boolean;
7
7
  /** The text to display as the name of the Tab. */
@@ -14,12 +14,16 @@ interface TabProps {
14
14
  disabled?: boolean;
15
15
  /** An error to associate with the Tab. */
16
16
  errors?: number | boolean;
17
+ /** Ref to the tab element. */
18
+ ref?: Ref<HTMLButtonElement | HTMLAnchorElement>;
17
19
  }
18
20
  export interface StyledTabProps {
19
21
  selected: TabProps['selected'];
20
22
  tabType: TabProps['type'];
21
23
  }
22
- export declare const StyledTab: import("styled-components").StyledComponent<import("react").FunctionComponent<import("../Button/BareButton").BareButtonProps & ForwardProps>, import("styled-components").DefaultTheme, StyledTabProps, never>;
24
+ export declare const StyledTab: import("styled-components").StyledComponent<import("react").FunctionComponent<import("../Button/BareButton").BareButtonProps & ForwardProps>, import("styled-components").DefaultTheme, StyledTabProps & {
25
+ level?: number | undefined;
26
+ }, never>;
23
27
  declare const Tab: FC<TabProps & ForwardProps>;
24
28
  export default Tab;
25
29
  //# sourceMappingURL=Tab.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tab.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAwB,MAAM,OAAO,CAAC;AAYjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,UAAU,QAAQ;IAChB,uCAAuC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,6DAA6D;IAC7D,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC/B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC3B;AAoID,eAAO,MAAM,SAAS,gNAiCrB,CAAC;AAIF,QAAA,MAAM,GAAG,EAAE,EAAE,CAAC,QAAQ,GAAG,YAAY,CAwBnC,CAAC;AAEH,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tab.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AAajE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAK9C,MAAM,WAAW,QAAQ;IACvB,uCAAuC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,6DAA6D;IAC7D,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,8BAA8B;IAC9B,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC/B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC3B;AAkMD,eAAO,MAAM,SAAS;;SAqCrB,CAAC;AAIF,QAAA,MAAM,GAAG,EAAE,EAAE,CAAC,QAAQ,GAAG,YAAY,CAgCnC,CAAC;AAEH,eAAe,GAAG,CAAC"}
@@ -1,15 +1,18 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from 'react';
2
+ import { forwardRef, useContext } from 'react';
3
3
  import styled, { css } from 'styled-components';
4
- import { transparentize } from 'polished';
4
+ import { meetsContrastGuidelines, mix, transparentize } from 'polished';
5
+ import { readableHue } from '../../styles';
5
6
  import * as warnSolidIcon from '../Icon/icons/warn-solid.icon';
6
- import Icon, { registerIcon } from '../Icon';
7
+ import { registerIcon } from '../Icon';
7
8
  import { useConsolidatedRef, useElement, useI18n } from '../../hooks';
8
9
  import Tooltip from '../Tooltip';
9
10
  import { defaultThemeProp } from '../../theme';
10
11
  import { tryCatch } from '../../utils';
11
12
  import { StyledCount } from '../Badges/Count';
12
13
  import BareButton from '../Button/BareButton';
14
+ import TabsContext from './TabsContext';
15
+ import { StyledErrorIcon } from './Tabs.styles';
13
16
  registerIcon(warnSolidIcon);
14
17
  const activeStyle = (color) => css `
15
18
  ::after {
@@ -17,25 +20,49 @@ const activeStyle = (color) => css `
17
20
  background-color: ${color};
18
21
  }
19
22
  `;
20
- const StyledErrorIcon = styled(Icon)(({ theme }) => css `
21
- color: ${theme.base.palette.urgent};
22
- `);
23
- StyledErrorIcon.defaultProps = defaultThemeProp;
24
- const getHorizontalStyles = ({ selected, theme }) => {
25
- const primaryColor = theme.base.palette.interactive;
26
- const lightenedColor = tryCatch(() => transparentize(0.3, primaryColor)) ?? '';
23
+ const getHorizontalUnselectedHoverStyle = ({ level, opacity, color }) => level && level > 1
24
+ ? css `
25
+ ::before {
26
+ content: '';
27
+ position: absolute;
28
+ top: 0;
29
+ bottom: 0;
30
+ left: 0;
31
+ right: 0;
32
+ border-radius: inherit;
33
+ background-color: currentColor;
34
+ opacity: ${opacity};
35
+ }
36
+ `
37
+ : css `
38
+ background-color: ${color};
39
+ border-start-start-radius: calc(0.5rem * 0.5);
40
+ border-start-end-radius: calc(0.5rem * 0.5);
41
+ `;
42
+ const getHorizontalStyles = ({ selected, level, theme }) => {
43
+ const color = theme.components.button.color;
44
+ const secondaryColor = theme.base.palette['secondary-background'];
45
+ const lightenedColor = tryCatch(() => transparentize(0.3, color)) ?? '';
46
+ const backgroundUsable = meetsContrastGuidelines(color, secondaryColor).AA;
47
+ const usableColor = backgroundUsable ? color : readableHue(color, secondaryColor);
48
+ const hoverBackgroundColor = tryCatch(() => mix(0.9, secondaryColor, usableColor));
49
+ const activeBackgroundColor = tryCatch(() => mix(0.8, secondaryColor, usableColor));
27
50
  const { spacing } = theme.base;
28
51
  return css `
29
52
  align-items: center;
30
53
  display: flex;
31
54
  flex-direction: row;
32
55
  height: calc(4 * ${spacing});
33
- padding: 0 calc(2 * ${spacing});
56
+ padding: 0 calc(1.5 * ${spacing});
34
57
  border: none;
35
58
  text-decoration: none;
36
59
 
60
+ @media (pointer: coarse) {
61
+ height: ${theme.base['hit-area']['finger-min']};
62
+ }
63
+
37
64
  span:first-of-type {
38
- color: ${selected ? primaryColor : theme.base.palette['foreground-color']};
65
+ color: ${selected ? color : theme.base.palette['foreground-color']};
39
66
  display: inline-block;
40
67
 
41
68
  ::before {
@@ -53,26 +80,58 @@ const getHorizontalStyles = ({ selected, theme }) => {
53
80
  }
54
81
 
55
82
  ::after {
56
- background: ${selected ? primaryColor : lightenedColor};
83
+ background: ${selected ? color : lightenedColor};
57
84
  display: ${selected ? 'block' : 'none'};
58
85
  content: '';
59
86
  position: absolute;
60
87
  height: 0.125rem;
61
88
  bottom: 0;
62
- left: 0;
63
- right: 0;
89
+ left: calc(1.5 * ${spacing});
90
+ right: calc(1.5 * ${spacing});
64
91
  }
65
92
 
66
- &:hover&:not(:disabled) {
67
- ${activeStyle(lightenedColor)}
68
- text-decoration: none;
69
- }
93
+ ${!selected
94
+ ? css `
95
+ @media (hover: hover) {
96
+ &:not(:disabled):hover {
97
+ text-decoration: none;
98
+ ${getHorizontalUnselectedHoverStyle({
99
+ level,
100
+ opacity: 0.1,
101
+ color: hoverBackgroundColor
102
+ })}
103
+ }
104
+
105
+ &:not(:disabled):active {
106
+ text-decoration: none;
107
+ ${getHorizontalUnselectedHoverStyle({
108
+ level,
109
+ opacity: 0.2,
110
+ color: activeBackgroundColor
111
+ })}
112
+ }
113
+ }
114
+ `
115
+ : css `
116
+ ${level &&
117
+ level > 1 &&
118
+ css `
119
+ background-color: ${theme.base.palette['primary-background']};
120
+ `}
121
+ `}
70
122
 
71
123
  &:focus,
72
124
  &:not([disabled]):focus {
73
- ${activeStyle(lightenedColor)}
125
+ border-radius: calc(0.5rem * 0.5);
74
126
  box-shadow: ${theme.base.shadow['focus-inset']};
75
127
  text-decoration: none;
128
+ ::after {
129
+ display: none;
130
+ }
131
+ }
132
+
133
+ @media (pointer: coarse) {
134
+ min-block-size: ${theme.base['hit-area'].finger};
76
135
  }
77
136
 
78
137
  ${StyledCount} {
@@ -126,7 +185,7 @@ const getVerticalStyles = ({ selected, theme }) => {
126
185
  }
127
186
  `;
128
187
  };
129
- export const StyledTab = styled(BareButton)(({ theme, tabType, selected }) => css `
188
+ export const StyledTab = styled(BareButton)(({ theme, tabType, selected, level }) => css `
130
189
  position: relative;
131
190
  background: none;
132
191
  cursor: pointer;
@@ -151,7 +210,7 @@ export const StyledTab = styled(BareButton)(({ theme, tabType, selected }) => cs
151
210
  }
152
211
 
153
212
  ${tabType === 'horizontal'
154
- ? getHorizontalStyles({ theme, selected })
213
+ ? getHorizontalStyles({ theme, selected, level })
155
214
  : getVerticalStyles({ theme, selected })}
156
215
 
157
216
  ${StyledErrorIcon} {
@@ -163,7 +222,8 @@ const Tab = forwardRef(function Tab({ selected, content, count, type, disabled,
163
222
  const t = useI18n();
164
223
  const [tabEl, setTabEl] = useElement();
165
224
  const tabRef = useConsolidatedRef(ref, setTabEl);
166
- return (_jsxs(StyledTab, { ref: tabRef, selected: selected, tabType: type, disabled: disabled, ...restProps, children: [_jsxs("span", { children: [!!errors && (_jsxs(_Fragment, { children: [_jsx(StyledErrorIcon, { name: 'warn-solid' }), _jsx(Tooltip, { target: tabEl, hideDelay: 'none', showDelay: 'none', children: t('tab_error_tooltip', [content]) })] })), _jsx("span", { "data-content": content, children: content })] }), count] }));
225
+ const { level } = useContext(TabsContext);
226
+ return (_jsxs(StyledTab, { ref: tabRef, selected: selected, tabType: type, disabled: disabled, level: level, ...restProps, children: [_jsxs("span", { children: [!!errors && (_jsxs(_Fragment, { children: [_jsx(StyledErrorIcon, { name: 'warn-solid' }), _jsx(Tooltip, { target: tabEl, hideDelay: 'none', showDelay: 'none', children: t('tab_error_tooltip', [content]) })] })), _jsx("span", { "data-content": content, children: content })] }), count] }));
167
227
  });
168
228
  export default Tab;
169
229
  //# sourceMappingURL=Tab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tab.js","sourceRoot":"","sources":["../../../src/components/Tabs/Tab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,KAAK,aAAa,MAAM,+BAA+B,CAAC;AAC/D,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAI9C,YAAY,CAAC,aAAa,CAAC,CAAC;AAsB5B,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,GAAG,CAAA;;;wBAGlB,KAAK;;CAE5B,CAAC;AAEF,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,CAClC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;aACP,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM;GACnC,CACF,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC;A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,CAAC,CAAC;IAEpE,OAAO,CACL,MAAC,SAAS,IAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,KAAM,SAAS,aAC1F,2BACG,CAAC,CAAC,MAAM,IAAI,CACX,8BACE,KAAC,eAAe,IAAC,IAAI,EAAC,YAAY,GAAG,EACrC,KAAC,OAAO,IAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAC,MAAM,EAAC,SAAS,EAAC,MAAM,YACtD,CAAC,CAAC,mBAAmB,EAAE,CAAC,OAAO,CAAC,CAAC,GAC1B,IACT,CACJ,EACD,+BAAoB,OAAO,YAAG,OAAO,GAAQ,IACxC,EACN,KAAK,IACI,CACb,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,GAAG,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FC, ReactNode, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\nimport type { StyledProps } from 'styled-components';\nimport { transparentize } from 'polished';\n\nimport * as warnSolidIcon from '../Icon/icons/warn-solid.icon';\nimport Icon, { registerIcon } from '../Icon';\nimport { useConsolidatedRef, useElement, useI18n } from '../../hooks';\nimport Tooltip from '../Tooltip';\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport { StyledCount } from '../Badges/Count';\nimport type { ForwardProps } from '../../types';\nimport BareButton from '../Button/BareButton';\n\nimport type { TabsProps } from './Tabs.types';\n\nregisterIcon(warnSolidIcon);\n\ninterface TabProps {\n /** Indicates if this Tab is active. */\n selected: boolean;\n /** The text to display as the name of the Tab. */\n content: string;\n /** A number to associate with the Tab. */\n count?: ReactNode;\n /** Determines the direction in which the Tab will render. */\n type: TabsProps['type'];\n /** Disables the tab if true */\n disabled?: boolean;\n /** An error to associate with the Tab. */\n errors?: number | boolean;\n}\n\nexport interface StyledTabProps {\n selected: TabProps['selected'];\n tabType: TabProps['type'];\n}\n\nconst activeStyle = (color: string) => css`\n ::after {\n display: block;\n background-color: ${color};\n }\n`;\n\nconst StyledErrorIcon = styled(Icon)(\n ({ theme }) => css`\n color: ${theme.base.palette.urgent};\n `\n);\n\nStyledErrorIcon.defaultProps = defaultThemeProp;\n\nconst getHorizontalStyles = ({\n selected,\n theme\n}: Pick<StyledProps<StyledTabProps>, 'theme' | 'selected'>) => {\n const primaryColor = theme.base.palette.interactive;\n const lightenedColor = tryCatch(() => transparentize(0.3, primaryColor)) ?? '';\n const { spacing } = theme.base;\n\n return css`\n align-items: center;\n display: flex;\n flex-direction: row;\n height: calc(4 * ${spacing});\n padding: 0 calc(2 * ${spacing});\n border: none;\n text-decoration: none;\n\n span:first-of-type {\n color: ${selected ? primaryColor : theme.base.palette['foreground-color']};\n display: inline-block;\n\n ::before {\n content: attr(data-content);\n display: block;\n font-weight: bold;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n }\n }\n\n &:first-child {\n margin-left: 0;\n }\n\n ::after {\n background: ${selected ? primaryColor : lightenedColor};\n display: ${selected ? 'block' : 'none'};\n content: '';\n position: absolute;\n height: 0.125rem;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n &:hover&:not(:disabled) {\n ${activeStyle(lightenedColor)}\n text-decoration: none;\n }\n\n &:focus,\n &:not([disabled]):focus {\n ${activeStyle(lightenedColor)}\n box-shadow: ${theme.base.shadow['focus-inset']};\n text-decoration: none;\n }\n\n ${StyledCount} {\n margin-inline-start: calc(0.5 * ${spacing});\n }\n `;\n};\n\nconst getVerticalStyles = ({\n selected,\n theme\n}: Pick<StyledProps<StyledTabProps>, 'theme' | 'selected'>) => {\n const borderColor = theme.base.palette['border-line'];\n const primaryColor = theme.base.palette.interactive;\n const lightenedColor = tryCatch(() => transparentize(0.5, primaryColor)) ?? '';\n const { spacing } = theme.base;\n\n return css`\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-style: solid;\n color: ${theme.base.palette['foreground-color']};\n border-width: 0.0625rem 0;\n border-color: ${borderColor};\n height: calc(5.5 * ${spacing});\n margin-top: -0.0625rem;\n padding: 0 calc(2 * ${spacing});\n text-decoration: none;\n\n &:first-child {\n border-top: 0.0625rem solid ${borderColor};\n }\n\n ::after {\n content: '';\n position: absolute;\n display: ${selected ? 'block' : 'none'};\n top: 0;\n bottom: 0;\n right: 0;\n width: 0.25rem;\n background: ${primaryColor};\n }\n\n &:hover&:not(:disabled) {\n ${activeStyle(lightenedColor)}\n text-decoration: none;\n }\n\n &:focus,\n &:not([disabled]):focus {\n ${activeStyle(primaryColor)}\n box-shadow: inset 0 0 0 0.0625rem ${primaryColor};\n text-decoration: none;\n }\n `;\n};\n\nexport const StyledTab = styled(BareButton)<StyledTabProps>(\n ({ theme, tabType, selected }) => css`\n position: relative;\n background: none;\n cursor: pointer;\n white-space: nowrap;\n\n ${selected &&\n css`\n font-weight: bold;\n `}\n\n & + & {\n margin-inline-start: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: ${theme.base['disabled-opacity']};\n }\n\n ${tabType === 'horizontal'\n ? getHorizontalStyles({ theme, selected })\n : getVerticalStyles({ theme, selected })}\n\n ${StyledErrorIcon} {\n margin-inline-end: calc(0.5 * ${theme.base.spacing});\n }\n `\n);\n\nStyledTab.defaultProps = defaultThemeProp;\n\nconst Tab: FC<TabProps & ForwardProps> = forwardRef(function Tab(\n { selected, content, count, type, disabled, errors, ...restProps }: PropsWithoutRef<TabProps>,\n ref: Ref<HTMLButtonElement>\n) {\n const t = useI18n();\n const [tabEl, setTabEl] = useElement();\n const tabRef = useConsolidatedRef<HTMLButtonElement>(ref, setTabEl);\n\n return (\n <StyledTab ref={tabRef} selected={selected} tabType={type} disabled={disabled} {...restProps}>\n <span>\n {!!errors && (\n <>\n <StyledErrorIcon name='warn-solid' />\n <Tooltip target={tabEl} hideDelay='none' showDelay='none'>\n {t('tab_error_tooltip', [content])}\n </Tooltip>\n </>\n )}\n <span data-content={content}>{content}</span>\n </span>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QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,KACR,SAAS,aAEb,2BACG,CAAC,CAAC,MAAM,IAAI,CACX,8BACE,KAAC,eAAe,IAAC,IAAI,EAAC,YAAY,GAAG,EACrC,KAAC,OAAO,IAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAC,MAAM,EAAC,SAAS,EAAC,MAAM,YACtD,CAAC,CAAC,mBAAmB,EAAE,CAAC,OAAO,CAAC,CAAC,GAC1B,IACT,CACJ,EACD,+BAAoB,OAAO,YAAG,OAAO,GAAQ,IACxC,EACN,KAAK,IACI,CACb,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,GAAG,CAAC","sourcesContent":["import { forwardRef, useContext } from 'react';\nimport type { FC, ReactNode, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\nimport type { StyledProps } from 'styled-components';\nimport { meetsContrastGuidelines, mix, transparentize } from 'polished';\n\nimport { readableHue } from '../../styles';\nimport * as warnSolidIcon from '../Icon/icons/warn-solid.icon';\nimport { registerIcon } from '../Icon';\nimport { useConsolidatedRef, useElement, useI18n } from '../../hooks';\nimport Tooltip from '../Tooltip';\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport { StyledCount } from '../Badges/Count';\nimport type { ForwardProps } from '../../types';\nimport BareButton from '../Button/BareButton';\n\nimport TabsContext from './TabsContext';\nimport type { TabsContextValue } from './TabsContext';\nimport type { TabsProps } from './Tabs.types';\nimport { StyledErrorIcon } from './Tabs.styles';\n\nregisterIcon(warnSolidIcon);\n\nexport interface TabProps {\n /** Indicates if this Tab is active. */\n selected: boolean;\n /** The text to display as the name of the Tab. */\n content: string;\n /** A number to associate with the Tab. */\n count?: ReactNode;\n /** Determines the direction in which the Tab will render. */\n type: TabsProps['type'];\n /** Disables the tab if true */\n disabled?: boolean;\n /** An error to associate with the Tab. */\n errors?: number | boolean;\n /** Ref to the tab element. */\n ref?: Ref<HTMLButtonElement | HTMLAnchorElement>;\n}\n\nexport interface StyledTabProps {\n selected: TabProps['selected'];\n tabType: TabProps['type'];\n}\n\nconst activeStyle = (color: string) => css`\n ::after {\n display: block;\n background-color: ${color};\n }\n`;\n\nconst getHorizontalUnselectedHoverStyle = ({\n level,\n opacity,\n color\n}: { level?: TabsContextValue['level'] } & { color?: string; opacity: number }) =>\n level && level > 1\n ? css`\n ::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n border-radius: inherit;\n background-color: currentColor;\n opacity: ${opacity};\n }\n `\n : css`\n background-color: ${color};\n border-start-start-radius: calc(0.5rem * 0.5);\n border-start-end-radius: calc(0.5rem * 0.5);\n `;\n\nconst getHorizontalStyles = ({\n selected,\n level,\n theme\n}: Pick<StyledProps<StyledTabProps>, 'theme' | 'selected'> & {\n level?: TabsContextValue['level'];\n}) => {\n const color = theme.components.button.color;\n const secondaryColor = theme.base.palette['secondary-background'];\n const lightenedColor = tryCatch(() => transparentize(0.3, color)) ?? '';\n const backgroundUsable = meetsContrastGuidelines(color, secondaryColor).AA;\n const usableColor = backgroundUsable ? color : readableHue(color, secondaryColor);\n const hoverBackgroundColor = tryCatch(() => mix(0.9, secondaryColor, usableColor));\n const activeBackgroundColor = tryCatch(() => mix(0.8, secondaryColor, usableColor));\n\n const { spacing } = theme.base;\n\n return css`\n align-items: center;\n display: flex;\n flex-direction: row;\n height: calc(4 * ${spacing});\n padding: 0 calc(1.5 * ${spacing});\n border: none;\n text-decoration: none;\n\n @media (pointer: coarse) {\n height: ${theme.base['hit-area']['finger-min']};\n }\n\n span:first-of-type {\n color: ${selected ? color : theme.base.palette['foreground-color']};\n display: inline-block;\n\n ::before {\n content: attr(data-content);\n display: block;\n font-weight: bold;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n }\n }\n\n &:first-child {\n margin-left: 0;\n }\n\n ::after {\n background: ${selected ? color : lightenedColor};\n display: ${selected ? 'block' : 'none'};\n content: '';\n position: absolute;\n height: 0.125rem;\n bottom: 0;\n left: calc(1.5 * ${spacing});\n right: calc(1.5 * ${spacing});\n }\n\n ${!selected\n ? css`\n @media (hover: hover) {\n &:not(:disabled):hover {\n text-decoration: none;\n ${getHorizontalUnselectedHoverStyle({\n level,\n opacity: 0.1,\n color: hoverBackgroundColor\n })}\n }\n\n &:not(:disabled):active {\n text-decoration: none;\n ${getHorizontalUnselectedHoverStyle({\n level,\n opacity: 0.2,\n color: activeBackgroundColor\n })}\n }\n }\n `\n : css`\n ${level &&\n level > 1 &&\n css`\n background-color: ${theme.base.palette['primary-background']};\n `}\n `}\n\n &:focus,\n &:not([disabled]):focus {\n border-radius: calc(0.5rem * 0.5);\n box-shadow: ${theme.base.shadow['focus-inset']};\n text-decoration: none;\n ::after {\n display: none;\n }\n }\n\n @media (pointer: coarse) {\n min-block-size: ${theme.base['hit-area'].finger};\n }\n\n ${StyledCount} {\n margin-inline-start: calc(0.5 * ${spacing});\n }\n `;\n};\n\nconst getVerticalStyles = ({\n selected,\n theme\n}: Pick<StyledProps<StyledTabProps>, 'theme' | 'selected'>) => {\n const borderColor = theme.base.palette['border-line'];\n const primaryColor = theme.base.palette.interactive;\n const lightenedColor = tryCatch(() => transparentize(0.5, primaryColor)) ?? '';\n const { spacing } = theme.base;\n\n return css`\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-style: solid;\n color: ${theme.base.palette['foreground-color']};\n border-width: 0.0625rem 0;\n border-color: ${borderColor};\n height: calc(5.5 * ${spacing});\n margin-top: -0.0625rem;\n padding: 0 calc(2 * ${spacing});\n text-decoration: none;\n\n &:first-child {\n border-top: 0.0625rem solid ${borderColor};\n }\n\n ::after {\n content: '';\n position: absolute;\n display: ${selected ? 'block' : 'none'};\n top: 0;\n bottom: 0;\n right: 0;\n width: 0.25rem;\n background: ${primaryColor};\n }\n\n &:hover&:not(:disabled) {\n ${activeStyle(lightenedColor)}\n text-decoration: none;\n }\n\n &:focus,\n &:not([disabled]):focus {\n ${activeStyle(primaryColor)}\n box-shadow: inset 0 0 0 0.0625rem ${primaryColor};\n text-decoration: none;\n }\n `;\n};\n\nexport const StyledTab = styled(BareButton)<\n StyledTabProps & {\n level?: TabsContextValue['level'];\n }\n>(\n ({ theme, tabType, selected, level }) => css`\n position: relative;\n background: none;\n cursor: pointer;\n white-space: nowrap;\n\n ${selected &&\n css`\n font-weight: bold;\n `}\n\n & + & {\n margin-inline-start: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: ${theme.base['disabled-opacity']};\n }\n\n ${tabType === 'horizontal'\n ? getHorizontalStyles({ theme, selected, level })\n : getVerticalStyles({ theme, selected })}\n\n ${StyledErrorIcon} {\n margin-inline-end: calc(0.5 * ${theme.base.spacing});\n }\n `\n);\n\nStyledTab.defaultProps = defaultThemeProp;\n\nconst Tab: FC<TabProps & ForwardProps> = forwardRef(function Tab(\n { selected, content, count, type, disabled, errors, ...restProps }: PropsWithoutRef<TabProps>,\n ref: TabProps['ref']\n) {\n const t = useI18n();\n const [tabEl, setTabEl] = useElement();\n const tabRef = useConsolidatedRef(ref, setTabEl);\n const { level } = useContext(TabsContext);\n\n return (\n <StyledTab\n ref={tabRef}\n selected={selected}\n tabType={type}\n disabled={disabled}\n level={level}\n {...restProps}\n >\n <span>\n {!!errors && (\n <>\n <StyledErrorIcon name='warn-solid' />\n <Tooltip target={tabEl} hideDelay='none' showDelay='none'>\n {t('tab_error_tooltip', [content])}\n </Tooltip>\n </>\n )}\n <span data-content={content}>{content}</span>\n </span>\n {count}\n </StyledTab>\n );\n});\n\nexport default Tab;\n"]}
@@ -1,5 +1,6 @@
1
- import type { FunctionComponent, ReactNode, Ref } from 'react';
1
+ import type { FunctionComponent, ReactNode, Ref, RefObject } from 'react';
2
2
  import type { ForwardProps } from '../../types';
3
+ import type { TabsProps } from './Tabs.types';
3
4
  interface TabPanelProps {
4
5
  /** The id of the Tab that the tab panel is related to. */
5
6
  tabId: string;
@@ -8,13 +9,23 @@ interface TabPanelProps {
8
9
  * The tabsValue must match the tabId in order for the TabPanel to show itself.
9
10
  */
10
11
  currentTabId?: string;
12
+ /** The title for the tab panel */
13
+ title?: string;
11
14
  /** Content of the tab panel. */
12
15
  children: ReactNode;
16
+ /** Ref to the tablist element. */
17
+ tablistRef?: RefObject<HTMLElement>;
18
+ /**
19
+ * The tablist type indicates what direction the tabs are rendered in.
20
+ * @default 'horizontal'
21
+ */
22
+ tablistType?: TabsProps['type'];
13
23
  /** Ref for the wrapping element. */
14
24
  ref?: Ref<HTMLDivElement>;
15
25
  }
16
- export declare const StyledTabPanel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
26
+ export declare const StyledTabPanel: import("styled-components").StyledComponent<FunctionComponent<import("../Flex").FlexProps & ForwardProps>, import("styled-components").DefaultTheme, Pick<TabPanelProps, "tablistType"> & {
17
27
  current: boolean;
28
+ level: number;
18
29
  }, never>;
19
30
  declare const TabPanel: FunctionComponent<TabPanelProps & ForwardProps>;
20
31
  export default TabPanel;
@@ -1 +1 @@
1
- {"version":3,"file":"TabPanel.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/TabPanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,GAAG,EAAmB,MAAM,OAAO,CAAC;AAGhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,UAAU,aAAa;IACrB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAMD,eAAO,MAAM,cAAc;aAChB,OAAO;SAehB,CAAC;AAEH,QAAA,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,GAAG,YAAY,CAgB5D,CAAC;AAIH,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"TabPanel.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/TabPanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,GAAG,EAAmB,SAAS,EAAE,MAAM,OAAO,CAAC;AAK3F,OAAO,KAAK,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AAM5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,UAAU,aAAa;IACrB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,kCAAkC;IAClC,UAAU,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACpC;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAMD,eAAO,MAAM,cAAc;aAEd,OAAO;WACT,MAAM;SA4Bf,CAAC;AAgBH,QAAA,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,GAAG,YAAY,CAyE5D,CAAC;AAIH,eAAe,QAAQ,CAAC"}
@@ -1,26 +1,81 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useState, useCallback, useMemo, useContext } from 'react';
3
3
  import styled, { css } from 'styled-components';
4
+ import { useConsolidatedRef, useI18n, useFocusWithin, useEvent } from '../../hooks';
5
+ import { defaultThemeProp } from '../../theme';
6
+ import Button from '../Button';
7
+ import { getFocusables } from '../../utils';
8
+ import Flex from '../Flex';
9
+ import Text from '../Text';
10
+ import TabsContext from './TabsContext';
4
11
  const defaultProps = {
5
12
  tabId: ''
6
13
  };
7
- export const StyledTabPanel = styled.div(({ current }) => {
14
+ export const StyledTabPanel = styled(Flex)(({ current, tablistType, level, theme }) => {
8
15
  return css `
9
16
  min-width: 0;
10
17
  max-width: 100%;
11
18
 
12
19
  :focus {
13
20
  outline: none;
21
+ box-shadow: ${tablistType === 'horizontal' && level > 1
22
+ ? theme.base.shadow['focus-inset']
23
+ : theme.base.shadow.focus};
14
24
  }
15
25
 
16
26
  ${!current &&
17
27
  css `
18
28
  display: none;
19
29
  `}
30
+ ${tablistType === 'horizontal' &&
31
+ level > 1 &&
32
+ css `
33
+ background-color: ${theme.base.palette['primary-background']};
34
+ border: 0.0625rem solid ${theme.base.palette['border-line']};
35
+ border-block-start: none;
36
+ border-end-start-radius: calc(0.5rem * 0.5);
37
+ border-end-end-radius: calc(0.5rem * 0.5);
38
+ `}
39
+ `;
40
+ });
41
+ StyledTabPanel.defaultProps = defaultThemeProp;
42
+ const StyledButton = styled(Button)(({ theme }) => {
43
+ return css `
44
+ padding-inline: calc(${theme.base.spacing});
45
+ opacity: 0;
46
+ &:focus {
47
+ opacity: 1;
48
+ }
20
49
  `;
21
50
  });
22
- const TabPanel = forwardRef(function TabPanel({ tabId, currentTabId, children, ...restProps }, ref) {
23
- return (_jsx(StyledTabPanel, { ...restProps, current: currentTabId && tabId ? currentTabId === tabId : true, role: 'tabpanel', "aria-labelledby": `${tabId}`, id: `${tabId}-panel`, ref: ref, children: children }));
51
+ StyledButton.defaultProps = defaultThemeProp;
52
+ const TabPanel = forwardRef(function TabPanel({ tabId, currentTabId, title, tablistRef, tablistType = 'horizontal', children, ...restProps }, ref) {
53
+ const t = useI18n();
54
+ const tabPanelRef = useConsolidatedRef(ref);
55
+ const [showReturnButton, setShowReturnButton] = useState(false);
56
+ const { level } = useContext(TabsContext);
57
+ const onFocusChange = useCallback(isFocused => {
58
+ if (!isFocused) {
59
+ setShowReturnButton(false);
60
+ }
61
+ }, []);
62
+ useFocusWithin([tabPanelRef], onFocusChange);
63
+ const contextValue = useMemo(() => ({ level: tablistType === 'horizontal' ? level + 1 : 1 }), [level, tablistType]);
64
+ const onKeyUp = () => {
65
+ if (tabPanelRef.current?.contains(document.activeElement)) {
66
+ setShowReturnButton(true);
67
+ }
68
+ };
69
+ useEvent('keyup', onKeyUp);
70
+ return (_jsx(TabsContext.Provider, { value: contextValue, children: _jsxs(StyledTabPanel, { ...restProps, container: {
71
+ direction: 'column',
72
+ rowGap: 1,
73
+ ...(tablistType === 'horizontal' && {
74
+ pad: level > 1 ? [1, 1.5, undefined] : [1, undefined, undefined]
75
+ })
76
+ }, item: { grow: 1 }, current: currentTabId && tabId ? currentTabId === tabId : true, role: 'tabpanel', "aria-labelledby": `${tabId}`, id: `${tabId}-panel`, ref: tabPanelRef, tabIndex: 0, tablistType: tablistType, level: level, children: [title && _jsx(Text, { variant: `h${Math.min(2 + level, 6)}`, children: title }), children, tablistRef?.current && showReturnButton && (_jsx(StyledButton, { variant: 'link', onClick: () => {
77
+ getFocusables(tablistRef)[0]?.focus();
78
+ }, children: t('return_to_tab_list') }))] }) }));
24
79
  });
25
80
  TabPanel.defaultProps = defaultProps;
26
81
  export default TabPanel;
@@ -1 +1 @@
1
- {"version":3,"file":"TabPanel.js","sourceRoot":"","sources":["../../../src/components/Tabs/TabPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAkBhD,MAAM,YAAY,GAA2B;IAC3C,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAErC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IACjB,OAAO,GAAG,CAAA;;;;;;;;MAQN,CAAC,OAAO;QACV,GAAG,CAAA;;KAEF;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoD,UAAU,CAAC,SAAS,QAAQ,CAC5F,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAkC,EAC/E,GAAyB;IAEzB,OAAO,CACL,KAAC,cAAc,OACT,SAAS,EACb,OAAO,EAAE,YAAY,IAAI,KAAK,CAAC,CAAC,CAAC,YAAY,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,EAC9D,IAAI,EAAC,UAAU,qBACE,GAAG,KAAK,EAAE,EAC3B,EAAE,EAAE,GAAG,KAAK,QAAQ,EACpB,GAAG,EAAE,GAAG,YAEP,QAAQ,GACM,CAClB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,YAAY,GAAG,YAAY,CAAC;AAErC,eAAe,QAAQ,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, ReactNode, Ref, PropsWithoutRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { ForwardProps } from '../../types';\n\ninterface TabPanelProps {\n /** The id of the Tab that the tab panel is related to. */\n tabId: string;\n /**\n * The current selected value of the tabs. Controls the visibility of the tab panel.\n * The tabsValue must match the tabId in order for the TabPanel to show itself.\n */\n currentTabId?: string;\n /** Content of the tab panel. */\n children: ReactNode;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nconst defaultProps: Partial<TabPanelProps> = {\n tabId: ''\n};\n\nexport const StyledTabPanel = styled.div<{\n current: boolean;\n}>(({ current }) => {\n return css`\n min-width: 0;\n max-width: 100%;\n\n :focus {\n outline: none;\n }\n\n ${!current &&\n css`\n display: none;\n `}\n `;\n});\n\nconst TabPanel: FunctionComponent<TabPanelProps & ForwardProps> = forwardRef(function TabPanel(\n { tabId, currentTabId, children, ...restProps }: PropsWithoutRef<TabPanelProps>,\n ref: TabPanelProps['ref']\n) {\n return (\n <StyledTabPanel\n {...restProps}\n current={currentTabId && tabId ? currentTabId === tabId : true}\n role='tabpanel'\n aria-labelledby={`${tabId}`}\n id={`${tabId}-panel`}\n ref={ref}\n >\n {children}\n </StyledTabPanel>\n );\n});\n\nTabPanel.defaultProps = defaultProps;\n\nexport default TabPanel;\n"]}
1
+ {"version":3,"file":"TabPanel.js","sourceRoot":"","sources":["../../../src/components/Tabs/TabPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE/E,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAG3B,OAAO,WAAW,MAAM,eAAe,CAAC;AAyBxC,MAAM,YAAY,GAA2B;IAC3C,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,CAKxC,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3C,OAAO,GAAG,CAAA;;;;;;oBAMQ,WAAW,KAAK,YAAY,IAAI,KAAK,GAAG,CAAC;QACrD,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;QAClC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;;MAG3B,CAAC,OAAO;QACV,GAAG,CAAA;;KAEF;MACC,WAAW,KAAK,YAAY;QAC9B,KAAK,GAAG,CAAC;Q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I,CAC1C,KAAC,YAAY,IACX,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,GAAG,EAAE;wBACZ,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;oBACxC,CAAC,YAEA,CAAC,CAAC,oBAAoB,CAAC,GACX,CAChB,IACc,GACI,CACxB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,YAAY,GAAG,YAAY,CAAC;AAErC,eAAe,QAAQ,CAAC","sourcesContent":["import { forwardRef, useState, useCallback, useMemo, useContext } from 'react';\nimport type { FunctionComponent, ReactNode, Ref, PropsWithoutRef, RefObject } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { useConsolidatedRef, useI18n, useFocusWithin, useEvent } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport type { ForwardProps, HeadingTag } from '../../types';\nimport Button from '../Button';\nimport { getFocusables } from '../../utils';\nimport Flex from '../Flex';\nimport Text from '../Text';\n\nimport type { TabsProps } from './Tabs.types';\nimport TabsContext from './TabsContext';\n\ninterface TabPanelProps {\n /** The id of the Tab that the tab panel is related to. */\n tabId: string;\n /**\n * The current selected value of the tabs. Controls the visibility of the tab panel.\n * The tabsValue must match the tabId in order for the TabPanel to show itself.\n */\n currentTabId?: string;\n /** The title for the tab panel */\n title?: string;\n /** Content of the tab panel. */\n children: ReactNode;\n /** Ref to the tablist element. */\n tablistRef?: RefObject<HTMLElement>;\n /**\n * The tablist type indicates what direction the tabs are rendered in.\n * @default 'horizontal'\n */\n tablistType?: TabsProps['type'];\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nconst defaultProps: Partial<TabPanelProps> = {\n tabId: ''\n};\n\nexport const StyledTabPanel = styled(Flex)<\n Pick<TabPanelProps, 'tablistType'> & {\n current: boolean;\n level: number;\n }\n>(({ current, tablistType, level, theme }) => {\n return css`\n min-width: 0;\n max-width: 100%;\n\n :focus {\n outline: none;\n box-shadow: ${tablistType === 'horizontal' && level > 1\n ? theme.base.shadow['focus-inset']\n : theme.base.shadow.focus};\n }\n\n ${!current &&\n css`\n display: none;\n `}\n ${tablistType === 'horizontal' &&\n level > 1 &&\n css`\n background-color: ${theme.base.palette['primary-background']};\n border: 0.0625rem solid ${theme.base.palette['border-line']};\n border-block-start: none;\n border-end-start-radius: calc(0.5rem * 0.5);\n border-end-end-radius: calc(0.5rem * 0.5);\n `}\n `;\n});\n\nStyledTabPanel.defaultProps = defaultThemeProp;\n\nconst StyledButton = styled(Button)(({ theme }) => {\n return css`\n padding-inline: calc(${theme.base.spacing});\n opacity: 0;\n &:focus {\n opacity: 1;\n }\n `;\n});\n\nStyledButton.defaultProps = defaultThemeProp;\n\nconst TabPanel: FunctionComponent<TabPanelProps & ForwardProps> = forwardRef(function TabPanel(\n {\n tabId,\n currentTabId,\n title,\n tablistRef,\n tablistType = 'horizontal',\n children,\n ...restProps\n }: PropsWithoutRef<TabPanelProps>,\n ref: TabPanelProps['ref']\n) {\n const t = useI18n();\n const tabPanelRef = useConsolidatedRef(ref);\n const [showReturnButton, setShowReturnButton] = useState(false);\n const { level } = useContext(TabsContext);\n\n const onFocusChange = useCallback(isFocused => {\n if (!isFocused) {\n setShowReturnButton(false);\n }\n }, []);\n\n useFocusWithin([tabPanelRef], onFocusChange);\n\n const contextValue = useMemo(\n () => ({ level: tablistType === 'horizontal' ? level + 1 : 1 }),\n [level, tablistType]\n );\n\n const onKeyUp = () => {\n if (tabPanelRef.current?.contains(document.activeElement)) {\n setShowReturnButton(true);\n }\n };\n useEvent('keyup', onKeyUp);\n\n return (\n <TabsContext.Provider value={contextValue}>\n <StyledTabPanel\n {...restProps}\n container={{\n direction: 'column',\n rowGap: 1,\n ...(tablistType === 'horizontal' && {\n pad: level > 1 ? [1, 1.5, undefined] : [1, undefined, undefined]\n })\n }}\n item={{ grow: 1 }}\n current={currentTabId && tabId ? currentTabId === tabId : true}\n role='tabpanel'\n aria-labelledby={`${tabId}`}\n id={`${tabId}-panel`}\n ref={tabPanelRef}\n tabIndex={0}\n tablistType={tablistType}\n level={level}\n >\n {title && <Text variant={`h${Math.min(2 + level, 6)}` as HeadingTag}>{title}</Text>}\n {children}\n {tablistRef?.current && showReturnButton && (\n <StyledButton\n variant='link'\n onClick={() => {\n getFocusables(tablistRef)[0]?.focus();\n }}\n >\n {t('return_to_tab_list')}\n </StyledButton>\n )}\n </StyledTabPanel>\n </TabsContext.Provider>\n );\n});\n\nTabPanel.defaultProps = defaultProps;\n\nexport default TabPanel;\n"]}
@@ -1,7 +1,6 @@
1
1
  import type { FunctionComponent } from 'react';
2
2
  import type { ForwardProps } from '../../types';
3
3
  import type { TabsProps } from './Tabs.types';
4
- export declare const StyledTabs: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Partial<TabsProps>, never>;
5
4
  /**
6
5
  * The tabs component will take a list of tab data objects and render out a list of tabs in either vertical or horizontal direction.
7
6
  * The tabs component handles which tab is active but will give you a callback function that allows you to make changes when a new tab is activated
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAmD,MAAM,OAAO,CAAC;AAOhG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,eAAO,MAAM,UAAU,yHAgBtB,CAAC;AAIF;;;GAGG;AACH,QAAA,MAAM,IAAI,EAAE,iBAAiB,CAAC,SAAS,GAAG,YAAY,CAgGpD,CAAC;AAEH,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAMlB,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAuBhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAwF9C;;;GAGG;AACH,QAAA,MAAM,IAAI,EAAE,iBAAiB,CAAC,SAAS,GAAG,YAAY,CAyJpD,CAAC;AAEH,eAAe,IAAI,CAAC"}