siam-ui-utils 3.1.0 → 3.1.2

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 (96) hide show
  1. package/dist/CustomBootstrap.js +9 -9
  2. package/dist/_virtual/_commonjsHelpers.js +7 -7
  3. package/dist/_virtual/events.js +6 -6
  4. package/dist/_virtual/events2.js +5 -5
  5. package/dist/_virtual/index.js +8 -8
  6. package/dist/_virtual/index2.js +5 -5
  7. package/dist/assets/img/copiar.png.js +5 -5
  8. package/dist/assets/img/take-photo.jpg.js +5 -5
  9. package/dist/constants.js +9 -9
  10. package/dist/copy-link/index.js +60 -60
  11. package/dist/copy-link/styles.css +37 -37
  12. package/dist/custom-input/CustomInputCheckbox.js +37 -37
  13. package/dist/custom-input/CustomInputCurrency.js +84 -84
  14. package/dist/custom-input/CustomInputFile.js +47 -47
  15. package/dist/custom-input/CustomInputRadio.js +68 -68
  16. package/dist/custom-input/constant.js +5 -5
  17. package/dist/custom-input/index.js +12 -12
  18. package/dist/drag-and-dropzone/DropzoneComponent.js +83 -83
  19. package/dist/drag-and-dropzone/config.js +59 -59
  20. package/dist/drag-and-dropzone/index.js +39 -39
  21. package/dist/dropzone/Input.js +77 -77
  22. package/dist/dropzone/Layout.js +50 -50
  23. package/dist/dropzone/Preview.js +117 -117
  24. package/dist/dropzone/SubmitButton.js +34 -34
  25. package/dist/dropzone/assets/cancel.svg.js +5 -5
  26. package/dist/dropzone/assets/remove.svg.js +5 -5
  27. package/dist/dropzone/assets/restart.svg.js +5 -5
  28. package/dist/dropzone/index.js +514 -514
  29. package/dist/dropzone/utils.js +93 -93
  30. package/dist/dropzone-uploader/base/index.js +135 -135
  31. package/dist/dropzone-uploader/index.js +7 -7
  32. package/dist/dropzone-uploader/styled/index.js +148 -148
  33. package/dist/iconos/constants-svg.js +666 -666
  34. package/dist/iconos/icon-button-svg.js +50 -50
  35. package/dist/iconos/index.js +24 -24
  36. package/dist/iconos/styled-icon.js +26 -26
  37. package/dist/index.js +4 -4
  38. package/dist/intl-messages/index.js +11 -11
  39. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +8 -8
  40. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +13 -13
  41. package/dist/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +8 -8
  42. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +13 -13
  43. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +9 -9
  44. package/dist/node_modules/@neolution-ch/reactstrap/esm/Badge.js +77 -0
  45. package/dist/node_modules/@neolution-ch/reactstrap/esm/Badge.js.map +1 -0
  46. package/dist/node_modules/@neolution-ch/reactstrap/esm/Button.js +111 -111
  47. package/dist/node_modules/@neolution-ch/reactstrap/esm/CloseButton.js +106 -106
  48. package/dist/node_modules/@neolution-ch/reactstrap/esm/Col.js +125 -125
  49. package/dist/node_modules/@neolution-ch/reactstrap/esm/FormGroup.js +75 -75
  50. package/dist/node_modules/@neolution-ch/reactstrap/esm/Input.js +225 -225
  51. package/dist/node_modules/@neolution-ch/reactstrap/esm/Label.js +122 -122
  52. package/dist/node_modules/@neolution-ch/reactstrap/esm/Row.js +83 -83
  53. package/dist/node_modules/@neolution-ch/reactstrap/esm/utils.js +68 -68
  54. package/dist/node_modules/classnames/index.js +62 -62
  55. package/dist/node_modules/dom-helpers/esm/addClass.js +10 -10
  56. package/dist/node_modules/dom-helpers/esm/hasClass.js +8 -8
  57. package/dist/node_modules/dom-helpers/esm/removeClass.js +16 -16
  58. package/dist/node_modules/dropzone/dist/dropzone.js +1968 -1968
  59. package/dist/node_modules/events/events.js +372 -372
  60. package/dist/node_modules/just-extend/index.esm.js +43 -43
  61. package/dist/node_modules/react-transition-group/esm/CSSTransition.js +275 -275
  62. package/dist/node_modules/react-transition-group/esm/Transition.js +441 -441
  63. package/dist/node_modules/react-transition-group/esm/TransitionGroup.js +146 -146
  64. package/dist/node_modules/react-transition-group/esm/TransitionGroupContext.js +6 -6
  65. package/dist/node_modules/react-transition-group/esm/config.js +7 -7
  66. package/dist/node_modules/react-transition-group/esm/utils/ChildMapping.js +100 -100
  67. package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +24 -24
  68. package/dist/node_modules/react-transition-group/esm/utils/reflow.js +7 -7
  69. package/dist/react-notifications/Notification.js +73 -73
  70. package/dist/react-notifications/NotificationContainer.js +59 -59
  71. package/dist/react-notifications/NotificationManager.js +174 -174
  72. package/dist/react-notifications/Notifications.js +72 -72
  73. package/dist/react-notifications/constants.js +26 -26
  74. package/dist/react-notifications/index.js +11 -11
  75. package/dist/select/custom-select/constants.js +8 -8
  76. package/dist/select/custom-select/index.js +89 -89
  77. package/dist/select/custom-select-input/index.js +12 -12
  78. package/dist/select/index.js +9 -9
  79. package/dist/select/multi-select/badge-label-multi-select.js +29 -29
  80. package/dist/select/multi-select/index.css +36 -36
  81. package/dist/select/multi-select/index.js +171 -171
  82. package/dist/select/multi-select/index.js.map +1 -1
  83. package/dist/select/multi-select/styled-component.js +23 -23
  84. package/dist/select/multi-select/styled-component.js.map +1 -1
  85. package/dist/timer/index.js +60 -60
  86. package/dist/timer/styles.css +58 -58
  87. package/dist/tomar-foto/index.js +62 -62
  88. package/dist/view-layout/button-editor.js +14 -14
  89. package/dist/view-layout/constants.js +11 -11
  90. package/dist/view-layout/editor-layer.js +28 -28
  91. package/dist/view-layout/index.js +53 -53
  92. package/dist/view-layout/slot-wrapper.js +39 -39
  93. package/dist/view-layout/styles.css +126 -126
  94. package/dist/where-by-room/index.js +20 -20
  95. package/dist/where-by-room/room.js +78 -78
  96. package/package.json +1 -4
