@jetbrains/ring-ui 6.0.6-beta.0 → 6.0.6
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/README.md +1 -1
- package/components/alert/alert.css +146 -0
- package/components/alert/alert.d.ts +113 -0
- package/components/alert/alert.js +186 -0
- package/components/alert/container.css +26 -0
- package/components/alert/container.d.ts +15 -0
- package/components/alert/container.js +30 -0
- package/components/alert-service/alert-service.d.ts +36 -0
- package/components/alert-service/alert-service.js +108 -0
- package/components/alert-service/alert-service.stories.css +17 -0
- package/components/analytics/analytics.d.ts +18 -0
- package/components/analytics/analytics.js +18 -0
- package/components/analytics/analytics__custom-plugin.d.ts +28 -0
- package/components/analytics/analytics__custom-plugin.js +58 -0
- package/components/auth/auth.d.ts +3 -0
- package/components/auth/auth.js +42 -0
- package/components/auth/auth__core.d.ts +236 -0
- package/components/auth/auth__core.js +834 -0
- package/components/auth/background-flow.d.ts +31 -0
- package/components/auth/background-flow.js +97 -0
- package/components/auth/down-notification.css +15 -0
- package/components/auth/down-notification.d.ts +15 -0
- package/components/auth/down-notification.js +52 -0
- package/components/auth/iframe-flow.d.ts +20 -0
- package/components/auth/iframe-flow.js +81 -0
- package/components/auth/request-builder.d.ts +48 -0
- package/components/auth/request-builder.js +64 -0
- package/components/auth/response-parser.d.ts +70 -0
- package/components/auth/response-parser.js +99 -0
- package/components/auth/storage.d.ts +112 -0
- package/components/auth/storage.js +224 -0
- package/components/auth/token-validator.d.ts +93 -0
- package/components/auth/token-validator.js +169 -0
- package/components/auth/window-flow.d.ts +26 -0
- package/components/auth/window-flow.js +102 -0
- package/components/auth-dialog/auth-dialog.css +54 -0
- package/components/auth-dialog/auth-dialog.d.ts +60 -0
- package/components/auth-dialog/auth-dialog.js +93 -0
- package/components/auth-dialog-service/auth-dialog-service.d.ts +6 -0
- package/components/auth-dialog-service/auth-dialog-service.js +26 -0
- package/components/avatar/avatar-example-datauri.d.ts +1 -0
- package/components/avatar/avatar-example-datauri.js +24 -0
- package/components/avatar/avatar.css +27 -0
- package/components/avatar/avatar.d.ts +52 -0
- package/components/avatar/avatar.js +98 -0
- package/components/avatar/fallback-avatar.d.ts +17 -0
- package/components/avatar/fallback-avatar.js +113 -0
- package/components/badge/badge.css +42 -0
- package/components/badge/badge.d.ts +24 -0
- package/components/badge/badge.js +35 -0
- package/components/button/button.css +397 -0
- package/components/button/button.d.ts +67 -0
- package/components/button/button.js +70 -0
- package/components/button/button__classes.d.ts +2 -0
- package/components/button/button__classes.js +18 -0
- package/components/button-group/button-group.css +236 -0
- package/components/button-group/button-group.d.ts +18 -0
- package/components/button-group/button-group.js +21 -0
- package/components/button-group/caption.d.ts +8 -0
- package/components/button-group/caption.js +14 -0
- package/components/button-set/button-set.css +21 -0
- package/components/button-set/button-set.d.ts +16 -0
- package/components/button-set/button-set.js +22 -0
- package/components/button-toolbar/button-toolbar.css +25 -0
- package/components/button-toolbar/button-toolbar.d.ts +16 -0
- package/components/button-toolbar/button-toolbar.js +20 -0
- package/components/caret/caret.d.ts +66 -0
- package/components/caret/caret.js +216 -0
- package/components/checkbox/checkbox.css +146 -0
- package/components/checkbox/checkbox.d.ts +45 -0
- package/components/checkbox/checkbox.js +72 -0
- package/components/clipboard/clipboard-fallback.d.ts +2 -0
- package/components/clipboard/clipboard-fallback.js +44 -0
- package/components/clipboard/clipboard.d.ts +5 -0
- package/components/clipboard/clipboard.js +41 -0
- package/components/code/code.css +29 -0
- package/components/code/code.d.ts +44 -0
- package/components/code/code.js +94 -0
- package/components/code/highlight.css +112 -0
- package/components/collapse/collapse-content.d.ts +11 -0
- package/components/collapse/collapse-content.js +72 -0
- package/components/collapse/collapse-context.d.ts +10 -0
- package/components/collapse/collapse-context.js +10 -0
- package/components/collapse/collapse-control.d.ts +11 -0
- package/components/collapse/collapse-control.js +22 -0
- package/components/collapse/collapse.css +40 -0
- package/components/collapse/collapse.d.ts +12 -0
- package/components/collapse/collapse.js +26 -0
- package/components/collapse/collapse.stories.css +25 -0
- package/components/collapse/consts.d.ts +4 -0
- package/components/collapse/consts.js +4 -0
- package/components/collapse/utils.d.ts +1 -0
- package/components/collapse/utils.js +1 -0
- package/components/confirm/confirm.css +7 -0
- package/components/confirm/confirm.d.ts +48 -0
- package/components/confirm/confirm.js +59 -0
- package/components/confirm-service/confirm-service.d.ts +21 -0
- package/components/confirm-service/confirm-service.js +52 -0
- package/components/content-layout/content-layout.css +108 -0
- package/components/content-layout/content-layout.d.ts +26 -0
- package/components/content-layout/content-layout.js +45 -0
- package/components/content-layout/sidebar.d.ts +31 -0
- package/components/content-layout/sidebar.js +76 -0
- package/components/contenteditable/contenteditable.d.ts +47 -0
- package/components/contenteditable/contenteditable.js +47 -0
- package/components/control-label/control-label.css +23 -0
- package/components/control-label/control-label.d.ts +11 -0
- package/components/control-label/control-label.js +22 -0
- package/components/data-list/data-list.css +97 -0
- package/components/data-list/data-list.d.ts +85 -0
- package/components/data-list/data-list.js +119 -0
- package/components/data-list/data-list.mock.d.ts +16 -0
- package/components/data-list/data-list.mock.js +207 -0
- package/components/data-list/item.d.ts +50 -0
- package/components/data-list/item.js +114 -0
- package/components/data-list/selection.d.ts +16 -0
- package/components/data-list/selection.js +81 -0
- package/components/data-list/title.d.ts +26 -0
- package/components/data-list/title.js +65 -0
- package/components/date-picker/consts.d.ts +98 -0
- package/components/date-picker/consts.js +44 -0
- package/components/date-picker/date-input.d.ts +47 -0
- package/components/date-picker/date-input.js +91 -0
- package/components/date-picker/date-picker.css +602 -0
- package/components/date-picker/date-picker.d.ts +77 -0
- package/components/date-picker/date-picker.js +218 -0
- package/components/date-picker/date-popup.d.ts +55 -0
- package/components/date-picker/date-popup.js +347 -0
- package/components/date-picker/day.d.ts +30 -0
- package/components/date-picker/day.js +88 -0
- package/components/date-picker/formats.d.ts +2 -0
- package/components/date-picker/formats.js +1 -0
- package/components/date-picker/month-names.d.ts +13 -0
- package/components/date-picker/month-names.js +62 -0
- package/components/date-picker/month-slider.d.ts +29 -0
- package/components/date-picker/month-slider.js +56 -0
- package/components/date-picker/month.d.ts +14 -0
- package/components/date-picker/month.js +33 -0
- package/components/date-picker/months.d.ts +11 -0
- package/components/date-picker/months.js +101 -0
- package/components/date-picker/weekdays.d.ts +13 -0
- package/components/date-picker/weekdays.js +24 -0
- package/components/date-picker/years.d.ts +25 -0
- package/components/date-picker/years.js +87 -0
- package/components/dialog/dialog.css +137 -0
- package/components/dialog/dialog.d.ts +64 -0
- package/components/dialog/dialog.js +128 -0
- package/components/dialog/dialog__body-scroll-preventer.d.ts +9 -0
- package/components/dialog/dialog__body-scroll-preventer.js +43 -0
- package/components/dropdown/anchor.d.ts +11 -0
- package/components/dropdown/anchor.js +16 -0
- package/components/dropdown/dropdown.css +18 -0
- package/components/dropdown/dropdown.d.ts +87 -0
- package/components/dropdown/dropdown.js +159 -0
- package/components/dropdown-menu/dropdown-menu.d.ts +36 -0
- package/components/dropdown-menu/dropdown-menu.js +56 -0
- package/components/editable-heading/editable-heading.css +198 -0
- package/components/editable-heading/editable-heading.d.ts +32 -0
- package/components/editable-heading/editable-heading.js +141 -0
- package/components/error-bubble/error-bubble-legacy.css +77 -0
- package/components/error-bubble/error-bubble.css +54 -0
- package/components/error-bubble/error-bubble.d.ts +18 -0
- package/components/error-bubble/error-bubble.js +28 -0
- package/components/error-message/error-message.css +37 -0
- package/components/error-message/error-message.d.ts +27 -0
- package/components/error-message/error-message.js +37 -0
- package/components/error-page/error-page.css +24 -0
- package/components/error-page/error-page.gif +0 -0
- package/components/footer/footer.css +83 -0
- package/components/footer/footer.d.ts +28 -0
- package/components/footer/footer.js +97 -0
- package/components/form/form.css +266 -0
- package/components/form/form.stories.js +138 -0
- package/components/global/compose.d.ts +7 -0
- package/components/global/compose.js +4 -0
- package/components/global/composeRefs.d.ts +3 -0
- package/components/global/composeRefs.js +8 -0
- package/components/global/controls-height.d.ts +9 -0
- package/components/global/controls-height.js +16 -0
- package/components/global/create-stateful-context.d.ts +27 -0
- package/components/global/create-stateful-context.js +38 -0
- package/components/global/data-tests.d.ts +3 -0
- package/components/global/data-tests.js +17 -0
- package/components/global/dom.d.ts +37 -0
- package/components/global/dom.js +83 -0
- package/components/global/focus-sensor-hoc.d.ts +19 -0
- package/components/global/focus-sensor-hoc.js +102 -0
- package/components/global/fuzzy-highlight.d.ts +11 -0
- package/components/global/fuzzy-highlight.js +58 -0
- package/components/global/get-event-key.d.ts +2 -0
- package/components/global/get-event-key.js +100 -0
- package/components/global/get-uid.d.ts +1 -0
- package/components/global/get-uid.js +16 -0
- package/components/global/global.css +101 -0
- package/components/global/inject-styles.d.ts +3 -0
- package/components/global/inject-styles.js +12 -0
- package/components/global/linear-function.d.ts +6 -0
- package/components/global/linear-function.js +13 -0
- package/components/global/listeners.d.ts +8 -0
- package/components/global/listeners.js +27 -0
- package/components/global/memoize.d.ts +1 -0
- package/components/global/memoize.js +15 -0
- package/components/global/normalize-indent.d.ts +1 -0
- package/components/global/normalize-indent.js +30 -0
- package/components/global/promise-with-timeout.d.ts +5 -0
- package/components/global/promise-with-timeout.js +11 -0
- package/components/global/prop-types.d.ts +4 -0
- package/components/global/prop-types.js +4 -0
- package/components/global/react-dom-renderer.d.ts +16 -0
- package/components/global/react-dom-renderer.js +25 -0
- package/components/global/react-render-adapter.d.ts +1 -0
- package/components/global/react-render-adapter.js +3 -0
- package/components/global/rerender-hoc.d.ts +10 -0
- package/components/global/rerender-hoc.js +14 -0
- package/components/global/schedule-raf.d.ts +1 -0
- package/components/global/schedule-raf.js +27 -0
- package/components/global/sniffer.d.ts +3 -0
- package/components/global/sniffer.js +4 -0
- package/components/global/theme.d.ts +21 -0
- package/components/global/theme.js +70 -0
- package/components/global/trivial-template-tag.d.ts +1 -0
- package/components/global/trivial-template-tag.js +9 -0
- package/components/global/typescript-utils.d.ts +2 -0
- package/components/global/typescript-utils.js +2 -0
- package/components/global/url.d.ts +57 -0
- package/components/global/url.js +136 -0
- package/components/global/use-event-callback.d.ts +1 -0
- package/components/global/use-event-callback.js +14 -0
- package/components/global/variables.css +179 -0
- package/components/global/variables.d.ts +89 -0
- package/components/global/variables.js +1 -0
- package/components/global/variables_dark.css +132 -0
- package/components/grid/col.d.ts +31 -0
- package/components/grid/col.js +49 -0
- package/components/grid/grid.css +915 -0
- package/components/grid/grid.d.ts +14 -0
- package/components/grid/grid.js +22 -0
- package/components/grid/row.d.ts +40 -0
- package/components/grid/row.js +51 -0
- package/components/group/group.css +7 -0
- package/components/group/group.d.ts +12 -0
- package/components/group/group.js +20 -0
- package/components/header/header.css +169 -0
- package/components/header/header.d.ts +34 -0
- package/components/header/header.js +46 -0
- package/components/header/logo.d.ts +14 -0
- package/components/header/logo.js +22 -0
- package/components/header/profile.d.ts +75 -0
- package/components/header/profile.js +119 -0
- package/components/header/services-link.d.ts +25 -0
- package/components/header/services-link.js +26 -0
- package/components/header/services.css +97 -0
- package/components/header/services.d.ts +33 -0
- package/components/header/services.js +62 -0
- package/components/header/smart-profile.d.ts +36 -0
- package/components/header/smart-profile.js +86 -0
- package/components/header/smart-services.d.ts +26 -0
- package/components/header/smart-services.js +49 -0
- package/components/header/tray-icon.d.ts +32 -0
- package/components/header/tray-icon.js +20 -0
- package/components/header/tray.d.ts +9 -0
- package/components/header/tray.js +18 -0
- package/components/heading/heading.css +68 -0
- package/components/heading/heading.d.ts +25 -0
- package/components/heading/heading.js +52 -0
- package/components/http/http.d.ts +61 -0
- package/components/http/http.js +192 -0
- package/components/http/http.mock.d.ts +20 -0
- package/components/http/http.mock.js +52 -0
- package/components/hub-source/hub-source.d.ts +44 -0
- package/components/hub-source/hub-source.js +107 -0
- package/components/hub-source/hub-source__user.d.ts +4 -0
- package/components/hub-source/hub-source__user.js +20 -0
- package/components/hub-source/hub-source__users-groups.d.ts +24 -0
- package/components/hub-source/hub-source__users-groups.js +53 -0
- package/components/i18n/README.md +46 -0
- package/components/i18n/i18n-context.d.ts +13 -0
- package/components/i18n/i18n-context.js +14 -0
- package/components/i18n/i18n.d.ts +59 -0
- package/components/i18n/i18n.js +26 -0
- package/components/i18n/messages.json +53 -0
- package/components/icon/icon.css +100 -0
- package/components/icon/icon.d.ts +43 -0
- package/components/icon/icon.js +69 -0
- package/components/icon/icon__constants.d.ts +30 -0
- package/components/icon/icon__constants.js +32 -0
- package/components/icon/icon__svg.d.ts +15 -0
- package/components/icon/icon__svg.js +58 -0
- package/components/icon/index.d.ts +2 -0
- package/components/icon/index.js +2 -0
- package/components/input/input-legacy.css +123 -0
- package/components/input/input.css +194 -0
- package/components/input/input.d.ts +77 -0
- package/components/input/input.js +165 -0
- package/components/input-size/input-size.css +82 -0
- package/components/input-size/input-size.stories.js +73 -0
- package/components/island/adaptive-island-hoc.d.ts +61 -0
- package/components/island/adaptive-island-hoc.js +28 -0
- package/components/island/content.d.ts +43 -0
- package/components/island/content.js +100 -0
- package/components/island/header.d.ts +8 -0
- package/components/island/header.js +78 -0
- package/components/island/island.css +131 -0
- package/components/island/island.d.ts +78 -0
- package/components/island/island.js +31 -0
- package/components/island-legacy/content-legacy.d.ts +10 -0
- package/components/island-legacy/content-legacy.js +17 -0
- package/components/island-legacy/header-legacy.d.ts +10 -0
- package/components/island-legacy/header-legacy.js +19 -0
- package/components/island-legacy/island-legacy.css +98 -0
- package/components/island-legacy/island-legacy.d.ts +12 -0
- package/components/island-legacy/island-legacy.js +19 -0
- package/components/line/line.css +14 -0
- package/components/link/clickableLink.d.ts +20 -0
- package/components/link/clickableLink.js +33 -0
- package/components/link/link.css +64 -0
- package/components/link/link.d.ts +138 -0
- package/components/link/link.js +44 -0
- package/components/list/consts.d.ts +77 -0
- package/components/list/consts.js +25 -0
- package/components/list/list.css +298 -0
- package/components/list/list.d.ts +205 -0
- package/components/list/list.js +590 -0
- package/components/list/list.stories.css +3 -0
- package/components/list/list__custom.d.ts +6 -0
- package/components/list/list__custom.js +52 -0
- package/components/list/list__hint.d.ts +15 -0
- package/components/list/list__hint.js +16 -0
- package/components/list/list__item.d.ts +8 -0
- package/components/list/list__item.js +130 -0
- package/components/list/list__link.d.ts +9 -0
- package/components/list/list__link.js +43 -0
- package/components/list/list__separator.d.ts +5 -0
- package/components/list/list__separator.js +21 -0
- package/components/list/list__title.d.ts +5 -0
- package/components/list/list__title.js +28 -0
- package/components/list/list__users-groups-source.d.ts +27 -0
- package/components/list/list__users-groups-source.js +74 -0
- package/components/loader/loader.css +27 -0
- package/components/loader/loader.d.ts +28 -0
- package/components/loader/loader.js +44 -0
- package/components/loader/loader__core.d.ts +75 -0
- package/components/loader/loader__core.js +219 -0
- package/components/loader-inline/loader-inline.css +73 -0
- package/components/loader-inline/loader-inline.d.ts +18 -0
- package/components/loader-inline/loader-inline.js +27 -0
- package/components/loader-screen/loader-screen.css +29 -0
- package/components/loader-screen/loader-screen.d.ts +17 -0
- package/components/loader-screen/loader-screen.js +25 -0
- package/components/login-dialog/login-dialog.css +23 -0
- package/components/login-dialog/login-dialog.d.ts +47 -0
- package/components/login-dialog/login-dialog.js +84 -0
- package/components/login-dialog/service.d.ts +2 -0
- package/components/login-dialog/service.js +24 -0
- package/components/markdown/markdown.css +126 -0
- package/components/markdown/markdown.d.ts +12 -0
- package/components/markdown/markdown.js +25 -0
- package/components/message/message.css +61 -0
- package/components/message/message.d.ts +55 -0
- package/components/message/message.js +129 -0
- package/components/old-browsers-message/old-browsers-message.css +26 -0
- package/components/old-browsers-message/old-browsers-message.d.ts +2 -0
- package/components/old-browsers-message/old-browsers-message.js +83 -0
- package/components/old-browsers-message/old-browsers-message__stop.d.ts +1 -0
- package/components/old-browsers-message/old-browsers-message__stop.js +2 -0
- package/components/old-browsers-message/white-list.d.ts +2 -0
- package/components/old-browsers-message/white-list.js +25 -0
- package/components/pager/pager.css +19 -0
- package/components/pager/pager.d.ts +78 -0
- package/components/pager/pager.js +223 -0
- package/components/palette/palette.css +216 -0
- package/components/panel/panel.css +20 -0
- package/components/panel/panel.d.ts +12 -0
- package/components/panel/panel.js +20 -0
- package/components/permissions/permissions.d.ts +111 -0
- package/components/permissions/permissions.js +177 -0
- package/components/permissions/permissions__cache.d.ts +93 -0
- package/components/permissions/permissions__cache.js +228 -0
- package/components/popup/popup.consts.d.ts +37 -0
- package/components/popup/popup.consts.js +45 -0
- package/components/popup/popup.css +34 -0
- package/components/popup/popup.d.ts +147 -0
- package/components/popup/popup.js +312 -0
- package/components/popup/popup.target.d.ts +7 -0
- package/components/popup/popup.target.js +15 -0
- package/components/popup/position.d.ts +30 -0
- package/components/popup/position.js +202 -0
- package/components/popup-menu/popup-menu.d.ts +80 -0
- package/components/popup-menu/popup-menu.js +41 -0
- package/components/progress-bar/progress-bar.css +82 -0
- package/components/progress-bar/progress-bar.d.ts +64 -0
- package/components/progress-bar/progress-bar.js +76 -0
- package/components/query-assist/query-assist.css +275 -0
- package/components/query-assist/query-assist.d.ts +306 -0
- package/components/query-assist/query-assist.js +847 -0
- package/components/query-assist/query-assist__suggestions.d.ts +29 -0
- package/components/query-assist/query-assist__suggestions.js +60 -0
- package/components/radio/radio.css +122 -0
- package/components/radio/radio.d.ts +18 -0
- package/components/radio/radio.js +27 -0
- package/components/radio/radio__item.d.ts +28 -0
- package/components/radio/radio__item.js +41 -0
- package/components/select/select-popup.css +103 -0
- package/components/select/select.css +235 -0
- package/components/select/select.d.ts +276 -0
- package/components/select/select.js +957 -0
- package/components/select/select__filter.d.ts +19 -0
- package/components/select/select__filter.js +49 -0
- package/components/select/select__popup.d.ts +166 -0
- package/components/select/select__popup.js +408 -0
- package/components/shortcuts/core.d.ts +74 -0
- package/components/shortcuts/core.js +191 -0
- package/components/shortcuts/shortcut-title.d.ts +1 -0
- package/components/shortcuts/shortcut-title.js +50 -0
- package/components/shortcuts/shortcuts-hoc.d.ts +65 -0
- package/components/shortcuts/shortcuts-hoc.js +19 -0
- package/components/shortcuts/shortcuts.d.ts +28 -0
- package/components/shortcuts/shortcuts.js +50 -0
- package/components/sidebar/sidebar.css +157 -0
- package/components/storage/storage.d.ts +18 -0
- package/components/storage/storage.js +22 -0
- package/components/storage/storage__fallback.d.ts +79 -0
- package/components/storage/storage__fallback.js +181 -0
- package/components/storage/storage__local.d.ts +38 -0
- package/components/storage/storage__local.js +119 -0
- package/components/tab-trap/tab-trap.css +6 -0
- package/components/tab-trap/tab-trap.d.ts +43 -0
- package/components/tab-trap/tab-trap.js +125 -0
- package/components/table/cell.d.ts +13 -0
- package/components/table/cell.js +16 -0
- package/components/table/disable-hover-hoc.d.ts +64 -0
- package/components/table/disable-hover-hoc.js +32 -0
- package/components/table/header-cell.d.ts +43 -0
- package/components/table/header-cell.js +56 -0
- package/components/table/header.d.ts +56 -0
- package/components/table/header.js +67 -0
- package/components/table/multitable.d.ts +25 -0
- package/components/table/multitable.js +81 -0
- package/components/table/row-with-focus-sensor.d.ts +18 -0
- package/components/table/row-with-focus-sensor.js +25 -0
- package/components/table/row.d.ts +59 -0
- package/components/table/row.js +154 -0
- package/components/table/selection-adapter.d.ts +5 -0
- package/components/table/selection-adapter.js +10 -0
- package/components/table/selection-shortcuts-hoc.d.ts +17 -0
- package/components/table/selection-shortcuts-hoc.js +146 -0
- package/components/table/selection.d.ts +47 -0
- package/components/table/selection.js +150 -0
- package/components/table/smart-table.d.ts +64 -0
- package/components/table/smart-table.js +40 -0
- package/components/table/table.css +259 -0
- package/components/table/table.d.ts +159 -0
- package/components/table/table.examples2.json +19 -0
- package/components/table/table.js +231 -0
- package/components/table/table.stories.json +45 -0
- package/components/table-legacy/table-legacy.css +346 -0
- package/components/table-legacy/table-legacy__toolbar.css +25 -0
- package/components/tabs/collapsible-more.d.ts +29 -0
- package/components/tabs/collapsible-more.js +97 -0
- package/components/tabs/collapsible-tab.d.ts +16 -0
- package/components/tabs/collapsible-tab.js +34 -0
- package/components/tabs/collapsible-tabs.d.ts +43 -0
- package/components/tabs/collapsible-tabs.js +196 -0
- package/components/tabs/custom-item.d.ts +9 -0
- package/components/tabs/custom-item.js +5 -0
- package/components/tabs/dumb-tabs.d.ts +35 -0
- package/components/tabs/dumb-tabs.js +56 -0
- package/components/tabs/smart-tabs.d.ts +20 -0
- package/components/tabs/smart-tabs.js +25 -0
- package/components/tabs/tab-link.d.ts +18 -0
- package/components/tabs/tab-link.js +24 -0
- package/components/tabs/tab.d.ts +27 -0
- package/components/tabs/tab.js +19 -0
- package/components/tabs/tabs.css +223 -0
- package/components/tabs/tabs.d.ts +7 -0
- package/components/tabs/tabs.js +7 -0
- package/components/tag/tag.css +184 -0
- package/components/tag/tag.d.ts +64 -0
- package/components/tag/tag.js +130 -0
- package/components/tags-input/tags-input.css +100 -0
- package/components/tags-input/tags-input.d.ts +138 -0
- package/components/tags-input/tags-input.js +275 -0
- package/components/tags-list/tags-list.d.ts +46 -0
- package/components/tags-list/tags-list.js +45 -0
- package/components/text/text.css +21 -0
- package/components/text/text.d.ts +23 -0
- package/components/text/text.js +31 -0
- package/components/toggle/toggle.css +198 -0
- package/components/toggle/toggle.d.ts +39 -0
- package/components/toggle/toggle.js +46 -0
- package/components/tooltip/tooltip.css +17 -0
- package/components/tooltip/tooltip.d.ts +65 -0
- package/components/tooltip/tooltip.js +126 -0
- package/components/user-agreement/service.d.ts +69 -0
- package/components/user-agreement/service.js +242 -0
- package/components/user-agreement/toolbox.eula.d.ts +2 -0
- package/components/user-agreement/toolbox.eula.js +160 -0
- package/components/user-agreement/user-agreement.css +29 -0
- package/components/user-agreement/user-agreement.d.ts +60 -0
- package/components/user-agreement/user-agreement.js +80 -0
- package/components/user-card/card.d.ts +70 -0
- package/components/user-card/card.js +89 -0
- package/components/user-card/smart-user-card-tooltip.d.ts +20 -0
- package/components/user-card/smart-user-card-tooltip.js +47 -0
- package/components/user-card/tooltip.d.ts +36 -0
- package/components/user-card/tooltip.js +43 -0
- package/components/user-card/user-card.css +123 -0
- package/components/user-card/user-card.d.ts +11 -0
- package/components/user-card/user-card.js +11 -0
- package/package.json +61 -61
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
@import "../global/variables.css";
|
|
2
|
+
@import "../button/button.css";
|
|
3
|
+
|
|
4
|
+
.outerContainer {
|
|
5
|
+
--ring-input-icon-offset: calc(var(--ring-unit) * 2.5);
|
|
6
|
+
--ring-input-padding-inline: var(--ring-unit);
|
|
7
|
+
--ring-input-background-color: var(--ring-content-background-color);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.borderless {
|
|
11
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
12
|
+
--ring-input-padding-inline: 0px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.container {
|
|
16
|
+
position: relative;
|
|
17
|
+
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
|
|
20
|
+
font-size: var(--ring-font-size);
|
|
21
|
+
line-height: var(--ring-line-height);
|
|
22
|
+
|
|
23
|
+
& * {
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.input {
|
|
29
|
+
--ring-input-padding-start: var(--ring-input-padding-inline);
|
|
30
|
+
--ring-input-padding-end: var(--ring-input-padding-inline);
|
|
31
|
+
|
|
32
|
+
width: 100%;
|
|
33
|
+
|
|
34
|
+
margin: 0;
|
|
35
|
+
padding-top: var(--ring-input-padding-block);
|
|
36
|
+
padding-right: var(--ring-input-padding-end);
|
|
37
|
+
padding-bottom: var(--ring-input-padding-block);
|
|
38
|
+
padding-left: var(--ring-input-padding-start);
|
|
39
|
+
|
|
40
|
+
transition: border-color var(--ring-ease);
|
|
41
|
+
|
|
42
|
+
color: var(--ring-text-color);
|
|
43
|
+
border: 1px solid var(--ring-borders-color);
|
|
44
|
+
border-radius: var(--ring-border-radius);
|
|
45
|
+
outline: none;
|
|
46
|
+
background-color: var(--ring-input-background-color);
|
|
47
|
+
|
|
48
|
+
font: inherit;
|
|
49
|
+
|
|
50
|
+
caret-color: var(--ring-main-color);
|
|
51
|
+
|
|
52
|
+
[dir="rtl"] & {
|
|
53
|
+
padding-right: var(--ring-input-padding-start);
|
|
54
|
+
padding-left: var(--ring-input-padding-end);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:hover {
|
|
58
|
+
transition: none;
|
|
59
|
+
|
|
60
|
+
border-color: var(--ring-border-hover-color);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.error & {
|
|
64
|
+
border-color: var(--ring-icon-error-color);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:focus {
|
|
68
|
+
transition: none;
|
|
69
|
+
|
|
70
|
+
border-color: var(--ring-main-color);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&[disabled] {
|
|
74
|
+
color: var(--ring-disabled-color);
|
|
75
|
+
border-color: var(--ring-border-disabled-color);
|
|
76
|
+
background-color: var(--ring-disabled-background-color);
|
|
77
|
+
|
|
78
|
+
-webkit-text-fill-color: var(--ring-disabled-color); /* Required for Safari, see RG-2063 for details */
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/*
|
|
82
|
+
Kill yellow/blue webkit autocomplete
|
|
83
|
+
https://css-tricks.com/snippets/css/change-autocomplete-styles-webkit-browsers/
|
|
84
|
+
*/
|
|
85
|
+
&:-webkit-autofill {
|
|
86
|
+
&,
|
|
87
|
+
&:hover,
|
|
88
|
+
&:focus {
|
|
89
|
+
transition: background-color 50000s ease-in-out 0s;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.borderless .input {
|
|
95
|
+
border-color: transparent;
|
|
96
|
+
background-color: transparent;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.withIcon .input {
|
|
100
|
+
--ring-input-padding-start: calc(var(--ring-input-padding-inline) + var(--ring-input-icon-offset));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.clearable .input {
|
|
104
|
+
--ring-input-padding-end: calc(var(--ring-input-padding-inline) + var(--ring-input-icon-offset));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.icon {
|
|
108
|
+
position: absolute;
|
|
109
|
+
top: calc(var(--ring-input-padding-block) + 1px);
|
|
110
|
+
left: var(--ring-input-padding-inline);
|
|
111
|
+
|
|
112
|
+
pointer-events: none;
|
|
113
|
+
|
|
114
|
+
color: var(--ring-icon-secondary-color);
|
|
115
|
+
|
|
116
|
+
[dir="rtl"] & {
|
|
117
|
+
right: var(--ring-unit);
|
|
118
|
+
left: auto;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.clear {
|
|
123
|
+
position: absolute;
|
|
124
|
+
top: calc(var(--ring-input-padding-block) + 2px);
|
|
125
|
+
right: var(--ring-input-padding-inline);
|
|
126
|
+
|
|
127
|
+
height: auto;
|
|
128
|
+
|
|
129
|
+
padding-right: 0;
|
|
130
|
+
|
|
131
|
+
line-height: inherit;
|
|
132
|
+
|
|
133
|
+
.empty & {
|
|
134
|
+
display: none;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
[dir="rtl"] & {
|
|
138
|
+
right: auto;
|
|
139
|
+
left: var(--ring-unit);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
textarea.input {
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
|
|
146
|
+
box-sizing: border-box;
|
|
147
|
+
|
|
148
|
+
resize: none;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.input::placeholder {
|
|
152
|
+
color: var(--ring-disabled-color);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.input::-webkit-search-cancel-button {
|
|
156
|
+
-webkit-appearance: none;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.errorText {
|
|
160
|
+
margin-top: calc(var(--ring-unit) / 2);
|
|
161
|
+
|
|
162
|
+
color: var(--ring-error-color);
|
|
163
|
+
|
|
164
|
+
font-size: var(--ring-font-size-smaller);
|
|
165
|
+
line-height: var(--ring-line-height-lowest);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.sizeS {
|
|
169
|
+
width: calc(var(--ring-unit) * 12);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.sizeM {
|
|
173
|
+
width: calc(var(--ring-unit) * 30);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.sizeL {
|
|
177
|
+
width: calc(var(--ring-unit) * 50);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.sizeFULL {
|
|
181
|
+
width: 100%;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.heightS {
|
|
185
|
+
--ring-input-padding-block: 1px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.heightM {
|
|
189
|
+
--ring-input-padding-block: 3px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.heightL {
|
|
193
|
+
--ring-input-padding-block: 5px;
|
|
194
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React, { PureComponent, Ref, ComponentType, InputHTMLAttributes, TextareaHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ControlsHeight } from '../global/controls-height';
|
|
3
|
+
import { LabelType } from '../control-label/control-label';
|
|
4
|
+
declare function noop(): void;
|
|
5
|
+
/**
|
|
6
|
+
* @name Input
|
|
7
|
+
*/
|
|
8
|
+
declare enum Size {
|
|
9
|
+
AUTO = "Auto",
|
|
10
|
+
S = "S",
|
|
11
|
+
M = "M",
|
|
12
|
+
L = "L",
|
|
13
|
+
FULL = "FULL"
|
|
14
|
+
}
|
|
15
|
+
export interface InputTranslations {
|
|
16
|
+
clear: string;
|
|
17
|
+
}
|
|
18
|
+
export interface InputBaseProps {
|
|
19
|
+
size: Size;
|
|
20
|
+
enableShortcuts: boolean | string[];
|
|
21
|
+
children?: string | undefined;
|
|
22
|
+
inputClassName?: string | null | undefined;
|
|
23
|
+
label?: ReactNode;
|
|
24
|
+
labelType?: LabelType;
|
|
25
|
+
active?: boolean | null | undefined;
|
|
26
|
+
error?: ReactNode | null | undefined;
|
|
27
|
+
borderless?: boolean | null | undefined;
|
|
28
|
+
onClear?: ((e: React.MouseEvent<HTMLButtonElement>) => void) | null | undefined;
|
|
29
|
+
loading?: boolean | null | undefined;
|
|
30
|
+
icon?: string | ComponentType | null | undefined;
|
|
31
|
+
height?: ControlsHeight | undefined;
|
|
32
|
+
afterInput?: ReactNode;
|
|
33
|
+
translations?: InputTranslations | null | undefined;
|
|
34
|
+
}
|
|
35
|
+
type Override<D, S> = Omit<D, keyof S> & S;
|
|
36
|
+
export type InputSpecificProps = Override<InputHTMLAttributes<HTMLInputElement>, InputBaseProps> & {
|
|
37
|
+
multiline?: false | undefined;
|
|
38
|
+
inputRef: Ref<HTMLInputElement>;
|
|
39
|
+
};
|
|
40
|
+
type TextAreaSpecificProps = Override<TextareaHTMLAttributes<HTMLTextAreaElement>, InputBaseProps> & {
|
|
41
|
+
multiline: true;
|
|
42
|
+
inputRef: Ref<HTMLTextAreaElement>;
|
|
43
|
+
};
|
|
44
|
+
export type InputProps = InputSpecificProps | TextAreaSpecificProps;
|
|
45
|
+
export declare class Input extends PureComponent<InputProps> {
|
|
46
|
+
static defaultProps: {
|
|
47
|
+
size: Size;
|
|
48
|
+
onChange: typeof noop;
|
|
49
|
+
inputRef: typeof noop;
|
|
50
|
+
enableShortcuts: string[];
|
|
51
|
+
};
|
|
52
|
+
state: {
|
|
53
|
+
empty: boolean;
|
|
54
|
+
};
|
|
55
|
+
componentDidMount(): void;
|
|
56
|
+
componentDidUpdate(): void;
|
|
57
|
+
componentWillUnmount(): void;
|
|
58
|
+
static contextType: React.Context<ControlsHeight>;
|
|
59
|
+
frame?: number;
|
|
60
|
+
input?: HTMLInputElement | HTMLTextAreaElement | null;
|
|
61
|
+
id: string;
|
|
62
|
+
getId(): string;
|
|
63
|
+
checkValue(): void;
|
|
64
|
+
stretch(el: HTMLElement | null | undefined): void;
|
|
65
|
+
adapt(): void;
|
|
66
|
+
inputRef: (el: HTMLInputElement | HTMLTextAreaElement | null) => void;
|
|
67
|
+
clear: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
68
|
+
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
69
|
+
handleTextareaChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
70
|
+
render(): React.JSX.Element;
|
|
71
|
+
}
|
|
72
|
+
export type ContainerProps<P extends InputProps> = JSX.LibraryManagedAttributes<typeof Input, P>;
|
|
73
|
+
export type InputSpecificAttrs = ContainerProps<InputSpecificProps>;
|
|
74
|
+
export type TextAreaSpecificAttrs = ContainerProps<TextAreaSpecificProps>;
|
|
75
|
+
export type InputAttrs = InputSpecificAttrs | TextAreaSpecificAttrs;
|
|
76
|
+
export default Input;
|
|
77
|
+
export { Size };
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import closeIcon from '@jetbrains/icons/close-12px';
|
|
5
|
+
import { refObject } from '../global/prop-types';
|
|
6
|
+
import Button from '../button/button';
|
|
7
|
+
import getUID from '../global/get-uid';
|
|
8
|
+
import Icon from '../icon/icon';
|
|
9
|
+
import { I18nContext } from '../i18n/i18n-context';
|
|
10
|
+
import composeRefs from '../global/composeRefs';
|
|
11
|
+
import { ControlsHeightContext } from '../global/controls-height';
|
|
12
|
+
import { ControlLabel } from '../control-label/control-label';
|
|
13
|
+
import styles from './input.css';
|
|
14
|
+
function noop() { }
|
|
15
|
+
/**
|
|
16
|
+
* @name Input
|
|
17
|
+
*/
|
|
18
|
+
var Size;
|
|
19
|
+
(function (Size) {
|
|
20
|
+
Size["AUTO"] = "Auto";
|
|
21
|
+
Size["S"] = "S";
|
|
22
|
+
Size["M"] = "M";
|
|
23
|
+
Size["L"] = "L";
|
|
24
|
+
Size["FULL"] = "FULL";
|
|
25
|
+
})(Size || (Size = {}));
|
|
26
|
+
export class Input extends PureComponent {
|
|
27
|
+
static defaultProps = {
|
|
28
|
+
size: Size.M,
|
|
29
|
+
onChange: noop,
|
|
30
|
+
inputRef: noop,
|
|
31
|
+
enableShortcuts: ['esc']
|
|
32
|
+
};
|
|
33
|
+
state = {
|
|
34
|
+
empty: true
|
|
35
|
+
};
|
|
36
|
+
componentDidMount() {
|
|
37
|
+
this.frame = requestAnimationFrame(() => this.adapt());
|
|
38
|
+
}
|
|
39
|
+
componentDidUpdate() {
|
|
40
|
+
this.adapt();
|
|
41
|
+
}
|
|
42
|
+
componentWillUnmount() {
|
|
43
|
+
if (this.frame != null) {
|
|
44
|
+
cancelAnimationFrame(this.frame);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
static contextType = ControlsHeightContext;
|
|
48
|
+
frame;
|
|
49
|
+
input;
|
|
50
|
+
id = getUID('ring-input-');
|
|
51
|
+
getId() {
|
|
52
|
+
return this.props.id || this.id;
|
|
53
|
+
}
|
|
54
|
+
checkValue() {
|
|
55
|
+
this.setState({
|
|
56
|
+
empty: !this.input?.value
|
|
57
|
+
});
|
|
58
|
+
if (this.props.multiline &&
|
|
59
|
+
this.input != null && this.input.scrollHeight >= this.input.clientHeight) {
|
|
60
|
+
this.stretch(this.input);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
stretch(el) {
|
|
64
|
+
if (!el || !el.style) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
el.style.height = '0'; // To know the real scrollHeight
|
|
68
|
+
el.style.height = `${el.scrollHeight + 2}px`;
|
|
69
|
+
}
|
|
70
|
+
adapt() {
|
|
71
|
+
this.checkValue();
|
|
72
|
+
}
|
|
73
|
+
inputRef = (el) => {
|
|
74
|
+
this.input = el;
|
|
75
|
+
};
|
|
76
|
+
clear = (e) => {
|
|
77
|
+
this.props.onClear && this.props.onClear(e);
|
|
78
|
+
};
|
|
79
|
+
handleInputChange = (e) => {
|
|
80
|
+
if (!this.props.multiline) {
|
|
81
|
+
this.props.onChange?.(e);
|
|
82
|
+
this.checkValue();
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
handleTextareaChange = (e) => {
|
|
86
|
+
if (this.props.multiline) {
|
|
87
|
+
this.props.onChange?.(e);
|
|
88
|
+
this.checkValue();
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
render() {
|
|
92
|
+
const {
|
|
93
|
+
// Modifiers
|
|
94
|
+
size, active, multiline, borderless,
|
|
95
|
+
// Props
|
|
96
|
+
label, labelType, error, className, inputClassName, children, value, onClear, disabled, inputRef, onChange, enableShortcuts, id, placeholder, icon, translations, height = this.context, afterInput, ...restProps } = this.props;
|
|
97
|
+
const { empty } = this.state;
|
|
98
|
+
const clearable = !!onClear;
|
|
99
|
+
const classes = classNames(className, styles.outerContainer, [styles[`size${size}`]], [styles[`height${height}`]], {
|
|
100
|
+
'ring-js-shortcuts': enableShortcuts === true,
|
|
101
|
+
[styles.active]: active,
|
|
102
|
+
[styles.error]: error != null,
|
|
103
|
+
[styles.empty]: empty,
|
|
104
|
+
[styles.noLabel]: !this.props.label,
|
|
105
|
+
[styles.withIcon]: icon != null,
|
|
106
|
+
[styles.clearable]: clearable,
|
|
107
|
+
[styles.borderless]: borderless
|
|
108
|
+
});
|
|
109
|
+
const inputClasses = classNames(styles.input, inputClassName);
|
|
110
|
+
const text = value != null ? value : children;
|
|
111
|
+
const commonProps = {
|
|
112
|
+
ref: composeRefs(this.inputRef, inputRef),
|
|
113
|
+
className: inputClasses,
|
|
114
|
+
value: text,
|
|
115
|
+
disabled,
|
|
116
|
+
id: this.getId(),
|
|
117
|
+
placeholder,
|
|
118
|
+
'aria-label': typeof label === 'string' && label ? label : placeholder,
|
|
119
|
+
'data-enabled-shortcuts': Array.isArray(enableShortcuts) ? enableShortcuts.join(',') : null
|
|
120
|
+
};
|
|
121
|
+
return (<I18nContext.Consumer>
|
|
122
|
+
{({ translate }) => (<div className={classes} data-test="ring-input">
|
|
123
|
+
{label && (<ControlLabel htmlFor={this.getId()} disabled={disabled} type={labelType}>{label}</ControlLabel>)}
|
|
124
|
+
<div className={styles.container}>
|
|
125
|
+
{icon && <Icon glyph={icon} className={styles.icon}/>}
|
|
126
|
+
{multiline
|
|
127
|
+
? (<textarea onChange={this.handleTextareaChange} rows={1} {...commonProps} {...restProps}/>)
|
|
128
|
+
: (<input onChange={this.handleInputChange} {...commonProps} {...restProps}/>)}
|
|
129
|
+
{clearable && !disabled && (<Button title={translations?.clear ?? translate('clear')} data-test="ring-input-clear" className={styles.clear} icon={closeIcon} onClick={this.clear}/>)}
|
|
130
|
+
{afterInput}
|
|
131
|
+
</div>
|
|
132
|
+
{error && <div className={styles.errorText}>{error}</div>}
|
|
133
|
+
</div>)}
|
|
134
|
+
</I18nContext.Consumer>);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
Input.propTypes = {
|
|
138
|
+
value: PropTypes.string,
|
|
139
|
+
className: PropTypes.string,
|
|
140
|
+
inputClassName: PropTypes.string,
|
|
141
|
+
size: PropTypes.oneOf(Object.values(Size)).isRequired,
|
|
142
|
+
label: PropTypes.node,
|
|
143
|
+
active: PropTypes.bool,
|
|
144
|
+
error: PropTypes.string,
|
|
145
|
+
multiline: PropTypes.bool,
|
|
146
|
+
onChange: PropTypes.func,
|
|
147
|
+
onClear: PropTypes.func,
|
|
148
|
+
inputRef: PropTypes.oneOfType([
|
|
149
|
+
PropTypes.func,
|
|
150
|
+
refObject(PropTypes.instanceOf(HTMLInputElement)),
|
|
151
|
+
refObject(PropTypes.instanceOf(HTMLTextAreaElement))
|
|
152
|
+
]),
|
|
153
|
+
children: PropTypes.string,
|
|
154
|
+
enableShortcuts: PropTypes.oneOfType([
|
|
155
|
+
PropTypes.bool,
|
|
156
|
+
PropTypes.arrayOf(PropTypes.string.isRequired)
|
|
157
|
+
]),
|
|
158
|
+
disabled: PropTypes.bool,
|
|
159
|
+
id: PropTypes.string,
|
|
160
|
+
placeholder: PropTypes.string,
|
|
161
|
+
translations: PropTypes.object,
|
|
162
|
+
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType])
|
|
163
|
+
};
|
|
164
|
+
export default Input;
|
|
165
|
+
export { Size };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
@import "../global/variables.css";
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--ring-input-xs: calc(var(--ring-unit) * 12);
|
|
5
|
+
--ring-input-s: calc(var(--ring-unit) * 12);
|
|
6
|
+
--ring-input-m: calc(var(--ring-unit) * 30);
|
|
7
|
+
--ring-input-l: calc(var(--ring-unit) * 50);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @name Input Sizes
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/* XS */
|
|
15
|
+
|
|
16
|
+
:global(.ring-input-size_xs.ring-input-size_xs) {
|
|
17
|
+
display: inline-block;
|
|
18
|
+
|
|
19
|
+
width: var(--ring-input-xs);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:global(.ring-input-size_xs.ring-input-size_xs ~ .ring-error-bubble) {
|
|
23
|
+
left: calc(var(--ring-input-xs) + 2px);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* S */
|
|
27
|
+
|
|
28
|
+
:global(.ring-input-size_s.ring-input-size_s) {
|
|
29
|
+
display: inline-block;
|
|
30
|
+
|
|
31
|
+
width: var(--ring-input-s);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:global(.ring-input-size_s.ring-input-size_s ~ .ring-error-bubble) {
|
|
35
|
+
left: calc(var(--ring-input-s) + 2px);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* M */
|
|
39
|
+
|
|
40
|
+
:global(.ring-input-size_m.ring-input-size_m) {
|
|
41
|
+
display: inline-block;
|
|
42
|
+
|
|
43
|
+
width: var(--ring-input-m);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:global(.ring-input-size_m.ring-input-size_m ~ .ring-error-bubble) {
|
|
47
|
+
left: calc(var(--ring-input-m) + 2px);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:global(.ring-input-size_md.ring-input-size_md) {
|
|
51
|
+
display: inline-block;
|
|
52
|
+
|
|
53
|
+
width: var(--ring-input-m);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:global(.ring-input-size_md.ring-input-size_md ~ .ring-error-bubble) {
|
|
57
|
+
left: calc(var(--ring-input-m) + 2px);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* L */
|
|
61
|
+
|
|
62
|
+
:global(.ring-input-size_l.ring-input-size_l) {
|
|
63
|
+
display: inline-block;
|
|
64
|
+
|
|
65
|
+
width: var(--ring-input-l);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:global(.ring-input-size_l.ring-input-size_l ~ .ring-error-bubble) {
|
|
69
|
+
left: calc(var(--ring-input-l) + 2px);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:global(.ring-input-height_s.ring-input-height_s) {
|
|
73
|
+
--ring-input-padding-block: 1px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:global(.ring-input-height_m.ring-input-height_m) {
|
|
77
|
+
--ring-input-padding-block: 3px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:global(.ring-input-height_l.ring-input-height_l) {
|
|
81
|
+
--ring-input-padding-block: 5px;
|
|
82
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import '../input/input-legacy.css';
|
|
2
|
+
import '../form/form.css';
|
|
3
|
+
import './input-size.css';
|
|
4
|
+
import '../error-bubble/error-bubble-legacy.css';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Style-only/Input Sizes'
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const basic = () => (
|
|
12
|
+
<div>
|
|
13
|
+
<h3 className="example-block">Inputs</h3>
|
|
14
|
+
<div className="example-block">
|
|
15
|
+
<div className="ring-error-bubble-wrapper">
|
|
16
|
+
<input id="extra-short-input" type="number" className="ring-input ring-input-size_xs"/>
|
|
17
|
+
<label htmlFor="extra-short-input" className="ring-error-bubble active">Extra-short Input</label>
|
|
18
|
+
</div>
|
|
19
|
+
<div className="ring-error-bubble-wrapper">
|
|
20
|
+
<input id="short-input" type="number" className="ring-input ring-input-size_s"/>
|
|
21
|
+
<label htmlFor="short-input" className="ring-error-bubble active">Short Input</label>
|
|
22
|
+
</div>
|
|
23
|
+
<div className="ring-error-bubble-wrapper">
|
|
24
|
+
<input id="medium-input" type="number" className="ring-input ring-input-size_m"/>
|
|
25
|
+
<label htmlFor="medium-input" className="ring-error-bubble active">Medium Input</label>
|
|
26
|
+
</div>
|
|
27
|
+
<div className="ring-error-bubble-wrapper">
|
|
28
|
+
<input id="long-input" type="number" className="ring-input ring-input-size_l"/>
|
|
29
|
+
<label htmlFor="long-input" className="ring-error-bubble active">Long Input</label>
|
|
30
|
+
</div>
|
|
31
|
+
<div className="ring-error-bubble-wrapper">
|
|
32
|
+
<input id="full-width-input" type="number" className="ring-input"/>
|
|
33
|
+
<label htmlFor="full-width-input" className="ring-error-bubble active">Full-width Input</label>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<h3 className="example-block">Textareas</h3>
|
|
38
|
+
<div className="example-block">
|
|
39
|
+
<div className="ring-error-bubble-wrapper">
|
|
40
|
+
<textarea id="extra-short-textarea" className="ring-input ring-input-size_xs"/>
|
|
41
|
+
<label htmlFor="extra-short-textarea" className="ring-error-bubble active">Extra-short Textarea</label>
|
|
42
|
+
</div>
|
|
43
|
+
<div className="ring-error-bubble-wrapper">
|
|
44
|
+
<textarea id="short-textarea" className="ring-input ring-input-size_s"/>
|
|
45
|
+
<label htmlFor="short-textarea" className="ring-error-bubble active">Short Textarea</label>
|
|
46
|
+
</div>
|
|
47
|
+
<div className="ring-error-bubble-wrapper">
|
|
48
|
+
<textarea id="medium-textarea" className="ring-input ring-input-size_m"/>
|
|
49
|
+
<label htmlFor="medium-textarea" className="ring-error-bubble active">Medium Textarea</label>
|
|
50
|
+
</div>
|
|
51
|
+
<div className="ring-error-bubble-wrapper">
|
|
52
|
+
<textarea id="long-textarea" className="ring-input ring-input-size_l"/>
|
|
53
|
+
<label htmlFor="long-textarea" className="ring-error-bubble active">Long Textarea</label>
|
|
54
|
+
</div>
|
|
55
|
+
<div className="ring-error-bubble-wrapper">
|
|
56
|
+
<textarea id="full-width-textarea" className="ring-input"/>
|
|
57
|
+
<label htmlFor="full-width-textarea" className="ring-error-bubble active">Full-width Textarea</label>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
basic.storyName = 'Input Sizes';
|
|
64
|
+
|
|
65
|
+
basic.parameters = {
|
|
66
|
+
storyStyles: `
|
|
67
|
+
<style>
|
|
68
|
+
.example-block {
|
|
69
|
+
margin: 16px;
|
|
70
|
+
max-width: 600px;
|
|
71
|
+
}
|
|
72
|
+
</style>`
|
|
73
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React, { ComponentType } from 'react';
|
|
2
|
+
export declare const PhaseContext: React.Context<number | null>;
|
|
3
|
+
type ScrollHandler = (element: Element) => void;
|
|
4
|
+
export declare const ScrollHandlerContext: React.Context<ScrollHandler | null>;
|
|
5
|
+
export default function adaptiveIslandHOC<P>(ComposedComponent: ComponentType<P>): {
|
|
6
|
+
new (props: P | Readonly<P>): {
|
|
7
|
+
state: {
|
|
8
|
+
phase: null;
|
|
9
|
+
};
|
|
10
|
+
onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
|
|
11
|
+
render(): React.JSX.Element;
|
|
12
|
+
context: unknown;
|
|
13
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
14
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
15
|
+
readonly props: Readonly<P>;
|
|
16
|
+
refs: {
|
|
17
|
+
[key: string]: React.ReactInstance;
|
|
18
|
+
};
|
|
19
|
+
componentDidMount?(): void;
|
|
20
|
+
shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
21
|
+
componentWillUnmount?(): void;
|
|
22
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
23
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<{}>): any;
|
|
24
|
+
componentDidUpdate?(prevProps: Readonly<P>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
25
|
+
componentWillMount?(): void;
|
|
26
|
+
UNSAFE_componentWillMount?(): void;
|
|
27
|
+
componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
|
|
28
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
|
|
29
|
+
componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): void;
|
|
30
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): void;
|
|
31
|
+
};
|
|
32
|
+
new (props: P, context: any): {
|
|
33
|
+
state: {
|
|
34
|
+
phase: null;
|
|
35
|
+
};
|
|
36
|
+
onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
|
|
37
|
+
render(): React.JSX.Element;
|
|
38
|
+
context: unknown;
|
|
39
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
40
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
41
|
+
readonly props: Readonly<P>;
|
|
42
|
+
refs: {
|
|
43
|
+
[key: string]: React.ReactInstance;
|
|
44
|
+
};
|
|
45
|
+
componentDidMount?(): void;
|
|
46
|
+
shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
47
|
+
componentWillUnmount?(): void;
|
|
48
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
49
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<{}>): any;
|
|
50
|
+
componentDidUpdate?(prevProps: Readonly<P>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
51
|
+
componentWillMount?(): void;
|
|
52
|
+
UNSAFE_componentWillMount?(): void;
|
|
53
|
+
componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
|
|
54
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
|
|
55
|
+
componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): void;
|
|
56
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): void;
|
|
57
|
+
};
|
|
58
|
+
propTypes: React.WeakValidationMap<P> | undefined;
|
|
59
|
+
contextType?: React.Context<any> | undefined;
|
|
60
|
+
};
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { Component, createContext } from 'react';
|
|
2
|
+
import { interpolateLinear } from '../global/linear-function';
|
|
3
|
+
const TITLE_RESIZE_END = 20;
|
|
4
|
+
const TITLE_RESIZE_THRESHOLD = 36;
|
|
5
|
+
export const PhaseContext = createContext(null);
|
|
6
|
+
export const ScrollHandlerContext = createContext(null);
|
|
7
|
+
export default function adaptiveIslandHOC(ComposedComponent) {
|
|
8
|
+
return class AdaptiveIsland extends Component {
|
|
9
|
+
static propTypes = ComposedComponent.propTypes;
|
|
10
|
+
state = {
|
|
11
|
+
phase: null
|
|
12
|
+
};
|
|
13
|
+
onContentScroll = ({ scrollTop, scrollHeight, clientHeight }) => {
|
|
14
|
+
if (scrollHeight - clientHeight >=
|
|
15
|
+
interpolateLinear(TITLE_RESIZE_THRESHOLD, TITLE_RESIZE_END, this.state.phase ?? 0)) {
|
|
16
|
+
const phase = Math.min(1, scrollTop / TITLE_RESIZE_END);
|
|
17
|
+
this.setState({ phase });
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
render() {
|
|
21
|
+
return (<PhaseContext.Provider value={this.state.phase}>
|
|
22
|
+
<ScrollHandlerContext.Provider value={this.onContentScroll}>
|
|
23
|
+
<ComposedComponent {...this.props}/>
|
|
24
|
+
</ScrollHandlerContext.Provider>
|
|
25
|
+
</PhaseContext.Provider>);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|