@homecode/ui 4.19.1 → 4.19.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/dist/esm/src/components/AssistiveText/AssistiveText.styl.js +1 -1
- package/dist/esm/src/components/Button/Button.styl.js +1 -1
- package/dist/esm/src/components/DatePickerInput/DatePickerInput.styl.js +1 -1
- package/dist/esm/src/components/Input/Input.js +5 -5
- package/dist/esm/src/components/Input/Input.styl.js +2 -2
- package/dist/esm/src/components/InputFile/InputFile.js +1 -1
- package/dist/esm/src/components/InputFile/InputFile.styl.js +1 -1
- package/dist/esm/src/components/Label/Label.styl.js +1 -1
- package/dist/esm/src/components/Menu/Menu.styl.js +1 -1
- package/dist/esm/src/components/Popup/Popup.js +11 -10
- package/dist/esm/src/components/Select/Select.js +1 -7
- package/dist/esm/src/components/Select/Select.styl.js +2 -2
- package/dist/esm/types/src/components/Input/Input.types.d.ts +1 -0
- package/dist/esm/types/src/components/Popup/Popup.d.ts +1 -1
- package/dist/esm/types/src/components/Popup/Popup.types.d.ts +3 -1
- package/dist/esm/types/src/components/Select/Select.d.ts +0 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".AssistiveText_root__OI3ju{font-size:80%;line-height:1.5em;margin-bottom:.2em}.AssistiveText_size-s__gsuS-{padding:0
|
|
3
|
+
var css_248z = ".AssistiveText_root__OI3ju{font-size:80%;line-height:1.5em;margin-bottom:.2em}.AssistiveText_size-s__gsuS-{padding:0 14px}.AssistiveText_size-m__PDlkc{padding:0 16px}.AssistiveText_size-l__D-9pQ{padding:0 18px}.AssistiveText_variant-danger__N8sGS{color:var(--danger-color)}";
|
|
4
4
|
var S = {"root":"AssistiveText_root__OI3ju","size-s":"AssistiveText_size-s__gsuS-","size-m":"AssistiveText_size-m__PDlkc","size-l":"AssistiveText_size-l__D-9pQ","variant-danger":"AssistiveText_variant-danger__N8sGS"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".Button_root__SZns2{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:inset 0 0 0 2px none;box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;justify-content:center;line-height:1em;text-decoration:none;transition:.2s ease-out;transition-property:background-color,box-shadow,opacity;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Button_root__SZns2:focus,.Button_root__SZns2:hover{background-color:var(--active-color-alpha-100)}.Button_root__SZns2[disabled]{background-color:var(--accent-color-alpha-100);opacity:.4;pointer-events:none}.Button_root__SZns2:active{opacity:.7}.Button_root__SZns2.Button_loading__c4pdo{pointer-events:none}.Button_root__SZns2.Button_checked__X7f58,.Button_root__SZns2.Button_checked__X7f58:focus,.Button_root__SZns2.Button_checked__X7f58:hover{background-color:var(--accent-color)!important;box-shadow:none;color:var(--decent-color)}.Button_root__SZns2.Button_checked__X7f58:focus{box-shadow:0 0 0 2px var(--active-color)}.Button_root__SZns2.Button_checked__X7f58 path{fill:var(--decent-color)}.Button_postfix__DwG-n,.Button_prefix__czqd5{display:flex}.Button_prefix__czqd5:not(:last-child){margin-right:.5em}.Button_postfix__DwG-n:not(:first-child){margin-left:.5em}.Button_size-s__-SIY1{border-radius:4px;font-size:16px;min-height:30px;min-width:30px;padding:0
|
|
3
|
+
var css_248z = ".Button_root__SZns2{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:inset 0 0 0 2px none;box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;justify-content:center;line-height:1em;text-decoration:none;transition:.2s ease-out;transition-property:background-color,box-shadow,opacity;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Button_root__SZns2:focus,.Button_root__SZns2:hover{background-color:var(--active-color-alpha-100)}.Button_root__SZns2[disabled]{background-color:var(--accent-color-alpha-100);opacity:.4;pointer-events:none}.Button_root__SZns2:active{opacity:.7}.Button_root__SZns2.Button_loading__c4pdo{pointer-events:none}.Button_root__SZns2.Button_checked__X7f58,.Button_root__SZns2.Button_checked__X7f58:focus,.Button_root__SZns2.Button_checked__X7f58:hover{background-color:var(--accent-color)!important;box-shadow:none;color:var(--decent-color)}.Button_root__SZns2.Button_checked__X7f58:focus{box-shadow:0 0 0 2px var(--active-color)}.Button_root__SZns2.Button_checked__X7f58 path{fill:var(--decent-color)}.Button_postfix__DwG-n,.Button_prefix__czqd5{display:flex}.Button_prefix__czqd5:not(:last-child){margin-right:.5em}.Button_postfix__DwG-n:not(:first-child){margin-left:.5em}.Button_size-s__-SIY1{border-radius:4px;font-size:16px;min-height:30px;min-width:30px;padding:0 14px}.Button_size-s__-SIY1.Button_square__eYSY3{max-height:30px;width:30px}.Button_size-m__TBXc-{border-radius:6px;font-size:20px;min-height:40px;min-width:40px;padding:0 16px}.Button_size-m__TBXc-.Button_square__eYSY3{max-height:40px;width:40px}.Button_size-l__Sx37T{border-radius:8px;font-size:24px;min-height:50px;min-width:50px;padding:0 18px}.Button_size-l__Sx37T.Button_square__eYSY3{max-height:50px}.Button_square__eYSY3{justify-content:center;padding:0}.Button_round__Bxofy.Button_size-s__-SIY1{border-radius:15px}.Button_round__Bxofy.Button_size-m__TBXc-{border-radius:20px}.Button_round__Bxofy.Button_size-l__Sx37T{border-radius:25px}.Button_variant-clear__z1HZm:active,.Button_variant-clear__z1HZm:focus,.Button_variant-clear__z1HZm:hover,.Button_variant-default__vbo51:active,.Button_variant-default__vbo51:focus,.Button_variant-default__vbo51:hover,.Button_variant-outlined__shnIq:active,.Button_variant-outlined__shnIq:hover,.Button_variant-primary__zhEQI:active,.Button_variant-primary__zhEQI:hover{background-color:var(--active-color-alpha-300)}.Button_variant-text__oCx0X{background-color:transparent}.Button_variant-text__oCx0X:hover{background-color:transparent!important;color:var(--active-color)}.Button_variant-text__oCx0X:focus{background-color:transparent;color:var(--active-color)}.Button_variant-clear__z1HZm{background-color:transparent}.Button_variant-default__vbo51{background-color:var(--accent-color-alpha-100)}.Button_variant-outlined__shnIq{background-color:transparent;box-shadow:inset 0 0 0 2px var(--accent-color)}.Button_variant-outlined__shnIq:focus{background-color:var(--active-color-alpha-300);box-shadow:inset 0 0 0 2px var(--active-color)}.Button_variant-primary__zhEQI{background-color:var(--active-color);color:var(--accent-color-alpha-900)}.Button_variant-primary__zhEQI:hover{background-color:var(--active-color-alpha-800)}.Button_variant-primary__zhEQI:focus{background-color:var(--active-color);box-shadow:inset 0 0 0 2px var(--accent-color)}.Button_spinner__ttaMr{margin-left:var(--indent-s)}";
|
|
4
4
|
var S = {"root":"Button_root__SZns2","loading":"Button_loading__c4pdo","checked":"Button_checked__X7f58","prefix":"Button_prefix__czqd5","postfix":"Button_postfix__DwG-n","size-s":"Button_size-s__-SIY1","square":"Button_square__eYSY3","size-m":"Button_size-m__TBXc-","size-l":"Button_size-l__Sx37T","round":"Button_round__Bxofy","variant-clear":"Button_variant-clear__z1HZm","variant-default":"Button_variant-default__vbo51","variant-outlined":"Button_variant-outlined__shnIq","variant-primary":"Button_variant-primary__zhEQI","variant-text":"Button_variant-text__oCx0X","spinner":"Button_spinner__ttaMr"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".DatePickerInput_popupContent__rcVHH{min-width:-moz-fit-content;min-width:fit-content}.DatePickerInput_content__yll-b{padding:.5em}.DatePickerInput_range__xWj9K .DatePickerInput_content__yll-b{display:flex;flex-direction:row;flex-wrap:nowrap;gap:1em}.DatePickerInput_doubleCalendar__H5CMo .DatePickerInput_calendar__vf0za{width:50%}.DatePickerInput_size-s__5t05o{border-radius:6px!important}.DatePickerInput_size-s__5t05o .DatePickerInput_content__yll-b{min-width:12em;padding:
|
|
3
|
+
var css_248z = ".DatePickerInput_popupContent__rcVHH{min-width:-moz-fit-content;min-width:fit-content}.DatePickerInput_content__yll-b{padding:.5em}.DatePickerInput_range__xWj9K .DatePickerInput_content__yll-b{display:flex;flex-direction:row;flex-wrap:nowrap;gap:1em}.DatePickerInput_doubleCalendar__H5CMo .DatePickerInput_calendar__vf0za{width:50%}.DatePickerInput_size-s__5t05o{border-radius:6px!important}.DatePickerInput_size-s__5t05o .DatePickerInput_content__yll-b{min-width:12em;padding:14px}.DatePickerInput_doubleCalendar__H5CMo.DatePickerInput_size-s__5t05o .DatePickerInput_content__yll-b{min-width:25em}.DatePickerInput_size-m__TTkHV{border-radius:9px!important}.DatePickerInput_size-m__TTkHV .DatePickerInput_content__yll-b{min-width:16em;padding:16px}.DatePickerInput_doubleCalendar__H5CMo.DatePickerInput_size-m__TTkHV .DatePickerInput_content__yll-b{min-width:33em}.DatePickerInput_size-l__-fWkE{border-radius:12px!important}.DatePickerInput_size-l__-fWkE .DatePickerInput_content__yll-b{min-width:20em;padding:18px}.DatePickerInput_doubleCalendar__H5CMo.DatePickerInput_size-l__-fWkE .DatePickerInput_content__yll-b{min-width:41em}";
|
|
4
4
|
var S = {"popupContent":"DatePickerInput_popupContent__rcVHH","content":"DatePickerInput_content__yll-b","range":"DatePickerInput_range__xWj9K","doubleCalendar":"DatePickerInput_doubleCalendar__H5CMo","calendar":"DatePickerInput_calendar__vf0za","size-s":"DatePickerInput_size-s__5t05o","size-m":"DatePickerInput_size-m__TTkHV","size-l":"DatePickerInput_size-l__-fWkE"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -19,12 +19,12 @@ import '../ButtonGroup/ButtonGroup.styl.js';
|
|
|
19
19
|
import '../Calendar/Calendar.styl.js';
|
|
20
20
|
import '../../tools/dom.js';
|
|
21
21
|
import 'timen';
|
|
22
|
-
import '../Portal/Portal.js';
|
|
23
|
-
import '../Paranja/Paranja.styl.js';
|
|
24
22
|
import 'compareq';
|
|
25
23
|
import 'lodash.pick';
|
|
26
|
-
import '../Popup/Popup.styl.js';
|
|
27
24
|
import '../../tools/queryParams.js';
|
|
25
|
+
import '../Portal/Portal.js';
|
|
26
|
+
import '../Paranja/Paranja.styl.js';
|
|
27
|
+
import '../Popup/Popup.styl.js';
|
|
28
28
|
import '../Select/Select.styl.js';
|
|
29
29
|
import '../Checkbox/Checkbox.styl.js';
|
|
30
30
|
import '../Container/Container.styl.js';
|
|
@@ -332,13 +332,13 @@ class Input extends Component {
|
|
|
332
332
|
return jsx("div", { ...props, children: elem });
|
|
333
333
|
}
|
|
334
334
|
render() {
|
|
335
|
-
const { className, size, label, value, variant, error, hasClear, required, hideRequiredStar, disabled, addonRight, } = this.props;
|
|
335
|
+
const { className, size, label, value, variant, error, hasClear, round, required, hideRequiredStar, disabled, addonRight, } = this.props;
|
|
336
336
|
const { isFocused, hasValue, labelClipPath, isLabelOnTop } = this.store;
|
|
337
337
|
const isNumber = this.isNumber();
|
|
338
338
|
const isTextArea = this.isTextArea();
|
|
339
339
|
const Control = isTextArea ? 'span' : 'input';
|
|
340
340
|
const controlProps = this.getControlProps();
|
|
341
|
-
const classes = cn(S.root, isTextArea && S.isTextArea, S[`size-${size}`], S[`variant-${variant}`], isFocused && S.isFocused, error && S.hasError, hasClear && S.hasClear, disabled && S.isDisabled, className);
|
|
341
|
+
const classes = cn(S.root, isTextArea && S.isTextArea, S[`size-${size}`], S[`variant-${variant}`], isFocused && S.isFocused, error && S.hasError, hasClear && S.hasClear, disabled && S.isDisabled, round && S.round, className);
|
|
342
342
|
return (
|
|
343
343
|
// @ts-ignore
|
|
344
344
|
jsxs("div", { className: classes, title: value, children: [jsxs("label", { className: S.main, children: [jsx("div", { className: S.border, suppressHydrationWarning: true, style: { clipPath: labelClipPath } }, "border"), this.renderAddon('left'), this.wrapControll(jsxs(Fragment, { children: [createElement(Control, { ...controlProps, className: cn(S.control, controlProps?.className), ref: this.inputRef, key: "control" }), isTextArea && controlProps.placeholder && (jsx("span", { className: S.placeholder, spellCheck: false, children: controlProps.placeholder }))] })), isNumber && (jsxs("div", { className: S.numberArrows, children: [jsx(Button, { variant: "clear", onClick: () => this.onNumberWheel(1), tabIndex: -1, children: jsx(Icon, { type: "chevronUp", size: size }) }), jsx(Button, { variant: "clear", onClick: () => this.onNumberWheel(-1), tabIndex: -1, children: jsx(Icon, { type: "chevronDown", size: size }) })] })), jsx(Label, { className: cn(S.label, addonRight && S.hasAddonRight), size: size, isOnTop: isLabelOnTop, isError: Boolean(error), onClipPathChange: this.onLabelClipPathChange, children: label }, "label"), this.renderAddon('right'), required && !hideRequiredStar && (jsx(RequiredStar, { size: size }, "required-star"))] }, "main"), hasClear && !disabled && hasValue && (jsx(Button, { className: S.clearButton, variant: "clear", size: size, square: true, onClick: this.onClearPress, title: "", children: jsx(Icon, { className: S.clearIcon, size: size, type: "close" }) }, "clear")), !disabled && typeof error === 'string' && (jsx(AssistiveText, { variant: "danger", size: size, children: error }, "assistive-text"))] }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".Input_root__kj4vQ{color:var(--accent-color);position:relative}.Input_root__kj4vQ.Input_isTextArea__1a6n1{max-height:10em}.Input_main__M6Qxb,.Input_root__kj4vQ{width:100%}.Input_controlWrapper__WgrZL,.Input_root__kj4vQ{max-width:100%}.Input_main__M6Qxb{border-radius:inherit;display:flex;max-width:100%;position:relative}.Input_isTextArea__1a6n1 .Input_main__M6Qxb{height:auto;max-height:inherit!important}.Input_size-s__-U0r-.Input_isTextArea__1a6n1 .Input_main__M6Qxb{padding-right:5px!important}.Input_size-m__jTEMl.Input_isTextArea__1a6n1 .Input_main__M6Qxb{padding-right:7px!important}.Input_size-l__BR-zg.Input_isTextArea__1a6n1 .Input_main__M6Qxb{padding-right:11px!important}.Input_border__01i-B{background-color:var(--accent-color-alpha-100);border-radius:inherit;bottom:0;left:0;pointer-events:none;position:absolute;right:0;top:0;transition:.15s ease-out;transition-property:box-shadow,border-color,background-color;z-index:0}.Input_root__kj4vQ:hover .Input_border__01i-B{background-color:var(--active-color-alpha-100)}.Input_variant-clean__yjtdm .Input_border__01i-B{background-color:transparent}.Input_isFocused__9jtFN.Input_variant-clean__yjtdm .Input_border__01i-B{background-color:var(--active-color-alpha-300)}.Input_variant-default__frNbg .Input_border__01i-B{background-color:var(--accent-color-alpha-100)}.Input_isFocused__9jtFN.Input_variant-default__frNbg .Input_border__01i-B{background-color:var(--active-color-alpha-300)}.Input_variant-outlined__qKjnJ .Input_border__01i-B{background-color:transparent;box-shadow:inset 0 0 0 2px var(--accent-color)}.Input_isFocused__9jtFN.Input_variant-outlined__qKjnJ .Input_border__01i-B{background-color:var(--active-color-alpha-300);box-shadow:inset 0 0 0 2px var(--active-color)}.Input_hasError__5iS2M .Input_variant-outlined__qKjnJ .Input_border__01i-B,.Input_hasError__5iS2M:hover .Input_variant-outlined__qKjnJ .Input_border__01i-B{box-shadow:inset 0 0 0 2px var(--danger-color)}.Input_isDisabled__e7J10.Input_variant-outlined__qKjnJ .Input_border__01i-B{box-shadow:none}.Input_size-s__-U0r-{font-size:16px}.Input_size-s__-U0r- .Input_main__M6Qxb{border-radius:4px;font-size:16px;min-height:30px;min-width:30px;padding:0
|
|
4
|
-
var S = {"root":"Input_root__kj4vQ","isTextArea":"Input_isTextArea__1a6n1","main":"Input_main__M6Qxb","controlWrapper":"Input_controlWrapper__WgrZL","size-s":"Input_size-s__-U0r-","size-m":"Input_size-m__jTEMl","size-l":"Input_size-l__BR-zg","border":"Input_border__01i-B","variant-clean":"Input_variant-clean__yjtdm","isFocused":"Input_isFocused__9jtFN","variant-default":"Input_variant-default__frNbg","variant-outlined":"Input_variant-outlined__qKjnJ","hasError":"Input_hasError__5iS2M","isDisabled":"Input_isDisabled__e7J10","control":"Input_control__wZcMD","addonLeft":"Input_addonLeft__i1c70","addonRight":"Input_addonRight__A9Iht","labelGap":"Input_labelGap__T6fAj","label":"Input_label__FT90l","hasAddonRight":"Input_hasAddonRight__ckzfA","scroller":"Input_scroller__OBm8M","numberArrows":"Input_numberArrows__8jveR","placeholder":"Input_placeholder__DRYLA","clearBg":"Input_clearBg__jqI1h","hasClear":"Input_hasClear__5Y3nU","requiredStar":"Input_requiredStar__6MeQ4","clearButton":"Input_clearButton__0E-9L","clearIcon":"Input_clearIcon__Gi1Nc","size-xl":"Input_size-xl__o-R-1"};
|
|
3
|
+
var css_248z = ".Input_root__kj4vQ{color:var(--accent-color);position:relative}.Input_root__kj4vQ.Input_isTextArea__1a6n1{max-height:10em}.Input_main__M6Qxb,.Input_root__kj4vQ{width:100%}.Input_controlWrapper__WgrZL,.Input_root__kj4vQ{max-width:100%}.Input_main__M6Qxb{border-radius:inherit;display:flex;max-width:100%;position:relative}.Input_isTextArea__1a6n1 .Input_main__M6Qxb{height:auto;max-height:inherit!important}.Input_size-s__-U0r-.Input_isTextArea__1a6n1 .Input_main__M6Qxb{padding-right:5px!important}.Input_size-m__jTEMl.Input_isTextArea__1a6n1 .Input_main__M6Qxb{padding-right:7px!important}.Input_size-l__BR-zg.Input_isTextArea__1a6n1 .Input_main__M6Qxb{padding-right:11px!important}.Input_border__01i-B{background-color:var(--accent-color-alpha-100);border-radius:inherit;bottom:0;left:0;pointer-events:none;position:absolute;right:0;top:0;transition:.15s ease-out;transition-property:box-shadow,border-color,background-color;z-index:0}.Input_root__kj4vQ:hover .Input_border__01i-B{background-color:var(--active-color-alpha-100)}.Input_variant-clean__yjtdm .Input_border__01i-B{background-color:transparent}.Input_isFocused__9jtFN.Input_variant-clean__yjtdm .Input_border__01i-B{background-color:var(--active-color-alpha-300)}.Input_variant-default__frNbg .Input_border__01i-B{background-color:var(--accent-color-alpha-100)}.Input_isFocused__9jtFN.Input_variant-default__frNbg .Input_border__01i-B{background-color:var(--active-color-alpha-300)}.Input_variant-outlined__qKjnJ .Input_border__01i-B{background-color:transparent;box-shadow:inset 0 0 0 2px var(--accent-color)}.Input_isFocused__9jtFN.Input_variant-outlined__qKjnJ .Input_border__01i-B{background-color:var(--active-color-alpha-300);box-shadow:inset 0 0 0 2px var(--active-color)}.Input_hasError__5iS2M .Input_variant-outlined__qKjnJ .Input_border__01i-B,.Input_hasError__5iS2M:hover .Input_variant-outlined__qKjnJ .Input_border__01i-B{box-shadow:inset 0 0 0 2px var(--danger-color)}.Input_isDisabled__e7J10.Input_variant-outlined__qKjnJ .Input_border__01i-B{box-shadow:none}.Input_size-s__-U0r-{font-size:16px}.Input_size-s__-U0r- .Input_main__M6Qxb{border-radius:4px;font-size:16px;min-height:30px;min-width:30px;padding:0 14px}.Input_round__yJr-2.Input_size-s__-U0r- .Input_main__M6Qxb{border-radius:15px}.Input_size-m__jTEMl{font-size:20px}.Input_size-m__jTEMl .Input_main__M6Qxb{border-radius:6px;font-size:20px;min-height:40px;min-width:40px;padding:0 16px}.Input_round__yJr-2.Input_size-m__jTEMl .Input_main__M6Qxb{border-radius:20px}.Input_size-l__BR-zg{font-size:24px}.Input_size-l__BR-zg .Input_main__M6Qxb{border-radius:8px;font-size:24px;min-height:50px;min-width:50px;padding:0 18px}.Input_round__yJr-2.Input_size-l__BR-zg .Input_main__M6Qxb{border-radius:25px}.Input_isTextArea__1a6n1 .Input_main__M6Qxb{padding-left:0}.Input_isDisabled__e7J10{color:var(--accent-color-alpha-500);opacity:.4}.Input_addonLeft__i1c70,.Input_addonRight__A9Iht,.Input_control__wZcMD{font-size:inherit;font-weight:400}.Input_labelGap__T6fAj{opacity:0;pointer-events:none;position:absolute}.Input_label__FT90l.Input_hasAddonRight__ckzfA{padding-right:2em}.Input_isTextArea__1a6n1 .Input_label__FT90l{max-height:40px}.Input_scroller__OBm8M{max-height:100%;width:100%}.Input_controlWrapper__WgrZL{flex:1}.Input_control__wZcMD{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;box-shadow:none;box-shadow:inset 0 0 0 2px none;color:inherit;display:inline-flex;filter:none;flex-grow:1;height:100%;min-width:30px;position:relative;text-overflow:ellipsis;transition:border-color .15s ease-in-out 0s;width:100%}.Input_isTextArea__1a6n1 .Input_control__wZcMD{display:block;height:100%;min-height:100%;width:100%}.Input_isTextArea__1a6n1 .Input_control__wZcMD:hover{cursor:text}.Input_isTextArea__1a6n1 .Input_control__wZcMD:after{content:\"\";display:block}.Input_control__wZcMD[type=number]{-moz-appearance:textfield;margin-right:14px}.Input_control__wZcMD[type=number]::-webkit-inner-spin-button,.Input_control__wZcMD[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.Input_numberArrows__8jveR{display:flex;flex-direction:column;height:100%;position:absolute;right:0}.Input_numberArrows__8jveR>button{background-color:transparent!important;height:50%;max-height:none;min-height:0;min-height:auto;opacity:.5;padding-left:0;padding-right:0;transition:opacity .1s ease-out;width:50%}.Input_numberArrows__8jveR>button:hover{opacity:1}.Input_size-s__-U0r- .Input_numberArrows__8jveR>button{min-width:24px}.Input_size-m__jTEMl .Input_numberArrows__8jveR>button{min-width:32px}.Input_size-l__BR-zg .Input_numberArrows__8jveR>button{min-width:40px}.Input_numberArrows__8jveR>button>svg{transform:scale(.8)}.Input_numberArrows__8jveR>button:first-child>svg{margin-bottom:-5%}.Input_numberArrows__8jveR>button:last-child>svg{margin-top:-5%}.Input_size-s__-U0r-.Input_isTextArea__1a6n1 .Input_control__wZcMD,.Input_size-s__-U0r-.Input_isTextArea__1a6n1 .Input_placeholder__DRYLA{padding:8px 16px 0 14px}.Input_size-s__-U0r-.Input_isTextArea__1a6n1 .Input_control__wZcMD:after,.Input_size-s__-U0r-.Input_isTextArea__1a6n1 .Input_placeholder__DRYLA:after{height:8px}.Input_size-m__jTEMl.Input_isTextArea__1a6n1 .Input_control__wZcMD,.Input_size-m__jTEMl.Input_isTextArea__1a6n1 .Input_placeholder__DRYLA{padding:10px 20px 0 16px}.Input_size-m__jTEMl.Input_isTextArea__1a6n1 .Input_control__wZcMD:after,.Input_size-m__jTEMl.Input_isTextArea__1a6n1 .Input_placeholder__DRYLA:after{height:10px}.Input_size-l__BR-zg.Input_isTextArea__1a6n1 .Input_control__wZcMD,.Input_size-l__BR-zg.Input_isTextArea__1a6n1 .Input_placeholder__DRYLA{padding:12px 24px 0 18px}.Input_size-l__BR-zg.Input_isTextArea__1a6n1 .Input_control__wZcMD:after,.Input_size-l__BR-zg.Input_isTextArea__1a6n1 .Input_placeholder__DRYLA:after{height:12px}.Input_control__wZcMD:-internal-autofill-selected,.Input_control__wZcMD:-webkit-autofill{animation-fill-mode:both;animation-name:Input_clearBg__jqI1h}.Input_size-s__-U0r-.Input_hasClear__5Y3nU .Input_control__wZcMD{padding-right:20px}.Input_size-m__jTEMl.Input_hasClear__5Y3nU .Input_control__wZcMD{padding-right:24px}.Input_size-l__BR-zg.Input_hasClear__5Y3nU .Input_control__wZcMD{padding-right:28px}.Input_control__wZcMD::-moz-placeholder{color:var(--accent-color-alpha-500)}.Input_control__wZcMD::placeholder{color:var(--accent-color-alpha-500)}.Input_control__wZcMD::-moz-selection{background-color:var(--active-color-alpha-300)}.Input_control__wZcMD::selection{background-color:var(--active-color-alpha-300)}.Input_placeholder__DRYLA{display:inline-block;left:0;max-width:100%;opacity:.4;overflow:hidden;padding:inherit;pointer-events:none;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap}.Input_addonLeft__i1c70,.Input_addonRight__A9Iht{align-items:center;display:inline-flex;flex-shrink:0;min-width:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}.Input_size-s__-U0r- .Input_addonLeft__i1c70,.Input_size-s__-U0r- .Input_addonRight__A9Iht{min-width:calc(var(--indent-s)*2)}.Input_size-m__jTEMl .Input_addonLeft__i1c70,.Input_size-m__jTEMl .Input_addonRight__A9Iht{min-width:calc(var(--indent-m)*2)}.Input_size-l__BR-zg .Input_addonLeft__i1c70,.Input_size-l__BR-zg .Input_addonRight__A9Iht{min-width:calc(var(--indent-l)*2)}.Input_addonLeft__i1c70>span,.Input_addonRight__A9Iht>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Input_size-s__-U0r- .Input_addonLeft__i1c70{margin-right:calc(var(--indent-s)/2)}.Input_size-m__jTEMl .Input_addonLeft__i1c70{margin-right:calc(var(--indent-m)/2)}.Input_size-l__BR-zg .Input_addonLeft__i1c70{margin-right:calc(var(--indent-l)/2)}.Input_size-s__-U0r- .Input_addonRight__A9Iht{margin-left:calc(var(--indent-s)/2)}.Input_size-m__jTEMl .Input_addonRight__A9Iht{margin-left:calc(var(--indent-m)/2)}.Input_size-l__BR-zg .Input_addonRight__A9Iht{margin-left:calc(var(--indent-l)/2)}.Input_requiredStar__6MeQ4{background-color:var(--warning-color);border-radius:50%;height:8px;opacity:.8;pointer-events:none;position:absolute;width:8px}.Input_isDisabled__e7J10 .Input_requiredStar__6MeQ4{display:none}.Input_size-s__-U0r- .Input_requiredStar__6MeQ4{right:4px;top:4px}.Input_size-m__jTEMl .Input_requiredStar__6MeQ4{right:6px;top:6px}.Input_size-l__BR-zg .Input_requiredStar__6MeQ4{right:8px;top:8px}.Input_isDisabled__e7J10{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Input_clearButton__0E-9L{border-bottom-left-radius:0;border-top-left-radius:0;bottom:1px;height:auto;position:absolute;right:0;top:0;z-index:1}.Input_clearButton__0E-9L:hover{background-color:var(--accent-color-alpha-0)!important}.Input_clearIcon__Gi1Nc{flex-shrink:0;opacity:.3;transition:opacity .2s ease-out}.Input_clearButton__0E-9L:hover .Input_clearIcon__Gi1Nc{opacity:.8}.Input_size-s__-U0r- .Input_clearIcon__Gi1Nc{height:10px;width:10px}.Input_size-m__jTEMl .Input_clearIcon__Gi1Nc{height:12px;width:12px}.Input_size-l__BR-zg .Input_clearIcon__Gi1Nc{height:14px;width:14px}.Input_size-xl__o-R-1 .Input_clearIcon__Gi1Nc{height:16px;width:16px}";
|
|
4
|
+
var S = {"root":"Input_root__kj4vQ","isTextArea":"Input_isTextArea__1a6n1","main":"Input_main__M6Qxb","controlWrapper":"Input_controlWrapper__WgrZL","size-s":"Input_size-s__-U0r-","size-m":"Input_size-m__jTEMl","size-l":"Input_size-l__BR-zg","border":"Input_border__01i-B","variant-clean":"Input_variant-clean__yjtdm","isFocused":"Input_isFocused__9jtFN","variant-default":"Input_variant-default__frNbg","variant-outlined":"Input_variant-outlined__qKjnJ","hasError":"Input_hasError__5iS2M","isDisabled":"Input_isDisabled__e7J10","round":"Input_round__yJr-2","control":"Input_control__wZcMD","addonLeft":"Input_addonLeft__i1c70","addonRight":"Input_addonRight__A9Iht","labelGap":"Input_labelGap__T6fAj","label":"Input_label__FT90l","hasAddonRight":"Input_hasAddonRight__ckzfA","scroller":"Input_scroller__OBm8M","numberArrows":"Input_numberArrows__8jveR","placeholder":"Input_placeholder__DRYLA","clearBg":"Input_clearBg__jqI1h","hasClear":"Input_hasClear__5Y3nU","requiredStar":"Input_requiredStar__6MeQ4","clearButton":"Input_clearButton__0E-9L","clearIcon":"Input_clearIcon__Gi1Nc","size-xl":"Input_size-xl__o-R-1"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { S as default };
|
|
@@ -24,10 +24,10 @@ import '../RequiredStar/RequiredStar.styl.js';
|
|
|
24
24
|
import 'nanoid';
|
|
25
25
|
import '../Input/Input.styl.js';
|
|
26
26
|
import '../../tools/dom.js';
|
|
27
|
+
import '../../tools/queryParams.js';
|
|
27
28
|
import '../Portal/Portal.js';
|
|
28
29
|
import '../Paranja/Paranja.styl.js';
|
|
29
30
|
import '../Popup/Popup.styl.js';
|
|
30
|
-
import '../../tools/queryParams.js';
|
|
31
31
|
import '../Select/Select.styl.js';
|
|
32
32
|
import '../Checkbox/Checkbox.styl.js';
|
|
33
33
|
import '../Container/Container.styl.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".InputFile_root__pY3JG{position:relative}.InputFile_border__whRyD{border-radius:inherit;height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:background-color .2s ease-out;width:100%}.InputFile_variant-outlined__f5hnA .InputFile_border__whRyD{background-color:transparent;box-shadow:inset 0 0 0 2px var(--accent-color)}.InputFile_variant-default__Jqzal .InputFile_border__whRyD{background-color:var(--accent-color-alpha-100)}.InputFile_variant-default__Jqzal .InputFile_border__whRyD:hover{background-color:var(--active-color-alpha-300)}.InputFile_empty__7j1BK:hover .InputFile_border__whRyD{background-color:var(--active-color-alpha-500)}.InputFile_label__bAEz-{align-items:center;display:flex;height:100%;position:absolute}.InputFile_inner__BQFX7{max-height:inherit}.InputFile_items__ND1YG{align-items:center;display:flex;flex-wrap:wrap;font-size:0;margin:-4px;width:calc(100% + 8px)}.InputFile_item__qg5I6{display:inline-flex;margin:4px;position:relative}.InputFile_item__qg5I6:first-child:last-child{width:100%}.InputFile_addButton__rW719{align-items:center;cursor:pointer;justify-content:center;position:relative;transition:background-color .2s ease-out}.InputFile_root__pY3JG:not(.InputFile_empty__7j1BK) .InputFile_addButton__rW719:hover{background-color:var(--active-color-alpha-500)}.InputFile_input__7FR5r{bottom:0;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0}.InputFile_size-s__hsWTE{font-size:16px}.InputFile_size-s__hsWTE .InputFile_border__whRyD,.InputFile_size-s__hsWTE .InputFile_item__qg5I6{border-radius:4px}.InputFile_size-s__hsWTE .InputFile_items__ND1YG{padding:
|
|
3
|
+
var css_248z = ".InputFile_root__pY3JG{position:relative}.InputFile_border__whRyD{border-radius:inherit;height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:background-color .2s ease-out;width:100%}.InputFile_variant-outlined__f5hnA .InputFile_border__whRyD{background-color:transparent;box-shadow:inset 0 0 0 2px var(--accent-color)}.InputFile_variant-default__Jqzal .InputFile_border__whRyD{background-color:var(--accent-color-alpha-100)}.InputFile_variant-default__Jqzal .InputFile_border__whRyD:hover{background-color:var(--active-color-alpha-300)}.InputFile_empty__7j1BK:hover .InputFile_border__whRyD{background-color:var(--active-color-alpha-500)}.InputFile_label__bAEz-{align-items:center;display:flex;height:100%;position:absolute}.InputFile_inner__BQFX7{max-height:inherit}.InputFile_items__ND1YG{align-items:center;display:flex;flex-wrap:wrap;font-size:0;margin:-4px;width:calc(100% + 8px)}.InputFile_item__qg5I6{display:inline-flex;margin:4px;position:relative}.InputFile_item__qg5I6:first-child:last-child{width:100%}.InputFile_addButton__rW719{align-items:center;cursor:pointer;justify-content:center;position:relative;transition:background-color .2s ease-out}.InputFile_root__pY3JG:not(.InputFile_empty__7j1BK) .InputFile_addButton__rW719:hover{background-color:var(--active-color-alpha-500)}.InputFile_input__7FR5r{bottom:0;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0}.InputFile_size-s__hsWTE{font-size:16px}.InputFile_size-s__hsWTE .InputFile_border__whRyD,.InputFile_size-s__hsWTE .InputFile_item__qg5I6{border-radius:4px}.InputFile_size-s__hsWTE .InputFile_items__ND1YG{padding:14px}.InputFile_size-s__hsWTE .InputFile_item__qg5I6{height:50px;width:50px}.InputFile_size-m__unA0n{font-size:20px}.InputFile_size-m__unA0n .InputFile_border__whRyD,.InputFile_size-m__unA0n .InputFile_item__qg5I6{border-radius:6px}.InputFile_size-m__unA0n .InputFile_items__ND1YG{padding:16px}.InputFile_size-m__unA0n .InputFile_item__qg5I6{height:70px;width:70px}.InputFile_size-l__wpOVo{font-size:24px}.InputFile_size-l__wpOVo .InputFile_border__whRyD,.InputFile_size-l__wpOVo .InputFile_item__qg5I6{border-radius:8px}.InputFile_size-l__wpOVo .InputFile_items__ND1YG{padding:18px}.InputFile_size-l__wpOVo .InputFile_item__qg5I6{height:100px;width:100px}.InputFile_draggable__M7-3v{position:relative;width:100%}.InputFile_draggable__M7-3v .InputFile_item__qg5I6:not(.InputFile_addButton__rW719){cursor:move}";
|
|
4
4
|
var S = {"root":"InputFile_root__pY3JG","border":"InputFile_border__whRyD","variant-outlined":"InputFile_variant-outlined__f5hnA","variant-default":"InputFile_variant-default__Jqzal","empty":"InputFile_empty__7j1BK","label":"InputFile_label__bAEz-","inner":"InputFile_inner__BQFX7","items":"InputFile_items__ND1YG","item":"InputFile_item__qg5I6","addButton":"InputFile_addButton__rW719","input":"InputFile_input__7FR5r","size-s":"InputFile_size-s__hsWTE","size-m":"InputFile_size-m__unA0n","size-l":"InputFile_size-l__wpOVo","draggable":"InputFile_draggable__M7-3v"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".Label_size-s__CL8do{font-size:16px;padding:0
|
|
3
|
+
var css_248z = ".Label_size-s__CL8do{font-size:16px;padding:0 14px}.Label_size-m__X81DA{font-size:20px;padding:0 16px}.Label_size-l__-2YIE{font-size:24px;padding:0 18px}.Label_size-xl__aeykV{font-size:28px;padding:0 10px 0 20px}.Label_root__TewVm{align-items:center;color:var(--accent-color-alpha-500);display:flex;left:0;padding-bottom:0;padding-top:0;pointer-events:none;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}.Label_root__TewVm,.Label_root__TewVm>div{height:100%;max-width:100%}.Label_gap__zlRrx,.Label_view__Lz9Eu>div{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Label_view__Lz9Eu{align-items:center;-webkit-backface-visibility:hidden;backface-visibility:hidden;display:flex;height:100%;max-width:100%;transform:translateZ(0);transform-origin:top left;transition:transform .15s ease-out}.Label_onTop__7Ntzk .Label_view__Lz9Eu{color:var(--accent-color);padding-bottom:8px;transform:scale(.7) translate3d(0,-50%,0)}.Label_isError__YqI0d .Label_view__Lz9Eu{color:var(--danger-color)}.Label_gapWrap__lDGBB{max-width:100%;opacity:0;padding:inherit;pointer-events:none;position:absolute}.Label_gapWrap__lDGBB:before{border-radius:4px;content:\"\";height:1.4em;left:-6px;position:absolute;right:-6px;z-index:-1}";
|
|
4
4
|
var S = {"size-s":"Label_size-s__CL8do","size-m":"Label_size-m__X81DA","size-l":"Label_size-l__-2YIE","size-xl":"Label_size-xl__aeykV","root":"Label_root__TewVm","view":"Label_view__Lz9Eu","gap":"Label_gap__zlRrx","onTop":"Label_onTop__7Ntzk","isError":"Label_isError__YqI0d","gapWrap":"Label_gapWrap__lDGBB"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".Menu_root__xhtlo{max-height:200px;width:100%}.keyboard .Menu_root__xhtlo{pointer-events:none}.Menu_item__VtmwS{align-items:center;animation:Menu_fadeIn__XRZkT .3s ease-out;cursor:pointer;display:flex;overflow:hidden;padding-bottom:0!important;padding-top:0!important;position:relative;text-align:left;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;width:calc(100% - 2px)}.Menu_item__VtmwS:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.Menu_item__VtmwS:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.Menu_item__VtmwS>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Menu_item__VtmwS.Menu_size-s__DA0r3{font-size:16px;height:34px;padding:0
|
|
3
|
+
var css_248z = ".Menu_root__xhtlo{max-height:200px;width:100%}.keyboard .Menu_root__xhtlo{pointer-events:none}.Menu_item__VtmwS{align-items:center;animation:Menu_fadeIn__XRZkT .3s ease-out;cursor:pointer;display:flex;overflow:hidden;padding-bottom:0!important;padding-top:0!important;position:relative;text-align:left;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;width:calc(100% - 2px)}.Menu_item__VtmwS:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.Menu_item__VtmwS:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.Menu_item__VtmwS>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Menu_item__VtmwS.Menu_size-s__DA0r3{font-size:16px;height:34px;padding:0 14px}.Menu_item__VtmwS.Menu_size-m__0EI47{font-size:20px;height:38px;padding:0 16px}.Menu_item__VtmwS.Menu_size-l__PXpIm{font-size:24px;height:42px;padding:0 18px}.Menu_item__VtmwS.Menu_size-xl__U1WW8{font-size:28px;height:46px;padding:0 20px}.Menu_item__VtmwS.Menu_selected__V71xy{background-color:var(--active-color-alpha-500)}.Menu_item__VtmwS.Menu_disabled__5afRm{cursor:not-allowed;opacity:.4}.keyboard .Menu_item__VtmwS.Menu_focused__FLWqW,.pointer .Menu_item__VtmwS:hover{box-shadow:inset 100vw 0 0 0 var(--accent-color-alpha-200)}.Menu_group__6e-Ef{background-color:var(--decent-color);color:var(--accent-color);font-size:14px;font-weight:500;padding:8px 12px;pointer-events:none;position:sticky;top:0;z-index:1}.Menu_levelIndent__S6HXJ{--menu-indent-size:var(--indent-s)}.Menu_levelIndent__S6HXJ.Menu_level-1__kueO2{padding-left:calc(var(--menu-indent-size)*2)}.Menu_levelIndent__S6HXJ.Menu_level-2__JZGkJ{padding-left:calc(var(--menu-indent-size)*3)}.Menu_levelIndent__S6HXJ.Menu_level-3__LFd-F{padding-left:calc(var(--menu-indent-size)*4)}.Menu_levelIndent__S6HXJ.Menu_level-4__2DUMl{padding-left:calc(var(--menu-indent-size)*5)}.Menu_levelIndent__S6HXJ.Menu_level-5__xpgvQ{padding-left:calc(var(--menu-indent-size)*6)}@keyframes Menu_fadeIn__XRZkT{0%{opacity:0}10%{opacity:0}to{opacity:1}}";
|
|
4
4
|
var S = {"root":"Menu_root__xhtlo","item":"Menu_item__VtmwS","fadeIn":"Menu_fadeIn__XRZkT","size-s":"Menu_size-s__DA0r3","size-m":"Menu_size-m__0EI47","size-l":"Menu_size-l__PXpIm","size-xl":"Menu_size-xl__U1WW8","selected":"Menu_selected__V71xy","disabled":"Menu_disabled__5afRm","focused":"Menu_focused__FLWqW","group":"Menu_group__6e-Ef","levelIndent":"Menu_levelIndent__S6HXJ","level-1":"Menu_level-1__kueO2","level-2":"Menu_level-2__JZGkJ","level-3":"Menu_level-3__LFd-F","level-4":"Menu_level-4__2DUMl","level-5":"Menu_level-5__xpgvQ"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { getId, getPopupId, isLastChild, unsetChild, childs, setChild } from './Popup.helpers.js';
|
|
3
|
+
import { observe, unobserve } from '../../tools/resizeObserver.js';
|
|
2
4
|
import { Component, createRef } from 'react';
|
|
3
|
-
import cn from 'classnames';
|
|
4
|
-
import { createStore } from 'justorm/react';
|
|
5
|
-
import Time from 'timen';
|
|
6
5
|
import { Paranja } from '../Paranja/Paranja.js';
|
|
7
6
|
import { Portal } from '../Portal/Portal.js';
|
|
7
|
+
import S from './Popup.styl.js';
|
|
8
|
+
import Time from 'timen';
|
|
9
|
+
import cn from 'classnames';
|
|
10
|
+
import { createStore } from 'justorm/react';
|
|
11
|
+
import debounce from '../../tools/debounce.js';
|
|
8
12
|
import { getCoords } from '../../tools/dom.js';
|
|
9
|
-
import { observe, unobserve } from '../../tools/resizeObserver.js';
|
|
10
13
|
import { isBrowser } from '../../tools/env.js';
|
|
11
|
-
import debounce from '../../tools/debounce.js';
|
|
12
14
|
import throttle from '../../tools/throttle.js';
|
|
13
|
-
import S from './Popup.styl.js';
|
|
14
|
-
import { getId, getPopupId, isLastChild, unsetChild, childs, setChild } from './Popup.helpers.js';
|
|
15
15
|
|
|
16
16
|
const ANIMATION_DURATION = 100;
|
|
17
17
|
const OFFSET_GAP = 10;
|
|
@@ -311,9 +311,10 @@ class Popup extends Component {
|
|
|
311
311
|
this.changeState(false, this.afterClose);
|
|
312
312
|
};
|
|
313
313
|
changeState(isOpen, callback) {
|
|
314
|
-
const { animated } = this.props;
|
|
314
|
+
const { animated, onOpen, onClose } = this.props;
|
|
315
315
|
this.timers.clear();
|
|
316
316
|
this.store.isOpen = isOpen;
|
|
317
|
+
isOpen ? onOpen?.() : onClose?.();
|
|
317
318
|
if (animated) {
|
|
318
319
|
this.store.animating = true;
|
|
319
320
|
this.timers.after(ANIMATION_DURATION + 500, () => {
|
|
@@ -326,12 +327,12 @@ class Popup extends Component {
|
|
|
326
327
|
}
|
|
327
328
|
}
|
|
328
329
|
afterOpen = () => {
|
|
329
|
-
this.props.
|
|
330
|
+
this.props.onAfterOpen?.();
|
|
330
331
|
};
|
|
331
332
|
afterClose = () => {
|
|
332
333
|
this.store.isContentVisible = false;
|
|
333
334
|
this.dropOffset();
|
|
334
|
-
this.props.
|
|
335
|
+
this.props.onAfterClose?.();
|
|
335
336
|
};
|
|
336
337
|
dropOffset() {
|
|
337
338
|
if (!this.needDropOffset)
|
|
@@ -12,7 +12,6 @@ import { Popup } from '../Popup/Popup.js';
|
|
|
12
12
|
import { RequiredStar } from '../RequiredStar/RequiredStar.js';
|
|
13
13
|
import S from './Select.styl.js';
|
|
14
14
|
import { Scroll } from '../Scroll/Scroll.js';
|
|
15
|
-
import Time from 'timen';
|
|
16
15
|
import cn from 'classnames';
|
|
17
16
|
import compare from 'compareq';
|
|
18
17
|
import { createStore } from 'justorm/react';
|
|
@@ -29,7 +28,6 @@ class Select extends Component {
|
|
|
29
28
|
scrollInnerElem;
|
|
30
29
|
onScrollInnerRef = elem => (this.scrollInnerElem = elem);
|
|
31
30
|
focusedElem;
|
|
32
|
-
timers = Time.create();
|
|
33
31
|
items = [];
|
|
34
32
|
maxIndex = -1;
|
|
35
33
|
isFirstSelectedMeet = false;
|
|
@@ -73,7 +71,6 @@ class Select extends Component {
|
|
|
73
71
|
}
|
|
74
72
|
}
|
|
75
73
|
componentWillUnmount() {
|
|
76
|
-
this.timers.clear();
|
|
77
74
|
this.unDocumetnKeyDown();
|
|
78
75
|
this.unDocumentClick();
|
|
79
76
|
}
|
|
@@ -250,9 +247,6 @@ class Select extends Component {
|
|
|
250
247
|
this.focusedItemId = this.items[index]?.id;
|
|
251
248
|
this.store.focusedItemIndex = index;
|
|
252
249
|
};
|
|
253
|
-
toggle = () => {
|
|
254
|
-
this.store.isOpen = !this.store.isOpen;
|
|
255
|
-
};
|
|
256
250
|
setSearchVal(searchVal) {
|
|
257
251
|
const searchString = String(searchVal);
|
|
258
252
|
this.searchValLower = searchString.toLowerCase();
|
|
@@ -377,7 +371,7 @@ class Select extends Component {
|
|
|
377
371
|
return null;
|
|
378
372
|
}
|
|
379
373
|
getInputVal() {
|
|
380
|
-
const { value
|
|
374
|
+
const { value } = this.props;
|
|
381
375
|
const { isFocused, selected, isOpen } = this.store;
|
|
382
376
|
const searchValue = this.props.searchValue ?? this.store.searchVal;
|
|
383
377
|
if (isFocused) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".Select_root__mjOjv{max-height:200px;max-width:100%;position:relative}.Select_root__mjOjv.Select_disabled__AlOQi{opacity:.4;pointer-events:none}.Select_additionalLabel__K0--Z{flex-grow:1;overflow:hidden;text-align:left;text-overflow:ellipsis}.Select_trigger__OH48f{position:relative;z-index:1}.Select_triggerArrow__1LEop{flex-shrink:0;margin-left:var(--indent-s);transition:transform .2s ease-out}.Select_size-m__jp7n- .Select_triggerArrow__1LEop{margin-left:var(--indent-m)}.Select_size-l__b4EEy .Select_triggerArrow__1LEop{margin-left:var(--indent-l)}.Select_triggerButton__lErtt .Select_triggerArrow__1LEop{margin-right:0}.Select_triggerArrow__1LEop.Select_isOpen__WlMUH{transform:rotateX(-180deg)}.Select_disabled__AlOQi .Select_triggerArrow__1LEop{color:var(--text3-color)}.Select_triggerButton__lErtt{justify-content:space-between;text-align:left;width:100%}.
|
|
4
|
-
var S = {"root":"Select_root__mjOjv","disabled":"Select_disabled__AlOQi","additionalLabel":"Select_additionalLabel__K0--Z","trigger":"Select_trigger__OH48f","triggerArrow":"Select_triggerArrow__1LEop","size-m":"Select_size-m__jp7n-","size-l":"Select_size-l__b4EEy","triggerButton":"Select_triggerButton__lErtt","isOpen":"Select_isOpen__WlMUH","
|
|
3
|
+
var css_248z = ".Select_root__mjOjv{max-height:200px;max-width:100%;position:relative}.Select_root__mjOjv.Select_disabled__AlOQi{opacity:.4;pointer-events:none}.Select_additionalLabel__K0--Z{flex-grow:1;overflow:hidden;text-align:left;text-overflow:ellipsis}.Select_trigger__OH48f{position:relative;z-index:1}.Select_triggerArrow__1LEop{flex-shrink:0;margin-left:var(--indent-s);transition:transform .2s ease-out}.Select_size-m__jp7n- .Select_triggerArrow__1LEop{margin-left:var(--indent-m)}.Select_size-l__b4EEy .Select_triggerArrow__1LEop{margin-left:var(--indent-l)}.Select_triggerButton__lErtt .Select_triggerArrow__1LEop{margin-right:0}.Select_triggerArrow__1LEop.Select_isOpen__WlMUH{transform:rotateX(-180deg)}.Select_disabled__AlOQi .Select_triggerArrow__1LEop{color:var(--text3-color)}.Select_triggerButton__lErtt{justify-content:space-between;text-align:left;width:100%}.Select_triggerButton__lErtt.Select_hasTriggerArrow__vPLad>span{max-width:calc(100% - 22px)}.Select_triggerButton__lErtt.Select_isError__WJJLq{box-shadow:inset 0 0 0 2px var(--danger-color)}.Select_triggerButton__lErtt .Select_triggerButtonLabel__XXLzh{opacity:0;overflow:hidden;text-overflow:ellipsis}.Select_triggerButton__lErtt .Select_triggerButtonLabel__XXLzh.Select_hasSelected__zQhBV{opacity:1}.Select_presetPanel__Yu94r{box-shadow:inset 0 -1px 0 var(--decent-color-alpha-100);display:flex;padding:5px}.Select_presetButton__BAl0q{flex-grow:1;justify-content:center}.Select_presetButton__BAl0q+.Select_presetButton__BAl0q{margin-left:8px}.Select_options__3C0-v{max-height:200px;overflow-y:auto}.keyboard .Select_options__3C0-v{pointer-events:none}.Select_option__iJkfJ{align-items:center;animation:Select_fadeIn__QpAwZ .3s ease-out;cursor:pointer;display:flex;overflow:hidden;padding-bottom:0!important;padding-top:0!important;position:relative;text-align:left;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;width:calc(100% - 2px)}.Select_isTree__SiTaD .Select_option__iJkfJ{min-height:36px}.Select_size-s__qBK9t .Select_option__iJkfJ{font-size:16px;height:26px;padding:0 14px}.Select_size-m__jp7n- .Select_option__iJkfJ{font-size:20px;height:34px;padding:0 16px}.Select_size-l__b4EEy .Select_option__iJkfJ{font-size:24px;height:42px;padding:0 18px}.Select_size-xl__0OerX .Select_option__iJkfJ{font-size:28px;height:50px;padding:0 20px}.Select_option__iJkfJ:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.Select_option__iJkfJ:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.Select_isTree__SiTaD .Select_option__iJkfJ{padding-left:30px}.Select_option__iJkfJ.Select_isGroup__aP1lY{color:var(--accent-color);font-weight:500;pointer-events:none}.Select_isExpanded__rG8R1>.Select_option__iJkfJ{display:flex}.Select_option__iJkfJ>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Select_option__iJkfJ:before{content:\"\";display:inline-block}.Select_option__iJkfJ.Select_level-0__vu03A:before{content:none}.Select_option__iJkfJ.Select_level-1__ozH2U:before{min-width:24px;width:24px}.Select_option__iJkfJ.Select_level-2__XDqeh:before{min-width:48px;width:48px}.Select_option__iJkfJ.Select_level-3__Bc9XS:before{min-width:72px;width:72px}.Select_option__iJkfJ.Select_level-4__KfQcQ:before{min-width:96px;width:96px}.Select_option__iJkfJ.Select_level-5__DGSDM:before{min-width:120px;width:120px}.Select_option__iJkfJ.Select_level-6__p688A:before{min-width:144px;width:144px}.Select_option__iJkfJ.Select_isIndeterminate__dy-xV,.Select_option__iJkfJ.Select_isSelected__n3ZeN{background-color:var(--active-color-alpha-500)}.keyboard .Select_option__iJkfJ.Select_isFocused__oZSgY,.pointer .Select_option__iJkfJ:hover{box-shadow:inset 100vw 0 0 0 var(--accent-color-alpha-200)}.Select_expandButton__UTwlR{background-color:transparent!important;display:flex;height:100%;justify-content:flex-end;overflow:visible;padding:0;position:relative;width:30px}.Select_expandButton__UTwlR:before{content:\"\";display:block;height:calc(100% + 20px);position:absolute;right:0;top:-10;width:100px}.Select_size-m__jp7n- .Select_expandButton__UTwlR{margin-left:-40px}.Select_size-l__b4EEy .Select_expandButton__UTwlR{margin-left:-46px}.Select_expandIcon__gWAIB{-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .1s ease-out}.Select_isExpanded__rG8R1 .Select_expandIcon__gWAIB{transform:rotate(90deg) translateZ(0)}.Select_expandButton__UTwlR:hover .Select_expandIcon__gWAIB{color:var(--primary-color)}@keyframes Select_fadeIn__QpAwZ{0%{opacity:0}10%{opacity:0}to{opacity:1}}";
|
|
4
|
+
var S = {"root":"Select_root__mjOjv","disabled":"Select_disabled__AlOQi","additionalLabel":"Select_additionalLabel__K0--Z","trigger":"Select_trigger__OH48f","triggerArrow":"Select_triggerArrow__1LEop","size-m":"Select_size-m__jp7n-","size-l":"Select_size-l__b4EEy","triggerButton":"Select_triggerButton__lErtt","isOpen":"Select_isOpen__WlMUH","hasTriggerArrow":"Select_hasTriggerArrow__vPLad","isError":"Select_isError__WJJLq","triggerButtonLabel":"Select_triggerButtonLabel__XXLzh","hasSelected":"Select_hasSelected__zQhBV","presetPanel":"Select_presetPanel__Yu94r","presetButton":"Select_presetButton__BAl0q","options":"Select_options__3C0-v","option":"Select_option__iJkfJ","fadeIn":"Select_fadeIn__QpAwZ","isTree":"Select_isTree__SiTaD","size-s":"Select_size-s__qBK9t","size-xl":"Select_size-xl__0OerX","isGroup":"Select_isGroup__aP1lY","isExpanded":"Select_isExpanded__rG8R1","level-0":"Select_level-0__vu03A","level-1":"Select_level-1__ozH2U","level-2":"Select_level-2__XDqeh","level-3":"Select_level-3__Bc9XS","level-4":"Select_level-4__KfQcQ","level-5":"Select_level-5__DGSDM","level-6":"Select_level-6__p688A","isSelected":"Select_isSelected__n3ZeN","isIndeterminate":"Select_isIndeterminate__dy-xV","isFocused":"Select_isFocused__oZSgY","expandButton":"Select_expandButton__UTwlR","expandIcon":"Select_expandIcon__gWAIB"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { S as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DetailedHTMLProps, HTMLAttributes, ReactNode } from 'react';
|
|
2
1
|
import { ComponentType, Size } from '../../types';
|
|
2
|
+
import { DetailedHTMLProps, HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
export type TriggerPropsType = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {
|
|
4
4
|
className?: string;
|
|
5
5
|
};
|
|
@@ -26,7 +26,9 @@ export type Props = ComponentType & {
|
|
|
26
26
|
content: ReactNode;
|
|
27
27
|
contentProps?: any;
|
|
28
28
|
onOpen?: () => void;
|
|
29
|
+
onAfterOpen?: () => void;
|
|
29
30
|
onClose?: () => void;
|
|
31
|
+
onAfterClose?: () => void;
|
|
30
32
|
};
|
|
31
33
|
export type State = {
|
|
32
34
|
isOpen: boolean;
|
|
@@ -11,7 +11,6 @@ export declare class Select extends Component<T.Props, T.State> {
|
|
|
11
11
|
scrollInnerElem: HTMLDivElement;
|
|
12
12
|
onScrollInnerRef: (elem: any) => any;
|
|
13
13
|
focusedElem: HTMLDivElement;
|
|
14
|
-
timers: any;
|
|
15
14
|
items: any[];
|
|
16
15
|
maxIndex: number;
|
|
17
16
|
isFirstSelectedMeet: boolean;
|
|
@@ -53,7 +52,6 @@ export declare class Select extends Component<T.Props, T.State> {
|
|
|
53
52
|
onPopupClose: () => void;
|
|
54
53
|
onOptionHover: any;
|
|
55
54
|
setItemFocus: (index: any) => void;
|
|
56
|
-
toggle: () => void;
|
|
57
55
|
setSearchVal(searchVal: any): void;
|
|
58
56
|
getItems: () => T.Option[];
|
|
59
57
|
getItem: (id: any) => any;
|