@linzjs/lui 17.49.1 → 17.49.3

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
+ ## [17.49.3](https://github.com/linz/lui/compare/v17.49.2...v17.49.3) (2023-04-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * release restore icon ([#925](https://github.com/linz/lui/issues/925)) ([88d7720](https://github.com/linz/lui/commit/88d7720f0f00d5fe2bafb41b4f8feeb9db6070cf))
7
+
8
+ ## [17.49.2](https://github.com/linz/lui/compare/v17.49.1...v17.49.2) (2023-04-04)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * expose refs to allow for using tooltips with icons and checkboxes ([3c5ebd3](https://github.com/linz/lui/commit/3c5ebd3580547029d4b54647d766e0bd9ea7afa0))
14
+
1
15
  ## [17.49.1](https://github.com/linz/lui/compare/v17.49.0...v17.49.1) (2023-04-04)
2
16
 
3
17
 
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)" fill="#000"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6Zm4 18H6V4h7.17L18 8.83V20Z"/><path d="m16.72 9.4-1.17 1.17a4.477 4.477 0 0 0-3.77-2.07c-2.48 0-4.5 2.02-4.5 4.5s2.02 4.5 4.5 4.5a4.51 4.51 0 0 0 4.12-2.7h-1.55a3.14 3.14 0 0 1-2.58 1.35 3.15 3.15 0 1 1 0-6.3c1.21 0 2.27.7 2.79 1.71L13.12 13h3.6V9.4Z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h24v24H0z"/></clipPath></defs></svg>
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare type LuiIconName = string | 'ic_account_circle' | 'ic_add' | 'ic_add_adopt' | 'ic_add_area_interest' | 'ic_add_circle' | 'ic_add_circle_outline' | 'ic_add_irregular_image' | 'ic_add_multiple' | 'ic_add_to_list' | 'ic_annotations' | 'ic_apps' | 'ic_arrow_back' | 'ic_arrow_back_ios' | 'ic_arrow_back_left' | 'ic_arrow_drop_down' | 'ic_arrow_drop_right' | 'ic_arrow_drop_up' | 'ic_arrow_forward_ios' | 'ic_arrow_forward_right' | 'ic_attach_file' | 'ic_attachment' | 'ic_auth_and_instruct' | 'ic_balance_parcel' | 'ic_blackwhite_greyscale' | 'ic_blocked' | 'ic_border_color' | 'ic_cancel_clear' | 'ic_certify_and_sign' | 'ic_change_password' | 'ic_check' | 'ic_check_circle' | 'ic_check_circle_outline' | 'ic_checklist' | 'ic_clear' | 'ic_close_list' | 'ic_columns' | 'ic_control_point' | 'ic_copy' | 'ic_corporate_fare' | 'ic_create' | 'ic_create_new_list' | 'ic_dealings' | 'ic_delete_outline' | 'ic_delete_solid' | 'ic_dollar_round' | 'ic_double_arrow_left' | 'ic_double_arrow_right' | 'ic_double_tick' | 'ic_drag_handle' | 'ic_drag_indicator' | 'ic_draw_irregular_line' | 'ic_enabled_users' | 'ic_error' | 'ic_error_outline' | 'ic_expand_less' | 'ic_expand_more' | 'ic_feedback_lightbulb' | 'ic_feedback_lightbulb_alt' | 'ic_file_attached' | 'ic_file_attached_outline' | 'ic_filter_list' | 'ic_flag' | 'ic_forward' | 'ic_fullscreen_frame' | 'ic_grid_view' | 'ic_help_outline' | 'ic_history' | 'ic_hourglass' | 'ic_info' | 'ic_info_outline' | 'ic_insert_invitation' | 'ic_insert_photo' | 'ic_instruments_roles' | 'ic_keyboard_arrow_down' | 'ic_keyboard_arrow_left' | 'ic_keyboard_arrow_right' | 'ic_keyboard_arrow_up' | 'ic_launch_modal' | 'ic_launch_new window_open' | 'ic_layers' | 'ic_left' | 'ic_left_col' | 'ic_line_arc' | 'ic_line_irregular' | 'ic_line_vector' | 'ic_link' | 'ic_list_add' | 'ic_list_notepad' | 'ic_list_view' | 'ic_lists_folder' | 'ic_locate' | 'ic_lock' | 'ic_lock_alt' | 'ic_log_out' | 'ic_manage_adjust' | 'ic_maori_land' | 'ic_mark_linking' | 'ic_marks' | 'ic_memorials' | 'ic_menu' | 'ic_message_received' | 'ic_minimise' | 'ic_misclose_error' | 'ic_more_vert' | 'ic_navigate_before' | 'ic_navigate_next' | 'ic_note_add' | 'ic_notice_of_change' | 'ic_numbered_list' | 'ic_office_building_corporate' | 'ic_order_history' | 'ic_package' | 'ic_parcels_existing' | 'ic_parcels_new' | 'ic_pdf' | 'ic_pen_and_paper_sign' | 'ic_people_outline' | 'ic_person' | 'ic_person_add' | 'ic_picker' | 'ic_placeholder' | 'ic_plus_one' | 'ic_polygon_selection' | 'ic_pop_back' | 'ic_pre_validation' | 'ic_print' | 'ic_product_list' | 'ic_publish' | 'ic_regenerate' | 'ic_release' | 'ic_remove_circle' | 'ic_remove_circle_outline' | 'ic_request' | 'ic_requisitions' | 'ic_round_selection' | 'ic_save_as' | 'ic_save_download' | 'ic_saved_area_interest' | 'ic_search' | 'ic_send' | 'ic_send_email_dart' | 'ic_separator' | 'ic_settings' | 'ic_sorting_down_arrow_up' | 'ic_sorting_up_arrow_up' | 'ic_square_selection' | 'ic_subdirectory_arrow_right' | 'ic_submit' | 'ic_survey' | 'ic_survey_report' | 'ic_ta_request_sent' | 'ic_table_columns' | 'ic_tax_statement' | 'ic_tick' | 'ic_tick_and_cross' | 'ic_timeline' | 'ic_title_allocation_swap' | 'ic_tune_setting_configure' | 'ic_unlink' | 'ic_unlock' | 'ic_upload' | 'ic_vector' | 'ic_vector_sequence' | 'ic_view' | 'ic_view_list' | 'ic_view_quilt' | 'ic_view_sidebar' | 'ic_view_week' | 'ic_visiblity_off' | 'ic_warning' | 'ic_warning_outline' | 'ic_waves' | 'ic_whats_new_updates' | 'ic_xml_file' | 'ic_zoom_centre' | 'ic_zoom_out' | 'ic_zoom_previous';
2
+ export declare type LuiIconName = string | 'ic_account_circle' | 'ic_add' | 'ic_add_adopt' | 'ic_add_area_interest' | 'ic_add_circle' | 'ic_add_circle_outline' | 'ic_add_irregular_image' | 'ic_add_multiple' | 'ic_add_to_list' | 'ic_annotations' | 'ic_apps' | 'ic_arrow_back' | 'ic_arrow_back_ios' | 'ic_arrow_back_left' | 'ic_arrow_drop_down' | 'ic_arrow_drop_right' | 'ic_arrow_drop_up' | 'ic_arrow_forward_ios' | 'ic_arrow_forward_right' | 'ic_attach_file' | 'ic_attachment' | 'ic_auth_and_instruct' | 'ic_balance_parcel' | 'ic_blackwhite_greyscale' | 'ic_blocked' | 'ic_border_color' | 'ic_cancel_clear' | 'ic_certify_and_sign' | 'ic_change_password' | 'ic_check' | 'ic_check_circle' | 'ic_check_circle_outline' | 'ic_checklist' | 'ic_clear' | 'ic_close_list' | 'ic_columns' | 'ic_control_point' | 'ic_copy' | 'ic_corporate_fare' | 'ic_create' | 'ic_create_new_list' | 'ic_dealings' | 'ic_delete_outline' | 'ic_delete_solid' | 'ic_dollar_round' | 'ic_double_arrow_left' | 'ic_double_arrow_right' | 'ic_double_tick' | 'ic_drag_handle' | 'ic_drag_indicator' | 'ic_draw_irregular_line' | 'ic_enabled_users' | 'ic_error' | 'ic_error_outline' | 'ic_expand_less' | 'ic_expand_more' | 'ic_feedback_lightbulb' | 'ic_feedback_lightbulb_alt' | 'ic_file_attached' | 'ic_file_attached_outline' | 'ic_filter_list' | 'ic_flag' | 'ic_forward' | 'ic_fullscreen_frame' | 'ic_grid_view' | 'ic_help_outline' | 'ic_history' | 'ic_hourglass' | 'ic_info' | 'ic_info_outline' | 'ic_insert_invitation' | 'ic_insert_photo' | 'ic_instruments_roles' | 'ic_keyboard_arrow_down' | 'ic_keyboard_arrow_left' | 'ic_keyboard_arrow_right' | 'ic_keyboard_arrow_up' | 'ic_launch_modal' | 'ic_launch_new window_open' | 'ic_layers' | 'ic_left' | 'ic_left_col' | 'ic_line_arc' | 'ic_line_irregular' | 'ic_line_vector' | 'ic_link' | 'ic_list_add' | 'ic_list_notepad' | 'ic_list_view' | 'ic_lists_folder' | 'ic_locate' | 'ic_lock' | 'ic_lock_alt' | 'ic_log_out' | 'ic_manage_adjust' | 'ic_maori_land' | 'ic_mark_linking' | 'ic_marks' | 'ic_memorials' | 'ic_menu' | 'ic_message_received' | 'ic_minimise' | 'ic_misclose_error' | 'ic_more_vert' | 'ic_navigate_before' | 'ic_navigate_next' | 'ic_note_add' | 'ic_notice_of_change' | 'ic_numbered_list' | 'ic_office_building_corporate' | 'ic_order_history' | 'ic_package' | 'ic_parcels_existing' | 'ic_parcels_new' | 'ic_pdf' | 'ic_pen_and_paper_sign' | 'ic_people_outline' | 'ic_person' | 'ic_person_add' | 'ic_picker' | 'ic_placeholder' | 'ic_plus_one' | 'ic_polygon_selection' | 'ic_pop_back' | 'ic_pre_validation' | 'ic_print' | 'ic_product_list' | 'ic_publish' | 'ic_regenerate' | 'ic_release' | 'ic_remove_circle' | 'ic_remove_circle_outline' | 'ic_request' | 'ic_requisitions' | 'ic_restore' | 'ic_round_selection' | 'ic_save_as' | 'ic_save_download' | 'ic_saved_area_interest' | 'ic_search' | 'ic_send' | 'ic_send_email_dart' | 'ic_separator' | 'ic_settings' | 'ic_sorting_down_arrow_up' | 'ic_sorting_up_arrow_up' | 'ic_square_selection' | 'ic_subdirectory_arrow_right' | 'ic_submit' | 'ic_survey' | 'ic_survey_report' | 'ic_ta_request_sent' | 'ic_table_columns' | 'ic_tax_statement' | 'ic_tick' | 'ic_tick_and_cross' | 'ic_timeline' | 'ic_title_allocation_swap' | 'ic_tune_setting_configure' | 'ic_unlink' | 'ic_unlock' | 'ic_upload' | 'ic_vector' | 'ic_vector_sequence' | 'ic_view' | 'ic_view_list' | 'ic_view_quilt' | 'ic_view_sidebar' | 'ic_view_week' | 'ic_visiblity_off' | 'ic_warning' | 'ic_warning_outline' | 'ic_waves' | 'ic_whats_new_updates' | 'ic_xml_file' | 'ic_zoom_centre' | 'ic_zoom_out' | 'ic_zoom_previous';
3
3
  declare type IconNameElementMap = {
4
4
  [key in LuiIconName]?: JSX.Element;
5
5
  };
