@rio-cloud/rio-uikit 0.16.4-beta.17 → 0.16.4-beta.19

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 (163) hide show
  1. package/CalendarStripe.d.ts +2 -5
  2. package/CalendarStripe.js +2 -2
  3. package/Carousel.d.ts +2 -11
  4. package/Carousel.js +2 -2
  5. package/Dialog.d.ts +2 -15
  6. package/Dialog.js +2 -2
  7. package/ExpanderList.d.ts +2 -5
  8. package/ExpanderList.js +2 -2
  9. package/ExpanderPanel.d.ts +2 -5
  10. package/ExpanderPanel.js +2 -2
  11. package/Fade.d.ts +2 -14
  12. package/Fade.js +2 -2
  13. package/InfoDialog.d.ts +2 -5
  14. package/InfoDialog.js +2 -2
  15. package/MediaDialog.d.ts +2 -9
  16. package/MediaDialog.js +2 -2
  17. package/RadioButton.d.ts +2 -5
  18. package/RadioButton.js +2 -2
  19. package/ReleaseNotes.d.ts +2 -2
  20. package/ReleaseNotes.js +2 -2
  21. package/ReleaseNotesDialog.d.ts +2 -5
  22. package/SaveDialog.d.ts +2 -14
  23. package/SaveDialog.js +2 -2
  24. package/SimpleDialog.d.ts +2 -14
  25. package/SimpleDialog.js +2 -2
  26. package/SplitDialog.d.ts +2 -14
  27. package/SplitDialog.js +2 -2
  28. package/components/assetTree/TreeSummary.js +1 -1
  29. package/components/assetTree/TypeCounter.js +2 -2
  30. package/components/button/Button.d.ts +25 -19
  31. package/components/button/Button.js +11 -25
  32. package/components/calendarStripe/CalendarStripe.d.ts +66 -2
  33. package/components/calendarStripe/CalendarStripe.js +21 -45
  34. package/components/carousel/Carousel.d.ts +8 -2
  35. package/components/carousel/Carousel.js +5 -9
  36. package/components/dialog/ConfirmationDialog.d.ts +11 -24
  37. package/components/dialog/ConfirmationDialog.js +8 -26
  38. package/components/dialog/Dialog.d.ts +102 -42
  39. package/components/dialog/Dialog.js +17 -25
  40. package/components/dialog/DialogBody.d.ts +5 -15
  41. package/components/dialog/DialogBody.js +4 -10
  42. package/components/dialog/DialogFooter.d.ts +6 -15
  43. package/components/dialog/DialogFooter.js +6 -12
  44. package/components/dialog/DialogHeader.d.ts +10 -17
  45. package/components/dialog/DialogHeader.js +7 -15
  46. package/components/dialog/InfoDialog.d.ts +9 -17
  47. package/components/dialog/InfoDialog.js +6 -7
  48. package/components/dialog/MediaDialog.d.ts +64 -57
  49. package/components/dialog/MediaDialog.js +40 -83
  50. package/components/dialog/ReleaseNotesDialog.d.ts +56 -19
  51. package/components/dialog/ReleaseNotesDialog.js +9 -30
  52. package/components/dialog/SaveDialog.d.ts +34 -30
  53. package/components/dialog/SaveDialog.js +8 -18
  54. package/components/dialog/SimpleDialog.d.ts +9 -20
  55. package/components/dialog/SimpleDialog.js +6 -10
  56. package/components/dialog/SplitDialog.d.ts +21 -31
  57. package/components/dialog/SplitDialog.js +5 -15
  58. package/components/expander/ExpanderList.d.ts +66 -38
  59. package/components/expander/ExpanderList.js +45 -87
  60. package/components/expander/ExpanderPanel.d.ts +92 -51
  61. package/components/expander/ExpanderPanel.js +9 -52
  62. package/components/fade/Fade.d.ts +75 -45
  63. package/components/fade/Fade.js +16 -98
  64. package/components/map/components/Map.js +25 -3
  65. package/components/numberControl/NumberControl.js +4 -4
  66. package/components/numberInput/NumberInput.d.ts +22 -0
  67. package/components/numberInput/NumberInput.js +6 -6
  68. package/components/radiobutton/RadioButton.d.ts +110 -44
  69. package/components/radiobutton/RadioButton.js +16 -44
  70. package/components/releaseNotes/ReleaseNotes.d.ts +7 -6
  71. package/components/saveableInput/SaveableInput.js +13 -9
  72. package/components/selects/Select.d.ts +1 -0
  73. package/components/selects/Select.js +14 -6
  74. package/components/sidebars/Sidebar.js +1 -1
  75. package/hooks/useAfterMount.d.ts +1 -1
  76. package/hooks/useMergeRefs.d.ts +4 -0
  77. package/hooks/useMergeRefs.js +28 -0
  78. package/index.d.ts +28 -30
  79. package/index.js +28 -30
  80. package/lib/es/CalendarStripe.d.ts +2 -5
  81. package/lib/es/CalendarStripe.js +3 -2
  82. package/lib/es/Carousel.d.ts +2 -11
  83. package/lib/es/Carousel.js +3 -2
  84. package/lib/es/Dialog.d.ts +2 -15
  85. package/lib/es/Dialog.js +3 -2
  86. package/lib/es/ExpanderList.d.ts +2 -5
  87. package/lib/es/ExpanderList.js +3 -2
  88. package/lib/es/ExpanderPanel.d.ts +2 -5
  89. package/lib/es/ExpanderPanel.js +3 -2
  90. package/lib/es/Fade.d.ts +2 -14
  91. package/lib/es/Fade.js +3 -2
  92. package/lib/es/InfoDialog.d.ts +2 -5
  93. package/lib/es/InfoDialog.js +3 -2
  94. package/lib/es/MediaDialog.d.ts +2 -9
  95. package/lib/es/MediaDialog.js +3 -2
  96. package/lib/es/RadioButton.d.ts +2 -5
  97. package/lib/es/RadioButton.js +3 -2
  98. package/lib/es/ReleaseNotes.d.ts +2 -2
  99. package/lib/es/ReleaseNotes.js +3 -2
  100. package/lib/es/ReleaseNotesDialog.d.ts +2 -5
  101. package/lib/es/SaveDialog.d.ts +2 -14
  102. package/lib/es/SaveDialog.js +3 -2
  103. package/lib/es/SimpleDialog.d.ts +2 -14
  104. package/lib/es/SimpleDialog.js +3 -2
  105. package/lib/es/SplitDialog.d.ts +2 -14
  106. package/lib/es/SplitDialog.js +3 -2
  107. package/lib/es/components/assetTree/TreeSummary.js +1 -1
  108. package/lib/es/components/assetTree/TypeCounter.js +2 -2
  109. package/lib/es/components/button/Button.d.ts +25 -19
  110. package/lib/es/components/button/Button.js +11 -25
  111. package/lib/es/components/calendarStripe/CalendarStripe.d.ts +66 -2
  112. package/lib/es/components/calendarStripe/CalendarStripe.js +19 -43
  113. package/lib/es/components/carousel/Carousel.d.ts +8 -2
  114. package/lib/es/components/carousel/Carousel.js +4 -9
  115. package/lib/es/components/dialog/ConfirmationDialog.d.ts +11 -24
  116. package/lib/es/components/dialog/ConfirmationDialog.js +8 -26
  117. package/lib/es/components/dialog/Dialog.d.ts +102 -42
  118. package/lib/es/components/dialog/Dialog.js +17 -25
  119. package/lib/es/components/dialog/DialogBody.d.ts +5 -15
  120. package/lib/es/components/dialog/DialogBody.js +4 -10
  121. package/lib/es/components/dialog/DialogFooter.d.ts +6 -15
  122. package/lib/es/components/dialog/DialogFooter.js +6 -12
  123. package/lib/es/components/dialog/DialogHeader.d.ts +10 -17
  124. package/lib/es/components/dialog/DialogHeader.js +7 -15
  125. package/lib/es/components/dialog/InfoDialog.d.ts +9 -17
  126. package/lib/es/components/dialog/InfoDialog.js +5 -7
  127. package/lib/es/components/dialog/MediaDialog.d.ts +64 -57
  128. package/lib/es/components/dialog/MediaDialog.js +40 -83
  129. package/lib/es/components/dialog/ReleaseNotesDialog.d.ts +56 -19
  130. package/lib/es/components/dialog/ReleaseNotesDialog.js +9 -30
  131. package/lib/es/components/dialog/SaveDialog.d.ts +34 -30
  132. package/lib/es/components/dialog/SaveDialog.js +8 -18
  133. package/lib/es/components/dialog/SimpleDialog.d.ts +9 -20
  134. package/lib/es/components/dialog/SimpleDialog.js +5 -10
  135. package/lib/es/components/dialog/SplitDialog.d.ts +21 -31
  136. package/lib/es/components/dialog/SplitDialog.js +5 -15
  137. package/lib/es/components/expander/ExpanderList.d.ts +66 -38
  138. package/lib/es/components/expander/ExpanderList.js +45 -88
  139. package/lib/es/components/expander/ExpanderPanel.d.ts +92 -51
  140. package/lib/es/components/expander/ExpanderPanel.js +9 -52
  141. package/lib/es/components/fade/Fade.d.ts +75 -45
  142. package/lib/es/components/fade/Fade.js +16 -98
  143. package/lib/es/components/map/components/Map.js +25 -3
  144. package/lib/es/components/numberControl/NumberControl.js +4 -4
  145. package/lib/es/components/numberInput/NumberInput.d.ts +22 -0
  146. package/lib/es/components/numberInput/NumberInput.js +5 -5
  147. package/lib/es/components/radiobutton/RadioButton.d.ts +110 -44
  148. package/lib/es/components/radiobutton/RadioButton.js +16 -44
  149. package/lib/es/components/releaseNotes/ReleaseNotes.d.ts +7 -6
  150. package/lib/es/components/saveableInput/SaveableInput.js +13 -9
  151. package/lib/es/components/selects/Select.d.ts +1 -0
  152. package/lib/es/components/selects/Select.js +14 -6
  153. package/lib/es/components/sidebars/Sidebar.js +1 -1
  154. package/lib/es/hooks/useAfterMount.d.ts +1 -1
  155. package/lib/es/hooks/useMergeRefs.d.ts +4 -0
  156. package/lib/es/hooks/useMergeRefs.js +30 -0
  157. package/lib/es/index.d.ts +28 -30
  158. package/lib/es/index.js +46 -34
  159. package/lib/es/types.d.ts +0 -257
  160. package/lib/es/version.json +1 -1
  161. package/package.json +4 -4
  162. package/types.d.ts +0 -257
  163. package/version.json +1 -1
