@linzjs/lui 11.1.1 → 11.1.2

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
@@ -3,6 +3,7 @@ import clsx from 'clsx';
3
3
  import { Menu, MenuItem, MenuDivider, MenuHeader, ControlledMenu, useMenuState, FocusableItem } from '@szhsin/react-menu';
4
4
  import '@szhsin/react-menu/dist/index.css';
5
5
  import { Formik, Form, useFormikContext, Field, getIn, connect, ErrorMessage, useField } from 'formik';
6
+ import { v4 } from 'uuid';
6
7
  import camelcase from 'camelcase';
7
8
  import Select from 'react-select';
8
9
  import Lottie from 'lottie-react';
@@ -622,218 +623,12 @@ function LuiFormikForm(props) {
622
623
  }, React__default.createElement(Form, null, props.children, " ")));
623
624
  }
624
625
 
625
- function LuiFormikCheckbox(props) {
626
- var ctx = useFormikContext();
627
- return React__default.createElement(React__default.Fragment, null, React__default.createElement(Field, {
628
- name: props.name
629
- }, function (_ref) {
630
- var field = _ref.field;
631
- var showError = getIn(ctx == null ? void 0 : ctx.errors, props.name);
632
- return React__default.createElement("div", {
633
- className: clsx(showError && 'lui-input-error')
634
- }, React__default.createElement("div", {
635
- className: "lui-input-group-wrapper "
636
- }, showError && React__default.createElement("i", {
637
- className: "lui-form-status-icon material-icons-round"
638
- }, "error"), React__default.createElement("div", {
639
- className: clsx('lui-checkbox-container', props.className)
640
- }, React__default.createElement("input", Object.assign({}, props.inputProps, {
641
- type: "checkbox",
642
- id: props.value,
643
- disabled: !!props.disabled,
644
- checked: field.value
645
- }, field)), typeof props.label === 'string' ? React__default.createElement("label", {
646
- htmlFor: props.value
647
- }, props.label) : props.label)));
648
- }));
649
- }
650
-
651
- var LuiFormikFormLabel = function LuiFormikFormLabel(props) {
652
- return React__default.createElement("div", {
653
- className: clsx('LuiFormLabel-wrapper', props.className && "" + props.className)
654
- }, props.children, React__default.createElement("label", {
655
- className: "LuiFormLabel",
656
- htmlFor: props["for"]
657
- }, props.required && React__default.createElement("span", {
658
- className: "lui-required-input-icon"
659
- }, "*"), props.label), props.tooltip && React__default.createElement("i", {
660
- className: "material-icons-round"
661
- }, "help"));
662
- };
663
-
664
- var LuiFormikTextInput = /*#__PURE__*/connect(function (props) {
665
- var error = getIn(props.formik.errors, props.name);
666
- var touch = getIn(props.formik.touched, props.name);
667
- var showError = touch && error;
668
-
669
- var _useFormikContext = useFormikContext(),
670
- setFieldValue = _useFormikContext.setFieldValue;
671
-
672
- var multiLineToggle = function multiLineToggle(field) {
673
- return !props.multiLine ? React__default.createElement("input", Object.assign({
674
- id: props.name,
675
- "data-testid": props.name
676
- }, field, {
677
- type: "text"
678
- }, props.inputProps, {
679
- onChange: function onChange(event) {
680
- var _props$validateOnChan;
681
-
682
- setFieldValue(props.name, event.target.value, (_props$validateOnChan = props.validateOnChange) != null ? _props$validateOnChan : true);
683
-
684
- if (props.onValueChange) {
685
- props.onValueChange({
686
- value: event.target.value,
687
- formik: props.formik
688
- });
689
- }
690
- }
691
- })) : React__default.createElement("textarea", Object.assign({
692
- id: props.name,
693
- "data-testid": props.name
694
- }, field, {
695
- rows: 1
696
- }, props.inputProps, {
697
- onChange: function onChange(event) {
698
- var _props$validateOnChan2;
699
-
700
- setFieldValue(props.name, event.target.value, (_props$validateOnChan2 = props.validateOnChange) != null ? _props$validateOnChan2 : true);
701
-
702
- if (props.onValueChange) {
703
- props.onValueChange({
704
- value: event.target.value,
705
- formik: props.formik
706
- });
707
- }
708
- }
709
- }));
710
- };
711
-
712
- return React__default.createElement("div", {
713
- className: clsx(props.className && "" + props.className)
714
- }, props.label && React__default.createElement(LuiFormikFormLabel, {
715
- required: props.required,
716
- label: props.label,
717
- "for": props.name,
718
- tooltip: props.tooltip
719
- }), props.helperInfo, React__default.createElement(Field, {
720
- name: props.name,
721
- validate: props.validate
722
- }, function (_ref) {
723
- var field = _ref.field;
724
- return React__default.createElement("div", {
725
- className: clsx(showError && 'lui-input-error')
726
- }, React__default.createElement(ErrorMessage, {
727
- name: props.name,
728
- render: function render() {
729
- return React__default.createElement("i", {
730
- className: "lui-form-status-icon material-icons-round"
731
- }, "error");
732
- }
733
- }), multiLineToggle(field), React__default.createElement(ErrorMessage, {
734
- name: props.name,
735
- className: 'lui-error-msg',
736
- component: "p"
737
- }));
738
- }));
739
- });
740
-
741
- var LuiFormikRadioButton = function LuiFormikRadioButton(props) {
742
- var _useField = useField(props),
743
- field = _useField[0],
744
- meta = _useField[1];
745
-
746
- return React__default.createElement("div", {
747
- className: props.className
748
- }, meta.touched && meta.error && React__default.createElement("i", {
749
- className: "lui-form-status-icon material-icons-round"
750
- }, "error"), React__default.createElement("div", {
751
- className: 'lui-radio-container'
752
- }, React__default.createElement("input", Object.assign({
753
- disabled: !!props.disabled
754
- }, field, {
755
- checked: props.value === field.value,
756
- value: props.value,
757
- id: props.value,
758
- type: "radio"
759
- }, props.inputProps)), React__default.createElement("label", {
760
- htmlFor: props.value
761
- }, props.label)));
762
- };
763
-
764
- var LuiFormikRadioGroup = function LuiFormikRadioGroup(props) {
765
- var ctx = useFormikContext();
766
- var error = getIn(ctx.errors, props.name);
767
- var touch = getIn(ctx.touched, props.name);
768
- var showError = touch && error;
769
- var describedby = props.hint && camelcase(props == null ? void 0 : props.hint) + 'Id';
770
- var errorDescribedBy = error && camelcase(error) + 'Id';
771
- return React__default.createElement("div", {
772
- className: clsx('lui-fieldsetBlock-form-group', showError && 'lui-input-error')
773
- }, React__default.createElement("fieldset", {
774
- "aria-describedby": clsx(props.hint && describedby + 'Id', showError && errorDescribedBy)
775
- }, React__default.createElement("legend", null, props.required && React__default.createElement("span", {
776
- className: "lui-required-input-icon"
777
- }, "*"), props.legend), showError && React__default.createElement("p", {
778
- id: errorDescribedBy
779
- }, React__default.createElement("span", {
780
- className: "LuiScreenReadersOnly"
781
- }, " Error: "), error), props.hint && React__default.createElement("p", {
782
- className: "lui-fieldset-support-txt small",
783
- id: describedby
784
- }, props.hint), React__default.createElement("div", {
785
- className: "lui-input-group-wrapper"
786
- }, props.children)));
787
- };
788
-
789
- var LuiFormikFormSubmitButton = /*#__PURE__*/connect(function (props) {
790
- return React__default.createElement(LuiButton, {
791
- type: "submit",
792
- className: props.className,
793
- level: "primary",
794
- "data-testid": props['data-testid'],
795
- disabled: !!props.disabled
796
- }, props.children);
797
- });
798
-
799
- var LuiFormikSelect = /*#__PURE__*/connect(function (props) {
800
- var error = getIn(props.formik.errors, props.name);
801
- var touch = getIn(props.formik.touched, props.name);
802
- var showError = touch && error;
803
- return React__default.createElement("div", {
804
- className: props.className
805
- }, props.label && React__default.createElement(LuiFormikFormLabel, {
806
- className: 'lui-margin-bottom-xxs',
807
- "for": props.name,
808
- label: props.label,
809
- required: !!props.required,
810
- tooltip: props.tooltip
811
- }), props.helperInfo, React__default.createElement("div", {
812
- className: clsx('lui-input-wrapper', showError && 'lui-input-error')
813
- }, React__default.createElement(ErrorMessage, {
814
- name: props.name,
815
- render: function render() {
816
- return React__default.createElement("i", {
817
- className: "lui-form-status-icon material-icons-round"
818
- }, "error");
819
- }
820
- }), React__default.createElement(Field, Object.assign({
821
- disabled: props.disabled,
822
- defaultValue: props.defaultValue,
823
- name: props.name,
824
- id: props.name,
825
- validate: props.validate,
826
- as: "select"
827
- }, props.inputProps), props.children), React__default.createElement(ErrorMessage, {
828
- name: props.name,
829
- className: 'lui-error-msg',
830
- component: "p"
831
- })));
832
- });
833
-
834
- var css$3 = ":root {\n --grey-80: #2a292c;\n --grey-60: #6b6966;\n --$gray: #989189;\n --grey-20: #beb9b4;\n --grey-10: #eaeaea;\n --grey-05: #f9f9f9;\n --teal: #00425d;\n --sea: #007198;\n --electric: #0096cc;\n --spray: #73c8e1;\n --polar: #e2f3f7;\n --sherpa: #004b50;\n --surfie: #017a76;\n --persian: #00a599;\n --downy: #73cdc8;\n --iceberg: #dcf5f0;\n --sacramento: #004e32;\n --salem: #08814d;\n --pigment: #0aa245;\n --granny: #9bd79b;\n --panache: #e9fae7;\n --brand-primary: #004b50;\n --brand-secondary: #017a76;\n --success: #0aa245;\n --success-bg: #e9fae7;\n --info: #3a7cdf;\n --info-bg: #d8e5f9;\n --warning: #ea6a2e;\n --warning-bg: #fbdfd2;\n --error: #cc0000;\n --error-focus: #5a0000;\n --error-bg: #f5cccc;\n --visited: #00425d;\n --green-hover: #08814d;\n --color-green-active: #004e32;\n --green-btn: #0aa245;\n --txt-link: #0096cc;\n --color-primary-hover-btn: #007198;\n --color-selection: #c7e9f3;\n --heading-color: #017a76;\n --heading-color--secondary: #2a292c;\n --base-type-color: #2a292c;\n --base-icon-color: #007198;\n --disabled-color: #989189;\n --disabled-color-dark: #6b6966;\n --linz-color-primary: #023d48;\n --linz-color-primary-hover: #01818a;\n --linz-color-tertiary: #e1e44a;\n --linz-color-tertiary-hover: #cdcf59;\n --color-test-pink: #f09;\n --linz-linear-gradient-blue: linear-gradient(70deg, #00425d 12%, #007198 100%);\n --linz-linear-gradient-teal: linear-gradient(270deg, #00a599 1%, #73cdc8 100%);\n}\n\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.LuiIcon_LuiIcon__5008522b {\n display: inline-block;\n height: 100%;\n width: 100%;\n}\n\n.LuiIcon_LuiIcon_Xl__5008522b {\n max-height: 64px;\n max-width: 64px;\n}\n.LuiIcon_LuiIcon_Xl__5008522b > svg {\n height: 64px;\n width: 64px;\n}\n\n.LuiIcon_LuiIcon_Lg__5008522b {\n max-height: 48px;\n max-width: 48px;\n}\n.LuiIcon_LuiIcon_Lg__5008522b > svg {\n height: 48px;\n width: 48px;\n}\n\n.LuiIcon_LuiIcon_Md__5008522b {\n height: 24px;\n max-height: 24px;\n max-width: 24px;\n width: 24px;\n}\n.LuiIcon_LuiIcon_Md__5008522b > svg {\n height: 24px;\n width: 24px;\n}\n\n.LuiIcon_LuiIcon_Sm__5008522b {\n max-height: 16px;\n max-width: 16px;\n}\n.LuiIcon_LuiIcon_Sm__5008522b > svg {\n height: 16px;\n width: 16px;\n}\n\n.LuiIcon_LuiIcon_Xs__5008522b {\n max-height: 12px;\n max-width: 12px;\n}\n.LuiIcon_LuiIcon_Xs__5008522b > svg {\n height: 12px;\n width: 12px;\n}\n\n.LuiIcon_LuiIcon_Warning__5008522b {\n fill: #ea6a2e;\n}\n\n.LuiIcon_LuiIcon_Error__5008522b {\n fill: #cc0000;\n}\n\n.LuiIcon_LuiIcon_Success__5008522b {\n fill: #0aa245;\n}\n\n.LuiIcon_LuiIcon_Interactive__5008522b {\n fill: #007198;\n}\n\n.LuiIcon_LuiIcon_Disabled__5008522b {\n fill: #989189;\n}";
626
+ var css$3 = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n:root {\n --grey-80: #2a292c;\n --grey-60: #6b6966;\n --$gray: #989189;\n --grey-20: #beb9b4;\n --grey-10: #eaeaea;\n --grey-05: #f9f9f9;\n --teal: #00425d;\n --sea: #007198;\n --electric: #0096cc;\n --spray: #73c8e1;\n --polar: #e2f3f7;\n --sherpa: #004b50;\n --surfie: #017a76;\n --persian: #00a599;\n --downy: #73cdc8;\n --iceberg: #dcf5f0;\n --sacramento: #004e32;\n --salem: #08814d;\n --pigment: #0aa245;\n --granny: #9bd79b;\n --panache: #e9fae7;\n --brand-primary: #004b50;\n --brand-secondary: #017a76;\n --success: #0aa245;\n --success-bg: #e9fae7;\n --info: #3a7cdf;\n --info-bg: #d8e5f9;\n --warning: #ea6a2e;\n --warning-bg: #fbdfd2;\n --error: #cc0000;\n --error-focus: #5a0000;\n --error-bg: #f5cccc;\n --visited: #00425d;\n --green-hover: #08814d;\n --color-green-active: #004e32;\n --green-btn: #0aa245;\n --txt-link: #0096cc;\n --color-primary-hover-btn: #007198;\n --color-selection: #c7e9f3;\n --heading-color: #017a76;\n --heading-color--secondary: #2a292c;\n --base-type-color: #2a292c;\n --base-icon-color: #007198;\n --disabled-color: #989189;\n --disabled-color-dark: #6b6966;\n --linz-color-primary: #023d48;\n --linz-color-primary-hover: #01818a;\n --linz-color-tertiary: #e1e44a;\n --linz-color-tertiary-hover: #cdcf59;\n --color-test-pink: #f09;\n --linz-linear-gradient-blue: linear-gradient(70deg, #00425d 12%, #007198 100%);\n --linz-linear-gradient-teal: linear-gradient(270deg, #00a599 1%, #73cdc8 100%);\n}\n\n.LuiCheckboxInput_LuiCheckboxInput__89cfba8f {\n margin-bottom: 24px;\n box-sizing: border-box;\n}\n\n.LuiCheckboxInput_LuiCheckboxInputGroup__89cfba8f {\n display: block;\n user-select: none;\n cursor: pointer;\n}\n\n.LuiCheckboxInput_LuiCheckboxInputLabel__89cfba8f {\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n padding: 2px;\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: 600;\n font-size: 14px;\n line-height: 24px;\n margin-bottom: 0;\n}\n.LuiCheckboxInput_isDisabled__89cfba8f .LuiCheckboxInput_LuiCheckboxInputLabel__89cfba8f {\n cursor: not-allowed;\n color: #989189;\n}\n\n.LuiCheckboxInput_LuiCheckboxInputInput__89cfba8f {\n width: 0.1px;\n height: 0.1px;\n opacity: 0;\n overflow: hidden;\n position: absolute;\n z-index: -1;\n}\n\n.LuiCheckboxInput_LuiCheckboxInputLabel__89cfba8f::before {\n font-size: 18px;\n line-height: 10px;\n content: \" \";\n display: block;\n text-align: center;\n color: transparent;\n width: 23px;\n height: 23px;\n border: 2px solid #007198;\n margin-right: 0.5rem;\n border-radius: 5px;\n transition: all 0.2s ease-in-out;\n}\n.LuiCheckboxInput_hasError__89cfba8f .LuiCheckboxInput_LuiCheckboxInputLabel__89cfba8f::before {\n border-color: #eb5757;\n}\n\n.LuiCheckboxInput_LuiCheckboxInputError__89cfba8f {\n margin-top: 2px;\n text-align: left;\n}\n\n.LuiCheckboxInput_LuiCheckboxInputErrorIcon__89cfba8f {\n margin-left: 2rem;\n}\n\n.LuiCheckboxInput_LuiCheckboxInputInput__89cfba8f:checked + .LuiCheckboxInput_LuiCheckboxInputLabel__89cfba8f::before,\n.LuiCheckboxInput_LuiCheckboxInput_IsChecked__89cfba8f .LuiCheckboxInput_LuiCheckboxInputLabel__89cfba8f::before {\n color: white;\n background: #007198 url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNCAxMSI+CiAgICA8cGF0aCBmaWxsPSIjRkZGIiBkPSJNLjI5NyA0LjkzNGExLjAxMyAxLjAxMyAwIDAgMSAxLjM0NC0uMDc4bC4wODguMDc4TDUuMjU0IDguNDYgMTIuMjE5LjM1M2ExLjAxMyAxLjAxMyAwIDAgMSAxLjMzNC0uMThsLjA5NC4wNzJjLjM5NC4zMzguNDY0LjkxNC4xOCAxLjMzNGwtLjA3Mi4wOTQtNy42NzYgOC45MzVhMS4wMTMgMS4wMTMgMCAwIDEtMS4zOTguMTM0bC0uMDg3LS4wNzhMLjI5NyA2LjM2N2ExLjAxMyAxLjAxMyAwIDAgMSAwLTEuNDMzWiIvPgo8L3N2Zz4=\") no-repeat 50% 50%;\n background-size: 15px;\n}\n\n.LuiCheckboxInput_LuiCheckboxInput_HasError__89cfba8f .LuiCheckboxInput_LuiCheckboxInputLabel__89cfba8f::before {\n border-color: #cc0000;\n}\n\n.LuiCheckboxInput_LuiCheckboxInput_HasError__89cfba8f.LuiCheckboxInput_LuiCheckboxInput_IsChecked__89cfba8f .LuiCheckboxInput_LuiCheckboxInputLabel__89cfba8f::before {\n background-color: #cc0000;\n border-color: #cc0000;\n}\n\n.LuiCheckboxInput_LuiCheckboxInputInput__89cfba8f:disabled + .LuiCheckboxInput_LuiCheckboxInputLabel__89cfba8f::before,\n.LuiCheckboxInput_LuiCheckboxInput_IsDisabled__89cfba8f .LuiCheckboxInput_LuiCheckboxInputLabel__89cfba8f::before {\n background-color: #989189;\n border-color: #989189;\n}\n\n.LuiCheckboxInput_LuiCheckboxInputInput__89cfba8f:checked:disabled + .LuiCheckboxInput_LuiCheckboxInputLabel__89cfba8f::before,\n.LuiCheckboxInput_LuiCheckboxInput_IsChecked__89cfba8f.LuiCheckboxInput_LuiCheckboxInput_IsDisabled__89cfba8f .LuiCheckboxInput_LuiCheckboxInputLabel__89cfba8f::before {\n color: white;\n background-color: #989189;\n border-color: #989189;\n}\n\n.LuiCheckboxInput_LuiCheckboxInput_Inline__89cfba8f {\n display: inline-block;\n}\n.LuiCheckboxInput_LuiCheckboxInput_Inline__89cfba8f:not(:last-child) {\n margin-bottom: 0;\n margin-right: 24px;\n}";
835
627
  n(css$3,{});
836
628
 
629
+ var css$4 = ":root {\n --grey-80: #2a292c;\n --grey-60: #6b6966;\n --$gray: #989189;\n --grey-20: #beb9b4;\n --grey-10: #eaeaea;\n --grey-05: #f9f9f9;\n --teal: #00425d;\n --sea: #007198;\n --electric: #0096cc;\n --spray: #73c8e1;\n --polar: #e2f3f7;\n --sherpa: #004b50;\n --surfie: #017a76;\n --persian: #00a599;\n --downy: #73cdc8;\n --iceberg: #dcf5f0;\n --sacramento: #004e32;\n --salem: #08814d;\n --pigment: #0aa245;\n --granny: #9bd79b;\n --panache: #e9fae7;\n --brand-primary: #004b50;\n --brand-secondary: #017a76;\n --success: #0aa245;\n --success-bg: #e9fae7;\n --info: #3a7cdf;\n --info-bg: #d8e5f9;\n --warning: #ea6a2e;\n --warning-bg: #fbdfd2;\n --error: #cc0000;\n --error-focus: #5a0000;\n --error-bg: #f5cccc;\n --visited: #00425d;\n --green-hover: #08814d;\n --color-green-active: #004e32;\n --green-btn: #0aa245;\n --txt-link: #0096cc;\n --color-primary-hover-btn: #007198;\n --color-selection: #c7e9f3;\n --heading-color: #017a76;\n --heading-color--secondary: #2a292c;\n --base-type-color: #2a292c;\n --base-icon-color: #007198;\n --disabled-color: #989189;\n --disabled-color-dark: #6b6966;\n --linz-color-primary: #023d48;\n --linz-color-primary-hover: #01818a;\n --linz-color-tertiary: #e1e44a;\n --linz-color-tertiary-hover: #cdcf59;\n --color-test-pink: #f09;\n --linz-linear-gradient-blue: linear-gradient(70deg, #00425d 12%, #007198 100%);\n --linz-linear-gradient-teal: linear-gradient(270deg, #00a599 1%, #73cdc8 100%);\n}\n\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.LuiIcon_LuiIcon__5008522b {\n display: inline-block;\n height: 100%;\n width: 100%;\n}\n\n.LuiIcon_LuiIcon_Xl__5008522b {\n max-height: 64px;\n max-width: 64px;\n}\n.LuiIcon_LuiIcon_Xl__5008522b > svg {\n height: 64px;\n width: 64px;\n}\n\n.LuiIcon_LuiIcon_Lg__5008522b {\n max-height: 48px;\n max-width: 48px;\n}\n.LuiIcon_LuiIcon_Lg__5008522b > svg {\n height: 48px;\n width: 48px;\n}\n\n.LuiIcon_LuiIcon_Md__5008522b {\n height: 24px;\n max-height: 24px;\n max-width: 24px;\n width: 24px;\n}\n.LuiIcon_LuiIcon_Md__5008522b > svg {\n height: 24px;\n width: 24px;\n}\n\n.LuiIcon_LuiIcon_Sm__5008522b {\n max-height: 16px;\n max-width: 16px;\n}\n.LuiIcon_LuiIcon_Sm__5008522b > svg {\n height: 16px;\n width: 16px;\n}\n\n.LuiIcon_LuiIcon_Xs__5008522b {\n max-height: 12px;\n max-width: 12px;\n}\n.LuiIcon_LuiIcon_Xs__5008522b > svg {\n height: 12px;\n width: 12px;\n}\n\n.LuiIcon_LuiIcon_Warning__5008522b {\n fill: #ea6a2e;\n}\n\n.LuiIcon_LuiIcon_Error__5008522b {\n fill: #cc0000;\n}\n\n.LuiIcon_LuiIcon_Success__5008522b {\n fill: #0aa245;\n}\n\n.LuiIcon_LuiIcon_Interactive__5008522b {\n fill: #007198;\n}\n\n.LuiIcon_LuiIcon_Disabled__5008522b {\n fill: #989189;\n}";
630
+ n(css$4,{});
631
+
837
632
  // NOTE: This is a generated file, nothing you do here matters
838
633
 
839
634
  var ic_account_circle = /*#__PURE__*/React__default.createElement("svg", {
@@ -1127,38 +922,585 @@ var ICON_SIZES = {
1127
922
  xl: 'LuiIcon--xl',
1128
923
  ns: 'LuiIcon--noSize'
1129
924
  };
1130
- var ICON_STATUS = {
1131
- none: '',
1132
- error: 'LuiIcon--error',
1133
- warning: 'LuiIcon--warning',
1134
- success: 'LuiIcon--success',
1135
- interactive: 'LuiIcon--interactive',
1136
- disabled: 'LuiIcon--disabled'
925
+ var ICON_STATUS = {
926
+ none: '',
927
+ error: 'LuiIcon--error',
928
+ warning: 'LuiIcon--warning',
929
+ success: 'LuiIcon--success',
930
+ interactive: 'LuiIcon--interactive',
931
+ disabled: 'LuiIcon--disabled'
932
+ };
933
+ var LuiIcon = function LuiIcon(_ref) {
934
+ var name = _ref.name,
935
+ className = _ref.className,
936
+ _ref$size = _ref.size,
937
+ size = _ref$size === void 0 ? 'ns' : _ref$size,
938
+ title = _ref.title,
939
+ alt = _ref.alt,
940
+ _ref$status = _ref.status,
941
+ status = _ref$status === void 0 ? 'none' : _ref$status,
942
+ spanProps = _ref.spanProps;
943
+ var iconSVG = ICONS[name];
944
+
945
+ if (!iconSVG) {
946
+ console.warn("No icon found for: " + iconSVG);
947
+ return null;
948
+ }
949
+
950
+ return createElement("span", Object.assign({
951
+ className: clsx('LuiIcon', className, size && ICON_SIZES[size], status && ICON_STATUS[status]),
952
+ "data-icon": name,
953
+ title: title,
954
+ "aria-label": alt
955
+ }, spanProps), iconSVG);
956
+ };
957
+
958
+ var css$5 = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n:root {\n --grey-80: #2a292c;\n --grey-60: #6b6966;\n --$gray: #989189;\n --grey-20: #beb9b4;\n --grey-10: #eaeaea;\n --grey-05: #f9f9f9;\n --teal: #00425d;\n --sea: #007198;\n --electric: #0096cc;\n --spray: #73c8e1;\n --polar: #e2f3f7;\n --sherpa: #004b50;\n --surfie: #017a76;\n --persian: #00a599;\n --downy: #73cdc8;\n --iceberg: #dcf5f0;\n --sacramento: #004e32;\n --salem: #08814d;\n --pigment: #0aa245;\n --granny: #9bd79b;\n --panache: #e9fae7;\n --brand-primary: #004b50;\n --brand-secondary: #017a76;\n --success: #0aa245;\n --success-bg: #e9fae7;\n --info: #3a7cdf;\n --info-bg: #d8e5f9;\n --warning: #ea6a2e;\n --warning-bg: #fbdfd2;\n --error: #cc0000;\n --error-focus: #5a0000;\n --error-bg: #f5cccc;\n --visited: #00425d;\n --green-hover: #08814d;\n --color-green-active: #004e32;\n --green-btn: #0aa245;\n --txt-link: #0096cc;\n --color-primary-hover-btn: #007198;\n --color-selection: #c7e9f3;\n --heading-color: #017a76;\n --heading-color--secondary: #2a292c;\n --base-type-color: #2a292c;\n --base-icon-color: #007198;\n --disabled-color: #989189;\n --disabled-color-dark: #6b6966;\n --linz-color-primary: #023d48;\n --linz-color-primary-hover: #01818a;\n --linz-color-tertiary: #e1e44a;\n --linz-color-tertiary-hover: #cdcf59;\n --color-test-pink: #f09;\n --linz-linear-gradient-blue: linear-gradient(70deg, #00425d 12%, #007198 100%);\n --linz-linear-gradient-teal: linear-gradient(270deg, #00a599 1%, #73cdc8 100%);\n}\n\n.LuiError_LuiError__4692690f {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: 600;\n font-size: 14px;\n line-height: 24px;\n}\n.LuiError_LuiErrorErrorIcon__4692690f {\n vertical-align: middle;\n display: inline-block;\n}\n.LuiError_LuiErrorErrorText__4692690f {\n margin-left: 0.5rem;\n}";
959
+ n(css$5,{});
960
+
961
+ var LuiError = function LuiError(_ref) {
962
+ var error = _ref.error,
963
+ className = _ref.className;
964
+ return React__default.createElement("div", {
965
+ className: "LuiError " + className + "-error"
966
+ }, React__default.createElement(LuiIcon, {
967
+ className: "LuiError-errorIcon " + className + "-errorIcon",
968
+ alt: 'Error',
969
+ name: "ic_error",
970
+ size: "md",
971
+ status: "error"
972
+ }), error && React__default.createElement("span", {
973
+ className: "LuiError-errorText " + className + "-errorText"
974
+ }, error));
975
+ };
976
+
977
+ var css$6 = ":root {\n --grey-80: #2a292c;\n --grey-60: #6b6966;\n --$gray: #989189;\n --grey-20: #beb9b4;\n --grey-10: #eaeaea;\n --grey-05: #f9f9f9;\n --teal: #00425d;\n --sea: #007198;\n --electric: #0096cc;\n --spray: #73c8e1;\n --polar: #e2f3f7;\n --sherpa: #004b50;\n --surfie: #017a76;\n --persian: #00a599;\n --downy: #73cdc8;\n --iceberg: #dcf5f0;\n --sacramento: #004e32;\n --salem: #08814d;\n --pigment: #0aa245;\n --granny: #9bd79b;\n --panache: #e9fae7;\n --brand-primary: #004b50;\n --brand-secondary: #017a76;\n --success: #0aa245;\n --success-bg: #e9fae7;\n --info: #3a7cdf;\n --info-bg: #d8e5f9;\n --warning: #ea6a2e;\n --warning-bg: #fbdfd2;\n --error: #cc0000;\n --error-focus: #5a0000;\n --error-bg: #f5cccc;\n --visited: #00425d;\n --green-hover: #08814d;\n --color-green-active: #004e32;\n --green-btn: #0aa245;\n --txt-link: #0096cc;\n --color-primary-hover-btn: #007198;\n --color-selection: #c7e9f3;\n --heading-color: #017a76;\n --heading-color--secondary: #2a292c;\n --base-type-color: #2a292c;\n --base-icon-color: #007198;\n --disabled-color: #989189;\n --disabled-color-dark: #6b6966;\n --linz-color-primary: #023d48;\n --linz-color-primary-hover: #01818a;\n --linz-color-tertiary: #e1e44a;\n --linz-color-tertiary-hover: #cdcf59;\n --color-test-pink: #f09;\n --linz-linear-gradient-blue: linear-gradient(70deg, #00425d 12%, #007198 100%);\n --linz-linear-gradient-teal: linear-gradient(270deg, #00a599 1%, #73cdc8 100%);\n}\n\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.LuiTextInput_LuiTextInput__e438043f {\n margin-bottom: 24px;\n}\n.LuiTextInput_LuiTextInputLabel__e438043f {\n display: block;\n margin-bottom: 6px;\n color: #000000;\n text-align: left;\n}\n.LuiTextInput_isDisabled__e438043f .LuiTextInput_LuiTextInputLabel__e438043f {\n color: #b2b2b2;\n}\n\n.LuiTextInput_LuiTextInputInputWrapper__e438043f {\n position: relative;\n display: block;\n box-shadow: -1px 0 0 0 transparent;\n border-radius: 4px;\n transition: box-shadow 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s, border-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s;\n}\n.LuiTextInput_hasError__e438043f .LuiTextInput_LuiTextInputInputWrapper__e438043f {\n box-shadow: -8px 0px 0 0 #cc0000;\n border-radius: 4px;\n}\n\n.LuiTextInput_LuiTextInputPasswordReveal__e438043f {\n position: absolute;\n background: transparent;\n min-height: 0;\n min-width: 0;\n margin: 0;\n padding: 12px;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n}\n.LuiTextInput_LuiTextInputPasswordReveal__e438043f:hover {\n background: transparent;\n}\n\n.LuiTextInput_LuiTextInputInput__e438043f {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: normal;\n margin-bottom: 0;\n border: 1px solid #b2b2b2;\n border-radius: 4px;\n height: 48px;\n color: #000000;\n caret-color: #000000;\n padding-top: 14px;\n padding-right: 32px;\n padding-bottom: 14px;\n padding-left: 16px;\n min-width: 300px;\n transition: all 0.15 ease-in-out;\n transition: border 0.2s ease;\n}\n.LuiTextInput_LuiTextInputInput__e438043f:hover, .LuiTextInput_LuiTextInputInput__e438043f:active {\n border-color: #053d52;\n}\n.LuiTextInput_LuiTextInputInput__e438043f:focus {\n outline: none;\n border-color: #053d52;\n}\n.LuiTextInput_LuiTextInputInput__e438043f::placeholder {\n font-weight: normal;\n color: #666666;\n opacity: 1;\n}\n.LuiTextInput_isDisabled__e438043f .LuiTextInput_LuiTextInputInput__e438043f::placeholder {\n color: #b2b2b2;\n}\n.LuiTextInput_hasError__e438043f .LuiTextInput_LuiTextInputInput__e438043f {\n border-color: #cc0000 !important;\n}\n.LuiTextInput_isDisabled__e438043f .LuiTextInput_LuiTextInputInput__e438043f {\n border-color: #b2b2b2;\n background-color: #fff;\n opacity: 0.3;\n cursor: not-allowed;\n}\n\n.LuiTextInput_LuiTextInputError__e438043f {\n position: relative;\n display: flex;\n color: #cc0000;\n text-align: left;\n padding-left: 22px;\n font-size: 14px;\n line-height: 20px;\n margin-top: 2px;\n}\n\n.LuiTextInput_LuiTextInputErrorIcon__e438043f {\n position: absolute;\n left: 0;\n top: 2px;\n}\n\n.LuiTextInput_LuiFieldWrapper__e438043f {\n position: relative;\n box-shadow: -1px 0 0 0 transparent;\n border-radius: 4px;\n transition: box-shadow 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s, border-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s;\n}\n.LuiTextInput_LuiFieldWrapper__e438043f input {\n transition: border 0.2s ease;\n}\n.LuiTextInput_LuiFieldWrapper__e438043f.LuiTextInput_LuiFieldWrapper_Error__e438043f {\n box-shadow: -12px 0px 0 0 #cc0000;\n border-radius: 4px;\n}\n.LuiTextInput_LuiFieldWrapper__e438043f.LuiTextInput_LuiFieldWrapper_Error__e438043f input {\n border-color: #cc0000;\n}";
978
+ n(css$6,{});
979
+
980
+ function useGenerateOrDefaultId(idFromProps) {
981
+ var _useState = useState(idFromProps ? idFromProps : v4()),
982
+ id = _useState[0];
983
+
984
+ return id;
985
+ }
986
+ var LuiTextInput = function LuiTextInput(props) {
987
+ var _props$inputProps;
988
+
989
+ var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
990
+ return React__default.createElement("div", {
991
+ className: clsx('LuiTextInput', props.error ? 'LuiTextInput-error' : '')
992
+ }, React__default.createElement("label", {
993
+ className: 'LuiTextInput-label',
994
+ htmlFor: id
995
+ }, React__default.createElement("span", {
996
+ className: clsx(props.hideLabel ? 'LuiScreenReadersOnly' : '')
997
+ }, props.label), React__default.createElement("span", {
998
+ className: "LuiTextInput-inputWrapper"
999
+ }, React__default.createElement("input", Object.assign({
1000
+ type: 'text',
1001
+ className: clsx('LuiTextInput-input'),
1002
+ min: "0",
1003
+ value: props.value,
1004
+ onChange: props.onChange
1005
+ }, props.inputProps, {
1006
+ id: id
1007
+ }))), props.error && React__default.createElement("span", {
1008
+ className: "LuiTextInput-error"
1009
+ }, React__default.createElement(LuiIcon, {
1010
+ alt: "error",
1011
+ name: "ic_error",
1012
+ className: "LuiTextInput-error-icon",
1013
+ size: "sm",
1014
+ status: "error"
1015
+ }), props.error)));
1016
+ };
1017
+
1018
+ var LuiCheckboxInput = function LuiCheckboxInput(props) {
1019
+ var _props$inputProps;
1020
+
1021
+ var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
1022
+ return React__default.createElement("div", {
1023
+ className: clsx('LuiCheckboxInput', {
1024
+ 'LuiCheckboxInput--isChecked': props.isChecked,
1025
+ 'LuiCheckboxInput--hasError': !!props.error
1026
+ })
1027
+ }, React__default.createElement("label", {
1028
+ htmlFor: id,
1029
+ className: "LuiCheckboxInput-group"
1030
+ }, React__default.createElement("input", Object.assign({
1031
+ className: clsx('LuiCheckboxInput-input'),
1032
+ id: id,
1033
+ type: "checkbox",
1034
+ value: props.value,
1035
+ onChange: props.onChange,
1036
+ checked: props.isChecked,
1037
+ disabled: props.isDisabled
1038
+ }, props.inputProps)), React__default.createElement("span", {
1039
+ className: "LuiCheckboxInput-label"
1040
+ }, props.label)), props.error && React__default.createElement(LuiError, {
1041
+ className: "LuiCheckboxInput",
1042
+ error: props.error
1043
+ }));
1044
+ };
1045
+
1046
+ var LuiFileInputBox = function LuiFileInputBox(props) {
1047
+ var _useState = useState(),
1048
+ file = _useState[0],
1049
+ setFile = _useState[1];
1050
+
1051
+ var _useState2 = useState(false),
1052
+ hasFileFormatError = _useState2[0],
1053
+ setHasFileFormatError = _useState2[1];
1054
+
1055
+ var onChange = function onChange(e) {
1056
+ // Logic to go here to check extensions and setHasFileFormatError
1057
+ setHasFileFormatError(false);
1058
+ var files = e.target.files; // File upload box is configured to only accept 1 file, we can't have more than one here
1059
+
1060
+ if (files && files.length === 1) {
1061
+ var selectedFile = files[0];
1062
+ var supportedFileTypes = props.acceptedExtensions.map(function (ext) {
1063
+ return ext.toUpperCase();
1064
+ });
1065
+ var fileName = selectedFile.name;
1066
+
1067
+ if (!supportedFileTypes.includes(getFileNameExtension(fileName))) {
1068
+ setHasFileFormatError(true);
1069
+ setFile(undefined);
1070
+ } else {
1071
+ setFile(selectedFile);
1072
+ props.onValidFileSelected(selectedFile);
1073
+ }
1074
+ }
1075
+ };
1076
+
1077
+ var FileFormatErrorDetails = function FileFormatErrorDetails() {
1078
+ return React__default.createElement("div", {
1079
+ className: "LuiFileInputBox-upload-container"
1080
+ }, React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
1081
+ className: 'LuiFileInputBox-upload-icon-error'
1082
+ }, React__default.createElement(LuiIcon, {
1083
+ name: "ic_error_outline",
1084
+ size: 'ns',
1085
+ alt: "Error"
1086
+ })), props.customFileErrorMessage ? React__default.createElement("p", null, props.customFileErrorMessage) : React__default.createElement("p", {
1087
+ className: "LuiFileInputBox-upload-text"
1088
+ }, "You must select a file with extension of", ' ', extensionsAsHumanReadableList(props.acceptedExtensions), ".")));
1089
+ };
1090
+
1091
+ var hasError = hasFileFormatError || props.showMustSelectFileError === true;
1092
+ return React__default.createElement("div", {
1093
+ className: clsx('LuiFileInputBox-upload', hasError && 'LuiFileInputBox-upload-error'),
1094
+ style: {
1095
+ width: props.width || 320,
1096
+ height: props.height || 320
1097
+ }
1098
+ }, React__default.createElement("input", {
1099
+ role: "button",
1100
+ "aria-label": "File Upload",
1101
+ type: "file",
1102
+ className: "LuiFileInputBox-upload-input",
1103
+ accept: props.acceptedExtensions.map(function (extension) {
1104
+ return "." + extension;
1105
+ }).join(','),
1106
+ onChange: onChange
1107
+ }), React__default.createElement(React__default.Fragment, null, hasError ? React__default.createElement(FileFormatErrorDetails, null) : React__default.createElement(FileUploadInfo, {
1108
+ fileName: file == null ? void 0 : file.name,
1109
+ fileFormatText: props.fileFormatText,
1110
+ fileDescription: props.fileDescription
1111
+ })));
1112
+ }; // Only exported for chromatic
1113
+
1114
+ var FileUploadInfo = function FileUploadInfo(props) {
1115
+ var DragAndDropInstruction = function DragAndDropInstruction() {
1116
+ return React__default.createElement("p", {
1117
+ className: "LuiFileInputBox-upload-text"
1118
+ }, "Drag and drop your ", props.fileDescription, " into the box", React__default.createElement("br", null), React__default.createElement("span", null, "(or upload file manually)"));
1119
+ };
1120
+
1121
+ var WaitingForFileSelection = function WaitingForFileSelection() {
1122
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
1123
+ className: 'LuiFileInputBox-upload-icon-upload'
1124
+ }, React__default.createElement(LuiIcon, {
1125
+ name: "ic_publish",
1126
+ size: 'ns',
1127
+ alt: "Upload"
1128
+ })), React__default.createElement(DragAndDropInstruction, null), props.fileFormatText && React__default.createElement("p", {
1129
+ className: "LuiFileInputBox-upload-text LuiFileInputBox-upload-text-no-padding"
1130
+ }, props.fileFormatText));
1131
+ };
1132
+
1133
+ var UploadSuccess = function UploadSuccess() {
1134
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
1135
+ className: 'LuiFileInputBox-upload-icon-success'
1136
+ }, React__default.createElement(LuiIcon, {
1137
+ name: "ic_check_circle_outline",
1138
+ size: 'ns',
1139
+ alt: "Success"
1140
+ })), React__default.createElement("p", {
1141
+ className: "LuiFileInputBox-upload-file-name"
1142
+ }, props.fileName), React__default.createElement(DragAndDropInstruction, null));
1143
+ };
1144
+
1145
+ return React__default.createElement("div", {
1146
+ className: "LuiFileInputBox-upload-container"
1147
+ }, props.fileName ? React__default.createElement(UploadSuccess, null) : React__default.createElement(WaitingForFileSelection, null));
1148
+ };
1149
+ /**
1150
+ * Get the extension from a filename in upper-case.
1151
+ *
1152
+ * @param fileName File-name to get extension from.
1153
+ * @return fileName extension in upper-case if found else empty string.
1154
+ */
1155
+
1156
+ var getFileNameExtension = function getFileNameExtension(fileName) {
1157
+ var idx = fileName.lastIndexOf('.');
1158
+ return idx === -1 ? '' : fileName.substr(idx + 1).toUpperCase();
1159
+ };
1160
+ /**
1161
+ * Convert an array of extensions to a human readable string in upper-case.
1162
+ * e.g. JPG, TIFF or BMP.
1163
+ *
1164
+ * @param extensions List of extensions to convert.
1165
+ * @return Extensions in a human readable string in upper-case.
1166
+ */
1167
+
1168
+ var extensionsAsHumanReadableList = function extensionsAsHumanReadableList(extensions) {
1169
+ var uppercaseExtensions = extensions.map(function (extension) {
1170
+ return extension.toUpperCase();
1171
+ });
1172
+ if (!extensions.length) return '';
1173
+ if (extensions.length === 1) return uppercaseExtensions[0];
1174
+ return uppercaseExtensions.slice(0, -1).join(', ') + " or " + uppercaseExtensions[extensions.length - 1];
1175
+ };
1176
+
1177
+ var css$7 = ":root {\n --grey-80: #2a292c;\n --grey-60: #6b6966;\n --$gray: #989189;\n --grey-20: #beb9b4;\n --grey-10: #eaeaea;\n --grey-05: #f9f9f9;\n --teal: #00425d;\n --sea: #007198;\n --electric: #0096cc;\n --spray: #73c8e1;\n --polar: #e2f3f7;\n --sherpa: #004b50;\n --surfie: #017a76;\n --persian: #00a599;\n --downy: #73cdc8;\n --iceberg: #dcf5f0;\n --sacramento: #004e32;\n --salem: #08814d;\n --pigment: #0aa245;\n --granny: #9bd79b;\n --panache: #e9fae7;\n --brand-primary: #004b50;\n --brand-secondary: #017a76;\n --success: #0aa245;\n --success-bg: #e9fae7;\n --info: #3a7cdf;\n --info-bg: #d8e5f9;\n --warning: #ea6a2e;\n --warning-bg: #fbdfd2;\n --error: #cc0000;\n --error-focus: #5a0000;\n --error-bg: #f5cccc;\n --visited: #00425d;\n --green-hover: #08814d;\n --color-green-active: #004e32;\n --green-btn: #0aa245;\n --txt-link: #0096cc;\n --color-primary-hover-btn: #007198;\n --color-selection: #c7e9f3;\n --heading-color: #017a76;\n --heading-color--secondary: #2a292c;\n --base-type-color: #2a292c;\n --base-icon-color: #007198;\n --disabled-color: #989189;\n --disabled-color-dark: #6b6966;\n --linz-color-primary: #023d48;\n --linz-color-primary-hover: #01818a;\n --linz-color-tertiary: #e1e44a;\n --linz-color-tertiary-hover: #cdcf59;\n --color-test-pink: #f09;\n --linz-linear-gradient-blue: linear-gradient(70deg, #00425d 12%, #007198 100%);\n --linz-linear-gradient-teal: linear-gradient(270deg, #00a599 1%, #73cdc8 100%);\n}\n\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.LuiSelectInput_LuiSelect__42744a23 {\n margin-bottom: 24px;\n}\n\n.LuiSelectInput_LuiSelectLabelText__42744a23 {\n display: block;\n margin-bottom: 6px;\n color: #000000;\n text-align: left;\n}\n.LuiSelectInput_isDisabled__42744a23 .LuiSelectInput_LuiSelectLabelText__42744a23 {\n color: #b2b2b2;\n}\n\n.LuiSelectInput_LuiSelectSelect__42744a23 {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: normal;\n margin-bottom: 0;\n border: 1px solid #b2b2b2;\n border-radius: 4px;\n display: block;\n height: 48px;\n color: #000000;\n caret-color: #000000;\n padding-right: 32px;\n padding-left: 16px;\n width: 100%;\n transition: all 0.15 ease-in-out;\n appearance: none;\n}\n.LuiSelectInput_LuiSelectSelect__42744a23:hover, .LuiSelectInput_LuiSelectSelect__42744a23:active {\n border-color: #053d52;\n cursor: pointer;\n}\n.LuiSelectInput_LuiSelectSelect__42744a23:focus {\n outline: none;\n border-color: #053d52;\n}\n.LuiSelectInput_hasError__42744a23 .LuiSelectInput_LuiSelectSelect__42744a23 {\n border-color: #eb5757;\n}\n.LuiSelectInput_isDisabled__42744a23 .LuiSelectInput_LuiSelectSelect__42744a23 {\n border-color: #b2b2b2;\n background-color: #fff;\n color: #b2b2b2;\n opacity: 0.3;\n cursor: not-allowed;\n}\n.LuiSelectInput_hasPlaceholder__42744a23 .LuiSelectInput_LuiSelectSelect__42744a23 {\n color: #b2b2b2;\n}\n.LuiSelectInput_hasValue__42744a23 .LuiSelectInput_LuiSelectSelect__42744a23 {\n color: #2a292c;\n}\n\n.LuiSelectInput_LuiSelectWrapper__42744a23 {\n position: relative;\n max-width: 300px;\n}\n\n.LuiSelectInput_LuiSelectChevronIcon__42744a23 {\n position: absolute;\n right: 16px;\n top: 50%;\n transform: translateY(-50%);\n pointer-events: none;\n}\n\n.LuiSelectInput_LuiSelectError__42744a23 {\n position: relative;\n display: flex;\n color: #eb5757;\n text-align: left;\n padding-left: 22px;\n font-size: 14px;\n line-height: 20px;\n margin-top: 2px;\n}\n\n.LuiSelectInput_LuiSelectErrorIcon__42744a23 {\n position: absolute;\n left: 0;\n top: 2px;\n}";
1178
+ n(css$7,{});
1179
+
1180
+ var LuiSelectInput = function LuiSelectInput(props) {
1181
+ var _props$selectProps;
1182
+
1183
+ var id = useGenerateOrDefaultId((_props$selectProps = props.selectProps) == null ? void 0 : _props$selectProps.id);
1184
+ return React__default.createElement("div", {
1185
+ className: 'LuiSelect'
1186
+ }, React__default.createElement("label", {
1187
+ htmlFor: id,
1188
+ className: "LuiSelect-label"
1189
+ }, React__default.createElement("span", {
1190
+ className: clsx('LuiSelect-label-text', props.hideLabel ? 'LuiScreenReadersOnly' : '')
1191
+ }, props.label), React__default.createElement("div", {
1192
+ className: "LuiSelect-wrapper"
1193
+ }, React__default.createElement("select", Object.assign({
1194
+ name: id,
1195
+ onChange: props.onChange,
1196
+ value: props.value,
1197
+ className: "LuiSelect-select"
1198
+ }, props.selectProps), props.placeholderText && React__default.createElement("option", {
1199
+ value: "",
1200
+ disabled: true
1201
+ }, props.placeholderText), props.options.map(function (selection) {
1202
+ return React__default.createElement("option", {
1203
+ key: selection.value,
1204
+ value: selection.value
1205
+ }, selection.label);
1206
+ })), React__default.createElement(LuiIcon, {
1207
+ alt: 'Error',
1208
+ name: "ic_arrow_drop_down",
1209
+ className: "LuiSelect-chevron-icon",
1210
+ size: "sm"
1211
+ })), props.error && React__default.createElement("span", {
1212
+ className: "LuiSelect-error"
1213
+ }, React__default.createElement(LuiIcon, {
1214
+ alt: 'Error',
1215
+ name: "ic_error",
1216
+ className: "LuiSelect-error-icon",
1217
+ size: "sm",
1218
+ status: "error"
1219
+ }), props.error)));
1220
+ };
1221
+
1222
+ var css$8 = ":root {\n --grey-80: #2a292c;\n --grey-60: #6b6966;\n --$gray: #989189;\n --grey-20: #beb9b4;\n --grey-10: #eaeaea;\n --grey-05: #f9f9f9;\n --teal: #00425d;\n --sea: #007198;\n --electric: #0096cc;\n --spray: #73c8e1;\n --polar: #e2f3f7;\n --sherpa: #004b50;\n --surfie: #017a76;\n --persian: #00a599;\n --downy: #73cdc8;\n --iceberg: #dcf5f0;\n --sacramento: #004e32;\n --salem: #08814d;\n --pigment: #0aa245;\n --granny: #9bd79b;\n --panache: #e9fae7;\n --brand-primary: #004b50;\n --brand-secondary: #017a76;\n --success: #0aa245;\n --success-bg: #e9fae7;\n --info: #3a7cdf;\n --info-bg: #d8e5f9;\n --warning: #ea6a2e;\n --warning-bg: #fbdfd2;\n --error: #cc0000;\n --error-focus: #5a0000;\n --error-bg: #f5cccc;\n --visited: #00425d;\n --green-hover: #08814d;\n --color-green-active: #004e32;\n --green-btn: #0aa245;\n --txt-link: #0096cc;\n --color-primary-hover-btn: #007198;\n --color-selection: #c7e9f3;\n --heading-color: #017a76;\n --heading-color--secondary: #2a292c;\n --base-type-color: #2a292c;\n --base-icon-color: #007198;\n --disabled-color: #989189;\n --disabled-color-dark: #6b6966;\n --linz-color-primary: #023d48;\n --linz-color-primary-hover: #01818a;\n --linz-color-tertiary: #e1e44a;\n --linz-color-tertiary-hover: #cdcf59;\n --color-test-pink: #f09;\n --linz-linear-gradient-blue: linear-gradient(70deg, #00425d 12%, #007198 100%);\n --linz-linear-gradient-teal: linear-gradient(270deg, #00a599 1%, #73cdc8 100%);\n}\n\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.LuiTextAreaInput_LuiTextAreaInput__f628aa46 {\n width: 100%;\n margin-bottom: 24px;\n position: relative;\n}\n.LuiTextAreaInput_LuiTextAreaInput__f628aa46 textarea {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: normal;\n border-radius: 4px;\n border: solid 1px #b2b2b2;\n background: #fff;\n padding-top: 14px;\n padding-right: 32px;\n padding-bottom: 14px;\n padding-left: 16px;\n box-sizing: border-box;\n width: 100%;\n resize: vertical;\n min-height: 100px;\n}\n.LuiTextAreaInput_LuiTextAreaInput__f628aa46 textarea {\n font-size: 14px;\n}\n@media screen and (min-width: 1px) {\n .LuiTextAreaInput_LuiTextAreaInput__f628aa46 textarea {\n font-size: calc(\n 14px + 2 *\n (\n (100vw - 1px) / 1279\n )\n );\n }\n}\n@media screen and (min-width: 1280px) {\n .LuiTextAreaInput_LuiTextAreaInput__f628aa46 textarea {\n font-size: 16px;\n }\n}\n.LuiTextAreaInput_LuiTextAreaInput__f628aa46 textarea:focus {\n outline: none;\n border-color: #053d52;\n}\n.LuiTextAreaInput_LuiTextAreaInput__f628aa46 label,\n.LuiTextAreaInput_LuiTextAreaInput__f628aa46 textarea {\n display: block;\n}\n.LuiTextAreaInput_LuiTextAreaInput__f628aa46.LuiTextAreaInput_hasError__f628aa46 textarea,\n.LuiTextAreaInput_LuiTextAreaInput__f628aa46.LuiTextAreaInput_hasError__f628aa46 select {\n border-color: #eb5757;\n}\n.LuiTextAreaInput_LuiTextAreaInput__f628aa46.LuiTextAreaInput_isDisabled__f628aa46 textarea {\n border-color: #b2b2b2;\n background-color: #fff;\n cursor: not-allowed;\n opacity: 0.3;\n}\n.LuiTextAreaInput_LuiTextAreaInput__f628aa46.LuiTextAreaInput_isDisabled__f628aa46 label {\n opacity: 0.3;\n}\n\n.LuiTextAreaInput_LuiTextAreaInputLabel__f628aa46 {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: 700;\n display: block;\n font-size: 14px;\n line-height: 1.25;\n margin-bottom: 6px;\n color: #000;\n text-align: left;\n}\n\n.LuiTextAreaInput_LuiTextAreaInputError__f628aa46 {\n position: relative;\n display: flex;\n color: #eb5757;\n text-align: left;\n padding-left: 22px;\n font-size: 14px;\n line-height: 20px;\n margin-top: 2px;\n}\n\n.LuiTextAreaInput_LuiTextAreaInputErrorIcon__f628aa46 {\n position: absolute;\n left: 0;\n top: 2px;\n}";
1223
+ n(css$8,{});
1224
+
1225
+ var LuiTextAreaInput = function LuiTextAreaInput(props) {
1226
+ var _props$inputProps;
1227
+
1228
+ var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
1229
+ return React__default.createElement("div", {
1230
+ className: clsx('LuiTextAreaInput')
1231
+ }, React__default.createElement("label", {
1232
+ htmlFor: id
1233
+ }, React__default.createElement("span", {
1234
+ className: "LuiTextAreaInput-label"
1235
+ }, props.label), React__default.createElement("textarea", Object.assign({
1236
+ id: id,
1237
+ value: props.value,
1238
+ onChange: props.onChange,
1239
+ rows: 5
1240
+ }, props.inputProps))), props.error && React__default.createElement("span", {
1241
+ className: "LuiTextAreaInput-error"
1242
+ }, React__default.createElement(LuiIcon, {
1243
+ alt: "error",
1244
+ name: "ic_error",
1245
+ className: "LuiTextAreaInput-error-icon",
1246
+ size: "sm",
1247
+ status: "error"
1248
+ }), props.error));
1249
+ };
1250
+
1251
+ var LuiRadioInput = function LuiRadioInput(props) {
1252
+ var _props$inputProps;
1253
+
1254
+ var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
1255
+ return React__default.createElement("fieldset", {
1256
+ className: 'LuiRadioInput'
1257
+ }, props.legend && React__default.createElement("legend", {
1258
+ className: "LuiRadioInput-legend"
1259
+ }, props.legend), props.options.map(function (option, index) {
1260
+ var radioId = id + "-" + index;
1261
+ var isChecked = props.selectedValue === option;
1262
+ var isDisabled = props.isOptionDisabled && props.isOptionDisabled(index);
1263
+ return React__default.createElement("div", {
1264
+ className: clsx('LuiRadioInput-option', {
1265
+ isDisabled: isDisabled
1266
+ }),
1267
+ key: radioId
1268
+ }, React__default.createElement("label", {
1269
+ htmlFor: radioId,
1270
+ className: "LuiRadioInput-option-label",
1271
+ key: radioId
1272
+ }, React__default.createElement("input", Object.assign({
1273
+ disabled: isDisabled,
1274
+ className: "LuiRadioInput-option-button",
1275
+ type: "radio",
1276
+ id: radioId,
1277
+ name: option,
1278
+ value: option,
1279
+ checked: isChecked,
1280
+ onChange: props.onChange
1281
+ }, props.inputProps)), React__default.createElement("span", {
1282
+ className: clsx('LuiRadioInput-option-check', {
1283
+ isChecked: isChecked
1284
+ })
1285
+ }), props.renderLabelFor ? props.renderLabelFor(option) : option));
1286
+ }), props.error && React__default.createElement("div", {
1287
+ className: "LuiRadioInput-error"
1288
+ }, React__default.createElement(LuiIcon, {
1289
+ alt: 'error',
1290
+ name: "ic_error",
1291
+ size: "sm",
1292
+ status: "error"
1293
+ }), React__default.createElement("span", null, props.error)));
1294
+ };
1295
+
1296
+ function LuiFormikCheckbox(props) {
1297
+ var ctx = useFormikContext();
1298
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(Field, {
1299
+ name: props.name
1300
+ }, function (_ref) {
1301
+ var field = _ref.field;
1302
+ var showError = getIn(ctx == null ? void 0 : ctx.errors, props.name);
1303
+ return React__default.createElement("div", {
1304
+ className: clsx(showError && 'lui-input-error')
1305
+ }, React__default.createElement("div", {
1306
+ className: "lui-input-group-wrapper "
1307
+ }, showError && React__default.createElement("i", {
1308
+ className: "lui-form-status-icon material-icons-round"
1309
+ }, "error"), React__default.createElement("div", {
1310
+ className: clsx('lui-checkbox-container', props.className)
1311
+ }, React__default.createElement("input", Object.assign({}, props.inputProps, {
1312
+ type: "checkbox",
1313
+ id: props.value,
1314
+ disabled: !!props.disabled,
1315
+ checked: field.value
1316
+ }, field)), typeof props.label === 'string' ? React__default.createElement("label", {
1317
+ htmlFor: props.value
1318
+ }, props.label) : props.label)));
1319
+ }));
1320
+ }
1321
+
1322
+ var LuiFormikFormLabel = function LuiFormikFormLabel(props) {
1323
+ return React__default.createElement("div", {
1324
+ className: clsx('LuiFormLabel-wrapper', props.className && "" + props.className)
1325
+ }, props.children, React__default.createElement("label", {
1326
+ className: "LuiFormLabel",
1327
+ htmlFor: props["for"]
1328
+ }, props.required && React__default.createElement("span", {
1329
+ className: "lui-required-input-icon"
1330
+ }, "*"), props.label), props.tooltip && React__default.createElement("i", {
1331
+ className: "material-icons-round"
1332
+ }, "help"));
1333
+ };
1334
+
1335
+ var LuiFormikTextInput = /*#__PURE__*/connect(function (props) {
1336
+ var error = getIn(props.formik.errors, props.name);
1337
+ var touch = getIn(props.formik.touched, props.name);
1338
+ var showError = touch && error;
1339
+
1340
+ var _useFormikContext = useFormikContext(),
1341
+ setFieldValue = _useFormikContext.setFieldValue;
1342
+
1343
+ var multiLineToggle = function multiLineToggle(field) {
1344
+ return !props.multiLine ? React__default.createElement("input", Object.assign({
1345
+ id: props.name,
1346
+ "data-testid": props.name
1347
+ }, field, {
1348
+ type: "text"
1349
+ }, props.inputProps, {
1350
+ onChange: function onChange(event) {
1351
+ var _props$validateOnChan;
1352
+
1353
+ setFieldValue(props.name, event.target.value, (_props$validateOnChan = props.validateOnChange) != null ? _props$validateOnChan : true);
1354
+
1355
+ if (props.onValueChange) {
1356
+ props.onValueChange({
1357
+ value: event.target.value,
1358
+ formik: props.formik
1359
+ });
1360
+ }
1361
+ }
1362
+ })) : React__default.createElement("textarea", Object.assign({
1363
+ id: props.name,
1364
+ "data-testid": props.name
1365
+ }, field, {
1366
+ rows: 1
1367
+ }, props.inputProps, {
1368
+ onChange: function onChange(event) {
1369
+ var _props$validateOnChan2;
1370
+
1371
+ setFieldValue(props.name, event.target.value, (_props$validateOnChan2 = props.validateOnChange) != null ? _props$validateOnChan2 : true);
1372
+
1373
+ if (props.onValueChange) {
1374
+ props.onValueChange({
1375
+ value: event.target.value,
1376
+ formik: props.formik
1377
+ });
1378
+ }
1379
+ }
1380
+ }));
1381
+ };
1382
+
1383
+ return React__default.createElement("div", {
1384
+ className: clsx(props.className && "" + props.className)
1385
+ }, props.label && React__default.createElement(LuiFormikFormLabel, {
1386
+ required: props.required,
1387
+ label: props.label,
1388
+ "for": props.name,
1389
+ tooltip: props.tooltip
1390
+ }), props.helperInfo, React__default.createElement(Field, {
1391
+ name: props.name,
1392
+ validate: props.validate
1393
+ }, function (_ref) {
1394
+ var field = _ref.field;
1395
+ return React__default.createElement("div", {
1396
+ className: clsx(showError && 'lui-input-error')
1397
+ }, React__default.createElement(ErrorMessage, {
1398
+ name: props.name,
1399
+ render: function render() {
1400
+ return React__default.createElement("i", {
1401
+ className: "lui-form-status-icon material-icons-round"
1402
+ }, "error");
1403
+ }
1404
+ }), multiLineToggle(field), React__default.createElement(ErrorMessage, {
1405
+ name: props.name,
1406
+ className: 'lui-error-msg',
1407
+ component: "p"
1408
+ }));
1409
+ }));
1410
+ });
1411
+
1412
+ var LuiFormikRadioButton = function LuiFormikRadioButton(props) {
1413
+ var _useField = useField(props),
1414
+ field = _useField[0],
1415
+ meta = _useField[1];
1416
+
1417
+ return React__default.createElement("div", {
1418
+ className: props.className
1419
+ }, meta.touched && meta.error && React__default.createElement("i", {
1420
+ className: "lui-form-status-icon material-icons-round"
1421
+ }, "error"), React__default.createElement("div", {
1422
+ className: 'lui-radio-container'
1423
+ }, React__default.createElement("input", Object.assign({
1424
+ disabled: !!props.disabled
1425
+ }, field, {
1426
+ checked: props.value === field.value,
1427
+ value: props.value,
1428
+ id: props.value,
1429
+ type: "radio"
1430
+ }, props.inputProps)), React__default.createElement("label", {
1431
+ htmlFor: props.value
1432
+ }, props.label)));
1433
+ };
1434
+
1435
+ var LuiFormikRadioGroup = function LuiFormikRadioGroup(props) {
1436
+ var ctx = useFormikContext();
1437
+ var error = getIn(ctx.errors, props.name);
1438
+ var touch = getIn(ctx.touched, props.name);
1439
+ var showError = touch && error;
1440
+ var describedby = props.hint && camelcase(props == null ? void 0 : props.hint) + 'Id';
1441
+ var errorDescribedBy = error && camelcase(error) + 'Id';
1442
+ return React__default.createElement("div", {
1443
+ className: clsx('lui-fieldsetBlock-form-group', showError && 'lui-input-error')
1444
+ }, React__default.createElement("fieldset", {
1445
+ "aria-describedby": clsx(props.hint && describedby + 'Id', showError && errorDescribedBy)
1446
+ }, React__default.createElement("legend", null, props.required && React__default.createElement("span", {
1447
+ className: "lui-required-input-icon"
1448
+ }, "*"), props.legend), showError && React__default.createElement("p", {
1449
+ id: errorDescribedBy
1450
+ }, React__default.createElement("span", {
1451
+ className: "LuiScreenReadersOnly"
1452
+ }, " Error: "), error), props.hint && React__default.createElement("p", {
1453
+ className: "lui-fieldset-support-txt small",
1454
+ id: describedby
1455
+ }, props.hint), React__default.createElement("div", {
1456
+ className: "lui-input-group-wrapper"
1457
+ }, props.children)));
1137
1458
  };
