@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.
Files changed (171) hide show
  1. package/CustomState.d.ts +2 -5
  2. package/CustomState.js +2 -2
  3. package/EmptyState.d.ts +2 -5
  4. package/EmptyState.js +2 -2
  5. package/ErrorState.d.ts +2 -5
  6. package/ErrorState.js +2 -2
  7. package/ForbiddenState.d.ts +2 -5
  8. package/ForbiddenState.js +2 -2
  9. package/MaintenanceState.d.ts +2 -5
  10. package/MaintenanceState.js +2 -2
  11. package/NotBookedState.d.ts +2 -5
  12. package/NotFoundState.d.ts +2 -5
  13. package/NotFoundState.js +2 -2
  14. package/Notification.d.ts +2 -9
  15. package/Notification.js +2 -2
  16. package/NotificationsContainer.d.ts +2 -5
  17. package/NotificationsContainer.js +2 -2
  18. package/Tag.d.ts +2 -5
  19. package/Tag.js +2 -2
  20. package/TagList.d.ts +1 -5
  21. package/TagList.js +1 -2
  22. package/TagManager.d.ts +2 -5
  23. package/TagManager.js +2 -2
  24. package/Teaser.d.ts +2 -5
  25. package/Teaser.js +2 -2
  26. package/TeaserContainer.d.ts +2 -5
  27. package/TeaserContainer.js +2 -2
  28. package/TimePicker.d.ts +2 -5
  29. package/TimePicker.js +2 -2
  30. package/components/expander/ExpanderPanel.d.ts +1 -0
  31. package/components/expander/ExpanderPanel.js +4 -3
  32. package/components/notification/Notification.d.ts +32 -1
  33. package/components/notification/Notification.js +3 -2
  34. package/components/notification/NotificationsContainer.d.ts +7 -13
  35. package/components/notification/NotificationsContainer.js +2 -8
  36. package/components/states/BaseStateProps.d.ts +66 -0
  37. package/components/states/BaseStateProps.js +2 -0
  38. package/components/states/CustomState.d.ts +4 -14
  39. package/components/states/CustomState.js +13 -40
  40. package/components/states/EmptyState.d.ts +4 -8
  41. package/components/states/EmptyState.js +6 -6
  42. package/components/states/ErrorState.d.ts +4 -8
  43. package/components/states/ErrorState.js +6 -6
  44. package/components/states/ForbiddenState.d.ts +4 -8
  45. package/components/states/ForbiddenState.js +6 -6
  46. package/components/states/MaintenanceState.d.ts +4 -8
  47. package/components/states/MaintenanceState.js +6 -6
  48. package/components/states/NotBookedState.d.ts +9 -19
  49. package/components/states/NotBookedState.js +8 -23
  50. package/components/states/NotFoundState.d.ts +4 -8
  51. package/components/states/NotFoundState.js +6 -6
  52. package/components/states/StateButton.d.ts +27 -0
  53. package/components/states/StateButton.js +13 -0
  54. package/components/states/StateIcon.d.ts +7 -0
  55. package/components/states/StateIcon.js +4 -0
  56. package/components/tag/Tag.d.ts +69 -36
  57. package/components/tag/Tag.js +7 -30
  58. package/components/tag/TagList.d.ts +24 -16
  59. package/components/tag/TagList.js +6 -15
  60. package/components/tagManager/CustomSuggestionItem.d.ts +6 -12
  61. package/components/tagManager/CustomSuggestionItem.js +4 -9
  62. package/components/tagManager/TagManager.d.ts +61 -26
  63. package/components/tagManager/TagManager.js +22 -39
  64. package/components/tagManager/TagManagerItemList.d.ts +6 -13
  65. package/components/tagManager/TagManagerItemList.js +3 -13
  66. package/components/tagManager/TagManagerTag.d.ts +5 -0
  67. package/components/tagManager/TagManagerTag.js +1 -0
  68. package/components/teaser/Teaser.d.ts +93 -50
  69. package/components/teaser/Teaser.js +69 -118
  70. package/components/teaser/TeaserContainer.d.ts +25 -12
  71. package/components/teaser/TeaserContainer.js +10 -23
  72. package/components/timepicker/TimePicker.d.ts +34 -26
  73. package/components/timepicker/TimePicker.js +13 -30
  74. package/hooks/useDocumentTitle.d.ts +2 -0
  75. package/hooks/useDocumentTitle.js +9 -0
  76. package/hooks/useIsFirstRender.d.ts +2 -0
  77. package/hooks/useIsFirstRender.js +10 -0
  78. package/index.d.ts +28 -25
  79. package/index.js +28 -25
  80. package/lib/es/CustomState.d.ts +2 -5
  81. package/lib/es/CustomState.js +3 -2
  82. package/lib/es/EmptyState.d.ts +2 -5
  83. package/lib/es/EmptyState.js +3 -2
  84. package/lib/es/ErrorState.d.ts +2 -5
  85. package/lib/es/ErrorState.js +3 -2
  86. package/lib/es/ForbiddenState.d.ts +2 -5
  87. package/lib/es/ForbiddenState.js +3 -2
  88. package/lib/es/MaintenanceState.d.ts +2 -5
  89. package/lib/es/MaintenanceState.js +3 -2
  90. package/lib/es/NotBookedState.d.ts +2 -5
  91. package/lib/es/NotFoundState.d.ts +2 -5
  92. package/lib/es/NotFoundState.js +3 -2
  93. package/lib/es/Notification.d.ts +2 -9
  94. package/lib/es/Notification.js +3 -2
  95. package/lib/es/NotificationsContainer.d.ts +2 -5
  96. package/lib/es/NotificationsContainer.js +3 -2
  97. package/lib/es/Tag.d.ts +2 -5
  98. package/lib/es/Tag.js +3 -2
  99. package/lib/es/TagList.d.ts +1 -5
  100. package/lib/es/TagList.js +5 -3
  101. package/lib/es/TagManager.d.ts +2 -5
  102. package/lib/es/TagManager.js +3 -2
  103. package/lib/es/Teaser.d.ts +2 -5
  104. package/lib/es/Teaser.js +3 -2
  105. package/lib/es/TeaserContainer.d.ts +2 -5
  106. package/lib/es/TeaserContainer.js +3 -2
  107. package/lib/es/TimePicker.d.ts +2 -5
  108. package/lib/es/TimePicker.js +3 -2
  109. package/lib/es/components/expander/ExpanderPanel.d.ts +1 -0
  110. package/lib/es/components/expander/ExpanderPanel.js +4 -3
  111. package/lib/es/components/notification/Notification.d.ts +32 -1
  112. package/lib/es/components/notification/Notification.js +3 -2
  113. package/lib/es/components/notification/NotificationsContainer.d.ts +7 -13
  114. package/lib/es/components/notification/NotificationsContainer.js +2 -8
  115. package/lib/es/components/states/BaseStateProps.d.ts +66 -0
  116. package/lib/es/components/states/BaseStateProps.js +4 -0
  117. package/lib/es/components/states/CustomState.d.ts +4 -14
  118. package/lib/es/components/states/CustomState.js +14 -41
  119. package/lib/es/components/states/EmptyState.d.ts +4 -8
  120. package/lib/es/components/states/EmptyState.js +5 -6
  121. package/lib/es/components/states/ErrorState.d.ts +4 -8
  122. package/lib/es/components/states/ErrorState.js +5 -6
  123. package/lib/es/components/states/ForbiddenState.d.ts +4 -8
  124. package/lib/es/components/states/ForbiddenState.js +5 -6
  125. package/lib/es/components/states/MaintenanceState.d.ts +4 -8
  126. package/lib/es/components/states/MaintenanceState.js +5 -6
  127. package/lib/es/components/states/NotBookedState.d.ts +9 -19
  128. package/lib/es/components/states/NotBookedState.js +7 -22
  129. package/lib/es/components/states/NotFoundState.d.ts +4 -8
  130. package/lib/es/components/states/NotFoundState.js +5 -6
  131. package/lib/es/components/states/StateButton.d.ts +27 -0
  132. package/lib/es/components/states/StateButton.js +16 -0
  133. package/lib/es/components/states/StateIcon.d.ts +7 -0
  134. package/lib/es/components/states/StateIcon.js +6 -0
  135. package/lib/es/components/tag/Tag.d.ts +69 -36
  136. package/lib/es/components/tag/Tag.js +7 -30
  137. package/lib/es/components/tag/TagList.d.ts +24 -16
  138. package/lib/es/components/tag/TagList.js +6 -15
  139. package/lib/es/components/tagManager/CustomSuggestionItem.d.ts +6 -12
  140. package/lib/es/components/tagManager/CustomSuggestionItem.js +4 -9
  141. package/lib/es/components/tagManager/TagManager.d.ts +61 -26
  142. package/lib/es/components/tagManager/TagManager.js +22 -39
  143. package/lib/es/components/tagManager/TagManagerItemList.d.ts +6 -13
  144. package/lib/es/components/tagManager/TagManagerItemList.js +3 -13
  145. package/lib/es/components/tagManager/TagManagerTag.d.ts +5 -0
  146. package/lib/es/components/tagManager/TagManagerTag.js +2 -0
  147. package/lib/es/components/teaser/Teaser.d.ts +93 -50
  148. package/lib/es/components/teaser/Teaser.js +69 -120
  149. package/lib/es/components/teaser/TeaserContainer.d.ts +25 -12
  150. package/lib/es/components/teaser/TeaserContainer.js +10 -23
  151. package/lib/es/components/timepicker/TimePicker.d.ts +34 -26
  152. package/lib/es/components/timepicker/TimePicker.js +13 -30
  153. package/lib/es/hooks/useDocumentTitle.d.ts +2 -0
  154. package/lib/es/hooks/useDocumentTitle.js +11 -0
  155. package/lib/es/hooks/useIsFirstRender.d.ts +2 -0
  156. package/lib/es/hooks/useIsFirstRender.js +12 -0
  157. package/lib/es/index.d.ts +28 -25
  158. package/lib/es/index.js +46 -30
  159. package/lib/es/types.d.ts +1 -112
  160. package/lib/es/useDocumentTitle.d.ts +2 -0
  161. package/lib/es/useDocumentTitle.js +7 -0
  162. package/lib/es/useIsFirstRender.d.ts +2 -0
  163. package/lib/es/useIsFirstRender.js +7 -0
  164. package/lib/es/version.json +1 -1
  165. package/package.json +28 -22
  166. package/types.d.ts +1 -112
  167. package/useDocumentTitle.d.ts +2 -0
  168. package/useDocumentTitle.js +2 -0
  169. package/useIsFirstRender.d.ts +2 -0
  170. package/useIsFirstRender.js +2 -0
  171. package/version.json +1 -1
