@indico-data/design-system 2.60.15 → 3.0.0
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/forms/date/inputDateRangePicker/InputDateRangePicker.d.ts +1 -1
- package/lib/components/index.d.ts +1 -1
- package/lib/components/modal/ConfirmationModal.d.ts +2 -0
- package/lib/components/modal/Modal.d.ts +1 -1
- package/lib/components/modal/Modal.stories.d.ts +2 -1
- package/lib/components/modal/index.d.ts +1 -0
- package/lib/components/modal/types.d.ts +15 -0
- package/lib/index.css +1827 -677
- package/lib/index.d.ts +19 -5
- package/lib/index.esm.css +1827 -677
- package/lib/index.esm.js +25 -6
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +25 -5
- package/lib/index.js.map +1 -1
- package/lib/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/badge/styles/Badge.scss +6 -6
- package/src/components/button/styles/Button.scss +7 -13
- package/src/components/button/styles/_variables.scss +47 -48
- package/src/components/card/styles/Card.scss +15 -6
- package/src/components/floatUI/styles/_variables.scss +3 -3
- package/src/components/forms/date/datePicker/styles/DatePicker.scss +15 -16
- package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.tsx +1 -1
- package/src/components/forms/form/styles/Form.scss +25 -25
- package/src/components/forms/select/__tests__/Select.test.tsx +11 -6
- package/src/components/forms/select/styles/Select.scss +9 -10
- package/src/components/index.ts +1 -1
- package/src/components/menu/styles/_variables.scss +8 -8
- package/src/components/modal/ConfirmationModal.mdx +69 -0
- package/src/components/modal/ConfirmationModal.tsx +103 -0
- package/src/components/modal/Modal.mdx +72 -42
- package/src/components/modal/Modal.stories.tsx +131 -40
- package/src/components/modal/Modal.tsx +20 -3
- package/src/components/modal/__tests__/Modal.test.tsx +12 -0
- package/src/components/modal/index.ts +1 -0
- package/src/components/modal/styles/Modal.scss +51 -20
- package/src/components/modal/types.ts +18 -0
- package/src/components/pill/Pill.stories.tsx +28 -14
- package/src/components/pill/Pill.tsx +7 -1
- package/src/components/pill/styles/Pill.scss +79 -55
- package/src/components/tanstackTable/styles/_variables.scss +23 -24
- package/src/components/tanstackTable/styles/table.scss +3 -3
- package/src/components/toast/Toast.mdx +32 -1
- package/src/components/toast/Toast.stories.tsx +32 -9
- package/src/components/toast/styles/Toast.scss +62 -12
- package/src/components/tooltip/Tooltip.tsx +6 -2
- package/src/components/tooltip/styles/Tooltip.scss +6 -2
- package/src/components/truncate/Truncate.tsx +1 -1
- package/src/index.ts +1 -1
- package/src/styles/_borders.scss +35 -4
- package/src/styles/_colors.scss +1 -1
- package/src/styles/globals.scss +107 -25
- package/src/styles/storybook.scss +23 -6
- package/src/styles/variables/_borders.scss +23 -7
- package/src/styles/variables/_padding.scss +0 -4
- package/src/styles/variables/themes/dark.scss +193 -133
- package/src/styles/variables/themes/light.scss +193 -133
- package/src/stylesAndAnimations/borders/BorderColor.tsx +87 -40
- package/src/stylesAndAnimations/colors/Swatch.tsx +0 -1
- package/src/stylesAndAnimations/colors/constants.ts +316 -193
- package/src/types.ts +5 -3
package/lib/index.js
CHANGED
|
@@ -19224,7 +19224,7 @@ function Menu(_a) {
|
|
|
19224
19224
|
}
|
|
19225
19225
|
|
|
19226
19226
|
const Pill = (_a) => {
|
|
19227
|
-
var { children, className, color = '
|
|
19227
|
+
var { children, className, color = 'neutral', size = 'sm' } = _a, rest = __rest(_a, ["children", "className", "color", "size"]);
|
|
19228
19228
|
const pillClasses = classNames('pill', className, {
|
|
19229
19229
|
[`pill--${color}`]: color,
|
|
19230
19230
|
[`pill--${size}`]: size,
|
|
@@ -21061,10 +21061,25 @@ var ReactModal = /*@__PURE__*/getDefaultExportFromCjs(libExports);
|
|
|
21061
21061
|
const Modal = (_a) => {
|
|
21062
21062
|
var { className = '', children, isOpen, onRequestClose, portalClassName, overlayClassName, appElement = document.getElementById('theme-root') ||
|
|
21063
21063
|
document.getElementById('root') ||
|
|
21064
|
-
document.body, shouldCloseOnOverlayClick, shouldCloseOnEsc, testId, contentElement, overlayElement, position = 'center', parentSelector
|
|
21064
|
+
document.body, shouldCloseOnOverlayClick, shouldCloseOnEsc, testId, contentElement, overlayElement, position = 'center', parentSelector = () => document.getElementById('theme-root') || document.getElementById('root'), // default for our apps, storybook needs a different one
|
|
21065
|
+
title, subtitle, footer, maxWidthInPixels } = _a, rest = __rest(_a, ["className", "children", "isOpen", "onRequestClose", "portalClassName", "overlayClassName", "appElement", "shouldCloseOnOverlayClick", "shouldCloseOnEsc", "testId", "contentElement", "overlayElement", "position", "parentSelector", "title", "subtitle", "footer", "maxWidthInPixels"]);
|
|
21065
21066
|
const modalClasses = classNames('modal', `modal--${position}`, className);
|
|
21066
21067
|
const overlayClasses = classNames('modal-overlay', overlayClassName);
|
|
21067
|
-
|
|
21068
|
+
const hasHeader = title || subtitle;
|
|
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
|
+
};
|
|
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, }) => {
|
|
21074
|
+
const modalFooter = footer ||
|
|
21075
|
+
defaultFooter({
|
|
21076
|
+
onCancelRequest,
|
|
21077
|
+
onConfirmRequest,
|
|
21078
|
+
confirmationButtonText,
|
|
21079
|
+
cancelButtonText,
|
|
21080
|
+
confirmationButtonVariant,
|
|
21081
|
+
});
|
|
21082
|
+
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] }));
|
|
21068
21083
|
};
|
|
21069
21084
|
|
|
21070
21085
|
/**
|
|
@@ -43041,7 +43056,11 @@ const h="react-tooltip-core-styles",w="react-tooltip-base-styles",b={core:!1,bas
|
|
|
43041
43056
|
|
|
43042
43057
|
const Tooltip = (_a) => {
|
|
43043
43058
|
var { id, clickToShow, delayShow, delayHide, children, zIndex = 1000, place = 'top' } = _a, rest = __rest(_a, ["id", "clickToShow", "delayShow", "delayHide", "children", "zIndex", "place"]);
|
|
43044
|
-
return (jsxRuntime.jsx(M, Object.assign({ border: "solid
|
|
43059
|
+
return (jsxRuntime.jsx(M, Object.assign({ border: "solid var(--pf-border-thin)var(--pf-border-color)", style: {
|
|
43060
|
+
backgroundColor: 'var(--pf-tooltip-background-color)',
|
|
43061
|
+
color: 'var(--pf-tooltip-font-color)',
|
|
43062
|
+
zIndex,
|
|
43063
|
+
}, id: id, place: place, openOnClick: clickToShow, delayShow: delayShow, delayHide: delayHide }, rest, { children: children })));
|
|
43045
43064
|
};
|
|
43046
43065
|
|
|
43047
43066
|
function BarSpinner(_a) {
|
|
@@ -43199,7 +43218,7 @@ const Truncate = (_a) => {
|
|
|
43199
43218
|
const truncateStyle = {
|
|
43200
43219
|
'--line-clamp': lineClamp,
|
|
43201
43220
|
};
|
|
43202
|
-
return (jsxRuntime.jsxs("div", { className: "truncate-wrapper", style: truncateStyle, children: [jsxRuntime.jsx("span", Object.assign({ "data-testid": `truncate-${id}-${isTruncated ? 'truncated' : 'not-truncated'}`, "data-tooltip-id": id, "data-tooltip-content": isTruncated ? truncateString : undefined, className: lineClamp > 0 ? 'truncate-clip' : 'truncate' }, rest, { children: truncateString })), isTruncated && truncateString && hasTooltip && (jsxRuntime.jsx(Tooltip, { "data-tooltip-delay-hide":
|
|
43221
|
+
return (jsxRuntime.jsxs("div", { className: "truncate-wrapper", style: truncateStyle, children: [jsxRuntime.jsx("span", Object.assign({ "data-testid": `truncate-${id}-${isTruncated ? 'truncated' : 'not-truncated'}`, "data-tooltip-id": id, "data-tooltip-content": isTruncated ? truncateString : undefined, className: lineClamp > 0 ? 'truncate-clip' : 'truncate' }, rest, { children: truncateString })), isTruncated && truncateString && hasTooltip && (jsxRuntime.jsx(Tooltip, { "data-tooltip-delay-hide": 0, id: id, children: truncateString }))] }));
|
|
43203
43222
|
};
|
|
43204
43223
|
|
|
43205
43224
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
@@ -43214,6 +43233,7 @@ exports.Card = Card;
|
|
|
43214
43233
|
exports.Checkbox = Checkbox;
|
|
43215
43234
|
exports.CirclePulse = CirclePulse;
|
|
43216
43235
|
exports.Col = Col;
|
|
43236
|
+
exports.ConfirmationModal = ConfirmationModal;
|
|
43217
43237
|
exports.Container = Container;
|
|
43218
43238
|
exports.DatePicker = DatePicker;
|
|
43219
43239
|
exports.FloatUI = FloatUI;
|