@linzjs/lui 21.20.0 → 21.22.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,17 @@
1
+ # [21.22.0](https://github.com/linz/lui/compare/v21.21.0...v21.22.0) (2024-02-15)
2
+
3
+
4
+ ### Features
5
+
6
+ * fixed icons ([#1096](https://github.com/linz/lui/issues/1096)) ([8c6e6e8](https://github.com/linz/lui/commit/8c6e6e8d82540fa69a57acfef7ab00e41c3d6fa0))
7
+
8
+ # [21.21.0](https://github.com/linz/lui/compare/v21.20.0...v21.21.0) (2024-02-13)
9
+
10
+
11
+ ### Features
12
+
13
+ * **LuiTab:** exposes button props ([#1095](https://github.com/linz/lui/issues/1095)) ([476aac1](https://github.com/linz/lui/commit/476aac1608298588c8854c9055bc25d1db549d18))
14
+
1
15
  # [21.20.0](https://github.com/linz/lui/compare/v21.19.0...v21.20.0) (2024-02-12)
2
16
 
3
17
 
@@ -1 +1,9 @@
1
- <svg viewBox="0 0 24 24"><path d="M7 2v4.5l2 2V8h3v2h-2v2h2v2h-2v2h2v2h-2v2h4v-9h5V2H7zm5 4H9V4h3v2zm5 4h-3V8h3v2zm0-4h-3V4h3v2z"/><path d="m6 7 3 3v12H3V10l3-3zm-1 3v2h2v-2H5zm2 4v2H5v-2h2zm0 4v2H5v-2h2zm14-6h-6v10h6V12zm-2 2h-2v2h2v-2zm-2 4h2v2h-2v-2z"/></svg>
1
+
2
+ <svg
3
+ viewBox="0 0 24 24">
4
+ <g>
5
+ <path d="M19,2H7v4.5l2,2V8h3v2h-2v2h2v2h-2v2h2v2h-2v2h4v-9h5V2z M12,6H9V4h3V6z M17,10h-3V8h3V10z M17,6h-3V4h3V6z"/>
6
+ <path d="M3,10v12h6V10L6,7L3,10z M7,20H5v-2h2V20z M7,16H5v-2h2V16z M7,12H5v-2h2V12z"/>
7
+ <path d="M15,12v10h6V12H15z M19,20h-2v-2h2V20z M19,16h-2v-2h2V16z"/>
8
+ </g>
9
+ </svg>
@@ -1 +1,6 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6 2h8l6 6v12c0 1.1-.9 2-2 2H5.99C4.89 22 4 21.1 4 20l.01-16c0-1.1.89-2 1.99-2Zm0 2v8h12V9h-5V4H6Zm-.98 15 1.513-2.51L5 14h1.433l.897 1.46.79-1.46h1.433l-1.547 2.55L9.52 19H8.087l-.87-1.407L6.452 19H5.02Zm4.804 0 .59-5h1.218l1.024 3.513L13.681 14h1.205l.596 5H14.23l-.322-2.698L13.252 19h-1.218l-.65-2.638L11.076 19H9.824Zm6.39-.31c.206.207.534.31.985.31H19v-1.17h-1.446c-.232 0-.348-.118-.348-.35V14h-1.3v3.701c0 .453.103.783.309.99Z"/></svg>
1
+ <svg viewBox="0 0 24 24">
2
+ <path d="M14,2H6C4.9,2,4,2.9,4,4l0,16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8L14,2z M6,4h7v5h5v3H6V4z M9.5,19H8.1
3
+ l-0.9-1.4L6.5,19H5l1.5-2.5L5,14h1.4l0.9,1.5L8.1,14h1.4L8,16.5L9.5,19z M14.2,19l-0.3-2.7L13.3,19H12l-0.7-2.6L11.1,19H9.8l0.6-5
4
+ h1.2l1,3.5l1-3.5h1.2l0.6,5H14.2z M19,19h-1.8c-0.5,0-0.8-0.1-1-0.3c0,0,0,0,0,0l0,0c0,0,0,0,0,0c-0.2-0.2-0.3-0.5-0.3-1V14h1.3v3.5
5
+ c0,0.2,0.1,0.4,0.3,0.4H19V19z"/>
6
+ </svg>
@@ -637,8 +637,11 @@ iconMap['ic_data_display_threshold'] = (
637
637
 
638
638
  iconMap['ic_data_display_threshold_high_urban'] = (
639
639
  <svg viewBox="0 0 24 24">
640
- <path d="M7 2v4.5l2 2V8h3v2h-2v2h2v2h-2v2h2v2h-2v2h4v-9h5V2H7zm5 4H9V4h3v2zm5 4h-3V8h3v2zm0-4h-3V4h3v2z" />
641
- <path d="m6 7 3 3v12H3V10l3-3zm-1 3v2h2v-2H5zm2 4v2H5v-2h2zm0 4v2H5v-2h2zm14-6h-6v10h6V12zm-2 2h-2v2h2v-2zm-2 4h2v2h-2v-2z" />
640
+ <g>
641
+ <path d="M19,2H7v4.5l2,2V8h3v2h-2v2h2v2h-2v2h2v2h-2v2h4v-9h5V2z M12,6H9V4h3V6z M17,10h-3V8h3V10z M17,6h-3V4h3V6z" />
642
+ <path d="M3,10v12h6V10L6,7L3,10z M7,20H5v-2h2V20z M7,16H5v-2h2V16z M7,12H5v-2h2V12z" />
643
+ <path d="M15,12v10h6V12H15z M19,20h-2v-2h2V20z M19,16h-2v-2h2V16z" />
644
+ </g>
642
645
  </svg>
643
646
  );
644
647
 
@@ -1885,8 +1888,13 @@ iconMap['ic_whats_new_updates'] = (
1885
1888
  );
1886
1889
 
1887
1890
  iconMap['ic_xml_file'] = (
1888
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
1889
- <path d="M6 2h8l6 6v12c0 1.1-.9 2-2 2H5.99C4.89 22 4 21.1 4 20l.01-16c0-1.1.89-2 1.99-2Zm0 2v8h12V9h-5V4H6Zm-.98 15 1.513-2.51L5 14h1.433l.897 1.46.79-1.46h1.433l-1.547 2.55L9.52 19H8.087l-.87-1.407L6.452 19H5.02Zm4.804 0 .59-5h1.218l1.024 3.513L13.681 14h1.205l.596 5H14.23l-.322-2.698L13.252 19h-1.218l-.65-2.638L11.076 19H9.824Zm6.39-.31c.206.207.534.31.985.31H19v-1.17h-1.446c-.232 0-.348-.118-.348-.35V14h-1.3v3.701c0 .453.103.783.309.99Z" />
1891
+ <svg viewBox="0 0 24 24">
1892
+ <path
1893
+ d="M14,2H6C4.9,2,4,2.9,4,4l0,16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8L14,2z M6,4h7v5h5v3H6V4z M9.5,19H8.1
1894
+ l-0.9-1.4L6.5,19H5l1.5-2.5L5,14h1.4l0.9,1.5L8.1,14h1.4L8,16.5L9.5,19z M14.2,19l-0.3-2.7L13.3,19H12l-0.7-2.6L11.1,19H9.8l0.6-5
1895
+ h1.2l1,3.5l1-3.5h1.2l0.6,5H14.2z M19,19h-1.8c-0.5,0-0.8-0.1-1-0.3c0,0,0,0,0,0l0,0c0,0,0,0,0,0c-0.2-0.2-0.3-0.5-0.3-1V14h1.3v3.5
1896
+ c0,0.2,0.1,0.4,0.3,0.4H19V19z"
1897
+ />
1890
1898
  </svg>
1891
1899
  );
1892
1900
 
@@ -1,11 +1,11 @@
1
- import React, { MouseEvent } from 'react';
2
- interface LuiTabProps {
1
+ import React, { ButtonHTMLAttributes, MouseEvent } from 'react';
2
+ export interface LuiTabProps {
3
3
  onClick: (e: MouseEvent) => void | (() => void);
4
4
  active: boolean;
5
5
  id: string;
6
6
  ariaControls: string;
7
7
  titleAttribute?: string;
8
8
  children: React.ReactNode;
9
+ buttonProps?: Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'id' | 'aria-selected' | 'aria-controls' | 'title' | 'onClick' | 'children'>;
9
10
  }
10
11
  export declare const LuiTab: React.FC<React.PropsWithChildren<LuiTabProps>>;
11
- export {};
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- interface LuiTabsPanelSwitch {
2
+ import { LuiTabProps } from '../LuiTab/LuiTab';
3
+ interface LuiTabsPanelSwitch extends Omit<LuiTabProps, 'id' | 'ariaControls' | 'active' | 'onClick' | 'children'> {
3
4
  targetPanel: string;
4
5
  setActivePanel?: (targetPanel: string) => {};
5
6
  }
package/dist/index.js CHANGED
@@ -290,8 +290,10 @@ iconMap['ic_data_display_threshold'] = (React__default["default"].createElement(
290
290
  React__default["default"].createElement("path", { d: "M21 4a1 1 0 0 0-1.371-.928l-4.66 1.863-5.653-1.884a1 1 0 0 0-.687.02l-5 2A1 1 0 0 0 3 6v14a1 1 0 0 0 1.371.928l4.66-1.864 1.153.385a1 1 0 0 0 .632-1.898l-1.473-.49L9 15l-.343 2.06-.028.012L5 18.523V6.677l3.7-1.48L9 7l.307-1.843 5.35 1.783L15 9l.344-2.06.027-.012L19 5.477V10a1 1 0 1 0 2 0V4Z" }),
291
291
  React__default["default"].createElement("path", { d: "m21.1 21.5-3.2-3.2c-.35.2-.725.367-1.125.5s-.825.2-1.275.2c-1.25 0-2.313-.438-3.188-1.313C11.438 16.813 11 15.75 11 14.5c0-1.25.438-2.313 1.313-3.188C13.187 10.438 14.25 10 15.5 10c1.25 0 2.313.438 3.188 1.313C19.563 12.187 20 13.25 20 14.5c0 .45-.067.875-.2 1.275-.133.4-.3.775-.5 1.125l3.2 3.2-1.4 1.4ZM15.5 17c.7 0 1.292-.242 1.775-.725.483-.483.725-1.075.725-1.775s-.242-1.292-.725-1.775C16.792 12.242 16.2 12 15.5 12s-1.292.242-1.775.725C13.242 13.208 13 13.8 13 14.5s.242 1.292.725 1.775c.483.483 1.075.725 1.775.725Z" })));
292
292
  iconMap['ic_data_display_threshold_high_urban'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24" },
293
- React__default["default"].createElement("path", { d: "M7 2v4.5l2 2V8h3v2h-2v2h2v2h-2v2h2v2h-2v2h4v-9h5V2H7zm5 4H9V4h3v2zm5 4h-3V8h3v2zm0-4h-3V4h3v2z" }),
294
- React__default["default"].createElement("path", { d: "m6 7 3 3v12H3V10l3-3zm-1 3v2h2v-2H5zm2 4v2H5v-2h2zm0 4v2H5v-2h2zm14-6h-6v10h6V12zm-2 2h-2v2h2v-2zm-2 4h2v2h-2v-2z" })));
293
+ React__default["default"].createElement("g", null,
294
+ React__default["default"].createElement("path", { d: "M19,2H7v4.5l2,2V8h3v2h-2v2h2v2h-2v2h2v2h-2v2h4v-9h5V2z M12,6H9V4h3V6z M17,10h-3V8h3V10z M17,6h-3V4h3V6z" }),
295
+ React__default["default"].createElement("path", { d: "M3,10v12h6V10L6,7L3,10z M7,20H5v-2h2V20z M7,16H5v-2h2V16z M7,12H5v-2h2V12z" }),
296
+ React__default["default"].createElement("path", { d: "M15,12v10h6V12H15z M19,20h-2v-2h2V20z M19,16h-2v-2h2V16z" }))));
295
297
  iconMap['ic_data_display_threshold_low_large_rural'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24" },
296
298
  ' ',
297
299
  React__default["default"].createElement("path", { d: "M8 12h.5c1.4 0 2.5-1.2 2.5-2.7 0-1.1-.6-2-1.5-2.4v-.2C9.5 5.2 8.4 4 7 4S4.5 5.2 4.5 6.7v.2C3.6 7.3 3 8.2 3 9.3 3 10.8 4.1 12 5.5 12H6v2.5c-1.3-.3-2.6-.5-4-.5v2c2.6 0 6.4.9 9 3.4v-2.6c-.9-.7-1.9-1.2-3-1.6V12zM6.1 7.8l-.1-1v-.1c0-.7.5-1.2 1-1.2s1 .4 1 1.2v.1l-.1 1 .9.4c.3.2.6.6.6 1.1 0 .7-.5 1.2-1 1.2h-3c-.5 0-1-.4-1-1.2 0-.5.3-.9.6-1.1l1.1-.4zM21 12V9h-2v1l-2-2-6 6 1 1v6h10v-6l1-1-2-2zm-1 7h-2v-3h-2v3h-2v-5l3-3 3 3v5z" })));
@@ -748,8 +750,8 @@ iconMap['ic_waves'] = (React__default["default"].createElement("svg", { viewBox:
748
750
  React__default["default"].createElement("path", { d: "M17 14.9c-1.35 0-2.2.42-2.95.8-.65.33-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.38-1.57-.8-2.95-.8-1.38 0-2.2.42-2.95.8-.65.33-1.17.6-2.05.6v1.95c1.35 0 2.2-.42 2.95-.8.65-.33 1.17-.6 2.05-.6.88 0 1.4.25 2.05.6.75.38 1.57.8 2.95.8 1.38 0 2.2-.42 2.95-.8.65-.33 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8V16.3c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8Zm0-4.45c-1.35 0-2.2.43-2.95.8-.65.32-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.38-1.57-.8-2.95-.8-1.38 0-2.2.43-2.95.8-.65.32-1.17.6-2.05.6v1.95c1.35 0 2.2-.43 2.95-.8.65-.35 1.15-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.57.8 2.95.8 1.38 0 2.2-.43 2.95-.8.65-.35 1.15-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8v-1.95c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8ZM17 6c-1.35 0-2.2.43-2.95.8-.65.35-1.15.6-2.05.6-.9 0-1.4-.25-2.05-.6C9.2 6.42 8.38 6 7 6c-1.38 0-2.2.43-2.95.8-.65.35-1.15.6-2.05.6v1.95c1.35 0 2.2-.43 2.95-.8.65-.32 1.18-.6 2.05-.6.87 0 1.4.25 2.05.6.75.38 1.57.8 2.95.8 1.38 0 2.2-.43 2.95-.8.65-.32 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8V7.4c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8Z" })));
749
751
  iconMap['ic_whats_new_updates'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
750
752
  React__default["default"].createElement("path", { d: "m23 12-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12Zm-4.51 2.11.26 2.79-2.74.62-1.43 2.41L12 18.82l-2.58 1.11-1.43-2.41-2.74-.62.26-2.8L3.66 12l1.85-2.12-.26-2.78 2.74-.61 1.43-2.41L12 5.18l2.58-1.11 1.43 2.41 2.74.62-.26 2.79L20.34 12l-1.85 2.11ZM11 15h2v2h-2v-2Zm0-8h2v6h-2V7Z" })));
751
- iconMap['ic_xml_file'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
752
- React__default["default"].createElement("path", { d: "M6 2h8l6 6v12c0 1.1-.9 2-2 2H5.99C4.89 22 4 21.1 4 20l.01-16c0-1.1.89-2 1.99-2Zm0 2v8h12V9h-5V4H6Zm-.98 15 1.513-2.51L5 14h1.433l.897 1.46.79-1.46h1.433l-1.547 2.55L9.52 19H8.087l-.87-1.407L6.452 19H5.02Zm4.804 0 .59-5h1.218l1.024 3.513L13.681 14h1.205l.596 5H14.23l-.322-2.698L13.252 19h-1.218l-.65-2.638L11.076 19H9.824Zm6.39-.31c.206.207.534.31.985.31H19v-1.17h-1.446c-.232 0-.348-.118-.348-.35V14h-1.3v3.701c0 .453.103.783.309.99Z" })));
753
+ iconMap['ic_xml_file'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24" },
754
+ React__default["default"].createElement("path", { d: "M14,2H6C4.9,2,4,2.9,4,4l0,16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8L14,2z M6,4h7v5h5v3H6V4z M9.5,19H8.1\n\tl-0.9-1.4L6.5,19H5l1.5-2.5L5,14h1.4l0.9,1.5L8.1,14h1.4L8,16.5L9.5,19z M14.2,19l-0.3-2.7L13.3,19H12l-0.7-2.6L11.1,19H9.8l0.6-5\n\th1.2l1,3.5l1-3.5h1.2l0.6,5H14.2z M19,19h-1.8c-0.5,0-0.8-0.1-1-0.3c0,0,0,0,0,0l0,0c0,0,0,0,0,0c-0.2-0.2-0.3-0.5-0.3-1V14h1.3v3.5\n\tc0,0.2,0.1,0.4,0.3,0.4H19V19z" })));
753
755
  iconMap['ic_zoom_centre'] = (React__default["default"].createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
754
756
  React__default["default"].createElement("path", { d: "M17 12c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5 5-2.24 5-5zm-5 3c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3zm-7 0H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z" })));
