@linzjs/lui 17.16.2-1 → 17.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/assets/icons/waves.svg +1 -1
- package/dist/assets/svg-content.tsx +1 -1
- package/dist/components/LuiBadge/LuiBadge.d.ts +1 -1
- package/dist/components/LuiBearingInput/LuiBearingInput.d.ts +23 -0
- package/dist/components/LuiFormikForms/LuiFormikCheckbox/LuiFormikCheckbox.d.ts +9 -0
- package/dist/components/LuiFormikForms/LuiFormikForm.d.ts +10 -0
- package/dist/components/LuiFormikForms/LuiFormikFormLabel/LuiFormikFormLabel.d.ts +8 -0
- package/dist/components/LuiFormikForms/LuiFormikFormSubmitButton/LuiFormikFormSubmitButton.d.ts +6 -0
- package/dist/components/LuiFormikForms/LuiFormikRadioButton/LuiFormikRadioButton.d.ts +8 -0
- package/dist/components/LuiFormikForms/LuiFormikRadioGroup/LuiFormikRadioGroup.d.ts +7 -0
- package/dist/components/LuiFormikForms/LuiFormikSelect/LuiFormikSelect.d.ts +11 -0
- package/dist/components/LuiFormikForms/LuiFormikTextInput/LuiFormikTextInput.d.ts +17 -0
- package/dist/components/LuiUpdateSplashModal/LuiUpdatesSplashModal.d.ts +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +4674 -5321
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +4667 -5324
- package/dist/lui.esm.js.map +1 -1
- package/package.json +19 -18
- package/dist/animations/loader-easter.json +0 -2790
- package/dist/animations/loader-xmas.json +0 -3813
- package/dist/animations/loader.json +0 -1494
- package/dist/assets/svg-content.js +0 -323
- package/dist/assets/svg-content.js.map +0 -1
- package/dist/components/LuiAccordicard/LuiAccordicard.js +0 -55
- package/dist/components/LuiAccordicard/LuiAccordicard.js.map +0 -1
- package/dist/components/LuiAccordicardStatic/LuiAccordicardStatic.js +0 -17
- package/dist/components/LuiAccordicardStatic/LuiAccordicardStatic.js.map +0 -1
- package/dist/components/LuiBadge/LuiBadge.js +0 -4
- package/dist/components/LuiBadge/LuiBadge.js.map +0 -1
- package/dist/components/LuiBanner/LuiBanner.js +0 -26
- package/dist/components/LuiBanner/LuiBanner.js.map +0 -1
- package/dist/components/LuiButton/LuiButton.js +0 -38
- package/dist/components/LuiButton/LuiButton.js.map +0 -1
- package/dist/components/LuiError/LuiError.js +0 -10
- package/dist/components/LuiError/LuiError.js.map +0 -1
- package/dist/components/LuiErrorPage/LuiErrorPage.js +0 -13
- package/dist/components/LuiErrorPage/LuiErrorPage.js.map +0 -1
- package/dist/components/LuiExpandableBanner/LuiExpandableBanner.js +0 -54
- package/dist/components/LuiExpandableBanner/LuiExpandableBanner.js.map +0 -1
- package/dist/components/LuiFilterContainer/LuiFilterContainer.js +0 -20
- package/dist/components/LuiFilterContainer/LuiFilterContainer.js.map +0 -1
- package/dist/components/LuiFilterMenu/LuiFilterMenu.js +0 -50
- package/dist/components/LuiFilterMenu/LuiFilterMenu.js.map +0 -1
- package/dist/components/LuiFooter/LuiFooter.js +0 -37
- package/dist/components/LuiFooter/LuiFooter.js.map +0 -1
- package/dist/components/LuiFormElements/ClearableLuiTextInput/ClearableLuiTextInput.js +0 -21
- package/dist/components/LuiFormElements/ClearableLuiTextInput/ClearableLuiTextInput.js.map +0 -1
- package/dist/components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.js +0 -23
- package/dist/components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.js.map +0 -1
- package/dist/components/LuiFormElements/LuiFileInputBox/LuiFileInputBox.js +0 -90
- package/dist/components/LuiFormElements/LuiFileInputBox/LuiFileInputBox.js.map +0 -1
- package/dist/components/LuiFormElements/LuiRadioInput/LuiRadioInput.js +0 -41
- package/dist/components/LuiFormElements/LuiRadioInput/LuiRadioInput.js.map +0 -1
- package/dist/components/LuiFormElements/LuiSelectInput/LuiSelectInput.js +0 -22
- package/dist/components/LuiFormElements/LuiSelectInput/LuiSelectInput.js.map +0 -1
- package/dist/components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.js +0 -20
- package/dist/components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.js.map +0 -1
- package/dist/components/LuiFormElements/LuiTextInput/LuiTextInput.js +0 -29
- package/dist/components/LuiFormElements/LuiTextInput/LuiTextInput.js.map +0 -1
- package/dist/components/LuiForms/LuiComboSelect/LuiComboSelect.js +0 -54
- package/dist/components/LuiForms/LuiComboSelect/LuiComboSelect.js.map +0 -1
- package/dist/components/LuiForms/LuiFormSection/LuiFormSectionHeader.js +0 -9
- package/dist/components/LuiForms/LuiFormSection/LuiFormSectionHeader.js.map +0 -1
- package/dist/components/LuiForms/LuiFormSection/LuiHelpInfo/LuiHelpInfo.js +0 -7
- package/dist/components/LuiForms/LuiFormSection/LuiHelpInfo/LuiHelpInfo.js.map +0 -1
- package/dist/components/LuiHeader/LuiHeader.js +0 -79
- package/dist/components/LuiHeader/LuiHeader.js.map +0 -1
- package/dist/components/LuiHeaderMenu/LuiHeaderMenus.js +0 -73
- package/dist/components/LuiHeaderMenu/LuiHeaderMenus.js.map +0 -1
- package/dist/components/LuiIcon/LuiIcon.js +0 -39
- package/dist/components/LuiIcon/LuiIcon.js.map +0 -1
- package/dist/components/LuiListBox/LuiListBox.js +0 -60
- package/dist/components/LuiListBox/LuiListBox.js.map +0 -1
- package/dist/components/LuiListBox/LuiListBoxGroup.js +0 -15
- package/dist/components/LuiListBox/LuiListBoxGroup.js.map +0 -1
- package/dist/components/LuiListBox/LuiListBoxItem.js +0 -20
- package/dist/components/LuiListBox/LuiListBoxItem.js.map +0 -1
- package/dist/components/LuiListBox/Renderers/CheckboxItemRenderer.js +0 -10
- package/dist/components/LuiListBox/Renderers/CheckboxItemRenderer.js.map +0 -1
- package/dist/components/LuiListBox/Renderers/RadioItemRenderer.js +0 -7
- package/dist/components/LuiListBox/Renderers/RadioItemRenderer.js.map +0 -1
- package/dist/components/LuiListBox/useLuiListBox.js +0 -60
- package/dist/components/LuiListBox/useLuiListBox.js.map +0 -1
- package/dist/components/LuiLoadingSpinner/LuiLoadingSpinner.js +0 -62
- package/dist/components/LuiLoadingSpinner/LuiLoadingSpinner.js.map +0 -1
- package/dist/components/LuiLoadingSpinner/LuiLottieLight.js +0 -28
- package/dist/components/LuiLoadingSpinner/LuiLottieLight.js.map +0 -1
- package/dist/components/LuiMenu/LuiMenu.js +0 -18
- package/dist/components/LuiMenu/LuiMenu.js.map +0 -1
- package/dist/components/LuiMenuTrigger/LuiMenuTrigger.js +0 -10
- package/dist/components/LuiMenuTrigger/LuiMenuTrigger.js.map +0 -1
- package/dist/components/LuiModal/LuiModal.js +0 -57
- package/dist/components/LuiModal/LuiModal.js.map +0 -1
- package/dist/components/LuiModal/LuiModalContext.js +0 -30
- package/dist/components/LuiModal/LuiModalContext.js.map +0 -1
- package/dist/components/LuiSearchBox/LuiSearchBox.js +0 -67
- package/dist/components/LuiSearchBox/LuiSearchBox.js.map +0 -1
- package/dist/components/LuiSearchInput/LuiSearchInput.js +0 -184
- package/dist/components/LuiSearchInput/LuiSearchInput.js.map +0 -1
- package/dist/components/LuiSearchInput/ResultsDisplay.js +0 -38
- package/dist/components/LuiSearchInput/ResultsDisplay.js.map +0 -1
- package/dist/components/LuiSelectMenu/LuiSelectDataMenu.js +0 -34
- package/dist/components/LuiSelectMenu/LuiSelectDataMenu.js.map +0 -1
- package/dist/components/LuiSelectMenu/LuiSelectMenu.js +0 -29
- package/dist/components/LuiSelectMenu/LuiSelectMenu.js.map +0 -1
- package/dist/components/LuiShadow/LuiShadow.js +0 -6
- package/dist/components/LuiShadow/LuiShadow.js.map +0 -1
- package/dist/components/LuiSidePanel/LuiSidePanel.js +0 -51
- package/dist/components/LuiSidePanel/LuiSidePanel.js.map +0 -1
- package/dist/components/LuiSidePanel/LuiSidePanelHelper.js +0 -31
- package/dist/components/LuiSidePanel/LuiSidePanelHelper.js.map +0 -1
- package/dist/components/LuiStaticMessage/LuiStaticMessage.js +0 -17
- package/dist/components/LuiStaticMessage/LuiStaticMessage.js.map +0 -1
- package/dist/components/LuiSwitchButton/LuiSwitchButton.js +0 -12
- package/dist/components/LuiSwitchButton/LuiSwitchButton.js.map +0 -1
- package/dist/components/LuiTabs/LuiTab/LuiTab.js +0 -6
- package/dist/components/LuiTabs/LuiTab/LuiTab.js.map +0 -1
- package/dist/components/LuiTabs/LuiTabs.js +0 -11
- package/dist/components/LuiTabs/LuiTabs.js.map +0 -1
- package/dist/components/LuiTabs/LuiTabsGroup/LuiTabsGroup.js +0 -6
- package/dist/components/LuiTabs/LuiTabsGroup/LuiTabsGroup.js.map +0 -1
- package/dist/components/LuiTabs/LuiTabsPanel/LuiTabsPanel.js +0 -16
- package/dist/components/LuiTabs/LuiTabsPanel/LuiTabsPanel.js.map +0 -1
- package/dist/components/LuiTabs/LuiTabsPanelSwitch/LuiTabsPanelSwitch.js +0 -12
- package/dist/components/LuiTabs/LuiTabsPanelSwitch/LuiTabsPanelSwitch.js.map +0 -1
- package/dist/components/LuiToastMessage/LuiToastMessage.js +0 -47
- package/dist/components/LuiToastMessage/LuiToastMessage.js.map +0 -1
- package/dist/components/LuiTooltip/LuiTooltip.js +0 -32
- package/dist/components/LuiTooltip/LuiTooltip.js.map +0 -1
- package/dist/components/LuiUpdateSplashModal/LuiUpdatesSplashModal.js +0 -41
- package/dist/components/LuiUpdateSplashModal/LuiUpdatesSplashModal.js.map +0 -1
- package/dist/components/common/Hooks.js +0 -51
- package/dist/components/common/Hooks.js.map +0 -1
- package/dist/components/common/ResponsiveUtils.js +0 -16
- package/dist/components/common/ResponsiveUtils.js.map +0 -1
- package/dist/components/common/StorybookSupport.js +0 -14
- package/dist/components/common/StorybookSupport.js.map +0 -1
- package/dist/components/lol/LOLActiveFirmMessage.js +0 -30
- package/dist/components/lol/LOLActiveFirmMessage.js.map +0 -1
- package/dist/components/lol/LOLAppLauncherMenu.js +0 -86
- package/dist/components/lol/LOLAppLauncherMenu.js.map +0 -1
- package/dist/components/lol/LOLAuthorisedLink.js +0 -35
- package/dist/components/lol/LOLAuthorisedLink.js.map +0 -1
- package/dist/components/lol/LOLCommonDrawerMenu.js +0 -58
- package/dist/components/lol/LOLCommonDrawerMenu.js.map +0 -1
- package/dist/components/lol/LOLDrawerMenuFirmSwitcher.js +0 -21
- package/dist/components/lol/LOLDrawerMenuFirmSwitcher.js.map +0 -1
- package/dist/components/lol/LOLFirmSwitcher.js +0 -84
- package/dist/components/lol/LOLFirmSwitcher.js.map +0 -1
- package/dist/components/lol/LOLLogoutLink.js +0 -46
- package/dist/components/lol/LOLLogoutLink.js.map +0 -1
- package/dist/components/lol/LOLSearchBox.js +0 -105
- package/dist/components/lol/LOLSearchBox.js.map +0 -1
- package/dist/components/lol/LOLUserLastLogin.js +0 -25
- package/dist/components/lol/LOLUserLastLogin.js.map +0 -1
- package/dist/components/lol/MockBackendUtils.js +0 -30
- package/dist/components/lol/MockBackendUtils.js.map +0 -1
- package/dist/components/lol/contexts/LOLGlobalClientRefContext.js +0 -75
- package/dist/components/lol/contexts/LOLGlobalClientRefContext.js.map +0 -1
- package/dist/components/lol/contexts/LOLUserContext.js +0 -160
- package/dist/components/lol/contexts/LOLUserContext.js.map +0 -1
- package/dist/components/lol/contexts/LOLUserContextSupport.js +0 -11
- package/dist/components/lol/contexts/LOLUserContextSupport.js.map +0 -1
- package/dist/components/lol/handlers.js +0 -54
- package/dist/components/lol/handlers.js.map +0 -1
- package/dist/contexts/LuiMessagingContextProvider.js +0 -38
- package/dist/contexts/LuiMessagingContextProvider.js.map +0 -1
- package/dist/fonts.js +0 -11
- package/dist/fonts.js.map +0 -1
- package/dist/hooks/index.js +0 -2
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/useClickedOutsideElement.js +0 -29
- package/dist/hooks/useClickedOutsideElement.js.map +0 -1
- package/dist/hooks/useDeprecatedWarning.js +0 -9
- package/dist/hooks/useDeprecatedWarning.js.map +0 -1
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import clsx from 'clsx';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { LuiIcon } from '../LuiIcon/LuiIcon';
|
|
4
|
-
export function getMaterialIconForLevel(level) {
|
|
5
|
-
switch (level) {
|
|
6
|
-
case 'success':
|
|
7
|
-
return 'check_circle';
|
|
8
|
-
case 'info':
|
|
9
|
-
return 'info';
|
|
10
|
-
case 'warning':
|
|
11
|
-
return 'warning';
|
|
12
|
-
case 'error':
|
|
13
|
-
return 'error';
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export var LuiBanner = function (props) {
|
|
17
|
-
return (React.createElement("div", { className: clsx('lui-msg-banner-container', props.className ? "".concat(props.className, "-bannerContainer") : '') },
|
|
18
|
-
React.createElement(LuiBannerContent, { level: props.level, className: props.className }, props.children)));
|
|
19
|
-
};
|
|
20
|
-
export var LuiBannerContent = function (props) {
|
|
21
|
-
var materialIcon = getMaterialIconForLevel(props.level);
|
|
22
|
-
return (React.createElement("div", { className: clsx("lui-msg-".concat(props.level, " lui-msg-dynamic-banner"), props.className) },
|
|
23
|
-
React.createElement(LuiIcon, { name: "ic_".concat(materialIcon), alt: "".concat(props.level, " banner icon"), size: "lg", className: "lui-msg-status-icon" }),
|
|
24
|
-
React.createElement("div", null, props.children)));
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=LuiBanner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuiBanner.js","sourceRoot":"","sources":["../../../src/components/LuiBanner/LuiBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAQ7C,MAAM,UAAU,uBAAuB,CACrC,KAA+C;IAE/C,QAAQ,KAAK,EAAE;QACb,KAAK,SAAS;YACZ,OAAO,cAAc,CAAC;QACxB,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;KAClB;AACH,CAAC;AAED,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,KAAiB;IACzC,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CACb,0BAA0B,EAC1B,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,UAAG,KAAK,CAAC,SAAS,qBAAkB,CAAC,CAAC,CAAC,EAAE,CAC5D;QAED,oBAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,IAC7D,KAAK,CAAC,QAAQ,CACE,CACf,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,KAAiB;IAChD,IAAI,YAAY,GAAG,uBAAuB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAExD,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CACb,kBAAW,KAAK,CAAC,KAAK,4BAAyB,EAC/C,KAAK,CAAC,SAAS,CAChB;QAED,oBAAC,OAAO,IACN,IAAI,EAAE,aAAM,YAAY,CAAE,EAC1B,GAAG,EAAE,UAAG,KAAK,CAAC,KAAK,iBAAc,EACjC,IAAI,EAAC,IAAI,EACT,SAAS,EAAC,qBAAqB,GAC/B;QACF,iCAAM,KAAK,CAAC,QAAQ,CAAO,CACvB,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
export var PlainButton = React.forwardRef(function (props, ref) {
|
|
5
|
-
return (React.createElement("button", __assign({}, props.buttonProps, { type: props.type, title: props.title, disabled: props.disabled, name: props.name, onClick: props.onClick, className: clsx('lui-button', "lui-button-".concat(props.level), "lui-button-".concat(props.size), props.className), "data-testid": props['data-testid'], style: props.style, ref: ref }), props.children));
|
|
6
|
-
});
|
|
7
|
-
export var LuiButton = React.forwardRef(function (props, ref) {
|
|
8
|
-
var _level = props.level ? props.level : 'primary';
|
|
9
|
-
var size = props.size ? props.size : 'med';
|
|
10
|
-
if (props.href) {
|
|
11
|
-
var aProps = {
|
|
12
|
-
href: props.href,
|
|
13
|
-
'data-testid': props['data-testid'],
|
|
14
|
-
name: props.name,
|
|
15
|
-
title: props.title,
|
|
16
|
-
className: clsx('lui-button', "lui-button-".concat(props.level), "lui-button-".concat(props.size), props.className),
|
|
17
|
-
style: props.style
|
|
18
|
-
};
|
|
19
|
-
if (props.openInNewTab) {
|
|
20
|
-
aProps.target = '_blank';
|
|
21
|
-
aProps.rel = 'noopener noreferrer';
|
|
22
|
-
}
|
|
23
|
-
return React.createElement("a", __assign({}, aProps), props.children);
|
|
24
|
-
}
|
|
25
|
-
return (React.createElement(PlainButton, { type: props.type, title: props.title, disabled: props.disabled, name: props.name, onClick: props.onClick, level: _level, size: size, "data-testid": props['data-testid'], style: props.style, className: props.className, buttonProps: props.buttonProps, ref: ref }, props.children));
|
|
26
|
-
});
|
|
27
|
-
/**
|
|
28
|
-
* A series of Lui buttons together.
|
|
29
|
-
*/
|
|
30
|
-
export var LuiButtonGroup = function (props) {
|
|
31
|
-
var children = Array.isArray(props.children)
|
|
32
|
-
? props.children
|
|
33
|
-
: [props.children];
|
|
34
|
-
return (React.createElement("div", { className: "lui-button-group", "data-testid": 'button-group' }, children.map(function (child, i) {
|
|
35
|
-
return (React.createElement("div", { key: i, className: 'lui-button-wrapper' }, child));
|
|
36
|
-
})));
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=LuiButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuiButton.js","sourceRoot":"","sources":["../../../src/components/LuiButton/LuiButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAC7E,OAAO,IAAI,MAAM,MAAM,CAAC;AA+BxB,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,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { LuiIcon } from '../LuiIcon/LuiIcon';
|
|
3
|
-
import '../../scss/Components/LuiError/LuiError.scss';
|
|
4
|
-
export var LuiError = function (_a) {
|
|
5
|
-
var error = _a.error, className = _a.className;
|
|
6
|
-
return (React.createElement("div", { className: "LuiError ".concat(className, "-error") },
|
|
7
|
-
React.createElement(LuiIcon, { className: "LuiError-errorIcon ".concat(className, "-errorIcon"), alt: 'Error', name: "ic_error", size: "md", status: "error" }),
|
|
8
|
-
error && (React.createElement("span", { className: "LuiError-errorText ".concat(className, "-errorText") }, error))));
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=LuiError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuiError.js","sourceRoot":"","sources":["../../../src/components/LuiError/LuiError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,8CAA8C,CAAC;AAOtD,MAAM,CAAC,IAAM,QAAQ,GAAG,UAAC,EAA+B;QAA7B,KAAK,WAAA,EAAE,SAAS,eAAA;IAAkB,OAAA,CAC3D,6BAAK,SAAS,EAAE,mBAAY,SAAS,WAAQ;QAC3C,oBAAC,OAAO,IACN,SAAS,EAAE,6BAAsB,SAAS,eAAY,EACtD,GAAG,EAAE,OAAO,EACZ,IAAI,EAAC,UAAU,EACf,IAAI,EAAC,IAAI,EACT,MAAM,EAAC,OAAO,GACd;QACD,KAAK,IAAI,CACR,8BAAM,SAAS,EAAE,6BAAsB,SAAS,eAAY,IACzD,KAAK,CACD,CACR,CACG,CACP;AAf4D,CAe5D,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import mountainBroken from '../../assets/images/mountain-broken.svg';
|
|
3
|
-
export var LuiErrorPage = function (props) {
|
|
4
|
-
return (React.createElement("div", { className: 'LuiErrorPage' },
|
|
5
|
-
props.header,
|
|
6
|
-
React.createElement("div", { className: 'Container' },
|
|
7
|
-
React.createElement("div", { className: "LuiErrorPage-wrapper" },
|
|
8
|
-
React.createElement("div", { className: 'LuiErrorPage-content' }, props.content),
|
|
9
|
-
React.createElement("div", { className: 'LuiErrorPage-image' },
|
|
10
|
-
React.createElement("img", { src: mountainBroken, alt: "Mountain broken" })))),
|
|
11
|
-
props.footer));
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=LuiErrorPage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuiErrorPage.js","sourceRoot":"","sources":["../../../src/components/LuiErrorPage/LuiErrorPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,yCAAyC,CAAC;AAErE,MAAM,CAAC,IAAM,YAAY,GAMrB,UAAC,KAAK;IACR,OAAO,CACL,6BAAK,SAAS,EAAE,cAAc;QAC3B,KAAK,CAAC,MAAM;QACb,6BAAK,SAAS,EAAE,WAAW;YACzB,6BAAK,SAAS,EAAC,sBAAsB;gBACnC,6BAAK,SAAS,EAAE,sBAAsB,IAAG,KAAK,CAAC,OAAO,CAAO;gBAE7D,6BAAK,SAAS,EAAE,oBAAoB;oBAClC,6BAAK,GAAG,EAAE,cAAc,EAAE,GAAG,EAAC,iBAAiB,GAAG,CAC9C,CACF,CACF;QACL,KAAK,CAAC,MAAM,CACT,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useState } from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
export var LuiExpandableBanner = function (props) {
|
|
4
|
-
var display = useRef(null);
|
|
5
|
-
var _a = useState(true), collapse = _a[0], setCollapse = _a[1];
|
|
6
|
-
var collapseSection = function (element) {
|
|
7
|
-
// get the height of the element's inner content, regardless of its actual size
|
|
8
|
-
var sectionHeight = element.scrollHeight;
|
|
9
|
-
// on the next frame (as soon as the previous style change has taken effect),
|
|
10
|
-
// explicitly set the element's height to its current pixel height, so we
|
|
11
|
-
// aren't transitioning out of 'auto'
|
|
12
|
-
requestAnimationFrame(function () {
|
|
13
|
-
element.style.height = sectionHeight + 'px';
|
|
14
|
-
// on the next frame (as soon as the previous style change has taken effect),
|
|
15
|
-
// have the element transition to height: 0
|
|
16
|
-
requestAnimationFrame(function () {
|
|
17
|
-
element.style.height = 0 + 'px';
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
// mark the section as "currently collapsed"
|
|
21
|
-
setCollapse(true);
|
|
22
|
-
};
|
|
23
|
-
var expandSection = function (element) {
|
|
24
|
-
// get the height of the element's inner content, regardless of its actual size
|
|
25
|
-
var sectionHeight = element.scrollHeight;
|
|
26
|
-
// have the element transition to the height of its inner content
|
|
27
|
-
element.style.height = sectionHeight + 'px';
|
|
28
|
-
// when the next css transition finishes (which should be the one we just triggered)
|
|
29
|
-
setTimeout(function () {
|
|
30
|
-
element.style.height = 'auto';
|
|
31
|
-
}, 500);
|
|
32
|
-
// mark the section as "currently not collapsed"
|
|
33
|
-
setCollapse(false);
|
|
34
|
-
};
|
|
35
|
-
var expandFunction = function () {
|
|
36
|
-
var section = display.current;
|
|
37
|
-
if (collapse) {
|
|
38
|
-
expandSection(section);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
collapseSection(section);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
return (React.createElement(React.Fragment, null,
|
|
45
|
-
React.createElement("div", { className: clsx('lui-expand-container', props.className) },
|
|
46
|
-
props.labelPrefix,
|
|
47
|
-
React.createElement("div", { className: 'lui-expand-header', onClick: expandFunction, style: { width: '100%' } },
|
|
48
|
-
React.createElement("h3", null, props.label),
|
|
49
|
-
React.createElement("i", { className: clsx(collapse
|
|
50
|
-
? 'lui-expand-icon material-icons-round'
|
|
51
|
-
: 'lui-expand-icon material-icons-round lui-expand-icon-transform') }, 'expand_more'))),
|
|
52
|
-
React.createElement("div", { className: 'lui-collapse-text', ref: display }, props.children)));
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=LuiExpandableBanner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuiExpandableBanner.js","sourceRoot":"","sources":["../../../src/components/LuiExpandableBanner/LuiExpandableBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAQxB,MAAM,CAAC,IAAM,mBAAmB,GAE5B,UAAC,KAAK;IACR,IAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAEvB,IAAA,KAA0B,QAAQ,CAAC,IAAI,CAAC,EAAvC,QAAQ,QAAA,EAAE,WAAW,QAAkB,CAAC;IAC/C,IAAM,eAAe,GAAG,UAAC,OAAY;QACnC,+EAA+E;QAC/E,IAAM,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;QAC3C,6EAA6E;QAC7E,yEAAyE;QACzE,qCAAqC;QACrC,qBAAqB,CAAC;YACpB,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,aAAa,GAAG,IAAI,CAAC;YAC5C,6EAA6E;YAC7E,2CAA2C;YAC3C,qBAAqB,CAAC;gBACpB,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC;YAClC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,4CAA4C;QAC5C,WAAW,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,IAAM,aAAa,GAAG,UAAC,OAAY;QACjC,+EAA+E;QAC/E,IAAM,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;QAC3C,iEAAiE;QACjE,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,aAAa,GAAG,IAAI,CAAC;QAC5C,oFAAoF;QACpF,UAAU,CAAC;YACT,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QAChC,CAAC,EAAE,GAAG,CAAC,CAAC;QACR,gDAAgD;QAChD,WAAW,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,IAAM,cAAc,GAAG;QACrB,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,IAAI,QAAQ,EAAE;YACZ,aAAa,CAAC,OAAO,CAAC,CAAC;SACxB;aAAM;YACL,eAAe,CAAC,OAAO,CAAC,CAAC;SAC1B;IACH,CAAC,CAAC;IAEF,OAAO,CACL;QACE,6BAAK,SAAS,EAAE,IAAI,CAAC,sBAAsB,EAAE,KAAK,CAAC,SAAS,CAAC;YAC1D,KAAK,CAAC,WAAW;YAClB,6BACE,SAAS,EAAE,mBAAmB,EAC9B,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;gBAExB,gCAAK,KAAK,CAAC,KAAK,CAAM;gBACtB,2BACE,SAAS,EAAE,IAAI,CACb,QAAQ;wBACN,CAAC,CAAC,sCAAsC;wBACxC,CAAC,CAAC,gEAAgE,CACrE,IAEA,aAAa,CACZ,CACA,CACF;QACN,6BAAK,SAAS,EAAE,mBAAmB,EAAE,GAAG,EAAE,OAAO,IAC9C,KAAK,CAAC,QAAQ,CACX,CACL,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { ClearableLuiTextInput } from '../LuiFormElements/ClearableLuiTextInput/ClearableLuiTextInput';
|
|
3
|
-
/**
|
|
4
|
-
* Filters options and forwards to internal render function.
|
|
5
|
-
* has option for minimum elements to filter
|
|
6
|
-
* @param props
|
|
7
|
-
* @constructor
|
|
8
|
-
*/
|
|
9
|
-
export var LuiFilterContainer = function (props) {
|
|
10
|
-
var renderFunction = props.renderFunction, filterFunction = props.filterFunction, _a = props.showFilter, showFilter = _a === void 0 ? true : _a, _b = props.isFilterClearable, isFilterClearable = _b === void 0 ? true : _b;
|
|
11
|
-
var _c = useState(''), filter = _c[0], setFilter = _c[1];
|
|
12
|
-
return (React.createElement("div", null,
|
|
13
|
-
showFilter && (React.createElement("div", { className: 'LuiFilterContainer-filter-container LuiDeprecatedForms' },
|
|
14
|
-
isFilterClearable && (React.createElement(ClearableLuiTextInput, { label: 'Filter', inputProps: {
|
|
15
|
-
placeholder: 'Type to filter'
|
|
16
|
-
}, hideLabel: true, onValueChange: function (value) { return setFilter(value); } })),
|
|
17
|
-
!isFilterClearable && (React.createElement("input", { type: "text", placeholder: "Type to filter", value: filter, onChange: function (e) { return setFilter(e.target.value); } })))),
|
|
18
|
-
renderFunction(filterFunction(filter))));
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=LuiFilterContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuiFilterContainer.js","sourceRoot":"","sources":["../../../src/components/LuiFilterContainer/LuiFilterContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gEAAgE,CAAC;AASvG;;;;;GAKG;AACH,MAAM,CAAC,IAAM,kBAAkB,GAAG,UAChC,KAA6B;IAG3B,IAAA,cAAc,GAIZ,KAAK,eAJO,EACd,cAAc,GAGZ,KAAK,eAHO,EACd,KAEE,KAAK,WAFU,EAAjB,UAAU,mBAAG,IAAI,KAAA,EACjB,KACE,KAAK,kBADiB,EAAxB,iBAAiB,mBAAG,IAAI,KAAA,CAChB;IACJ,IAAA,KAAsB,QAAQ,CAAC,EAAE,CAAC,EAAjC,MAAM,QAAA,EAAE,SAAS,QAAgB,CAAC;IAEzC,OAAO,CACL;QACG,UAAU,IAAI,CACb,6BACE,SAAS,EAAE,wDAAwD;YAElE,iBAAiB,IAAI,CACpB,oBAAC,qBAAqB,IACpB,KAAK,EAAE,QAAQ,EACf,UAAU,EAAE;oBACV,WAAW,EAAE,gBAAgB;iBAC9B,EACD,SAAS,QACT,aAAa,EAAE,UAAC,KAAK,IAAK,OAAA,SAAS,CAAC,KAAK,CAAC,EAAhB,CAAgB,GAC1C,CACH;YACA,CAAC,iBAAiB,IAAI,CACrB,+BACE,IAAI,EAAC,MAAM,EACX,WAAW,EAAC,gBAAgB,EAC5B,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,UAAC,CAAC,IAAK,OAAA,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAzB,CAAyB,GAC1C,CACH,CACG,CACP;QACA,cAAc,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CACnC,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import React, { useRef, useState } from 'react';
|
|
3
|
-
import { MenuItem, FocusableItem, MenuDivider, MenuHeader, useMenuState, ControlledMenu, } from '@szhsin/react-menu';
|
|
4
|
-
import '@szhsin/react-menu/dist/index.css';
|
|
5
|
-
export var LuiFilterMenu = function (props) {
|
|
6
|
-
var _a = useState(''), filter = _a[0], setFilter = _a[1];
|
|
7
|
-
var _b = useMenuState(), menuProps = _b[0], toggleMenu = _b[1];
|
|
8
|
-
var ref = useRef(null);
|
|
9
|
-
return (React.createElement("div", { ref: ref },
|
|
10
|
-
props.menuButton(function () {
|
|
11
|
-
switch (props.enabled) {
|
|
12
|
-
case false: {
|
|
13
|
-
toggleMenu(false);
|
|
14
|
-
break;
|
|
15
|
-
}
|
|
16
|
-
default: {
|
|
17
|
-
toggleMenu();
|
|
18
|
-
break;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}),
|
|
22
|
-
React.createElement(ControlledMenu, __assign({}, menuProps, { anchorRef: ref, onClose: function () { return toggleMenu(false); }, className: "lui-menu", offsetY: 12, onChange: function (e) {
|
|
23
|
-
e.open && setFilter('');
|
|
24
|
-
}, menuStyle: props.maxRows !== undefined
|
|
25
|
-
? { maxHeight: 62 + 34 * props.maxRows, overflowY: 'auto' }
|
|
26
|
-
: {} }),
|
|
27
|
-
React.createElement(FocusableItem, null, function (_a) {
|
|
28
|
-
var ref = _a.ref;
|
|
29
|
-
return (React.createElement("input", { ref: ref, type: "text", placeholder: "Type to filter", value: filter, onChange: function (e) { return setFilter(e.target.value); } }));
|
|
30
|
-
}),
|
|
31
|
-
props.filteredItems
|
|
32
|
-
.filter(function (item) {
|
|
33
|
-
return item.display.toUpperCase().includes(filter.trim().toUpperCase());
|
|
34
|
-
})
|
|
35
|
-
.map(function (item) {
|
|
36
|
-
if ((item === null || item === void 0 ? void 0 : item.specialType) === 'div') {
|
|
37
|
-
return React.createElement(MenuDivider, { key: item.id });
|
|
38
|
-
}
|
|
39
|
-
else if ((item === null || item === void 0 ? void 0 : item.specialType) === 'head') {
|
|
40
|
-
return React.createElement(MenuHeader, { key: item.id }, item.display);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
return (React.createElement(MenuItem, { key: item.id, onMouseDown: function (e) {
|
|
44
|
-
props.onItemClick(item.id);
|
|
45
|
-
e.stopPropagation();
|
|
46
|
-
} }, item.display));
|
|
47
|
-
}
|
|
48
|
-
}))));
|
|
49
|
-
};
|
|
50
|
-
//# sourceMappingURL=LuiFilterMenu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuiFilterMenu.js","sourceRoot":"","sources":["../../../src/components/LuiFilterMenu/LuiFilterMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAa,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,GACf,MAAM,oBAAoB,C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,UAAC,CAAC,IAAK,OAAA,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAzB,CAAyB,GAC1C,CACH;YARkB,CAQlB,CACa;YAEf,KAAK,CAAC,aAAa;iBACjB,MAAM,CAAC,UAAC,IAAI;gBACX,OAAA,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YAAhE,CAAgE,CACjE;iBACA,GAAG,CAAC,UAAC,IAAI;gBACR,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,MAAK,KAAK,EAAE;oBAC/B,OAAO,oBAAC,WAAW,IAAC,GAAG,EAAE,IAAI,CAAC,EAAE,GAAI,CAAC;iBACtC;qBAAM,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,MAAK,MAAM,EAAE;oBACvC,OAAO,oBAAC,UAAU,IAAC,GAAG,EAAE,IAAI,CAAC,EAAE,IAAG,IAAI,CAAC,OAAO,CAAc,CAAC;iBAC9D;qBAAM;oBACL,OAAO,CACL,oBAAC,QAAQ,IACP,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,WAAW,EAAE,UAAC,CAAM;4BAClB,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;4BAC3B,CAAC,CAAC,eAAe,EAAE,CAAC;wBACtB,CAAC,IAEA,IAAI,CAAC,OAAO,CACJ,CACZ,CAAC;iBACH;YACH,CAAC,CAAC,CACW,CACb,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import LinzLogoFooter from '../../assets/images/linz-logo-footer.svg';
|
|
3
|
-
import NzGovtLogoRev from '../../assets/images/nz-govt-logo-rev.svg';
|
|
4
|
-
export var LuiFooter = function (props) {
|
|
5
|
-
return (React.createElement("footer", { className: 'lui-footer' },
|
|
6
|
-
React.createElement("div", { className: 'lui-footer-columns' },
|
|
7
|
-
React.createElement("h2", null, props.footerText),
|
|
8
|
-
React.createElement("div", { className: "lui-row-divider-xs lui-row-divider-sm" }),
|
|
9
|
-
React.createElement("div", { className: 'lui-footer-container-right' },
|
|
10
|
-
React.createElement("h3", null, "Connect"),
|
|
11
|
-
React.createElement("ul", { className: "lui-footer-list" },
|
|
12
|
-
props.contactNumber && (React.createElement("li", null,
|
|
13
|
-
React.createElement("a", { href: 'tel:' + props.contactNumber }, props.contactNumber))),
|
|
14
|
-
props.contactEmail && (React.createElement("li", null,
|
|
15
|
-
React.createElement("a", { href: 'mailto:' + props.contactEmail }, "Email"))),
|
|
16
|
-
props.feedbackFormUrl && (React.createElement("li", null,
|
|
17
|
-
React.createElement("a", { href: props.feedbackFormUrl, rel: "noopener noreferrer", target: "_blank" }, "Give feedback")))))),
|
|
18
|
-
React.createElement("div", { className: "lui-row-divider-xs lui-row-divider-sm" }),
|
|
19
|
-
React.createElement("div", { className: 'lui-footer-logo-row' },
|
|
20
|
-
React.createElement("div", { className: 'lui-footer-columns' },
|
|
21
|
-
React.createElement("div", { className: "lui-footer-linz-logo" },
|
|
22
|
-
React.createElement("a", { href: "https://www.linz.govt.nz", rel: "noopener noreferrer", target: "_blank" },
|
|
23
|
-
React.createElement("img", { alt: "Land Information New Zealand (LINZ) - Toit\u016B te whenua", className: "jss180", src: LinzLogoFooter }))),
|
|
24
|
-
React.createElement("div", { className: "lui-footer-nz-govt-logo" },
|
|
25
|
-
React.createElement("a", { href: "https://www.govt.nz", rel: "noopener noreferrer", target: "_blank" },
|
|
26
|
-
React.createElement("img", { alt: "Open New Zealand Government website in new window/tab. ", className: "jss181", src: NzGovtLogoRev }))))),
|
|
27
|
-
React.createElement("div", { className: "lui-margin-top-md lui-row-divider-xs lui-row-divider-sm lui-row-divider-md lui-row-divider-lg lui-row-divider-xl" },
|
|
28
|
-
React.createElement("div", { className: 'lui-footer-columns' },
|
|
29
|
-
React.createElement("ul", { className: "lui-footer-list" },
|
|
30
|
-
React.createElement("li", { className: 'lui-footer-inline-list-item' },
|
|
31
|
-
React.createElement("a", { href: "https://www.digital.govt.nz/home/about-digital-govt-nz/contact-us/" }, "Contact")),
|
|
32
|
-
React.createElement("li", { className: 'lui-footer-inline-list-item' },
|
|
33
|
-
React.createElement("a", { href: "https://www.digital.govt.nz/home/about-digital-govt-nz/privacy/" }, "Privacy"))),
|
|
34
|
-
React.createElement("div", { className: "lui-row-divider-xs" },
|
|
35
|
-
React.createElement("p", { className: "lui-small" }, "\u00A9 2020 Land Information New Zealand"))))));
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=LuiFooter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuiFooter.js","sourceRoot":"","sources":["../../../src/components/LuiFooter/LuiFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,0CAA0C,CAAC;AACtE,OAAO,aAAa,MAAM,0CAA0C,CAAC;AAUrE,MAAM,CAAC,IAAM,SAAS,GAAmD,UACvE,KAAK;IAEL,OAAO,CACL,gCAAQ,SAAS,EAAE,YAAY;QAC7B,6BAAK,SAAS,EAAE,oBAAoB;YAClC,gCAAK,KAAK,CAAC,UAAU,CAAM;YAC3B,6BAAK,SAAS,EAAC,uCAAuC,GAAG;YACzD,6BAAK,SAAS,EAAE,4BAA4B;gBAC1C,0CAAgB;gBAChB,4BAAI,SAAS,EAAC,iBAAiB;oBAC5B,KAAK,CAAC,aAAa,IAAI,CACtB;wBACE,2BAAG,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,aAAa,IAAG,KAAK,CAAC,aAAa,CAAK,CAC7D,CACN;oBACA,KAAK,CAAC,YAAY,IAAI,CACrB;wBACE,2BAAG,IAAI,EAAE,SAAS,GAAG,KAAK,CAAC,YAAY,YAAW,CAC/C,CACN;oBACA,KAAK,CAAC,eAAe,IAAI,CACxB;wBACE,2BACE,IAAI,EAAE,KAAK,CAAC,eAAe,EAC3B,GAAG,EAAC,qBAAqB,EACzB,MAAM,EAAC,QAAQ,oBAGb,CACD,CACN,CACE,CACD,CACF;QACN,6BAAK,SAAS,EAAC,uCAAuC,GAAG;QACzD,6BAAK,SAAS,EAAE,qBAAqB;YACnC,6BAAK,SAAS,EAAE,oBAAoB;gBAClC,6BAAK,SAAS,EAAC,sBAAsB;oBACnC,2BACE,IAAI,EAAC,0BAA0B,EAC/B,GAAG,EAAC,qBAAqB,EACzB,MAAM,EAAC,QAAQ;wBAEf,6BACE,GAAG,EAAC,4DAAuD,EAC3D,SAAS,EAAC,QAAQ,EAClB,GAAG,EAAE,cAAc,GACnB,CACA,CACA;gBACN,6BAAK,SAAS,EAAC,yBAAyB;oBACtC,2BACE,IAAI,EAAC,qBAAqB,EAC1B,GAAG,EAAC,qBAAqB,EACzB,MAAM,EAAC,QAAQ;wBAEf,6BACE,GAAG,EAAC,yDAAyD,EAC7D,SAAS,EAAC,QAAQ,EAClB,GAAG,EAAE,aAAa,GAClB,CACA,CACA,CACF,CACF;QAEN,6BAAK,SAAS,EAAC,kHAAkH;YAC/H,6BAAK,SAAS,EAAE,oBAAoB;gBAClC,4BAAI,SAAS,EAAC,iBAAiB;oBAC7B,4BAAI,SAAS,EAAE,6BAA6B;wBAC1C,2BAAG,IAAI,EAAC,oEAAoE,cAExE,CACD;oBACL,4BAAI,SAAS,EAAE,6BAA6B;wBAC1C,2BAAG,IAAI,EAAC,iEAAiE,cAErE,CACD,CACF;gBAEL,6BAAK,SAAS,EAAC,oBAAoB;oBACjC,2BAAG,SAAS,EAAC,WAAW,+CAAwC,CAC5D,CACF,CACF,CACC,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import React, { useState } from 'react';
|
|
3
|
-
import { LuiIcon } from '../../LuiIcon/LuiIcon';
|
|
4
|
-
import { LuiTextInput } from '../LuiTextInput/LuiTextInput';
|
|
5
|
-
export var ClearableLuiTextInput = function (props) {
|
|
6
|
-
var _a = useState(props.value ? props.value : ''), currentValue = _a[0], setCurrentValue = _a[1];
|
|
7
|
-
var clear = function () {
|
|
8
|
-
setCurrentValue('');
|
|
9
|
-
if (props.onValueChange) {
|
|
10
|
-
props.onValueChange('');
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
var cancelIcon = currentValue !== '' ? (React.createElement(LuiIcon, { alt: "clear", name: "ic_cancel_clear", size: "lg", className: 'LuiTextInput-iconPosition', spanProps: { onClick: clear } })) : undefined;
|
|
14
|
-
return (React.createElement(LuiTextInput, __assign({}, props, { icon: cancelIcon, value: currentValue, onChange: function (e) {
|
|
15
|
-
setCurrentValue(e.target.value);
|
|
16
|
-
if (props.onValueChange) {
|
|
17
|
-
props.onValueChange(e.target.value);
|
|
18
|
-
}
|
|
19
|
-
} })));
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=ClearableLuiTextInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ClearableLuiTextInput.js","sourceRoot":"","sources":["../../../../src/components/LuiFormElements/ClearableLuiTextInput/ClearableLuiTextInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAuB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAe5D,MAAM,CAAC,IAAM,qBAAqB,GAAG,UACnC,KAAiC;IAE3B,IAAA,KAAkC,QAAQ,CAC9C,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAC/B,EAFM,YAAY,QAAA,EAAE,eAAe,QAEnC,CAAC;IACF,IAAM,KAAK,GAAG;QACZ,eAAe,CAAC,EAAE,CAAC,CAAC;QACpB,IAAI,KAAK,CAAC,aAAa,EAAE;YACvB,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;SACzB;IACH,CAAC,CAAC;IACF,IAAM,UAAU,GACd,YAAY,KAAK,EAAE,CAAC,CAAC,CAAC,CACpB,oBAAC,OAAO,IACN,GAAG,EAAC,OAAO,EACX,IAAI,EAAC,iBAAiB,EACtB,IAAI,EAAC,IAAI,EACT,SAAS,EAAE,2BAA2B,EACtC,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,GAC7B,CACH,CAAC,CAAC,CAAC,SAAS,CAAC;IAChB,OAAO,CACL,oBAAC,YAAY,eACP,KAAK,IACT,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,UAAC,CAAC;YACV,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAChC,IAAI,KAAK,CAAC,aAAa,EAAE;gBACvB,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aACrC;QACH,CAAC,IACD,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import { LuiError } from '../../LuiError/LuiError';
|
|
5
|
-
import { useGenerateOrDefaultId } from '../LuiTextInput/LuiTextInput';
|
|
6
|
-
import { LuiIcon } from '../../LuiIcon/LuiIcon';
|
|
7
|
-
export var LuiCheckboxInput = function (props) {
|
|
8
|
-
var _a;
|
|
9
|
-
var id = useGenerateOrDefaultId((_a = props.inputProps) === null || _a === void 0 ? void 0 : _a.id);
|
|
10
|
-
return (React.createElement("div", { className: clsx('LuiCheckboxInput', {
|
|
11
|
-
'LuiCheckboxInput--isChecked': props.isChecked,
|
|
12
|
-
'LuiCheckboxInput--hasError': !!props.error,
|
|
13
|
-
'LuiCheckboxInput--isDisabled': !!props.isDisabled
|
|
14
|
-
}, props.className) },
|
|
15
|
-
React.createElement("label", { htmlFor: id, className: "LuiCheckboxInput-group" },
|
|
16
|
-
props.mandatory && (React.createElement("span", { "aria-label": "Required", className: "LuiCheckboxInput-mandatory" }, "*")),
|
|
17
|
-
React.createElement("input", __assign({ className: clsx('LuiCheckboxInput-input'), id: id, type: "checkbox", value: props.value, onChange: props.onChange, checked: props.isChecked, disabled: props.isDisabled }, props.inputProps)),
|
|
18
|
-
React.createElement("span", { className: "LuiCheckboxInput-label" },
|
|
19
|
-
props.label,
|
|
20
|
-
React.createElement(LuiIcon, { name: props.isIndeterminate ? 'ic_zoom_out' : 'ic_check', size: "md", alt: props.isIndeterminate ? 'Indeterminate Check' : 'Check', className: "LuiCheckboxInput-labelCheck", title: props.titleAttribute }))),
|
|
21
|
-
props.error && (React.createElement(LuiError, { className: "LuiCheckboxInput", error: props.error }))));
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=LuiCheckboxInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuiCheckboxInput.js","sourceRoot":"","sources":["../../../../src/components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAgBhD,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,KAAuB;;IACtD,IAAM,EAAE,GAAG,sBAAsB,CAAC,MAAA,KAAK,CAAC,UAAU,0CAAE,EAAE,CAAC,CAAC;IAExD,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CACb,kBAAkB,EAClB;YACE,6BAA6B,EAAE,KA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InputBox = function (props) {
|
|
5
|
-
var _a = useState(), file = _a[0], setFile = _a[1];
|
|
6
|
-
var _b = useState(false), hasFileFormatError = _b[0], setHasFileFormatError = _b[1];
|
|
7
|
-
var onChange = function (e) {
|
|
8
|
-
// Logic to go here to check extensions and setHasFileFormatError
|
|
9
|
-
setHasFileFormatError(false);
|
|
10
|
-
var files = e.target.files;
|
|
11
|
-
// File upload box is configured to only accept 1 file, we can't have more than one here
|
|
12
|
-
if (files && files.length === 1) {
|
|
13
|
-
var selectedFile = files[0];
|
|
14
|
-
var supportedFileTypes = props.acceptedExtensions.map(function (ext) {
|
|
15
|
-
return ext.toUpperCase();
|
|
16
|
-
});
|
|
17
|
-
var fileName = selectedFile.name;
|
|
18
|
-
if (!supportedFileTypes.includes(getFileNameExtension(fileName))) {
|
|
19
|
-
setHasFileFormatError(true);
|
|
20
|
-
setFile(undefined);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
setFile(selectedFile);
|
|
24
|
-
props.onValidFileSelected(selectedFile);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
var hasError = hasFileFormatError || props.showMustSelectFileError === true;
|
|
29
|
-
return (React.createElement("div", { className: clsx('LuiFileInputBox-upload', hasError && 'LuiFileInputBox-upload-error'), style: { width: props.width || 320, height: props.height || 320 } },
|
|
30
|
-
React.createElement("input", { role: "button", "aria-label": "File Upload", type: "file", className: "LuiFileInputBox-upload-input", accept: props.acceptedExtensions
|
|
31
|
-
.map(function (extension) { return ".".concat(extension); })
|
|
32
|
-
.join(','), onChange: onChange }),
|
|
33
|
-
React.createElement(React.Fragment, null, hasError ? (React.createElement("div", { className: "LuiFileInputBox-upload-container" },
|
|
34
|
-
React.createElement(React.Fragment, null,
|
|
35
|
-
React.createElement("div", { className: 'LuiFileInputBox-upload-icon-error' },
|
|
36
|
-
React.createElement(LuiIcon, { name: "ic_error_outline", size: 'ns', alt: "Error" })),
|
|
37
|
-
props.customFileErrorMessage ? (React.createElement("p", null, props.customFileErrorMessage)) : (React.createElement("p", { className: "LuiFileInputBox-upload-text" },
|
|
38
|
-
"You must select a file with extension of",
|
|
39
|
-
' ',
|
|
40
|
-
extensionsAsHumanReadableList(props.acceptedExtensions),
|
|
41
|
-
"."))))) : (React.createElement(FileUploadInfo, { fileName: file === null || file === void 0 ? void 0 : file.name, fileFormatText: props.fileFormatText, fileDescription: props.fileDescription })))));
|
|
42
|
-
};
|
|
43
|
-
// Only exported for chromatic
|
|
44
|
-
export var FileUploadInfo = function (props) {
|
|
45
|
-
var DragAndDropInstruction = function () { return (React.createElement("p", { className: "LuiFileInputBox-upload-text" },
|
|
46
|
-
"Drag and drop your ",
|
|
47
|
-
props.fileDescription,
|
|
48
|
-
" into the box",
|
|
49
|
-
React.createElement("br", null),
|
|
50
|
-
React.createElement("span", null, "(or upload file manually)"))); };
|
|
51
|
-
var WaitingForFileSelection = function () { return (React.createElement(React.Fragment, null,
|
|
52
|
-
React.createElement("div", { className: 'LuiFileInputBox-upload-icon-upload' },
|
|
53
|
-
React.createElement(LuiIcon, { name: "ic_publish", size: 'ns', alt: "Upload" })),
|
|
54
|
-
React.createElement(DragAndDropInstruction, null),
|
|
55
|
-
props.fileFormatText && (React.createElement("p", { className: "LuiFileInputBox-upload-text LuiFileInputBox-upload-text-no-padding" }, props.fileFormatText)))); };
|
|
56
|
-
var UploadSuccess = function () { return (React.createElement(React.Fragment, null,
|
|
57
|
-
React.createElement("div", { className: 'LuiFileInputBox-upload-icon-success' },
|
|
58
|
-
React.createElement(LuiIcon, { name: "ic_check_circle_outline", size: 'ns', alt: "Success" })),
|
|
59
|
-
React.createElement("p", { className: "LuiFileInputBox-upload-file-name" }, props.fileName),
|
|
60
|
-
React.createElement(DragAndDropInstruction, null))); };
|
|
61
|
-
return (React.createElement("div", { className: "LuiFileInputBox-upload-container" }, props.fileName ? React.createElement(UploadSuccess, null) : React.createElement(WaitingForFileSelection, null)));
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Get the extension from a filename in upper-case.
|
|
65
|
-
*
|
|
66
|
-
* @param fileName File-name to get extension from
|
|
67
|
-
* @return fileName extension in upper-case if found else empty string
|
|
68
|
-
*/
|
|
69
|
-
export var getFileNameExtension = function (fileName) {
|
|
70
|
-
var idx = fileName.lastIndexOf('.');
|
|
71
|
-
return idx === -1 ? '' : fileName.substr(idx + 1).toUpperCase();
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Convert an array of extensions to a human readable string in upper-case.
|
|
75
|
-
* e.g. JPG, TIFF or BMP.
|
|
76
|
-
*
|
|
77
|
-
* @param extensions List of extensions to convert.
|
|
78
|
-
* @return Extensions in a human readable string in upper-case.
|
|
79
|
-
*/
|
|
80
|
-
export var extensionsAsHumanReadableList = function (extensions) {
|
|
81
|
-
var uppercaseExtensions = extensions.map(function (extension) {
|
|
82
|
-
return extension.toUpperCase();
|
|
83
|
-
});
|
|
84
|
-
if (!extensions.length)
|
|
85
|
-
return '';
|
|
86
|
-
if (extensions.length === 1)
|
|
87
|
-
return uppercaseExtensions[0];
|
|
88
|
-
return "".concat(uppercaseExtensions.slice(0, -1).join(', '), " or ").concat(uppercaseExtensions[extensions.length - 1]);
|
|
89
|
-
};
|
|
90
|
-
//# sourceMappingURL=LuiFileInputBox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuiFileInputBox.js","sourceRoot":"","sources":["../../../../src/components/LuiFormElements/LuiFileInputBox/LuiFileInputBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAahD,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,KAA2B;IACnD,IAAA,KAAkB,QAAQ,EAAQ,EAAjC,IAAI,QAAA,EAAE,OAAO,QAAoB,CAAC;IACnC,IAAA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C,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAE3D,OAAO,UAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,iBACnD,mBAAmB,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAC1C,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import React, { Fragment, } from 'react';
|
|
3
|
-
import { LuiIcon } from '../../LuiIcon/LuiIcon';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
import { useGenerateOrDefaultId } from '../LuiTextInput/LuiTextInput';
|
|
6
|
-
// @NOTE Can use LuiRadioInput in block form and pass through your own legend (label)
|
|
7
|
-
export var LuiRadioInput = function (props) {
|
|
8
|
-
var _a;
|
|
9
|
-
var id = useGenerateOrDefaultId((_a = props.inputProps) === null || _a === void 0 ? void 0 : _a.id);
|
|
10
|
-
return (React.createElement(React.Fragment, null,
|
|
11
|
-
React.createElement("div", { className: clsx('LuiRadioInput', {
|
|
12
|
-
'LuiRadioInput--hasError': props.error,
|
|
13
|
-
'LuiRadioInput--hasWarning': props.warning
|
|
14
|
-
}) },
|
|
15
|
-
React.createElement("fieldset", { className: 'LuiRadioInput-fieldset' },
|
|
16
|
-
props.legend && (React.createElement("legend", { className: "LuiRadioInput-legend" }, props.legend)),
|
|
17
|
-
props.options.map(function (option, index) {
|
|
18
|
-
var radioId = "".concat(id, "-").concat(index);
|
|
19
|
-
var isSelected = props.selectedValue === option;
|
|
20
|
-
var isDisabled = props.isOptionDisabled && props.isOptionDisabled(index);
|
|
21
|
-
var hasWarning = props.optionHasWarning && props.optionHasWarning(index);
|
|
22
|
-
return (React.createElement(Fragment, { key: radioId },
|
|
23
|
-
React.createElement("label", { htmlFor: radioId, className: clsx('LuiRadioInput-label', {
|
|
24
|
-
'LuiRadioInput-label--isDisabled': isDisabled,
|
|
25
|
-
'LuiRadioInput-label--hasWarning': hasWarning && isSelected,
|
|
26
|
-
'LuiRadioInput-label--isSelected': isSelected
|
|
27
|
-
}) },
|
|
28
|
-
React.createElement("input", __assign({ disabled: isDisabled, className: "LuiRadioInput-input", type: "radio", id: radioId, name: option, value: option, checked: isSelected, onChange: props.onChange }, props.inputProps)),
|
|
29
|
-
props.renderLabelFor ? props.renderLabelFor(option) : option),
|
|
30
|
-
hasWarning && isSelected && (React.createElement("div", { className: "LuiRadioInput-warningOnIndividualMsg" },
|
|
31
|
-
React.createElement(LuiIcon, { alt: 'warning', name: "ic_warning", size: "md", status: "warning" }),
|
|
32
|
-
React.createElement("p", null, props.warningOnIndividual)))));
|
|
33
|
-
})),
|
|
34
|
-
props.error && (React.createElement("div", { className: "LuiRadioInput-errorMsg" },
|
|
35
|
-
React.createElement(LuiIcon, { alt: 'error', name: "ic_error", size: "md", status: "error" }),
|
|
36
|
-
React.createElement("p", null, props.error))),
|
|
37
|
-
props.warning && (React.createElement("div", { className: "LuiRadioInput-warningMsg" },
|
|
38
|
-
React.createElement(LuiIcon, { alt: 'warning', name: "ic_warning", size: "md", status: "warning" }),
|
|
39
|
-
React.createElement("p", null, props.warning))))));
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=LuiRadioInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuiRadioInput.js","sourceRoot":"","sources":["../../../../src/components/LuiFormElements/LuiRadioInput/LuiRadioInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAEZ,QAAQ,GAET,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAgBtE,qFAAqF;AACrF,MAAM,CAAC,IAAM,a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KAAK,CAAC,QAAQ,IACpB,KAAK,CAAC,UAAU,EACpB;4BACD,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CACvD;wBAEP,UAAU,IAAI,UAAU,IAAI,CAC3B,6BAAK,SAAS,EAAC,sCAAsC;4BACnD,oBAAC,OAAO,IACN,GAAG,EAAE,SAAS,EACd,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,IAAI,EACT,MAAM,EAAC,SAAS,GAChB;4BACF,+BAAI,KAAK,CAAC,mBAAmB,CAAK,CAC9B,CACP,CACQ,CACZ,CAAC;gBACJ,CAAC,CAAC,CACO;YAEV,KAAK,CAAC,KAAK,IAAI,CACd,6BAAK,SAAS,EAAC,wBAAwB;gBACrC,oBAAC,OAAO,IAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,GAAG;gBAClE,+BAAI,KAAK,CAAC,KAAK,CAAK,CAChB,CACP;YAEA,KAAK,CAAC,OAAO,IAAI,CAChB,6BAAK,SAAS,EAAC,0BAA0B;gBACvC,oBAAC,OAAO,IACN,GAAG,EAAE,SAAS,EACd,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,IAAI,EACT,MAAM,EAAC,SAAS,GAChB;gBACF,+BAAI,KAAK,CAAC,OAAO,CAAK,CAClB,CACP,CACG,CACL,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { LuiIcon } from '../../LuiIcon/LuiIcon';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
import { useGenerateOrDefaultId } from '../LuiTextInput/LuiTextInput';
|
|
6
|
-
export var LuiSelectInput = function (props) {
|
|
7
|
-
var _a, _b;
|
|
8
|
-
var id = useGenerateOrDefaultId((_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.id);
|
|
9
|
-
return (React.createElement("div", { className: clsx('LuiSelect', ((_b = props.selectProps) === null || _b === void 0 ? void 0 : _b.disabled) ? 'isDisabled' : '', props.error ? 'hasError' : '') },
|
|
10
|
-
React.createElement("label", { htmlFor: id, className: "LuiSelect-label" },
|
|
11
|
-
props.mandatory && React.createElement("span", { className: "LuiSelect-mandatory" }, "*"),
|
|
12
|
-
React.createElement("span", { className: clsx('LuiSelect-label-text', props.hideLabel ? 'LuiScreenReadersOnly' : '') }, props.label),
|
|
13
|
-
React.createElement("div", { className: "LuiSelect-wrapper" },
|
|
14
|
-
React.createElement("select", __assign({ name: id, onChange: props.onChange, value: props.value, className: "LuiSelect-select" }, props.selectProps),
|
|
15
|
-
props.placeholderText && (React.createElement("option", { value: "", disabled: true }, props.placeholderText)),
|
|
16
|
-
props.options.map(function (selection) { return (React.createElement("option", { key: selection.value, value: selection.value }, selection.label)); })),
|
|
17
|
-
React.createElement(LuiIcon, { alt: 'Error', name: "ic_keyboard_arrow_down", className: "LuiSelect-chevron-icon", size: "md" })),
|
|
18
|
-
props.error && (React.createElement("span", { className: "LuiSelect-error" },
|
|
19
|
-
React.createElement(LuiIcon, { alt: 'Error', name: "ic_error", className: "LuiSelect-error-icon", size: "sm", status: "error" }),
|
|
20
|
-
props.error)))));
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=LuiSelectInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuiSelectInput.js","sourceRoot":"","sources":["../../../../src/components/LuiFormElements/LuiSelectInput/LuiSelectInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAoBtE,MAAM,CAAC,IAAM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AAI,EAAC,IAAI,GACT,CACE;YAGL,KAAK,CAAC,KAAK,IAAI,CACd,8BAAM,SAAS,EAAC,iBAAiB;gBAC/B,oBAAC,OAAO,IACN,GAAG,EAAE,OAAO,EACZ,IAAI,EAAC,UAAU,EACf,SAAS,EAAC,sBAAsB,EAChC,IAAI,EAAC,IAAI,EACT,MAAM,EAAC,OAAO,GACd;gBACD,KAAK,CAAC,KAAK,CACP,CACR,CACK,CACJ,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { LuiIcon } from '../../LuiIcon/LuiIcon';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
import { useGenerateOrDefaultId } from '../LuiTextInput/LuiTextInput';
|
|
6
|
-
export var LuiTextAreaInput = function (props) {
|
|
7
|
-
var _a, _b;
|
|
8
|
-
var id = useGenerateOrDefaultId((_a = props.inputProps) === null || _a === void 0 ? void 0 : _a.id);
|
|
9
|
-
return (React.createElement("div", { className: clsx('LuiTextAreaInput', ((_b = props.inputProps) === null || _b === void 0 ? void 0 : _b.disabled) ? 'isDisabled' : '', (props === null || props === void 0 ? void 0 : props.error) ? 'hasError' : '') },
|
|
10
|
-
React.createElement("label", { htmlFor: id },
|
|
11
|
-
props.mandatory && (React.createElement("span", { className: "LuiTextAreaInput-mandatory" }, "*")),
|
|
12
|
-
React.createElement("span", { className: "LuiTextAreaInput-label" }, props.label),
|
|
13
|
-
React.createElement("div", { className: "LuiTextAreaInput-wrapper" },
|
|
14
|
-
' ',
|
|
15
|
-
React.createElement("textarea", __assign({ id: id, value: props.value, onChange: props.onChange, rows: 5 }, props.inputProps)))),
|
|
16
|
-
props.error && (React.createElement("span", { className: "LuiTextAreaInput-error" },
|
|
17
|
-
React.createElement(LuiIcon, { alt: "error", name: "ic_error", className: "LuiTextAreaInput-error-icon", size: "sm", status: "error" }),
|
|
18
|
-
props.error))));
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=LuiTextAreaInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuiTextAreaInput.js","sourceRoot":"","sources":["../../../../src/components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAWtE,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,KAA4B;;IAC3D,IAAM,EAAE,GAAG,sBAAsB,CAAC,MAAA,KAAK,CAAC,UAAU,0CAAE,EAAE,CAAC,CAAC;IAExD,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CACb,kBAAkB,EAClB,CAAA,MAAA,KAAK,CAAC,UAAU,0CAAE,QAAQ,EAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAC9C,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAC/B;QAED,+BAAO,OAAO,EAAE,EAAE;YACf,KAAK,CAAC,SAAS,IAAI,CAClB,8BAAM,SAAS,EAAC,4BAA4B,QAAS,CACtD;YACD,8BAAM,SAAS,EAAC,wBAAwB,IAAE,KAAK,CAAC,KAAK,CAAQ;YAC7D,6BAAK,SAAS,EAAC,0BAA0B;gBACtC,GAAG;gBAEJ,2CACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,IAAI,EAAE,CAAC,IACH,KAAK,CAAC,UAAU,EACpB,CACE,CACA;QAGP,KAAK,CAAC,KAAK,IAAI,CACd,8BAAM,SAAS,EAAC,wBAAwB;YACtC,oBAAC,OAAO,IACN,GAAG,EAAC,OAAO,EACX,IAAI,EAAC,UAAU,EACf,SAAS,EAAC,6BAA6B,EACvC,IAAI,EAAC,IAAI,EACT,MAAM,EAAC,OAAO,GACd;YACD,KAAK,CAAC,KAAK,CACP,CACR,CACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import React, { useState, } from 'react';
|
|
3
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
import { LuiIcon } from '../../LuiIcon/LuiIcon';
|
|
6
|
-
export function useGenerateOrDefaultId(idFromProps) {
|
|
7
|
-
var id = useState(idFromProps ? idFromProps : uuidv4())[0];
|
|
8
|
-
return id;
|
|
9
|
-
}
|
|
10
|
-
export var LuiTextInput = function (props) {
|
|
11
|
-
var _a;
|
|
12
|
-
var id = useGenerateOrDefaultId((_a = props.inputProps) === null || _a === void 0 ? void 0 : _a.id);
|
|
13
|
-
return (React.createElement("div", { className: clsx('LuiTextInput', props.error && 'hasError', props.warning && 'hasWarning', props.className) },
|
|
14
|
-
React.createElement("label", { className: 'LuiTextInput-label', htmlFor: id },
|
|
15
|
-
props.mandatory && React.createElement("span", { className: "LuiTextInput-mandatory" }, "*"),
|
|
16
|
-
React.createElement("span", { className: 'LuiTextInput-label-text ' +
|
|
17
|
-
clsx(props.hideLabel ? 'LuiScreenReadersOnly' : '') }, props.label),
|
|
18
|
-
React.createElement("span", { className: "LuiTextInput-inputWrapper" },
|
|
19
|
-
React.createElement("input", __assign({ type: 'text', className: (props.showPadlockIcon ? 'LuiTextInput-padlock-icon ' : '') +
|
|
20
|
-
clsx('LuiTextInput-input'), min: "0", value: props.value, onChange: props.onChange }, props.inputProps, { id: id })),
|
|
21
|
-
props.icon),
|
|
22
|
-
props.error && (React.createElement("span", { className: "LuiTextInput-error" },
|
|
23
|
-
React.createElement(LuiIcon, { alt: "error", name: "ic_error", className: "LuiTextInput-error-icon", size: "sm", status: "error" }),
|
|
24
|
-
props.error)),
|
|
25
|
-
props.warning && (React.createElement("span", { className: "LuiTextInput-warning" },
|
|
26
|
-
React.createElement(LuiIcon, { alt: "warning", name: "ic_warning", className: "LuiTextInput-warning-icon", size: "sm", status: "warning" }),
|
|
27
|
-
props.warning)))));
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=LuiTextInput.js.map
|