@@ -1,5 +1,2 @@
1
- declare module '@rio-cloud/rio-uikit/CalendarStripe' {
2
- import React from 'react';
3
- import { CalendarStripeProps } from './types';
4
- export default class CalendarStripe extends React.Component<CalendarStripeProps> {}
5
- }
1
+ export { default } from './components/calendarStripe/CalendarStripe';
2
+ export * from './components/calendarStripe/CalendarStripe';
package/CalendarStripe.js CHANGED
@@ -1,2 +1,2 @@
1
- import { default as _CalendarStripe } from './components/calendarStripe/CalendarStripe';
2
- export { _CalendarStripe as default };
1
+ export { default } from './components/calendarStripe/CalendarStripe';
2
+ export * from './components/calendarStripe/CalendarStripe';
package/Carousel.d.ts CHANGED
@@ -1,11 +1,2 @@
1
- declare module '@rio-cloud/rio-uikit/Carousel' {
2
- import React from 'react';
3
- import { CarouselProps, CarouselItemProps } from './types';
4
-
5
- export default class Carousel extends React.Component<CarouselProps> {
6
- static Item: React.ComponentClass<CarouselItemProps>;
7
- static Caption: React.ComponentClass<any>;
8
- static PREV = 'prev';
9
- static NEXT = 'next';
10
- }
11
- }
1
+ export { default } from './components/carousel/Carousel';
2
+ export * from './components/carousel/Carousel';
package/Carousel.js CHANGED
@@ -1,2 +1,2 @@
1
- import { default as _Carousel } from './components/carousel/Carousel';
2
- export { _Carousel as default };
1
+ export { default } from './components/carousel/Carousel';
2
+ export * from './components/carousel/Carousel';
package/Dialog.d.ts CHANGED
@@ -1,15 +1,2 @@
1
- declare module '@rio-cloud/rio-uikit/Dialog' {
2
- import React from 'react';
3
- import { DialogProps } from './types';
4
-
5
- export default class Dialog extends React.Component<DialogProps> {
6
- public static SIZE_FULL_SCREEN: 'fullscreen';
7
- public static SIZE_FULL: 'full';
8
- public static SIZE_FULL_WIDTH: 'fullwidth';
9
- public static SIZE_FULL_HEIGHT: 'fullheight';
10
- public static SIZE_XL: 'xl';
11
- public static SIZE_LG: 'lg';
12
- public static SIZE_MD: 'md';
13
- public static SIZE_SM: 'sm';
14
- }
15
- }
1
+ export { default } from './components/dialog/Dialog';
2
+ export * from './components/dialog/Dialog';
package/Dialog.js CHANGED
@@ -1,2 +1,2 @@
1
- import { default as _Dialog } from './components/dialog/Dialog';
2
- export { _Dialog as default };
1
+ export { default } from './components/dialog/Dialog';
2
+ export * from './components/dialog/Dialog';
package/ExpanderList.d.ts CHANGED
@@ -1,5 +1,2 @@
1
- import React from 'react';
2
- import { ExpanderListProps } from './types';
3
-
4
- export { ExpanderListItem } from './types';
5
- export default class ExpanderList extends React.Component<ExpanderListProps> {}
1
+ export { default } from './components/expander/ExpanderList';
2
+ export * from './components/expander/ExpanderList';
package/ExpanderList.js CHANGED
@@ -1,2 +1,2 @@
1
- import { default as _ExpanderList } from './components/expander/ExpanderList';
2
- export { _ExpanderList as default };
1
+ export { default } from './components/expander/ExpanderList';
2
+ export * from './components/expander/ExpanderList';
@@ -1,5 +1,2 @@
1
- declare module '@rio-cloud/rio-uikit/ExpanderPanel' {
2
- import React from 'react';
3
- import { ExpanderPanelProps } from './types';
4
- export default class ExpanderPanel extends React.Component<ExpanderPanelProps> {}
5
- }
1
+ export { default } from './components/expander/ExpanderPanel';
2
+ export * from './components/expander/ExpanderPanel';
package/ExpanderPanel.js CHANGED
@@ -1,2 +1,2 @@
1
- import { default as _ExpanderPanel } from './components/expander/ExpanderPanel';
2
- export { _ExpanderPanel as default };
1
+ export { default } from './components/expander/ExpanderPanel';
2
+ export * from './components/expander/ExpanderPanel';
package/Fade.d.ts CHANGED
@@ -1,14 +1,2 @@
1
- declare module '@rio-cloud/rio-uikit/Fade' {
2
- import React from 'react';
3
- import { FadeProps } from './types';
4
- export default class Fade extends React.Component<FadeProps> {
5
- static FADE = 'fade';
6
- static FROM_LEFT = 'fromLeft';
7
- static FROM_RIGHT = 'fromRight';
8
- static FROM_TOP = 'fromTop';
9
- static FROM_BOTTOM = 'fromBottom';
10
- static TABS = 'tabs';
11
- static PAGE = 'page';
12
- static PAGE_BACK = 'pageBack';
13
- }
14
- }
1
+ export { default } from './components/fade/Fade';
2
+ export * from './components/fade/Fade';
package/Fade.js CHANGED
@@ -1,2 +1,2 @@
1
- import { default as _Fade } from './components/fade/Fade';
2
- export { _Fade as default };
1
+ export { default } from './components/fade/Fade';
2
+ export * from './components/fade/Fade';
package/InfoDialog.d.ts CHANGED
@@ -1,5 +1,2 @@
1
- declare module '@rio-cloud/rio-uikit/InfoDialog' {
2
- import React from 'react';
3
- import { InfoDialogProps } from './types';
4
- export default class InfoDialog extends React.Component<InfoDialogProps> {}
5
- }
1
+ export { default } from './components/dialog/InfoDialog';
2
+ export * from './components/dialog/InfoDialog';
package/InfoDialog.js CHANGED
@@ -1,2 +1,2 @@
1
- import { default as _InfoDialog } from './components/dialog/InfoDialog';
2
- export { _InfoDialog as default };
1
+ export { default } from './components/dialog/InfoDialog';
2
+ export * from './components/dialog/InfoDialog';
package/MediaDialog.d.ts CHANGED
@@ -1,9 +1,2 @@
1
- import React from 'react';
2
- import { MediaDialogProps } from './types';
3
-
4
- export { MediaDialogMedia } from './types';
5
-
6
- export default class MediaDialog extends React.Component<MediaDialogProps> {
7
- static MEDIA_TYPE_IMAGE = 'image';
8
- static MEDIA_TYPE_VIDEO = 'video';
9
- }
1
+ export { default } from './components/dialog/MediaDialog';
2
+ export * from './components/dialog/MediaDialog';
package/MediaDialog.js CHANGED
@@ -1,2 +1,2 @@
1
- import { default as _MediaDialog } from './components/dialog/MediaDialog';
2
- export { _MediaDialog as default };
1
+ export { default } from './components/dialog/MediaDialog';
2
+ export * from './components/dialog/MediaDialog';
package/RadioButton.d.ts CHANGED
@@ -1,5 +1,2 @@
1
- declare module '@rio-cloud/rio-uikit/RadioButton' {
2
- import React from 'react';
3
- import { RadioButtonProps } from './types';
4
- export default class RadioButton extends React.Component<RadioButtonProps> {}
5
- }
1
+ export { default } from './components/radiobutton/RadioButton';
2
+ export * from './components/radiobutton/RadioButton';
package/RadioButton.js CHANGED
@@ -1,2 +1,2 @@
1
- import { default as _RadioButton } from './components/radiobutton/RadioButton';
2
- export { _RadioButton as default };
1
+ export { default } from './components/radiobutton/RadioButton';
2
+ export * from './components/radiobutton/RadioButton';
package/ReleaseNotes.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { _ReleaseNotes as default };
2
- import { default as _ReleaseNotes } from "./components/releaseNotes/ReleaseNotes";
1
+ export { default } from './components/releaseNotes/ReleaseNotes';
2
+ export * from './components/releaseNotes/ReleaseNotes';
package/ReleaseNotes.js CHANGED
@@ -1,2 +1,2 @@
1
- import { default as _ReleaseNotes } from './components/releaseNotes/ReleaseNotes';
2
- export { _ReleaseNotes as default };
1
+ export { default } from './components/releaseNotes/ReleaseNotes';
2
+ export * from './components/releaseNotes/ReleaseNotes';
@@ -1,5 +1,2 @@
1
- declare module '@rio-cloud/rio-uikit/ReleaseNotesDialog' {
2
- import React from 'react';
3
- import { ReleaseNotesDialogProps } from './types';
4
- export default class ReleaseNotesDialog extends React.Component<ReleaseNotesDialogProps> {}
5
- }
1
+ export { default } from './components/dialog/ReleaseNotesDialog';
2
+ export * from './components/dialog/ReleaseNotesDialog';
package/SaveDialog.d.ts CHANGED
@@ -1,14 +1,2 @@
1
- declare module '@rio-cloud/rio-uikit/SaveDialog' {
2
- import React from 'react';
3
- import { SaveDialogProps } from './types';
4
- export default class SaveDialog extends React.Component<SaveDialogProps> {
5
- static SIZE_SM = 'sm';
6
- static SIZE_MD = 'md';
7
- static SIZE_LG = 'lg';
8
- static SIZE_XL = 'xl';
9
- static SIZE_FULL = 'full';
10
- static SIZE_FULL_WIDTH: 'fullwidth';
11
- static SIZE_FULL_HEIGHT: 'fullheight';
12
- static SIZE_FULL_SCREEN = 'fullscreen';
13
- }
14
- }
1
+ export { default } from './components/dialog/SaveDialog';
2
+ export * from './components/dialog/SaveDialog';
package/SaveDialog.js CHANGED
@@ -1,2 +1,2 @@
1
- import { default as _SaveDialog } from './components/dialog/SaveDialog';
2
- export { _SaveDialog as default };
1
+ export { default } from './components/dialog/SaveDialog';
2
+ export * from './components/dialog/SaveDialog';
package/SimpleDialog.d.ts CHANGED
@@ -1,14 +1,2 @@
1
- declare module '@rio-cloud/rio-uikit/SimpleDialog' {
2
- import React from 'react';
3
- import { SimpleDialogProps } from './types';
4
- export default class SimpleDialog extends React.Component<SimpleDialogProps> {
5
- static SIZE_SM = 'sm';
6
- static SIZE_MD = 'md';
7
- static SIZE_LG = 'lg';
8
- static SIZE_XL = 'xl';
9
- static SIZE_FULL = 'full';
10
- static SIZE_FULL_WIDTH: 'fullwidth';
11
- static SIZE_FULL_HEIGHT: 'fullheight';
12
- static SIZE_FULL_SCREEN = 'fullscreen';
13
- }
14
- }
1
+ export { default } from './components/dialog/SimpleDialog';
2
+ export * from './components/dialog/SimpleDialog';
package/SimpleDialog.js CHANGED
@@ -1,2 +1,2 @@
1
- import { default as _SimpleDialog } from './components/dialog/SimpleDialog';
2
- export { _SimpleDialog as default };
1
+ export { default } from './components/dialog/SimpleDialog';
2
+ export * from './components/dialog/SimpleDialog';
package/SplitDialog.d.ts CHANGED
@@ -1,14 +1,2 @@
1
- declare module '@rio-cloud/rio-uikit/SplitDialog' {
2
- import React from 'react';
3
- import { SplitDialogProps } from './types';
4
- export default class SplitDialog extends React.Component<SplitDialogProps> {
5
- static SIZE_SM = 'sm';
6
- static SIZE_MD = 'md';
7
- static SIZE_LG = 'lg';
8
- static SIZE_XL = 'xl';
9
- static SIZE_FULL = 'full';
10
- static SIZE_FULL_WIDTH: 'fullwidth';
11
- static SIZE_FULL_HEIGHT: 'fullheight';
12
- static SIZE_FULL_SCREEN = 'fullscreen';
13
- }
14
- }
1
+ export { default } from './components/dialog/SplitDialog';
2
+ export * from './components/dialog/SplitDialog';
package/SplitDialog.js CHANGED
@@ -1,2 +1,2 @@
1
- import { default as _SplitDialog } from './components/dialog/SplitDialog';
2
- export { _SplitDialog as default };
1
+ export { default } from './components/dialog/SplitDialog';
2
+ export * from './components/dialog/SplitDialog';
@@ -9,7 +9,7 @@ const DefaultAssetCounts = ({ assetCounts }) => {
9
9
  };