755
757
  iconMap['ic_zoom_out'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
@@ -31659,7 +31661,7 @@ var LuiTabs = function (props) {
31659
31661
  };
31660
31662
 
31661
31663
  var LuiTab = function (props) {
31662
- return (React__default["default"].createElement("button", { 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.children));
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));
31663
31665
  };
31664
31666
 
31665
31667
  // import './LuiTabsGroup.scss';
@@ -31681,12 +31683,13 @@ var LuiTabsPanel = function (_a) {
31681
31683
  };
31682
31684
 
31683
31685
  var LuiTabsPanelSwitch = function (props) {
31686
+ var targetPanel = props.targetPanel; props.setActivePanel; var children = props.children, tabProps = __rest(props, ["targetPanel", "setActivePanel", "children"]);
31684
31687
  var context = React.useContext(LuiTabsContext);
31685
- var active = context.activePanel === props.targetPanel;
31686
- return (React__default["default"].createElement(LuiTab, { id: "".concat(props.targetPanel, "-tab"), ariaControls: "".concat(props.targetPanel, "-tab-panel"), active: active, onClick: function () {
31688
+ var active = context.activePanel === targetPanel;
31689
+ return (React__default["default"].createElement(LuiTab, __assign({ id: "".concat(targetPanel, "-tab"), ariaControls: "".concat(targetPanel, "-tab-panel"), active: active, onClick: function () {
31687
31690
  if (context.setActivePanel)
31688
- context.setActivePanel(props.targetPanel);
31689
- } }, props.children));
31691
+ context.setActivePanel(targetPanel);
31692
+ } }, tabProps), children));
31690
31693
  };
31691
31694
 
31692
31695
  var css_248z$g = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.LuiError {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: 600;\n margin-bottom: 0.5rem;\n font-size: 0.875rem;\n line-height: 1.5rem;\n color: #2a292c;\n}\n.LuiError-errorIcon {\n vertical-align: middle;\n display: inline-block;\n}\n.LuiError-errorText {\n margin-left: 0.5rem;\n}";