@jetbrains/ring-ui-built 7.0.100 → 7.0.102
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/components/expand/collapsible-group.d.ts +16 -0
- package/components/expand/collapsible-group.js +381 -0
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/pager/pager.js +1 -0
- package/components/select/chevron-button.d.ts +6 -0
- package/components/select/chevron-button.js +82 -0
- package/components/select/select.js +5 -8
- package/components/style.css +1 -1
- package/components/tags-input/tags-input.d.ts +1 -0
- package/components/tags-input/tags-input.js +16 -10
- package/package.json +1 -1
|
@@ -10,8 +10,8 @@ import { S as Size, i as inputStyles } from '../_helpers/input.js';
|
|
|
10
10
|
import { ControlsHeightContext } from '../global/controls-height.js';
|
|
11
11
|
import getUID from '../global/get-uid.js';
|
|
12
12
|
import { ControlLabel } from '../control-label/control-label.js';
|
|
13
|
+
import ChevronButton from '../select/chevron-button.js';
|
|
13
14
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
14
|
-
import '@jetbrains/icons/chevron-down';
|
|
15
15
|
import '@jetbrains/icons/close-12px';
|
|
16
16
|
import 'dequal';
|
|
17
17
|
import '../global/data-tests.js';
|
|
@@ -19,6 +19,7 @@ import '../global/typescript-utils.js';
|
|
|
19
19
|
import '../_helpers/anchor.js';
|
|
20
20
|
import 'react-compiler-runtime';
|
|
21
21
|
import '../button/button.js';
|
|
22
|
+
import '@jetbrains/icons/chevron-down';
|
|
22
23
|
import '@jetbrains/icons/chevron-12px-down';
|
|
23
24
|
import 'util-deprecate';
|
|
24
25
|
import '../icon/icon.js';
|
|
@@ -80,13 +81,13 @@ import '../text/text.js';
|
|
|
80
81
|
import '../_helpers/select-filter.js';
|
|
81
82
|
import '../tag/tag.js';
|
|
82
83
|
|
|
83
|
-
var styles = {"outerContainer":"ring-input-outerContainer","container":"ring-input-container","input":"ring-input-input","tagsInput":"ring-tags-input-tagsInput","tagsInputDisabled":"ring-tags-input-tagsInputDisabled","tagsInputFocused":"ring-tags-input-tagsInputFocused","tagsList":"ring-tags-input-tagsList","tagsSelect":"ring-tags-input-tagsSelect"};
|
|
84
|
+
var styles = {"outerContainer":"ring-input-outerContainer","container":"ring-input-container","input":"ring-input-input","tagsInput":"ring-tags-input-tagsInput","tagsInputDisabled":"ring-tags-input-tagsInputDisabled","tagsInputFocused":"ring-tags-input-tagsInputFocused","tagsList":"ring-tags-input-tagsList","error":"ring-tags-input-error","tagInputChevronButton":"ring-tags-input-tagInputChevronButton","tagsSelect":"ring-tags-input-tagsSelect"};
|
|
84
85
|
|
|
85
86
|
function noop() {}
|
|
86
87
|
/**
|
|
87
88
|
* @name Tags Input
|
|
88
89
|
*/
|
|
89
|
-
const POPUP_VERTICAL_SHIFT = 2;
|
|
90
|
+
const POPUP_VERTICAL_SHIFT = -2;
|
|
90
91
|
class TagsInput extends PureComponent {
|
|
91
92
|
static defaultProps = {
|
|
92
93
|
dataSource: noop,
|
|
@@ -205,7 +206,7 @@ class TagsInput extends PureComponent {
|
|
|
205
206
|
}, this.focusInput);
|
|
206
207
|
}
|
|
207
208
|
clickHandler = event => {
|
|
208
|
-
if (event.target !== this.node && event.target.parentElement !== this.node) {
|
|
209
|
+
if (event.target !== this.node && event.target.parentElement !== this.node && !this.node?.querySelector(`.${styles.tagInputChevronButton}`)?.contains(event.target)) {
|
|
209
210
|
return;
|
|
210
211
|
}
|
|
211
212
|
// eslint-disable-next-line no-underscore-dangle
|
|
@@ -341,7 +342,8 @@ class TagsInput extends PureComponent {
|
|
|
341
342
|
size,
|
|
342
343
|
labelType,
|
|
343
344
|
height = typeof this.context === 'function' ? this.context() : this.context,
|
|
344
|
-
label
|
|
345
|
+
label,
|
|
346
|
+
error
|
|
345
347
|
} = this.props;
|
|
346
348
|
const classes = classNames(styles.tagsInput, size !== Size.AUTO && [inputStyles[`size${size}`]], [inputStyles[`height${height}`]], {
|
|
347
349
|
[styles.tagsInputDisabled]: disabled,
|
|
@@ -359,16 +361,18 @@ class TagsInput extends PureComponent {
|
|
|
359
361
|
disabled: disabled,
|
|
360
362
|
type: labelType,
|
|
361
363
|
children: label
|
|
362
|
-
}), /*#__PURE__*/
|
|
364
|
+
}), /*#__PURE__*/jsxs(TagsList, {
|
|
363
365
|
tags: tags,
|
|
364
366
|
activeIndex: activeIndex,
|
|
365
367
|
disabled: disabled,
|
|
366
368
|
canNotBeEmpty: canNotBeEmpty,
|
|
367
369
|
handleRemove: this.handleRemove,
|
|
368
|
-
className: styles.tagsList,
|
|
370
|
+
className: classNames(styles.tagsList, error != null && styles.error),
|
|
369
371
|
handleClick: this.handleClick,
|
|
370
372
|
customTagComponent: this.props.customTagComponent,
|
|
371
|
-
children: /*#__PURE__*/jsx(
|
|
373
|
+
children: [/*#__PURE__*/jsx(ChevronButton, {
|
|
374
|
+
className: styles.tagInputChevronButton
|
|
375
|
+
}), /*#__PURE__*/jsx(Select, {
|
|
372
376
|
id: this.id,
|
|
373
377
|
ref: this.selectRef,
|
|
374
378
|
size: Select.Size.AUTO,
|
|
@@ -395,8 +399,10 @@ class TagsInput extends PureComponent {
|
|
|
395
399
|
disabled: this.props.disabled,
|
|
396
400
|
loadingMessage: this.props.loadingMessage,
|
|
397
401
|
notFoundMessage: this.props.notFoundMessage,
|
|
398
|
-
hint: this.props.hint
|
|
399
|
-
|
|
402
|
+
hint: this.props.hint,
|
|
403
|
+
error: error,
|
|
404
|
+
targetElement: this.node
|
|
405
|
+
})]
|
|
400
406
|
})]
|
|
401
407
|
});
|
|
402
408
|
}
|