@@ -144,6 +144,7 @@ export type LuiIconName =
144
144
  | 'ic_remove_circle_outline'
145
145
  | 'ic_request'
146
146
  | 'ic_requisitions'
147
+ | 'ic_restore'
147
148
  | 'ic_round_selection'
148
149
  | 'ic_save_as'
149
150
  | 'ic_save_download'
@@ -1045,6 +1046,20 @@ iconMap['ic_requisitions'] = (
1045
1046
  </svg>
1046
1047
  );
1047
1048
 
1049
+ iconMap['ic_restore'] = (
1050
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
1051
+ <g clip-path="url(#a)">
1052
+ <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6Zm4 18H6V4h7.17L18 8.83V20Z" />
1053
+ <path d="m16.72 9.4-1.17 1.17a4.477 4.477 0 0 0-3.77-2.07c-2.48 0-4.5 2.02-4.5 4.5s2.02 4.5 4.5 4.5a4.51 4.51 0 0 0 4.12-2.7h-1.55a3.14 3.14 0 0 1-2.58 1.35 3.15 3.15 0 1 1 0-6.3c1.21 0 2.27.7 2.79 1.71L13.12 13h3.6V9.4Z" />
1054
+ </g>
1055
+ <defs>
1056
+ <clipPath id="a">
1057
+ <path d="M0 0h24v24H0z" />
1058
+ </clipPath>
1059
+ </defs>
1060
+ </svg>
1061
+ );
1062
+
1048
1063
  iconMap['ic_round_selection'] = (
1049
1064
  <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
1050
1065
  <path d="M21.02 17H19v-2.02c0-.54-.44-.98-.98-.98h-.03c-.55 0-.99.44-.99.98V17h-2.01c-.54 0-.98.44-.99.98v.03c0 .55.44.99.99.99H17v2.01c0 .54.44.99.99.98h.03c.54 0 .98-.44.98-.98V19h2.02c.54 0 .98-.44.98-.98v-.04c0-.54-.44-.98-.98-.98Z" />
@@ -12,4 +12,4 @@ export interface LuiCheckboxProps {
12
12
  titleAttribute?: string;
13
13
  mandatory?: boolean;
14
14
  }
15
- export declare const LuiCheckboxInput: (props: LuiCheckboxProps) => JSX.Element;
15
+ export declare const LuiCheckboxInput: React.ForwardRefExoticComponent<LuiCheckboxProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,5 +1,5 @@
1
1
  import { ICONS } from '../../assets/svg-content';
2
- import { InputHTMLAttributes } from 'react';
2
+ import React, { InputHTMLAttributes } from 'react';
3
3
  export declare type IconSize = keyof typeof ICON_SIZES;
4
4
  export declare type IconStatus = keyof typeof ICON_STATUS;
5
5
  export declare type IconName = keyof typeof ICONS;
@@ -32,4 +32,4 @@ export declare const ICON_STATUS: {
32
32
  interactive: string;
33
33
  disabled: string;
34
34
  };
35
- export declare const LuiIcon: ({ name, className, size, title, alt, status, spanProps, color, }: LuiIconProps) => JSX.Element | null;
35
+ export declare const LuiIcon: React.ForwardRefExoticComponent<LuiIconProps & React.RefAttributes<HTMLSpanElement>>;
package/dist/index.js CHANGED
@@ -458,6 +458,13 @@ iconMap['ic_request'] = (React__default["default"].createElement("svg", { viewBo
458
458
  React__default["default"].createElement("path", { d: "M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h9v-2H4V8l8 5 8-5v5h2V6c0-1.1-.9-2-2-2Zm-8 7L4 6h16l-8 5Zm7 4 4 4-4 4v-3h-4v-2h4v-3Z" })));
459
459
  iconMap['ic_requisitions'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
460
460
  React__default["default"].createElement("path", { d: "M4 2h16c1.1 0 1.99.9 1.99 2L22 22l-4-4H4c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2Zm0 14h14.83l.59.59.58.58V4H4v12Zm9-4h-2v2h2v-2Zm0-6h-2v4h2V6Z" })));
461
+ iconMap['ic_restore'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
462
+ React__default["default"].createElement("g", { "clip-path": "url(#a)" },
463
+ React__default["default"].createElement("path", { d: "M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6Zm4 18H6V4h7.17L18 8.83V20Z" }),
464
+ React__default["default"].createElement("path", { d: "m16.72 9.4-1.17 1.17a4.477 4.477 0 0 0-3.77-2.07c-2.48 0-4.5 2.02-4.5 4.5s2.02 4.5 4.5 4.5a4.51 4.51 0 0 0 4.12-2.7h-1.55a3.14 3.14 0 0 1-2.58 1.35 3.15 3.15 0 1 1 0-6.3c1.21 0 2.27.7 2.79 1.71L13.12 13h3.6V9.4Z" })),
465
+ React__default["default"].createElement("defs", null,
466
+ React__default["default"].createElement("clipPath", { id: "a" },
467
+ React__default["default"].createElement("path", { d: "M0 0h24v24H0z" })))));
461
468
  iconMap['ic_round_selection'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
462
469
  React__default["default"].createElement("path", { d: "M21.02 17H19v-2.02c0-.54-.44-.98-.98-.98h-.03c-.55 0-.99.44-.99.98V17h-2.01c-.54 0-.98.44-.99.98v.03c0 .55.44.99.99.99H17v2.01c0 .54.44.99.99.98h.03c.54 0 .98-.44.98-.98V19h2.02c.54 0 .98-.44.98-.98v-.04c0-.54-.44-.98-.98-.98Z" }),
463
470
  React__default["default"].createElement("path", { d: "M12.98 21.953a10.12 10.12 0 0 1-1.96 0l.193-1.991a8.1 8.1 0 0 0 1.574 0l.193 1.99Zm-3.884-.381.58-1.914a7.947 7.947 0 0 1-1.446-.6l-.945 1.763c.573.307 1.179.56 1.811.75Zm-3.44-1.842 1.27-1.545a8.062 8.062 0 0 1-1.111-1.11L4.27 18.343c.415.506.88.97 1.386 1.386Zm-2.477-3.015 1.763-.944a7.938 7.938 0 0 1-.6-1.447l-1.914.58a9.93 9.93 0 0 0 .751 1.81ZM2.047 12.98l1.991-.193a8.12 8.12 0 0 1 0-1.574l-1.99-.193a10.123 10.123 0 0 0 0 1.96Zm.381-3.884 1.914.58c.153-.505.355-.989.6-1.446l-1.763-.945a9.938 9.938 0 0 0-.75 1.811Zm1.842-3.44 1.545 1.27a8.06 8.06 0 0 1 1.11-1.111L5.657 4.27c-.506.415-.97.88-1.386 1.386Zm3.015-2.477.945 1.763a7.938 7.938 0 0 1 1.446-.6l-.58-1.914a9.938 9.938 0 0 0-1.81.751Zm3.735-1.132a10.123 10.123 0 0 1 1.96 0l-.193 1.991a8.12 8.12 0 0 0-1.574 0l-.193-1.99Zm3.884.381-.58 1.914c.505.153.989.355 1.447.6l.944-1.763a9.936 9.936 0 0 0-1.811-.75Zm3.44 1.842-1.27 1.545c.406.333.778.705 1.111 1.11l1.545-1.269a10.06 10.06 0 0 0-1.386-1.386Zm2.477 3.015-1.763.945c.245.457.447.941.6 1.446l1.914-.58a9.937 9.937 0 0 0-.751-1.81Zm1.131 3.735-1.99.193a8.1 8.1 0 0 1 0 1.574l1.99.194a10.123 10.123 0 0 0 0-1.961Z" })));