10
10
  const TreeSummary = React.memo(props => {
11
11
  const { className, assetCounts, children } = props;
12
- const classes = classNames('TreeSummary', 'display-flex', 'flex-wrap', 'align-items-center', 'column-gap-15', 'row-gap-5', className);
12
+ const classes = classNames('TreeSummary', 'display-flex', 'flex-wrap', 'align-items-center', 'column-gap-10', 'row-gap-5', className);
13
13
  return _jsx("div", Object.assign({ className: classes }, { children: children || _jsx(DefaultAssetCounts, { assetCounts: assetCounts }) }));
14
14
  });
15
15
  TreeSummary.displayName = 'TreeSummary';
@@ -5,13 +5,13 @@ import PropTypes from 'prop-types';
5
5
  import classNames from 'classnames';
6
6
  const TypeCounter = forwardRef((props, ref) => {
7
7
  const { icon, value, isActive, hasFilter, enableActivity, onClick, type, hideOnZero } = props, remainingProps = __rest(props, ["icon", "value", "isActive", "hasFilter", "enableActivity", "onClick", "type", "hideOnZero"]);
8
- const wrapperClassName = classNames('TypeCounter', 'display-flex align-items-center', 'user-select-none', enableActivity ? 'cursor-pointer' : 'pointer-events-none', enableActivity && hasFilter && !isActive && 'opacity-50');
8
+ const wrapperClassName = classNames('TypeCounter', 'display-flex align-items-center', 'user-select-none', 'margin-right-2', enableActivity ? 'cursor-pointer' : 'pointer-events-none', enableActivity && hasFilter && !isActive && 'opacity-50');
9
9
  const counterClassNames = classNames('TreeLabelCount', 'label label-condensed', isActive ? 'label-primary' : 'label-muted label-filled');
10
10
  const handleClick = () => onClick(type);
11
11
  if (hideOnZero && !value) {
12
12
  return null;
13
13
  }
14
- return (_jsxs("div", Object.assign({ ref: ref }, remainingProps, { className: wrapperClassName, onClick: handleClick }, { children: [_jsx("span", { className: `rioglyph rioglyph-${icon} text-size-16 margin-right-2 margin-left--4` }), _jsx("span", Object.assign({ className: counterClassNames }, { children: value || 0 }))] })));
14
+ return (_jsxs("div", Object.assign({ ref: ref }, remainingProps, { className: wrapperClassName, onClick: handleClick }, { children: [_jsx("span", { className: `rioglyph rioglyph-${icon} text-size-16 margin-right-2` }), _jsx("span", Object.assign({ className: counterClassNames }, { children: value || 0 }))] })));
15
15
  });
