@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,101 @@
|
|
|
1
|
+
/* https://readymag.com/artemtiunov/RingUILanguage/colours/ */
|
|
2
|
+
|
|
3
|
+
.clearfix {
|
|
4
|
+
&::after {
|
|
5
|
+
display: block;
|
|
6
|
+
clear: both;
|
|
7
|
+
|
|
8
|
+
content: "";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.font {
|
|
13
|
+
font-family: var(--ring-font-family);
|
|
14
|
+
font-size: var(--ring-font-size);
|
|
15
|
+
line-height: var(--ring-line-height);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.font-lower {
|
|
19
|
+
composes: font;
|
|
20
|
+
|
|
21
|
+
line-height: var(--ring-line-height-lower);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.font-smaller {
|
|
25
|
+
composes: font-lower;
|
|
26
|
+
|
|
27
|
+
font-size: var(--ring-font-size-smaller);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.font-smaller-lower {
|
|
31
|
+
composes: font-smaller;
|
|
32
|
+
|
|
33
|
+
line-height: var(--ring-line-height-lowest);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.font-larger-lower {
|
|
37
|
+
composes: font-lower;
|
|
38
|
+
|
|
39
|
+
font-size: var(--ring-font-size-larger);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.font-larger {
|
|
43
|
+
composes: font-larger-lower;
|
|
44
|
+
|
|
45
|
+
line-height: var(--ring-line-height-taller);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* To be used at large sizes */
|
|
49
|
+
/* As close as possible to Helvetica Neue Thin (to replace Gotham) */
|
|
50
|
+
.thin-font {
|
|
51
|
+
font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
52
|
+
font-size: var(--ring-font-size);
|
|
53
|
+
font-weight: 100; /* Renders Helvetica Neue UltraLight on OS X */
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.monospace-font {
|
|
57
|
+
font-family: var(--ring-font-family-monospace);
|
|
58
|
+
font-size: var(--ring-font-size-smaller);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ellipsis {
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
text-overflow: ellipsis;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.resetButton {
|
|
69
|
+
overflow: visible;
|
|
70
|
+
|
|
71
|
+
padding: 0;
|
|
72
|
+
|
|
73
|
+
text-align: left;
|
|
74
|
+
|
|
75
|
+
color: inherit;
|
|
76
|
+
border: 0;
|
|
77
|
+
|
|
78
|
+
background-color: transparent;
|
|
79
|
+
|
|
80
|
+
font: inherit;
|
|
81
|
+
|
|
82
|
+
&::-moz-focus-inner {
|
|
83
|
+
padding: 0;
|
|
84
|
+
|
|
85
|
+
border: 0;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Note: footer also has top margin which isn't taken into account here */
|
|
90
|
+
@value footer-height: calc(var(--ring-unit) * 8);
|
|
91
|
+
|
|
92
|
+
/* Media breakpoints (minimal values) */
|
|
93
|
+
@value breakpoint-small: 640px;
|
|
94
|
+
@value breakpoint-middle: 960px;
|
|
95
|
+
@value breakpoint-large: 1200px;
|
|
96
|
+
|
|
97
|
+
/* Media queries */
|
|
98
|
+
@value extra-small-screen-media: (max-width: calc(breakpoint-small - 1px));
|
|
99
|
+
@value small-screen-media: (min-width: breakpoint-small) and (max-width: calc(breakpoint-middle - 1px));
|
|
100
|
+
@value middle-screen-media: (min-width: breakpoint-middle) and (max-width: calc(breakpoint-large - 1px));
|
|
101
|
+
@value large-screen-media: (min-width: breakpoint-large);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const injectStyleSheet = (styles) => {
|
|
2
|
+
const styleTag = document.createElement('style');
|
|
3
|
+
styleTag.setAttribute('type', 'text/css');
|
|
4
|
+
styleTag.textContent = styles;
|
|
5
|
+
document.head.appendChild(styleTag);
|
|
6
|
+
return styleTag;
|
|
7
|
+
};
|
|
8
|
+
export const injectRuleSet = (selector, declarations) => injectStyleSheet(`
|
|
9
|
+
${selector} {
|
|
10
|
+
${Object.entries(declarations).map(([property, value]) => `${property}: ${value};`).join(`
|
|
11
|
+
`)}
|
|
12
|
+
}`);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface LinearFunction {
|
|
2
|
+
y(x: number): number;
|
|
3
|
+
x(y: number): number;
|
|
4
|
+
}
|
|
5
|
+
export default function linearFunction(x0: number, y0: number, a: number): LinearFunction;
|
|
6
|
+
export declare function interpolateLinear(x0: number, x1: number, phase: number): number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default function linearFunction(x0, y0, a) {
|
|
2
|
+
return {
|
|
3
|
+
y(x) {
|
|
4
|
+
return +y0 + (x - x0) * a;
|
|
5
|
+
},
|
|
6
|
+
x(y) {
|
|
7
|
+
return +x0 + (y - y0) / a;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export function interpolateLinear(x0, x1, phase) {
|
|
12
|
+
return linearFunction(x0, x0, phase).y(x1);
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type Handler<PM extends Record<string, [unknown, unknown]>, E extends keyof PM> = (data: PM[E][0]) => PM[E][1] | Promise<PM[E][1]>;
|
|
2
|
+
export default class Listeners<PM extends Record<string, [unknown, unknown]> = Record<string, [void, unknown]>> {
|
|
3
|
+
_all: Map<keyof PM, Set<Handler<PM, keyof PM>>>;
|
|
4
|
+
trigger<E extends keyof PM>(...[event, data]: PM[E][0] extends void ? [E] : [E, PM[E][0]]): Promise<PM[E][1][]>;
|
|
5
|
+
add<E extends keyof PM>(event: E, handler: Handler<PM, E>): void;
|
|
6
|
+
remove<E extends keyof PM>(event: E, handler: Handler<PM, E>): void;
|
|
7
|
+
removeAll(): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default class Listeners {
|
|
2
|
+
_all = new Map();
|
|
3
|
+
trigger(...[event, data]) {
|
|
4
|
+
const handlers = this._all.get(event);
|
|
5
|
+
if (handlers) {
|
|
6
|
+
return Promise.all([...handlers].map(fn => fn(data)));
|
|
7
|
+
}
|
|
8
|
+
return Promise.resolve([]);
|
|
9
|
+
}
|
|
10
|
+
add(event, handler) {
|
|
11
|
+
let handlers = this._all.get(event);
|
|
12
|
+
if (!handlers) {
|
|
13
|
+
handlers = new Set();
|
|
14
|
+
this._all.set(event, handlers);
|
|
15
|
+
}
|
|
16
|
+
handlers.add(handler);
|
|
17
|
+
}
|
|
18
|
+
remove(event, handler) {
|
|
19
|
+
const handlers = this._all.get(event);
|
|
20
|
+
if (handlers) {
|
|
21
|
+
handlers.delete(handler);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
removeAll() {
|
|
25
|
+
this._all = new Map();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function memoize<A = void, T = void>(fn: (arg: A) => T): (arg: A) => T;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default function memoize(fn) {
|
|
2
|
+
const primitiveCache = new Map();
|
|
3
|
+
const objectCache = new WeakMap();
|
|
4
|
+
return function memoized(arg) {
|
|
5
|
+
const key = arg ?? '__singleValue__';
|
|
6
|
+
const cache = key instanceof Object ? objectCache : primitiveCache;
|
|
7
|
+
const cached = cache.get(key);
|
|
8
|
+
if (cached != null) {
|
|
9
|
+
return cached;
|
|
10
|
+
}
|
|
11
|
+
const value = fn(arg);
|
|
12
|
+
cache.set(key, value);
|
|
13
|
+
return value;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function normalizeIndent(string: string): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export default function normalizeIndent(string) {
|
|
2
|
+
const nonemptyRE = /\S/;
|
|
3
|
+
const indentRE = /^\s*/;
|
|
4
|
+
const lines = string.split(/\n/g);
|
|
5
|
+
const linesCopy = [...lines];
|
|
6
|
+
//remove empty lines at the beginning and the end
|
|
7
|
+
for (const line of linesCopy) {
|
|
8
|
+
if (nonemptyRE.test(line)) {
|
|
9
|
+
break;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
lines.shift();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
for (const line of linesCopy.reverse()) {
|
|
16
|
+
if (nonemptyRE.test(line)) {
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
lines.pop();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const indents = lines.
|
|
24
|
+
filter(line => nonemptyRE.test(line)).
|
|
25
|
+
map(line => line.match(indentRE)?.[0].length ?? 0);
|
|
26
|
+
const minIndent = Math.min(...indents);
|
|
27
|
+
return lines.
|
|
28
|
+
map(line => line.slice(minIndent)).
|
|
29
|
+
join('\n');
|
|
30
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export interface PromiseWithTimeoutConfig {
|
|
2
|
+
error?: Error | null | undefined;
|
|
3
|
+
onTimeout?: () => void | undefined;
|
|
4
|
+
}
|
|
5
|
+
export default function promiseWithTimeout<T>(promise: Promise<T>, timeout: number, { error, onTimeout }: PromiseWithTimeoutConfig): Promise<unknown>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Useful for using fetch with timeout
|
|
2
|
+
// https://github.com/github/fetch/issues/175#issuecomment-284787564
|
|
3
|
+
export default function promiseWithTimeout(promise, timeout, { error, onTimeout = () => { } }) {
|
|
4
|
+
return new Promise((resolve, reject) => {
|
|
5
|
+
setTimeout(() => {
|
|
6
|
+
onTimeout();
|
|
7
|
+
reject(error || new Error('Timeout'));
|
|
8
|
+
}, timeout);
|
|
9
|
+
promise.then(resolve, reject);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
export interface RendererProps {
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
nodes: readonly Node[] | NodeList;
|
|
6
|
+
}
|
|
7
|
+
export default class Renderer extends Component<RendererProps> {
|
|
8
|
+
static propTypes: {
|
|
9
|
+
className: PropTypes.Requireable<string>;
|
|
10
|
+
nodes: PropTypes.Requireable<object>;
|
|
11
|
+
};
|
|
12
|
+
componentDidMount(): void;
|
|
13
|
+
node?: HTMLElement | null;
|
|
14
|
+
nodeRef: (node: HTMLElement | null) => void;
|
|
15
|
+
render(): React.JSX.Element;
|
|
16
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
export default class Renderer extends Component {
|
|
4
|
+
static propTypes = {
|
|
5
|
+
className: PropTypes.string,
|
|
6
|
+
nodes: PropTypes.oneOfType([PropTypes.array, PropTypes.object])
|
|
7
|
+
};
|
|
8
|
+
componentDidMount() {
|
|
9
|
+
const { node } = this;
|
|
10
|
+
const { nodes } = this.props;
|
|
11
|
+
if (!node || !nodes || !nodes.length) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
Array.from(this.props.nodes).
|
|
15
|
+
forEach(nodeToRender => node.appendChild(nodeToRender));
|
|
16
|
+
}
|
|
17
|
+
node;
|
|
18
|
+
nodeRef = (node) => {
|
|
19
|
+
this.node = node;
|
|
20
|
+
};
|
|
21
|
+
render() {
|
|
22
|
+
const { className } = this.props;
|
|
23
|
+
return (<div className={className} ref={this.nodeRef}/>);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const setClient: () => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
export interface RerenderableComponent<P, S> extends Component<P, S> {
|
|
3
|
+
node?: HTMLElement | null;
|
|
4
|
+
}
|
|
5
|
+
export interface RerenderableComponentClass<P, S> {
|
|
6
|
+
new (props: P): RerenderableComponent<P, S>;
|
|
7
|
+
}
|
|
8
|
+
export default function rerenderHOC<P extends {}, C extends Component<P, unknown>>(ComposedComponent: {
|
|
9
|
+
new (props: P): C;
|
|
10
|
+
}): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<C>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { Component, forwardRef } from 'react';
|
|
2
|
+
import composeRefs from './composeRefs';
|
|
3
|
+
export default function rerenderHOC(ComposedComponent) {
|
|
4
|
+
class Rerenderer extends Component {
|
|
5
|
+
state = this.props.props;
|
|
6
|
+
render() {
|
|
7
|
+
const ref = composeRefs(this.props.forwardedRef);
|
|
8
|
+
return (<ComposedComponent {...this.state} ref={instance => ref(instance != null ? { ...instance, rerender: this.setState.bind(this) } : null)}/>);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return forwardRef(function RerendererForwardRef(props, ref) {
|
|
12
|
+
return <Rerenderer props={props} forwardedRef={ref}/>;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function scheduleRAF(trailingCall?: boolean): (cb: () => void) => void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default function scheduleRAF(trailingCall) {
|
|
2
|
+
let scheduledCb;
|
|
3
|
+
let RAF;
|
|
4
|
+
let trailingCallScheduled = false;
|
|
5
|
+
function doSchedule() {
|
|
6
|
+
RAF = window.requestAnimationFrame(() => {
|
|
7
|
+
scheduledCb?.();
|
|
8
|
+
if (trailingCallScheduled) {
|
|
9
|
+
trailingCallScheduled = false;
|
|
10
|
+
doSchedule();
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
RAF = null;
|
|
14
|
+
scheduledCb = null;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return function schedule(cb) {
|
|
19
|
+
scheduledCb = cb;
|
|
20
|
+
if (!RAF) {
|
|
21
|
+
doSchedule();
|
|
22
|
+
}
|
|
23
|
+
else if (trailingCall) {
|
|
24
|
+
trailingCallScheduled = true;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { HTMLAttributes, ReactElement } from 'react';
|
|
2
|
+
declare enum Theme {
|
|
3
|
+
AUTO = "auto",
|
|
4
|
+
LIGHT = "light",
|
|
5
|
+
DARK = "dark"
|
|
6
|
+
}
|
|
7
|
+
export declare function useTheme(): Theme.LIGHT | Theme.DARK;
|
|
8
|
+
export declare function useThemeClasses(theme: Theme): string;
|
|
9
|
+
export interface WithThemeClassesProps {
|
|
10
|
+
theme: Theme;
|
|
11
|
+
children: (classes: string) => ReactElement;
|
|
12
|
+
}
|
|
13
|
+
export declare function WithThemeClasses({ theme, children }: WithThemeClassesProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
14
|
+
export declare function applyTheme(theme: Theme.DARK | Theme.LIGHT, container: HTMLElement): void;
|
|
15
|
+
export interface ThemeProviderProps extends HTMLAttributes<HTMLDivElement> {
|
|
16
|
+
theme?: Theme;
|
|
17
|
+
passToPopups?: boolean;
|
|
18
|
+
target?: HTMLElement;
|
|
19
|
+
}
|
|
20
|
+
export declare const ThemeProvider: React.ForwardRefExoticComponent<ThemeProviderProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export default Theme;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React, { useMemo, useState, useEffect, forwardRef, useContext } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { createPortal } from 'react-dom';
|
|
4
|
+
import { PopupTarget, PopupTargetContext } from '../popup/popup.target';
|
|
5
|
+
import { getPopupContainer } from '../popup/popup';
|
|
6
|
+
import defaultStyles from './variables.css';
|
|
7
|
+
import styles from './variables_dark.css';
|
|
8
|
+
import getUID from './get-uid';
|
|
9
|
+
var Theme;
|
|
10
|
+
(function (Theme) {
|
|
11
|
+
Theme["AUTO"] = "auto";
|
|
12
|
+
Theme["LIGHT"] = "light";
|
|
13
|
+
Theme["DARK"] = "dark";
|
|
14
|
+
})(Theme || (Theme = {}));
|
|
15
|
+
const darkMatcher = window.matchMedia('(prefers-color-scheme: dark)');
|
|
16
|
+
export function useTheme() {
|
|
17
|
+
const [dark, setDark] = useState(darkMatcher.matches);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
const onChange = (e) => setDark(e.matches);
|
|
20
|
+
darkMatcher.addEventListener('change', onChange);
|
|
21
|
+
return () => darkMatcher.removeEventListener('change', onChange);
|
|
22
|
+
}, []);
|
|
23
|
+
return dark ? Theme.DARK : Theme.LIGHT;
|
|
24
|
+
}
|
|
25
|
+
export function useThemeClasses(theme) {
|
|
26
|
+
const systemTheme = useTheme();
|
|
27
|
+
const resolvedTheme = theme === Theme.AUTO ? systemTheme : theme;
|
|
28
|
+
return classNames({
|
|
29
|
+
[styles.dark]: resolvedTheme === Theme.DARK,
|
|
30
|
+
[defaultStyles.light]: resolvedTheme === Theme.LIGHT
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export function WithThemeClasses({ theme, children }) {
|
|
34
|
+
const themeClasses = useThemeClasses(theme);
|
|
35
|
+
return children(themeClasses);
|
|
36
|
+
}
|
|
37
|
+
export function applyTheme(theme, container) {
|
|
38
|
+
if (theme === Theme.DARK) {
|
|
39
|
+
container.classList.remove(defaultStyles.light);
|
|
40
|
+
container.classList.add(styles.dark);
|
|
41
|
+
container.classList.add('ring-ui-theme-dark');
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
container.classList.remove(styles.dark);
|
|
45
|
+
container.classList.remove('ring-ui-theme-dark');
|
|
46
|
+
container.classList.add(defaultStyles.light);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export const ThemeProvider = forwardRef(function ThemeProvider({ theme = Theme.AUTO, className, passToPopups, children, target, ...restProps }, ref) {
|
|
50
|
+
const systemTheme = useTheme();
|
|
51
|
+
const resolvedTheme = theme === Theme.AUTO ? systemTheme : theme;
|
|
52
|
+
const id = useMemo(() => getUID('popups-with-theme-'), []);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (target != null) {
|
|
55
|
+
applyTheme(resolvedTheme, target);
|
|
56
|
+
}
|
|
57
|
+
}, [resolvedTheme, target]);
|
|
58
|
+
const themeClasses = useThemeClasses(theme);
|
|
59
|
+
const parentTarget = useContext(PopupTargetContext);
|
|
60
|
+
return (<div ref={ref} className={target != null ? undefined : classNames(className, themeClasses)} {...restProps}>{passToPopups
|
|
61
|
+
? (<PopupTarget id={id}>
|
|
62
|
+
{popupTarget => (<>
|
|
63
|
+
{children}
|
|
64
|
+
{createPortal(<div className={themeClasses}>{popupTarget}</div>, parentTarget && getPopupContainer(parentTarget) || document.body)}
|
|
65
|
+
</>)}
|
|
66
|
+
</PopupTarget>)
|
|
67
|
+
: children}
|
|
68
|
+
</div>);
|
|
69
|
+
});
|
|
70
|
+
export default Theme;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function trivialTemplateTag(f: (string: string) => void): (strings: TemplateStringsArray, ...interpolations: unknown[]) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const TWO = 2;
|
|
2
|
+
export default function trivialTemplateTag(f) {
|
|
3
|
+
return (strings, ...interpolations) => {
|
|
4
|
+
const chunks = [...strings];
|
|
5
|
+
// insert the interpolations where they belong to
|
|
6
|
+
interpolations.forEach((value, i) => chunks.splice(TWO * i + 1, 0, value));
|
|
7
|
+
return f(chunks.join(''));
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Provides a set of utilities for URL manipulation.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @const {RegExp}
|
|
6
|
+
*/
|
|
7
|
+
export declare const ENDING_SLASH_PATTERN: RegExp;
|
|
8
|
+
/**
|
|
9
|
+
* Get URI from the <base> tag
|
|
10
|
+
* @return {string|undefined} base URI
|
|
11
|
+
*/
|
|
12
|
+
export declare function getBaseURI(): string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Get absolute URI from the <base> tag
|
|
15
|
+
* @return {string} absolute base URI
|
|
16
|
+
*/
|
|
17
|
+
export declare function getAbsoluteBaseURL(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Get origin from the URL
|
|
20
|
+
* @param {string} url URL to extract origin from
|
|
21
|
+
* @returns {string|undefined} origin
|
|
22
|
+
*/
|
|
23
|
+
export declare function getOrigin(url: string): string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Get absolute URI from current page
|
|
26
|
+
* @return {string} absolute URL of current page
|
|
27
|
+
*/
|
|
28
|
+
export declare function getAbsoluteURL(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Fixes the URL
|
|
31
|
+
* If the URL is relative and the page contains a <base> TAG, the URL will be converted to absolute
|
|
32
|
+
* <base href="/">: some/path => /some/path
|
|
33
|
+
* @param {string} url URL to fix
|
|
34
|
+
* @param {Function} baseURIGetter a function that returns base URI
|
|
35
|
+
* @return {string} fixed URL
|
|
36
|
+
*/
|
|
37
|
+
export declare function fixUrl(url: string, baseURIGetter?: typeof getBaseURI): string;
|
|
38
|
+
export declare function joinBaseURLAndPath(baseUrl: string | null | undefined, path: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Parses a queryString into an object.
|
|
41
|
+
* ```
|
|
42
|
+
* parseQueryString("access_token=2YotnFZFEjr1zCsicMWpAA&state=xyz&token_type=example&expires_in=3600");
|
|
43
|
+
* // is {access_token: "2YotnFZFEjr1zCsicMWpAA", state: "xyz", token_type: "example", expires_in: "3600"}
|
|
44
|
+
* ```
|
|
45
|
+
* @param {string} queryString query parameter string to parse
|
|
46
|
+
* @return {AuthResponse} object with query parameters map
|
|
47
|
+
*/
|
|
48
|
+
export declare function parseQueryString(queryString: string | null | undefined): Record<string, string>;
|
|
49
|
+
/**
|
|
50
|
+
* Takes a URL as input and a params object.
|
|
51
|
+
* Each property in the params is added to the URL as query string parameters
|
|
52
|
+
* @param {string} url URL to add parameters to
|
|
53
|
+
* @param {Object} params parameters to add
|
|
54
|
+
* @returns {string} encoded URL
|
|
55
|
+
*/
|
|
56
|
+
export declare function encodeURL(url: string, params: Record<string, unknown>): string;
|
|
57
|
+
export declare function isDataURI(uri: string): boolean;
|