siam-ui-utils 3.1.0 → 3.1.1

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 (93) 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/Button.js +111 -111
  45. package/dist/node_modules/@neolution-ch/reactstrap/esm/CloseButton.js +106 -106
  46. package/dist/node_modules/@neolution-ch/reactstrap/esm/Col.js +125 -125
  47. package/dist/node_modules/@neolution-ch/reactstrap/esm/FormGroup.js +75 -75
  48. package/dist/node_modules/@neolution-ch/reactstrap/esm/Input.js +225 -225
  49. package/dist/node_modules/@neolution-ch/reactstrap/esm/Label.js +122 -122
  50. package/dist/node_modules/@neolution-ch/reactstrap/esm/Row.js +83 -83
  51. package/dist/node_modules/@neolution-ch/reactstrap/esm/utils.js +68 -68
  52. package/dist/node_modules/classnames/index.js +62 -62
  53. package/dist/node_modules/dom-helpers/esm/addClass.js +10 -10
  54. package/dist/node_modules/dom-helpers/esm/hasClass.js +8 -8
  55. package/dist/node_modules/dom-helpers/esm/removeClass.js +16 -16
  56. package/dist/node_modules/dropzone/dist/dropzone.js +1968 -1968
  57. package/dist/node_modules/events/events.js +372 -372
  58. package/dist/node_modules/just-extend/index.esm.js +43 -43
  59. package/dist/node_modules/react-transition-group/esm/CSSTransition.js +275 -275
  60. package/dist/node_modules/react-transition-group/esm/Transition.js +441 -441
  61. package/dist/node_modules/react-transition-group/esm/TransitionGroup.js +146 -146
  62. package/dist/node_modules/react-transition-group/esm/TransitionGroupContext.js +6 -6
  63. package/dist/node_modules/react-transition-group/esm/config.js +7 -7
  64. package/dist/node_modules/react-transition-group/esm/utils/ChildMapping.js +100 -100
  65. package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +24 -24
  66. package/dist/node_modules/react-transition-group/esm/utils/reflow.js +7 -7
  67. package/dist/react-notifications/Notification.js +73 -73
  68. package/dist/react-notifications/NotificationContainer.js +59 -59
  69. package/dist/react-notifications/NotificationManager.js +174 -174
  70. package/dist/react-notifications/Notifications.js +72 -72
  71. package/dist/react-notifications/constants.js +26 -26
  72. package/dist/react-notifications/index.js +11 -11
  73. package/dist/select/custom-select/constants.js +8 -8
  74. package/dist/select/custom-select/index.js +89 -89
  75. package/dist/select/custom-select-input/index.js +12 -12
  76. package/dist/select/index.js +9 -9
  77. package/dist/select/multi-select/badge-label-multi-select.js +29 -29
  78. package/dist/select/multi-select/index.css +36 -36
  79. package/dist/select/multi-select/index.js +170 -171
  80. package/dist/select/multi-select/index.js.map +1 -1
  81. package/dist/select/multi-select/styled-component.js +23 -23
  82. package/dist/timer/index.js +60 -60
  83. package/dist/timer/styles.css +58 -58
  84. package/dist/tomar-foto/index.js +62 -62
  85. package/dist/view-layout/button-editor.js +14 -14
  86. package/dist/view-layout/constants.js +11 -11
  87. package/dist/view-layout/editor-layer.js +28 -28
  88. package/dist/view-layout/index.js +53 -53
  89. package/dist/view-layout/slot-wrapper.js +39 -39
  90. package/dist/view-layout/styles.css +126 -126
  91. package/dist/where-by-room/index.js +20 -20
  92. package/dist/where-by-room/room.js +78 -78
  93. package/package.json +1 -4
