@lumx/react 2.2.17 → 2.2.18-alpha-hooks.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 (268) hide show
  1. package/esm/_internal/{_rollupPluginBabelHelpers.js → _rolluppluginbabelhelpers.53.js} +1 -1
  2. package/esm/_internal/_rolluppluginbabelhelpers.53.js.map +1 -0
  3. package/esm/_internal/alert-dialog.js +19 -19
  4. package/esm/_internal/{AlertDialog.js → alertdialog.1.js} +8 -8
  5. package/esm/_internal/alertdialog.1.js.map +1 -0
  6. package/esm/_internal/autocomplete.js +21 -20
  7. package/esm/_internal/autocomplete.js.map +1 -1
  8. package/esm/_internal/{AutocompleteMultiple.js → autocompletemultiple.2.js} +9 -9
  9. package/esm/_internal/autocompletemultiple.2.js.map +1 -0
  10. package/esm/_internal/{Avatar2.js → avatar.3.js} +4 -4
  11. package/esm/_internal/avatar.3.js.map +1 -0
  12. package/esm/_internal/avatar.js +6 -6
  13. package/esm/_internal/{Badge2.js → badge.4.js} +3 -3
  14. package/esm/_internal/badge.4.js.map +1 -0
  15. package/esm/_internal/badge.js +3 -3
  16. package/esm/_internal/{Button2.js → button.5.js} +5 -5
  17. package/esm/_internal/button.5.js.map +1 -0
  18. package/esm/_internal/button.js +15 -14
  19. package/esm/_internal/button.js.map +1 -1
  20. package/esm/_internal/{ButtonGroup.js → buttongroup.7.js} +3 -3
  21. package/esm/_internal/buttongroup.7.js.map +1 -0
  22. package/esm/_internal/{ButtonRoot.js → buttonroot.57.js} +4 -4
  23. package/esm/_internal/buttonroot.57.js.map +1 -0
  24. package/esm/_internal/{Checkbox2.js → checkbox.8.js} +7 -7
  25. package/esm/_internal/checkbox.8.js.map +1 -0
  26. package/esm/_internal/checkbox.js +7 -7
  27. package/esm/_internal/{Chip2.js → chip.9.js} +3 -3
  28. package/esm/_internal/chip.9.js.map +1 -0
  29. package/esm/_internal/chip.js +4 -4
  30. package/esm/_internal/{ChipGroup.js → chipgroup.10.js} +3 -3
  31. package/esm/_internal/chipgroup.10.js.map +1 -0
  32. package/esm/_internal/{ClickAwayProvider.js → clickawayprovider.60.js} +4 -4
  33. package/esm/_internal/clickawayprovider.60.js.map +1 -0
  34. package/esm/_internal/comment-block.js +13 -12
  35. package/esm/_internal/comment-block.js.map +1 -1
  36. package/esm/_internal/{CommentBlock.js → commentblock.11.js} +5 -5
  37. package/esm/_internal/commentblock.11.js.map +1 -0
  38. package/esm/_internal/components.js +1 -1
  39. package/esm/_internal/{constants.js → constants.59.js} +1 -1
  40. package/esm/_internal/constants.59.js.map +1 -0
  41. package/esm/_internal/date-picker.js +19 -18
  42. package/esm/_internal/date-picker.js.map +1 -1
  43. package/esm/_internal/{DatePickerField.js → datepickerfield.12.js} +9 -9
  44. package/esm/_internal/datepickerfield.12.js.map +1 -0
  45. package/esm/_internal/{Dialog2.js → dialog.13.js} +12 -12
  46. package/esm/_internal/dialog.13.js.map +1 -0
  47. package/esm/_internal/dialog.js +12 -12
  48. package/esm/_internal/{Divider2.js → divider.14.js} +3 -3
  49. package/esm/_internal/divider.14.js.map +1 -0
  50. package/esm/_internal/divider.js +3 -3
  51. package/esm/_internal/drag-handle.js +4 -4
  52. package/esm/_internal/{DragHandle.js → draghandle.15.js} +4 -4
  53. package/esm/_internal/draghandle.15.js.map +1 -0
  54. package/esm/_internal/{Dropdown2.js → dropdown.16.js} +6 -6
  55. package/esm/_internal/dropdown.16.js.map +1 -0
  56. package/esm/_internal/dropdown.js +11 -10
  57. package/esm/_internal/dropdown.js.map +1 -1
  58. package/esm/_internal/expansion-panel.js +17 -16
  59. package/esm/_internal/expansion-panel.js.map +1 -1
  60. package/esm/_internal/{ExpansionPanel.js → expansionpanel.17.js} +8 -8
  61. package/esm/_internal/expansionpanel.17.js.map +1 -0
  62. package/esm/_internal/{Flag2.js → flag.18.js} +4 -4
  63. package/esm/_internal/flag.18.js.map +1 -0
  64. package/esm/_internal/flag.js +4 -4
  65. package/esm/_internal/flex-box.js +3 -3
  66. package/esm/_internal/{FlexBox.js → flexbox.19.js} +3 -3
  67. package/esm/_internal/flexbox.19.js.map +1 -0
  68. package/esm/_internal/{getRootClassName.js → getrootclassname.54.js} +2 -2
  69. package/esm/_internal/getrootclassname.54.js.map +1 -0
  70. package/esm/_internal/grid.js +3 -3
  71. package/esm/_internal/{GridItem.js → griditem.20.js} +3 -3
  72. package/esm/_internal/griditem.20.js.map +1 -0
  73. package/esm/_internal/{Icon2.js → icon.21.js} +3 -3
  74. package/esm/_internal/icon.21.js.map +1 -0
  75. package/esm/_internal/icon.js +3 -3
  76. package/esm/_internal/{IconButton.js → iconbutton.6.js} +6 -6
  77. package/esm/_internal/iconbutton.6.js.map +1 -0
  78. package/esm/_internal/image-block.js +6 -6
  79. package/esm/_internal/{ImageBlock.js → imageblock.22.js} +4 -4
  80. package/esm/_internal/imageblock.22.js.map +1 -0
  81. package/esm/{index2.js → _internal/index.55.js} +1 -1
  82. package/esm/_internal/index.55.js.map +1 -0
  83. package/esm/_internal/input-helper.js +3 -3
  84. package/esm/_internal/input-label.js +3 -3
  85. package/esm/_internal/{InputHelper.js → inputhelper.23.js} +3 -3
  86. package/esm/_internal/inputhelper.23.js.map +1 -0
  87. package/esm/_internal/{InputLabel.js → inputlabel.24.js} +3 -3
  88. package/esm/_internal/inputlabel.24.js.map +1 -0
  89. package/esm/_internal/{Lightbox2.js → lightbox.25.js} +11 -11
  90. package/esm/_internal/lightbox.25.js.map +1 -0
  91. package/esm/_internal/lightbox.js +17 -16
  92. package/esm/_internal/lightbox.js.map +1 -1
  93. package/esm/_internal/link-preview.js +8 -8
  94. package/esm/_internal/{Link2.js → link.26.js} +5 -5
  95. package/esm/_internal/link.26.js.map +1 -0
  96. package/esm/_internal/link.js +5 -5
  97. package/esm/_internal/{LinkPreview.js → linkpreview.27.js} +5 -5
  98. package/esm/_internal/linkpreview.27.js.map +1 -0
  99. package/esm/_internal/{List2.js → list.28.js} +6 -6
  100. package/esm/_internal/list.28.js.map +1 -0
  101. package/esm/_internal/list.js +7 -7
  102. package/esm/_internal/{ListSubheader.js → listsubheader.29.js} +3 -3
  103. package/esm/_internal/listsubheader.29.js.map +1 -0
  104. package/esm/_internal/{mergeRefs.js → mergerefs.56.js} +1 -1
  105. package/esm/_internal/mergerefs.56.js.map +1 -0
  106. package/esm/_internal/{Message2.js → message.30.js} +4 -4
  107. package/esm/_internal/message.30.js.map +1 -0
  108. package/esm/_internal/message.js +4 -4
  109. package/esm/_internal/{Mosaic2.js → mosaic.31.js} +4 -4
  110. package/esm/_internal/mosaic.31.js.map +1 -0
  111. package/esm/_internal/mosaic.js +6 -6
  112. package/esm/_internal/{Notification2.js → notification.32.js} +7 -7
  113. package/esm/_internal/notification.32.js.map +1 -0
  114. package/esm/_internal/notification.js +9 -9
  115. package/esm/_internal/{partitionMulti.js → partitionmulti.62.js} +1 -1
  116. package/esm/_internal/partitionmulti.62.js.map +1 -0
  117. package/esm/_internal/{Popover2.js → popover.33.js} +8 -31
  118. package/esm/_internal/popover.33.js.map +1 -0
  119. package/esm/_internal/popover.js +7 -6
  120. package/esm/_internal/popover.js.map +1 -1
  121. package/esm/_internal/post-block.js +7 -7
  122. package/esm/_internal/{PostBlock.js → postblock.34.js} +5 -5
  123. package/esm/_internal/postblock.34.js.map +1 -0
  124. package/esm/_internal/progress-tracker.js +9 -9
  125. package/esm/_internal/{Progress2.js → progress.35.js} +3 -3
  126. package/esm/_internal/progress.35.js.map +1 -0
  127. package/esm/_internal/progress.js +3 -3
  128. package/esm/_internal/{ProgressTrackerStepPanel.js → progresstrackersteppanel.36.js} +8 -8
  129. package/esm/_internal/progresstrackersteppanel.36.js.map +1 -0
  130. package/esm/_internal/radio-button.js +6 -6
  131. package/esm/_internal/{RadioGroup.js → radiogroup.37.js} +6 -6
  132. package/esm/_internal/radiogroup.37.js.map +1 -0
  133. package/esm/_internal/{renderLink.js → renderlink.65.js} +2 -2
  134. package/esm/_internal/renderlink.65.js.map +1 -0
  135. package/esm/_internal/select.js +20 -19
  136. package/esm/_internal/select.js.map +1 -1
  137. package/esm/_internal/{SelectMultiple.js → selectmultiple.38.js} +12 -12
  138. package/esm/_internal/selectmultiple.38.js.map +1 -0
  139. package/esm/_internal/side-navigation.js +15 -14
  140. package/esm/_internal/side-navigation.js.map +1 -1
  141. package/esm/_internal/{SideNavigationItem.js → sidenavigationitem.39.js} +7 -7
  142. package/esm/_internal/sidenavigationitem.39.js.map +1 -0
  143. package/esm/_internal/skeleton.js +3 -3
  144. package/esm/_internal/{SkeletonTypography.js → skeletontypography.40.js} +3 -3
  145. package/esm/_internal/skeletontypography.40.js.map +1 -0
  146. package/esm/_internal/{Slider2.js → slider.41.js} +6 -6
  147. package/esm/_internal/slider.41.js.map +1 -0
  148. package/esm/_internal/slider.js +6 -6
  149. package/esm/_internal/{Slides.js → slides.42.js} +8 -8
  150. package/esm/_internal/slides.42.js.map +1 -0
  151. package/esm/_internal/slideshow.js +14 -13
  152. package/esm/_internal/slideshow.js.map +1 -1
  153. package/esm/_internal/{Switch2.js → switch.43.js} +6 -6
  154. package/esm/_internal/switch.43.js.map +1 -0
  155. package/esm/_internal/switch.js +6 -6
  156. package/esm/_internal/table.js +4 -4
  157. package/esm/_internal/{TableRow.js → tablerow.44.js} +4 -4
  158. package/esm/_internal/tablerow.44.js.map +1 -0
  159. package/esm/_internal/{TabPanel.js → tabpanel.45.js} +6 -6
  160. package/esm/_internal/tabpanel.45.js.map +1 -0
  161. package/esm/_internal/tabs.js +7 -7
  162. package/esm/_internal/text-field.js +16 -15
  163. package/esm/_internal/text-field.js.map +1 -1
  164. package/esm/_internal/{TextField.js → textfield.46.js} +9 -9
  165. package/esm/_internal/textfield.46.js.map +1 -0
  166. package/esm/_internal/{Thumbnail2.js → thumbnail.47.js} +6 -6
  167. package/esm/_internal/thumbnail.47.js.map +1 -0
  168. package/esm/_internal/thumbnail.js +6 -6
  169. package/esm/_internal/{Toolbar2.js → toolbar.49.js} +3 -3
  170. package/esm/_internal/toolbar.49.js.map +1 -0
  171. package/esm/_internal/toolbar.js +3 -3
  172. package/esm/_internal/{Tooltip2.js → tooltip.50.js} +7 -7
  173. package/esm/_internal/tooltip.50.js.map +1 -0
  174. package/esm/_internal/tooltip.js +9 -8
  175. package/esm/_internal/tooltip.js.map +1 -1
  176. package/esm/_internal/{type.js → type.64.js} +1 -1
  177. package/esm/_internal/type.64.js.map +1 -0
  178. package/esm/_internal/{types.js → types.48.js} +2 -3
  179. package/esm/_internal/types.48.js.map +1 -0
  180. package/esm/_internal/{Uploader2.js → uploader.51.js} +4 -4
  181. package/esm/_internal/uploader.51.js.map +1 -0
  182. package/esm/_internal/uploader.js +4 -4
  183. package/esm/_internal/{useDelayedVisibility.js → usedelayedvisibility.63.js} +2 -2
  184. package/esm/_internal/usedelayedvisibility.63.js.map +1 -0
  185. package/esm/_internal/{useDisableBodyScroll.js → usedisablebodyscroll.61.js} +1 -1
  186. package/esm/_internal/usedisablebodyscroll.61.js.map +1 -0
  187. package/esm/_internal/{useFocusTrap.js → usefocustrap.58.js} +2 -2
  188. package/esm/_internal/usefocustrap.58.js.map +1 -0
  189. package/esm/_internal/user-block.js +9 -9
  190. package/esm/_internal/{UserBlock.js → userblock.52.js} +5 -5
  191. package/esm/_internal/userblock.52.js.map +1 -0
  192. package/esm/_internal/{useRovingTabIndex.js → userovingtabindex.66.js} +3 -3
  193. package/esm/_internal/userovingtabindex.66.js.map +1 -0
  194. package/hooks/useFocusWithin.d.ts +16 -0
  195. package/hooks/useFocusWithin.js +28 -0
  196. package/hooks/useFocusWithin.js.map +1 -0
  197. package/{types.d.ts → index.d.ts} +5 -6
  198. package/index.js +90 -0
  199. package/{esm/index.js.map → index.js.map} +1 -1
  200. package/package.json +11 -8
  201. package/src/components/thumbnail/index.ts +0 -1
  202. package/esm/_internal/AlertDialog.js.map +0 -1
  203. package/esm/_internal/AutocompleteMultiple.js.map +0 -1
  204. package/esm/_internal/Avatar2.js.map +0 -1
  205. package/esm/_internal/Badge2.js.map +0 -1
  206. package/esm/_internal/Button2.js.map +0 -1
  207. package/esm/_internal/ButtonGroup.js.map +0 -1
  208. package/esm/_internal/ButtonRoot.js.map +0 -1
  209. package/esm/_internal/Checkbox2.js.map +0 -1
  210. package/esm/_internal/Chip2.js.map +0 -1
  211. package/esm/_internal/ChipGroup.js.map +0 -1
  212. package/esm/_internal/ClickAwayProvider.js.map +0 -1
  213. package/esm/_internal/CommentBlock.js.map +0 -1
  214. package/esm/_internal/DatePickerField.js.map +0 -1
  215. package/esm/_internal/Dialog2.js.map +0 -1
  216. package/esm/_internal/Divider2.js.map +0 -1
  217. package/esm/_internal/DragHandle.js.map +0 -1
  218. package/esm/_internal/Dropdown2.js.map +0 -1
  219. package/esm/_internal/ExpansionPanel.js.map +0 -1
  220. package/esm/_internal/Flag2.js.map +0 -1
  221. package/esm/_internal/FlexBox.js.map +0 -1
  222. package/esm/_internal/GridItem.js.map +0 -1
  223. package/esm/_internal/Icon2.js.map +0 -1
  224. package/esm/_internal/IconButton.js.map +0 -1
  225. package/esm/_internal/ImageBlock.js.map +0 -1
  226. package/esm/_internal/InputHelper.js.map +0 -1
  227. package/esm/_internal/InputLabel.js.map +0 -1
  228. package/esm/_internal/Lightbox2.js.map +0 -1
  229. package/esm/_internal/Link2.js.map +0 -1
  230. package/esm/_internal/LinkPreview.js.map +0 -1
  231. package/esm/_internal/List2.js.map +0 -1
  232. package/esm/_internal/ListSubheader.js.map +0 -1
  233. package/esm/_internal/Message2.js.map +0 -1
  234. package/esm/_internal/Mosaic2.js.map +0 -1
  235. package/esm/_internal/Notification2.js.map +0 -1
  236. package/esm/_internal/Popover2.js.map +0 -1
  237. package/esm/_internal/PostBlock.js.map +0 -1
  238. package/esm/_internal/Progress2.js.map +0 -1
  239. package/esm/_internal/ProgressTrackerStepPanel.js.map +0 -1
  240. package/esm/_internal/RadioGroup.js.map +0 -1
  241. package/esm/_internal/SelectMultiple.js.map +0 -1
  242. package/esm/_internal/SideNavigationItem.js.map +0 -1
  243. package/esm/_internal/SkeletonTypography.js.map +0 -1
  244. package/esm/_internal/Slider2.js.map +0 -1
  245. package/esm/_internal/Slides.js.map +0 -1
  246. package/esm/_internal/Switch2.js.map +0 -1
  247. package/esm/_internal/TabPanel.js.map +0 -1
  248. package/esm/_internal/TableRow.js.map +0 -1
  249. package/esm/_internal/TextField.js.map +0 -1
  250. package/esm/_internal/Thumbnail2.js.map +0 -1
  251. package/esm/_internal/Toolbar2.js.map +0 -1
  252. package/esm/_internal/Tooltip2.js.map +0 -1
  253. package/esm/_internal/Uploader2.js.map +0 -1
  254. package/esm/_internal/UserBlock.js.map +0 -1
  255. package/esm/_internal/_rollupPluginBabelHelpers.js.map +0 -1
  256. package/esm/_internal/constants.js.map +0 -1
  257. package/esm/_internal/getRootClassName.js.map +0 -1
  258. package/esm/_internal/mergeRefs.js.map +0 -1
  259. package/esm/_internal/partitionMulti.js.map +0 -1
  260. package/esm/_internal/renderLink.js.map +0 -1
  261. package/esm/_internal/type.js.map +0 -1
  262. package/esm/_internal/types.js.map +0 -1
  263. package/esm/_internal/useDelayedVisibility.js.map +0 -1
  264. package/esm/_internal/useDisableBodyScroll.js.map +0 -1
  265. package/esm/_internal/useFocusTrap.js.map +0 -1
  266. package/esm/_internal/useRovingTabIndex.js.map +0 -1
  267. package/esm/index.js +0 -89
  268. package/esm/index2.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chip.9.js","sources":["../../../src/hooks/useStopPropagation.ts","../../../src/components/chip/Chip.tsx"],"sourcesContent":["import isFunction from 'lodash/isFunction';\nimport { MouseEventHandler, useCallback } from 'react';\n\n/**\n * Wrap mouse event handler to stop event propagation.\n *\n * @param handler The mouse handler to wrap.\n * @return Mouse handler stopping propagation.\n */\nexport function useStopPropagation(handler?: MouseEventHandler): MouseEventHandler {\n return useCallback(\n (evt) => {\n if (!evt || !isFunction(handler)) {\n return;\n }\n handler(evt);\n evt.stopPropagation();\n },\n [handler],\n );\n}\n","import { Color, ColorPalette, Size, Theme } from '@lumx/react';\nimport { useStopPropagation } from '@lumx/react/hooks/useStopPropagation';\n\nimport { Comp, GenericProps, getRootClassName, handleBasicClasses, onEnterPressed } from '@lumx/react/utils';\n\nimport classNames from 'classnames';\n\nimport isFunction from 'lodash/isFunction';\nimport React, { forwardRef, MouseEventHandler, ReactNode } from 'react';\n\n/**\n * Chip sizes.\n */\ntype ChipSize = Extract<Size, 's' | 'm'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ChipProps extends GenericProps {\n /** A component to be rendered after the content. */\n after?: ReactNode;\n /** A component to be rendered before the content. */\n before?: ReactNode;\n /** Color variant. */\n color?: Color;\n /** Whether the component is clickable or not. */\n isClickable?: boolean;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Whether the chip is currently in a highlighted state or not. */\n isHighlighted?: boolean;\n /** Whether the component is selected or not. */\n isSelected?: boolean;\n /** Size variant. */\n size?: ChipSize;\n /** Theme adapting the component to light or dark background. */\n theme?: Theme;\n /** On \"after\" element clicked callback. */\n onAfterClick?: MouseEventHandler;\n /** On \"before\" element clicked callback. */\n onBeforeClick?: MouseEventHandler;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Chip';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<ChipProps> = {\n size: Size.m,\n theme: Theme.light,\n};\n\n/**\n * Chip component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Chip: Comp<ChipProps, HTMLAnchorElement> = forwardRef((props, ref) => {\n const {\n after,\n before,\n children,\n className,\n color,\n disabled,\n isClickable,\n isDisabled = disabled,\n isHighlighted,\n isSelected,\n onAfterClick,\n onBeforeClick,\n onClick,\n size,\n theme,\n ...forwardedProps\n } = props;\n const hasAfterClick = isFunction(onAfterClick);\n const hasBeforeClick = isFunction(onBeforeClick);\n const hasOnClick = isFunction(onClick);\n\n // Adapt color to the theme.\n const chipColor = color || (theme === Theme.light ? ColorPalette.dark : ColorPalette.light);\n\n const handleOnBeforeClick = useStopPropagation(onBeforeClick);\n const handleOnAfterClick = useStopPropagation(onAfterClick);\n\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <a\n {...forwardedProps}\n ref={ref}\n className={classNames(\n className,\n handleBasicClasses({\n clickable: Boolean(hasOnClick) || isClickable,\n color: chipColor,\n isDisabled,\n hasAfter: Boolean(after),\n hasBefore: Boolean(before),\n highlighted: Boolean(isHighlighted),\n prefix: CLASSNAME,\n selected: Boolean(isSelected),\n size,\n unselected: Boolean(!isSelected),\n }),\n )}\n role={hasOnClick ? 'button' : undefined}\n tabIndex={isDisabled || !hasOnClick ? -1 : 0}\n aria-disabled={(hasOnClick && isDisabled) || undefined}\n onClick={hasOnClick ? onClick : undefined}\n onKeyDown={hasOnClick ? onEnterPressed(onClick) : undefined}\n >\n {before && (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions\n <div\n className={classNames(`${CLASSNAME}__before`, {\n [`${CLASSNAME}__before--is-clickable`]: hasBeforeClick,\n })}\n onClick={handleOnBeforeClick}\n >\n {before}\n </div>\n )}\n\n <div className={`${CLASSNAME}__label`}>{children}</div>\n\n {after && (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions\n <div\n className={classNames(`${CLASSNAME}__after`, {\n [`${CLASSNAME}__after--is-clickable`]: hasAfterClick,\n })}\n onClick={handleOnAfterClick}\n >\n {after}\n </div>\n )}\n </a>\n );\n});\nChip.displayName = COMPONENT_NAME;\nChip.className = CLASSNAME;\nChip.defaultProps = DEFAULT_PROPS;\n"],"names":["useStopPropagation","handler","useCallback","evt","isFunction","stopPropagation","COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","size","Size","m","theme","Theme","light","Chip","forwardRef","props","ref","after","before","children","className","color","disabled","isClickable","isDisabled","isHighlighted","isSelected","onAfterClick","onBeforeClick","onClick","forwardedProps","hasAfterClick","hasBeforeClick","hasOnClick","chipColor","ColorPalette","dark","handleOnBeforeClick","handleOnAfterClick","classNames","handleBasicClasses","clickable","Boolean","hasAfter","hasBefore","highlighted","prefix","selected","unselected","undefined","onEnterPressed","displayName","defaultProps"],"mappings":";;;;;;AAGA;;;;;;;AAMO,SAASA,kBAAT,CAA4BC,OAA5B,EAA4E;AAC/E,SAAOC,WAAW,CACd,UAACC,GAAD,EAAS;AACL,QAAI,CAACA,GAAD,IAAQ,CAACC,UAAU,CAACH,OAAD,CAAvB,EAAkC;AAC9B;AACH;;AACDA,IAAAA,OAAO,CAACE,GAAD,CAAP;AACAA,IAAAA,GAAG,CAACE,eAAJ;AACH,GAPa,EAQd,CAACJ,OAAD,CARc,CAAlB;AAUH;;ACVD;;;;AAiCA;;;AAGA,IAAMK,cAAc,GAAG,MAAvB;AAEA;;;;AAGA,IAAMC,SAAS,GAAGC,gBAAgB,CAACF,cAAD,CAAlC;AAEA;;;;AAGA,IAAMG,aAAiC,GAAG;AACtCC,EAAAA,IAAI,EAAEC,IAAI,CAACC,CAD2B;AAEtCC,EAAAA,KAAK,EAAEC,KAAK,CAACC;AAFyB,CAA1C;AAKA;;;;;;;;IAOaC,IAAwC,GAAGC,UAAU,CAAC,UAACC,KAAD,EAAQC,GAAR,EAAgB;AAAA,MAE3EC,KAF2E,GAkB3EF,KAlB2E,CAE3EE,KAF2E;AAAA,MAG3EC,MAH2E,GAkB3EH,KAlB2E,CAG3EG,MAH2E;AAAA,MAI3EC,QAJ2E,GAkB3EJ,KAlB2E,CAI3EI,QAJ2E;AAAA,MAK3EC,SAL2E,GAkB3EL,KAlB2E,CAK3EK,SAL2E;AAAA,MAM3EC,KAN2E,GAkB3EN,KAlB2E,CAM3EM,KAN2E;AAAA,MAO3EC,QAP2E,GAkB3EP,KAlB2E,CAO3EO,QAP2E;AAAA,MAQ3EC,WAR2E,GAkB3ER,KAlB2E,CAQ3EQ,WAR2E;AAAA,0BA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1,12 +1,12 @@
1
- import './_rollupPluginBabelHelpers.js';
1
+ import './_rolluppluginbabelhelpers.53.js';
2
2
  import './components.js';
3
3
  import 'react';
4
- import './getRootClassName.js';
4
+ import './getrootclassname.54.js';
5
5
  import 'lodash/isBoolean';
6
6
  import 'lodash/isEmpty';
7
7
  import 'lodash/kebabCase';
8
8
  import 'lodash/noop';
9
9
  import 'lodash/isFunction';
10
- export { C as Chip } from './Chip2.js';
11
- export { C as ChipGroup } from './ChipGroup.js';
10
+ export { C as Chip } from './chip.9.js';
11
+ export { C as ChipGroup } from './chipgroup.10.js';
12
12
  //# sourceMappingURL=chip.js.map
@@ -1,7 +1,7 @@
1
- import { d as _slicedToArray, b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
1
+ import { d as _slicedToArray, b as _objectWithoutProperties, c as _extends } from './_rolluppluginbabelhelpers.53.js';
2
2
  import { Alignment } from './components.js';
3
3
  import React, { useState, forwardRef } from 'react';
4
- import { g as getRootClassName, h as handleBasicClasses, c as classnames } from './getRootClassName.js';
4
+ import { g as getRootClassName, h as handleBasicClasses, c as classnames } from './getrootclassname.54.js';
5
5
 
6
6
  var INITIAL_STATE_ACTIVE_CHIP = -1;
7
7
  /**
@@ -119,4 +119,4 @@ var ChipGroup = Object.assign(InternalChipGroup, {
119
119
  });
120
120
 
121
121
  export { ChipGroup as C };
122
- //# sourceMappingURL=ChipGroup.js.map
122
+ //# sourceMappingURL=chipgroup.10.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chipgroup.10.js","sources":["../../../src/hooks/useChipGroupNavigation.tsx","../../../src/components/chip/ChipGroup.tsx"],"sourcesContent":["import { useState } from 'react';\n\ninterface UseChipGroupNavigation {\n /** the current active chip index */\n activeChip: number;\n\n /** callback to be executed when the backspace was pressed */\n onBackspacePressed(): void;\n\n /** function that allows to reset the navigation */\n resetChipNavigation(): void;\n}\n\nexport type useChipGroupNavigationType<C = any> = (\n chips: C[],\n onChipDeleted: (chip: C) => void,\n initialActiveChip?: number,\n) => UseChipGroupNavigation;\n\nconst INITIAL_STATE_ACTIVE_CHIP = -1;\n\n/**\n * Hook that provides the necessary information to manage chips navigation.\n * @param chips List of chips selected.\n * @param onChipDeleted Callback executed when a chip must be eliminated.\n * @param initialActiveChip Initial active chip index.\n *\n * @return chip navigation tools.\n */\nexport const useChipGroupNavigation: useChipGroupNavigationType = (\n chips,\n onChipDeleted,\n initialActiveChip = INITIAL_STATE_ACTIVE_CHIP,\n) => {\n const [wasBackspacePressed, setWasBackspacePressed] = useState(false);\n const [activeChip, setActiveChip] = useState(initialActiveChip);\n\n /**\n * Resets the active index and backspace control to their initial state\n */\n const resetChipNavigation = () => {\n setWasBackspacePressed(false);\n setActiveChip(initialActiveChip);\n };\n\n /**\n * Callback to be executed when the backspace was pressed. If there are no chips\n * selected, it will return immediately. If there are it will check if the\n * backspace was already pressed. if it was, it means that the user wants to eliminate\n * the chip, so we execute the `onChipDeleted` function and reset internal state.\n *\n * If it was not pressed before, we set the `wasBackspacePressed` flag to true and\n * highlight the last chip.\n */\n const onBackspacePressed = () => {\n if (chips.length === 0) {\n return;\n }\n\n if (wasBackspacePressed) {\n const chipDeleted: any = chips[chips.length - 1];\n onChipDeleted(chipDeleted);\n resetChipNavigation();\n } else {\n setActiveChip(chips.length - 1);\n setWasBackspacePressed(true);\n }\n };\n\n return {\n activeChip,\n onBackspacePressed,\n resetChipNavigation,\n };\n};\n","import { Alignment, HorizontalAlignment } from '@lumx/react/components';\nimport React, { forwardRef, ReactNode } from 'react';\n\nimport classNames from 'classnames';\n\nimport { Comp, GenericProps, getRootClassName, handleBasicClasses } from '@lumx/react/utils';\n\nimport { useChipGroupNavigation } from '@lumx/react/hooks/useChipGroupNavigation';\n\n/**\n * Defines the props of the component.\n */\nexport interface ChipGroupProps extends GenericProps {\n /** Chip horizontal alignment. */\n align?: HorizontalAlignment;\n /** List of Chip. */\n children: ReactNode;\n}\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<ChipGroupProps> = {\n align: Alignment.left,\n};\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'ChipGroup';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\n\n/**\n * ChipGroup component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nconst InternalChipGroup: Comp<ChipGroupProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { align, children, className, ...forwardedProps } = props;\n const chipGroupClassName = handleBasicClasses({\n align,\n prefix: CLASSNAME,\n });\n\n return (\n <div ref={ref} {...forwardedProps} className={classNames(className, chipGroupClassName)}>\n {children}\n </div>\n );\n});\nInternalChipGroup.displayName = COMPONENT_NAME;\nInternalChipGroup.className = CLASSNAME;\nInternalChipGroup.defaultProps = DEFAULT_PROPS;\n\nexport const ChipGroup = Object.assign(InternalChipGroup, { useChipGroupNavigation });\n"],"names":["INITIAL_STATE_ACTIVE_CHIP","useChipGroupNavigation","chips","onChipDeleted","initialActiveChip","useState","wasBackspacePressed","setWasBackspacePressed","activeChip","setActiveChip","resetChipNavigation","onBackspacePressed","length","chipDeleted","DEFAULT_PROPS","align","Alignment","left","COMPONENT_NAME","CLASSNAME","getRootClassName","InternalChipGroup","forwardRef","props","ref","children","className","forwardedProps","chipGroupClassName","handleBasicClasses","prefix","classNames","displayName","defaultProps","ChipGroup","Object","assign"],"mappings":";;;;;AAmBA,IAAMA,yBAAyB,GAAG,CAAC,CAAnC;AAEA;;;;;;;;;AAQO,IAAMC,sBAAkD,GAAG,SAArDA,sBAAqD,CAC9DC,KAD8D,EAE9DC,aAF8D,EAI7D;AAAA,MADDC,iBACC,uEADmBJ,yBACnB;;AAAA,kBACqDK,QAAQ,CAAC,KAAD,CAD7D;AAAA;AAAA,MACMC,mBADN;AAAA,MAC2BC,sBAD3B;;AAAA,mBAEmCF,QAAQ,CAACD,iBAAD,CAF3C;AAAA;AAAA,MAEMI,UAFN;AAAA,MAEkBC,aAFlB;AAID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kB,GAAGC,kBAAkB,CAAC;AAC1Cd,IAAAA,KAAK,EAALA,KAD0C;AAE1Ce,IAAAA,MAAM,EAAEX;AAFkC,GAAD,CAA7C;AAKA,SACI;AAAK,IAAA,GAAG,EAAEK;AAAV,KAAmBG,cAAnB;AAAmC,IAAA,SAAS,EAAEI,UAAU,CAACL,SAAD,EAAYE,kBAAZ;AAAxD,MACKH,QADL,CADJ;AAKH,CAZyE,CAA1E;AAaAJ,iBAAiB,CAACW,WAAlB,GAAgCd,cAAhC;AACAG,iBAAiB,CAACK,SAAlB,GAA8BP,SAA9B;AACAE,iBAAiB,CAACY,YAAlB,GAAiCnB,aAAjC;IAEaoB,SAAS,GAAGC,MAAM,CAACC,MAAP,CAAcf,iBAAd,EAAiC;AAAEpB,EAAAA,sBAAsB,EAAtBA;AAAF,CAAjC;;;;"}
@@ -1,8 +1,8 @@
1
- import { e as _toConsumableArray } from './_rollupPluginBabelHelpers.js';
1
+ import { e as _toConsumableArray } from './_rolluppluginbabelhelpers.53.js';
2
2
  import React, { useEffect, createContext, useContext } from 'react';
3
- import { f as onEscapePressed } from './getRootClassName.js';
3
+ import { f as onEscapePressed } from './getrootclassname.54.js';
4
4
  import isEmpty from 'lodash/isEmpty';
5
- import { D as DOCUMENT } from './constants.js';
5
+ import { D as DOCUMENT } from './constants.59.js';
6
6
  import pull from 'lodash/pull';
7
7
 
8
8
  /**
@@ -113,4 +113,4 @@ var ClickAwayProvider = function ClickAwayProvider(_ref) {
113
113
  ClickAwayProvider.displayName = 'ClickAwayProvider';
114
114
 
115
115
  export { ClickAwayProvider as C, useCallbackOnEscape as u };
116
- //# sourceMappingURL=ClickAwayProvider.js.map
116
+ //# sourceMappingURL=clickawayprovider.60.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clickawayprovider.60.js","sources":["../../../src/hooks/useCallbackOnEscape.ts","../../../src/hooks/useClickAway.tsx","../../../src/utils/ClickAwayProvider/ClickAwayProvider.tsx"],"sourcesContent":["import { DOCUMENT } from '@lumx/react/constants';\nimport { Callback, onEscapePressed } from '@lumx/react/utils';\nimport { useEffect } from 'react';\n\n/**\n * Triggers a callback when the escape key is pressed.\n *\n * @param callback Callback\n * @param closeOnEscape Disables the hook when false\n * @param rootElement Element on which to listen the escape key\n */\nexport function useCallbackOnEscape(\n callback: Callback | undefined,\n closeOnEscape = true,\n rootElement = DOCUMENT?.body,\n) {\n useEffect(() => {\n if (closeOnEscape && callback && rootElement) {\n const onKeyDown = onEscapePressed(callback);\n rootElement.addEventListener('keydown', onKeyDown);\n return () => rootElement.removeEventListener('keydown', onKeyDown);\n }\n return undefined;\n }, [callback, closeOnEscape, rootElement]);\n}\n","import { RefObject, useEffect } from 'react';\n\nimport { Falsy } from '@lumx/react/utils';\n\nimport isEmpty from 'lodash/isEmpty';\n\nconst EVENT_TYPES = ['mousedown', 'touchstart'];\n\nfunction isClickAway(target: HTMLElement, refs: Array<RefObject<HTMLElement>>): boolean {\n // The target element is not contained in any of the listed element references.\n return !refs.some((e) => e?.current?.contains(target));\n}\n\nexport interface ClickAwayParameters {\n /**\n * A callback function to call when the user clicks away from the elements.\n */\n callback: EventListener | Falsy;\n /**\n * Elements from which we want to detect the click away.\n */\n refs: RefObject<Array<RefObject<HTMLElement>>>;\n}\n\n/**\n * Listen to clicks away from the given elements and callback the passed in function.\n *\n * Warning: If you need to detect click away on nested React portals, please use the `ClickAwayProvider` component.\n */\nexport function useClickAway({ callback, refs }: ClickAwayParameters): void {\n useEffect(() => {\n const { current: currentRefs } = refs;\n if (!callback || !currentRefs || isEmpty(currentRefs)) {\n return undefined;\n }\n const listener: EventListener = (evt) => {\n if (isClickAway(evt.target as HTMLElement, currentRefs)) {\n callback(evt);\n }\n };\n\n EVENT_TYPES.forEach((evtType) => document.addEventListener(evtType, listener));\n return () => {\n EVENT_TYPES.forEach((evtType) => document.removeEventListener(evtType, listener));\n };\n }, [callback, refs]);\n}\n","import React, { createContext, useContext, useEffect } from 'react';\nimport pull from 'lodash/pull';\nimport { ClickAwayParameters, useClickAway } from '@lumx/react/hooks/useClickAway';\n\nconst ClickAwayAncestorContext = createContext<ClickAwayParameters['refs'] | null>(null);\n\n/**\n * Component combining the `useClickAway` hook with a React context to hook into the React component tree and make sure\n * we take into account both the DOM tree and the React tree we trying to detect click away.\n *\n * @return the react component.\n */\nexport const ClickAwayProvider: React.FC<ClickAwayParameters> = ({ children, callback, refs }) => {\n const ancestorChildrenRefs = useContext(ClickAwayAncestorContext);\n\n useEffect(() => {\n const { current: currentRefs } = refs;\n const { current: currentAncestorChildrenRefs } = ancestorChildrenRefs || {};\n if (!currentAncestorChildrenRefs || !currentRefs) {\n return undefined;\n }\n // Push current refs to parent.\n currentAncestorChildrenRefs.push(...currentRefs);\n return () => {\n // Pull current refs from parent.\n pull(currentAncestorChildrenRefs, ...currentRefs);\n };\n }, [ancestorChildrenRefs, refs]);\n\n useClickAway({ callback, refs });\n return <ClickAwayAncestorContext.Provider value={refs}>{children}</ClickAwayAncestorContext.Provider>;\n};\nClickAwayProvider.displayName = 'ClickAwayProvider';\n"],"names":["useCallbackOnEscape","callback","closeOnEscape","rootElement","DOCUMENT","body","useEffect","onKeyDown","onEscapePressed","addEventListener","removeEventListener","undefined","EVENT_TYPES","isClickAway","target","refs","some","e","current","contains","useClickAway","currentRefs","isEmpty","listener","evt","forEach","evtType","document","ClickAwayAncestorContext","createContext","ClickAwayProvider","children","ancestorChildrenRefs","useContext","currentAncestorChildrenRefs","push","pull","displayName"],"mappings":";;;;;;;AAIA;;;;;;;;AAOO,SAASA,mBAAT,CACHC,QADG,EAIL;AAAA,MAFEC,aAEF,uEAFkB,IAElB;AAAA,MADEC,WACF,uEADgBC,QAChB,aADgBA,QAChB,uBADgBA,QAAQ,CAAEC,IAC1B;AACEC,EAAAA,SAAS,CAAC,YAAM;AACZ,QAAIJ,aAAa,IAAID,QAAjB,IAA6BE,WAAjC,EAA8C;AAC1C,UAAMI,SAAS,GAAGC,eAAe,CAACP,QAAD,CAAjC;AACAE,M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+ import './_rolluppluginbabelhelpers.53.js';
2
2
  import './components.js';
3
3
  import 'react';
4
- import './getRootClassName.js';
5
- import './Icon2.js';
6
- import '../index2.js';
4
+ import './getrootclassname.54.js';
5
+ import './icon.21.js';
6
+ import './index.55.js';
7
7
  import 'lodash/isBoolean';
8
8
  import 'lodash/isEmpty';
9
9
  import 'lodash/kebabCase';
10
10
  import 'lodash/noop';
11
- import './constants.js';
11
+ import './constants.59.js';
12
12
  import 'lodash/get';
13
- import './Popover2.js';
14
- import './mergeRefs.js';
15
- import './Avatar2.js';
13
+ import './popover.33.js';
14
+ import './mergerefs.56.js';
15
+ import './avatar.3.js';
16
16
  import 'lodash/isFunction';
17
- export { a as CommentBlock, C as CommentBlockVariant } from './CommentBlock.js';
17
+ export { a as CommentBlock, C as CommentBlockVariant } from './commentblock.11.js';
18
18
  import 'react-dom';
19
- import './ClickAwayProvider.js';
19
+ import './clickawayprovider.60.js';
20
20
  import 'lodash/pull';
21
- import './Thumbnail2.js';
22
- import './Tooltip2.js';
21
+ import '../../hooks/useFocusWithin.js';
22
+ import './thumbnail.47.js';
23
+ import './tooltip.50.js';
23
24
  //# sourceMappingURL=comment-block.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"comment-block.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"comment-block.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,10 +1,10 @@
1
- import { b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
1
+ import { b as _objectWithoutProperties, c as _extends } from './_rolluppluginbabelhelpers.53.js';
2
2
  import { Size, Theme } from './components.js';
3
3
  import React, { forwardRef, Children } from 'react';
4
- import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './getRootClassName.js';
5
- import { A as Avatar } from './Avatar2.js';
4
+ import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './getrootclassname.54.js';
5
+ import { A as Avatar } from './avatar.3.js';
6
6
  import isFunction from 'lodash/isFunction';
7
- import { T as Tooltip } from './Tooltip2.js';
7
+ import { T as Tooltip } from './tooltip.50.js';
8
8
 
9
9
  /**
10
10
  * Comment block variants.
@@ -121,4 +121,4 @@ CommentBlock.className = CLASSNAME;
121
121
  CommentBlock.defaultProps = DEFAULT_PROPS;
122
122
 
123
123
  export { CommentBlockVariant as C, CommentBlock as a };
124
- //# sourceMappingURL=CommentBlock.js.map
124
+ //# sourceMappingURL=commentblock.11.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commentblock.11.js","sources":["../../../src/components/comment-block/CommentBlock.tsx"],"sourcesContent":["import React, { Children, forwardRef, KeyboardEvent, KeyboardEventHandler, ReactNode } from 'react';\n\nimport classNames from 'classnames';\n\nimport { Avatar, Size, Theme, Tooltip } from '@lumx/react';\nimport { Comp, GenericProps, getRootClassName, handleBasicClasses, ValueOf } from '@lumx/react/utils';\n\nimport isFunction from 'lodash/isFunction';\nimport { AvatarProps } from '../avatar/Avatar';\n\n/**\n * Comment block variants.\n */\nexport const CommentBlockVariant = {\n indented: 'indented',\n linear: 'linear',\n} as const;\nexport type CommentBlockVariant = ValueOf<typeof CommentBlockVariant>;\n\n/**\n * Defines the props of the component.\n */\nexport interface CommentBlockProps extends GenericProps {\n /** Action toolbar content. */\n actions?: ReactNode;\n /** Props to pass to the avatar. */\n avatarProps: AvatarProps;\n /** Comment block replies. */\n children?: ReactNode;\n /** Comment date with the minimal timestamp informations (xx minutes, x hours, yesterday, 6 days, Month Day, Month Day Year)*/\n date: string;\n /** Comment date with the full timestamp informations (day, month, year, time) */\n fullDate?: string;\n /** Whether the component has actions to display or not. */\n hasActions?: boolean;\n /** Action toolbar header content. */\n headerActions?: ReactNode;\n /** Whether the component is open or not. */\n isOpen?: boolean;\n /** Whether the comment is relevant or not. */\n isRelevant?: boolean;\n /** Comment author name. */\n name: string;\n /** On click callback. */\n onClick?(): void;\n /** On mouse enter callback. */\n onMouseEnter?(): void;\n /** On mouse leave callback. */\n onMouseLeave?(): void;\n /** Comment content. */\n text: ReactNode | string;\n /** Theme adapting the component to light or dark background. */\n theme?: Theme;\n /** Comment variant. */\n variant?: CommentBlockVariant;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'CommentBlock';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<CommentBlockProps> = {\n theme: Theme.light,\n variant: CommentBlockVariant.indented,\n};\n\n/**\n * CommentBlock component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const CommentBlock: Comp<CommentBlockProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n actions,\n avatarProps,\n children,\n className,\n date,\n fullDate,\n hasActions,\n headerActions,\n isOpen,\n isRelevant,\n name,\n onClick,\n onMouseEnter,\n onMouseLeave,\n text,\n theme,\n variant,\n ...forwardedProps\n } = props;\n const enterKeyPress: KeyboardEventHandler<HTMLElement> = (evt: KeyboardEvent<HTMLElement>) => {\n if (evt.key === 'Enter' && isFunction(onClick)) {\n onClick();\n }\n };\n const hasChildren = Children.count(children) > 0;\n\n return (\n <div\n ref={ref}\n className={classNames(\n className,\n handleBasicClasses({\n hasChildren: hasChildren && isOpen,\n hasIndentedChildren: hasChildren && variant === CommentBlockVariant.indented,\n hasLinearChildren: hasChildren && variant === CommentBlockVariant.linear,\n isRelevant,\n prefix: CLASSNAME,\n theme,\n }),\n )}\n {...forwardedProps}\n >\n <div className={`${CLASSNAME}__wrapper`}>\n <div className={`${CLASSNAME}__avatar`}>\n <Avatar\n {...avatarProps}\n size={Size.m}\n tabIndex={onClick ? 0 : -1}\n onClick={onClick}\n onKeyPress={enterKeyPress}\n />\n </div>\n\n <div className={`${CLASSNAME}__container`}>\n <div className={`${CLASSNAME}__content`}>\n <div className={`${CLASSNAME}__meta`}>\n <span\n className={`${CLASSNAME}__name`}\n onClick={onClick}\n onKeyPress={enterKeyPress}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n role=\"button\"\n tabIndex={onClick ? 0 : -1}\n >\n {name}\n </span>\n {headerActions && <span className={`${CLASSNAME}__header-actions`}>{headerActions}</span>}\n </div>\n\n <div className={`${CLASSNAME}__text`}>{text}</div>\n {date &&\n (fullDate ? (\n <Tooltip label={fullDate} placement=\"top\">\n <span className={`${CLASSNAME}__date`}>{date}</span>\n </Tooltip>\n ) : (\n <span className={`${CLASSNAME}__date`}>{date}</span>\n ))}\n </div>\n {hasActions && <div className={`${CLASSNAME}__actions`}>{actions}</div>}\n </div>\n </div>\n\n {hasChildren && isOpen && <div className={`${CLASSNAME}__children`}>{children}</div>}\n </div>\n );\n});\nCommentBlock.displayName = COMPONENT_NAME;\nCommentBlock.className = CLASSNAME;\nCommentBlock.defaultProps = DEFAULT_PROPS;\n"],"names":["CommentBlockVariant","indented","linear","COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","theme","Theme","light","variant","CommentBlock","forwardRef","props","ref","actions","avatarProps","children","className","date","fullDate","hasActions","headerActions","isOpen","isRelevant","name","onClick","onMouseEnter","onMouseLeave","text","forwardedProps","enterKeyPress","evt","key","isFunction","hasChildren","Children","count","classNames","handleBasicClasses","hasIndentedChildren","hasLinearChildren","prefix","Size","m","displayName","defaultProps"],"mappings":";;;;;;;;AAUA;;;IAGaA,mBAAmB,GAAG;AAC/BC,EAAAA,QAAQ,EAAE,UADqB;AAE/BC,EAAAA,MAAM,EAAE;AAFuB;;AA4CnC;;;AAGA,IAAMC,cAAc,GAAG,cAAvB;AAEA;;;;AAGA,IAAMC,SAAS,GAAGC,gBAAgB,CAACF,cAAD,CAAlC;AAEA;;;;AAGA,IAAMG,aAAyC,GAAG;AAC9CC,EAAAA,KAAK,EAAEC,KAAK,CAACC,KADiC;AAE9CC,EAAAA,OAAO,EAAEV,mBAAmB,CAACC;AAFiB,CAAlD;AAKA;;;;;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AYKH,aAAa,IAAI;AAAM,IAAA,SAAS,YAAKlB,SAAL;AAAf,KAAkDkB,aAAlD,CAZtB,CADJ,EAgBI;AAAK,IAAA,SAAS,YAAKlB,SAAL;AAAd,KAAuCyB,IAAvC,CAhBJ,EAiBKV,IAAI,KACAC,QAAQ,GACL,oBAAC,OAAD;AAAS,IAAA,KAAK,EAAEA,QAAhB;AAA0B,IAAA,SAAS,EAAC;AAApC,KACI;AAAM,IAAA,SAAS,YAAKhB,SAAL;AAAf,KAAwCe,IAAxC,CADJ,CADK,GAKL;AAAM,IAAA,SAAS,YAAKf,SAAL;AAAf,KAAwCe,IAAxC,CANH,CAjBT,CADJ,EA2BKE,UAAU,IAAI;AAAK,IAAA,SAAS,YAAKjB,SAAL;AAAd,KAA0CW,OAA1C,CA3BnB,CAXJ,CAfJ,EAyDKoB,WAAW,IAAIZ,MAAf,IAAyB;AAAK,IAAA,SAAS,YAAKnB,SAAL;AAAd,KAA2Ca,QAA3C,CAzD9B,CADJ;AA6DH,CAzF8E;AA0F/EN,YAAY,CAACkC,WAAb,GAA2B1C,cAA3B;AACAQ,YAAY,CAACO,SAAb,GAAyBd,SAAzB;AACAO,YAAY,CAACmC,YAAb,GAA4BxC,aAA5B;;;;"}
@@ -1,4 +1,4 @@
1
- import { _ as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
1
+ import { _ as _objectSpread2 } from './_rolluppluginbabelhelpers.53.js';
2
2
 
3
3
  /**
4
4
  * Alignments.
@@ -10,4 +10,4 @@ var WINDOW = typeof window !== "undefined" ? window : undefined;
10
10
  var DOCUMENT = typeof document !== "undefined" ? document : undefined;
11
11
 
12
12
  export { DOCUMENT as D, WINDOW as W };
13
- //# sourceMappingURL=constants.js.map
13
+ //# sourceMappingURL=constants.59.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.59.js","sources":["../../../src/constants.ts"],"sourcesContent":["export {\n CSS_PREFIX,\n DIALOG_TRANSITION_DURATION,\n NOTIFICATION_TRANSITION_DURATION,\n TOOLTIP_HOVER_DELAY,\n TOOLTIP_LONG_PRESS_DELAY,\n} from '@lumx/core/js/constants';\n\n/**\n * Optional global `window` instance (not defined when running SSR).\n */\nexport const WINDOW = typeof window !== `undefined` ? window : undefined;\n\n/**\n * Optional global `document` instance (not defined when running SSR).\n */\nexport const DOCUMENT = typeof document !== `undefined` ? document : undefined;\n"],"names":["WINDOW","window","undefined","DOCUMENT","document"],"mappings":"AAQA;;;;IAGaA,MAAM,GAAG,OAAOC,MAAP,mBAAgCA,MAAhC,GAAyCC;AAE/D;;;;IAGaC,QAAQ,GAAG,OAAOC,QAAP,mBAAkCA,QAAlC,GAA6CF;;;;"}
@@ -1,31 +1,32 @@
1
- import './_rollupPluginBabelHelpers.js';
1
+ import './_rolluppluginbabelhelpers.53.js';
2
2
  import './components.js';
3
3
  import 'react';
4
- import './getRootClassName.js';
5
- import './Icon2.js';
6
- import '../index2.js';
4
+ import './getrootclassname.54.js';
5
+ import './icon.21.js';
6
+ import './index.55.js';
7
7
  import 'lodash/isBoolean';
8
8
  import 'lodash/isEmpty';
9
9
  import 'lodash/kebabCase';
10
10
  import 'lodash/noop';
11
- import './constants.js';
11
+ import './constants.59.js';
12
12
  import 'lodash/get';
13
- import './Popover2.js';
14
- import './mergeRefs.js';
15
- import './renderLink.js';
16
- import './ButtonRoot.js';
17
- import './IconButton.js';
13
+ import './popover.33.js';
14
+ import './mergerefs.56.js';
15
+ import './renderlink.65.js';
16
+ import './buttonroot.57.js';
17
+ import './iconbutton.6.js';
18
18
  import 'moment';
19
- export { D as DatePicker, a as DatePickerControlled, b as DatePickerField } from './DatePickerField.js';
19
+ export { D as DatePicker, a as DatePickerControlled, b as DatePickerField } from './datepickerfield.12.js';
20
20
  import 'lodash/range';
21
21
  import 'moment-range';
22
- import './useFocusTrap.js';
22
+ import './usefocustrap.58.js';
23
23
  import 'react-dom';
24
- import './ClickAwayProvider.js';
24
+ import './clickawayprovider.60.js';
25
25
  import 'lodash/pull';
26
- import './InputHelper.js';
27
- import './InputLabel.js';
28
- import './TextField.js';
29
- import './Toolbar2.js';
30
- import './Tooltip2.js';
26
+ import '../../hooks/useFocusWithin.js';
27
+ import './inputhelper.23.js';
28
+ import './inputlabel.24.js';
29
+ import './textfield.46.js';
30
+ import './toolbar.49.js';
31
+ import './tooltip.50.js';
31
32
  //# sourceMappingURL=date-picker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"date-picker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,20 +1,20 @@
1
- import { c as _extends, a as _defineProperty, b as _objectWithoutProperties, d as _slicedToArray } from './_rollupPluginBabelHelpers.js';
1
+ import { c as _extends, a as _defineProperty, b as _objectWithoutProperties, d as _slicedToArray } from './_rolluppluginbabelhelpers.53.js';
2
2
  import { Emphasis } from './components.js';
3
3
  import React, { forwardRef, useState, useRef, useCallback } from 'react';
4
- import { g as getRootClassName, c as classnames } from './getRootClassName.js';
5
- import { f as mdiChevronRight, g as mdiChevronLeft } from './Icon2.js';
4
+ import { g as getRootClassName, c as classnames } from './getrootclassname.54.js';
5
+ import { f as mdiChevronRight, g as mdiChevronLeft } from './icon.21.js';
6
6
  import 'lodash/isBoolean';
7
7
  import 'lodash/isEmpty';
8
8
  import 'lodash/kebabCase';
9
9
  import 'lodash/noop';
10
- import { u as useFocus, a as Popover, P as Placement } from './Popover2.js';
11
- import { I as IconButton } from './IconButton.js';
10
+ import { u as useFocus, a as Popover, P as Placement } from './popover.33.js';
11
+ import { I as IconButton } from './iconbutton.6.js';
12
12
  import moment$1 from 'moment';
13
13
  import range from 'lodash/range';
14
14
  import { extendMoment } from 'moment-range';
15
- import { u as useFocusTrap } from './useFocusTrap.js';
16
- import { T as TextField } from './TextField.js';
17
- import { T as Toolbar } from './Toolbar2.js';
15
+ import { u as useFocusTrap } from './usefocustrap.58.js';
16
+ import { T as TextField } from './textfield.46.js';
17
+ import { T as Toolbar } from './toolbar.49.js';
18
18
 
19
19
  /**
20
20
  * Component display name.
@@ -337,4 +337,4 @@ var DatePickerField = forwardRef(function (props, ref) {
337
337
  DatePickerField.displayName = COMPONENT_NAME$2;
338
338
 
339
339
  export { DatePicker as D, DatePickerControlled as a, DatePickerField as b };
340
- //# sourceMappingURL=DatePickerField.js.map
340
+ //# sourceMappingURL=datepickerfield.12.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datepickerfield.12.js","sources":["../../../src/components/date-picker/constants.ts","../../../../lumx-core/src/js/date-picker.ts","../../../src/components/date-picker/DatePickerControlled.tsx","../../../src/components/date-picker/DatePicker.tsx","../../../src/components/date-picker/DatePickerField.tsx"],"sourcesContent":["import { getRootClassName } from '@lumx/react/utils';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'DatePicker';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME = getRootClassName(COMPONENT_NAME);\n","import range from 'lodash/range';\nimport mMoment, { Moment } from 'moment';\nimport { extendMoment } from 'moment-range';\n\nconst moment = extendMoment(mMoment as any);\n\nconst DAYS_PER_WEEK = 7;\n\ninterface AnnotatedDate {\n date: Moment;\n isDisplayed: boolean;\n isClickable: boolean;\n isToday: boolean;\n}\n\n/**\n * Get the list of days in a week based on locale.\n *\n * @param locale The locale using to generate the order of days in a week.\n * @return The list of days in a week based on locale.\n */\nexport function getWeekDays(locale: string): Moment[] {\n return range(DAYS_PER_WEEK).map((_, i) => moment().locale(locale).weekday(i));\n}\n\n/**\n * Get month calendar based on locale and start date.\n *\n * @param locale The locale using to generate the order of days in a week.\n * @param selectedMonth The selected month.\n * @return The list of days in a week based on locale.\n */\nexport function getMonthCalendar(locale: string, selectedMonth?: Moment): Moment[] {\n const firstDayOfMonth = moment(selectedMonth).startOf('month');\n const endDayOfMonth = moment(selectedMonth).endOf('month');\n // The first day of the week depends on the locale used. In FR the first day is a monday but in EN the first day is sunday\n const firstDay = firstDayOfMonth.locale(locale).startOf('week');\n const monthRange = moment.range(firstDay.toDate(), endDayOfMonth.toDate());\n\n return Array.from(monthRange.by('day'));\n}\n\n/**\n * Get month calendar based on locale and start date.\n * Each day is annotated to know if they are displayed and/or clickable.\n *\n * @param locale The locale using to generate the order of days in a week.\n * @param minDate The first selectable date.\n * @param maxDate The last selectable date.\n * @param selectedMonth The selected month.\n * @return The list of days in a week based on locale.\n */\nexport function getAnnotatedMonthCalendar(\n locale: string,\n minDate?: Date,\n maxDate?: Date,\n selectedMonth?: Moment,\n): AnnotatedDate[] {\n const month = moment(selectedMonth).locale(locale).month();\n\n const clickableRange = moment.range(minDate as Date, maxDate as Date);\n\n return getMonthCalendar(locale, selectedMonth).map((date) => {\n return {\n date,\n isClickable: clickableRange.contains(date),\n isDisplayed: date.month() === month,\n isToday: date.isSame(moment(), 'day'),\n };\n });\n}\n","import React, { forwardRef } from 'react';\nimport moment from 'moment';\nimport classNames from 'classnames';\nimport { DatePickerProps, Emphasis, IconButton, Toolbar } from '@lumx/react';\nimport { mdiChevronLeft, mdiChevronRight } from '@lumx/icons';\nimport { getAnnotatedMonthCalendar, getWeekDays } from '@lumx/core/js/date-picker';\nimport { Comp } from '@lumx/react/utils';\nimport { CLASSNAME } from './constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface DatePickerControlledProps extends DatePickerProps {\n /** Selected month to display. */\n selectedMonth: Date;\n /** On previous month change callback. */\n onPrevMonthChange(): void;\n /** On next month change callback. */\n onNextMonthChange(): void;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'DatePickerControlled';\n\n/**\n * DatePickerControlled component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const DatePickerControlled: Comp<DatePickerControlledProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n locale,\n maxDate,\n minDate,\n nextButtonProps,\n onChange,\n onNextMonthChange,\n onPrevMonthChange,\n previousButtonProps,\n selectedMonth,\n todayOrSelectedDateRef,\n value,\n } = props;\n const days = React.useMemo(() => {\n return getAnnotatedMonthCalendar(locale, minDate, maxDate, moment(selectedMonth));\n }, [locale, minDate, maxDate, selectedMonth]);\n\n const weekDays = React.useMemo(() => {\n return getWeekDays(locale);\n }, [locale]);\n\n return (\n <div ref={ref} className={`${CLASSNAME}`}>\n <Toolbar\n className={`${CLASSNAME}__toolbar`}\n after={\n <IconButton\n {...nextButtonProps}\n emphasis={Emphasis.low}\n icon={mdiChevronRight}\n onClick={onNextMonthChange}\n />\n }\n before={\n <IconButton\n {...previousButtonProps}\n emphasis={Emphasis.low}\n icon={mdiChevronLeft}\n onClick={onPrevMonthChange}\n />\n }\n label={\n <span className={`${CLASSNAME}__month`}>\n {moment(selectedMonth).locale(locale).format('MMMM YYYY')}\n </span>\n }\n />\n <div className={`${CLASSNAME}__calendar`}>\n <div className={`${CLASSNAME}__week-days ${CLASSNAME}__days-wrapper`}>\n {weekDays.map((weekDay) => (\n <div key={weekDay.unix()} className={`${CLASSNAME}__day-wrapper`}>\n <span className={`${CLASSNAME}__week-day`}>\n {weekDay.format('dddd').slice(0, 1).toLocaleUpperCase()}\n </span>\n </div>\n ))}\n </div>\n\n <div className={`${CLASSNAME}__month-days ${CLASSNAME}__days-wrapper`}>\n {days.map((annotatedDate) => {\n if (annotatedDate.isDisplayed) {\n return (\n <div key={annotatedDate.date.unix()} className={`${CLASSNAME}__day-wrapper`}>\n <button\n ref={\n (value && annotatedDate.date.isSame(value, 'day')) ||\n (!value && annotatedDate.isToday)\n ? todayOrSelectedDateRef\n : null\n }\n className={classNames(`${CLASSNAME}__month-day`, {\n [`${CLASSNAME}__month-day--is-selected`]:\n value && annotatedDate.date.isSame(value, 'day'),\n [`${CLASSNAME}__month-day--is-today`]:\n annotatedDate.isClickable && annotatedDate.isToday,\n })}\n disabled={!annotatedDate.isClickable}\n type=\"button\"\n onClick={() => onChange(moment(annotatedDate.date).toDate())}\n >\n <span>{annotatedDate.date.format('DD')}</span>\n </button>\n </div>\n );\n }\n return <div key={annotatedDate.date.unix()} className={`${CLASSNAME}__day-wrapper`} />;\n })}\n </div>\n </div>\n </div>\n );\n});\nDatePickerControlled.displayName = COMPONENT_NAME;\nDatePickerControlled.className = CLASSNAME;\n","import moment from 'moment';\nimport React, { forwardRef, useState } from 'react';\nimport { Comp } from '@lumx/react/utils';\nimport { CLASSNAME, COMPONENT_NAME } from './constants';\nimport { DatePickerControlled } from './DatePickerControlled';\nimport { DatePickerProps } from './types';\n\n/**\n * DatePicker component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const DatePicker: Comp<DatePickerProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { defaultMonth, locale, value, onChange, ...forwardedProps } = props;\n let castedValue;\n if (value) {\n castedValue = moment(value);\n } else if (defaultMonth) {\n castedValue = moment(defaultMonth);\n }\n if (castedValue && !castedValue.isValid()) {\n // eslint-disable-next-line no-console\n console.warn(`[@lumx/react/DatePicker] Invalid date provided ${castedValue}`);\n }\n const selectedDay = castedValue && castedValue.isValid() ? castedValue : moment();\n\n const [monthOffset, setMonthOffset] = useState(0);\n\n const setPrevMonth = () => setMonthOffset(monthOffset - 1);\n const setNextMonth = () => setMonthOffset(monthOffset + 1);\n\n const onDatePickerChange = (newDate?: Date) => {\n onChange(newDate);\n setMonthOffset(0);\n };\n\n const selectedMonth = moment(selectedDay).locale(locale).add(monthOffset, 'months').toDate();\n\n return (\n <DatePickerControlled\n ref={ref}\n {...forwardedProps}\n defaultMonth={defaultMonth}\n locale={locale}\n value={value}\n onPrevMonthChange={setPrevMonth}\n onNextMonthChange={setNextMonth}\n selectedMonth={selectedMonth}\n onChange={onDatePickerChange}\n />\n );\n});\nDatePicker.displayName = COMPONENT_NAME;\nDatePicker.className = CLASSNAME;\n","import { DatePicker, Placement, Popover, TextField, IconButtonProps } from '@lumx/react';\nimport { useFocusTrap } from '@lumx/react/hooks/useFocusTrap';\n\nimport moment from 'moment';\n\nimport React, { forwardRef, SyntheticEvent, useCallback, useRef, useState } from 'react';\n\nimport { useFocus } from '@lumx/react/hooks/useFocus';\nimport { Comp, GenericProps } from '@lumx/react/utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface DatePickerFieldProps extends GenericProps {\n /** Default month. */\n defaultMonth?: Date;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Locale (language or region) to use. */\n locale: string;\n /** Date after which dates can't be selected. */\n maxDate?: Date;\n /** Date before which dates can't be selected. */\n minDate?: Date;\n /** Native input name property. */\n name?: string;\n /** Props to pass to the next month button (minus those already set by the DatePickerControlled props). */\n nextButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;\n /** Props to pass to the previous month button (minus those already set by the DatePickerControlled props). */\n previousButtonProps: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;\n /** Currently selected date. */\n value: Date | undefined;\n /** On change callback. */\n onChange(value: Date | undefined, name?: string, event?: SyntheticEvent): void;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'DatePickerField';\n\n/**\n * DatePickerField component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const DatePickerField: Comp<DatePickerFieldProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n defaultMonth,\n disabled,\n isDisabled = disabled,\n locale,\n maxDate,\n minDate,\n name,\n nextButtonProps,\n onChange,\n previousButtonProps,\n value,\n ...forwardedProps\n } = props;\n const wrapperRef = useRef(null);\n const anchorRef = useRef(null);\n\n const [isOpen, setIsOpen] = useState(false);\n\n const toggleSimpleMenu = () => {\n setIsOpen(!isOpen);\n };\n\n const onClose = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n useFocus(anchorRef.current, isOpen);\n const handleKeyboardNav = (evt: React.KeyboardEvent) => {\n if ((evt.key === 'Enter' || evt.key === ' ') && toggleSimpleMenu) {\n toggleSimpleMenu();\n }\n };\n\n // Handle focus trap.\n const todayOrSelectedDateRef = useRef<HTMLButtonElement>(null);\n useFocusTrap(todayOrSelectedDateRef.current && wrapperRef.current, todayOrSelectedDateRef.current);\n\n const onTextFieldChange = (textFieldValue: string, textFieldName?: string, event?: SyntheticEvent) => {\n if (!textFieldValue) {\n onChange(undefined, textFieldName, event);\n }\n };\n\n const onDatePickerChange = (newDate?: Date) => {\n onChange(newDate, name);\n onClose();\n };\n\n return (\n <>\n <TextField\n ref={ref}\n {...forwardedProps}\n name={name}\n forceFocusStyle={isOpen}\n textFieldRef={anchorRef}\n value={value ? moment(value).locale(locale).format('LL') : ''}\n onClick={toggleSimpleMenu}\n onChange={onTextFieldChange}\n onKeyPress={handleKeyboardNav}\n isDisabled={isDisabled}\n readOnly\n />\n {isOpen ? (\n <Popover\n anchorRef={anchorRef}\n placement={Placement.BOTTOM_START}\n isOpen={isOpen}\n onClose={onClose}\n closeOnClickAway\n closeOnEscape\n >\n <div ref={wrapperRef}>\n <DatePicker\n locale={locale}\n maxDate={maxDate}\n minDate={minDate}\n value={value}\n onChange={onDatePickerChange}\n todayOrSelectedDateRef={todayOrSelectedDateRef}\n defaultMonth={defaultMonth}\n nextButtonProps={nextButtonProps}\n previousButtonProps={previousButtonProps}\n />\n </div>\n </Popover>\n ) : null}\n </>\n );\n});\nDatePickerField.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","getRootClassName","moment","extendMoment","mMoment","DAYS_PER_WEEK","getWeekDays","locale","range","map","_","i","weekday","getMonthCalendar","selectedMonth","firstDayOfMonth","startOf","endDayOfMonth","endOf","firstDay","monthRange","toDate","Array","from","by","getAnnotatedMonthCalendar","minDate","maxDate","month","clickableRange","date","isClickable","contains","isDisplayed","isToday","isSame","DatePickerControlled","forwardRef","props","ref","nextButtonProps","onChange","onNextMonthChange","onPrevMonthChange","previousButtonProps","todayOrSelectedDateRef","value","days","React","useMemo","weekDays","Emphasis","low","mdiChevronRight","mdiChevronLeft","format","weekDay","unix","slice","toLocaleUpperCase","annotatedDate","classNames","displayName","className","DatePicker","defaultMonth","forwardedProps","castedValue","isValid","console","warn","selectedDay","useState","monthOffset","setMonthOffset","setPrevMonth","setNextMonth","onDatePickerChange","newDate","add","DatePickerField","disabled","isDisabled","name","wrapperRef","useRef","anchorRef","isOpen","setIsOpen","toggleSimpleMenu","onClose","useCallback","useFocus","current","handleKeyboardNav","evt","key","useFocusTrap","onTextFieldChange","textFieldValue","textFieldName","event","undefined","Placement","BOTTOM_START"],"mappings":";;;;;;;;;;;;;;;;;;AAEA;;;;AAGO,IAAMA,cAAc,GAAG,YAAvB;AAEP;;;;AAGO,IAAMC,SAAS,GAAGC,gBAAgB,CAACF,cAAD,CAAlC;;ACNP,IAAMG,MAAM,GAAGC,YAAY,CAACC,QAAD,CAA3B;AAEA,IAAMC,aAAa,GAAG,CAAtB;;AASA;;;;;;AAMO,SAASC,WAAT,CAAqBC,MAArB,EAA+C;AAClD,SAAOC,KAAK,CAACH,aAAD,CAAL,CAAqBI,GAArB,CAAyB,UAACC,CAAD,EAAIC,CAAJ;AAAA,WAAUT,MAAM,GAAGK,MAAT,CAAgBA,MAAhB,EAAwBK,OAAxB,CAAgCD,CAAhC,CAAV;AAAA,GAAzB,CAAP;AACH;AAED;;;;;;;;AAOO,SAASE,gBAAT,CAA0BN,MAA1B,EAA0CO,aAA1C,EAA4E;AAC/E,MAAMC,eAAe,GAAGb,MAAM,CAACY,aAAD,CAAN,CAAsBE,OAAtB,CAA8B,OAA9B,CAAxB;AACA,MAAMC,aAAa,GAAGf,MAAM,CAACY,aAAD,CAAN,CAAsBI,KAAtB,CAA4B,OAA5B,CAAtB,CAF+E;;AAI/E,MAAMC,QAAQ,GAAGJ,eAAe,CAACR,MAAhB,CAAuBA,MAAvB,EAA+BS,OAA/B,CAAuC,MAAvC,CAAjB;AACA,MAAMI,UAAU,GAAGlB,MAAM,CAACM,KAAP,CAAaW,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AAA,QAAQ;AAXZ,KADJ,EAcKK,MAAM,GACH,oBAAC,OAAD;AACI,IAAA,SAAS,EAAED,SADf;AAEI,IAAA,SAAS,EAAEiB,SAAS,CAACC,YAFzB;AAGI,IAAA,MAAM,EAAEjB,MAHZ;AAII,IAAA,OAAO,EAAEG,OAJb;AAKI,IAAA,gBAAgB,MALpB;AAMI,IAAA,aAAa;AANjB,KAQI;AAAK,IAAA,GAAG,EAAEN;AAAV,KACI,oBAAC,UAAD;AACI,IAAA,MAAM,EAAE7E,MADZ;AAEI,IAAA,OAAO,EAAEoB,OAFb;AAGI,IAAA,OAAO,EAAED,OAHb;AAII,IAAA,KAAK,EAAEoB,KAJX;AAKI,IAAA,QAAQ,EAAE+B,kBALd;AAMI,IAAA,sBAAsB,EAAEhC,sBAN5B;AAOI,IAAA,YAAY,EAAEoB,YAPlB;AAQI,IAAA,eAAe,EAAEzB,eARrB;AASI,IAAA,mBAAmB,EAAEI;AATzB,IADJ,CARJ,CADG,GAuBH,IArCR,CADJ;AAyCH,CA3FoF;AA4FrFoC,eAAe,CAAClB,WAAhB,GAA8B/D,gBAA9B;;;;"}
@@ -1,17 +1,17 @@
1
- import { d as _slicedToArray, e as _toConsumableArray, b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
1
+ import { d as _slicedToArray, e as _toConsumableArray, b as _objectWithoutProperties, c as _extends } from './_rolluppluginbabelhelpers.53.js';
2
2
  import { Size } from './components.js';
3
3
  import React, { useState, useEffect, forwardRef, useRef, useMemo, Children } from 'react';
4
- import { g as getRootClassName, c as classnames, h as handleBasicClasses, D as DIALOG_TRANSITION_DURATION } from './getRootClassName.js';
5
- import { D as DOCUMENT } from './constants.js';
6
- import { p as partitionMulti } from './partitionMulti.js';
7
- import { i as isComponent } from './type.js';
8
- import { m as mergeRefs } from './mergeRefs.js';
9
- import { u as useFocusTrap } from './useFocusTrap.js';
4
+ import { g as getRootClassName, c as classnames, h as handleBasicClasses, D as DIALOG_TRANSITION_DURATION } from './getrootclassname.54.js';
5
+ import { D as DOCUMENT } from './constants.59.js';
6
+ import { p as partitionMulti } from './partitionmulti.62.js';
7
+ import { i as isComponent } from './type.64.js';
8
+ import { m as mergeRefs } from './mergerefs.56.js';
9
+ import { u as useFocusTrap } from './usefocustrap.58.js';
10
10
  import { createPortal } from 'react-dom';
11
- import { u as useCallbackOnEscape, C as ClickAwayProvider } from './ClickAwayProvider.js';
12
- import { u as useDelayedVisibility } from './useDelayedVisibility.js';
13
- import { u as useDisableBodyScroll } from './useDisableBodyScroll.js';
14
- import { a as Progress, P as ProgressVariant } from './Progress2.js';
11
+ import { u as useCallbackOnEscape, C as ClickAwayProvider } from './clickawayprovider.60.js';
12
+ import { u as useDelayedVisibility } from './usedelayedvisibility.63.js';
13
+ import { u as useDisableBodyScroll } from './usedisablebodyscroll.61.js';
14
+ import { a as Progress, P as ProgressVariant } from './progress.35.js';
15
15
 
16
16
  /**
17
17
  * Convenient hook to create interaction observers.
@@ -268,4 +268,4 @@ Dialog.className = CLASSNAME;
268
268
  Dialog.defaultProps = DEFAULT_PROPS;
269
269
 
270
270
  export { Dialog as D };
271
- //# sourceMappingURL=Dialog2.js.map
271
+ //# sourceMappingURL=dialog.13.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.13.js","sources":["../../../src/hooks/useIntersectionObserver.tsx","../../../src/components/dialog/Dialog.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nexport type Intersections<T> = Map<T, IntersectionObserverEntry>;\n\n/**\n * Convenient hook to create interaction observers.\n *\n * @param elements Elements to observe.\n * @param options IntersectionObserver options.\n * @return Map of intersections.\n */\nexport function useIntersectionObserver<T extends Element>(\n elements: Array<T | null | undefined>,\n options?: IntersectionObserverInit,\n): Intersections<T> {\n const [intersections, setIntersections] = useState<Intersections<T>>(() => new Map());\n\n useEffect(\n () => {\n if (elements.length < 1 || !elements.some(Boolean)) {\n return undefined;\n }\n\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n intersections.set(entry.target as T, entry);\n }\n setIntersections(new Map(intersections));\n }, options);\n\n for (const element of elements) {\n if (element) {\n observer.observe(element);\n }\n }\n return () => observer.disconnect();\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [...elements],\n );\n\n return intersections;\n}\n","import React, { Children, forwardRef, ReactElement, ReactNode, RefObject, useMemo, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport classNames from 'classnames';\n\nimport { Progress, ProgressVariant, Size } from '@lumx/react';\n\nimport { DIALOG_TRANSITION_DURATION, DOCUMENT } from '@lumx/react/constants';\nimport { useCallbackOnEscape } from '@lumx/react/hooks/useCallbackOnEscape';\nimport { useFocusTrap } from '@lumx/react/hooks/useFocusTrap';\nimport { useIntersectionObserver } from '@lumx/react/hooks/useIntersectionObserver';\nimport {\n Comp,\n GenericProps,\n getRootClassName,\n handleBasicClasses,\n isComponent,\n partitionMulti,\n} from '@lumx/react/utils';\nimport { ClickAwayProvider } from '@lumx/react/utils/ClickAwayProvider';\nimport { mergeRefs } from '@lumx/react/utils/mergeRefs';\n\nimport { useDelayedVisibility } from '@lumx/react/hooks/useDelayedVisibility';\nimport { useDisableBodyScroll } from '@lumx/react/hooks/useDisableBodyScroll';\n\n/**\n * Defines the props of the component.\n */\nexport interface DialogProps extends GenericProps {\n /** Footer content. */\n footer?: ReactNode;\n /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */\n forceFooterDivider?: boolean;\n /** Header content. */\n header?: ReactNode;\n /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */\n forceHeaderDivider?: boolean;\n /** Whether the indefinite progress indicator over the dialog content is displayed or not. */\n isLoading?: boolean;\n /** Whether the component is open or not. */\n isOpen?: boolean;\n /** Reference to the parent element that triggered modal opening (will get back focus on close). */\n parentElement?: RefObject<HTMLElement>;\n /** Reference to the dialog content element. */\n contentRef?: RefObject<HTMLDivElement>;\n /** Reference to the of the element that should get the focus when the dialogs opens. By default, the first child will take focus. */\n focusElement?: RefObject<HTMLElement>;\n /** Whether to keep the dialog open on clickaway or escape press. */\n preventAutoClose?: boolean;\n /** Size variant. */\n size?: DialogSizes;\n /** Z-axis position. */\n zIndex?: number;\n /** Z-axis position. */\n dialogProps?: GenericProps;\n /** On close callback. */\n onClose?(): void;\n /** Callback called when the open animation starts and the close animation finishes. */\n onVisibilityChange?(isVisible: boolean): void;\n}\n\nexport type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;\n\nconst isHeader = isComponent('header');\nconst isFooter = isComponent('footer');\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Dialog';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<DialogProps> = {\n size: Size.big,\n};\n\n/**\n * Dialog component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Dialog: Comp<DialogProps, HTMLDivElement> = forwardRef((props, ref) => {\n if (!DOCUMENT) {\n // Can't render in SSR.\n return null;\n }\n\n const {\n children,\n className,\n header,\n focusElement,\n forceFooterDivider,\n forceHeaderDivider,\n footer,\n isLoading,\n isOpen,\n onClose,\n parentElement,\n contentRef,\n preventAutoClose,\n size,\n zIndex,\n dialogProps,\n onVisibilityChange,\n ...forwardedProps\n } = props;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const previousOpen = React.useRef(isOpen);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (isOpen !== previousOpen.current) {\n previousOpen.current = isOpen;\n\n // Focus the parent element on close.\n if (!isOpen && parentElement && parentElement.current) {\n parentElement.current.focus();\n }\n }\n }, [isOpen, parentElement]);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useCallbackOnEscape(onClose, isOpen && !preventAutoClose);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const wrapperRef = useRef<HTMLDivElement>(null);\n /**\n * Since the `contentRef` comes from the parent and is optional,\n * we need to create a stable contentRef that will always be available.\n */\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const localContentRef = useRef<HTMLDivElement>(null);\n // Handle focus trap.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useFocusTrap(wrapperRef.current, focusElement?.current);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useDisableBodyScroll(isOpen && localContentRef.current);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [sentinelTop, setSentinelTop] = useState<Element | null>(null);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [sentinelBottom, setSentinelBottom] = useState<Element | null>(null);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const intersections = useIntersectionObserver([sentinelTop, sentinelBottom], {\n threshold: [0, 1],\n });\n\n const hasTopIntersection = sentinelTop && !(intersections.get(sentinelTop)?.isIntersecting ?? true);\n const hasBottomIntersection = sentinelBottom && !(intersections.get(sentinelBottom)?.isIntersecting ?? true);\n\n // Separate header, footer and dialog content from children.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [[headerChild], [footerChild], content] = useMemo(\n () => partitionMulti(Children.toArray(children), [isHeader, isFooter]),\n [children],\n );\n const headerChildProps = (headerChild as ReactElement)?.props;\n const headerChildContent = headerChildProps?.children;\n const footerChildProps = (footerChild as ReactElement)?.props;\n const footerChildContent = footerChildProps?.children;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const isVisible = useDelayedVisibility(Boolean(isOpen), DIALOG_TRANSITION_DURATION, onVisibilityChange);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const clickAwayRefs = useRef([wrapperRef]);\n\n return isOpen || isVisible\n ? createPortal(\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames(\n className,\n handleBasicClasses({\n isHidden: !isOpen,\n isLoading,\n isShown: isOpen || isVisible,\n prefix: CLASSNAME,\n size,\n }),\n )}\n style={{ zIndex }}\n >\n <div className={`${CLASSNAME}__overlay`} />\n\n <section className={`${CLASSNAME}__container`} role=\"dialog\" aria-modal=\"true\" {...dialogProps}>\n <ClickAwayProvider callback={!preventAutoClose && onClose} refs={clickAwayRefs}>\n <div className={`${CLASSNAME}__wrapper`} ref={wrapperRef}>\n {(header || headerChildContent) && (\n <header\n {...headerChildProps}\n className={classNames(\n `${CLASSNAME}__header`,\n (forceHeaderDivider || hasTopIntersection) &&\n `${CLASSNAME}__header--has-divider`,\n headerChildProps?.className,\n )}\n >\n {header}\n {headerChildContent}\n </header>\n )}\n\n <div ref={mergeRefs(contentRef, localContentRef)} className={`${CLASSNAME}__content`}>\n <div\n className={`${CLASSNAME}__sentinel ${CLASSNAME}__sentinel--top`}\n ref={setSentinelTop}\n />\n\n {content}\n\n <div\n className={`${CLASSNAME}__sentinel ${CLASSNAME}__sentinel--bottom`}\n ref={setSentinelBottom}\n />\n </div>\n\n {(footer || footerChildContent) && (\n <footer\n {...footerChildProps}\n className={classNames(\n `${CLASSNAME}__footer`,\n (forceFooterDivider || hasBottomIntersection) &&\n `${CLASSNAME}__footer--has-divider`,\n footerChildProps?.className,\n )}\n >\n {footer}\n {footerChildContent}\n </footer>\n )}\n\n {isLoading && (\n <div className={`${CLASSNAME}__progress-overlay`}>\n <Progress variant={ProgressVariant.circular} />\n </div>\n )}\n </div>\n </ClickAwayProvider>\n </section>\n </div>,\n document.body,\n )\n : null;\n});\nDialog.displayName = COMPONENT_NAME;\nDialog.className = CLASSNAME;\nDialog.defaultProps = DEFAULT_PROPS;\n"],"names":["useIntersectionObserver","elements","options","useState","Map","intersections","setIntersections","useEffect","length","some","Boolean","undefined","observer","IntersectionObserver","entries","entry","set","target","element","observe","disconnect","isHeader","isComponent","isFooter","COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","size","Size","big","Dialog","forwardRef","props","ref","DOCUMENT","children","className","header","focusElement","forceFooterDivider","forceHeaderDivider","footer","isLoading","isOpen","onClose","parentElement","contentRef","preventAutoClose","zIndex","dialogProps","onVisibilityChange","forwardedProps","previousOpen","React","useRef","current","focus","useCallbackOnEscape","wrapperRef","localContentRef","useFocusTrap","useDisableBodyScroll","sentinelTop","setSentinelTop","sentinelBottom","setSentinelBottom","threshold","hasTopIntersection","get","isIntersecting","hasBottomIntersection","useMemo","partitionMulti","Children","toArray","headerChild","footerChild","content","headerChildProps","headerChildContent","footerChildProps","footerChildContent","isVisible","useDelayedVisibility","DIALOG_TRANSITION_DURATION","clickAwayRefs","createPortal","classNames","handleBasicClasses","isHidden","isShown","prefix","mergeRefs","ProgressVariant","circular","document","body","displayName","defaultProps"],"mappings":";;;;;;;;;;;;;;;AAIA;;;;;;;AAOO,SAASA,uBAAT,CACHC,QADG,EAEHC,OAFG,EAGa;AAAA,kBAC0BC,QAAQ,CAAmB;AAAA,WAAM,IAAIC,GAAJ,EAAN;AAAA,GAAnB,CADlC;AAAA;AAAA,MACTC,aADS;AAAA,MACMC,gBADN;;AAGhBC,EAAAA,SAAS,CACL,YAAM;AACF,QAAIN,QAAQ,CAACO,MAAT,GAAkB,CAAlB,IAAuB,CAACP,QAAQ,CAACQ,IAAT,CAAcC,OAAd,CAA5B,EAAoD;AAChD,aAAOC,SAAP;AACH;;AAED,QAAMC,QAAQ,GAAG,IAAIC,oBAAJ,CAAyB,UAACC,OAAD,EAAa;AAAA;AAAA;AAAA;;AAAA;AACnD,6BAAoBA,OAApB,8HAA6B;AAAA,cAAlBC,KAAkB;AACzBV,UAAAA,aAAa,CAACW,GAAd,CAAkBD,KAAK,CAACE,MAAxB,EAAqCF,KAArC;AACH;AAHkD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAInDT,MAAAA,gBAAgB,CAAC,IAAIF,GAAJ,CAAQC,aAAR,CAAD,CAAhB;AACH,KALgB,EAKdH,OALc,CAAjB;AALE;AAAA;AAAA;;AAAA;AAYF,4BAAsBD,QAAtB,mIAAgC;AAAA,YAArBiB,OAAqB;;AAC5B,YAAIA,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.js';
1
+ import './_rolluppluginbabelhelpers.53.js';
2
2
  import './components.js';
3
3
  import 'react';
4
- import './getRootClassName.js';
4
+ import './getrootclassname.54.js';
5
5
  import 'lodash/isBoolean';
6
6
  import 'lodash/isEmpty';
7
7
  import 'lodash/kebabCase';
8
8
  import 'lodash/noop';
9
- import './constants.js';
9
+ import './constants.59.js';
10
10
  import 'lodash/concat';
11
11
  import 'lodash/dropRight';
12
12
  import 'lodash/last';
13
13
  import 'lodash/partition';
14
14
  import 'lodash/reduce';
15
- import './partitionMulti.js';
15
+ import './partitionmulti.62.js';
16
16
  import 'lodash/get';
17
- import './type.js';
18
- import './mergeRefs.js';
19
- import './useFocusTrap.js';
17
+ import './type.64.js';
18
+ import './mergerefs.56.js';
19
+ import './usefocustrap.58.js';
20
20
  import 'react-dom';
21
- import './ClickAwayProvider.js';
22
- export { D as Dialog } from './Dialog2.js';
21
+ import './clickawayprovider.60.js';
22
+ export { D as Dialog } from './dialog.13.js';
23
23
  import 'lodash/pull';
24
- import './useDelayedVisibility.js';
25
- import './useDisableBodyScroll.js';
26
- import './Progress2.js';
24
+ import './usedelayedvisibility.63.js';
25
+ import './usedisablebodyscroll.61.js';
26
+ import './progress.35.js';
27
27
  //# sourceMappingURL=dialog.js.map
@@ -1,7 +1,7 @@
1
- import { b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
1
+ import { b as _objectWithoutProperties, c as _extends } from './_rolluppluginbabelhelpers.53.js';
2
2
  import { Theme } from './components.js';
3
3
  import React, { forwardRef } from 'react';
4
- import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './getRootClassName.js';
4
+ import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './getrootclassname.54.js';
5
5
 
6
6
  /**
7
7
  * Defines the props of the component.
@@ -50,4 +50,4 @@ Divider.className = CLASSNAME;
50
50
  Divider.defaultProps = DEFAULT_PROPS;
51
51
 
52
52
  export { DEFAULT_PROPS as D, Divider as a };
53
- //# sourceMappingURL=Divider2.js.map
53
+ //# sourceMappingURL=divider.14.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.14.js","sources":["../../../src/components/divider/Divider.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { Theme } from '@lumx/react';\nimport { Comp, GenericProps, getRootClassName, handleBasicClasses } from '@lumx/react/utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface DividerProps extends GenericProps {\n /** Theme adapting the component to light or dark background. */\n theme?: Theme;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Divider';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<DividerProps> = {\n theme: Theme.light,\n};\n\n/**\n * Divider component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Divider: Comp<DividerProps, HTMLHRElement> = forwardRef((props, ref) => {\n const { className, theme, ...forwardedProps } = props;\n\n return (\n <hr\n ref={ref}\n {...forwardedProps}\n className={classNames(className, handleBasicClasses({ prefix: CLASSNAME, theme }))}\n />\n );\n});\nDivider.displayName = COMPONENT_NAME;\nDivider.className = CLASSNAME;\nDivider.defaultProps = DEFAULT_PROPS;\n"],"names":["COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","theme","Theme","light","Divider","forwardRef","props","ref","className","forwardedProps","classNames","handleBasicClasses","prefix","displayName","defaultProps"],"mappings":";;;;;AAOA;;;;AAQA;;;AAGA,IAAMA,cAAc,GAAG,SAAvB;AAEA;;;;AAGA,IAAMC,SAAS,GAAGC,gBAAgB,CAACF,cAAD,CAAlC;AAEA;;;;IAGaG,aAAoC,GAAG;AAChDC,EAAAA,KAAK,EAAEC,KAAK,CAACC;AADmC;AAIpD;;;;;;;;IAOaC,OAA0C,GAAGC,UAAU,CAAC,UAACC,KAAD,EAAQC,GAAR,EAAgB;AAAA,MACzEC,SADyE,GACjCF,KADiC,CACzEE,SADyE;AAAA,MAC9DP,KAD8D,GACjCK,KADiC,CAC9DL,KAD8D;AAAA,MACpDQ,cADoD,4BACjCH,KADiC;;AAGjF,SACI;AACI,IAAA,GAAG,EAAEC;AADT,KAEQE,cAFR;AAGI,IAAA,SAAS,EAAEC,UAAU,CAACF,SAAD,EAAYG,kBAAkB,CAAC;AAAEC,MAAAA,MAAM,EAAEd,SAAV;AAAqBG,MAAAA,KAAK,EAALA;AAArB,KAAD,CAA9B;AAHzB,KADJ;AAOH,CAVmE;AAWpEG,OAAO,CAACS,WAAR,GAAsBhB,cAAtB;AACAO,OAAO,CAACI,SAAR,GAAoBV,SAApB;AACAM,OAAO,CAACU,YAAR,GAAuBd,aAAvB;;;;"}
@@ -1,10 +1,10 @@
1
- import './_rollupPluginBabelHelpers.js';
1
+ import './_rolluppluginbabelhelpers.53.js';
2
2
  import './components.js';
3
3
  import 'react';
4
- import './getRootClassName.js';
4
+ import './getrootclassname.54.js';
5
5
  import 'lodash/isBoolean';
6
6
  import 'lodash/isEmpty';
7
7
  import 'lodash/kebabCase';
8
8
  import 'lodash/noop';
9
- export { D as DEFAULT_PROPS, a as Divider } from './Divider2.js';
9
+ export { D as DEFAULT_PROPS, a as Divider } from './divider.14.js';
10
10
  //# sourceMappingURL=divider.js.map
@@ -1,11 +1,11 @@
1
- import './_rollupPluginBabelHelpers.js';
1
+ import './_rolluppluginbabelhelpers.53.js';
2
2
  import './components.js';
3
3
  import 'react';
4
- import './getRootClassName.js';
5
- import './Icon2.js';
4
+ import './getrootclassname.54.js';
5
+ import './icon.21.js';
6
6
  import 'lodash/isBoolean';
7
7
  import 'lodash/isEmpty';
8
8
  import 'lodash/kebabCase';
9
9
  import 'lodash/noop';
10
- export { D as DragHandle } from './DragHandle.js';
10
+ export { D as DragHandle } from './draghandle.15.js';
11
11
  //# sourceMappingURL=drag-handle.js.map
@@ -1,8 +1,8 @@
1
- import { b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
1
+ import { b as _objectWithoutProperties, c as _extends } from './_rolluppluginbabelhelpers.53.js';
2
2
  import { Theme, ColorPalette, Size } from './components.js';
3
3
  import React, { forwardRef } from 'react';
4
- import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './getRootClassName.js';
5
- import { I as Icon, h as mdiDragVertical } from './Icon2.js';
4
+ import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './getrootclassname.54.js';
5
+ import { I as Icon, h as mdiDragVertical } from './icon.21.js';
6
6
 
7
7
  /**
8
8
  * Defines the props of the component.
@@ -47,4 +47,4 @@ DragHandle.displayName = COMPONENT_NAME;
47
47
  DragHandle.className = CLASSNAME;
48
48
 
49
49
  export { DragHandle as D };
50
- //# sourceMappingURL=DragHandle.js.map
50
+ //# sourceMappingURL=draghandle.15.js.map