16
16
  TypeCounter.defaultProps = {
17
17
  hideOnZero: false,
@@ -1,4 +1,4 @@
1
- import { type PropsWithChildren, type SyntheticEvent } from 'react';
1
+ import { type PropsWithChildren, type SyntheticEvent, type RefAttributes, type ForwardRefExoticComponent } from 'react';
2
2
  import type { ObjectValues } from '../../utils/ObjectValues';
3
3
  declare const STYLES_MAP: {
4
4
  readonly DEFAULT: "default";
@@ -61,6 +61,11 @@ export type ButtonProps = {
61
61
  * @default false
62
62
  */
63
63
  disabled?: boolean;
64
+ /**
65
+ * Defines the type of the button. This may be used for form submit buttons.
66
+ * @default 'button'
67
+ */
68
+ type?: 'button' | 'submit';
64
69
  /**
65
70
  * Use when the content of the button is an icon only to adapt the button spacing accordingly.
66
71
  * @default false
@@ -105,23 +110,24 @@ export type ButtonProps = {
105
110
  */
106
111
  className?: string;
107
112
  } & (RegularButtonProps | ToggleButtonProps);
108
- declare const Button: {
109
- (props: PropsWithChildren<ButtonProps>): import("react/jsx-runtime").JSX.Element;
110
- DEFAULT: "default";
111
- PRIMARY: "primary";
112
- SECONDARY: "secondary";
113
- INFO: "info";
114
- WARNING: "warning";
115
- DANGER: "danger";
116
- SUCCESS: "success";
117
- MUTED: "muted";
118
- VARIANT_LINK: "link";
119
- VARIANT_LINK_INLINE: "link-inline";
120
- VARIANT_OUTLINE: "outline";
121
- VARIANT_ACTION: "action";
122
- XS: "xs";
123
- SM: "sm";
124
- MD: "md";
125
- LG: "lg";
113
+ type Props = PropsWithChildren<ButtonProps>;
114
+ type ButtonType = ForwardRefExoticComponent<Props & RefAttributes<HTMLButtonElement>> & {
115
+ DEFAULT: 'default';
116
+ PRIMARY: 'primary';
117
+ SECONDARY: 'secondary';
118
+ INFO: 'info';
119
+ WARNING: 'warning';
120
+ DANGER: 'danger';
121
+ SUCCESS: 'success';
122
+ MUTED: 'muted';
123
+ VARIANT_LINK: 'link';
124
+ VARIANT_LINK_INLINE: 'link-inline';
125
+ VARIANT_OUTLINE: 'outline';
126
+ VARIANT_ACTION: 'action';
127
+ XS: 'xs';
128
+ SM: 'sm';
129
+ MD: 'md';
130
+ LG: 'lg';
126
131
  };
132
+ declare const Button: ButtonType;
127
133
  export default Button;
@@ -1,9 +1,10 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useRef, useState } from 'react';
3
+ import React, { useRef, useState, } from 'react';
4
4
  import classNames from 'classnames';
5
5
  import noop from 'lodash/fp/noop';
6
6
  import { createButtonRipple } from '../../utils/buttonEffect';
7
+ import useMergeRefs from '../../hooks/useMergeRefs';
7
8
  const STYLES_MAP = {
8
9
  DEFAULT: 'default',
9
10
  PRIMARY: 'primary',
@@ -26,10 +27,11 @@ const SIZES_MAP = {
26
27
  MD: 'md',
27
28
  LG: 'lg',
28
29
  };
29
- const Button = (props) => {
30
- const { active = false, disabled = false, asToggle = false, onClick = noop, bsStyle = 'default', bsSize, variant, iconOnly = false, iconName, multiline = false, block = false, className = '', noRippleEffect = false, children } = props, remainingProps = __rest(props, ["active", "disabled", "asToggle", "onClick", "bsStyle", "bsSize", "variant", "iconOnly", "iconName", "multiline", "block", "className", "noRippleEffect", "children"]);
30
+ const Button = React.forwardRef((props, ref) => {
31
+ const { active = false, disabled = false, asToggle = false, onClick = noop, bsStyle = 'default', bsSize, variant, iconOnly = false, iconName, multiline = false, block = false, className = '', noRippleEffect = false, type = 'button', children } = props, remainingProps = __rest(props, ["active", "disabled", "asToggle", "onClick", "bsStyle", "bsSize", "variant", "iconOnly", "iconName", "multiline", "block", "className", "noRippleEffect", "type", "children"]);
31
32
  const [isToggled, setIsToggled] = useState(active);
32
33
  const btnRef = useRef(null);
34
+ const buttonRef = useMergeRefs(btnRef, ref);
33
35
  // Update internal toggle state when used as controlled component and outside toggle state changes
34
36
  const [previousActive, setPreviousActive] = useState(active);
35
37
  if (active !== previousActive) {
@@ -54,26 +56,10 @@ const Button = (props) => {
54
56
  onClick(event);
55
57
  }
56
58
  };
57
- const buttonClassNames = classNames('btn', `btn-${bsStyle}`, variant === Button.VARIANT_LINK && 'btn-link', variant === Button.VARIANT_LINK_INLINE && 'btn-link btn-link-inline', variant === Button.VARIANT_OUTLINE && 'btn-outline', variant === Button.VARIANT_ACTION && 'btn-action', bsSize && `btn-${bsSize}`, asToggle && 'btn-toggle', isToggled && 'active', iconOnly && 'btn-icon-only', disabled && 'disabled', multiline && 'btn-multiline', block && 'btn-block', 'btn-component', className);
58
- return (_jsxs("button", Object.assign({ ref: btnRef, type: 'button' }, remainingProps, { className: buttonClassNames, onClick: handleClick }, { children: [iconName && _jsx("span", { className: `rioglyph ${iconName}` }), children] })));
59
- };
60
- // Button styles
61
- Button.DEFAULT = STYLES_MAP.DEFAULT;
62
- Button.PRIMARY = STYLES_MAP.PRIMARY;
63
- Button.SECONDARY = STYLES_MAP.SECONDARY;
64
- Button.INFO = STYLES_MAP.INFO;
65
- Button.WARNING = STYLES_MAP.WARNING;
66
- Button.DANGER = STYLES_MAP.DANGER;
67
- Button.SUCCESS = STYLES_MAP.SUCCESS;
68
- Button.MUTED = STYLES_MAP.MUTED;
69
- // Button Type
70
- Button.VARIANT_LINK = VARIANTS_MAP.VARIANT_LINK;
71
- Button.VARIANT_LINK_INLINE = VARIANTS_MAP.VARIANT_LINK_INLINE;
72
- Button.VARIANT_OUTLINE = VARIANTS_MAP.VARIANT_OUTLINE;
73
- Button.VARIANT_ACTION = VARIANTS_MAP.VARIANT_ACTION;
74
- // Button Size
75
- Button.XS = SIZES_MAP.XS;
76
- Button.SM = SIZES_MAP.SM;
77
- Button.MD = SIZES_MAP.MD;
78
- Button.LG = SIZES_MAP.LG;
59
+ const buttonClassNames = classNames('btn', `btn-${bsStyle}`, variant === VARIANTS_MAP.VARIANT_LINK && 'btn-link', variant === VARIANTS_MAP.VARIANT_LINK_INLINE && 'btn-link btn-link-inline', variant === VARIANTS_MAP.VARIANT_OUTLINE && 'btn-outline', variant === VARIANTS_MAP.VARIANT_ACTION && 'btn-action', bsSize && `btn-${bsSize}`, asToggle && 'btn-toggle', isToggled && 'active', iconOnly && 'btn-icon-only', disabled && 'disabled', multiline && 'btn-multiline', block && 'btn-block', 'btn-component', className);
60
+ return (_jsxs("button", Object.assign({ ref: buttonRef, type: type }, remainingProps, { className: buttonClassNames, onClick: handleClick }, { children: [iconName && _jsx("span", { className: `rioglyph ${iconName}` }), children] })));
61
+ });
62
+ Object.assign(Button, STYLES_MAP);
63
+ Object.assign(Button, VARIANTS_MAP);
64
+ Object.assign(Button, SIZES_MAP);
79
65
  export default Button;
@@ -1,3 +1,67 @@
1
+ import React from 'react';
2
+ export type CalendarStripeProps = {
3
+ /**
4
+ * The minimum width in pixel of a single day column
5
+ *
6
+ * This value determines how many days are shown per page depending on the parent width.
7
+ *
8
+ * @default 200
9
+ */
10
+ minDayWith?: number;
11
+ /**
12
+ * The minimum amount of days that should be shown per page.
13
+ *
14
+ * @default 1
15
+ */
16
+ minDays?: number;
17
+ /**
18
+ * The maximum amount of days that should be shown per page.
19
+ *
20
+ * @default 7
21
+ */
22
+ maxDays?: number;
23
+ /**
24
+ * @deprecated Please use `renderDay` instead.
25
+ */
26
+ render?: React.ReactNode;
27
+ /**
28
+ * A function that renders each individual day to be displayed.
29
+ *
30
+ * @param date The day to render
31
+ */
32
+ renderDay?: (date: Date) => React.JSX.Element;
33
+ /**
34
+ * Defines whether the days for the weekends are included.
35
+ *
36
+ * @default false
37
+ */
38
+ skipWeekends?: boolean;
39
+ /**
40
+ * The date of the first day that are rendered.
41
+ *
42
+ * @default the current date
43
+ */
44
+ startDate?: Date;
45
+ /**
46
+ * Callback function for when the next button is clicked.
47
+ *
48
+ * @param newStartDate Date value that is now the start of the stripe.
49
+ */
50
+ onNextClick?: (newStartDate: Date) => void;
51
+ /**
52
+ * Callback function for when the previous button is clicked.
53
+ *
54
+ * @param newStartDate Date value that is now the start of the stripe.
55
+ */
56
+ onPreviousClick?: (newStartDate: Date) => void;
57
+ /**
58
+ * Additional classes set to the navigation buttons.
59
+ */
60
+ buttonClassName?: string;
61
+ /**
62
+ * Additional classes set to the calendar element.
63
+ */
64
+ className?: string;
65
+ };
66
+ declare const CalendarStripe: React.ForwardRefExoticComponent<CalendarStripeProps & React.RefAttributes<HTMLDivElement>>;
1
67
  export default CalendarStripe;
2
- declare const CalendarStripe: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import React from "react";
@@ -1,8 +1,8 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React, { useLayoutEffect, useState, useRef, forwardRef } from 'react';
3
- import PropTypes from 'prop-types';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { forwardRef, useLayoutEffect, useRef, useState } from 'react';
4
3
  import classNames from 'classnames';
5
4
  import { AnimatePresence, motion } from 'framer-motion';
5
+ import noop from 'lodash/noop';
6
6
  import useAfterMount from '../../hooks/useAfterMount';
7
7
  import useElementSize from '../../hooks/useElementSize';
8
8
  import usePrevious from '../../hooks/usePrevious';
@@ -14,34 +14,34 @@ const ANIMATION_NEXT = 'page';
14
14
  const ANIMATION_BACK = 'pageBack';
15
15
  const ITEM_NAME = 'ColumnItem';
16
16
  const variants = {
17
- pageEnter: pageDirection => {
18
- return {
19
- x: pageDirection === ANIMATION_NEXT ? '60%' : '-60%',
20
- opacity: 0,
21
- };
22
- },
23
- pageCenter: () => {
24
- return {
25
- x: 0,
26
- opacity: 1,
27
- };
28
- },
17
+ pageEnter: (pageDirection) => ({
18
+ x: pageDirection === ANIMATION_NEXT ? '60%' : '-60%',
19
+ opacity: 0,
20
+ }),
21
+ pageCenter: () => ({ x: 0, opacity: 1 }),
29
22
  };
30
- const getDateString = date => date.toISOString().split('T').at(0);
31
- const getFirstColumnItem = node => {
23
+ const getDateString = (date) => date.toISOString().split('T').at(0);
24
+ const getFirstColumnItem = (node) => {
32
25
  if ([...node.classList].includes(ITEM_NAME)) {
33
26
  return node;
34
27
  }
35
28
  return getFirstColumnItem(node.children[0]);
36
29
  };
37
30
  const CalendarStripe = forwardRef((props, ref) => {
38
- const { minDayWith = DEFAULT_MIN_WITH, minDays = DEFAULT_MIN_DAYS, maxDays = DEFAULT_MAX_DAYS, render, skipWeekends, startDate = new Date(), onNextClick, onPreviousClick, buttonClassName, className, } = props;
31
+ const { minDayWith = DEFAULT_MIN_WITH, minDays = DEFAULT_MIN_DAYS, maxDays = DEFAULT_MAX_DAYS, render, renderDay, skipWeekends = false, startDate = new Date(), onNextClick = noop, onPreviousClick = noop, buttonClassName = '', className = '', } = props;
32
+ if (render) {
33
+ console.warn('CalendarStripe has set the "render" prop deprecated. This will be removed in the upcoming releases,' +
34
+ ' Please use the "renderDay" prop instead.');
35
+ }
36
+ if (!render && !renderDay) {
37
+ console.error('CalendarStripe component is missing the required "renderDay" prop');
38
+ }
39
39
  const [firstDate, setFirstDate] = useState(startDate);
40
40
  const [amountOfDaysToShow, setAmountOfDaysToShow] = useState(1);
41
41
  const [enableInitialAnimation, setEnableInitialAnimation] = useState(false);
42
42
  // The base for reacting on changing width of the wrapping element.
43
43
  // It uses a ResizeObserver under the hood.
44
- const columnWrapperRef = useRef();
44
+ const columnWrapperRef = useRef(null);
45
45
  const [columnWrapperWidth] = useElementSize(columnWrapperRef);
46
46
  const previous = usePrevious(getDateString(firstDate));
47
47
  const animationDirection = getDateString(firstDate) > previous ? ANIMATION_NEXT : ANIMATION_BACK;
@@ -53,7 +53,7 @@ const CalendarStripe = forwardRef((props, ref) => {
53
53
  }
54
54
  useAfterMount(() => {
55
55
  setEnableInitialAnimation(true);
56
- });
56
+ }, []);
57
57
  useLayoutEffect(() => {
58
58
  if (!columnWrapperRef.current) {
59
59
  return;
@@ -116,30 +116,6 @@ const CalendarStripe = forwardRef((props, ref) => {
116
116
  }
117
117
  const wrapperClassName = classNames('CalenderStripe', 'display-flex', 'align-items-center', 'overflow-hidden', 'bg-white', 'border', 'rounded', className);
118
118
  const baseButtonClassName = classNames('align-items-center', 'align-self-stretch', 'display-flex', 'hover-scale-105', 'hover-text-color-darkest', 'padding-10', 'cursor-pointer', 'text-color-darker', 'text-size-12', buttonClassName);
119
- return (_jsxs("div", Object.assign({ ref: ref, className: wrapperClassName }, { children: [_jsx("div", Object.assign({ className: baseButtonClassName, onClick: handlePrev }, { children: _jsx("span", { className: 'rioglyph rioglyph-chevron-left' }) })), _jsx("div", Object.assign({ className: 'flex-1-1 overflow-hidden', ref: columnWrapperRef }, { children: _jsx(AnimatePresence, Object.assign({ exitBeforeEnter: true, custom: animationDirection }, { children: _jsx(motion.div, Object.assign({ variants: variants, initial: enableInitialAnimation ? 'pageEnter' : false, animate: 'pageCenter', custom: animationDirection, transition: { duration: ANIMATION_DURATION } }, { children: _jsx("div", Object.assign({ className: 'ColumnWrapper display-flex space-x--1 user-select-none' }, { children: dates.map(date => (_jsx("div", Object.assign({ className: `${ITEM_NAME} flex-1-1` }, { children: React.cloneElement(render, {
120
- date,
121
- }) }), `${getDateString(date)}`))) })) }), getDateString(firstDate)) })) })), _jsx("div", Object.assign({ className: baseButtonClassName, onClick: handleNext }, { children: _jsx("span", { className: 'rioglyph rioglyph-chevron-right' }) }))] })));
119
+ return (_jsxs("div", Object.assign({ ref: ref, className: wrapperClassName }, { children: [_jsx("div", Object.assign({ className: baseButtonClassName, onClick: handlePrev }, { children: _jsx("span", { className: 'rioglyph rioglyph-chevron-left' }) })), _jsx("div", Object.assign({ className: 'flex-1-1 overflow-hidden', ref: columnWrapperRef }, { children: _jsx(AnimatePresence, Object.assign({ exitBeforeEnter: true, custom: animationDirection }, { children: _jsx(motion.div, Object.assign({ variants: variants, initial: enableInitialAnimation ? 'pageEnter' : false, animate: 'pageCenter', custom: animationDirection, transition: { duration: ANIMATION_DURATION } }, { children: _jsx("div", Object.assign({ className: 'ColumnWrapper display-flex space-x--1 user-select-none' }, { children: dates.map(date => (_jsxs("div", Object.assign({ className: `${ITEM_NAME} flex-1-1` }, { children: [renderDay ? renderDay(date) : null, render && React.cloneElement(_jsx(_Fragment, { children: render }), { date })] }), `${getDateString(date)}`))) })) }), getDateString(firstDate)) })) })), _jsx("div", Object.assign({ className: baseButtonClassName, onClick: handleNext }, { children: _jsx("span", { className: 'rioglyph rioglyph-chevron-right' }) }))] })));
122
120
  });
123
- CalendarStripe.defaultProps = {
124
- minDayWith: DEFAULT_MIN_WITH,
125
- minDays: DEFAULT_MIN_DAYS,
126
- maxDays: DEFAULT_MAX_DAYS,
127
- skipWeekends: false,
128
- onNextClick: () => { },
129
- onPreviousClick: () => { },
130
- buttonClassName: '',
131
- className: '',
132
- };
133
- CalendarStripe.propTypes = {
134
- minDayWith: PropTypes.number,
135
- minDays: PropTypes.number,
136
- maxDays: PropTypes.number,
137
- render: PropTypes.node.isRequired,
138
- skipWeekends: PropTypes.bool,
139
- startDate: PropTypes.instanceOf(Date),
140
- onNextClick: PropTypes.func,
141
- onPreviousClick: PropTypes.func,
142
- buttonClassName: PropTypes.string,
143
- className: PropTypes.string,
144
- };
145
121
  export default CalendarStripe;
@@ -1,2 +1,8 @@
1
- export { _Carousel as default };
2
- import { default as _Carousel } from "react-bootstrap/Carousel";
1
+ declare const Carousel: import("react-bootstrap/esm/helpers").BsPrefixRefForwardingComponent<"div", import("react-bootstrap/Carousel").CarouselProps> & {
2
+ Caption: import("react-bootstrap/esm/helpers").BsPrefixRefForwardingComponent<"div", unknown>;
3
+ Item: import("react-bootstrap/esm/CarouselItem").default;
4
+ } & {
5
+ PREV: 'prev';
6
+ NEXT: 'next';
7
+ };
8
+ export default Carousel;
@@ -1,9 +1,5 @@
1
- import React from 'react';
2
- // import { default as BSCarousel } from 'react-bootstrap/Carousel';
3
- // import { default as _Carousel } from 'react-bootstrap/Carousel';
4
- // const Carousel = props => {
5
- // return <_Carousel {...props} />;
6
- // };
7
- // export default Carousel;
8
- import { default as _Carousel } from 'react-bootstrap/Carousel';
9
- export { _Carousel as default };
1
+ import OriginalCarousel from 'react-bootstrap/Carousel';
2
+ const Carousel = OriginalCarousel;
3
+ Carousel.PREV = 'prev';
4
+ Carousel.NEXT = 'next';
5
+ export default Carousel;