@rio-cloud/rio-uikit 0.16.4-beta.18 → 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.
- package/Carousel.d.ts +2 -11
- package/Carousel.js +2 -2
- package/Dialog.d.ts +2 -15
- package/Dialog.js +2 -2
- package/Fade.d.ts +2 -14
- package/Fade.js +2 -2
- package/InfoDialog.d.ts +2 -5
- package/InfoDialog.js +2 -2
- package/MediaDialog.d.ts +2 -9
- package/MediaDialog.js +2 -2
- package/RadioButton.d.ts +2 -5
- package/RadioButton.js +2 -2
- package/ReleaseNotes.d.ts +2 -2
- package/ReleaseNotes.js +2 -2
- package/ReleaseNotesDialog.d.ts +2 -5
- package/SaveDialog.d.ts +2 -14
- package/SaveDialog.js +2 -2
- package/SimpleDialog.d.ts +2 -14
- package/SimpleDialog.js +2 -2
- package/SplitDialog.d.ts +2 -14
- package/SplitDialog.js +2 -2
- package/components/assetTree/TreeSummary.js +1 -1
- package/components/assetTree/TypeCounter.js +2 -2
- package/components/button/Button.d.ts +25 -19
- package/components/button/Button.js +11 -25
- package/components/carousel/Carousel.d.ts +8 -2
- package/components/carousel/Carousel.js +5 -9
- package/components/dialog/ConfirmationDialog.d.ts +11 -24
- package/components/dialog/ConfirmationDialog.js +8 -26
- package/components/dialog/Dialog.d.ts +102 -42
- package/components/dialog/Dialog.js +17 -25
- package/components/dialog/DialogBody.d.ts +5 -15
- package/components/dialog/DialogBody.js +4 -10
- package/components/dialog/DialogFooter.d.ts +6 -15
- package/components/dialog/DialogFooter.js +6 -12
- package/components/dialog/DialogHeader.d.ts +10 -17
- package/components/dialog/DialogHeader.js +7 -15
- package/components/dialog/InfoDialog.d.ts +9 -17
- package/components/dialog/InfoDialog.js +6 -7
- package/components/dialog/MediaDialog.d.ts +64 -57
- package/components/dialog/MediaDialog.js +40 -83
- package/components/dialog/ReleaseNotesDialog.d.ts +56 -19
- package/components/dialog/ReleaseNotesDialog.js +9 -30
- package/components/dialog/SaveDialog.d.ts +34 -30
- package/components/dialog/SaveDialog.js +8 -18
- package/components/dialog/SimpleDialog.d.ts +9 -20
- package/components/dialog/SimpleDialog.js +6 -10
- package/components/dialog/SplitDialog.d.ts +21 -31
- package/components/dialog/SplitDialog.js +5 -15
- package/components/fade/Fade.d.ts +75 -45
- package/components/fade/Fade.js +16 -98
- package/components/map/components/features/layers/baselayers/useBaseLayer.js +0 -1
- package/components/numberControl/NumberControl.js +4 -4
- package/components/numberInput/NumberInput.d.ts +22 -0
- package/components/numberInput/NumberInput.js +6 -6
- package/components/radiobutton/RadioButton.d.ts +110 -44
- package/components/radiobutton/RadioButton.js +16 -44
- package/components/releaseNotes/ReleaseNotes.d.ts +7 -6
- package/components/selects/Select.d.ts +1 -0
- package/components/selects/Select.js +14 -6
- package/components/sidebars/Sidebar.js +1 -1
- package/hooks/useAfterMount.d.ts +1 -1
- package/hooks/useMergeRefs.d.ts +4 -0
- package/hooks/useMergeRefs.js +28 -0
- package/index.d.ts +22 -22
- package/index.js +22 -22
- package/lib/es/Carousel.d.ts +2 -11
- package/lib/es/Carousel.js +3 -2
- package/lib/es/Dialog.d.ts +2 -15
- package/lib/es/Dialog.js +3 -2
- package/lib/es/Fade.d.ts +2 -14
- package/lib/es/Fade.js +3 -2
- package/lib/es/InfoDialog.d.ts +2 -5
- package/lib/es/InfoDialog.js +3 -2
- package/lib/es/MediaDialog.d.ts +2 -9
- package/lib/es/MediaDialog.js +3 -2
- package/lib/es/RadioButton.d.ts +2 -5
- package/lib/es/RadioButton.js +3 -2
- package/lib/es/ReleaseNotes.d.ts +2 -2
- package/lib/es/ReleaseNotes.js +3 -2
- package/lib/es/ReleaseNotesDialog.d.ts +2 -5
- package/lib/es/SaveDialog.d.ts +2 -14
- package/lib/es/SaveDialog.js +3 -2
- package/lib/es/SimpleDialog.d.ts +2 -14
- package/lib/es/SimpleDialog.js +3 -2
- package/lib/es/SplitDialog.d.ts +2 -14
- package/lib/es/SplitDialog.js +3 -2
- package/lib/es/components/assetTree/TreeSummary.js +1 -1
- package/lib/es/components/assetTree/TypeCounter.js +2 -2
- package/lib/es/components/button/Button.d.ts +25 -19
- package/lib/es/components/button/Button.js +11 -25
- package/lib/es/components/carousel/Carousel.d.ts +8 -2
- package/lib/es/components/carousel/Carousel.js +4 -9
- package/lib/es/components/dialog/ConfirmationDialog.d.ts +11 -24
- package/lib/es/components/dialog/ConfirmationDialog.js +8 -26
- package/lib/es/components/dialog/Dialog.d.ts +102 -42
- package/lib/es/components/dialog/Dialog.js +17 -25
- package/lib/es/components/dialog/DialogBody.d.ts +5 -15
- package/lib/es/components/dialog/DialogBody.js +4 -10
- package/lib/es/components/dialog/DialogFooter.d.ts +6 -15
- package/lib/es/components/dialog/DialogFooter.js +6 -12
- package/lib/es/components/dialog/DialogHeader.d.ts +10 -17
- package/lib/es/components/dialog/DialogHeader.js +7 -15
- package/lib/es/components/dialog/InfoDialog.d.ts +9 -17
- package/lib/es/components/dialog/InfoDialog.js +5 -7
- package/lib/es/components/dialog/MediaDialog.d.ts +64 -57
- package/lib/es/components/dialog/MediaDialog.js +40 -83
- package/lib/es/components/dialog/ReleaseNotesDialog.d.ts +56 -19
- package/lib/es/components/dialog/ReleaseNotesDialog.js +9 -30
- package/lib/es/components/dialog/SaveDialog.d.ts +34 -30
- package/lib/es/components/dialog/SaveDialog.js +8 -18
- package/lib/es/components/dialog/SimpleDialog.d.ts +9 -20
- package/lib/es/components/dialog/SimpleDialog.js +5 -10
- package/lib/es/components/dialog/SplitDialog.d.ts +21 -31
- package/lib/es/components/dialog/SplitDialog.js +5 -15
- package/lib/es/components/fade/Fade.d.ts +75 -45
- package/lib/es/components/fade/Fade.js +16 -98
- package/lib/es/components/map/components/features/layers/baselayers/useBaseLayer.js +0 -1
- package/lib/es/components/numberControl/NumberControl.js +4 -4
- package/lib/es/components/numberInput/NumberInput.d.ts +22 -0
- package/lib/es/components/numberInput/NumberInput.js +5 -5
- package/lib/es/components/radiobutton/RadioButton.d.ts +110 -44
- package/lib/es/components/radiobutton/RadioButton.js +16 -44
- package/lib/es/components/releaseNotes/ReleaseNotes.d.ts +7 -6
- package/lib/es/components/selects/Select.d.ts +1 -0
- package/lib/es/components/selects/Select.js +14 -6
- package/lib/es/components/sidebars/Sidebar.js +1 -1
- package/lib/es/hooks/useAfterMount.d.ts +1 -1
- package/lib/es/hooks/useMergeRefs.d.ts +4 -0
- package/lib/es/hooks/useMergeRefs.js +30 -0
- package/lib/es/index.d.ts +22 -22
- package/lib/es/index.js +37 -26
- package/lib/es/types.d.ts +0 -205
- package/lib/es/version.json +1 -1
- package/package.json +2 -2
- package/types.d.ts +0 -205
- package/version.json +1 -1
package/Carousel.d.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/carousel/Carousel';
|
|
2
|
+
export * from './components/carousel/Carousel';
|
package/Dialog.d.ts
CHANGED
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/dialog/Dialog';
|
|
2
|
+
export * from './components/dialog/Dialog';
|
package/Fade.d.ts
CHANGED
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/fade/Fade';
|
|
2
|
+
export * from './components/fade/Fade';
|
package/InfoDialog.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/dialog/InfoDialog';
|
|
2
|
+
export * from './components/dialog/InfoDialog';
|
package/MediaDialog.d.ts
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/dialog/MediaDialog';
|
|
2
|
+
export * from './components/dialog/MediaDialog';
|
package/RadioButton.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/radiobutton/RadioButton';
|
|
2
|
+
export * from './components/radiobutton/RadioButton';
|
package/ReleaseNotes.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
1
|
+
export { default } from './components/releaseNotes/ReleaseNotes';
|
|
2
|
+
export * from './components/releaseNotes/ReleaseNotes';
|
package/ReleaseNotes.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/releaseNotes/ReleaseNotes';
|
|
2
|
+
export * from './components/releaseNotes/ReleaseNotes';
|
package/ReleaseNotesDialog.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/dialog/SaveDialog';
|
|
2
|
+
export * from './components/dialog/SaveDialog';
|
package/SimpleDialog.d.ts
CHANGED
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/dialog/SimpleDialog';
|
|
2
|
+
export * from './components/dialog/SimpleDialog';
|
package/SplitDialog.d.ts
CHANGED
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
export
|
|
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-
|
|
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
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
DEFAULT:
|
|
111
|
-
PRIMARY:
|
|
112
|
-
SECONDARY:
|
|
113
|
-
INFO:
|
|
114
|
-
WARNING:
|
|
115
|
-
DANGER:
|
|
116
|
-
SUCCESS:
|
|
117
|
-
MUTED:
|
|
118
|
-
VARIANT_LINK:
|
|
119
|
-
VARIANT_LINK_INLINE:
|
|
120
|
-
VARIANT_OUTLINE:
|
|
121
|
-
VARIANT_ACTION:
|
|
122
|
-
XS:
|
|
123
|
-
SM:
|
|
124
|
-
MD:
|
|
125
|
-
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 ===
|
|
58
|
-
return (_jsxs("button", Object.assign({ ref:
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
Button
|
|
62
|
-
Button
|
|
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,2 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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;
|
|
@@ -1,25 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type BaseDialogProps } from './Dialog';
|
|
3
|
+
export type ConfirmationDialogProps = BaseDialogProps & {
|
|
4
|
+
content?: string | React.ReactNode;
|
|
5
|
+
onClickConfirm?: VoidFunction;
|
|
6
|
+
onClickCancel?: VoidFunction;
|
|
7
|
+
cancelButtonText?: string | React.ReactNode;
|
|
8
|
+
confirmButtonText?: string | React.ReactNode;
|
|
9
|
+
disableConfirm?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const ConfirmationDialog: (props: ConfirmationDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
12
|
export default ConfirmationDialog;
|
|
2
|
-
declare function ConfirmationDialog(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare namespace ConfirmationDialog {
|
|
4
|
-
namespace defaultProps {
|
|
5
|
-
const show: boolean;
|
|
6
|
-
function onClickCancel(): void;
|
|
7
|
-
function onClickConfirm(): void;
|
|
8
|
-
}
|
|
9
|
-
namespace propTypes {
|
|
10
|
-
const show_1: PropTypes.Validator<boolean>;
|
|
11
|
-
export { show_1 as show };
|
|
12
|
-
export const title: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
13
|
-
export const subtitle: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
14
|
-
export const content: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
15
|
-
const onClickCancel_1: PropTypes.Validator<(...args: any[]) => any>;
|
|
16
|
-
export { onClickCancel_1 as onClickCancel };
|
|
17
|
-
const onClickConfirm_1: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
-
export { onClickConfirm_1 as onClickConfirm };
|
|
19
|
-
export const cancelButtonText: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
20
|
-
export const confirmButtonText: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
21
|
-
export const disableConfirm: PropTypes.Requireable<boolean>;
|
|
22
|
-
export const bsSize: PropTypes.Requireable<string>;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
import PropTypes from "prop-types";
|
|
@@ -1,31 +1,13 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
import
|
|
3
|
+
// @ts-ignore-next-line importsNotUsedAsValues
|
|
4
|
+
import 'react';
|
|
5
|
+
import noop from 'lodash/fp/noop';
|
|
6
|
+
import Button from '../button/Button';
|
|
5
7
|
import Dialog from './Dialog';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const { content, onClickCancel, cancelButtonText, onClickConfirm, confirmButtonText, disableConfirm } = props, remainingProps = __rest(props, ["content", "onClickCancel", "cancelButtonText", "onClickConfirm", "confirmButtonText", "disableConfirm"]);
|
|
11
|
-
const footer = (_jsxs("div", Object.assign({ className: 'display-flex justify-content-end btn-toolbar' }, { children: [_jsx("button", Object.assign({ type: 'button', className: 'CancelButton btn btn-default', onClick: onClickCancel }, { children: cancelButtonText })), _jsx("button", Object.assign({ type: 'button', className: 'ConfirmationButton btn btn-primary', onClick: onClickConfirm, disabled: disableConfirm }, { children: confirmButtonText }))] })));
|
|
12
|
-
return (_jsx(Dialog, Object.assign({}, remainingProps, { body: content, footer: footer, onHide: onClickCancel, showCloseButton: false, className: 'confirmation-dialog', disableEsc: true })));
|
|
13
|
-
};
|
|
14
|
-
ConfirmationDialog.defaultProps = {
|
|
15
|
-
show: false,
|
|
16
|
-
onClickCancel: () => { },
|
|
17
|
-
onClickConfirm: () => { },
|
|
18
|
-
};
|
|
19
|
-
ConfirmationDialog.propTypes = {
|
|
20
|
-
show: PropTypes.bool.isRequired,
|
|
21
|
-
title: PropTypes.node.isRequired,
|
|
22
|
-
subtitle: PropTypes.node,
|
|
23
|
-
content: PropTypes.node.isRequired,
|
|
24
|
-
onClickCancel: PropTypes.func.isRequired,
|
|
25
|
-
onClickConfirm: PropTypes.func.isRequired,
|
|
26
|
-
cancelButtonText: PropTypes.node.isRequired,
|
|
27
|
-
confirmButtonText: PropTypes.node.isRequired,
|
|
28
|
-
disableConfirm: PropTypes.bool,
|
|
29
|
-
bsSize: PropTypes.string,
|
|
8
|
+
const ConfirmationDialog = (props) => {
|
|
9
|
+
const { content, onClickCancel = noop, cancelButtonText, onClickConfirm = noop, confirmButtonText, disableConfirm } = props, remainingProps = __rest(props, ["content", "onClickCancel", "cancelButtonText", "onClickConfirm", "confirmButtonText", "disableConfirm"]);
|
|
10
|
+
const footer = (_jsxs("div", Object.assign({ className: 'display-flex justify-content-end btn-toolbar' }, { children: [_jsx(Button, Object.assign({ className: 'CancelButton', onClick: onClickCancel }, { children: cancelButtonText })), _jsx(Button, Object.assign({ bsStyle: 'primary', className: 'ConfirmationButton', onClick: onClickConfirm, disabled: disableConfirm }, { children: confirmButtonText }))] })));
|
|
11
|
+
return (_jsx(Dialog, Object.assign({}, remainingProps, { body: content, footer: footer, onClose: onClickCancel, showCloseButton: false, className: 'confirmation-dialog', disableEsc: true })));
|
|
30
12
|
};
|
|
31
13
|
export default ConfirmationDialog;
|
|
@@ -1,43 +1,103 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type bsSizeDialog = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'fullwidth' | 'fullheight' | 'fullscreen';
|
|
3
|
+
export type BaseDialogProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Opens the dialog when set to `true`.
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
8
|
+
show: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* The dialog title (can also be a FormattedMessage component).
|
|
11
|
+
*/
|
|
12
|
+
title?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* The dialog header subtitle content.
|
|
15
|
+
*/
|
|
16
|
+
subtitle?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Shows a close button when set to `true`.
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
showCloseButton?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* A callback function invoked when the dialog closes.
|
|
24
|
+
*/
|
|
25
|
+
onClose?: Function;
|
|
26
|
+
/**
|
|
27
|
+
* Defined how large the dialog will be rendered.
|
|
28
|
+
* By default, the dialog has a medium size and thus it can be omitted.
|
|
29
|
+
*
|
|
30
|
+
* Possible values are: `xs`, `sm`, `lg` `xl` `fullwidth` `fullheight` `fullscreen`
|
|
31
|
+
* @default 'md'
|
|
32
|
+
*/
|
|
33
|
+
bsSize?: bsSizeDialog;
|
|
34
|
+
/**
|
|
35
|
+
* Enables or disabled closing the dialog via esc key.
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
disableEsc?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Enables the modal body to overflow and use inline scrolling if needed.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
useOverflow?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Show Header and Footer Borders for the "xs" dialog
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
showXsDialogBorders?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Additional classes for the modal element.
|
|
51
|
+
*/
|
|
52
|
+
className?: string;
|
|
53
|
+
};
|
|
54
|
+
export type DialogProps = BaseDialogProps & {
|
|
55
|
+
/**
|
|
56
|
+
* The dialog body content.
|
|
57
|
+
*/
|
|
58
|
+
body: React.ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* The dialog body content.
|
|
61
|
+
*/
|
|
62
|
+
footer?: React.ReactNode;
|
|
63
|
+
/**
|
|
64
|
+
* Additional classes for the modal-body element.
|
|
65
|
+
*/
|
|
66
|
+
bodyClassName?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Additional classes for the modal-footer element.
|
|
69
|
+
*/
|
|
70
|
+
footerClassName?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Allows to add additional buttons to the dialog header.
|
|
73
|
+
*/
|
|
74
|
+
headerButtons?: React.ReactNode;
|
|
75
|
+
/**
|
|
76
|
+
* Deprecate to align with other dialog callbacks.
|
|
77
|
+
* @deprecated please use `onClose`
|
|
78
|
+
*/
|
|
79
|
+
onHide?: VoidFunction;
|
|
80
|
+
/**
|
|
81
|
+
* A callback fired when esc key is pressed and the dialog is about to close.
|
|
82
|
+
*/
|
|
83
|
+
onEsc?: VoidFunction;
|
|
84
|
+
/**
|
|
85
|
+
* A callback function to be executed before closing the dialog. If the function returns
|
|
86
|
+
* `false` the dialog will not be closed
|
|
87
|
+
* @returns
|
|
88
|
+
*/
|
|
89
|
+
onCloseValidation?: () => boolean;
|
|
90
|
+
};
|
|
91
|
+
declare const Dialog: {
|
|
92
|
+
(props: DialogProps): React.ReactPortal;
|
|
93
|
+
SIZE_XS: "xs";
|
|
94
|
+
SIZE_SM: "sm";
|
|
95
|
+
SIZE_MD: "md";
|
|
96
|
+
SIZE_LG: "lg";
|
|
97
|
+
SIZE_XL: "xl";
|
|
98
|
+
SIZE_FULL: "full";
|
|
99
|
+
SIZE_FULL_WIDTH: "fullwidth";
|
|
100
|
+
SIZE_FULL_HEIGHT: "fullheight";
|
|
101
|
+
SIZE_FULL_SCREEN: "fullscreen";
|
|
102
|
+
};
|
|
1
103
|
export default Dialog;
|
|
2
|
-
declare function Dialog(props: any): React.ReactPortal;
|
|
3
|
-
declare namespace Dialog {
|
|
4
|
-
const SIZE_SM: string;
|
|
5
|
-
const SIZE_MD: string;
|
|
6
|
-
const SIZE_LG: string;
|
|
7
|
-
const SIZE_XL: string;
|
|
8
|
-
const SIZE_FULL: string;
|
|
9
|
-
const SIZE_FULL_WIDTH: string;
|
|
10
|
-
const SIZE_FULL_HEIGHT: string;
|
|
11
|
-
const SIZE_FULL_SCREEN: string;
|
|
12
|
-
namespace defaultProps {
|
|
13
|
-
const show: boolean;
|
|
14
|
-
function onHide(): void;
|
|
15
|
-
function onEsc(): void;
|
|
16
|
-
const className: string;
|
|
17
|
-
const showCloseButton: boolean;
|
|
18
|
-
const disableEsc: boolean;
|
|
19
|
-
const useOverflow: boolean;
|
|
20
|
-
function onCloseValidation(): boolean;
|
|
21
|
-
}
|
|
22
|
-
const propTypes: {
|
|
23
|
-
body: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
24
|
-
footer: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
25
|
-
headerButtons: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
26
|
-
className: PropTypes.Requireable<string>;
|
|
27
|
-
bodyClassName: PropTypes.Requireable<string>;
|
|
28
|
-
footerClassName: PropTypes.Requireable<string>;
|
|
29
|
-
onHide: PropTypes.Requireable<(...args: any[]) => any>;
|
|
30
|
-
onEsc: PropTypes.Requireable<(...args: any[]) => any>;
|
|
31
|
-
show: PropTypes.Validator<boolean>;
|
|
32
|
-
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
33
|
-
subtitle: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
34
|
-
iconNavigation: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
35
|
-
showCloseButton: PropTypes.Requireable<boolean>;
|
|
36
|
-
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
37
|
-
bsSize: PropTypes.Requireable<string>;
|
|
38
|
-
disableEsc: PropTypes.Requireable<boolean>;
|
|
39
|
-
useOverflow: PropTypes.Requireable<boolean>;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
import React from "react";
|
|
43
|
-
import PropTypes from "prop-types";
|