react-asc 25.2.8 → 25.2.10

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.
@@ -1 +1 @@
1
- export declare const IsEmptyValidator: (value: unknown) => boolean;
1
+ export declare const IsEmptyValidator: (value: string) => boolean;
package/index.es.js CHANGED
@@ -1170,7 +1170,9 @@ const FormError = (props) => {
1170
1170
  React.createElement("div", { className: className }, errors.map(e => React.createElement("div", { key: e.validator }, e.message)))));
1171
1171
  };
1172
1172
 
1173
- const IsEmptyValidator = (value) => value.trim() === '' || value === null || value === undefined;
1173
+ const IsEmptyValidator = (value) => value?.trim() === ''
1174
+ || value === null
1175
+ || value === undefined;
1174
1176
 
1175
1177
  const EmailValidator = (value) => {
1176
1178
  const isInvalidEmailFormat = value.match(/^([\w.%+-]+)@([\w-]+\.)+([\w]{2,})$/i) === null;
@@ -1820,7 +1822,7 @@ const ModalHeader = (props) => {
1820
1822
  React.createElement(IconButton, { icon: React.createElement(TimesSolidIcon, null), variant: VARIANT.text, onClick: handleClick })));
1821
1823
  };
1822
1824
 
1823
- var css_248z$o = ".ModalBody-module_modalBody__D-gk2 {\n position: relative;\n flex: 1 1 auto;\n padding: 1rem;\n overflow-y: auto;\n}";
1825
+ var css_248z$o = ".ModalBody-module_modalBody__D-gk2 {\n position: relative;\n flex: 1 1 auto;\n padding: 0 1rem 1rem 1rem;\n overflow-y: auto;\n}";
1824
1826
  var styles$o = {"modalBody":"ModalBody-module_modalBody__D-gk2"};
1825
1827
  styleInject(css_248z$o);
1826
1828
 
@@ -1842,28 +1844,18 @@ const ModalFooter = (props) => {
1842
1844
  return (React.createElement("div", { className: getCssClasses(), ...rest }, children));
1843
1845
  };
1844
1846
 
1845
- var css_248z$m = ".Modal-module_modal__HMxWV {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n outline: 0;\n z-index: 1111 !important;\n border-radius: var(--borderRadius);\n}\n.Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf .Modal-module_sm__CsR6U {\n max-width: 300px;\n}\n.Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf .Modal-module_md__lNggx {\n max-width: 500px;\n}\n.Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf .Modal-module_lg__6dtT2 {\n max-width: 1140px;\n}\n@media (min-width: 576px) {\n .Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf {\n max-width: 600px;\n }\n}\n\n.Modal-module_modalDialog__fNqyK {\n position: relative;\n width: auto;\n pointer-events: none;\n}\n\n.Modal-module_modalDialogCentered__sa2wv {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.Modal-module_modalContent__9wAwB {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n pointer-events: auto;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 0.3rem;\n box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.08);\n outline: 0;\n margin: 1rem;\n}\n@media (min-width: 576px) {\n .Modal-module_modalContent__9wAwB {\n max-width: 500px;\n margin: auto;\n }\n}\n\n.Modal-module_fullscreen__iepGa {\n width: 100% !important;\n height: 100% !important;\n max-height: 100% !important;\n margin: 0;\n padding: 0;\n}\n.Modal-module_fullscreen__iepGa .Modal-module_modalContent__9wAwB {\n margin: 0;\n height: auto;\n min-height: 100%;\n max-height: 100%;\n border-radius: 0;\n overflow: auto;\n max-width: 100%;\n}\n@media (min-width: 320px) {\n .Modal-module_fullscreen__iepGa {\n max-width: 100% !important;\n }\n}";
1847
+ var css_248z$m = ".Modal-module_modal__HMxWV {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n outline: 0;\n z-index: 1111 !important;\n border-radius: var(--borderRadius);\n}\n.Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf .Modal-module_sm__CsR6U {\n max-width: 300px;\n}\n.Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf .Modal-module_md__lNggx {\n max-width: 500px;\n}\n.Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf .Modal-module_lg__6dtT2 {\n max-width: 1140px;\n}\n@media (min-width: 576px) {\n .Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf {\n max-width: 600px;\n }\n}\n\n.Modal-module_modalDialog__fNqyK {\n position: relative;\n width: auto;\n pointer-events: none;\n}\n\n.Modal-module_modalDialogCentered__sa2wv {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.Modal-module_modalContent__9wAwB {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n pointer-events: auto;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 0.3rem;\n box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.08);\n outline: 0;\n margin: 1rem;\n max-height: 600px;\n}\n@media (min-width: 576px) {\n .Modal-module_modalContent__9wAwB {\n max-width: 500px;\n margin: auto;\n }\n}\n\n.Modal-module_fullscreen__iepGa {\n width: 100% !important;\n height: 100% !important;\n max-height: 100% !important;\n margin: 0;\n padding: 0;\n}\n.Modal-module_fullscreen__iepGa .Modal-module_modalContent__9wAwB {\n margin: 0;\n height: auto;\n min-height: 100%;\n max-height: 100%;\n border-radius: 0;\n overflow: auto;\n max-width: 100%;\n}\n@media (min-width: 320px) {\n .Modal-module_fullscreen__iepGa {\n max-width: 100% !important;\n }\n}";
1846
1848
  var styles$m = {"modal":"Modal-module_modal__HMxWV","modal-dialog":"Modal-module_modal-dialog__U2wGf","sm":"Modal-module_sm__CsR6U","md":"Modal-module_md__lNggx","lg":"Modal-module_lg__6dtT2","modalDialog":"Modal-module_modalDialog__fNqyK","modalDialogCentered":"Modal-module_modalDialogCentered__sa2wv","modalContent":"Modal-module_modalContent__9wAwB","fullscreen":"Modal-module_fullscreen__iepGa"};
