@geneui/components 2.11.1
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/ActionableList.js +1761 -0
- package/AdvancedSearch.js +872 -0
- package/Alert.js +98 -0
- package/Avatar.js +77 -0
- package/Badge.js +76 -0
- package/Breadcrumb.js +128 -0
- package/BusyLoader.js +69 -0
- package/Button.js +130 -0
- package/CHANGELOG.md +424 -0
- package/Card.js +513 -0
- package/CardList.js +705 -0
- package/CellMeasurerCache-c11cec83.js +229 -0
- package/Charts.js +99 -0
- package/Checkbox.js +232 -0
- package/CheckboxGroup.js +206 -0
- package/CheckboxGroupWithSearch.js +279 -0
- package/Collapse.js +196 -0
- package/ColorPicker.js +210 -0
- package/ComboBox.js +99 -0
- package/Counter.js +99 -0
- package/DateFilter.js +179 -0
- package/DatePicker.js +1231 -0
- package/DatePickerInput.js +30 -0
- package/Divider.js +56 -0
- package/Drawer.js +264 -0
- package/Dropdown.js +99 -0
- package/Editor.js +22965 -0
- package/Empty.js +132 -0
- package/ExtendedInput.js +578 -0
- package/Form.js +116 -0
- package/FormContainer.js +189 -0
- package/FormableCheckbox.js +27 -0
- package/FormableDatePicker.js +39 -0
- package/FormableDropdown.js +105 -0
- package/FormableEditor.js +24 -0
- package/FormableHOC-21051057.js +83 -0
- package/FormableMultiSelectDropdown.js +105 -0
- package/FormableNumberInput.js +31 -0
- package/FormableRadio.js +23 -0
- package/FormableSwitcher.js +23 -0
- package/FormableTextInput.js +31 -0
- package/FormableUploader.js +40 -0
- package/GeneUIProvider.js +256 -0
- package/Grid.js +166 -0
- package/Holder.js +99 -0
- package/Icon.js +63 -0
- package/Image.js +130 -0
- package/ImagePreview.js +99 -0
- package/KeyValue.js +63 -0
- package/Label.js +58 -0
- package/LinkButton.js +104 -0
- package/Menu.js +277 -0
- package/MobileNavigation.js +95 -0
- package/MobilePopup.js +180 -0
- package/Modal.js +251 -0
- package/ModuleTitle.js +99 -0
- package/NavigationMenu.js +212 -0
- package/Notification.js +120 -0
- package/Option.js +186 -0
- package/Overlay.js +99 -0
- package/Overspread.js +343 -0
- package/Pagination.js +258 -0
- package/Paper.js +97 -0
- package/Popover-f4d1cac0.js +411 -0
- package/Popover.js +20 -0
- package/PopoverV2.js +19 -0
- package/Portal.js +58 -0
- package/Products.js +115 -0
- package/Profile.js +99 -0
- package/Progress.js +200 -0
- package/QRCode.js +816 -0
- package/README.md +90 -0
- package/Radio.js +152 -0
- package/RadioGroup.js +105 -0
- package/Range.js +14 -0
- package/RichEditor-b7928765.js +228 -0
- package/RichEditor.js +13 -0
- package/Scrollbar.js +1587 -0
- package/Search.js +72 -0
- package/SearchWithDropdown.js +195 -0
- package/Section.js +62 -0
- package/SkeletonLoader.js +82 -0
- package/Slider.js +256 -0
- package/Status.js +104 -0
- package/Steps.js +312 -0
- package/SuggestionList.js +15 -0
- package/Switcher.js +194 -0
- package/Table.js +102 -0
- package/TableCompositions.js +17028 -0
- package/Tabs.js +236 -0
- package/Tag.js +103 -0
- package/TextLink.js +22 -0
- package/Textarea.js +239 -0
- package/Time.js +63 -0
- package/TimePicker.js +99 -0
- package/Timeline.js +114 -0
- package/Title.js +66 -0
- package/Toaster.js +116 -0
- package/Tooltip.js +157 -0
- package/TransferList.js +502 -0
- package/Uploader.js +32 -0
- package/ValidatableCheckbox.js +126 -0
- package/ValidatableDatePicker.js +312 -0
- package/ValidatableDropdown.js +99 -0
- package/ValidatableElements.js +99 -0
- package/ValidatableMultiSelectDropdown.js +99 -0
- package/ValidatableNumberInput.js +194 -0
- package/ValidatableRadio.js +117 -0
- package/ValidatableSwitcher.js +94 -0
- package/ValidatableTextInput.js +164 -0
- package/ValidatableTimeInput.js +171 -0
- package/ValidatableUploader.js +94 -0
- package/Widget.js +99 -0
- package/_commonjsHelpers-24198af3.js +35 -0
- package/_rollupPluginBabelHelpers-e8fb2e5c.js +16 -0
- package/checkTimeValidation-e56771be.js +16 -0
- package/checkboxRadioSwitcher-5b69d7bd.js +4 -0
- package/clsx.m-2bb6df4b.js +3 -0
- package/configs-91c86664.js +96 -0
- package/configs.js +131 -0
- package/dateValidation-67caec66.js +225 -0
- package/debounce-4419bc2f.js +17 -0
- package/globalStyling-9c60a159.js +4 -0
- package/guid-8ddf77b3.js +16 -0
- package/index-00fe8887.js +193 -0
- package/index-0cf65939.js +30991 -0
- package/index-122432cd.js +270 -0
- package/index-262edd7a.js +77 -0
- package/index-5cea9a7d.js +407 -0
- package/index-5e722d91.js +867 -0
- package/index-67f4d4d1.js +6568 -0
- package/index-6ff23041.js +66 -0
- package/index-702bf24a.js +1938 -0
- package/index-a4635754.js +329 -0
- package/index-a59530cd.js +4 -0
- package/index-ac59cb10.js +169 -0
- package/index-b7a33c58.js +11 -0
- package/index-d9e8a888.js +987 -0
- package/index-e0af0caf.js +1182 -0
- package/index-e8776f3d.js +807 -0
- package/index.js +128 -0
- package/localization-4ba17032.js +46 -0
- package/objectWithoutPropertiesLoose-299691d8.js +78 -0
- package/package.json +190 -0
- package/rangeAndSlider-20599da4.js +8839 -0
- package/react-beautiful-dnd.esm-38c37304.js +10117 -0
- package/style-inject.es-746bb8ed.js +28 -0
- package/useClickOutside-5183e396.js +25 -0
- package/useDeviceType-dd51db38.js +15 -0
- package/useEllipsisDetection-ef536015.js +23 -0
- package/useKeyDown-38102ae7.js +21 -0
- package/useMount-6fef51a5.js +9 -0
- package/useWidth-9f4647f8.js +15 -0
- package/useWindowSize-80369d76.js +33 -0
package/Tabs.js
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default, { useRef, useEffect, useState, useCallback, useMemo } from 'react';
|
|
3
|
+
import { p as propTypesExports } from './index-e0af0caf.js';
|
|
4
|
+
import { c as classnames } from './index-6ff23041.js';
|
|
5
|
+
import Icon from './Icon.js';
|
|
6
|
+
import { c as childrenOf } from './index-ac59cb10.js';
|
|
7
|
+
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
8
|
+
import './globalStyling-9c60a159.js';
|
|
9
|
+
import './dateValidation-67caec66.js';
|
|
10
|
+
import './_commonjsHelpers-24198af3.js';
|
|
11
|
+
import 'react-dom';
|
|
12
|
+
|
|
13
|
+
function Tab(props) {
|
|
14
|
+
const {
|
|
15
|
+
title,
|
|
16
|
+
icon,
|
|
17
|
+
active,
|
|
18
|
+
onClose,
|
|
19
|
+
disabled,
|
|
20
|
+
activeKey,
|
|
21
|
+
closeTitleText,
|
|
22
|
+
defaultActiveKey,
|
|
23
|
+
...restProps
|
|
24
|
+
} = props;
|
|
25
|
+
const ref = useRef(null);
|
|
26
|
+
const isCloseable = props.hasOwnProperty('onClose') && typeof onClose === 'function';
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (active && activeKey && defaultActiveKey !== activeKey && (defaultActiveKey || defaultActiveKey === 0)) {
|
|
29
|
+
ref.current.scrollIntoView({
|
|
30
|
+
behavior: 'smooth',
|
|
31
|
+
inline: 'nearest',
|
|
32
|
+
block: 'start'
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}, [active, activeKey, defaultActiveKey]);
|
|
36
|
+
return /*#__PURE__*/React__default.createElement("li", _extends({
|
|
37
|
+
ref: ref,
|
|
38
|
+
className: classnames({
|
|
39
|
+
active,
|
|
40
|
+
disabled
|
|
41
|
+
})
|
|
42
|
+
}, restProps), icon && /*#__PURE__*/React__default.createElement(Icon, {
|
|
43
|
+
type: icon,
|
|
44
|
+
className: "tab-icon"
|
|
45
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
46
|
+
className: "ellipsis-text"
|
|
47
|
+
}, title), isCloseable && /*#__PURE__*/React__default.createElement("button", {
|
|
48
|
+
onClick: e => {
|
|
49
|
+
e.stopPropagation();
|
|
50
|
+
onClose();
|
|
51
|
+
},
|
|
52
|
+
className: "tab-close-button",
|
|
53
|
+
title: closeTitleText
|
|
54
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
55
|
+
type: "bc-icon-close"
|
|
56
|
+
})));
|
|
57
|
+
}
|
|
58
|
+
Tab.propTypes = {
|
|
59
|
+
/**
|
|
60
|
+
* Title for 'Tab'.
|
|
61
|
+
*/
|
|
62
|
+
title: propTypesExports.node,
|
|
63
|
+
/**
|
|
64
|
+
* Active/Passive state of 'Tab'
|
|
65
|
+
*/
|
|
66
|
+
active: propTypesExports.bool,
|
|
67
|
+
/**
|
|
68
|
+
* Disabled state of 'Tab'
|
|
69
|
+
*/
|
|
70
|
+
disabled: propTypesExports.bool,
|
|
71
|
+
/**
|
|
72
|
+
* Icon of 'Tab'
|
|
73
|
+
*/
|
|
74
|
+
icon: propTypesExports.string,
|
|
75
|
+
/**
|
|
76
|
+
* Content padding for specific 'Tab'
|
|
77
|
+
*/
|
|
78
|
+
contentPadding: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.number]),
|
|
79
|
+
/**
|
|
80
|
+
* Prop for specifying which tab is active
|
|
81
|
+
*/
|
|
82
|
+
activeKey: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.number]),
|
|
83
|
+
/**
|
|
84
|
+
* Prop for default active tab
|
|
85
|
+
*/
|
|
86
|
+
defaultActiveKey: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.number]),
|
|
87
|
+
/**
|
|
88
|
+
* Shows close button and triggers function onClick
|
|
89
|
+
*/
|
|
90
|
+
onClose: propTypesExports.func,
|
|
91
|
+
/**
|
|
92
|
+
* Shows title hovering the close button
|
|
93
|
+
*/
|
|
94
|
+
closeTitleText: propTypesExports.oneOfType([propTypesExports.func, propTypesExports.string])
|
|
95
|
+
};
|
|
96
|
+
Tab.defaultProps = {
|
|
97
|
+
disabled: false
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
var css_248z = "[data-gene-ui-version=\"2.11.0\"] .tabs-holder{align-items:flex-start;display:flex;width:100%}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.reversed{flex-direction:row-reverse}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.horizontal{flex-direction:column}[data-gene-ui-version=\"2.11.0\"] .tabs-head{display:flex;flex-shrink:0;-webkit-user-select:none;user-select:none}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.horizontal>.tabs-head{width:100%}[data-gene-ui-version=\"2.11.0\"] .tabs-head>.tabs-wrapper{flex:auto}[data-gene-ui-version=\"2.11.0\"] .tabs-head>.tabs-actions{align-items:center;box-shadow:inset 0 -1px 0 0 rgba(var(--background-sc-rgb),.06);color:var(--hero);display:flex;flex-shrink:0}[data-gene-ui-version=\"2.11.0\"] .tabs-head>.tabs-actions>*{margin-inline-end:2rem}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.horizontal>.tabs-head>.tabs-wrapper{overflow-x:auto;width:100%}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.horizontal>.tabs-head>.tabs-wrapper::-webkit-scrollbar{display:none;height:0;width:0}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.horizontal>.tabs-head>.tabs-wrapper>.tabs-content.equal-tabs,[data-gene-ui-version=\"2.11.0\"] .tabs-holder.horizontal>.tabs-head>.tabs-wrapper>.tabs-content.type-basic{min-width:100%}[data-gene-ui-version=\"2.11.0\"] .tabs-content{display:inline-flex;font-weight:600;line-height:4.2rem;text-align:center;vertical-align:top}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content{flex-direction:column;text-align:start}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content .tab-icon{display:none}[data-gene-ui-version=\"2.11.0\"] .tabs-content>li{align-items:center;cursor:pointer;display:flex;justify-content:center;padding:0 2rem;position:relative;transition:color .3s,box-shadow .3s,border-color .3s,background-color,.3s}[data-gene-ui-version=\"2.11.0\"] .tabs-content>li .tab-icon{flex-shrink:0;margin-inline-end:1.4rem;margin-inline-start:-.4rem}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content>li{justify-content:flex-start;padding:0 3rem 0 2rem}html[dir=rtl] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content>li{padding:0 2rem 0 3rem}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical:not(.reversed)>.tabs-head>.tabs-wrapper>.type-basic.tabs-content>li{justify-content:flex-end}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.reversed>.tabs-head>.tabs-wrapper>.tabs-content>li{padding:0 2rem 0 3rem}html[dir=rtl] .tabs-holder.reversed>.tabs-head>.tabs-wrapper>.tabs-content>li{padding:0 3rem 0 2rem}[data-gene-ui-version=\"2.11.0\"] .tabs-content>li.disabled{opacity:.5}[data-gene-ui-version=\"2.11.0\"] .tabs-content>li.active,[data-gene-ui-version=\"2.11.0\"] .tabs-content>li.disabled{pointer-events:none}[data-gene-ui-version=\"2.11.0\"] .tabs-content>li .tab-close-button{align-items:center;background:rgba(var(--background-sc-rgb),.07);border-radius:100%;color:var(--background-sc);cursor:pointer;display:flex;height:1.6rem;justify-content:center;margin-inline-end:-1.6rem;margin-inline-start:.8rem;pointer-events:auto;transition:color .3s,background-color .3s;width:1.6rem}[data-gene-ui-version=\"2.11.0\"] .tabs-content>li .tab-close-button .icon{font-size:1.2rem}@media (hover:hover){[data-gene-ui-version=\"2.11.0\"] .tabs-content>li .tab-close-button:hover{background:var(--hero);color:var(--hero-sc)}}[data-gene-ui-version=\"2.11.0\"] .tabs-content.active .tab-close-button{background:rgba(var(--hero-rgb),.1);color:var(--hero)}@media (hover:hover){[data-gene-ui-version=\"2.11.0\"] .tabs-content.active .tab-close-button:hover{background:var(--hero);color:var(--hero-sc)}}[data-gene-ui-version=\"2.11.0\"] .tabs-content.equal-tabs>li{flex:1;min-width:12rem}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.equal-tabs>li{width:13rem}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.equal-tabs.type-text>li{width:12rem}[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-basic{box-shadow:inset 0 -1px 0 0 rgba(var(--background-sc-rgb),.06);line-height:4.6rem;padding:0 2rem}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-basic{box-shadow:inset -1px 0 0 rgba(var(--background-sc-rgb),.06);padding:2rem 0;text-align:end}html[dir=rtl] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-basic{box-shadow:inset 1px 0 0 rgba(var(--background-sc-rgb),.06)}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.reversed>.tabs-head>.tabs-wrapper>.tabs-content.type-basic{box-shadow:inset 1px 0 0 rgba(var(--background-sc-rgb),.06);text-align:start}html[dir=rtl] .tabs-holder.reversed>.tabs-head>.tabs-wrapper>.tabs-content.type-basic{box-shadow:inset -1px 0 0 rgba(var(--background-sc-rgb),.06)}[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-basic>li{box-shadow:inset 0 0 0 var(--hero);flex:inherit}[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-basic>li.active{box-shadow:inset 0 -.4rem 0 0 var(--hero)}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-basic>li.active{box-shadow:inset -.3rem 0 0 var(--hero)}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.reversed>.tabs-head>.tabs-wrapper>.tabs-content.type-basic>li.active,html[dir=rtl] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-basic>li.active{box-shadow:inset .3rem 0 0 var(--hero)}html[dir=rtl] .tabs-holder.reversed>.tabs-head>.tabs-wrapper>.tabs-content.type-basic>li.active{box-shadow:inset -.3rem 0 0 var(--hero)}[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-box>li{border:1px solid #0000;border-radius:1rem 1rem 0 0;line-height:4.1rem}[data-gene-ui-version=\"2.11.0\"] .tabs-holder:not(.vertical)>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li+*{margin:0 0 0 .2rem}html[dir=rtl] .tabs-holder:not(.vertical)>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li+*{margin:0 .2rem 0 0}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li{border-radius:1rem 0 0 1rem}html[dir=rtl] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li{border-radius:0 1rem 1rem 0}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li+*{margin:.2rem 0 0}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical.reversed>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li{border-radius:0 1rem 1rem 0}html[dir=rtl] .tabs-holder.vertical.reversed>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li{border-radius:1rem 0 0 1rem}@media (hover:hover){[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-box>li:hover{border-color:rgba(var(--background-sc-rgb),.1)}}[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-box>li.active{border-color:rgba(var(--background-sc-rgb),.1)}@media (hover:hover){html:not([dir=rtl]) .tabs-holder.vertical:not(.reversed)>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li:hover{border-right-color:#0000}html:not([dir=rtl]) .tabs-holder.vertical.reversed>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li:hover,html[dir=rtl] .tabs-holder.vertical:not(.reversed)>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li:hover{border-left-color:#0000}html[dir=rtl] .tabs-holder.vertical.reversed>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li:hover{border-right-color:#0000}}[data-gene-ui-version=\"2.11.0\"] .tabs-holder:not(.vertical)>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li.active{border-bottom-color:var(--background)}html:not([dir=rtl]) .tabs-holder.vertical:not(.reversed)>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li.active{border-right-color:var(--background)}html:not([dir=rtl]) .tabs-holder.reversed.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li.active,html[dir=rtl] .tabs-holder.vertical:not(.reversed)>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li.active{border-left-color:var(--background)}html[dir=rtl] .tabs-holder.reversed.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li.active{border-right-color:var(--background)}[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-button{box-shadow:inset 0 0 0 1px rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-button:not(.equal-tabs)>li{padding:0 2rem}[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-button>li{box-shadow:inset 0 0 0 0 var(--hero)}[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-button>li.active{box-shadow:inset 0 0 0 1px var(--hero)}[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-text.equal-tabs>li{min-width:10rem}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-text.equal-tabs>li{min-width:12rem}[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-text>li{line-height:2.8rem;padding:0 1.5rem}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-text>li{padding:0 2rem}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-text>li+*{margin:1rem 0 0}[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-text>li.active{background:var(--hero);color:var(--hero-sc)}[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-box>li.active,[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-button>li.active{color:var(--hero)}[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-button,[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-button>li,[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-text,[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-text>li{border-radius:2rem}@media (hover:hover){[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-button>li:not(.active):hover,[data-gene-ui-version=\"2.11.0\"] .tabs-content.type-text>li:not(.active):hover{color:var(--hero)}}[data-gene-ui-version=\"2.11.0\"] .tabs-content-holder{width:100%}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-content-holder{flex:auto}[data-gene-ui-version=\"2.11.0\"] .tabs-content-holder.c-type-box{align-self:stretch;border:1px solid rgba(var(--background-sc-rgb),.1);border-radius:0 0 1rem 1rem;margin:-1px 0 0}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical>.tabs-content-holder.c-type-box{border-radius:1rem}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical:not(.reversed)>.tabs-content-holder.c-type-box{border-radius:0 1rem 1rem 0;margin:0 0 0 -1px}[data-gene-ui-version=\"2.11.0\"] .tabs-holder.vertical.reversed>.tabs-content-holder.c-type-box,html[dir=rtl] .tabs-holder.vertical:not(.reversed)>.tabs-content-holder.c-type-box{border-radius:1rem 0 0 1rem;margin:0 -1px 0 0}html[dir=rtl] .tabs-holder.vertical.reversed>.tabs-content-holder.c-type-box{border-radius:0 1rem 1rem 0;margin:0 0 0 -1px}[data-gene-ui-version=\"2.11.0\"] .external-link{align-items:center;display:flex;font-weight:600}[data-gene-ui-version=\"2.11.0\"] .external-link>*+*{margin-inline-start:.2rem}";
|
|
101
|
+
styleInject(css_248z);
|
|
102
|
+
|
|
103
|
+
function Tabs(props) {
|
|
104
|
+
const {
|
|
105
|
+
type,
|
|
106
|
+
actions,
|
|
107
|
+
position,
|
|
108
|
+
children,
|
|
109
|
+
fixedSize,
|
|
110
|
+
onChange,
|
|
111
|
+
className,
|
|
112
|
+
defaultActiveKey,
|
|
113
|
+
contentClassName,
|
|
114
|
+
contentPadding
|
|
115
|
+
} = props;
|
|
116
|
+
const holderRef = useRef(null);
|
|
117
|
+
const isControlled = ('activeKey' in props);
|
|
118
|
+
const [active, setActive] = useState(() => defaultActiveKey || getDefaultActiveKey(children));
|
|
119
|
+
const activeKey = isControlled ? props.activeKey : active;
|
|
120
|
+
const handleClick = useCallback(key => {
|
|
121
|
+
!isControlled && setActive(key);
|
|
122
|
+
onChange && onChange(key);
|
|
123
|
+
(holderRef === null || holderRef === void 0 ? void 0 : holderRef.current) && holderRef.current.scrollTo(0, 0);
|
|
124
|
+
}, [onChange, isControlled, holderRef.current]);
|
|
125
|
+
const {
|
|
126
|
+
tabs,
|
|
127
|
+
content,
|
|
128
|
+
tabContentPadding
|
|
129
|
+
} = useMemo(() => getTabsAndContent(children, activeKey, defaultActiveKey, handleClick), [children, activeKey, handleClick]);
|
|
130
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
131
|
+
className: classnames('tabs-holder', className, {
|
|
132
|
+
vertical: position !== 'top',
|
|
133
|
+
reversed: position === 'right',
|
|
134
|
+
horizontal: position === 'top'
|
|
135
|
+
})
|
|
136
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
137
|
+
className: "tabs-head"
|
|
138
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
139
|
+
className: "tabs-wrapper"
|
|
140
|
+
}, /*#__PURE__*/React__default.createElement("ul", {
|
|
141
|
+
className: classnames('tabs-content', "type-".concat(type), {
|
|
142
|
+
'equal-tabs': fixedSize
|
|
143
|
+
})
|
|
144
|
+
}, tabs)), actions && position === 'top' && /*#__PURE__*/React__default.createElement("div", {
|
|
145
|
+
className: "tabs-actions"
|
|
146
|
+
}, actions)), /*#__PURE__*/React__default.createElement("div", {
|
|
147
|
+
ref: holderRef,
|
|
148
|
+
className: classnames('tabs-content-holder', contentClassName, {
|
|
149
|
+
'c-type-box': type === 'box'
|
|
150
|
+
}),
|
|
151
|
+
style: {
|
|
152
|
+
padding: "".concat((tabContentPadding || contentPadding) / 10, "rem")
|
|
153
|
+
}
|
|
154
|
+
}, content));
|
|
155
|
+
}
|
|
156
|
+
Tabs.propTypes = {
|
|
157
|
+
/**
|
|
158
|
+
* Any valid react node, will be shown at right side of tab menu bar.
|
|
159
|
+
*/
|
|
160
|
+
actions: propTypesExports.node,
|
|
161
|
+
/**
|
|
162
|
+
* Prop for specifying which tab is active
|
|
163
|
+
*/
|
|
164
|
+
activeKey: propTypesExports.string,
|
|
165
|
+
/**
|
|
166
|
+
* Prop for default active tab
|
|
167
|
+
*/
|
|
168
|
+
defaultActiveKey: propTypesExports.string,
|
|
169
|
+
/**
|
|
170
|
+
* Style of tab menu bar
|
|
171
|
+
*/
|
|
172
|
+
type: propTypesExports.oneOf(['basic', 'box', 'button', 'text']),
|
|
173
|
+
/**
|
|
174
|
+
* Position of tab menu bar
|
|
175
|
+
*/
|
|
176
|
+
position: propTypesExports.oneOf(['top', 'left', 'right']),
|
|
177
|
+
/**
|
|
178
|
+
* Size of tabs will be fixed when the value is true
|
|
179
|
+
*/
|
|
180
|
+
fixedSize: propTypesExports.bool,
|
|
181
|
+
/**
|
|
182
|
+
* Callback function, fired when tab changes
|
|
183
|
+
*/
|
|
184
|
+
onChange: propTypesExports.func,
|
|
185
|
+
/**
|
|
186
|
+
* Any valid react node
|
|
187
|
+
*/
|
|
188
|
+
children: childrenOf([Tab]),
|
|
189
|
+
/**
|
|
190
|
+
* Additional classname for content wrapper
|
|
191
|
+
*/
|
|
192
|
+
contentClassName: propTypesExports.string,
|
|
193
|
+
/**
|
|
194
|
+
* Padding value for content wrapper
|
|
195
|
+
*/
|
|
196
|
+
contentPadding: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.number])
|
|
197
|
+
};
|
|
198
|
+
Tabs.defaultProps = {
|
|
199
|
+
type: 'basic',
|
|
200
|
+
position: 'top',
|
|
201
|
+
fixedSize: false,
|
|
202
|
+
contentPadding: 19
|
|
203
|
+
};
|
|
204
|
+
function getDefaultActiveKey(children) {
|
|
205
|
+
let defaultActiveKey;
|
|
206
|
+
React__default.Children.forEach(children, child => {
|
|
207
|
+
if (!defaultActiveKey && !child.props.disabled) {
|
|
208
|
+
defaultActiveKey = child.key;
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
return defaultActiveKey;
|
|
212
|
+
}
|
|
213
|
+
function getTabsAndContent(children, activeKey, defaultActiveKey, handleClick) {
|
|
214
|
+
let content;
|
|
215
|
+
let tabContentPadding;
|
|
216
|
+
const tabs = React__default.Children.map(children, child => {
|
|
217
|
+
const active = child.key === activeKey;
|
|
218
|
+
if (active) {
|
|
219
|
+
content = child.props.children;
|
|
220
|
+
tabContentPadding = child.props.contentPadding;
|
|
221
|
+
}
|
|
222
|
+
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
223
|
+
onClick: () => handleClick(child.key),
|
|
224
|
+
defaultActiveKey,
|
|
225
|
+
activeKey,
|
|
226
|
+
active
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
return {
|
|
230
|
+
tabs,
|
|
231
|
+
content,
|
|
232
|
+
tabContentPadding
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export { Tab, Tabs };
|
package/Tag.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { p as propTypesExports } from './index-e0af0caf.js';
|
|
4
|
+
import { c as classnames } from './index-6ff23041.js';
|
|
5
|
+
import { t as tagConfig } from './configs-91c86664.js';
|
|
6
|
+
import './globalStyling-9c60a159.js';
|
|
7
|
+
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
8
|
+
|
|
9
|
+
var css_248z = "[data-gene-ui-version=\"2.11.0\"] .static-title-holder{align-items:flex-start;display:inline-flex;flex-direction:column;max-width:100%;vertical-align:top}[data-gene-ui-version=\"2.11.0\"] .static-title-holder .st-t{font:600 1.4rem/1.8rem var(--font-family);margin:0 0 .4rem;opacity:.5;padding:0 var(--static-title-padding,0)}[data-gene-ui-version=\"2.11.0\"] .static-title-holder .st-c{max-width:100%}[data-gene-ui-version=\"2.11.0\"] .static-title-holder .st-c:nth-child(2){align-items:center;display:flex;min-height:3.2rem}[data-gene-ui-version=\"2.11.0\"] .static-title-holder.f-full-width,[data-gene-ui-version=\"2.11.0\"] .static-title-holder.f-full-width .st-c{width:100%}[data-gene-ui-version=\"2.11.0\"] .tag-c{--color:var(--hero);align-items:center;background:var(--background);color:var(--color);display:flex;flex-direction:row-reverse;flex-shrink:0;font:600 1.4rem/1.8rem var(--font-family);height:var(--size);justify-content:center;max-width:100%;padding:0 1rem;position:relative;text-align:center;transition:color .3s;-webkit-user-select:none;user-select:none;width:100%}[data-gene-ui-version=\"2.11.0\"] .tag-c.s-small{--size:2.4rem;font-size:1.2rem}html:not([dir=rtl]) .tag-c.s-small .icon{margin-left:1px}html[dir=rtl] .tag-c.s-small .icon{margin-right:1px}[data-gene-ui-version=\"2.11.0\"] .tag-c.s-medium{--size:2.6rem}html:not([dir=rtl]) .tag-c.s-medium .icon{margin-left:.5rem}html[dir=rtl] .tag-c.s-medium .icon{margin-right:.5rem}[data-gene-ui-version=\"2.11.0\"] .tag-c.s-big{--size:3rem}html:not([dir=rtl]) .tag-c.s-big .icon{margin-left:.5rem}html[dir=rtl] .tag-c.s-big .icon{margin-right:.5rem}[data-gene-ui-version=\"2.11.0\"] .tag-c.f-compact{min-width:var(--size)}[data-gene-ui-version=\"2.11.0\"] .tag-c.f-compact.s-small{padding:0 .4rem}[data-gene-ui-version=\"2.11.0\"] .tag-c.f-compact.s-medium{padding:0 .5rem}[data-gene-ui-version=\"2.11.0\"] .tag-c.f-compact.s-big{padding:0 .7rem}html:not([dir=rtl]) .tag-c:not(.f-compact).s-small .icon{margin-right:-.9rem}html[dir=rtl] .tag-c:not(.f-compact).s-small .icon{margin-left:-.9rem}html:not([dir=rtl]) .tag-c:not(.f-compact).s-medium .icon{margin-right:-.7rem}html[dir=rtl] .tag-c:not(.f-compact).s-medium .icon{margin-left:-.7rem}html:not([dir=rtl]) .tag-c:not(.f-compact).s-big .icon{margin-right:-.2rem}html[dir=rtl] .tag-c:not(.f-compact).s-big .icon{margin-left:-.2rem}[data-gene-ui-version=\"2.11.0\"] .tag-c.cr-full-radius{border-radius:1.4rem}[data-gene-ui-version=\"2.11.0\"] .tag-c.cr-smooth-radius{border-radius:.6rem}[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-simple{--color:var(--background-sc)}[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-simple .tag-backdrop:before{opacity:.1}[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-simple .tag-backdrop:after{content:none}[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-minimal .tag-backdrop{--color:var(--background-sc)}[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-minimal .tag-backdrop:before{opacity:.03}[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-minimal .tag-backdrop:after{opacity:.07}[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-outline .tag-backdrop:before{content:none}[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-colored .tag-backdrop:before{opacity:.1}[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-clean{--color:var(--background-sc)}@media (hover:hover){[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-clean:hover{--color:var(--hero)}}[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-clean .tag-backdrop:after,[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-clean .tag-backdrop:before{content:none}[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-light .tag-backdrop:before{opacity:.1}[data-gene-ui-version=\"2.11.0\"] .tag-c:not(.active).a-light .tag-backdrop:after{border:0}[data-gene-ui-version=\"2.11.0\"] .tag-c.active{color:var(--hero-sc)}@media (hover:hover){[data-gene-ui-version=\"2.11.0\"] .tag-c:hover .tag-backdrop{opacity:.6}}[data-gene-ui-version=\"2.11.0\"] .tag-c .icon,[data-gene-ui-version=\"2.11.0\"] .tag-c .tag-cc{position:relative;transition:opacity .3s;z-index:1}[data-gene-ui-version=\"2.11.0\"] .tag-c .icon{cursor:pointer;opacity:.5}@media (hover:hover){[data-gene-ui-version=\"2.11.0\"] .tag-c .icon:hover{opacity:1}[data-gene-ui-version=\"2.11.0\"] .tag-c .icon:hover~.tag-cp{opacity:.6}}[data-gene-ui-version=\"2.11.0\"] .tag-backdrop{border-radius:inherit;height:100%;left:0;position:absolute;top:0;transition:opacity .3s;width:100%}[data-gene-ui-version=\"2.11.0\"] .tag-backdrop:after,[data-gene-ui-version=\"2.11.0\"] .tag-backdrop:before{border-radius:inherit;content:\"\";display:block;height:100%;left:0;position:absolute;top:0;width:100%}[data-gene-ui-version=\"2.11.0\"] .tag-backdrop:before{background:var(--color);transition:background .3s,opacity .3s}[data-gene-ui-version=\"2.11.0\"] .tag-backdrop:after{border:1px solid var(--color);transition:border-color .3s,opacity .3s}";
|
|
10
|
+
styleInject(css_248z);
|
|
11
|
+
|
|
12
|
+
function Tag(_ref) {
|
|
13
|
+
let {
|
|
14
|
+
label,
|
|
15
|
+
name,
|
|
16
|
+
cornerRadius,
|
|
17
|
+
size,
|
|
18
|
+
color,
|
|
19
|
+
appearance,
|
|
20
|
+
flexibility,
|
|
21
|
+
selected,
|
|
22
|
+
className,
|
|
23
|
+
cursor,
|
|
24
|
+
icons,
|
|
25
|
+
...restProps
|
|
26
|
+
} = _ref;
|
|
27
|
+
return /*#__PURE__*/React__default.createElement("ul", _extends({
|
|
28
|
+
className: classnames('static-title-holder', className, "f-".concat(flexibility))
|
|
29
|
+
}, restProps), label && /*#__PURE__*/React__default.createElement("li", {
|
|
30
|
+
className: "st-t"
|
|
31
|
+
}, label), /*#__PURE__*/React__default.createElement("li", {
|
|
32
|
+
className: "st-c"
|
|
33
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
34
|
+
className: classnames('tag-c', "cr-".concat(cornerRadius), "a-".concat(appearance), "f-".concat(flexibility), "s-".concat(size), {
|
|
35
|
+
active: selected,
|
|
36
|
+
'pointer-events-none': !icons
|
|
37
|
+
}),
|
|
38
|
+
style: {
|
|
39
|
+
'--hero': color,
|
|
40
|
+
cursor
|
|
41
|
+
}
|
|
42
|
+
}, icons || null, /*#__PURE__*/React__default.createElement("div", {
|
|
43
|
+
className: "tag-cp tag-cc ellipsis-text"
|
|
44
|
+
}, name), /*#__PURE__*/React__default.createElement("div", {
|
|
45
|
+
className: "tag-backdrop"
|
|
46
|
+
}))));
|
|
47
|
+
}
|
|
48
|
+
Tag.propTypes = {
|
|
49
|
+
/**
|
|
50
|
+
* Label for 'Tag'.
|
|
51
|
+
*/
|
|
52
|
+
label: propTypesExports.string,
|
|
53
|
+
/**
|
|
54
|
+
* Cursor type for 'Tag'.
|
|
55
|
+
*/
|
|
56
|
+
cursor: propTypesExports.string,
|
|
57
|
+
/**
|
|
58
|
+
* Name for 'Tag'.
|
|
59
|
+
*/
|
|
60
|
+
name: propTypesExports.string.isRequired,
|
|
61
|
+
/**
|
|
62
|
+
* Border type of corners
|
|
63
|
+
*/
|
|
64
|
+
cornerRadius: propTypesExports.oneOf(tagConfig.cornerRadius),
|
|
65
|
+
/**
|
|
66
|
+
* Chooses how to show 'Tag'
|
|
67
|
+
*/
|
|
68
|
+
flexibility: propTypesExports.oneOf(tagConfig.flexibility),
|
|
69
|
+
/**
|
|
70
|
+
* Switches between different sizes of 'Tag'.
|
|
71
|
+
*/
|
|
72
|
+
size: propTypesExports.oneOf(tagConfig.size),
|
|
73
|
+
/**
|
|
74
|
+
* Color/theming for 'Tag'.
|
|
75
|
+
*/
|
|
76
|
+
color: propTypesExports.string,
|
|
77
|
+
/**
|
|
78
|
+
* Switches between different views of 'Tag'.
|
|
79
|
+
*/
|
|
80
|
+
appearance: propTypesExports.oneOf(tagConfig.appearance),
|
|
81
|
+
/**
|
|
82
|
+
* Selected state
|
|
83
|
+
*/
|
|
84
|
+
selected: propTypesExports.bool,
|
|
85
|
+
/**
|
|
86
|
+
* External/Additional className
|
|
87
|
+
*/
|
|
88
|
+
className: propTypesExports.string,
|
|
89
|
+
/**
|
|
90
|
+
* Showing icons
|
|
91
|
+
*/
|
|
92
|
+
icons: propTypesExports.node
|
|
93
|
+
};
|
|
94
|
+
Tag.defaultProps = {
|
|
95
|
+
cornerRadius: tagConfig.cornerRadius[0],
|
|
96
|
+
flexibility: tagConfig.flexibility[0],
|
|
97
|
+
size: tagConfig.size[1],
|
|
98
|
+
appearance: tagConfig.appearance[0],
|
|
99
|
+
selected: false,
|
|
100
|
+
cursor: 'pointer'
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export { Tag as default };
|
package/TextLink.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { p as propTypesExports } from './index-e0af0caf.js';
|
|
3
|
+
|
|
4
|
+
function TextLink(_ref) {
|
|
5
|
+
let {
|
|
6
|
+
children,
|
|
7
|
+
...props
|
|
8
|
+
} = _ref;
|
|
9
|
+
return /*#__PURE__*/React__default.createElement("span", props, children);
|
|
10
|
+
}
|
|
11
|
+
TextLink.propTypes = {
|
|
12
|
+
/**
|
|
13
|
+
* Any valid React node
|
|
14
|
+
*/
|
|
15
|
+
children: propTypesExports.string.isRequired,
|
|
16
|
+
/**
|
|
17
|
+
* Additional className
|
|
18
|
+
*/
|
|
19
|
+
className: propTypesExports.string
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { TextLink as default };
|
package/Textarea.js
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { n as noop } from './index-ac59cb10.js';
|
|
4
|
+
import { p as propTypesExports } from './index-e0af0caf.js';
|
|
5
|
+
import { i as inputConfig, s as screenTypes } from './configs-91c86664.js';
|
|
6
|
+
import ExtendedInput from './ExtendedInput.js';
|
|
7
|
+
import './globalStyling-9c60a159.js';
|
|
8
|
+
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
9
|
+
import './dateValidation-67caec66.js';
|
|
10
|
+
import './_commonjsHelpers-24198af3.js';
|
|
11
|
+
import 'react-dom';
|
|
12
|
+
import './index-6ff23041.js';
|
|
13
|
+
import './useDeviceType-dd51db38.js';
|
|
14
|
+
import './useWindowSize-80369d76.js';
|
|
15
|
+
import './index-5cea9a7d.js';
|
|
16
|
+
import './useKeyDown-38102ae7.js';
|
|
17
|
+
import './useClickOutside-5183e396.js';
|
|
18
|
+
import './Scrollbar.js';
|
|
19
|
+
import './Icon.js';
|
|
20
|
+
import './Tooltip.js';
|
|
21
|
+
import './Popover-f4d1cac0.js';
|
|
22
|
+
import './GeneUIProvider.js';
|
|
23
|
+
|
|
24
|
+
var css_248z = "";
|
|
25
|
+
styleInject(css_248z);
|
|
26
|
+
|
|
27
|
+
function Textarea(props) {
|
|
28
|
+
return /*#__PURE__*/React__default.createElement(ExtendedInput, _extends({}, props, {
|
|
29
|
+
type: "textarea"
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
Textarea.propTypes = {
|
|
33
|
+
/**
|
|
34
|
+
* Additional className
|
|
35
|
+
*/
|
|
36
|
+
className: propTypesExports.string,
|
|
37
|
+
/**
|
|
38
|
+
* Control ExtendedInput disabled state with this prop
|
|
39
|
+
*/
|
|
40
|
+
disabled: propTypesExports.bool,
|
|
41
|
+
/**
|
|
42
|
+
* Borders will be colored on when "isValid" and this props are set to "true"
|
|
43
|
+
*/
|
|
44
|
+
colorBorderOnError: propTypesExports.bool,
|
|
45
|
+
/**
|
|
46
|
+
* Shows an icon to clear ExtendedInput's value when set to "true"
|
|
47
|
+
*/
|
|
48
|
+
showClearIcon: propTypesExports.bool,
|
|
49
|
+
/**
|
|
50
|
+
* Use this props in combo with "icon" prop. This will fire on icon click when set to "true"
|
|
51
|
+
*/
|
|
52
|
+
clickableIcon: propTypesExports.bool,
|
|
53
|
+
/**
|
|
54
|
+
* Shows an error icon when "isValid" is set to "false" and this prop is set to "true"
|
|
55
|
+
*/
|
|
56
|
+
showErrorIcon: propTypesExports.bool,
|
|
57
|
+
/**
|
|
58
|
+
*.
|
|
59
|
+
*/
|
|
60
|
+
showClickableTooltipOnError: propTypesExports.bool,
|
|
61
|
+
/**
|
|
62
|
+
* ExtendedInput borders are colored when "isValid" and this props are set to "true"
|
|
63
|
+
*/
|
|
64
|
+
colorOnValid: propTypesExports.bool,
|
|
65
|
+
/**
|
|
66
|
+
* ExtendedInput will display an icon when "isValid" and this props are set to "true"
|
|
67
|
+
*/
|
|
68
|
+
showIconOnValid: propTypesExports.bool,
|
|
69
|
+
/**
|
|
70
|
+
* Shows the "errorText" value in "Tooltip" when set to "true"
|
|
71
|
+
*/
|
|
72
|
+
showErrorWithTooltip: propTypesExports.bool,
|
|
73
|
+
/**
|
|
74
|
+
* Control ExtendedInput validation. For more info see "ValidatableNumberInput", "ValidatableTextInput"(integrated ExtendedInputs with "Form" organism).
|
|
75
|
+
*/
|
|
76
|
+
isValid: propTypesExports.bool,
|
|
77
|
+
/**
|
|
78
|
+
* Use this prop to specify error message. This will be displayed when "isValid" is set to "false"
|
|
79
|
+
*/
|
|
80
|
+
errorText: propTypesExports.string,
|
|
81
|
+
/**
|
|
82
|
+
* Use this prop to specify tooltip message.
|
|
83
|
+
*/
|
|
84
|
+
tooltipText: propTypesExports.string,
|
|
85
|
+
/**
|
|
86
|
+
* Valid values are same as "Icon" type
|
|
87
|
+
*/
|
|
88
|
+
icon: propTypesExports.string,
|
|
89
|
+
/**
|
|
90
|
+
* ExtendedInput placeholder
|
|
91
|
+
*/
|
|
92
|
+
placeholder: propTypesExports.string,
|
|
93
|
+
/**
|
|
94
|
+
* Control items direction
|
|
95
|
+
*/
|
|
96
|
+
itemsDirection: propTypesExports.oneOf(inputConfig.itemsDirection),
|
|
97
|
+
/**
|
|
98
|
+
* Use this prop to control ExtendedInput state. Note that when you specify this prop, the ExtendedInput will not functionate itself
|
|
99
|
+
*/
|
|
100
|
+
value: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.number]),
|
|
101
|
+
/**
|
|
102
|
+
* ExtendedInput appearance
|
|
103
|
+
*/
|
|
104
|
+
appearance: propTypesExports.oneOf(inputConfig.appearance),
|
|
105
|
+
/**
|
|
106
|
+
* ExtendedInput size
|
|
107
|
+
*/
|
|
108
|
+
inputSize: propTypesExports.oneOf(inputConfig.size),
|
|
109
|
+
/**
|
|
110
|
+
* ExtendedInput corner radius
|
|
111
|
+
*/
|
|
112
|
+
cornerRadius: propTypesExports.oneOf(inputConfig.cornerRadius),
|
|
113
|
+
/**
|
|
114
|
+
* Will make ExtendedInput readonly when set to "true"
|
|
115
|
+
*/
|
|
116
|
+
readOnly: propTypesExports.bool,
|
|
117
|
+
/**
|
|
118
|
+
* How to display inscription in relation to it's parent in ExtendedInput
|
|
119
|
+
*/
|
|
120
|
+
flexibility: propTypesExports.oneOf(inputConfig.flexibility),
|
|
121
|
+
/**
|
|
122
|
+
* This prop will only applied once as defaultState for "value" when ExtendedInput mounts.
|
|
123
|
+
* Note that specifying this prop is not mean controlling it.
|
|
124
|
+
*/
|
|
125
|
+
defaultValue: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.number]),
|
|
126
|
+
/**
|
|
127
|
+
* Shows an "Icon" to remove ExtendedInput's value
|
|
128
|
+
*/
|
|
129
|
+
canClear: propTypesExports.bool,
|
|
130
|
+
/**
|
|
131
|
+
* Fires an event on clear "Icon" click((element: Element) => void)
|
|
132
|
+
*/
|
|
133
|
+
onClear: propTypesExports.func,
|
|
134
|
+
/**
|
|
135
|
+
* Fires an event on ExtendedInput change((event: Event) => void)
|
|
136
|
+
*/
|
|
137
|
+
onChange: propTypesExports.func,
|
|
138
|
+
/**
|
|
139
|
+
* Specify a label for ExtendedInput
|
|
140
|
+
*/
|
|
141
|
+
label: propTypesExports.string,
|
|
142
|
+
/**
|
|
143
|
+
* Specify a "label" appearance
|
|
144
|
+
*/
|
|
145
|
+
labelAppearance: propTypesExports.oneOf(inputConfig.labelAppearance),
|
|
146
|
+
/**
|
|
147
|
+
* Will add an additional description field
|
|
148
|
+
*/
|
|
149
|
+
description: propTypesExports.node,
|
|
150
|
+
/**
|
|
151
|
+
* Fires an event on ExtendInput <input /> click((event: Event => void))
|
|
152
|
+
*/
|
|
153
|
+
onClick: propTypesExports.func,
|
|
154
|
+
/**
|
|
155
|
+
* Typing will be blocked when set to "true". Note design is different from "readonly" prop's design
|
|
156
|
+
*/
|
|
157
|
+
writeProtected: propTypesExports.bool,
|
|
158
|
+
/**
|
|
159
|
+
* Callback fires when input is focused
|
|
160
|
+
*/
|
|
161
|
+
onFocus: propTypesExports.func,
|
|
162
|
+
/**
|
|
163
|
+
* Callback fires when input loose focus
|
|
164
|
+
*/
|
|
165
|
+
onBlur: propTypesExports.func,
|
|
166
|
+
/**
|
|
167
|
+
* Callback fires when click in icon
|
|
168
|
+
*/
|
|
169
|
+
onIconClick: propTypesExports.func,
|
|
170
|
+
/**
|
|
171
|
+
* Define is input required or no.
|
|
172
|
+
*/
|
|
173
|
+
required: propTypesExports.bool,
|
|
174
|
+
/**
|
|
175
|
+
* The switch between mobile and desktop version
|
|
176
|
+
*/
|
|
177
|
+
screenType: propTypesExports.oneOf(screenTypes),
|
|
178
|
+
/**
|
|
179
|
+
* Define is need input info icon required.
|
|
180
|
+
*/
|
|
181
|
+
withInfoIcon: propTypesExports.bool,
|
|
182
|
+
/**
|
|
183
|
+
* ExtendedInput info icon title.
|
|
184
|
+
*/
|
|
185
|
+
infoIconTitle: propTypesExports.string,
|
|
186
|
+
/**
|
|
187
|
+
* Max Length of input Value
|
|
188
|
+
*/
|
|
189
|
+
maxLength: propTypesExports.number,
|
|
190
|
+
/**
|
|
191
|
+
* Show Remaining Length of input value, works only with maxLength
|
|
192
|
+
*/
|
|
193
|
+
showRemainingLength: propTypesExports.bool,
|
|
194
|
+
/**
|
|
195
|
+
* Suggestion Data
|
|
196
|
+
*/
|
|
197
|
+
suggestionData: propTypesExports.arrayOf(propTypesExports.shape({
|
|
198
|
+
key: propTypesExports.string.isRequired,
|
|
199
|
+
data: propTypesExports.arrayOf(propTypesExports.shape({
|
|
200
|
+
label: propTypesExports.string.isRequired,
|
|
201
|
+
value: propTypesExports.string.isRequired
|
|
202
|
+
}))
|
|
203
|
+
}))
|
|
204
|
+
};
|
|
205
|
+
Textarea.defaultProps = {
|
|
206
|
+
step: 1,
|
|
207
|
+
placeholder: '',
|
|
208
|
+
itemsDirection: inputConfig.itemsDirection[0],
|
|
209
|
+
appearance: inputConfig.appearance[0],
|
|
210
|
+
inputSize: inputConfig.size[1],
|
|
211
|
+
cornerRadius: inputConfig.cornerRadius[0],
|
|
212
|
+
readOnly: false,
|
|
213
|
+
flexibility: inputConfig.flexibility[0],
|
|
214
|
+
colorBorderOnError: true,
|
|
215
|
+
showErrorIcon: false,
|
|
216
|
+
showClickableTooltipOnError: true,
|
|
217
|
+
showErrorWithTooltip: false,
|
|
218
|
+
colorOnValid: false,
|
|
219
|
+
showIconOnValid: false,
|
|
220
|
+
canClear: false,
|
|
221
|
+
isValid: true,
|
|
222
|
+
onChange: noop,
|
|
223
|
+
onClick: noop,
|
|
224
|
+
onClear: noop,
|
|
225
|
+
onFocus: noop,
|
|
226
|
+
onBlur: noop,
|
|
227
|
+
onIconClick: noop,
|
|
228
|
+
withInfoIcon: false,
|
|
229
|
+
infoIconTitle: '',
|
|
230
|
+
label: '',
|
|
231
|
+
labelAppearance: inputConfig.labelAppearance[0],
|
|
232
|
+
description: '',
|
|
233
|
+
writeProtected: false,
|
|
234
|
+
defaultValue: '',
|
|
235
|
+
screenType: screenTypes[0]
|
|
236
|
+
};
|
|
237
|
+
Textarea.displayName = 'Textarea';
|
|
238
|
+
|
|
239
|
+
export { Textarea as default };
|