@jetbrains/ring-ui-built 7.0.11 → 7.0.13
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/_helpers/anchor.js +2 -2
- package/components/_helpers/button__classes.js +1 -1
- package/components/_helpers/caption.js +2 -2
- package/components/_helpers/card.js +19 -19
- package/components/_helpers/icon__svg.js +2 -2
- package/components/_helpers/input.js +11 -11
- package/components/_helpers/query-assist__suggestions.js +5 -5
- package/components/_helpers/select__filter.js +4 -4
- package/components/_helpers/services-link.js +4 -4
- package/components/_helpers/sidebar.js +6 -6
- package/components/_helpers/tab-link.js +7 -7
- package/components/_helpers/theme.js +7 -7
- package/components/_helpers/title.js +5 -5
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/alert.js +7 -8
- package/components/alert/container.js +2 -2
- package/components/alert-service/alert-service.d.ts +1 -1
- package/components/alert-service/alert-service.js +7 -4
- package/components/auth/auth.js +2 -2
- package/components/auth/auth__core.js +1 -1
- package/components/auth/down-notification.js +9 -9
- package/components/auth/iframe-flow.js +2 -2
- package/components/auth/storage.js +1 -1
- package/components/auth-dialog/auth-dialog.d.ts +1 -1
- package/components/auth-dialog/auth-dialog.js +10 -10
- package/components/auth-dialog-service/auth-dialog-service.js +6 -3
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.js +10 -7
- package/components/avatar/fallback-avatar.d.ts +1 -1
- package/components/avatar/fallback-avatar.js +12 -12
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/breadcrumbs.js +2 -3
- package/components/button/button.d.ts +1 -1
- package/components/button/button.js +7 -7
- package/components/button-group/button-group.d.ts +1 -1
- package/components/button-group/button-group.js +8 -5
- package/components/button-group/caption.d.ts +1 -1
- package/components/button-group/caption.js +1 -1
- package/components/button-set/button-set.d.ts +1 -1
- package/components/button-set/button-set.js +5 -2
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.js +5 -2
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.js +15 -9
- package/components/clipboard/clipboard.js +1 -1
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +4 -4
- package/components/collapse/collapse-content.js +4 -4
- package/components/collapse/collapse-control.js +5 -2
- package/components/collapse/collapse.js +6 -3
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/confirm.js +11 -8
- package/components/confirm-service/confirm-service.js +3 -3
- package/components/content-layout/content-layout.d.ts +1 -1
- package/components/content-layout/content-layout.js +6 -3
- package/components/content-layout/sidebar.d.ts +1 -1
- package/components/content-layout/sidebar.js +1 -1
- package/components/contenteditable/contenteditable.d.ts +2 -2
- package/components/contenteditable/contenteditable.js +7 -5
- package/components/control-help/control-help.d.ts +1 -1
- package/components/control-help/control-help.js +2 -2
- package/components/control-label/control-label.js +2 -3
- package/components/data-list/data-list.d.ts +3 -3
- package/components/data-list/data-list.js +8 -8
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.js +58 -58
- package/components/data-list/item.d.ts +2 -2
- package/components/data-list/item.js +13 -13
- package/components/data-list/title.d.ts +1 -1
- package/components/data-list/title.js +1 -1
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/date-input.js +2 -2
- package/components/date-picker/date-picker.d.ts +1 -1
- package/components/date-picker/date-picker.js +10 -10
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/date-popup.js +9 -9
- package/components/date-picker/day.d.ts +1 -1
- package/components/date-picker/day.js +2 -3
- package/components/date-picker/month-names.d.ts +1 -1
- package/components/date-picker/month-names.js +6 -6
- package/components/date-picker/month-slider.d.ts +1 -1
- package/components/date-picker/month-slider.js +3 -3
- package/components/date-picker/month.d.ts +1 -1
- package/components/date-picker/month.js +6 -6
- package/components/date-picker/months.d.ts +1 -1
- package/components/date-picker/months.js +6 -6
- package/components/date-picker/weekdays.d.ts +1 -1
- package/components/date-picker/weekdays.js +3 -3
- package/components/date-picker/years.d.ts +1 -1
- package/components/date-picker/years.js +3 -3
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.js +15 -12
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/anchor.js +1 -1
- package/components/dropdown/dropdown.d.ts +1 -1
- package/components/dropdown/dropdown.js +7 -5
- package/components/dropdown-menu/dropdown-menu.js +8 -8
- package/components/editable-heading/editable-heading.d.ts +2 -2
- package/components/editable-heading/editable-heading.js +15 -15
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.js +7 -4
- package/components/error-message/error-message.d.ts +1 -1
- package/components/error-message/error-message.js +9 -6
- package/components/footer/footer.js +8 -8
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/create-stateful-context.js +3 -3
- package/components/global/focus-sensor-hoc.js +2 -2
- package/components/global/react-dom-renderer.d.ts +1 -1
- package/components/global/react-dom-renderer.js +2 -2
- package/components/global/rerender-hoc.js +3 -3
- package/components/global/theme.js +1 -1
- package/components/grid/col.d.ts +1 -1
- package/components/grid/col.js +2 -2
- package/components/grid/grid.d.ts +1 -1
- package/components/grid/grid.js +5 -2
- package/components/grid/row.d.ts +1 -1
- package/components/grid/row.js +2 -2
- package/components/group/group.d.ts +1 -1
- package/components/group/group.js +5 -2
- package/components/header/header-icon.d.ts +1 -1
- package/components/header/header-icon.js +2 -2
- package/components/header/header.d.ts +1 -1
- package/components/header/header.js +9 -3
- package/components/header/links.d.ts +1 -1
- package/components/header/links.js +3 -2
- package/components/header/logo.d.ts +1 -1
- package/components/header/logo.js +3 -3
- package/components/header/profile.d.ts +1 -1
- package/components/header/profile.js +11 -11
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.js +1 -1
- package/components/header/services.d.ts +1 -1
- package/components/header/services.js +8 -8
- package/components/header/smart-profile.d.ts +1 -1
- package/components/header/smart-profile.js +2 -2
- package/components/header/smart-services.d.ts +1 -1
- package/components/header/smart-services.js +2 -2
- package/components/header/tray.d.ts +1 -1
- package/components/header/tray.js +3 -3
- package/components/heading/heading.js +9 -6
- package/components/i18n/i18n-context.js +2 -2
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/icon.js +4 -4
- package/components/icon/icon__svg.d.ts +1 -1
- package/components/icon/icon__svg.js +1 -1
- package/components/icon/index.js +1 -1
- package/components/input/input.d.ts +1 -1
- package/components/input/input.js +1 -1
- package/components/island/adaptive-island-hoc.d.ts +2 -2
- package/components/island/adaptive-island-hoc.js +4 -4
- package/components/island/content.d.ts +1 -1
- package/components/island/content.js +6 -6
- package/components/island/header.d.ts +1 -1
- package/components/island/header.js +5 -5
- package/components/island/island.d.ts +3 -3
- package/components/island/island.js +5 -2
- package/components/link/clickableLink.d.ts +1 -1
- package/components/link/clickableLink.js +2 -2
- package/components/link/link.d.ts +4 -4
- package/components/link/link.js +3 -3
- package/components/list/list.d.ts +6 -6
- package/components/list/list.js +20 -21
- package/components/list/list__custom.d.ts +1 -1
- package/components/list/list__custom.js +2 -2
- package/components/list/list__hint.d.ts +1 -1
- package/components/list/list__hint.js +6 -2
- package/components/list/list__item.d.ts +1 -1
- package/components/list/list__item.js +19 -15
- package/components/list/list__link.d.ts +1 -1
- package/components/list/list__link.js +6 -2
- package/components/list/list__separator.d.ts +1 -1
- package/components/list/list__separator.js +2 -2
- package/components/list/list__title.d.ts +1 -1
- package/components/list/list__title.js +4 -4
- package/components/list/list__users-groups-source.js +1 -1
- package/components/loader/loader.d.ts +1 -1
- package/components/loader/loader.js +8 -2
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-inline/loader-inline.js +7 -4
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/loader-screen/loader-screen.js +6 -3
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/login-dialog.js +6 -6
- package/components/login-dialog/service.js +3 -3
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/markdown.js +5 -2
- package/components/message/message.d.ts +1 -1
- package/components/message/message.js +14 -11
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/pager/pager.d.ts +5 -5
- package/components/pager/pager.js +21 -21
- package/components/panel/panel.d.ts +1 -1
- package/components/panel/panel.js +5 -2
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/popup.js +9 -11
- package/components/popup/popup.target.js +3 -3
- package/components/popup-menu/popup-menu.d.ts +1 -1
- package/components/popup-menu/popup-menu.js +6 -3
- package/components/progress-bar/progress-bar.d.ts +1 -1
- package/components/progress-bar/progress-bar.js +6 -3
- package/components/query-assist/query-assist.d.ts +2 -2
- package/components/query-assist/query-assist.js +20 -22
- package/components/query-assist/query-assist__suggestions.d.ts +1 -1
- package/components/query-assist/query-assist__suggestions.js +1 -1
- package/components/radio/radio.d.ts +1 -1
- package/components/radio/radio.js +5 -2
- package/components/radio/radio__item.d.ts +1 -1
- package/components/radio/radio__item.js +8 -8
- package/components/scrollable-section/scrollable-section.d.ts +1 -1
- package/components/scrollable-section/scrollable-section.js +2 -2
- package/components/select/select.d.ts +3 -3
- package/components/select/select.js +35 -34
- package/components/select/select__filter.d.ts +1 -1
- package/components/select/select__filter.js +1 -1
- package/components/select/select__popup.d.ts +7 -7
- package/components/select/select__popup.js +18 -18
- package/components/shortcuts/shortcuts-hoc.d.ts +2 -2
- package/components/shortcuts/shortcuts-hoc.js +3 -3
- package/components/slider/slider.js +9 -10
- package/components/storage/storage.js +1 -1
- package/components/storage/storage__local.js +1 -1
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +5 -5
- package/components/table/cell.d.ts +1 -1
- package/components/table/cell.js +2 -2
- package/components/table/disable-hover-hoc.d.ts +2 -2
- package/components/table/disable-hover-hoc.js +2 -2
- package/components/table/header-cell.d.ts +1 -1
- package/components/table/header-cell.js +5 -5
- package/components/table/header.d.ts +2 -2
- package/components/table/header.js +8 -8
- package/components/table/multitable.d.ts +1 -1
- package/components/table/multitable.js +2 -2
- package/components/table/row-with-focus-sensor.d.ts +1 -1
- package/components/table/row-with-focus-sensor.js +2 -2
- package/components/table/row.d.ts +1 -1
- package/components/table/row.js +12 -12
- package/components/table/selection-shortcuts-hoc.js +2 -2
- package/components/table/simple-table.d.ts +1 -1
- package/components/table/simple-table.js +2 -2
- package/components/table/smart-table.d.ts +1 -1
- package/components/table/smart-table.js +2 -2
- package/components/table/table.d.ts +4 -4
- package/components/table/table.js +17 -14
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/collapsible-more.js +8 -8
- package/components/tabs/collapsible-tab.d.ts +1 -1
- package/components/tabs/collapsible-tab.js +3 -3
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +6 -6
- package/components/tabs/dumb-tabs.d.ts +2 -3
- package/components/tabs/dumb-tabs.js +6 -6
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/smart-tabs.js +2 -2
- package/components/tabs/tab-link.d.ts +1 -1
- package/components/tabs/tab-link.js +1 -1
- package/components/tabs/tab.d.ts +1 -1
- package/components/tabs/tab.js +2 -2
- package/components/tabs/tabs.js +1 -1
- package/components/tag/tag.d.ts +5 -5
- package/components/tag/tag.js +12 -9
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/tags-input/tags-input.js +5 -5
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +2 -2
- package/components/text/text.d.ts +1 -1
- package/components/text/text.js +2 -2
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.js +9 -9
- package/components/tooltip/tooltip.d.ts +1 -1
- package/components/tooltip/tooltip.js +6 -6
- package/components/user-agreement/service.js +7 -7
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.js +13 -13
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.js +1 -1
- package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
- package/components/user-card/smart-user-card-tooltip.js +4 -4
- package/components/user-card/tooltip.d.ts +2 -2
- package/components/user-card/tooltip.js +4 -4
- package/components/user-card/user-card.js +1 -1
- package/package.json +2 -2
@@ -1,5 +1,6 @@
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
3
4
|
import { PureComponent } from 'react';
|
4
5
|
import classNames from 'classnames';
|
5
6
|
import searchIcon from '@jetbrains/icons/search';
|
@@ -23,7 +24,6 @@ import { ControlsHeight } from '../global/controls-height.js';
|
|
23
24
|
import { createComposedRef } from '../global/composeRefs.js';
|
24
25
|
import { DEFAULT_DIRECTIONS } from '../popup/popup.consts.js';
|
25
26
|
import { s as styles, S as SelectFilter } from '../_helpers/select__filter.js';
|
26
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
27
27
|
import 'util-deprecate';
|
28
28
|
import '../icon/icon__constants.js';
|
29
29
|
import '../_helpers/icon__svg.js';
|
@@ -148,13 +148,13 @@ class SelectPopup extends PureComponent {
|
|
148
148
|
var _multiple$renderSelec;
|
149
149
|
const multiple = this.props.multiple;
|
150
150
|
const activeFilters = this.props.data.filter(item => !item.disabled);
|
151
|
-
return Array.isArray(this.props.selected) &&
|
151
|
+
return Array.isArray(this.props.selected) && jsxs("div", {
|
152
152
|
className: styles.selectAll,
|
153
|
-
children: [activeFilters.length === 0 ?
|
153
|
+
children: [activeFilters.length === 0 ? jsx("span", {}) : jsx(Button, {
|
154
154
|
inline: true,
|
155
155
|
onClick: this.handleSelectAll,
|
156
156
|
children: activeFilters.length !== this.props.selected.length ? multiple.selectAllLabel || 'Select all' : multiple.deselectAllLabel || 'Deselect all'
|
157
|
-
}), ((_multiple$renderSelec = multiple.renderSelectedItemsDescription) === null || _multiple$renderSelec === void 0 ? void 0 : _multiple$renderSelec.call(multiple, this.props.selected, activeFilters.length)) ||
|
157
|
+
}), ((_multiple$renderSelec = multiple.renderSelectedItemsDescription) === null || _multiple$renderSelec === void 0 ? void 0 : _multiple$renderSelec.call(multiple, this.props.selected, activeFilters.length)) || jsx(Text, {
|
158
158
|
info: true,
|
159
159
|
children: "".concat(this.props.selected.length, " selected")
|
160
160
|
})]
|
@@ -296,14 +296,14 @@ class SelectPopup extends PureComponent {
|
|
296
296
|
getFilter() {
|
297
297
|
if (this.props.filter || this.props.tags) {
|
298
298
|
var _this$props$filterIco;
|
299
|
-
return
|
299
|
+
return jsxs("div", {
|
300
300
|
className: styles.filterWrapper,
|
301
301
|
"data-test": "ring-select-popup-filter",
|
302
|
-
children: [!this.props.tags &&
|
302
|
+
children: [!this.props.tags && jsx(Icon, {
|
303
303
|
glyph: (_this$props$filterIco = this.props.filterIcon) !== null && _this$props$filterIco !== void 0 ? _this$props$filterIco : searchIcon,
|
304
304
|
className: styles.filterIcon,
|
305
305
|
"data-test-custom": "ring-select-popup-filter-icon"
|
306
|
-
}),
|
306
|
+
}), jsx(FilterWithShortcuts, {
|
307
307
|
rgShortcutsOptions: this.state.popupFilterShortcutsOptions,
|
308
308
|
rgShortcutsMap: this.popupFilterShortcutsMap,
|
309
309
|
value: this.props.filterValue,
|
@@ -334,8 +334,8 @@ class SelectPopup extends PureComponent {
|
|
334
334
|
return undefined;
|
335
335
|
}
|
336
336
|
getTags() {
|
337
|
-
return Array.isArray(this.props.selected) &&
|
338
|
-
children:
|
337
|
+
return Array.isArray(this.props.selected) && jsx("div", {
|
338
|
+
children: jsx(TagsList, {
|
339
339
|
tags: this.props.selected,
|
340
340
|
activeIndex: this.state.tagsActiveIndex,
|
341
341
|
handleRemove: this.handleRemoveTag,
|
@@ -350,7 +350,7 @@ class SelectPopup extends PureComponent {
|
|
350
350
|
const classes = classNames([styles.filterWithTags, {
|
351
351
|
[styles.filterWithTagsFocused]: !this.state.popupFilterShortcutsOptions.disabled
|
352
352
|
}]);
|
353
|
-
return
|
353
|
+
return jsxs("div", {
|
354
354
|
className: classes,
|
355
355
|
children: [this.getTags(), this.getFilter()]
|
356
356
|
});
|
@@ -364,11 +364,11 @@ class SelectPopup extends PureComponent {
|
|
364
364
|
data
|
365
365
|
} = this.props;
|
366
366
|
const hasMoreThanOneItem = data.length > 1;
|
367
|
-
return (loading || message) &&
|
367
|
+
return (loading || message) && jsxs("div", {
|
368
368
|
className: classNames(styles.bottomLine, {
|
369
369
|
[styles.bottomLineOverItem]: hasMoreThanOneItem
|
370
370
|
}),
|
371
|
-
children: [loading &&
|
371
|
+
children: [loading && jsx(LoaderInline, {}), message && jsx("div", {
|
372
372
|
className: styles.message,
|
373
373
|
children: message
|
374
374
|
})]
|
@@ -388,7 +388,7 @@ class SelectPopup extends PureComponent {
|
|
388
388
|
if (this.props.toolbar) {
|
389
389
|
maxHeight -= TOOLBAR_HEIGHT;
|
390
390
|
}
|
391
|
-
return
|
391
|
+
return jsx(List, {
|
392
392
|
id: this.props.listId,
|
393
393
|
maxHeight: maxHeight,
|
394
394
|
data: this.props.data,
|
@@ -432,14 +432,14 @@ class SelectPopup extends PureComponent {
|
|
432
432
|
filter
|
433
433
|
} = this.props;
|
434
434
|
const classes = classNames(styles.popup, className);
|
435
|
-
return
|
435
|
+
return jsx(PopupTargetContext.Consumer, {
|
436
436
|
children: ringPopupTarget => {
|
437
437
|
const filterWithTags = this.getFilterWithTags();
|
438
438
|
const selectAll = multiple && typeof multiple === 'object' && !multiple.limit && multiple.selectAll && this.getSelectAll();
|
439
439
|
const list = this.getList(this.props.ringPopupTarget || ringPopupTarget);
|
440
440
|
const bottomLine = this.getBottomLine();
|
441
441
|
const hasContent = filterWithTags || selectAll || list || bottomLine || toolbar || topbar;
|
442
|
-
return
|
442
|
+
return jsx(Popup, {
|
443
443
|
trapFocus: false,
|
444
444
|
ref: this.popupRef,
|
445
445
|
hidden: hidden || !hasContent,
|
@@ -459,12 +459,12 @@ class SelectPopup extends PureComponent {
|
|
459
459
|
autoCorrectTopOverflow: false,
|
460
460
|
style: style,
|
461
461
|
largeBorderRadius: true,
|
462
|
-
children:
|
462
|
+
children: jsxs("div", {
|
463
463
|
dir: dir,
|
464
|
-
children: [!hidden && filter &&
|
464
|
+
children: [!hidden && filter && jsx(Shortcuts, {
|
465
465
|
map: this.shortcutsMap,
|
466
466
|
scope: this.shortcutsScope
|
467
|
-
}), topbar, hidden ?
|
467
|
+
}), topbar, hidden ? jsx("div", {}) : filterWithTags, selectAll, list, bottomLine, toolbar]
|
468
468
|
})
|
469
469
|
});
|
470
470
|
}
|
@@ -10,7 +10,7 @@ export interface ShortcutsHOCProps {
|
|
10
10
|
export default function shortcutsHOC<P extends {}>(ComposedComponent: ComponentType<P> | string): {
|
11
11
|
new (props: P & ShortcutsHOCProps): {
|
12
12
|
_shortcutsScopeUid: string;
|
13
|
-
render(): import("react").JSX.Element;
|
13
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
14
14
|
context: unknown;
|
15
15
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P & ShortcutsHOCProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
16
16
|
forceUpdate(callback?: (() => void) | undefined): void;
|
@@ -34,7 +34,7 @@ export default function shortcutsHOC<P extends {}>(ComposedComponent: ComponentT
|
|
34
34
|
};
|
35
35
|
new (props: P & ShortcutsHOCProps, context: any): {
|
36
36
|
_shortcutsScopeUid: string;
|
37
|
-
render(): import("react").JSX.Element;
|
37
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
38
38
|
context: unknown;
|
39
39
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P & ShortcutsHOCProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
40
40
|
forceUpdate(callback?: (() => void) | undefined): void;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
3
4
|
import { Component } from 'react';
|
4
5
|
import getUID from '../global/get-uid.js';
|
5
6
|
import Shortcuts from './shortcuts.js';
|
6
|
-
import { jsx } from 'react/jsx-runtime';
|
7
7
|
import './core.js';
|
8
8
|
import 'core-js/modules/es.regexp.exec.js';
|
9
9
|
import 'combokeys';
|
@@ -24,12 +24,12 @@ function shortcutsHOC(ComposedComponent) {
|
|
24
24
|
rgShortcutsMap
|
25
25
|
} = _this$props,
|
26
26
|
props = _objectWithoutProperties(_this$props, _excluded);
|
27
|
-
return
|
27
|
+
return jsx(Shortcuts, {
|
28
28
|
scope: this._shortcutsScopeUid,
|
29
29
|
map: rgShortcutsMap,
|
30
30
|
options: rgShortcutsOptions,
|
31
31
|
disabled: rgShortcutsOptions.disabled,
|
32
|
-
children:
|
32
|
+
children: jsx(ComposedComponent, _objectSpread2({}, props))
|
33
33
|
});
|
34
34
|
}
|
35
35
|
};
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.reverse.js';
|
3
3
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
4
5
|
import { useRef, useState, useMemo, useCallback, useEffect, Fragment } from 'react';
|
5
6
|
import classNames from 'classnames';
|
6
7
|
import { isArray } from '../global/typescript-utils.js';
|
7
8
|
import Shortcuts from '../shortcuts/shortcuts.js';
|
8
9
|
import getUID from '../global/get-uid.js';
|
9
10
|
import { toRange, validateValue, calculateMarks, toPercent, calculateValue, adjustValues, HUNDRED } from './slider.utils.js';
|
10
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
11
11
|
import '../shortcuts/core.js';
|
12
12
|
import 'core-js/modules/es.regexp.exec.js';
|
13
13
|
import 'combokeys';
|
@@ -165,7 +165,7 @@ const Slider = _ref => {
|
|
165
165
|
window.removeEventListener('mouseup', handleMouseUp);
|
166
166
|
};
|
167
167
|
}, [isDragging, handleMouseMove, handleMouseUp, disabled]);
|
168
|
-
return
|
168
|
+
return jsxs("div", {
|
169
169
|
ref: ref,
|
170
170
|
role: "presentation" // contains interactive elements
|
171
171
|
,
|
@@ -175,15 +175,15 @@ const Slider = _ref => {
|
|
175
175
|
}),
|
176
176
|
tabIndex: -1,
|
177
177
|
onMouseDown: handleMouseDown,
|
178
|
-
children: [
|
178
|
+
children: [jsx(Shortcuts, {
|
179
179
|
map: shortcutsMap,
|
180
180
|
scope: shortcutsScope
|
181
|
-
}),
|
181
|
+
}), jsx("div", {
|
182
182
|
className: classNames(styles.rail, {
|
183
183
|
[styles.rounded]: !showTicks,
|
184
184
|
[styles.disabled]: disabled
|
185
185
|
})
|
186
|
-
}),
|
186
|
+
}), jsx("div", {
|
187
187
|
style: {
|
188
188
|
left: "".concat(trackStart, "%"),
|
189
189
|
width: "".concat(trackLength, "%")
|
@@ -195,10 +195,9 @@ const Slider = _ref => {
|
|
195
195
|
}), validValues.map((numValue, index) => {
|
196
196
|
const percent = toPercent(numValue, min, max);
|
197
197
|
return (
|
198
|
-
/*#__PURE__*/
|
199
198
|
// eslint-disable-next-line react/no-array-index-key
|
200
199
|
jsxs(Fragment, {
|
201
|
-
children: [
|
200
|
+
children: [jsx("div", {
|
202
201
|
tabIndex: 0,
|
203
202
|
"aria-label": "Pick value",
|
204
203
|
role: "slider",
|
@@ -214,7 +213,7 @@ const Slider = _ref => {
|
|
214
213
|
[styles.dragged]: isDragging && draggedIndex === index
|
215
214
|
}),
|
216
215
|
onMouseDown: handleMouseDown
|
217
|
-
}), showTag &&
|
216
|
+
}), showTag && jsx("div", {
|
218
217
|
style: {
|
219
218
|
left: "".concat(percent, "%")
|
220
219
|
},
|
@@ -232,7 +231,7 @@ const Slider = _ref => {
|
|
232
231
|
label
|
233
232
|
} = _ref8;
|
234
233
|
const percent = toPercent(markValue, min, max);
|
235
|
-
return
|
234
|
+
return jsx("div", {
|
236
235
|
style: {
|
237
236
|
left: "".concat(percent, "%")
|
238
237
|
},
|
@@ -247,7 +246,7 @@ const Slider = _ref => {
|
|
247
246
|
} = _ref9;
|
248
247
|
const percent = toPercent(tickValue, min, max);
|
249
248
|
const isActive = isRange ? tickValue >= validValues[0] && tickValue <= validValues[validValues.length - 1] : tickValue <= validValues[0];
|
250
|
-
return
|
249
|
+
return jsx("div", {
|
251
250
|
className: classNames(styles.tick, {
|
252
251
|
[styles.active]: isActive,
|
253
252
|
[styles.disabled]: disabled
|
@@ -2,6 +2,7 @@ import LocalStorage from './storage__local.js';
|
|
2
2
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
3
3
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
4
4
|
import '../alert-service/alert-service.js';
|
5
|
+
import 'react/jsx-runtime';
|
5
6
|
import 'react-dom/client';
|
6
7
|
import '../global/get-uid.js';
|
7
8
|
import '../alert/alert.js';
|
@@ -18,7 +19,6 @@ import '../_helpers/icon__svg.js';
|
|
18
19
|
import 'core-js/modules/es.regexp.exec.js';
|
19
20
|
import 'core-js/modules/es.string.replace.js';
|
20
21
|
import '../global/memoize.js';
|
21
|
-
import 'react/jsx-runtime';
|
22
22
|
import '../loader-inline/loader-inline.js';
|
23
23
|
import '../global/data-tests.js';
|
24
24
|
import '../global/dom.js';
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
3
3
|
import alertService from '../alert-service/alert-service.js';
|
4
|
+
import 'react/jsx-runtime';
|
4
5
|
import 'react-dom/client';
|
5
6
|
import '../global/get-uid.js';
|
6
7
|
import '../alert/alert.js';
|
@@ -17,7 +18,6 @@ import '../_helpers/icon__svg.js';
|
|
17
18
|
import 'core-js/modules/es.regexp.exec.js';
|
18
19
|
import 'core-js/modules/es.string.replace.js';
|
19
20
|
import '../global/memoize.js';
|
20
|
-
import 'react/jsx-runtime';
|
21
21
|
import '../loader-inline/loader-inline.js';
|
22
22
|
import '../global/data-tests.js';
|
23
23
|
import '../global/dom.js';
|