1847
1849
  styleInject(css_248z$m);
1848
1850
 
1849
1851
  const Modal = (props) => {
1850
1852
  const { target = document.body, className, size, fullScreen, children, header, footer, onHeaderCloseClick, onBackdropClick, isDismissable = false } = props;
1851
- const { isMobile } = useMobileDetect();
1852
- const [isFullScreen, setIsFullScreen] = useState(fullScreen);
1853
- useEffect(() => {
1854
- if (isMobile === true && (fullScreen === true || fullScreen === undefined)) {
1855
- setIsFullScreen(true);
1856
- }
1857
- else {
1858
- setIsFullScreen(false);
1859
- }
1860
- }, [isMobile, fullScreen]);
1861
1853
  const getCssClass = () => {
1862
1854
  const cssClasses = [];
1863
1855
  cssClasses.push(styles$m.modalDialog);
1864
1856
  cssClasses.push(styles$m.modalDialogCentered);
1865
- isFullScreen && cssClasses.push(styles$m.fullscreen);
1866
1857
  size && cssClasses.push(styles$m[size]);
1858
+ fullScreen && cssClasses.push(styles$m.fullscreen);
1867
1859
  className && cssClasses.push(className);
1868
1860
  return cssClasses.filter(r => r).join(' ');
1869
1861
  };
@@ -1882,7 +1874,7 @@ const Modal = (props) => {
1882
1874
  React.createElement("div", { className: getCssClass() },
1883
1875
  React.createElement("div", { className: styles$m.modalContent },
1884
1876
  header &&
1885
- React.createElement(ModalHeader, { shadow: fullScreen, isDismissable: isDismissable, onClose: () => onHeaderCloseClick && onHeaderCloseClick() }, header),
1877
+ React.createElement(ModalHeader, { isDismissable: isDismissable, onClose: () => onHeaderCloseClick && onHeaderCloseClick() }, header),
1886
1878
  React.createElement(ModalBody, null, children),
1887
1879
  footer &&
1888
1880
  React.createElement(ModalFooter, null, footer))))),
