@dreamcommerce/aurora 2.1.7 → 2.1.8-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/build/cjs/packages/aurora/src/components/controls/hoc/control_select/index.js +2 -2
- package/build/cjs/packages/aurora/src/components/dropdown/components/list.js +2 -2
- package/build/cjs/packages/aurora/src/components/dropdown/hoc/select/index.js +2 -2
- package/build/cjs/packages/aurora/src/css/checkbox/main.module.less.js +1 -1
- package/build/esm/packages/aurora/src/components/button/components/button/types.d.ts +2 -2
- package/build/esm/packages/aurora/src/components/button/components/button/types.js.map +1 -1
- package/build/esm/packages/aurora/src/components/button/components/link/types.d.ts +2 -2
- package/build/esm/packages/aurora/src/components/button/components/link/types.js +1 -1
- package/build/esm/packages/aurora/src/components/button/components/link/types.js.map +1 -1
- package/build/esm/packages/aurora/src/components/button/types.d.ts +2 -2
- package/build/esm/packages/aurora/src/components/button/types.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/hoc/control_select/index.js +2 -2
- package/build/esm/packages/aurora/src/components/dropdown/components/list.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/components/list.js +2 -2
- package/build/esm/packages/aurora/src/components/dropdown/hoc/select/index.js +2 -2
- package/build/esm/packages/aurora/src/components/dropdown/types.d.ts +2 -0
- package/build/esm/packages/aurora/src/css/checkbox/main.module.less.js +1 -1
- package/package.json +1 -1
|
@@ -26,14 +26,14 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
26
26
|
* />
|
|
27
27
|
* )
|
|
28
28
|
*/
|
|
29
|
-
const ControlSelect = ({ label, isRequired, id, name, defaultValues, options, isWithGroups, isWithSearch, defaultIsOpen, defaultCloseOnClick, isReadonly, isDisabled, onChange, onToggle, errors, hint, hintOptions = { isFixed: true }, additionalInfo }) => {
|
|
29
|
+
const ControlSelect = ({ label, isRequired, id, name, defaultValues, options, isWithGroups, isWithSearch, defaultIsOpen, defaultCloseOnClick, isReadonly, isDisabled, onChange, onToggle, errors, hint, hintOptions = { isFixed: true }, additionalInfo, onScroll }) => {
|
|
30
30
|
return (React__default['default'].createElement(index['default'], { errors: errors, name: name, id: id },
|
|
31
31
|
(label || hint) && (React__default['default'].createElement(index['default'].Label, { id: id, isRequired: isRequired },
|
|
32
32
|
label,
|
|
33
33
|
hint && React__default['default'].createElement(index$1['default'], { fixed: hintOptions.isFixed, spacingLeft: true, hint: hint }))),
|
|
34
34
|
React__default['default'].createElement(index['default'].Content, null,
|
|
35
35
|
React__default['default'].createElement(index['default'].Element, null,
|
|
36
|
-
React__default['default'].createElement(index$2['default'], { key: name, name: name, options: options, defaultValues: defaultValues, isWithGroups: isWithGroups, isWithSearch: isWithSearch, defaultIsOpen: defaultIsOpen, defaultCloseOnClick: defaultCloseOnClick, isReadonly: isReadonly, isDisabled: isDisabled, onChange: onChange, onToggle: onToggle }))),
|
|
36
|
+
React__default['default'].createElement(index$2['default'], { key: name, name: name, options: options, defaultValues: defaultValues, isWithGroups: isWithGroups, isWithSearch: isWithSearch, defaultIsOpen: defaultIsOpen, defaultCloseOnClick: defaultCloseOnClick, isReadonly: isReadonly, isDisabled: isDisabled, onChange: onChange, onToggle: onToggle, onScroll: onScroll }))),
|
|
37
37
|
React__default['default'].createElement(index['default'].Errors, null),
|
|
38
38
|
additionalInfo && React__default['default'].createElement(index['default'].AdditionalInfo, null, additionalInfo)));
|
|
39
39
|
};
|
|
@@ -28,11 +28,11 @@ isWithGroups,
|
|
|
28
28
|
/**
|
|
29
29
|
* Children nodes
|
|
30
30
|
*/
|
|
31
|
-
children }) => {
|
|
31
|
+
children, onScroll }) => {
|
|
32
32
|
const listClasses = classnames__default['default'](main_module['default'][css_classes.cssDropdownList], main_module['default'][css_classes.cssDropdownWithScroll], {
|
|
33
33
|
[main_module['default'][css_classes.cssDropdownListWithGroup]]: isWithGroups
|
|
34
34
|
});
|
|
35
|
-
return (React__default['default'].createElement("ul", { role: "listbox", className: listClasses }, children));
|
|
35
|
+
return (React__default['default'].createElement("ul", { role: "listbox", className: listClasses, onScroll: onScroll }, children));
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
exports.default = List;
|
|
@@ -83,7 +83,7 @@ onChange,
|
|
|
83
83
|
* Place where portal should be placed, by default to body
|
|
84
84
|
* this can be used to put modal inside modal
|
|
85
85
|
*/
|
|
86
|
-
portalContainer }) => {
|
|
86
|
+
portalContainer, onScroll }) => {
|
|
87
87
|
/**
|
|
88
88
|
* reference to dropdown wrapper element
|
|
89
89
|
*/
|
|
@@ -116,7 +116,7 @@ portalContainer }) => {
|
|
|
116
116
|
React__default['default'].createElement(index$1['default'].Select, { name: name, isReadonly: isReadonly, isDisabled: isDisabled, selectedOptions: selectedValues }),
|
|
117
117
|
React__default['default'].createElement(index$1['default'].Content, { portalContainer: portalContainer },
|
|
118
118
|
isWithSearch && React__default['default'].createElement(index$1['default'].Search, { onKeyUp: (ev) => utilities.handleSearchKeyUp(ev, options, setOptionsList) }),
|
|
119
|
-
React__default['default'].createElement(index$1['default'].List, { isWithGroups: isWithGroups }, optionsList === null || optionsList === void 0 ? void 0 : optionsList.map((option) => {
|
|
119
|
+
React__default['default'].createElement(index$1['default'].List, { isWithGroups: isWithGroups, onScroll: onScroll }, optionsList === null || optionsList === void 0 ? void 0 : optionsList.map((option) => {
|
|
120
120
|
var _a, _b;
|
|
121
121
|
return option.isHeader ? (React__default['default'].createElement(index$1['default'].Header, { key: option.text, text: option.text })) : (React__default['default'].createElement(index$1['default'].Option, { key: option.value, option: option, isSelected: utilities.isSelected(option, selectedValues), isDisabled: (_a = option.isDisabled) !== null && _a !== void 0 ? _a : isDisabled, isReadonly: (_b = option.isReadonly) !== null && _b !== void 0 ? _b : isReadonly, onClick: (option) => utilities.handleItemClick(option, defaultCloseOnClick, setSelectedValues, toggleDropdown) }));
|
|
122
122
|
}))))));
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var styleInject_es = require('../../../../../external/style-inject/dist/style-inject.es.js');
|
|
6
6
|
|
|
7
|
-
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n/** Checkbox Variables */\n/** CheckboxSwitch Variables */\n.main-module_checkbox__2sgoE {\n position: relative;\n display: inline-block;\n vertical-align: top;\n flex: 0 0 auto;\n width: 21px;\n height: 21px;\n border-radius: 3px;\n transition: box-shadow 0.15s ease-in;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.main-module_checkbox__2sgoE:active,\n.main-module_checkbox__2sgoE:focus {\n box-shadow: 0 0 0 10px rgba(223, 234, 252, 0.3);\n}\n.main-module_checkbox__2sgoE + * {\n margin-left: 1rem;\n}\n.main-module_checkbox_disabled__3Y85R .main-module_checkbox__label__1ZVOw {\n background-color: #ececec;\n border: none;\n}\n.main-module_checkbox_disabled__3Y85R .main-module_checkbox__label__1ZVOw:hover {\n box-shadow: none;\n}\n.main-module_checkbox_disabled__3Y85R .main-module_checkbox__control__3e-0S:checked + .main-module_checkbox__label__1ZVOw {\n background-color: #ececec;\n}\n.main-module_checkbox_disabled__3Y85R label[for] {\n cursor: default;\n}\n.main-module_checkbox__control__3e-0S {\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n clip: rect(1px, 1px, 1px, 1px);\n}\n.main-module_checkbox__control__3e-0S:checked + .main-module_checkbox__label__1ZVOw {\n border-color: #3c83ec;\n background-color: #3c83ec;\n}\n.main-module_checkbox__control__3e-0S:checked + .main-module_checkbox__label__1ZVOw .main-module_checkbox__icon__NDnjv {\n opacity: 1;\n}\n.main-module_checkbox__control__3e-0S:focus + .main-module_checkbox__label__1ZVOw {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox__label__1ZVOw {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n transition: background-color 0.2s ease-in, box-shadow 0.15s ease-in, border-color 0.15s ease-in;\n background-color: #ffffff;\n border: 1px solid #abb4cd;\n border-radius: 3px;\n cursor: pointer;\n}\n.main-module_checkbox__label__1ZVOw:hover {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox__label__1ZVOw .main-module_checkbox__icon__NDnjv {\n opacity: 0;\n transition: opacity 0.2s ease-in;\n width: 12px;\n
|
|
7
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n/** Checkbox Variables */\n/** CheckboxSwitch Variables */\n.main-module_checkbox__2sgoE {\n position: relative;\n display: inline-block;\n vertical-align: top;\n flex: 0 0 auto;\n width: 21px;\n height: 21px;\n border-radius: 3px;\n transition: box-shadow 0.15s ease-in;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.main-module_checkbox__2sgoE:active,\n.main-module_checkbox__2sgoE:focus {\n box-shadow: 0 0 0 10px rgba(223, 234, 252, 0.3);\n}\n.main-module_checkbox__2sgoE + * {\n margin-left: 1rem;\n}\n.main-module_checkbox_disabled__3Y85R .main-module_checkbox__label__1ZVOw {\n background-color: #ececec;\n border: none;\n}\n.main-module_checkbox_disabled__3Y85R .main-module_checkbox__label__1ZVOw:hover {\n box-shadow: none;\n}\n.main-module_checkbox_disabled__3Y85R .main-module_checkbox__control__3e-0S:checked + .main-module_checkbox__label__1ZVOw {\n background-color: #ececec;\n}\n.main-module_checkbox_disabled__3Y85R label[for] {\n cursor: default;\n}\n.main-module_checkbox__control__3e-0S {\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n clip: rect(1px, 1px, 1px, 1px);\n}\n.main-module_checkbox__control__3e-0S:checked + .main-module_checkbox__label__1ZVOw {\n border-color: #3c83ec;\n background-color: #3c83ec;\n}\n.main-module_checkbox__control__3e-0S:checked + .main-module_checkbox__label__1ZVOw .main-module_checkbox__icon__NDnjv {\n opacity: 1;\n}\n.main-module_checkbox__control__3e-0S:focus + .main-module_checkbox__label__1ZVOw {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox__label__1ZVOw {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n transition: background-color 0.2s ease-in, box-shadow 0.15s ease-in, border-color 0.15s ease-in;\n background-color: #ffffff;\n border: 1px solid #abb4cd;\n border-radius: 3px;\n cursor: pointer;\n}\n.main-module_checkbox__label__1ZVOw:hover {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox__label__1ZVOw .main-module_checkbox__icon__NDnjv {\n opacity: 0;\n transition: opacity 0.2s ease-in;\n width: 12px;\n fill: #fff;\n}\n.main-module_checkbox-switch__3LtoF {\n position: relative;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n width: 2.143rem;\n height: 1.215rem;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.main-module_checkbox-switch__3LtoF + * {\n margin-left: 1rem;\n}\n.main-module_checkbox-switch_additional__ZT3SO {\n display: flex;\n justify-content: space-between;\n margin-left: 3.143rem;\n align-items: baseline;\n}\n.main-module_checkbox-switch_disabled__3a-RW .main-module_checkbox-switch__label__1lxKP {\n background-color: #ececec;\n border-color: #ececec;\n}\n.main-module_checkbox-switch_disabled__3a-RW .main-module_checkbox-switch__label__1lxKP::after {\n border-color: #ececec;\n}\n.main-module_checkbox-switch_disabled__3a-RW .main-module_checkbox-switch__label__1lxKP:hover {\n border-color: #ececec;\n box-shadow: none;\n}\n.main-module_checkbox-switch_disabled__3a-RW .main-module_checkbox-switch__label__1lxKP:hover::after {\n box-shadow: none;\n border-color: #ececec;\n}\n.main-module_checkbox-switch_disabled__3a-RW .main-module_checkbox-switch__control__taJUd:checked + .main-module_checkbox-switch__label__1lxKP::after {\n background-color: #ececec;\n border-color: #ececec;\n}\n.main-module_checkbox-switch_disabled__3a-RW label[for] {\n cursor: default;\n}\n.main-module_checkbox-switch__control__taJUd {\n position: absolute;\n width: 100%;\n height: 100%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n clip: rect(1px, 1px, 1px, 1px);\n}\n.main-module_checkbox-switch__control__taJUd:checked + .main-module_checkbox-switch__label__1lxKP .main-module_checkbox-switch__icon__8jJ0H {\n opacity: 1;\n}\n.main-module_checkbox-switch__control__taJUd:checked + .main-module_checkbox-switch__label__1lxKP::after {\n transform: translate3d(calc(2.143rem - 100%), 0, 0);\n border-color: #3c83ec;\n background-color: #3c83ec;\n}\n.main-module_checkbox-switch__control__taJUd:focus + .main-module_checkbox-switch__label__1lxKP {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox-switch__control__taJUd:focus + .main-module_checkbox-switch__label__1lxKP::after {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox-switch__label__1lxKP {\n display: inline-block;\n width: 100%;\n height: 58.9%;\n border: 1px solid transparent;\n background-color: #abb4cd;\n border-radius: 18px;\n cursor: pointer;\n transition: box-shadow 0.15s ease-in, border-color 0.15s ease-in;\n}\n.main-module_checkbox-switch__label__1lxKP:hover {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox-switch__label__1lxKP:hover::after {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox-switch__label__1lxKP .main-module_checkbox-switch__icon__8jJ0H {\n position: absolute;\n right: 3px;\n top: 3px;\n z-index: 1;\n opacity: 0;\n transition: opacity 0.2s ease-in;\n width: 10px;\n}\n.main-module_checkbox-switch__label__1lxKP .main-module_checkbox-switch__icon__8jJ0H g {\n transition: fill 0.2s ease-out;\n fill: #fff;\n}\n.main-module_checkbox-switch__label__1lxKP::after {\n content: '';\n position: absolute;\n display: block;\n left: 0;\n top: 0;\n width: 56.7%;\n height: 100%;\n transition: transform 0.1s ease-in, box-shadow 0.15s ease-in, border-color 0.15s ease-in;\n border: 1px solid #abb4cd;\n border-radius: 50%;\n background-color: #fff;\n transform: translate3d(0, 0, 0);\n}\n";
|
|
8
8
|
var cssClasses = {"checkbox":"main-module_checkbox__2sgoE","checkbox_disabled":"main-module_checkbox_disabled__3Y85R","checkbox__label":"main-module_checkbox__label__1ZVOw","checkbox__control":"main-module_checkbox__control__3e-0S","checkbox__icon":"main-module_checkbox__icon__NDnjv","checkbox-switch":"main-module_checkbox-switch__3LtoF","checkbox-switch_additional":"main-module_checkbox-switch_additional__ZT3SO","checkbox-switch_disabled":"main-module_checkbox-switch_disabled__3a-RW","checkbox-switch__label":"main-module_checkbox-switch__label__1lxKP","checkbox-switch__control":"main-module_checkbox-switch__control__taJUd","checkbox-switch__icon":"main-module_checkbox-switch__icon__8jJ0H"};
|
|
9
9
|
styleInject_es['default'](css_248z);
|
|
10
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from 'react';
|
|
1
|
+
import React, { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
export interface IAsButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
-
children: NodeListOf<HTMLElement> | Element | string;
|
|
3
|
+
children: NodeListOf<HTMLElement> | Element | string | React.ReactNode;
|
|
4
4
|
testId?: string;
|
|
5
5
|
onClick?(event: React.MouseEvent<HTMLElement>): void;
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../../src/components/button/components/button/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../../src/components/button/components/button/types.ts"],"names":[],"mappings":"AAAA,OAA4C,OAAO,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export interface IAsLinkProps {
|
|
3
3
|
href?: string;
|
|
4
4
|
target?: '_blank';
|
|
5
5
|
testId?: string;
|
|
6
6
|
onClick?(event: React.MouseEvent<HTMLElement>): void;
|
|
7
|
-
children: NodeListOf<HTMLElement> | string | Element;
|
|
7
|
+
children: NodeListOf<HTMLElement> | string | Element | React.ReactNode;
|
|
8
8
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import 'react';
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../../src/components/button/components/link/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../../src/components/button/components/link/types.ts"],"names":[],"mappings":"AAAA,OAAkB,OAAO,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from 'react';
|
|
1
|
+
import React, { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
export interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
3
|
as?: 'button' | 'link';
|
|
4
4
|
size?: 'small';
|
|
@@ -8,5 +8,5 @@ export interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
8
8
|
href?: string;
|
|
9
9
|
target?: '_blank';
|
|
10
10
|
testId?: string;
|
|
11
|
-
children: NodeListOf<HTMLElement> | string | Element;
|
|
11
|
+
children: NodeListOf<HTMLElement> | string | Element | React.ReactNode;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/components/button/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/components/button/types.ts"],"names":[],"mappings":"AAAA,OAA4C,OAAO,CAAC"}
|
|
@@ -18,14 +18,14 @@ import Select from '../../../dropdown/hoc/select/index.js';
|
|
|
18
18
|
* />
|
|
19
19
|
* )
|
|
20
20
|
*/
|
|
21
|
-
const ControlSelect = ({ label, isRequired, id, name, defaultValues, options, isWithGroups, isWithSearch, defaultIsOpen, defaultCloseOnClick, isReadonly, isDisabled, onChange, onToggle, errors, hint, hintOptions = { isFixed: true }, additionalInfo }) => {
|
|
21
|
+
const ControlSelect = ({ label, isRequired, id, name, defaultValues, options, isWithGroups, isWithSearch, defaultIsOpen, defaultCloseOnClick, isReadonly, isDisabled, onChange, onToggle, errors, hint, hintOptions = { isFixed: true }, additionalInfo, onScroll }) => {
|
|
22
22
|
return (React.createElement(Control, { errors: errors, name: name, id: id },
|
|
23
23
|
(label || hint) && (React.createElement(Control.Label, { id: id, isRequired: isRequired },
|
|
24
24
|
label,
|
|
25
25
|
hint && React.createElement(Hint, { fixed: hintOptions.isFixed, spacingLeft: true, hint: hint }))),
|
|
26
26
|
React.createElement(Control.Content, null,
|
|
27
27
|
React.createElement(Control.Element, null,
|
|
28
|
-
React.createElement(Select, { key: name, name: name, options: options, defaultValues: defaultValues, isWithGroups: isWithGroups, isWithSearch: isWithSearch, defaultIsOpen: defaultIsOpen, defaultCloseOnClick: defaultCloseOnClick, isReadonly: isReadonly, isDisabled: isDisabled, onChange: onChange, onToggle: onToggle }))),
|
|
28
|
+
React.createElement(Select, { key: name, name: name, options: options, defaultValues: defaultValues, isWithGroups: isWithGroups, isWithSearch: isWithSearch, defaultIsOpen: defaultIsOpen, defaultCloseOnClick: defaultCloseOnClick, isReadonly: isReadonly, isDisabled: isDisabled, onChange: onChange, onToggle: onToggle, onScroll: onScroll }))),
|
|
29
29
|
React.createElement(Control.Errors, null),
|
|
30
30
|
additionalInfo && React.createElement(Control.AdditionalInfo, null, additionalInfo)));
|
|
31
31
|
};
|
|
@@ -19,11 +19,11 @@ isWithGroups,
|
|
|
19
19
|
/**
|
|
20
20
|
* Children nodes
|
|
21
21
|
*/
|
|
22
|
-
children }) => {
|
|
22
|
+
children, onScroll }) => {
|
|
23
23
|
const listClasses = classnames(cssClasses[cssDropdownList], cssClasses[cssDropdownWithScroll], {
|
|
24
24
|
[cssClasses[cssDropdownListWithGroup]]: isWithGroups
|
|
25
25
|
});
|
|
26
|
-
return (React.createElement("ul", { role: "listbox", className: listClasses }, children));
|
|
26
|
+
return (React.createElement("ul", { role: "listbox", className: listClasses, onScroll: onScroll }, children));
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export default List;
|
|
@@ -75,7 +75,7 @@ onChange,
|
|
|
75
75
|
* Place where portal should be placed, by default to body
|
|
76
76
|
* this can be used to put modal inside modal
|
|
77
77
|
*/
|
|
78
|
-
portalContainer }) => {
|
|
78
|
+
portalContainer, onScroll }) => {
|
|
79
79
|
/**
|
|
80
80
|
* reference to dropdown wrapper element
|
|
81
81
|
*/
|
|
@@ -108,7 +108,7 @@ portalContainer }) => {
|
|
|
108
108
|
React.createElement(Dropdown.Select, { name: name, isReadonly: isReadonly, isDisabled: isDisabled, selectedOptions: selectedValues }),
|
|
109
109
|
React.createElement(Dropdown.Content, { portalContainer: portalContainer },
|
|
110
110
|
isWithSearch && React.createElement(Dropdown.Search, { onKeyUp: (ev) => handleSearchKeyUp(ev, options, setOptionsList) }),
|
|
111
|
-
React.createElement(Dropdown.List, { isWithGroups: isWithGroups }, optionsList === null || optionsList === void 0 ? void 0 : optionsList.map((option) => {
|
|
111
|
+
React.createElement(Dropdown.List, { isWithGroups: isWithGroups, onScroll: onScroll }, optionsList === null || optionsList === void 0 ? void 0 : optionsList.map((option) => {
|
|
112
112
|
var _a, _b;
|
|
113
113
|
return option.isHeader ? (React.createElement(Dropdown.Header, { key: option.text, text: option.text })) : (React.createElement(Dropdown.Option, { key: option.value, option: option, isSelected: isSelected(option, selectedValues), isDisabled: (_a = option.isDisabled) !== null && _a !== void 0 ? _a : isDisabled, isReadonly: (_b = option.isReadonly) !== null && _b !== void 0 ? _b : isReadonly, onClick: (option) => handleItemClick(option, defaultCloseOnClick, setSelectedValues, toggleDropdown) }));
|
|
114
114
|
}))))));
|
|
@@ -57,6 +57,7 @@ export interface IDropdownSearchProps {
|
|
|
57
57
|
export interface IDropdownListProps {
|
|
58
58
|
isWithGroups?: boolean;
|
|
59
59
|
children?: ReactNode;
|
|
60
|
+
onScroll?: (event: React.UIEvent<HTMLElement>) => void;
|
|
60
61
|
}
|
|
61
62
|
export interface IDropdownOptionProps {
|
|
62
63
|
option: ISelectOption;
|
|
@@ -92,6 +93,7 @@ export interface ISelectProps extends IDropdownProps {
|
|
|
92
93
|
isDisabled?: boolean;
|
|
93
94
|
isWithSearch?: boolean;
|
|
94
95
|
onChange?: (selectedOption: ISelectOption) => void;
|
|
96
|
+
onScroll?: (event: React.UIEvent<HTMLElement>) => void;
|
|
95
97
|
}
|
|
96
98
|
export interface ISelectOption {
|
|
97
99
|
text: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../../../external/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n/** Checkbox Variables */\n/** CheckboxSwitch Variables */\n.main-module_checkbox__2sgoE {\n position: relative;\n display: inline-block;\n vertical-align: top;\n flex: 0 0 auto;\n width: 21px;\n height: 21px;\n border-radius: 3px;\n transition: box-shadow 0.15s ease-in;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.main-module_checkbox__2sgoE:active,\n.main-module_checkbox__2sgoE:focus {\n box-shadow: 0 0 0 10px rgba(223, 234, 252, 0.3);\n}\n.main-module_checkbox__2sgoE + * {\n margin-left: 1rem;\n}\n.main-module_checkbox_disabled__3Y85R .main-module_checkbox__label__1ZVOw {\n background-color: #ececec;\n border: none;\n}\n.main-module_checkbox_disabled__3Y85R .main-module_checkbox__label__1ZVOw:hover {\n box-shadow: none;\n}\n.main-module_checkbox_disabled__3Y85R .main-module_checkbox__control__3e-0S:checked + .main-module_checkbox__label__1ZVOw {\n background-color: #ececec;\n}\n.main-module_checkbox_disabled__3Y85R label[for] {\n cursor: default;\n}\n.main-module_checkbox__control__3e-0S {\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n clip: rect(1px, 1px, 1px, 1px);\n}\n.main-module_checkbox__control__3e-0S:checked + .main-module_checkbox__label__1ZVOw {\n border-color: #3c83ec;\n background-color: #3c83ec;\n}\n.main-module_checkbox__control__3e-0S:checked + .main-module_checkbox__label__1ZVOw .main-module_checkbox__icon__NDnjv {\n opacity: 1;\n}\n.main-module_checkbox__control__3e-0S:focus + .main-module_checkbox__label__1ZVOw {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox__label__1ZVOw {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n transition: background-color 0.2s ease-in, box-shadow 0.15s ease-in, border-color 0.15s ease-in;\n background-color: #ffffff;\n border: 1px solid #abb4cd;\n border-radius: 3px;\n cursor: pointer;\n}\n.main-module_checkbox__label__1ZVOw:hover {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox__label__1ZVOw .main-module_checkbox__icon__NDnjv {\n opacity: 0;\n transition: opacity 0.2s ease-in;\n width: 12px;\n
|
|
3
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n/** Checkbox Variables */\n/** CheckboxSwitch Variables */\n.main-module_checkbox__2sgoE {\n position: relative;\n display: inline-block;\n vertical-align: top;\n flex: 0 0 auto;\n width: 21px;\n height: 21px;\n border-radius: 3px;\n transition: box-shadow 0.15s ease-in;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.main-module_checkbox__2sgoE:active,\n.main-module_checkbox__2sgoE:focus {\n box-shadow: 0 0 0 10px rgba(223, 234, 252, 0.3);\n}\n.main-module_checkbox__2sgoE + * {\n margin-left: 1rem;\n}\n.main-module_checkbox_disabled__3Y85R .main-module_checkbox__label__1ZVOw {\n background-color: #ececec;\n border: none;\n}\n.main-module_checkbox_disabled__3Y85R .main-module_checkbox__label__1ZVOw:hover {\n box-shadow: none;\n}\n.main-module_checkbox_disabled__3Y85R .main-module_checkbox__control__3e-0S:checked + .main-module_checkbox__label__1ZVOw {\n background-color: #ececec;\n}\n.main-module_checkbox_disabled__3Y85R label[for] {\n cursor: default;\n}\n.main-module_checkbox__control__3e-0S {\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n clip: rect(1px, 1px, 1px, 1px);\n}\n.main-module_checkbox__control__3e-0S:checked + .main-module_checkbox__label__1ZVOw {\n border-color: #3c83ec;\n background-color: #3c83ec;\n}\n.main-module_checkbox__control__3e-0S:checked + .main-module_checkbox__label__1ZVOw .main-module_checkbox__icon__NDnjv {\n opacity: 1;\n}\n.main-module_checkbox__control__3e-0S:focus + .main-module_checkbox__label__1ZVOw {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox__label__1ZVOw {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n transition: background-color 0.2s ease-in, box-shadow 0.15s ease-in, border-color 0.15s ease-in;\n background-color: #ffffff;\n border: 1px solid #abb4cd;\n border-radius: 3px;\n cursor: pointer;\n}\n.main-module_checkbox__label__1ZVOw:hover {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox__label__1ZVOw .main-module_checkbox__icon__NDnjv {\n opacity: 0;\n transition: opacity 0.2s ease-in;\n width: 12px;\n fill: #fff;\n}\n.main-module_checkbox-switch__3LtoF {\n position: relative;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n width: 2.143rem;\n height: 1.215rem;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.main-module_checkbox-switch__3LtoF + * {\n margin-left: 1rem;\n}\n.main-module_checkbox-switch_additional__ZT3SO {\n display: flex;\n justify-content: space-between;\n margin-left: 3.143rem;\n align-items: baseline;\n}\n.main-module_checkbox-switch_disabled__3a-RW .main-module_checkbox-switch__label__1lxKP {\n background-color: #ececec;\n border-color: #ececec;\n}\n.main-module_checkbox-switch_disabled__3a-RW .main-module_checkbox-switch__label__1lxKP::after {\n border-color: #ececec;\n}\n.main-module_checkbox-switch_disabled__3a-RW .main-module_checkbox-switch__label__1lxKP:hover {\n border-color: #ececec;\n box-shadow: none;\n}\n.main-module_checkbox-switch_disabled__3a-RW .main-module_checkbox-switch__label__1lxKP:hover::after {\n box-shadow: none;\n border-color: #ececec;\n}\n.main-module_checkbox-switch_disabled__3a-RW .main-module_checkbox-switch__control__taJUd:checked + .main-module_checkbox-switch__label__1lxKP::after {\n background-color: #ececec;\n border-color: #ececec;\n}\n.main-module_checkbox-switch_disabled__3a-RW label[for] {\n cursor: default;\n}\n.main-module_checkbox-switch__control__taJUd {\n position: absolute;\n width: 100%;\n height: 100%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n clip: rect(1px, 1px, 1px, 1px);\n}\n.main-module_checkbox-switch__control__taJUd:checked + .main-module_checkbox-switch__label__1lxKP .main-module_checkbox-switch__icon__8jJ0H {\n opacity: 1;\n}\n.main-module_checkbox-switch__control__taJUd:checked + .main-module_checkbox-switch__label__1lxKP::after {\n transform: translate3d(calc(2.143rem - 100%), 0, 0);\n border-color: #3c83ec;\n background-color: #3c83ec;\n}\n.main-module_checkbox-switch__control__taJUd:focus + .main-module_checkbox-switch__label__1lxKP {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox-switch__control__taJUd:focus + .main-module_checkbox-switch__label__1lxKP::after {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox-switch__label__1lxKP {\n display: inline-block;\n width: 100%;\n height: 58.9%;\n border: 1px solid transparent;\n background-color: #abb4cd;\n border-radius: 18px;\n cursor: pointer;\n transition: box-shadow 0.15s ease-in, border-color 0.15s ease-in;\n}\n.main-module_checkbox-switch__label__1lxKP:hover {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox-switch__label__1lxKP:hover::after {\n box-shadow: 0 0 3px 0 #3c83ec;\n border-color: #3c83ec;\n}\n.main-module_checkbox-switch__label__1lxKP .main-module_checkbox-switch__icon__8jJ0H {\n position: absolute;\n right: 3px;\n top: 3px;\n z-index: 1;\n opacity: 0;\n transition: opacity 0.2s ease-in;\n width: 10px;\n}\n.main-module_checkbox-switch__label__1lxKP .main-module_checkbox-switch__icon__8jJ0H g {\n transition: fill 0.2s ease-out;\n fill: #fff;\n}\n.main-module_checkbox-switch__label__1lxKP::after {\n content: '';\n position: absolute;\n display: block;\n left: 0;\n top: 0;\n width: 56.7%;\n height: 100%;\n transition: transform 0.1s ease-in, box-shadow 0.15s ease-in, border-color 0.15s ease-in;\n border: 1px solid #abb4cd;\n border-radius: 50%;\n background-color: #fff;\n transform: translate3d(0, 0, 0);\n}\n";
|
|
4
4
|
var cssClasses = {"checkbox":"main-module_checkbox__2sgoE","checkbox_disabled":"main-module_checkbox_disabled__3Y85R","checkbox__label":"main-module_checkbox__label__1ZVOw","checkbox__control":"main-module_checkbox__control__3e-0S","checkbox__icon":"main-module_checkbox__icon__NDnjv","checkbox-switch":"main-module_checkbox-switch__3LtoF","checkbox-switch_additional":"main-module_checkbox-switch_additional__ZT3SO","checkbox-switch_disabled":"main-module_checkbox-switch_disabled__3a-RW","checkbox-switch__label":"main-module_checkbox-switch__label__1lxKP","checkbox-switch__control":"main-module_checkbox-switch__control__taJUd","checkbox-switch__icon":"main-module_checkbox-switch__icon__8jJ0H"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|