@linzjs/lui 26.0.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/dist/lui.esm.js CHANGED
@@ -23544,7 +23544,7 @@ const LuiSidePanelProvider = ({ children }) => {
23544
23544
  React__default.createElement(LuiSidePanelContainer, { ...props })));
23545
23545
  };
23546
23546
 
23547
- var css_248z$k = ".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 cursor: pointer;\n width: 40px;\n padding: 2px;\n background: #ffffff;\n border: 2px solid #007198;\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: relative;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n transition: 0.2s;\n background: #007198;\n box-shadow: 0 0 2px 0 rgba(10, 10, 10, 0.29);\n}\n\n.lui-switch-label-checked {\n background: #007198;\n}\n.lui-switch-label-checked .lui-switch-button {\n transform: translateX(19px);\n background: #ffffff;\n}\n\n.lui-switch-checkbox:disabled + .lui-switch-label {\n background: #eaeaea;\n border: 1px solid #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label .lui-switch-button {\n background: #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label-checked {\n background: #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label-checked .lui-switch-button {\n background: #eaeaea;\n}\n\n.lui-switch-sm .lui-switch-label {\n width: 24px;\n padding: 1px;\n border-width: 2px;\n border-radius: 20px;\n}\n.lui-switch-sm .lui-switch-label .lui-switch-button {\n width: 7px;\n height: 7px;\n}\n.lui-switch-sm .lui-switch-label-checked .lui-switch-button {\n transform: translateX(11px);\n}\n.lui-switch-sm .lui-switch-checkbox:disabled + .lui-switch-label {\n border-width: 1px;\n}\n\n.lui-switch-checkbox:disabled + .lui-switch-label {\n background: #eaeaea;\n border: 1px solid #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label .lui-switch-button {\n background: #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label-checked {\n background: #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label-checked .lui-switch-button {\n background: #eaeaea;\n}";
23547
+ var css_248z$k = ".lui-switch-checkbox {\n height: 0;\n width: 0;\n visibility: hidden;\n position: absolute;\n}\n\n.lui-switch-label {\n display: flex;\n align-items: center;\n cursor: pointer;\n width: 40px;\n padding: 2px;\n background: #ffffff;\n border: 2px solid #007198;\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: relative;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n transition: 0.2s;\n background: #007198;\n box-shadow: 0 0 2px 0 rgba(10, 10, 10, 0.29);\n}\n\n.lui-switch-label-checked {\n background: #007198;\n}\n.lui-switch-label-checked .lui-switch-button {\n transform: translateX(19px);\n background: #ffffff;\n}\n\n.lui-switch-checkbox:disabled + .lui-switch-label {\n background: #eaeaea;\n border: 1px solid #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label .lui-switch-button {\n background: #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label-checked {\n background: #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label-checked .lui-switch-button {\n background: #eaeaea;\n}\n\n.lui-switch-sm .lui-switch-label {\n width: 24px;\n padding: 1px;\n border-width: 2px;\n border-radius: 20px;\n}\n.lui-switch-sm .lui-switch-label .lui-switch-button {\n width: 7px;\n height: 7px;\n}\n.lui-switch-sm .lui-switch-label-checked .lui-switch-button {\n transform: translateX(11px);\n}\n.lui-switch-sm .lui-switch-checkbox:disabled + .lui-switch-label {\n border-width: 1px;\n}\n\n.lui-switch-checkbox:disabled + .lui-switch-label {\n background: #eaeaea;\n border: 1px solid #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label .lui-switch-button {\n background: #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label-checked {\n background: #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label-checked .lui-switch-button {\n background: #eaeaea;\n}";
23548
23548
  styleInject(css_248z$k);
23549
23549
 
23550
23550
  const LuiSwitchButton = (props) => {
@@ -33983,11 +33983,11 @@ const LuiAccordicardStatic = (props) => {
33983
33983
  React__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" }))));
33984
33984
  };
33985
33985
 
33986
- 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}";
33986
+ 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}";
33987
33987
  styleInject(css_248z$j);
33988
33988
 
33989
33989
  const LuiAccordion = (props) => {
33990
- const { expanded = false, heading, children, iconColor = '#017A76', className, style = {}, onToggleExpand, } = props;
33990
+ const { expanded = false, heading, children, iconColor = '#017A76', iconPosition = 'left', className, style = {}, onToggleExpand, } = props;
33991
33991
  const [open, setOpen] = useState(expanded);
33992
33992
  React__default.useEffect(() => {
33993
33993
  setOpen(expanded);
@@ -34000,10 +34000,13 @@ const LuiAccordion = (props) => {
34000
34000
  onToggleExpand(!open);
34001
34001
  }
34002
34002
  };
34003
- return (React__default.createElement("details", { style: style, className: clsx('lui-accordion', className), open: open },
34003
+ const chevron = (React__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) }));
34004
+ const headingContent = React__default.isValidElement(heading) ? (heading) : (React__default.createElement("h4", { className: "accordion-heading", "data-testid": `lui-accordion-heading-${open}` }, heading));
34005
+ return (React__default.createElement("details", { style: style, className: clsx('lui-accordion', `lui-accordion--icon-${iconPosition}`, className), open: open },
34004
34006
  React__default.createElement("summary", { onClick: toggle, "data-testid": `lui-accordion-summary-${open}` },
34005
- React__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) }),
34006
- React__default.isValidElement(heading) ? (heading) : (React__default.createElement("h4", { className: "accordion-heading", "data-testid": `lui-accordion-heading-${open}` }, heading))),
34007
+ iconPosition === 'left' && chevron,
34008
+ headingContent,
34009
+ iconPosition === 'right' && chevron),
34007
34010
  children));
34008
34011
  };
34009
34012