@splunk/react-ui 4.42.0 → 5.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (639) hide show
  1. package/Accordion.js +87 -109
  2. package/Animation.js +48 -31
  3. package/Avatar.d.ts +2 -0
  4. package/Avatar.js +478 -0
  5. package/Box.js +8 -8
  6. package/Breadcrumbs.js +45 -49
  7. package/Button.js +144 -399
  8. package/ButtonGroup.js +22 -26
  9. package/ButtonSimple.js +239 -605
  10. package/CHANGELOG.md +29 -0
  11. package/CHANGELOG.v5.mdx +195 -0
  12. package/Calendar.js +55 -68
  13. package/Card.js +162 -200
  14. package/Chip.js +108 -96
  15. package/Clickable.js +174 -310
  16. package/Code.js +528 -372
  17. package/CollapsiblePanel.js +439 -601
  18. package/Color.js +727 -967
  19. package/ColumnLayout.js +190 -234
  20. package/ComboBox.js +166 -161
  21. package/ControlGroup.js +502 -531
  22. package/Date.js +314 -420
  23. package/DefinitionList.js +128 -140
  24. package/Dropdown.js +201 -358
  25. package/DualListbox.js +26 -26
  26. package/File.js +479 -558
  27. package/FormRows.js +339 -569
  28. package/Heading.js +53 -99
  29. package/Image.js +254 -305
  30. package/JSONTree.js +135 -131
  31. package/Layer.js +187 -269
  32. package/{CloseButton.js → Layout.js} +39 -61
  33. package/Link.js +91 -244
  34. package/List.js +68 -74
  35. package/MIGRATION.mdx +48 -53
  36. package/MIGRATION.v5.mdx +428 -0
  37. package/Markdown.js +439 -385
  38. package/Menu.js +387 -741
  39. package/Message.js +150 -322
  40. package/MessageBar.js +15 -15
  41. package/Modal.js +444 -587
  42. package/Monogram.js +1 -1
  43. package/Multiselect.js +1207 -1256
  44. package/NonInteractiveCheckbox.js +189 -0
  45. package/Number.js +538 -621
  46. package/Paginator.js +354 -448
  47. package/Paragraph.js +12 -15
  48. package/Popover.js +588 -683
  49. package/Progress.js +141 -244
  50. package/Prose.d.ts +2 -0
  51. package/Prose.js +213 -0
  52. package/RadioBar.js +328 -450
  53. package/RadioList.js +129 -212
  54. package/Resize.js +351 -402
  55. package/ResultsMenu.d.ts +2 -0
  56. package/ResultsMenu.js +255 -358
  57. package/Scroll.js +159 -238
  58. package/Search.js +365 -453
  59. package/Select.js +1097 -1380
  60. package/SidePanel.js +179 -223
  61. package/Slider.js +440 -542
  62. package/SlidingPanels.js +377 -504
  63. package/SplitButton.js +114 -102
  64. package/StaticContent.js +58 -74
  65. package/StepBar.js +193 -258
  66. package/Switch.js +246 -552
  67. package/TabBar.js +442 -622
  68. package/TabLayout.js +197 -251
  69. package/Table.js +2373 -3691
  70. package/Text.js +422 -909
  71. package/TextArea.js +537 -959
  72. package/Tooltip.js +35 -41
  73. package/TransitionOpen.js +296 -334
  74. package/Tree.js +20 -14
  75. package/Typography.js +35 -50
  76. package/WaitSpinner.js +93 -124
  77. package/package.json +16 -17
  78. package/stubs-dependencies.d.ts +0 -7
  79. package/stubs-splunkui.d.ts +6 -1
  80. package/types/src/Accordion/Accordion.d.ts +5 -1
  81. package/types/src/Accordion/Panel.d.ts +1 -2
  82. package/types/src/Accordion/docs/examples/Controlled.d.ts +2 -1
  83. package/types/src/Accordion/docs/examples/Inset.d.ts +2 -1
  84. package/types/src/Accordion/docs/examples/Uncontrolled.d.ts +2 -1
  85. package/types/src/Anchor/Anchor.d.ts +1 -1
  86. package/types/src/Anchor/docs/examples/Basic.d.ts +2 -1
  87. package/types/src/Animation/Animation.d.ts +12 -2
  88. package/types/src/AnimationToggle/AnimationToggleProvider.d.ts +1 -1
  89. package/types/src/AnimationToggle/docs/examples/Provider.d.ts +2 -2
  90. package/types/src/AnimationToggle/docs/examples/ReducedMotionComponent.d.ts +2 -1
  91. package/types/src/AnimationToggle/docs/examples/ReducedMotionHook.d.ts +2 -1
  92. package/types/src/AnimationToggle/docs/examples/ToggleComponent.d.ts +2 -2
  93. package/types/src/AnimationToggle/docs/examples/ToggleHook.d.ts +2 -1
  94. package/types/src/Avatar/Avatar.d.ts +65 -0
  95. package/types/src/Avatar/docs/examples/BackgroundColor.d.ts +2 -0
  96. package/types/src/Avatar/docs/examples/Basic.d.ts +2 -0
  97. package/types/src/Avatar/docs/examples/Image.d.ts +2 -0
  98. package/types/src/Avatar/docs/examples/Interactive.d.ts +2 -0
  99. package/types/src/Avatar/docs/examples/Size.d.ts +2 -0
  100. package/types/src/Avatar/getInitials.d.ts +9 -0
  101. package/types/src/Avatar/index.d.ts +2 -0
  102. package/types/src/Box/Box.d.ts +1 -1
  103. package/types/src/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  104. package/types/src/Breadcrumbs/Item.d.ts +1 -1
  105. package/types/src/Breadcrumbs/docs/examples/Adornments.d.ts +2 -1
  106. package/types/src/Breadcrumbs/docs/examples/Basic.d.ts +2 -1
  107. package/types/src/Breadcrumbs/docs/examples/CustomizedClick.d.ts +2 -1
  108. package/types/src/Button/Button.d.ts +20 -34
  109. package/types/src/Button/docs/examples/Basic.d.ts +2 -1
  110. package/types/src/Button/docs/examples/Block.d.ts +2 -1
  111. package/types/src/Button/docs/examples/Disabled.d.ts +2 -1
  112. package/types/src/Button/docs/examples/Icons.d.ts +2 -1
  113. package/types/src/Button/docs/examples/Menus.d.ts +2 -1
  114. package/types/src/Button/docs/examples/To.d.ts +2 -1
  115. package/types/src/Button/docs/examples/Truncated.d.ts +2 -1
  116. package/types/src/ButtonGroup/ButtonGroup.d.ts +1 -1
  117. package/types/src/ButtonGroup/docs/examples/Basic.d.ts +2 -1
  118. package/types/src/ButtonSimple/ButtonSimple.d.ts +22 -41
  119. package/types/src/ButtonSimple/mixin.d.ts +6 -2
  120. package/types/src/Calendar/Calendar.d.ts +2 -2
  121. package/types/src/Calendar/DateTable.d.ts +1 -1
  122. package/types/src/Calendar/Day.d.ts +1 -1
  123. package/types/src/Calendar/MonthHeader.d.ts +1 -1
  124. package/types/src/Card/Body.d.ts +1 -1
  125. package/types/src/Card/Card.d.ts +4 -9
  126. package/types/src/Card/Footer.d.ts +1 -8
  127. package/types/src/Card/Header.d.ts +2 -2
  128. package/types/src/Card/docs/examples/Actions.d.ts +2 -1
  129. package/types/src/Card/docs/examples/Basic.d.ts +2 -1
  130. package/types/src/Card/docs/examples/Clickable.d.ts +2 -1
  131. package/types/src/Card/docs/examples/Full.d.ts +2 -1
  132. package/types/src/Card/docs/examples/Images.d.ts +2 -1
  133. package/types/src/Card/docs/examples/Selectable.d.ts +2 -1
  134. package/types/src/CardLayout/CardLayout.d.ts +1 -1
  135. package/types/src/CardLayout/docs/examples/Basic.d.ts +2 -1
  136. package/types/src/CardLayout/docs/examples/Interactive.d.ts +2 -2
  137. package/types/src/Chip/Chip.d.ts +1 -1
  138. package/types/src/Chip/docs/examples/Appearance.d.ts +2 -1
  139. package/types/src/Chip/docs/examples/CustomColors.d.ts +2 -1
  140. package/types/src/Chip/docs/examples/Disabled.d.ts +2 -1
  141. package/types/src/Chip/docs/examples/Icon.d.ts +2 -1
  142. package/types/src/Chip/docs/examples/Removable.d.ts +2 -1
  143. package/types/src/Chip/docs/examples/RemovableWithNonStringChildren.d.ts +2 -1
  144. package/types/src/Clickable/Clickable.d.ts +13 -37
  145. package/types/src/Clickable/NavigationProvider.d.ts +2 -19
  146. package/types/src/Clickable/docs/examples/Basic.d.ts +2 -1
  147. package/types/src/Clickable/docs/examples/Disabled.d.ts +3 -0
  148. package/types/src/Clickable/docs/examples/NavigationProvider.d.ts +2 -1
  149. package/types/src/Code/Code.d.ts +3 -3
  150. package/types/src/Code/docs/examples/Default.d.ts +2 -1
  151. package/types/src/Code/docs/examples/HideIndent.d.ts +2 -1
  152. package/types/src/Code/docs/examples/Language.d.ts +2 -1
  153. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +31 -70
  154. package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +2 -2
  155. package/types/src/CollapsiblePanel/docs/examples/Actions.d.ts +3 -0
  156. package/types/src/CollapsiblePanel/docs/examples/BasicControlled.d.ts +2 -1
  157. package/types/src/CollapsiblePanel/docs/examples/BasicUncontrolled.d.ts +2 -1
  158. package/types/src/CollapsiblePanel/docs/examples/Disabled.d.ts +3 -0
  159. package/types/src/CollapsiblePanel/docs/examples/MultiControlled.d.ts +2 -1
  160. package/types/src/CollapsiblePanel/docs/examples/MultiUncontrolled.d.ts +2 -1
  161. package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupControlled.d.ts +2 -1
  162. package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupInset.d.ts +2 -1
  163. package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupUncontrolled.d.ts +2 -1
  164. package/types/src/CollapsiblePanel/docs/examples/Subtle.d.ts +3 -0
  165. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +2 -1
  166. package/types/src/Color/Color.d.ts +24 -59
  167. package/types/src/Color/Palette.d.ts +3 -18
  168. package/types/src/Color/Swatch.d.ts +1 -4
  169. package/types/src/Color/docs/examples/Controlled.d.ts +2 -1
  170. package/types/src/Color/docs/examples/CustomizedPalette.d.ts +2 -1
  171. package/types/src/Color/docs/examples/HideInput.d.ts +2 -1
  172. package/types/src/Color/docs/examples/Null.d.ts +2 -1
  173. package/types/src/Color/docs/examples/ThemeVariables.d.ts +2 -1
  174. package/types/src/Color/docs/examples/Transparent.d.ts +2 -1
  175. package/types/src/Color/docs/examples/Uncontrolled.d.ts +2 -1
  176. package/types/src/ColumnLayout/Column.d.ts +1 -11
  177. package/types/src/ColumnLayout/ColumnLayout.d.ts +1 -1
  178. package/types/src/ColumnLayout/Row.d.ts +1 -11
  179. package/types/src/ColumnLayout/docs/examples/AlignItems.d.ts +2 -1
  180. package/types/src/ColumnLayout/docs/examples/Basic.d.ts +2 -1
  181. package/types/src/ColumnLayout/docs/examples/Dividers.d.ts +2 -1
  182. package/types/src/ColumnLayout/docs/examples/Gutters.d.ts +2 -1
  183. package/types/src/ComboBox/ComboBox.d.ts +10 -14
  184. package/types/src/ComboBox/Option.d.ts +2 -2
  185. package/types/src/ComboBox/docs/examples/Controlled.d.ts +2 -1
  186. package/types/src/ComboBox/docs/examples/Fetching.d.ts +2 -1
  187. package/types/src/ComboBox/docs/examples/Headings.d.ts +2 -1
  188. package/types/src/ComboBox/docs/examples/Label.d.ts +2 -1
  189. package/types/src/ComboBox/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -1
  190. package/types/src/ComboBox/docs/examples/Uncontrolled.d.ts +2 -1
  191. package/types/src/ControlGroup/ControlGroup.d.ts +22 -38
  192. package/types/src/ControlGroup/ErrorMessageBar.d.ts +18 -0
  193. package/types/src/ControlGroup/docs/examples/Basic.d.ts +2 -1
  194. package/types/src/ControlGroup/docs/examples/CustomizedLabelTarget.d.ts +2 -2
  195. package/types/src/ControlGroup/docs/examples/Error.d.ts +2 -1
  196. package/types/src/ControlGroup/docs/examples/HelpWithErrorText.d.ts +2 -1
  197. package/types/src/ControlGroup/docs/examples/HelpWithLinks.d.ts +2 -1
  198. package/types/src/ControlGroup/docs/examples/LabelLeft.d.ts +3 -0
  199. package/types/src/ControlGroup/docs/examples/LayoutFill.d.ts +2 -1
  200. package/types/src/ControlGroup/docs/examples/LayoutFillJoin.d.ts +2 -1
  201. package/types/src/ControlGroup/docs/examples/LayoutNone.d.ts +2 -1
  202. package/types/src/ControlGroup/docs/examples/Required.d.ts +2 -1
  203. package/types/src/Date/Date.d.ts +30 -65
  204. package/types/src/Date/Icon.d.ts +2 -1
  205. package/types/src/Date/docs/examples/Basic.d.ts +2 -1
  206. package/types/src/Date/docs/examples/Controlled.d.ts +2 -2
  207. package/types/src/Date/docs/examples/CustomDate.d.ts +2 -1
  208. package/types/src/Date/docs/examples/Disabled.d.ts +2 -1
  209. package/types/src/Date/docs/examples/Error.d.ts +2 -1
  210. package/types/src/Date/docs/examples/HighlightToday.d.ts +2 -2
  211. package/types/src/Date/docs/examples/WithoutCalendar.d.ts +2 -1
  212. package/types/src/DefinitionList/DefinitionList.d.ts +8 -3
  213. package/types/src/DefinitionList/DefinitionListContext.d.ts +7 -0
  214. package/types/src/DefinitionList/Description.d.ts +3 -3
  215. package/types/src/DefinitionList/Term.d.ts +3 -3
  216. package/types/src/DefinitionList/docs/examples/Basic.d.ts +2 -1
  217. package/types/src/DefinitionList/docs/examples/Customize.d.ts +2 -1
  218. package/types/src/DefinitionList/docs/examples/EmptyDescription.d.ts +3 -0
  219. package/types/src/DefinitionList/docs/examples/WithSeparator.d.ts +3 -0
  220. package/types/src/Divider/Divider.d.ts +1 -1
  221. package/types/src/Divider/docs/examples/Basic.d.ts +2 -1
  222. package/types/src/Divider/docs/examples/CustomStyle.d.ts +2 -1
  223. package/types/src/Divider/docs/examples/Decorative.d.ts +2 -1
  224. package/types/src/Divider/docs/examples/Vertical.d.ts +2 -1
  225. package/types/src/Dropdown/Dropdown.d.ts +29 -44
  226. package/types/src/Dropdown/docs/examples/Basic.d.ts +2 -1
  227. package/types/src/Dropdown/docs/examples/BasicMenu.d.ts +2 -1
  228. package/types/src/Dropdown/docs/examples/ControlledDropdown.d.ts +2 -1
  229. package/types/src/Dropdown/docs/examples/Dialog.d.ts +2 -1
  230. package/types/src/Dropdown/docs/examples/ScrollContainer.d.ts +2 -1
  231. package/types/src/Dropdown/docs/examples/ScrollingMenu.d.ts +2 -1
  232. package/types/src/Dropdown/docs/examples/Submenu.d.ts +2 -1
  233. package/types/src/Dropdown/docs/examples/TooltipButtonToggle.d.ts +3 -0
  234. package/types/src/DualListbox/DualListbox.d.ts +1 -1
  235. package/types/src/DualListbox/Label.d.ts +1 -1
  236. package/types/src/DualListbox/Listbox.d.ts +1 -1
  237. package/types/src/DualListbox/Option.d.ts +1 -1
  238. package/types/src/DualListbox/ScreenReaderWrapper.d.ts +2 -1
  239. package/types/src/DualListbox/ToolbarButton.d.ts +1 -1
  240. package/types/src/DualListbox/docs/examples/Basic.d.ts +2 -1
  241. package/types/src/DualListbox/docs/examples/Controlled.d.ts +2 -1
  242. package/types/src/DualListbox/docs/examples/Fill.d.ts +2 -1
  243. package/types/src/EventListener/EventListener.d.ts +1 -1
  244. package/types/src/File/File.d.ts +26 -33
  245. package/types/src/File/Icon.d.ts +2 -1
  246. package/types/src/File/IconCloud.d.ts +2 -1
  247. package/types/src/File/Item.d.ts +1 -1
  248. package/types/src/File/PaperClip.d.ts +2 -1
  249. package/types/src/File/Retry.d.ts +2 -1
  250. package/types/src/File/Trash.d.ts +2 -1
  251. package/types/src/File/docs/examples/CustomizedMessages.d.ts +2 -1
  252. package/types/src/File/docs/examples/Disabled.d.ts +2 -2
  253. package/types/src/File/docs/examples/DropAnywhere.d.ts +2 -2
  254. package/types/src/File/docs/examples/Error.d.ts +2 -1
  255. package/types/src/File/docs/examples/FullScreen.d.ts +2 -1
  256. package/types/src/File/docs/examples/Multi.d.ts +2 -2
  257. package/types/src/File/docs/examples/Progress.d.ts +2 -1
  258. package/types/src/File/docs/examples/Single.d.ts +2 -2
  259. package/types/src/FormRows/FormRows.d.ts +20 -14
  260. package/types/src/FormRows/Row.d.ts +11 -7
  261. package/types/src/FormRows/SortableList.d.ts +1 -1
  262. package/types/src/FormRows/docs/examples/Basic.d.ts +1 -1
  263. package/types/src/FormRows/docs/examples/Header.d.ts +1 -1
  264. package/types/src/FormRows/docs/examples/Menu.d.ts +1 -1
  265. package/types/src/FormRows/docs/examples/ReorderOnly.d.ts +1 -1
  266. package/types/src/FormRows/icons/FormRowsPlusIcon.d.ts +2 -1
  267. package/types/src/Heading/Heading.d.ts +8 -20
  268. package/types/src/Heading/docs/examples/Basic.d.ts +2 -1
  269. package/types/src/Heading/docs/examples/Variant.d.ts +2 -1
  270. package/types/src/Heading/index.d.ts +1 -0
  271. package/types/src/Image/Image.d.ts +8 -19
  272. package/types/src/Image/docs/examples/Basic.d.ts +2 -1
  273. package/types/src/Image/icons/Cross.d.ts +2 -1
  274. package/types/src/JSONTree/JSONTree.d.ts +6 -10
  275. package/types/src/JSONTree/JSONTreeItem.d.ts +1 -1
  276. package/types/src/JSONTree/docs/examples/Basic.d.ts +2 -1
  277. package/types/src/JSONTree/docs/examples/Events.d.ts +2 -2
  278. package/types/src/JSONTree/docs/examples/ExpandChildrenOnShiftKey.d.ts +2 -1
  279. package/types/src/JSONTree/renderTreeItems.d.ts +3 -2
  280. package/types/src/Layer/Layer.d.ts +8 -25
  281. package/types/src/Layer/LayerStack.d.ts +2 -3
  282. package/types/src/Layer/docs/examples/Basic.d.ts +2 -1
  283. package/types/src/Layout/Layout.d.ts +22 -0
  284. package/types/src/Layout/docs/examples/Basic.d.ts +3 -0
  285. package/types/src/Layout/index.d.ts +2 -0
  286. package/types/src/Layout/test/Layout.unit.d.ts +1 -0
  287. package/types/src/Link/Link.d.ts +9 -22
  288. package/types/src/Link/docs/examples/Basic.d.ts +2 -1
  289. package/types/src/Link/docs/examples/Disabled.d.ts +2 -1
  290. package/types/src/Link/docs/examples/NewWindow.d.ts +2 -1
  291. package/types/src/Link/docs/examples/Standalone.d.ts +3 -0
  292. package/types/src/Link/icons/External.d.ts +2 -1
  293. package/types/src/List/Item.d.ts +1 -1
  294. package/types/src/List/List.d.ts +5 -17
  295. package/types/src/List/docs/examples/CustomizedList.d.ts +2 -1
  296. package/types/src/List/docs/examples/OrderedList.d.ts +2 -1
  297. package/types/src/List/docs/examples/UnorderedList.d.ts +2 -1
  298. package/types/src/Markdown/Markdown.d.ts +50 -59
  299. package/types/src/Markdown/docs/examples/Basic.d.ts +2 -1
  300. package/types/src/Markdown/docs/examples/I18n.d.ts +2 -1
  301. package/types/src/Markdown/docs/examples/RenderProps.d.ts +2 -1
  302. package/types/src/Markdown/renderers/MarkdownAnchorHeading.d.ts +2 -8
  303. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +3 -7
  304. package/types/src/Markdown/renderers/MarkdownCode.d.ts +3 -9
  305. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +5 -9
  306. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +3 -9
  307. package/types/src/Markdown/renderers/MarkdownImage.d.ts +4 -11
  308. package/types/src/Markdown/renderers/MarkdownItem.d.ts +4 -8
  309. package/types/src/Markdown/renderers/MarkdownLink.d.ts +3 -11
  310. package/types/src/Markdown/renderers/MarkdownList.d.ts +6 -22
  311. package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +1 -7
  312. package/types/src/Markdown/renderers/MarkdownTable.d.ts +40 -0
  313. package/types/src/Markdown/renderers/index.d.ts +5 -4
  314. package/types/src/Menu/Divider.d.ts +2 -1
  315. package/types/src/Menu/Heading.d.ts +3 -3
  316. package/types/src/Menu/Item.d.ts +14 -47
  317. package/types/src/Menu/Menu.d.ts +4 -19
  318. package/types/src/Menu/docs/examples/Adornments.d.ts +2 -1
  319. package/types/src/Menu/docs/examples/Basic.d.ts +2 -1
  320. package/types/src/Menu/docs/examples/Complex.d.ts +2 -1
  321. package/types/src/Menu/docs/examples/Descriptions.d.ts +2 -1
  322. package/types/src/Menu/docs/examples/Dimmed.d.ts +2 -1
  323. package/types/src/Menu/docs/examples/Disabled.d.ts +2 -1
  324. package/types/src/Menu/docs/examples/Dividers.d.ts +2 -1
  325. package/types/src/Menu/docs/examples/Headings.d.ts +2 -1
  326. package/types/src/Menu/docs/examples/Links.d.ts +2 -1
  327. package/types/src/Menu/docs/examples/MatchRanges.d.ts +2 -1
  328. package/types/src/Menu/docs/examples/Selectable.d.ts +2 -1
  329. package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -1
  330. package/types/src/Menu/docs/examples/Truncate.d.ts +2 -1
  331. package/types/src/Menu/icons/External.d.ts +2 -1
  332. package/types/src/Message/Message.d.ts +4 -11
  333. package/types/src/Message/Title.d.ts +1 -1
  334. package/types/src/Message/docs/examples/Basic.d.ts +2 -1
  335. package/types/src/Message/docs/examples/Content.d.ts +2 -1
  336. package/types/src/Message/docs/examples/Fill.d.ts +2 -1
  337. package/types/src/Message/docs/examples/Removable.d.ts +2 -1
  338. package/types/src/MessageBar/MessageBar.d.ts +1 -1
  339. package/types/src/MessageBar/docs/examples/Basic.d.ts +2 -1
  340. package/types/src/MessageBar/docs/examples/Types.d.ts +2 -1
  341. package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -1
  342. package/types/src/Modal/Body.d.ts +1 -1
  343. package/types/src/Modal/Footer.d.ts +9 -1
  344. package/types/src/Modal/Header.d.ts +7 -11
  345. package/types/src/Modal/Modal.d.ts +26 -32
  346. package/types/src/Modal/ModalContext.d.ts +2 -0
  347. package/types/src/Modal/docs/examples/Basic.d.ts +2 -1
  348. package/types/src/Modal/docs/examples/InitialFocus.d.ts +2 -1
  349. package/types/src/Modal/docs/examples/TypicalUsage.d.ts +2 -1
  350. package/types/src/Modal/docs/examples/Undismissable.d.ts +2 -1
  351. package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
  352. package/types/src/Monogram/Monogram.d.ts +3 -7
  353. package/types/src/Monogram/docs/examples/BackgroundAuto.d.ts +2 -1
  354. package/types/src/Monogram/docs/examples/BackgroundCustom.d.ts +2 -1
  355. package/types/src/Monogram/docs/examples/Basic.d.ts +2 -1
  356. package/types/src/Monogram/docs/examples/Interactive.d.ts +2 -1
  357. package/types/src/Monogram/docs/examples/Size.d.ts +2 -1
  358. package/types/src/Multiselect/Compact.d.ts +1 -1
  359. package/types/src/Multiselect/Multiselect.d.ts +4 -2
  360. package/types/src/Multiselect/Normal.d.ts +1 -1
  361. package/types/src/Multiselect/Option.d.ts +1 -1
  362. package/types/src/Multiselect/docs/examples/Children.d.ts +2 -2
  363. package/types/src/Multiselect/docs/examples/Compact.d.ts +2 -1
  364. package/types/src/Multiselect/docs/examples/CompactSelectAll.d.ts +2 -1
  365. package/types/src/Multiselect/docs/examples/Controlled.d.ts +2 -2
  366. package/types/src/Multiselect/docs/examples/CustomizeSelected.d.ts +2 -2
  367. package/types/src/Multiselect/docs/examples/Disabled.d.ts +2 -2
  368. package/types/src/Multiselect/docs/examples/Error.d.ts +2 -2
  369. package/types/src/Multiselect/docs/examples/Fetching.d.ts +4 -4
  370. package/types/src/Multiselect/docs/examples/Headings.d.ts +2 -1
  371. package/types/src/Multiselect/docs/examples/Icons.d.ts +2 -1
  372. package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +4 -4
  373. package/types/src/Multiselect/docs/examples/NewValues.d.ts +2 -2
  374. package/types/src/Multiselect/docs/examples/TabInput.d.ts +2 -2
  375. package/types/src/Multiselect/docs/examples/Uncontrolled.d.ts +2 -1
  376. package/types/src/NonInteractiveCheckbox/NonInteractiveCheckbox.d.ts +21 -0
  377. package/types/src/NonInteractiveCheckbox/index.d.ts +1 -0
  378. package/types/src/Number/Number.d.ts +46 -68
  379. package/types/src/Number/docs/examples/Basic.d.ts +2 -2
  380. package/types/src/Number/docs/examples/Disabled.d.ts +2 -1
  381. package/types/src/Number/docs/examples/Error.d.ts +2 -1
  382. package/types/src/Number/docs/examples/Limits.d.ts +2 -2
  383. package/types/src/Number/docs/examples/Locale.d.ts +2 -2
  384. package/types/src/Number/docs/examples/Uncontrolled.d.ts +2 -1
  385. package/types/src/Number/utils.d.ts +28 -0
  386. package/types/src/Paginator/Button.d.ts +4 -8
  387. package/types/src/Paginator/Compact.d.ts +1 -1
  388. package/types/src/Paginator/PageControl.d.ts +1 -1
  389. package/types/src/Paginator/PageSelect.d.ts +1 -1
  390. package/types/src/Paginator/PageSeparator.d.ts +2 -1
  391. package/types/src/Paginator/Paginator.d.ts +15 -2
  392. package/types/src/Paginator/docs/examples/Basic.d.ts +2 -1
  393. package/types/src/Paginator/docs/examples/Compact.d.ts +2 -1
  394. package/types/src/Paginator/docs/examples/CompactCustomLabel.d.ts +2 -1
  395. package/types/src/Paginator/docs/examples/CompactWithLabel.d.ts +2 -1
  396. package/types/src/Paginator/docs/examples/CustomPages.d.ts +3 -0
  397. package/types/src/Paginator/docs/examples/Labelled.d.ts +2 -1
  398. package/types/src/Paginator/docs/examples/PageControl.d.ts +2 -1
  399. package/types/src/Paragraph/Paragraph.d.ts +3 -1
  400. package/types/src/Paragraph/docs/examples/Basic.d.ts +2 -1
  401. package/types/src/Paragraph/index.d.ts +1 -0
  402. package/types/src/Popover/Popover.d.ts +50 -72
  403. package/types/src/Popover/PopoverMenuContext.d.ts +6 -0
  404. package/types/src/Popover/PopoverProvider.d.ts +23 -0
  405. package/types/src/Popover/docs/examples/Basic.d.ts +2 -1
  406. package/types/src/Popover/getPlacement.d.ts +1 -1
  407. package/types/src/Popover/index.d.ts +2 -1
  408. package/types/src/Progress/Progress.d.ts +3 -4
  409. package/types/src/Progress/docs/examples/Basic.d.ts +2 -1
  410. package/types/src/Progress/docs/examples/Type.d.ts +2 -1
  411. package/types/src/Prose/Prose.d.ts +29 -0
  412. package/types/src/Prose/docs/examples/Basic.d.ts +3 -0
  413. package/types/src/Prose/docs/examples/Customize.d.ts +3 -0
  414. package/types/src/Prose/index.d.ts +2 -0
  415. package/types/src/Prose/test/Prose.unit.d.ts +1 -0
  416. package/types/src/RadioBar/Option.d.ts +2 -18
  417. package/types/src/RadioBar/RadioBar.d.ts +22 -39
  418. package/types/src/RadioBar/RadioBarContext.d.ts +0 -1
  419. package/types/src/RadioBar/docs/examples/AdornmentAriaExamples.d.ts +2 -1
  420. package/types/src/RadioBar/docs/examples/Basic.d.ts +2 -1
  421. package/types/src/RadioBar/docs/examples/Disabled.d.ts +2 -1
  422. package/types/src/RadioBar/docs/examples/Error.d.ts +2 -1
  423. package/types/src/RadioBar/docs/examples/MenuBar.d.ts +2 -1
  424. package/types/src/RadioBar/docs/examples/Uncontrolled.d.ts +2 -1
  425. package/types/src/RadioList/Option.d.ts +1 -1
  426. package/types/src/RadioList/RadioList.d.ts +5 -2
  427. package/types/src/RadioList/docs/examples/Basic.d.ts +2 -1
  428. package/types/src/RadioList/docs/examples/Disabled.d.ts +2 -1
  429. package/types/src/RadioList/docs/examples/Error.d.ts +2 -1
  430. package/types/src/RadioList/docs/examples/Row.d.ts +2 -1
  431. package/types/src/RadioList/docs/examples/Uncontrolled.d.ts +2 -1
  432. package/types/src/Resize/Resize.d.ts +15 -23
  433. package/types/src/Resize/docs/examples/Appearance.d.ts +2 -1
  434. package/types/src/Resize/docs/examples/Basic.d.ts +2 -1
  435. package/types/src/Resize/docs/examples/Percentage.d.ts +2 -1
  436. package/types/src/Resize/docs/examples/SizingInner.d.ts +2 -1
  437. package/types/src/Resize/docs/examples/SizingOuter.d.ts +2 -1
  438. package/types/src/ResultsMenu/ResultsMenu.d.ts +1 -1
  439. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  440. package/types/src/ScreenReaderContent/ScreenReaderContent.d.ts +1 -1
  441. package/types/src/ScreenReaderContent/docs/examples/Basic.d.ts +2 -1
  442. package/types/src/Scroll/Inner.d.ts +1 -1
  443. package/types/src/Scroll/Scroll.d.ts +37 -27
  444. package/types/src/Scroll/docs/examples/Controlled.d.ts +2 -2
  445. package/types/src/Scroll/docs/examples/Uncontrolled.d.ts +2 -1
  446. package/types/src/ScrollContainerContext/docs/examples/Consumer.d.ts +2 -1
  447. package/types/src/ScrollContainerContext/docs/examples/Provider.d.ts +2 -1
  448. package/types/src/Search/Option.d.ts +32 -32
  449. package/types/src/Search/Search.d.ts +4 -4
  450. package/types/src/Search/docs/examples/Controlled.d.ts +2 -1
  451. package/types/src/Search/docs/examples/Loading.d.ts +2 -1
  452. package/types/src/Search/docs/examples/Options.d.ts +2 -1
  453. package/types/src/Search/docs/examples/OptionsLinks.d.ts +2 -1
  454. package/types/src/Search/docs/examples/Results.d.ts +2 -1
  455. package/types/src/Select/Option.d.ts +8 -21
  456. package/types/src/Select/OptionBase.d.ts +3 -8
  457. package/types/src/Select/Select.d.ts +62 -22
  458. package/types/src/Select/SelectAllOption.d.ts +1 -1
  459. package/types/src/Select/SelectBase.d.ts +5 -8
  460. package/types/src/Select/docs/examples/Appearance.d.ts +2 -11
  461. package/types/src/Select/docs/examples/Basic.d.ts +2 -9
  462. package/types/src/Select/docs/examples/Children.d.ts +2 -9
  463. package/types/src/Select/docs/examples/Descriptions.d.ts +2 -9
  464. package/types/src/Select/docs/examples/Error.d.ts +2 -1
  465. package/types/src/Select/docs/examples/Fetching.d.ts +2 -22
  466. package/types/src/Select/docs/examples/Filter.d.ts +2 -9
  467. package/types/src/Select/docs/examples/Headings.d.ts +2 -9
  468. package/types/src/Select/docs/examples/Icons.d.ts +2 -1
  469. package/types/src/Select/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -24
  470. package/types/src/Select/docs/examples/Prefix.d.ts +2 -9
  471. package/types/src/Select/docs/examples/Truncate.d.ts +2 -9
  472. package/types/src/Select/docs/examples/Uncontrolled.d.ts +2 -1
  473. package/types/src/SidePanel/SidePanel.d.ts +18 -16
  474. package/types/src/SidePanel/docs/examples/Basic.d.ts +2 -1
  475. package/types/src/SidePanel/docs/examples/ChangeSize.d.ts +2 -1
  476. package/types/src/SidePanel/docs/examples/Composition.d.ts +2 -1
  477. package/types/src/Slider/Slider.d.ts +32 -46
  478. package/types/src/Slider/docs/examples/Basic.d.ts +2 -1
  479. package/types/src/Slider/docs/examples/Controlled.d.ts +2 -2
  480. package/types/src/Slider/docs/examples/CustomLabels.d.ts +2 -2
  481. package/types/src/Slider/docs/examples/Disabled.d.ts +2 -1
  482. package/types/src/Slider/docs/examples/Error.d.ts +2 -1
  483. package/types/src/Slider/docs/examples/StepMarks.d.ts +2 -1
  484. package/types/src/SlidingPanels/Panel.d.ts +23 -20
  485. package/types/src/SlidingPanels/SlidingPanels.d.ts +18 -25
  486. package/types/src/SlidingPanels/docs/examples/Basic.d.ts +2 -2
  487. package/types/src/SlidingPanels/docs/examples/Dropdown.d.ts +2 -2
  488. package/types/src/SlidingPanels/docs/examples/Modal.d.ts +2 -1
  489. package/types/src/SplitButton/Item.d.ts +2 -2
  490. package/types/src/SplitButton/SplitButton.d.ts +1 -1
  491. package/types/src/SplitButton/docs/examples/Basic.d.ts +2 -1
  492. package/types/src/SplitButton/docs/examples/Block.d.ts +2 -1
  493. package/types/src/SplitButton/docs/examples/ChangeLabel.d.ts +2 -1
  494. package/types/src/SplitButton/docs/examples/Disabled.d.ts +2 -1
  495. package/types/src/StaticContent/StaticContent.d.ts +1 -8
  496. package/types/src/StaticContent/docs/examples/Basic.d.ts +2 -1
  497. package/types/src/StaticContent/docs/examples/FieldValue.d.ts +2 -1
  498. package/types/src/StepBar/Step.d.ts +1 -1
  499. package/types/src/StepBar/StepBar.d.ts +2 -3
  500. package/types/src/StepBar/docs/examples/Basic.d.ts +2 -1
  501. package/types/src/StepBar/docs/examples/Error.d.ts +2 -1
  502. package/types/src/StepBar/types.d.ts +2 -0
  503. package/types/src/Switch/Switch.d.ts +37 -23
  504. package/types/src/Switch/docs/examples/Basic.d.ts +2 -2
  505. package/types/src/Switch/docs/examples/Disabled.d.ts +2 -2
  506. package/types/src/Switch/docs/examples/Error.d.ts +2 -1
  507. package/types/src/TabBar/Tab.d.ts +37 -44
  508. package/types/src/TabBar/TabBar.d.ts +21 -22
  509. package/types/src/TabBar/TabBarContext.d.ts +3 -5
  510. package/types/src/TabBar/docs/examples/Basic.d.ts +2 -1
  511. package/types/src/TabBar/docs/examples/Disabled.d.ts +2 -1
  512. package/types/src/TabBar/docs/examples/IconsAbove.d.ts +2 -1
  513. package/types/src/TabBar/docs/examples/IconsLeft.d.ts +2 -1
  514. package/types/src/TabBar/docs/examples/Tooltips.d.ts +2 -1
  515. package/types/src/TabBar/docs/examples/Vertical.d.ts +2 -1
  516. package/types/src/TabBar/docs/examples/VerticalIconsAbove.d.ts +2 -1
  517. package/types/src/TabBar/docs/examples/VerticalIconsLeft.d.ts +2 -1
  518. package/types/src/TabBar/docs/examples/WithCount.d.ts +2 -1
  519. package/types/src/TabLayout/Panel.d.ts +6 -1
  520. package/types/src/TabLayout/TabLayout.d.ts +18 -31
  521. package/types/src/TabLayout/docs/examples/AutoActivate.d.ts +2 -1
  522. package/types/src/TabLayout/docs/examples/Controlled.d.ts +2 -1
  523. package/types/src/TabLayout/docs/examples/Icons.d.ts +2 -1
  524. package/types/src/TabLayout/docs/examples/Uncontrolled.d.ts +2 -1
  525. package/types/src/TabLayout/docs/examples/Vertical.d.ts +2 -1
  526. package/types/src/TabLayout/docs/examples/VerticalIcons.d.ts +2 -1
  527. package/types/src/Table/Body.d.ts +6 -13
  528. package/types/src/Table/Caption.d.ts +1 -1
  529. package/types/src/Table/Cell.d.ts +40 -18
  530. package/types/src/Table/ExpandButton.d.ts +9 -3
  531. package/types/src/Table/Head.d.ts +40 -40
  532. package/types/src/Table/HeadCell.d.ts +49 -23
  533. package/types/src/Table/HeadDropdownCell.d.ts +58 -51
  534. package/types/src/Table/HeadInner.d.ts +1 -3
  535. package/types/src/Table/HeadTable.d.ts +23 -12
  536. package/types/src/Table/Row.d.ts +7 -14
  537. package/types/src/Table/RowDragCell.d.ts +2 -1
  538. package/types/src/Table/Table.d.ts +13 -19
  539. package/types/src/Table/Toggle.d.ts +1 -3
  540. package/types/src/Table/docs/examples/Basic.d.ts +2 -1
  541. package/types/src/Table/docs/examples/Click.d.ts +3 -16
  542. package/types/src/Table/docs/examples/ClickRows.d.ts +3 -16
  543. package/types/src/Table/docs/examples/Complex.d.ts +3 -50
  544. package/types/src/Table/docs/examples/DockedHeaderScrollbar.d.ts +2 -1
  545. package/types/src/Table/docs/examples/ExpandableRows.d.ts +2 -1
  546. package/types/src/Table/docs/examples/ExpandableRowsControlled.d.ts +2 -1
  547. package/types/src/Table/docs/examples/FilterColumnValues.d.ts +2 -13
  548. package/types/src/Table/docs/examples/FixedHeader.d.ts +2 -1
  549. package/types/src/Table/docs/examples/HeadDropdownCell.d.ts +2 -17
  550. package/types/src/Table/docs/examples/ReorderColumns.d.ts +3 -21
  551. package/types/src/Table/docs/examples/ReorderRows.d.ts +3 -21
  552. package/types/src/Table/docs/examples/Resizable.d.ts +3 -23
  553. package/types/src/Table/docs/examples/ResizableFill.d.ts +3 -23
  554. package/types/src/Table/docs/examples/RowActions.d.ts +3 -39
  555. package/types/src/Table/docs/examples/Selectable.d.ts +3 -18
  556. package/types/src/Table/docs/examples/SortableColumns.d.ts +2 -11
  557. package/types/src/Table/docs/examples/StripeRows.d.ts +2 -1
  558. package/types/src/Table/docs/examples/prisma/DockedHeaderScrollbar.d.ts +2 -1
  559. package/types/src/Text/IconOutlinedHide.d.ts +2 -1
  560. package/types/src/Text/IconOutlinedView.d.ts +2 -1
  561. package/types/src/Text/Text.d.ts +62 -112
  562. package/types/src/Text/docs/examples/Basic.d.ts +2 -1
  563. package/types/src/Text/docs/examples/CustomizedIcon.d.ts +2 -1
  564. package/types/src/Text/docs/examples/Dimmed.d.ts +2 -1
  565. package/types/src/Text/docs/examples/Disabled.d.ts +2 -1
  566. package/types/src/Text/docs/examples/Error.d.ts +2 -1
  567. package/types/src/Text/docs/examples/Inline.d.ts +2 -1
  568. package/types/src/Text/docs/examples/Password.d.ts +2 -1
  569. package/types/src/Text/docs/examples/Uncontrolled.d.ts +2 -1
  570. package/types/src/TextArea/TextArea.d.ts +49 -87
  571. package/types/src/TextArea/docs/examples/Basic.d.ts +2 -1
  572. package/types/src/TextArea/docs/examples/Disabled.d.ts +2 -1
  573. package/types/src/TextArea/docs/examples/Error.d.ts +2 -1
  574. package/types/src/TextArea/docs/examples/Inline.d.ts +2 -1
  575. package/types/src/TextArea/docs/examples/Uncontrolled.d.ts +2 -1
  576. package/types/src/TextArea/syncHeightWithShadow.d.ts +1 -1
  577. package/types/src/Tooltip/InfoIcon.d.ts +2 -1
  578. package/types/src/Tooltip/Tooltip.d.ts +9 -3
  579. package/types/src/Tooltip/docs/examples/Basic.d.ts +2 -1
  580. package/types/src/Tooltip/docs/examples/ContentRelationship.d.ts +2 -1
  581. package/types/src/Tooltip/docs/examples/Controlled.d.ts +2 -2
  582. package/types/src/Tooltip/docs/examples/CustomDelay.d.ts +2 -1
  583. package/types/src/Tooltip/docs/examples/CustomProps.d.ts +2 -1
  584. package/types/src/Tooltip/docs/examples/Toggletip.d.ts +2 -1
  585. package/types/src/TransitionOpen/TransitionOpen.d.ts +23 -25
  586. package/types/src/TransitionOpen/docs/examples/ExpandHeight.d.ts +2 -1
  587. package/types/src/TransitionOpen/docs/examples/ExpandWidth.d.ts +2 -1
  588. package/types/src/TransitionOpen/docs/examples/None.d.ts +2 -1
  589. package/types/src/TransitionOpen/docs/examples/SlideFromBottom.d.ts +2 -1
  590. package/types/src/TransitionOpen/docs/examples/SlideFromLeft.d.ts +2 -1
  591. package/types/src/TransitionOpen/docs/examples/SlideFromRight.d.ts +2 -1
  592. package/types/src/TransitionOpen/docs/examples/SlideFromTop.d.ts +2 -1
  593. package/types/src/Tree/Tree.d.ts +1 -1
  594. package/types/src/Tree/TreeItem.d.ts +1 -1
  595. package/types/src/Typography/Typography.d.ts +10 -19
  596. package/types/src/Typography/docs/examples/Basic.d.ts +2 -1
  597. package/types/src/WaitSpinner/WaitSpinner.d.ts +2 -3
  598. package/types/src/WaitSpinner/docs/examples/Basic.d.ts +2 -1
  599. package/types/src/utils/types.d.ts +1 -0
  600. package/useResizeObserver.js +122 -90
  601. package/Concertina.d.ts +0 -2
  602. package/Concertina.js +0 -963
  603. package/types/src/Accordion/docs/examples/FixedHeight.d.ts +0 -2
  604. package/types/src/Accordion/docs/examples/InDropdown.d.ts +0 -2
  605. package/types/src/Button/docs/examples/Dimmed.d.ts +0 -2
  606. package/types/src/Button/icons/CaretSmallDown.d.ts +0 -2
  607. package/types/src/Button/icons/External.d.ts +0 -2
  608. package/types/src/Clickable/docs/examples/Dimmed.d.ts +0 -2
  609. package/types/src/CloseButton/CloseButton.d.ts +0 -21
  610. package/types/src/CloseButton/index.d.ts +0 -1
  611. package/types/src/CollapsiblePanel/docs/examples/TitleWithActions.d.ts +0 -2
  612. package/types/src/Concertina/Concertina.d.ts +0 -46
  613. package/types/src/Concertina/ConcertinaContext.d.ts +0 -8
  614. package/types/src/Concertina/Heading.d.ts +0 -35
  615. package/types/src/Concertina/Panel.d.ts +0 -59
  616. package/types/src/Concertina/docs/examples/Basic.d.ts +0 -2
  617. package/types/src/Concertina/docs/examples/Disabled.d.ts +0 -9
  618. package/types/src/Concertina/docs/examples/Status.d.ts +0 -2
  619. package/types/src/Concertina/index.d.ts +0 -2
  620. package/types/src/Concertina/types.d.ts +0 -1
  621. package/types/src/ControlGroup/docs/examples/LabelTop.d.ts +0 -2
  622. package/types/src/Dropdown/docs/examples/OtherToggles.d.ts +0 -2
  623. package/types/src/Link/docs/examples/Inline.d.ts +0 -2
  624. package/types/src/Message/Link.d.ts +0 -37
  625. package/types/src/Number/IncrementIcon.d.ts +0 -2
  626. package/types/src/Paginator/icons/ChevronLeft.d.ts +0 -5
  627. package/types/src/Paginator/icons/ChevronRight.d.ts +0 -5
  628. package/types/src/Popover/PopoverContext.d.ts +0 -6
  629. package/types/src/RadioList/docs/examples/Composing.d.ts +0 -2
  630. package/types/src/Select/icons/CaretSmallDown.d.ts +0 -2
  631. package/types/src/Select/icons/Search.d.ts +0 -2
  632. package/types/src/Switch/CheckIcon.d.ts +0 -1
  633. package/types/src/Table/DragHandle.d.ts +0 -12
  634. package/types/src/Table/icons/HeadExpandRows.d.ts +0 -1
  635. package/types/src/Text/docs/examples/Multiline.d.ts +0 -2
  636. package/types/src/Text/docs/examples/Search.d.ts +0 -2
  637. package/types/src/TextArea/docs/examples/ClearContent.d.ts +0 -2
  638. package/types/src/TextArea/icons/ClearButton.d.ts +0 -3
  639. package/types/src/TextArea/icons/SearchIcon.d.ts +0 -1
