@rio-cloud/rio-uikit 0.16.4-beta.13 → 0.16.4-beta.14
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/CustomState.d.ts +2 -5
- package/CustomState.js +2 -2
- package/EmptyState.d.ts +2 -5
- package/EmptyState.js +2 -2
- package/ErrorState.d.ts +2 -5
- package/ErrorState.js +2 -2
- package/ForbiddenState.d.ts +2 -5
- package/ForbiddenState.js +2 -2
- package/MaintenanceState.d.ts +2 -5
- package/MaintenanceState.js +2 -2
- package/NotBookedState.d.ts +2 -5
- package/NotFoundState.d.ts +2 -5
- package/NotFoundState.js +2 -2
- package/Notification.d.ts +2 -9
- package/Notification.js +2 -2
- package/NotificationsContainer.d.ts +2 -5
- package/NotificationsContainer.js +2 -2
- package/Tag.d.ts +2 -5
- package/Tag.js +2 -2
- package/TagList.d.ts +1 -5
- package/TagList.js +1 -2
- package/TagManager.d.ts +2 -5
- package/TagManager.js +2 -2
- package/Teaser.d.ts +2 -5
- package/Teaser.js +2 -2
- package/TeaserContainer.d.ts +2 -5
- package/TeaserContainer.js +2 -2
- package/TimePicker.d.ts +2 -5
- package/TimePicker.js +2 -2
- package/components/expander/ExpanderPanel.d.ts +1 -0
- package/components/expander/ExpanderPanel.js +4 -3
- package/components/notification/Notification.d.ts +32 -1
- package/components/notification/Notification.js +3 -2
- package/components/notification/NotificationsContainer.d.ts +7 -13
- package/components/notification/NotificationsContainer.js +2 -8
- package/components/states/BaseStateProps.d.ts +66 -0
- package/components/states/BaseStateProps.js +2 -0
- package/components/states/CustomState.d.ts +4 -14
- package/components/states/CustomState.js +13 -40
- package/components/states/EmptyState.d.ts +4 -8
- package/components/states/EmptyState.js +6 -6
- package/components/states/ErrorState.d.ts +4 -8
- package/components/states/ErrorState.js +6 -6
- package/components/states/ForbiddenState.d.ts +4 -8
- package/components/states/ForbiddenState.js +6 -6
- package/components/states/MaintenanceState.d.ts +4 -8
- package/components/states/MaintenanceState.js +6 -6
- package/components/states/NotBookedState.d.ts +9 -19
- package/components/states/NotBookedState.js +8 -23
- package/components/states/NotFoundState.d.ts +4 -8
- package/components/states/NotFoundState.js +6 -6
- package/components/states/StateButton.d.ts +27 -0
- package/components/states/StateButton.js +13 -0
- package/components/states/StateIcon.d.ts +7 -0
- package/components/states/StateIcon.js +4 -0
- package/components/tag/Tag.d.ts +69 -36
- package/components/tag/Tag.js +7 -30
- package/components/tag/TagList.d.ts +24 -16
- package/components/tag/TagList.js +6 -15
- package/components/tagManager/CustomSuggestionItem.d.ts +6 -12
- package/components/tagManager/CustomSuggestionItem.js +4 -9
- package/components/tagManager/TagManager.d.ts +61 -26
- package/components/tagManager/TagManager.js +22 -39
- package/components/tagManager/TagManagerItemList.d.ts +6 -13
- package/components/tagManager/TagManagerItemList.js +3 -13
- package/components/tagManager/TagManagerTag.d.ts +5 -0
- package/components/tagManager/TagManagerTag.js +1 -0
- package/components/teaser/Teaser.d.ts +93 -50
- package/components/teaser/Teaser.js +69 -118
- package/components/teaser/TeaserContainer.d.ts +25 -12
- package/components/teaser/TeaserContainer.js +10 -23
- package/components/timepicker/TimePicker.d.ts +34 -26
- package/components/timepicker/TimePicker.js +13 -30
- package/hooks/useDocumentTitle.d.ts +2 -0
- package/hooks/useDocumentTitle.js +9 -0
- package/hooks/useIsFirstRender.d.ts +2 -0
- package/hooks/useIsFirstRender.js +10 -0
- package/index.d.ts +28 -25
- package/index.js +28 -25
- package/lib/es/CustomState.d.ts +2 -5
- package/lib/es/CustomState.js +3 -2
- package/lib/es/EmptyState.d.ts +2 -5
- package/lib/es/EmptyState.js +3 -2
- package/lib/es/ErrorState.d.ts +2 -5
- package/lib/es/ErrorState.js +3 -2
- package/lib/es/ForbiddenState.d.ts +2 -5
- package/lib/es/ForbiddenState.js +3 -2
- package/lib/es/MaintenanceState.d.ts +2 -5
- package/lib/es/MaintenanceState.js +3 -2
- package/lib/es/NotBookedState.d.ts +2 -5
- package/lib/es/NotFoundState.d.ts +2 -5
- package/lib/es/NotFoundState.js +3 -2
- package/lib/es/Notification.d.ts +2 -9
- package/lib/es/Notification.js +3 -2
- package/lib/es/NotificationsContainer.d.ts +2 -5
- package/lib/es/NotificationsContainer.js +3 -2
- package/lib/es/Tag.d.ts +2 -5
- package/lib/es/Tag.js +3 -2
- package/lib/es/TagList.d.ts +1 -5
- package/lib/es/TagList.js +5 -3
- package/lib/es/TagManager.d.ts +2 -5
- package/lib/es/TagManager.js +3 -2
- package/lib/es/Teaser.d.ts +2 -5
- package/lib/es/Teaser.js +3 -2
- package/lib/es/TeaserContainer.d.ts +2 -5
- package/lib/es/TeaserContainer.js +3 -2
- package/lib/es/TimePicker.d.ts +2 -5
- package/lib/es/TimePicker.js +3 -2
- package/lib/es/components/expander/ExpanderPanel.d.ts +1 -0
- package/lib/es/components/expander/ExpanderPanel.js +4 -3
- package/lib/es/components/notification/Notification.d.ts +32 -1
- package/lib/es/components/notification/Notification.js +3 -2
- package/lib/es/components/notification/NotificationsContainer.d.ts +7 -13
- package/lib/es/components/notification/NotificationsContainer.js +2 -8
- package/lib/es/components/states/BaseStateProps.d.ts +66 -0
- package/lib/es/components/states/BaseStateProps.js +4 -0
- package/lib/es/components/states/CustomState.d.ts +4 -14
- package/lib/es/components/states/CustomState.js +14 -41
- package/lib/es/components/states/EmptyState.d.ts +4 -8
- package/lib/es/components/states/EmptyState.js +5 -6
- package/lib/es/components/states/ErrorState.d.ts +4 -8
- package/lib/es/components/states/ErrorState.js +5 -6
- package/lib/es/components/states/ForbiddenState.d.ts +4 -8
- package/lib/es/components/states/ForbiddenState.js +5 -6
- package/lib/es/components/states/MaintenanceState.d.ts +4 -8
- package/lib/es/components/states/MaintenanceState.js +5 -6
- package/lib/es/components/states/NotBookedState.d.ts +9 -19
- package/lib/es/components/states/NotBookedState.js +7 -22
- package/lib/es/components/states/NotFoundState.d.ts +4 -8
- package/lib/es/components/states/NotFoundState.js +5 -6
- package/lib/es/components/states/StateButton.d.ts +27 -0
- package/lib/es/components/states/StateButton.js +16 -0
- package/lib/es/components/states/StateIcon.d.ts +7 -0
- package/lib/es/components/states/StateIcon.js +6 -0
- package/lib/es/components/tag/Tag.d.ts +69 -36
- package/lib/es/components/tag/Tag.js +7 -30
- package/lib/es/components/tag/TagList.d.ts +24 -16
- package/lib/es/components/tag/TagList.js +6 -15
- package/lib/es/components/tagManager/CustomSuggestionItem.d.ts +6 -12
- package/lib/es/components/tagManager/CustomSuggestionItem.js +4 -9
- package/lib/es/components/tagManager/TagManager.d.ts +61 -26
- package/lib/es/components/tagManager/TagManager.js +22 -39
- package/lib/es/components/tagManager/TagManagerItemList.d.ts +6 -13
- package/lib/es/components/tagManager/TagManagerItemList.js +3 -13
- package/lib/es/components/tagManager/TagManagerTag.d.ts +5 -0
- package/lib/es/components/tagManager/TagManagerTag.js +2 -0
- package/lib/es/components/teaser/Teaser.d.ts +93 -50
- package/lib/es/components/teaser/Teaser.js +69 -120
- package/lib/es/components/teaser/TeaserContainer.d.ts +25 -12
- package/lib/es/components/teaser/TeaserContainer.js +10 -23
- package/lib/es/components/timepicker/TimePicker.d.ts +34 -26
- package/lib/es/components/timepicker/TimePicker.js +13 -30
- package/lib/es/hooks/useDocumentTitle.d.ts +2 -0
- package/lib/es/hooks/useDocumentTitle.js +11 -0
- package/lib/es/hooks/useIsFirstRender.d.ts +2 -0
- package/lib/es/hooks/useIsFirstRender.js +12 -0
- package/lib/es/index.d.ts +28 -25
- package/lib/es/index.js +46 -30
- package/lib/es/types.d.ts +1 -112
- package/lib/es/useDocumentTitle.d.ts +2 -0
- package/lib/es/useDocumentTitle.js +7 -0
- package/lib/es/useIsFirstRender.d.ts +2 -0
- package/lib/es/useIsFirstRender.js +7 -0
- package/lib/es/version.json +1 -1
- package/package.json +28 -22
- package/types.d.ts +1 -112
- package/useDocumentTitle.d.ts +2 -0
- package/useDocumentTitle.js +2 -0
- package/useIsFirstRender.d.ts +2 -0
- package/useIsFirstRender.js +2 -0
- package/version.json +1 -1
package/CustomState.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { CustomStateProps } from './types';
|
|
4
|
-
export default class CustomState extends React.Component<CustomStateProps> {}
|
|
5
|
-
}
|
|
1
|
+
export { default } from './components/states/CustomState';
|
|
2
|
+
export * from './components/states/CustomState';
|
package/CustomState.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/states/CustomState';
|
|
2
|
+
export * from './components/states/CustomState';
|
package/EmptyState.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { EmptyStateProps } from './types';
|
|
4
|
-
export default class EmptyState extends React.Component<EmptyStateProps> {}
|
|
5
|
-
}
|
|
1
|
+
export { default } from './components/states/EmptyState';
|
|
2
|
+
export * from './components/states/EmptyState';
|
package/EmptyState.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/states/EmptyState';
|
|
2
|
+
export * from './components/states/EmptyState';
|
package/ErrorState.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { ErrorStateProps } from './types';
|
|
4
|
-
export default class ErrorState extends React.Component<ErrorStateProps> {}
|
|
5
|
-
}
|
|
1
|
+
export { default } from './components/states/ErrorState';
|
|
2
|
+
export * from './components/states/ErrorState';
|
package/ErrorState.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/states/ErrorState';
|
|
2
|
+
export * from './components/states/ErrorState';
|
package/ForbiddenState.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { ForbiddenStateProps } from './types';
|
|
4
|
-
export default class ForbiddenState extends React.Component<ForbiddenStateProps> {}
|
|
5
|
-
}
|
|
1
|
+
export { default } from './components/states/ForbiddenState';
|
|
2
|
+
export * from './components/states/ForbiddenState';
|
package/ForbiddenState.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/states/ForbiddenState';
|
|
2
|
+
export * from './components/states/ForbiddenState';
|
package/MaintenanceState.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { MaintenanceStateProps } from './types';
|
|
4
|
-
export default class MaintenanceState extends React.Component<MaintenanceStateProps> {}
|
|
5
|
-
}
|
|
1
|
+
export { default } from './components/states/MaintenanceState';
|
|
2
|
+
export * from './components/states/MaintenanceState';
|
package/MaintenanceState.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/states/MaintenanceState';
|
|
2
|
+
export * from './components/states/MaintenanceState';
|
package/NotBookedState.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { NotBookedStateProps } from './types';
|
|
4
|
-
export default class NotBookedState extends React.Component<NotBookedStateProps> {}
|
|
5
|
-
}
|
|
1
|
+
import { default as _NotBookedState } from './components/states/NotBookedState';
|
|
2
|
+
export { _NotBookedState as default };
|
package/NotFoundState.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { NotFoundStateProps } from './types';
|
|
4
|
-
export default class NotFoundState extends React.Component<NotFoundStateProps> {}
|
|
5
|
-
}
|
|
1
|
+
export { default } from './components/states/NotFoundState';
|
|
2
|
+
export * from './components/states/NotFoundState';
|
package/NotFoundState.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/states/NotFoundState';
|
|
2
|
+
export * from './components/states/NotFoundState';
|
package/Notification.d.ts
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default class Notification {
|
|
4
|
-
static success: notificationTriggerFunction;
|
|
5
|
-
static info: notificationTriggerFunction;
|
|
6
|
-
static warning: notificationTriggerFunction;
|
|
7
|
-
static error: notificationTriggerFunction;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
export { default } from './components/notification/Notification';
|
|
2
|
+
export * from './components/notification/Notification';
|
package/Notification.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/notification/Notification';
|
|
2
|
+
export * from './components/notification/Notification';
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { NotificationsContainerProps } from './types';
|
|
4
|
-
export default class NotificationsContainer extends React.Component<NotificationsContainerProps> {}
|
|
5
|
-
}
|
|
1
|
+
export { default } from './components/notification/NotificationsContainer';
|
|
2
|
+
export * from './components/notification/NotificationsContainer';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/notification/NotificationsContainer';
|
|
2
|
+
export * from './components/notification/NotificationsContainer';
|
package/Tag.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { TagProps } from './types';
|
|
4
|
-
export default class Tag extends React.Component<TagProps> {}
|
|
5
|
-
}
|
|
1
|
+
export { default } from './components/tag/Tag';
|
|
2
|
+
export * from './components/tag/Tag';
|
package/Tag.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/tag/Tag';
|
|
2
|
+
export * from './components/tag/Tag';
|
package/TagList.d.ts
CHANGED
package/TagList.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { _TagList as default };
|
|
1
|
+
export { default } from './components/tag/TagList';
|
package/TagManager.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { TagManagerTag } from './types';
|
|
5
|
-
export default class TagManager extends React.Component<TagManagerProps> {}
|
|
1
|
+
export { default } from './components/tagManager/TagManager';
|
|
2
|
+
export * from './components/tagManager/TagManager';
|
package/TagManager.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/tagManager/TagManager';
|
|
2
|
+
export * from './components/tagManager/TagManager';
|
package/Teaser.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { TeaserProps } from './types';
|
|
4
|
-
export default class Teaser extends React.Component<TeaserProps> {}
|
|
5
|
-
}
|
|
1
|
+
export { default } from './components/teaser/Teaser';
|
|
2
|
+
export * from './components/teaser/Teaser';
|
package/Teaser.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/teaser/Teaser';
|
|
2
|
+
export * from './components/teaser/Teaser';
|
package/TeaserContainer.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { TeaserContainerProps } from './types';
|
|
4
|
-
export default class TeaserContainer extends React.Component<TeaserContainerProps> {}
|
|
5
|
-
}
|
|
1
|
+
export { default } from './components/teaser/TeaserContainer';
|
|
2
|
+
export * from './components/teaser/TeaserContainer';
|
package/TeaserContainer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/teaser/TeaserContainer';
|
|
2
|
+
export * from './components/teaser/TeaserContainer';
|
package/TimePicker.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { TimePickerProps } from './types';
|
|
4
|
-
export default class TimePicker extends React.Component<TimePickerProps> {}
|
|
5
|
-
}
|
|
1
|
+
export { default } from './components/timepicker/TimePicker';
|
|
2
|
+
export * from './components/timepicker/TimePicker';
|
package/TimePicker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { default } from './components/timepicker/TimePicker';
|
|
2
|
+
export * from './components/timepicker/TimePicker';
|
|
@@ -19,6 +19,7 @@ declare namespace ExpanderPanel {
|
|
|
19
19
|
export const className: PropTypes.Requireable<string>;
|
|
20
20
|
export const headerClassName: PropTypes.Requireable<string>;
|
|
21
21
|
export const titleClassName: PropTypes.Requireable<string>;
|
|
22
|
+
export const iconClassName: PropTypes.Requireable<string>;
|
|
22
23
|
export const bodyClassName: PropTypes.Requireable<string>;
|
|
23
24
|
export const title: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
|
|
24
25
|
const bsStyle_1: PropTypes.Requireable<string>;
|
|
@@ -2,10 +2,10 @@ import { __rest } from "tslib";
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React, { useEffect, useState } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import Collapse from '../collapse/Collapse';
|
|
6
5
|
import classNames from 'classnames';
|
|
6
|
+
import Collapse from '../collapse/Collapse';
|
|
7
7
|
const ExpanderPanel = props => {
|
|
8
|
-
const { bsStyle, className, iconLeft, title, headerClassName, titleClassName, bodyClassName, mountOnEnter, unmountOnExit, onEnter, onEntering, onEntered, onExit, onExiting, onExited, children, onToggle, open } = props, remainingProps = __rest(props, ["bsStyle", "className", "iconLeft", "title", "headerClassName", "titleClassName", "bodyClassName", "mountOnEnter", "unmountOnExit", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "children", "onToggle", "open"]);
|
|
8
|
+
const { bsStyle, className, iconLeft, title, headerClassName, titleClassName, bodyClassName, iconClassName, mountOnEnter, unmountOnExit, onEnter, onEntering, onEntered, onExit, onExiting, onExited, children, onToggle, open } = props, remainingProps = __rest(props, ["bsStyle", "className", "iconLeft", "title", "headerClassName", "titleClassName", "bodyClassName", "iconClassName", "mountOnEnter", "unmountOnExit", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "children", "onToggle", "open"]);
|
|
9
9
|
const [isOpen, setIsOpen] = useState(open);
|
|
10
10
|
// Update internal state from external prop change
|
|
11
11
|
useEffect(() => {
|
|
@@ -17,7 +17,7 @@ const ExpanderPanel = props => {
|
|
|
17
17
|
onToggle(newState);
|
|
18
18
|
};
|
|
19
19
|
const wrapperClassNames = classNames('expander-panel panel', `panel-${bsStyle}`, className);
|
|
20
|
-
const iconClassNames = classNames('expander-icon', 'rioglyph', 'rioglyph-chevron-down');
|
|
20
|
+
const iconClassNames = classNames('expander-icon', iconClassName, 'rioglyph', 'rioglyph-chevron-down');
|
|
21
21
|
const headerClassNames = classNames('panel-heading', isOpen && 'open', iconLeft && 'icon-left', headerClassName && headerClassName);
|
|
22
22
|
const titleClassNames = classNames('title', titleClassName && titleClassName);
|
|
23
23
|
const bodyClassNames = classNames('panel-body', bodyClassName && bodyClassName);
|
|
@@ -42,6 +42,7 @@ ExpanderPanel.propTypes = {
|
|
|
42
42
|
className: PropTypes.string,
|
|
43
43
|
headerClassName: PropTypes.string,
|
|
44
44
|
titleClassName: PropTypes.string,
|
|
45
|
+
iconClassName: PropTypes.string,
|
|
45
46
|
bodyClassName: PropTypes.string,
|
|
46
47
|
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
|
|
47
48
|
bsStyle: PropTypes.oneOf([
|
|
@@ -1 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type TriggerFunction = (
|
|
3
|
+
/**
|
|
4
|
+
* The message to be shown.
|
|
5
|
+
*/
|
|
6
|
+
message: string | React.ReactNode,
|
|
7
|
+
/**
|
|
8
|
+
* The title to be shown.
|
|
9
|
+
*/
|
|
10
|
+
title?: string | React.ReactNode,
|
|
11
|
+
/**
|
|
12
|
+
* The popup timeout in milliseconds.
|
|
13
|
+
*
|
|
14
|
+
* If you do not want it to automatically disappear you can define a very high timeOut.
|
|
15
|
+
*/
|
|
16
|
+
timeOut?: number,
|
|
17
|
+
/**
|
|
18
|
+
* A function that gets invoked when the notification is clicked.
|
|
19
|
+
*/
|
|
20
|
+
callback?: VoidFunction,
|
|
21
|
+
/**
|
|
22
|
+
* If true, the message gets inserted at the top of the notification stack.
|
|
23
|
+
*/
|
|
24
|
+
priority?: boolean) => void;
|
|
25
|
+
type NotificationTypeStub = {
|
|
26
|
+
success: TriggerFunction;
|
|
27
|
+
info: TriggerFunction;
|
|
28
|
+
warning: TriggerFunction;
|
|
29
|
+
error: TriggerFunction;
|
|
30
|
+
};
|
|
31
|
+
declare const _default: NotificationTypeStub;
|
|
32
|
+
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
// @ts-ignore-next-line importsNotUsedAsValues
|
|
2
|
+
import 'react';
|
|
3
|
+
// @ts-ignore-next-line 7016
|
|
1
4
|
import { NotificationManager as Notification } from 'react-notifications';
|
|
2
|
-
// TODO: implement: if callback + missing time => sticky
|
|
3
|
-
//const STICKY_TIME = 10000;
|
|
4
5
|
export default Notification;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
+
export type NotificationsContainerProps = {
|
|
2
|
+
/**
|
|
3
|
+
* Defines whether the notification are stacked.
|
|
4
|
+
*/
|
|
5
|
+
stacked?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const NotificationsContainer: ({ stacked }: NotificationsContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
8
|
export default NotificationsContainer;
|
|
2
|
-
declare function NotificationsContainer({ stacked }: {
|
|
3
|
-
stacked: any;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare namespace NotificationsContainer {
|
|
6
|
-
namespace defaultProps {
|
|
7
|
-
const stacked: boolean;
|
|
8
|
-
}
|
|
9
|
-
namespace propTypes {
|
|
10
|
-
const stacked_1: PropTypes.Requireable<boolean>;
|
|
11
|
-
export { stacked_1 as stacked };
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
import PropTypes from "prop-types";
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
2
|
+
import 'react';
|
|
4
3
|
import classNames from 'classnames';
|
|
4
|
+
// @ts-ignore-next-line 7016
|
|
5
5
|
import { NotificationContainer } from 'react-notifications';
|
|
6
6
|
const NotificationsContainer = ({ stacked }) => {
|
|
7
7
|
const wrapperClasses = classNames('notification-container-wrapper', stacked && 'stacked');
|
|
8
8
|
return (_jsx("div", Object.assign({ className: wrapperClasses }, { children: _jsx(NotificationContainer, {}) })));
|
|
9
9
|
};
|
|
10
|
-
NotificationsContainer.defaultProps = {
|
|
11
|
-
stacked: false,
|
|
12
|
-
};
|
|
13
|
-
NotificationsContainer.propTypes = {
|
|
14
|
-
stacked: PropTypes.bool,
|
|
15
|
-
};
|
|
16
10
|
export default NotificationsContainer;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TextAlignment } from '../../values/TextAlignment';
|
|
3
|
+
import type { StateButtonProps } from './StateButton';
|
|
4
|
+
import type { StateIconProps } from './StateIcon';
|
|
5
|
+
export type BaseStateProps = {
|
|
6
|
+
/**
|
|
7
|
+
* The icon to be shown.
|
|
8
|
+
*
|
|
9
|
+
* Default icons are defined for all states.
|
|
10
|
+
*/
|
|
11
|
+
icon?: string;
|
|
12
|
+
/**
|
|
13
|
+
* List of icons to show instead a single icon.
|
|
14
|
+
*
|
|
15
|
+
* @default []
|
|
16
|
+
*/
|
|
17
|
+
icons?: StateIconProps[];
|
|
18
|
+
/**
|
|
19
|
+
* Custom Image if needed.
|
|
20
|
+
*/
|
|
21
|
+
image?: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* The headline to be shown.
|
|
24
|
+
*/
|
|
25
|
+
headline?: string | React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* The text to display.
|
|
28
|
+
*/
|
|
29
|
+
message?: string | React.ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Definitions for the buttons to show.
|
|
32
|
+
*
|
|
33
|
+
* @default []
|
|
34
|
+
*/
|
|
35
|
+
buttons?: StateButtonProps[];
|
|
36
|
+
/**
|
|
37
|
+
* Defines whether to use 100% width or default width.
|
|
38
|
+
*
|
|
39
|
+
* Note: Only to be used for special cases on the CustomState component.
|
|
40
|
+
*
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
fullWidth?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Smaller icon and headline size.
|
|
46
|
+
*
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
condensed?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Defines where the panel is aligned.
|
|
52
|
+
*
|
|
53
|
+
* Possible values are: 'left', 'center' and 'right'.
|
|
54
|
+
*
|
|
55
|
+
* @default 'center'
|
|
56
|
+
*/
|
|
57
|
+
alignment?: TextAlignment;
|
|
58
|
+
/**
|
|
59
|
+
* Optional class names for the wrapper.
|
|
60
|
+
*/
|
|
61
|
+
outerClassName?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Optional class names for the content.
|
|
64
|
+
*/
|
|
65
|
+
innerClassName?: string;
|
|
66
|
+
};
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { BaseStateProps } from './BaseStateProps';
|
|
3
|
+
export type CustomStateProps = BaseStateProps;
|
|
4
|
+
declare const CustomState: (props: PropsWithChildren<CustomStateProps>) => import("react/jsx-runtime").JSX.Element;
|
|
1
5
|
export default CustomState;
|
|
2
|
-
declare function CustomState(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare namespace CustomState {
|
|
4
|
-
export namespace defaultProps {
|
|
5
|
-
export const icon: string;
|
|
6
|
-
export const icons: never[];
|
|
7
|
-
export const buttons: never[];
|
|
8
|
-
export { ALIGN_CENTER as alignment };
|
|
9
|
-
export const fullWidth: boolean;
|
|
10
|
-
export const condensed: boolean;
|
|
11
|
-
}
|
|
12
|
-
export { baseStatePropTypes as propTypes };
|
|
13
|
-
}
|
|
14
|
-
import { ALIGN_CENTER } from "./baseStatePropTypes";
|
|
15
|
-
import { baseStatePropTypes } from "./baseStatePropTypes";
|
|
@@ -1,58 +1,31 @@
|
|
|
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
5
|
import classNames from 'classnames';
|
|
6
6
|
import isEmpty from 'lodash/fp/isEmpty';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
return (_jsx("button", Object.assign({ className: buttonClassNames, type: 'button', onClick: onClick }, { children: text })));
|
|
7
|
+
import StateButton from './StateButton';
|
|
8
|
+
import StateIcon from './StateIcon';
|
|
9
|
+
const justify = {
|
|
10
|
+
left: 'justify-content-start',
|
|
11
|
+
center: 'justify-content-center',
|
|
12
|
+
right: 'justify-content-end',
|
|
15
13
|
};
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
return _jsx("span", { className: iconClassNames });
|
|
19
|
-
};
|
|
20
|
-
const getAlignmentClassName = alignment => {
|
|
21
|
-
switch (alignment) {
|
|
22
|
-
case ALIGN_LEFT:
|
|
23
|
-
return 'justify-content-start';
|
|
24
|
-
case ALIGN_CENTER:
|
|
25
|
-
return 'justify-content-center';
|
|
26
|
-
case ALIGN_RIGHT:
|
|
27
|
-
return 'justify-content-end';
|
|
28
|
-
default:
|
|
29
|
-
return 'justify-content-center';
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
const CustomState = props => {
|
|
33
|
-
const { icon, icons, image, headline, message, buttons, alignment, fullWidth, condensed, outerClassName, innerClassName, children } = props, remainingProps = __rest(props, ["icon", "icons", "image", "headline", "message", "buttons", "alignment", "fullWidth", "condensed", "outerClassName", "innerClassName", "children"]);
|
|
14
|
+
const CustomState = (props) => {
|
|
15
|
+
const { icon = 'rioglyph-rio', icons = [], image, headline, message, buttons = [], alignment = 'center', fullWidth = false, condensed = false, outerClassName, innerClassName, children } = props, remainingProps = __rest(props, ["icon", "icons", "image", "headline", "message", "buttons", "alignment", "fullWidth", "condensed", "outerClassName", "innerClassName", "children"]);
|
|
34
16
|
const wrapperClasses = classNames('margin-0', 'width-100pct', !fullWidth && 'max-width-600', 'panel-default', 'panel', condensed ? 'padding-10' : 'padding-15', outerClassName && outerClassName);
|
|
35
17
|
const innerClassNames = classNames('display-flex', 'flex-column', 'align-items-center', 'text-center', condensed ? 'padding-15' : 'padding-25', innerClassName && innerClassName);
|
|
36
18
|
const iconClasses = classNames(condensed ? 'text-size-16 margin-bottom-10' : 'text-size-h2 margin-bottom-20');
|
|
37
19
|
const iconsClasses = classNames(condensed ? 'text-size-16 margin-bottom-10' : 'text-size-h2 margin-bottom-20', 'display-flex', 'align-items-center', 'max-width-100pct');
|
|
38
20
|
const headlineClassNames = classNames(condensed ? 'text-size-h4' : 'text-size-h3 text-size-h2-sm', 'line-height-125rel', 'text-color-dark', 'text-medium', 'width-500', 'max-width-100pct');
|
|
39
21
|
const renderButtons = (_jsx("div", Object.assign({ className: 'btn-toolbar margin-top-20' }, { children: buttons.map((buttonProps, index) => (_jsx(StateButton, Object.assign({}, buttonProps), index))) })));
|
|
40
|
-
const renderIcon = (_jsx("div", Object.assign({ className: iconClasses }, { children: _jsx(
|
|
41
|
-
const renderIcons = (_jsx("div", Object.assign({ className: iconsClasses }, { children: icons.map((iconProps, index) => (_jsx(
|
|
22
|
+
const renderIcon = (_jsx("div", Object.assign({ className: iconClasses }, { children: _jsx(StateIcon, { name: icon }) })));
|
|
23
|
+
const renderIcons = (_jsx("div", Object.assign({ className: iconsClasses }, { children: icons.map((iconProps, index) => (_jsx(StateIcon, Object.assign({}, iconProps), index))) })));
|
|
42
24
|
const renderChildren = _jsx("div", Object.assign({ className: 'width-500 max-width-100pct margin-top-25' }, { children: children }));
|
|
43
25
|
const renderHeadline = _jsx("div", Object.assign({ className: headlineClassNames }, { children: headline }));
|
|
44
26
|
const renderMessage = _jsx("div", Object.assign({ className: 'text-color-dark margin-top-15 width-500 max-width-100pct' }, { children: message }));
|
|
45
27
|
const singleOrMultiIcon = isEmpty(icons) ? renderIcon : renderIcons;
|
|
46
28
|
const imageOrIcon = image ? image : singleOrMultiIcon;
|
|
47
|
-
return (_jsx("div", Object.assign({ className: `display-flex ${
|
|
48
|
-
};
|
|
49
|
-
CustomState.defaultProps = {
|
|
50
|
-
icon: 'rioglyph-rio',
|
|
51
|
-
icons: [],
|
|
52
|
-
buttons: [],
|
|
53
|
-
alignment: ALIGN_CENTER,
|
|
54
|
-
fullWidth: false,
|
|
55
|
-
condensed: false,
|
|
29
|
+
return (_jsx("div", Object.assign({ className: `display-flex ${justify[alignment]} max-width-100pct` }, remainingProps, { children: _jsx("div", Object.assign({ className: wrapperClasses }, { children: _jsxs("div", Object.assign({ className: innerClassNames }, { children: [imageOrIcon, headline && renderHeadline, message && renderMessage, !isEmpty(buttons) && renderButtons, children && renderChildren] })) })) })));
|
|
56
30
|
};
|
|
57
|
-
CustomState.propTypes = baseStatePropTypes;
|
|
58
31
|
export default CustomState;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { BaseStateProps } from './BaseStateProps';
|
|
3
|
+
export type EmptyStateProps = BaseStateProps;
|
|
4
|
+
declare const EmptyState: (props: PropsWithChildren<EmptyStateProps>) => import("react/jsx-runtime").JSX.Element;
|
|
1
5
|
export default EmptyState;
|
|
2
|
-
declare function EmptyState(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare namespace EmptyState {
|
|
4
|
-
export namespace defaultProps {
|
|
5
|
-
const icon: string;
|
|
6
|
-
}
|
|
7
|
-
export { baseStatePropTypes as propTypes };
|
|
8
|
-
}
|
|
9
|
-
import { baseStatePropTypes } from "./baseStatePropTypes";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
+
// @ts-ignore-next-line importsNotUsedAsValues
|
|
4
|
+
import 'react';
|
|
3
5
|
import CustomState from './CustomState';
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
icon: 'rioglyph-empty',
|
|
6
|
+
const EmptyState = (props) => {
|
|
7
|
+
const { icon = 'rioglyph-empty' } = props, remainingProps = __rest(props, ["icon"]);
|
|
8
|
+
return _jsx(CustomState, Object.assign({ icon: icon }, remainingProps));
|
|
8
9
|
};
|
|
9
|
-
EmptyState.propTypes = baseStatePropTypes;
|
|
10
10
|
export default EmptyState;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { BaseStateProps } from './BaseStateProps';
|
|
3
|
+
export type ErrorStateProps = BaseStateProps;
|
|
4
|
+
declare const ErrorState: (props: PropsWithChildren<ErrorStateProps>) => import("react/jsx-runtime").JSX.Element;
|
|
1
5
|
export default ErrorState;
|
|
2
|
-
declare function ErrorState(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare namespace ErrorState {
|
|
4
|
-
export namespace defaultProps {
|
|
5
|
-
const icon: string;
|
|
6
|
-
}
|
|
7
|
-
export { baseStatePropTypes as propTypes };
|
|
8
|
-
}
|
|
9
|
-
import { baseStatePropTypes } from "./baseStatePropTypes";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
+
// @ts-ignore-next-line importsNotUsedAsValues
|
|
4
|
+
import 'react';
|
|
3
5
|
import CustomState from './CustomState';
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
icon: 'rioglyph-truck-breakdown',
|
|
6
|
+
const ErrorState = (props) => {
|
|
7
|
+
const { icon = 'rioglyph-truck-breakdown' } = props, remainingProps = __rest(props, ["icon"]);
|
|
8
|
+
return _jsx(CustomState, Object.assign({ icon: icon }, remainingProps));
|
|
8
9
|
};
|
|
9
|
-
ErrorState.propTypes = baseStatePropTypes;
|
|
10
10
|
export default ErrorState;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { BaseStateProps } from './BaseStateProps';
|
|
3
|
+
export type ForbiddenStateProps = BaseStateProps;
|
|
4
|
+
declare const ForbiddenState: (props: PropsWithChildren<ForbiddenStateProps>) => import("react/jsx-runtime").JSX.Element;
|
|
1
5
|
export default ForbiddenState;
|
|
2
|
-
declare function ForbiddenState(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare namespace ForbiddenState {
|
|
4
|
-
export namespace defaultProps {
|
|
5
|
-
const icon: string;
|
|
6
|
-
}
|
|
7
|
-
export { baseStatePropTypes as propTypes };
|
|
8
|
-
}
|
|
9
|
-
import { baseStatePropTypes } from "./baseStatePropTypes";
|