1138
- var LuiIcon = function LuiIcon(_ref) {
1139
- var name = _ref.name,
1140
- className = _ref.className,
1141
- _ref$size = _ref.size,
1142
- size = _ref$size === void 0 ? 'ns' : _ref$size,
1143
- title = _ref.title,
1144
- alt = _ref.alt,
1145
- _ref$status = _ref.status,
1146
- status = _ref$status === void 0 ? 'none' : _ref$status,
1147
- spanProps = _ref.spanProps;
1148
- var iconSVG = ICONS[name];
1149
1459
 
1150
- if (!iconSVG) {
1151
- console.warn("No icon found for: " + iconSVG);
1152
- return null;
1153
- }
1460
+ var LuiFormikFormSubmitButton = /*#__PURE__*/connect(function (props) {
1461
+ return React__default.createElement(LuiButton, {
1462
+ type: "submit",
1463
+ className: props.className,
1464
+ level: "primary",
1465
+ "data-testid": props['data-testid'],
1466
+ disabled: !!props.disabled
1467
+ }, props.children);
1468
+ });
1154
1469
 
1155
- return createElement("span", Object.assign({
1156
- className: clsx('LuiIcon', className, size && ICON_SIZES[size], status && ICON_STATUS[status]),
1157
- "data-icon": name,
1158
- title: title,
1159
- "aria-label": alt
1160
- }, spanProps), iconSVG);
1161
- };
1470
+ var LuiFormikSelect = /*#__PURE__*/connect(function (props) {
1471
+ var error = getIn(props.formik.errors, props.name);
1472
+ var touch = getIn(props.formik.touched, props.name);
1473
+ var showError = touch && error;
1474
+ return React__default.createElement("div", {
1475
+ className: props.className
1476
+ }, props.label && React__default.createElement(LuiFormikFormLabel, {
1477
+ className: 'lui-margin-bottom-xxs',
1478
+ "for": props.name,
1479
+ label: props.label,
1480
+ required: !!props.required,
1481
+ tooltip: props.tooltip
1482
+ }), props.helperInfo, React__default.createElement("div", {
1483
+ className: clsx('lui-input-wrapper', showError && 'lui-input-error')
1484
+ }, React__default.createElement(ErrorMessage, {
1485
+ name: props.name,
1486
+ render: function render() {
1487
+ return React__default.createElement("i", {
1488
+ className: "lui-form-status-icon material-icons-round"
1489
+ }, "error");
1490
+ }
1491
+ }), React__default.createElement(Field, Object.assign({
1492
+ disabled: props.disabled,
1493
+ defaultValue: props.defaultValue,
1494
+ name: props.name,
1495
+ id: props.name,
1496
+ validate: props.validate,
1497
+ as: "select"
1498
+ }, props.inputProps), props.children), React__default.createElement(ErrorMessage, {
1499
+ name: props.name,
1500
+ className: 'lui-error-msg',
1501
+ component: "p"
1502
+ })));
1503
+ });
1162
1504
 