package/SlidingPanels.js CHANGED
@@ -8,27 +8,27 @@
8
8
  /******/ /* webpack/runtime/compat get default export */
9
9
  /******/ (() => {
10
10
  /******/ // getDefaultExport function for compatibility with non-harmony modules
11
- /******/ e.n = t => {
12
- /******/ var n = t && t.__esModule ?
13
- /******/ () => t["default"]
14
- /******/ : () => t
11
+ /******/ e.n = n => {
12
+ /******/ var r = n && n.__esModule ?
13
+ /******/ () => n["default"]
14
+ /******/ : () => n
15
15
  /******/;
16
- e.d(n, {
17
- a: n
16
+ e.d(r, {
17
+ a: r
18
18
  });
19
- /******/ return n;
19
+ /******/ return r;
20
20
  /******/ };
21
21
  /******/ })();
22
22
  /******/
23
23
  /******/ /* webpack/runtime/define property getters */
24
24
  /******/ (() => {
25
25
  /******/ // define getter functions for harmony exports
26
- /******/ e.d = (t, n) => {
27
- /******/ for (var r in n) {
28
- /******/ if (e.o(n, r) && !e.o(t, r)) {
29
- /******/ Object.defineProperty(t, r, {
26
+ /******/ e.d = (n, r) => {
27
+ /******/ for (var t in r) {
28
+ /******/ if (e.o(r, t) && !e.o(n, t)) {
29
+ /******/ Object.defineProperty(n, t, {
30
30
  enumerable: true,
31
- get: n[r]
31
+ get: r[t]
32
32
  });
33
33
  /******/ }
34
34
  /******/ }
@@ -37,7 +37,7 @@
37
37
  /******/
38
38
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
39
  /******/ (() => {
40
- /******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
40
+ /******/ e.o = (e, n) => Object.prototype.hasOwnProperty.call(e, n)
41
41
  /******/;
42
42
  })();
43
43
  /******/
@@ -56,53 +56,43 @@
56
56
  /******/ };
57
57
  /******/ })();
58
58
  /******/
59
- /************************************************************************/ var t = {};
59
+ /************************************************************************/ var n = {};
60
60
  // ESM COMPAT FLAG
61
- e.r(t);
61
+ e.r(n);
62
62
  // EXPORTS
63
- e.d(t, {
64
- Panel: () => /* reexport */ L,
65
- default: () => /* reexport */ be
63
+ e.d(n, {
64
+ Panel: () => /* reexport */ x,
65
+ default: () => /* reexport */ Q
66
66
  });
67
67
  // CONCATENATED MODULE: external "react"
68
- const n = require("react");
69
- var r = e.n(n);
68
+ const r = require("react");
69
+ var t = e.n(r);
70
70
  // CONCATENATED MODULE: external "prop-types"
71
71
  const o = require("prop-types");
72
72
  var i = e.n(o);
73
- // CONCATENATED MODULE: external "lodash/filter"
74
- const a = require("lodash/filter");
75
- var l = e.n(a);
76
- // CONCATENATED MODULE: external "lodash/keys"
77
- const u = require("lodash/keys");
78
- var c = e.n(u);
79
- // CONCATENATED MODULE: external "lodash/omit"
80
- const s = require("lodash/omit");
81
- var f = e.n(s);
82
- // CONCATENATED MODULE: external "lodash/values"
83
- const p = require("lodash/values");
84
- var d = e.n(p);
85
- // CONCATENATED MODULE: external "react-spring"
86
- const v = require("react-spring");
73
+ // CONCATENATED MODULE: external "@react-spring/web"
74
+ const a = require("@react-spring/web");
87
75
  // CONCATENATED MODULE: external "@splunk/react-ui/Animation"
88
- const y = require("@splunk/react-ui/Animation");
76
+ const u = require("@splunk/react-ui/Animation");
89
77
  // CONCATENATED MODULE: external "styled-components"
90
- const b = require("styled-components");
91
- var m = e.n(b);
78
+ const l = require("styled-components");
79
+ var c = e.n(l);
92
80
  // CONCATENATED MODULE: external "@splunk/react-ui/Box"
93
- const h = require("@splunk/react-ui/Box");
94
- var g = e.n(h);
81
+ const f = require("@splunk/react-ui/Box");
82
+ var s = e.n(f);
83
+ // CONCATENATED MODULE: external "react-spring"
84
+ const y = require("react-spring");
95
85
  // CONCATENATED MODULE: external "@splunk/themes"
96
- const O = require("@splunk/themes");
86
+ const d = require("@splunk/themes");
97
87
  // CONCATENATED MODULE: ./src/SlidingPanels/SlidingPanelsStyles.ts
98
- var P = m()((0, v.animated)(g())).withConfig({
88
+ var v = c()(s()).withConfig({
99
89
  displayName: "SlidingPanelsStyles__StyledBox",
100
90
  componentId: "su6isq-0"
101
91
  })([ "overflow:hidden;position:relative;" ]);
102
- var j = m()(v.animated.div).withConfig({
103
- displayName: "SlidingPanelsStyles__Styled",
92
+ var p = c()(y.animated.div).withConfig({
93
+ displayName: "SlidingPanelsStyles__StyledAnimatedDiv",
104
94
  componentId: "su6isq-1"
105
- })([ "", ";", ";" ], O.mixins.reset("block"), O.mixins.clearfix());
95
+ })([ "", ";", ";" ], d.mixins.reset("block"), d.mixins.clearfix());
106
96
  // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
107
97
  /**
108
98
  * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
@@ -110,335 +100,264 @@
110
100
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
111
101
  * @param current - The new value of the ref.
112
102
  */
113
- function w(e, t) {
103
+ function m(e, n) {
114
104
  if (e) {
115
105
  if (typeof e === "function") {
116
- e(t);
106
+ e(n);
117
107
  } else {
118
108
  // the public signature of this util uses React.Ref<T> to mirror the way React types refs.
119
109
  // the intention here is to signal "we will take care of setting 'current', not you".
120
- e.current = t;
110
+ e.current = n;
121
111
  // eslint-disable-line no-param-reassign
122
112
  }
123
113
  }
124
114
  }
125
115
  // CONCATENATED MODULE: ./src/SlidingPanels/Panel.tsx
126
- function S(e) {
127
- "@babel/helpers - typeof";
128
- return S = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
129
- return typeof e;
130
- } : function(e) {
131
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
132
- }, S(e);
133
- }
134
- function I() {
135
- return I = Object.assign ? Object.assign.bind() : function(e) {
136
- for (var t = 1; t < arguments.length; t++) {
137
- var n = arguments[t];
138
- for (var r in n) {
139
- ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
116
+ function b() {
117
+ return b = Object.assign ? Object.assign.bind() : function(e) {
118
+ for (var n = 1; n < arguments.length; n++) {
119
+ var r = arguments[n];
120
+ for (var t in r) {
121
+ ({}).hasOwnProperty.call(r, t) && (e[t] = r[t]);
140
122
  }
141
123
  }
142
124
  return e;
143
- }, I.apply(null, arguments);
125
+ }, b.apply(null, arguments);
144
126
  }
145
- function E(e, t) {
146
- if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
127
+ function g(e, n) {
128
+ return w(e) || j(e, n) || h(e, n) || O();
147
129
  }
148
- function _(e, t) {
149
- for (var n = 0; n < t.length; n++) {
150
- var r = t[n];
151
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
152
- Object.defineProperty(e, N(r.key), r);
153
- }
130
+ function O() {
131
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
154
132
  }
155
- function k(e, t, n) {
156
- return t && _(e.prototype, t), n && _(e, n), Object.defineProperty(e, "prototype", {
157
- writable: !1
158
- }), e;
133
+ function h(e, n) {
134
+ if (e) {
135
+ if ("string" == typeof e) return S(e, n);
136
+ var r = {}.toString.call(e).slice(8, -1);
137
+ return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? S(e, n) : void 0;
138
+ }
159
139
  }
160
- function T(e, t) {
161
- if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
162
- e.prototype = Object.create(t && t.prototype, {
163
- constructor: {
164
- value: e,
165
- writable: !0,
166
- configurable: !0
140
+ function S(e, n) {
141
+ (null == n || n > e.length) && (n = e.length);
142
+ for (var r = 0, t = Array(n); r < n; r++) {
143
+ t[r] = e[r];
144
+ }
145
+ return t;
146
+ }
147
+ function j(e, n) {
148
+ var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
149
+ if (null != r) {
150
+ var t, o, i, a, u = [], l = !0, c = !1;
151
+ try {
152
+ if (i = (r = r.call(e)).next, 0 === n) {
153
+ if (Object(r) !== r) return;
154
+ l = !1;
155
+ } else for (;!(l = (t = i.call(r)).done) && (u.push(t.value), u.length !== n); l = !0) {
156
+ }
157
+ } catch (e) {
158
+ c = !0, o = e;
159
+ } finally {
160
+ try {
161
+ if (!l && null != r["return"] && (a = r["return"](), Object(a) !== a)) return;
162
+ } finally {
163
+ if (c) throw o;
164
+ }
167
165
  }
168
- }), Object.defineProperty(e, "prototype", {
169
- writable: !1
170
- }), t && q(e, t);
171
- }
172
- function q(e, t) {
173
- return q = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
174
- return e.__proto__ = t, e;
175
- }, q(e, t);
176
- }
177
- function A(e) {
178
- var t = R();
179
- return function() {
180
- var n, r = x(e);
181
- if (t) {
182
- var o = x(this).constructor;
183
- n = Reflect.construct(r, arguments, o);
184
- } else n = r.apply(this, arguments);
185
- return C(this, n);
186
- };
187
- }
188
- function C(e, t) {
189
- if (t && ("object" == S(t) || "function" == typeof t)) return t;
190
- if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
191
- return M(e);
192
- }
193
- function M(e) {
194
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
195
- return e;
196
- }
197
- function R() {
198
- try {
199
- var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
200
- } catch (e) {}
201
- return (R = function t() {
202
- return !!e;
203
- })();
204
- }
205
- function x(e) {
206
- return x = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
207
- return e.__proto__ || Object.getPrototypeOf(e);
208
- }, x(e);
166
+ return u;
167
+ }
209
168
  }
210
- function U(e, t, n) {
211
- return (t = N(t)) in e ? Object.defineProperty(e, t, {
212
- value: n,
213
- enumerable: !0,
214
- configurable: !0,
215
- writable: !0
216
- }) : e[t] = n, e;
169
+ function w(e) {
170
+ if (Array.isArray(e)) return e;
217
171
  }
218
- function N(e) {
219
- var t = D(e, "string");
220
- return "symbol" == S(t) ? t : t + "";
172
+ function P(e, n) {
173
+ if (null == e) return {};
174
+ var r, t, o = E(e, n);
175
+ if (Object.getOwnPropertySymbols) {
176
+ var i = Object.getOwnPropertySymbols(e);
177
+ for (t = 0; t < i.length; t++) {
178
+ r = i[t], n.includes(r) || {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
179
+ }
180
+ }
181
+ return o;
221
182
  }
222
- function D(e, t) {
223
- if ("object" != S(e) || !e) return e;
224
- var n = e[Symbol.toPrimitive];
225
- if (void 0 !== n) {
226
- var r = n.call(e, t || "default");
227
- if ("object" != S(r)) return r;
228
- throw new TypeError("@@toPrimitive must return a primitive value.");
183
+ function E(e, n) {
184
+ if (null == e) return {};
185
+ var r = {};
186
+ for (var t in e) {
187
+ if ({}.hasOwnProperty.call(e, t)) {
188
+ if (n.includes(t)) continue;
189
+ r[t] = e[t];
190
+ }
229
191
  }
230
- return ("string" === t ? String : Number)(e);
192
+ return r;
231
193
  }
232
- var W = {
194
+ var A = {
195
+ children: i().node,
233
196
  elementRef: i().oneOfType([ i().func, i().object ]),
234
- panelId: i().any.isRequired,
235
- /**
236
- * @private.
237
- * Used internally, func passed in from outer place is overwritten
238
- * by SlidingPanels during rendering
239
- */
197
+ /** @private */
240
198
  onMount: i().func,
241
- /**
242
- * @private.
243
- * Used internally, func passed in from outer place is overwritten
244
- * by SlidingPanels during rendering
245
- */
246
- onUnmount: i().func
199
+ /** @private */
200
+ onUnmount: i().func,
201
+ panelId: i().any.isRequired
247
202
  };
248
- var B = {};
249
203
  /**
250
204
  * Container for arbitrary content.
251
- */ var X = function(e) {
252
- T(n, e);
253
- var t = A(n);
254
- function n() {
255
- var e;
256
- E(this, n);
257
- for (var r = arguments.length, o = new Array(r), i = 0; i < r; i++) {
258
- o[i] = arguments[i];
259
- }
260
- e = t.call.apply(t, [ this ].concat(o));
261
- U(M(e), "el", null);
262
- U(M(e), "handleMount", (function(t) {
263
- e.el = t;
264
- w(e.props.elementRef, t);
265
- }));
266
- return e;
267
- }
268
- // @docs-props-type PanelPropsBase
269
- k(n, [ {
270
- key: "componentDidMount",
271
- value: function e() {
272
- var t, n;
273
- (t = (n = this.props).onMount) === null || t === void 0 ? void 0 : t.call(n, this);
274
- }
275
- }, {
276
- key: "componentWillUnmount",
277
- value: function e() {
278
- var t, n;
279
- (t = (n = this.props).onUnmount) === null || t === void 0 ? void 0 : t.call(n, this);
280
- }
281
- // eslint-disable-next-line react/no-unused-class-component-methods
282
- }, {
283
- key: "getHeight",
284
- value: function e() {
285
- var t;
286
- return (t = this.el) === null || t === void 0 ? void 0 : t.clientHeight;
287
- }
288
- // eslint-disable-next-line react/no-unused-class-component-methods
289
- }, {
290
- key: "getWidth",
291
- value: function e() {
292
- var t;
293
- return (t = this.el) === null || t === void 0 ? void 0 : t.clientWidth;
294
- }
295
- }, {
296
- key: "render",
297
- value: function e() {
298
- var t = this.props.panelId;
299
-
300
- return r().createElement(j, I({
301
- "data-test": "panel",
302
- "data-test-panel-id": t
303
- }, f()(this.props, c()(n.propTypes)), {
304
- ref: this.handleMount
305
- }));
306
- }
307
- } ]);
308
- return n;
309
- }(n.Component);
310
- U(X, "propTypes", W);
311
- U(X, "defaultProps", B);
312
- /* harmony default export */ const L = X;
205
+ */ function I(e) {
206
+ var n = e.children, o = e.elementRef, i = e.onMount, a = e.onUnmount, u = e.panelId, l = P(e, [ "children", "elementRef", "onMount", "onUnmount", "panelId" ]);
207
+ // @docs-props-type PanelPropsBase
208
+ var c = (0, r.useState)(null), f = g(c, 2), s = f[0], y = f[1];
209
+ var d = (0, r.useCallback)((function(e) {
210
+ y(e);
211
+ m(o, e);
212
+ }), [ o ]);
213
+ (0, r.useEffect)((function() {
214
+ i === null || i === void 0 ? void 0 : i(s, u);
215
+ return function() {
216
+ a === null || a === void 0 ? void 0 : a(u);
217
+ };
218
+ }), [ i, a, s, u ]);
219
+
220
+ return t().createElement(p, b({
221
+ "data-test": "panel",
222
+ "data-test-panel-id": u
223
+ }, l, {
224
+ ref: d
225
+ }), n);
226
+ }
227
+ I.propTypes = A;
228
+ /* harmony default export */ const x = I;
313
229
  // CONCATENATED MODULE: ./src/SlidingPanels/SlidingPanels.tsx
314
- function H(e) {
230
+ function C(e) {
315
231
  "@babel/helpers - typeof";
316
- return H = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
232
+ return C = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
317
233
  return typeof e;
318
234
  } : function(e) {
319
235
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
320
- }, H(e);
321
- }
322
- function V() {
323
- return V = Object.assign ? Object.assign.bind() : function(e) {
324
- for (var t = 1; t < arguments.length; t++) {
325
- var n = arguments[t];
326
- for (var r in n) {
327
- ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
236
+ }, C(e);
237
+ }
238
+ function M() {
239
+ return M = Object.assign ? Object.assign.bind() : function(e) {
240
+ for (var n = 1; n < arguments.length; n++) {
241
+ var r = arguments[n];
242
+ for (var t in r) {
243
+ ({}).hasOwnProperty.call(r, t) && (e[t] = r[t]);
328
244
  }
329
245
  }
330
246
  return e;
331
- }, V.apply(null, arguments);
247
+ }, M.apply(null, arguments);
332
248
  }
333
- function F(e, t) {
334
- if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
249
+ function N(e, n) {
250
+ return U(e) || k(e, n) || R(e, n) || q();
335
251
  }
336
- function z(e, t) {
337
- for (var n = 0; n < t.length; n++) {
338
- var r = t[n];
339
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
340
- Object.defineProperty(e, oe(r.key), r);
341
- }
252
+ function q() {
253
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
342
254
  }
343
- function G(e, t, n) {
344
- return t && z(e.prototype, t), n && z(e, n), Object.defineProperty(e, "prototype", {
345
- writable: !1
346
- }), e;
255
+ function R(e, n) {
256
+ if (e) {
257
+ if ("string" == typeof e) return T(e, n);
258
+ var r = {}.toString.call(e).slice(8, -1);
259
+ return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? T(e, n) : void 0;
260
+ }
347
261
  }
348
- function J(e, t) {
349
- if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
350
- e.prototype = Object.create(t && t.prototype, {
351
- constructor: {
352
- value: e,
353
- writable: !0,
354
- configurable: !0
262
+ function T(e, n) {
263
+ (null == n || n > e.length) && (n = e.length);
264
+ for (var r = 0, t = Array(n); r < n; r++) {
265
+ t[r] = e[r];
266
+ }
267
+ return t;
268
+ }
269
+ function k(e, n) {
270
+ var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
271
+ if (null != r) {
272
+ var t, o, i, a, u = [], l = !0, c = !1;
273
+ try {
274
+ if (i = (r = r.call(e)).next, 0 === n) {
275
+ if (Object(r) !== r) return;
276
+ l = !1;
277
+ } else for (;!(l = (t = i.call(r)).done) && (u.push(t.value), u.length !== n); l = !0) {
278
+ }
279
+ } catch (e) {
280
+ c = !0, o = e;
281
+ } finally {
282
+ try {
283
+ if (!l && null != r["return"] && (a = r["return"](), Object(a) !== a)) return;
284
+ } finally {
285
+ if (c) throw o;
286
+ }
355
287
  }
356
- }), Object.defineProperty(e, "prototype", {
357
- writable: !1
358
- }), t && K(e, t);
359
- }
360
- function K(e, t) {
361
- return K = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
362
- return e.__proto__ = t, e;
363
- }, K(e, t);
364
- }
365
- function Q(e) {
366
- var t = $();
367
- return function() {
368
- var n, r = ee(e);
369
- if (t) {
370
- var o = ee(this).constructor;
371
- n = Reflect.construct(r, arguments, o);
372
- } else n = r.apply(this, arguments);
373
- return Y(this, n);
374
- };
375
- }
376
- function Y(e, t) {
377
- if (t && ("object" == H(t) || "function" == typeof t)) return t;
378
- if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
379
- return Z(e);
288
+ return u;
289
+ }
380
290
  }
381
- function Z(e) {
382
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
383
- return e;
291
+ function U(e) {
292
+ if (Array.isArray(e)) return e;
384
293
  }
385
- function $() {
386
- try {
387
- var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
388
- } catch (e) {}
389
- return ($ = function t() {
390
- return !!e;
391
- })();
294
+ function _(e, n) {
295
+ if (null == e) return {};
296
+ var r, t, o = D(e, n);
297
+ if (Object.getOwnPropertySymbols) {
298
+ var i = Object.getOwnPropertySymbols(e);
299
+ for (t = 0; t < i.length; t++) {
300
+ r = i[t], n.includes(r) || {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
301
+ }
302
+ }
303
+ return o;
392
304
  }
393
- function ee(e) {
394
- return ee = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
395
- return e.__proto__ || Object.getPrototypeOf(e);
396
- }, ee(e);
305
+ function D(e, n) {
306
+ if (null == e) return {};
307
+ var r = {};
308
+ for (var t in e) {
309
+ if ({}.hasOwnProperty.call(e, t)) {
310
+ if (n.includes(t)) continue;
311
+ r[t] = e[t];
312
+ }
313
+ }
314
+ return r;
397
315
  }
398
- function te(e, t) {
399
- var n = Object.keys(e);
316
+ function B(e, n) {
317
+ var r = Object.keys(e);
400
318
  if (Object.getOwnPropertySymbols) {
401
- var r = Object.getOwnPropertySymbols(e);
402
- t && (r = r.filter((function(t) {
403
- return Object.getOwnPropertyDescriptor(e, t).enumerable;
404
- }))), n.push.apply(n, r);
319
+ var t = Object.getOwnPropertySymbols(e);
320
+ n && (t = t.filter((function(n) {
321
+ return Object.getOwnPropertyDescriptor(e, n).enumerable;
322
+ }))), r.push.apply(r, t);
405
323
  }
406
- return n;
407
- }
408
- function ne(e) {
409
- for (var t = 1; t < arguments.length; t++) {
410
- var n = null != arguments[t] ? arguments[t] : {};
411
- t % 2 ? te(Object(n), !0).forEach((function(t) {
412
- re(e, t, n[t]);
413
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : te(Object(n)).forEach((function(t) {
414
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
324
+ return r;
325
+ }
326
+ function V(e) {
327
+ for (var n = 1; n < arguments.length; n++) {
328
+ var r = null != arguments[n] ? arguments[n] : {};
329
+ n % 2 ? B(Object(r), !0).forEach((function(n) {
330
+ $(e, n, r[n]);
331
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : B(Object(r)).forEach((function(n) {
332
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
415
333
  }));
416
334
  }
417
335
  return e;
418
336
  }
419
- function re(e, t, n) {
420
- return (t = oe(t)) in e ? Object.defineProperty(e, t, {
421
- value: n,
337
+ function $(e, n, r) {
338
+ return (n = W(n)) in e ? Object.defineProperty(e, n, {
339
+ value: r,
422
340
  enumerable: !0,
423
341
  configurable: !0,
424
342
  writable: !0
425
- }) : e[t] = n, e;
426
- }
427
- function oe(e) {
428
- var t = ie(e, "string");
429
- return "symbol" == H(t) ? t : t + "";
430
- }
431
- function ie(e, t) {
432
- if ("object" != H(e) || !e) return e;
433
- var n = e[Symbol.toPrimitive];
434
- if (void 0 !== n) {
435
- var r = n.call(e, t || "default");
436
- if ("object" != H(r)) return r;
343
+ }) : e[n] = r, e;
344
+ }
345
+ function W(e) {
346
+ var n = z(e, "string");
347
+ return "symbol" == C(n) ? n : n + "";
348
+ }
349
+ function z(e, n) {
350
+ if ("object" != C(e) || !e) return e;
351
+ var r = e[Symbol.toPrimitive];
352
+ if (void 0 !== r) {
353
+ var t = r.call(e, n || "default");
354
+ if ("object" != C(t)) return t;
437
355
  throw new TypeError("@@toPrimitive must return a primitive value.");
438
356
  }
439
- return ("string" === t ? String : Number)(e);
357
+ return ("string" === n ? String : Number)(e);
440
358
  }
441
- var ae = {
359
+ // can't use PanelId as key type, because an index signature parameter type must be 'string', 'number', 'symbol', or a template literal type.
360
+ var F = {
442
361
  activePanelId: i().any.isRequired,
443
362
  children: i().node,
444
363
  elementRef: i().oneOfType([ i().func, i().object ]),
@@ -449,203 +368,157 @@
449
368
  outerStyle: i().object,
450
369
  transition: i().oneOf([ "forward", "backward" ])
451
370
  };
452
- var le = {
453
- transition: "forward"
454
- };
455
- var ue = {
456
- precision: 1
457
- };
458
- var ce = function e(t) {
459
- var n = t.animating, r = t.outerStyle, o = t.interpolatedOuterStyle;
460
- return ne(ne({}, r), n ? o : {});
461
- };
462
- var se = function e(t) {
463
- return t ? {
464
- translateX: 1
465
- } : {};
466
- };
467
- var fe = function e(t) {
468
- var n = t ? t.getWidth() : 0;
469
- var r = t ? t.getHeight() : 0;
470
- return {
471
- width: n,
472
- height: r
473
- };
474
- };
475
- var pe = function e(t) {
476
- var o;
477
- var i = t.activePanelId, a = t.children, l = t.maxWidth, u = t.onMount, c = t.onUnmount, s = t.transition, f = t.transitionStyle;
478
- var p = n.Children.toArray(a).filter(n.isValidElement).find((function(e) {
479
- return e.props.panelId === i;
480
- }));
481
- // TODO: Fix Interpolation<string | number> can't be cast to string
482
- var d = (o = f.translateX) === null || o === void 0 ? void 0 : o.to((function(e) {
483
- return "translateX(".concat(e * l * (s === "forward" ? 1 : -1), "px)");
484
- }));
485
- var y = p ? r().createElement(v.animated.div, {
486
- style: f
487
- }, (0, n.cloneElement)(p, {
488
- style: ne(ne({}, p.props.style), {}, {
489
- transform: d
490
- }),
491
- onMount: u,
492
- onUnmount: c
493
- })) : null;
494
- return y;
371
+ var G = {
372
+ enter: {
373
+ x: "0px"
374
+ },
375
+ initial: {
376
+ x: "0px"
377
+ }
495
378
  };
496
- var de = function e() {
379
+ var H = function e(n, r) {
380
+ var t = "".concat(n, "px");
381
+ var o = "".concat(n * -1, "px");
382
+ var i = r === "forward" ? t : o;
383
+ var a = r === "forward" ? o : t;
497
384
  return {
498
- translateX: 0
499
- };
500
- };
501
- var ve = function e(t) {
502
- return t ? {
503
- translateX: -1,
504
- position: "absolute",
505
- left: 0,
506
- top: 0
507
- } : {
508
- translateX: -1
385
+ from: {
386
+ x: i
387
+ },
388
+ /**
389
+ * Use absolute positioning so the arriving and leaving panel take up the same space.
390
+ * Without this, the arriving panel and leaving panel will be visible at the same time, because
391
+ * the arriving panel would insert itself underneath the still visible leaving panel.
392
+ */
393
+ leave: {
394
+ position: "absolute",
395
+ x: a
396
+ }
509
397
  };
510
398
  };
511
- var ye = function(e) {
512
- J(o, e);
513
- var t = Q(o);
514
- G(o, null, [ {
515
- key: "getDerivedStateFromProps",
516
- // @docs-props-type SlidingPanelsPropsBase
517
- value: function e(t, n) {
518
- if (t.activePanelId !== n.prevActivePanelId) {
519
- // instead of using panelId, assign each sliding event an id and
520
- // use it as the key to make sure new panelA will transit as expected if
521
- // old panelA has not fully left yet
522
- return {
523
- animating: true,
524
- panelLoading: true,
525
- prevActivePanelId: t.activePanelId,
526
- slidingId: n.slidingId + 1
527
- };
528
- }
529
- return null;
399
+ var J = function e(n) {
400
+ return Object.values(n).reduce((function(e, n) {
401
+ if ((n === null || n === void 0 ? void 0 : n.tagName) === "DIV") {
402
+ return Math.max(e, n.clientWidth);
530
403
  }
531
- } ]);
532
- function o(e) {
533
- var i;
534
- F(this, o);
535
- i = t.call(this, e);
536
- re(Z(i), "panelInstances", {});
537
- re(Z(i), "allowAnimationUpdates", true);
538
- re(Z(i), "handlePanelMount", (function(e) {
539
- i.panelInstances[e.props.panelId] = e;
540
- if (e.props.panelId === i.props.activePanelId) {
541
- i.setState({
542
- activePanel: e,
543
- panelLoading: false
544
- });
545
- }
546
- }));
547
- re(Z(i), "handlePanelUnmount", (function(e) {
548
- delete i.panelInstances[e.props.panelId];
549
- }));
550
- re(Z(i), "handleAnimationEnd", (function() {
551
- var e, t;
552
- if (i.allowAnimationUpdates) {
553
- i.setState({
554
- animating: false
555
- });
556
- }
557
- (e = (t = i.props).onAnimationEnd) === null || e === void 0 ? void 0 : e.call(t);
558
- }));
559
- re(Z(i), "renderOuterContainer", (function(e) {
560
- var t = i.props, a = t.activePanelId, u = t.children, s = t.elementRef, p = t.outerClassName, b = t.outerStyle, m = t.innerClassName, h = t.innerStyle;
561
- var g = i.state.animating;
562
- var O = ce({
563
- animating: g,
564
- outerStyle: b,
565
- interpolatedOuterStyle: e
404
+ return e;
405
+ }), 0);
406
+ };
407
+ /* this function is used to loop over children panels and output a render function for each,
408
+ we wrap each child panel in animated.div via StyledAnimatedDiv
409
+ apply any custom inner styles or classnames that have been passed in
410
+ apply styles coming from the transitions call that is rendering this component
411
+ you can see this being used below as `<PanelToRender style={style} />` */ var K = function e(n) {
412
+ var o = n.validChildren, i = n.innerClassName, a = n.innerStyle, u = n.onMount, l = n.onUnmount;
413
+ return o.map((function(e) {
414
+ /* this is returning a function (component) that is rendered near bottom of file as <PanelToRender style={style} /> */
415
+ return function(n) {
416
+ var o = n.style;
417
+ var c = (0, r.cloneElement)(e, {
418
+ onMount: u,
419
+ onUnmount: l
566
420
  });
567
- var j = n.Children.toArray(u).filter(n.isValidElement).find((function(e) {
568
- return e.props.panelId === a;
569
- }));
570
- if (false) {}
571
- var w = l()(d()(i.panelInstances), (function(e) {
572
- return !!e;
573
- }));
574
- var S = w.map((function(e) {
575
- var t;
576
- var n = i.panelInstances[e.props.panelId];
577
- return n ? (t = n.getWidth()) !== null && t !== void 0 ? t : 0 : 0;
578
- })).reduce((function(e, t) {
579
- return Math.max(e, t);
580
- }), 0);
421
+ var f = (0, r.useMemo)((function() {
422
+ return V(V({}, a), o);
423
+ }), [ o ]);
581
424
 
582
- return r().createElement(P, V({
583
- className: p,
584
- "data-test-active-panel-id": a,
585
- "data-test": "sliding-panels",
586
- elementRef: s,
587
- style: O
588
- }, f()(i.props, c()(o.propTypes))), r().createElement(y.Transition, {
589
- from: se(g),
590
- enter: de(),
591
- leave: ve(g),
592
- items: a
593
- }, (
594
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
595
- function(e, t) {
596
-
597
- return r().createElement(v.animated.div, {
598
- style: h,
599
- className: m
600
- }, pe({
601
- activePanelId: t,
602
- children: u,
603
- maxWidth: S,
604
- onMount: i.handlePanelMount,
605
- onUnmount: i.handlePanelUnmount,
606
- transition: i.props.transition,
607
- transitionStyle: e
608
- }));
609
- })));
610
- }));
611
- i.state = {
612
- animating: false,
613
- panelLoading: false,
614
- prevActivePanelId: i.props.activePanelId,
615
- // eslint-disable-line react/no-unused-state
616
- slidingId: 0
425
+ return t().createElement(p, {
426
+ style: f,
427
+ className: i
428
+ }, c);
617
429
  };
618
- return i;
619
- }
620
- G(o, [ {
621
- key: "componentWillUnmount",
622
- value: function e() {
623
- this.allowAnimationUpdates = false;
430
+ }));
431
+ };
432
+ function L(e) {
433
+ var n = e.activePanelId, o = e.children, i = e.elementRef, l = e.innerClassName, c = e.innerStyle, f = e.onAnimationEnd, s = e.outerClassName, y = e.outerStyle, d = e.transition, p = d === void 0 ? "forward" : d, m = _(e, [ "activePanelId", "children", "elementRef", "innerClassName", "innerStyle", "onAnimationEnd", "outerClassName", "outerStyle", "transition" ]);
434
+ // @docs-props-type SlidingPanelsPropsBase
435
+ var b = (0, r.useState)(0), g = N(b, 2), O = g[0], h = g[1];
436
+ var S = (0, r.useState)([]), j = N(S, 2), w = j[0], P = j[1];
437
+ var E = (0, r.useState)({}), A = N(E, 2), I = A[0], x = A[1];
438
+ var C = (0, a.useSpringRef)();
439
+ var q = (0, r.useMemo)((function() {
440
+ return r.Children.toArray(o).filter(r.isValidElement);
441
+ }), [ o ]);
442
+ /**
443
+ * maxWidth is used to determine how far to translate the x value of the animated panels.
444
+ * Without maxWidth, we run into a problem if the leaving panel width > the arriving panel width.
445
+ * In this case, useAnimationTransition will only know to shift the leaving panel by the width of the arriving panel,
446
+ * which would result in seeing part of the leaving panel's content on screen at the same time as the arriving panel's content.
447
+ */ var R = (0, r.useMemo)((function() {
448
+ return J(I);
449
+ }), [ I ]);
450
+ /* determines what our transform translateX will look like based on is it transitioning forward or backward */ var T = (0,
451
+ r.useMemo)((function() {
452
+ return H(R, p);
453
+ }), [ R, p ]);
454
+ var k = (0, u.useAnimationTransition)(O, V(V(V({
455
+ ref: C
456
+ }, G), T), {}, {
457
+ onRest: function e() {
458
+ f === null || f === void 0 ? void 0 : f();
624
459
  }
625
- }, {
626
- key: "render",
627
- value: function e() {
628
- var t = this.state, n = t.activePanel, o = t.panelLoading;
629
- // When a new panel is loading, the activePanel is about to be removed. The height and/or
630
- // width of that panel may have changed since the last render. To ensure that the next
631
- // panel animates from the current height and width (rather than the previously loaded one),
632
- // we only set the style when panelLoading is true (immediate prop prevents animation if true).
633
-
634
- return r().createElement(y.Spring, {
635
- to: fe(n),
636
- onRest: this.handleAnimationEnd,
637
- immediate: o,
638
- config: ue
639
- }, /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
640
- this.renderOuterContainer);
460
+ }));
461
+ (0, r.useEffect)((function() {
462
+ /* if it can't find activePanelId it will set currentPanelIndex to -1 */
463
+ if (false) {}
464
+ }), [ O ]);
465
+ (0, r.useEffect)((function() {
466
+ /* starts animation */
467
+ C.start();
468
+ }), [ C, O ]);
469
+ (0, r.useEffect)((function() {
470
+ /* sets the currentPanelIndex in state whenever activePanelId or children changes */
471
+ var e = q.findIndex((function(e) {
472
+ var r = e.props;
473
+ return r.panelId === n;
474
+ }));
475
+ h(e);
476
+ }), [ n, q ]);
477
+ var U = (0, r.useCallback)((function(e, n) {
478
+ if (e != null && n != null) {
479
+ x((function(r) {
480
+ return V(V({}, r), {}, $({}, n, e));
481
+ }));
641
482
  }
642
- } ]);
643
- return o;
644
- }(n.Component);
645
- re(ye, "propTypes", ae);
646
- re(ye, "defaultProps", le);
647
- re(ye, "Panel", L);
648
- /* harmony default export */ const be = ye;
483
+ }), []);
484
+ var D = (0, r.useCallback)((function(e) {
485
+ x((function(n) {
486
+ var r = V({}, n);
487
+ delete r[e];
488
+ return r;
489
+ }));
490
+ }), []);
491
+ (0, r.useMemo)((function() {
492
+ /**
493
+ * use useMemo instead of useEffect to setPanels because we need panels to be populated before mount
494
+ * so SlidingPanels will appear with a panel already inside the StyledBox
495
+ */
496
+ P(K({
497
+ validChildren: q,
498
+ onMount: U,
499
+ onUnmount: D,
500
+ innerClassName: l,
501
+ innerStyle: c
502
+ }));
503
+ }), [ q, U, D, l, c ]);
504
+
505
+ return t().createElement(v, M({
506
+ className: s,
507
+ "data-test-active-panel-id": n,
508
+ "data-test": "sliding-panels",
509
+ elementRef: i,
510
+ style: y
511
+ }, m), k((function(e, n) {
512
+ var r = w[n];
513
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
514
+ return r ? t().createElement(r, {
515
+ style: e
516
+ }) : null;
517
+ })));
518
+ }
519
+ L.propTypes = F;
520
+ L.Panel = x;
521
+ /* harmony default export */ const Q = L;
649
522
  // CONCATENATED MODULE: ./src/SlidingPanels/index.ts
650
- module.exports = t;
523
+ module.exports = n;
651
524
  /******/})();