@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
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default, { forwardRef, useState, useCallback, useEffect } from 'react';
|
|
3
|
+
import { p as propTypesExports } from './index-e0af0caf.js';
|
|
4
|
+
import { d as dayjsWithPlugins } from './dateValidation-67caec66.js';
|
|
5
|
+
import { g as getBrowserDateFormat } from './localization-4ba17032.js';
|
|
6
|
+
import { c as checkTimeValidation } from './checkTimeValidation-e56771be.js';
|
|
7
|
+
import 'react-dom';
|
|
8
|
+
import ExtendedInput from './ExtendedInput.js';
|
|
9
|
+
import './_commonjsHelpers-24198af3.js';
|
|
10
|
+
import './index-6ff23041.js';
|
|
11
|
+
import './configs-91c86664.js';
|
|
12
|
+
import './index-ac59cb10.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 './globalStyling-9c60a159.js';
|
|
20
|
+
import './style-inject.es-746bb8ed.js';
|
|
21
|
+
import './Icon.js';
|
|
22
|
+
import './Tooltip.js';
|
|
23
|
+
import './Popover-f4d1cac0.js';
|
|
24
|
+
import './GeneUIProvider.js';
|
|
25
|
+
|
|
26
|
+
const nonLettersRegex = /[\W_]+/g;
|
|
27
|
+
const getFormatSeparator = format => format[format.search(nonLettersRegex)];
|
|
28
|
+
const isUpperCase = str => str === str.toUpperCase();
|
|
29
|
+
const isLowerCase = str => str === str.toLowerCase();
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* Splitting time to { format, value } object
|
|
33
|
+
* For checking is value fit format
|
|
34
|
+
* Formats are taken from day.js date formats list
|
|
35
|
+
* */
|
|
36
|
+
function splitTimeToObjects(dateParts, formatParts, meridiemValue, meridiemFormat) {
|
|
37
|
+
const hourFormats = ['H', 'HH', 'h', 'hh'];
|
|
38
|
+
const minuteFormats = ['m', 'mm'];
|
|
39
|
+
const secondFormats = ['s', 'ss'];
|
|
40
|
+
const hour = {};
|
|
41
|
+
const minute = {};
|
|
42
|
+
const second = {};
|
|
43
|
+
const meridiem = {};
|
|
44
|
+
formatParts.forEach((item, index) => {
|
|
45
|
+
if (hourFormats.includes(item)) {
|
|
46
|
+
hour.value = dateParts[index];
|
|
47
|
+
hour.format = item;
|
|
48
|
+
} else if (minuteFormats.includes(item)) {
|
|
49
|
+
minute.value = dateParts[index];
|
|
50
|
+
minute.format = item;
|
|
51
|
+
} else if (secondFormats.includes(item)) {
|
|
52
|
+
second.value = dateParts[index];
|
|
53
|
+
second.format = item;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
if (meridiemFormat || meridiemValue) {
|
|
57
|
+
meridiem.value = meridiemValue;
|
|
58
|
+
meridiem.format = meridiemFormat;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
hour,
|
|
62
|
+
minute,
|
|
63
|
+
second,
|
|
64
|
+
meridiem
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const isHourInRightFormat = _ref => {
|
|
68
|
+
let {
|
|
69
|
+
value,
|
|
70
|
+
format
|
|
71
|
+
} = _ref;
|
|
72
|
+
return value && (format === 'H' && value.length <= 2 && Number(value[0]) !== 0 || format === 'h' && value.length <= 2 && Number(value[0]) !== 0 || format === 'HH' && value.length === 2 || format === 'hh' && value.length === 2);
|
|
73
|
+
};
|
|
74
|
+
const isMinuteInRightFormat = _ref2 => {
|
|
75
|
+
let {
|
|
76
|
+
value,
|
|
77
|
+
format
|
|
78
|
+
} = _ref2;
|
|
79
|
+
return value && (format === 'm' && value.length <= 2 && (value.length !== 2 || Number(value[0]) !== 0) || format === 'mm' && value.length === 2);
|
|
80
|
+
};
|
|
81
|
+
const isSecondInRightFormat = _ref3 => {
|
|
82
|
+
let {
|
|
83
|
+
value,
|
|
84
|
+
format
|
|
85
|
+
} = _ref3;
|
|
86
|
+
return !format || value && (format === 's' && value.length <= 2 && (value.length !== 2 || Number(value[0]) !== 0) || format === 'ss' && value.length === 2);
|
|
87
|
+
};
|
|
88
|
+
const isMeridiemInRightFormat = _ref4 => {
|
|
89
|
+
let {
|
|
90
|
+
value,
|
|
91
|
+
format
|
|
92
|
+
} = _ref4;
|
|
93
|
+
return !(format || value) || value && (format === 'A' && isUpperCase(value) || format === 'a' && isLowerCase(value));
|
|
94
|
+
};
|
|
95
|
+
const checkTimeFormat = _ref5 => {
|
|
96
|
+
let {
|
|
97
|
+
hour,
|
|
98
|
+
minute,
|
|
99
|
+
second,
|
|
100
|
+
meridiem
|
|
101
|
+
} = _ref5;
|
|
102
|
+
return isHourInRightFormat(hour) && isMinuteInRightFormat(minute) && isSecondInRightFormat(second) && isMeridiemInRightFormat(meridiem);
|
|
103
|
+
};
|
|
104
|
+
function validateField() {
|
|
105
|
+
let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
106
|
+
let required = arguments.length > 1 ? arguments[1] : undefined;
|
|
107
|
+
let customValidation = arguments.length > 2 ? arguments[2] : undefined;
|
|
108
|
+
let min = arguments.length > 3 ? arguments[3] : undefined;
|
|
109
|
+
let max = arguments.length > 4 ? arguments[4] : undefined;
|
|
110
|
+
let format = arguments.length > 5 ? arguments[5] : undefined;
|
|
111
|
+
const date = dayjsWithPlugins(value, format);
|
|
112
|
+
const separator = getFormatSeparator(format);
|
|
113
|
+
const splittedDate = value.split(' ');
|
|
114
|
+
const splittedFormat = format.split(' ');
|
|
115
|
+
const dateParts = splittedDate[0].split(separator);
|
|
116
|
+
const formatParts = splittedFormat[0].split(separator);
|
|
117
|
+
const timeObject = splitTimeToObjects(dateParts, formatParts, splittedDate[1], splittedFormat[1]);
|
|
118
|
+
const isValidFormat = checkTimeFormat(timeObject);
|
|
119
|
+
const isValidDate = checkTimeValidation(timeObject);
|
|
120
|
+
const isSameLength = dateParts.length === formatParts.length;
|
|
121
|
+
const isBefore = !max || date.isBefore(dayjsWithPlugins(max, format));
|
|
122
|
+
const isAfter = !min || date.isAfter(dayjsWithPlugins(min, format));
|
|
123
|
+
return (!customValidation || customValidation(value)) && (!required || value.length) && (!required && !value.length || isValidDate && isSameLength && isValidFormat && isBefore && isAfter);
|
|
124
|
+
}
|
|
125
|
+
const DateInput = /*#__PURE__*/forwardRef((_ref6, ref) => {
|
|
126
|
+
let {
|
|
127
|
+
onChange,
|
|
128
|
+
value,
|
|
129
|
+
customValidation,
|
|
130
|
+
required,
|
|
131
|
+
getInitialState,
|
|
132
|
+
min,
|
|
133
|
+
max,
|
|
134
|
+
format,
|
|
135
|
+
...restProps
|
|
136
|
+
} = _ref6;
|
|
137
|
+
const [isValid, setValidation] = useState(() => validateField(value, required, customValidation, min, max, format));
|
|
138
|
+
const handleChange = useCallback(e => {
|
|
139
|
+
const {
|
|
140
|
+
value
|
|
141
|
+
} = e.target;
|
|
142
|
+
const isValid = validateField(value, required, customValidation, min, max, format);
|
|
143
|
+
setValidation(isValid);
|
|
144
|
+
onChange && onChange(e, isValid);
|
|
145
|
+
}, [onChange, required, customValidation, min, max, format]);
|
|
146
|
+
useEffect(() => {
|
|
147
|
+
getInitialState && getInitialState(isValid);
|
|
148
|
+
}, [getInitialState, isValid]);
|
|
149
|
+
useEffect(() => setValidation(validateField(value, required, customValidation, min, max, format)), [required, min, max, format, value, customValidation]);
|
|
150
|
+
return /*#__PURE__*/React__default.createElement(ExtendedInput, _extends({
|
|
151
|
+
ref: ref,
|
|
152
|
+
value: value,
|
|
153
|
+
isValid: isValid,
|
|
154
|
+
onChange: handleChange
|
|
155
|
+
}, restProps));
|
|
156
|
+
});
|
|
157
|
+
DateInput.propTypes = {
|
|
158
|
+
value: propTypesExports.string,
|
|
159
|
+
onChange: propTypesExports.func,
|
|
160
|
+
required: propTypesExports.bool,
|
|
161
|
+
getInitialState: propTypesExports.func,
|
|
162
|
+
customValidation: propTypesExports.func,
|
|
163
|
+
min: propTypesExports.string,
|
|
164
|
+
max: propTypesExports.string,
|
|
165
|
+
format: propTypesExports.string
|
|
166
|
+
};
|
|
167
|
+
DateInput.defaultProps = {
|
|
168
|
+
format: getBrowserDateFormat()
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export { DateInput as default };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default, { forwardRef, useState, useCallback, useEffect } from 'react';
|
|
3
|
+
import { p as propTypesExports } from './index-e0af0caf.js';
|
|
4
|
+
import { u as useMount } from './useMount-6fef51a5.js';
|
|
5
|
+
import './configs-91c86664.js';
|
|
6
|
+
import { U as Uploader } from './index-d9e8a888.js';
|
|
7
|
+
import './index-ac59cb10.js';
|
|
8
|
+
import './dateValidation-67caec66.js';
|
|
9
|
+
import './_commonjsHelpers-24198af3.js';
|
|
10
|
+
import 'react-dom';
|
|
11
|
+
import './index-6ff23041.js';
|
|
12
|
+
import './Grid.js';
|
|
13
|
+
import './useWidth-9f4647f8.js';
|
|
14
|
+
import './useWindowSize-80369d76.js';
|
|
15
|
+
import './style-inject.es-746bb8ed.js';
|
|
16
|
+
import './Button.js';
|
|
17
|
+
import './Icon.js';
|
|
18
|
+
import './globalStyling-9c60a159.js';
|
|
19
|
+
import './useKeyDown-38102ae7.js';
|
|
20
|
+
import './BusyLoader.js';
|
|
21
|
+
import './Image.js';
|
|
22
|
+
import './Empty.js';
|
|
23
|
+
import './Tooltip.js';
|
|
24
|
+
import './Popover-f4d1cac0.js';
|
|
25
|
+
import './useDeviceType-dd51db38.js';
|
|
26
|
+
import './GeneUIProvider.js';
|
|
27
|
+
import './Checkbox.js';
|
|
28
|
+
import './checkboxRadioSwitcher-5b69d7bd.js';
|
|
29
|
+
import './guid-8ddf77b3.js';
|
|
30
|
+
import './ExtendedInput.js';
|
|
31
|
+
import './index-5cea9a7d.js';
|
|
32
|
+
import './useClickOutside-5183e396.js';
|
|
33
|
+
import './Scrollbar.js';
|
|
34
|
+
|
|
35
|
+
function checkValidation(required, isValid) {
|
|
36
|
+
let value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
37
|
+
if (isValid === false) return {
|
|
38
|
+
key: 'customValidation',
|
|
39
|
+
isValid: false
|
|
40
|
+
};
|
|
41
|
+
if (required && value.length === 0) return {
|
|
42
|
+
key: 'required',
|
|
43
|
+
isValid: false
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
key: null,
|
|
47
|
+
isValid: true
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
const UploaderField = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
51
|
+
let {
|
|
52
|
+
customValidation,
|
|
53
|
+
onChange,
|
|
54
|
+
required,
|
|
55
|
+
forceAllowValidation,
|
|
56
|
+
isValid,
|
|
57
|
+
value,
|
|
58
|
+
defaultValue,
|
|
59
|
+
...restProps
|
|
60
|
+
} = _ref;
|
|
61
|
+
const [validationState, setValidationState] = useState(true);
|
|
62
|
+
const [allowValidation, setAllowValidation] = useState(false);
|
|
63
|
+
const validate = useCallback(defaultValue => checkValidation(required, isValid, value || defaultValue).isValid, [value, required, isValid, defaultValue]);
|
|
64
|
+
const handleChange = useCallback(e => {
|
|
65
|
+
const {
|
|
66
|
+
value
|
|
67
|
+
} = e;
|
|
68
|
+
const isValid = checkValidation(required, isValid, value);
|
|
69
|
+
setValidationState(isValid);
|
|
70
|
+
onChange && onChange(e, isValid);
|
|
71
|
+
}, [onChange, isValid, required, customValidation]);
|
|
72
|
+
|
|
73
|
+
// set Allow validation true if submit button clicked
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
forceAllowValidation && setAllowValidation(true);
|
|
76
|
+
}, [forceAllowValidation]);
|
|
77
|
+
useMount(() => setValidationState(validate(defaultValue)));
|
|
78
|
+
return /*#__PURE__*/React__default.createElement(Uploader, _extends({
|
|
79
|
+
ref: ref,
|
|
80
|
+
isValid: !allowValidation || validationState,
|
|
81
|
+
onChange: handleChange,
|
|
82
|
+
required: required
|
|
83
|
+
}, restProps));
|
|
84
|
+
});
|
|
85
|
+
UploaderField.propTypes = {
|
|
86
|
+
onChange: propTypesExports.func,
|
|
87
|
+
customValidation: propTypesExports.func,
|
|
88
|
+
/**
|
|
89
|
+
* Additional validation state
|
|
90
|
+
*/
|
|
91
|
+
isValid: propTypesExports.bool
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export { UploaderField as default };
|
package/Widget.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
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 './Icon.js';
|
|
7
|
+
import './KeyValue.js';
|
|
8
|
+
export { W as default } from './index-0cf65939.js';
|
|
9
|
+
import './globalStyling-9c60a159.js';
|
|
10
|
+
import './style-inject.es-746bb8ed.js';
|
|
11
|
+
import './configs.js';
|
|
12
|
+
import './Editor.js';
|
|
13
|
+
import './_commonjsHelpers-24198af3.js';
|
|
14
|
+
import 'react-dom';
|
|
15
|
+
import './index-ac59cb10.js';
|
|
16
|
+
import './dateValidation-67caec66.js';
|
|
17
|
+
import './useMount-6fef51a5.js';
|
|
18
|
+
import './useDeviceType-dd51db38.js';
|
|
19
|
+
import './useWindowSize-80369d76.js';
|
|
20
|
+
import './Button.js';
|
|
21
|
+
import './ValidatableUploader.js';
|
|
22
|
+
import './index-d9e8a888.js';
|
|
23
|
+
import './Grid.js';
|
|
24
|
+
import './useWidth-9f4647f8.js';
|
|
25
|
+
import './useKeyDown-38102ae7.js';
|
|
26
|
+
import './BusyLoader.js';
|
|
27
|
+
import './Image.js';
|
|
28
|
+
import './Empty.js';
|
|
29
|
+
import './Tooltip.js';
|
|
30
|
+
import './Popover-f4d1cac0.js';
|
|
31
|
+
import './GeneUIProvider.js';
|
|
32
|
+
import './Checkbox.js';
|
|
33
|
+
import './checkboxRadioSwitcher-5b69d7bd.js';
|
|
34
|
+
import './guid-8ddf77b3.js';
|
|
35
|
+
import './ExtendedInput.js';
|
|
36
|
+
import './index-5cea9a7d.js';
|
|
37
|
+
import './useClickOutside-5183e396.js';
|
|
38
|
+
import './Scrollbar.js';
|
|
39
|
+
import './ValidatableRadio.js';
|
|
40
|
+
import './RadioGroup.js';
|
|
41
|
+
import './Radio.js';
|
|
42
|
+
import './ValidatableCheckbox.js';
|
|
43
|
+
import './ValidatableSwitcher.js';
|
|
44
|
+
import './Switcher.js';
|
|
45
|
+
import './ValidatableNumberInput.js';
|
|
46
|
+
import './ValidatableTextInput.js';
|
|
47
|
+
import './ValidatableDatePicker.js';
|
|
48
|
+
import './index-5e722d91.js';
|
|
49
|
+
import './index-702bf24a.js';
|
|
50
|
+
import './index-122432cd.js';
|
|
51
|
+
import './debounce-4419bc2f.js';
|
|
52
|
+
import './DatePicker.js';
|
|
53
|
+
import './localization-4ba17032.js';
|
|
54
|
+
import './checkTimeValidation-e56771be.js';
|
|
55
|
+
import './useEllipsisDetection-ef536015.js';
|
|
56
|
+
import './Tabs.js';
|
|
57
|
+
import './Steps.js';
|
|
58
|
+
import './index-a4635754.js';
|
|
59
|
+
import './Portal.js';
|
|
60
|
+
import './Timeline.js';
|
|
61
|
+
import './Card.js';
|
|
62
|
+
import './MobilePopup.js';
|
|
63
|
+
import './Menu.js';
|
|
64
|
+
import './Option.js';
|
|
65
|
+
import './SkeletonLoader.js';
|
|
66
|
+
import './Tag.js';
|
|
67
|
+
import './Alert.js';
|
|
68
|
+
import './index-00fe8887.js';
|
|
69
|
+
import './rangeAndSlider-20599da4.js';
|
|
70
|
+
import './Slider.js';
|
|
71
|
+
import './Pagination.js';
|
|
72
|
+
import './Divider.js';
|
|
73
|
+
import './objectWithoutPropertiesLoose-299691d8.js';
|
|
74
|
+
import './clsx.m-2bb6df4b.js';
|
|
75
|
+
import './index-a59530cd.js';
|
|
76
|
+
import './Notification.js';
|
|
77
|
+
import './Modal.js';
|
|
78
|
+
import './Collapse.js';
|
|
79
|
+
import './Status.js';
|
|
80
|
+
import './Avatar.js';
|
|
81
|
+
import './Search.js';
|
|
82
|
+
import './TextLink.js';
|
|
83
|
+
import './Label.js';
|
|
84
|
+
import './Paper.js';
|
|
85
|
+
import './Badge.js';
|
|
86
|
+
import './Time.js';
|
|
87
|
+
import './Title.js';
|
|
88
|
+
import './index-b7a33c58.js';
|
|
89
|
+
import './QRCode.js';
|
|
90
|
+
import './Progress.js';
|
|
91
|
+
import './MobileNavigation.js';
|
|
92
|
+
import './Products.js';
|
|
93
|
+
import './Breadcrumb.js';
|
|
94
|
+
import './Section.js';
|
|
95
|
+
import './ColorPicker.js';
|
|
96
|
+
import './NavigationMenu.js';
|
|
97
|
+
import './Textarea.js';
|
|
98
|
+
import './AdvancedSearch.js';
|
|
99
|
+
import './LinkButton.js';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
|
+
|
|
3
|
+
function getDefaultExportFromCjs (x) {
|
|
4
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function getAugmentedNamespace(n) {
|
|
8
|
+
if (n.__esModule) return n;
|
|
9
|
+
var f = n.default;
|
|
10
|
+
if (typeof f == "function") {
|
|
11
|
+
var a = function a () {
|
|
12
|
+
if (this instanceof a) {
|
|
13
|
+
var args = [null];
|
|
14
|
+
args.push.apply(args, arguments);
|
|
15
|
+
var Ctor = Function.bind.apply(f, args);
|
|
16
|
+
return new Ctor();
|
|
17
|
+
}
|
|
18
|
+
return f.apply(this, arguments);
|
|
19
|
+
};
|
|
20
|
+
a.prototype = f.prototype;
|
|
21
|
+
} else a = {};
|
|
22
|
+
Object.defineProperty(a, '__esModule', {value: true});
|
|
23
|
+
Object.keys(n).forEach(function (k) {
|
|
24
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
25
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return n[k];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
return a;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { getAugmentedNamespace as a, commonjsGlobal as c, getDefaultExportFromCjs as g };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function _extends() {
|
|
2
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
3
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
4
|
+
var source = arguments[i];
|
|
5
|
+
for (var key in source) {
|
|
6
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7
|
+
target[key] = source[key];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return target;
|
|
12
|
+
};
|
|
13
|
+
return _extends.apply(this, arguments);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { _extends as _ };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const meridiemValues = ['am', 'pm'];
|
|
2
|
+
const checkTimeValidation = _ref => {
|
|
3
|
+
let {
|
|
4
|
+
hour,
|
|
5
|
+
minute,
|
|
6
|
+
second,
|
|
7
|
+
meridiem
|
|
8
|
+
} = _ref;
|
|
9
|
+
const isHourValid = !hour.format || (meridiem ? hour.value < 12 : hour.value < 24);
|
|
10
|
+
const isMinuteValid = !minute.format || minute.value >= 0 && minute.value < 60;
|
|
11
|
+
const isSecondValid = !second.format || second.value >= 0 && second.value < 60;
|
|
12
|
+
const isMeridiemValid = !meridiem || !meridiem.format || !meridiem.value || meridiemValues.includes(meridiem.value.toLowerCase());
|
|
13
|
+
return isHourValid && isMinuteValid && isSecondValid && isMeridiemValid;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { checkTimeValidation as c };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".information-message{cursor:default;font:600 1.2rem/1.42 var(--font-family);margin:.6rem 0 0;padding:0 var(--input-message-padding-side);width:100%}.information-message:empty{display:none}.input-description{cursor:default;font:600 1.4rem/2rem var(--font-family);margin:1rem 0 0;max-width:100%;opacity:.7}.input-structure~.input-description{padding:0 1rem}.crs-holder{align-items:flex-start;display:inline-flex;flex-direction:column;font:600 1.4rem/1.8rem var(--font-family);max-width:100%;transition:opacity .3s;-webkit-user-select:none;user-select:none}.crs-holder.disabled{opacity:.5;pointer-events:none}.crs-holder.read-only .label-holder div label{cursor:default}.crs-holder.read-only:active{pointer-events:none}.crs-holder .label-holder{grid-row-gap:.8rem;align-items:center;display:inline-grid;grid-template-columns:auto 1fr;max-width:100%;vertical-align:top}.crs-holder .label-holder.has-label{grid-column-gap:var(--crs-grid-column-gap,1rem)}.lp-bottom.crs-holder .label-holder,.lp-top.crs-holder .label-holder{grid-template-columns:auto;grid-template-rows:auto auto}.lp-bottom.crs-holder .label-holder .crs-component,.lp-right.crs-holder .label-holder .crs-component{order:0}.lp-bottom.crs-holder .label-holder .crs-label,.lp-right.crs-holder .label-holder .crs-label{order:1}.la-start.crs-holder .label-holder .crs-item{align-items:flex-start;justify-content:flex-start;text-align:start}.la-center.crs-holder .label-holder .crs-item{align-items:center;justify-content:center;text-align:center}.la-end.crs-holder .label-holder .crs-item{align-items:flex-end;justify-content:flex-end;text-align:end}.crs-holder.la-start{align-items:flex-start}.crs-holder.la-center{align-items:center}.crs-holder.la-end,.crs-holder.lp-left{align-items:flex-end}.popover-content .crs-holder .label-holder,.popover-positioner.mobile-view .crs-holder{width:100%}.crs-component{position:relative}.crs-component input{left:0;opacity:0;pointer-events:none;position:absolute;top:0}.crs-label{overflow:hidden}.crs-label label{cursor:pointer;display:block}.crs-item{display:flex}.cr-element{--size:1.6rem;background:var(--background);border:1px solid rgba(var(--background-sc-rgb),.45);color:var(--hero-sc);cursor:pointer;display:block;height:var(--size);position:relative;transition:color .4s,border-color .4s,background .4s,width .4s,height .4s;width:var(--size)}.cr-element:after,.cr-element:before{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;transform:scale(0);transition:transform .4s,background .4s}@media (hover:hover){.cr-element:hover,.crs-external-active:active .cr-element,.crs-external-hover:hover .cr-element,.crs-holder:focus-within .cr-element,.crs-label:hover~.crs-component .cr-element,label:hover .cr-element{border-color:var(--hero)}}.cr-element.active:before{transform:scale(1)}.cr-element.checkbox{border-radius:.3rem}.cr-element.checkbox:before{content:\"\\e911\"}.cr-element.checkbox:after{content:\"\\e913\"}.cr-element.checkbox:after,.cr-element.checkbox:before{font:calc(var(--size) - .2rem)/1 betcore}.cr-element.checkbox.active,.cr-element.checkbox.indeterminate{background:var(--hero);border-color:var(--hero)}.cr-element.checkbox.indeterminate:after{transform:scale(1)}.crs-holder.read-only .cr-element.checkbox{background:none;border-color:#0000;color:var(--hero)}.crs-holder.read-only .cr-element.checkbox.active:before{transform:scale(1.4)}.crs-holder.read-only .cr-element.checkbox:not(.active,.indeterminate){color:rgba(var(--background-sc-rgb),.38)}.crs-holder.read-only .cr-element.checkbox:not(.active,.indeterminate):after{content:\"\\e916\";transform:scale(1.3)}.cr-element.s-big{--size:2rem}.cr-element.radio{border-radius:100%}.view-normal .cr-element.radio{--size:12px}.view-normal .cr-element.radio:before{--gap:2px}.view-small .cr-element.radio{--size:10px}.view-small .cr-element.radio:before{--gap:2px}.cr-element.radio:before{--gap:0.3rem;background:var(--hero);border-radius:100%;bottom:var(--gap);content:\"\";left:var(--gap);right:var(--gap);top:var(--gap)}.cr-element.radio.active{border-color:var(--hero)}.crs-holder.read-only .cr-element.radio{background:rgba(var(--background-sc-rgb),.45);border-color:#0000}.crs-holder.read-only .cr-element.radio.active{background:var(--hero)}.crs-holder.read-only .cr-element.radio.active:before{background:var(--hero-sc)}.cr-element:not(:focus-within) .cr-element.error-color{border-color:var(--danger)!important}.cha-ra-group{display:flex;flex-wrap:wrap;width:100%}.cha-ra-group .crs-holder{padding:2rem}.cha-ra-group.t-tab{align-items:center;border-radius:2.2rem;box-shadow:inset 0 0 0 1px rgba(var(--background-sc-rgb),.1);display:inline-flex;justify-content:center;max-width:100%;width:auto}.cha-ra-group.t-tab .crs-holder{padding:0}.cha-ra-group.t-tab .crs-holder .label-holder{display:flex;position:relative}.cha-ra-group.t-tab .crs-holder .crs-label{transition:color .4s}.cha-ra-group.t-tab .crs-holder .crs-label label{font:600 1.4rem/4.2rem var(--font-family);min-width:10rem;padding:0 2rem}.cha-ra-group.t-tab .crs-holder .crs-component{border:1px solid rgba(var(--hero-rgb),0);border-radius:4.2rem;height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:border-color .4s;width:100%}.cha-ra-group.t-tab .crs-holder .crs-component label{opacity:0}.cha-ra-group.t-tab .crs-holder.input-active .crs-label{color:var(--hero)}.cha-ra-group.t-tab .crs-holder.input-active .crs-component{border-color:var(--hero)}";
|
|
4
|
+
styleInject(css_248z);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
2
|
+
|
|
3
|
+
export { clsx as c };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// update mechanism for this section is under consideration
|
|
2
|
+
|
|
3
|
+
const clientConfigs = {};
|
|
4
|
+
const breakPoints = {
|
|
5
|
+
// screens
|
|
6
|
+
xs: 576,
|
|
7
|
+
md: 768,
|
|
8
|
+
lg: 1024,
|
|
9
|
+
xl: 1200,
|
|
10
|
+
xxl: 1600
|
|
11
|
+
};
|
|
12
|
+
const mobileScreenSize = Number(process.env.REACT_APP_MOBILE_SIZE) || breakPoints.lg;
|
|
13
|
+
const screenTypes = ['desktop', 'mobile'];
|
|
14
|
+
const positions = ['top', 'right', 'bottom', 'left'];
|
|
15
|
+
const inputConfig = {
|
|
16
|
+
type: ['text', 'color', 'number', 'password', 'textarea', 'date', 'time', 'datetime-local'],
|
|
17
|
+
appearance: ['outline', 'minimal', 'light'],
|
|
18
|
+
size: ['small', 'default', 'big'],
|
|
19
|
+
flexibility: ['full-width', 'content-size'],
|
|
20
|
+
itemsDirection: ['start', 'end'],
|
|
21
|
+
cornerRadius: ['full-radius', 'smooth-radius'],
|
|
22
|
+
labelAppearance: ['none', 'title', 'swap']
|
|
23
|
+
};
|
|
24
|
+
const titleConfig = {
|
|
25
|
+
color: ['base', 'hero']
|
|
26
|
+
};
|
|
27
|
+
const checkboxRadioSwitcherConfig = {
|
|
28
|
+
size: ['small', 'big'],
|
|
29
|
+
labelPosition: ['right', 'left', 'top', 'bottom'],
|
|
30
|
+
labelAlignment: ['start', 'center', 'end']
|
|
31
|
+
};
|
|
32
|
+
const tagConfig = {
|
|
33
|
+
appearance: ['simple', 'minimal', 'outline', 'clean', 'light', 'colored'],
|
|
34
|
+
size: ['small', 'medium', 'big'],
|
|
35
|
+
flexibility: ['content-size', 'compact', 'full-width'],
|
|
36
|
+
cornerRadius: ['full-radius', 'smooth-radius']
|
|
37
|
+
};
|
|
38
|
+
const stepsConfig = {
|
|
39
|
+
size: ['small', 'big'],
|
|
40
|
+
direction: ['horizontal', 'vertical'],
|
|
41
|
+
appearance: ['steps', 'dots'],
|
|
42
|
+
status: ['initial', 'current', 'success', 'fail', 'activated']
|
|
43
|
+
};
|
|
44
|
+
const popoverConfig = {
|
|
45
|
+
align: ['start', 'end', 'center'],
|
|
46
|
+
position: ['bottom', 'top', 'left', 'right'],
|
|
47
|
+
cornerRadius: ['full-radius', 'smooth-radius'],
|
|
48
|
+
behave: ['toggle', 'open']
|
|
49
|
+
};
|
|
50
|
+
const popoverV2Config = {
|
|
51
|
+
onOpenClassName: 'has-popover-opened',
|
|
52
|
+
align: ['start', 'end', 'center'],
|
|
53
|
+
position: ['bottom', 'top', 'left', 'right'],
|
|
54
|
+
cornerRadius: ['full-radius', 'smooth-radius'],
|
|
55
|
+
behave: ['toggle', 'open']
|
|
56
|
+
};
|
|
57
|
+
const uploaderConfig = {
|
|
58
|
+
uploaderAppearance: ['button', 'input', 'cloud', 'box'],
|
|
59
|
+
uploadedItemsAppearance: ['light', 'minimal', 'detailed', 'box'],
|
|
60
|
+
uploadedFilessAppearance: ['light', 'minimal'],
|
|
61
|
+
gridColumnSize: {
|
|
62
|
+
xs: 1,
|
|
63
|
+
md: 2,
|
|
64
|
+
lg: 4,
|
|
65
|
+
xl: 5,
|
|
66
|
+
xxl: 6
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const moduleTitleConfig = {
|
|
70
|
+
cornerRadius: ['position-radius', 'no-radius', 'full-radius'],
|
|
71
|
+
position: ['top', 'bottom'],
|
|
72
|
+
size: ['small', 'medium', 'big', 'extra-big']
|
|
73
|
+
};
|
|
74
|
+
const widgetConfig = {
|
|
75
|
+
type: ['default', 'compact', 'minimal', 'colorful'],
|
|
76
|
+
size: ['small', 'medium', 'big'],
|
|
77
|
+
comparisonStatus: ['initial', 'up', 'down']
|
|
78
|
+
};
|
|
79
|
+
const customScrollbarConfig = {
|
|
80
|
+
size: ['medium', 'small']
|
|
81
|
+
};
|
|
82
|
+
const timePickerConfig = {
|
|
83
|
+
appearance: ['multipleInputs', 'singleInput']
|
|
84
|
+
};
|
|
85
|
+
const optionConfig = {
|
|
86
|
+
color: ['default', 'hero'],
|
|
87
|
+
border: ['none', 'top', 'bottom'],
|
|
88
|
+
sticky: ['none', 'top', 'bottom'],
|
|
89
|
+
titlePosition: {
|
|
90
|
+
start: 'start',
|
|
91
|
+
center: 'center',
|
|
92
|
+
end: 'end'
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export { clientConfigs as a, titleConfig as b, checkboxRadioSwitcherConfig as c, popoverConfig as d, popoverV2Config as e, customScrollbarConfig as f, breakPoints as g, stepsConfig as h, inputConfig as i, moduleTitleConfig as j, timePickerConfig as k, mobileScreenSize as m, optionConfig as o, positions as p, screenTypes as s, tagConfig as t, uploaderConfig as u, widgetConfig as w };
|