@linzjs/lui 24.3.0 → 24.3.1
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 +9 -0
- package/dist/components/Drawer/Drawer.d.ts +3 -2
- package/dist/components/LuiModal/LuiModalV2.d.ts +2 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +17 -1
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
* **LuiComboSelect:** restore interface to support styling of the input element. ([#1270](https://github.com/linz/lui/issues/1270)) ([7ce6a13](https://github.com/linz/lui/commit/7ce6a137c7f16ffa3acbe4357569a6eb59ef47db))
|
|
7
7
|
|
|
8
|
+
## [24.3.1](https://github.com/linz/Lui/compare/lui-v24.3.0...lui-v24.3.1) (2025-11-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **LuiModal:** add tabindex prop for modal controller ([45d8a36](https://github.com/linz/Lui/commit/45d8a36a4cc723559de1caaa89a9a38de7a10045))
|
|
14
|
+
* **LuiModal:** add tabindex prop for modal controller ([45d8a36](https://github.com/linz/Lui/commit/45d8a36a4cc723559de1caaa89a9a38de7a10045))
|
|
15
|
+
* **LuiModal:** SEARCH-7756 add tabindex prop for modal controller ([#1290](https://github.com/linz/Lui/issues/1290)) ([45d8a36](https://github.com/linz/Lui/commit/45d8a36a4cc723559de1caaa89a9a38de7a10045))
|
|
16
|
+
|
|
8
17
|
## [24.3.0](https://github.com/linz/Lui/compare/lui-v24.2.0...lui-v24.3.0) (2025-11-20)
|
|
9
18
|
|
|
10
19
|
|
|
@@ -3,7 +3,7 @@ import { Splitter } from '../Splitter/Splitter';
|
|
|
3
3
|
import './Drawer.scss';
|
|
4
4
|
import { UseDisableParentScroll } from './utils';
|
|
5
5
|
type Position = 'top' | 'bottom' | 'left' | 'right';
|
|
6
|
-
|
|
6
|
+
type BaseDrawerProps = {
|
|
7
7
|
/** It's not recommended to make this prop dynamic during runtime as it might affect the opening animation. See the `Positions` story for more info. */
|
|
8
8
|
position?: Position;
|
|
9
9
|
/** Drawer open state is fully handled by the parent */
|
|
@@ -39,6 +39,7 @@ export type DrawerProps = PropsWithChildren<{
|
|
|
39
39
|
mountChildrenOn?: 'mount' | 'first-open';
|
|
40
40
|
/** Called when the drawer is resized either manually or programmatically. */
|
|
41
41
|
onResized?: ComponentProps<typeof Splitter>['onResized'];
|
|
42
|
-
}
|
|
42
|
+
};
|
|
43
|
+
export type DrawerProps = PropsWithChildren<BaseDrawerProps> & Omit<ComponentProps<typeof Splitter>, 'ratio' | 'orientation' | 'onResized' | 'startAt' | 'min' | 'max'>;
|
|
43
44
|
export declare const Drawer: React.ForwardRefExoticComponent<Omit<DrawerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
44
45
|
export {};
|
|
@@ -21,6 +21,8 @@ export type LuiModalV2Props = {
|
|
|
21
21
|
preventAutoFocus?: boolean;
|
|
22
22
|
/** By default, the modal portal will be appended to the document's body, but we might need to append it to another element. This is passed the React Modal `parentSelector` prop. */
|
|
23
23
|
appendToElement?: () => HTMLElement;
|
|
24
|
+
/** Sets the tab index of the modal container */
|
|
25
|
+
tabIndex?: number | null;
|
|
24
26
|
};
|
|
25
27
|
/** 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. */
|
|
26
28
|
export declare const LuiModalV2: {
|
package/dist/index.d.ts
CHANGED
|
@@ -83,8 +83,10 @@ export { useToast } from './components/Toast';
|
|
|
83
83
|
export { LuiMessagingContextProvider, useShowLUIMessage, LuiToastMessage, } from './components/Toast/Upgrade';
|
|
84
84
|
export { LuiErrorPanel } from './components/LuiErrorPanel/LuiErrorPanel';
|
|
85
85
|
export { DrawerGlobalProvider, useDrawerGlobalContext, DrawerGlobalContext, } from './components/Drawer/DrawerGlobalContext';
|
|
86
|
-
export { Drawer
|
|
87
|
-
export {
|
|
86
|
+
export { Drawer } from './components/Drawer/Drawer';
|
|
87
|
+
export type { DrawerProps } from './components/Drawer/Drawer';
|
|
88
|
+
export { DrawerGlobal } from './components/Drawer/DrawerGlobal';
|
|
89
|
+
export type { DrawerGlobalProps } from './components/Drawer/DrawerGlobal';
|
|
88
90
|
export { LuiFilterCharactersProvider, useFilterCharacters, } from './contexts/LuiFilterCharactersProvider';
|
|
89
91
|
export { LinzFreeTextValidator } from './functions/LinzFreeTextValidator';
|
|
90
92
|
export { LinzFreeTextFilter, LinzFreeTextFilterConvertOnly, } from './functions/LinzFreeTextFilter';
|
package/dist/index.js
CHANGED
|
@@ -18391,7 +18391,23 @@ var LuiModalV2 = function (props) {
|
|
|
18391
18391
|
showButtons && (React__default["default"].createElement("div", { className: "lui-modal-v2-header-buttons" },
|
|
18392
18392
|
showHelpButton && React__default["default"].createElement(HelpButton, { helpLink: props.helpLink }),
|
|
18393
18393
|
showCloseButton && React__default["default"].createElement(CloseButton, { onClose: props.onClose })))),
|
|
18394
|
-
React__default["default"].createElement(
|
|
18394
|
+
React__default["default"].createElement(ModalContents, { children: props.children, tabIndex: props.tabIndex }))));
|
|
18395
|
+
};
|
|
18396
|
+
var ModalContents = function (props) {
|
|
18397
|
+
React.useEffect(function () {
|
|
18398
|
+
var modalContent = document.querySelector('.ReactModal__Content');
|
|
18399
|
+
if (props.tabIndex === undefined || !modalContent)
|
|
18400
|
+
return;
|
|
18401
|
+
switch (props.tabIndex) {
|
|
18402
|
+
case null:
|
|
18403
|
+
modalContent === null || modalContent === void 0 ? void 0 : modalContent.removeAttribute('tabindex');
|
|
18404
|
+
break;
|
|
18405
|
+
default:
|
|
18406
|
+
modalContent === null || modalContent === void 0 ? void 0 : modalContent.setAttribute('tabindex', props.tabIndex.toString());
|
|
18407
|
+
break;
|
|
18408
|
+
}
|
|
18409
|
+
}, []);
|
|
18410
|
+
return React__default["default"].createElement("div", { className: "lui-modal-v2-contents" }, props.children);
|
|
18395
18411
|
};
|
|
18396
18412
|
var ButtonRow = function (props) { return (React__default["default"].createElement("div", { className: clsx$1('lui-modal-v2-btn-row', props.className) }, props.children)); };
|
|
18397
18413
|
LuiModalV2.Buttons = ButtonRow;
|