@linzjs/lui 21.36.0 → 21.38.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/CHANGELOG.md +15 -0
- package/dist/components/LuiColourPicker/ColorInput.d.ts +9 -0
- package/dist/components/LuiColourPicker/ColorPalette.d.ts +14 -0
- package/dist/components/LuiColourPicker/ColourPaletteConstants.d.ts +8 -0
- package/dist/components/LuiModal/LuiAlertModalV2.d.ts +7 -0
- package/dist/components/LuiModal/LuiModal.d.ts +12 -0
- package/dist/components/LuiModal/LuiModalV2.d.ts +34 -0
- package/dist/components/common/Hooks.d.ts +1 -1
- package/dist/hooks/useClickedOutsideElement.d.ts +2 -2
- package/dist/index.d.ts +4 -0
- package/dist/index.js +224 -78
- package/dist/index.js.map +1 -1
- package/dist/lui.css +95 -0
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +220 -79
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/Modal/modal-v2.scss +121 -0
- package/dist/scss/base.scss +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25684,8 +25684,8 @@ function styleInject(css, ref) {
|
|
|
25684
25684
|
}
|
|
25685
25685
|
}
|
|
25686
25686
|
|
|
25687
|
-
var css_248z$
|
|
25688
|
-
styleInject(css_248z$
|
|
25687
|
+
var css_248z$m = ".LuiFloatingWindow-buttons {\n display: flex;\n align-items: center;\n}\n\n.LuiFloatingWindow-extra-buttons-divider {\n margin-right: 4px;\n margin-left: 8px;\n margin-top: -6px;\n font-size: x-large;\n opacity: 0.7;\n}\n\n.FloatingWindow-window {\n box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.1490196078), 0px 6px 10px 0px rgba(0, 0, 0, 0.2509803922);\n position: absolute;\n background-color: #ffffff;\n top: 10%;\n left: 5%;\n display: flex;\n flex-direction: column;\n border-radius: 9px;\n}\n\n.FloatingWindow-container {\n display: flex;\n height: calc(100% - 50px);\n width: 100%;\n overflow: auto;\n}\n\n.FloatingWindow-header-element {\n flex: 0;\n}\n\n.FloatingWindow-header {\n height: 48px;\n line-height: 48px;\n color: #2a292c;\n padding: 0 8px;\n display: flex;\n overflow: hidden;\n justify-content: space-between;\n border-bottom: 2px #eaeaea solid;\n font-size: 1em;\n font-weight: 600;\n}\n\n.FloatingWindow-header-title-text {\n font-size: 1em;\n font-weight: 600;\n overflow: hidden;\n}\n\n.FloatingWindow-buttons {\n display: flex;\n align-items: center;\n}\n\n.FloatingWindow-extra-buttons-divider {\n margin-right: 4px;\n margin-left: 8px;\n margin-top: -6px;\n font-size: x-large;\n opacity: 0.7;\n}\n\n.FloatingWindowHeaderButton-button {\n padding: 0 0 0 8px;\n border: none;\n outline: none;\n border-radius: 50%;\n background-color: transparent;\n color: #6b6966;\n display: flex;\n}\n\n.FloatingWindowHeaderButton-icon {\n fill: #6b6966;\n}\n\n.floating-window-icon {\n display: inline-block;\n height: 24px;\n max-height: 24px;\n max-width: 24px;\n width: 24px;\n fill: #6b6966;\n}";
|
|
25688
|
+
styleInject(css_248z$m);
|
|
25689
25689
|
|
|
25690
25690
|
/**
|
|
25691
25691
|
* Overwrite the common buttons for floating window to
|
|
@@ -27880,8 +27880,8 @@ ReactSplitGrid.defaultProps = {
|
|
|
27880
27880
|
onDrag: undefined,
|
|
27881
27881
|
};
|
|
27882
27882
|
|
|
27883
|
-
var css_248z$
|
|
27884
|
-
styleInject(css_248z$
|
|
27883
|
+
var css_248z$l = ".LuiResizableLayout-leftPanel {\n display: flex;\n flex-direction: column;\n /* this overflow and the one below (LuiResizableLayout-leftPanelBody) are need to make only\n the search result div scroll (instead of the whole page) */\n overflow: auto;\n}\n\n.LuiResizableLayout-rightPanel {\n display: flex;\n flex-direction: column;\n /* this overflow and the one below (LuiResizableLayout-leftPanelBody) are need to make only\n the search result div scroll (instead of the whole page) */\n overflow: auto;\n}\n\n.LuiResizableLayout-leftPanelBody {\n overflow-y: auto;\n}\n\n.LuiResizableLayout-gutterParentControl {\n display: flex;\n /* use visibility and opacity instead of display: none as we want to be able to fade in on hover */\n visibility: hidden;\n opacity: 0;\n position: fixed;\n top: 50%;\n z-index: 500;\n margin-left: -30px; /*half total control width, minus half the gutter width*/\n transition: 0.3s all 2s ease-in;\n}\n\n.LuiResizableLayout-gutterControlLeft, .LuiResizableLayout-gutterControlRight {\n background-color: #eaeaea;\n width: 32px;\n height: 80px;\n text-align: center;\n display: flex;\n align-items: center;\n}\n\n.LuiResizableLayout-gutterControlLeft {\n border-radius: 3px 0 0 3px;\n}\n\n.LuiResizableLayout-gutterControlRight {\n border-radius: 0 3px 3px 0;\n}\n\n.LuiResizableLayout-gutterControlLeft > .LuiIcon, .LuiResizableLayout-gutterControlRight > .LuiIcon {\n height: auto;\n}\n\n.LuiResizableLayout-gutterControlLeft:hover, .LuiResizableLayout-gutterControlRight:hover {\n background-color: #73c8e1;\n cursor: pointer;\n}\n\n.LuiResizableLayout-gutterControl-collapsed {\n visibility: hidden;\n}\n\n/* TODO: move the expand gutter button so it doesn't show over the scroll bar */\n.LuiResizableLayout-gutterParentControlVisible {\n visibility: visible;\n opacity: 1;\n}\n\n.LuiResizableLayout-grid {\n display: grid;\n height: 100%;\n}\n\n.LuiResizableLayout-gutterCol {\n grid-row: 1/-1;\n cursor: col-resize;\n width: 16px;\n z-index: 1;\n}\n\n.LuiResizableLayout-gutterCol-collapsed {\n width: 4px;\n}\n\n.LuiResizableLayout-gutterCol1 {\n grid-column: 2;\n}\n\n.LuiResizableLayout-gutterCol:hover > .LuiResizableLayout-gutterParentControl {\n visibility: visible;\n opacity: 1;\n transition: 0s all 0s ease-in;\n}\n\n.LuiResizableLayout-gutterSlider {\n width: 4px;\n height: 100%;\n background-color: #eaeaea;\n pointer-events: none;\n}\n\n.LuiResizableLayout-gutterCol:hover .LuiResizableLayout-gutterSlider, .LuiResizableLayout-gutterCol:active .LuiResizableLayout-gutterSlider {\n background-color: #73c8e1;\n}";
|
|
27884
|
+
styleInject(css_248z$l);
|
|
27885
27885
|
|
|
27886
27886
|
var GutterComponent = function (props) {
|
|
27887
27887
|
var leftIcon = (React__default["default"].createElement(LuiIcon, { name: "ic_double_arrow_left", alt: "", status: "interactive" }));
|
|
@@ -31640,8 +31640,8 @@ var LuiTabsPanelSwitch = function (props) {
|
|
|
31640
31640
|
} }, tabProps), children));
|
|
31641
31641
|
};
|
|
31642
31642
|
|
|
31643
|
-
var css_248z$
|
|
31644
|
-
styleInject(css_248z$
|
|
31643
|
+
var css_248z$k = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.LuiError {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: 600;\n margin-bottom: 0.5rem;\n font-size: 0.875rem;\n line-height: 1.5rem;\n color: #2a292c;\n}\n.LuiError-errorIcon {\n vertical-align: middle;\n display: inline-block;\n}\n.LuiError-errorText {\n margin-left: 0.5rem;\n}";
|
|
31644
|
+
styleInject(css_248z$k);
|
|
31645
31645
|
|
|
31646
31646
|
var LuiError = function (_a) {
|
|
31647
31647
|
var error = _a.error, className = _a.className;
|
|
@@ -32003,8 +32003,8 @@ var LuiDateInput = React__default["default"].forwardRef(function (_a, ref) {
|
|
|
32003
32003
|
return React__default["default"].createElement(LuiTextInput, __assign({}, mapped, { ref: ref }));
|
|
32004
32004
|
});
|
|
32005
32005
|
|
|
32006
|
-
var css_248z$
|
|
32007
|
-
styleInject(css_248z$
|
|
32006
|
+
var css_248z$j = ".LuiTextInput.money input {\n background-image: url(\"data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'> <text x='4' y='31' font-size='15' font-family='Open Sans, system-ui, sans-seri' text-anchor='middle'>$</text> </svg>\");\n background-position: 10px center;\n background-repeat: no-repeat;\n padding-left: 22px;\n line-height: unset;\n}";
|
|
32007
|
+
styleInject(css_248z$j);
|
|
32008
32008
|
|
|
32009
32009
|
var MoneyParser = /** @class */ (function () {
|
|
32010
32010
|
function MoneyParser(init, options) {
|
|
@@ -39656,9 +39656,9 @@ var StateManagedSelect = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
|
39656
39656
|
|
|
39657
39657
|
var Select = StateManagedSelect;
|
|
39658
39658
|
|
|
39659
|
-
var css_248z$
|
|
39659
|
+
var css_248z$i = "";
|
|
39660
39660
|
var colors = {"charcoal":"#2a292c","fuscous":"#6b6966","gray":"#989189","silver":"#beb9b4","lily":"#eaeaea","dew":"#DAD7D6","hint":"#f9f9f9","snow":"#ffffff","white":"#ffffff","teal":"#00425d","sea":"#007198","electric":"#0096cc","spray":"#73c8e1","polar":"#e2f3f7","memesia":"#1F69C3","sherpa":"#004b50","surfie":"#017a76","persian":"#00a599","downy":"#73cdc8","iceberg":"#dcf5f0","sacramento":"#004e32","salem":"#08814d","pigment":"#0aa245","granny":"#9bd79b","panache":"#e9fae7","brand-primary":"#004b50","brand-secondary":"#017a76","engine":"#cc0000","carrot":"#EA6A2E","kendall":"#F5CCCC","elizabeth":"#FBDED0","andrea":"#3A7CDF","celestial":"#D7E5F9","golf":"#0AA345","error":"#cc0000","error-bg":"#F5CCCC","error-focus":"#5a0000","warning":"#EA6A2E","warning-bg":"#fbdfd2","warning-focus":"#b33a01","success":"#0aa245","success-bg":"#e9fae7","info":"#3A7CDF","info-bg":"#d8e5f9","visited":"#00425d","green-hover":"#107c3a","green-active":"#094a22","green-btn":"#0aa245","txt-link":"#1F69C3","primary-hover-btn":"#005678","selection":"#c7e9f3","heading-color":"#017a76","heading-color--secondary":"#2a292c","base-type-color":"#2a292c","input-text":"#2a292c","input-placeholder":"#6b6966","input-placeholder-when-disabled":"#989189","base-icon-color":"#007198","disabled-color":"#989189","disabled-color-dark":"#6b6966","linz-color-primary":"#023d48","linz-color-primary-hover":"#01818a","linz-color-tertiary":"#e1e44a","linz-color-tertiary-hover":"#cdcf59","color-test-pink":"#f09","linz-linear-gradient-blue":"linear-gradient(70deg, #00425d 12%, #007198 100%)","linz-linear-gradient-teal":"linear-gradient(270deg, #00a599 1%, #73cdc8 100%)"};
|
|
39661
|
-
styleInject(css_248z$
|
|
39661
|
+
styleInject(css_248z$i);
|
|
39662
39662
|
|
|
39663
39663
|
var _excluded = ["allowCreateWhileLoading", "createOptionPosition", "formatCreateLabel", "isValidNewOption", "getNewOptionData", "onCreateOption", "options", "onChange"];
|
|
39664
39664
|
|
|
@@ -39830,17 +39830,12 @@ var motif = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0id
|
|
|
39830
39830
|
*
|
|
39831
39831
|
* @param onEscape the handler function
|
|
39832
39832
|
*/
|
|
39833
|
-
var useEscapeFunction = function (onEscape) {
|
|
39834
|
-
|
|
39835
|
-
|
|
39836
|
-
onEscape();
|
|
39837
|
-
}
|
|
39838
|
-
}, [onEscape]);
|
|
39833
|
+
var useEscapeFunction = function (onEscape, trigger) {
|
|
39834
|
+
if (trigger === void 0) { trigger = 'keydown'; }
|
|
39835
|
+
var escFunction = React.useCallback(function (event) { return event.key === 'Escape' && onEscape(event); }, [onEscape]);
|
|
39839
39836
|
React.useEffect(function () {
|
|
39840
|
-
document.addEventListener(
|
|
39841
|
-
return function () {
|
|
39842
|
-
document.removeEventListener('keydown', escFunction, false);
|
|
39843
|
-
};
|
|
39837
|
+
document.addEventListener(trigger, escFunction);
|
|
39838
|
+
return function () { return document.removeEventListener(trigger, escFunction); };
|
|
39844
39839
|
}, [escFunction]);
|
|
39845
39840
|
};
|
|
39846
39841
|
/**
|
|
@@ -42123,6 +42118,9 @@ var FeatureIFrame = function (_a) {
|
|
|
42123
42118
|
React__default["default"].createElement("iframe", __assign({ width: iframeConfig.width, height: iframeConfig.height, src: iframeConfig.url, title: iframeConfig.title }, iFrameProps))));
|
|
42124
42119
|
};
|
|
42125
42120
|
|
|
42121
|
+
/**
|
|
42122
|
+
* @deprecated this is replaced by `LuiModalV2`. [Migration notes](https://github.com/linz/Lui/pull/1127).
|
|
42123
|
+
*/
|
|
42126
42124
|
var LuiModal = function (props) {
|
|
42127
42125
|
var _a;
|
|
42128
42126
|
var node = React.useRef(null);
|
|
@@ -42178,6 +42176,9 @@ var LuiModal = function (props) {
|
|
|
42178
42176
|
}
|
|
42179
42177
|
} }, props.children))));
|
|
42180
42178
|
};
|
|
42179
|
+
/**
|
|
42180
|
+
* @deprecated this is replaced by `LuiAlertModalV2`. [Migration notes](https://github.com/linz/Lui/pull/1127).
|
|
42181
|
+
*/
|
|
42181
42182
|
var LuiAlertModal = function (props) {
|
|
42182
42183
|
var materialIcon = getMaterialIconForLevel(props.level);
|
|
42183
42184
|
var level = props.level, className = props.className, children = props.children, rest = __rest(props, ["level", "className", "children"]);
|
|
@@ -42185,9 +42186,15 @@ var LuiAlertModal = function (props) {
|
|
|
42185
42186
|
React__default["default"].createElement(LuiIcon, { name: "ic_".concat(materialIcon), alt: "".concat(level, " status icon"), size: "lg", className: "lui-msg-status-icon" }),
|
|
42186
42187
|
children));
|
|
42187
42188
|
};
|
|
42189
|
+
/**
|
|
42190
|
+
* @deprecated this is replaced by `LuiModalV2.Buttons`. [Migration notes](https://github.com/linz/Lui/pull/1127).
|
|
42191
|
+
*/
|
|
42188
42192
|
var LuiAlertModalButtons = function (props) {
|
|
42189
42193
|
return React__default["default"].createElement("div", { className: "modal-btn-row" }, props.children);
|
|
42190
42194
|
};
|
|
42195
|
+
/**
|
|
42196
|
+
* @deprecated this is deprecated alongside `LuiModal`. [Migration notes](https://github.com/linz/Lui/pull/1127).
|
|
42197
|
+
*/
|
|
42191
42198
|
var LuiModalHeader = function (props) {
|
|
42192
42199
|
var _a;
|
|
42193
42200
|
var headerStyle = (_a = props.style) !== null && _a !== void 0 ? _a : 'default';
|
|
@@ -42202,8 +42209,122 @@ var LuiModalHeader = function (props) {
|
|
|
42202
42209
|
React__default["default"].createElement(LuiIcon, { name: "ic_clear", alt: "Help", size: "lg" }))))))));
|
|
42203
42210
|
};
|
|
42204
42211
|
|
|
42205
|
-
|
|
42206
|
-
|
|
42212
|
+
/**
|
|
42213
|
+
* This hook will callback with handleClickOutside() when "mousedown" dom event occurs off the refElement
|
|
42214
|
+
* usage:
|
|
42215
|
+
```typescript
|
|
42216
|
+
const refElement = React.useRef<HTMLButtonElement>(null);
|
|
42217
|
+
const handleClickOutside = () => {
|
|
42218
|
+
console.log("hello world");
|
|
42219
|
+
};
|
|
42220
|
+
useClickedOutsideElement(refElement, handleClickOutside);
|
|
42221
|
+
return <button ref={refElement}>Click Me!</button>;
|
|
42222
|
+
```
|
|
42223
|
+
*/
|
|
42224
|
+
function useClickedOutsideElement(refElement, handleClickOutside) {
|
|
42225
|
+
React__default["default"].useEffect(function () {
|
|
42226
|
+
function onOutsideClicked(event) {
|
|
42227
|
+
var element = refElement.current;
|
|
42228
|
+
if (!(element === null || element === void 0 ? void 0 : element.contains(event.target))) {
|
|
42229
|
+
handleClickOutside();
|
|
42230
|
+
}
|
|
42231
|
+
}
|
|
42232
|
+
document.addEventListener('mousedown', onOutsideClicked);
|
|
42233
|
+
return function () {
|
|
42234
|
+
document.removeEventListener('mousedown', onOutsideClicked);
|
|
42235
|
+
};
|
|
42236
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
42237
|
+
}, []);
|
|
42238
|
+
}
|
|
42239
|
+
|
|
42240
|
+
var _a;
|
|
42241
|
+
/** Implements the [updated modal design system](https://www.figma.com/design/E7g3n5ziI7bR8MisISayia/FigLUI?node-id=9924-54717&t=q2r6Gct1cKGP9Q5B-0), keeping the same api as `LuiModal` as much as possible. */
|
|
42242
|
+
var LuiModalV2 = function (props) {
|
|
42243
|
+
var _a;
|
|
42244
|
+
var modalRef = React.useRef(null);
|
|
42245
|
+
var handleClickOutside = React.useCallback(function () { var _a; return props.shouldCloseOnOverlayClick && ((_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props)); }, [props.shouldCloseOnEsc, props.onClose]);
|
|
42246
|
+
useClickedOutsideElement(modalRef, handleClickOutside);
|
|
42247
|
+
var handleEsc = React.useCallback(function (e) {
|
|
42248
|
+
var _a;
|
|
42249
|
+
if (props.shouldCloseOnEsc !== false) {
|
|
42250
|
+
e.stopPropagation();
|
|
42251
|
+
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
42252
|
+
}
|
|
42253
|
+
}, [props.shouldCloseOnEsc, props.onClose]);
|
|
42254
|
+
useEscapeFunction(handleEsc, props.shouldCloseOnEsc === 'use-keyup' ? 'keyup' : 'keydown');
|
|
42255
|
+
var handleAutoFocus = function (el) {
|
|
42256
|
+
if (props.preventAutoFocus)
|
|
42257
|
+
return;
|
|
42258
|
+
if (el && !el.contains(el.ownerDocument.activeElement)) {
|
|
42259
|
+
var firstFocusableElement = el.querySelector('input,button');
|
|
42260
|
+
firstFocusableElement === null || firstFocusableElement === void 0 ? void 0 : firstFocusableElement.focus();
|
|
42261
|
+
}
|
|
42262
|
+
};
|
|
42263
|
+
var showCloseButton = Boolean(props.showCloseButton && props.onClose);
|
|
42264
|
+
var showHelpButton = Boolean(props.helpLink);
|
|
42265
|
+
var showButtons = showCloseButton || showHelpButton;
|
|
42266
|
+
var showHeadingIcon = props.headingIcon && !props.isLoading;
|
|
42267
|
+
return (React__default["default"].createElement(Modal, { key: props.key, isOpen: true,
|
|
42268
|
+
// disble the `shouldClose` props as we handle them ourselves
|
|
42269
|
+
shouldCloseOnOverlayClick: false, shouldCloseOnEsc: false, overlayClassName: "modal", className: props.lowContrast ? 'lui-scrim-low-contrast' : 'lui-scrim',
|
|
42270
|
+
// required to prevent warnings that are not applicable in real usage
|
|
42271
|
+
ariaHideApp: !isTest, parentSelector: props.appendToElement },
|
|
42272
|
+
React__default["default"].createElement("div", { ref: function (el) {
|
|
42273
|
+
modalRef.current = el;
|
|
42274
|
+
handleAutoFocus(el);
|
|
42275
|
+
}, className: clsx('lui-modal-v2 lui-box-shadow', props.maxWidth && 'lui-max-width', props.className) },
|
|
42276
|
+
React__default["default"].createElement("div", { className: "lui-modal-v2-header" },
|
|
42277
|
+
props.isLoading && (React__default["default"].createElement(LuiMiniSpinner, { size: 20, divProps: { className: 'lui-modal-v2-header-spinner' } })),
|
|
42278
|
+
showHeadingIcon && (React__default["default"].createElement("div", { className: "lui-modal-v2-header-icon" },
|
|
42279
|
+
React__default["default"].createElement(LuiIcon, __assign({ size: "md", name: "", alt: "Help" }, props.headingIcon, { className: clsx('', (_a = props.headingIcon) === null || _a === void 0 ? void 0 : _a.className) })))),
|
|
42280
|
+
props.headingText && (React__default["default"].createElement("h2", { className: "lui-modal-v2-header-title" }, props.headingText)),
|
|
42281
|
+
showButtons && (React__default["default"].createElement("div", { className: "lui-modal-v2-header-buttons" },
|
|
42282
|
+
showHelpButton && React__default["default"].createElement(HelpButton, { helpLink: props.helpLink }),
|
|
42283
|
+
showCloseButton && React__default["default"].createElement(CloseButton, { onClose: props.onClose })))),
|
|
42284
|
+
React__default["default"].createElement("div", { className: "lui-modal-v2-contents" }, props.children))));
|
|
42285
|
+
};
|
|
42286
|
+
var ButtonRow = function (props) { return (React__default["default"].createElement("div", { className: clsx('lui-modal-v2-btn-row', props.className) }, props.children)); };
|
|
42287
|
+
LuiModalV2.Buttons = ButtonRow;
|
|
42288
|
+
var HelpButton = function (props) { return (React__default["default"].createElement("button", { "aria-label": "Modal Help", title: "Help", className: "lui-modal-v2-header-help-btn", onClick: typeof props.helpLink === 'string'
|
|
42289
|
+
? function () { return window.open(props.helpLink, '_blank'); }
|
|
42290
|
+
: props.helpLink },
|
|
42291
|
+
React__default["default"].createElement(LuiIcon, { name: "ic_help_outline", alt: "Help", size: "md" }))); };
|
|
42292
|
+
var CloseButton = function (props) { return (React__default["default"].createElement("button", { "aria-label": "Modal Close", title: "Close", className: "lui-modal-v2-header-close-btn", onClick: props.onClose },
|
|
42293
|
+
React__default["default"].createElement(LuiIcon, { name: "ic_clear", alt: "Help", size: "md" }))); };
|
|
42294
|
+
/** Allows injecting the modal header text. Useful when you can't use the `headingText` prop directly, or when you need to render styled content. */
|
|
42295
|
+
var HeaderTitle = function (props) {
|
|
42296
|
+
var _a = React.useState(), target = _a[0], setTarget = _a[1];
|
|
42297
|
+
// on mount, find the parent modal and set it as the target
|
|
42298
|
+
if (!target)
|
|
42299
|
+
return (React__default["default"].createElement("div", { style: { display: 'none' }, ref: function (el) {
|
|
42300
|
+
var modal = el === null || el === void 0 ? void 0 : el.closest(".lui-modal-v2");
|
|
42301
|
+
var modalHeader = modal === null || modal === void 0 ? void 0 : modal.querySelector(':scope > .lui-modal-v2-header');
|
|
42302
|
+
modalHeader && setTarget(modalHeader);
|
|
42303
|
+
} }));
|
|
42304
|
+
return ReactDOM.createPortal(React__default["default"].createElement("h2", { className: clsx('lui-modal-v2-header-title lui-modal-v2-header-title-portal', props.className) }, props.children), target);
|
|
42305
|
+
};
|
|
42306
|
+
LuiModalV2.HeaderTitle = HeaderTitle;
|
|
42307
|
+
// this is here for the tests
|
|
42308
|
+
var isTest = typeof process !== 'undefined' && ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) === 'test';
|
|
42309
|
+
if (!isTest)
|
|
42310
|
+
Modal.setAppElement('#root');
|
|
42311
|
+
|
|
42312
|
+
var LuiAlertModalV2 = function (props) {
|
|
42313
|
+
var level = props.level, className = props.className, children = props.children, rest = __rest(props, ["level", "className", "children"]);
|
|
42314
|
+
var materialIcon = getMaterialIconForLevel(level);
|
|
42315
|
+
var status = Object.keys(ICON_STATUS).includes(level)
|
|
42316
|
+
? level
|
|
42317
|
+
: 'interactive';
|
|
42318
|
+
return (React__default["default"].createElement(LuiModalV2, __assign({}, rest, { className: clsx("lui-modal-v2-alert lui-modal-v2-".concat(level), className), headingIcon: {
|
|
42319
|
+
name: "ic_".concat(materialIcon),
|
|
42320
|
+
alt: "".concat(level, " status icon"),
|
|
42321
|
+
size: 'md',
|
|
42322
|
+
status: status
|
|
42323
|
+
} }), children));
|
|
42324
|
+
};
|
|
42325
|
+
|
|
42326
|
+
var css_248z$h = "@keyframes react-loading-skeleton {\n 100% {\n transform: translateX(100%);\n }\n}\n\n.react-loading-skeleton {\n --base-color: #ebebeb;\n --highlight-color: #f5f5f5;\n --animation-duration: 1.5s;\n --animation-direction: normal;\n --pseudo-element-display: block; /* Enable animation */\n\n background-color: var(--base-color);\n\n width: 100%;\n border-radius: 0.25rem;\n display: inline-flex;\n line-height: 1;\n\n position: relative;\n user-select: none;\n overflow: hidden;\n z-index: 1; /* Necessary for overflow: hidden to work correctly in Safari */\n}\n\n.react-loading-skeleton::after {\n content: ' ';\n display: var(--pseudo-element-display);\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n background-repeat: no-repeat;\n background-image: linear-gradient(\n 90deg,\n var(--base-color),\n var(--highlight-color),\n var(--base-color)\n );\n transform: translateX(-100%);\n\n animation-name: react-loading-skeleton;\n animation-direction: var(--animation-direction);\n animation-duration: var(--animation-duration);\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n}\n\n@media (prefers-reduced-motion) {\n .react-loading-skeleton {\n --pseudo-element-display: none; /* Disable animation */\n }\n}\n";
|
|
42327
|
+
styleInject(css_248z$h);
|
|
42207
42328
|
|
|
42208
42329
|
/**
|
|
42209
42330
|
* @internal
|
|
@@ -46800,34 +46921,6 @@ var LuiTooltip = function (props) {
|
|
|
46800
46921
|
return React__default["default"].createElement(Tippy, __assign({}, tippyProps), children);
|
|
46801
46922
|
};
|
|
46802
46923
|
|
|
46803
|
-
/**
|
|
46804
|
-
* This hook will callback with handleClickOutside() when "mousedown" dom event occurs off the refElement
|
|
46805
|
-
* usage:
|
|
46806
|
-
```typescript
|
|
46807
|
-
const refElement = React.useRef<HTMLButtonElement>(null);
|
|
46808
|
-
const handleClickOutside = () => {
|
|
46809
|
-
console.log("hello world");
|
|
46810
|
-
};
|
|
46811
|
-
useClickedOutsideElement(refElement, handleClickOutside);
|
|
46812
|
-
return <button ref={refElement}>Click Me!</button>;
|
|
46813
|
-
```
|
|
46814
|
-
*/
|
|
46815
|
-
function useClickedOutsideElement(refElement, handleClickOutside) {
|
|
46816
|
-
React__default["default"].useEffect(function () {
|
|
46817
|
-
function onOutsideClicked(event) {
|
|
46818
|
-
var element = refElement.current;
|
|
46819
|
-
if (!(element === null || element === void 0 ? void 0 : element.contains(event.target))) {
|
|
46820
|
-
handleClickOutside();
|
|
46821
|
-
}
|
|
46822
|
-
}
|
|
46823
|
-
document.addEventListener('mousedown', onOutsideClicked);
|
|
46824
|
-
return function () {
|
|
46825
|
-
document.removeEventListener('mousedown', onOutsideClicked);
|
|
46826
|
-
};
|
|
46827
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
46828
|
-
}, []);
|
|
46829
|
-
}
|
|
46830
|
-
|
|
46831
46924
|
var getFillClassName = function (fillVariation, backgroundFill) {
|
|
46832
46925
|
if (backgroundFill) {
|
|
46833
46926
|
return 'LuiBadge--fill';
|
|
@@ -46877,8 +46970,8 @@ var LuiSidePanelProvider = function (_a) {
|
|
|
46877
46970
|
React__default["default"].createElement(LuiSidePanelContainer, __assign({}, props))));
|
|
46878
46971
|
};
|
|
46879
46972
|
|
|
46880
|
-
var css_248z$
|
|
46881
|
-
styleInject(css_248z$
|
|
46973
|
+
var css_248z$g = ".lui-switch-checkbox {\n height: 0;\n width: 0;\n visibility: hidden;\n}\n\n.lui-switch-label {\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n width: 40px;\n height: 20px;\n background: grey;\n border-radius: 40px;\n position: relative;\n transition: background-color 0.2s;\n}\n\n.lui-switch-label .lui-switch-button {\n content: \"\";\n position: absolute;\n top: 2px;\n left: 2px;\n width: 18px;\n height: 16px;\n border-radius: 18px;\n transition: 0.2s;\n background: #fff;\n box-shadow: 0 0 2px 0 rgba(10, 10, 10, 0.29);\n}\n\n.lui-switch-checkbox:checked + .lui-switch-label .lui-switch-button {\n left: calc(100% - 2px);\n transform: translateX(-100%);\n}\n\n.lui-switch-label:active .lui-switch-button {\n width: 20px;\n}";
|
|
46974
|
+
styleInject(css_248z$g);
|
|
46882
46975
|
|
|
46883
46976
|
var LuiSwitchButton = function (props) {
|
|
46884
46977
|
var generatedId = useGenerateOrDefaultId();
|
|
@@ -54509,8 +54602,8 @@ var LuiAccordicardStatic = function (props) {
|
|
|
54509
54602
|
React__default["default"].createElement(LuiIcon, { className: clsx('LuiAccordicardStatic-chevron', isOpen ? 'LuiAccordicardStatic-chevron--isOpen' : null), name: 'ic_expand_more', alt: "expand", title: "Expand and collapse panel", size: "md" }))));
|
|
54510
54603
|
};
|
|
54511
54604
|
|
|
54512
|
-
var css_248z$
|
|
54513
|
-
styleInject(css_248z$
|
|
54605
|
+
var css_248z$f = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.lui-accordion {\n padding: 8px;\n display: flex;\n border-radius: 5px;\n box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.2509803922), 0px 0px 3px 0px rgba(0, 0, 0, 0.1490196078);\n}\n.lui-accordion .chevron {\n transition: all 0.3s ease-in-out;\n transform: rotate(0);\n}\n.lui-accordion .chevron--isOpen {\n transform: rotate(180deg);\n}\n.lui-accordion .accordion-heading {\n padding: 4px;\n}\n.lui-accordion h4 {\n padding: 4px;\n}\n.lui-accordion > summary {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.lui-accordion > summary h4 {\n margin-top: 0;\n display: inline-block;\n}\n.lui-accordion > summary::marker, .lui-accordion > summary::-webkit-details-marker {\n display: none;\n}";
|
|
54606
|
+
styleInject(css_248z$f);
|
|
54514
54607
|
|
|
54515
54608
|
var LuiAccordion = function (props) {
|
|
54516
54609
|
var _a = props.expanded, expanded = _a === void 0 ? false : _a, heading = props.heading, children = props.children, _b = props.iconColor, iconColor = _b === void 0 ? '#017A76' : _b, className = props.className, _c = props.style, style = _c === void 0 ? {} : _c;
|
|
@@ -54621,8 +54714,8 @@ var LuiMultiSwitch = function (_a) {
|
|
|
54621
54714
|
React__default["default"].createElement("div", { className: clsx('LuiMultiSwitch-labels', disabled && 'LuiMultiSwitch-disabled') }, options === null || options === void 0 ? void 0 : options.map(function (option, i) { return (React__default["default"].createElement("label", { role: 'radio', key: i, htmlFor: id.current, "aria-disabled": option.disabled || disabled, "aria-checked": selectedIndex === i, className: option.className, onClick: function () { return select(i); }, onTouchStart: function () { return select(i); } }, option.text)); }))));
|
|
54622
54715
|
};
|
|
54623
54716
|
|
|
54624
|
-
var css_248z$
|
|
54625
|
-
styleInject(css_248z$
|
|
54717
|
+
var css_248z$e = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.LuiListBox {\n padding: 0;\n list-style: none;\n}\n.LuiListBox .LuiListBoxItem {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: normal;\n user-select: none;\n color: #2a292c;\n line-height: 24px;\n outline: none;\n padding: 0.5rem 0.75rem;\n border: 2px solid transparent;\n}\n.LuiListBox .LuiListBoxItem:focus-visible {\n border-color: #007198;\n}\n.LuiListBox .LuiListBoxItem.LuiListBoxItem-selected {\n background: #e2f3f7;\n}\n.LuiListBox .LuiListBoxItem:hover, .LuiListBox .LuiListBoxItem.LuiListBoxItem-selected:hover {\n background: #d6eef4;\n}\n.LuiListBox .LuiListBoxItem.LuiListBoxItem-disabled {\n background: #eaeaea;\n}\n.LuiListBox .LuiListBox-emptyIndicator, .LuiListBox .LuiListBox-loadingIndicator {\n padding: 0.5rem 0.75rem;\n}\n.LuiListBox .LuiListBoxGroup .LuiListBoxGroup-heading {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n user-select: none;\n color: #6b6966;\n line-height: 16px;\n padding: 0.5rem 0.5rem;\n}";
|
|
54718
|
+
styleInject(css_248z$e);
|
|
54626
54719
|
|
|
54627
54720
|
function $c1d7fb2ec91bae71$var$Item(props) {
|
|
54628
54721
|
return null;
|
|
@@ -58122,16 +58215,16 @@ function DefaultEmptyIndicator() {
|
|
|
58122
58215
|
return React__default["default"].createElement("li", { className: "LuiListBox-emptyIndicator" }, "Nothing to Display");
|
|
58123
58216
|
}
|
|
58124
58217
|
|
|
58125
|
-
var css_248z$
|
|
58126
|
-
styleInject(css_248z$
|
|
58218
|
+
var css_248z$d = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.RadioItemRenderer {\n display: flex;\n align-items: center;\n position: relative;\n padding: 0 0 0 2rem;\n}\n.RadioItemRenderer::before {\n content: \"\";\n height: 1.5rem;\n min-width: 1.5rem;\n width: 1.5rem;\n border: 2px solid #007198;\n border-radius: 50%;\n background-color: transparent;\n position: absolute;\n left: 0;\n top: 0;\n margin-right: 0.75rem;\n}\n.RadioItemRenderer:after {\n content: \"\";\n position: absolute;\n left: 5px;\n top: 5px;\n background-color: #007198;\n height: 14px;\n min-width: 14px;\n width: 14px;\n border-radius: 50%;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n}\n.RadioItemRenderer-isSelected:after {\n opacity: 1;\n}";
|
|
58219
|
+
styleInject(css_248z$d);
|
|
58127
58220
|
|
|
58128
58221
|
function RadioItemRenderer(_a) {
|
|
58129
58222
|
var item = _a.item, isSelected = _a.isSelected;
|
|
58130
58223
|
return (React__default["default"].createElement("div", { className: "RadioItemRenderer ".concat(isSelected ? 'RadioItemRenderer-isSelected' : '') }, item.label));
|
|
58131
58224
|
}
|
|
58132
58225
|
|
|
58133
|
-
var css_248z$
|
|
58134
|
-
styleInject(css_248z$
|
|
58226
|
+
var css_248z$c = ".CheckboxRenderer {\n display: flex;\n align-items: center;\n}";
|
|
58227
|
+
styleInject(css_248z$c);
|
|
58135
58228
|
|
|
58136
58229
|
function CheckboxItemRenderer(_a) {
|
|
58137
58230
|
var item = _a.item, isSelected = _a.isSelected;
|
|
@@ -58155,8 +58248,8 @@ function LuiSideMenuItem(_a) {
|
|
|
58155
58248
|
React__default["default"].createElement("span", { className: "navText" }, label))));
|
|
58156
58249
|
}
|
|
58157
58250
|
|
|
58158
|
-
var css_248z$
|
|
58159
|
-
styleInject(css_248z$
|
|
58251
|
+
var css_248z$b = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n@keyframes animate-stripes {\n 100% {\n background-position: 100px 0;\n }\n}\n.ProgressBar, .ProgressBar-PROC, .ProgressBar-COMP, .ProgressBar-FAIL {\n height: 5px;\n width: 100%;\n background-color: #eaeaea;\n border-radius: 3px;\n}\n.ProgressBar-FAIL {\n background-color: #cc0000;\n}\n.ProgressBar-COMP {\n background-color: #0aa245;\n}\n.ProgressBar-PROC {\n background-color: #0096cc;\n transition: width 0.3s ease-in-out;\n}\n.ProgressBar-PROC.indeterminate {\n background-image: linear-gradient(-45deg, transparent 25%, rgba(255, 255, 255, 0.75) 25%, rgba(255, 255, 255, 0.75) 75%, transparent 75%);\n background-size: 50px 100%;\n animation: animate-stripes 5s linear infinite;\n}";
|
|
58252
|
+
styleInject(css_248z$b);
|
|
58160
58253
|
|
|
58161
58254
|
var LuiProgressBar = function (_a) {
|
|
58162
58255
|
var value = _a.value, max = _a.max, error = _a.error, _b = _a.barHeight, barHeight = _b === void 0 ? '5px' : _b;
|
|
@@ -58184,8 +58277,8 @@ var LuiProgressBar = function (_a) {
|
|
|
58184
58277
|
React__default["default"].createElement("div", { "data-testid": 'progress-bar-size', className: clsx("ProgressBar-".concat(status), { indeterminate: indeterminate }), style: { width: "".concat(percentage, "%"), height: barHeight } })));
|
|
58185
58278
|
};
|
|
58186
58279
|
|
|
58187
|
-
var css_248z$
|
|
58188
|
-
styleInject(css_248z$
|
|
58280
|
+
var css_248z$a = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.Toolbar {\n position: absolute;\n align-items: center;\n align-self: center;\n background: #ffffff;\n border-radius: 5px;\n display: flex;\n flex-direction: column;\n height: fit-content;\n margin: 0 0.75rem;\n padding: 0;\n width: fit-content;\n z-index: 1000;\n box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.2509803922), 0px 0px 3px 0px rgba(0, 0, 0, 0.1490196078);\n}\n\n.Left {\n justify-self: start;\n}\n\n.Right {\n justify-self: end;\n}";
|
|
58281
|
+
styleInject(css_248z$a);
|
|
58189
58282
|
|
|
58190
58283
|
exports.ToolbarDirection = void 0;
|
|
58191
58284
|
(function (ToolbarDirection) {
|
|
@@ -58207,8 +58300,8 @@ var ToolbarIcon = function (_a) {
|
|
|
58207
58300
|
return iconImage ? (React__default["default"].createElement("img", { className: "LuiIcon--lg", alt: iconName, src: iconImage })) : (React__default["default"].createElement(LuiIcon, { name: iconName, alt: iconName, size: 'md' }));
|
|
58208
58301
|
};
|
|
58209
58302
|
|
|
58210
|
-
var css_248z$
|
|
58211
|
-
styleInject(css_248z$
|
|
58303
|
+
var css_248z$9 = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.ToolbarButton {\n height: 40px;\n width: 40px;\n line-height: 12px;\n margin: 2px;\n padding: 0.25rem;\n}\n\n.ToolbarButton-placement {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.ToolbarButton img {\n border-radius: 3px;\n margin: -0.25rem;\n}\n\n.ToolbarButton,\n.ToolbarButton:hover,\n.ToolbarButton:disabled,\n.ToolbarButton:active:enabled {\n border-radius: 5px;\n border: 2px #ffffff solid !important;\n}\n\n.ToolbarItem-separator {\n height: 2px;\n background-color: #eaeaea;\n width: 100%;\n}";
|
|
58304
|
+
styleInject(css_248z$9);
|
|
58212
58305
|
|
|
58213
58306
|
/**
|
|
58214
58307
|
* Create button for using either LuiIcon or Image.
|
|
@@ -58271,8 +58364,8 @@ var useMediaQuery = function (query) {
|
|
|
58271
58364
|
return matches;
|
|
58272
58365
|
};
|
|
58273
58366
|
|
|
58274
|
-
var css_248z$
|
|
58275
|
-
styleInject(css_248z$
|
|
58367
|
+
var css_248z$8 = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.LuiCounter-round {\n background: #007198;\n color: #ffffff;\n text-align: center;\n width: 1.5em;\n height: 1.5em;\n border-radius: 50%;\n display: inline-block;\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n pointer-events: none;\n}";
|
|
58368
|
+
styleInject(css_248z$8);
|
|
58276
58369
|
|
|
58277
58370
|
var LuiCounter = React__default["default"].forwardRef(function (props, ref) {
|
|
58278
58371
|
var selectedNum = props.selectedNum, totalNum = props.totalNum, _a = props.shape, shape = _a === void 0 ? 'rect' : _a, _b = props.countZero, countZero = _b === void 0 ? true : _b, title = props.title, className = props.className, rest = __rest(props, ["selectedNum", "totalNum", "shape", "countZero", "title", "className"]);
|
|
@@ -58287,8 +58380,8 @@ var LuiCounter = React__default["default"].forwardRef(function (props, ref) {
|
|
|
58287
58380
|
return (React__default["default"].createElement(React__default["default"].Fragment, null, !(selectedNum === 0 && !countZero) && (React__default["default"].createElement("span", __assign({ ref: ref, className: determineCounterClassname(), "data-testid": "lui-counter-number-".concat(shape), title: title !== null && title !== void 0 ? title : "".concat(selectedNum, " of ").concat(totalNum, " rows selected") }, rest), selectedNum.toLocaleString()))));
|
|
58288
58381
|
});
|
|
58289
58382
|
|
|
58290
|
-
var css_248z$
|
|
58291
|
-
styleInject(css_248z$
|
|
58383
|
+
var css_248z$7 = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.lui-pagination-override-mobile .lui-pagination-desktop {\n display: none;\n visibility: hidden;\n opacity: 0;\n}\n.lui-pagination-override-mobile .lui-pagination-mobile {\n display: flex;\n}\n\n.lui-pagination-override-desktop .lui-pagination-mobile {\n display: none;\n visibility: hidden;\n opacity: 0;\n}\n.lui-pagination-override-desktop .lui-pagination-desktop {\n display: flex;\n}\n\n.lui-pagination-controller {\n container-type: inline-size;\n}\n@container (min-width: 500px) {\n .lui-pagination-controller .lui-pagination-mobile {\n display: none;\n visibility: hidden;\n opacity: 0;\n }\n .lui-pagination-controller .lui-pagination-desktop {\n display: flex;\n }\n}\n@container (max-width: 499px) {\n .lui-pagination-controller .lui-pagination-desktop {\n display: none;\n visibility: hidden;\n opacity: 0;\n }\n .lui-pagination-controller .lui-pagination-mobile {\n display: flex;\n }\n}\n\n.lui-pagination {\n display: flex;\n user-select: none;\n justify-content: center;\n}\n.lui-pagination-page-counter {\n display: flex;\n align-items: center;\n margin-left: 0.75rem;\n margin-right: 0.75rem;\n}\n.lui-pagination .lui-button {\n color: #2a292c;\n height: 40px;\n padding: 0.5rem 0.75rem;\n vertical-align: top;\n}\n.lui-pagination .lui-button .lui-pagination-navigation-icon {\n padding-top: 1px;\n}\n.lui-pagination .lui-button .lui-pagination-navigation-icon path {\n fill: #2a292c;\n}\n.lui-pagination .lui-button:hover {\n color: #2a292c;\n}\n.lui-pagination .lui-button-selected {\n background-color: #007198;\n color: #ffffff;\n}\n.lui-pagination-ellipsis {\n pointer-events: none;\n}\n.lui-pagination-navigate-disabled {\n pointer-events: none;\n}\n.lui-pagination-navigate-disabled .lui-pagination-navigation-icon {\n padding-top: 1px;\n}\n.lui-pagination-navigate-disabled .lui-pagination-navigation-icon path {\n fill: #989189 !important;\n}";
|
|
58384
|
+
styleInject(css_248z$7);
|
|
58292
58385
|
|
|
58293
58386
|
var LuiPagination = function (_a) {
|
|
58294
58387
|
var totalPages = _a.totalPages, currentPage = _a.currentPage, onPageChange = _a.onPageChange, _b = _a.isMobileLayout, isMobileLayout = _b === void 0 ? null : _b;
|
|
@@ -58398,11 +58491,11 @@ var LuiPagination = function (_a) {
|
|
|
58398
58491
|
React__default["default"].createElement("div", { className: "pagination" }, renderPaginationNumbers())))));
|
|
58399
58492
|
};
|
|
58400
58493
|
|
|
58401
|
-
var css_248z$
|
|
58402
|
-
styleInject(css_248z$
|
|
58494
|
+
var css_248z$6 = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.Separator {\n background-color: #eaeaea;\n position: absolute;\n display: flex;\n justify-content: space-around;\n transition-property: background-color;\n transition-delay: 750ms;\n transition-duration: 0ms;\n}\n.Separator-arrows {\n align-self: center;\n position: relative;\n opacity: 0;\n transition-property: opacity;\n transition-delay: 750ms;\n transition-duration: 0ms;\n}\n.Separator:focus-within, .Separator:hover, .Separator:focus, .Separator:active {\n background-color: #73c8e1;\n transition-delay: 0ms;\n transition-duration: 0ms;\n}\n.Separator:focus-within .Separator-arrows, .Separator:hover .Separator-arrows, .Separator:focus .Separator-arrows, .Separator:active .Separator-arrows {\n opacity: 1;\n transition-delay: 0ms;\n transition-duration: 0ms;\n display: inline-block;\n}";
|
|
58495
|
+
styleInject(css_248z$6);
|
|
58403
58496
|
|
|
58404
|
-
var css_248z$
|
|
58405
|
-
styleInject(css_248z$
|
|
58497
|
+
var css_248z$5 = ".Control {\n transition: opacity 0.2s ease;\n position: absolute;\n margin-left: 0 !important;\n display: flex;\n justify-content: space-around;\n align-items: center;\n}";
|
|
58498
|
+
styleInject(css_248z$5);
|
|
58406
58499
|
|
|
58407
58500
|
var useForkRef = function (forwardedRef) {
|
|
58408
58501
|
var localRef = React.useRef(null);
|
|
@@ -59160,8 +59253,8 @@ var keyDownHandler = function (e) {
|
|
|
59160
59253
|
return valueNow + delta;
|
|
59161
59254
|
};
|
|
59162
59255
|
|
|
59163
|
-
var css_248z$
|
|
59164
|
-
styleInject(css_248z$
|
|
59256
|
+
var css_248z$4 = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.Splitter {\n display: grid;\n position: relative;\n overflow: hidden;\n opacity: 0;\n}\n.Splitter > :first-child, .Splitter > :nth-child(2) {\n position: relative;\n z-index: 0;\n background: #f9f9f9;\n overflow: auto;\n}\n.Splitter.resizing * {\n pointer-events: none;\n user-select: none;\n}";
|
|
59257
|
+
styleInject(css_248z$4);
|
|
59165
59258
|
|
|
59166
59259
|
/**
|
|
59167
59260
|
* Container that appends a separator when the children count equals 2.
|
|
@@ -59213,8 +59306,8 @@ var useSplitterRef = function () {
|
|
|
59213
59306
|
return { ref: ref, setRatio: setRatio };
|
|
59214
59307
|
};
|
|
59215
59308
|
|
|
59216
|
-
var css_248z$
|
|
59217
|
-
styleInject(css_248z$
|
|
59309
|
+
var css_248z$3 = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.LuiBannerV2 {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: normal;\n box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.2509803922), 0px 0px 3px 0px rgba(0, 0, 0, 0.1490196078);\n font-size: 16px;\n display: grid;\n align-items: center;\n min-height: 3rem;\n position: relative;\n background-color: #ffffff;\n border-radius: 5px;\n padding-bottom: 0.5rem;\n padding-top: 0.5rem;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.LuiBannerV2 > :first-child {\n margin-top: 0;\n}\n.LuiBannerV2.has-level {\n padding-left: 3.25rem;\n border-left-width: 0.5rem;\n border-left-style: solid;\n}\n.LuiBannerV2.warning {\n border-left-color: #EA6A2E;\n}\n.LuiBannerV2.error {\n border-left-color: #cc0000;\n}\n.LuiBannerV2.info {\n border-left-color: #3A7CDF;\n}\n.LuiBannerV2.success {\n border-left-color: #0AA345;\n}\n.LuiBannerV2.can-dismiss {\n padding-right: 2.5rem;\n}\n.LuiBannerV2-Icon {\n position: absolute;\n left: 0.5rem;\n top: 0.5rem;\n}\n.LuiBannerV2-Icon.warning {\n color: #EA6A2E;\n}\n.LuiBannerV2-Icon.error {\n color: #cc0000;\n}\n.LuiBannerV2-Icon.info {\n color: #3A7CDF;\n}\n.LuiBannerV2-Icon.success {\n color: #0AA345;\n}\n.LuiBannerV2-Icon svg {\n fill: currentColor;\n}\n.LuiBannerV2-Dismiss {\n display: flex;\n position: absolute;\n right: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n background-color: transparent;\n padding: 0;\n}\n.LuiBannerV2-Dismiss svg {\n fill: #6b6966;\n}";
|
|
59310
|
+
styleInject(css_248z$3);
|
|
59218
59311
|
|
|
59219
59312
|
var LuiBannerV2 = React.forwardRef(function (_a, ref) {
|
|
59220
59313
|
var _b, _c, _d;
|
|
@@ -59233,6 +59326,54 @@ var LuiBannerV2 = React.forwardRef(function (_a, ref) {
|
|
|
59233
59326
|
onDismiss && (React__default["default"].createElement("button", __assign({}, dismissButtonProps, { className: clsx('LuiBannerV2-Dismiss', dismissButtonProps === null || dismissButtonProps === void 0 ? void 0 : dismissButtonProps.className), "aria-label": (_b = dismissButtonProps === null || dismissButtonProps === void 0 ? void 0 : dismissButtonProps['aria-label']) !== null && _b !== void 0 ? _b : 'Dismiss', type: (_c = dismissButtonProps === null || dismissButtonProps === void 0 ? void 0 : dismissButtonProps.type) !== null && _c !== void 0 ? _c : 'button', onClick: onDismiss }), (_d = dismissButtonProps === null || dismissButtonProps === void 0 ? void 0 : dismissButtonProps.children) !== null && _d !== void 0 ? _d : (React__default["default"].createElement(LuiIcon, { size: "md", name: "ic_clear", spanProps: { 'aria-hidden': true }, alt: "Dismiss" }))))));
|
|
59234
59327
|
});
|
|
59235
59328
|
|
|
59329
|
+
var css_248z$2 = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.lui-color-picker,\n.lui-input-color-group {\n display: inline-grid;\n gap: 0.5rem;\n grid-template-columns: repeat(7, 1fr);\n}\n\ninput.lui-input-color-radio {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n white-space: nowrap;\n word-wrap: normal;\n}\ninput.lui-input-color-radio + label {\n width: 1.5rem;\n height: 1.5rem;\n border-radius: 1rem;\n cursor: pointer;\n border: none;\n}\ninput.lui-input-color-radio:checked + label {\n border: 0.125rem solid #ffffff;\n box-shadow: 0 0 0.125rem 0.0625rem rgba(0, 0, 0, 0.2509803922);\n transition: all 0.05s ease;\n}";
|
|
59330
|
+
styleInject(css_248z$2);
|
|
59331
|
+
|
|
59332
|
+
var defaultColours = [
|
|
59333
|
+
{ color: '#FF0000', description: 'Red' },
|
|
59334
|
+
{ color: '#FF9900', description: 'Orange' },
|
|
59335
|
+
{ color: '#FFFF00', description: 'Yellow' },
|
|
59336
|
+
{ color: '#00FF00', description: 'Lime' },
|
|
59337
|
+
{ color: '#00FFFF', description: 'Cyan' },
|
|
59338
|
+
{ color: '#4A86E8', description: 'Cornflower' },
|
|
59339
|
+
{ color: '#9900FF', description: 'Violet' },
|
|
59340
|
+
{ color: '#CC0100', description: 'Scarlet' },
|
|
59341
|
+
{ color: '#B45F06', description: 'Brown' },
|
|
59342
|
+
{ color: '#F1C231', description: 'Canary' },
|
|
59343
|
+
{ color: '#6AA84F', description: 'Olive' },
|
|
59344
|
+
{ color: '#45818E', description: 'Teal' },
|
|
59345
|
+
{ color: '#1255CC', description: 'Blue' },
|
|
59346
|
+
{ color: '#674EA7', description: 'Purple' },
|
|
59347
|
+
];
|
|
59348
|
+
|
|
59349
|
+
var ColorInputGroup = React.forwardRef(function (props, ref) {
|
|
59350
|
+
var _a;
|
|
59351
|
+
return (React__default["default"].createElement("div", __assign({ ref: ref }, props, { role: (_a = props.role) !== null && _a !== void 0 ? _a : 'lui-input-color-group', className: clsx('lui-input-color-group', props.className) })));
|
|
59352
|
+
});
|
|
59353
|
+
var ColorInput = React.forwardRef(function (props, ref) {
|
|
59354
|
+
var name = props.name, color = props.color, description = props.description, label = props.label, input = __rest(props, ["name", "color", "description", "label"]);
|
|
59355
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
59356
|
+
React__default["default"].createElement("input", __assign({ ref: ref }, input, { name: name, type: "radio", id: color, value: color, className: clsx('lui-input-color-radio', input.className) })),
|
|
59357
|
+
React__default["default"].createElement("label", __assign({}, label, { htmlFor: color, style: __assign(__assign({}, label === null || label === void 0 ? void 0 : label.style), { color: color, backgroundColor: color }), className: clsx('lui-input-colour-label', label === null || label === void 0 ? void 0 : label.className), "aria-label": description || color, title: description }))));
|
|
59358
|
+
});
|
|
59359
|
+
|
|
59360
|
+
/**
|
|
59361
|
+
* @description Default colour palette template component using predetermined colours.
|
|
59362
|
+
* To use custom colours, refer to the ColorInput and ColorInputGroup components.
|
|
59363
|
+
* @param selected - The currently selected colour.
|
|
59364
|
+
* @param onSelect - Callback function to handle the selected colour.
|
|
59365
|
+
* @param name - The name of the colour picker.
|
|
59366
|
+
*/
|
|
59367
|
+
var ColorPalette = React.forwardRef(function (_a, ref) {
|
|
59368
|
+
var _b;
|
|
59369
|
+
var _c = _a.selected, selected = _c === void 0 ? (_b = defaultColours[0]) === null || _b === void 0 ? void 0 : _b.color : _c, onSelect = _a.onSelect; _a.children; var name = _a.name, className = _a.className, divProps = __rest(_a, ["selected", "onSelect", "children", "name", "className"]);
|
|
59370
|
+
var colourGroupIdentifier = v4();
|
|
59371
|
+
return (React__default["default"].createElement(ColorInputGroup, __assign({ ref: ref }, divProps, { className: clsx('lui-color-picker', className) }), defaultColours.map(function (_a) {
|
|
59372
|
+
var color = _a.color, description = _a.description;
|
|
59373
|
+
return (React__default["default"].createElement(ColorInput, __assign({ key: color, name: name !== null && name !== void 0 ? name : colourGroupIdentifier }, { color: color, description: description }, { checked: color === selected, onChange: function () { return onSelect(color); } })));
|
|
59374
|
+
})));
|
|
59375
|
+
});
|
|
59376
|
+
|
|
59236
59377
|
var css_248z$1 = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.ToastProvider {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n pointer-events: none;\n display: grid;\n grid-template-columns: repeat(3, auto);\n grid-template-areas: \"left center right\";\n padding: 1.5rem;\n z-index: 1200;\n}\n.ToastProvider .LuiBannerV2 {\n justify-content: flex-start;\n min-height: 4rem;\n min-width: 320px;\n max-width: min(50vw - 2rem, 400px);\n background-color: #f9f9f9;\n}\n.ToastProvider .LuiBannerV2-Icon {\n top: 50%;\n transform: translateY(-50%);\n}\n.ToastProvider .LuiBannerV2-Icon.warning {\n transform: translateY(calc(-50% - 1px));\n}\n.ToastProvider .LuiBannerV2 * {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: normal;\n font-weight: 400;\n}";
|
|
59237
59378
|
styleInject(css_248z$1);
|
|
59238
59379
|
|
|
@@ -59724,12 +59865,16 @@ var LuiToastMessage = function (props) {
|
|
|
59724
59865
|
};
|
|
59725
59866
|
|
|
59726
59867
|
exports.CheckboxItemRenderer = CheckboxItemRenderer;
|
|
59868
|
+
exports.ColorInput = ColorInput;
|
|
59869
|
+
exports.ColorInputGroup = ColorInputGroup;
|
|
59870
|
+
exports.ColorPalette = ColorPalette;
|
|
59727
59871
|
exports.LUI_WINDOW_NAME = LUI_WINDOW_NAME;
|
|
59728
59872
|
exports.LuiAccordicard = LuiAccordicard;
|
|
59729
59873
|
exports.LuiAccordicardStatic = LuiAccordicardStatic;
|
|
59730
59874
|
exports.LuiAccordion = LuiAccordion;
|
|
59731
59875
|
exports.LuiAlertModal = LuiAlertModal;
|
|
59732
59876
|
exports.LuiAlertModalButtons = LuiAlertModalButtons;
|
|
59877
|
+
exports.LuiAlertModalV2 = LuiAlertModalV2;
|
|
59733
59878
|
exports.LuiAppFooterSml = LuiAppFooterSml;
|
|
59734
59879
|
exports.LuiBadge = LuiBadge;
|
|
59735
59880
|
exports.LuiBanner = LuiBanner;
|
|
@@ -59783,6 +59928,7 @@ exports.LuiMenuCloseButtonV2 = LuiMenuCloseButtonV2;
|
|
|
59783
59928
|
exports.LuiMessagingContextProvider = LuiMessagingContextProvider;
|
|
59784
59929
|
exports.LuiMiniSpinner = LuiMiniSpinner;
|
|
59785
59930
|
exports.LuiModal = LuiModal;
|
|
59931
|
+
exports.LuiModalV2 = LuiModalV2;
|
|
59786
59932
|
exports.LuiMoneyInput = LuiMoneyInput;
|
|
59787
59933
|
exports.LuiMultiSwitch = LuiMultiSwitch;
|
|
59788
59934
|
exports.LuiMultiSwitchYesNo = LuiMultiSwitchYesNo;
|