@indico-data/design-system 3.0.0 → 3.0.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.
- package/lib/components/modal/ConfirmationModal.d.ts +1 -1
- package/lib/components/modal/Modal.stories.d.ts +1 -0
- package/lib/components/modal/types.d.ts +5 -2
- package/lib/index.css +91 -75
- package/lib/index.d.ts +6 -3
- package/lib/index.esm.css +91 -75
- package/lib/index.esm.js +8 -4
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +8 -4
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/floatUI/styles/FloatUI.scss +1 -0
- package/src/components/modal/ConfirmationModal.tsx +31 -2
- package/src/components/modal/Modal.stories.tsx +69 -0
- package/src/components/modal/types.ts +7 -3
- package/src/components/pagination/Pagination.tsx +1 -1
- package/src/components/pagination/__tests__/Pagination.test.tsx +5 -0
- package/src/components/pill/styles/Pill.scss +33 -33
- package/src/components/tanstackTable/styles/table.scss +0 -18
- package/src/components/tooltip/Tooltip.tsx +0 -1
- package/src/styles/globals.scss +1 -1
- package/src/styles/variables/themes/dark.scss +28 -13
- package/src/styles/variables/themes/light.scss +28 -14
package/lib/index.js
CHANGED
|
@@ -5542,7 +5542,7 @@ const Pagination = (_a) => {
|
|
|
5542
5542
|
const hasError = Number(inputValue) > totalPages || Number(inputValue) < 1;
|
|
5543
5543
|
return (jsxRuntime.jsx("div", Object.assign({ className: classes }, rest, { children: jsxRuntime.jsx(Container, { children: jsxRuntime.jsxs(Row, { gutterWidth: 12, align: "center", children: [jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("div", { className: "pagination__previous", children: jsxRuntime.jsx(Button$1, { "data-testid": "pagination-previous-button", ariaLabel: "Previous Page", variant: "link", onClick: handlePreviousPage, iconLeft: "chevron-left", isDisabled: isPreviousButtonDisabled }) }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("div", { className: "pagination__current-page", children: jsxRuntime.jsx(LabeledInput, { "data-testid": "pagination-current-page-input", className: classNames('pagination__current-page-input', {
|
|
5544
5544
|
'has-error': hasError,
|
|
5545
|
-
}), value: inputValue, name: "currentPage", label: "Current Page", hasHiddenLabel: true, onKeyDown: (e) => {
|
|
5545
|
+
}), value: totalPages === 0 ? '0' : inputValue, name: "currentPage", label: "Current Page", hasHiddenLabel: true, onKeyDown: (e) => {
|
|
5546
5546
|
if (e.key === 'Enter') {
|
|
5547
5547
|
validateAndUpdatePage(e.currentTarget.value);
|
|
5548
5548
|
}
|
|
@@ -21069,8 +21069,9 @@ const Modal = (_a) => {
|
|
|
21069
21069
|
return (jsxRuntime.jsx(ReactModal, Object.assign({ 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: jsxRuntime.jsxs("div", { className: "modal-content", style: { maxWidth: `${maxWidthInPixels}px` }, children: [jsxRuntime.jsx(Button$1, { className: "modal-close-button", onClick: onRequestClose, variant: "link", size: "md", iconLeft: "x-close", ariaLabel: "Close" }), hasHeader && (jsxRuntime.jsx("div", { className: "modal-header", children: jsxRuntime.jsx(Row, { justify: "between", align: "center", children: jsxRuntime.jsxs(Col, { children: [title && jsxRuntime.jsx("h2", { className: "modal-title", children: title }), subtitle && jsxRuntime.jsx("p", { className: "modal-subtitle", children: subtitle })] }) }) })), jsxRuntime.jsx("div", { className: "modal-body", children: children }), footer && jsxRuntime.jsx("div", { className: "modal-footer", children: footer })] }) })));
|
|
21070
21070
|
};
|
|
21071
21071
|
|
|
21072
|
-
const defaultFooter = ({ onCancelRequest, onConfirmRequest, confirmationButtonText, confirmationButtonVariant, cancelButtonText, }) => (jsxRuntime.jsxs(Row, { gutterWidth: 12, justify: "end", align: "center", children: [jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx(Button$1, { onClick: onCancelRequest, ariaLabel: cancelButtonText || 'Cancel', variant: "outline", children: cancelButtonText }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx(Button$1, { onClick: onConfirmRequest, ariaLabel: confirmationButtonText || 'Confirm', variant: confirmationButtonVariant, children: confirmationButtonText }) })] }));
|
|
21073
|
-
const ConfirmationModal = ({ className, overlayClassName, testId, isOpen, onRequestClose, portalClassName, appElement, parentSelector, shouldCloseOnOverlayClick, shouldCloseOnEsc, contentElement, overlayElement, footer, children, onConfirmRequest, onCancelRequest, confirmationButtonText = 'Confirm', cancelButtonText = 'Cancel', confirmationButtonVariant = 'solid', icon, title, status = 'info', maxWidthInPixels, }) => {
|
|
21072
|
+
const defaultFooter = ({ onCancelRequest, onConfirmRequest, confirmationButtonText, confirmationButtonVariant, cancelButtonText, hasDontShowAgainCheckbox, isChecked, onDontShowAgainChange, }) => (jsxRuntime.jsxs(Row, { gutterWidth: 12, justify: "end", align: "center", children: [hasDontShowAgainCheckbox && (jsxRuntime.jsx(Col, { children: jsxRuntime.jsx(Checkbox, { label: "Don't display this again.", onChange: (e) => onDontShowAgainChange === null || onDontShowAgainChange === void 0 ? void 0 : onDontShowAgainChange(e.target.checked), isChecked: isChecked, id: "dont-show-again", name: "dont-show-again" }) })), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx(Button$1, { onClick: onCancelRequest, ariaLabel: cancelButtonText || 'Cancel', variant: "outline", children: cancelButtonText }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx(Button$1, { onClick: () => onConfirmRequest === null || onConfirmRequest === void 0 ? void 0 : onConfirmRequest({ dontShowAgain: isChecked }), ariaLabel: confirmationButtonText || 'Confirm', variant: confirmationButtonVariant, children: confirmationButtonText }) })] }));
|
|
21073
|
+
const ConfirmationModal = ({ className, overlayClassName, testId, isOpen, onRequestClose, portalClassName, appElement, parentSelector, shouldCloseOnOverlayClick, shouldCloseOnEsc, contentElement, overlayElement, footer, children, onConfirmRequest, onCancelRequest, confirmationButtonText = 'Confirm', cancelButtonText = 'Cancel', confirmationButtonVariant = 'solid', icon, title, status = 'info', maxWidthInPixels, hasDontShowAgainCheckbox, }) => {
|
|
21074
|
+
const [dontShowAgain, setDontShowAgain] = React.useState(false);
|
|
21074
21075
|
const modalFooter = footer ||
|
|
21075
21076
|
defaultFooter({
|
|
21076
21077
|
onCancelRequest,
|
|
@@ -21078,6 +21079,9 @@ const ConfirmationModal = ({ className, overlayClassName, testId, isOpen, onRequ
|
|
|
21078
21079
|
confirmationButtonText,
|
|
21079
21080
|
cancelButtonText,
|
|
21080
21081
|
confirmationButtonVariant,
|
|
21082
|
+
hasDontShowAgainCheckbox,
|
|
21083
|
+
isChecked: dontShowAgain,
|
|
21084
|
+
onDontShowAgainChange: setDontShowAgain,
|
|
21081
21085
|
});
|
|
21082
21086
|
return (jsxRuntime.jsxs(Modal, { className: classNames('confirmation-modal', className), overlayClassName: overlayClassName, testId: testId, isOpen: isOpen, onRequestClose: onRequestClose, portalClassName: portalClassName, appElement: appElement, parentSelector: parentSelector, shouldCloseOnOverlayClick: shouldCloseOnOverlayClick, shouldCloseOnEsc: shouldCloseOnEsc, contentElement: contentElement, overlayElement: overlayElement, footer: modalFooter, maxWidthInPixels: maxWidthInPixels, children: [icon && (jsxRuntime.jsx(Icon, { name: icon, className: classNames('confirmation-modal-icon', `color-${status}`), size: "xl" })), title && jsxRuntime.jsx("h2", { className: "confirmation-modal-title", children: title }), children] }));
|
|
21083
21087
|
};
|
|
@@ -43056,7 +43060,7 @@ const h="react-tooltip-core-styles",w="react-tooltip-base-styles",b={core:!1,bas
|
|
|
43056
43060
|
|
|
43057
43061
|
const Tooltip = (_a) => {
|
|
43058
43062
|
var { id, clickToShow, delayShow, delayHide, children, zIndex = 1000, place = 'top' } = _a, rest = __rest(_a, ["id", "clickToShow", "delayShow", "delayHide", "children", "zIndex", "place"]);
|
|
43059
|
-
return (jsxRuntime.jsx(M, Object.assign({
|
|
43063
|
+
return (jsxRuntime.jsx(M, Object.assign({ style: {
|
|
43060
43064
|
backgroundColor: 'var(--pf-tooltip-background-color)',
|
|
43061
43065
|
color: 'var(--pf-tooltip-font-color)',
|
|
43062
43066
|
zIndex,
|