@linzjs/lui 11.1.0 → 11.1.4
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 +28 -0
- package/dist/components/LuiIcon/LuiIcon.d.ts +0 -1
- package/dist/components/LuiTabs/LuiTab/LuiTab.d.ts +0 -1
- package/dist/components/LuiTabs/LuiTabsGroup/LuiTabsGroup.d.ts +0 -1
- package/dist/components/LuiTabs/LuiTabsPanel/LuiTabsPanel.d.ts +0 -1
- package/dist/index.d.ts +6 -1
- package/dist/lui.cjs.development.js +587 -383
- package/dist/lui.cjs.development.js.map +1 -1
- package/dist/lui.cjs.production.min.js +1 -1
- package/dist/lui.cjs.production.min.js.map +1 -1
- package/dist/lui.css +133 -0
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +583 -384
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiIcon/LuiIcons.scss +87 -0
- package/dist/scss/Components/LuiTabs/LuiTab/LuiTab.scss +45 -0
- package/dist/scss/Components/LuiTabs/LuiTabs.scss +3 -0
- package/dist/scss/Components/LuiTabs/LuiTabsGroup/LuiTabsGroup.scss +10 -0
- package/dist/scss/Components/LuiTabs/LuiTabsPanel/LuiTabsPanel.scss +9 -0
- package/dist/scss/base.scss +10 -0
- package/package.json +1 -1
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';
|
|
@@ -556,11 +557,6 @@ var LuiTabs = function LuiTabs(props) {
|
|
|
556
557
|
}, props.children));
|
|
557
558
|
};
|
|
558
559
|
|
|
559
|
-
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
560
|
-
|
|
561
|
-
var css = ":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.LuiTab_LuiTab__5d8d8010 {\n background: transparent;\n border-radius: 0;\n color: #2a292c;\n min-width: 10rem;\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: normal;\n}\n.LuiTab_LuiTab__5d8d8010:focus {\n background-color: rgba(0, 165, 153, 0.2);\n}\n.LuiTab_LuiTabsGroup_Justified__5d8d8010 .LuiTab_LuiTab__5d8d8010 {\n width: 100%;\n}\n\n.LuiTab_LuiTab_Active__5d8d8010,\n.LuiTab_LuiTab_Active__5d8d8010:focus {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: 600;\n position: relative;\n outline: none;\n background: transparent;\n}\n.LuiTab_LuiTab_Active__5d8d8010:after,\n.LuiTab_LuiTab_Active__5d8d8010:focus:after {\n content: \"\";\n display: block;\n height: 4px;\n width: 100%;\n padding: 0 32px;\n left: 0;\n right: 0;\n bottom: -1px;\n box-sizing: border-box;\n background: linear-gradient(270deg, #73cdc8 1%, #00a599 100%);\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n position: absolute;\n}";
|
|
562
|
-
n(css,{});
|
|
563
|
-
|
|
564
560
|
var LuiTab = function LuiTab(props) {
|
|
565
561
|
return React__default.createElement("button", {
|
|
566
562
|
className: clsx('LuiTab', props.active && 'LuiTab--active'),
|
|
@@ -572,9 +568,6 @@ var LuiTab = function LuiTab(props) {
|
|
|
572
568
|
}, props.children);
|
|
573
569
|
};
|
|
574
570
|
|
|
575
|
-
var css$1 = ":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.LuiTabsGroup_LuiTabsGroup__b045736d {\n border-bottom: 1px solid #beb9b4;\n}\n\n.LuiTabsGroup_LuiTabsGroup_Justified__b045736d {\n display: flex;\n justify-content: space-between;\n}";
|
|
576
|
-
n(css$1,{});
|
|
577
|
-
|
|
578
571
|
var LuiTabsGroup = function LuiTabsGroup(props) {
|
|
579
572
|
return React__default.createElement("div", {
|
|
580
573
|
className: "LuiTabsGroup " + (props.justify ? 'LuiTabsGroup--justified' : ''),
|
|
@@ -583,9 +576,6 @@ var LuiTabsGroup = function LuiTabsGroup(props) {
|
|
|
583
576
|
}, props.children);
|
|
584
577
|
};
|
|
585
578
|
|
|
586
|
-
var css$2 = ":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.LuiTabsPanel_LuiTabsPanel__8085964d {\n display: none;\n}\n\n.LuiTabsPanel_LuiTabsPanel_Active__8085964d {\n display: block;\n overflow: auto;\n}";
|
|
587
|
-
n(css$2,{});
|
|
588
|
-
|
|
589
579
|
var LuiTabsPanel = function LuiTabsPanel(props) {
|
|
590
580
|
var context = useContext(LuiTabsContext);
|
|
591
581
|
var active = context.activePanel === props.panel;
|
|
@@ -622,217 +612,10 @@ function LuiFormikForm(props) {
|
|
|
622
612
|
}, React__default.createElement(Form, null, props.children, " ")));
|
|
623
613
|
}
|
|
624
614
|
|
|
625
|
-
function
|
|
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
|
-
});
|
|
615
|
+
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
833
616
|
|
|
834
|
-
var css
|
|
835
|
-
n(css
|
|
617
|
+
var css = "/**\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}";
|
|
618
|
+
n(css,{});
|
|
836
619
|
|
|
837
620
|
// NOTE: This is a generated file, nothing you do here matters
|
|
838
621
|
|
|
@@ -1127,38 +910,585 @@ var ICON_SIZES = {
|
|
|
1127
910
|
xl: 'LuiIcon--xl',
|
|
1128
911
|
ns: 'LuiIcon--noSize'
|
|
1129
912
|
};
|
|
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'
|
|
913
|
+
var ICON_STATUS = {
|
|
914
|
+
none: '',
|
|
915
|
+
error: 'LuiIcon--error',
|
|
916
|
+
warning: 'LuiIcon--warning',
|
|
917
|
+
success: 'LuiIcon--success',
|
|
918
|
+
interactive: 'LuiIcon--interactive',
|
|
919
|
+
disabled: 'LuiIcon--disabled'
|
|
920
|
+
};
|
|
921
|
+
var LuiIcon = function LuiIcon(_ref) {
|
|
922
|
+
var name = _ref.name,
|
|
923
|
+
className = _ref.className,
|
|
924
|
+
_ref$size = _ref.size,
|
|
925
|
+
size = _ref$size === void 0 ? 'ns' : _ref$size,
|
|
926
|
+
title = _ref.title,
|
|
927
|
+
alt = _ref.alt,
|
|
928
|
+
_ref$status = _ref.status,
|
|
929
|
+
status = _ref$status === void 0 ? 'none' : _ref$status,
|
|
930
|
+
spanProps = _ref.spanProps;
|
|
931
|
+
var iconSVG = ICONS[name];
|
|
932
|
+
|
|
933
|
+
if (!iconSVG) {
|
|
934
|
+
console.warn("No icon found for: " + iconSVG);
|
|
935
|
+
return null;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
return createElement("span", Object.assign({
|
|
939
|
+
className: clsx('LuiIcon', className, size && ICON_SIZES[size], status && ICON_STATUS[status]),
|
|
940
|
+
"data-icon": name,
|
|
941
|
+
title: title,
|
|
942
|
+
"aria-label": alt
|
|
943
|
+
}, spanProps), iconSVG);
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
var css$1 = "/**\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}";
|
|
947
|
+
n(css$1,{});
|
|
948
|
+
|
|
949
|
+
var LuiError = function LuiError(_ref) {
|
|
950
|
+
var error = _ref.error,
|
|
951
|
+
className = _ref.className;
|
|
952
|
+
return React__default.createElement("div", {
|
|
953
|
+
className: "LuiError " + className + "-error"
|
|
954
|
+
}, React__default.createElement(LuiIcon, {
|
|
955
|
+
className: "LuiError-errorIcon " + className + "-errorIcon",
|
|
956
|
+
alt: 'Error',
|
|
957
|
+
name: "ic_error",
|
|
958
|
+
size: "md",
|
|
959
|
+
status: "error"
|
|
960
|
+
}), error && React__default.createElement("span", {
|
|
961
|
+
className: "LuiError-errorText " + className + "-errorText"
|
|
962
|
+
}, error));
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
var css$2 = ":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}";
|
|
966
|
+
n(css$2,{});
|
|
967
|
+
|
|
968
|
+
function useGenerateOrDefaultId(idFromProps) {
|
|
969
|
+
var _useState = useState(idFromProps ? idFromProps : v4()),
|
|
970
|
+
id = _useState[0];
|
|
971
|
+
|
|
972
|
+
return id;
|
|
973
|
+
}
|
|
974
|
+
var LuiTextInput = function LuiTextInput(props) {
|
|
975
|
+
var _props$inputProps;
|
|
976
|
+
|
|
977
|
+
var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
|
|
978
|
+
return React__default.createElement("div", {
|
|
979
|
+
className: clsx('LuiTextInput', props.error ? 'LuiTextInput-error' : '')
|
|
980
|
+
}, React__default.createElement("label", {
|
|
981
|
+
className: 'LuiTextInput-label',
|
|
982
|
+
htmlFor: id
|
|
983
|
+
}, React__default.createElement("span", {
|
|
984
|
+
className: clsx(props.hideLabel ? 'LuiScreenReadersOnly' : '')
|
|
985
|
+
}, props.label), React__default.createElement("span", {
|
|
986
|
+
className: "LuiTextInput-inputWrapper"
|
|
987
|
+
}, React__default.createElement("input", Object.assign({
|
|
988
|
+
type: 'text',
|
|
989
|
+
className: clsx('LuiTextInput-input'),
|
|
990
|
+
min: "0",
|
|
991
|
+
value: props.value,
|
|
992
|
+
onChange: props.onChange
|
|
993
|
+
}, props.inputProps, {
|
|
994
|
+
id: id
|
|
995
|
+
}))), props.error && React__default.createElement("span", {
|
|
996
|
+
className: "LuiTextInput-error"
|
|
997
|
+
}, React__default.createElement(LuiIcon, {
|
|
998
|
+
alt: "error",
|
|
999
|
+
name: "ic_error",
|
|
1000
|
+
className: "LuiTextInput-error-icon",
|
|
1001
|
+
size: "sm",
|
|
1002
|
+
status: "error"
|
|
1003
|
+
}), props.error)));
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
var LuiCheckboxInput = function LuiCheckboxInput(props) {
|
|
1007
|
+
var _props$inputProps;
|
|
1008
|
+
|
|
1009
|
+
var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
|
|
1010
|
+
return React__default.createElement("div", {
|
|
1011
|
+
className: clsx('LuiCheckboxInput', {
|
|
1012
|
+
'LuiCheckboxInput--isChecked': props.isChecked,
|
|
1013
|
+
'LuiCheckboxInput--hasError': !!props.error
|
|
1014
|
+
})
|
|
1015
|
+
}, React__default.createElement("label", {
|
|
1016
|
+
htmlFor: id,
|
|
1017
|
+
className: "LuiCheckboxInput-group"
|
|
1018
|
+
}, React__default.createElement("input", Object.assign({
|
|
1019
|
+
className: clsx('LuiCheckboxInput-input'),
|
|
1020
|
+
id: id,
|
|
1021
|
+
type: "checkbox",
|
|
1022
|
+
value: props.value,
|
|
1023
|
+
onChange: props.onChange,
|
|
1024
|
+
checked: props.isChecked,
|
|
1025
|
+
disabled: props.isDisabled
|
|
1026
|
+
}, props.inputProps)), React__default.createElement("span", {
|
|
1027
|
+
className: "LuiCheckboxInput-label"
|
|
1028
|
+
}, props.label)), props.error && React__default.createElement(LuiError, {
|
|
1029
|
+
className: "LuiCheckboxInput",
|
|
1030
|
+
error: props.error
|
|
1031
|
+
}));
|
|
1032
|
+
};
|
|
1033
|
+
|
|
1034
|
+
var LuiFileInputBox = function LuiFileInputBox(props) {
|
|
1035
|
+
var _useState = useState(),
|
|
1036
|
+
file = _useState[0],
|
|
1037
|
+
setFile = _useState[1];
|
|
1038
|
+
|
|
1039
|
+
var _useState2 = useState(false),
|
|
1040
|
+
hasFileFormatError = _useState2[0],
|
|
1041
|
+
setHasFileFormatError = _useState2[1];
|
|
1042
|
+
|
|
1043
|
+
var onChange = function onChange(e) {
|
|
1044
|
+
// Logic to go here to check extensions and setHasFileFormatError
|
|
1045
|
+
setHasFileFormatError(false);
|
|
1046
|
+
var files = e.target.files; // File upload box is configured to only accept 1 file, we can't have more than one here
|
|
1047
|
+
|
|
1048
|
+
if (files && files.length === 1) {
|
|
1049
|
+
var selectedFile = files[0];
|
|
1050
|
+
var supportedFileTypes = props.acceptedExtensions.map(function (ext) {
|
|
1051
|
+
return ext.toUpperCase();
|
|
1052
|
+
});
|
|
1053
|
+
var fileName = selectedFile.name;
|
|
1054
|
+
|
|
1055
|
+
if (!supportedFileTypes.includes(getFileNameExtension(fileName))) {
|
|
1056
|
+
setHasFileFormatError(true);
|
|
1057
|
+
setFile(undefined);
|
|
1058
|
+
} else {
|
|
1059
|
+
setFile(selectedFile);
|
|
1060
|
+
props.onValidFileSelected(selectedFile);
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
};
|
|
1064
|
+
|
|
1065
|
+
var FileFormatErrorDetails = function FileFormatErrorDetails() {
|
|
1066
|
+
return React__default.createElement("div", {
|
|
1067
|
+
className: "LuiFileInputBox-upload-container"
|
|
1068
|
+
}, React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1069
|
+
className: 'LuiFileInputBox-upload-icon-error'
|
|
1070
|
+
}, React__default.createElement(LuiIcon, {
|
|
1071
|
+
name: "ic_error_outline",
|
|
1072
|
+
size: 'ns',
|
|
1073
|
+
alt: "Error"
|
|
1074
|
+
})), props.customFileErrorMessage ? React__default.createElement("p", null, props.customFileErrorMessage) : React__default.createElement("p", {
|
|
1075
|
+
className: "LuiFileInputBox-upload-text"
|
|
1076
|
+
}, "You must select a file with extension of", ' ', extensionsAsHumanReadableList(props.acceptedExtensions), ".")));
|
|
1077
|
+
};
|
|
1078
|
+
|
|
1079
|
+
var hasError = hasFileFormatError || props.showMustSelectFileError === true;
|
|
1080
|
+
return React__default.createElement("div", {
|
|
1081
|
+
className: clsx('LuiFileInputBox-upload', hasError && 'LuiFileInputBox-upload-error'),
|
|
1082
|
+
style: {
|
|
1083
|
+
width: props.width || 320,
|
|
1084
|
+
height: props.height || 320
|
|
1085
|
+
}
|
|
1086
|
+
}, React__default.createElement("input", {
|
|
1087
|
+
role: "button",
|
|
1088
|
+
"aria-label": "File Upload",
|
|
1089
|
+
type: "file",
|
|
1090
|
+
className: "LuiFileInputBox-upload-input",
|
|
1091
|
+
accept: props.acceptedExtensions.map(function (extension) {
|
|
1092
|
+
return "." + extension;
|
|
1093
|
+
}).join(','),
|
|
1094
|
+
onChange: onChange
|
|
1095
|
+
}), React__default.createElement(React__default.Fragment, null, hasError ? React__default.createElement(FileFormatErrorDetails, null) : React__default.createElement(FileUploadInfo, {
|
|
1096
|
+
fileName: file == null ? void 0 : file.name,
|
|
1097
|
+
fileFormatText: props.fileFormatText,
|
|
1098
|
+
fileDescription: props.fileDescription
|
|
1099
|
+
})));
|
|
1100
|
+
}; // Only exported for chromatic
|
|
1101
|
+
|
|
1102
|
+
var FileUploadInfo = function FileUploadInfo(props) {
|
|
1103
|
+
var DragAndDropInstruction = function DragAndDropInstruction() {
|
|
1104
|
+
return React__default.createElement("p", {
|
|
1105
|
+
className: "LuiFileInputBox-upload-text"
|
|
1106
|
+
}, "Drag and drop your ", props.fileDescription, " into the box", React__default.createElement("br", null), React__default.createElement("span", null, "(or upload file manually)"));
|
|
1107
|
+
};
|
|
1108
|
+
|
|
1109
|
+
var WaitingForFileSelection = function WaitingForFileSelection() {
|
|
1110
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1111
|
+
className: 'LuiFileInputBox-upload-icon-upload'
|
|
1112
|
+
}, React__default.createElement(LuiIcon, {
|
|
1113
|
+
name: "ic_publish",
|
|
1114
|
+
size: 'ns',
|
|
1115
|
+
alt: "Upload"
|
|
1116
|
+
})), React__default.createElement(DragAndDropInstruction, null), props.fileFormatText && React__default.createElement("p", {
|
|
1117
|
+
className: "LuiFileInputBox-upload-text LuiFileInputBox-upload-text-no-padding"
|
|
1118
|
+
}, props.fileFormatText));
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1121
|
+
var UploadSuccess = function UploadSuccess() {
|
|
1122
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1123
|
+
className: 'LuiFileInputBox-upload-icon-success'
|
|
1124
|
+
}, React__default.createElement(LuiIcon, {
|
|
1125
|
+
name: "ic_check_circle_outline",
|
|
1126
|
+
size: 'ns',
|
|
1127
|
+
alt: "Success"
|
|
1128
|
+
})), React__default.createElement("p", {
|
|
1129
|
+
className: "LuiFileInputBox-upload-file-name"
|
|
1130
|
+
}, props.fileName), React__default.createElement(DragAndDropInstruction, null));
|
|
1131
|
+
};
|
|
1132
|
+
|
|
1133
|
+
return React__default.createElement("div", {
|
|
1134
|
+
className: "LuiFileInputBox-upload-container"
|
|
1135
|
+
}, props.fileName ? React__default.createElement(UploadSuccess, null) : React__default.createElement(WaitingForFileSelection, null));
|
|
1136
|
+
};
|
|
1137
|
+
/**
|
|
1138
|
+
* Get the extension from a filename in upper-case.
|
|
1139
|
+
*
|
|
1140
|
+
* @param fileName File-name to get extension from.
|
|
1141
|
+
* @return fileName extension in upper-case if found else empty string.
|
|
1142
|
+
*/
|
|
1143
|
+
|
|
1144
|
+
var getFileNameExtension = function getFileNameExtension(fileName) {
|
|
1145
|
+
var idx = fileName.lastIndexOf('.');
|
|
1146
|
+
return idx === -1 ? '' : fileName.substr(idx + 1).toUpperCase();
|
|
1147
|
+
};
|
|
1148
|
+
/**
|
|
1149
|
+
* Convert an array of extensions to a human readable string in upper-case.
|
|
1150
|
+
* e.g. JPG, TIFF or BMP.
|
|
1151
|
+
*
|
|
1152
|
+
* @param extensions List of extensions to convert.
|
|
1153
|
+
* @return Extensions in a human readable string in upper-case.
|
|
1154
|
+
*/
|
|
1155
|
+
|
|
1156
|
+
var extensionsAsHumanReadableList = function extensionsAsHumanReadableList(extensions) {
|
|
1157
|
+
var uppercaseExtensions = extensions.map(function (extension) {
|
|
1158
|
+
return extension.toUpperCase();
|
|
1159
|
+
});
|
|
1160
|
+
if (!extensions.length) return '';
|
|
1161
|
+
if (extensions.length === 1) return uppercaseExtensions[0];
|
|
1162
|
+
return uppercaseExtensions.slice(0, -1).join(', ') + " or " + uppercaseExtensions[extensions.length - 1];
|
|
1163
|
+
};
|
|
1164
|
+
|
|
1165
|
+
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.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}";
|
|
1166
|
+
n(css$3,{});
|
|
1167
|
+
|
|
1168
|
+
var LuiSelectInput = function LuiSelectInput(props) {
|
|
1169
|
+
var _props$selectProps;
|
|
1170
|
+
|
|
1171
|
+
var id = useGenerateOrDefaultId((_props$selectProps = props.selectProps) == null ? void 0 : _props$selectProps.id);
|
|
1172
|
+
return React__default.createElement("div", {
|
|
1173
|
+
className: 'LuiSelect'
|
|
1174
|
+
}, React__default.createElement("label", {
|
|
1175
|
+
htmlFor: id,
|
|
1176
|
+
className: "LuiSelect-label"
|
|
1177
|
+
}, React__default.createElement("span", {
|
|
1178
|
+
className: clsx('LuiSelect-label-text', props.hideLabel ? 'LuiScreenReadersOnly' : '')
|
|
1179
|
+
}, props.label), React__default.createElement("div", {
|
|
1180
|
+
className: "LuiSelect-wrapper"
|
|
1181
|
+
}, React__default.createElement("select", Object.assign({
|
|
1182
|
+
name: id,
|
|
1183
|
+
onChange: props.onChange,
|
|
1184
|
+
value: props.value,
|
|
1185
|
+
className: "LuiSelect-select"
|
|
1186
|
+
}, props.selectProps), props.placeholderText && React__default.createElement("option", {
|
|
1187
|
+
value: "",
|
|
1188
|
+
disabled: true
|
|
1189
|
+
}, props.placeholderText), props.options.map(function (selection) {
|
|
1190
|
+
return React__default.createElement("option", {
|
|
1191
|
+
key: selection.value,
|
|
1192
|
+
value: selection.value
|
|
1193
|
+
}, selection.label);
|
|
1194
|
+
})), React__default.createElement(LuiIcon, {
|
|
1195
|
+
alt: 'Error',
|
|
1196
|
+
name: "ic_arrow_drop_down",
|
|
1197
|
+
className: "LuiSelect-chevron-icon",
|
|
1198
|
+
size: "sm"
|
|
1199
|
+
})), props.error && React__default.createElement("span", {
|
|
1200
|
+
className: "LuiSelect-error"
|
|
1201
|
+
}, React__default.createElement(LuiIcon, {
|
|
1202
|
+
alt: 'Error',
|
|
1203
|
+
name: "ic_error",
|
|
1204
|
+
className: "LuiSelect-error-icon",
|
|
1205
|
+
size: "sm",
|
|
1206
|
+
status: "error"
|
|
1207
|
+
}), props.error)));
|
|
1208
|
+
};
|
|
1209
|
+
|
|
1210
|
+
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.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}";
|
|
1211
|
+
n(css$4,{});
|
|
1212
|
+
|
|
1213
|
+
var LuiTextAreaInput = function LuiTextAreaInput(props) {
|
|
1214
|
+
var _props$inputProps;
|
|
1215
|
+
|
|
1216
|
+
var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
|
|
1217
|
+
return React__default.createElement("div", {
|
|
1218
|
+
className: clsx('LuiTextAreaInput')
|
|
1219
|
+
}, React__default.createElement("label", {
|
|
1220
|
+
htmlFor: id
|
|
1221
|
+
}, React__default.createElement("span", {
|
|
1222
|
+
className: "LuiTextAreaInput-label"
|
|
1223
|
+
}, props.label), React__default.createElement("textarea", Object.assign({
|
|
1224
|
+
id: id,
|
|
1225
|
+
value: props.value,
|
|
1226
|
+
onChange: props.onChange,
|
|
1227
|
+
rows: 5
|
|
1228
|
+
}, props.inputProps))), props.error && React__default.createElement("span", {
|
|
1229
|
+
className: "LuiTextAreaInput-error"
|
|
1230
|
+
}, React__default.createElement(LuiIcon, {
|
|
1231
|
+
alt: "error",
|
|
1232
|
+
name: "ic_error",
|
|
1233
|
+
className: "LuiTextAreaInput-error-icon",
|
|
1234
|
+
size: "sm",
|
|
1235
|
+
status: "error"
|
|
1236
|
+
}), props.error));
|
|
1237
|
+
};
|
|
1238
|
+
|
|
1239
|
+
var LuiRadioInput = function LuiRadioInput(props) {
|
|
1240
|
+
var _props$inputProps;
|
|
1241
|
+
|
|
1242
|
+
var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
|
|
1243
|
+
return React__default.createElement("fieldset", {
|
|
1244
|
+
className: 'LuiRadioInput'
|
|
1245
|
+
}, props.legend && React__default.createElement("legend", {
|
|
1246
|
+
className: "LuiRadioInput-legend"
|
|
1247
|
+
}, props.legend), props.options.map(function (option, index) {
|
|
1248
|
+
var radioId = id + "-" + index;
|
|
1249
|
+
var isChecked = props.selectedValue === option;
|
|
1250
|
+
var isDisabled = props.isOptionDisabled && props.isOptionDisabled(index);
|
|
1251
|
+
return React__default.createElement("div", {
|
|
1252
|
+
className: clsx('LuiRadioInput-option', {
|
|
1253
|
+
isDisabled: isDisabled
|
|
1254
|
+
}),
|
|
1255
|
+
key: radioId
|
|
1256
|
+
}, React__default.createElement("label", {
|
|
1257
|
+
htmlFor: radioId,
|
|
1258
|
+
className: "LuiRadioInput-option-label",
|
|
1259
|
+
key: radioId
|
|
1260
|
+
}, React__default.createElement("input", Object.assign({
|
|
1261
|
+
disabled: isDisabled,
|
|
1262
|
+
className: "LuiRadioInput-option-button",
|
|
1263
|
+
type: "radio",
|
|
1264
|
+
id: radioId,
|
|
1265
|
+
name: option,
|
|
1266
|
+
value: option,
|
|
1267
|
+
checked: isChecked,
|
|
1268
|
+
onChange: props.onChange
|
|
1269
|
+
}, props.inputProps)), React__default.createElement("span", {
|
|
1270
|
+
className: clsx('LuiRadioInput-option-check', {
|
|
1271
|
+
isChecked: isChecked
|
|
1272
|
+
})
|
|
1273
|
+
}), props.renderLabelFor ? props.renderLabelFor(option) : option));
|
|
1274
|
+
}), props.error && React__default.createElement("div", {
|
|
1275
|
+
className: "LuiRadioInput-error"
|
|
1276
|
+
}, React__default.createElement(LuiIcon, {
|
|
1277
|
+
alt: 'error',
|
|
1278
|
+
name: "ic_error",
|
|
1279
|
+
size: "sm",
|
|
1280
|
+
status: "error"
|
|
1281
|
+
}), React__default.createElement("span", null, props.error)));
|
|
1282
|
+
};
|
|
1283
|
+
|
|
1284
|
+
function LuiFormikCheckbox(props) {
|
|
1285
|
+
var ctx = useFormikContext();
|
|
1286
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Field, {
|
|
1287
|
+
name: props.name
|
|
1288
|
+
}, function (_ref) {
|
|
1289
|
+
var field = _ref.field;
|
|
1290
|
+
var showError = getIn(ctx == null ? void 0 : ctx.errors, props.name);
|
|
1291
|
+
return React__default.createElement("div", {
|
|
1292
|
+
className: clsx(showError && 'lui-input-error')
|
|
1293
|
+
}, React__default.createElement("div", {
|
|
1294
|
+
className: "lui-input-group-wrapper "
|
|
1295
|
+
}, showError && React__default.createElement("i", {
|
|
1296
|
+
className: "lui-form-status-icon material-icons-round"
|
|
1297
|
+
}, "error"), React__default.createElement("div", {
|
|
1298
|
+
className: clsx('lui-checkbox-container', props.className)
|
|
1299
|
+
}, React__default.createElement("input", Object.assign({}, props.inputProps, {
|
|
1300
|
+
type: "checkbox",
|
|
1301
|
+
id: props.value,
|
|
1302
|
+
disabled: !!props.disabled,
|
|
1303
|
+
checked: field.value
|
|
1304
|
+
}, field)), typeof props.label === 'string' ? React__default.createElement("label", {
|
|
1305
|
+
htmlFor: props.value
|
|
1306
|
+
}, props.label) : props.label)));
|
|
1307
|
+
}));
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
var LuiFormikFormLabel = function LuiFormikFormLabel(props) {
|
|
1311
|
+
return React__default.createElement("div", {
|
|
1312
|
+
className: clsx('LuiFormLabel-wrapper', props.className && "" + props.className)
|
|
1313
|
+
}, props.children, React__default.createElement("label", {
|
|
1314
|
+
className: "LuiFormLabel",
|
|
1315
|
+
htmlFor: props["for"]
|
|
1316
|
+
}, props.required && React__default.createElement("span", {
|
|
1317
|
+
className: "lui-required-input-icon"
|
|
1318
|
+
}, "*"), props.label), props.tooltip && React__default.createElement("i", {
|
|
1319
|
+
className: "material-icons-round"
|
|
1320
|
+
}, "help"));
|
|
1321
|
+
};
|
|
1322
|
+
|
|
1323
|
+
var LuiFormikTextInput = /*#__PURE__*/connect(function (props) {
|
|
1324
|
+
var error = getIn(props.formik.errors, props.name);
|
|
1325
|
+
var touch = getIn(props.formik.touched, props.name);
|
|
1326
|
+
var showError = touch && error;
|
|
1327
|
+
|
|
1328
|
+
var _useFormikContext = useFormikContext(),
|
|
1329
|
+
setFieldValue = _useFormikContext.setFieldValue;
|
|
1330
|
+
|
|
1331
|
+
var multiLineToggle = function multiLineToggle(field) {
|
|
1332
|
+
return !props.multiLine ? React__default.createElement("input", Object.assign({
|
|
1333
|
+
id: props.name,
|
|
1334
|
+
"data-testid": props.name
|
|
1335
|
+
}, field, {
|
|
1336
|
+
type: "text"
|
|
1337
|
+
}, props.inputProps, {
|
|
1338
|
+
onChange: function onChange(event) {
|
|
1339
|
+
var _props$validateOnChan;
|
|
1340
|
+
|
|
1341
|
+
setFieldValue(props.name, event.target.value, (_props$validateOnChan = props.validateOnChange) != null ? _props$validateOnChan : true);
|
|
1342
|
+
|
|
1343
|
+
if (props.onValueChange) {
|
|
1344
|
+
props.onValueChange({
|
|
1345
|
+
value: event.target.value,
|
|
1346
|
+
formik: props.formik
|
|
1347
|
+
});
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
})) : React__default.createElement("textarea", Object.assign({
|
|
1351
|
+
id: props.name,
|
|
1352
|
+
"data-testid": props.name
|
|
1353
|
+
}, field, {
|
|
1354
|
+
rows: 1
|
|
1355
|
+
}, props.inputProps, {
|
|
1356
|
+
onChange: function onChange(event) {
|
|
1357
|
+
var _props$validateOnChan2;
|
|
1358
|
+
|
|
1359
|
+
setFieldValue(props.name, event.target.value, (_props$validateOnChan2 = props.validateOnChange) != null ? _props$validateOnChan2 : true);
|
|
1360
|
+
|
|
1361
|
+
if (props.onValueChange) {
|
|
1362
|
+
props.onValueChange({
|
|
1363
|
+
value: event.target.value,
|
|
1364
|
+
formik: props.formik
|
|
1365
|
+
});
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
}));
|
|
1369
|
+
};
|
|
1370
|
+
|
|
1371
|
+
return React__default.createElement("div", {
|
|
1372
|
+
className: clsx(props.className && "" + props.className)
|
|
1373
|
+
}, props.label && React__default.createElement(LuiFormikFormLabel, {
|
|
1374
|
+
required: props.required,
|
|
1375
|
+
label: props.label,
|
|
1376
|
+
"for": props.name,
|
|
1377
|
+
tooltip: props.tooltip
|
|
1378
|
+
}), props.helperInfo, React__default.createElement(Field, {
|
|
1379
|
+
name: props.name,
|
|
1380
|
+
validate: props.validate
|
|
1381
|
+
}, function (_ref) {
|
|
1382
|
+
var field = _ref.field;
|
|
1383
|
+
return React__default.createElement("div", {
|
|
1384
|
+
className: clsx(showError && 'lui-input-error')
|
|
1385
|
+
}, React__default.createElement(ErrorMessage, {
|
|
1386
|
+
name: props.name,
|
|
1387
|
+
render: function render() {
|
|
1388
|
+
return React__default.createElement("i", {
|
|
1389
|
+
className: "lui-form-status-icon material-icons-round"
|
|
1390
|
+
}, "error");
|
|
1391
|
+
}
|
|
1392
|
+
}), multiLineToggle(field), React__default.createElement(ErrorMessage, {
|
|
1393
|
+
name: props.name,
|
|
1394
|
+
className: 'lui-error-msg',
|
|
1395
|
+
component: "p"
|
|
1396
|
+
}));
|
|
1397
|
+
}));
|
|
1398
|
+
});
|
|
1399
|
+
|
|
1400
|
+
var LuiFormikRadioButton = function LuiFormikRadioButton(props) {
|
|
1401
|
+
var _useField = useField(props),
|
|
1402
|
+
field = _useField[0],
|
|
1403
|
+
meta = _useField[1];
|
|
1404
|
+
|
|
1405
|
+
return React__default.createElement("div", {
|
|
1406
|
+
className: props.className
|
|
1407
|
+
}, meta.touched && meta.error && React__default.createElement("i", {
|
|
1408
|
+
className: "lui-form-status-icon material-icons-round"
|
|
1409
|
+
}, "error"), React__default.createElement("div", {
|
|
1410
|
+
className: 'lui-radio-container'
|
|
1411
|
+
}, React__default.createElement("input", Object.assign({
|
|
1412
|
+
disabled: !!props.disabled
|
|
1413
|
+
}, field, {
|
|
1414
|
+
checked: props.value === field.value,
|
|
1415
|
+
value: props.value,
|
|
1416
|
+
id: props.value,
|
|
1417
|
+
type: "radio"
|
|
1418
|
+
}, props.inputProps)), React__default.createElement("label", {
|
|
1419
|
+
htmlFor: props.value
|
|
1420
|
+
}, props.label)));
|
|
1421
|
+
};
|
|
1422
|
+
|
|
1423
|
+
var LuiFormikRadioGroup = function LuiFormikRadioGroup(props) {
|
|
1424
|
+
var ctx = useFormikContext();
|
|
1425
|
+
var error = getIn(ctx.errors, props.name);
|
|
1426
|
+
var touch = getIn(ctx.touched, props.name);
|
|
1427
|
+
var showError = touch && error;
|
|
1428
|
+
var describedby = props.hint && camelcase(props == null ? void 0 : props.hint) + 'Id';
|
|
1429
|
+
var errorDescribedBy = error && camelcase(error) + 'Id';
|
|
1430
|
+
return React__default.createElement("div", {
|
|
1431
|
+
className: clsx('lui-fieldsetBlock-form-group', showError && 'lui-input-error')
|
|
1432
|
+
}, React__default.createElement("fieldset", {
|
|
1433
|
+
"aria-describedby": clsx(props.hint && describedby + 'Id', showError && errorDescribedBy)
|
|
1434
|
+
}, React__default.createElement("legend", null, props.required && React__default.createElement("span", {
|
|
1435
|
+
className: "lui-required-input-icon"
|
|
1436
|
+
}, "*"), props.legend), showError && React__default.createElement("p", {
|
|
1437
|
+
id: errorDescribedBy
|
|
1438
|
+
}, React__default.createElement("span", {
|
|
1439
|
+
className: "LuiScreenReadersOnly"
|
|
1440
|
+
}, " Error: "), error), props.hint && React__default.createElement("p", {
|
|
1441
|
+
className: "lui-fieldset-support-txt small",
|
|
1442
|
+
id: describedby
|
|
1443
|
+
}, props.hint), React__default.createElement("div", {
|
|
1444
|
+
className: "lui-input-group-wrapper"
|
|
1445
|
+
}, props.children)));
|
|
1137
1446
|
};
|
|
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
1447
|
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1448
|
+
var LuiFormikFormSubmitButton = /*#__PURE__*/connect(function (props) {
|
|
1449
|
+
return React__default.createElement(LuiButton, {
|
|
1450
|
+
type: "submit",
|
|
1451
|
+
className: props.className,
|
|
1452
|
+
level: "primary",
|
|
1453
|
+
"data-testid": props['data-testid'],
|
|
1454
|
+
disabled: !!props.disabled
|
|
1455
|
+
}, props.children);
|
|
1456
|
+
});
|
|
1154
1457
|
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
}
|
|
1458
|
+
var LuiFormikSelect = /*#__PURE__*/connect(function (props) {
|
|
1459
|
+
var error = getIn(props.formik.errors, props.name);
|
|
1460
|
+
var touch = getIn(props.formik.touched, props.name);
|
|
1461
|
+
var showError = touch && error;
|
|
1462
|
+
return React__default.createElement("div", {
|
|
1463
|
+
className: props.className
|
|
1464
|
+
}, props.label && React__default.createElement(LuiFormikFormLabel, {
|
|
1465
|
+
className: 'lui-margin-bottom-xxs',
|
|
1466
|
+
"for": props.name,
|
|
1467
|
+
label: props.label,
|
|
1468
|
+
required: !!props.required,
|
|
1469
|
+
tooltip: props.tooltip
|
|
1470
|
+
}), props.helperInfo, React__default.createElement("div", {
|
|
1471
|
+
className: clsx('lui-input-wrapper', showError && 'lui-input-error')
|
|
1472
|
+
}, React__default.createElement(ErrorMessage, {
|
|
1473
|
+
name: props.name,
|
|
1474
|
+
render: function render() {
|
|
1475
|
+
return React__default.createElement("i", {
|
|
1476
|
+
className: "lui-form-status-icon material-icons-round"
|
|
1477
|
+
}, "error");
|
|
1478
|
+
}
|
|
1479
|
+
}), React__default.createElement(Field, Object.assign({
|
|
1480
|
+
disabled: props.disabled,
|
|
1481
|
+
defaultValue: props.defaultValue,
|
|
1482
|
+
name: props.name,
|
|
1483
|
+
id: props.name,
|
|
1484
|
+
validate: props.validate,
|
|
1485
|
+
as: "select"
|
|
1486
|
+
}, props.inputProps), props.children), React__default.createElement(ErrorMessage, {
|
|
1487
|
+
name: props.name,
|
|
1488
|
+
className: 'lui-error-msg',
|
|
1489
|
+
component: "p"
|
|
1490
|
+
})));
|
|
1491
|
+
});
|
|
1162
1492
|
|
|
1163
1493
|
var LuiBearingInput = function LuiBearingInput(props) {
|
|
1164
1494
|
var maxDecimal = 1;
|
|
@@ -4659,9 +4989,9 @@ function isChromatic() {
|
|
|
4659
4989
|
return !!(window.navigator.userAgent.match(/Chromatic/) || window.location.href.match(/chromatic=true/));
|
|
4660
4990
|
}
|
|
4661
4991
|
|
|
4662
|
-
var css$
|
|
4992
|
+
var css$5 = ":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
4993
|
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$
|
|
4994
|
+
n(css$5,{});
|
|
4665
4995
|
|
|
4666
4996
|
/**
|
|
4667
4997
|
* A wrapper around React Select with Lui styling
|
|
@@ -6865,137 +7195,6 @@ var LuiTooltip = function LuiTooltip(props) {
|
|
|
6865
7195
|
}, children);
|
|
6866
7196
|
};
|
|
6867
7197
|
|
|
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
7198
|
/**
|
|
7000
7199
|
* This hook will callback with handleClickOutside() when "mousedown" dom event occurs off the refElement
|
|
7001
7200
|
* usage:
|
|
@@ -7026,5 +7225,5 @@ function useClickedOutsideElement(refElement, handleClickOutside) {
|
|
|
7026
7225
|
}, []);
|
|
7027
7226
|
}
|
|
7028
7227
|
|
|
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 };
|
|
7228
|
+
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
7229
|
//# sourceMappingURL=lui.esm.js.map
|