@linzjs/lui 26.1.0 → 26.2.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 +8 -0
- package/dist/components/LuiAccordion/LuiAccordion.d.ts +1 -0
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +8 -5
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@
|
|
|
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
|
+
## [26.2.0](https://github.com/linz/Lui/compare/lui-v26.1.0...lui-v26.2.0) (2026-09-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* enable snyk ([#1410](https://github.com/linz/Lui/issues/1410)) ([457c6b0](https://github.com/linz/Lui/commit/457c6b0f8b989316c67f6b064edb2d36e52096be))
|
|
14
|
+
* **LuiAccordion:** support right-aligned chevron ([#1414](https://github.com/linz/Lui/issues/1414)) ([89908f9](https://github.com/linz/Lui/commit/89908f9945df9565579699ea0a23794b96a0da4d))
|
|
15
|
+
|
|
8
16
|
## [26.1.0](https://github.com/linz/Lui/compare/lui-v26.0.0...lui-v26.1.0) (2026-09-04)
|
|
9
17
|
|
|
10
18
|
|
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
|
|