@@ -1,225 +1,225 @@
1
- import React from "react";
2
- import PropTypes from "prop-types";
3
- import classnames from "../../../../_virtual/index.js";
4
- import { warnOnce, mapToCssModules, tagPropType } from "./utils.js";
5
- function _typeof(obj) {
6
- "@babel/helpers - typeof";
7
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
8
- return typeof obj2;
9
- } : function(obj2) {
10
- return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
11
- }, _typeof(obj);
12
- }
13
- var _excluded = ["className", "cssModule", "type", "bsSize", "valid", "invalid", "tag", "addon", "plaintext", "innerRef"];
14
- function _extends() {
15
- _extends = Object.assign ? Object.assign.bind() : function(target) {
16
- for (var i = 1; i < arguments.length; i++) {
17
- var source = arguments[i];
18
- for (var key in source) {
19
- if (Object.prototype.hasOwnProperty.call(source, key)) {
20
- target[key] = source[key];
21
- }
22
- }
23
- }
24
- return target;
25
- };
26
- return _extends.apply(this, arguments);
27
- }
28
- function _objectWithoutProperties(source, excluded) {
29
- if (source == null) return {};
30
- var target = _objectWithoutPropertiesLoose(source, excluded);
31
- var key, i;
32
- if (Object.getOwnPropertySymbols) {
33
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
34
- for (i = 0; i < sourceSymbolKeys.length; i++) {
35
- key = sourceSymbolKeys[i];
36
- if (excluded.indexOf(key) >= 0) continue;
37
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
38
- target[key] = source[key];
39
- }
40
- }
41
- return target;
42
- }
43
- function _objectWithoutPropertiesLoose(source, excluded) {
44
- if (source == null) return {};
45
- var target = {};
46
- var sourceKeys = Object.keys(source);
47
- var key, i;
48
- for (i = 0; i < sourceKeys.length; i++) {
49
- key = sourceKeys[i];
50
- if (excluded.indexOf(key) >= 0) continue;
51
- target[key] = source[key];
52
- }
53
- return target;
54
- }
55
- function _classCallCheck(instance, Constructor) {
56
- if (!(instance instanceof Constructor)) {
57
- throw new TypeError("Cannot call a class as a function");
58
- }
59
- }
60
- function _defineProperties(target, props) {
61
- for (var i = 0; i < props.length; i++) {
62
- var descriptor = props[i];
63
- descriptor.enumerable = descriptor.enumerable || false;
64
- descriptor.configurable = true;
65
- if ("value" in descriptor) descriptor.writable = true;
66
- Object.defineProperty(target, descriptor.key, descriptor);
67
- }
68
- }
69
- function _createClass(Constructor, protoProps, staticProps) {
70
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
71
- Object.defineProperty(Constructor, "prototype", { writable: false });
72
- return Constructor;
73
- }
74
- function _inherits(subClass, superClass) {
75
- if (typeof superClass !== "function" && superClass !== null) {
76
- throw new TypeError("Super expression must either be null or a function");
77
- }
78
- subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
79
- Object.defineProperty(subClass, "prototype", { writable: false });
80
- if (superClass) _setPrototypeOf(subClass, superClass);
81
- }
82
- function _setPrototypeOf(o, p) {
83
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
84
- o2.__proto__ = p2;
85
- return o2;
86
- };
87
- return _setPrototypeOf(o, p);
88
- }
89
- function _createSuper(Derived) {
90
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
91
- return function _createSuperInternal() {
92
- var Super = _getPrototypeOf(Derived), result;
93
- if (hasNativeReflectConstruct) {
94
- var NewTarget = _getPrototypeOf(this).constructor;
95
- result = Reflect.construct(Super, arguments, NewTarget);
96
- } else {
97
- result = Super.apply(this, arguments);
98
- }
99
- return _possibleConstructorReturn(this, result);
100
- };
101
- }
102
- function _possibleConstructorReturn(self, call) {
103
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
104
- return call;
105
- } else if (call !== void 0) {
106
- throw new TypeError("Derived constructors may only return object or undefined");
107
- }
108
- return _assertThisInitialized(self);
109
- }
110
- function _assertThisInitialized(self) {
111
- if (self === void 0) {
112
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
113
- }
114
- return self;
115
- }
116
- function _isNativeReflectConstruct() {
117
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
118
- if (Reflect.construct.sham) return false;
119
- if (typeof Proxy === "function") return true;
120
- try {
121
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
122
- }));
123
- return true;
124
- } catch (e) {
125
- return false;
126
- }
127
- }
128
- function _getPrototypeOf(o) {
129
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
130
- return o2.__proto__ || Object.getPrototypeOf(o2);
131
- };
132
- return _getPrototypeOf(o);
133
- }
134
- var propTypes = {
135
- children: PropTypes.node,
136
- type: PropTypes.string,
137
- size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
138
- bsSize: PropTypes.string,
139
- valid: PropTypes.bool,
140
- invalid: PropTypes.bool,
141
- tag: tagPropType,
142
- innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),
143
- plaintext: PropTypes.bool,
144
- addon: PropTypes.bool,
145
- className: PropTypes.string,
146
- cssModule: PropTypes.object
147
- };
148
- var Input = /* @__PURE__ */ (function(_React$Component) {
149
- _inherits(Input2, _React$Component);
150
- var _super = _createSuper(Input2);
151
- function Input2(props) {
152
- var _this;
153
- _classCallCheck(this, Input2);
154
- _this = _super.call(this, props);
155
- _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));
156
- _this.focus = _this.focus.bind(_assertThisInitialized(_this));
157
- return _this;
158
- }
159
- _createClass(Input2, [{
160
- key: "getRef",
161
- value: function getRef(ref) {
162
- if (this.props.innerRef) {
163
- this.props.innerRef(ref);
164
- }
165
- this.ref = ref;
166
- }
167
- }, {
168
- key: "focus",
169
- value: function focus() {
170
- if (this.ref) {
171
- this.ref.focus();
172
- }
173
- }
174
- }, {
175
- key: "render",
176
- value: function render() {
177
- var _this$props = this.props, className = _this$props.className, cssModule = _this$props.cssModule, _this$props$type = _this$props.type, type = _this$props$type === void 0 ? "text" : _this$props$type, bsSize = _this$props.bsSize, valid = _this$props.valid, invalid = _this$props.invalid, tag = _this$props.tag, addon = _this$props.addon, plaintext = _this$props.plaintext, innerRef = _this$props.innerRef, attributes = _objectWithoutProperties(_this$props, _excluded);
178
- var checkInput = ["switch", "radio", "checkbox"].indexOf(type) > -1;
179
- var isNotaNumber = /\D/g;
180
- var textareaInput = type === "textarea";
181
- var selectInput = type === "select";
182
- var rangeInput = type === "range";
183
- var Tag = tag || (selectInput || textareaInput ? type : "input");
184
- var formControlClass = "form-control";
185
- if (plaintext) {
186
- formControlClass = "".concat(formControlClass, "-plaintext");
187
- Tag = tag || "input";
188
- } else if (rangeInput) {
189
- formControlClass = "form-range";
190
- } else if (selectInput) {
191
- formControlClass = "form-select";
192
- } else if (checkInput) {
193
- if (addon) {
194
- formControlClass = null;
195
- } else {
196
- formControlClass = "form-check-input";
197
- }
198
- }
199
- if (attributes.size && isNotaNumber.test(attributes.size)) {
200
- warnOnce(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`);
201
- bsSize = attributes.size;
202
- delete attributes.size;
203
- }
204
- var classes = mapToCssModules(classnames(className, invalid && "is-invalid", valid && "is-valid", bsSize ? selectInput ? "form-select-".concat(bsSize) : "form-control-".concat(bsSize) : false, formControlClass), cssModule);
205
- if (Tag === "input" || tag && typeof tag === "function") {
206
- attributes.type = type === "switch" ? "checkbox" : type;
207
- }
208
- if (attributes.children && !(plaintext || type === "select" || typeof Tag !== "string" || Tag === "select")) {
209
- warnOnce('Input with a type of "'.concat(type, '" cannot have children. Please use "value"/"defaultValue" instead.'));
210
- delete attributes.children;
211
- }
212
- return /* @__PURE__ */ React.createElement(Tag, _extends({}, attributes, {
213
- ref: innerRef,
214
- className: classes,
215
- "aria-invalid": invalid
216
- }));
217
- }
218
- }]);
219
- return Input2;
220
- })(React.Component);
221
- Input.propTypes = propTypes;
222
- export {
223
- Input as default
224
- };
225
- //# sourceMappingURL=Input.js.map
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import classnames from "../../../../_virtual/index.js";
4
+ import { warnOnce, mapToCssModules, tagPropType } from "./utils.js";
5
+ function _typeof(obj) {
6
+ "@babel/helpers - typeof";
7
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
8
+ return typeof obj2;
9
+ } : function(obj2) {
10
+ return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
11
+ }, _typeof(obj);
12
+ }
13
+ var _excluded = ["className", "cssModule", "type", "bsSize", "valid", "invalid", "tag", "addon", "plaintext", "innerRef"];
14
+ function _extends() {
15
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
16
+ for (var i = 1; i < arguments.length; i++) {
17
+ var source = arguments[i];
18
+ for (var key in source) {
19
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
20
+ target[key] = source[key];
21
+ }
22
+ }
23
+ }
24
+ return target;
25
+ };
26
+ return _extends.apply(this, arguments);
27
+ }
28
+ function _objectWithoutProperties(source, excluded) {
29
+ if (source == null) return {};
30
+ var target = _objectWithoutPropertiesLoose(source, excluded);
31
+ var key, i;
32
+ if (Object.getOwnPropertySymbols) {
33
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
34
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
35
+ key = sourceSymbolKeys[i];
36
+ if (excluded.indexOf(key) >= 0) continue;
37
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
38
+ target[key] = source[key];
39
+ }
40
+ }
41
+ return target;
42
+ }
43
+ function _objectWithoutPropertiesLoose(source, excluded) {
44
+ if (source == null) return {};
45
+ var target = {};
46
+ var sourceKeys = Object.keys(source);
47
+ var key, i;
48
+ for (i = 0; i < sourceKeys.length; i++) {
49
+ key = sourceKeys[i];
50
+ if (excluded.indexOf(key) >= 0) continue;
51
+ target[key] = source[key];
52
+ }
53
+ return target;
54
+ }
55
+ function _classCallCheck(instance, Constructor) {
56
+ if (!(instance instanceof Constructor)) {
57
+ throw new TypeError("Cannot call a class as a function");
58
+ }
59
+ }
60
+ function _defineProperties(target, props) {
61
+ for (var i = 0; i < props.length; i++) {
62
+ var descriptor = props[i];
63
+ descriptor.enumerable = descriptor.enumerable || false;
64
+ descriptor.configurable = true;
65
+ if ("value" in descriptor) descriptor.writable = true;
66
+ Object.defineProperty(target, descriptor.key, descriptor);
67
+ }
68
+ }
69
+ function _createClass(Constructor, protoProps, staticProps) {
70
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
71
+ Object.defineProperty(Constructor, "prototype", { writable: false });
72
+ return Constructor;
73
+ }
74
+ function _inherits(subClass, superClass) {
75
+ if (typeof superClass !== "function" && superClass !== null) {
76
+ throw new TypeError("Super expression must either be null or a function");
77
+ }
78
+ subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
79
+ Object.defineProperty(subClass, "prototype", { writable: false });
80
+ if (superClass) _setPrototypeOf(subClass, superClass);
81
+ }
82
+ function _setPrototypeOf(o, p) {
83
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
84
+ o2.__proto__ = p2;
85
+ return o2;
86
+ };
87
+ return _setPrototypeOf(o, p);
88
+ }
89
+ function _createSuper(Derived) {
90
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
91
+ return function _createSuperInternal() {
92
+ var Super = _getPrototypeOf(Derived), result;
93
+ if (hasNativeReflectConstruct) {
94
+ var NewTarget = _getPrototypeOf(this).constructor;
95
+ result = Reflect.construct(Super, arguments, NewTarget);
96
+ } else {
97
+ result = Super.apply(this, arguments);
98
+ }
99
+ return _possibleConstructorReturn(this, result);
100
+ };
101
+ }
102
+ function _possibleConstructorReturn(self, call) {
103
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
104
+ return call;
105
+ } else if (call !== void 0) {
106
+ throw new TypeError("Derived constructors may only return object or undefined");
107
+ }
108
+ return _assertThisInitialized(self);
109
+ }
110
+ function _assertThisInitialized(self) {
111
+ if (self === void 0) {
112
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
113
+ }
114
+ return self;
115
+ }
116
+ function _isNativeReflectConstruct() {
117
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
118
+ if (Reflect.construct.sham) return false;
119
+ if (typeof Proxy === "function") return true;
120
+ try {
121
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
122
+ }));
123
+ return true;
124
+ } catch (e) {
125
+ return false;
126
+ }
127
+ }
128
+ function _getPrototypeOf(o) {
129
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
130
+ return o2.__proto__ || Object.getPrototypeOf(o2);
131
+ };
132
+ return _getPrototypeOf(o);
133
+ }
134
+ var propTypes = {
135
+ children: PropTypes.node,
136
+ type: PropTypes.string,
137
+ size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
138
+ bsSize: PropTypes.string,
139
+ valid: PropTypes.bool,
140
+ invalid: PropTypes.bool,
141
+ tag: tagPropType,
142
+ innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),
143
+ plaintext: PropTypes.bool,
144
+ addon: PropTypes.bool,
145
+ className: PropTypes.string,
146
+ cssModule: PropTypes.object
147
+ };
148
+ var Input = /* @__PURE__ */ (function(_React$Component) {
149
+ _inherits(Input2, _React$Component);
150
+ var _super = _createSuper(Input2);
151
+ function Input2(props) {
152
+ var _this;
153
+ _classCallCheck(this, Input2);
154
+ _this = _super.call(this, props);
155
+ _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));
156
+ _this.focus = _this.focus.bind(_assertThisInitialized(_this));
157
+ return _this;
158
+ }
159
+ _createClass(Input2, [{
160
+ key: "getRef",
161
+ value: function getRef(ref) {
162
+ if (this.props.innerRef) {
163
+ this.props.innerRef(ref);
164
+ }
165
+ this.ref = ref;
166
+ }
167
+ }, {
168
+ key: "focus",
169
+ value: function focus() {
170
+ if (this.ref) {
171
+ this.ref.focus();
172
+ }
173
+ }
174
+ }, {
175
+ key: "render",
176
+ value: function render() {
177
+ var _this$props = this.props, className = _this$props.className, cssModule = _this$props.cssModule, _this$props$type = _this$props.type, type = _this$props$type === void 0 ? "text" : _this$props$type, bsSize = _this$props.bsSize, valid = _this$props.valid, invalid = _this$props.invalid, tag = _this$props.tag, addon = _this$props.addon, plaintext = _this$props.plaintext, innerRef = _this$props.innerRef, attributes = _objectWithoutProperties(_this$props, _excluded);
178
+ var checkInput = ["switch", "radio", "checkbox"].indexOf(type) > -1;
179
+ var isNotaNumber = /\D/g;
180
+ var textareaInput = type === "textarea";
181
+ var selectInput = type === "select";
182
+ var rangeInput = type === "range";
183
+ var Tag = tag || (selectInput || textareaInput ? type : "input");
184
+ var formControlClass = "form-control";
185
+ if (plaintext) {
186
+ formControlClass = "".concat(formControlClass, "-plaintext");
187
+ Tag = tag || "input";
188
+ } else if (rangeInput) {
189
+ formControlClass = "form-range";
190
+ } else if (selectInput) {
191
+ formControlClass = "form-select";
192
+ } else if (checkInput) {
193
+ if (addon) {
194
+ formControlClass = null;
195
+ } else {
196
+ formControlClass = "form-check-input";
197
+ }
198
+ }
199
+ if (attributes.size && isNotaNumber.test(attributes.size)) {
200
+ warnOnce(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`);
201
+ bsSize = attributes.size;
202
+ delete attributes.size;
203
+ }
204
+ var classes = mapToCssModules(classnames(className, invalid && "is-invalid", valid && "is-valid", bsSize ? selectInput ? "form-select-".concat(bsSize) : "form-control-".concat(bsSize) : false, formControlClass), cssModule);
205
+ if (Tag === "input" || tag && typeof tag === "function") {
206
+ attributes.type = type === "switch" ? "checkbox" : type;
207
+ }
208
+ if (attributes.children && !(plaintext || type === "select" || typeof Tag !== "string" || Tag === "select")) {
209
+ warnOnce('Input with a type of "'.concat(type, '" cannot have children. Please use "value"/"defaultValue" instead.'));
210
+ delete attributes.children;
211
+ }
212
+ return /* @__PURE__ */ React.createElement(Tag, _extends({}, attributes, {
213
+ ref: innerRef,
214
+ className: classes,
215
+ "aria-invalid": invalid
216
+ }));
217
+ }
218
+ }]);
219
+ return Input2;
220
+ })(React.Component);
221
+ Input.propTypes = propTypes;
222
+ export {
223
+ Input as default
224
+ };
225
+ //# sourceMappingURL=Input.js.map