@linzjs/lui 17.33.2 → 17.35.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,12 @@
1
+ # [17.35.0](https://github.com/linz/lui/compare/v17.34.0...v17.35.0) (2023-02-14)
2
+
3
+
4
+ ### Features
5
+
6
+ * **LuiDateInput:** Add date picker ([#814](https://github.com/linz/lui/issues/814)) ([a0411b1](https://github.com/linz/lui/commit/a0411b1bd741e0f419047e011b3593ce5b166253))
7
+
8
+ # [17.34.0](https://github.com/linz/lui/compare/v17.33.2...v17.34.0) (2023-02-14)
9
+
1
10
  ## [17.33.2](https://github.com/linz/lui/compare/v17.33.1...v17.33.2) (2023-02-10)
2
11
 
3
12
 
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 17V8H3c-.8 0-1-.667-1-1V3c0-.8.667-1 1-1h10c.8 0 1 .667 1 1v4c0 .8-.667 1-1 1H7v2c0 .8.667 1 1 1h8v-1c0-.8.667-1 1-1h4c.8 0 1 .667 1 1v4c0 .8-.667 1-1 1h-4c-.8 0-1-.667-1-1v-1H7v4c0 .8.667 1 1 1h8v-1c0-.8.667-1 1-1h4c.8 0 1 .667 1 1v4c0 .8-.667 1-1 1h-4c-.8 0-1-.667-1-1v-1H8c-2.4 0-3-2-3-3Z" fill="#000"/></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_columns' | 'ic_control_point' | 'ic_copy' | 'ic_corporate_fare' | 'ic_create' | '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_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_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_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_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_columns' | 'ic_control_point' | 'ic_copy' | 'ic_corporate_fare' | 'ic_create' | '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_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_view' | '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_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_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
  };
@@ -94,6 +94,7 @@ export type LuiIconName =
94
94
  | 'ic_line_vector'
95
95
  | 'ic_link'
96
96
  | 'ic_list_add'
97
+ | 'ic_list_view'
97
98
  | 'ic_locate'
98
99
  | 'ic_lock'
99
100
  | 'ic_lock_alt'
@@ -702,6 +703,12 @@ iconMap['ic_list_add'] = (
702
703
  </svg>
703
704
  );
704
705
 
706
+ iconMap['ic_list_view'] = (
707
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
708
+ <path d="M5 17V8H3c-.8 0-1-.667-1-1V3c0-.8.667-1 1-1h10c.8 0 1 .667 1 1v4c0 .8-.667 1-1 1H7v2c0 .8.667 1 1 1h8v-1c0-.8.667-1 1-1h4c.8 0 1 .667 1 1v4c0 .8-.667 1-1 1h-4c-.8 0-1-.667-1-1v-1H7v4c0 .8.667 1 1 1h8v-1c0-.8.667-1 1-1h4c.8 0 1 .667 1 1v4c0 .8-.667 1-1 1h-4c-.8 0-1-.667-1-1v-1H8c-2.4 0-3-2-3-3Z" />
709
+ </svg>
710
+ );
711
+
705
712
  iconMap['ic_locate'] = (
706
713
  <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
707
714
  <path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4Zm8.94 3A8.994 8.994 0 0 0 13 3.06V2c0-.55-.45-1-1-1s-1 .45-1 1v1.06A8.994 8.994 0 0 0 3.06 11H2c-.55 0-1 .45-1 1s.45 1 1 1h1.06A8.994 8.994 0 0 0 11 20.94V22c0 .55.45 1 1 1s1-.45 1-1v-1.06A8.994 8.994 0 0 0 20.94 13H22c.55 0 1-.45 1-1s-.45-1-1-1h-1.06ZM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7Z" />
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare type Input = JSX.IntrinsicElements['input'];
3
+ declare type Props = Omit<Input, 'pattern' | 'type' | 'placeholder'>;
4
+ export declare const DateInput: React.ForwardRefExoticComponent<Pick<Props, "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "readOnly" | "required" | "size" | "src" | "step" | "value" | "width" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLInputElement>>;
5
+ export default DateInput;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare type ParseOptions = {
3
+ allowTwoDigitYear?: boolean;
4
+ };
5
+ export declare const parseTextDate: (value: JSX.IntrinsicElements['input']['value'], options?: ParseOptions) => string | undefined;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { LuiTextInput } from '../LuiTextInput/LuiTextInput';
3
+ declare type Props = Omit<Parameters<typeof LuiTextInput>[0], 'as'>;
4
+ export declare const LuiDateInput: ({ inputProps, ...rest }: Props) => JSX.Element;
5
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { ChangeEventHandler, DetailedHTMLProps, InputHTMLAttributes } from 'react';
2
2
  export interface LuiTextInputProps {
3
3
  onChange?: ChangeEventHandler<HTMLInputElement>;
4
- inputProps?: DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
4
+ inputProps?: Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'ref'>;
5
5
  error?: string;
6
6
  warning?: string;
7
7
  hideLabel?: boolean;
package/dist/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export { LuiFileInputBox } from './components/LuiFormElements/LuiFileInputBox/Lu
22
22
  export { LuiSelectInput } from './components/LuiFormElements/LuiSelectInput/LuiSelectInput';
23
23
  export { LuiTextAreaInput } from './components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput';
24
24
  export { LuiTextInput } from './components/LuiFormElements/LuiTextInput/LuiTextInput';
25
+ export { LuiDateInput } from './components/LuiFormElements/LuiDateInput/LuiDateInput';
25
26
  export { LuiRadioInput } from './components/LuiFormElements/LuiRadioInput/LuiRadioInput';
26
27
  export { LuiFormikCheckbox } from './components/LuiFormikForms/LuiFormikCheckbox/LuiFormikCheckbox';
27
28
  export { LuiFormikTextInput } from './components/LuiFormikForms/LuiFormikTextInput/LuiFormikTextInput';
package/dist/index.js CHANGED
@@ -335,6 +335,8 @@ iconMap['ic_link'] = (React__default["default"].createElement("svg", { xmlns: "h
335
335
  iconMap['ic_list_add'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
336
336
  React__default["default"].createElement("path", { d: "M21.02 5H19V2.98c0-.54-.44-.98-.98-.98h-.03c-.55 0-.99.44-.99.98V5h-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-.98V7h2.02c.54 0 .98-.44.98-.98v-.04c0-.54-.44-.98-.98-.98ZM18 12c-.55 0-1 .45-1 1v5.22c0 .55-.45 1-1 1H6c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1h5c.55 0 1-.45 1-1s-.45-1-1-1H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-6c0-.55-.45-1-1-1Z" }),
337
337
  React__default["default"].createElement("path", { d: "M7 10c0-.55.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1H8c-.55 0-1-.45-1-1Zm1 2c-.55 0-1 .45-1 1s.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1H8Zm-1 4c0-.55.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1H8c-.55 0-1-.45-1-1Z" })));
338
+ iconMap['ic_list_view'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
339
+ React__default["default"].createElement("path", { d: "M5 17V8H3c-.8 0-1-.667-1-1V3c0-.8.667-1 1-1h10c.8 0 1 .667 1 1v4c0 .8-.667 1-1 1H7v2c0 .8.667 1 1 1h8v-1c0-.8.667-1 1-1h4c.8 0 1 .667 1 1v4c0 .8-.667 1-1 1h-4c-.8 0-1-.667-1-1v-1H7v4c0 .8.667 1 1 1h8v-1c0-.8.667-1 1-1h4c.8 0 1 .667 1 1v4c0 .8-.667 1-1 1h-4c-.8 0-1-.667-1-1v-1H8c-2.4 0-3-2-3-3Z" })));
338
340
  iconMap['ic_locate'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
339
341
  React__default["default"].createElement("path", { d: "M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4Zm8.94 3A8.994 8.994 0 0 0 13 3.06V2c0-.55-.45-1-1-1s-1 .45-1 1v1.06A8.994 8.994 0 0 0 3.06 11H2c-.55 0-1 .45-1 1s.45 1 1 1h1.06A8.994 8.994 0 0 0 11 20.94V22c0 .55.45 1 1 1s1-.45 1-1v-1.06A8.994 8.994 0 0 0 20.94 13H22c.55 0 1-.45 1-1s-.45-1-1-1h-1.06ZM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7Z" })));
340
342
  iconMap['ic_lock'] = (React__default["default"].createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 22" },
@@ -11931,9 +11933,9 @@ function identifier$1(index) {
11931
11933
  return slice$1(index, position$1);
11932
11934
  }
11933
11935
  function compile$1(value) {
11934
- return dealloc$1(parse$3("", null, null, null, [""], value = alloc$1(value), 0, [0], value));
11936
+ return dealloc$1(parse$4("", null, null, null, [""], value = alloc$1(value), 0, [0], value));
11935
11937
  }
11936
- function parse$3(value, root2, parent2, rule, rules, rulesets, pseudo, points, declarations) {
11938
+ function parse$4(value, root2, parent2, rule, rules, rulesets, pseudo, points, declarations) {
11937
11939
  var index = 0;
11938
11940
  var offset = 0;
11939
11941
  var length2 = pseudo;
@@ -12000,16 +12002,16 @@ function parse$3(value, root2, parent2, rule, rules, rulesets, pseudo, points, d
12000
12002
  append$1(reference = ruleset$1(characters2, root2, parent2, index, offset, rules, points, type, props = [], children = [], length2), rulesets);
12001
12003
  if (character2 === 123)
12002
12004
  if (offset === 0)
12003
- parse$3(characters2, root2, reference, reference, props, rulesets, length2, points, children);
12005
+ parse$4(characters2, root2, reference, reference, props, rulesets, length2, points, children);
12004
12006
  else
12005
12007
  switch (atrule) {
12006
12008
  case 100:
12007
12009
  case 109:
12008
12010
  case 115:
12009
- parse$3(value, reference, reference, rule && append$1(ruleset$1(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children);
12011
+ parse$4(value, reference, reference, rule && append$1(ruleset$1(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children);
12010
12012
  break;
12011
12013
  default:
12012
- parse$3(characters2, reference, reference, reference, [""], children, 0, points, children);
12014
+ parse$4(characters2, reference, reference, reference, [""], children, 0, points, children);
12013
12015
  }
12014
12016
  }
12015
12017
  index = offset = property2 = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
@@ -14253,7 +14255,7 @@ var parseValue = function (value) {
14253
14255
  return null
14254
14256
  };
14255
14257
 
14256
- var parse$2 = function (rule) { return rule.split(' ').map(parseValue); };
14258
+ var parse$3 = function (rule) { return rule.split(' ').map(parseValue); };
14257
14259
 
14258
14260
  var getSizeAtTrack = function (index, tracks, gap, end) {
14259
14261
  if ( gap === void 0 ) { gap = 0; }
@@ -14474,12 +14476,12 @@ Gutter.prototype.getRawComputedGap = function getRawComputedGap () {
14474
14476
 
14475
14477
  Gutter.prototype.setTracks = function setTracks (raw) {
14476
14478
  this.tracks = raw.split(' ');
14477
- this.trackValues = parse$2(raw);
14479
+ this.trackValues = parse$3(raw);
14478
14480
  };
14479
14481
 
14480
14482
  Gutter.prototype.setComputedTracks = function setComputedTracks (raw) {
14481
14483
  this.computedTracks = raw.split(' ');
14482
- this.computedPixels = parse$2(raw);
14484
+ this.computedPixels = parse$3(raw);
14483
14485
  };
14484
14486
 
14485
14487
  Gutter.prototype.setGap = function setGap (raw) {
@@ -15568,20 +15570,110 @@ function v4(options, buf, offset) {
15568
15570
  return stringify$1(rnds);
15569
15571
  }
15570
15572
 
15573
+ var mapFromDigits = function (value) {
15574
+ var trimmed = value.split(' ').join();
15575
+ var hasEightChars = trimmed.length === 8;
15576
+ var isNumber = !isNaN(Number(trimmed));
15577
+ if (isNumber && hasEightChars) {
15578
+ return "".concat(trimmed.slice(0, 2), "/").concat(trimmed.slice(2, 4), "/").concat(trimmed.slice(4));
15579
+ }
15580
+ return value;
15581
+ };
15582
+ var mapFromValidFormat = function (value) {
15583
+ // Valid format refers to yyyy-mm-dd
15584
+ var validDate = value.slice(0, 10);
15585
+ if (validDate.length !== 10) {
15586
+ return value;
15587
+ }
15588
+ var elements = validDate.split('-');
15589
+ if (elements.length !== 3) {
15590
+ return value;
15591
+ }
15592
+ var yyyy = elements[0], mm = elements[1], dd = elements[2];
15593
+ var isDay = dd.length === 2 && !isNaN(Number(dd));
15594
+ var isMonth = mm.length === 2 && !isNaN(Number(mm));
15595
+ var isYear = yyyy.length === 4 && !isNaN(Number(yyyy));
15596
+ if (isDay && isMonth && isYear) {
15597
+ return "".concat(dd, "/").concat(mm, "/").concat(yyyy);
15598
+ }
15599
+ return value;
15600
+ };
15601
+ var parse$2 = function (value, options) {
15602
+ value = mapFromDigits(value);
15603
+ value = mapFromValidFormat(value);
15604
+ var arr = value
15605
+ .split(/-|\//)
15606
+ .filter(Boolean)
15607
+ .map(function (val) { return Number(val); });
15608
+ if (arr.length !== 3) {
15609
+ return;
15610
+ }
15611
+ if (arr.some(function (val) { return isNaN(val); })) {
15612
+ return;
15613
+ }
15614
+ var dd = arr[0], mm = arr[1], yyyy = arr[2];
15615
+ if (String(yyyy).length !== 4) {
15616
+ if (yyyy <= 99 && (options === null || options === void 0 ? void 0 : options.allowTwoDigitYear)) {
15617
+ return parse$2("".concat(dd, "/").concat(mm, "/20").concat(yyyy.toString().padStart(2, '0')));
15618
+ }
15619
+ return;
15620
+ }
15621
+ var day = String(dd).padStart(2, '0');
15622
+ var month = String(mm).padStart(2, '0');
15623
+ var year = String(yyyy);
15624
+ var date = new Date("".concat(year, "-").concat(month, "-").concat(day));
15625
+ if (date.toString() === 'Invalid Date') {
15626
+ return;
15627
+ }
15628
+ var result = date.toISOString().split('T')[0];
15629
+ var _a = result.split('-'), convertedYear = _a[0], convertedMonth = _a[1], convertedDay = _a[2];
15630
+ var isDayMatch = convertedDay === day;
15631
+ var isMonthMatch = convertedMonth === month;
15632
+ var isYearMatch = convertedYear === year;
15633
+ var isValidDate = [isDayMatch, isMonthMatch, isYearMatch].every(Boolean);
15634
+ return isValidDate ? result : undefined;
15635
+ };
15636
+ var parseTextDate = function (value, options) {
15637
+ if (!value || typeof value !== 'string') {
15638
+ return;
15639
+ }
15640
+ try {
15641
+ return parse$2(value, options);
15642
+ }
15643
+ catch (_a) {
15644
+ return;
15645
+ }
15646
+ };
15647
+
15648
+ var DateInput = React$1.forwardRef(function (props, ref) {
15649
+ var valueProp = props.value, onChangeProp = props.onChange, onPasteProp = props.onPaste, inputProps = __rest$1(props, ["value", "onChange", "onPaste"]);
15650
+ var value = parseTextDate(valueProp);
15651
+ return (React__default["default"].createElement("input", __assign$3({}, inputProps, { ref: ref, pattern: "d{2}/d{2}/d{4}", placeholder: "dd/mm/yyyy", type: 'date', value: value, onChange: function (e) { return onChangeProp === null || onChangeProp === void 0 ? void 0 : onChangeProp(e); }, onPaste: function (e) {
15652
+ var data = e.clipboardData.getData('text');
15653
+ var parsedValue = parseTextDate(data, { allowTwoDigitYear: true });
15654
+ if (parsedValue) {
15655
+ e.currentTarget.value = parsedValue;
15656
+ }
15657
+ onPasteProp === null || onPasteProp === void 0 ? void 0 : onPasteProp(e);
15658
+ } })));
15659
+ });
15660
+
15571
15661
  function useGenerateOrDefaultId(idFromProps) {
15572
15662
  var id = React$1.useState(idFromProps ? idFromProps : v4())[0];
15573
15663
  return id;
15574
15664
  }
15665
+ var BareInput = function (props) { return (React__default["default"].createElement("input", __assign$3({}, props))); };
15575
15666
  var LuiTextInput = function (props) {
15576
- var _a;
15667
+ var _a, _b, _c;
15577
15668
  var id = useGenerateOrDefaultId((_a = props.inputProps) === null || _a === void 0 ? void 0 : _a.id);
15669
+ var LuiInput = ((_b = props.inputProps) === null || _b === void 0 ? void 0 : _b.type) === 'date' ? DateInput : BareInput;
15578
15670
  return (React__default["default"].createElement("div", { className: clsx$1('LuiTextInput', props.error && 'hasError', props.warning && 'hasWarning', props.className) },
15579
15671
  React__default["default"].createElement("label", { className: 'LuiTextInput-label', htmlFor: id },
15580
15672
  props.mandatory && React__default["default"].createElement("span", { className: "LuiTextInput-mandatory" }, "*"),
15581
15673
  React__default["default"].createElement("span", { className: 'LuiTextInput-label-text ' +
15582
15674
  clsx$1(props.hideLabel ? 'LuiScreenReadersOnly' : '') }, props.label),
15583
15675
  React__default["default"].createElement("span", { className: "LuiTextInput-inputWrapper" },
15584
- React__default["default"].createElement("input", __assign$3({ type: 'text', className: clsx$1('LuiTextInput-input', props.showPadlockIcon ? 'LuiTextInput-padlock-icon ' : '', props.size ? "LuiTextInput-".concat(props.size) : ''), min: "0", value: props.value, onChange: props.onChange }, props.inputProps, { id: id })),
15676
+ React__default["default"].createElement(LuiInput, __assign$3({ className: clsx$1('LuiTextInput-input', props.showPadlockIcon ? 'LuiTextInput-padlock-icon ' : '', props.size ? "LuiTextInput-".concat(props.size) : ''), min: ((_c = props.inputProps) === null || _c === void 0 ? void 0 : _c.type) === 'date' ? undefined : '0', value: props.value, onChange: props.onChange }, props.inputProps, { id: id })),
15585
15677
  props.icon),
15586
15678
  props.error && (React__default["default"].createElement("span", { className: "LuiTextInput-error" },
15587
15679
  React__default["default"].createElement(LuiIcon, { alt: "error", name: "ic_error", className: "LuiTextInput-error-icon", size: "sm", status: "error" }),
@@ -15727,6 +15819,12 @@ var LuiTextAreaInput = function (props) {
15727
15819
  props.error))));
15728
15820
  };
15729
15821
 
15822
+ var LuiDateInput = function (_a) {
15823
+ var inputProps = _a.inputProps, rest = __rest$1(_a, ["inputProps"]);
15824
+ var mapped = __assign$3({ inputProps: __assign$3(__assign$3({}, inputProps), { type: 'date' }) }, rest);
15825
+ return React__default["default"].createElement(LuiTextInput, __assign$3({}, mapped));
15826
+ };
15827
+
15730
15828
  // @NOTE Can use LuiRadioInput in block form and pass through your own legend (label)
15731
15829
  var LuiRadioInput = function (props) {
15732
15830
  var _a;
@@ -58456,6 +58554,7 @@ exports.LuiCloseableHeaderMenuItem = LuiCloseableHeaderMenuItem;
58456
58554
  exports.LuiCloseableHeaderMenuItemV2 = LuiCloseableHeaderMenuItemV2;
58457
58555
  exports.LuiComboSelect = LuiComboSelect;
58458
58556
  exports.LuiControlledMenu = LuiControlledMenu;
58557
+ exports.LuiDateInput = LuiDateInput;
58459
58558
  exports.LuiDrawerMenu = LuiDrawerMenu;
58460
58559
  exports.LuiDrawerMenuDivider = LuiDrawerMenuDivider;
58461
58560
  exports.LuiDrawerMenuDividerV2 = LuiDrawerMenuDividerV2;