package/index.js CHANGED
@@ -1179,7 +1179,9 @@ const FormError = (props) => {
1179
1179
  React__default["default"].createElement("div", { className: className }, errors.map(e => React__default["default"].createElement("div", { key: e.validator }, e.message)))));
1180
1180
  };
1181
1181
 
1182
- const IsEmptyValidator = (value) => value.trim() === '' || value === null || value === undefined;
1182
+ const IsEmptyValidator = (value) => value?.trim() === ''
1183
+ || value === null
1184
+ || value === undefined;
1183
1185
 
1184
1186
  const EmailValidator = (value) => {
1185
1187
  const isInvalidEmailFormat = value.match(/^([\w.%+-]+)@([\w-]+\.)+([\w]{2,})$/i) === null;
@@ -1829,7 +1831,7 @@ const ModalHeader = (props) => {
1829
1831
  React__default["default"].createElement(IconButton, { icon: React__default["default"].createElement(TimesSolidIcon, null), variant: exports.VARIANT.text, onClick: handleClick })));
1830
1832
  };
1831
1833
 
1832
- var css_248z$o = ".ModalBody-module_modalBody__D-gk2 {\n position: relative;\n flex: 1 1 auto;\n padding: 1rem;\n overflow-y: auto;\n}";
1834
+ var css_248z$o = ".ModalBody-module_modalBody__D-gk2 {\n position: relative;\n flex: 1 1 auto;\n padding: 0 1rem 1rem 1rem;\n overflow-y: auto;\n}";
1833
1835
  var styles$o = {"modalBody":"ModalBody-module_modalBody__D-gk2"};
1834
1836
  styleInject(css_248z$o);
1835
1837
 
@@ -1851,28 +1853,18 @@ const ModalFooter = (props) => {
1851
1853
  return (React__default["default"].createElement("div", { className: getCssClasses(), ...rest }, children));
1852
1854
  };
1853
1855
 
1854
- var css_248z$m = ".Modal-module_modal__HMxWV {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n outline: 0;\n z-index: 1111 !important;\n border-radius: var(--borderRadius);\n}\n.Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf .Modal-module_sm__CsR6U {\n max-width: 300px;\n}\n.Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf .Modal-module_md__lNggx {\n max-width: 500px;\n}\n.Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf .Modal-module_lg__6dtT2 {\n max-width: 1140px;\n}\n@media (min-width: 576px) {\n .Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf {\n max-width: 600px;\n }\n}\n\n.Modal-module_modalDialog__fNqyK {\n position: relative;\n width: auto;\n pointer-events: none;\n}\n\n.Modal-module_modalDialogCentered__sa2wv {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.Modal-module_modalContent__9wAwB {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n pointer-events: auto;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 0.3rem;\n box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.08);\n outline: 0;\n margin: 1rem;\n}\n@media (min-width: 576px) {\n .Modal-module_modalContent__9wAwB {\n max-width: 500px;\n margin: auto;\n }\n}\n\n.Modal-module_fullscreen__iepGa {\n width: 100% !important;\n height: 100% !important;\n max-height: 100% !important;\n margin: 0;\n padding: 0;\n}\n.Modal-module_fullscreen__iepGa .Modal-module_modalContent__9wAwB {\n margin: 0;\n height: auto;\n min-height: 100%;\n max-height: 100%;\n border-radius: 0;\n overflow: auto;\n max-width: 100%;\n}\n@media (min-width: 320px) {\n .Modal-module_fullscreen__iepGa {\n max-width: 100% !important;\n }\n}";
1856
+ var css_248z$m = ".Modal-module_modal__HMxWV {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n outline: 0;\n z-index: 1111 !important;\n border-radius: var(--borderRadius);\n}\n.Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf .Modal-module_sm__CsR6U {\n max-width: 300px;\n}\n.Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf .Modal-module_md__lNggx {\n max-width: 500px;\n}\n.Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf .Modal-module_lg__6dtT2 {\n max-width: 1140px;\n}\n@media (min-width: 576px) {\n .Modal-module_modal__HMxWV .Modal-module_modal-dialog__U2wGf {\n max-width: 600px;\n }\n}\n\n.Modal-module_modalDialog__fNqyK {\n position: relative;\n width: auto;\n pointer-events: none;\n}\n\n.Modal-module_modalDialogCentered__sa2wv {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.Modal-module_modalContent__9wAwB {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n pointer-events: auto;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 0.3rem;\n box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.08);\n outline: 0;\n margin: 1rem;\n max-height: 600px;\n}\n@media (min-width: 576px) {\n .Modal-module_modalContent__9wAwB {\n max-width: 500px;\n margin: auto;\n }\n}\n\n.Modal-module_fullscreen__iepGa {\n width: 100% !important;\n height: 100% !important;\n max-height: 100% !important;\n margin: 0;\n padding: 0;\n}\n.Modal-module_fullscreen__iepGa .Modal-module_modalContent__9wAwB {\n margin: 0;\n height: auto;\n min-height: 100%;\n max-height: 100%;\n border-radius: 0;\n overflow: auto;\n max-width: 100%;\n}\n@media (min-width: 320px) {\n .Modal-module_fullscreen__iepGa {\n max-width: 100% !important;\n }\n}";
1855
1857
  var styles$m = {"modal":"Modal-module_modal__HMxWV","modal-dialog":"Modal-module_modal-dialog__U2wGf","sm":"Modal-module_sm__CsR6U","md":"Modal-module_md__lNggx","lg":"Modal-module_lg__6dtT2","modalDialog":"Modal-module_modalDialog__fNqyK","modalDialogCentered":"Modal-module_modalDialogCentered__sa2wv","modalContent":"Modal-module_modalContent__9wAwB","fullscreen":"Modal-module_fullscreen__iepGa"};
