@decisiv/ui-components 2.0.1-alpha.8 → 2.0.1-alpha.82
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/atoms/BaseButton/index.d.ts.map +1 -1
- package/lib/atoms/BaseButton/index.js +1 -1
- package/lib/atoms/BooleanInput/index.d.ts.map +1 -1
- package/lib/atoms/BooleanInput/index.js +19 -2
- package/lib/atoms/BooleanInput/index.test.js +17 -6
- package/lib/atoms/BooleanInput/types.d.ts +2 -0
- package/lib/atoms/BooleanInput/types.d.ts.map +1 -1
- package/lib/atoms/Calendar/hooks/useCalendar/index.d.ts.map +1 -1
- package/lib/atoms/Calendar/hooks/useCalendar/index.js +2 -1
- package/lib/atoms/Calendar/hooks/useCalendar/index.test.js +5 -6
- package/lib/atoms/Calendar/index.d.ts.map +1 -1
- package/lib/atoms/Calendar/index.js +8 -1
- package/lib/atoms/Calendar/index.test.js +70 -40
- package/lib/atoms/InputField/Containers.d.ts +10 -6
- package/lib/atoms/InputField/Containers.d.ts.map +1 -1
- package/lib/atoms/InputField/Containers.js +6 -6
- package/lib/atoms/InputField/InputLabel.d.ts +1 -0
- package/lib/atoms/InputField/InputLabel.d.ts.map +1 -1
- package/lib/atoms/InputField/InputLabel.js +2 -1
- package/lib/atoms/InputField/index.d.ts +4 -0
- package/lib/atoms/InputField/index.d.ts.map +1 -1
- package/lib/atoms/InputField/index.js +18 -7
- package/lib/atoms/InputField/index.test.js +91 -0
- package/lib/atoms/InputField/schema.d.ts.map +1 -1
- package/lib/atoms/InputField/schema.js +1 -0
- package/lib/atoms/OptionsList/Category.d.ts +1 -1
- package/lib/atoms/OptionsList/Category.d.ts.map +1 -1
- package/lib/atoms/OptionsList/Category.js +4 -2
- package/lib/atoms/OptionsList/Footer.d.ts +8 -0
- package/lib/atoms/OptionsList/Footer.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Footer.js +72 -0
- package/lib/atoms/OptionsList/Option.d.ts.map +1 -1
- package/lib/atoms/OptionsList/Option.js +8 -5
- package/lib/atoms/OptionsList/index.d.ts.map +1 -1
- package/lib/atoms/OptionsList/index.js +43 -16
- package/lib/atoms/OptionsList/index.test.js +107 -11
- package/lib/atoms/OptionsList/schema.d.ts.map +1 -1
- package/lib/atoms/OptionsList/schema.js +4 -0
- package/lib/atoms/OptionsList/types.d.ts +14 -0
- package/lib/atoms/OptionsList/types.d.ts.map +1 -1
- package/lib/atoms/RequiredIcon.d.ts +9 -0
- package/lib/atoms/RequiredIcon.d.ts.map +1 -0
- package/lib/atoms/{InputField/RequiredIcon.js → RequiredIcon.js} +7 -3
- package/lib/components/Button/schema.d.ts +6 -1
- package/lib/components/Button/schema.d.ts.map +1 -1
- package/lib/components/Button/schema.js +9 -4
- package/lib/components/Checkbox/index.d.ts.map +1 -1
- package/lib/components/Checkbox/index.js +3 -1
- package/lib/components/Checkbox/schema.d.ts.map +1 -1
- package/lib/components/Checkbox/schema.js +2 -0
- package/lib/components/Combobox/Target.d.ts.map +1 -1
- package/lib/components/Combobox/Target.js +45 -14
- package/lib/components/Combobox/index.d.ts.map +1 -1
- package/lib/components/Combobox/index.js +182 -64
- package/lib/components/Combobox/index.test.js +358 -135
- package/lib/components/Combobox/schema.d.ts.map +1 -1
- package/lib/components/Combobox/schema.js +9 -2
- package/lib/components/Combobox/types.d.ts +12 -3
- package/lib/components/Combobox/types.d.ts.map +1 -1
- package/lib/components/DropdownList/index.d.ts +4 -0
- package/lib/components/DropdownList/index.d.ts.map +1 -1
- package/lib/components/DropdownList/index.js +76 -11
- package/lib/components/DropdownList/propTypes.d.ts +4 -0
- package/lib/components/DropdownList/propTypes.d.ts.map +1 -0
- package/lib/components/DropdownList/propTypes.js +42 -0
- package/lib/components/DropdownList/schema.d.ts.map +1 -1
- package/lib/components/DropdownList/schema.js +5 -0
- package/lib/components/DropdownList/types.d.ts +4 -1
- package/lib/components/DropdownList/types.d.ts.map +1 -1
- package/lib/components/Filter/IconWrapper/index.d.ts +197 -0
- package/lib/components/Filter/IconWrapper/index.d.ts.map +1 -0
- package/lib/components/Filter/IconWrapper/index.js +35 -0
- package/lib/components/Filter/SimplePrimary/index.d.ts +31 -0
- package/lib/components/Filter/SimplePrimary/index.d.ts.map +1 -0
- package/lib/components/Filter/SimplePrimary/index.js +58 -0
- package/lib/components/Filter/SimplePrimary/index.test.js +34 -0
- package/lib/components/Filter/StyledFilter.d.ts +4 -0
- package/lib/components/Filter/StyledFilter.d.ts.map +1 -0
- package/lib/components/Filter/StyledFilter.js +39 -0
- package/lib/components/Filter/StyledLabel/index.d.ts +8 -0
- package/lib/components/Filter/StyledLabel/index.d.ts.map +1 -0
- package/lib/components/Filter/StyledLabel/index.js +30 -0
- package/lib/components/Filter/index.d.ts +27 -0
- package/lib/components/Filter/index.d.ts.map +1 -0
- package/lib/components/Filter/index.js +95 -0
- package/lib/components/Filter/index.test.js +41 -0
- package/lib/components/Filter/kind.d.ts +6 -0
- package/lib/components/Filter/kind.d.ts.map +1 -0
- package/lib/components/Filter/kind.js +45 -0
- package/lib/components/Filter/schema.d.ts +9 -0
- package/lib/components/Filter/schema.d.ts.map +1 -0
- package/lib/components/Filter/schema.js +32 -0
- package/lib/components/Filter/types.d.ts +17 -0
- package/lib/components/Filter/types.d.ts.map +1 -0
- package/lib/components/Filter/types.js +1 -0
- package/lib/components/LeftNav/Item/ClickArea.d.ts.map +1 -1
- package/lib/components/LeftNav/Item/ClickArea.js +2 -2
- package/lib/components/LeftNav/Item/ItemWrapper.d.ts.map +1 -1
- package/lib/components/LeftNav/Item/ItemWrapper.js +3 -3
- package/lib/components/LeftNav/Item/MenuItemWrapper.d.ts +7 -0
- package/lib/components/LeftNav/Item/MenuItemWrapper.d.ts.map +1 -0
- package/lib/components/LeftNav/Item/MenuItemWrapper.js +20 -0
- package/lib/components/LeftNav/Item/NavCollapsedXItem/index.d.ts.map +1 -1
- package/lib/components/LeftNav/Item/NavCollapsedXItem/index.js +7 -5
- package/lib/components/LeftNav/Item/NavExpandedItem/index.d.ts.map +1 -1
- package/lib/components/LeftNav/Item/NavExpandedItem/index.js +24 -13
- package/lib/components/LeftNav/Item/types.d.ts +1 -1
- package/lib/components/LeftNav/Item/types.d.ts.map +1 -1
- package/lib/components/LeftNav/index.test.js +13 -3
- package/lib/components/LeftNav/schema.d.ts.map +1 -1
- package/lib/components/LeftNav/schema.js +2 -0
- package/lib/components/LeftNav/types.d.ts +1 -0
- package/lib/components/LeftNav/types.d.ts.map +1 -1
- package/lib/components/Menu/index.d.ts.map +1 -1
- package/lib/components/Menu/index.js +3 -1
- package/lib/components/Menu/types.d.ts +2 -0
- package/lib/components/Menu/types.d.ts.map +1 -1
- package/lib/components/Modal/components.d.ts +2 -2
- package/lib/components/Modal/index.d.ts.map +1 -1
- package/lib/components/Modal/index.js +5 -5
- package/lib/components/Modal/index.test.js +32 -0
- package/lib/components/Modal/schema.d.ts.map +1 -1
- package/lib/components/Modal/schema.js +2 -2
- package/lib/components/Modal/types.d.ts +2 -2
- package/lib/components/Modal/types.d.ts.map +1 -1
- package/lib/components/Notifications/Notification/components.d.ts +3 -3
- package/lib/components/Notifications/Notification/components.d.ts.map +1 -1
- package/lib/components/Notifications/Notification/components.js +12 -6
- package/lib/components/Notifications/Notification/index.d.ts +3 -6
- package/lib/components/Notifications/Notification/index.d.ts.map +1 -1
- package/lib/components/Notifications/Notification/index.js +19 -12
- package/lib/components/Notifications/Notification/index.test.js +38 -19
- package/lib/components/Notifications/NotificationsPanel/index.d.ts +2 -1
- package/lib/components/Notifications/NotificationsPanel/index.d.ts.map +1 -1
- package/lib/components/Notifications/NotificationsPanel/index.js +44 -21
- package/lib/components/Notifications/NotificationsPanel/schema.js +1 -1
- package/lib/components/Notifications/Notifier.test.js +79 -10
- package/lib/components/Notifications/constants.d.ts +2 -0
- package/lib/components/Notifications/constants.d.ts.map +1 -0
- package/lib/components/Notifications/constants.js +16 -0
- package/lib/components/Notifications/schema.d.ts.map +1 -1
- package/lib/components/Notifications/schema.js +2 -1
- package/lib/components/Notifications/useNotifications.d.ts +1 -0
- package/lib/components/Notifications/useNotifications.d.ts.map +1 -1
- package/lib/components/Notifications/useNotifications.js +3 -3
- package/lib/components/Notifications/useNotifications.test.js +7 -4
- package/lib/components/Pagination/Pagination.d.ts +1 -1
- package/lib/components/Pagination/Pagination.d.ts.map +1 -1
- package/lib/components/Pagination/Pagination.js +1 -0
- package/lib/components/Pagination/Pagination.test.js +9 -0
- package/lib/components/Popover/utils.d.ts +1 -1
- package/lib/components/Select/Target.js +1 -1
- package/lib/components/Select/index.d.ts.map +1 -1
- package/lib/components/Select/index.js +20 -1
- package/lib/components/Select/index.test.js +31 -9
- package/lib/components/Select/schema.d.ts.map +1 -1
- package/lib/components/Select/schema.js +5 -0
- package/lib/components/Select/types.d.ts +2 -1
- package/lib/components/Select/types.d.ts.map +1 -1
- package/lib/components/SelectDate/Target.js +1 -1
- package/lib/components/SelectDate/index.test.js +71 -51
- package/lib/components/SelectDateRange/index.test.js +78 -58
- package/lib/components/SelectMenu/index.d.ts +5 -0
- package/lib/components/SelectMenu/index.d.ts.map +1 -1
- package/lib/components/SelectMenu/index.js +27 -3
- package/lib/components/SelectMenu/schema.d.ts.map +1 -1
- package/lib/components/SelectMenu/schema.js +4 -0
- package/lib/components/Table/Body.d.ts.map +1 -1
- package/lib/components/Table/Body.js +182 -38
- package/lib/components/Table/Container.d.ts.map +1 -1
- package/lib/components/Table/Container.js +2 -2
- package/lib/components/Table/DataRow.d.ts.map +1 -1
- package/lib/components/Table/DataRow.js +43 -16
- package/lib/components/Table/DraggableWrapper.d.ts +5 -0
- package/lib/components/Table/DraggableWrapper.d.ts.map +1 -0
- package/lib/components/Table/DraggableWrapper.js +38 -0
- package/lib/components/Table/Grip.d.ts +4 -0
- package/lib/components/Table/Grip.d.ts.map +1 -0
- package/lib/components/Table/Grip.js +30 -0
- package/lib/components/Table/Head.d.ts +1 -1
- package/lib/components/Table/Head.d.ts.map +1 -1
- package/lib/components/Table/Head.js +11 -5
- package/lib/components/Table/HeaderCell/index.d.ts.map +1 -1
- package/lib/components/Table/HeaderCell/index.js +22 -8
- package/lib/components/Table/HeaderCell/types.d.ts +6 -1
- package/lib/components/Table/HeaderCell/types.d.ts.map +1 -1
- package/lib/components/Table/Provider.d.ts +13 -4
- package/lib/components/Table/Provider.d.ts.map +1 -1
- package/lib/components/Table/Provider.js +45 -5
- package/lib/components/Table/index.d.ts.map +1 -1
- package/lib/components/Table/index.js +112 -18
- package/lib/components/Table/index.test.js +330 -84
- package/lib/components/Table/schema.columns.d.ts.map +1 -1
- package/lib/components/Table/schema.columns.js +6 -4
- package/lib/components/Table/schema.d.ts.map +1 -1
- package/lib/components/Table/schema.js +8 -6
- package/lib/components/Table/types.d.ts +34 -4
- package/lib/components/Table/types.d.ts.map +1 -1
- package/lib/components/Table/utils.d.ts +2 -8
- package/lib/components/Table/utils.d.ts.map +1 -1
- package/lib/components/Table/utils.js +21 -20
- package/lib/components/Tag/types.d.ts +1 -1
- package/lib/components/Tag/types.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.js +1 -1
- package/lib/components/TextArea/index.js +1 -0
- package/lib/components/TextArea/index.test.js +5 -0
- package/lib/components/TextField/Input.js +1 -1
- package/lib/components/TextField/index.test.js +5 -0
- package/lib/components/Toggle/index.d.ts.map +1 -1
- package/lib/components/Toggle/index.js +4 -0
- package/lib/components/Toggle/index.test.js +39 -10
- package/lib/components/TopNav/BrandInfo/index.d.ts +2 -1
- package/lib/components/TopNav/BrandInfo/index.d.ts.map +1 -1
- package/lib/components/TopNav/BrandInfo/index.js +9 -1
- package/lib/components/TopNav/BrandInfo/schema.d.ts.map +1 -1
- package/lib/components/TopNav/BrandInfo/schema.js +4 -1
- package/lib/components/TopNav/index.test.js +28 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +9 -0
- package/lib/providers/ConfigProvider/index.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/index.js +5 -1
- package/lib/providers/ConfigProvider/utils/context.d.ts +1 -1
- package/lib/providers/ConfigProvider/utils/context.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/utils/normalizer.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/utils/normalizer.js +1 -1
- package/lib/providers/ConfigProvider/utils/translations.d.ts +1 -1
- package/lib/providers/ConfigProvider/utils/translations.js +1 -1
- package/lib/providers/NotificationsProvider/index.d.ts +6 -5
- package/lib/providers/NotificationsProvider/index.d.ts.map +1 -1
- package/lib/providers/NotificationsProvider/index.js +47 -28
- package/lib/providers/NotificationsProvider/types.d.ts +4 -1
- package/lib/providers/NotificationsProvider/types.d.ts.map +1 -1
- package/lib/utils/joinClassnames.d.ts +3 -0
- package/lib/utils/joinClassnames.d.ts.map +1 -0
- package/lib/utils/joinClassnames.js +26 -0
- package/package.json +4 -2
- package/lib/atoms/InputField/RequiredIcon.d.ts +0 -4
- package/lib/atoms/InputField/RequiredIcon.d.ts.map +0 -1
|
@@ -11,7 +11,9 @@ var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
|
11
11
|
|
|
12
12
|
var _uniqueId = _interopRequireDefault(require("lodash/uniqueId"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _noop = _interopRequireDefault(require("lodash/noop"));
|
|
15
|
+
|
|
16
|
+
var React = _interopRequireWildcard(require("react"));
|
|
15
17
|
|
|
16
18
|
var _types = require("./types");
|
|
17
19
|
|
|
@@ -47,15 +49,11 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
47
49
|
|
|
48
50
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
49
51
|
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
/* istanbul ignore next */
|
|
54
|
-
dismissAll: function dismissAll() {},
|
|
52
|
+
var NotificationsContext = React.createContext({
|
|
53
|
+
dismissAll: _noop.default,
|
|
54
|
+
isDismissingAll: false,
|
|
55
55
|
notifications: [],
|
|
56
|
-
|
|
57
|
-
/* istanbul ignore next */
|
|
58
|
-
notify: function notify() {}
|
|
56
|
+
notify: _noop.default
|
|
59
57
|
});
|
|
60
58
|
exports.NotificationsContext = NotificationsContext;
|
|
61
59
|
var transitions = (_transitions = {}, _defineProperty(_transitions, _types.NotificationState.ENTERING, {
|
|
@@ -76,10 +74,10 @@ exports.transitions = transitions;
|
|
|
76
74
|
function NotificationsProvider(_ref) {
|
|
77
75
|
var children = _ref.children;
|
|
78
76
|
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
notifications =
|
|
82
|
-
setNotifications =
|
|
77
|
+
var _React$useState = React.useState([]),
|
|
78
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
79
|
+
notifications = _React$useState2[0],
|
|
80
|
+
setNotifications = _React$useState2[1];
|
|
83
81
|
/**
|
|
84
82
|
* Advances a notification to either the specified state or the next state for the current state
|
|
85
83
|
*/
|
|
@@ -112,6 +110,16 @@ function NotificationsProvider(_ref) {
|
|
|
112
110
|
})];
|
|
113
111
|
}
|
|
114
112
|
|
|
113
|
+
if (meta.state === _types.NotificationState.COLLAPSING_ALL && props.onClose) {
|
|
114
|
+
try {
|
|
115
|
+
props.onClose(new MouseEvent('click'));
|
|
116
|
+
} catch (_unused) {
|
|
117
|
+
// IE doesn't support MouseEvent. If you support IE, you must verify or mock
|
|
118
|
+
// attributes required by this event handler.
|
|
119
|
+
props.onClose({});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
115
123
|
return undefined;
|
|
116
124
|
}
|
|
117
125
|
|
|
@@ -134,7 +142,7 @@ function NotificationsProvider(_ref) {
|
|
|
134
142
|
});
|
|
135
143
|
};
|
|
136
144
|
|
|
137
|
-
var notify =
|
|
145
|
+
var notify = React.useCallback(function () {
|
|
138
146
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
139
147
|
args[_key] = arguments[_key];
|
|
140
148
|
}
|
|
@@ -148,25 +156,23 @@ function NotificationsProvider(_ref) {
|
|
|
148
156
|
// notification dispatched.
|
|
149
157
|
var newNotificationParams = args[0](oldNotifications);
|
|
150
158
|
|
|
151
|
-
if (
|
|
159
|
+
if (!newNotificationParams) {
|
|
152
160
|
// In the scenario where a callback arg is provided but returns void,
|
|
153
161
|
// block the rest of the logic and move on. There should be no change.
|
|
154
162
|
return oldNotifications;
|
|
155
163
|
}
|
|
156
164
|
|
|
157
|
-
var
|
|
165
|
+
var _newNotificationParam = _slicedToArray(newNotificationParams, 2);
|
|
166
|
+
|
|
167
|
+
options = _newNotificationParam[0];
|
|
168
|
+
body = _newNotificationParam[1];
|
|
169
|
+
} else {
|
|
170
|
+
var _ref6 = args;
|
|
158
171
|
|
|
159
172
|
var _ref7 = _slicedToArray(_ref6, 2);
|
|
160
173
|
|
|
161
174
|
options = _ref7[0];
|
|
162
175
|
body = _ref7[1];
|
|
163
|
-
} else {
|
|
164
|
-
var _ref8 = args;
|
|
165
|
-
|
|
166
|
-
var _ref9 = _slicedToArray(_ref8, 2);
|
|
167
|
-
|
|
168
|
-
options = _ref9[0];
|
|
169
|
-
body = _ref9[1];
|
|
170
176
|
}
|
|
171
177
|
|
|
172
178
|
var notificationID = (0, _uniqueId.default)("notification-".concat(options.id, "-"));
|
|
@@ -174,6 +180,9 @@ function NotificationsProvider(_ref) {
|
|
|
174
180
|
setTimeout(function () {
|
|
175
181
|
transition(notificationID);
|
|
176
182
|
}, duration);
|
|
183
|
+
var autoDismiss = options.duration && setTimeout(function () {
|
|
184
|
+
transition(notificationID, _types.NotificationState.COLLAPSING);
|
|
185
|
+
}, duration + options.duration);
|
|
177
186
|
|
|
178
187
|
var closeNotificationAfter = function closeNotificationAfter(callback) {
|
|
179
188
|
return function (event) {
|
|
@@ -185,9 +194,13 @@ function NotificationsProvider(_ref) {
|
|
|
185
194
|
};
|
|
186
195
|
};
|
|
187
196
|
|
|
188
|
-
var
|
|
189
|
-
|
|
190
|
-
|
|
197
|
+
var suspendAutoDismiss = function suspendAutoDismiss() {
|
|
198
|
+
clearTimeout(autoDismiss);
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
var actions = options.actions && options.actions.map(function (_ref8) {
|
|
202
|
+
var onClick = _ref8.onClick,
|
|
203
|
+
rest = _objectWithoutProperties(_ref8, ["onClick"]);
|
|
191
204
|
|
|
192
205
|
return _objectSpread({
|
|
193
206
|
onClick: closeNotificationAfter(onClick)
|
|
@@ -196,7 +209,9 @@ function NotificationsProvider(_ref) {
|
|
|
196
209
|
return [[_objectSpread({}, options, {
|
|
197
210
|
actions: actions,
|
|
198
211
|
id: options.id || notificationID,
|
|
199
|
-
onClose: closeNotificationAfter(options.onClose)
|
|
212
|
+
onClose: options.onClose && closeNotificationAfter(options.onClose),
|
|
213
|
+
onFocus: suspendAutoDismiss,
|
|
214
|
+
onHover: suspendAutoDismiss
|
|
200
215
|
}), body, {
|
|
201
216
|
notificationID: notificationID,
|
|
202
217
|
state: _types.NotificationState.ENTERING
|
|
@@ -204,9 +219,13 @@ function NotificationsProvider(_ref) {
|
|
|
204
219
|
});
|
|
205
220
|
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
206
221
|
[setNotifications]);
|
|
207
|
-
|
|
222
|
+
var isDismissingAll = React.useMemo(function () {
|
|
223
|
+
return !(0, _isEmpty.default)(notifications) && notifications[0][2].state === _types.NotificationState.COLLAPSING_ALL;
|
|
224
|
+
}, [notifications]);
|
|
225
|
+
return React.createElement(NotificationsContext.Provider, {
|
|
208
226
|
value: {
|
|
209
227
|
dismissAll: dismissAll,
|
|
228
|
+
isDismissingAll: isDismissingAll,
|
|
210
229
|
notifications: notifications,
|
|
211
230
|
notify: notify
|
|
212
231
|
}
|
|
@@ -11,13 +11,16 @@ export interface TActionProps {
|
|
|
11
11
|
}
|
|
12
12
|
export interface TNotificationProps {
|
|
13
13
|
actions?: [TActionProps] | [TActionProps, TActionProps];
|
|
14
|
+
duration?: number;
|
|
14
15
|
children?: React.ReactNode;
|
|
15
16
|
closeHint?: string;
|
|
16
17
|
color?: StatusColorsKeys;
|
|
17
18
|
icon?: IconComponent;
|
|
18
19
|
id: string;
|
|
19
20
|
intent?: keyof typeof intents;
|
|
20
|
-
onClose
|
|
21
|
+
onClose?: React.MouseEventHandler;
|
|
22
|
+
onFocus?: React.FocusEventHandler;
|
|
23
|
+
onHover?: React.MouseEventHandler;
|
|
21
24
|
title: string;
|
|
22
25
|
}
|
|
23
26
|
export declare type TNotificationOptions = TNotificationProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/NotificationsProvider/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,aAAK,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAEvD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACxD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,OAAO,OAAO,CAAC;IAC9B,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/NotificationsProvider/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,aAAK,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAEvD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,OAAO,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,oBAAoB,GAAG,kBAAkB,CAAC;AAEtD,oBAAY,iBAAiB;IAC3B,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,cAAc,mBAAmB;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,iBAAiB,CAAC;CAC1B;AAED,oBAAY,aAAa,GAAG,CAC1B,oBAAoB,EACpB,GAAG,CAAC,OAAO,GAAG,SAAS,EACvB,iBAAiB,CAClB,CAAC;AACF,oBAAY,cAAc,GAAG,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"joinClassnames.d.ts","sourceRoot":"","sources":["../../src/utils/joinClassnames.ts"],"names":[],"mappings":"AAMA,iBAAS,cAAc,CACrB,GAAG,UAAU,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GACpC,MAAM,GAAG,SAAS,CAIpB;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _compact = _interopRequireDefault(require("lodash/compact"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Join multiple classnames
|
|
14
|
+
* Returns a string of joined classnames omitting falsy values, undefined when resulting string is empty
|
|
15
|
+
*/
|
|
16
|
+
function joinClassNames() {
|
|
17
|
+
for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
18
|
+
classnames[_key] = arguments[_key];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
var result = (0, _compact.default)(classnames).join(' ');
|
|
22
|
+
return result || undefined;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var _default = joinClassNames;
|
|
26
|
+
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decisiv/ui-components",
|
|
3
|
-
"version": "2.0.1-alpha.
|
|
3
|
+
"version": "2.0.1-alpha.82+d0fecf5",
|
|
4
4
|
"description": "Decisiv's design system React components",
|
|
5
5
|
"author": "Decisiv UI Development Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"lodash": "^4.17.15",
|
|
26
26
|
"md5": "^2.2.1",
|
|
27
27
|
"polished": "^3.4.1",
|
|
28
|
+
"react-beautiful-dnd": "^13.0.0",
|
|
28
29
|
"react-desc": "^4.1.2",
|
|
29
30
|
"react-popper": "^1.3.3",
|
|
30
31
|
"styled-components-modifiers": "^1.2.5",
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
"@types/md5": "^2.1.33",
|
|
49
50
|
"@types/prop-types": "^15.7.1",
|
|
50
51
|
"@types/react": "^16.8.22",
|
|
52
|
+
"@types/react-beautiful-dnd": "^13.0.0",
|
|
51
53
|
"@types/styled-components": "^4.1.15",
|
|
52
54
|
"@types/styled-theming": "^2.2.2",
|
|
53
55
|
"babel-plugin-styled-components": "^1.10.6",
|
|
@@ -69,5 +71,5 @@
|
|
|
69
71
|
"access": "public"
|
|
70
72
|
},
|
|
71
73
|
"private": false,
|
|
72
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "d0fecf5032f3f632a8263f83bd3bb345fc9e93b2"
|
|
73
75
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RequiredIcon.d.ts","sourceRoot":"","sources":["../../../src/atoms/InputField/RequiredIcon.tsx"],"names":[],"mappings":"AACA,OAAc,EAEZ,sBAAsB,EAEtB,aAAa,EACd,MAAM,OAAO,CAAC;AAWf,QAAA,MAAM,YAAY,EAAE,sBAAsB,CACxC,cAAc,EACd,aAAa,CAAC,cAAc,CAAC,CAU9B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|