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,50 +1,50 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useState, useRef, useEffect } from "react";
3
- import { withTheme } from "styled-components";
4
- import { Icon } from "./styled-icon.js";
5
- const useSvgToReactEncoded = (svg) => {
6
- const svgWrapperRef = useRef();
7
- useEffect(() => {
8
- svgWrapperRef.current.innerHTML = svg;
9
- }, [svg]);
10
- return svgWrapperRef;
11
- };
12
- const IconButtonSvg = (props) => {
13
- const {
14
- sublabel = "",
15
- onClick = () => {
16
- },
17
- onTouchStart = () => {
18
- },
19
- svg,
20
- svgOver,
21
- height = "3rem",
22
- width = "3rem",
23
- title
24
- } = props || {};
25
- const [svgActive, setSvgActive] = useState(svg);
26
- const svgWrapperRef = useSvgToReactEncoded(svgActive);
27
- return /* @__PURE__ */ jsxs(
28
- Icon,
29
- {
30
- title,
31
- display: sublabel !== "" ? "block" : "none",
32
- onClick,
33
- onTouchStart,
34
- onMouseOver: () => setSvgActive(svgOver || svg),
35
- onMouseOut: () => setSvgActive(svg),
36
- width,
37
- height,
38
- children: [
39
- /* @__PURE__ */ jsx("div", { ref: svgWrapperRef }),
40
- /* @__PURE__ */ jsx("label", { children: sublabel })
41
- ]
42
- }
43
- );
44
- };
45
- IconButtonSvg.defaultProps = { theme: {} };
46
- const _t = withTheme(IconButtonSvg);
47
- export {
48
- _t as IconButtonSvg
49
- };
50
- //# sourceMappingURL=icon-button-svg.js.map
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useState, useRef, useEffect } from "react";
3
+ import { withTheme } from "styled-components";
4
+ import { Icon } from "./styled-icon.js";
5
+ const useSvgToReactEncoded = (svg) => {
6
+ const svgWrapperRef = useRef();
7
+ useEffect(() => {
8
+ svgWrapperRef.current.innerHTML = svg;
9
+ }, [svg]);
10
+ return svgWrapperRef;
11
+ };
12
+ const IconButtonSvg = (props) => {
13
+ const {
14
+ sublabel = "",
15
+ onClick = () => {
16
+ },
17
+ onTouchStart = () => {
18
+ },
19
+ svg,
20
+ svgOver,
21
+ height = "3rem",
22
+ width = "3rem",
23
+ title
24
+ } = props || {};
25
+ const [svgActive, setSvgActive] = useState(svg);
26
+ const svgWrapperRef = useSvgToReactEncoded(svgActive);
27
+ return /* @__PURE__ */ jsxs(
28
+ Icon,
29
+ {
30
+ title,
31
+ display: sublabel !== "" ? "block" : "none",
32
+ onClick,
33
+ onTouchStart,
34
+ onMouseOver: () => setSvgActive(svgOver || svg),
35
+ onMouseOut: () => setSvgActive(svg),
36
+ width,
37
+ height,
38
+ children: [
39
+ /* @__PURE__ */ jsx("div", { ref: svgWrapperRef }),
40
+ /* @__PURE__ */ jsx("label", { children: sublabel })
41
+ ]
42
+ }
43
+ );
44
+ };
45
+ IconButtonSvg.defaultProps = { theme: {} };
46
+ const _t = withTheme(IconButtonSvg);
47
+ export {
48
+ _t as IconButtonSvg
49
+ };
50
+ //# sourceMappingURL=icon-button-svg.js.map
@@ -1,24 +1,24 @@
1
- import { anularAyuda, contactoBarraSup, continuar, delegacionMenuLateral, delegacionesVerde, descarga, descargaOver, mailRojo, pagosMenuLateral, passwordEyeOpenSvg, passwordEyeSvg, pdfImage, telefonoCeleste, telefonoConsulta, telefonoEmergencia, telefonoExequial, telefonoSalud, whatAppIcon } from "./constants-svg.js";
2
- import { IconButtonSvg } from "./icon-button-svg.js";
3
- export {
4
- IconButtonSvg,
5
- anularAyuda,
6
- contactoBarraSup,
7
- continuar,
8
- delegacionMenuLateral,
9
- delegacionesVerde,
10
- descarga,
11
- descargaOver,
12
- mailRojo,
13
- pagosMenuLateral,
14
- passwordEyeOpenSvg,
15
- passwordEyeSvg,
16
- pdfImage,
17
- telefonoCeleste,
18
- telefonoConsulta,
19
- telefonoEmergencia,
20
- telefonoExequial,
21
- telefonoSalud,
22
- whatAppIcon
23
- };
24
- //# sourceMappingURL=index.js.map
1
+ import { anularAyuda, contactoBarraSup, continuar, delegacionMenuLateral, delegacionesVerde, descarga, descargaOver, mailRojo, pagosMenuLateral, passwordEyeOpenSvg, passwordEyeSvg, pdfImage, telefonoCeleste, telefonoConsulta, telefonoEmergencia, telefonoExequial, telefonoSalud, whatAppIcon } from "./constants-svg.js";
2
+ import { IconButtonSvg } from "./icon-button-svg.js";
3
+ export {
4
+ IconButtonSvg,
5
+ anularAyuda,
6
+ contactoBarraSup,
7
+ continuar,
8
+ delegacionMenuLateral,
9
+ delegacionesVerde,
10
+ descarga,
11
+ descargaOver,
12
+ mailRojo,
13
+ pagosMenuLateral,
14
+ passwordEyeOpenSvg,
15
+ passwordEyeSvg,
16
+ pdfImage,
17
+ telefonoCeleste,
18
+ telefonoConsulta,
19
+ telefonoEmergencia,
20
+ telefonoExequial,
21
+ telefonoSalud,
22
+ whatAppIcon
23
+ };
24
+ //# sourceMappingURL=index.js.map
@@ -1,26 +1,26 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { styled } from "styled-components";
3
- const IconDiv = (props) => /* @__PURE__ */ jsx("div", { ...props });
4
- const Icon = styled(IconDiv)`
5
- display: flex;
6
- flex-direction: column;
7
- justify-content: center;
8
- align-items: center;
9
- svg {
10
- margin: 0.1rem;
11
- margin-right: 0.1rem;
12
- margin-top: 0.1rem;
13
- justify-content: center;
14
- color: red;
15
- width: ${(props) => props.width || "3rem"};
16
- height: ${(props) => props.height || props.width || "3rem"};
17
- cursor: pointer;
18
- }
19
- label {
20
- display: ${(props) => props.display || "none"};
21
- }
22
- `;
23
- export {
24
- Icon
25
- };
26
- //# sourceMappingURL=styled-icon.js.map
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { styled } from "styled-components";
3
+ const IconDiv = (props) => /* @__PURE__ */ jsx("div", { ...props });
4
+ const Icon = styled(IconDiv)`
5
+ display: flex;
6
+ flex-direction: column;
7
+ justify-content: center;
8
+ align-items: center;
9
+ svg {
10
+ margin: 0.1rem;
11
+ margin-right: 0.1rem;
12
+ margin-top: 0.1rem;
13
+ justify-content: center;
14
+ color: red;
15
+ width: ${(props) => props.width || "3rem"};
16
+ height: ${(props) => props.height || props.width || "3rem"};
17
+ cursor: pointer;
18
+ }
19
+ label {
20
+ display: ${(props) => props.display || "none"};
21
+ }
22
+ `;
23
+ export {
24
+ Icon
25
+ };
26
+ //# sourceMappingURL=styled-icon.js.map
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- console.error(
2
- '\n⚠️ ERROR: Import desde "siam-ui-utils" no está permitido.\n Usa imports modulares como:\n import { createField } from "siam-ui-utils/custom-input"\n'
3
- );
4
- //# sourceMappingURL=index.js.map
1
+ console.error(
2
+ '\n⚠️ ERROR: Import desde "siam-ui-utils" no está permitido.\n Usa imports modulares como:\n import { createField } from "siam-ui-utils/custom-input"\n'
3
+ );
4
+ //# sourceMappingURL=index.js.map
@@ -1,11 +1,11 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { injectIntl, FormattedMessage } from "react-intl";
3
- const InjectMessage = (props) => /* @__PURE__ */ jsx(FormattedMessage, { ...props });
4
- const IntlMessages = injectIntl(InjectMessage, {
5
- withRef: false
6
- });
7
- export {
8
- IntlMessages,
9
- IntlMessages as default
10
- };
11
- //# sourceMappingURL=index.js.map
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { injectIntl, FormattedMessage } from "react-intl";
3
+ const InjectMessage = (props) => /* @__PURE__ */ jsx(FormattedMessage, { ...props });
4
+ const IntlMessages = injectIntl(InjectMessage, {
5
+ withRef: false
6
+ });
7
+ export {
8
+ IntlMessages,
9
+ IntlMessages as default
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -1,8 +1,8 @@
1
- function _assertThisInitialized(e) {
2
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
3
- return e;
4
- }
5
- export {
6
- _assertThisInitialized as default
7
- };
8
- //# sourceMappingURL=assertThisInitialized.js.map
1
+ function _assertThisInitialized(e) {
2
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
3
+ return e;
4
+ }
5
+ export {
6
+ _assertThisInitialized as default
7
+ };
8
+ //# sourceMappingURL=assertThisInitialized.js.map
@@ -1,13 +1,13 @@
1
- function _extends() {
2
- return _extends = Object.assign ? Object.assign.bind() : function(n) {
3
- for (var e = 1; e < arguments.length; e++) {
4
- var t = arguments[e];
5
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
6
- }
7
- return n;
8
- }, _extends.apply(null, arguments);
9
- }
10
- export {
11
- _extends as default
12
- };
13
- //# sourceMappingURL=extends.js.map
1
+ function _extends() {
2
+ return _extends = Object.assign ? Object.assign.bind() : function(n) {
3
+ for (var e = 1; e < arguments.length; e++) {
4
+ var t = arguments[e];
5
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
6
+ }
7
+ return n;
8
+ }, _extends.apply(null, arguments);
9
+ }
10
+ export {
11
+ _extends as default
12
+ };
13
+ //# sourceMappingURL=extends.js.map
@@ -1,8 +1,8 @@
1
- import _setPrototypeOf from "./setPrototypeOf.js";
2
- function _inheritsLoose(t, o) {
3
- t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
4
- }
5
- export {
6
- _inheritsLoose as default
7
- };
8
- //# sourceMappingURL=inheritsLoose.js.map
1
+ import _setPrototypeOf from "./setPrototypeOf.js";
2
+ function _inheritsLoose(t, o) {
3
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
4
+ }
5
+ export {
6
+ _inheritsLoose as default
7
+ };
8
+ //# sourceMappingURL=inheritsLoose.js.map
@@ -1,13 +1,13 @@
1
- function _objectWithoutPropertiesLoose(r, e) {
2
- if (null == r) return {};
3
- var t = {};
4
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
5
- if (-1 !== e.indexOf(n)) continue;
6
- t[n] = r[n];
7
- }
8
- return t;
9
- }
10
- export {
11
- _objectWithoutPropertiesLoose as default
12
- };
13
- //# sourceMappingURL=objectWithoutPropertiesLoose.js.map
1
+ function _objectWithoutPropertiesLoose(r, e) {
2
+ if (null == r) return {};
3
+ var t = {};
4
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
5
+ if (-1 !== e.indexOf(n)) continue;
6
+ t[n] = r[n];
7
+ }
8
+ return t;
9
+ }
10
+ export {
11
+ _objectWithoutPropertiesLoose as default
12
+ };
13
+ //# sourceMappingURL=objectWithoutPropertiesLoose.js.map
@@ -1,9 +1,9 @@
1
- function _setPrototypeOf(t, e) {
2
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
3
- return t2.__proto__ = e2, t2;
4
- }, _setPrototypeOf(t, e);
5
- }
6
- export {
7
- _setPrototypeOf as default
8
- };
9
- //# sourceMappingURL=setPrototypeOf.js.map
1
+ function _setPrototypeOf(t, e) {
2
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
3
+ return t2.__proto__ = e2, t2;
4
+ }, _setPrototypeOf(t, e);
5
+ }
6
+ export {
7
+ _setPrototypeOf as default
8
+ };
9
+ //# sourceMappingURL=setPrototypeOf.js.map
@@ -0,0 +1,77 @@
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", "color", "innerRef", "pill", "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
+ var propTypes = {
48
+ /** Pass children so this component can wrap the child elements */
49
+ children: PropTypes.node,
50
+ /** Add custom class */
51
+ className: PropTypes.string,
52
+ /** Change background color of Badge */
53
+ color: PropTypes.string,
54
+ /** Change existing className with a new className */
55
+ cssModule: PropTypes.object,
56
+ innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),
57
+ /** Add rounded corners to the Badge */
58
+ pill: PropTypes.bool,
59
+ /** Set a custom element for this component */
60
+ tag: tagPropType
61
+ };
62
+ function Badge(props) {
63
+ var className = props.className, cssModule = props.cssModule, _props$color = props.color, color = _props$color === void 0 ? "secondary" : _props$color, innerRef = props.innerRef, _props$pill = props.pill, pill = _props$pill === void 0 ? false : _props$pill, _props$tag = props.tag, Tag = _props$tag === void 0 ? "span" : _props$tag, attributes = _objectWithoutProperties(props, _excluded);
64
+ var classes = mapToCssModules(classnames(className, "badge", "bg-" + color, pill ? "rounded-pill" : false), cssModule);
65
+ if (attributes.href && Tag === "span") {
66
+ Tag = "a";
67
+ }
68
+ return /* @__PURE__ */ React.createElement(Tag, _extends({}, attributes, {
69
+ className: classes,
70
+ ref: innerRef
71
+ }));
72
+ }
73
+ Badge.propTypes = propTypes;
74
+ export {
75
+ Badge as default
76
+ };
77
+ //# sourceMappingURL=Badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Badge.js","sources":["../../../../../node_modules/@neolution-ch/reactstrap/esm/Badge.js"],"sourcesContent":["var _excluded = [\"className\", \"cssModule\", \"color\", \"innerRef\", \"pill\", \"tag\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n /** Pass children so this component can wrap the child elements */\n children: PropTypes.node,\n /** Add custom class */\n className: PropTypes.string,\n /** Change background color of Badge */\n color: PropTypes.string,\n /** Change existing className with a new className */\n cssModule: PropTypes.object,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),\n /** Add rounded corners to the Badge */\n pill: PropTypes.bool,\n /** Set a custom element for this component */\n tag: tagPropType\n};\nfunction Badge(props) {\n var className = props.className,\n cssModule = props.cssModule,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n innerRef = props.innerRef,\n _props$pill = props.pill,\n pill = _props$pill === void 0 ? false : _props$pill,\n _props$tag = props.tag,\n Tag = _props$tag === void 0 ? 'span' : _props$tag,\n attributes = _objectWithoutProperties(props, _excluded);\n var classes = mapToCssModules(classNames(className, 'badge', 'bg-' + color, pill ? 'rounded-pill' : false), cssModule);\n if (attributes.href && Tag === 'span') {\n Tag = 'a';\n }\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n className: classes,\n ref: innerRef\n }));\n}\nBadge.propTypes = propTypes;\nexport default Badge;"],"names":["classNames"],"mappings":";;;;AAAA,IAAI,YAAY,CAAC,aAAa,aAAa,SAAS,YAAY,QAAQ,KAAK;AAC7E,SAAS,WAAW;AAAE,aAAW,OAAO,SAAS,OAAO,OAAO,SAAS,SAAU,QAAQ;AAAE,aAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AAAE,UAAI,SAAS,UAAU,CAAC;AAAG,eAAS,OAAO,QAAQ;AAAE,YAAI,OAAO,UAAU,eAAe,KAAK,QAAQ,GAAG,GAAG;AAAE,iBAAO,GAAG,IAAI,OAAO,GAAG;AAAA,QAAG;AAAA,MAAE;AAAA,IAAE;AAAE,WAAO;AAAA,EAAQ;AAAG,SAAO,SAAS,MAAM,MAAM,SAAS;AAAG;AAClV,SAAS,yBAAyB,QAAQ,UAAU;AAAE,MAAI,UAAU,KAAM,QAAO,CAAA;AAAI,MAAI,SAAS,8BAA8B,QAAQ,QAAQ;AAAG,MAAI,KAAK;AAAG,MAAI,OAAO,uBAAuB;AAAE,QAAI,mBAAmB,OAAO,sBAAsB,MAAM;AAAG,SAAK,IAAI,GAAG,IAAI,iBAAiB,QAAQ,KAAK;AAAE,YAAM,iBAAiB,CAAC;AAAG,UAAI,SAAS,QAAQ,GAAG,KAAK,EAAG;AAAU,UAAI,CAAC,OAAO,UAAU,qBAAqB,KAAK,QAAQ,GAAG,EAAG;AAAU,aAAO,GAAG,IAAI,OAAO,GAAG;AAAA,IAAG;AAAA,EAAE;AAAE,SAAO;AAAQ;AAC3e,SAAS,8BAA8B,QAAQ,UAAU;AAAE,MAAI,UAAU,KAAM,QAAO,CAAA;AAAI,MAAI,SAAS,CAAA;AAAI,MAAI,aAAa,OAAO,KAAK,MAAM;AAAG,MAAI,KAAK;AAAG,OAAK,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;AAAE,UAAM,WAAW,CAAC;AAAG,QAAI,SAAS,QAAQ,GAAG,KAAK,EAAG;AAAU,WAAO,GAAG,IAAI,OAAO,GAAG;AAAA,EAAG;AAAE,SAAO;AAAQ;AAKlT,IAAI,YAAY;AAAA;AAAA,EAEd,UAAU,UAAU;AAAA;AAAA,EAEpB,WAAW,UAAU;AAAA;AAAA,EAErB,OAAO,UAAU;AAAA;AAAA,EAEjB,WAAW,UAAU;AAAA,EACrB,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,UAAU,MAAM,CAAC;AAAA;AAAA,EAElF,MAAM,UAAU;AAAA;AAAA,EAEhB,KAAK;AACP;AACA,SAAS,MAAM,OAAO;AACpB,MAAI,YAAY,MAAM,WACpB,YAAY,MAAM,WAClB,eAAe,MAAM,OACrB,QAAQ,iBAAiB,SAAS,cAAc,cAChD,WAAW,MAAM,UACjB,cAAc,MAAM,MACpB,OAAO,gBAAgB,SAAS,QAAQ,aACxC,aAAa,MAAM,KACnB,MAAM,eAAe,SAAS,SAAS,YACvC,aAAa,yBAAyB,OAAO,SAAS;AACxD,MAAI,UAAU,gBAAgBA,WAAW,WAAW,SAAS,QAAQ,OAAO,OAAO,iBAAiB,KAAK,GAAG,SAAS;AACrH,MAAI,WAAW,QAAQ,QAAQ,QAAQ;AACrC,UAAM;AAAA,EACR;AACA,SAAoB,sBAAM,cAAc,KAAK,SAAS,CAAA,GAAI,YAAY;AAAA,IACpE,WAAW;AAAA,IACX,KAAK;AAAA,EACT,CAAG,CAAC;AACJ;AACA,MAAM,YAAY;","x_google_ignoreList":[0]}
@@ -1,111 +1,111 @@
1
- import React, { useCallback } from "react";
2
- import PropTypes from "prop-types";
3
- import classnames from "../../../../_virtual/index.js";
4
- import { mapToCssModules, tagPropType } from "./utils.js";
5
- import CloseButton from "./CloseButton.js";
6
- var _excluded = ["active", "aria-label", "block", "className", "close", "cssModule", "color", "outline", "size", "tag", "innerRef"];
7
- function _extends() {
8
- _extends = Object.assign ? Object.assign.bind() : function(target) {
9
- for (var i = 1; i < arguments.length; i++) {
10
- var source = arguments[i];
11
- for (var key in source) {
12
- if (Object.prototype.hasOwnProperty.call(source, key)) {
13
- target[key] = source[key];
14
- }
15
- }
16
- }
17
- return target;
18
- };
19
- return _extends.apply(this, arguments);
20
- }
21
- function _objectWithoutProperties(source, excluded) {
22
- if (source == null) return {};
23
- var target = _objectWithoutPropertiesLoose(source, excluded);
24
- var key, i;
25
- if (Object.getOwnPropertySymbols) {
26
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
27
- for (i = 0; i < sourceSymbolKeys.length; i++) {
28
- key = sourceSymbolKeys[i];
29
- if (excluded.indexOf(key) >= 0) continue;
30
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
31
- target[key] = source[key];
32
- }
33
- }
34
- return target;
35
- }
36
- function _objectWithoutPropertiesLoose(source, excluded) {
37
- if (source == null) return {};
38
- var target = {};
39
- var sourceKeys = Object.keys(source);
40
- var key, i;
41
- for (i = 0; i < sourceKeys.length; i++) {
42
- key = sourceKeys[i];
43
- if (excluded.indexOf(key) >= 0) continue;
44
- target[key] = source[key];
45
- }
46
- return target;
47
- }
48
- var propTypes = {
49
- /** Manually set the visual state of the button to active */
50
- active: PropTypes.bool,
51
- /** Aria label */
52
- "aria-label": PropTypes.string,
53
- block: PropTypes.bool,
54
- /** Pass children so this component can wrap them */
55
- children: PropTypes.node,
56
- /** Add custom class */
57
- className: PropTypes.string,
58
- /** Change existing className with a new className */
59
- cssModule: PropTypes.object,
60
- /** Use the button as a close button */
61
- close: PropTypes.bool,
62
- /** Change color of Button to one of the available colors */
63
- color: PropTypes.string,
64
- /** Disables the button */
65
- disabled: PropTypes.bool,
66
- innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),
67
- /** Function to be triggered on click */
68
- onClick: PropTypes.func,
69
- /** Adds outline to the button */
70
- outline: PropTypes.bool,
71
- /** Make the button bigger or smaller */
72
- size: PropTypes.string,
73
- /** Set a custom element for this component */
74
- tag: tagPropType
75
- };
76
- function Button(props) {
77
- var onClick = useCallback(function(e) {
78
- if (props.disabled) {
79
- e.preventDefault();
80
- return;
81
- }
82
- if (props.onClick) {
83
- return props.onClick(e);
84
- }
85
- }, [props.onClick, props.disabled]);
86
- var active = props.active, ariaLabel = props["aria-label"], block = props.block, className = props.className, close = props.close, cssModule = props.cssModule, _props$color = props.color, color = _props$color === void 0 ? "secondary" : _props$color, outline = props.outline, size = props.size, _props$tag = props.tag, Tag = _props$tag === void 0 ? "button" : _props$tag, innerRef = props.innerRef, attributes = _objectWithoutProperties(props, _excluded);
87
- if (close) {
88
- return /* @__PURE__ */ React.createElement(CloseButton, attributes);
89
- }
90
- var btnOutlineColor = "btn".concat(outline ? "-outline" : "", "-").concat(color);
91
- var classes = mapToCssModules(classnames(className, "btn", btnOutlineColor, size ? "btn-".concat(size) : false, block ? "d-block w-100" : false, {
92
- active,
93
- disabled: props.disabled
94
- }), cssModule);
95
- if (attributes.href && Tag === "button") {
96
- Tag = "a";
97
- }
98
- return /* @__PURE__ */ React.createElement(Tag, _extends({
99
- type: Tag === "button" && attributes.onClick ? "button" : void 0
100
- }, attributes, {
101
- className: classes,
102
- ref: innerRef,
103
- onClick,
104
- "aria-label": ariaLabel
105
- }));
106
- }
107
- Button.propTypes = propTypes;
108
- export {
109
- Button as default
110
- };
111
- //# sourceMappingURL=Button.js.map
1
+ import React, { useCallback } from "react";
2
+ import PropTypes from "prop-types";
3
+ import classnames from "../../../../_virtual/index.js";
4
+ import { mapToCssModules, tagPropType } from "./utils.js";
5
+ import CloseButton from "./CloseButton.js";
6
+ var _excluded = ["active", "aria-label", "block", "className", "close", "cssModule", "color", "outline", "size", "tag", "innerRef"];
7
+ function _extends() {
8
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
9
+ for (var i = 1; i < arguments.length; i++) {
10
+ var source = arguments[i];
11
+ for (var key in source) {
12
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
13
+ target[key] = source[key];
14
+ }
15
+ }
16
+ }
17
+ return target;
18
+ };
19
+ return _extends.apply(this, arguments);
20
+ }
21
+ function _objectWithoutProperties(source, excluded) {
22
+ if (source == null) return {};
23
+ var target = _objectWithoutPropertiesLoose(source, excluded);
24
+ var key, i;
25
+ if (Object.getOwnPropertySymbols) {
26
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
27
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
28
+ key = sourceSymbolKeys[i];
29
+ if (excluded.indexOf(key) >= 0) continue;
30
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
31
+ target[key] = source[key];
32
+ }
33
+ }
34
+ return target;
35
+ }
36
+ function _objectWithoutPropertiesLoose(source, excluded) {
37
+ if (source == null) return {};
38
+ var target = {};
39
+ var sourceKeys = Object.keys(source);
40
+ var key, i;
41
+ for (i = 0; i < sourceKeys.length; i++) {
42
+ key = sourceKeys[i];
43
+ if (excluded.indexOf(key) >= 0) continue;
44
+ target[key] = source[key];
45
+ }
46
+ return target;
47
+ }
48
+ var propTypes = {
49
+ /** Manually set the visual state of the button to active */
50
+ active: PropTypes.bool,
51
+ /** Aria label */
52
+ "aria-label": PropTypes.string,
53
+ block: PropTypes.bool,
54
+ /** Pass children so this component can wrap them */
55
+ children: PropTypes.node,
56
+ /** Add custom class */
57
+ className: PropTypes.string,
58
+ /** Change existing className with a new className */
59
+ cssModule: PropTypes.object,
60
+ /** Use the button as a close button */
61
+ close: PropTypes.bool,
62
+ /** Change color of Button to one of the available colors */
63
+ color: PropTypes.string,
64
+ /** Disables the button */
65
+ disabled: PropTypes.bool,
66
+ innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),
67
+ /** Function to be triggered on click */
68
+ onClick: PropTypes.func,
69
+ /** Adds outline to the button */
70
+ outline: PropTypes.bool,
71
+ /** Make the button bigger or smaller */
72
+ size: PropTypes.string,
73
+ /** Set a custom element for this component */
74
+ tag: tagPropType
75
+ };
76
+ function Button(props) {
77
+ var onClick = useCallback(function(e) {
78
+ if (props.disabled) {
79
+ e.preventDefault();
80
+ return;
81
+ }
82
+ if (props.onClick) {
83
+ return props.onClick(e);
84
+ }
85
+ }, [props.onClick, props.disabled]);
86
+ var active = props.active, ariaLabel = props["aria-label"], block = props.block, className = props.className, close = props.close, cssModule = props.cssModule, _props$color = props.color, color = _props$color === void 0 ? "secondary" : _props$color, outline = props.outline, size = props.size, _props$tag = props.tag, Tag = _props$tag === void 0 ? "button" : _props$tag, innerRef = props.innerRef, attributes = _objectWithoutProperties(props, _excluded);
87
+ if (close) {
88
+ return /* @__PURE__ */ React.createElement(CloseButton, attributes);
89
+ }
90
+ var btnOutlineColor = "btn".concat(outline ? "-outline" : "", "-").concat(color);
91
+ var classes = mapToCssModules(classnames(className, "btn", btnOutlineColor, size ? "btn-".concat(size) : false, block ? "d-block w-100" : false, {
92
+ active,
93
+ disabled: props.disabled
94
+ }), cssModule);
95
+ if (attributes.href && Tag === "button") {
96
+ Tag = "a";
97
+ }
98
+ return /* @__PURE__ */ React.createElement(Tag, _extends({
99
+ type: Tag === "button" && attributes.onClick ? "button" : void 0
100
+ }, attributes, {
101
+ className: classes,
102
+ ref: innerRef,
103
+ onClick,
104
+ "aria-label": ariaLabel
105
+ }));
106
+ }
107
+ Button.propTypes = propTypes;
108
+ export {
109
+ Button as default
110
+ };
111
+ //# sourceMappingURL=Button.js.map