@linzjs/lui 26.1.0 → 27.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/CHANGELOG.md +19 -0
- package/dist/components/LuiAccordion/LuiAccordion.d.ts +1 -0
- package/dist/components/Toast/Helpers/ToastTypes.d.ts +10 -3
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +11 -8
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,25 @@
|
|
|
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
|
+
## [27.0.0](https://github.com/linz/Lui/compare/lui-v26.2.0...lui-v27.0.0) (2026-09-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### ⚠ BREAKING CHANGES
|
|
12
|
+
|
|
13
|
+
* Toast updated to disconnect dismissing action from auto dismiss… ([#1413](https://github.com/linz/Lui/issues/1413))
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* Toast updated to disconnect dismissing action from auto dismiss… ([#1413](https://github.com/linz/Lui/issues/1413)) ([4cc40ab](https://github.com/linz/Lui/commit/4cc40abea7bf4cbc79fd8fc5fa4039f7ef6ee078))
|
|
18
|
+
|
|
19
|
+
## [26.2.0](https://github.com/linz/Lui/compare/lui-v26.1.0...lui-v26.2.0) (2026-09-10)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* enable snyk ([#1410](https://github.com/linz/Lui/issues/1410)) ([457c6b0](https://github.com/linz/Lui/commit/457c6b0f8b989316c67f6b064edb2d36e52096be))
|
|
25
|
+
* **LuiAccordion:** support right-aligned chevron ([#1414](https://github.com/linz/Lui/issues/1414)) ([89908f9](https://github.com/linz/Lui/commit/89908f9945df9565579699ea0a23794b96a0da4d))
|
|
26
|
+
|
|
8
27
|
## [26.1.0](https://github.com/linz/Lui/compare/lui-v26.0.0...lui-v26.1.0) (2026-09-04)
|
|
9
28
|
|
|
10
29
|
|
|
@@ -10,11 +10,18 @@ export type ToastOptions = {
|
|
|
10
10
|
position?: ToastPosition;
|
|
11
11
|
onLeave?: (id: number) => void;
|
|
12
12
|
/**
|
|
13
|
-
* If true, the toast will
|
|
14
|
-
* If false, the toast will
|
|
15
|
-
*
|
|
13
|
+
* If true, the toast will persist until dismissed by setting an unspecified timeout to Infinity.
|
|
14
|
+
* If false or not provided, the toast will use the provided timeout or the ToastProvider default.
|
|
15
|
+
* This option does not control whether the dismiss button is shown.
|
|
16
16
|
*/
|
|
17
17
|
requireDismiss?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* If false, banner toasts will not have a close button. Defaults to true.
|
|
20
|
+
* Use this instead of `requireDismiss: false` when hiding the close button.
|
|
21
|
+
* This has no effect on custom content passed to `toast`, which controls its own dismiss UI.
|
|
22
|
+
* When combined with `requireDismiss: true`, dismiss the toast programmatically using its id.
|
|
23
|
+
*/
|
|
24
|
+
closeable?: boolean;
|
|
18
25
|
};
|
|
19
26
|
export type ToastAction = {
|
|
20
27
|
type: 'add';
|
package/dist/index.js
CHANGED
|
@@ -34012,11 +34012,11 @@ const LuiAccordicardStatic = (props) => {
|
|
|
34012
34012
|
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" }))));
|
|
34013
34013
|
};
|
|
34014
34014
|
|
|
34015
|
-
var css_248z$j = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.lui-accordion {\n padding: 8px;\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}";
|
|
34015
|
+
var css_248z$j = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.lui-accordion {\n padding: 8px;\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--icon-right > summary .chevron {\n margin-left: auto;\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}";
|
|
34016
34016
|
styleInject(css_248z$j);
|
|
34017
34017
|
|
|
34018
34018
|
const LuiAccordion = (props) => {
|
|
34019
|
-
const { expanded = false, heading, children, iconColor = '#017A76', className, style = {}, onToggleExpand, } = props;
|
|
34019
|
+
const { expanded = false, heading, children, iconColor = '#017A76', iconPosition = 'left', className, style = {}, onToggleExpand, } = props;
|
|
34020
34020
|
const [open, setOpen] = React.useState(expanded);
|
|
34021
34021
|
React__default["default"].useEffect(() => {
|
|
34022
34022
|
setOpen(expanded);
|
|
@@ -34029,10 +34029,13 @@ const LuiAccordion = (props) => {
|
|
|
34029
34029
|
onToggleExpand(!open);
|
|
34030
34030
|
}
|
|
34031
34031
|
};
|
|
34032
|
-
|
|
34032
|
+
const chevron = (React__default["default"].createElement(LuiIcon, { color: iconColor, size: "md", name: "ic_expand_more", alt: open ? 'Close' : 'Expand', "aria-label": open ? 'Expanded' : 'Closed', className: clsx('chevron', open ? 'chevron--isOpen' : null) }));
|
|
34033
|
+
const headingContent = React__default["default"].isValidElement(heading) ? (heading) : (React__default["default"].createElement("h4", { className: "accordion-heading", "data-testid": `lui-accordion-heading-${open}` }, heading));
|
|
34034
|
+
return (React__default["default"].createElement("details", { style: style, className: clsx('lui-accordion', `lui-accordion--icon-${iconPosition}`, className), open: open },
|
|
34033
34035
|
React__default["default"].createElement("summary", { onClick: toggle, "data-testid": `lui-accordion-summary-${open}` },
|
|
34034
|
-
|
|
34035
|
-
|
|
34036
|
+
iconPosition === 'left' && chevron,
|
|
34037
|
+
headingContent,
|
|
34038
|
+
iconPosition === 'right' && chevron),
|
|
34036
34039
|
children));
|
|
34037
34040
|
};
|
|
34038
34041
|
|
|
@@ -42990,15 +42993,15 @@ const toastFunctions = (dispatch) => {
|
|
|
42990
42993
|
const banner = (level, defaults = {}) => (children, config = {}) => {
|
|
42991
42994
|
const options = { ...defaults, ...config };
|
|
42992
42995
|
return toast(({ close: onDismissFn }) => {
|
|
42993
|
-
const onDismiss = options.
|
|
42996
|
+
const onDismiss = options.closeable === false ? undefined : onDismissFn;
|
|
42994
42997
|
return React__namespace.createElement(ToastBanner, { level, children, onDismiss });
|
|
42995
42998
|
}, options);
|
|
42996
42999
|
};
|
|
42997
43000
|
return {
|
|
42998
43001
|
toast,
|
|
42999
43002
|
dismiss: (id) => dispatch === null || dispatch === void 0 ? void 0 : dispatch({ type: 'remove', id }),
|
|
43000
|
-
info: banner('info'
|
|
43001
|
-
success: banner('success'
|
|
43003
|
+
info: banner('info'),
|
|
43004
|
+
success: banner('success'),
|
|
43002
43005
|
error: banner('error', { requireDismiss: true }),
|
|
43003
43006
|
warning: banner('warning', { requireDismiss: true }),
|
|
43004
43007
|
plain: banner(),
|