1163
1505
  var LuiBearingInput = function LuiBearingInput(props) {
1164
1506
  var maxDecimal = 1;
@@ -4659,9 +5001,9 @@ function isChromatic() {
4659
5001
  return !!(window.navigator.userAgent.match(/Chromatic/) || window.location.href.match(/chromatic=true/));
4660
5002
  }
4661
5003
 
4662
- var css$4 = ":root {\n --grey-80: #2a292c;\n --grey-60: #6b6966;\n --$gray: #989189;\n --grey-20: #beb9b4;\n --grey-10: #eaeaea;\n --grey-05: #f9f9f9;\n --teal: #00425d;\n --sea: #007198;\n --electric: #0096cc;\n --spray: #73c8e1;\n --polar: #e2f3f7;\n --sherpa: #004b50;\n --surfie: #017a76;\n --persian: #00a599;\n --downy: #73cdc8;\n --iceberg: #dcf5f0;\n --sacramento: #004e32;\n --salem: #08814d;\n --pigment: #0aa245;\n --granny: #9bd79b;\n --panache: #e9fae7;\n --brand-primary: #004b50;\n --brand-secondary: #017a76;\n --success: #0aa245;\n --success-bg: #e9fae7;\n --info: #3a7cdf;\n --info-bg: #d8e5f9;\n --warning: #ea6a2e;\n --warning-bg: #fbdfd2;\n --error: #cc0000;\n --error-focus: #5a0000;\n --error-bg: #f5cccc;\n --visited: #00425d;\n --green-hover: #08814d;\n --color-green-active: #004e32;\n --green-btn: #0aa245;\n --txt-link: #0096cc;\n --color-primary-hover-btn: #007198;\n --color-selection: #c7e9f3;\n --heading-color: #017a76;\n --heading-color--secondary: #2a292c;\n --base-type-color: #2a292c;\n --base-icon-color: #007198;\n --disabled-color: #989189;\n --disabled-color-dark: #6b6966;\n --linz-color-primary: #023d48;\n --linz-color-primary-hover: #01818a;\n --linz-color-tertiary: #e1e44a;\n --linz-color-tertiary-hover: #cdcf59;\n --color-test-pink: #f09;\n --linz-linear-gradient-blue: linear-gradient(70deg, #00425d 12%, #007198 100%);\n --linz-linear-gradient-teal: linear-gradient(270deg, #00a599 1%, #73cdc8 100%);\n}";
5004
+ var css$9 = ":root {\n --grey-80: #2a292c;\n --grey-60: #6b6966;\n --$gray: #989189;\n --grey-20: #beb9b4;\n --grey-10: #eaeaea;\n --grey-05: #f9f9f9;\n --teal: #00425d;\n --sea: #007198;\n --electric: #0096cc;\n --spray: #73c8e1;\n --polar: #e2f3f7;\n --sherpa: #004b50;\n --surfie: #017a76;\n --persian: #00a599;\n --downy: #73cdc8;\n --iceberg: #dcf5f0;\n --sacramento: #004e32;\n --salem: #08814d;\n --pigment: #0aa245;\n --granny: #9bd79b;\n --panache: #e9fae7;\n --brand-primary: #004b50;\n --brand-secondary: #017a76;\n --success: #0aa245;\n --success-bg: #e9fae7;\n --info: #3a7cdf;\n --info-bg: #d8e5f9;\n --warning: #ea6a2e;\n --warning-bg: #fbdfd2;\n --error: #cc0000;\n --error-focus: #5a0000;\n --error-bg: #f5cccc;\n --visited: #00425d;\n --green-hover: #08814d;\n --color-green-active: #004e32;\n --green-btn: #0aa245;\n --txt-link: #0096cc;\n --color-primary-hover-btn: #007198;\n --color-selection: #c7e9f3;\n --heading-color: #017a76;\n --heading-color--secondary: #2a292c;\n --base-type-color: #2a292c;\n --base-icon-color: #007198;\n --disabled-color: #989189;\n --disabled-color-dark: #6b6966;\n --linz-color-primary: #023d48;\n --linz-color-primary-hover: #01818a;\n --linz-color-tertiary: #e1e44a;\n --linz-color-tertiary-hover: #cdcf59;\n --color-test-pink: #f09;\n --linz-linear-gradient-blue: linear-gradient(70deg, #00425d 12%, #007198 100%);\n --linz-linear-gradient-teal: linear-gradient(270deg, #00a599 1%, #73cdc8 100%);\n}";
4663
5005
  var modules_5b17bb95 = {"charcoal":"#2a292c","fuscous":"#6b6966","gray":"#989189","silver":"#beb9b4","lily":"#eaeaea","hint":"#f9f9f9","snow":"#ffffff","white":"#ffffff","teal":"#00425d","sea":"#007198","electric":"#0096cc","spray":"#73c8e1","polar":"#e2f3f7","sherpa":"#004b50","surfie":"#017a76","persian":"#00a599","downy":"#73cdc8","iceberg":"#dcf5f0","sacramento":"#004e32","salem":"#08814d","pigment":"#0aa245","granny":"#9bd79b","panache":"#e9fae7","brand-primary":"#004b50","brand-secondary":"#017a76","error":"#cc0000","error-bg":"#f5cccc","error-focus":"#5a0000","warning":"#ea6a2e","warning-bg":"#fbdfd2","warning-focus":"#b33a01","success":"#0aa245","success-bg":"#e9fae7","info":"#3a7cdf","info-bg":"#d8e5f9","visited":"#00425d","green-hover":"#08814d","green-active":"#004e32","green-btn":"#0aa245","txt-link":"#0096cc","primary-hover-btn":"#007198","selection":"#c7e9f3","heading-color":"#017a76","heading-color--secondary":"#2a292c","base-type-color":"#2a292c","base-icon-color":"#007198","disabled-color":"#989189","disabled-color-dark":"#6b6966","linz-color-primary":"#023d48","linz-color-primary-hover":"#01818a","linz-color-tertiary":"#e1e44a","linz-color-tertiary-hover":"#cdcf59","color-test-pink":"#f09","linz-linear-gradient-blue":"linear-gradient(70deg, #00425d 12%, #007198 100%)","linz-linear-gradient-teal":"linear-gradient(270deg, #00a599 1%, #73cdc8 100%)"};
4664
- n(css$4,{});
5006
+ n(css$9,{});
4665
5007
 
4666
5008
  /**
4667
5009
  * A wrapper around React Select with Lui styling
@@ -6865,137 +7207,6 @@ var LuiTooltip = function LuiTooltip(props) {
6865
7207
  }, children);
6866
7208
  };
6867
7209
 
6868
- var LuiFileInputBox = function LuiFileInputBox(props) {
6869
- var _useState = useState(),
6870
- file = _useState[0],
6871
- setFile = _useState[1];
6872
-
6873
- var _useState2 = useState(false),
6874
- hasFileFormatError = _useState2[0],
6875
- setHasFileFormatError = _useState2[1];
6876
-
6877
- var onChange = function onChange(e) {
6878
- // Logic to go here to check extensions and setHasFileFormatError
6879
- setHasFileFormatError(false);
6880
- var files = e.target.files; // File upload box is configured to only accept 1 file, we can't have more than one here
6881
-
6882
- if (files && files.length === 1) {
6883
- var selectedFile = files[0];
6884
- var supportedFileTypes = props.acceptedExtensions.map(function (ext) {
6885
- return ext.toUpperCase();
6886
- });
6887
- var fileName = selectedFile.name;
6888
-
6889
- if (!supportedFileTypes.includes(getFileNameExtension(fileName))) {
6890
- setHasFileFormatError(true);
6891
- setFile(undefined);
6892
- } else {
6893
- setFile(selectedFile);
6894
- props.onValidFileSelected(selectedFile);
6895
- }
6896
- }
6897
- };
6898
-
6899
- var FileFormatErrorDetails = function FileFormatErrorDetails() {
6900
- return React__default.createElement("div", {
6901
- className: "LuiFileInputBox-upload-container"
6902
- }, React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
6903
- className: 'LuiFileInputBox-upload-icon-error'
6904
- }, React__default.createElement(LuiIcon, {
6905
- name: "ic_error_outline",
6906
- size: 'ns',
6907
- alt: "Error"
6908
- })), props.customFileErrorMessage ? React__default.createElement("p", null, props.customFileErrorMessage) : React__default.createElement("p", {
6909
- className: "LuiFileInputBox-upload-text"
6910
- }, "You must select a file with extension of", ' ', extensionsAsHumanReadableList(props.acceptedExtensions), ".")));
6911
- };
6912
-
6913
- var hasError = hasFileFormatError || props.showMustSelectFileError === true;
6914
- return React__default.createElement("div", {
6915
- className: clsx('LuiFileInputBox-upload', hasError && 'LuiFileInputBox-upload-error'),
6916
- style: {
6917
- width: props.width || 320,
6918
- height: props.height || 320
6919
- }
6920
- }, React__default.createElement("input", {
6921
- role: "button",
6922
- "aria-label": "File Upload",
6923
- type: "file",
6924
- className: "LuiFileInputBox-upload-input",
6925
- accept: props.acceptedExtensions.map(function (extension) {
6926
- return "." + extension;
6927
- }).join(','),
6928
- onChange: onChange
6929
- }), React__default.createElement(React__default.Fragment, null, hasError ? React__default.createElement(FileFormatErrorDetails, null) : React__default.createElement(FileUploadInfo, {
6930
- fileName: file == null ? void 0 : file.name,
6931
- fileFormatText: props.fileFormatText,
6932
- fileDescription: props.fileDescription
6933
- })));
6934
- }; // Only exported for chromatic
6935
-
6936
- var FileUploadInfo = function FileUploadInfo(props) {
6937
- var DragAndDropInstruction = function DragAndDropInstruction() {
6938
- return React__default.createElement("p", {
6939
- className: "LuiFileInputBox-upload-text"
6940
- }, "Drag and drop your ", props.fileDescription, " into the box", React__default.createElement("br", null), React__default.createElement("span", null, "(or upload file manually)"));
6941
- };
6942
-
6943
- var WaitingForFileSelection = function WaitingForFileSelection() {
6944
- return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
6945
- className: 'LuiFileInputBox-upload-icon-upload'
6946
- }, React__default.createElement(LuiIcon, {
6947
- name: "ic_publish",
6948
- size: 'ns',
6949
- alt: "Upload"
6950
- })), React__default.createElement(DragAndDropInstruction, null), props.fileFormatText && React__default.createElement("p", {
6951
- className: "LuiFileInputBox-upload-text LuiFileInputBox-upload-text-no-padding"
6952
- }, props.fileFormatText));
6953
- };
6954
-
6955
- var UploadSuccess = function UploadSuccess() {
6956
- return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
6957
- className: 'LuiFileInputBox-upload-icon-success'
6958
- }, React__default.createElement(LuiIcon, {
6959
- name: "ic_check_circle_outline",
6960
- size: 'ns',
6961
- alt: "Success"
6962
- })), React__default.createElement("p", {
6963
- className: "LuiFileInputBox-upload-file-name"
6964
- }, props.fileName), React__default.createElement(DragAndDropInstruction, null));
6965
- };
6966
-
6967
- return React__default.createElement("div", {
6968
- className: "LuiFileInputBox-upload-container"
6969
- }, props.fileName ? React__default.createElement(UploadSuccess, null) : React__default.createElement(WaitingForFileSelection, null));
6970
- };
6971
- /**
6972
- * Get the extension from a filename in upper-case.
6973
- *
6974
- * @param fileName File-name to get extension from.
6975
- * @return fileName extension in upper-case if found else empty string.
6976
- */
6977
-
6978
- var getFileNameExtension = function getFileNameExtension(fileName) {
6979
- var idx = fileName.lastIndexOf('.');
6980
- return idx === -1 ? '' : fileName.substr(idx + 1).toUpperCase();
6981
- };
6982
- /**
6983
- * Convert an array of extensions to a human readable string in upper-case.
6984
- * e.g. JPG, TIFF or BMP.
6985
- *
6986
- * @param extensions List of extensions to convert.
6987
- * @return Extensions in a human readable string in upper-case.
6988
- */
6989
-
6990
- var extensionsAsHumanReadableList = function extensionsAsHumanReadableList(extensions) {
6991
- var uppercaseExtensions = extensions.map(function (extension) {
6992
- return extension.toUpperCase();
6993
- });
6994
- if (!extensions.length) return '';
6995
- if (extensions.length === 1) return uppercaseExtensions[0];
6996
- return uppercaseExtensions.slice(0, -1).join(', ') + " or " + uppercaseExtensions[extensions.length - 1];
6997
- };
6998
-
6999
7210
  /**
7000
7211
  * This hook will callback with handleClickOutside() when "mousedown" dom event occurs off the refElement
7001
7212
  * usage:
@@ -7026,5 +7237,5 @@ function useClickedOutsideElement(refElement, handleClickOutside) {
7026
7237
  }, []);
7027
7238
  }
7028
7239
 
7029
- export { FIRM_KEY, FIRM_NAME_KEY, GLOBAL_CLIENT_REFERENCE_KEY, LOLActiveFirmMessage, LOLAuthorisedLink, LOLCommonDrawerMenu, LOLCommonDrawerMenuAfterLinks, LOLDrawerMenu, LOLFirmSwitcherMenu, LOLGlobalClientRefContext, LOLGlobalClientRefContextProvider, LOLLogoutLink, LOLUserContext, LOLUserContextProvider, LOLUserLastLogin, LuiAlertModal, LuiAlertModalButtons, LuiBanner, LuiBannerContent, LuiBearingFormikInput, LuiBearingInput, LuiButton, LuiButtonGroup, LuiCloseableHeaderMenuContext, LuiCloseableHeaderMenuItem, LuiComboSelect, LuiControlledMenu, LuiDrawerMenu, LuiDrawerMenuDivider, LuiDrawerMenuOption, LuiDrawerMenuOptions, LuiDrawerMenuSection, LuiDropdownMenu, LuiErrorPage, LuiExpandableBanner, LuiFileInputBox, LuiFilterContainer, LuiFilterMenu, LuiFooter, LuiFormikCheckbox, LuiFormikForm, LuiFormikFormLabel, LuiFormikFormSubmitButton, LuiFormikRadioButton, LuiFormikRadioGroup, LuiFormikSelect, LuiFormikTextInput, LuiHeader, LuiHeaderMenuItem, LuiIcon, LuiLoadingSpinner, LuiMenu, LuiMenuCloseButton, LuiMenuDivider, LuiMenuHeader, LuiMenuItem, LuiMessagingContextProvider, LuiMiniSpinner, LuiModal, LuiStaticMessage, LuiStatusSpinner, LuiTab, LuiTabs, LuiTabsContext, LuiTabsGroup, LuiTabsPanel, LuiTabsPanelSwitch, LuiToastMessage, LuiTooltip, LuiUpdatesSplashModal, useClickedOutsideElement, useLOLGlobalClientRefContext, useLOLUserContext, useShowLUIMessage };
7240
+ export { FIRM_KEY, FIRM_NAME_KEY, GLOBAL_CLIENT_REFERENCE_KEY, LOLActiveFirmMessage, LOLAuthorisedLink, LOLCommonDrawerMenu, LOLCommonDrawerMenuAfterLinks, LOLDrawerMenu, LOLFirmSwitcherMenu, LOLGlobalClientRefContext, LOLGlobalClientRefContextProvider, LOLLogoutLink, LOLUserContext, LOLUserContextProvider, LOLUserLastLogin, LuiAlertModal, LuiAlertModalButtons, LuiBanner, LuiBannerContent, LuiBearingFormikInput, LuiBearingInput, LuiButton, LuiButtonGroup, LuiCheckboxInput, LuiCloseableHeaderMenuContext, LuiCloseableHeaderMenuItem, LuiComboSelect, LuiControlledMenu, LuiDrawerMenu, LuiDrawerMenuDivider, LuiDrawerMenuOption, LuiDrawerMenuOptions, LuiDrawerMenuSection, LuiDropdownMenu, LuiErrorPage, LuiExpandableBanner, LuiFileInputBox, LuiFilterContainer, LuiFilterMenu, LuiFooter, LuiFormikCheckbox, LuiFormikForm, LuiFormikFormLabel, LuiFormikFormSubmitButton, LuiFormikRadioButton, LuiFormikRadioGroup, LuiFormikSelect, LuiFormikTextInput, LuiHeader, LuiHeaderMenuItem, LuiIcon, LuiLoadingSpinner, LuiMenu, LuiMenuCloseButton, LuiMenuDivider, LuiMenuHeader, LuiMenuItem, LuiMessagingContextProvider, LuiMiniSpinner, LuiModal, LuiRadioInput, LuiSelectInput, LuiStaticMessage, LuiStatusSpinner, LuiTab, LuiTabs, LuiTabsContext, LuiTabsGroup, LuiTabsPanel, LuiTabsPanelSwitch, LuiTextAreaInput, LuiTextInput, LuiToastMessage, LuiTooltip, LuiUpdatesSplashModal, useClickedOutsideElement, useLOLGlobalClientRefContext, useLOLUserContext, useShowLUIMessage };
7030
7241
  //# sourceMappingURL=lui.esm.js.map