@@ -570,8 +577,8 @@ var ICON_STATUS = {
570
577
  interactive: 'LuiIcon--interactive',
571
578
  disabled: 'LuiIcon--disabled'
572
579
  };
573
- var LuiIcon = function (_a) {
574
- var name = _a.name, className = _a.className, _b = _a.size, size = _b === void 0 ? 'ns' : _b, title = _a.title, alt = _a.alt, _c = _a.status, status = _c === void 0 ? 'none' : _c, spanProps = _a.spanProps, color = _a.color;
580
+ var LuiIcon = React.forwardRef(function (props, ref) {
581
+ var name = props.name, className = props.className, _a = props.size, size = _a === void 0 ? 'ns' : _a, title = props.title, alt = props.alt, _b = props.status, status = _b === void 0 ? 'none' : _b, spanProps = props.spanProps, color = props.color;
575
582
  var iconSVG = ICONS[name];
576
583
  if (!iconSVG) {
577
584
  console.warn("<LuiIcon>: No icon found for: ".concat(iconSVG));
@@ -579,8 +586,8 @@ var LuiIcon = function (_a) {
579
586
  }
580
587
  var customStyle = color
581
588
  ? __assign(__assign({}, spanProps === null || spanProps === void 0 ? void 0 : spanProps.style), { fill: color }) : spanProps === null || spanProps === void 0 ? void 0 : spanProps.style;
582
- return (React__namespace.createElement("span", __assign({ className: clsx('LuiIcon', className, size && ICON_SIZES[size], status && ICON_STATUS[status]), "data-icon": name, title: title, "aria-label": alt }, spanProps, { style: customStyle }), iconSVG));
583
- };
589
+ return (React__default["default"].createElement("span", __assign({ ref: ref, className: clsx('LuiIcon', className, size && ICON_SIZES[size], status && ICON_STATUS[status]), "data-icon": name, title: title, "aria-label": alt }, spanProps, { style: customStyle }), iconSVG));
590
+ });
584
591
 
585
592
  function getMaterialIconForLevel(level) {
586
593
  switch (level) {
@@ -28181,10 +28188,10 @@ var LuiTextInput = React.forwardRef(function (props, ref) {
28181
28188
  props.warning)))));
