@homecode/ui 4.18.59 → 4.18.60
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.
|
@@ -139,9 +139,6 @@ class Select extends Component {
|
|
|
139
139
|
// @ts-ignore
|
|
140
140
|
return { [value]: true };
|
|
141
141
|
}
|
|
142
|
-
isDisabled() {
|
|
143
|
-
return this.props.disabled || this.items.length === 0;
|
|
144
|
-
}
|
|
145
142
|
isClickedInside = elem => elem.closest(`.${S.root}`) || elem.closest(`.${S.options}`);
|
|
146
143
|
onFocusedElemRef = elem => {
|
|
147
144
|
this.focusedElem = elem;
|
|
@@ -580,10 +577,10 @@ class Select extends Component {
|
|
|
580
577
|
return (jsxs("div", { ref: this.contentRef, children: [this.renderPresets(), jsx(Scroll, { y: true, offset: { y: { before: 10, after: 10 } }, className: classes, onInnerRef: this.onScrollInnerRef, children: optionsList }, "items-scroll")] }));
|
|
581
578
|
}
|
|
582
579
|
render() {
|
|
583
|
-
const { className, popupProps, size, error, blur } = this.props;
|
|
580
|
+
const { className, popupProps, size, error, blur, disabled } = this.props;
|
|
584
581
|
const { isOpen, isFocused } = this.store;
|
|
585
582
|
const classes = cn(S.root, className, S[`size-${size}`]);
|
|
586
|
-
return (jsxs(Fragment, { children: [jsx(Popup, { className: classes, direction: "bottom", size: size, focusControl: true, hoverControl: isFocused, blur: blur, isOpen: isOpen, ...popupProps, onOpen: this.onPopupOpen, onClose: this.onPopupClose,
|
|
583
|
+
return (jsxs(Fragment, { children: [jsx(Popup, { className: classes, direction: "bottom", size: size, focusControl: true, hoverControl: isFocused, blur: blur, isOpen: isOpen, disabled: disabled, ...popupProps, onOpen: this.onPopupOpen, onClose: this.onPopupClose, trigger: this.renderTrigger(), triggerProps: {
|
|
587
584
|
onFocus: this.onFocus,
|
|
588
585
|
onBlur: this.onBlur,
|
|
589
586
|
}, content: this.renderOptionsList() }), this.isErrorVisible() && (jsx(AssistiveText, { variant: "danger", size: size, children: error }))] }));
|
|
@@ -35,7 +35,6 @@ export declare class Select extends Component<T.Props, T.State> {
|
|
|
35
35
|
coerceType(id: any): any;
|
|
36
36
|
getDefaultExpanded(value: any): {};
|
|
37
37
|
getDefaultSelected(): any;
|
|
38
|
-
isDisabled(): boolean;
|
|
39
38
|
isClickedInside: (elem: any) => any;
|
|
40
39
|
onFocusedElemRef: (elem: any) => void;
|
|
41
40
|
onDocumentClick: (e: any) => void;
|
package/package.json
CHANGED
package/test_output.log
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
! Corepack is about to download https://registry.yarnpkg.com/yarn/-/yarn-1.22.22.tgz
|
|
2
|
+
yarn run v1.22.22
|
|
3
|
+
$ jest
|
|
4
|
+
ts-jest[ts-jest-transformer] (WARN) Define `ts-jest` config under `globals` is deprecated. Please do
|
|
5
|
+
transform: {
|
|
6
|
+
<transform_regex>: ['ts-jest', { /* ts-jest config goes here in Jest */ }],
|
|
7
|
+
},
|
|
8
|
+
See more at https://kulshekhar.github.io/ts-jest/docs/getting-started/presets#advanced
|
|
9
|
+
ts-jest[ts-jest-transformer] (WARN) Define `ts-jest` config under `globals` is deprecated. Please do
|
|
10
|
+
transform: {
|
|
11
|
+
<transform_regex>: ['ts-jest', { /* ts-jest config goes here in Jest */ }],
|
|
12
|
+
},
|
|
13
|
+
See more at https://kulshekhar.github.io/ts-jest/docs/getting-started/presets#advanced
|
|
14
|
+
Terminated
|
|
15
|
+
error Command failed with exit code 143.
|
|
16
|
+
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
|