@@ -1,43 +1,43 @@
1
- var objectExtend = extend;
2
- function extend() {
3
- var args = [].slice.call(arguments);
4
- var deep = false;
5
- if (typeof args[0] == "boolean") {
6
- deep = args.shift();
7
- }
8
- var result = args[0];
9
- if (isUnextendable(result)) {
10
- throw new Error("extendee must be an object");
11
- }
12
- var extenders = args.slice(1);
13
- var len = extenders.length;
14
- for (var i = 0; i < len; i++) {
15
- var extender = extenders[i];
16
- for (var key in extender) {
17
- if (Object.prototype.hasOwnProperty.call(extender, key)) {
18
- var value = extender[key];
19
- if (deep && isCloneable(value)) {
20
- var base = Array.isArray(value) ? [] : {};
21
- result[key] = extend(
22
- true,
23
- Object.prototype.hasOwnProperty.call(result, key) && !isUnextendable(result[key]) ? result[key] : base,
24
- value
25
- );
26
- } else {
27
- result[key] = value;
28
- }
29
- }
30
- }
31
- }
32
- return result;
33
- }
34
- function isCloneable(obj) {
35
- return Array.isArray(obj) || {}.toString.call(obj) == "[object Object]";
36
- }
37
- function isUnextendable(val) {
38
- return !val || typeof val != "object" && typeof val != "function";
39
- }
40
- export {
41
- objectExtend as default
42
- };
43
- //# sourceMappingURL=index.esm.js.map
1
+ var objectExtend = extend;
2
+ function extend() {
3
+ var args = [].slice.call(arguments);
4
+ var deep = false;
5
+ if (typeof args[0] == "boolean") {
6
+ deep = args.shift();
7
+ }
8
+ var result = args[0];
9
+ if (isUnextendable(result)) {
10
+ throw new Error("extendee must be an object");
11
+ }
12
+ var extenders = args.slice(1);
13
+ var len = extenders.length;
14
+ for (var i = 0; i < len; i++) {
15
+ var extender = extenders[i];
16
+ for (var key in extender) {
17
+ if (Object.prototype.hasOwnProperty.call(extender, key)) {
18
+ var value = extender[key];
19
+ if (deep && isCloneable(value)) {
20
+ var base = Array.isArray(value) ? [] : {};
21
+ result[key] = extend(
22
+ true,
23
+ Object.prototype.hasOwnProperty.call(result, key) && !isUnextendable(result[key]) ? result[key] : base,
24
+ value
25
+ );
26
+ } else {
27
+ result[key] = value;
28
+ }
29
+ }
30
+ }
31
+ }
32
+ return result;
33
+ }
34
+ function isCloneable(obj) {
35
+ return Array.isArray(obj) || {}.toString.call(obj) == "[object Object]";
36
+ }
37
+ function isUnextendable(val) {
38
+ return !val || typeof val != "object" && typeof val != "function";
39
+ }
40
+ export {
41
+ objectExtend as default
42
+ };
43
+ //# sourceMappingURL=index.esm.js.map
@@ -1,275 +1,275 @@
1
- import _extends from "../../@babel/runtime/helpers/esm/extends.js";
2
- import _objectWithoutPropertiesLoose from "../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";
3
- import _inheritsLoose from "../../@babel/runtime/helpers/esm/inheritsLoose.js";
4
- import PropTypes from "prop-types";
5
- import addClass from "../../dom-helpers/esm/addClass.js";
6
- import removeClass$1 from "../../dom-helpers/esm/removeClass.js";
7
- import React from "react";
8
- import Transition from "./Transition.js";
9
- import { classNamesShape } from "./utils/PropTypes.js";
10
- import { forceReflow } from "./utils/reflow.js";
11
- var define_process_env_default = {};
12
- var _addClass = function addClass$1(node, classes) {
13
- return node && classes && classes.split(" ").forEach(function(c) {
14
- return addClass(node, c);
15
- });
16
- };
17
- var removeClass = function removeClass2(node, classes) {
18
- return node && classes && classes.split(" ").forEach(function(c) {
19
- return removeClass$1(node, c);
20
- });
21
- };
22
- var CSSTransition = /* @__PURE__ */ (function(_React$Component) {
23
- _inheritsLoose(CSSTransition2, _React$Component);
24
- function CSSTransition2() {
25
- var _this;
26
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
27
- args[_key] = arguments[_key];
28
- }
29
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
30
- _this.appliedClasses = {
31
- appear: {},
32
- enter: {},
33
- exit: {}
34
- };
35
- _this.onEnter = function(maybeNode, maybeAppearing) {
36
- var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing), node = _this$resolveArgument[0], appearing = _this$resolveArgument[1];
37
- _this.removeClasses(node, "exit");
38
- _this.addClass(node, appearing ? "appear" : "enter", "base");
39
- if (_this.props.onEnter) {
40
- _this.props.onEnter(maybeNode, maybeAppearing);
41
- }
42
- };
43
- _this.onEntering = function(maybeNode, maybeAppearing) {
44
- var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing), node = _this$resolveArgument2[0], appearing = _this$resolveArgument2[1];
45
- var type = appearing ? "appear" : "enter";
46
- _this.addClass(node, type, "active");
47
- if (_this.props.onEntering) {
48
- _this.props.onEntering(maybeNode, maybeAppearing);
49
- }
50
- };
51
- _this.onEntered = function(maybeNode, maybeAppearing) {
52
- var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing), node = _this$resolveArgument3[0], appearing = _this$resolveArgument3[1];
53
- var type = appearing ? "appear" : "enter";
54
- _this.removeClasses(node, type);
55
- _this.addClass(node, type, "done");
56
- if (_this.props.onEntered) {
57
- _this.props.onEntered(maybeNode, maybeAppearing);
58
- }
59
- };
60
- _this.onExit = function(maybeNode) {
61
- var _this$resolveArgument4 = _this.resolveArguments(maybeNode), node = _this$resolveArgument4[0];
62
- _this.removeClasses(node, "appear");
63
- _this.removeClasses(node, "enter");
64
- _this.addClass(node, "exit", "base");
65
- if (_this.props.onExit) {
66
- _this.props.onExit(maybeNode);
67
- }
68
- };
69
- _this.onExiting = function(maybeNode) {
70
- var _this$resolveArgument5 = _this.resolveArguments(maybeNode), node = _this$resolveArgument5[0];
71
- _this.addClass(node, "exit", "active");
72
- if (_this.props.onExiting) {
73
- _this.props.onExiting(maybeNode);
74
- }
75
- };
76
- _this.onExited = function(maybeNode) {
77
- var _this$resolveArgument6 = _this.resolveArguments(maybeNode), node = _this$resolveArgument6[0];
78
- _this.removeClasses(node, "exit");
79
- _this.addClass(node, "exit", "done");
80
- if (_this.props.onExited) {
81
- _this.props.onExited(maybeNode);
82
- }
83
- };
84
- _this.resolveArguments = function(maybeNode, maybeAppearing) {
85
- return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] : [maybeNode, maybeAppearing];
86
- };
87
- _this.getClassNames = function(type) {
88
- var classNames = _this.props.classNames;
89
- var isStringClassNames = typeof classNames === "string";
90
- var prefix = isStringClassNames && classNames ? classNames + "-" : "";
91
- var baseClassName = isStringClassNames ? "" + prefix + type : classNames[type];
92
- var activeClassName = isStringClassNames ? baseClassName + "-active" : classNames[type + "Active"];
93
- var doneClassName = isStringClassNames ? baseClassName + "-done" : classNames[type + "Done"];
94
- return {
95
- baseClassName,
96
- activeClassName,
97
- doneClassName
98
- };
99
- };
100
- return _this;
101
- }
102
- var _proto = CSSTransition2.prototype;
103
- _proto.addClass = function addClass2(node, type, phase) {
104
- var className = this.getClassNames(type)[phase + "ClassName"];
105
- var _this$getClassNames = this.getClassNames("enter"), doneClassName = _this$getClassNames.doneClassName;
106
- if (type === "appear" && phase === "done" && doneClassName) {
107
- className += " " + doneClassName;
108
- }
109
- if (phase === "active") {
110
- if (node) forceReflow(node);
111
- }
112
- if (className) {
113
- this.appliedClasses[type][phase] = className;
114
- _addClass(node, className);
115
- }
116
- };
117
- _proto.removeClasses = function removeClasses(node, type) {
118
- var _this$appliedClasses$ = this.appliedClasses[type], baseClassName = _this$appliedClasses$.base, activeClassName = _this$appliedClasses$.active, doneClassName = _this$appliedClasses$.done;
119
- this.appliedClasses[type] = {};
120
- if (baseClassName) {
121
- removeClass(node, baseClassName);
122
- }
123
- if (activeClassName) {
124
- removeClass(node, activeClassName);
125
- }
126
- if (doneClassName) {
127
- removeClass(node, doneClassName);
128
- }
129
- };
130
- _proto.render = function render() {
131
- var _this$props = this.props;
132
- _this$props.classNames;
133
- var props = _objectWithoutPropertiesLoose(_this$props, ["classNames"]);
134
- return /* @__PURE__ */ React.createElement(Transition, _extends({}, props, {
135
- onEnter: this.onEnter,
136
- onEntered: this.onEntered,
137
- onEntering: this.onEntering,
138
- onExit: this.onExit,
139
- onExiting: this.onExiting,
140
- onExited: this.onExited
141
- }));
142
- };
143
- return CSSTransition2;
144
- })(React.Component);
145
- CSSTransition.defaultProps = {
146
- classNames: ""
147
- };
148
- CSSTransition.propTypes = define_process_env_default.NODE_ENV !== "production" ? _extends({}, Transition.propTypes, {
149
- /**
150
- * The animation classNames applied to the component as it appears, enters,
151
- * exits or has finished the transition. A single name can be provided, which
152
- * will be suffixed for each stage, e.g. `classNames="fade"` applies:
153
- *
154
- * - `fade-appear`, `fade-appear-active`, `fade-appear-done`
155
- * - `fade-enter`, `fade-enter-active`, `fade-enter-done`
156
- * - `fade-exit`, `fade-exit-active`, `fade-exit-done`
157
- *
158
- * A few details to note about how these classes are applied:
159
- *
160
- * 1. They are _joined_ with the ones that are already defined on the child
161
- * component, so if you want to add some base styles, you can use
162
- * `className` without worrying that it will be overridden.
163
- *
164
- * 2. If the transition component mounts with `in={false}`, no classes are
165
- * applied yet. You might be expecting `*-exit-done`, but if you think
166
- * about it, a component cannot finish exiting if it hasn't entered yet.
167
- *
168
- * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This
169
- * allows you to define different behavior for when appearing is done and
170
- * when regular entering is done, using selectors like
171
- * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply
172
- * an epic entrance animation when element first appears in the DOM using
173
- * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can
174
- * simply use `fade-enter-done` for defining both cases.
175
- *
176
- * Each individual classNames can also be specified independently like:
177
- *
178
- * ```js
179
- * classNames={{
180
- * appear: 'my-appear',
181
- * appearActive: 'my-active-appear',
182
- * appearDone: 'my-done-appear',
183
- * enter: 'my-enter',
184
- * enterActive: 'my-active-enter',
185
- * enterDone: 'my-done-enter',
186
- * exit: 'my-exit',
187
- * exitActive: 'my-active-exit',
188
- * exitDone: 'my-done-exit',
189
- * }}
190
- * ```
191
- *
192
- * If you want to set these classes using CSS Modules:
193
- *
194
- * ```js
195
- * import styles from './styles.css';
196
- * ```
197
- *
198
- * you might want to use camelCase in your CSS file, that way could simply
199
- * spread them instead of listing them one by one:
200
- *
201
- * ```js
202
- * classNames={{ ...styles }}
203
- * ```
204
- *
205
- * @type {string | {
206
- * appear?: string,
207
- * appearActive?: string,
208
- * appearDone?: string,
209
- * enter?: string,
210
- * enterActive?: string,
211
- * enterDone?: string,
212
- * exit?: string,
213
- * exitActive?: string,
214
- * exitDone?: string,
215
- * }}
216
- */
217
- classNames: classNamesShape,
218
- /**
219
- * A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
220
- * applied.
221
- *
222
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
223
- *
224
- * @type Function(node: HtmlElement, isAppearing: bool)
225
- */
226
- onEnter: PropTypes.func,
227
- /**
228
- * A `<Transition>` callback fired immediately after the 'enter-active' or
229
- * 'appear-active' class is applied.
230
- *
231
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
232
- *
233
- * @type Function(node: HtmlElement, isAppearing: bool)
234
- */
235
- onEntering: PropTypes.func,
236
- /**
237
- * A `<Transition>` callback fired immediately after the 'enter' or
238
- * 'appear' classes are **removed** and the `done` class is added to the DOM node.
239
- *
240
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
241
- *
242
- * @type Function(node: HtmlElement, isAppearing: bool)
243
- */
244
- onEntered: PropTypes.func,
245
- /**
246
- * A `<Transition>` callback fired immediately after the 'exit' class is
247
- * applied.
248
- *
249
- * **Note**: when `nodeRef` prop is passed, `node` is not passed
250
- *
251
- * @type Function(node: HtmlElement)
252
- */
253
- onExit: PropTypes.func,
254
- /**
255
- * A `<Transition>` callback fired immediately after the 'exit-active' is applied.
256
- *
257
- * **Note**: when `nodeRef` prop is passed, `node` is not passed
258
- *
259
- * @type Function(node: HtmlElement)
260
- */
261
- onExiting: PropTypes.func,
262
- /**
263
- * A `<Transition>` callback fired immediately after the 'exit' classes
264
- * are **removed** and the `exit-done` class is added to the DOM node.
265
- *
266
- * **Note**: when `nodeRef` prop is passed, `node` is not passed
267
- *
268
- * @type Function(node: HtmlElement)
269
- */
270
- onExited: PropTypes.func
271
- }) : {};
272
- export {
273
- CSSTransition as default
274
- };
275
- //# sourceMappingURL=CSSTransition.js.map
1
+ import _extends from "../../@babel/runtime/helpers/esm/extends.js";
2
+ import _objectWithoutPropertiesLoose from "../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";
3
+ import _inheritsLoose from "../../@babel/runtime/helpers/esm/inheritsLoose.js";
4
+ import PropTypes from "prop-types";
5
+ import addClass from "../../dom-helpers/esm/addClass.js";
6
+ import removeClass$1 from "../../dom-helpers/esm/removeClass.js";
7
+ import React from "react";
8
+ import Transition from "./Transition.js";
9
+ import { classNamesShape } from "./utils/PropTypes.js";
10
+ import { forceReflow } from "./utils/reflow.js";
11
+ var define_process_env_default = {};
12
+ var _addClass = function addClass$1(node, classes) {
13
+ return node && classes && classes.split(" ").forEach(function(c) {
14
+ return addClass(node, c);
15
+ });
16
+ };
17
+ var removeClass = function removeClass2(node, classes) {
18
+ return node && classes && classes.split(" ").forEach(function(c) {
19
+ return removeClass$1(node, c);
20
+ });
21
+ };
22
+ var CSSTransition = /* @__PURE__ */ (function(_React$Component) {
23
+ _inheritsLoose(CSSTransition2, _React$Component);
24
+ function CSSTransition2() {
25
+ var _this;
26
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
27
+ args[_key] = arguments[_key];
28
+ }
29
+ _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
30
+ _this.appliedClasses = {
31
+ appear: {},
32
+ enter: {},
33
+ exit: {}
34
+ };
35
+ _this.onEnter = function(maybeNode, maybeAppearing) {
36
+ var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing), node = _this$resolveArgument[0], appearing = _this$resolveArgument[1];
37
+ _this.removeClasses(node, "exit");
38
+ _this.addClass(node, appearing ? "appear" : "enter", "base");
39
+ if (_this.props.onEnter) {
40
+ _this.props.onEnter(maybeNode, maybeAppearing);
41
+ }
42
+ };
43
+ _this.onEntering = function(maybeNode, maybeAppearing) {
44
+ var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing), node = _this$resolveArgument2[0], appearing = _this$resolveArgument2[1];
45
+ var type = appearing ? "appear" : "enter";
46
+ _this.addClass(node, type, "active");
47
+ if (_this.props.onEntering) {
48
+ _this.props.onEntering(maybeNode, maybeAppearing);
49
+ }
50
+ };
51
+ _this.onEntered = function(maybeNode, maybeAppearing) {
52
+ var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing), node = _this$resolveArgument3[0], appearing = _this$resolveArgument3[1];
53
+ var type = appearing ? "appear" : "enter";
54
+ _this.removeClasses(node, type);
55
+ _this.addClass(node, type, "done");
56
+ if (_this.props.onEntered) {
57
+ _this.props.onEntered(maybeNode, maybeAppearing);
58
+ }
59
+ };
60
+ _this.onExit = function(maybeNode) {
61
+ var _this$resolveArgument4 = _this.resolveArguments(maybeNode), node = _this$resolveArgument4[0];
62
+ _this.removeClasses(node, "appear");
63
+ _this.removeClasses(node, "enter");
64
+ _this.addClass(node, "exit", "base");
65
+ if (_this.props.onExit) {
66
+ _this.props.onExit(maybeNode);
67
+ }
68
+ };
69
+ _this.onExiting = function(maybeNode) {
70
+ var _this$resolveArgument5 = _this.resolveArguments(maybeNode), node = _this$resolveArgument5[0];
71
+ _this.addClass(node, "exit", "active");
72
+ if (_this.props.onExiting) {
73
+ _this.props.onExiting(maybeNode);
74
+ }
75
+ };
76
+ _this.onExited = function(maybeNode) {
77
+ var _this$resolveArgument6 = _this.resolveArguments(maybeNode), node = _this$resolveArgument6[0];
78
+ _this.removeClasses(node, "exit");
79
+ _this.addClass(node, "exit", "done");
80
+ if (_this.props.onExited) {
81
+ _this.props.onExited(maybeNode);
82
+ }
83
+ };
84
+ _this.resolveArguments = function(maybeNode, maybeAppearing) {
85
+ return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] : [maybeNode, maybeAppearing];
86
+ };
87
+ _this.getClassNames = function(type) {
88
+ var classNames = _this.props.classNames;
89
+ var isStringClassNames = typeof classNames === "string";
90
+ var prefix = isStringClassNames && classNames ? classNames + "-" : "";
91
+ var baseClassName = isStringClassNames ? "" + prefix + type : classNames[type];
92
+ var activeClassName = isStringClassNames ? baseClassName + "-active" : classNames[type + "Active"];
93
+ var doneClassName = isStringClassNames ? baseClassName + "-done" : classNames[type + "Done"];
94
+ return {
95
+ baseClassName,
96
+ activeClassName,
97
+ doneClassName
98
+ };
99
+ };
100
+ return _this;
101
+ }
102
+ var _proto = CSSTransition2.prototype;
103
+ _proto.addClass = function addClass2(node, type, phase) {
104
+ var className = this.getClassNames(type)[phase + "ClassName"];
105
+ var _this$getClassNames = this.getClassNames("enter"), doneClassName = _this$getClassNames.doneClassName;
106
+ if (type === "appear" && phase === "done" && doneClassName) {
107
+ className += " " + doneClassName;
108
+ }
109
+ if (phase === "active") {
110
+ if (node) forceReflow(node);
111
+ }
112
+ if (className) {
113
+ this.appliedClasses[type][phase] = className;
114
+ _addClass(node, className);
115
+ }
116
+ };
117
+ _proto.removeClasses = function removeClasses(node, type) {
118
+ var _this$appliedClasses$ = this.appliedClasses[type], baseClassName = _this$appliedClasses$.base, activeClassName = _this$appliedClasses$.active, doneClassName = _this$appliedClasses$.done;
119
+ this.appliedClasses[type] = {};
120
+ if (baseClassName) {
121
+ removeClass(node, baseClassName);
122
+ }
123
+ if (activeClassName) {
124
+ removeClass(node, activeClassName);
125
+ }
126
+ if (doneClassName) {
127
+ removeClass(node, doneClassName);
128
+ }
129
+ };
130
+ _proto.render = function render() {
131
+ var _this$props = this.props;
132
+ _this$props.classNames;
133
+ var props = _objectWithoutPropertiesLoose(_this$props, ["classNames"]);
134
+ return /* @__PURE__ */ React.createElement(Transition, _extends({}, props, {
135
+ onEnter: this.onEnter,
136
+ onEntered: this.onEntered,
137
+ onEntering: this.onEntering,
138
+ onExit: this.onExit,
139
+ onExiting: this.onExiting,
140
+ onExited: this.onExited
141
+ }));
142
+ };
143
+ return CSSTransition2;
144
+ })(React.Component);
145
+ CSSTransition.defaultProps = {
146
+ classNames: ""
147
+ };
148
+ CSSTransition.propTypes = define_process_env_default.NODE_ENV !== "production" ? _extends({}, Transition.propTypes, {
149
+ /**
150
+ * The animation classNames applied to the component as it appears, enters,
151
+ * exits or has finished the transition. A single name can be provided, which
152
+ * will be suffixed for each stage, e.g. `classNames="fade"` applies:
153
+ *
154
+ * - `fade-appear`, `fade-appear-active`, `fade-appear-done`
155
+ * - `fade-enter`, `fade-enter-active`, `fade-enter-done`
156
+ * - `fade-exit`, `fade-exit-active`, `fade-exit-done`
157
+ *
158
+ * A few details to note about how these classes are applied:
159
+ *
160
+ * 1. They are _joined_ with the ones that are already defined on the child
161
+ * component, so if you want to add some base styles, you can use
162
+ * `className` without worrying that it will be overridden.
163
+ *
164
+ * 2. If the transition component mounts with `in={false}`, no classes are
165
+ * applied yet. You might be expecting `*-exit-done`, but if you think
166
+ * about it, a component cannot finish exiting if it hasn't entered yet.
167
+ *
168
+ * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This
169
+ * allows you to define different behavior for when appearing is done and
170
+ * when regular entering is done, using selectors like
171
+ * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply
172
+ * an epic entrance animation when element first appears in the DOM using
173
+ * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can
174
+ * simply use `fade-enter-done` for defining both cases.
175
+ *
176
+ * Each individual classNames can also be specified independently like:
177
+ *
178
+ * ```js
179
+ * classNames={{
180
+ * appear: 'my-appear',
181
+ * appearActive: 'my-active-appear',
182
+ * appearDone: 'my-done-appear',
183
+ * enter: 'my-enter',
184
+ * enterActive: 'my-active-enter',
185
+ * enterDone: 'my-done-enter',
186
+ * exit: 'my-exit',
187
+ * exitActive: 'my-active-exit',
188
+ * exitDone: 'my-done-exit',
189
+ * }}
190
+ * ```
191
+ *
192
+ * If you want to set these classes using CSS Modules:
193
+ *
194
+ * ```js
195
+ * import styles from './styles.css';
196
+ * ```
197
+ *
198
+ * you might want to use camelCase in your CSS file, that way could simply
199
+ * spread them instead of listing them one by one:
200
+ *
201
+ * ```js
202
+ * classNames={{ ...styles }}
203
+ * ```
204
+ *
205
+ * @type {string | {
206
+ * appear?: string,
207
+ * appearActive?: string,
208
+ * appearDone?: string,
209
+ * enter?: string,
210
+ * enterActive?: string,
211
+ * enterDone?: string,
212
+ * exit?: string,
213
+ * exitActive?: string,
214
+ * exitDone?: string,
215
+ * }}
216
+ */
217
+ classNames: classNamesShape,
218
+ /**
219
+ * A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
220
+ * applied.
221
+ *
222
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
223
+ *
224
+ * @type Function(node: HtmlElement, isAppearing: bool)
225
+ */
226
+ onEnter: PropTypes.func,
227
+ /**
228
+ * A `<Transition>` callback fired immediately after the 'enter-active' or
229
+ * 'appear-active' class is applied.
230
+ *
231
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
232
+ *
233
+ * @type Function(node: HtmlElement, isAppearing: bool)
234
+ */
235
+ onEntering: PropTypes.func,
236
+ /**
237
+ * A `<Transition>` callback fired immediately after the 'enter' or
238
+ * 'appear' classes are **removed** and the `done` class is added to the DOM node.
239
+ *
240
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
241
+ *
242
+ * @type Function(node: HtmlElement, isAppearing: bool)
243
+ */
244
+ onEntered: PropTypes.func,
245
+ /**
246
+ * A `<Transition>` callback fired immediately after the 'exit' class is
247
+ * applied.
248
+ *
249
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed
250
+ *
251
+ * @type Function(node: HtmlElement)
252
+ */
253
+ onExit: PropTypes.func,
254
+ /**
255
+ * A `<Transition>` callback fired immediately after the 'exit-active' is applied.
256
+ *
257
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed
258
+ *
259
+ * @type Function(node: HtmlElement)
260
+ */
261
+ onExiting: PropTypes.func,
262
+ /**
263
+ * A `<Transition>` callback fired immediately after the 'exit' classes
264
+ * are **removed** and the `exit-done` class is added to the DOM node.
265
+ *
266
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed
267
+ *
268
+ * @type Function(node: HtmlElement)
269
+ */
270
+ onExited: PropTypes.func
271
+ }) : {};
272
+ export {
273
+ CSSTransition as default
274
+ };
275
+ //# sourceMappingURL=CSSTransition.js.map