@pingux/astro 2.54.0-alpha.3 → 2.54.0-alpha.4
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/lib/cjs/components/ArrayField/ArrayField.js +1 -2
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.test.js +3 -2
- package/lib/cjs/components/Button/Button.js +2 -4
- package/lib/cjs/components/CheckboxField/CheckboxField.js +2 -4
- package/lib/cjs/components/ColorField/ColorField.js +2 -4
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +2 -4
- package/lib/cjs/components/DatePicker/DatePicker.js +2 -4
- package/lib/cjs/components/FileInputField/FileInputField.js +2 -4
- package/lib/cjs/components/IconButton/IconButton.js +2 -4
- package/lib/cjs/components/IconButton/IconButton.styles.d.ts +1 -72
- package/lib/cjs/components/ImageUploadField/ImageUploadField.js +2 -4
- package/lib/cjs/components/Input/Input.js +6 -7
- package/lib/cjs/components/LinkSelectField/LinkSelectField.js +2 -4
- package/lib/cjs/components/ListViewItem/ListViewItem.js +2 -4
- package/lib/cjs/components/Messages/Message.js +46 -16
- package/lib/cjs/components/Messages/Messages.js +15 -2
- package/lib/cjs/components/Messages/Messages.reducer.js +51 -0
- package/lib/cjs/components/Messages/Messages.stories.js +16 -96
- package/lib/cjs/components/Messages/Messages.test.js +9 -9
- package/lib/cjs/components/Messages/index.js +3 -2
- package/lib/cjs/components/Messages/utils/messagesReducer.js +15 -29
- package/lib/cjs/components/Messages/utils/multiMessagesReducer.js +14 -20
- package/lib/cjs/components/Messages/utils/tests/messagesReducer.test.js +3 -4
- package/lib/cjs/components/Messages/utils/tests/multiMessagesReducer.test.js +2 -3
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +3 -2
- package/lib/cjs/components/NumberField/NumberField.js +1 -2
- package/lib/cjs/components/PasswordField/PasswordField.js +2 -4
- package/lib/cjs/components/RadioGroupField/RadioGroupField.js +2 -4
- package/lib/cjs/components/SearchField/SearchField.js +2 -4
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +1 -2
- package/lib/cjs/components/SwitchField/SwitchField.js +3 -5
- package/lib/cjs/components/Tab/Tab.js +1 -2
- package/lib/cjs/components/TextAreaField/TextAreaField.js +2 -4
- package/lib/cjs/components/TextField/TextField.js +2 -4
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.js +1 -2
- package/lib/cjs/types/index.d.ts +0 -1
- package/lib/cjs/types/index.js +14 -25
- package/lib/cjs/types/item.d.ts +0 -2
- package/lib/components/ArrayField/ArrayField.js +1 -2
- package/lib/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.test.js +3 -2
- package/lib/components/Button/Button.js +2 -4
- package/lib/components/CheckboxField/CheckboxField.js +2 -4
- package/lib/components/ColorField/ColorField.js +2 -4
- package/lib/components/ComboBoxField/ComboBoxField.js +2 -4
- package/lib/components/DatePicker/DatePicker.js +2 -4
- package/lib/components/FileInputField/FileInputField.js +2 -4
- package/lib/components/IconButton/IconButton.js +2 -4
- package/lib/components/ImageUploadField/ImageUploadField.js +2 -4
- package/lib/components/Input/Input.js +5 -6
- package/lib/components/LinkSelectField/LinkSelectField.js +2 -4
- package/lib/components/ListViewItem/ListViewItem.js +2 -4
- package/lib/components/Messages/Message.js +46 -14
- package/lib/components/Messages/Messages.js +15 -2
- package/lib/components/Messages/Messages.reducer.js +41 -0
- package/lib/components/Messages/Messages.stories.js +15 -95
- package/lib/components/Messages/Messages.test.js +9 -9
- package/lib/components/Messages/index.js +1 -1
- package/lib/components/Messages/utils/messagesReducer.js +13 -27
- package/lib/components/Messages/utils/multiMessagesReducer.js +10 -20
- package/lib/components/Messages/utils/tests/messagesReducer.test.js +3 -4
- package/lib/components/Messages/utils/tests/multiMessagesReducer.test.js +8 -9
- package/lib/components/MultivaluesField/MultivaluesField.js +4 -3
- package/lib/components/NumberField/NumberField.js +1 -2
- package/lib/components/PasswordField/PasswordField.js +2 -4
- package/lib/components/RadioGroupField/RadioGroupField.js +2 -4
- package/lib/components/SearchField/SearchField.js +2 -4
- package/lib/components/SelectFieldBase/SelectFieldBase.js +1 -2
- package/lib/components/SwitchField/SwitchField.js +3 -5
- package/lib/components/Tab/Tab.js +1 -2
- package/lib/components/TextAreaField/TextAreaField.js +2 -4
- package/lib/components/TextField/TextField.js +2 -4
- package/lib/components/TimeZonePicker/TimeZonePicker.js +1 -2
- package/lib/types/index.js +0 -1
- package/package.json +1 -1
- package/lib/cjs/components/Messages/Message.d.ts +0 -9
- package/lib/cjs/components/Messages/Message.styles.d.ts +0 -151
- package/lib/cjs/components/Messages/Messages.d.ts +0 -4
- package/lib/cjs/components/Messages/Messages.stories.d.ts +0 -128
- package/lib/cjs/components/Messages/Messages.test.d.ts +0 -1
- package/lib/cjs/components/Messages/index.d.ts +0 -3
- package/lib/cjs/components/Messages/utils/index.d.ts +0 -2
- package/lib/cjs/components/Messages/utils/messagesReducer.d.ts +0 -107
- package/lib/cjs/components/Messages/utils/multiMessagesReducer.d.ts +0 -83
- package/lib/cjs/components/Messages/utils/tests/messagesReducer.test.d.ts +0 -1
- package/lib/cjs/components/Messages/utils/tests/multiMessagesReducer.test.d.ts +0 -1
- package/lib/cjs/types/messages.d.ts +0 -43
- package/lib/cjs/types/messages.js +0 -6
- package/lib/cjs/utils/devUtils/constants/pendoID.d.ts +0 -3
- package/lib/cjs/utils/devUtils/constants/pendoID.js +0 -13
- package/lib/types/messages.js +0 -1
- package/lib/utils/devUtils/constants/pendoID.js +0 -5
@@ -20,11 +20,9 @@ import { usePress } from '@react-aria/interactions';
|
|
20
20
|
import omit from 'lodash/omit';
|
21
21
|
import { Box, FieldHelperText, Label, Switch } from '../..';
|
22
22
|
import { useField, usePropWarning } from '../../hooks';
|
23
|
-
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
24
23
|
import { statusDefaultProp } from '../../utils/docUtils/statusProp';
|
25
24
|
import { switchFieldPropTypes } from './switchFieldAttributes';
|
26
25
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
27
|
-
var displayName = 'SwitchField';
|
28
26
|
var SwitchField = /*#__PURE__*/forwardRef(function (props, ref) {
|
29
27
|
var label = props.label,
|
30
28
|
helperText = props.helperText,
|
@@ -86,16 +84,16 @@ var SwitchField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
86
84
|
'aria-controls': others['aria-controls'],
|
87
85
|
'aria-errormessage': others['aria-errormessage']
|
88
86
|
};
|
89
|
-
return ___EmotionJSX(Box,
|
87
|
+
return ___EmotionJSX(Box, fieldContainerProps, ___EmotionJSX(Label, _extends({
|
90
88
|
variant: "forms.switch.label"
|
91
89
|
}, fieldLabelProps), ___EmotionJSX(Box, fieldControlWrapperProps, ___EmotionJSX(Switch, _extends({
|
92
90
|
ref: switchRef,
|
93
91
|
inputProps: fieldControlInputProps
|
94
|
-
}, unhandledAriaProps,
|
92
|
+
}, unhandledAriaProps, others))), label), helperText && ___EmotionJSX(FieldHelperText, {
|
95
93
|
status: status
|
96
94
|
}, helperText));
|
97
95
|
});
|
98
96
|
SwitchField.propTypes = switchFieldPropTypes;
|
99
97
|
SwitchField.defaultProps = _objectSpread({}, statusDefaultProp);
|
100
|
-
SwitchField.displayName =
|
98
|
+
SwitchField.displayName = 'SwitchField';
|
101
99
|
export default SwitchField;
|
@@ -9,7 +9,6 @@ import PropTypes from 'prop-types';
|
|
9
9
|
import { Box, Text, Tooltip, TooltipTrigger } from '../..';
|
10
10
|
import { usePropWarning, useStatusClasses } from '../../hooks';
|
11
11
|
import ORIENTATION from '../../utils/devUtils/constants/orientation';
|
12
|
-
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
13
12
|
import TabPicker from '../TabPicker';
|
14
13
|
import { TabsContext } from '../Tabs';
|
15
14
|
|
@@ -72,7 +71,7 @@ export var CollectionTab = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
72
71
|
}, slots === null || slots === void 0 ? void 0 : slots.beforeTab, ___EmotionJSX(Box, _extends({
|
73
72
|
className: classNames,
|
74
73
|
variant: "tab"
|
75
|
-
}, mergeProps(focusProps, hoverProps, tabProps),
|
74
|
+
}, mergeProps(focusProps, hoverProps, tabProps), otherItemProps, {
|
76
75
|
ref: tabRef,
|
77
76
|
title: titleAttr || undefined
|
78
77
|
}), icon, ___EmotionJSX(Text, _extends({
|
@@ -16,12 +16,10 @@ import PropTypes from 'prop-types';
|
|
16
16
|
import { v4 as uuid } from 'uuid';
|
17
17
|
import { Box, FieldHelperText, Label, TextArea } from '../..';
|
18
18
|
import { useColumnStyles, useField, useLabelHeight, usePropWarning } from '../../hooks';
|
19
|
-
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
20
19
|
import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
|
21
20
|
import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
|
22
21
|
import { statusDefaultProp, statusPropTypes } from '../../utils/docUtils/statusProp';
|
23
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
24
|
-
var displayName = 'TextAreaField';
|
25
23
|
var TextAreaField = /*#__PURE__*/forwardRef(function (props, ref) {
|
26
24
|
var helperText = props.helperText,
|
27
25
|
isUnresizable = props.isUnresizable,
|
@@ -103,7 +101,7 @@ var TextAreaField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
103
101
|
}, labelNode);
|
104
102
|
return ___EmotionJSX(Box, _extends({
|
105
103
|
variant: "forms.input.fieldContainer"
|
106
|
-
},
|
104
|
+
}, fieldContainerProps, {
|
107
105
|
sx: _objectSpread(_objectSpread({}, columnStyleProps === null || columnStyleProps === void 0 ? void 0 : columnStyleProps.sx), fieldContainerProps === null || fieldContainerProps === void 0 ? void 0 : fieldContainerProps.sx),
|
108
106
|
ref: containerRef,
|
109
107
|
maxWidth: "100%"
|
@@ -205,5 +203,5 @@ TextAreaField.defaultProps = _objectSpread({
|
|
205
203
|
isUnresizable: false,
|
206
204
|
rows: 4
|
207
205
|
}, statusDefaultProp);
|
208
|
-
TextAreaField.displayName =
|
206
|
+
TextAreaField.displayName = 'TextAreaField';
|
209
207
|
export default TextAreaField;
|
@@ -16,12 +16,10 @@ import { v4 as uuid } from 'uuid';
|
|
16
16
|
import { Box, FieldHelperText, Input, Label } from '../..';
|
17
17
|
import { useField, useLabelHeight, usePropWarning } from '../../hooks';
|
18
18
|
import useColumnStyles from '../../hooks/useColumnStyles';
|
19
|
-
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
20
19
|
import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
|
21
20
|
import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
|
22
21
|
import { statusDefaultProp, statusPropTypes } from '../../utils/docUtils/statusProp';
|
23
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
24
|
-
var displayName = 'TextField';
|
25
23
|
var TextField = /*#__PURE__*/forwardRef(function (props, ref) {
|
26
24
|
var helperText = props.helperText,
|
27
25
|
helpHintProps = props.helpHintProps,
|
@@ -50,7 +48,7 @@ var TextField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
50
48
|
var helperTextId = uuid();
|
51
49
|
return ___EmotionJSX(Box, _extends({
|
52
50
|
variant: "forms.input.fieldContainer"
|
53
|
-
},
|
51
|
+
}, fieldContainerProps, {
|
54
52
|
sx: _objectSpread(_objectSpread({}, columnStyleProps === null || columnStyleProps === void 0 ? void 0 : columnStyleProps.sx), fieldContainerProps === null || fieldContainerProps === void 0 ? void 0 : fieldContainerProps.sx)
|
55
53
|
}), ___EmotionJSX(Label, _extends({}, fieldLabelProps, {
|
56
54
|
ref: labelRef,
|
@@ -142,5 +140,5 @@ TextField.defaultProps = _objectSpread({
|
|
142
140
|
isReadOnly: false,
|
143
141
|
isRequired: false
|
144
142
|
}, statusDefaultProp);
|
145
|
-
TextField.displayName =
|
143
|
+
TextField.displayName = 'TextField';
|
146
144
|
export default TextField;
|
@@ -23,7 +23,6 @@ import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instanc
|
|
23
23
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
24
24
|
import PropTypes from 'prop-types';
|
25
25
|
import { Box, ComboBoxField, Item, Text } from '../../index';
|
26
|
-
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
27
26
|
import defaultTimezones, { usCities } from './timezones.js';
|
28
27
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
29
28
|
var createSearchTags = function createSearchTags(_ref) {
|
@@ -185,7 +184,7 @@ var TimeZonePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
185
184
|
}]
|
186
185
|
}, otherProps);
|
187
186
|
}, [emptySearchText, filteredTimezones, otherProps]);
|
188
|
-
return ___EmotionJSX(ComboBoxField, _extends({},
|
187
|
+
return ___EmotionJSX(ComboBoxField, _extends({}, comboBoxFieldProps, {
|
189
188
|
disabledKeys: [emptySearchText],
|
190
189
|
menuTrigger: "input"
|
191
190
|
}), items);
|
package/lib/types/index.js
CHANGED
package/package.json
CHANGED
@@ -1,9 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { MessageProps } from '../../types';
|
3
|
-
export declare const ARIA_STATUSES: {
|
4
|
-
SUCCESS: string;
|
5
|
-
ERROR: string;
|
6
|
-
WARNING: string;
|
7
|
-
};
|
8
|
-
declare const Message: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>>;
|
9
|
-
export default Message;
|
@@ -1,151 +0,0 @@
|
|
1
|
-
export declare const messageCloseButton: {
|
2
|
-
p: number;
|
3
|
-
ml: string;
|
4
|
-
outline: string;
|
5
|
-
path: {
|
6
|
-
fill: string;
|
7
|
-
};
|
8
|
-
'&.is-hovered': {
|
9
|
-
bg: string;
|
10
|
-
boxShadow: string;
|
11
|
-
};
|
12
|
-
'&.is-pressed': {
|
13
|
-
boxShadow: string;
|
14
|
-
bg: string;
|
15
|
-
path: {
|
16
|
-
fill: string;
|
17
|
-
};
|
18
|
-
};
|
19
|
-
'&.is-success': {
|
20
|
-
path: {
|
21
|
-
fill: string;
|
22
|
-
};
|
23
|
-
'&.is-pressed': {
|
24
|
-
boxShadow: string;
|
25
|
-
bg: string;
|
26
|
-
path: {
|
27
|
-
fill: string;
|
28
|
-
};
|
29
|
-
};
|
30
|
-
};
|
31
|
-
'&.is-warning': {
|
32
|
-
path: {
|
33
|
-
fill: string;
|
34
|
-
};
|
35
|
-
'&.is-pressed': {
|
36
|
-
boxShadow: string;
|
37
|
-
bg: string;
|
38
|
-
path: {
|
39
|
-
fill: string;
|
40
|
-
};
|
41
|
-
};
|
42
|
-
};
|
43
|
-
'&.is-error': {
|
44
|
-
path: {
|
45
|
-
fill: string;
|
46
|
-
};
|
47
|
-
'&.is-pressed': {
|
48
|
-
boxShadow: string;
|
49
|
-
bg: string;
|
50
|
-
path: {
|
51
|
-
fill: string;
|
52
|
-
};
|
53
|
-
};
|
54
|
-
};
|
55
|
-
};
|
56
|
-
declare const _default: {
|
57
|
-
wrapper: {
|
58
|
-
position: string;
|
59
|
-
right: string;
|
60
|
-
bottom: string;
|
61
|
-
left: string;
|
62
|
-
alignItems: string;
|
63
|
-
pointerEvents: string;
|
64
|
-
};
|
65
|
-
transition: {
|
66
|
-
transition: string;
|
67
|
-
opacity: number;
|
68
|
-
'&.is-hidden': {
|
69
|
-
opacity: number;
|
70
|
-
};
|
71
|
-
};
|
72
|
-
item: {
|
73
|
-
maxWidth: number;
|
74
|
-
pointerEvents: string;
|
75
|
-
mb: string;
|
76
|
-
p: string;
|
77
|
-
wordBreak: string;
|
78
|
-
alignItems: string;
|
79
|
-
bg: string;
|
80
|
-
color: string;
|
81
|
-
borderRadius: number;
|
82
|
-
'&.is-success, > .is-success': {
|
83
|
-
bg: string;
|
84
|
-
color: string;
|
85
|
-
};
|
86
|
-
'&.is-warning, > .is-warning': {
|
87
|
-
bg: string;
|
88
|
-
color: string;
|
89
|
-
};
|
90
|
-
'&.is-error, > .is-error': {
|
91
|
-
bg: string;
|
92
|
-
color: string;
|
93
|
-
};
|
94
|
-
};
|
95
|
-
messageCloseButton: {
|
96
|
-
p: number;
|
97
|
-
ml: string;
|
98
|
-
outline: string;
|
99
|
-
path: {
|
100
|
-
fill: string;
|
101
|
-
};
|
102
|
-
'&.is-hovered': {
|
103
|
-
bg: string;
|
104
|
-
boxShadow: string;
|
105
|
-
};
|
106
|
-
'&.is-pressed': {
|
107
|
-
boxShadow: string;
|
108
|
-
bg: string;
|
109
|
-
path: {
|
110
|
-
fill: string;
|
111
|
-
};
|
112
|
-
};
|
113
|
-
'&.is-success': {
|
114
|
-
path: {
|
115
|
-
fill: string;
|
116
|
-
};
|
117
|
-
'&.is-pressed': {
|
118
|
-
boxShadow: string;
|
119
|
-
bg: string;
|
120
|
-
path: {
|
121
|
-
fill: string;
|
122
|
-
};
|
123
|
-
};
|
124
|
-
};
|
125
|
-
'&.is-warning': {
|
126
|
-
path: {
|
127
|
-
fill: string;
|
128
|
-
};
|
129
|
-
'&.is-pressed': {
|
130
|
-
boxShadow: string;
|
131
|
-
bg: string;
|
132
|
-
path: {
|
133
|
-
fill: string;
|
134
|
-
};
|
135
|
-
};
|
136
|
-
};
|
137
|
-
'&.is-error': {
|
138
|
-
path: {
|
139
|
-
fill: string;
|
140
|
-
};
|
141
|
-
'&.is-pressed': {
|
142
|
-
boxShadow: string;
|
143
|
-
bg: string;
|
144
|
-
path: {
|
145
|
-
fill: string;
|
146
|
-
};
|
147
|
-
};
|
148
|
-
};
|
149
|
-
};
|
150
|
-
};
|
151
|
-
export default _default;
|
@@ -1,128 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { MessageItem } from '../../types';
|
3
|
-
declare const _default: {
|
4
|
-
title: string;
|
5
|
-
component: React.ForwardRefExoticComponent<import("../../index").MessagesProps<MessageItem> & React.RefAttributes<HTMLDivElement>>;
|
6
|
-
decorators: ((...args: any) => any)[];
|
7
|
-
argTypes: {
|
8
|
-
items: {
|
9
|
-
control: {
|
10
|
-
type: string;
|
11
|
-
};
|
12
|
-
};
|
13
|
-
onClose: {
|
14
|
-
control: {
|
15
|
-
type: string;
|
16
|
-
};
|
17
|
-
};
|
18
|
-
};
|
19
|
-
parameters: {
|
20
|
-
docs: {
|
21
|
-
page: () => React.JSX.Element;
|
22
|
-
source: {
|
23
|
-
type: string;
|
24
|
-
};
|
25
|
-
};
|
26
|
-
};
|
27
|
-
};
|
28
|
-
export default _default;
|
29
|
-
export declare const Default: {
|
30
|
-
(args: any): React.JSX.Element;
|
31
|
-
parameters: {
|
32
|
-
design: {
|
33
|
-
type: string;
|
34
|
-
url: string;
|
35
|
-
};
|
36
|
-
};
|
37
|
-
};
|
38
|
-
export declare const DefaultDynamic: {
|
39
|
-
(args: any): React.JSX.Element;
|
40
|
-
parameters: {
|
41
|
-
a11y: {
|
42
|
-
config: {
|
43
|
-
rules: {
|
44
|
-
id: string;
|
45
|
-
enabled: boolean;
|
46
|
-
}[];
|
47
|
-
};
|
48
|
-
};
|
49
|
-
};
|
50
|
-
};
|
51
|
-
export declare const Controlled: {
|
52
|
-
(args: any): React.JSX.Element;
|
53
|
-
parameters: {
|
54
|
-
a11y: {
|
55
|
-
config: {
|
56
|
-
rules: {
|
57
|
-
id: string;
|
58
|
-
enabled: boolean;
|
59
|
-
}[];
|
60
|
-
};
|
61
|
-
};
|
62
|
-
};
|
63
|
-
};
|
64
|
-
export declare const ControlledWithButton: {
|
65
|
-
(args: any): React.JSX.Element;
|
66
|
-
parameters: {
|
67
|
-
a11y: {
|
68
|
-
config: {
|
69
|
-
rules: {
|
70
|
-
id: string;
|
71
|
-
enabled: boolean;
|
72
|
-
}[];
|
73
|
-
};
|
74
|
-
};
|
75
|
-
};
|
76
|
-
};
|
77
|
-
export declare const WithCustomColorsAndIcons: {
|
78
|
-
(args: any): React.JSX.Element;
|
79
|
-
parameters: {
|
80
|
-
a11y: {
|
81
|
-
config: {
|
82
|
-
rules: {
|
83
|
-
id: string;
|
84
|
-
enabled: boolean;
|
85
|
-
}[];
|
86
|
-
};
|
87
|
-
};
|
88
|
-
};
|
89
|
-
};
|
90
|
-
export declare const UseReducer: {
|
91
|
-
(): React.JSX.Element;
|
92
|
-
parameters: {
|
93
|
-
a11y: {
|
94
|
-
config: {
|
95
|
-
rules: {
|
96
|
-
id: string;
|
97
|
-
enabled: boolean;
|
98
|
-
}[];
|
99
|
-
};
|
100
|
-
};
|
101
|
-
};
|
102
|
-
};
|
103
|
-
export declare const UseReducerWithMultipleContainers: {
|
104
|
-
(): React.JSX.Element;
|
105
|
-
parameters: {
|
106
|
-
a11y: {
|
107
|
-
config: {
|
108
|
-
rules: {
|
109
|
-
id: string;
|
110
|
-
enabled: boolean;
|
111
|
-
}[];
|
112
|
-
};
|
113
|
-
};
|
114
|
-
};
|
115
|
-
};
|
116
|
-
export declare const WithTextStyling: {
|
117
|
-
(args: any): React.JSX.Element;
|
118
|
-
parameters: {
|
119
|
-
a11y: {
|
120
|
-
config: {
|
121
|
-
rules: {
|
122
|
-
id: string;
|
123
|
-
enabled: boolean;
|
124
|
-
}[];
|
125
|
-
};
|
126
|
-
};
|
127
|
-
};
|
128
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,107 +0,0 @@
|
|
1
|
-
import { Key } from 'react';
|
2
|
-
import { MessageItem, Status } from '../../../types';
|
3
|
-
/**
|
4
|
-
* A set of message util functions.
|
5
|
-
*/
|
6
|
-
export declare const messagesActions: {
|
7
|
-
ADD_MESSAGE: string;
|
8
|
-
HIDE_MESSAGE: string;
|
9
|
-
REMOVE_MESSAGE: string;
|
10
|
-
CLEAR_MESSAGES: string;
|
11
|
-
SHOW_SUCCESS_MESSAGE: string;
|
12
|
-
SHOW_ERROR_MESSAGE: string;
|
13
|
-
SHOW_WARNING_MESSAGE: string;
|
14
|
-
MULTI_SHOW_SUCCESS_MESSAGE: string;
|
15
|
-
MULTI_SHOW_CRITICAL_MESSAGE: string;
|
16
|
-
MULTI_SHOW_WARNING_MESSAGE: string;
|
17
|
-
};
|
18
|
-
export interface Message extends MessageItem {
|
19
|
-
isHidden?: boolean;
|
20
|
-
}
|
21
|
-
type MessageAction = {
|
22
|
-
message?: Message;
|
23
|
-
key?: Key;
|
24
|
-
};
|
25
|
-
export interface AddMessageAction extends MessageAction {
|
26
|
-
type: typeof messagesActions.ADD_MESSAGE;
|
27
|
-
}
|
28
|
-
export interface HideMessageAction extends MessageAction {
|
29
|
-
type: typeof messagesActions.HIDE_MESSAGE;
|
30
|
-
}
|
31
|
-
export interface RemoveMessageAction extends MessageAction {
|
32
|
-
type: typeof messagesActions.REMOVE_MESSAGE;
|
33
|
-
}
|
34
|
-
export interface ClearMessagesAction extends MessageAction {
|
35
|
-
type?: typeof messagesActions.CLEAR_MESSAGES;
|
36
|
-
}
|
37
|
-
export type MessageActions = AddMessageAction | HideMessageAction | RemoveMessageAction | ClearMessagesAction;
|
38
|
-
export type MessagesState = Message[];
|
39
|
-
/**
|
40
|
-
* Create an action to add a message
|
41
|
-
* The message object to be added
|
42
|
-
*/
|
43
|
-
export declare const addMessage: (message: Message) => AddMessageAction;
|
44
|
-
/**
|
45
|
-
* Create an action to hide a message by key
|
46
|
-
*/
|
47
|
-
export declare const hideMessage: (key: Key) => HideMessageAction;
|
48
|
-
/**
|
49
|
-
* Create an action to remove a message by key
|
50
|
-
*/
|
51
|
-
export declare const removeMessage: (key: Key) => RemoveMessageAction;
|
52
|
-
/**
|
53
|
-
* Create an action to add a message and then remove it if there's a timeout
|
54
|
-
*/
|
55
|
-
export declare const showMessage: (messageArg: Message, timeout?: number) => (dispatch: (action: MessageActions) => void) => {
|
56
|
-
isHidden?: boolean | undefined;
|
57
|
-
text?: string | undefined;
|
58
|
-
node?: import("react").ReactNode;
|
59
|
-
key: Key;
|
60
|
-
props?: import("../../../types").MessageItemProps | undefined;
|
61
|
-
status?: Status | undefined;
|
62
|
-
};
|
63
|
-
/** Create an action to clear all messages */
|
64
|
-
export declare const clearMessages: () => ClearMessagesAction;
|
65
|
-
/** Reducer to store a list of messages */
|
66
|
-
declare const messagesReducer: {
|
67
|
-
(state: MessagesState, action: MessageActions): MessagesState;
|
68
|
-
actions: {
|
69
|
-
addMessage: (message: Message) => AddMessageAction;
|
70
|
-
hideMessage: (key: Key) => HideMessageAction;
|
71
|
-
removeMessage: (key: Key) => RemoveMessageAction;
|
72
|
-
showMessage: (messageArg: Message, timeout?: number) => (dispatch: (action: MessageActions) => void) => {
|
73
|
-
isHidden?: boolean | undefined;
|
74
|
-
text?: string | undefined;
|
75
|
-
node?: import("react").ReactNode;
|
76
|
-
key: Key;
|
77
|
-
props?: import("../../../types").MessageItemProps | undefined;
|
78
|
-
status?: Status | undefined;
|
79
|
-
};
|
80
|
-
clearMessages: () => ClearMessagesAction;
|
81
|
-
showSuccessMessage: (text: string) => (dispatch: (action: MessageActions) => void) => {
|
82
|
-
isHidden?: boolean | undefined;
|
83
|
-
text?: string | undefined;
|
84
|
-
node?: import("react").ReactNode;
|
85
|
-
key: Key;
|
86
|
-
props?: import("../../../types").MessageItemProps | undefined;
|
87
|
-
status?: Status | undefined;
|
88
|
-
};
|
89
|
-
showErrorMessage: (text: string) => (dispatch: (action: MessageActions) => void) => {
|
90
|
-
isHidden?: boolean | undefined;
|
91
|
-
text?: string | undefined;
|
92
|
-
node?: import("react").ReactNode;
|
93
|
-
key: Key;
|
94
|
-
props?: import("../../../types").MessageItemProps | undefined;
|
95
|
-
status?: Status | undefined;
|
96
|
-
};
|
97
|
-
showWarningMessage: (text: string) => (dispatch: (action: MessageActions) => void) => {
|
98
|
-
isHidden?: boolean | undefined;
|
99
|
-
text?: string | undefined;
|
100
|
-
node?: import("react").ReactNode;
|
101
|
-
key: Key;
|
102
|
-
props?: import("../../../types").MessageItemProps | undefined;
|
103
|
-
status?: Status | undefined;
|
104
|
-
};
|
105
|
-
};
|
106
|
-
};
|
107
|
-
export default messagesReducer;
|
@@ -1,83 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { Message, MessageActions } from './messagesReducer';
|
3
|
-
export declare const withContainer: (container: any, action: any) => any;
|
4
|
-
export declare const createMultiple: (actionCreator: any) => (container: any, ...args: any[]) => any;
|
5
|
-
/**
|
6
|
-
* Create an action to add a message
|
7
|
-
*/
|
8
|
-
export declare const addMessage: (container: any, ...args: any[]) => any;
|
9
|
-
/**
|
10
|
-
* Create an action to hide a message by key
|
11
|
-
*/
|
12
|
-
export declare const hideMessage: (container: any, ...args: any[]) => any;
|
13
|
-
/**
|
14
|
-
* Create an action to remove a message
|
15
|
-
*/
|
16
|
-
export declare const removeMessage: (container: any, ...args: any[]) => any;
|
17
|
-
/**
|
18
|
-
* Create an action to clear all messages
|
19
|
-
*/
|
20
|
-
export declare const clearMessages: (container: any, ...args: any[]) => any;
|
21
|
-
/**
|
22
|
-
* Create an action to add a message and then remove it if there's a timeout
|
23
|
-
*/
|
24
|
-
export declare const showMessage: (container: any, messageArg: Message, timeout?: number) => (dispatch: any) => {
|
25
|
-
isHidden?: boolean | undefined;
|
26
|
-
text?: string | undefined;
|
27
|
-
node?: import("react").ReactNode;
|
28
|
-
key: import("react").Key;
|
29
|
-
props?: import("../../..").MessageItemProps | undefined;
|
30
|
-
status?: import("../../..").Status | undefined;
|
31
|
-
};
|
32
|
-
export interface MultiMessagesReducerState {
|
33
|
-
container?: string;
|
34
|
-
}
|
35
|
-
export interface MultiMessagesReducerActions {
|
36
|
-
container?: string;
|
37
|
-
action: MessageActions;
|
38
|
-
}
|
39
|
-
declare const multiMessagesReducer: {
|
40
|
-
(state: any, { container, ...action }: {
|
41
|
-
[x: string]: any;
|
42
|
-
container: any;
|
43
|
-
}): any;
|
44
|
-
actions: {
|
45
|
-
removeMessage: (container: any, ...args: any[]) => any;
|
46
|
-
addMessage: (container: any, ...args: any[]) => any;
|
47
|
-
hideMessage: (container: any, ...args: any[]) => any;
|
48
|
-
clearMessages: (container: any, ...args: any[]) => any;
|
49
|
-
showMessage: (container: any, messageArg: Message, timeout?: number) => (dispatch: any) => {
|
50
|
-
isHidden?: boolean | undefined;
|
51
|
-
text?: string | undefined;
|
52
|
-
node?: import("react").ReactNode;
|
53
|
-
key: import("react").Key;
|
54
|
-
props?: import("../../..").MessageItemProps | undefined;
|
55
|
-
status?: import("../../..").Status | undefined;
|
56
|
-
};
|
57
|
-
showSuccessMessage: (container: any, text: any) => (dispatch: any) => {
|
58
|
-
isHidden?: boolean | undefined;
|
59
|
-
text?: string | undefined;
|
60
|
-
node?: import("react").ReactNode;
|
61
|
-
key: import("react").Key;
|
62
|
-
props?: import("../../..").MessageItemProps | undefined;
|
63
|
-
status?: import("../../..").Status | undefined;
|
64
|
-
};
|
65
|
-
showCriticalMessage: (container: any, text: any) => (dispatch: any) => {
|
66
|
-
isHidden?: boolean | undefined;
|
67
|
-
text?: string | undefined;
|
68
|
-
node?: import("react").ReactNode;
|
69
|
-
key: import("react").Key;
|
70
|
-
props?: import("../../..").MessageItemProps | undefined;
|
71
|
-
status?: import("../../..").Status | undefined;
|
72
|
-
};
|
73
|
-
showWarningMessage: (container: any, text: any) => (dispatch: any) => {
|
74
|
-
isHidden?: boolean | undefined;
|
75
|
-
text?: string | undefined;
|
76
|
-
node?: import("react").ReactNode;
|
77
|
-
key: import("react").Key;
|
78
|
-
props?: import("../../..").MessageItemProps | undefined;
|
79
|
-
status?: import("../../..").Status | undefined;
|
80
|
-
};
|
81
|
-
};
|
82
|
-
};
|
83
|
-
export default multiMessagesReducer;
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|