1856
1858
  styleInject(css_248z$m);
1857
1859
 
1858
1860
  const Modal = (props) => {
1859
1861
  const { target = document.body, className, size, fullScreen, children, header, footer, onHeaderCloseClick, onBackdropClick, isDismissable = false } = props;
1860
- const { isMobile } = useMobileDetect();
1861
- const [isFullScreen, setIsFullScreen] = React.useState(fullScreen);
1862
- React.useEffect(() => {
1863
- if (isMobile === true && (fullScreen === true || fullScreen === undefined)) {
1864
- setIsFullScreen(true);
1865
- }
1866
- else {
1867
- setIsFullScreen(false);
1868
- }
1869
- }, [isMobile, fullScreen]);
1870
1862
  const getCssClass = () => {
1871
1863
  const cssClasses = [];
1872
1864
  cssClasses.push(styles$m.modalDialog);
1873
1865
  cssClasses.push(styles$m.modalDialogCentered);
1874
- isFullScreen && cssClasses.push(styles$m.fullscreen);
1875
1866
  size && cssClasses.push(styles$m[size]);
1867
+ fullScreen && cssClasses.push(styles$m.fullscreen);
1876
1868
  className && cssClasses.push(className);
1877
1869
  return cssClasses.filter(r => r).join(' ');
1878
1870
  };
@@ -1891,7 +1883,7 @@ const Modal = (props) => {
1891
1883
  React__default["default"].createElement("div", { className: getCssClass() },
1892
1884
  React__default["default"].createElement("div", { className: styles$m.modalContent },
1893
1885
  header &&
1894
- React__default["default"].createElement(ModalHeader, { shadow: fullScreen, isDismissable: isDismissable, onClose: () => onHeaderCloseClick && onHeaderCloseClick() }, header),
1886
+ React__default["default"].createElement(ModalHeader, { isDismissable: isDismissable, onClose: () => onHeaderCloseClick && onHeaderCloseClick() }, header),
1895
1887
  React__default["default"].createElement(ModalBody, null, children),
1896
1888
  footer &&
1897
1889
  React__default["default"].createElement(ModalFooter, null, footer))))),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-asc",
3
- "version": "25.2.8",
3
+ "version": "25.2.10",
4
4
  "description": "handcrafted react components",
5
5
  "main": "index.js",
6
6
  "module": "index.es.js",