@indico-data/design-system 2.47.0 → 2.47.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.
@@ -1,2 +1,2 @@
1
1
  import { ModalProps } from './types';
2
- export declare const Modal: ({ className, children, isOpen, onRequestClose, portalClassName, overlayClassName, appElement, shouldCloseOnOverlayClick, shouldCloseOnEsc, testId, contentElement, overlayElement, position, ...rest }: ModalProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const Modal: ({ className, children, isOpen, onRequestClose, portalClassName, overlayClassName, appElement, shouldCloseOnOverlayClick, shouldCloseOnEsc, testId, contentElement, overlayElement, position, parentSelector, ...rest }: ModalProps) => import("react/jsx-runtime").JSX.Element;
@@ -12,4 +12,5 @@ export interface ModalProps {
12
12
  contentElement?: (props: any, children: React.ReactNode) => React.ReactElement;
13
13
  overlayElement?: (props: any, contentElement: React.ReactElement) => React.ReactElement;
14
14
  position?: 'top' | 'center';
15
+ parentSelector?: () => HTMLElement;
15
16
  }
package/lib/index.css CHANGED
@@ -1889,17 +1889,6 @@ form {
1889
1889
  .modal .modal-content .modal-body h2 {
1890
1890
  font-size: var(--pf-font-size-h1);
1891
1891
  }
1892
- .modal .modal-content .modal-body h1,
1893
- .modal .modal-content .modal-body h2,
1894
- .modal .modal-content .modal-body h3,
1895
- .modal .modal-content .modal-body h4,
1896
- .modal .modal-content .modal-body h5,
1897
- .modal .modal-content .modal-body h6 {
1898
- margin-bottom: var(--pf-margin-4);
1899
- }
1900
- .modal .modal-content .modal-body p {
1901
- margin-bottom: var(--pf-margin-4);
1902
- }
1903
1892
  .modal .modal-content .modal-body hr {
1904
1893
  margin-top: var(--pf-margin-8);
1905
1894
  margin-bottom: var(--pf-margin-8);
package/lib/index.d.ts CHANGED
@@ -533,8 +533,9 @@ interface ModalProps {
533
533
  contentElement?: (props: any, children: React.ReactNode) => React.ReactElement;
534
534
  overlayElement?: (props: any, contentElement: React.ReactElement) => React.ReactElement;
535
535
  position?: 'top' | 'center';
536
+ parentSelector?: () => HTMLElement;
536
537
  }
537
538
 
538
- declare const Modal: ({ className, children, isOpen, onRequestClose, portalClassName, overlayClassName, appElement, shouldCloseOnOverlayClick, shouldCloseOnEsc, testId, contentElement, overlayElement, position, ...rest }: ModalProps) => react_jsx_runtime.JSX.Element;
539
+ declare const Modal: ({ className, children, isOpen, onRequestClose, portalClassName, overlayClassName, appElement, shouldCloseOnOverlayClick, shouldCloseOnEsc, testId, contentElement, overlayElement, position, parentSelector, ...rest }: ModalProps) => react_jsx_runtime.JSX.Element;
539
540
 
540
541
  export { Badge, BarSpinner, Button, Card, Checkbox, CirclePulse, CircleSpinner, Col, Container, DatePicker, FloatUI, Form, Icon, IconTriggerDatePicker, LabeledInput as Input, Menu, Modal, LabeledPasswordInput as PasswordInput, Pill, Radio as RadioInput, Row, Select as SelectInput, SingleInputDatePicker, Skeleton, Table, LabeledTextarea as Textarea, Toggle as ToggleInput, Tooltip, registerFontAwesomeIcons };
package/lib/index.esm.css CHANGED
@@ -1889,17 +1889,6 @@ form {
1889
1889
  .modal .modal-content .modal-body h2 {
1890
1890
  font-size: var(--pf-font-size-h1);
1891
1891
  }
1892
- .modal .modal-content .modal-body h1,
1893
- .modal .modal-content .modal-body h2,
1894
- .modal .modal-content .modal-body h3,
1895
- .modal .modal-content .modal-body h4,
1896
- .modal .modal-content .modal-body h5,
1897
- .modal .modal-content .modal-body h6 {
1898
- margin-bottom: var(--pf-margin-4);
1899
- }
1900
- .modal .modal-content .modal-body p {
1901
- margin-bottom: var(--pf-margin-4);
1902
- }
1903
1892
  .modal .modal-content .modal-body hr {
1904
1893
  margin-top: var(--pf-margin-8);
1905
1894
  margin-bottom: var(--pf-margin-8);
package/lib/index.esm.js CHANGED
@@ -22333,10 +22333,10 @@ var libExports = lib.exports;
22333
22333
  var ReactModal = /*@__PURE__*/getDefaultExportFromCjs(libExports);
22334
22334
 
22335
22335
  const Modal = (_a) => {
22336
- var { className = '', children, isOpen, onRequestClose, portalClassName, overlayClassName, appElement, shouldCloseOnOverlayClick, shouldCloseOnEsc, testId, contentElement, overlayElement, position = 'center' } = _a, rest = __rest(_a, ["className", "children", "isOpen", "onRequestClose", "portalClassName", "overlayClassName", "appElement", "shouldCloseOnOverlayClick", "shouldCloseOnEsc", "testId", "contentElement", "overlayElement", "position"]);
22336
+ var { className = '', children, isOpen, onRequestClose, portalClassName, overlayClassName, appElement, shouldCloseOnOverlayClick, shouldCloseOnEsc, testId, contentElement, overlayElement, position = 'center', parentSelector } = _a, rest = __rest(_a, ["className", "children", "isOpen", "onRequestClose", "portalClassName", "overlayClassName", "appElement", "shouldCloseOnOverlayClick", "shouldCloseOnEsc", "testId", "contentElement", "overlayElement", "position", "parentSelector"]);
22337
22337
  const modalClasses = classNames('modal', `modal--${position}`, className);
22338
22338
  const overlayClasses = classNames('modal-overlay', overlayClassName);
22339
- return (jsx(ReactModal, Object.assign({ style: {}, className: modalClasses, overlayClassName: overlayClasses, testId: testId, isOpen: isOpen, onRequestClose: onRequestClose, portalClassName: portalClassName, appElement: appElement, shouldCloseOnOverlayClick: shouldCloseOnOverlayClick, shouldCloseOnEsc: shouldCloseOnEsc, contentElement: contentElement, overlayElement: overlayElement }, rest, { children: jsxs("div", { className: "modal-content", children: [jsx("div", { className: "modal-header", children: jsx(Row, { nogutter: true, children: jsx(Col, { xs: 12, className: "modal-close", children: jsx(Button$1, { className: "modal-close-button", onClick: onRequestClose, variant: "link", size: "md", iconLeft: "fa-xmark", ariaLabel: "Close" }) }) }) }), jsx("div", { className: "modal-body", children: children })] }) })));
22339
+ return (jsx(ReactModal, Object.assign({ style: {}, className: modalClasses, overlayClassName: overlayClasses, testId: testId, isOpen: isOpen, onRequestClose: onRequestClose, portalClassName: portalClassName, appElement: appElement, parentSelector: parentSelector, shouldCloseOnOverlayClick: shouldCloseOnOverlayClick, shouldCloseOnEsc: shouldCloseOnEsc, contentElement: contentElement, overlayElement: overlayElement }, rest, { children: jsxs("div", { className: "modal-content", children: [jsx("div", { className: "modal-header", children: jsx(Row, { nogutter: true, children: jsx(Col, { xs: 12, className: "modal-close", children: jsx(Button$1, { className: "modal-close-button", onClick: onRequestClose, variant: "link", size: "md", iconLeft: "fa-xmark", ariaLabel: "Close" }) }) }) }), jsx("div", { className: "modal-body", children: children })] }) })));
22340
22340
  };
22341
22341
 
22342
22342
  export { Badge, BarSpinner, Button$1 as Button, Card, Checkbox, CirclePulse, CircleSpinner, Col, Container, DatePicker, FloatUI, Form, Icon, IconTriggerDatePicker, LabeledInput as Input, Menu, Modal, LabeledPasswordInput as PasswordInput, Pill, Radio as RadioInput, Row, Select$1 as SelectInput, SingleInputDatePicker, Skeleton, Table, LabeledTextarea as Textarea, Toggle as ToggleInput, Tooltip, arrow$2 as arrow, autoPlacement, autoUpdate$1 as autoUpdate, computePosition$2 as computePosition, detectOverflow$1 as detectOverflow, flip$2 as flip, getOverflowAncestors$1 as getOverflowAncestors, hide$1 as hide, inline, limitShift, offset$2 as offset, platform$1 as platform, registerFontAwesomeIcons, shift$2 as shift, size, useFloating$1 as useFloating };