28182
28189
  });
28183
28190
 
28184
- var LuiCheckboxInput = function (props) {
28191
+ var LuiCheckboxInput = React.forwardRef(function (props, ref) {
28185
28192
  var _a;
28186
28193
  var id = useGenerateOrDefaultId((_a = props.inputProps) === null || _a === void 0 ? void 0 : _a.id);
28187
- return (React__default["default"].createElement("div", { className: clsx('LuiCheckboxInput', {
28194
+ return (React__default["default"].createElement("div", { ref: ref, className: clsx('LuiCheckboxInput', {
28188
28195
  'LuiCheckboxInput--isChecked': props.isChecked,
28189
28196
  'LuiCheckboxInput--hasError': !!props.error,
28190
28197
  'LuiCheckboxInput--isDisabled': !!props.isDisabled
@@ -28196,7 +28203,7 @@ var LuiCheckboxInput = function (props) {
28196
28203
  props.label,
28197
28204
  React__default["default"].createElement(LuiIcon, { name: props.isIndeterminate ? 'ic_zoom_out' : 'ic_check', size: "md", alt: props.isIndeterminate ? 'Indeterminate Check' : 'Check', className: "LuiCheckboxInput-labelCheck", title: props.titleAttribute }))),
28198
28205
  props.error && (React__default["default"].createElement(LuiError, { className: "LuiCheckboxInput", error: props.error }))));
28199
- };
28206
+ });
28200
28207
 
28201
28208
  var LuiFileInputBox = function (props) {
28202
28209
  var _a = React.useState(), file = _a[0], setFile = _a[1];