@geneui/components 2.11.2 → 2.12.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/{ActionableList.js → ActionableList/index.js} +83 -152
- package/{AdvancedSearch.js → AdvancedSearch/index.js} +290 -304
- package/Alert/index.js +97 -0
- package/Avatar/index.js +30 -0
- package/Badge/index.js +75 -0
- package/{Breadcrumb.js → Breadcrumb/index.js} +32 -31
- package/BusyLoader/index.js +68 -0
- package/Button/index.js +129 -0
- package/CHANGELOG.md +53 -0
- package/{Card.js → Card/index.js} +82 -94
- package/{CardList.js → CardList/index.js} +120 -165
- package/{CellMeasurerCache-b786dd93.js → CellMeasurerCache-3741d716.js} +2 -2
- package/{index-9164a86d.js → Charts/index.js} +17103 -30447
- package/{Checkbox.js → Checkbox/index.js} +37 -38
- package/{CheckboxGroup.js → CheckboxGroup/index.js} +41 -42
- package/{CheckboxGroupWithSearch.js → CheckboxGroupWithSearch/index.js} +64 -65
- package/{Collapse.js → Collapse/index.js} +28 -29
- package/{ColorPicker.js → ColorPicker/index.js} +16 -16
- package/ComboBox/index.js +525 -0
- package/Counter/index.js +310 -0
- package/{DateFilter.js → DateFilter/index.js} +45 -43
- package/{DatePicker.js → DatePicker/index.js} +106 -108
- package/{index-0199942c.js → DatePickerInput/index.js} +114 -100
- package/{Divider.js → Divider/index.js} +9 -10
- package/{Drawer.js → Drawer/index.js} +40 -41
- package/Dropdown/index.js +41 -0
- package/{Editor.js → Editor/index.js} +165 -164
- package/{Empty.js → Empty/index.js} +12 -13
- package/{ExtendedInput.js → ExtendedInput/index.js} +81 -71
- package/Form/index.js +83 -0
- package/{FormContainer.js → FormContainer/index.js} +25 -26
- package/FormableCheckbox/index.js +26 -0
- package/FormableDatePicker/index.js +41 -0
- package/FormableDropdown/index.js +48 -0
- package/FormableEditor/index.js +24 -0
- package/{FormableHOC-21051057.js → FormableHOC-55263162.js} +3 -3
- package/FormableMultiSelectDropdown/index.js +48 -0
- package/FormableNumberInput/index.js +32 -0
- package/FormableRadio/index.js +22 -0
- package/FormableSwitcher/index.js +22 -0
- package/FormableTextInput/index.js +32 -0
- package/FormableUploader/index.js +42 -0
- package/GeneUIProvider/index.js +282 -0
- package/{Grid.js → Grid/index.js} +27 -27
- package/Holder/index.js +261 -0
- package/{Icon.js → Icon/index.js} +9 -10
- package/Image/index.js +129 -0
- package/ImagePreview/index.js +481 -0
- package/{KeyValue.js → KeyValue/index.js} +11 -12
- package/LICENSE +21 -0
- package/Label/index.js +57 -0
- package/LinkButton/index.js +67 -0
- package/{Menu.js → Menu/index.js} +27 -28
- package/MobileNavigation/index.js +94 -0
- package/{MobilePopup.js → MobilePopup/index.js} +42 -41
- package/{Modal.js → Modal/index.js} +39 -40
- package/ModuleTitle/index.js +143 -0
- package/{NavigationMenu.js → NavigationMenu/index.js} +30 -29
- package/Notification/index.js +119 -0
- package/Option/index.js +184 -0
- package/Overlay/index.js +189 -0
- package/Overspread/index.js +289 -0
- package/{Pagination.js → Pagination/index.js} +35 -34
- package/Paper/index.js +96 -0
- package/{index-084588e9.js → Popover/index.js} +48 -58
- package/PopoverV2/index.js +18 -0
- package/{Portal.js → Portal/index.js} +7 -8
- package/{Products.js → Products/index.js} +20 -21
- package/Profile/index.js +585 -0
- package/Progress/index.js +199 -0
- package/{QRCode.js → QRCode/index.js} +4 -6
- package/{Radio.js → Radio/index.js} +25 -26
- package/{RadioGroup.js → RadioGroup/index.js} +17 -18
- package/{index-00fe8887.js → Range/index.js} +29 -32
- package/RichEditor/index.js +13 -0
- package/{RichEditor-98accead.js → RichEditor-8b0f7ccd.js} +18 -18
- package/{Scrollbar.js → Scrollbar/index.js} +15 -17
- package/{Search.js → Search/index.js} +25 -24
- package/SearchWithDropdown/index.js +138 -0
- package/Section/index.js +61 -0
- package/{SkeletonLoader.js → SkeletonLoader/index.js} +13 -14
- package/{Slider.js → Slider/index.js} +46 -43
- package/Status/index.js +103 -0
- package/Steps/index.js +313 -0
- package/{index-897d8240.js → SuggestionList/index.js} +15 -38
- package/{Switcher.js → Switcher/index.js} +30 -31
- package/Table/index.js +53 -0
- package/{TableCompositions.js → TableCompositions/index.js} +131 -168
- package/Tabs/index.js +235 -0
- package/Tag/index.js +102 -0
- package/{TextLink.js → TextLink/index.js} +3 -3
- package/{Textarea.js → Textarea/index.js} +66 -65
- package/{Time.js → Time/index.js} +13 -14
- package/TimePicker/index.js +555 -0
- package/Timeline/index.js +113 -0
- package/Title/index.js +65 -0
- package/{Toaster.js → Toaster/index.js} +19 -20
- package/{Tooltip.js → Tooltip/index.js} +27 -28
- package/{TransferList.js → TransferList/index.js} +44 -55
- package/{index-135b9d17.js → Uploader/index.js} +119 -116
- package/{ValidatableCheckbox.js → ValidatableCheckbox/index.js} +23 -24
- package/{ValidatableDatePicker.js → ValidatableDatePicker/index.js} +44 -42
- package/ValidatableDropdown/index.js +139 -0
- package/ValidatableElements/index.js +65 -0
- package/ValidatableMultiSelectDropdown/index.js +150 -0
- package/{ValidatableNumberInput.js → ValidatableNumberInput/index.js} +41 -33
- package/{ValidatableRadio.js → ValidatableRadio/index.js} +19 -20
- package/{ValidatableSwitcher.js → ValidatableSwitcher/index.js} +19 -20
- package/{ValidatableTextInput.js → ValidatableTextInput/index.js} +32 -31
- package/{ValidatableTimeInput.js → ValidatableTimeInput/index.js} +31 -30
- package/{ValidatableUploader.js → ValidatableUploader/index.js} +36 -34
- package/Widget/index.js +227 -0
- package/config-0ca92874.js +31 -0
- package/{configs-91c86664.js → configs-fed6ac34.js} +28 -1
- package/hooks/useBodyScroll.js +16 -0
- package/hooks/useClick.js +18 -0
- package/{useClickOutside-5183e396.js → hooks/useClickOutside.js} +1 -1
- package/hooks/useDebounceHook.js +16 -0
- package/{useDeviceType-dd51db38.js → hooks/useDeviceType.js} +4 -3
- package/hooks/useDidMount.js +15 -0
- package/{useEllipsisDetection-ef536015.js → hooks/useEllipsisDetection.js} +1 -1
- package/hooks/useForceUpdate.js +8 -0
- package/hooks/useImgDownload.js +18 -0
- package/{useKeyDown-38102ae7.js → hooks/useKeyDown.js} +1 -1
- package/hooks/useMount.js +13 -0
- package/hooks/useMutationObserver.js +21 -0
- package/hooks/usePrevious.js +10 -0
- package/hooks/useThrottle.js +16 -0
- package/hooks/useToggle.js +11 -0
- package/hooks/useUpdatableRef.js +14 -0
- package/hooks/useUpdate.js +10 -0
- package/{useWidth-9f4647f8.js → hooks/useWidth.js} +2 -2
- package/{useWindowSize-80369d76.js → hooks/useWindowSize.js} +1 -1
- package/{index-8c98317a.js → index-11eea761.js} +678 -752
- package/index-2ad83e03.js +4 -0
- package/index-34e47647.js +10054 -0
- package/index-45eafea6.js +90 -0
- package/{index-5e96cb4d.js → index-462461c0.js} +50 -48
- package/{index-ac59cb10.js → index-a0e4e333.js} +6 -6
- package/{index-e8776f3d.js → index-b1e429a7.js} +1 -1
- package/index.d.ts +115 -0
- package/index.js +137 -113
- package/index.mobile.d.ts +16 -0
- package/lib/atoms/Avatar/Avatar.d.ts +34 -0
- package/lib/atoms/Avatar/index.d.ts +1 -0
- package/lib/atoms/LinkButton/LinkButton.d.ts +46 -0
- package/lib/atoms/LinkButton/index.d.ts +1 -0
- package/{objectWithoutPropertiesLoose-299691d8.js → objectWithoutPropertiesLoose-d8a4a68c.js} +12 -12
- package/package.json +42 -22
- package/{rangeAndSlider-20599da4.js → rangeAndSlider-0301a458.js} +220 -375
- package/{react-beautiful-dnd.esm-38c37304.js → react-beautiful-dnd.esm-04c14563.js} +9 -9
- package/react-lifecycles-compat.es-6e1f3768.js +158 -0
- package/Alert.js +0 -98
- package/Avatar.js +0 -77
- package/Badge.js +0 -76
- package/BusyLoader.js +0 -69
- package/Button.js +0 -130
- package/Charts.js +0 -99
- package/ComboBox.js +0 -99
- package/Counter.js +0 -99
- package/DatePickerInput.js +0 -30
- package/Dropdown.js +0 -99
- package/Form.js +0 -116
- package/FormableCheckbox.js +0 -27
- package/FormableDatePicker.js +0 -39
- package/FormableDropdown.js +0 -105
- package/FormableEditor.js +0 -24
- package/FormableMultiSelectDropdown.js +0 -105
- package/FormableNumberInput.js +0 -31
- package/FormableRadio.js +0 -23
- package/FormableSwitcher.js +0 -23
- package/FormableTextInput.js +0 -31
- package/FormableUploader.js +0 -40
- package/GeneUIProvider.js +0 -256
- package/Holder.js +0 -99
- package/Image.js +0 -130
- package/ImagePreview.js +0 -99
- package/Label.js +0 -58
- package/LinkButton.js +0 -104
- package/MobileNavigation.js +0 -95
- package/ModuleTitle.js +0 -99
- package/Notification.js +0 -120
- package/Option.js +0 -186
- package/Overlay.js +0 -99
- package/Overspread.js +0 -343
- package/Paper.js +0 -97
- package/Popover.js +0 -20
- package/PopoverV2.js +0 -19
- package/Profile.js +0 -99
- package/Progress.js +0 -200
- package/Range.js +0 -14
- package/RichEditor.js +0 -13
- package/SearchWithDropdown.js +0 -195
- package/Section.js +0 -62
- package/Status.js +0 -104
- package/Steps.js +0 -312
- package/SuggestionList.js +0 -15
- package/Table.js +0 -102
- package/Tabs.js +0 -236
- package/Tag.js +0 -103
- package/TimePicker.js +0 -99
- package/Timeline.js +0 -114
- package/Title.js +0 -66
- package/Uploader.js +0 -32
- package/ValidatableDropdown.js +0 -99
- package/ValidatableElements.js +0 -99
- package/ValidatableMultiSelectDropdown.js +0 -99
- package/Widget.js +0 -99
- package/globalStyling-9c60a159.js +0 -4
- package/index-2030e31c.js +0 -4
- package/index-b7a33c58.js +0 -11
- package/index-e0af0caf.js +0 -1182
- package/useMount-6fef51a5.js +0 -9
package/Tabs.js
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
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=\"1.0.0\"] .tabs-holder{align-items:flex-start;display:flex;width:100%}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.reversed{flex-direction:row-reverse}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.horizontal{flex-direction:column}[data-gene-ui-version=\"1.0.0\"] .tabs-head{display:flex;flex-shrink:0;-webkit-user-select:none;user-select:none}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.horizontal>.tabs-head{width:100%}[data-gene-ui-version=\"1.0.0\"] .tabs-head>.tabs-wrapper{flex:auto}[data-gene-ui-version=\"1.0.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=\"1.0.0\"] .tabs-head>.tabs-actions>*{margin-inline-end:2rem}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.horizontal>.tabs-head>.tabs-wrapper{overflow-x:auto;width:100%}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.horizontal>.tabs-head>.tabs-wrapper::-webkit-scrollbar{display:none;height:0;width:0}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.horizontal>.tabs-head>.tabs-wrapper>.tabs-content.equal-tabs,[data-gene-ui-version=\"1.0.0\"] .tabs-holder.horizontal>.tabs-head>.tabs-wrapper>.tabs-content.type-basic{min-width:100%}[data-gene-ui-version=\"1.0.0\"] .tabs-content{display:inline-flex;font-weight:600;line-height:4.2rem;text-align:center;vertical-align:top}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content{flex-direction:column;text-align:start}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content .tab-icon{display:none}[data-gene-ui-version=\"1.0.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=\"1.0.0\"] .tabs-content>li .tab-icon{flex-shrink:0;margin-inline-end:1.4rem;margin-inline-start:-.4rem}[data-gene-ui-version=\"1.0.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=\"1.0.0\"] .tabs-holder.vertical:not(.reversed)>.tabs-head>.tabs-wrapper>.type-basic.tabs-content>li{justify-content:flex-end}[data-gene-ui-version=\"1.0.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=\"1.0.0\"] .tabs-content>li.disabled{opacity:.5}[data-gene-ui-version=\"1.0.0\"] .tabs-content>li.active,[data-gene-ui-version=\"1.0.0\"] .tabs-content>li.disabled{pointer-events:none}[data-gene-ui-version=\"1.0.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=\"1.0.0\"] .tabs-content>li .tab-close-button .icon{font-size:1.2rem}@media (hover:hover){[data-gene-ui-version=\"1.0.0\"] .tabs-content>li .tab-close-button:hover{background:var(--hero);color:var(--hero-sc)}}[data-gene-ui-version=\"1.0.0\"] .tabs-content.active .tab-close-button{background:rgba(var(--hero-rgb),.1);color:var(--hero)}@media (hover:hover){[data-gene-ui-version=\"1.0.0\"] .tabs-content.active .tab-close-button:hover{background:var(--hero);color:var(--hero-sc)}}[data-gene-ui-version=\"1.0.0\"] .tabs-content.equal-tabs>li{flex:1;min-width:12rem}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.equal-tabs>li{width:13rem}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.equal-tabs.type-text>li{width:12rem}[data-gene-ui-version=\"1.0.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=\"1.0.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=\"1.0.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=\"1.0.0\"] .tabs-content.type-basic>li{box-shadow:inset 0 0 0 var(--hero);flex:inherit}[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-basic>li.active{box-shadow:inset 0 -.4rem 0 0 var(--hero)}[data-gene-ui-version=\"1.0.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=\"1.0.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=\"1.0.0\"] .tabs-content.type-box>li{border:1px solid #0000;border-radius:1rem 1rem 0 0;line-height:4.1rem}[data-gene-ui-version=\"1.0.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=\"1.0.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=\"1.0.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-box>li+*{margin:.2rem 0 0}[data-gene-ui-version=\"1.0.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=\"1.0.0\"] .tabs-content.type-box>li:hover{border-color:rgba(var(--background-sc-rgb),.1)}}[data-gene-ui-version=\"1.0.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=\"1.0.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=\"1.0.0\"] .tabs-content.type-button{box-shadow:inset 0 0 0 1px rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-button:not(.equal-tabs)>li{padding:0 2rem}[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-button>li{box-shadow:inset 0 0 0 0 var(--hero)}[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-button>li.active{box-shadow:inset 0 0 0 1px var(--hero)}[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-text.equal-tabs>li{min-width:10rem}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-text.equal-tabs>li{min-width:12rem}[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-text>li{line-height:2.8rem;padding:0 1.5rem}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-text>li{padding:0 2rem}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.vertical>.tabs-head>.tabs-wrapper>.tabs-content.type-text>li+*{margin:1rem 0 0}[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-text>li.active{background:var(--hero);color:var(--hero-sc)}[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-box>li.active,[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-button>li.active{color:var(--hero)}[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-button,[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-button>li,[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-text,[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-text>li{border-radius:2rem}@media (hover:hover){[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-button>li:not(.active):hover,[data-gene-ui-version=\"1.0.0\"] .tabs-content.type-text>li:not(.active):hover{color:var(--hero)}}[data-gene-ui-version=\"1.0.0\"] .tabs-content-holder{width:100%}[data-gene-ui-version=\"1.0.0\"] .tabs-holder.vertical>.tabs-content-holder{flex:auto}[data-gene-ui-version=\"1.0.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=\"1.0.0\"] .tabs-holder.vertical>.tabs-content-holder.c-type-box{border-radius:1rem}[data-gene-ui-version=\"1.0.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=\"1.0.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=\"1.0.0\"] .external-link{align-items:center;display:flex;font-weight:600}[data-gene-ui-version=\"1.0.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
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
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=\"1.0.0\"] .static-title-holder{align-items:flex-start;display:inline-flex;flex-direction:column;max-width:100%;vertical-align:top}[data-gene-ui-version=\"1.0.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=\"1.0.0\"] .static-title-holder .st-c{max-width:100%}[data-gene-ui-version=\"1.0.0\"] .static-title-holder .st-c:nth-child(2){align-items:center;display:flex;min-height:3.2rem}[data-gene-ui-version=\"1.0.0\"] .static-title-holder.f-full-width,[data-gene-ui-version=\"1.0.0\"] .static-title-holder.f-full-width .st-c{width:100%}[data-gene-ui-version=\"1.0.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=\"1.0.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=\"1.0.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=\"1.0.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=\"1.0.0\"] .tag-c.f-compact{min-width:var(--size)}[data-gene-ui-version=\"1.0.0\"] .tag-c.f-compact.s-small{padding:0 .4rem}[data-gene-ui-version=\"1.0.0\"] .tag-c.f-compact.s-medium{padding:0 .5rem}[data-gene-ui-version=\"1.0.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=\"1.0.0\"] .tag-c.cr-full-radius{border-radius:1.4rem}[data-gene-ui-version=\"1.0.0\"] .tag-c.cr-smooth-radius{border-radius:.6rem}[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-simple{--color:var(--background-sc)}[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-simple .tag-backdrop:before{opacity:.1}[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-simple .tag-backdrop:after{content:none}[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-minimal .tag-backdrop{--color:var(--background-sc)}[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-minimal .tag-backdrop:before{opacity:.03}[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-minimal .tag-backdrop:after{opacity:.07}[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-outline .tag-backdrop:before{content:none}[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-colored .tag-backdrop:before{opacity:.1}[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-clean{--color:var(--background-sc)}@media (hover:hover){[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-clean:hover{--color:var(--hero)}}[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-clean .tag-backdrop:after,[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-clean .tag-backdrop:before{content:none}[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-light .tag-backdrop:before{opacity:.1}[data-gene-ui-version=\"1.0.0\"] .tag-c:not(.active).a-light .tag-backdrop:after{border:0}[data-gene-ui-version=\"1.0.0\"] .tag-c.active{color:var(--hero-sc)}@media (hover:hover){[data-gene-ui-version=\"1.0.0\"] .tag-c:hover .tag-backdrop{opacity:.6}}[data-gene-ui-version=\"1.0.0\"] .tag-c .icon,[data-gene-ui-version=\"1.0.0\"] .tag-c .tag-cc{position:relative;transition:opacity .3s;z-index:1}[data-gene-ui-version=\"1.0.0\"] .tag-c .icon{cursor:pointer;opacity:.5}@media (hover:hover){[data-gene-ui-version=\"1.0.0\"] .tag-c .icon:hover{opacity:1}[data-gene-ui-version=\"1.0.0\"] .tag-c .icon:hover~.tag-cp{opacity:.6}}[data-gene-ui-version=\"1.0.0\"] .tag-backdrop{border-radius:inherit;height:100%;left:0;position:absolute;top:0;transition:opacity .3s;width:100%}[data-gene-ui-version=\"1.0.0\"] .tag-backdrop:after,[data-gene-ui-version=\"1.0.0\"] .tag-backdrop:before{border-radius:inherit;content:\"\";display:block;height:100%;left:0;position:absolute;top:0;width:100%}[data-gene-ui-version=\"1.0.0\"] .tag-backdrop:before{background:var(--color);transition:background .3s,opacity .3s}[data-gene-ui-version=\"1.0.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/TimePicker.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import './_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import './index-e0af0caf.js';
|
|
4
|
-
import './index-6ff23041.js';
|
|
5
|
-
import './configs-91c86664.js';
|
|
6
|
-
import './index-ac59cb10.js';
|
|
7
|
-
import './useDeviceType-dd51db38.js';
|
|
8
|
-
import './Scrollbar.js';
|
|
9
|
-
import './index-084588e9.js';
|
|
10
|
-
import './Icon.js';
|
|
11
|
-
export { T as default } from './index-9164a86d.js';
|
|
12
|
-
import './Editor.js';
|
|
13
|
-
import './ValidatableUploader.js';
|
|
14
|
-
import './ValidatableRadio.js';
|
|
15
|
-
import './ValidatableCheckbox.js';
|
|
16
|
-
import './ValidatableSwitcher.js';
|
|
17
|
-
import './ValidatableNumberInput.js';
|
|
18
|
-
import './ValidatableTextInput.js';
|
|
19
|
-
import './ValidatableDatePicker.js';
|
|
20
|
-
import './ExtendedInput.js';
|
|
21
|
-
import './dateValidation-67caec66.js';
|
|
22
|
-
import './_commonjsHelpers-24198af3.js';
|
|
23
|
-
import 'react-dom';
|
|
24
|
-
import './useWindowSize-80369d76.js';
|
|
25
|
-
import './globalStyling-9c60a159.js';
|
|
26
|
-
import './style-inject.es-746bb8ed.js';
|
|
27
|
-
import './Popover-f4d1cac0.js';
|
|
28
|
-
import './index-122432cd.js';
|
|
29
|
-
import './GeneUIProvider.js';
|
|
30
|
-
import './Portal.js';
|
|
31
|
-
import './guid-8ddf77b3.js';
|
|
32
|
-
import './index-135b9d17.js';
|
|
33
|
-
import './Grid.js';
|
|
34
|
-
import './useWidth-9f4647f8.js';
|
|
35
|
-
import './Button.js';
|
|
36
|
-
import './useKeyDown-38102ae7.js';
|
|
37
|
-
import './BusyLoader.js';
|
|
38
|
-
import './Image.js';
|
|
39
|
-
import './Empty.js';
|
|
40
|
-
import './Tooltip.js';
|
|
41
|
-
import './Checkbox.js';
|
|
42
|
-
import './checkboxRadioSwitcher-5b69d7bd.js';
|
|
43
|
-
import './useEllipsisDetection-ef536015.js';
|
|
44
|
-
import './Switcher.js';
|
|
45
|
-
import './Tabs.js';
|
|
46
|
-
import './Steps.js';
|
|
47
|
-
import './debounce-4419bc2f.js';
|
|
48
|
-
import './Timeline.js';
|
|
49
|
-
import './RadioGroup.js';
|
|
50
|
-
import './Radio.js';
|
|
51
|
-
import './Card.js';
|
|
52
|
-
import './MobilePopup.js';
|
|
53
|
-
import './useClickOutside-5183e396.js';
|
|
54
|
-
import './Menu.js';
|
|
55
|
-
import './Option.js';
|
|
56
|
-
import './SkeletonLoader.js';
|
|
57
|
-
import './KeyValue.js';
|
|
58
|
-
import './configs.js';
|
|
59
|
-
import './Tag.js';
|
|
60
|
-
import './Alert.js';
|
|
61
|
-
import './index-00fe8887.js';
|
|
62
|
-
import './rangeAndSlider-20599da4.js';
|
|
63
|
-
import './Slider.js';
|
|
64
|
-
import './useMount-6fef51a5.js';
|
|
65
|
-
import './index-897d8240.js';
|
|
66
|
-
import './Pagination.js';
|
|
67
|
-
import './Divider.js';
|
|
68
|
-
import './objectWithoutPropertiesLoose-299691d8.js';
|
|
69
|
-
import './clsx.m-2bb6df4b.js';
|
|
70
|
-
import './index-0199942c.js';
|
|
71
|
-
import './index-5e96cb4d.js';
|
|
72
|
-
import './DatePicker.js';
|
|
73
|
-
import './localization-4ba17032.js';
|
|
74
|
-
import './index-2030e31c.js';
|
|
75
|
-
import './Notification.js';
|
|
76
|
-
import './Modal.js';
|
|
77
|
-
import './Collapse.js';
|
|
78
|
-
import './Status.js';
|
|
79
|
-
import './Avatar.js';
|
|
80
|
-
import './Search.js';
|
|
81
|
-
import './TextLink.js';
|
|
82
|
-
import './Label.js';
|
|
83
|
-
import './Paper.js';
|
|
84
|
-
import './Badge.js';
|
|
85
|
-
import './Time.js';
|
|
86
|
-
import './Title.js';
|
|
87
|
-
import './index-b7a33c58.js';
|
|
88
|
-
import './QRCode.js';
|
|
89
|
-
import './Progress.js';
|
|
90
|
-
import './MobileNavigation.js';
|
|
91
|
-
import './Products.js';
|
|
92
|
-
import './Breadcrumb.js';
|
|
93
|
-
import './Section.js';
|
|
94
|
-
import './ColorPicker.js';
|
|
95
|
-
import './NavigationMenu.js';
|
|
96
|
-
import './Textarea.js';
|
|
97
|
-
import './AdvancedSearch.js';
|
|
98
|
-
import './LinkButton.js';
|
|
99
|
-
import './checkTimeValidation-e56771be.js';
|
package/Timeline.js
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
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 { c as childrenOf } from './index-ac59cb10.js';
|
|
6
|
-
import Icon from './Icon.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
|
-
var css_248z$1 = "[data-gene-ui-version=\"1.0.0\"] .timeline-item{display:flex;font-weight:600;line-height:1.36}[data-gene-ui-version=\"1.0.0\"] .timeline-item.c-success{--hero:var(--confirm);--hero-hover:var(--confirm-hover);--hero-sc:var(--confirm-sc);--hero-rgb:var(--confirm-rgb);--hero-sc-rgb:var(--confirm-sc-rgb)}[data-gene-ui-version=\"1.0.0\"] .timeline-item.c-danger{--hero:var(--danger);--hero-hover:var(--danger-hover);--hero-sc:var(--danger-sc);--hero-rgb:var(--danger-rgb);--hero-sc-rgb:var(--danger-sc-rgb)}[data-gene-ui-version=\"1.0.0\"] .timeline-item:not(:last-child).with-line .t-line:before{background:rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"1.0.0\"] .timeline-item:not(:last-child) .t-texts{padding:0 0 2rem}[data-gene-ui-version=\"1.0.0\"] .timeline-item>li{display:flex}[data-gene-ui-version=\"1.0.0\"] .timeline-item.a-default .t-texts>*+*{margin:0 0 0 1rem}html[dir=rtl] .timeline-item.a-default .t-texts>*+*{margin:0 1rem 0 0}[data-gene-ui-version=\"1.0.0\"] .timeline-item.a-compact .t-texts{flex-direction:column}[data-gene-ui-version=\"1.0.0\"] .timeline-item.a-compact .t-texts>*+*{margin:.5rem 0 0}[data-gene-ui-version=\"1.0.0\"] .timeline-item .t-line{flex-shrink:0;position:relative}[data-gene-ui-version=\"1.0.0\"] .timeline-item .t-line:before{content:\"\";display:block;height:100%;margin:0 .5rem;width:1px}[data-gene-ui-version=\"1.0.0\"] .timeline-item .t-texts{flex:auto;margin:0 0 0 1.5rem}html[dir=rtl] .timeline-item .t-texts{margin:0 1.5rem 0 0}[data-gene-ui-version=\"1.0.0\"] .timeline-item .t-description{color:rgba(var(--background-sc-rgb),.6);font:600 1.2rem/1.8rem var(--font-family)}[data-gene-ui-version=\"1.0.0\"] .timeline-item .t-description,[data-gene-ui-version=\"1.0.0\"] .timeline-item .t-title{max-width:100%}[data-gene-ui-version=\"1.0.0\"] .timeline-item .icon{background:var(--background);border-radius:100%;color:var(--hero);left:50%;position:absolute;top:0;transform:translate3d(-50%,-.3rem,0)}[data-gene-ui-version=\"1.0.0\"] .timeline-item .t-icon{background:var(--background);border:.2rem solid var(--hero);border-radius:100%;box-shadow:0 0 0 .4rem var(--background);font-size:1.5rem;height:1.1rem;left:0;position:absolute;top:.4rem;width:1.1rem}[data-gene-ui-version=\"1.0.0\"] .timeline-item .t-icon.bc-icon-loader{top:.2rem}";
|
|
14
|
-
styleInject(css_248z$1);
|
|
15
|
-
|
|
16
|
-
const timelineColors = ['hero', 'success', 'danger'];
|
|
17
|
-
const timelineAppearances = ['default', 'compact'];
|
|
18
|
-
function TimelineItem(props) {
|
|
19
|
-
const {
|
|
20
|
-
icon,
|
|
21
|
-
title,
|
|
22
|
-
color,
|
|
23
|
-
withLine,
|
|
24
|
-
isLoading,
|
|
25
|
-
className,
|
|
26
|
-
appearance,
|
|
27
|
-
description,
|
|
28
|
-
...restProps
|
|
29
|
-
} = props;
|
|
30
|
-
return /*#__PURE__*/React__default.createElement("ul", _extends({
|
|
31
|
-
className: classnames('timeline-item', "a-".concat(appearance), "c-".concat(color), className, {
|
|
32
|
-
'with-line': withLine
|
|
33
|
-
})
|
|
34
|
-
}, restProps), /*#__PURE__*/React__default.createElement("li", {
|
|
35
|
-
className: "t-line"
|
|
36
|
-
}, isLoading ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
37
|
-
type: "bc-icon-loader"
|
|
38
|
-
}) : icon ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
39
|
-
type: icon
|
|
40
|
-
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
41
|
-
className: "t-icon"
|
|
42
|
-
})), /*#__PURE__*/React__default.createElement("li", {
|
|
43
|
-
className: "t-texts"
|
|
44
|
-
}, !!title && /*#__PURE__*/React__default.createElement("div", {
|
|
45
|
-
className: "t-title"
|
|
46
|
-
}, title), !!description && /*#__PURE__*/React__default.createElement("div", {
|
|
47
|
-
className: "t-description"
|
|
48
|
-
}, description)));
|
|
49
|
-
}
|
|
50
|
-
TimelineItem.propTypes = {
|
|
51
|
-
/**
|
|
52
|
-
* Is loading state.
|
|
53
|
-
*/
|
|
54
|
-
isLoading: propTypesExports.bool,
|
|
55
|
-
/**
|
|
56
|
-
* Title for item
|
|
57
|
-
*/
|
|
58
|
-
title: propTypesExports.string,
|
|
59
|
-
/**
|
|
60
|
-
* Icon for item
|
|
61
|
-
*/
|
|
62
|
-
icon: propTypesExports.string,
|
|
63
|
-
/**
|
|
64
|
-
* Render line between items
|
|
65
|
-
*/
|
|
66
|
-
withLine: propTypesExports.bool,
|
|
67
|
-
/**
|
|
68
|
-
* Description fot item
|
|
69
|
-
*/
|
|
70
|
-
description: propTypesExports.string,
|
|
71
|
-
/**
|
|
72
|
-
* External/Additional className
|
|
73
|
-
*/
|
|
74
|
-
className: propTypesExports.string,
|
|
75
|
-
/**
|
|
76
|
-
* Different colors for items
|
|
77
|
-
*/
|
|
78
|
-
color: propTypesExports.oneOf(timelineColors),
|
|
79
|
-
/**
|
|
80
|
-
* Any valid React node.
|
|
81
|
-
*/
|
|
82
|
-
appearance: propTypesExports.oneOf(timelineAppearances)
|
|
83
|
-
};
|
|
84
|
-
TimelineItem.defaultProps = {
|
|
85
|
-
color: timelineColors[0],
|
|
86
|
-
withLine: true,
|
|
87
|
-
appearance: timelineAppearances[0]
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
var css_248z = "[data-gene-ui-version=\"1.0.0\"] .timeline-holder{display:flex;flex-direction:column}";
|
|
91
|
-
styleInject(css_248z);
|
|
92
|
-
|
|
93
|
-
function Timeline(props) {
|
|
94
|
-
const {
|
|
95
|
-
children,
|
|
96
|
-
className,
|
|
97
|
-
...restProps
|
|
98
|
-
} = props;
|
|
99
|
-
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
100
|
-
className: classnames('timeline-holder', className)
|
|
101
|
-
}, restProps), children);
|
|
102
|
-
}
|
|
103
|
-
Timeline.propTypes = {
|
|
104
|
-
/**
|
|
105
|
-
* External/Additional className
|
|
106
|
-
*/
|
|
107
|
-
className: propTypesExports.string,
|
|
108
|
-
/**
|
|
109
|
-
* Any valid React node.
|
|
110
|
-
*/
|
|
111
|
-
children: childrenOf([TimelineItem])
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
export { Timeline, TimelineItem, timelineAppearances, timelineColors };
|
package/Title.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
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 { b as titleConfig } from './configs-91c86664.js';
|
|
6
|
-
import Icon from './Icon.js';
|
|
7
|
-
import './globalStyling-9c60a159.js';
|
|
8
|
-
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
9
|
-
|
|
10
|
-
var css_248z = "[data-gene-ui-version=\"1.0.0\"] .title-holder{align-items:center;display:flex;font:600 1.4rem/1.8rem var(--font-family);min-height:3.2rem;width:100%}[data-gene-ui-version=\"1.0.0\"] .title-holder.c-hero .title-text{color:var(--hero)}[data-gene-ui-version=\"1.0.0\"] .title-holder>li{align-items:center;display:flex;flex-shrink:0}[data-gene-ui-version=\"1.0.0\"] .title-holder>li.line{flex:auto}[data-gene-ui-version=\"1.0.0\"] .title-holder>li.line i{background:rgba(var(--background-sc-rgb),.1);display:block;height:1px;width:100%}[data-gene-ui-version=\"1.0.0\"] .title-holder>li~li{margin:0 0 0 1rem}html[dir=rtl] .title-holder>li~li{margin:0 1rem 0 0}[data-gene-ui-version=\"1.0.0\"] .title-holder .divider{margin:0 1rem}";
|
|
11
|
-
styleInject(css_248z);
|
|
12
|
-
|
|
13
|
-
function Title(_ref) {
|
|
14
|
-
let {
|
|
15
|
-
icon,
|
|
16
|
-
text,
|
|
17
|
-
actions,
|
|
18
|
-
color,
|
|
19
|
-
withLine,
|
|
20
|
-
className,
|
|
21
|
-
...restProps
|
|
22
|
-
} = _ref;
|
|
23
|
-
return /*#__PURE__*/React__default.createElement("ul", _extends({
|
|
24
|
-
className: classnames('title-holder', "c-".concat(color), className)
|
|
25
|
-
}, restProps), icon && /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
26
|
-
type: icon
|
|
27
|
-
})), /*#__PURE__*/React__default.createElement("li", {
|
|
28
|
-
className: "title-text"
|
|
29
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
30
|
-
className: "ellipsis-text"
|
|
31
|
-
}, text)), /*#__PURE__*/React__default.createElement("li", {
|
|
32
|
-
className: "line"
|
|
33
|
-
}, withLine && /*#__PURE__*/React__default.createElement("i", null)), actions && /*#__PURE__*/React__default.createElement("li", null, actions));
|
|
34
|
-
}
|
|
35
|
-
Title.propTypes = {
|
|
36
|
-
/**
|
|
37
|
-
* Display an icon. Values are the same as "Icon" atoms type prop
|
|
38
|
-
*/
|
|
39
|
-
icon: propTypesExports.string,
|
|
40
|
-
/**
|
|
41
|
-
* Text/Component to be displayed. Any valid React node
|
|
42
|
-
*/
|
|
43
|
-
text: propTypesExports.node.isRequired,
|
|
44
|
-
/**
|
|
45
|
-
* Actions to be displayed. Any valid React node
|
|
46
|
-
*/
|
|
47
|
-
actions: propTypesExports.node,
|
|
48
|
-
/**
|
|
49
|
-
* Title color
|
|
50
|
-
*/
|
|
51
|
-
color: propTypesExports.oneOf(titleConfig.color),
|
|
52
|
-
/**
|
|
53
|
-
* Displays a divider line
|
|
54
|
-
*/
|
|
55
|
-
withLine: propTypesExports.bool,
|
|
56
|
-
/**
|
|
57
|
-
* Additional className
|
|
58
|
-
*/
|
|
59
|
-
className: propTypesExports.string
|
|
60
|
-
};
|
|
61
|
-
Title.defaultProps = {
|
|
62
|
-
color: titleConfig.color[1],
|
|
63
|
-
withLine: false
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export { Title as default };
|