@linzjs/lui 11.1.1 → 11.1.5
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 +76 -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 +91 -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 +5 -3
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ var clsx = _interopDefault(require('clsx'));
|
|
|
10
10
|
var reactMenu = require('@szhsin/react-menu');
|
|
11
11
|
require('@szhsin/react-menu/dist/index.css');
|
|
12
12
|
var formik = require('formik');
|
|
13
|
+
var uuid = require('uuid');
|
|
13
14
|
var camelcase = _interopDefault(require('camelcase'));
|
|
14
15
|
var Select = _interopDefault(require('react-select'));
|
|
15
16
|
var Lottie = _interopDefault(require('lottie-react'));
|
|
@@ -563,11 +564,6 @@ var LuiTabs = function LuiTabs(props) {
|
|
|
563
564
|
}, props.children));
|
|
564
565
|
};
|
|
565
566
|
|
|
566
|
-
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}}
|
|
567
|
-
|
|
568
|
-
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}";
|
|
569
|
-
n(css,{});
|
|
570
|
-
|
|
571
567
|
var LuiTab = function LuiTab(props) {
|
|
572
568
|
return React__default.createElement("button", {
|
|
573
569
|
className: clsx('LuiTab', props.active && 'LuiTab--active'),
|
|
@@ -579,9 +575,6 @@ var LuiTab = function LuiTab(props) {
|
|
|
579
575
|
}, props.children);
|
|
580
576
|
};
|
|
581
577
|
|
|
582
|
-
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}";
|
|
583
|
-
n(css$1,{});
|
|
584
|
-
|
|
585
578
|
var LuiTabsGroup = function LuiTabsGroup(props) {
|
|
586
579
|
return React__default.createElement("div", {
|
|
587
580
|
className: "LuiTabsGroup " + (props.justify ? 'LuiTabsGroup--justified' : ''),
|
|
@@ -590,9 +583,6 @@ var LuiTabsGroup = function LuiTabsGroup(props) {
|
|
|
590
583
|
}, props.children);
|
|
591
584
|
};
|
|
592
585
|
|
|
593
|
-
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}";
|
|
594
|
-
n(css$2,{});
|
|
595
|
-
|
|
596
586
|
var LuiTabsPanel = function LuiTabsPanel(props) {
|
|
597
587
|
var context = React.useContext(LuiTabsContext);
|
|
598
588
|
var active = context.activePanel === props.panel;
|
|
@@ -629,217 +619,10 @@ function LuiFormikForm(props) {
|
|
|
629
619
|
}, React__default.createElement(formik.Form, null, props.children, " ")));
|
|
630
620
|
}
|
|
631
621
|
|
|
632
|
-
function
|
|
633
|
-
var ctx = formik.useFormikContext();
|
|
634
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement(formik.Field, {
|
|
635
|
-
name: props.name
|
|
636
|
-
}, function (_ref) {
|
|
637
|
-
var field = _ref.field;
|
|
638
|
-
var showError = formik.getIn(ctx == null ? void 0 : ctx.errors, props.name);
|
|
639
|
-
return React__default.createElement("div", {
|
|
640
|
-
className: clsx(showError && 'lui-input-error')
|
|
641
|
-
}, React__default.createElement("div", {
|
|
642
|
-
className: "lui-input-group-wrapper "
|
|
643
|
-
}, showError && React__default.createElement("i", {
|
|
644
|
-
className: "lui-form-status-icon material-icons-round"
|
|
645
|
-
}, "error"), React__default.createElement("div", {
|
|
646
|
-
className: clsx('lui-checkbox-container', props.className)
|
|
647
|
-
}, React__default.createElement("input", Object.assign({}, props.inputProps, {
|
|
648
|
-
type: "checkbox",
|
|
649
|
-
id: props.value,
|
|
650
|
-
disabled: !!props.disabled,
|
|
651
|
-
checked: field.value
|
|
652
|
-
}, field)), typeof props.label === 'string' ? React__default.createElement("label", {
|
|
653
|
-
htmlFor: props.value
|
|
654
|
-
}, props.label) : props.label)));
|
|
655
|
-
}));
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
var LuiFormikFormLabel = function LuiFormikFormLabel(props) {
|
|
659
|
-
return React__default.createElement("div", {
|
|
660
|
-
className: clsx('LuiFormLabel-wrapper', props.className && "" + props.className)
|
|
661
|
-
}, props.children, React__default.createElement("label", {
|
|
662
|
-
className: "LuiFormLabel",
|
|
663
|
-
htmlFor: props["for"]
|
|
664
|
-
}, props.required && React__default.createElement("span", {
|
|
665
|
-
className: "lui-required-input-icon"
|
|
666
|
-
}, "*"), props.label), props.tooltip && React__default.createElement("i", {
|
|
667
|
-
className: "material-icons-round"
|
|
668
|
-
}, "help"));
|
|
669
|
-
};
|
|
670
|
-
|
|
671
|
-
var LuiFormikTextInput = /*#__PURE__*/formik.connect(function (props) {
|
|
672
|
-
var error = formik.getIn(props.formik.errors, props.name);
|
|
673
|
-
var touch = formik.getIn(props.formik.touched, props.name);
|
|
674
|
-
var showError = touch && error;
|
|
675
|
-
|
|
676
|
-
var _useFormikContext = formik.useFormikContext(),
|
|
677
|
-
setFieldValue = _useFormikContext.setFieldValue;
|
|
678
|
-
|
|
679
|
-
var multiLineToggle = function multiLineToggle(field) {
|
|
680
|
-
return !props.multiLine ? React__default.createElement("input", Object.assign({
|
|
681
|
-
id: props.name,
|
|
682
|
-
"data-testid": props.name
|
|
683
|
-
}, field, {
|
|
684
|
-
type: "text"
|
|
685
|
-
}, props.inputProps, {
|
|
686
|
-
onChange: function onChange(event) {
|
|
687
|
-
var _props$validateOnChan;
|
|
688
|
-
|
|
689
|
-
setFieldValue(props.name, event.target.value, (_props$validateOnChan = props.validateOnChange) != null ? _props$validateOnChan : true);
|
|
690
|
-
|
|
691
|
-
if (props.onValueChange) {
|
|
692
|
-
props.onValueChange({
|
|
693
|
-
value: event.target.value,
|
|
694
|
-
formik: props.formik
|
|
695
|
-
});
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
})) : React__default.createElement("textarea", Object.assign({
|
|
699
|
-
id: props.name,
|
|
700
|
-
"data-testid": props.name
|
|
701
|
-
}, field, {
|
|
702
|
-
rows: 1
|
|
703
|
-
}, props.inputProps, {
|
|
704
|
-
onChange: function onChange(event) {
|
|
705
|
-
var _props$validateOnChan2;
|
|
706
|
-
|
|
707
|
-
setFieldValue(props.name, event.target.value, (_props$validateOnChan2 = props.validateOnChange) != null ? _props$validateOnChan2 : true);
|
|
708
|
-
|
|
709
|
-
if (props.onValueChange) {
|
|
710
|
-
props.onValueChange({
|
|
711
|
-
value: event.target.value,
|
|
712
|
-
formik: props.formik
|
|
713
|
-
});
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
}));
|
|
717
|
-
};
|
|
718
|
-
|
|
719
|
-
return React__default.createElement("div", {
|
|
720
|
-
className: clsx(props.className && "" + props.className)
|
|
721
|
-
}, props.label && React__default.createElement(LuiFormikFormLabel, {
|
|
722
|
-
required: props.required,
|
|
723
|
-
label: props.label,
|
|
724
|
-
"for": props.name,
|
|
725
|
-
tooltip: props.tooltip
|
|
726
|
-
}), props.helperInfo, React__default.createElement(formik.Field, {
|
|
727
|
-
name: props.name,
|
|
728
|
-
validate: props.validate
|
|
729
|
-
}, function (_ref) {
|
|
730
|
-
var field = _ref.field;
|
|
731
|
-
return React__default.createElement("div", {
|
|
732
|
-
className: clsx(showError && 'lui-input-error')
|
|
733
|
-
}, React__default.createElement(formik.ErrorMessage, {
|
|
734
|
-
name: props.name,
|
|
735
|
-
render: function render() {
|
|
736
|
-
return React__default.createElement("i", {
|
|
737
|
-
className: "lui-form-status-icon material-icons-round"
|
|
738
|
-
}, "error");
|
|
739
|
-
}
|
|
740
|
-
}), multiLineToggle(field), React__default.createElement(formik.ErrorMessage, {
|
|
741
|
-
name: props.name,
|
|
742
|
-
className: 'lui-error-msg',
|
|
743
|
-
component: "p"
|
|
744
|
-
}));
|
|
745
|
-
}));
|
|
746
|
-
});
|
|
747
|
-
|
|
748
|
-
var LuiFormikRadioButton = function LuiFormikRadioButton(props) {
|
|
749
|
-
var _useField = formik.useField(props),
|
|
750
|
-
field = _useField[0],
|
|
751
|
-
meta = _useField[1];
|
|
752
|
-
|
|
753
|
-
return React__default.createElement("div", {
|
|
754
|
-
className: props.className
|
|
755
|
-
}, meta.touched && meta.error && React__default.createElement("i", {
|
|
756
|
-
className: "lui-form-status-icon material-icons-round"
|
|
757
|
-
}, "error"), React__default.createElement("div", {
|
|
758
|
-
className: 'lui-radio-container'
|
|
759
|
-
}, React__default.createElement("input", Object.assign({
|
|
760
|
-
disabled: !!props.disabled
|
|
761
|
-
}, field, {
|
|
762
|
-
checked: props.value === field.value,
|
|
763
|
-
value: props.value,
|
|
764
|
-
id: props.value,
|
|
765
|
-
type: "radio"
|
|
766
|
-
}, props.inputProps)), React__default.createElement("label", {
|
|
767
|
-
htmlFor: props.value
|
|
768
|
-
}, props.label)));
|
|
769
|
-
};
|
|
770
|
-
|
|
771
|
-
var LuiFormikRadioGroup = function LuiFormikRadioGroup(props) {
|
|
772
|
-
var ctx = formik.useFormikContext();
|
|
773
|
-
var error = formik.getIn(ctx.errors, props.name);
|
|
774
|
-
var touch = formik.getIn(ctx.touched, props.name);
|
|
775
|
-
var showError = touch && error;
|
|
776
|
-
var describedby = props.hint && camelcase(props == null ? void 0 : props.hint) + 'Id';
|
|
777
|
-
var errorDescribedBy = error && camelcase(error) + 'Id';
|
|
778
|
-
return React__default.createElement("div", {
|
|
779
|
-
className: clsx('lui-fieldsetBlock-form-group', showError && 'lui-input-error')
|
|
780
|
-
}, React__default.createElement("fieldset", {
|
|
781
|
-
"aria-describedby": clsx(props.hint && describedby + 'Id', showError && errorDescribedBy)
|
|
782
|
-
}, React__default.createElement("legend", null, props.required && React__default.createElement("span", {
|
|
783
|
-
className: "lui-required-input-icon"
|
|
784
|
-
}, "*"), props.legend), showError && React__default.createElement("p", {
|
|
785
|
-
id: errorDescribedBy
|
|
786
|
-
}, React__default.createElement("span", {
|
|
787
|
-
className: "LuiScreenReadersOnly"
|
|
788
|
-
}, " Error: "), error), props.hint && React__default.createElement("p", {
|
|
789
|
-
className: "lui-fieldset-support-txt small",
|
|
790
|
-
id: describedby
|
|
791
|
-
}, props.hint), React__default.createElement("div", {
|
|
792
|
-
className: "lui-input-group-wrapper"
|
|
793
|
-
}, props.children)));
|
|
794
|
-
};
|
|
795
|
-
|
|
796
|
-
var LuiFormikFormSubmitButton = /*#__PURE__*/formik.connect(function (props) {
|
|
797
|
-
return React__default.createElement(LuiButton, {
|
|
798
|
-
type: "submit",
|
|
799
|
-
className: props.className,
|
|
800
|
-
level: "primary",
|
|
801
|
-
"data-testid": props['data-testid'],
|
|
802
|
-
disabled: !!props.disabled
|
|
803
|
-
}, props.children);
|
|
804
|
-
});
|
|
805
|
-
|
|
806
|
-
var LuiFormikSelect = /*#__PURE__*/formik.connect(function (props) {
|
|
807
|
-
var error = formik.getIn(props.formik.errors, props.name);
|
|
808
|
-
var touch = formik.getIn(props.formik.touched, props.name);
|
|
809
|
-
var showError = touch && error;
|
|
810
|
-
return React__default.createElement("div", {
|
|
811
|
-
className: props.className
|
|
812
|
-
}, props.label && React__default.createElement(LuiFormikFormLabel, {
|
|
813
|
-
className: 'lui-margin-bottom-xxs',
|
|
814
|
-
"for": props.name,
|
|
815
|
-
label: props.label,
|
|
816
|
-
required: !!props.required,
|
|
817
|
-
tooltip: props.tooltip
|
|
818
|
-
}), props.helperInfo, React__default.createElement("div", {
|
|
819
|
-
className: clsx('lui-input-wrapper', showError && 'lui-input-error')
|
|
820
|
-
}, React__default.createElement(formik.ErrorMessage, {
|
|
821
|
-
name: props.name,
|
|
822
|
-
render: function render() {
|
|
823
|
-
return React__default.createElement("i", {
|
|
824
|
-
className: "lui-form-status-icon material-icons-round"
|
|
825
|
-
}, "error");
|
|
826
|
-
}
|
|
827
|
-
}), React__default.createElement(formik.Field, Object.assign({
|
|
828
|
-
disabled: props.disabled,
|
|
829
|
-
defaultValue: props.defaultValue,
|
|
830
|
-
name: props.name,
|
|
831
|
-
id: props.name,
|
|
832
|
-
validate: props.validate,
|
|
833
|
-
as: "select"
|
|
834
|
-
}, props.inputProps), props.children), React__default.createElement(formik.ErrorMessage, {
|
|
835
|
-
name: props.name,
|
|
836
|
-
className: 'lui-error-msg',
|
|
837
|
-
component: "p"
|
|
838
|
-
})));
|
|
839
|
-
});
|
|
622
|
+
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}}
|
|
840
623
|
|
|
841
|
-
var css
|
|
842
|
-
n(css
|
|
624
|
+
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}";
|
|
625
|
+
n(css,{});
|
|
843
626
|
|
|
844
627
|
// NOTE: This is a generated file, nothing you do here matters
|
|
845
628
|
|
|
@@ -1134,38 +917,585 @@ var ICON_SIZES = {
|
|
|
1134
917
|
xl: 'LuiIcon--xl',
|
|
1135
918
|
ns: 'LuiIcon--noSize'
|
|
1136
919
|
};
|
|
1137
|
-
var ICON_STATUS = {
|
|
1138
|
-
none: '',
|
|
1139
|
-
error: 'LuiIcon--error',
|
|
1140
|
-
warning: 'LuiIcon--warning',
|
|
1141
|
-
success: 'LuiIcon--success',
|
|
1142
|
-
interactive: 'LuiIcon--interactive',
|
|
1143
|
-
disabled: 'LuiIcon--disabled'
|
|
920
|
+
var ICON_STATUS = {
|
|
921
|
+
none: '',
|
|
922
|
+
error: 'LuiIcon--error',
|
|
923
|
+
warning: 'LuiIcon--warning',
|
|
924
|
+
success: 'LuiIcon--success',
|
|
925
|
+
interactive: 'LuiIcon--interactive',
|
|
926
|
+
disabled: 'LuiIcon--disabled'
|
|
927
|
+
};
|
|
928
|
+
var LuiIcon = function LuiIcon(_ref) {
|
|
929
|
+
var name = _ref.name,
|
|
930
|
+
className = _ref.className,
|
|
931
|
+
_ref$size = _ref.size,
|
|
932
|
+
size = _ref$size === void 0 ? 'ns' : _ref$size,
|
|
933
|
+
title = _ref.title,
|
|
934
|
+
alt = _ref.alt,
|
|
935
|
+
_ref$status = _ref.status,
|
|
936
|
+
status = _ref$status === void 0 ? 'none' : _ref$status,
|
|
937
|
+
spanProps = _ref.spanProps;
|
|
938
|
+
var iconSVG = ICONS[name];
|
|
939
|
+
|
|
940
|
+
if (!iconSVG) {
|
|
941
|
+
console.warn("No icon found for: " + iconSVG);
|
|
942
|
+
return null;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
return React.createElement("span", Object.assign({
|
|
946
|
+
className: clsx('LuiIcon', className, size && ICON_SIZES[size], status && ICON_STATUS[status]),
|
|
947
|
+
"data-icon": name,
|
|
948
|
+
title: title,
|
|
949
|
+
"aria-label": alt
|
|
950
|
+
}, spanProps), iconSVG);
|
|
951
|
+
};
|
|
952
|
+
|
|
953
|
+
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}";
|
|
954
|
+
n(css$1,{});
|
|
955
|
+
|
|
956
|
+
var LuiError = function LuiError(_ref) {
|
|
957
|
+
var error = _ref.error,
|
|
958
|
+
className = _ref.className;
|
|
959
|
+
return React__default.createElement("div", {
|
|
960
|
+
className: "LuiError " + className + "-error"
|
|
961
|
+
}, React__default.createElement(LuiIcon, {
|
|
962
|
+
className: "LuiError-errorIcon " + className + "-errorIcon",
|
|
963
|
+
alt: 'Error',
|
|
964
|
+
name: "ic_error",
|
|
965
|
+
size: "md",
|
|
966
|
+
status: "error"
|
|
967
|
+
}), error && React__default.createElement("span", {
|
|
968
|
+
className: "LuiError-errorText " + className + "-errorText"
|
|
969
|
+
}, error));
|
|
970
|
+
};
|
|
971
|
+
|
|
972
|
+
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}";
|
|
973
|
+
n(css$2,{});
|
|
974
|
+
|
|
975
|
+
function useGenerateOrDefaultId(idFromProps) {
|
|
976
|
+
var _useState = React.useState(idFromProps ? idFromProps : uuid.v4()),
|
|
977
|
+
id = _useState[0];
|
|
978
|
+
|
|
979
|
+
return id;
|
|
980
|
+
}
|
|
981
|
+
var LuiTextInput = function LuiTextInput(props) {
|
|
982
|
+
var _props$inputProps;
|
|
983
|
+
|
|
984
|
+
var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
|
|
985
|
+
return React__default.createElement("div", {
|
|
986
|
+
className: clsx('LuiTextInput', props.error ? 'LuiTextInput-error' : '')
|
|
987
|
+
}, React__default.createElement("label", {
|
|
988
|
+
className: 'LuiTextInput-label',
|
|
989
|
+
htmlFor: id
|
|
990
|
+
}, React__default.createElement("span", {
|
|
991
|
+
className: clsx(props.hideLabel ? 'LuiScreenReadersOnly' : '')
|
|
992
|
+
}, props.label), React__default.createElement("span", {
|
|
993
|
+
className: "LuiTextInput-inputWrapper"
|
|
994
|
+
}, React__default.createElement("input", Object.assign({
|
|
995
|
+
type: 'text',
|
|
996
|
+
className: clsx('LuiTextInput-input'),
|
|
997
|
+
min: "0",
|
|
998
|
+
value: props.value,
|
|
999
|
+
onChange: props.onChange
|
|
1000
|
+
}, props.inputProps, {
|
|
1001
|
+
id: id
|
|
1002
|
+
}))), props.error && React__default.createElement("span", {
|
|
1003
|
+
className: "LuiTextInput-error"
|
|
1004
|
+
}, React__default.createElement(LuiIcon, {
|
|
1005
|
+
alt: "error",
|
|
1006
|
+
name: "ic_error",
|
|
1007
|
+
className: "LuiTextInput-error-icon",
|
|
1008
|
+
size: "sm",
|
|
1009
|
+
status: "error"
|
|
1010
|
+
}), props.error)));
|
|
1011
|
+
};
|
|
1012
|
+
|
|
1013
|
+
var LuiCheckboxInput = function LuiCheckboxInput(props) {
|
|
1014
|
+
var _props$inputProps;
|
|
1015
|
+
|
|
1016
|
+
var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
|
|
1017
|
+
return React__default.createElement("div", {
|
|
1018
|
+
className: clsx('LuiCheckboxInput', {
|
|
1019
|
+
'LuiCheckboxInput--isChecked': props.isChecked,
|
|
1020
|
+
'LuiCheckboxInput--hasError': !!props.error
|
|
1021
|
+
})
|
|
1022
|
+
}, React__default.createElement("label", {
|
|
1023
|
+
htmlFor: id,
|
|
1024
|
+
className: "LuiCheckboxInput-group"
|
|
1025
|
+
}, React__default.createElement("input", Object.assign({
|
|
1026
|
+
className: clsx('LuiCheckboxInput-input'),
|
|
1027
|
+
id: id,
|
|
1028
|
+
type: "checkbox",
|
|
1029
|
+
value: props.value,
|
|
1030
|
+
onChange: props.onChange,
|
|
1031
|
+
checked: props.isChecked,
|
|
1032
|
+
disabled: props.isDisabled
|
|
1033
|
+
}, props.inputProps)), React__default.createElement("span", {
|
|
1034
|
+
className: "LuiCheckboxInput-label"
|
|
1035
|
+
}, props.label)), props.error && React__default.createElement(LuiError, {
|
|
1036
|
+
className: "LuiCheckboxInput",
|
|
1037
|
+
error: props.error
|
|
1038
|
+
}));
|
|
1039
|
+
};
|
|
1040
|
+
|
|
1041
|
+
var LuiFileInputBox = function LuiFileInputBox(props) {
|
|
1042
|
+
var _useState = React.useState(),
|
|
1043
|
+
file = _useState[0],
|
|
1044
|
+
setFile = _useState[1];
|
|
1045
|
+
|
|
1046
|
+
var _useState2 = React.useState(false),
|
|
1047
|
+
hasFileFormatError = _useState2[0],
|
|
1048
|
+
setHasFileFormatError = _useState2[1];
|
|
1049
|
+
|
|
1050
|
+
var onChange = function onChange(e) {
|
|
1051
|
+
// Logic to go here to check extensions and setHasFileFormatError
|
|
1052
|
+
setHasFileFormatError(false);
|
|
1053
|
+
var files = e.target.files; // File upload box is configured to only accept 1 file, we can't have more than one here
|
|
1054
|
+
|
|
1055
|
+
if (files && files.length === 1) {
|
|
1056
|
+
var selectedFile = files[0];
|
|
1057
|
+
var supportedFileTypes = props.acceptedExtensions.map(function (ext) {
|
|
1058
|
+
return ext.toUpperCase();
|
|
1059
|
+
});
|
|
1060
|
+
var fileName = selectedFile.name;
|
|
1061
|
+
|
|
1062
|
+
if (!supportedFileTypes.includes(getFileNameExtension(fileName))) {
|
|
1063
|
+
setHasFileFormatError(true);
|
|
1064
|
+
setFile(undefined);
|
|
1065
|
+
} else {
|
|
1066
|
+
setFile(selectedFile);
|
|
1067
|
+
props.onValidFileSelected(selectedFile);
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
};
|
|
1071
|
+
|
|
1072
|
+
var FileFormatErrorDetails = function FileFormatErrorDetails() {
|
|
1073
|
+
return React__default.createElement("div", {
|
|
1074
|
+
className: "LuiFileInputBox-upload-container"
|
|
1075
|
+
}, React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1076
|
+
className: 'LuiFileInputBox-upload-icon-error'
|
|
1077
|
+
}, React__default.createElement(LuiIcon, {
|
|
1078
|
+
name: "ic_error_outline",
|
|
1079
|
+
size: 'ns',
|
|
1080
|
+
alt: "Error"
|
|
1081
|
+
})), props.customFileErrorMessage ? React__default.createElement("p", null, props.customFileErrorMessage) : React__default.createElement("p", {
|
|
1082
|
+
className: "LuiFileInputBox-upload-text"
|
|
1083
|
+
}, "You must select a file with extension of", ' ', extensionsAsHumanReadableList(props.acceptedExtensions), ".")));
|
|
1084
|
+
};
|
|
1085
|
+
|
|
1086
|
+
var hasError = hasFileFormatError || props.showMustSelectFileError === true;
|
|
1087
|
+
return React__default.createElement("div", {
|
|
1088
|
+
className: clsx('LuiFileInputBox-upload', hasError && 'LuiFileInputBox-upload-error'),
|
|
1089
|
+
style: {
|
|
1090
|
+
width: props.width || 320,
|
|
1091
|
+
height: props.height || 320
|
|
1092
|
+
}
|
|
1093
|
+
}, React__default.createElement("input", {
|
|
1094
|
+
role: "button",
|
|
1095
|
+
"aria-label": "File Upload",
|
|
1096
|
+
type: "file",
|
|
1097
|
+
className: "LuiFileInputBox-upload-input",
|
|
1098
|
+
accept: props.acceptedExtensions.map(function (extension) {
|
|
1099
|
+
return "." + extension;
|
|
1100
|
+
}).join(','),
|
|
1101
|
+
onChange: onChange
|
|
1102
|
+
}), React__default.createElement(React__default.Fragment, null, hasError ? React__default.createElement(FileFormatErrorDetails, null) : React__default.createElement(FileUploadInfo, {
|
|
1103
|
+
fileName: file == null ? void 0 : file.name,
|
|
1104
|
+
fileFormatText: props.fileFormatText,
|
|
1105
|
+
fileDescription: props.fileDescription
|
|
1106
|
+
})));
|
|
1107
|
+
}; // Only exported for chromatic
|
|
1108
|
+
|
|
1109
|
+
var FileUploadInfo = function FileUploadInfo(props) {
|
|
1110
|
+
var DragAndDropInstruction = function DragAndDropInstruction() {
|
|
1111
|
+
return React__default.createElement("p", {
|
|
1112
|
+
className: "LuiFileInputBox-upload-text"
|
|
1113
|
+
}, "Drag and drop your ", props.fileDescription, " into the box", React__default.createElement("br", null), React__default.createElement("span", null, "(or upload file manually)"));
|
|
1114
|
+
};
|
|
1115
|
+
|
|
1116
|
+
var WaitingForFileSelection = function WaitingForFileSelection() {
|
|
1117
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1118
|
+
className: 'LuiFileInputBox-upload-icon-upload'
|
|
1119
|
+
}, React__default.createElement(LuiIcon, {
|
|
1120
|
+
name: "ic_publish",
|
|
1121
|
+
size: 'ns',
|
|
1122
|
+
alt: "Upload"
|
|
1123
|
+
})), React__default.createElement(DragAndDropInstruction, null), props.fileFormatText && React__default.createElement("p", {
|
|
1124
|
+
className: "LuiFileInputBox-upload-text LuiFileInputBox-upload-text-no-padding"
|
|
1125
|
+
}, props.fileFormatText));
|
|
1126
|
+
};
|
|
1127
|
+
|
|
1128
|
+
var UploadSuccess = function UploadSuccess() {
|
|
1129
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1130
|
+
className: 'LuiFileInputBox-upload-icon-success'
|
|
1131
|
+
}, React__default.createElement(LuiIcon, {
|
|
1132
|
+
name: "ic_check_circle_outline",
|
|
1133
|
+
size: 'ns',
|
|
1134
|
+
alt: "Success"
|
|
1135
|
+
})), React__default.createElement("p", {
|
|
1136
|
+
className: "LuiFileInputBox-upload-file-name"
|
|
1137
|
+
}, props.fileName), React__default.createElement(DragAndDropInstruction, null));
|
|
1138
|
+
};
|
|
1139
|
+
|
|
1140
|
+
return React__default.createElement("div", {
|
|
1141
|
+
className: "LuiFileInputBox-upload-container"
|
|
1142
|
+
}, props.fileName ? React__default.createElement(UploadSuccess, null) : React__default.createElement(WaitingForFileSelection, null));
|
|
1143
|
+
};
|
|
1144
|
+
/**
|
|
1145
|
+
* Get the extension from a filename in upper-case.
|
|
1146
|
+
*
|
|
1147
|
+
* @param fileName File-name to get extension from.
|
|
1148
|
+
* @return fileName extension in upper-case if found else empty string.
|
|
1149
|
+
*/
|
|
1150
|
+
|
|
1151
|
+
var getFileNameExtension = function getFileNameExtension(fileName) {
|
|
1152
|
+
var idx = fileName.lastIndexOf('.');
|
|
1153
|
+
return idx === -1 ? '' : fileName.substr(idx + 1).toUpperCase();
|
|
1154
|
+
};
|
|
1155
|
+
/**
|
|
1156
|
+
* Convert an array of extensions to a human readable string in upper-case.
|
|
1157
|
+
* e.g. JPG, TIFF or BMP.
|
|
1158
|
+
*
|
|
1159
|
+
* @param extensions List of extensions to convert.
|
|
1160
|
+
* @return Extensions in a human readable string in upper-case.
|
|
1161
|
+
*/
|
|
1162
|
+
|
|
1163
|
+
var extensionsAsHumanReadableList = function extensionsAsHumanReadableList(extensions) {
|
|
1164
|
+
var uppercaseExtensions = extensions.map(function (extension) {
|
|
1165
|
+
return extension.toUpperCase();
|
|
1166
|
+
});
|
|
1167
|
+
if (!extensions.length) return '';
|
|
1168
|
+
if (extensions.length === 1) return uppercaseExtensions[0];
|
|
1169
|
+
return uppercaseExtensions.slice(0, -1).join(', ') + " or " + uppercaseExtensions[extensions.length - 1];
|
|
1170
|
+
};
|
|
1171
|
+
|
|
1172
|
+
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}";
|
|
1173
|
+
n(css$3,{});
|
|
1174
|
+
|
|
1175
|
+
var LuiSelectInput = function LuiSelectInput(props) {
|
|
1176
|
+
var _props$selectProps;
|
|
1177
|
+
|
|
1178
|
+
var id = useGenerateOrDefaultId((_props$selectProps = props.selectProps) == null ? void 0 : _props$selectProps.id);
|
|
1179
|
+
return React__default.createElement("div", {
|
|
1180
|
+
className: 'LuiSelect'
|
|
1181
|
+
}, React__default.createElement("label", {
|
|
1182
|
+
htmlFor: id,
|
|
1183
|
+
className: "LuiSelect-label"
|
|
1184
|
+
}, React__default.createElement("span", {
|
|
1185
|
+
className: clsx('LuiSelect-label-text', props.hideLabel ? 'LuiScreenReadersOnly' : '')
|
|
1186
|
+
}, props.label), React__default.createElement("div", {
|
|
1187
|
+
className: "LuiSelect-wrapper"
|
|
1188
|
+
}, React__default.createElement("select", Object.assign({
|
|
1189
|
+
name: id,
|
|
1190
|
+
onChange: props.onChange,
|
|
1191
|
+
value: props.value,
|
|
1192
|
+
className: "LuiSelect-select"
|
|
1193
|
+
}, props.selectProps), props.placeholderText && React__default.createElement("option", {
|
|
1194
|
+
value: "",
|
|
1195
|
+
disabled: true
|
|
1196
|
+
}, props.placeholderText), props.options.map(function (selection) {
|
|
1197
|
+
return React__default.createElement("option", {
|
|
1198
|
+
key: selection.value,
|
|
1199
|
+
value: selection.value
|
|
1200
|
+
}, selection.label);
|
|
1201
|
+
})), React__default.createElement(LuiIcon, {
|
|
1202
|
+
alt: 'Error',
|
|
1203
|
+
name: "ic_arrow_drop_down",
|
|
1204
|
+
className: "LuiSelect-chevron-icon",
|
|
1205
|
+
size: "sm"
|
|
1206
|
+
})), props.error && React__default.createElement("span", {
|
|
1207
|
+
className: "LuiSelect-error"
|
|
1208
|
+
}, React__default.createElement(LuiIcon, {
|
|
1209
|
+
alt: 'Error',
|
|
1210
|
+
name: "ic_error",
|
|
1211
|
+
className: "LuiSelect-error-icon",
|
|
1212
|
+
size: "sm",
|
|
1213
|
+
status: "error"
|
|
1214
|
+
}), props.error)));
|
|
1215
|
+
};
|
|
1216
|
+
|
|
1217
|
+
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}";
|
|
1218
|
+
n(css$4,{});
|
|
1219
|
+
|
|
1220
|
+
var LuiTextAreaInput = function LuiTextAreaInput(props) {
|
|
1221
|
+
var _props$inputProps;
|
|
1222
|
+
|
|
1223
|
+
var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
|
|
1224
|
+
return React__default.createElement("div", {
|
|
1225
|
+
className: clsx('LuiTextAreaInput')
|
|
1226
|
+
}, React__default.createElement("label", {
|
|
1227
|
+
htmlFor: id
|
|
1228
|
+
}, React__default.createElement("span", {
|
|
1229
|
+
className: "LuiTextAreaInput-label"
|
|
1230
|
+
}, props.label), React__default.createElement("textarea", Object.assign({
|
|
1231
|
+
id: id,
|
|
1232
|
+
value: props.value,
|
|
1233
|
+
onChange: props.onChange,
|
|
1234
|
+
rows: 5
|
|
1235
|
+
}, props.inputProps))), props.error && React__default.createElement("span", {
|
|
1236
|
+
className: "LuiTextAreaInput-error"
|
|
1237
|
+
}, React__default.createElement(LuiIcon, {
|
|
1238
|
+
alt: "error",
|
|
1239
|
+
name: "ic_error",
|
|
1240
|
+
className: "LuiTextAreaInput-error-icon",
|
|
1241
|
+
size: "sm",
|
|
1242
|
+
status: "error"
|
|
1243
|
+
}), props.error));
|
|
1244
|
+
};
|
|
1245
|
+
|
|
1246
|
+
var LuiRadioInput = function LuiRadioInput(props) {
|
|
1247
|
+
var _props$inputProps;
|
|
1248
|
+
|
|
1249
|
+
var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
|
|
1250
|
+
return React__default.createElement("fieldset", {
|
|
1251
|
+
className: 'LuiRadioInput'
|
|
1252
|
+
}, props.legend && React__default.createElement("legend", {
|
|
1253
|
+
className: "LuiRadioInput-legend"
|
|
1254
|
+
}, props.legend), props.options.map(function (option, index) {
|
|
1255
|
+
var radioId = id + "-" + index;
|
|
1256
|
+
var isChecked = props.selectedValue === option;
|
|
1257
|
+
var isDisabled = props.isOptionDisabled && props.isOptionDisabled(index);
|
|
1258
|
+
return React__default.createElement("div", {
|
|
1259
|
+
className: clsx('LuiRadioInput-option', {
|
|
1260
|
+
isDisabled: isDisabled
|
|
1261
|
+
}),
|
|
1262
|
+
key: radioId
|
|
1263
|
+
}, React__default.createElement("label", {
|
|
1264
|
+
htmlFor: radioId,
|
|
1265
|
+
className: "LuiRadioInput-option-label",
|
|
1266
|
+
key: radioId
|
|
1267
|
+
}, React__default.createElement("input", Object.assign({
|
|
1268
|
+
disabled: isDisabled,
|
|
1269
|
+
className: "LuiRadioInput-option-button",
|
|
1270
|
+
type: "radio",
|
|
1271
|
+
id: radioId,
|
|
1272
|
+
name: option,
|
|
1273
|
+
value: option,
|
|
1274
|
+
checked: isChecked,
|
|
1275
|
+
onChange: props.onChange
|
|
1276
|
+
}, props.inputProps)), React__default.createElement("span", {
|
|
1277
|
+
className: clsx('LuiRadioInput-option-check', {
|
|
1278
|
+
isChecked: isChecked
|
|
1279
|
+
})
|
|
1280
|
+
}), props.renderLabelFor ? props.renderLabelFor(option) : option));
|
|
1281
|
+
}), props.error && React__default.createElement("div", {
|
|
1282
|
+
className: "LuiRadioInput-error"
|
|
1283
|
+
}, React__default.createElement(LuiIcon, {
|
|
1284
|
+
alt: 'error',
|
|
1285
|
+
name: "ic_error",
|
|
1286
|
+
size: "sm",
|
|
1287
|
+
status: "error"
|
|
1288
|
+
}), React__default.createElement("span", null, props.error)));
|
|
1289
|
+
};
|
|
1290
|
+
|
|
1291
|
+
function LuiFormikCheckbox(props) {
|
|
1292
|
+
var ctx = formik.useFormikContext();
|
|
1293
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(formik.Field, {
|
|
1294
|
+
name: props.name
|
|
1295
|
+
}, function (_ref) {
|
|
1296
|
+
var field = _ref.field;
|
|
1297
|
+
var showError = formik.getIn(ctx == null ? void 0 : ctx.errors, props.name);
|
|
1298
|
+
return React__default.createElement("div", {
|
|
1299
|
+
className: clsx(showError && 'lui-input-error')
|
|
1300
|
+
}, React__default.createElement("div", {
|
|
1301
|
+
className: "lui-input-group-wrapper "
|
|
1302
|
+
}, showError && React__default.createElement("i", {
|
|
1303
|
+
className: "lui-form-status-icon material-icons-round"
|
|
1304
|
+
}, "error"), React__default.createElement("div", {
|
|
1305
|
+
className: clsx('lui-checkbox-container', props.className)
|
|
1306
|
+
}, React__default.createElement("input", Object.assign({}, props.inputProps, {
|
|
1307
|
+
type: "checkbox",
|
|
1308
|
+
id: props.value,
|
|
1309
|
+
disabled: !!props.disabled,
|
|
1310
|
+
checked: field.value
|
|
1311
|
+
}, field)), typeof props.label === 'string' ? React__default.createElement("label", {
|
|
1312
|
+
htmlFor: props.value
|
|
1313
|
+
}, props.label) : props.label)));
|
|
1314
|
+
}));
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
var LuiFormikFormLabel = function LuiFormikFormLabel(props) {
|
|
1318
|
+
return React__default.createElement("div", {
|
|
1319
|
+
className: clsx('LuiFormLabel-wrapper', props.className && "" + props.className)
|
|
1320
|
+
}, props.children, React__default.createElement("label", {
|
|
1321
|
+
className: "LuiFormLabel",
|
|
1322
|
+
htmlFor: props["for"]
|
|
1323
|
+
}, props.required && React__default.createElement("span", {
|
|
1324
|
+
className: "lui-required-input-icon"
|
|
1325
|
+
}, "*"), props.label), props.tooltip && React__default.createElement("i", {
|
|
1326
|
+
className: "material-icons-round"
|
|
1327
|
+
}, "help"));
|
|
1328
|
+
};
|
|
1329
|
+
|
|
1330
|
+
var LuiFormikTextInput = /*#__PURE__*/formik.connect(function (props) {
|
|
1331
|
+
var error = formik.getIn(props.formik.errors, props.name);
|
|
1332
|
+
var touch = formik.getIn(props.formik.touched, props.name);
|
|
1333
|
+
var showError = touch && error;
|
|
1334
|
+
|
|
1335
|
+
var _useFormikContext = formik.useFormikContext(),
|
|
1336
|
+
setFieldValue = _useFormikContext.setFieldValue;
|
|
1337
|
+
|
|
1338
|
+
var multiLineToggle = function multiLineToggle(field) {
|
|
1339
|
+
return !props.multiLine ? React__default.createElement("input", Object.assign({
|
|
1340
|
+
id: props.name,
|
|
1341
|
+
"data-testid": props.name
|
|
1342
|
+
}, field, {
|
|
1343
|
+
type: "text"
|
|
1344
|
+
}, props.inputProps, {
|
|
1345
|
+
onChange: function onChange(event) {
|
|
1346
|
+
var _props$validateOnChan;
|
|
1347
|
+
|
|
1348
|
+
setFieldValue(props.name, event.target.value, (_props$validateOnChan = props.validateOnChange) != null ? _props$validateOnChan : true);
|
|
1349
|
+
|
|
1350
|
+
if (props.onValueChange) {
|
|
1351
|
+
props.onValueChange({
|
|
1352
|
+
value: event.target.value,
|
|
1353
|
+
formik: props.formik
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
})) : React__default.createElement("textarea", Object.assign({
|
|
1358
|
+
id: props.name,
|
|
1359
|
+
"data-testid": props.name
|
|
1360
|
+
}, field, {
|
|
1361
|
+
rows: 1
|
|
1362
|
+
}, props.inputProps, {
|
|
1363
|
+
onChange: function onChange(event) {
|
|
1364
|
+
var _props$validateOnChan2;
|
|
1365
|
+
|
|
1366
|
+
setFieldValue(props.name, event.target.value, (_props$validateOnChan2 = props.validateOnChange) != null ? _props$validateOnChan2 : true);
|
|
1367
|
+
|
|
1368
|
+
if (props.onValueChange) {
|
|
1369
|
+
props.onValueChange({
|
|
1370
|
+
value: event.target.value,
|
|
1371
|
+
formik: props.formik
|
|
1372
|
+
});
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
}));
|
|
1376
|
+
};
|
|
1377
|
+
|
|
1378
|
+
return React__default.createElement("div", {
|
|
1379
|
+
className: clsx(props.className && "" + props.className)
|
|
1380
|
+
}, props.label && React__default.createElement(LuiFormikFormLabel, {
|
|
1381
|
+
required: props.required,
|
|
1382
|
+
label: props.label,
|
|
1383
|
+
"for": props.name,
|
|
1384
|
+
tooltip: props.tooltip
|
|
1385
|
+
}), props.helperInfo, React__default.createElement(formik.Field, {
|
|
1386
|
+
name: props.name,
|
|
1387
|
+
validate: props.validate
|
|
1388
|
+
}, function (_ref) {
|
|
1389
|
+
var field = _ref.field;
|
|
1390
|
+
return React__default.createElement("div", {
|
|
1391
|
+
className: clsx(showError && 'lui-input-error')
|
|
1392
|
+
}, React__default.createElement(formik.ErrorMessage, {
|
|
1393
|
+
name: props.name,
|
|
1394
|
+
render: function render() {
|
|
1395
|
+
return React__default.createElement("i", {
|
|
1396
|
+
className: "lui-form-status-icon material-icons-round"
|
|
1397
|
+
}, "error");
|
|
1398
|
+
}
|
|
1399
|
+
}), multiLineToggle(field), React__default.createElement(formik.ErrorMessage, {
|
|
1400
|
+
name: props.name,
|
|
1401
|
+
className: 'lui-error-msg',
|
|
1402
|
+
component: "p"
|
|
1403
|
+
}));
|
|
1404
|
+
}));
|
|
1405
|
+
});
|
|
1406
|
+
|
|
1407
|
+
var LuiFormikRadioButton = function LuiFormikRadioButton(props) {
|
|
1408
|
+
var _useField = formik.useField(props),
|
|
1409
|
+
field = _useField[0],
|
|
1410
|
+
meta = _useField[1];
|
|
1411
|
+
|
|
1412
|
+
return React__default.createElement("div", {
|
|
1413
|
+
className: props.className
|
|
1414
|
+
}, meta.touched && meta.error && React__default.createElement("i", {
|
|
1415
|
+
className: "lui-form-status-icon material-icons-round"
|
|
1416
|
+
}, "error"), React__default.createElement("div", {
|
|
1417
|
+
className: 'lui-radio-container'
|
|
1418
|
+
}, React__default.createElement("input", Object.assign({
|
|
1419
|
+
disabled: !!props.disabled
|
|
1420
|
+
}, field, {
|
|
1421
|
+
checked: props.value === field.value,
|
|
1422
|
+
value: props.value,
|
|
1423
|
+
id: props.value,
|
|
1424
|
+
type: "radio"
|
|
1425
|
+
}, props.inputProps)), React__default.createElement("label", {
|
|
1426
|
+
htmlFor: props.value
|
|
1427
|
+
}, props.label)));
|
|
1428
|
+
};
|
|
1429
|
+
|
|
1430
|
+
var LuiFormikRadioGroup = function LuiFormikRadioGroup(props) {
|
|
1431
|
+
var ctx = formik.useFormikContext();
|
|
1432
|
+
var error = formik.getIn(ctx.errors, props.name);
|
|
1433
|
+
var touch = formik.getIn(ctx.touched, props.name);
|
|
1434
|
+
var showError = touch && error;
|
|
1435
|
+
var describedby = props.hint && camelcase(props == null ? void 0 : props.hint) + 'Id';
|
|
1436
|
+
var errorDescribedBy = error && camelcase(error) + 'Id';
|
|
1437
|
+
return React__default.createElement("div", {
|
|
1438
|
+
className: clsx('lui-fieldsetBlock-form-group', showError && 'lui-input-error')
|
|
1439
|
+
}, React__default.createElement("fieldset", {
|
|
1440
|
+
"aria-describedby": clsx(props.hint && describedby + 'Id', showError && errorDescribedBy)
|
|
1441
|
+
}, React__default.createElement("legend", null, props.required && React__default.createElement("span", {
|
|
1442
|
+
className: "lui-required-input-icon"
|
|
1443
|
+
}, "*"), props.legend), showError && React__default.createElement("p", {
|
|
1444
|
+
id: errorDescribedBy
|
|
1445
|
+
}, React__default.createElement("span", {
|
|
1446
|
+
className: "LuiScreenReadersOnly"
|
|
1447
|
+
}, " Error: "), error), props.hint && React__default.createElement("p", {
|
|
1448
|
+
className: "lui-fieldset-support-txt small",
|
|
1449
|
+
id: describedby
|
|
1450
|
+
}, props.hint), React__default.createElement("div", {
|
|
1451
|
+
className: "lui-input-group-wrapper"
|
|
1452
|
+
}, props.children)));
|
|
1144
1453
|
};
|
|
1145
|
-
var LuiIcon = function LuiIcon(_ref) {
|
|
1146
|
-
var name = _ref.name,
|
|
1147
|
-
className = _ref.className,
|
|
1148
|
-
_ref$size = _ref.size,
|
|
1149
|
-
size = _ref$size === void 0 ? 'ns' : _ref$size,
|
|
1150
|
-
title = _ref.title,
|
|
1151
|
-
alt = _ref.alt,
|
|
1152
|
-
_ref$status = _ref.status,
|
|
1153
|
-
status = _ref$status === void 0 ? 'none' : _ref$status,
|
|
1154
|
-
spanProps = _ref.spanProps;
|
|
1155
|
-
var iconSVG = ICONS[name];
|
|
1156
1454
|
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1455
|
+
var LuiFormikFormSubmitButton = /*#__PURE__*/formik.connect(function (props) {
|
|
1456
|
+
return React__default.createElement(LuiButton, {
|
|
1457
|
+
type: "submit",
|
|
1458
|
+
className: props.className,
|
|
1459
|
+
level: "primary",
|
|
1460
|
+
"data-testid": props['data-testid'],
|
|
1461
|
+
disabled: !!props.disabled
|
|
1462
|
+
}, props.children);
|
|
1463
|
+
});
|
|
1161
1464
|
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
}
|
|
1465
|
+
var LuiFormikSelect = /*#__PURE__*/formik.connect(function (props) {
|
|
1466
|
+
var error = formik.getIn(props.formik.errors, props.name);
|
|
1467
|
+
var touch = formik.getIn(props.formik.touched, props.name);
|
|
1468
|
+
var showError = touch && error;
|
|
1469
|
+
return React__default.createElement("div", {
|
|
1470
|
+
className: props.className
|
|
1471
|
+
}, props.label && React__default.createElement(LuiFormikFormLabel, {
|
|
1472
|
+
className: 'lui-margin-bottom-xxs',
|
|
1473
|
+
"for": props.name,
|
|
1474
|
+
label: props.label,
|
|
1475
|
+
required: !!props.required,
|
|
1476
|
+
tooltip: props.tooltip
|
|
1477
|
+
}), props.helperInfo, React__default.createElement("div", {
|
|
1478
|
+
className: clsx('lui-input-wrapper', showError && 'lui-input-error')
|
|
1479
|
+
}, React__default.createElement(formik.ErrorMessage, {
|
|
1480
|
+
name: props.name,
|
|
1481
|
+
render: function render() {
|
|
1482
|
+
return React__default.createElement("i", {
|
|
1483
|
+
className: "lui-form-status-icon material-icons-round"
|
|
1484
|
+
}, "error");
|
|
1485
|
+
}
|
|
1486
|
+
}), React__default.createElement(formik.Field, Object.assign({
|
|
1487
|
+
disabled: props.disabled,
|
|
1488
|
+
defaultValue: props.defaultValue,
|
|
1489
|
+
name: props.name,
|
|
1490
|
+
id: props.name,
|
|
1491
|
+
validate: props.validate,
|
|
1492
|
+
as: "select"
|
|
1493
|
+
}, props.inputProps), props.children), React__default.createElement(formik.ErrorMessage, {
|
|
1494
|
+
name: props.name,
|
|
1495
|
+
className: 'lui-error-msg',
|
|
1496
|
+
component: "p"
|
|
1497
|
+
})));
|
|
1498
|
+
});
|
|
1169
1499
|
|
|
1170
1500
|
var LuiBearingInput = function LuiBearingInput(props) {
|
|
1171
1501
|
var maxDecimal = 1;
|
|
@@ -4666,9 +4996,9 @@ function isChromatic() {
|
|
|
4666
4996
|
return !!(window.navigator.userAgent.match(/Chromatic/) || window.location.href.match(/chromatic=true/));
|
|
4667
4997
|
}
|
|
4668
4998
|
|
|
4669
|
-
var css$
|
|
4999
|
+
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}";
|
|
4670
5000
|
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%)"};
|
|
4671
|
-
n(css$
|
|
5001
|
+
n(css$5,{});
|
|
4672
5002
|
|
|
4673
5003
|
/**
|
|
4674
5004
|
* A wrapper around React Select with Lui styling
|
|
@@ -6872,137 +7202,6 @@ var LuiTooltip = function LuiTooltip(props) {
|
|
|
6872
7202
|
}, children);
|
|
6873
7203
|
};
|
|
6874
7204
|
|
|
6875
|
-
var LuiFileInputBox = function LuiFileInputBox(props) {
|
|
6876
|
-
var _useState = React.useState(),
|
|
6877
|
-
file = _useState[0],
|
|
6878
|
-
setFile = _useState[1];
|
|
6879
|
-
|
|
6880
|
-
var _useState2 = React.useState(false),
|
|
6881
|
-
hasFileFormatError = _useState2[0],
|
|
6882
|
-
setHasFileFormatError = _useState2[1];
|
|
6883
|
-
|
|
6884
|
-
var onChange = function onChange(e) {
|
|
6885
|
-
// Logic to go here to check extensions and setHasFileFormatError
|
|
6886
|
-
setHasFileFormatError(false);
|
|
6887
|
-
var files = e.target.files; // File upload box is configured to only accept 1 file, we can't have more than one here
|
|
6888
|
-
|
|
6889
|
-
if (files && files.length === 1) {
|
|
6890
|
-
var selectedFile = files[0];
|
|
6891
|
-
var supportedFileTypes = props.acceptedExtensions.map(function (ext) {
|
|
6892
|
-
return ext.toUpperCase();
|
|
6893
|
-
});
|
|
6894
|
-
var fileName = selectedFile.name;
|
|
6895
|
-
|
|
6896
|
-
if (!supportedFileTypes.includes(getFileNameExtension(fileName))) {
|
|
6897
|
-
setHasFileFormatError(true);
|
|
6898
|
-
setFile(undefined);
|
|
6899
|
-
} else {
|
|
6900
|
-
setFile(selectedFile);
|
|
6901
|
-
props.onValidFileSelected(selectedFile);
|
|
6902
|
-
}
|
|
6903
|
-
}
|
|
6904
|
-
};
|
|
6905
|
-
|
|
6906
|
-
var FileFormatErrorDetails = function FileFormatErrorDetails() {
|
|
6907
|
-
return React__default.createElement("div", {
|
|
6908
|
-
className: "LuiFileInputBox-upload-container"
|
|
6909
|
-
}, React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
6910
|
-
className: 'LuiFileInputBox-upload-icon-error'
|
|
6911
|
-
}, React__default.createElement(LuiIcon, {
|
|
6912
|
-
name: "ic_error_outline",
|
|
6913
|
-
size: 'ns',
|
|
6914
|
-
alt: "Error"
|
|
6915
|
-
})), props.customFileErrorMessage ? React__default.createElement("p", null, props.customFileErrorMessage) : React__default.createElement("p", {
|
|
6916
|
-
className: "LuiFileInputBox-upload-text"
|
|
6917
|
-
}, "You must select a file with extension of", ' ', extensionsAsHumanReadableList(props.acceptedExtensions), ".")));
|
|
6918
|
-
};
|
|
6919
|
-
|
|
6920
|
-
var hasError = hasFileFormatError || props.showMustSelectFileError === true;
|
|
6921
|
-
return React__default.createElement("div", {
|
|
6922
|
-
className: clsx('LuiFileInputBox-upload', hasError && 'LuiFileInputBox-upload-error'),
|
|
6923
|
-
style: {
|
|
6924
|
-
width: props.width || 320,
|
|
6925
|
-
height: props.height || 320
|
|
6926
|
-
}
|
|
6927
|
-
}, React__default.createElement("input", {
|
|
6928
|
-
role: "button",
|
|
6929
|
-
"aria-label": "File Upload",
|
|
6930
|
-
type: "file",
|
|
6931
|
-
className: "LuiFileInputBox-upload-input",
|
|
6932
|
-
accept: props.acceptedExtensions.map(function (extension) {
|
|
6933
|
-
return "." + extension;
|
|
6934
|
-
}).join(','),
|
|
6935
|
-
onChange: onChange
|
|
6936
|
-
}), React__default.createElement(React__default.Fragment, null, hasError ? React__default.createElement(FileFormatErrorDetails, null) : React__default.createElement(FileUploadInfo, {
|
|
6937
|
-
fileName: file == null ? void 0 : file.name,
|
|
6938
|
-
fileFormatText: props.fileFormatText,
|
|
6939
|
-
fileDescription: props.fileDescription
|
|
6940
|
-
})));
|
|
6941
|
-
}; // Only exported for chromatic
|
|
6942
|
-
|
|
6943
|
-
var FileUploadInfo = function FileUploadInfo(props) {
|
|
6944
|
-
var DragAndDropInstruction = function DragAndDropInstruction() {
|
|
6945
|
-
return React__default.createElement("p", {
|
|
6946
|
-
className: "LuiFileInputBox-upload-text"
|
|
6947
|
-
}, "Drag and drop your ", props.fileDescription, " into the box", React__default.createElement("br", null), React__default.createElement("span", null, "(or upload file manually)"));
|
|
6948
|
-
};
|
|
6949
|
-
|
|
6950
|
-
var WaitingForFileSelection = function WaitingForFileSelection() {
|
|
6951
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
6952
|
-
className: 'LuiFileInputBox-upload-icon-upload'
|
|
6953
|
-
}, React__default.createElement(LuiIcon, {
|
|
6954
|
-
name: "ic_publish",
|
|
6955
|
-
size: 'ns',
|
|
6956
|
-
alt: "Upload"
|
|
6957
|
-
})), React__default.createElement(DragAndDropInstruction, null), props.fileFormatText && React__default.createElement("p", {
|
|
6958
|
-
className: "LuiFileInputBox-upload-text LuiFileInputBox-upload-text-no-padding"
|
|
6959
|
-
}, props.fileFormatText));
|
|
6960
|
-
};
|
|
6961
|
-
|
|
6962
|
-
var UploadSuccess = function UploadSuccess() {
|
|
6963
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
6964
|
-
className: 'LuiFileInputBox-upload-icon-success'
|
|
6965
|
-
}, React__default.createElement(LuiIcon, {
|
|
6966
|
-
name: "ic_check_circle_outline",
|
|
6967
|
-
size: 'ns',
|
|
6968
|
-
alt: "Success"
|
|
6969
|
-
})), React__default.createElement("p", {
|
|
6970
|
-
className: "LuiFileInputBox-upload-file-name"
|
|
6971
|
-
}, props.fileName), React__default.createElement(DragAndDropInstruction, null));
|
|
6972
|
-
};
|
|
6973
|
-
|
|
6974
|
-
return React__default.createElement("div", {
|
|
6975
|
-
className: "LuiFileInputBox-upload-container"
|
|
6976
|
-
}, props.fileName ? React__default.createElement(UploadSuccess, null) : React__default.createElement(WaitingForFileSelection, null));
|
|
6977
|
-
};
|
|
6978
|
-
/**
|
|
6979
|
-
* Get the extension from a filename in upper-case.
|
|
6980
|
-
*
|
|
6981
|
-
* @param fileName File-name to get extension from.
|
|
6982
|
-
* @return fileName extension in upper-case if found else empty string.
|
|
6983
|
-
*/
|
|
6984
|
-
|
|
6985
|
-
var getFileNameExtension = function getFileNameExtension(fileName) {
|
|
6986
|
-
var idx = fileName.lastIndexOf('.');
|
|
6987
|
-
return idx === -1 ? '' : fileName.substr(idx + 1).toUpperCase();
|
|
6988
|
-
};
|
|
6989
|
-
/**
|
|
6990
|
-
* Convert an array of extensions to a human readable string in upper-case.
|
|
6991
|
-
* e.g. JPG, TIFF or BMP.
|
|
6992
|
-
*
|
|
6993
|
-
* @param extensions List of extensions to convert.
|
|
6994
|
-
* @return Extensions in a human readable string in upper-case.
|
|
6995
|
-
*/
|
|
6996
|
-
|
|
6997
|
-
var extensionsAsHumanReadableList = function extensionsAsHumanReadableList(extensions) {
|
|
6998
|
-
var uppercaseExtensions = extensions.map(function (extension) {
|
|
6999
|
-
return extension.toUpperCase();
|
|
7000
|
-
});
|
|
7001
|
-
if (!extensions.length) return '';
|
|
7002
|
-
if (extensions.length === 1) return uppercaseExtensions[0];
|
|
7003
|
-
return uppercaseExtensions.slice(0, -1).join(', ') + " or " + uppercaseExtensions[extensions.length - 1];
|
|
7004
|
-
};
|
|
7005
|
-
|
|
7006
7205
|
/**
|
|
7007
7206
|
* This hook will callback with handleClickOutside() when "mousedown" dom event occurs off the refElement
|
|
7008
7207
|
* usage:
|
|
@@ -7056,6 +7255,7 @@ exports.LuiBearingFormikInput = LuiBearingFormikInput;
|
|
|
7056
7255
|
exports.LuiBearingInput = LuiBearingInput;
|
|
7057
7256
|
exports.LuiButton = LuiButton;
|
|
7058
7257
|
exports.LuiButtonGroup = LuiButtonGroup;
|
|
7258
|
+
exports.LuiCheckboxInput = LuiCheckboxInput;
|
|
7059
7259
|
exports.LuiCloseableHeaderMenuContext = LuiCloseableHeaderMenuContext;
|
|
7060
7260
|
exports.LuiCloseableHeaderMenuItem = LuiCloseableHeaderMenuItem;
|
|
7061
7261
|
exports.LuiComboSelect = LuiComboSelect;
|
|
@@ -7092,6 +7292,8 @@ exports.LuiMenuItem = LuiMenuItem;
|
|
|
7092
7292
|
exports.LuiMessagingContextProvider = LuiMessagingContextProvider;
|
|
7093
7293
|
exports.LuiMiniSpinner = LuiMiniSpinner;
|
|
7094
7294
|
exports.LuiModal = LuiModal;
|
|
7295
|
+
exports.LuiRadioInput = LuiRadioInput;
|
|
7296
|
+
exports.LuiSelectInput = LuiSelectInput;
|
|
7095
7297
|
exports.LuiStaticMessage = LuiStaticMessage;
|
|
7096
7298
|
exports.LuiStatusSpinner = LuiStatusSpinner;
|
|
7097
7299
|
exports.LuiTab = LuiTab;
|
|
@@ -7100,6 +7302,8 @@ exports.LuiTabsContext = LuiTabsContext;
|
|
|
7100
7302
|
exports.LuiTabsGroup = LuiTabsGroup;
|
|
7101
7303
|
exports.LuiTabsPanel = LuiTabsPanel;
|
|
7102
7304
|
exports.LuiTabsPanelSwitch = LuiTabsPanelSwitch;
|
|
7305
|
+
exports.LuiTextAreaInput = LuiTextAreaInput;
|
|
7306
|
+
exports.LuiTextInput = LuiTextInput;
|
|
7103
7307
|
exports.LuiToastMessage = LuiToastMessage;
|
|
7104
7308
|
exports.LuiTooltip = LuiTooltip;
|
|
7105
7309
|
exports.LuiUpdatesSplashModal = LuiUpdatesSplashModal;
|