@@ -1,10 +1,10 @@
1
+ import { __rest } from "tslib";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import React from 'react';
3
+ // @ts-ignore-next-line importsNotUsedAsValues
4
+ import 'react';
3
5
  import CustomState from './CustomState';
4
- import { baseStatePropTypes } from './baseStatePropTypes';
5
- const ForbiddenState = props => _jsx(CustomState, Object.assign({}, props));
6
- ForbiddenState.defaultProps = {
7
- icon: 'rioglyph-ban-circle',
6
+ const ForbiddenState = (props) => {
7
+ const { icon = 'rioglyph-ban-circle' } = props, remainingProps = __rest(props, ["icon"]);
8
+ return _jsx(CustomState, Object.assign({ icon: icon }, remainingProps));
8
9
  };
9
- ForbiddenState.propTypes = baseStatePropTypes;
10
10
  export default ForbiddenState;
@@ -1,9 +1,5 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ import type { BaseStateProps } from './BaseStateProps';
3
+ export type MaintenanceStateProps = BaseStateProps;
4
+ declare const MaintenanceState: (props: PropsWithChildren<MaintenanceStateProps>) => import("react/jsx-runtime").JSX.Element;
1
5
  export default MaintenanceState;
2
- declare function MaintenanceState(props: any): import("react/jsx-runtime").JSX.Element;
3
- declare namespace MaintenanceState {
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
- import React from 'react';
3
+ // @ts-ignore-next-line importsNotUsedAsValues
4
+ import 'react';
3
5
  import CustomState from './CustomState';
4
- import { baseStatePropTypes } from './baseStatePropTypes';
5
- const MaintenanceState = props => _jsx(CustomState, Object.assign({}, props));
6
- MaintenanceState.defaultProps = {
7
- icon: 'rioglyph-wrench',
6
+ const MaintenanceState = (props) => {
7
+ const { icon = 'rioglyph-wrench' } = props, remainingProps = __rest(props, ["icon"]);
8
+ return _jsx(CustomState, Object.assign({ icon: icon }, remainingProps));
8
9
  };
9
- MaintenanceState.propTypes = baseStatePropTypes;
10
10
  export default MaintenanceState;
@@ -1,20 +1,10 @@
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import type { BaseStateProps } from './BaseStateProps';
3
+ export type NotBookedStateProps = BaseStateProps & {
4
+ /**
5
+ * List of features.
6
+ */
7
+ features?: string | React.ReactNode[];
8
+ };
9
+ declare const NotBookedState: (props: PropsWithChildren<NotBookedStateProps>) => import("react/jsx-runtime").JSX.Element;
1
10
  export default NotBookedState;
2
- declare function NotBookedState(props: any): import("react/jsx-runtime").JSX.Element;
3
- declare namespace NotBookedState {
4
- namespace defaultProps {
5
- const icon: string;
6
- }
7
- namespace propTypes {
8
- const headline: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
9
- const message: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
10
- const features: PropTypes.Requireable<(NonNullable<PropTypes.ReactNodeLike> | null | undefined)[]>;
11
- const buttons: PropTypes.Requireable<(PropTypes.InferProps<{
12
- text: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
13
- className: PropTypes.Requireable<string>;
14
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
15
- href: PropTypes.Requireable<string>;
16
- }> | null | undefined)[]>;
17
- const condensed: PropTypes.Requireable<boolean>;
18
- }
19
- }
20
- import PropTypes from "prop-types";
@@ -1,28 +1,13 @@
1
1
  import { __rest } from "tslib";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import React from 'react';
4
- import CustomState from './CustomState';
5
- import PropTypes from 'prop-types';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ // @ts-ignore-next-line importsNotUsedAsValues
4
+ import 'react';
6
5
  import isArray from 'lodash/fp/isArray';
7
6
  import isEmpty from 'lodash/fp/isEmpty';
8
- const NotBookedState = props => {
9
- const { message, features } = props, remainingProps = __rest(props, ["message", "features"]);
10
- const combinedMessages = (_jsxs(React.Fragment, { children: [message && _jsx("div", Object.assign({ className: 'text-medium margin-bottom-20' }, { children: message })), features && isArray(features) && !isEmpty(features) && (_jsx("ul", Object.assign({ className: 'feature-list' }, { children: features.map((feature, index) => (_jsx("li", { children: feature }, index))) })))] }));
11
- return _jsx(CustomState, Object.assign({ message: combinedMessages }, remainingProps));
12
- };
13
- NotBookedState.defaultProps = {
14
- icon: 'rioglyph-stars',
15
- };
16
- NotBookedState.propTypes = {
17
- headline: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
18
- message: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
19
- features: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.node])),
20
- buttons: PropTypes.arrayOf(PropTypes.shape({
21
- text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
22
- className: PropTypes.string,
23
- onClick: PropTypes.func,
24
- href: PropTypes.string,
25
- })),
26
- condensed: PropTypes.bool,
7
+ import CustomState from './CustomState';
8
+ const NotBookedState = (props) => {
9
+ const { message, features, icon = 'rioglyph-stars' } = props, remainingProps = __rest(props, ["message", "features", "icon"]);
10
+ const combinedMessages = (_jsxs(_Fragment, { children: [message && _jsx("div", Object.assign({ className: 'text-medium margin-bottom-20' }, { children: message })), features && isArray(features) && !isEmpty(features) && (_jsx("ul", Object.assign({ className: 'feature-list' }, { children: features.map((feature, index) => (_jsx("li", { children: feature }, index))) })))] }));
11
+ return _jsx(CustomState, Object.assign({ message: combinedMessages, icon: icon }, remainingProps));
27
12
  };
28
13
  export default NotBookedState;
@@ -1,9 +1,5 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ import type { BaseStateProps } from './BaseStateProps';
3
+ export type NotFoundStateProps = BaseStateProps;
4
+ declare const NotFoundState: (props: PropsWithChildren<NotFoundStateProps>) => import("react/jsx-runtime").JSX.Element;
1
5
  export default NotFoundState;
2
- declare function NotFoundState(props: any): import("react/jsx-runtime").JSX.Element;
3
- declare namespace NotFoundState {
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
- import React from 'react';
3
+ // @ts-ignore-next-line importsNotUsedAsValues
4
+ import 'react';
3
5
  import CustomState from './CustomState';
4
- import { baseStatePropTypes } from './baseStatePropTypes';
5
- const NotFoundState = props => _jsx(CustomState, Object.assign({}, props));
6
- NotFoundState.defaultProps = {
7
- icon: 'rioglyph-looking-glass-man',
6
+ const NotFoundState = (props) => {
7
+ const { icon = 'rioglyph-looking-glass-man' } = props, remainingProps = __rest(props, ["icon"]);
8
+ return _jsx(CustomState, Object.assign({ icon: icon }, remainingProps));
8
9
  };
9
- NotFoundState.propTypes = baseStatePropTypes;
10
10
  export default NotFoundState;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ export type StateButtonProps = {
3
+ /**
4
+ * The button text.
5
+ *
6
+ * This can also be a node with an icon to be shown on the button.
7
+ */
8
+ text: string | React.ReactNode;
9
+ /**
10
+ * Callback fired after the component starts to collapse.
11
+ *
12
+ * @default () => {}
13
+ */
14
+ onClick?: VoidFunction;
15
+ /**
16
+ * Instead of a callback for the button you can specify a "href".
17
+ *
18
+ * This way it will render a link button instead.
19
+ */
20
+ href?: string;
21
+ /**
22
+ * Additional classes assigned to the button.
23
+ */
24
+ className?: string;
25
+ };
26
+ declare const StateButton: ({ text, className, onClick, href }: StateButtonProps) => import("react/jsx-runtime").JSX.Element;
27
+ export default StateButton;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // @ts-ignore-next-line importsNotUsedAsValues
3
+ import 'react';
4
+ import classNames from 'classnames';
5
+ const StateButton = ({ text, className, onClick = () => { }, href }) => {
6
+ const buttonClassNames = classNames('btn btn-primary', 'margin-top-10', className && className);
7
+ // In case a href is given, render a link button instead
8
+ if (href) {
9
+ return (_jsx("a", Object.assign({ className: buttonClassNames, href: href, onClick: onClick }, { children: text })));
10
+ }
11
+ return (_jsx("button", Object.assign({ className: buttonClassNames, type: 'button', onClick: onClick }, { children: text })));
12
+ };
13
+ export default StateButton;
@@ -0,0 +1,7 @@
1
+ export type StateIconProps = {
2
+ name?: string;
3
+ className?: string;
4
+ color?: string;
5
+ };
6
+ declare const StateIcon: ({ name, color, className }: StateIconProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default StateIcon;
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import 'react';
3
+ const StateIcon = ({ name, color = 'text-color-light', className = 'text-size-300pct' }) => (_jsx("span", { className: `rioglyph ${name} ${color} ${className}` }));
4
+ export default StateIcon;
@@ -1,37 +1,70 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ export type TagSize = 'small';
3
+ export type TagProps = {
4
+ /**
5
+ * Defines if the tag is active.
6
+ *
7
+ * @default false
8
+ */
9
+ active?: boolean;
10
+ /**
11
+ * Defines if the tag is clickable.
12
+ *
13
+ * @default false
14
+ */
15
+ clickable?: boolean;
16
+ /**
17
+ * Defines if the tag is deletable.
18
+ *
19
+ * @default false
20
+ */
21
+ deletable?: boolean;
22
+ /**
23
+ * Defines if the tag is revertable.
24
+ *
25
+ * @default false
26
+ */
27
+ revertable?: boolean;
28
+ /**
29
+ * Defines if the tag is disabled.
30
+ *
31
+ * @default false
32
+ */
33
+ disabled?: boolean;
34
+ /**
35
+ * Define any rioglyph icon like "rioglyph-truck".
36
+ */
37
+ icon?: string;
38
+ /**
39
+ * Sets a more subtle style for border and background.
40
+ *
41
+ * @default false
42
+ */
43
+ muted?: boolean;
44
+ /**
45
+ * Defines if the tag is round.
46
+ *
47
+ * @default true
48
+ */
49
+ round?: boolean;
50
+ /**
51
+ * Defines if the tag is selectable.
52
+ *
53
+ * @default false
54
+ */
55
+ selectable?: boolean;
56
+ /**
57
+ * Defines if you want to render the tag in a different size.
58
+ *
59
+ * Possible values are: 'small'
60
+ */
61
+ size?: TagSize;
62
+ multiline?: boolean;
63
+ [remainingProp: string]: unknown;
64
+ /**
65
+ * Additional classes to be set on the wrapper element.
66
+ */
67
+ className?: string;
68
+ };
69
+ declare const Tag: (props: PropsWithChildren<TagProps>) => import("react/jsx-runtime").JSX.Element;
1
70
  export default Tag;
2
- declare function Tag(props: any): import("react/jsx-runtime").JSX.Element;
3
- declare namespace Tag {
4
- namespace defaultProps {
5
- const active: boolean;
6
- const clickable: boolean;
7
- const deletable: boolean;
8
- const revertable: boolean;
9
- const disabled: boolean;
10
- const muted: boolean;
11
- const round: boolean;
12
- const selectable: boolean;
13
- }
14
- namespace propTypes {
15
- const active_1: PropTypes.Requireable<boolean>;
16
- export { active_1 as active };
17
- export const className: PropTypes.Requireable<string>;
18
- const clickable_1: PropTypes.Requireable<boolean>;
19
- export { clickable_1 as clickable };
20
- const deletable_1: PropTypes.Requireable<boolean>;
21
- export { deletable_1 as deletable };
22
- const revertable_1: PropTypes.Requireable<boolean>;
23
- export { revertable_1 as revertable };
24
- const disabled_1: PropTypes.Requireable<boolean>;
25
- export { disabled_1 as disabled };
26
- export const icon: PropTypes.Requireable<string>;
27
- const muted_1: PropTypes.Requireable<boolean>;
28
- export { muted_1 as muted };
29
- export const multiline: PropTypes.Requireable<boolean>;
30
- const round_1: PropTypes.Requireable<boolean>;
31
- export { round_1 as round };
32
- const selectable_1: PropTypes.Requireable<boolean>;
33
- export { selectable_1 as selectable };
34
- export const size: PropTypes.Requireable<string>;
35
- }
36
- }
37
- import PropTypes from "prop-types";
@@ -1,35 +1,12 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import React from 'react';
4
- import PropTypes from 'prop-types';
3
+ // @ts-ignore-next-line importsNotUsedAsValues
4
+ import 'react';
5
5
  import classNames from 'classnames';
6
- const Tag = props => {
7
- const { children, icon, active, disabled, clickable, selectable, deletable, revertable, multiline, muted, round } = props, remainingProps = __rest(props, ["children", "icon", "active", "disabled", "clickable", "selectable", "deletable", "revertable", "multiline", "muted", "round"]);
8
- return (_jsx("div", Object.assign({}, remainingProps, { className: classNames('tag', props.size === 'small' && 'tag-small', icon && `rioglyph ${icon}`, active && 'active clickable rioglyph rioglyph-ok', disabled && 'disabled', clickable && 'clickable', selectable && 'selectable clickable rioglyph rioglyph-checkbox', deletable && 'deletable clickable rioglyph rioglyph-remove', revertable && 'revertable clickable rioglyph rioglyph-revert', multiline && 'multiline', muted && 'tag-muted', !round && 'rounded', // sounds wrong, but is right
9
- props.className) }, { children: _jsx("div", Object.assign({ className: 'tag-inner' }, { children: children })) })));
10
- };
11
- Tag.defaultProps = {
12
- active: false,
13
- clickable: false,
14
- deletable: false,
15
- revertable: false,
16
- disabled: false,
17
- muted: false,
18
- round: true,
19
- selectable: false,
20
- };
21
- Tag.propTypes = {
22
- active: PropTypes.bool,
23
- className: PropTypes.string,
24
- clickable: PropTypes.bool,
25
- deletable: PropTypes.bool,
26
- revertable: PropTypes.bool,
27
- disabled: PropTypes.bool,
28
- icon: PropTypes.string,
29
- muted: PropTypes.bool,
30
- multiline: PropTypes.bool,
31
- round: PropTypes.bool,
32
- selectable: PropTypes.bool,
33
- size: PropTypes.oneOf(['small']),
6
+ const Tag = (props) => {
7
+ const { children, icon, active = false, disabled = false, clickable = false, selectable = false, deletable = false, revertable = false, multiline = false, muted = false, round = true, size, className } = props, remainingProps = __rest(props, ["children", "icon", "active", "disabled", "clickable", "selectable", "deletable", "revertable", "multiline", "muted", "round", "size", "className"]);
8
+ const tagClasses = classNames('tag', size === 'small' && 'tag-small', icon && `rioglyph ${icon}`, active && 'active clickable rioglyph rioglyph-ok', disabled && 'disabled', clickable && 'clickable', selectable && 'selectable clickable rioglyph rioglyph-checkbox', deletable && 'deletable clickable rioglyph rioglyph-remove', revertable && 'revertable clickable rioglyph rioglyph-revert', multiline && 'multiline', muted && 'tag-muted', !round && 'rounded', // sounds wrong, but is right
9
+ props.className);
10
+ return (_jsx("div", Object.assign({}, remainingProps, { className: tagClasses }, { children: _jsx("div", Object.assign({ className: 'tag-inner' }, { children: children })) })));
34
11
  };
35
12
  export default Tag;
@@ -1,17 +1,25 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ export type TagListProps = {
3
+ /**
4
+ * Defines if the tag list is rendered inline or vertically.
5
+ *
6
+ * @default true
7
+ */
8
+ inline?: boolean;
9
+ /**
10
+ * Defines if the tag has the same with as it`s parent container.
11
+ *
12
+ * @default false
13
+ */
14
+ autoTagWidth?: boolean;
15
+ /**
16
+ * Possible values are 1-6
17
+ */
18
+ tagsPerRow?: 1 | 2 | 3 | 4 | 6;
19
+ /**
20
+ * Additional classes to be set on the wrapper element.
21
+ */
22
+ className?: string;
23
+ };
24
+ declare const TagList: (props: PropsWithChildren<TagListProps>) => import("react/jsx-runtime").JSX.Element;
1
25
  export default TagList;
2
- declare function TagList(props: any): import("react/jsx-runtime").JSX.Element;
3
- declare namespace TagList {
4
- namespace defaultProps {
5
- const inline: boolean;
6
- const autoTagWidth: boolean;
7
- }
8
- namespace propTypes {
9
- const inline_1: PropTypes.Requireable<boolean>;
10
- export { inline_1 as inline };
11
- const autoTagWidth_1: PropTypes.Requireable<boolean>;
12
- export { autoTagWidth_1 as autoTagWidth };
13
- export const tagsPerRow: any;
14
- export const className: PropTypes.Requireable<string>;
15
- }
16
- }
17
- import PropTypes from "prop-types";
@@ -1,21 +1,12 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import React from 'react';
4
- import PropTypes from 'prop-types';
3
+ // @ts-ignore-next-line importsNotUsedAsValues
4
+ import 'react';
5
5
  import classNames from 'classnames';
6
- const TagList = props => {
7
- const { children, inline, autoTagWidth, tagsPerRow } = props, remainingProps = __rest(props, ["children", "inline", "autoTagWidth", "tagsPerRow"]);
6
+ const TagList = (props) => {
7
+ const { children, inline = true, autoTagWidth = false, tagsPerRow } = props, remainingProps = __rest(props, ["children", "inline", "autoTagWidth", "tagsPerRow"]);
8
+ const tagListClasses = classNames('taglist', !autoTagWidth && 'taglist-autowidth', !inline && 'taglist-vertical', tagsPerRow && 'row display-flex-sm flex-wrap-sm', props.className);
8
9
  const wrappedChildren = _jsx("div", Object.assign({ className: `tags-per-row-${tagsPerRow}` }, { children: children }));
9
- return (_jsx("div", Object.assign({}, remainingProps, { className: classNames('taglist', !autoTagWidth && 'taglist-autowidth', !inline && 'taglist-vertical', tagsPerRow && 'row display-flex-sm flex-wrap-sm', props.className) }, { children: tagsPerRow ? wrappedChildren : children })));
10
- };
11
- TagList.defaultProps = {
12
- inline: true,
13
- autoTagWidth: false,
14
- };
15
- TagList.propTypes = {
16
- inline: PropTypes.bool,
17
- autoTagWidth: PropTypes.bool,
18
- tagsPerRow: PropTypes.PropTypes.oneOf([1, 2, 3, 4, 6]),
19
- className: PropTypes.string,
10
+ return (_jsx("div", Object.assign({}, remainingProps, { className: tagListClasses }, { children: tagsPerRow ? wrappedChildren : children })));
20
11
  };
21
12
  export default TagList;
@@ -1,13 +1,7 @@
1
+ import React from 'react';
2
+ export type CustomSuggestionItemProps = {
3
+ value?: string | React.ReactNode;
4
+ placeholder?: string | React.ReactNode;
5
+ };
6
+ declare const CustomSuggestionItem: ({ value, placeholder }: CustomSuggestionItemProps) => import("react/jsx-runtime").JSX.Element;
1
7
  export default CustomSuggestionItem;
2
- declare function CustomSuggestionItem({ value, placeholder }: {
3
- value: any;
4
- placeholder: any;
5
- }): import("react/jsx-runtime").JSX.Element;
6
- declare namespace CustomSuggestionItem {
7
- const defaultProps: {};
8
- namespace propTypes {
9
- const value: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
10
- const placeholder: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
11
- }
12
- }
13
- import PropTypes from "prop-types";
@@ -1,15 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- import PropTypes from 'prop-types';
2
+ // @ts-ignore-next-line importsNotUsedAsValues
3
+ import 'react';
4
4
  import classNames from 'classnames';
5
5
  const CustomSuggestionItem = ({ value, placeholder }) => {
6
- const wrapperClassNames = classNames('display-flex align-items-center', 'padding-top-5 padding-bottom-5', !value && 'text-color-gray');
7
- const iconClassNames = classNames('margin-left--5 margin-right-5 margin-top--1', 'rioglyph', !value ? 'rioglyph-arrow-up' : 'rioglyph-plus');
6
+ const wrapperClassNames = classNames('display-flex align-items-center padding-top-5 padding-bottom-5', !value && 'text-color-gray');
7
+ const iconClassNames = classNames('margin-left--5 margin-right-5 margin-top--1 rioglyph', value ? 'rioglyph-plus' : 'rioglyph-arrow-up');
8
8
  return (_jsxs("span", Object.assign({ className: wrapperClassNames }, { children: [_jsx("span", { className: iconClassNames }), _jsx("span", Object.assign({ className: 'text-italic' }, { children: value || placeholder }))] })));
9
9
  };
10
- CustomSuggestionItem.defaultProps = {};
11
- CustomSuggestionItem.propTypes = {
12
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
13
- placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
14
- };
15
10
  export default CustomSuggestionItem;
@@ -1,27 +1,62 @@
1
+ import React from 'react';
2
+ import type { TagManagerTag } from './TagManagerTag';
3
+ export type { TagManagerTag } from './TagManagerTag';
4
+ export type TagManagerProps = {
5
+ /**
6
+ * The list of existing tags to be listed.
7
+ */
8
+ tagList: TagManagerTag[];
9
+ /**
10
+ * The list of tags used as suggestions for the built-in AutoSuggest.
11
+ */
12
+ tagSuggestions: TagManagerTag[];
13
+ /**
14
+ * Callback function triggered when the list of tags changes.
15
+ *
16
+ * For instance when a tag was added by the AutoSuggest or when a tag is marked to be deleted.
17
+ *
18
+ * This function returns the updated list of tags where tags may have additional properties indicating whether they
19
+ * have to be removed or added to your data.
20
+ *
21
+ * @param newTags The updated list of tags.
22
+ */
23
+ onTagListChange?: (newTags: TagManagerTag[]) => void;
24
+ /**
25
+ * The placeholder message for the AutoSuggest input.
26
+ */
27
+ placeholder?: string;
28
+ /**
29
+ * The placeholder message for custom tag in the AutoSuggest dropdown.
30
+ *
31
+ * This is only relevant when having custom tags enabled.
32
+ */
33
+ customTagPlaceholder?: string;
34
+ /**
35
+ * The header message for existing tags in the AutoSuggest dropdown.
36
+ *
37
+ * This is only relevant when having custom tags enabled.
38
+ */
39
+ dropdownSeparatorText?: string;
40
+ /**
41
+ * Enables or disabled to add custom tags from the AutoSuggest dropdown.
42
+ *
43
+ * @default true
44
+ */
45
+ useCustomTags?: boolean;
46
+ /**
47
+ * Define whether the input shall be shown and to allow to select tags.
48
+ *
49
+ * @default true
50
+ */
51
+ showInput?: boolean;
52
+ /**
53
+ * The message to be shown when no tag suggestion could be found for the entered value of the AutoSuggest.
54
+ */
55
+ noItemMessage?: string | React.ReactNode;
56
+ /**
57
+ * Additional classes to be set on the wrapper element.
58
+ */
59
+ className?: string;
60
+ };
61
+ declare const TagManager: (props: TagManagerProps) => import("react/jsx-runtime").JSX.Element;
1
62
  export default TagManager;
2
- declare function TagManager(props: any): import("react/jsx-runtime").JSX.Element;
3
- declare namespace TagManager {
4
- namespace defaultProps {
5
- const useCustomTags: boolean;
6
- const showInput: boolean;
7
- }
8
- namespace propTypes {
9
- export const tagList: PropTypes.Validator<(PropTypes.InferProps<{
10
- label: PropTypes.Requireable<string>;
11
- }> | null | undefined)[]>;
12
- export const tagSuggestions: PropTypes.Validator<(PropTypes.InferProps<{
13
- label: PropTypes.Requireable<string>;
14
- }> | null | undefined)[]>;
15
- export const onTagListChange: PropTypes.Requireable<(...args: any[]) => any>;
16
- export const placeholder: PropTypes.Requireable<string>;
17
- export const customTagPlaceholder: PropTypes.Requireable<string>;
18
- export const dropdownSeparatorText: PropTypes.Requireable<string>;
19
- const useCustomTags_1: PropTypes.Requireable<boolean>;
20
- export { useCustomTags_1 as useCustomTags };
21
- export const noItemMessage: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
22
- const showInput_1: PropTypes.Requireable<boolean>;
23
- export { showInput_1 as showInput };
24
- export const className: PropTypes.Requireable<string>;
25
- }
26
- }
27
- import PropTypes from "prop-types";