@linzjs/lui 21.23.1 → 21.24.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 CHANGED
@@ -1,3 +1,10 @@
1
+ # [21.24.0](https://github.com/linz/lui/compare/v21.23.1...v21.24.0) (2024-02-28)
2
+
3
+
4
+ ### Features
5
+
6
+ * **LuiTab errors:** create release for single tab to error state ([#1100](https://github.com/linz/lui/issues/1100)) ([2ce2fef](https://github.com/linz/lui/commit/2ce2fef18551183f3a609d483a01f8bfbfce1faf))
7
+
1
8
  ## [21.23.1](https://github.com/linz/lui/compare/v21.23.0...v21.23.1) (2024-02-22)
2
9
 
3
10
 
@@ -2,6 +2,7 @@ import React, { ButtonHTMLAttributes, MouseEvent } from 'react';
2
2
  export interface LuiTabProps {
3
3
  onClick: (e: MouseEvent) => void | (() => void);
4
4
  active: boolean;
5
+ inError?: boolean;
5
6
  id: string;
6
7
  ariaControls: string;
7
8
  titleAttribute?: string;
package/dist/index.js CHANGED
@@ -31661,7 +31661,9 @@ var LuiTabs = function (props) {
31661
31661
  };
31662
31662
 
31663
31663
  var LuiTab = function (props) {
31664
- return (React__default["default"].createElement("button", __assign({ className: clsx('LuiTab', props.active && 'LuiTab--active'), id: props.id, role: "tab", type: "button", "aria-selected": props.active, "aria-controls": "".concat(props.ariaControls), title: props.titleAttribute, onClick: props.onClick }, props.buttonProps), props.children));
31664
+ return (React__default["default"].createElement("button", __assign({ className: clsx('LuiTab', props.active && 'LuiTab--active', props.inError && 'LuiTab--error'), id: props.id, role: "tab", type: "button", "aria-selected": props.active, "aria-controls": "".concat(props.ariaControls), title: props.titleAttribute, onClick: props.onClick }, props.buttonProps),
31665
+ props.inError && (React__default["default"].createElement(LuiIcon, { name: "ic_error_outline", size: "md", className: "tabErrorIcon", alt: "There is an error in this tabs content" })),
31666
+ props.children));
31665
31667
  };
31666
31668
 
31667
31669
  // import './LuiTabsGroup.scss';