@jetbrains/ring-ui-built 7.0.62 → 7.0.63
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/card.js +4 -3
- package/components/_helpers/{dialog__body-scroll-preventer.js → dialog-body-scroll-preventer.js} +4 -4
- package/components/_helpers/input.js +8 -8
- package/components/_helpers/{select__filter.js → select-filter.js} +1 -1
- package/components/_helpers/services-link.js +3 -3
- package/components/_helpers/theme.js +2 -2
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/alert.js +9 -8
- package/components/alert/container.d.ts +1 -1
- package/components/alert/container.js +2 -2
- package/components/alert-service/alert-service.d.ts +2 -2
- package/components/alert-service/alert-service.js +4 -4
- package/components/analytics/{analytics__custom-plugin.d.ts → analytics-custom-plugin.d.ts} +1 -1
- package/components/analytics/{analytics__custom-plugin.js → analytics-custom-plugin.js} +2 -2
- package/components/auth/{auth__core.d.ts → auth-core.d.ts} +9 -8
- package/components/auth/{auth__core.js → auth-core.js} +18 -22
- package/components/auth/auth.d.ts +2 -2
- package/components/auth/auth.js +8 -8
- package/components/auth/background-flow.d.ts +2 -2
- package/components/auth/background-flow.js +1 -3
- package/components/auth/down-notification.js +6 -6
- package/components/auth/iframe-flow.d.ts +3 -3
- package/components/auth/iframe-flow.js +9 -11
- package/components/auth/request-builder.d.ts +2 -1
- package/components/auth/request-builder.js +1 -2
- package/components/auth/storage.d.ts +3 -3
- package/components/auth/storage.js +9 -11
- package/components/auth/token-validator.d.ts +2 -1
- package/components/auth/token-validator.js +12 -3
- package/components/auth/window-flow.d.ts +3 -3
- package/components/auth/window-flow.js +5 -7
- package/components/auth-dialog/auth-dialog.js +9 -9
- package/components/auth-dialog-service/auth-dialog-service.d.ts +1 -1
- package/components/auth-dialog-service/auth-dialog-service.js +5 -5
- package/components/avatar/avatar-info.d.ts +1 -1
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.figma.js +1 -2
- package/components/avatar/avatar.js +16 -17
- package/components/avatar/fallback-avatar.js +17 -18
- package/components/avatar-stack/avatar-stack.d.ts +3 -3
- package/components/avatar-stack/avatar-stack.figma.js +1 -2
- package/components/avatar-stack/avatar-stack.js +12 -12
- package/components/banner/banner.js +4 -4
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/breadcrumbs.figma.js +1 -2
- package/components/button/{button__classes.d.ts → button.classes.d.ts} +1 -1
- package/components/button/button.classes.js +2 -0
- package/components/button/button.d.ts +4 -4
- package/components/button/button.figma.js +1 -2
- package/components/button/button.js +9 -9
- package/components/button-group/button-group.d.ts +1 -1
- package/components/button-group/button-group.js +1 -1
- package/components/button-group/caption.d.ts +1 -1
- package/components/button-set/button-set.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/caret/caret.js +24 -17
- package/components/checkbox/checkbox-group.figma.js +1 -2
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.figma.js +1 -2
- package/components/checkbox/checkbox.js +8 -8
- package/components/clipboard/clipboard.js +8 -8
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +3 -3
- package/components/collapse/collapse-content.d.ts +3 -3
- package/components/collapse/collapse-control.d.ts +2 -2
- package/components/collapse/collapse.d.ts +3 -3
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/confirm.js +8 -8
- package/components/confirm-service/confirm-service.d.ts +3 -3
- package/components/confirm-service/confirm-service.js +5 -5
- package/components/content-layout/content-layout.d.ts +1 -1
- package/components/content-layout/content-layout.js +2 -2
- package/components/content-layout/sidebar.d.ts +1 -1
- package/components/contenteditable/contenteditable.d.ts +1 -1
- package/components/contenteditable/contenteditable.js +2 -1
- package/components/control-help/control-help.d.ts +1 -1
- package/components/control-label/control-label.d.ts +1 -1
- package/components/data-list/data-list.d.ts +5 -5
- package/components/data-list/data-list.js +8 -8
- package/components/data-list/data-list.mock.d.ts +2 -2
- package/components/data-list/data-list.mock.js +24 -24
- package/components/data-list/item.d.ts +3 -3
- package/components/data-list/item.js +9 -9
- package/components/data-list/selection.d.ts +1 -1
- package/components/data-list/selection.js +8 -1
- package/components/data-list/title.d.ts +2 -2
- package/components/data-list/title.js +3 -3
- package/components/date-picker/consts.d.ts +1 -1
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/date-input.js +7 -7
- package/components/date-picker/date-picker.d.ts +5 -5
- package/components/date-picker/date-picker.js +27 -22
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/date-popup.js +9 -8
- package/components/date-picker/day.d.ts +2 -2
- package/components/date-picker/day.js +4 -4
- package/components/date-picker/formats.js +1 -0
- package/components/date-picker/month-names.d.ts +1 -1
- package/components/date-picker/month-names.js +1 -1
- package/components/date-picker/month-slider.d.ts +2 -2
- package/components/date-picker/month-slider.js +1 -1
- package/components/date-picker/month.d.ts +1 -1
- package/components/date-picker/months.d.ts +1 -1
- package/components/date-picker/months.js +2 -2
- package/components/date-picker/years.d.ts +1 -1
- package/components/date-picker/years.js +2 -2
- package/components/dialog/{dialog__body-scroll-preventer.js → dialog-body-scroll-preventer.js} +1 -1
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.js +15 -15
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/anchor.js +4 -4
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +6 -6
- package/components/dropdown-menu/dropdown-menu.d.ts +5 -5
- package/components/dropdown-menu/dropdown-menu.js +11 -11
- package/components/editable-heading/editable-heading.d.ts +1 -1
- package/components/editable-heading/editable-heading.js +8 -7
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.figma.js +1 -2
- package/components/error-bubble/error-bubble.js +2 -2
- package/components/error-message/error-message.d.ts +2 -2
- package/components/error-message/error-message.js +3 -3
- package/components/footer/footer.d.ts +1 -1
- package/components/footer/footer.js +2 -2
- package/components/global/compose-refs.d.ts +2 -0
- package/components/global/compose-refs.js +19 -0
- package/components/global/composeRefs.d.ts +6 -2
- package/components/global/composeRefs.js +6 -16
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/dom.d.ts +1 -1
- package/components/global/dom.js +2 -3
- package/components/global/focus-sensor-hoc.d.ts +1 -1
- package/components/global/focus-sensor-hoc.js +2 -2
- package/components/global/fuzzy-highlight.d.ts +2 -2
- package/components/global/get-event-key.d.ts +1 -1
- package/components/global/memoize.js +1 -1
- package/components/global/rerender-hoc.d.ts +1 -1
- package/components/global/rerender-hoc.js +2 -2
- package/components/global/theme.d.ts +1 -1
- package/components/global/url.js +3 -3
- package/components/global/use-event-callback.js +1 -1
- package/components/grid/col.d.ts +1 -1
- package/components/grid/col.js +1 -1
- package/components/grid/grid.d.ts +1 -1
- package/components/grid/grid.js +1 -1
- package/components/grid/row.d.ts +1 -1
- package/components/grid/row.js +1 -1
- package/components/group/group.d.ts +1 -1
- package/components/group/group.js +1 -1
- package/components/header/header-icon.d.ts +2 -2
- package/components/header/header-icon.js +4 -4
- package/components/header/header.d.ts +1 -1
- package/components/header/header.js +17 -17
- package/components/header/links.d.ts +1 -1
- package/components/header/logo.d.ts +1 -1
- package/components/header/logo.js +2 -2
- package/components/header/profile.d.ts +5 -5
- package/components/header/profile.js +14 -14
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.js +1 -1
- package/components/header/services.d.ts +2 -2
- package/components/header/services.js +7 -7
- package/components/header/smart-profile.d.ts +3 -3
- package/components/header/smart-profile.js +25 -25
- package/components/header/smart-services.d.ts +3 -3
- package/components/header/smart-services.js +4 -4
- package/components/header/tray.d.ts +1 -1
- package/components/heading/heading.d.ts +1 -1
- package/components/http/http.mock.d.ts +1 -1
- package/components/hub-source/{hub-source__user.d.ts → hub-source-user.d.ts} +3 -2
- package/components/hub-source/{hub-source__users-groups.d.ts → hub-source-users-groups.d.ts} +3 -2
- package/components/hub-source/hub-source.d.ts +2 -2
- package/components/icon/{icon__svg.d.ts → icon-svg.d.ts} +1 -1
- package/components/icon/{icon__svg.js → icon-svg.js} +1 -1
- package/components/icon/icon.d.ts +2 -2
- package/components/icon/icon.js +3 -3
- package/components/icon/index.js +2 -2
- package/components/input/input.d.ts +3 -3
- package/components/input/input.figma.js +1 -2
- package/components/input/input.js +5 -5
- package/components/island/adaptive-island-hoc.d.ts +1 -1
- package/components/island/content.d.ts +1 -1
- package/components/island/content.js +2 -2
- package/components/island/header.d.ts +1 -1
- package/components/island/header.js +4 -4
- package/components/island/island.d.ts +1 -1
- package/components/link/clickable-link.d.ts +12 -0
- package/components/link/clickable-link.js +51 -0
- package/components/link/clickableLink.d.ts +11 -12
- package/components/link/clickableLink.js +5 -50
- package/components/link/link.d.ts +2 -2
- package/components/link/link.js +3 -3
- package/components/list/consts.d.ts +4 -5
- package/components/list/{list__custom.d.ts → list-custom.d.ts} +1 -1
- package/components/list/{list__custom.js → list-custom.js} +1 -1
- package/components/list/{list__hint.d.ts → list-hint.d.ts} +1 -1
- package/components/list/{list__hint.js → list-hint.js} +1 -1
- package/components/list/{list__item.d.ts → list-item.d.ts} +2 -2
- package/components/list/{list__item.js → list-item.js} +10 -9
- package/components/list/{list__separator.d.ts → list-separator.d.ts} +1 -1
- package/components/list/{list__separator.js → list-separator.js} +1 -1
- package/components/list/{list__title.d.ts → list-title.d.ts} +1 -1
- package/components/list/{list__title.js → list-title.js} +3 -3
- package/components/list/{list__users-groups-source.d.ts → list-users-groups-source.d.ts} +3 -2
- package/components/list/{list__users-groups-source.js → list-users-groups-source.js} +11 -11
- package/components/list/{list__classes.d.ts → list.classes.d.ts} +1 -1
- package/components/list/list.d.ts +7 -7
- package/components/list/list.js +36 -35
- package/components/loader/{loader__core.js → loader-core.js} +3 -2
- package/components/loader/loader.d.ts +2 -2
- package/components/loader/loader.js +1 -1
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/loader-screen/loader-screen.js +1 -1
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/login-dialog.js +9 -9
- package/components/login-dialog/service.d.ts +1 -1
- package/components/login-dialog/service.js +6 -6
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/markdown.js +1 -1
- package/components/message/message.d.ts +4 -4
- package/components/message/message.js +7 -7
- package/components/old-browsers-message/old-browsers-message.js +1 -1
- package/components/pager/pager.d.ts +2 -2
- package/components/pager/pager.js +28 -27
- package/components/panel/panel.d.ts +1 -1
- package/components/panel/panel.js +1 -1
- package/components/permissions/{permissions__cache.js → permissions-cache.js} +4 -4
- package/components/permissions/permissions.d.ts +2 -2
- package/components/permissions/permissions.js +2 -3
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/popup.js +4 -4
- package/components/popup/popup.target.d.ts +1 -1
- package/components/popup/position-css.js +2 -4
- package/components/popup/position.js +10 -9
- package/components/popup-menu/popup-menu.d.ts +4 -4
- package/components/popup-menu/popup-menu.js +10 -10
- package/components/progress-bar/progress-bar.d.ts +1 -1
- package/components/progress-bar/progress-bar.js +1 -1
- package/components/query-assist/{query-assist__suggestions.d.ts → query-assist-suggestions.d.ts} +1 -1
- package/components/query-assist/{query-assist__suggestions.js → query-assist-suggestions.js} +11 -11
- package/components/query-assist/query-assist.d.ts +4 -4
- package/components/query-assist/query-assist.js +30 -30
- package/components/radio/{radio__item.d.ts → radio-item.d.ts} +1 -1
- package/components/radio/{radio__item.js → radio-item.js} +3 -3
- package/components/radio/radio.d.ts +2 -2
- package/components/radio/radio.js +1 -1
- package/components/scrollable-section/scrollable-section.d.ts +1 -1
- package/components/scrollable-section/scrollable-section.js +1 -1
- package/components/select/{select__filter.d.ts → select-filter.d.ts} +2 -2
- package/components/select/{select__filter.js → select-filter.js} +12 -12
- package/components/select/{select__popup.d.ts → select-popup.d.ts} +8 -8
- package/components/select/{select__popup.js → select-popup.js} +21 -19
- package/components/select/select.d.ts +6 -6
- package/components/select/select.js +44 -42
- package/components/shortcuts/core.js +4 -4
- package/components/shortcuts/shortcuts-hoc.d.ts +2 -2
- package/components/shortcuts/shortcuts.d.ts +1 -1
- package/components/slider/slider.d.ts +5 -5
- package/components/slider/slider.js +7 -6
- package/components/slider/slider.utils.d.ts +1 -1
- package/components/slider/slider.utils.js +2 -3
- package/components/storage/{storage__local.d.ts → storage-local.d.ts} +1 -1
- package/components/storage/{storage__local.js → storage-local.js} +11 -11
- package/components/storage/storage.d.ts +1 -1
- package/components/storage/storage.js +5 -5
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.d.ts +1 -1
- package/components/tab-trap/tab-trap.js +1 -1
- package/components/table/cell.d.ts +1 -1
- package/components/table/disable-hover-hoc.d.ts +1 -1
- package/components/table/header-cell.d.ts +1 -1
- package/components/table/header-cell.js +3 -3
- package/components/table/header.d.ts +2 -2
- package/components/table/header.js +7 -7
- package/components/table/multitable.d.ts +3 -3
- package/components/table/multitable.js +1 -1
- package/components/table/row-with-focus-sensor.d.ts +3 -3
- package/components/table/row-with-focus-sensor.js +5 -5
- package/components/table/row.d.ts +4 -4
- package/components/table/row.js +5 -5
- package/components/table/selection-adapter.d.ts +2 -1
- package/components/table/selection-shortcuts-hoc.d.ts +4 -3
- package/components/table/selection-shortcuts-hoc.js +1 -2
- package/components/table/selection.js +5 -6
- package/components/table/simple-table.d.ts +2 -2
- package/components/table/simple-table.js +6 -6
- package/components/table/smart-table.d.ts +2 -2
- package/components/table/smart-table.js +6 -6
- package/components/table/table.d.ts +7 -7
- package/components/table/table.js +11 -11
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/collapsible-more.js +12 -12
- package/components/tabs/collapsible-tab.d.ts +2 -2
- package/components/tabs/collapsible-tab.js +2 -2
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +18 -18
- package/components/tabs/custom-item.d.ts +2 -2
- package/components/tabs/dumb-tabs.d.ts +3 -3
- package/components/tabs/dumb-tabs.js +14 -14
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/smart-tabs.js +11 -11
- package/components/tabs/tab-link.d.ts +2 -2
- package/components/tabs/tab-link.js +1 -1
- package/components/tabs/tab.d.ts +2 -2
- package/components/tabs/tabs.js +11 -11
- package/components/tag/tag.d.ts +2 -2
- package/components/tag/tag.js +7 -7
- package/components/tags-input/tags-input.d.ts +8 -8
- package/components/tags-input/tags-input.js +26 -20
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +5 -5
- package/components/text/text.d.ts +1 -1
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.js +2 -2
- package/components/tooltip/tooltip.d.ts +2 -2
- package/components/tooltip/tooltip.js +1 -1
- package/components/upload/upload.d.ts +3 -3
- package/components/upload/upload.js +7 -7
- package/components/user-agreement/service.d.ts +2 -2
- package/components/user-agreement/service.js +10 -11
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.js +10 -10
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.js +4 -4
- 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 +3 -3
- package/components/user-card/tooltip.js +4 -4
- package/components/user-card/user-card.js +4 -4
- package/package.json +1 -1
- package/components/button/button__classes.js +0 -2
- /package/components/_helpers/{button__classes.js → button.classes.js} +0 -0
- /package/components/_helpers/{icon__svg.js → icon-svg.js} +0 -0
- /package/components/_helpers/{query-assist__suggestions.js → query-assist-suggestions.js} +0 -0
- /package/components/dialog/{dialog__body-scroll-preventer.d.ts → dialog-body-scroll-preventer.d.ts} +0 -0
- /package/components/global/{variables.d.ts → variables.interface.d.ts} +0 -0
- /package/components/global/{variables.js → variables.interface.js} +0 -0
- /package/components/hub-source/{hub-source__user.js → hub-source-user.js} +0 -0
- /package/components/hub-source/{hub-source__users-groups.js → hub-source-users-groups.js} +0 -0
- /package/components/icon/{icon__constants.d.ts → icon.constants.d.ts} +0 -0
- /package/components/icon/{icon__constants.js → icon.constants.js} +0 -0
- /package/components/list/{list__classes.js → list.classes.js} +0 -0
- /package/components/loader/{loader__core.d.ts → loader-core.d.ts} +0 -0
- /package/components/old-browsers-message/{old-browsers-message__stop.d.ts → old-browsers-message-stop.d.ts} +0 -0
- /package/components/old-browsers-message/{old-browsers-message__stop.js → old-browsers-message-stop.js} +0 -0
- /package/components/permissions/{permissions__cache.d.ts → permissions-cache.d.ts} +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { c as _taggedTemplateLiteral } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import figma from '@figma/code-connect';
|
|
2
3
|
|
|
3
4
|
var _templateObject;
|
|
4
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=460%3A2730
|
|
5
|
-
const figma = require('figma');
|
|
6
5
|
const instance = figma.selectedInstance;
|
|
7
6
|
const imports = ["import Breadcrumbs from '@jetbrains/ring-ui/components/breadcrumbs/breadcrumbs'", "import Link from '@jetbrains/ring-ui/components/link/link'"];
|
|
8
7
|
const children = instance.findLayers(() => true).map(layer => layer.textContent).filter(text => text !== '/');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ButtonProps } from './button';
|
|
1
|
+
import { type ButtonProps } from './button';
|
|
2
2
|
export declare function getButtonClasses({ className, active, disabled, loader, primary, success, error, secondary, ghost, short, inline, danger, delayed, icon, iconRight, height, children, }: ButtonProps): string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PureComponent, ButtonHTMLAttributes } from 'react';
|
|
1
|
+
import { PureComponent, type ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { IconProps, IconType, Size } from '../icon/icon';
|
|
4
|
-
import { ClickableLinkProps } from '../link/
|
|
5
|
-
import { ControlsHeight, ControlsHeightContext } from '../global/controls-height';
|
|
3
|
+
import { type IconProps, type IconType, Size } from '../icon/icon';
|
|
4
|
+
import { type ClickableLinkProps } from '../link/clickable-link';
|
|
5
|
+
import { type ControlsHeight, ControlsHeightContext } from '../global/controls-height';
|
|
6
6
|
export interface ButtonBaseProps {
|
|
7
7
|
height?: ControlsHeight | undefined;
|
|
8
8
|
active?: boolean | null | undefined;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { c as _taggedTemplateLiteral } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import figma from '@figma/code-connect';
|
|
2
3
|
|
|
3
4
|
var _templateObject;
|
|
4
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=9954-528
|
|
5
|
-
const figma = require('figma');
|
|
6
5
|
const instance = figma.selectedInstance;
|
|
7
6
|
const size = instance.getString('Size');
|
|
8
7
|
const type = instance.getString('Type');
|
|
@@ -7,11 +7,11 @@ import chevronDownIcon from '@jetbrains/icons/chevron-down';
|
|
|
7
7
|
import chevron12pxDown from '@jetbrains/icons/chevron-12px-down';
|
|
8
8
|
import deprecate from 'util-deprecate';
|
|
9
9
|
import Icon from '../icon/icon.js';
|
|
10
|
-
import ClickableLink from '../link/
|
|
10
|
+
import ClickableLink from '../link/clickable-link.js';
|
|
11
11
|
import { ControlsHeightContext } from '../global/controls-height.js';
|
|
12
|
-
import { g as getButtonClasses, s as styles } from '../_helpers/
|
|
13
|
-
import { Size } from '../icon/
|
|
14
|
-
import '../_helpers/
|
|
12
|
+
import { g as getButtonClasses, s as styles } from '../_helpers/button.classes.js';
|
|
13
|
+
import { Size } from '../icon/icon.constants.js';
|
|
14
|
+
import '../_helpers/icon-svg.js';
|
|
15
15
|
import 'core-js/modules/es.regexp.exec.js';
|
|
16
16
|
import 'core-js/modules/es.string.replace.js';
|
|
17
17
|
import '../global/memoize.js';
|
|
@@ -79,8 +79,8 @@ class Button extends PureComponent {
|
|
|
79
79
|
disabled
|
|
80
80
|
} = _this$props,
|
|
81
81
|
props = _objectWithoutProperties(_this$props, _excluded2);
|
|
82
|
-
const isInline = (_ref = inline !== null && inline !== void 0 ? inline : text) !== null && _ref !== void 0 ? _ref : icon
|
|
83
|
-
if (text
|
|
82
|
+
const isInline = (_ref = inline !== null && inline !== void 0 ? inline : text) !== null && _ref !== void 0 ? _ref : !!icon;
|
|
83
|
+
if (text) {
|
|
84
84
|
warnText();
|
|
85
85
|
}
|
|
86
86
|
const classes = getButtonClasses(_objectSpread2(_objectSpread2({}, this.props), {}, {
|
|
@@ -102,7 +102,7 @@ class Button extends PureComponent {
|
|
|
102
102
|
})]
|
|
103
103
|
});
|
|
104
104
|
const isDisabled = disabled || loader || undefined;
|
|
105
|
-
const commonProps = _objectSpread2(_objectSpread2({}, props.href
|
|
105
|
+
const commonProps = _objectSpread2(_objectSpread2({}, props.href !== undefined && isDisabled ? removeLinkProps(props) : props), {}, {
|
|
106
106
|
className: classes,
|
|
107
107
|
children: jsxs(Fragment, {
|
|
108
108
|
children: [loader && !isInline && jsx("div", {
|
|
@@ -110,9 +110,9 @@ class Button extends PureComponent {
|
|
|
110
110
|
}), content]
|
|
111
111
|
})
|
|
112
112
|
});
|
|
113
|
-
return
|
|
113
|
+
return 'href' in this.props && this.props.href !== undefined ? jsx(ClickableLink, _objectSpread2({}, commonProps)) : jsx("button", _objectSpread2({
|
|
114
114
|
ref: this.buttonRef,
|
|
115
|
-
type:
|
|
115
|
+
type: 'button',
|
|
116
116
|
disabled: isDisabled
|
|
117
117
|
}, commonProps));
|
|
118
118
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PureComponent, HTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import { PureComponent, type HTMLAttributes, type ReactNode } from 'react';
|
|
2
2
|
import Caption from './caption';
|
|
3
3
|
export interface ButtonGroupProps extends HTMLAttributes<HTMLElement> {
|
|
4
4
|
split?: boolean | null | undefined;
|
|
@@ -26,7 +26,7 @@ class ButtonGroup extends PureComponent {
|
|
|
26
26
|
} = _this$props,
|
|
27
27
|
restProps = _objectWithoutProperties(_this$props, _excluded);
|
|
28
28
|
const classes = classNames(split ? styles.split : styles.buttonGroup, className, {
|
|
29
|
-
[styles.disabled]: Children.toArray(this.props.children).every(child => child
|
|
29
|
+
[styles.disabled]: Children.toArray(this.props.children).every(child => !!child && typeof child === 'object' && 'props' in child && child.props.disabled)
|
|
30
30
|
});
|
|
31
31
|
return jsxs(Fragment, {
|
|
32
32
|
children: [label && jsx(ControlLabel, {
|
|
@@ -38,9 +38,10 @@ class Caret {
|
|
|
38
38
|
* @return {number}
|
|
39
39
|
*/
|
|
40
40
|
getAbsolutePosition(node) {
|
|
41
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
41
42
|
let _curNode = node;
|
|
42
43
|
let curPos = 0;
|
|
43
|
-
while (_curNode
|
|
44
|
+
while (_curNode && _curNode !== this.target) {
|
|
44
45
|
while (_curNode.previousSibling) {
|
|
45
46
|
var _curNode$previousSibl, _curNode$previousSibl2;
|
|
46
47
|
curPos += (_curNode$previousSibl = (_curNode$previousSibl2 = _curNode.previousSibling.textContent) === null || _curNode$previousSibl2 === void 0 ? void 0 : _curNode$previousSibl2.length) !== null && _curNode$previousSibl !== void 0 ? _curNode$previousSibl : 0;
|
|
@@ -70,35 +71,36 @@ class Caret {
|
|
|
70
71
|
const range2 = range1.cloneRange();
|
|
71
72
|
range2.selectNodeContents(this.target);
|
|
72
73
|
range2.setEnd(range1.endContainer, range1.endOffset);
|
|
74
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
73
75
|
const _curNode = range1.startContainer;
|
|
74
76
|
if (this.target === _curNode) {
|
|
75
|
-
return range1.startOffset === 0 || _curNode.textContent
|
|
76
|
-
}
|
|
77
|
+
return range1.startOffset === 0 || _curNode.textContent === null || _curNode.textContent === undefined ? 0 : _curNode.textContent.length;
|
|
78
|
+
}
|
|
79
|
+
if (!this.target.contains(_curNode)) {
|
|
77
80
|
return -1;
|
|
78
|
-
}
|
|
81
|
+
}
|
|
82
|
+
if (!_curNode) {
|
|
79
83
|
return 'selectionStart' in this.target && this.target.selectionStart || -1;
|
|
80
84
|
}
|
|
81
85
|
const curPos = this.getAbsolutePosition(_curNode);
|
|
82
86
|
if (range1.startContainer === range1.endContainer) {
|
|
83
87
|
if (range1.startOffset === range1.endOffset) {
|
|
84
88
|
return curPos + range1.startOffset;
|
|
85
|
-
} else {
|
|
86
|
-
return {
|
|
87
|
-
startOffset: curPos + range1.startOffset,
|
|
88
|
-
endOffset: curPos + range1.endOffset,
|
|
89
|
-
position: range2.toString().length
|
|
90
|
-
};
|
|
91
89
|
}
|
|
92
|
-
} else {
|
|
93
|
-
const startOffset = curPos + range1.startOffset;
|
|
94
|
-
const endPos = this.getAbsolutePosition(range1.endContainer);
|
|
95
|
-
const endOffset = endPos + range1.endOffset;
|
|
96
90
|
return {
|
|
97
|
-
startOffset,
|
|
98
|
-
endOffset,
|
|
91
|
+
startOffset: curPos + range1.startOffset,
|
|
92
|
+
endOffset: curPos + range1.endOffset,
|
|
99
93
|
position: range2.toString().length
|
|
100
94
|
};
|
|
101
95
|
}
|
|
96
|
+
const startOffset = curPos + range1.startOffset;
|
|
97
|
+
const endPos = this.getAbsolutePosition(range1.endContainer);
|
|
98
|
+
const endOffset = endPos + range1.endOffset;
|
|
99
|
+
return {
|
|
100
|
+
startOffset,
|
|
101
|
+
endOffset,
|
|
102
|
+
position: range2.toString().length
|
|
103
|
+
};
|
|
102
104
|
}
|
|
103
105
|
return 'selectionStart' in this.target && this.target.selectionStart || -1;
|
|
104
106
|
}
|
|
@@ -110,6 +112,7 @@ class Caret {
|
|
|
110
112
|
*/
|
|
111
113
|
getRelativePosition(curNode, position) {
|
|
112
114
|
let curPos = 0;
|
|
115
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
113
116
|
let _curNode = curNode;
|
|
114
117
|
const nodeTypeText = 3;
|
|
115
118
|
if (!_curNode) {
|
|
@@ -122,6 +125,7 @@ class Caret {
|
|
|
122
125
|
while (_curNode.nodeType !== nodeTypeText) {
|
|
123
126
|
_curNode = _curNode.childNodes[0];
|
|
124
127
|
}
|
|
128
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
125
129
|
const _correctedPosition = position;
|
|
126
130
|
return {
|
|
127
131
|
_curNode,
|
|
@@ -132,7 +136,7 @@ class Caret {
|
|
|
132
136
|
if (_curNode && _curNode.nodeType !== undefined) {
|
|
133
137
|
while (curPos < position && _curNode.nodeType !== nodeTypeText) {
|
|
134
138
|
i++;
|
|
135
|
-
if (_curNode.childNodes[i]
|
|
139
|
+
if (_curNode.childNodes[i]) {
|
|
136
140
|
var _curNode$childNodes$i, _curNode$childNodes$i2;
|
|
137
141
|
curPos += (_curNode$childNodes$i = (_curNode$childNodes$i2 = _curNode.childNodes[i].textContent) === null || _curNode$childNodes$i2 === void 0 ? void 0 : _curNode$childNodes$i2.length) !== null && _curNode$childNodes$i !== void 0 ? _curNode$childNodes$i : 0;
|
|
138
142
|
if (curPos >= position) {
|
|
@@ -146,6 +150,7 @@ class Caret {
|
|
|
146
150
|
}
|
|
147
151
|
}
|
|
148
152
|
}
|
|
153
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
149
154
|
const _correctedPosition = position - curPos;
|
|
150
155
|
return {
|
|
151
156
|
_curNode,
|
|
@@ -165,8 +170,10 @@ class Caret {
|
|
|
165
170
|
if (typeof position === 'object') {
|
|
166
171
|
const range = new Range();
|
|
167
172
|
const start = this.getRelativePosition(curNode, position.startOffset);
|
|
173
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
168
174
|
range.setStart(start._curNode, start._correctedPosition);
|
|
169
175
|
const end = this.getRelativePosition(curNode, position.endOffset);
|
|
176
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
170
177
|
range.setEnd(end._curNode, end._correctedPosition);
|
|
171
178
|
correctedPosition = range;
|
|
172
179
|
} else if (position === -1) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { c as _taggedTemplateLiteral } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
|
+
import figma from '@figma/code-connect';
|
|
3
4
|
|
|
4
5
|
var _templateObject;
|
|
5
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI-(Internal)?node-id=226-2666
|
|
6
|
-
const figma = require('figma');
|
|
7
6
|
const instance = figma.selectedInstance;
|
|
8
7
|
const labelType = instance.getString('Label');
|
|
9
8
|
const children = instance.findConnectedInstances(() => true);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PureComponent, InputHTMLAttributes, CSSProperties, Ref, ReactNode } from 'react';
|
|
1
|
+
import { PureComponent, type InputHTMLAttributes, type CSSProperties, type Ref, type ReactNode } from 'react';
|
|
2
2
|
export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
3
|
label?: string | null | undefined;
|
|
4
4
|
containerClassName?: string | null | undefined;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { c as _taggedTemplateLiteral } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import figma from '@figma/code-connect';
|
|
2
3
|
|
|
3
4
|
var _templateObject;
|
|
4
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=224%3A1943
|
|
5
|
-
const figma = require('figma');
|
|
6
5
|
const instance = figma.selectedInstance;
|
|
7
6
|
const selected = instance.getString('Selected');
|
|
8
7
|
const hasLabel = instance.getBoolean('Label');
|
|
@@ -6,11 +6,11 @@ import classNames from 'classnames';
|
|
|
6
6
|
import checkmarkIcon from '@jetbrains/icons/checkmark-12px';
|
|
7
7
|
import minusIcon from '@jetbrains/icons/remove-12px';
|
|
8
8
|
import Icon from '../icon/icon.js';
|
|
9
|
-
import { createComposedRef } from '../global/
|
|
9
|
+
import { createComposedRef } from '../global/compose-refs.js';
|
|
10
10
|
import ControlHelp from '../control-help/control-help.js';
|
|
11
11
|
import 'util-deprecate';
|
|
12
|
-
import '../icon/
|
|
13
|
-
import '../_helpers/
|
|
12
|
+
import '../icon/icon.constants.js';
|
|
13
|
+
import '../_helpers/icon-svg.js';
|
|
14
14
|
import 'core-js/modules/es.regexp.exec.js';
|
|
15
15
|
import 'core-js/modules/es.string.replace.js';
|
|
16
16
|
import '../global/memoize.js';
|
|
@@ -30,7 +30,7 @@ class Checkbox extends PureComponent {
|
|
|
30
30
|
super(...arguments);
|
|
31
31
|
_defineProperty(this, "input", void 0);
|
|
32
32
|
_defineProperty(this, "inputRef", el => {
|
|
33
|
-
if (el
|
|
33
|
+
if (el) {
|
|
34
34
|
el.indeterminate = this.props.indeterminate;
|
|
35
35
|
}
|
|
36
36
|
this.input = el;
|
|
@@ -38,7 +38,7 @@ class Checkbox extends PureComponent {
|
|
|
38
38
|
_defineProperty(this, "composedInputRef", createComposedRef());
|
|
39
39
|
}
|
|
40
40
|
componentDidMount() {
|
|
41
|
-
if (this.input
|
|
41
|
+
if (this.input) {
|
|
42
42
|
this.input.indeterminate = this.props.indeterminate;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -46,7 +46,7 @@ class Checkbox extends PureComponent {
|
|
|
46
46
|
const {
|
|
47
47
|
indeterminate
|
|
48
48
|
} = this.props;
|
|
49
|
-
if (this.input
|
|
49
|
+
if (this.input && indeterminate !== prevProps.indeterminate) {
|
|
50
50
|
this.input.indeterminate = this.props.indeterminate;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -72,11 +72,11 @@ class Checkbox extends PureComponent {
|
|
|
72
72
|
return jsxs("label", {
|
|
73
73
|
className: containerClasses,
|
|
74
74
|
style: containerStyle,
|
|
75
|
-
"data-test":
|
|
75
|
+
"data-test": 'ring-checkbox',
|
|
76
76
|
children: [jsx("input", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
77
77
|
"data-checked": restProps.checked,
|
|
78
78
|
ref: this.composedInputRef(this.inputRef, inputRef),
|
|
79
|
-
type:
|
|
79
|
+
type: 'checkbox',
|
|
80
80
|
className: classes
|
|
81
81
|
})), jsx("div", {
|
|
82
82
|
className: styles.cellWrapper,
|
|
@@ -14,8 +14,8 @@ import '@jetbrains/icons/warning';
|
|
|
14
14
|
import '@jetbrains/icons/close';
|
|
15
15
|
import '../icon/icon.js';
|
|
16
16
|
import 'util-deprecate';
|
|
17
|
-
import '../icon/
|
|
18
|
-
import '../_helpers/
|
|
17
|
+
import '../icon/icon.constants.js';
|
|
18
|
+
import '../_helpers/icon-svg.js';
|
|
19
19
|
import 'core-js/modules/es.regexp.exec.js';
|
|
20
20
|
import 'core-js/modules/es.string.replace.js';
|
|
21
21
|
import '../global/memoize.js';
|
|
@@ -25,10 +25,10 @@ import '../global/dom.js';
|
|
|
25
25
|
import '../button/button.js';
|
|
26
26
|
import '@jetbrains/icons/chevron-down';
|
|
27
27
|
import '@jetbrains/icons/chevron-12px-down';
|
|
28
|
-
import '../link/
|
|
28
|
+
import '../link/clickable-link.js';
|
|
29
29
|
import '../global/controls-height.js';
|
|
30
30
|
import '../global/configuration.js';
|
|
31
|
-
import '../_helpers/
|
|
31
|
+
import '../_helpers/button.classes.js';
|
|
32
32
|
import '../_helpers/theme.js';
|
|
33
33
|
import 'react-dom';
|
|
34
34
|
import '../popup/popup.target.js';
|
|
@@ -82,13 +82,13 @@ async function copy(text, successMessage, errorMessage) {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
const clipboard = {
|
|
85
|
-
copyText:
|
|
85
|
+
copyText: function (text, successMessage, errorMessage) {
|
|
86
86
|
let delay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ALERT_DELAY;
|
|
87
|
-
return
|
|
87
|
+
return copy(text, successMessage, errorMessage, delay);
|
|
88
88
|
},
|
|
89
|
-
copyHTML:
|
|
89
|
+
copyHTML: function (html, successMessage, errorMessage) {
|
|
90
90
|
let delay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ALERT_DELAY;
|
|
91
|
-
return
|
|
91
|
+
return copy(html, successMessage, errorMessage, delay, true);
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
94
|
|
package/components/code/code.js
CHANGED
|
@@ -36,7 +36,7 @@ class Code extends PureComponent {
|
|
|
36
36
|
}
|
|
37
37
|
async highlight() {
|
|
38
38
|
const codeRef = this.codeRef;
|
|
39
|
-
if (codeRef
|
|
39
|
+
if (!codeRef) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
const {
|
|
@@ -45,7 +45,7 @@ class Code extends PureComponent {
|
|
|
45
45
|
replacer
|
|
46
46
|
} = this.props;
|
|
47
47
|
if (!inline) {
|
|
48
|
-
if (language
|
|
48
|
+
if (language !== null && language !== undefined && (highlight.getLanguage(language) === null || highlight.getLanguage(language) === undefined)) {
|
|
49
49
|
await registerLanguage(language);
|
|
50
50
|
}
|
|
51
51
|
// @ts-expect-error https://github.com/highlightjs/highlight.js/issues/2945
|
|
@@ -89,7 +89,7 @@ class Code extends PureComponent {
|
|
|
89
89
|
});
|
|
90
90
|
return jsx(Tag, {
|
|
91
91
|
className: classes,
|
|
92
|
-
"data-test":
|
|
92
|
+
"data-test": 'ring-code',
|
|
93
93
|
children: jsx("code", {
|
|
94
94
|
// should be focusable because it can be scrollable
|
|
95
95
|
tabIndex: inline ? -1 : 0,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
|
+
interface Props {
|
|
3
3
|
minHeight?: number;
|
|
4
4
|
className?: string;
|
|
5
5
|
'data-test'?: string | null | undefined;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
/**
|
|
8
8
|
* @name CollapseContent
|
|
9
9
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
type ChildrenFunction = (collapsed: boolean) => React.ReactElement<any>;
|
|
3
|
-
|
|
3
|
+
interface Props {
|
|
4
4
|
children: ChildrenFunction | React.ReactElement<any>;
|
|
5
5
|
'data-test'?: string | null | undefined;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
/**
|
|
8
8
|
* @name CollapseControl
|
|
9
9
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
|
|
3
|
+
interface Props {
|
|
4
4
|
onChange?: (collapsed: boolean) => void;
|
|
5
5
|
duration?: number;
|
|
6
6
|
disableAnimation?: boolean;
|
|
7
7
|
className?: string;
|
|
8
8
|
defaultCollapsed?: boolean;
|
|
9
9
|
collapsed?: boolean | null;
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
11
|
/**
|
|
12
12
|
* @name Collapse
|
|
13
13
|
*/
|
|
@@ -35,18 +35,18 @@ import '../popup/position.js';
|
|
|
35
35
|
import 'core-js/modules/es.array.sort.js';
|
|
36
36
|
import '../popup/popup.consts.js';
|
|
37
37
|
import '../popup/position-css.js';
|
|
38
|
-
import '../_helpers/
|
|
38
|
+
import '../_helpers/dialog-body-scroll-preventer.js';
|
|
39
39
|
import 'scrollbar-width';
|
|
40
40
|
import '@jetbrains/icons/chevron-down';
|
|
41
41
|
import '@jetbrains/icons/chevron-12px-down';
|
|
42
42
|
import 'util-deprecate';
|
|
43
43
|
import '../icon/icon.js';
|
|
44
|
-
import '../icon/
|
|
45
|
-
import '../_helpers/
|
|
44
|
+
import '../icon/icon.constants.js';
|
|
45
|
+
import '../_helpers/icon-svg.js';
|
|
46
46
|
import '../global/memoize.js';
|
|
47
|
-
import '../link/
|
|
47
|
+
import '../link/clickable-link.js';
|
|
48
48
|
import '../global/controls-height.js';
|
|
49
|
-
import '../_helpers/
|
|
49
|
+
import '../_helpers/button.classes.js';
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* @name Confirm
|
|
@@ -80,7 +80,7 @@ class Confirm extends PureComponent {
|
|
|
80
80
|
onEscPress: this.onEscPress,
|
|
81
81
|
show: show,
|
|
82
82
|
trapFocus: true,
|
|
83
|
-
"data-test":
|
|
83
|
+
"data-test": 'ring-confirm',
|
|
84
84
|
native: native,
|
|
85
85
|
children: [text && jsx(HeaderWrapper, {
|
|
86
86
|
children: text
|
|
@@ -88,14 +88,14 @@ class Confirm extends PureComponent {
|
|
|
88
88
|
children: description
|
|
89
89
|
}), jsxs(Panel, {
|
|
90
90
|
children: [jsx(Button, {
|
|
91
|
-
"data-test":
|
|
91
|
+
"data-test": 'confirm-ok-button',
|
|
92
92
|
primary: !cancelIsDefault,
|
|
93
93
|
loader: inProgress,
|
|
94
94
|
disabled: inProgress,
|
|
95
95
|
onClick: onConfirm,
|
|
96
96
|
children: confirmLabel
|
|
97
97
|
}), jsx(Button, {
|
|
98
|
-
"data-test":
|
|
98
|
+
"data-test": 'confirm-reject-button',
|
|
99
99
|
onClick: onReject,
|
|
100
100
|
disabled: inProgress,
|
|
101
101
|
primary: cancelIsDefault,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ConfirmAttributes } from '../confirm/confirm';
|
|
3
|
-
import { ControlsHeight } from '../global/controls-height';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ConfirmAttributes } from '../confirm/confirm';
|
|
3
|
+
import { type ControlsHeight } from '../global/controls-height';
|
|
4
4
|
/**
|
|
5
5
|
* @name Confirm Service
|
|
6
6
|
*/
|
|
@@ -33,12 +33,12 @@ import '@jetbrains/icons/chevron-down';
|
|
|
33
33
|
import '@jetbrains/icons/chevron-12px-down';
|
|
34
34
|
import 'util-deprecate';
|
|
35
35
|
import '../icon/icon.js';
|
|
36
|
-
import '../icon/
|
|
37
|
-
import '../_helpers/
|
|
36
|
+
import '../icon/icon.constants.js';
|
|
37
|
+
import '../_helpers/icon-svg.js';
|
|
38
38
|
import 'core-js/modules/es.string.replace.js';
|
|
39
39
|
import '../global/memoize.js';
|
|
40
|
-
import '../link/
|
|
41
|
-
import '../_helpers/
|
|
40
|
+
import '../link/clickable-link.js';
|
|
41
|
+
import '../_helpers/button.classes.js';
|
|
42
42
|
import '../global/configuration.js';
|
|
43
43
|
import '../popup/popup.target.js';
|
|
44
44
|
import '../popup/popup.js';
|
|
@@ -46,7 +46,7 @@ import '../popup/position.js';
|
|
|
46
46
|
import 'core-js/modules/es.array.sort.js';
|
|
47
47
|
import '../popup/popup.consts.js';
|
|
48
48
|
import '../popup/position-css.js';
|
|
49
|
-
import '../_helpers/
|
|
49
|
+
import '../_helpers/dialog-body-scroll-preventer.js';
|
|
50
50
|
import 'scrollbar-width';
|
|
51
51
|
import '../panel/panel.js';
|
|
52
52
|
|
|
@@ -36,13 +36,13 @@ class ContentLayout extends Component {
|
|
|
36
36
|
});
|
|
37
37
|
const contentClasses = classNames(styles.contentLayoutContent, contentClassName);
|
|
38
38
|
const childrenArray = Children.toArray(children);
|
|
39
|
-
const sidebarChild = childrenArray.filter(child => child
|
|
39
|
+
const sidebarChild = childrenArray.filter(child => !!child && typeof child === 'object' && 'type' in child && child.type === Sidebar)[0];
|
|
40
40
|
const sidebar = sidebarChild && /*#__PURE__*/cloneElement(sidebarChild, {
|
|
41
41
|
contentNode: this.state.contentNode
|
|
42
42
|
});
|
|
43
43
|
const contentChildren = childrenArray.filter(child => child !== sidebarChild);
|
|
44
44
|
return jsxs("div", _objectSpread2(_objectSpread2({
|
|
45
|
-
"data-test":
|
|
45
|
+
"data-test": 'content-layout'
|
|
46
46
|
}, restProps), {}, {
|
|
47
47
|
className: classes,
|
|
48
48
|
children: [sidebar, jsx("main", {
|
|
@@ -11,6 +11,7 @@ const _excluded = ["__html", "onComponentUpdate", "disabled", "tabIndex", "input
|
|
|
11
11
|
function noop() {}
|
|
12
12
|
class ContentEditableBase extends Component {
|
|
13
13
|
shouldComponentUpdate(nextProps) {
|
|
14
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
14
15
|
return nextProps.disabled !== this.props.disabled || nextProps.__html !== this.props.__html;
|
|
15
16
|
}
|
|
16
17
|
componentDidUpdate(prevProps) {
|
|
@@ -31,7 +32,7 @@ class ContentEditableBase extends Component {
|
|
|
31
32
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
32
33
|
// @ts-ignore
|
|
33
34
|
disabled: disabled,
|
|
34
|
-
role:
|
|
35
|
+
role: 'textbox',
|
|
35
36
|
tabIndex: disabled ? undefined : tabIndex,
|
|
36
37
|
contentEditable: !this.props.disabled,
|
|
37
38
|
dangerouslySetInnerHTML: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
2
|
type ControlHelpProps = HTMLAttributes<HTMLDivElement>;
|
|
3
3
|
export default function ControlHelp({ className, ...restProps }: ControlHelpProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export {};
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* @name Data List
|
|
3
3
|
*/
|
|
4
4
|
import { Component } from 'react';
|
|
5
|
-
import { FocusSensorOuterProps } from '../global/focus-sensor-hoc';
|
|
6
|
-
import { SelectionShortcutsAddProps, SelectionShortcutsOuterProps } from '../table/selection-shortcuts-hoc';
|
|
7
|
-
import { DisableHoverAddProps } from '../table/disable-hover-hoc';
|
|
8
|
-
import { SelectionItem } from '../table/selection';
|
|
9
|
-
import { FormattedItem, moreLessButtonStates } from './item';
|
|
5
|
+
import { type FocusSensorOuterProps } from '../global/focus-sensor-hoc';
|
|
6
|
+
import { type SelectionShortcutsAddProps, type SelectionShortcutsOuterProps } from '../table/selection-shortcuts-hoc';
|
|
7
|
+
import { type DisableHoverAddProps } from '../table/disable-hover-hoc';
|
|
8
|
+
import { type SelectionItem } from '../table/selection';
|
|
9
|
+
import { type FormattedItem, moreLessButtonStates } from './item';
|
|
10
10
|
export interface DataListBaseProps<T extends SelectionItem> {
|
|
11
11
|
data: readonly T[];
|
|
12
12
|
itemFormatter: (item: T) => FormattedItem<T>;
|