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,106 +1,106 @@
1
- import React from "react";
2
- import PropTypes from "prop-types";
3
- import classnames from "../../../../_virtual/index.js";
4
- import { mapToCssModules } from "./utils.js";
5
- var _excluded = ["className", "cssModule", "variant", "innerRef"];
6
- function _extends() {
7
- _extends = Object.assign ? Object.assign.bind() : function(target) {
8
- for (var i = 1; i < arguments.length; i++) {
9
- var source = arguments[i];
10
- for (var key in source) {
11
- if (Object.prototype.hasOwnProperty.call(source, key)) {
12
- target[key] = source[key];
13
- }
14
- }
15
- }
16
- return target;
17
- };
18
- return _extends.apply(this, arguments);
19
- }
20
- function ownKeys(object, enumerableOnly) {
21
- var keys = Object.keys(object);
22
- if (Object.getOwnPropertySymbols) {
23
- var symbols = Object.getOwnPropertySymbols(object);
24
- enumerableOnly && (symbols = symbols.filter(function(sym) {
25
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
26
- })), keys.push.apply(keys, symbols);
27
- }
28
- return keys;
29
- }
30
- function _objectSpread(target) {
31
- for (var i = 1; i < arguments.length; i++) {
32
- var source = null != arguments[i] ? arguments[i] : {};
33
- i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
34
- _defineProperty(target, key, source[key]);
35
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
36
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
37
- });
38
- }
39
- return target;
40
- }
41
- function _defineProperty(obj, key, value) {
42
- if (key in obj) {
43
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
44
- } else {
45
- obj[key] = value;
46
- }
47
- return obj;
48
- }
49
- function _objectWithoutProperties(source, excluded) {
50
- if (source == null) return {};
51
- var target = _objectWithoutPropertiesLoose(source, excluded);
52
- var key, i;
53
- if (Object.getOwnPropertySymbols) {
54
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
55
- for (i = 0; i < sourceSymbolKeys.length; i++) {
56
- key = sourceSymbolKeys[i];
57
- if (excluded.indexOf(key) >= 0) continue;
58
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
59
- target[key] = source[key];
60
- }
61
- }
62
- return target;
63
- }
64
- function _objectWithoutPropertiesLoose(source, excluded) {
65
- if (source == null) return {};
66
- var target = {};
67
- var sourceKeys = Object.keys(source);
68
- var key, i;
69
- for (i = 0; i < sourceKeys.length; i++) {
70
- key = sourceKeys[i];
71
- if (excluded.indexOf(key) >= 0) continue;
72
- target[key] = source[key];
73
- }
74
- return target;
75
- }
76
- var propTypes = {
77
- /** Disable the button if needed */
78
- active: PropTypes.bool,
79
- /** Aria label */
80
- "aria-label": PropTypes.string,
81
- /** Function to be triggered on click */
82
- onClick: PropTypes.func,
83
- /** Change the variant to white */
84
- variant: PropTypes.oneOf(["white"]),
85
- className: PropTypes.string,
86
- cssModule: PropTypes.object,
87
- innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func])
88
- };
89
- function CloseButton(props) {
90
- var className = props.className;
91
- props.cssModule;
92
- var variant = props.variant, innerRef = props.innerRef, attributes = _objectWithoutProperties(props, _excluded);
93
- var classes = mapToCssModules(classnames(className, "btn-close", variant && "btn-close-".concat(variant)));
94
- return /* @__PURE__ */ React.createElement("button", _extends({
95
- ref: innerRef,
96
- type: "button",
97
- className: classes
98
- }, _objectSpread({
99
- "aria-label": "close"
100
- }, attributes)));
101
- }
102
- CloseButton.propTypes = propTypes;
103
- export {
104
- CloseButton as default
105
- };
106
- //# sourceMappingURL=CloseButton.js.map
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import classnames from "../../../../_virtual/index.js";
4
+ import { mapToCssModules } from "./utils.js";
5
+ var _excluded = ["className", "cssModule", "variant", "innerRef"];
6
+ function _extends() {
7
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
8
+ for (var i = 1; i < arguments.length; i++) {
9
+ var source = arguments[i];
10
+ for (var key in source) {
11
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
12
+ target[key] = source[key];
13
+ }
14
+ }
15
+ }
16
+ return target;
17
+ };
18
+ return _extends.apply(this, arguments);
19
+ }
20
+ function ownKeys(object, enumerableOnly) {
21
+ var keys = Object.keys(object);
22
+ if (Object.getOwnPropertySymbols) {
23
+ var symbols = Object.getOwnPropertySymbols(object);
24
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
25
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
26
+ })), keys.push.apply(keys, symbols);
27
+ }
28
+ return keys;
29
+ }
30
+ function _objectSpread(target) {
31
+ for (var i = 1; i < arguments.length; i++) {
32
+ var source = null != arguments[i] ? arguments[i] : {};
33
+ i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
34
+ _defineProperty(target, key, source[key]);
35
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
36
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
37
+ });
38
+ }
39
+ return target;
40
+ }
41
+ function _defineProperty(obj, key, value) {
42
+ if (key in obj) {
43
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
44
+ } else {
45
+ obj[key] = value;
46
+ }
47
+ return obj;
48
+ }
49
+ function _objectWithoutProperties(source, excluded) {
50
+ if (source == null) return {};
51
+ var target = _objectWithoutPropertiesLoose(source, excluded);
52
+ var key, i;
53
+ if (Object.getOwnPropertySymbols) {
54
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
55
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
56
+ key = sourceSymbolKeys[i];
57
+ if (excluded.indexOf(key) >= 0) continue;
58
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
59
+ target[key] = source[key];
60
+ }
61
+ }
62
+ return target;
63
+ }
64
+ function _objectWithoutPropertiesLoose(source, excluded) {
65
+ if (source == null) return {};
66
+ var target = {};
67
+ var sourceKeys = Object.keys(source);
68
+ var key, i;
69
+ for (i = 0; i < sourceKeys.length; i++) {
70
+ key = sourceKeys[i];
71
+ if (excluded.indexOf(key) >= 0) continue;
72
+ target[key] = source[key];
73
+ }
74
+ return target;
75
+ }
76
+ var propTypes = {
77
+ /** Disable the button if needed */
78
+ active: PropTypes.bool,
79
+ /** Aria label */
80
+ "aria-label": PropTypes.string,
81
+ /** Function to be triggered on click */
82
+ onClick: PropTypes.func,
83
+ /** Change the variant to white */
84
+ variant: PropTypes.oneOf(["white"]),
85
+ className: PropTypes.string,
86
+ cssModule: PropTypes.object,
87
+ innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func])
88
+ };
89
+ function CloseButton(props) {
90
+ var className = props.className;
91
+ props.cssModule;
92
+ var variant = props.variant, innerRef = props.innerRef, attributes = _objectWithoutProperties(props, _excluded);
93
+ var classes = mapToCssModules(classnames(className, "btn-close", variant && "btn-close-".concat(variant)));
94
+ return /* @__PURE__ */ React.createElement("button", _extends({
95
+ ref: innerRef,
96
+ type: "button",
97
+ className: classes
98
+ }, _objectSpread({
99
+ "aria-label": "close"
100
+ }, attributes)));
101
+ }
102
+ CloseButton.propTypes = propTypes;
103
+ export {
104
+ CloseButton as default
105
+ };
106
+ //# sourceMappingURL=CloseButton.js.map
@@ -1,125 +1,125 @@
1
- import React from "react";
2
- import PropTypes from "prop-types";
3
- import classnames from "../../../../_virtual/index.js";
4
- import { mapToCssModules, isObject, tagPropType } from "./utils.js";
5
- var _excluded = ["className", "cssModule", "widths", "tag"];
6
- function _extends() {
7
- _extends = Object.assign ? Object.assign.bind() : function(target) {
8
- for (var i = 1; i < arguments.length; i++) {
9
- var source = arguments[i];
10
- for (var key in source) {
11
- if (Object.prototype.hasOwnProperty.call(source, key)) {
12
- target[key] = source[key];
13
- }
14
- }
15
- }
16
- return target;
17
- };
18
- return _extends.apply(this, arguments);
19
- }
20
- function _objectWithoutProperties(source, excluded) {
21
- if (source == null) return {};
22
- var target = _objectWithoutPropertiesLoose(source, excluded);
23
- var key, i;
24
- if (Object.getOwnPropertySymbols) {
25
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
26
- for (i = 0; i < sourceSymbolKeys.length; i++) {
27
- key = sourceSymbolKeys[i];
28
- if (excluded.indexOf(key) >= 0) continue;
29
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
30
- target[key] = source[key];
31
- }
32
- }
33
- return target;
34
- }
35
- function _objectWithoutPropertiesLoose(source, excluded) {
36
- if (source == null) return {};
37
- var target = {};
38
- var sourceKeys = Object.keys(source);
39
- var key, i;
40
- for (i = 0; i < sourceKeys.length; i++) {
41
- key = sourceKeys[i];
42
- if (excluded.indexOf(key) >= 0) continue;
43
- target[key] = source[key];
44
- }
45
- return target;
46
- }
47
- function _defineProperty(obj, key, value) {
48
- if (key in obj) {
49
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
50
- } else {
51
- obj[key] = value;
52
- }
53
- return obj;
54
- }
55
- var colWidths = ["xs", "sm", "md", "lg", "xl", "xxl"];
56
- var stringOrNumberProp = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);
57
- var columnProps = PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string, PropTypes.shape({
58
- size: PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string]),
59
- order: stringOrNumberProp,
60
- offset: stringOrNumberProp
61
- })]);
62
- var propTypes = {
63
- tag: tagPropType,
64
- xs: columnProps,
65
- sm: columnProps,
66
- md: columnProps,
67
- lg: columnProps,
68
- xl: columnProps,
69
- xxl: columnProps,
70
- className: PropTypes.string,
71
- cssModule: PropTypes.object,
72
- widths: PropTypes.array
73
- };
74
- var getColumnSizeClass = function getColumnSizeClass2(isXs, colWidth, colSize) {
75
- if (colSize === true || colSize === "") {
76
- return isXs ? "col" : "col-".concat(colWidth);
77
- }
78
- if (colSize === "auto") {
79
- return isXs ? "col-auto" : "col-".concat(colWidth, "-auto");
80
- }
81
- return isXs ? "col-".concat(colSize) : "col-".concat(colWidth, "-").concat(colSize);
82
- };
83
- var getColumnClasses = function getColumnClasses2(attributes, cssModule) {
84
- var widths = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : colWidths;
85
- var modifiedAttributes = attributes;
86
- var colClasses = [];
87
- widths.forEach(function(colWidth, i) {
88
- var columnProp = modifiedAttributes[colWidth];
89
- delete modifiedAttributes[colWidth];
90
- if (!columnProp && columnProp !== "") {
91
- return;
92
- }
93
- var isXs = !i;
94
- if (isObject(columnProp)) {
95
- var _classNames;
96
- var colSizeInterfix = isXs ? "-" : "-".concat(colWidth, "-");
97
- var colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);
98
- colClasses.push(mapToCssModules(classnames((_classNames = {}, _defineProperty(_classNames, colClass, columnProp.size || columnProp.size === ""), _defineProperty(_classNames, "order".concat(colSizeInterfix).concat(columnProp.order), columnProp.order || columnProp.order === 0), _defineProperty(_classNames, "offset".concat(colSizeInterfix).concat(columnProp.offset), columnProp.offset || columnProp.offset === 0), _classNames)), cssModule));
99
- } else {
100
- var _colClass = getColumnSizeClass(isXs, colWidth, columnProp);
101
- colClasses.push(_colClass);
102
- }
103
- });
104
- return {
105
- colClasses,
106
- modifiedAttributes
107
- };
108
- };
109
- function Col(props) {
110
- var className = props.className, cssModule = props.cssModule, _props$widths = props.widths, widths = _props$widths === void 0 ? colWidths : _props$widths, _props$tag = props.tag, Tag = _props$tag === void 0 ? "div" : _props$tag, attributes = _objectWithoutProperties(props, _excluded);
111
- var _getColumnClasses = getColumnClasses(attributes, cssModule, widths), modifiedAttributes = _getColumnClasses.modifiedAttributes, colClasses = _getColumnClasses.colClasses;
112
- if (!colClasses.length) {
113
- colClasses.push("col");
114
- }
115
- var classes = mapToCssModules(classnames(className, colClasses), cssModule);
116
- return /* @__PURE__ */ React.createElement(Tag, _extends({}, modifiedAttributes, {
117
- className: classes
118
- }));
119
- }
120
- Col.propTypes = propTypes;
121
- export {
122
- Col as default,
123
- getColumnClasses
124
- };
125
- //# sourceMappingURL=Col.js.map
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import classnames from "../../../../_virtual/index.js";
4
+ import { mapToCssModules, isObject, tagPropType } from "./utils.js";
5
+ var _excluded = ["className", "cssModule", "widths", "tag"];
6
+ function _extends() {
7
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
8
+ for (var i = 1; i < arguments.length; i++) {
9
+ var source = arguments[i];
10
+ for (var key in source) {
11
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
12
+ target[key] = source[key];
13
+ }
14
+ }
15
+ }
16
+ return target;
17
+ };
18
+ return _extends.apply(this, arguments);
19
+ }
20
+ function _objectWithoutProperties(source, excluded) {
21
+ if (source == null) return {};
22
+ var target = _objectWithoutPropertiesLoose(source, excluded);
23
+ var key, i;
24
+ if (Object.getOwnPropertySymbols) {
25
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
26
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
27
+ key = sourceSymbolKeys[i];
28
+ if (excluded.indexOf(key) >= 0) continue;
29
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
30
+ target[key] = source[key];
31
+ }
32
+ }
33
+ return target;
34
+ }
35
+ function _objectWithoutPropertiesLoose(source, excluded) {
36
+ if (source == null) return {};
37
+ var target = {};
38
+ var sourceKeys = Object.keys(source);
39
+ var key, i;
40
+ for (i = 0; i < sourceKeys.length; i++) {
41
+ key = sourceKeys[i];
42
+ if (excluded.indexOf(key) >= 0) continue;
43
+ target[key] = source[key];
44
+ }
45
+ return target;
46
+ }
47
+ function _defineProperty(obj, key, value) {
48
+ if (key in obj) {
49
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
50
+ } else {
51
+ obj[key] = value;
52
+ }
53
+ return obj;
54
+ }
55
+ var colWidths = ["xs", "sm", "md", "lg", "xl", "xxl"];
56
+ var stringOrNumberProp = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);
57
+ var columnProps = PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string, PropTypes.shape({
58
+ size: PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string]),
59
+ order: stringOrNumberProp,
60
+ offset: stringOrNumberProp
61
+ })]);
62
+ var propTypes = {
63
+ tag: tagPropType,
64
+ xs: columnProps,
65
+ sm: columnProps,
66
+ md: columnProps,
67
+ lg: columnProps,
68
+ xl: columnProps,
69
+ xxl: columnProps,
70
+ className: PropTypes.string,
71
+ cssModule: PropTypes.object,
72
+ widths: PropTypes.array
73
+ };
74
+ var getColumnSizeClass = function getColumnSizeClass2(isXs, colWidth, colSize) {
75
+ if (colSize === true || colSize === "") {
76
+ return isXs ? "col" : "col-".concat(colWidth);
77
+ }
78
+ if (colSize === "auto") {
79
+ return isXs ? "col-auto" : "col-".concat(colWidth, "-auto");
80
+ }
81
+ return isXs ? "col-".concat(colSize) : "col-".concat(colWidth, "-").concat(colSize);
82
+ };
83
+ var getColumnClasses = function getColumnClasses2(attributes, cssModule) {
84
+ var widths = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : colWidths;
85
+ var modifiedAttributes = attributes;
86
+ var colClasses = [];
87
+ widths.forEach(function(colWidth, i) {
88
+ var columnProp = modifiedAttributes[colWidth];
89
+ delete modifiedAttributes[colWidth];
90
+ if (!columnProp && columnProp !== "") {
91
+ return;
92
+ }
93
+ var isXs = !i;
94
+ if (isObject(columnProp)) {
95
+ var _classNames;
96
+ var colSizeInterfix = isXs ? "-" : "-".concat(colWidth, "-");
97
+ var colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);
98
+ colClasses.push(mapToCssModules(classnames((_classNames = {}, _defineProperty(_classNames, colClass, columnProp.size || columnProp.size === ""), _defineProperty(_classNames, "order".concat(colSizeInterfix).concat(columnProp.order), columnProp.order || columnProp.order === 0), _defineProperty(_classNames, "offset".concat(colSizeInterfix).concat(columnProp.offset), columnProp.offset || columnProp.offset === 0), _classNames)), cssModule));
99
+ } else {
100
+ var _colClass = getColumnSizeClass(isXs, colWidth, columnProp);
101
+ colClasses.push(_colClass);
102
+ }
103
+ });
104
+ return {
105
+ colClasses,
106
+ modifiedAttributes
107
+ };
108
+ };
109
+ function Col(props) {
110
+ var className = props.className, cssModule = props.cssModule, _props$widths = props.widths, widths = _props$widths === void 0 ? colWidths : _props$widths, _props$tag = props.tag, Tag = _props$tag === void 0 ? "div" : _props$tag, attributes = _objectWithoutProperties(props, _excluded);
111
+ var _getColumnClasses = getColumnClasses(attributes, cssModule, widths), modifiedAttributes = _getColumnClasses.modifiedAttributes, colClasses = _getColumnClasses.colClasses;
112
+ if (!colClasses.length) {
113
+ colClasses.push("col");
114
+ }
115
+ var classes = mapToCssModules(classnames(className, colClasses), cssModule);
116
+ return /* @__PURE__ */ React.createElement(Tag, _extends({}, modifiedAttributes, {
117
+ className: classes
118
+ }));
119
+ }
120
+ Col.propTypes = propTypes;
121
+ export {
122
+ Col as default,
123
+ getColumnClasses
124
+ };
125
+ //# sourceMappingURL=Col.js.map
@@ -1,75 +1,75 @@
1
- import React from "react";
2
- import PropTypes from "prop-types";
3
- import classnames from "../../../../_virtual/index.js";
4
- import { mapToCssModules, tagPropType } from "./utils.js";
5
- var _excluded = ["className", "cssModule", "row", "disabled", "check", "inline", "floating", "noMargin", "tag", "switch"];
6
- function _extends() {
7
- _extends = Object.assign ? Object.assign.bind() : function(target) {
8
- for (var i = 1; i < arguments.length; i++) {
9
- var source = arguments[i];
10
- for (var key in source) {
11
- if (Object.prototype.hasOwnProperty.call(source, key)) {
12
- target[key] = source[key];
13
- }
14
- }
15
- }
16
- return target;
17
- };
18
- return _extends.apply(this, arguments);
19
- }
20
- function _objectWithoutProperties(source, excluded) {
21
- if (source == null) return {};
22
- var target = _objectWithoutPropertiesLoose(source, excluded);
23
- var key, i;
24
- if (Object.getOwnPropertySymbols) {
25
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
26
- for (i = 0; i < sourceSymbolKeys.length; i++) {
27
- key = sourceSymbolKeys[i];
28
- if (excluded.indexOf(key) >= 0) continue;
29
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
30
- target[key] = source[key];
31
- }
32
- }
33
- return target;
34
- }
35
- function _objectWithoutPropertiesLoose(source, excluded) {
36
- if (source == null) return {};
37
- var target = {};
38
- var sourceKeys = Object.keys(source);
39
- var key, i;
40
- for (i = 0; i < sourceKeys.length; i++) {
41
- key = sourceKeys[i];
42
- if (excluded.indexOf(key) >= 0) continue;
43
- target[key] = source[key];
44
- }
45
- return target;
46
- }
47
- var propTypes = {
48
- children: PropTypes.node,
49
- row: PropTypes.bool,
50
- check: PropTypes.bool,
51
- "switch": PropTypes.bool,
52
- inline: PropTypes.bool,
53
- floating: PropTypes.bool,
54
- noMargin: PropTypes.bool,
55
- disabled: PropTypes.bool,
56
- tag: tagPropType,
57
- className: PropTypes.string,
58
- cssModule: PropTypes.object
59
- };
60
- function FormGroup(props) {
61
- var className = props.className, cssModule = props.cssModule, row = props.row, disabled = props.disabled, check = props.check, inline = props.inline, floating = props.floating, noMargin = props.noMargin, _props$tag = props.tag, Tag = _props$tag === void 0 ? "div" : _props$tag, switchProp = props["switch"], attributes = _objectWithoutProperties(props, _excluded);
62
- var formCheck = check || switchProp;
63
- var classes = mapToCssModules(classnames(className, row ? "row" : false, formCheck ? "form-check" : false, switchProp ? "form-switch" : false, formCheck || noMargin ? false : "mb-3", formCheck && inline ? "form-check-inline" : false, formCheck && disabled ? "disabled" : false, floating && "form-floating"), cssModule);
64
- if (Tag === "fieldset") {
65
- attributes.disabled = disabled;
66
- }
67
- return /* @__PURE__ */ React.createElement(Tag, _extends({}, attributes, {
68
- className: classes
69
- }));
70
- }
71
- FormGroup.propTypes = propTypes;
72
- export {
73
- FormGroup as default
74
- };
75
- //# sourceMappingURL=FormGroup.js.map
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import classnames from "../../../../_virtual/index.js";
4
+ import { mapToCssModules, tagPropType } from "./utils.js";
5
+ var _excluded = ["className", "cssModule", "row", "disabled", "check", "inline", "floating", "noMargin", "tag", "switch"];
6
+ function _extends() {
7
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
8
+ for (var i = 1; i < arguments.length; i++) {
9
+ var source = arguments[i];
10
+ for (var key in source) {
11
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
12
+ target[key] = source[key];
13
+ }
14
+ }
15
+ }
16
+ return target;
17
+ };
18
+ return _extends.apply(this, arguments);
19
+ }
20
+ function _objectWithoutProperties(source, excluded) {
21
+ if (source == null) return {};
22
+ var target = _objectWithoutPropertiesLoose(source, excluded);
23
+ var key, i;
24
+ if (Object.getOwnPropertySymbols) {
25
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
26
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
27
+ key = sourceSymbolKeys[i];
28
+ if (excluded.indexOf(key) >= 0) continue;
29
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
30
+ target[key] = source[key];
31
+ }
32
+ }
33
+ return target;
34
+ }
35
+ function _objectWithoutPropertiesLoose(source, excluded) {
36
+ if (source == null) return {};
37
+ var target = {};
38
+ var sourceKeys = Object.keys(source);
39
+ var key, i;
40
+ for (i = 0; i < sourceKeys.length; i++) {
41
+ key = sourceKeys[i];
42
+ if (excluded.indexOf(key) >= 0) continue;
43
+ target[key] = source[key];
44
+ }
45
+ return target;
46
+ }
47
+ var propTypes = {
48
+ children: PropTypes.node,
49
+ row: PropTypes.bool,
50
+ check: PropTypes.bool,
51
+ "switch": PropTypes.bool,
52
+ inline: PropTypes.bool,
53
+ floating: PropTypes.bool,
54
+ noMargin: PropTypes.bool,
55
+ disabled: PropTypes.bool,
56
+ tag: tagPropType,
57
+ className: PropTypes.string,
58
+ cssModule: PropTypes.object
59
+ };
60
+ function FormGroup(props) {
61
+ var className = props.className, cssModule = props.cssModule, row = props.row, disabled = props.disabled, check = props.check, inline = props.inline, floating = props.floating, noMargin = props.noMargin, _props$tag = props.tag, Tag = _props$tag === void 0 ? "div" : _props$tag, switchProp = props["switch"], attributes = _objectWithoutProperties(props, _excluded);
62
+ var formCheck = check || switchProp;
63
+ var classes = mapToCssModules(classnames(className, row ? "row" : false, formCheck ? "form-check" : false, switchProp ? "form-switch" : false, formCheck || noMargin ? false : "mb-3", formCheck && inline ? "form-check-inline" : false, formCheck && disabled ? "disabled" : false, floating && "form-floating"), cssModule);
64
+ if (Tag === "fieldset") {
65
+ attributes.disabled = disabled;
66
+ }
67
+ return /* @__PURE__ */ React.createElement(Tag, _extends({}, attributes, {
68
+ className: classes
69
+ }));
70
+ }
71
+ FormGroup.propTypes = propTypes;
72
+ export {
73
+ FormGroup as default
74
+ };
75
+ //# sourceMappingURL=FormGroup.js.map