@jetbrains/ring-ui-built 7.0.125 → 8.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/_helpers/anchor.js +1 -1
- package/components/_helpers/avatar-info.js +3 -5
- package/components/_helpers/caption.js +1 -1
- package/components/_helpers/dialog.js +3 -0
- package/components/_helpers/icon-svg.js +37 -52
- package/components/_helpers/legacy-table.js +3 -0
- package/components/_helpers/tab-link.js +1 -1
- package/components/_helpers/table.js +2 -2
- package/components/_helpers/theme.js +49 -37
- package/components/alert/alert-actions.js +1 -1
- package/components/alert/alert-heading.js +1 -1
- package/components/alert/alert.js +2 -2
- package/components/alert-service/alert-service.js +2 -2
- package/components/auth/auth-core.js +2 -2
- package/components/auth/auth.js +2 -2
- package/components/auth/down-notification.js +2 -2
- package/components/auth/iframe-flow.js +15 -10
- package/components/auth/storage.js +2 -2
- package/components/auth-dialog/auth-dialog.js +11 -6
- package/components/auth-dialog-service/auth-dialog-service.js +19 -11
- package/components/avatar/avatar-info.js +1 -1
- package/components/avatar/avatar-size.d.ts +0 -4
- package/components/avatar/avatar-size.js +0 -4
- package/components/avatar/avatar.js +1 -8
- package/components/avatar/fallback-avatar.js +3 -48
- package/components/avatar-stack/avatar-stack.js +5 -5
- package/components/banner/banner.js +5 -6
- package/components/button/button.d.ts +0 -4
- package/components/button/button.js +4 -10
- package/components/button-group/button-group.js +1 -1
- package/components/button-toolbar/button-toolbar.js +1 -1
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.js +1 -2
- package/components/clipboard/clipboard.js +2 -2
- package/components/code/code.js +1 -2
- package/components/collapse/collapse-content.js +35 -43
- package/components/collapse/collapse-context.d.ts +1 -0
- package/components/collapse/collapse-context.js +1 -0
- package/components/collapse/collapse-control.js +5 -5
- package/components/collapse/collapse.js +34 -25
- package/components/collapsible-group/collapsible-group.d.ts +5 -1
- package/components/collapsible-group/collapsible-group.js +80 -98
- package/components/components/util-stories.js +63 -1
- package/components/confirm/confirm.js +30 -21
- package/components/confirm-service/confirm-service.js +21 -13
- package/components/contenteditable/contenteditable.js +4 -5
- package/components/control-help/control-help.js +1 -1
- package/components/control-label/control-label.js +1 -1
- package/components/data-list/data-list.d.ts +4 -4
- package/components/data-list/data-list.js +5 -5
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.js +2 -2
- package/components/data-list/item.d.ts +1 -1
- package/components/data-list/item.js +3 -3
- package/components/data-list/selection.d.ts +1 -1
- package/components/data-list/selection.js +2 -2
- package/components/data-list/title.js +1 -2
- package/components/date-picker/date-input.js +2 -2
- package/components/date-picker/date-picker.js +2 -3
- package/components/date-picker/date-popup.js +4 -5
- package/components/date-picker/month-names.js +1 -1
- package/components/date-picker/month-slider.js +1 -1
- package/components/date-picker/month.d.ts +0 -2
- package/components/date-picker/month.js +17 -18
- package/components/date-picker/months.js +43 -36
- package/components/date-picker/use-scroll-behavior.js +45 -45
- package/components/date-picker/weekdays.js +1 -1
- package/components/date-picker/years.js +61 -55
- package/components/dialog/dialog-body-scroll-preventer.js +49 -2
- package/components/dialog/dialog-controls.d.ts +13 -0
- package/components/dialog/dialog-controls.js +113 -0
- package/components/dialog/dialog-geometry.d.ts +31 -0
- package/components/dialog/dialog-geometry.js +63 -0
- package/components/dialog/dialog.d.ts +15 -7
- package/components/dialog/dialog.js +185 -37
- package/components/dropdown/anchor.js +3 -3
- package/components/dropdown/dropdown.js +3 -3
- package/components/dropdown-menu/dropdown-menu.d.ts +4 -4
- package/components/dropdown-menu/dropdown-menu.js +63 -58
- package/components/editable-heading/editable-heading.d.ts +1 -2
- package/components/editable-heading/editable-heading.js +14 -13
- package/components/error-bubble/error-bubble.js +1 -1
- package/components/error-message/error-message.js +1 -2
- package/components/footer/footer.js +1 -1
- package/components/global/compose-refs.d.ts +2 -1
- package/components/global/compose-refs.js +44 -8
- package/components/global/configuration.d.ts +0 -5
- package/components/global/configuration.js +2 -10
- package/components/global/controls-height.js +1 -1
- package/components/global/create-stateful-context.js +11 -11
- package/components/global/focus-sensor-hoc.js +1 -0
- package/components/global/focus-with-temporary-tabindex.d.ts +11 -0
- package/components/global/focus-with-temporary-tabindex.js +23 -0
- package/components/global/get-viewport-size.d.ts +5 -0
- package/components/global/get-viewport-size.js +6 -0
- package/components/global/intersection-observer-context.d.ts +46 -0
- package/components/global/intersection-observer-context.js +138 -0
- package/components/global/is-within-interactive-element.d.ts +6 -0
- package/components/global/is-within-interactive-element.js +11 -0
- package/components/global/is-within-navigable-element.d.ts +6 -0
- package/components/global/is-within-navigable-element.js +11 -0
- package/components/global/parse-css-duration.d.ts +5 -0
- package/components/global/parse-css-duration.js +14 -0
- package/components/global/rerender-hoc.d.ts +4 -2
- package/components/global/rerender-hoc.js +11 -24
- package/components/global/schedule-with-cleanup.d.ts +12 -0
- package/components/global/schedule-with-cleanup.js +36 -0
- package/components/{table/selection.d.ts → global/table-selection.d.ts} +15 -15
- package/components/{table/selection.js → global/table-selection.js} +5 -5
- package/components/global/theme.d.ts +4 -3
- package/components/global/theme.js +1 -1
- package/components/global/variables.interface.d.ts +0 -4
- package/components/header/header-icon.js +3 -3
- package/components/header/header.js +3 -3
- package/components/header/links.js +1 -1
- package/components/header/logo.js +1 -2
- package/components/header/profile.js +5 -5
- package/components/header/services.js +3 -3
- package/components/header/smart-profile.js +3 -3
- package/components/header/smart-services.js +3 -3
- package/components/heading/heading.js +1 -1
- package/components/http/http.js +6 -23
- package/components/i18n/i18n-context.js +4 -4
- package/components/icon/icon-svg.js +1 -2
- package/components/icon/icon.d.ts +0 -1
- package/components/icon/icon.js +2 -6
- package/components/icon/index.js +1 -2
- package/components/input/input.d.ts +1 -1
- package/components/input/input.js +3 -3
- package/components/internal/reorder-animation-context.js +159 -0
- package/components/internal/reorder-handle.js +750 -0
- package/components/internal/reorder-layout-context.js +141 -0
- package/components/internal/table-header.js +685 -0
- package/components/internal/virtualization.js +368 -0
- package/components/island/adaptive-island-hoc.js +3 -3
- package/components/island/content.d.ts +7 -2
- package/components/island/content.js +27 -18
- package/components/island/header.js +4 -3
- package/components/island/island.js +1 -1
- package/components/{table → legacy-table}/cell.js +1 -1
- package/components/{table → legacy-table}/header-cell.js +2 -3
- package/components/{table → legacy-table}/header.js +2 -3
- package/components/{table → legacy-table}/multitable.d.ts +1 -1
- package/components/{table → legacy-table}/row-with-focus-sensor.js +3 -3
- package/components/{table → legacy-table}/row.d.ts +1 -1
- package/components/{table → legacy-table}/row.js +5 -5
- package/components/legacy-table/selection-adapter.d.ts +6 -0
- package/components/{table → legacy-table}/selection-shortcuts-hoc.d.ts +5 -5
- package/components/{table → legacy-table}/simple-table.d.ts +2 -2
- package/components/{table → legacy-table}/simple-table.js +5 -5
- package/components/{table → legacy-table}/smart-table.d.ts +5 -5
- package/components/{table → legacy-table}/smart-table.js +6 -6
- package/components/legacy-table/table.d.ts +109 -0
- package/components/legacy-table/table.js +369 -0
- package/components/list/consts.d.ts +0 -1
- package/components/list/consts.js +0 -1
- package/components/list/list-item.js +3 -5
- package/components/list/list-users-groups-source.js +1 -2
- package/components/list/list.d.ts +0 -4
- package/components/list/list.js +1 -2
- package/components/login-dialog/login-dialog.js +17 -12
- package/components/login-dialog/service.js +19 -11
- package/components/message/message.js +1 -1
- package/components/pager/pager.js +3 -3
- package/components/popup/popup.js +1 -1
- package/components/popup/popup.target.d.ts +3 -2
- package/components/popup/popup.target.js +32 -28
- package/components/popup-menu/popup-menu.js +1 -1
- package/components/query-assist/query-assist-suggestions.js +1 -2
- package/components/query-assist/query-assist.d.ts +3 -1
- package/components/query-assist/query-assist.js +2 -2
- package/components/radio/radio-item.d.ts +3 -3
- package/components/radio/radio-item.js +33 -19
- package/components/radio/radio.d.ts +2 -2
- package/components/radio/radio.js +2 -2
- package/components/scrollable-section/scrollable-section.js +1 -1
- package/components/select/chevron-button.js +3 -3
- package/components/select/select-filter.js +3 -3
- package/components/select/select-popup.d.ts +3 -2
- package/components/select/select-popup.js +9 -4
- package/components/select/select.d.ts +6 -2
- package/components/select/select.js +5 -4
- package/components/selection-toolbar/selection-toolbar.d.ts +11 -0
- package/components/selection-toolbar/selection-toolbar.js +200 -0
- package/components/slider/slider.js +100 -97
- package/components/storage/storage-local.js +2 -2
- package/components/storage/storage.js +2 -2
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.d.ts +3 -3
- package/components/tab-trap/tab-trap.js +83 -80
- package/components/table/default-item-renderer.d.ts +55 -0
- package/components/table/default-item-renderer.js +240 -0
- package/components/table/internal/reorder-animation-context.d.ts +21 -0
- package/components/table/internal/reorder-handle.d.ts +9 -0
- package/components/table/internal/reorder-layout-context.d.ts +16 -0
- package/components/table/internal/table-header.d.ts +1 -0
- package/components/table/internal/virtualization.d.ts +41 -0
- package/components/table/item-virtualization.d.ts +37 -0
- package/components/table/item-virtualization.js +73 -0
- package/components/table/reorder-animation.d.ts +37 -0
- package/components/table/reorder-animation.js +18 -0
- package/components/table/reorder-item-layout.d.ts +32 -0
- package/components/table/reorder-item-layout.js +57 -0
- package/components/table/table-const.d.ts +10 -0
- package/components/table/table-const.js +13 -0
- package/components/table/table-primitives.d.ts +64 -0
- package/components/table/table-primitives.js +180 -0
- package/components/table/table-props.d.ts +304 -0
- package/components/table/table-props.js +1 -0
- package/components/table/table.d.ts +231 -107
- package/components/table/table.js +351 -346
- package/components/tabs/collapsible-more.js +1 -1
- package/components/tabs/collapsible-tab.js +1 -1
- package/components/tabs/collapsible-tabs.js +1 -1
- package/components/tabs/dumb-tabs.js +1 -1
- package/components/tabs/smart-tabs.js +1 -1
- package/components/tabs/tab-link.js +1 -1
- package/components/tabs/tabs.js +1 -1
- package/components/tag/tag.js +1 -1
- package/components/tags-input/tags-input.d.ts +3 -1
- package/components/tags-input/tags-input.js +4 -4
- package/components/tags-list/tags-list.js +2 -2
- package/components/toggle/toggle.js +1 -1
- package/components/tooltip/tooltip.d.ts +2 -1
- package/components/tooltip/tooltip.js +5 -3
- package/components/upload/upload.d.ts +4 -3
- package/components/upload/upload.js +7 -30
- package/components/user-agreement/service.js +12 -4
- package/components/user-agreement/user-agreement.js +24 -20
- package/components/user-card/card.js +4 -4
- package/components/user-card/smart-user-card-tooltip.js +3 -3
- package/components/user-card/tooltip.js +3 -3
- package/components/user-card/user-card.js +5 -5
- package/components/util-stories.d.ts +26 -0
- package/package.json +11 -12
- package/components/__mocks__/old-browsers-message.js +0 -3
- package/components/_helpers/dialog-body-scroll-preventer.js +0 -50
- package/components/_helpers/grid.js +0 -3
- package/components/_helpers/sidebar.js +0 -110
- package/components/content-layout/content-layout.d.ts +0 -20
- package/components/content-layout/content-layout.js +0 -50
- package/components/content-layout/sidebar.d.ts +0 -26
- package/components/content-layout/sidebar.js +0 -5
- package/components/date-picker/use-intersection-observer.d.ts +0 -6
- package/components/date-picker/use-intersection-observer.js +0 -93
- package/components/expand/collapsible-group.d.ts +0 -8
- package/components/expand/collapsible-group.js +0 -52
- package/components/global/composeRefs.d.ts +0 -6
- package/components/global/composeRefs.js +0 -9
- package/components/global/use-event-callback.d.ts +0 -4
- package/components/global/use-event-callback.js +0 -49
- package/components/grid/col.d.ts +0 -16
- package/components/grid/col.js +0 -63
- package/components/grid/grid.d.ts +0 -13
- package/components/grid/grid.js +0 -27
- package/components/grid/row.d.ts +0 -21
- package/components/grid/row.js +0 -72
- package/components/old-browsers-message/old-browsers-message-stop.d.ts +0 -1
- package/components/old-browsers-message/old-browsers-message-stop.js +0 -5
- package/components/old-browsers-message/old-browsers-message.d.ts +0 -5
- package/components/old-browsers-message/old-browsers-message.js +0 -89
- package/components/old-browsers-message/white-list.d.ts +0 -2
- package/components/old-browsers-message/white-list.js +0 -30
- package/components/table/selection-adapter.d.ts +0 -6
- /package/components/{table → legacy-table}/cell.d.ts +0 -0
- /package/components/{table → legacy-table}/disable-hover-hoc.d.ts +0 -0
- /package/components/{table → legacy-table}/disable-hover-hoc.js +0 -0
- /package/components/{table → legacy-table}/header-cell.d.ts +0 -0
- /package/components/{table → legacy-table}/header.d.ts +0 -0
- /package/components/{table → legacy-table}/multitable.js +0 -0
- /package/components/{table → legacy-table}/row-with-focus-sensor.d.ts +0 -0
- /package/components/{table → legacy-table}/selection-adapter.js +0 -0
- /package/components/{table → legacy-table}/selection-shortcuts-hoc.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui-built",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-beta.11",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "JetBrains"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"prelint-ci": "echo \"##teamcity[importData type='jslint' path='eslint-report.xml']\"",
|
|
57
57
|
"lint-ci": "eslint --format jslint-xml . > eslint-report.xml && npm run stylelint-ci",
|
|
58
58
|
"lint:js": "eslint",
|
|
59
|
-
"postbuild": "cpy './**/*.d.ts' ../dist --parents --cwd=components/
|
|
59
|
+
"postbuild": "cpy './**/*.d.ts' ../dist --parents --cwd=components/",
|
|
60
60
|
"_postinstall": "husky && npm run postinstall:gitconfig",
|
|
61
61
|
"postinstall:gitconfig": "git config blame.ignoreRevsFile .git-blame-ignore-revs",
|
|
62
62
|
"postpublish": "pinst --enable",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"storybook-debug": "node --inspect-brk node_modules/@storybook/react/bin -p 9999",
|
|
80
80
|
"stylelint": "stylelint --ignore-path .stylelintignore '**/*.css'",
|
|
81
81
|
"stylelint-ci": "stylelint --ignore-path .stylelintignore --custom-formatter 'scripts/jslint-xml.js' '**/*.css' | xmlappend eslint-report.xml",
|
|
82
|
-
"test": "vitest src
|
|
82
|
+
"test": "vitest src",
|
|
83
83
|
"type-check": "(npm run type-check:create-d-ts && npm run type-check:main && npm run type-check:build) ; npm run type-check:cleanup-d-ts",
|
|
84
84
|
"type-check:create-d-ts": "npx tcm src && npx tcm .storybook",
|
|
85
85
|
"type-check:main": "tsc --noEmit -p tsconfig.json",
|
|
@@ -97,11 +97,11 @@
|
|
|
97
97
|
"readmeFilename": "README.md",
|
|
98
98
|
"devDependencies": {},
|
|
99
99
|
"peerDependencies": {
|
|
100
|
-
"@types/react": ">=
|
|
101
|
-
"@types/react-dom": ">=
|
|
100
|
+
"@types/react": ">=19.2.0",
|
|
101
|
+
"@types/react-dom": ">=19.2.0",
|
|
102
102
|
"core-js": ">=3.0.0",
|
|
103
|
-
"react": ">=
|
|
104
|
-
"react-dom": ">=
|
|
103
|
+
"react": ">=19.2.0",
|
|
104
|
+
"react-dom": ">=19.2.0"
|
|
105
105
|
},
|
|
106
106
|
"peerDependenciesMeta": {
|
|
107
107
|
"@types/react": {
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
114
|
"dependencies": {
|
|
115
|
-
"@jetbrains/icons": "^5.23.
|
|
116
|
-
"change-case": "^
|
|
115
|
+
"@jetbrains/icons": "^5.23.3",
|
|
116
|
+
"change-case": "^4.1.1",
|
|
117
117
|
"classnames": "^2.5.1",
|
|
118
118
|
"combokeys": "^3.0.1",
|
|
119
119
|
"date-fns": "^4.4.0",
|
|
@@ -121,20 +121,19 @@
|
|
|
121
121
|
"element-resize-detector": "^1.2.4",
|
|
122
122
|
"fastdom": "^1.0.12",
|
|
123
123
|
"focus-trap": "^8.2.2",
|
|
124
|
-
"highlight.js": "^
|
|
124
|
+
"highlight.js": "^10.7.2",
|
|
125
125
|
"just-debounce-it": "^3.2.0",
|
|
126
126
|
"memoize-one": "^6.0.0",
|
|
127
127
|
"react-compiler-runtime": "^1.0.0",
|
|
128
128
|
"react-movable": "^3.4.1",
|
|
129
129
|
"react-virtualized": "^9.22.6",
|
|
130
|
-
"react-waypoint": "^10.3.0",
|
|
131
130
|
"scrollbar-width": "^3.1.1",
|
|
132
131
|
"simply-uuid": "^1.0.1",
|
|
133
132
|
"sniffr": "^1.4.0",
|
|
134
133
|
"util-deprecate": "^1.0.2"
|
|
135
134
|
},
|
|
136
135
|
"engines": {
|
|
137
|
-
"node": ">=
|
|
136
|
+
"node": "^22.22.3 || ^24.15 || >=26.0",
|
|
138
137
|
"npm": ">=6.0.0"
|
|
139
138
|
},
|
|
140
139
|
"bugs": {
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import scrollbarWidth from 'scrollbar-width';
|
|
2
|
-
|
|
3
|
-
var styles = {"header":"ring-island-header","scrollableWrapper":"ring-island-scrollableWrapper","panel":"ring-panel-panel","container":"ring-dialog-container","nativeDialog":"ring-dialog-nativeDialog","innerContainer":"ring-dialog-innerContainer","content":"ring-dialog-content","contentCloseButtonOutside":"ring-dialog-contentCloseButtonOutside","contentCloseButtonInside":"ring-dialog-contentCloseButtonInside","clickableOverlay":"ring-dialog-clickableOverlay","closeIconOutside":"ring-dialog-closeIconOutside","closeIcon":"ring-dialog-closeIcon","closeButton":"ring-dialog-closeButton","closeButtonOutside":"ring-dialog-closeButtonOutside","closeButtonInside":"ring-dialog-closeButtonInside","documentWithoutScroll":"ring-dialog-documentWithoutScroll","popupTarget":"ring-dialog-popupTarget","dense":"ring-dialog-dense"};
|
|
4
|
-
|
|
5
|
-
const isPrevented = new Set();
|
|
6
|
-
let previousDocumentWidth = null;
|
|
7
|
-
const prevent = key => {
|
|
8
|
-
if (isPrevented.has(key)) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
isPrevented.add(key);
|
|
12
|
-
if (isPrevented.size > 1) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
const documentHasScroll = document.documentElement.scrollHeight > window.innerHeight || getComputedStyle(document.documentElement).overflowY === 'scroll';
|
|
16
|
-
document.documentElement.classList.add(styles.documentWithoutScroll);
|
|
17
|
-
const scrollWidth = scrollbarWidth();
|
|
18
|
-
const {
|
|
19
|
-
scrollbarGutter
|
|
20
|
-
} = getComputedStyle(document.documentElement);
|
|
21
|
-
const documentHasScrollbarGutter = scrollbarGutter === 'stable' || scrollbarGutter === 'both-edges';
|
|
22
|
-
if (documentHasScroll && scrollWidth !== null && scrollWidth !== undefined && scrollWidth > 0 && !documentHasScrollbarGutter) {
|
|
23
|
-
previousDocumentWidth = document.documentElement.style.width;
|
|
24
|
-
document.documentElement.style.width = `calc(100% - ${scrollWidth}px)`;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
const reset = key => {
|
|
28
|
-
if (isPrevented.size === 0) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
isPrevented.delete(key);
|
|
32
|
-
if (isPrevented.size > 0) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
document.documentElement.classList.remove(styles.documentWithoutScroll);
|
|
36
|
-
if (previousDocumentWidth !== null && previousDocumentWidth !== undefined) {
|
|
37
|
-
document.documentElement.style.width = previousDocumentWidth;
|
|
38
|
-
previousDocumentWidth = null;
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
const preventerFactory = key => {
|
|
42
|
-
const preventerKey = key || Math.random();
|
|
43
|
-
return {
|
|
44
|
-
prevent: () => prevent(preventerKey),
|
|
45
|
-
reset: () => reset(preventerKey)
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
var dialogBodyScrollPreventer = preventerFactory('default-preventer');
|
|
49
|
-
|
|
50
|
-
export { dialogBodyScrollPreventer as d, preventerFactory as p, styles as s };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var styles = {"breakpoint-small":"640px","breakpoint-middle":"960px","breakpoint-large":"1200px","large-screen-media":"(min-width: 1200px)","middle-screen-media":"(min-width: 960px) and (max-width: 1199px)","small-screen-media":"(min-width: 640px) and (max-width: 959px)","container-fluid":"ring-grid-container-fluid","container":"ring-grid-container","row":"ring-grid-row","reverse":"ring-grid-reverse","col":"ring-grid-col","col-xs":"ring-grid-col-xs","col-xs-1":"ring-grid-col-xs-1","col-xs-2":"ring-grid-col-xs-2","col-xs-3":"ring-grid-col-xs-3","col-xs-4":"ring-grid-col-xs-4","col-xs-5":"ring-grid-col-xs-5","col-xs-6":"ring-grid-col-xs-6","col-xs-7":"ring-grid-col-xs-7","col-xs-8":"ring-grid-col-xs-8","col-xs-9":"ring-grid-col-xs-9","col-xs-10":"ring-grid-col-xs-10","col-xs-11":"ring-grid-col-xs-11","col-xs-12":"ring-grid-col-xs-12","col-xs-offset-0":"ring-grid-col-xs-offset-0","col-xs-offset-1":"ring-grid-col-xs-offset-1","col-xs-offset-2":"ring-grid-col-xs-offset-2","col-xs-offset-3":"ring-grid-col-xs-offset-3","col-xs-offset-4":"ring-grid-col-xs-offset-4","col-xs-offset-5":"ring-grid-col-xs-offset-5","col-xs-offset-6":"ring-grid-col-xs-offset-6","col-xs-offset-7":"ring-grid-col-xs-offset-7","col-xs-offset-8":"ring-grid-col-xs-offset-8","col-xs-offset-9":"ring-grid-col-xs-offset-9","col-xs-offset-10":"ring-grid-col-xs-offset-10","col-xs-offset-11":"ring-grid-col-xs-offset-11","col-xs-offset-12":"ring-grid-col-xs-offset-12","start-xs":"ring-grid-start-xs","center-xs":"ring-grid-center-xs","end-xs":"ring-grid-end-xs","top-xs":"ring-grid-top-xs","middle-xs":"ring-grid-middle-xs","baseline-xs":"ring-grid-baseline-xs","bottom-xs":"ring-grid-bottom-xs","around-xs":"ring-grid-around-xs","between-xs":"ring-grid-between-xs","first-xs":"ring-grid-first-xs","last-xs":"ring-grid-last-xs","col-sm":"ring-grid-col-sm","col-sm-1":"ring-grid-col-sm-1","col-sm-2":"ring-grid-col-sm-2","col-sm-3":"ring-grid-col-sm-3","col-sm-4":"ring-grid-col-sm-4","col-sm-5":"ring-grid-col-sm-5","col-sm-6":"ring-grid-col-sm-6","col-sm-7":"ring-grid-col-sm-7","col-sm-8":"ring-grid-col-sm-8","col-sm-9":"ring-grid-col-sm-9","col-sm-10":"ring-grid-col-sm-10","col-sm-11":"ring-grid-col-sm-11","col-sm-12":"ring-grid-col-sm-12","col-sm-offset-0":"ring-grid-col-sm-offset-0","col-sm-offset-1":"ring-grid-col-sm-offset-1","col-sm-offset-2":"ring-grid-col-sm-offset-2","col-sm-offset-3":"ring-grid-col-sm-offset-3","col-sm-offset-4":"ring-grid-col-sm-offset-4","col-sm-offset-5":"ring-grid-col-sm-offset-5","col-sm-offset-6":"ring-grid-col-sm-offset-6","col-sm-offset-7":"ring-grid-col-sm-offset-7","col-sm-offset-8":"ring-grid-col-sm-offset-8","col-sm-offset-9":"ring-grid-col-sm-offset-9","col-sm-offset-10":"ring-grid-col-sm-offset-10","col-sm-offset-11":"ring-grid-col-sm-offset-11","col-sm-offset-12":"ring-grid-col-sm-offset-12","start-sm":"ring-grid-start-sm","center-sm":"ring-grid-center-sm","end-sm":"ring-grid-end-sm","top-sm":"ring-grid-top-sm","middle-sm":"ring-grid-middle-sm","baseline-sm":"ring-grid-baseline-sm","bottom-sm":"ring-grid-bottom-sm","around-sm":"ring-grid-around-sm","between-sm":"ring-grid-between-sm","first-sm":"ring-grid-first-sm","last-sm":"ring-grid-last-sm","col-md":"ring-grid-col-md","col-md-1":"ring-grid-col-md-1","col-md-2":"ring-grid-col-md-2","col-md-3":"ring-grid-col-md-3","col-md-4":"ring-grid-col-md-4","col-md-5":"ring-grid-col-md-5","col-md-6":"ring-grid-col-md-6","col-md-7":"ring-grid-col-md-7","col-md-8":"ring-grid-col-md-8","col-md-9":"ring-grid-col-md-9","col-md-10":"ring-grid-col-md-10","col-md-11":"ring-grid-col-md-11","col-md-12":"ring-grid-col-md-12","col-md-offset-0":"ring-grid-col-md-offset-0","col-md-offset-1":"ring-grid-col-md-offset-1","col-md-offset-2":"ring-grid-col-md-offset-2","col-md-offset-3":"ring-grid-col-md-offset-3","col-md-offset-4":"ring-grid-col-md-offset-4","col-md-offset-5":"ring-grid-col-md-offset-5","col-md-offset-6":"ring-grid-col-md-offset-6","col-md-offset-7":"ring-grid-col-md-offset-7","col-md-offset-8":"ring-grid-col-md-offset-8","col-md-offset-9":"ring-grid-col-md-offset-9","col-md-offset-10":"ring-grid-col-md-offset-10","col-md-offset-11":"ring-grid-col-md-offset-11","col-md-offset-12":"ring-grid-col-md-offset-12","start-md":"ring-grid-start-md","center-md":"ring-grid-center-md","end-md":"ring-grid-end-md","top-md":"ring-grid-top-md","middle-md":"ring-grid-middle-md","baseline-md":"ring-grid-baseline-md","bottom-md":"ring-grid-bottom-md","around-md":"ring-grid-around-md","between-md":"ring-grid-between-md","first-md":"ring-grid-first-md","last-md":"ring-grid-last-md","col-lg":"ring-grid-col-lg","col-lg-1":"ring-grid-col-lg-1","col-lg-2":"ring-grid-col-lg-2","col-lg-3":"ring-grid-col-lg-3","col-lg-4":"ring-grid-col-lg-4","col-lg-5":"ring-grid-col-lg-5","col-lg-6":"ring-grid-col-lg-6","col-lg-7":"ring-grid-col-lg-7","col-lg-8":"ring-grid-col-lg-8","col-lg-9":"ring-grid-col-lg-9","col-lg-10":"ring-grid-col-lg-10","col-lg-11":"ring-grid-col-lg-11","col-lg-12":"ring-grid-col-lg-12","col-lg-offset-0":"ring-grid-col-lg-offset-0","col-lg-offset-1":"ring-grid-col-lg-offset-1","col-lg-offset-2":"ring-grid-col-lg-offset-2","col-lg-offset-3":"ring-grid-col-lg-offset-3","col-lg-offset-4":"ring-grid-col-lg-offset-4","col-lg-offset-5":"ring-grid-col-lg-offset-5","col-lg-offset-6":"ring-grid-col-lg-offset-6","col-lg-offset-7":"ring-grid-col-lg-offset-7","col-lg-offset-8":"ring-grid-col-lg-offset-8","col-lg-offset-9":"ring-grid-col-lg-offset-9","col-lg-offset-10":"ring-grid-col-lg-offset-10","col-lg-offset-11":"ring-grid-col-lg-offset-11","col-lg-offset-12":"ring-grid-col-lg-offset-12","start-lg":"ring-grid-start-lg","center-lg":"ring-grid-center-lg","end-lg":"ring-grid-end-lg","top-lg":"ring-grid-top-lg","middle-lg":"ring-grid-middle-lg","baseline-lg":"ring-grid-baseline-lg","bottom-lg":"ring-grid-bottom-lg","around-lg":"ring-grid-around-lg","between-lg":"ring-grid-between-lg","first-lg":"ring-grid-first-lg","last-lg":"ring-grid-last-lg"};
|
|
2
|
-
|
|
3
|
-
export { styles as s };
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { Waypoint } from 'react-waypoint';
|
|
4
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
var styles = {"extra-small-screen-media":"(max-width: 639px)","small-screen-media":"(min-width: 640px) and (max-width: 959px)","contentLayout":"ring-content-layout-contentLayout","contentLayoutContent":"ring-content-layout-contentLayoutContent","sidebarContainer":"ring-content-layout-sidebarContainer","sidebarContainerRight":"ring-content-layout-sidebarContainerRight","sidebar":"ring-content-layout-sidebar","sidebarRight":"ring-content-layout-sidebarRight","sidebarFixedTop":"ring-content-layout-sidebarFixedTop","sidebarFixedBottom":"ring-content-layout-sidebarFixedBottom","bottomMarker":"ring-content-layout-bottomMarker","contentLayoutResponsive":"ring-content-layout-contentLayoutResponsive"};
|
|
7
|
-
|
|
8
|
-
const ABOVE = 'above';
|
|
9
|
-
const INSIDE = 'inside';
|
|
10
|
-
/**
|
|
11
|
-
* @name Sidebar
|
|
12
|
-
* @deprecated Will be removed in Ring UI 8.0.
|
|
13
|
-
*/
|
|
14
|
-
class Sidebar extends Component {
|
|
15
|
-
state = {
|
|
16
|
-
topIsOutside: true,
|
|
17
|
-
bottomIsOutside: true,
|
|
18
|
-
sidebarVisibleHeight: undefined
|
|
19
|
-
};
|
|
20
|
-
sidebarNode;
|
|
21
|
-
handleTopWaypoint = ({
|
|
22
|
-
currentPosition
|
|
23
|
-
}) => {
|
|
24
|
-
this.setState({
|
|
25
|
-
topIsOutside: currentPosition === ABOVE
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
handleBottomWaypoint = ({
|
|
29
|
-
currentPosition,
|
|
30
|
-
waypointTop
|
|
31
|
-
}) => {
|
|
32
|
-
this.setState({
|
|
33
|
-
sidebarVisibleHeight: waypointTop,
|
|
34
|
-
bottomIsOutside: currentPosition !== INSIDE
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
shouldUseFixation() {
|
|
38
|
-
const {
|
|
39
|
-
contentNode
|
|
40
|
-
} = this.props;
|
|
41
|
-
const {
|
|
42
|
-
sidebarNode
|
|
43
|
-
} = this;
|
|
44
|
-
if (!contentNode || !sidebarNode) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
return contentNode.offsetHeight >= sidebarNode.offsetHeight;
|
|
48
|
-
}
|
|
49
|
-
shouldFixateBottom() {
|
|
50
|
-
const {
|
|
51
|
-
topIsOutside,
|
|
52
|
-
bottomIsOutside
|
|
53
|
-
} = this.state;
|
|
54
|
-
return !bottomIsOutside && topIsOutside && this.shouldUseFixation();
|
|
55
|
-
}
|
|
56
|
-
sidebarRef = node => {
|
|
57
|
-
this.sidebarNode = node;
|
|
58
|
-
};
|
|
59
|
-
render() {
|
|
60
|
-
const {
|
|
61
|
-
right,
|
|
62
|
-
children,
|
|
63
|
-
className,
|
|
64
|
-
containerClassName,
|
|
65
|
-
fixedClassName,
|
|
66
|
-
contentNode,
|
|
67
|
-
...restProps
|
|
68
|
-
} = this.props;
|
|
69
|
-
const {
|
|
70
|
-
topIsOutside,
|
|
71
|
-
bottomIsOutside,
|
|
72
|
-
sidebarVisibleHeight
|
|
73
|
-
} = this.state;
|
|
74
|
-
const shouldFixateTop = bottomIsOutside && topIsOutside && this.shouldUseFixation();
|
|
75
|
-
const shouldFixateBottom = this.shouldFixateBottom();
|
|
76
|
-
const containerClasses = classNames(styles.sidebarContainer, containerClassName, {
|
|
77
|
-
[styles.sidebarContainerRight]: right
|
|
78
|
-
});
|
|
79
|
-
const classes = classNames(styles.sidebar, className, {
|
|
80
|
-
[styles.sidebarRight]: right,
|
|
81
|
-
[styles.sidebarFixedTop]: shouldFixateTop,
|
|
82
|
-
[styles.sidebarFixedBottom]: shouldFixateBottom,
|
|
83
|
-
[fixedClassName !== null && fixedClassName !== void 0 ? fixedClassName : '']: shouldFixateTop || shouldFixateBottom
|
|
84
|
-
});
|
|
85
|
-
const style = {
|
|
86
|
-
maxHeight: shouldFixateBottom && sidebarVisibleHeight ? `${sidebarVisibleHeight}px` : undefined
|
|
87
|
-
};
|
|
88
|
-
return /*#__PURE__*/jsxs("aside", {
|
|
89
|
-
className: containerClasses,
|
|
90
|
-
ref: this.sidebarRef,
|
|
91
|
-
children: [/*#__PURE__*/jsx(Waypoint, {
|
|
92
|
-
onEnter: this.handleTopWaypoint,
|
|
93
|
-
onLeave: this.handleTopWaypoint
|
|
94
|
-
}), /*#__PURE__*/jsx("div", {
|
|
95
|
-
...restProps,
|
|
96
|
-
style: style,
|
|
97
|
-
className: classes,
|
|
98
|
-
children: children
|
|
99
|
-
}), /*#__PURE__*/jsx("div", {
|
|
100
|
-
className: styles.bottomMarker,
|
|
101
|
-
children: /*#__PURE__*/jsx(Waypoint, {
|
|
102
|
-
onEnter: this.handleBottomWaypoint,
|
|
103
|
-
onLeave: this.handleBottomWaypoint
|
|
104
|
-
})
|
|
105
|
-
})]
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export { Sidebar as S, styles as s };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Component, type HTMLAttributes } from 'react';
|
|
2
|
-
export interface ContentLayoutProps extends HTMLAttributes<HTMLElement> {
|
|
3
|
-
responsive: boolean;
|
|
4
|
-
contentClassName?: string | null | undefined;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* @name Content Layout
|
|
8
|
-
* @deprecated Will be removed in Ring UI 8.0.
|
|
9
|
-
*/
|
|
10
|
-
export default class ContentLayout extends Component<ContentLayoutProps> {
|
|
11
|
-
static defaultProps: {
|
|
12
|
-
responsive: boolean;
|
|
13
|
-
};
|
|
14
|
-
state: {
|
|
15
|
-
contentNode: null;
|
|
16
|
-
};
|
|
17
|
-
saveContentNode: (contentNode: HTMLElement | null) => void;
|
|
18
|
-
render(): import("react").JSX.Element;
|
|
19
|
-
}
|
|
20
|
-
export { default as Sidebar } from './sidebar';
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Component, Children, cloneElement } from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { s as styles, S as Sidebar } from '../_helpers/sidebar.js';
|
|
4
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
-
import 'react-waypoint';
|
|
6
|
-
|
|
7
|
-
class ContentLayout extends Component {
|
|
8
|
-
static defaultProps = {
|
|
9
|
-
responsive: true
|
|
10
|
-
};
|
|
11
|
-
state = {
|
|
12
|
-
contentNode: null
|
|
13
|
-
};
|
|
14
|
-
saveContentNode = contentNode => {
|
|
15
|
-
this.setState({
|
|
16
|
-
contentNode
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
render() {
|
|
20
|
-
const {
|
|
21
|
-
children,
|
|
22
|
-
className,
|
|
23
|
-
contentClassName,
|
|
24
|
-
responsive,
|
|
25
|
-
...restProps
|
|
26
|
-
} = this.props;
|
|
27
|
-
const classes = classNames(styles.contentLayout, className, {
|
|
28
|
-
[styles.contentLayoutResponsive]: responsive
|
|
29
|
-
});
|
|
30
|
-
const contentClasses = classNames(styles.contentLayoutContent, contentClassName);
|
|
31
|
-
const childrenArray = Children.toArray(children);
|
|
32
|
-
const sidebarChild = childrenArray.filter(child => !!child && typeof child === 'object' && 'type' in child && child.type === Sidebar)[0];
|
|
33
|
-
const sidebar = sidebarChild && /*#__PURE__*/cloneElement(sidebarChild, {
|
|
34
|
-
contentNode: this.state.contentNode
|
|
35
|
-
});
|
|
36
|
-
const contentChildren = childrenArray.filter(child => child !== sidebarChild);
|
|
37
|
-
return /*#__PURE__*/jsxs("div", {
|
|
38
|
-
"data-test": "content-layout",
|
|
39
|
-
...restProps,
|
|
40
|
-
className: classes,
|
|
41
|
-
children: [sidebar, /*#__PURE__*/jsx("main", {
|
|
42
|
-
className: contentClasses,
|
|
43
|
-
ref: this.saveContentNode,
|
|
44
|
-
children: contentChildren
|
|
45
|
-
})]
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { Sidebar, ContentLayout as default };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Component, type HTMLAttributes } from 'react';
|
|
2
|
-
import { Waypoint } from 'react-waypoint';
|
|
3
|
-
export interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
-
right?: boolean | null | undefined;
|
|
5
|
-
containerClassName?: string | null | undefined;
|
|
6
|
-
fixedClassName?: string | null | undefined;
|
|
7
|
-
contentNode?: HTMLElement | null | undefined;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* @name Sidebar
|
|
11
|
-
* @deprecated Will be removed in Ring UI 8.0.
|
|
12
|
-
*/
|
|
13
|
-
export default class Sidebar extends Component<SidebarProps> {
|
|
14
|
-
state: {
|
|
15
|
-
topIsOutside: boolean;
|
|
16
|
-
bottomIsOutside: boolean;
|
|
17
|
-
sidebarVisibleHeight: undefined;
|
|
18
|
-
};
|
|
19
|
-
sidebarNode?: HTMLElement | null;
|
|
20
|
-
handleTopWaypoint: ({ currentPosition }: Waypoint.CallbackArgs) => void;
|
|
21
|
-
handleBottomWaypoint: ({ currentPosition, waypointTop }: Waypoint.CallbackArgs) => void;
|
|
22
|
-
shouldUseFixation(): boolean;
|
|
23
|
-
shouldFixateBottom(): boolean;
|
|
24
|
-
sidebarRef: (node: HTMLElement | null) => void;
|
|
25
|
-
render(): import("react").JSX.Element;
|
|
26
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type RefObject } from 'react';
|
|
2
|
-
export declare function useIntersectionObserver(containerRef: RefObject<HTMLElement | null>, scrollMargin?: number): IntersectionObserverHandle | null;
|
|
3
|
-
export interface IntersectionObserverHandle {
|
|
4
|
-
observeVisibility(element: Element, setVisible: (isVisible: boolean) => void): () => void;
|
|
5
|
-
}
|
|
6
|
-
export declare function useVisibility(handle: IntersectionObserverHandle | null, elementRef: RefObject<Element | null>): boolean;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import { useState, useEffect } from 'react';
|
|
3
|
-
|
|
4
|
-
function useIntersectionObserver(containerRef, t0) {
|
|
5
|
-
const $ = c(5);
|
|
6
|
-
if ($[0] !== "85eea0b6bda17bfb5987776c879da3db3d1a41e1157672102d3b021b57efb05a") {
|
|
7
|
-
for (let $i = 0; $i < 5; $i += 1) {
|
|
8
|
-
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
9
|
-
}
|
|
10
|
-
$[0] = "85eea0b6bda17bfb5987776c879da3db3d1a41e1157672102d3b021b57efb05a";
|
|
11
|
-
}
|
|
12
|
-
const scrollMargin = t0 === undefined ? 0 : t0;
|
|
13
|
-
const [handle, setHandle] = useState(null);
|
|
14
|
-
let t1;
|
|
15
|
-
let t2;
|
|
16
|
-
if ($[1] !== containerRef || $[2] !== scrollMargin) {
|
|
17
|
-
t1 = () => {
|
|
18
|
-
const container = containerRef.current;
|
|
19
|
-
if (!container) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const elementToSetVisible = new Map();
|
|
23
|
-
const observer = new IntersectionObserver(entries => {
|
|
24
|
-
for (const entry of entries) {
|
|
25
|
-
const setVisible = elementToSetVisible.get(entry.target);
|
|
26
|
-
setVisible?.(entry.isIntersecting);
|
|
27
|
-
}
|
|
28
|
-
}, {
|
|
29
|
-
root: container,
|
|
30
|
-
...(scrollMargin ? {
|
|
31
|
-
scrollMargin: `${scrollMargin}px`
|
|
32
|
-
} : {})
|
|
33
|
-
});
|
|
34
|
-
setHandle({
|
|
35
|
-
observeVisibility(element, setVisible_0) {
|
|
36
|
-
elementToSetVisible.set(element, setVisible_0);
|
|
37
|
-
observer.observe(element);
|
|
38
|
-
return () => {
|
|
39
|
-
elementToSetVisible.delete(element);
|
|
40
|
-
observer.unobserve(element);
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
return () => {
|
|
45
|
-
observer.disconnect();
|
|
46
|
-
setHandle(null);
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
t2 = [containerRef, scrollMargin];
|
|
50
|
-
$[1] = containerRef;
|
|
51
|
-
$[2] = scrollMargin;
|
|
52
|
-
$[3] = t1;
|
|
53
|
-
$[4] = t2;
|
|
54
|
-
} else {
|
|
55
|
-
t1 = $[3];
|
|
56
|
-
t2 = $[4];
|
|
57
|
-
}
|
|
58
|
-
useEffect(t1, t2);
|
|
59
|
-
return handle;
|
|
60
|
-
}
|
|
61
|
-
function useVisibility(handle, elementRef) {
|
|
62
|
-
const $ = c(5);
|
|
63
|
-
if ($[0] !== "85eea0b6bda17bfb5987776c879da3db3d1a41e1157672102d3b021b57efb05a") {
|
|
64
|
-
for (let $i = 0; $i < 5; $i += 1) {
|
|
65
|
-
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
66
|
-
}
|
|
67
|
-
$[0] = "85eea0b6bda17bfb5987776c879da3db3d1a41e1157672102d3b021b57efb05a";
|
|
68
|
-
}
|
|
69
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
70
|
-
let t0;
|
|
71
|
-
let t1;
|
|
72
|
-
if ($[1] !== elementRef || $[2] !== handle) {
|
|
73
|
-
t0 = () => {
|
|
74
|
-
const element = elementRef.current;
|
|
75
|
-
if (!element || !handle) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
return handle.observeVisibility(element, setIsVisible);
|
|
79
|
-
};
|
|
80
|
-
t1 = [handle, elementRef, setIsVisible];
|
|
81
|
-
$[1] = elementRef;
|
|
82
|
-
$[2] = handle;
|
|
83
|
-
$[3] = t0;
|
|
84
|
-
$[4] = t1;
|
|
85
|
-
} else {
|
|
86
|
-
t0 = $[3];
|
|
87
|
-
t1 = $[4];
|
|
88
|
-
}
|
|
89
|
-
useEffect(t0, t1);
|
|
90
|
-
return isVisible;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export { useIntersectionObserver, useVisibility };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type CollapsibleGroupProps } from '../collapsible-group/collapsible-group';
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated The `expand` module has been renamed to `collapsible-group`. This re-export will be removed in
|
|
4
|
-
* Ring UI 8.0. Use `CollapsibleGroup` from `@jetbrains/ring-ui/components/collapsible-group/collapsible-group` instead.
|
|
5
|
-
*/
|
|
6
|
-
declare const DeprecatedCollapsibleGroup: import("react").ForwardRefExoticComponent<CollapsibleGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export type { CollapsibleGroupProps };
|
|
8
|
-
export default DeprecatedCollapsibleGroup;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import deprecate from 'util-deprecate';
|
|
4
|
-
import CollapsibleGroup from '../collapsible-group/collapsible-group.js';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
import 'classnames';
|
|
7
|
-
import '@jetbrains/icons/chevron-12px-right';
|
|
8
|
-
import '@jetbrains/icons/chevron-12px-down';
|
|
9
|
-
import '../icon/icon.js';
|
|
10
|
-
import '../icon/icon.constants.js';
|
|
11
|
-
import '../_helpers/icon-svg.js';
|
|
12
|
-
import '../global/configuration.js';
|
|
13
|
-
import '../global/memoize.js';
|
|
14
|
-
import '../collapse/collapse.js';
|
|
15
|
-
import '../collapse/collapse-context.js';
|
|
16
|
-
import '../collapse/consts.js';
|
|
17
|
-
import '../collapse/collapse-content.js';
|
|
18
|
-
import '../global/data-tests.js';
|
|
19
|
-
import '../global/dom.js';
|
|
20
|
-
import '../collapse/utils.js';
|
|
21
|
-
|
|
22
|
-
const warnDeprecation = deprecate(() => {}, '`CollapsibleGroup` from `@jetbrains/ring-ui/components/expand/collapsible-group` is deprecated and will be removed in Ring UI 8.0. Import it from `@jetbrains/ring-ui/components/collapsible-group/collapsible-group` instead.');
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated The `expand` module has been renamed to `collapsible-group`. This re-export will be removed in
|
|
25
|
-
* Ring UI 8.0. Use `CollapsibleGroup` from `@jetbrains/ring-ui/components/collapsible-group/collapsible-group` instead.
|
|
26
|
-
*/
|
|
27
|
-
const DeprecatedCollapsibleGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
28
|
-
const $ = c(4);
|
|
29
|
-
if ($[0] !== "dc9f603c6e591e91f020cc5faed8f169e693dd93fe948fc345146a82715c1a34") {
|
|
30
|
-
for (let $i = 0; $i < 4; $i += 1) {
|
|
31
|
-
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
32
|
-
}
|
|
33
|
-
$[0] = "dc9f603c6e591e91f020cc5faed8f169e693dd93fe948fc345146a82715c1a34";
|
|
34
|
-
}
|
|
35
|
-
warnDeprecation();
|
|
36
|
-
let t0;
|
|
37
|
-
if ($[1] !== props || $[2] !== ref) {
|
|
38
|
-
t0 = /*#__PURE__*/jsx(CollapsibleGroup, {
|
|
39
|
-
ref: ref,
|
|
40
|
-
...props
|
|
41
|
-
});
|
|
42
|
-
$[1] = props;
|
|
43
|
-
$[2] = ref;
|
|
44
|
-
$[3] = t0;
|
|
45
|
-
} else {
|
|
46
|
-
t0 = $[3];
|
|
47
|
-
}
|
|
48
|
-
return t0;
|
|
49
|
-
});
|
|
50
|
-
DeprecatedCollapsibleGroup.displayName = 'CollapsibleGroup';
|
|
51
|
-
|
|
52
|
-
export { DeprecatedCollapsibleGroup as default };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createComposedRef as createComposedRef$1 } from './compose-refs.js';
|
|
2
|
-
import 'memoize-one';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Use createComposedRef from './compose-refs' instead
|
|
6
|
-
*/
|
|
7
|
-
const createComposedRef = createComposedRef$1;
|
|
8
|
-
|
|
9
|
-
export { createComposedRef };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import { useRef, useLayoutEffect } from 'react';
|
|
3
|
-
import deprecate from 'util-deprecate';
|
|
4
|
-
|
|
5
|
-
const warnDeprecation = deprecate(() => {}, '`useEventCallback()` is deprecated and will be removed in Ring UI 8.0. Use `useEffectEvent()` instead.');
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated This hook will be removed in Ring UI 8.0. Use `useEffectEvent()` instead.
|
|
8
|
-
*/
|
|
9
|
-
function useEventCallback(fn) {
|
|
10
|
-
const $ = c(4);
|
|
11
|
-
if ($[0] !== "0b80c23a2d5918c2ff451ff50bb10512bd04bc56940e9524fa5677201ca31d22") {
|
|
12
|
-
for (let $i = 0; $i < 4; $i += 1) {
|
|
13
|
-
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
14
|
-
}
|
|
15
|
-
$[0] = "0b80c23a2d5918c2ff451ff50bb10512bd04bc56940e9524fa5677201ca31d22";
|
|
16
|
-
}
|
|
17
|
-
warnDeprecation();
|
|
18
|
-
const ref = useRef(null);
|
|
19
|
-
let t0;
|
|
20
|
-
if ($[1] !== fn) {
|
|
21
|
-
t0 = () => {
|
|
22
|
-
ref.current = fn;
|
|
23
|
-
};
|
|
24
|
-
$[1] = fn;
|
|
25
|
-
$[2] = t0;
|
|
26
|
-
} else {
|
|
27
|
-
t0 = $[2];
|
|
28
|
-
}
|
|
29
|
-
useLayoutEffect(t0);
|
|
30
|
-
let t1;
|
|
31
|
-
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
32
|
-
t1 = (...t2) => {
|
|
33
|
-
const args = t2;
|
|
34
|
-
const {
|
|
35
|
-
current
|
|
36
|
-
} = ref;
|
|
37
|
-
if (current === null || current === undefined) {
|
|
38
|
-
throw new Error("callback created in useEventCallback can only be called from event handlers");
|
|
39
|
-
}
|
|
40
|
-
return current(...args);
|
|
41
|
-
};
|
|
42
|
-
$[3] = t1;
|
|
43
|
-
} else {
|
|
44
|
-
t1 = $[3];
|
|
45
|
-
}
|
|
46
|
-
return t1;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export { useEventCallback as default };
|
package/components/grid/col.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Component, type HTMLAttributes } from 'react';
|
|
2
|
-
export interface ColProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
'data-test'?: string | null | undefined;
|
|
4
|
-
xs?: boolean | number | null | undefined;
|
|
5
|
-
sm?: boolean | number | null | undefined;
|
|
6
|
-
md?: boolean | number | null | undefined;
|
|
7
|
-
lg?: boolean | number | null | undefined;
|
|
8
|
-
xsOffset?: number | null | undefined;
|
|
9
|
-
smOffset?: number | null | undefined;
|
|
10
|
-
mdOffset?: number | null | undefined;
|
|
11
|
-
lgOffset?: number | null | undefined;
|
|
12
|
-
reverse?: boolean | null | undefined;
|
|
13
|
-
}
|
|
14
|
-
export default class Col extends Component<ColProps> {
|
|
15
|
-
render(): import("react").JSX.Element;
|
|
16
|
-
}
|