@astral/ui 4.92.2 → 4.93.0
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/BottomDrawer/index.d.ts +1 -1
- package/components/BottomDrawer/index.js +1 -1
- package/components/ClickAwayListener/ClickAwayListener.d.ts +1 -1
- package/components/ClickAwayListener/ClickAwayListener.js +8 -2
- package/components/Fieldset/styles.js +1 -0
- package/components/Radio/Radio.js +1 -1
- package/components/Radio/constants.d.ts +3 -0
- package/components/Radio/constants.js +3 -0
- package/components/Radio/index.d.ts +1 -1
- package/components/Radio/index.js +1 -1
- package/components/Radio/styles.js +9 -9
- package/components/Tree/MultipleTreeList/MultipleTreeList.js +2 -2
- package/components/Tree/MultipleTreeList/TreeItem/TreeItem.js +4 -7
- package/components/Tree/MultipleTreeList/TreeItem/styles.d.ts +1 -17
- package/components/Tree/MultipleTreeList/TreeItem/styles.js +19 -2
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.d.ts +4 -1
- package/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.js +8 -2
- package/components/Tree/MultipleTreeList/styles.d.ts +4 -0
- package/components/Tree/MultipleTreeList/styles.js +25 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanel.d.ts +2 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanel.js +11 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/MobileSlidePanelContent.d.ts +2 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/MobileSlidePanelContent.js +50 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/index.d.ts +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/index.js +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.d.ts +404 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +172 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/types.d.ts +11 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/types.js +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.d.ts +3 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.js +3 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/index.d.ts +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/index.js +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/useDelayedUnmount.d.ts +11 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/useDelayedUnmount.js +18 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/index.d.ts +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/index.js +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/usePanelHeader.d.ts +24 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/usePanelHeader.js +50 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/index.d.ts +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/index.js +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/useRegisterClose.d.ts +13 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/useRegisterClose.js +17 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/index.d.ts +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/index.js +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.d.ts +19 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.js +39 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContext.d.ts +13 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContext.js +6 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/MobileSlidePanelContextProvider.d.ts +7 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/MobileSlidePanelContextProvider.js +12 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/index.d.ts +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/index.js +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/index.d.ts +2 -0
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/index.js +2 -0
- package/components/Tree/TreeItem/MobileSlidePanel/constants.d.ts +11 -0
- package/components/Tree/TreeItem/MobileSlidePanel/constants.js +12 -0
- package/components/Tree/TreeItem/MobileSlidePanel/index.d.ts +2 -0
- package/components/Tree/TreeItem/MobileSlidePanel/index.js +2 -0
- package/components/Tree/TreeItem/MobileSlidePanel/types.d.ts +49 -0
- package/components/Tree/TreeItem/MobileSlidePanel/types.js +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/index.d.ts +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/index.js +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/index.d.ts +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/index.js +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/usePanelStack.d.ts +14 -0
- package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/usePanelStack.js +62 -0
- package/components/Tree/TreeItem/MobileSlidePanel/useLogic/index.d.ts +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/useLogic/index.js +1 -0
- package/components/Tree/TreeItem/MobileSlidePanel/useLogic/useLogic.d.ts +9 -0
- package/components/Tree/TreeItem/MobileSlidePanel/useLogic/useLogic.js +11 -0
- package/components/Tree/TreeItem/TreeItem.d.ts +2 -1
- package/components/Tree/TreeItem/TreeItem.js +49 -9
- package/components/Tree/TreeItem/constants.d.ts +9 -0
- package/components/Tree/TreeItem/constants.js +9 -0
- package/components/Tree/TreeItem/styles.d.ts +4 -13
- package/components/Tree/TreeItem/styles.js +153 -39
- package/components/Tree/TreeItem/types.d.ts +18 -0
- package/components/Tree/TreeItem/useLogic/useLogic.d.ts +21 -7
- package/components/Tree/TreeItem/useLogic/useLogic.js +40 -2
- package/components/Tree/TreeList/TreeItem/TreeItem.js +5 -5
- package/components/Tree/TreeList/TreeItem/styles.d.ts +19 -0
- package/components/Tree/TreeList/TreeItem/styles.js +36 -0
- package/components/Tree/TreeList/TreeItem/useLogic/useLogic.d.ts +6 -0
- package/components/Tree/TreeList/TreeItem/useLogic/useLogic.js +11 -0
- package/components/Tree/TreeList/TreeList.js +2 -2
- package/components/Tree/TreeList/styles.d.ts +4 -0
- package/components/Tree/TreeList/styles.js +26 -0
- package/components/TreeAsyncAutocomplete/OptionsModal/NoData/styles.js +5 -0
- package/components/TreeAsyncAutocomplete/OptionsModal/OptionsModal.js +2 -3
- package/components/TreeAsyncAutocomplete/OptionsModal/styles.d.ts +17 -0
- package/components/TreeAsyncAutocomplete/OptionsModal/styles.js +75 -5
- package/components/TreeAutocomplete/OptionsModal/NoData/styles.js +5 -0
- package/components/TreeAutocomplete/OptionsModal/OptionsModal.js +2 -3
- package/components/TreeAutocomplete/OptionsModal/styles.d.ts +17 -0
- package/components/TreeAutocomplete/OptionsModal/styles.js +36 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/styles.js +5 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/OptionsModal.js +5 -9
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.d.ts +35 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.js +96 -5
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.d.ts +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.js +17 -2
- package/components/TreeLikeAutocomplete/OptionsModal/NoData/styles.js +5 -0
- package/components/TreeLikeAutocomplete/OptionsModal/OptionsModal.js +5 -6
- package/components/TreeLikeAutocomplete/OptionsModal/styles.d.ts +27 -0
- package/components/TreeLikeAutocomplete/OptionsModal/styles.js +44 -1
- package/components/TreeLikeAutocomplete/OptionsModal/useLogic/useLogic.d.ts +1 -0
- package/components/TreeLikeAutocomplete/OptionsModal/useLogic/useLogic.js +14 -1
- package/components/TreeLikeList/TreeItem/TreeItem.js +11 -4
- package/components/TreeLikeList/TreeItem/styles.d.ts +14 -17
- package/components/TreeLikeList/TreeItem/styles.js +48 -1
- package/components/TreeLikeList/TreeItem/useLogic/useLogic.d.ts +8 -2
- package/components/TreeLikeList/TreeItem/useLogic/useLogic.js +35 -13
- package/components/TreeLikeList/TreeLikeList.js +2 -2
- package/components/TreeLikeList/styles.d.ts +4 -0
- package/components/TreeLikeList/styles.js +25 -0
- package/node/components/BottomDrawer/index.d.ts +1 -1
- package/node/components/BottomDrawer/index.js +3 -1
- package/node/components/ClickAwayListener/ClickAwayListener.d.ts +1 -1
- package/node/components/ClickAwayListener/ClickAwayListener.js +8 -2
- package/node/components/Fieldset/styles.js +1 -0
- package/node/components/Radio/Radio.js +1 -1
- package/node/components/Radio/constants.d.ts +3 -0
- package/node/components/Radio/constants.js +4 -1
- package/node/components/Radio/index.d.ts +1 -1
- package/node/components/Radio/index.js +3 -1
- package/node/components/Radio/styles.js +8 -8
- package/node/components/Tree/MultipleTreeList/MultipleTreeList.js +1 -1
- package/node/components/Tree/MultipleTreeList/TreeItem/TreeItem.js +4 -7
- package/node/components/Tree/MultipleTreeList/TreeItem/styles.d.ts +1 -17
- package/node/components/Tree/MultipleTreeList/TreeItem/styles.js +18 -1
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.d.ts +4 -1
- package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.js +8 -2
- package/node/components/Tree/MultipleTreeList/styles.d.ts +4 -0
- package/node/components/Tree/MultipleTreeList/styles.js +26 -1
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanel.d.ts +2 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanel.js +15 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/MobileSlidePanelContent.d.ts +2 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/MobileSlidePanelContent.js +54 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/index.d.ts +1 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/index.js +17 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.d.ts +404 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +175 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/types.d.ts +11 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/types.js +2 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.d.ts +3 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.js +19 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/index.d.ts +1 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/index.js +17 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/useDelayedUnmount.d.ts +11 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/useDelayedUnmount.js +22 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/index.d.ts +1 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/index.js +17 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/usePanelHeader.d.ts +24 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/usePanelHeader.js +54 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/index.d.ts +1 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/index.js +17 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/useRegisterClose.d.ts +13 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/useRegisterClose.js +21 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/index.d.ts +1 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/index.js +17 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.d.ts +19 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.js +43 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContext.d.ts +13 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContext.js +9 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/MobileSlidePanelContextProvider.d.ts +7 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/MobileSlidePanelContextProvider.js +16 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/index.d.ts +1 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/index.js +17 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/index.d.ts +2 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/index.js +18 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/constants.d.ts +11 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/constants.js +15 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/index.d.ts +2 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/index.js +18 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/types.d.ts +49 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/types.js +2 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/index.d.ts +1 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/index.js +17 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/index.d.ts +1 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/index.js +17 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/usePanelStack.d.ts +14 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/usePanelStack.js +66 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/index.d.ts +1 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/index.js +17 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/useLogic.d.ts +9 -0
- package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/useLogic.js +15 -0
- package/node/components/Tree/TreeItem/TreeItem.d.ts +2 -1
- package/node/components/Tree/TreeItem/TreeItem.js +48 -9
- package/node/components/Tree/TreeItem/constants.d.ts +9 -0
- package/node/components/Tree/TreeItem/constants.js +10 -1
- package/node/components/Tree/TreeItem/styles.d.ts +4 -13
- package/node/components/Tree/TreeItem/styles.js +153 -39
- package/node/components/Tree/TreeItem/types.d.ts +18 -0
- package/node/components/Tree/TreeItem/useLogic/useLogic.d.ts +21 -7
- package/node/components/Tree/TreeItem/useLogic/useLogic.js +39 -1
- package/node/components/Tree/TreeList/TreeItem/TreeItem.js +4 -4
- package/node/components/Tree/TreeList/TreeItem/styles.d.ts +19 -0
- package/node/components/Tree/TreeList/TreeItem/styles.js +60 -1
- package/node/components/Tree/TreeList/TreeItem/useLogic/useLogic.d.ts +6 -0
- package/node/components/Tree/TreeList/TreeItem/useLogic/useLogic.js +11 -0
- package/node/components/Tree/TreeList/TreeList.js +1 -1
- package/node/components/Tree/TreeList/styles.d.ts +4 -0
- package/node/components/Tree/TreeList/styles.js +27 -1
- package/node/components/TreeAsyncAutocomplete/OptionsModal/NoData/styles.js +5 -0
- package/node/components/TreeAsyncAutocomplete/OptionsModal/OptionsModal.js +1 -2
- package/node/components/TreeAsyncAutocomplete/OptionsModal/styles.d.ts +17 -0
- package/node/components/TreeAsyncAutocomplete/OptionsModal/styles.js +76 -6
- package/node/components/TreeAutocomplete/OptionsModal/NoData/styles.js +5 -0
- package/node/components/TreeAutocomplete/OptionsModal/OptionsModal.js +1 -2
- package/node/components/TreeAutocomplete/OptionsModal/styles.d.ts +17 -0
- package/node/components/TreeAutocomplete/OptionsModal/styles.js +37 -1
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/styles.js +5 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/OptionsModal.js +3 -7
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.d.ts +35 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.js +97 -6
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.d.ts +1 -0
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.js +17 -2
- package/node/components/TreeLikeAutocomplete/OptionsModal/NoData/styles.js +5 -0
- package/node/components/TreeLikeAutocomplete/OptionsModal/OptionsModal.js +3 -4
- package/node/components/TreeLikeAutocomplete/OptionsModal/styles.d.ts +27 -0
- package/node/components/TreeLikeAutocomplete/OptionsModal/styles.js +45 -2
- package/node/components/TreeLikeAutocomplete/OptionsModal/useLogic/useLogic.d.ts +1 -0
- package/node/components/TreeLikeAutocomplete/OptionsModal/useLogic/useLogic.js +14 -1
- package/node/components/TreeLikeList/TreeItem/TreeItem.js +9 -2
- package/node/components/TreeLikeList/TreeItem/styles.d.ts +14 -17
- package/node/components/TreeLikeList/TreeItem/styles.js +48 -1
- package/node/components/TreeLikeList/TreeItem/useLogic/useLogic.d.ts +8 -2
- package/node/components/TreeLikeList/TreeItem/useLogic/useLogic.js +34 -12
- package/node/components/TreeLikeList/TreeLikeList.js +1 -1
- package/node/components/TreeLikeList/styles.d.ts +4 -0
- package/node/components/TreeLikeList/styles.js +26 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./useLogic"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const useLogic: () => {
|
|
3
|
+
register: (close: (event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) => () => void;
|
|
4
|
+
closeTop: (event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
5
|
+
setHeader: (headerId: string, header: import("../types").MobilePanelHeader) => void;
|
|
6
|
+
removeHeader: (headerId: string) => void;
|
|
7
|
+
activeHeader: import("../types").MobilePanelHeader | null;
|
|
8
|
+
parentContext: import("../MobileSlidePanelContext").MobileSlidePanelContextProps | null;
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLogic = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const MobileSlidePanelContext_1 = require("../MobileSlidePanelContext");
|
|
6
|
+
const hooks_1 = require("./hooks");
|
|
7
|
+
const useLogic = () => {
|
|
8
|
+
const parentContext = (0, react_1.useContext)(MobileSlidePanelContext_1.MobileSlidePanelContext);
|
|
9
|
+
const panelStack = (0, hooks_1.usePanelStack)();
|
|
10
|
+
return {
|
|
11
|
+
parentContext,
|
|
12
|
+
...panelStack,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.useLogic = useLogic;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { type TreeItemProps } from './types';
|
|
2
|
-
export declare const TreeItem: (
|
|
3
|
+
export declare const TreeItem: import("react").ForwardRefExoticComponent<Omit<TreeItemProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
@@ -2,18 +2,57 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TreeItem = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
5
|
+
const react_1 = require("react");
|
|
6
6
|
const Tooltip_1 = require("../../Tooltip");
|
|
7
|
+
const classNames_1 = require("../../utils/classNames");
|
|
8
|
+
const cva_1 = require("../../utils/cva");
|
|
7
9
|
const constants_1 = require("./constants");
|
|
10
|
+
const MobileSlidePanel_1 = require("./MobileSlidePanel");
|
|
8
11
|
const styles_1 = require("./styles");
|
|
9
12
|
const useLogic_1 = require("./useLogic");
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
const itemCva = (0, cva_1.cva)(constants_1.treeClassnames.item, {
|
|
14
|
+
variants: {
|
|
15
|
+
isOpen: {
|
|
16
|
+
true: constants_1.treeClassnames.open,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
const itemContentCva = (0, cva_1.cva)(constants_1.treeClassnames.itemContent, {
|
|
21
|
+
variants: {
|
|
22
|
+
isSelected: {
|
|
23
|
+
true: constants_1.treeClassnames.selected,
|
|
24
|
+
},
|
|
25
|
+
isDisabled: {
|
|
26
|
+
true: constants_1.treeClassnames.disabled,
|
|
27
|
+
},
|
|
28
|
+
hasNested: {
|
|
29
|
+
true: constants_1.treeClassnames.hasNested,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
const collapseButtonCva = (0, cva_1.cva)(constants_1.treeClassnames.collapseButton, {
|
|
34
|
+
variants: {
|
|
35
|
+
isNotBlockingExpandList: {
|
|
36
|
+
true: constants_1.treeClassnames.notBlockingExpandList,
|
|
37
|
+
},
|
|
38
|
+
isOpen: {
|
|
39
|
+
true: constants_1.treeClassnames.open,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
exports.TreeItem = (0, react_1.forwardRef)((props, ref) => {
|
|
44
|
+
const { isOpen, isMobileOpen, isMobile, handleToggle, handleClose, itemProps, itemContentProps, tooltipProps, itemCssVars, mobileSlidePanelProps, } = (0, useLogic_1.useLogic)(props);
|
|
45
|
+
const { id, prefixId, label, note, renderItem, children, className, isSelected, isDisabled = false, disabledReason, isDefaultExpanded, isForceExpanded, isNotBlockingExpandList = false, level = 0, component = 'div', onClick, mobileHeaderLabel, mobileHeaderControl, mobileHeaderAdditionalContent, onMobilePanelOpenChange, ...restProps } = props;
|
|
46
|
+
const renderCollapseButton = () => ((0, jsx_runtime_1.jsx)(styles_1.CollapseButton, { className: collapseButtonCva({
|
|
47
|
+
isNotBlockingExpandList,
|
|
48
|
+
isOpen,
|
|
49
|
+
}), disabled: !isNotBlockingExpandList && isDisabled, variant: "text", onClick: handleToggle, children: (0, jsx_runtime_1.jsx)(styles_1.ChevronIcon, {}) }));
|
|
14
50
|
if (children) {
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.Item, { ...restProps,
|
|
51
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Item, { ...restProps, ref: ref, as: component, className: (0, classNames_1.classNames)(className, itemCva({ isOpen })), style: itemCssVars, ...itemProps, children: [(0, jsx_runtime_1.jsx)(styles_1.ItemContent, { ...itemContentProps, className: itemContentCva({
|
|
52
|
+
isSelected,
|
|
53
|
+
isDisabled,
|
|
54
|
+
hasNested: Boolean(children),
|
|
55
|
+
}), children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { placement: constants_1.TOOLTIP_PLACEMENT, ...tooltipProps, children: renderItem ? ((0, jsx_runtime_1.jsxs)(styles_1.LabelWrapper, { children: [renderCollapseButton(), renderItem({ label, note, id })] })) : ((0, jsx_runtime_1.jsxs)(styles_1.ItemWrapper, { children: [(0, jsx_runtime_1.jsxs)(styles_1.LabelWrapper, { children: [renderCollapseButton(), (0, jsx_runtime_1.jsx)(styles_1.Label, { component: "div", children: label })] }), note && ((0, jsx_runtime_1.jsx)(styles_1.Note, { className: constants_1.treeClassnames.note, variant: "caption", color: "textSecondary", children: note }))] })) }) }), isMobile ? ((0, jsx_runtime_1.jsx)(MobileSlidePanel_1.MobileSlidePanel, { isOpen: isMobileOpen, onClose: handleClose, ...mobileSlidePanelProps, children: children })) : ((0, jsx_runtime_1.jsx)(styles_1.StyledCollapse, { in: isOpen, unmountOnExit: true, children: children }))] }));
|
|
16
56
|
}
|
|
17
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.Item, { ...restProps,
|
|
18
|
-
};
|
|
19
|
-
exports.TreeItem = TreeItem;
|
|
57
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.Item, { ...restProps, ref: ref, as: component, className: (0, classNames_1.classNames)(className, itemCva({ isOpen })), style: itemCssVars, ...itemProps, children: (0, jsx_runtime_1.jsx)(styles_1.ItemContent, { ...itemContentProps, className: itemContentCva({ isSelected, isDisabled }), children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { placement: constants_1.TOOLTIP_PLACEMENT, ...tooltipProps, children: renderItem ? ((0, jsx_runtime_1.jsx)(styles_1.LabelWrapper, { children: renderItem({ label, note, id }) })) : ((0, jsx_runtime_1.jsxs)(styles_1.ItemWrapper, { children: [(0, jsx_runtime_1.jsx)(styles_1.LabelWrapper, { children: (0, jsx_runtime_1.jsx)(styles_1.Label, { component: "div", children: label }) }), note && ((0, jsx_runtime_1.jsx)(styles_1.Note, { className: constants_1.treeClassnames.note, variant: "caption", color: "textSecondary", children: note }))] })) }) }) }));
|
|
58
|
+
});
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
export declare const COLLAPSE_BUTTON_WIDTH = "24px";
|
|
2
|
+
export declare const MOBILE_COLLAPSE_BUTTON_WIDTH = "72px";
|
|
2
3
|
export declare const TREE_LINE_WIDTH = "10px";
|
|
3
4
|
export declare const GAP_WIDTH = "4px";
|
|
4
5
|
export declare const HALF_PADDING_COLLAPSE_BUTTON_WIDTH = "14px";
|
|
5
6
|
export declare const TOOLTIP_PLACEMENT = "bottom-start";
|
|
6
7
|
export declare const treeClassnames: {
|
|
8
|
+
item: string;
|
|
9
|
+
itemContent: string;
|
|
7
10
|
note: string;
|
|
8
11
|
label: string;
|
|
12
|
+
collapseButton: string;
|
|
13
|
+
hasNested: string;
|
|
14
|
+
open: string;
|
|
15
|
+
disabled: string;
|
|
16
|
+
selected: string;
|
|
17
|
+
notBlockingExpandList: string;
|
|
9
18
|
};
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.treeClassnames = exports.TOOLTIP_PLACEMENT = exports.HALF_PADDING_COLLAPSE_BUTTON_WIDTH = exports.GAP_WIDTH = exports.TREE_LINE_WIDTH = exports.COLLAPSE_BUTTON_WIDTH = void 0;
|
|
3
|
+
exports.treeClassnames = exports.TOOLTIP_PLACEMENT = exports.HALF_PADDING_COLLAPSE_BUTTON_WIDTH = exports.GAP_WIDTH = exports.TREE_LINE_WIDTH = exports.MOBILE_COLLAPSE_BUTTON_WIDTH = exports.COLLAPSE_BUTTON_WIDTH = void 0;
|
|
4
4
|
const createUIKitClassname_1 = require("../../utils/createUIKitClassname");
|
|
5
5
|
exports.COLLAPSE_BUTTON_WIDTH = '24px';
|
|
6
|
+
exports.MOBILE_COLLAPSE_BUTTON_WIDTH = '72px';
|
|
6
7
|
exports.TREE_LINE_WIDTH = '10px';
|
|
7
8
|
exports.GAP_WIDTH = '4px';
|
|
8
9
|
exports.HALF_PADDING_COLLAPSE_BUTTON_WIDTH = '14px';
|
|
9
10
|
exports.TOOLTIP_PLACEMENT = 'bottom-start';
|
|
10
11
|
exports.treeClassnames = {
|
|
12
|
+
item: (0, createUIKitClassname_1.createUIKitClassname)('tree-item'),
|
|
13
|
+
itemContent: (0, createUIKitClassname_1.createUIKitClassname)('tree-item__content'),
|
|
11
14
|
note: (0, createUIKitClassname_1.createUIKitClassname)('tree-item__note'),
|
|
12
15
|
label: (0, createUIKitClassname_1.createUIKitClassname)('tree-item__label'),
|
|
16
|
+
collapseButton: (0, createUIKitClassname_1.createUIKitClassname)('tree-item__collapse-button'),
|
|
17
|
+
hasNested: (0, createUIKitClassname_1.createUIKitClassname)('tree-item_has-nested'),
|
|
18
|
+
open: (0, createUIKitClassname_1.createUIKitClassname)('tree-item_open'),
|
|
19
|
+
disabled: (0, createUIKitClassname_1.createUIKitClassname)('tree-item_disabled'),
|
|
20
|
+
selected: (0, createUIKitClassname_1.createUIKitClassname)('tree-item_selected'),
|
|
21
|
+
notBlockingExpandList: (0, createUIKitClassname_1.createUIKitClassname)('tree-item_not-blocking-expand-list'),
|
|
13
22
|
};
|
|
@@ -3,16 +3,10 @@
|
|
|
3
3
|
export declare const Item: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
6
|
-
} & {
|
|
7
|
-
$level: number;
|
|
8
6
|
}, import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
|
|
9
7
|
export declare const ItemContent: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
10
8
|
theme?: import("@emotion/react").Theme | undefined;
|
|
11
9
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
12
|
-
} & {
|
|
13
|
-
$isSelected: boolean;
|
|
14
|
-
$isDisabled: boolean;
|
|
15
|
-
$level: number;
|
|
16
10
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
17
11
|
export declare const CollapseButton: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "component" | "size" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
|
|
18
12
|
variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
|
|
@@ -23,8 +17,6 @@ export declare const CollapseButton: import("@emotion/styled/dist/declarations/s
|
|
|
23
17
|
size?: "large" | "medium" | undefined;
|
|
24
18
|
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
25
19
|
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
-
} & {
|
|
27
|
-
$isNotBlockingExpandList?: boolean | undefined;
|
|
28
20
|
}, {}, {}>;
|
|
29
21
|
export declare const ChevronIcon: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
30
22
|
children?: import("react").ReactNode;
|
|
@@ -33,14 +25,10 @@ export declare const ChevronIcon: import("@emotion/styled/dist/declarations/src/
|
|
|
33
25
|
size?: "sm" | "md" | "auto" | undefined;
|
|
34
26
|
} & import("react").SVGProps<SVGSVGElement> & {
|
|
35
27
|
theme?: import("@emotion/react").Theme | undefined;
|
|
36
|
-
} & {
|
|
37
|
-
$isActive?: boolean | undefined;
|
|
38
28
|
}, {}, {}>;
|
|
39
29
|
export declare const LabelWrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
40
30
|
theme?: import("@emotion/react").Theme | undefined;
|
|
41
31
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
42
|
-
} & {
|
|
43
|
-
$level: number;
|
|
44
32
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
45
33
|
export declare const Label: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../../Typography/types").TypographyPropsBase & {
|
|
46
34
|
color?: import("../../Typography").TypographyColor | undefined;
|
|
@@ -344,7 +332,7 @@ export declare const Note: import("@emotion/styled/dist/declarations/src/types")
|
|
|
344
332
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
345
333
|
open?: boolean | undefined;
|
|
346
334
|
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
347
|
-
size?: import("
|
|
335
|
+
size?: import("../../Tooltip").TooltipSize | undefined;
|
|
348
336
|
componentsProps?: {
|
|
349
337
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
350
338
|
transition?: (import("@mui/material/transitions").TransitionProps & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -406,3 +394,6 @@ export declare const ItemWrapper: import("@emotion/styled/dist/declarations/src/
|
|
|
406
394
|
theme?: import("@emotion/react").Theme | undefined;
|
|
407
395
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
408
396
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
397
|
+
export declare const StyledCollapse: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../../Collapse").CollapseProps & {
|
|
398
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
399
|
+
}, {}, {}>;
|
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ItemWrapper = exports.Note = exports.Label = exports.LabelWrapper = exports.ChevronIcon = exports.CollapseButton = exports.ItemContent = exports.Item = void 0;
|
|
3
|
+
exports.StyledCollapse = exports.ItemWrapper = exports.Note = exports.Label = exports.LabelWrapper = exports.ChevronIcon = exports.CollapseButton = exports.ItemContent = exports.Item = void 0;
|
|
4
4
|
const Typography_1 = require("@mui/material/Typography");
|
|
5
5
|
const ChevronROutlineMd_1 = require("../../../icons/ChevronROutlineMd");
|
|
6
6
|
const Button_1 = require("../../Button");
|
|
7
|
+
const Collapse_1 = require("../../Collapse");
|
|
7
8
|
const Description_1 = require("../../Description");
|
|
8
9
|
const IconButton_1 = require("../../IconButton");
|
|
9
10
|
const OverflowTypography_1 = require("../../OverflowTypography");
|
|
10
11
|
const SvgIcon_1 = require("../../SvgIcon");
|
|
11
12
|
const styled_1 = require("../../styled");
|
|
13
|
+
const Tooltip_1 = require("../../Tooltip");
|
|
12
14
|
const Typography_2 = require("../../Typography");
|
|
13
15
|
const constants_1 = require("./constants");
|
|
14
|
-
const getBackgroundColor = (theme, isSelected, isDisabled) => {
|
|
15
|
-
if (isDisabled) {
|
|
16
|
-
return 'transparent';
|
|
17
|
-
}
|
|
18
|
-
return isSelected
|
|
19
|
-
? theme.palette.primary[100]
|
|
20
|
-
: theme.palette.background.elementHover;
|
|
21
|
-
};
|
|
22
16
|
exports.Item = (0, styled_1.styled)('li', {
|
|
23
|
-
shouldForwardProp: (prop) => !['as'
|
|
17
|
+
shouldForwardProp: (prop) => !['as'].includes(prop),
|
|
24
18
|
}) `
|
|
19
|
+
--tree-item-level: 0;
|
|
20
|
+
|
|
25
21
|
position: relative;
|
|
26
22
|
|
|
27
23
|
&:not(:last-of-type)::before {
|
|
@@ -30,18 +26,29 @@ exports.Item = (0, styled_1.styled)('li', {
|
|
|
30
26
|
position: absolute;
|
|
31
27
|
z-index: 1;
|
|
32
28
|
top: 0;
|
|
33
|
-
transform:
|
|
29
|
+
transform: translateX(
|
|
30
|
+
calc(
|
|
31
|
+
((${constants_1.COLLAPSE_BUTTON_WIDTH} + ${constants_1.GAP_WIDTH}) * var(--tree-item-level)) -
|
|
32
|
+
${constants_1.HALF_PADDING_COLLAPSE_BUTTON_WIDTH}
|
|
33
|
+
)
|
|
34
|
+
);
|
|
34
35
|
|
|
35
36
|
width: 0;
|
|
36
37
|
height: 100%;
|
|
37
38
|
|
|
38
39
|
border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
39
40
|
}
|
|
41
|
+
|
|
42
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
43
|
+
position: static;
|
|
44
|
+
|
|
45
|
+
&:not(:last-of-type)::before {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
40
49
|
`;
|
|
41
|
-
exports.ItemContent = (0, styled_1.styled)('div'
|
|
42
|
-
|
|
43
|
-
}) `
|
|
44
|
-
cursor: ${({ $isDisabled }) => ($isDisabled ? 'default' : 'pointer')};
|
|
50
|
+
exports.ItemContent = (0, styled_1.styled)('div') `
|
|
51
|
+
cursor: pointer;
|
|
45
52
|
|
|
46
53
|
position: relative;
|
|
47
54
|
|
|
@@ -49,11 +56,14 @@ exports.ItemContent = (0, styled_1.styled)('div', {
|
|
|
49
56
|
|
|
50
57
|
min-height: 32px;
|
|
51
58
|
padding: ${({ theme }) => theme.spacing(0, 4, 1, 0)};
|
|
52
|
-
padding-left: ${({ theme, $level }) => `calc(${theme.spacing($level * 7)} + ${theme.spacing(7)})`};
|
|
53
59
|
|
|
54
|
-
|
|
60
|
+
padding-left: ${({ theme }) => `calc(
|
|
61
|
+
var(--tree-item-level) * ${theme.spacing(7)} + ${theme.spacing(7)}`}
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
color: ${({ theme }) => theme.palette.text.primary};
|
|
55
65
|
|
|
56
|
-
background-color:
|
|
66
|
+
background-color: transparent;
|
|
57
67
|
|
|
58
68
|
transition: ${({ theme }) => theme.transitions.create('background-color', {
|
|
59
69
|
easing: theme.transitions.easing.easeIn,
|
|
@@ -61,54 +71,124 @@ exports.ItemContent = (0, styled_1.styled)('div', {
|
|
|
61
71
|
})};
|
|
62
72
|
|
|
63
73
|
&:hover {
|
|
64
|
-
background-color: ${({ theme
|
|
74
|
+
background-color: ${({ theme }) => theme.palette.background.elementHover};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.${constants_1.treeClassnames.selected} {
|
|
78
|
+
background-color: ${({ theme }) => theme.palette.primary[100]};
|
|
79
|
+
|
|
80
|
+
&:hover, &:focus {
|
|
81
|
+
background-color: ${({ theme }) => theme.palette.primary[100]};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.${constants_1.treeClassnames.disabled} {
|
|
86
|
+
cursor: default;
|
|
87
|
+
color: ${({ theme }) => theme.palette.text.disabled};
|
|
88
|
+
|
|
89
|
+
&:hover, &:focus {
|
|
90
|
+
background-color: transparent;
|
|
91
|
+
}
|
|
65
92
|
}
|
|
66
93
|
|
|
67
94
|
&:focus {
|
|
68
|
-
background-color: ${({ theme
|
|
95
|
+
background-color: ${({ theme }) => theme.palette.background.elementHover};
|
|
69
96
|
border: 0;
|
|
70
97
|
outline: 0;
|
|
71
98
|
}
|
|
99
|
+
|
|
100
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
101
|
+
padding: ${({ theme }) => theme.microSpacing(6, 3)};
|
|
102
|
+
|
|
103
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
&.${constants_1.treeClassnames.hasNested} {
|
|
107
|
+
padding-right: ${({ theme }) => theme.spacing(11)};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
& .${Tooltip_1.tooltipClassnames.contentWrapper} {
|
|
111
|
+
width: 100%;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:focus {
|
|
115
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
116
|
+
}
|
|
117
|
+
}
|
|
72
118
|
`;
|
|
73
|
-
exports.CollapseButton = (0, styled_1.styled)(IconButton_1.IconButton
|
|
74
|
-
shouldForwardProp: (prop) => !['$isNotBlockingExpandList'].includes(prop),
|
|
75
|
-
}) `
|
|
119
|
+
exports.CollapseButton = (0, styled_1.styled)(IconButton_1.IconButton) `
|
|
76
120
|
position: relative;
|
|
77
121
|
z-index: 1;
|
|
78
122
|
|
|
79
123
|
width: ${constants_1.COLLAPSE_BUTTON_WIDTH};
|
|
80
|
-
height:
|
|
124
|
+
height: ${constants_1.COLLAPSE_BUTTON_WIDTH};
|
|
81
125
|
margin-left: -${constants_1.COLLAPSE_BUTTON_WIDTH};
|
|
82
126
|
|
|
83
|
-
color:
|
|
127
|
+
color: inherit;
|
|
128
|
+
|
|
129
|
+
&.${constants_1.treeClassnames.notBlockingExpandList} {
|
|
130
|
+
color: ${({ theme }) => theme.palette.text.primary};
|
|
131
|
+
}
|
|
84
132
|
|
|
85
|
-
&.${Button_1.buttonClasses.root}
|
|
86
|
-
width:
|
|
87
|
-
height:
|
|
133
|
+
&.${Button_1.buttonClasses.root} {
|
|
134
|
+
width: ${constants_1.COLLAPSE_BUTTON_WIDTH};
|
|
135
|
+
height: ${constants_1.COLLAPSE_BUTTON_WIDTH};
|
|
136
|
+
}
|
|
88
137
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
138
|
+
&.${Button_1.buttonClasses.root} .${SvgIcon_1.svgIconClassnames.root} {
|
|
139
|
+
width: ${constants_1.COLLAPSE_BUTTON_WIDTH};
|
|
140
|
+
height: ${constants_1.COLLAPSE_BUTTON_WIDTH};
|
|
93
141
|
}
|
|
94
142
|
|
|
95
143
|
&:hover {
|
|
96
144
|
background-color: ${({ theme }) => theme.palette.grey[300]};
|
|
97
145
|
}
|
|
146
|
+
|
|
147
|
+
&.${constants_1.treeClassnames.open} .${SvgIcon_1.svgIconClassnames.root} {
|
|
148
|
+
transform: rotateZ(90deg);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
152
|
+
position: absolute;
|
|
153
|
+
top: 0;
|
|
154
|
+
right: 0;
|
|
155
|
+
bottom: 0;
|
|
156
|
+
z-index: 0;
|
|
157
|
+
|
|
158
|
+
width: ${constants_1.MOBILE_COLLAPSE_BUTTON_WIDTH};
|
|
159
|
+
height: auto;
|
|
160
|
+
margin-left: 0;
|
|
161
|
+
padding: ${({ theme }) => theme.spacing(0, 4, 0, 8)};
|
|
162
|
+
|
|
163
|
+
border-radius: 0;
|
|
164
|
+
|
|
165
|
+
&.${constants_1.treeClassnames.open} .${SvgIcon_1.svgIconClassnames.root} {
|
|
166
|
+
transform: rotateZ(0deg);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&.${Button_1.buttonClasses.root} {
|
|
170
|
+
width: ${constants_1.MOBILE_COLLAPSE_BUTTON_WIDTH};
|
|
171
|
+
height: auto;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&:hover {
|
|
175
|
+
background-color: transparent;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
98
178
|
`;
|
|
99
|
-
exports.ChevronIcon = (0, styled_1.styled)(ChevronROutlineMd_1.ChevronROutlineMd
|
|
100
|
-
|
|
101
|
-
}) `
|
|
102
|
-
transform: rotateZ(${({ $isActive }) => ($isActive ? 90 : 0)}deg);
|
|
179
|
+
exports.ChevronIcon = (0, styled_1.styled)(ChevronROutlineMd_1.ChevronROutlineMd) `
|
|
180
|
+
transform: rotateZ(0deg);
|
|
103
181
|
|
|
104
182
|
transition: ${({ theme }) => theme.transitions.create('transform', {
|
|
105
183
|
easing: theme.transitions.easing.sharp,
|
|
106
184
|
duration: theme.transitions.duration.short,
|
|
107
185
|
})};
|
|
186
|
+
|
|
187
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
188
|
+
transition: none;
|
|
189
|
+
}
|
|
108
190
|
`;
|
|
109
|
-
exports.LabelWrapper =
|
|
110
|
-
shouldForwardProp: (prop) => prop !== '$level',
|
|
111
|
-
}) `
|
|
191
|
+
exports.LabelWrapper = styled_1.styled.div `
|
|
112
192
|
position: relative;
|
|
113
193
|
|
|
114
194
|
display: flex;
|
|
@@ -137,12 +217,33 @@ exports.LabelWrapper = (0, styled_1.styled)('div', {
|
|
|
137
217
|
border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
138
218
|
border-radius: 0 0 0 ${({ theme }) => theme.shape.small};
|
|
139
219
|
}
|
|
220
|
+
|
|
221
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
222
|
+
position: static;
|
|
223
|
+
|
|
224
|
+
&::before {
|
|
225
|
+
display: none;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
padding-top: 0;
|
|
229
|
+
|
|
230
|
+
gap: ${({ theme }) => theme.spacing(1)};
|
|
231
|
+
width: 100%;
|
|
232
|
+
|
|
233
|
+
justify-content: space-between;
|
|
234
|
+
}
|
|
140
235
|
`;
|
|
141
236
|
exports.Label = (0, styled_1.styled)(Typography_2.Typography) `
|
|
142
237
|
display: flex;
|
|
143
238
|
align-items: center;
|
|
144
239
|
|
|
145
240
|
margin-left: ${({ theme }) => theme.spacing(1)};
|
|
241
|
+
|
|
242
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
243
|
+
margin-left: 0;
|
|
244
|
+
order: 1;
|
|
245
|
+
padding: ${({ theme }) => theme.microSpacing(1, 0)};
|
|
246
|
+
}
|
|
146
247
|
`;
|
|
147
248
|
exports.Note = (0, styled_1.styled)(OverflowTypography_1.OverflowTypography) `
|
|
148
249
|
margin-left: ${({ theme }) => theme.spacing(1)};
|
|
@@ -153,8 +254,21 @@ exports.Note = (0, styled_1.styled)(OverflowTypography_1.OverflowTypography) `
|
|
|
153
254
|
color: inherit;
|
|
154
255
|
}
|
|
155
256
|
}
|
|
257
|
+
|
|
258
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
259
|
+
margin-left: 0;
|
|
260
|
+
}
|
|
156
261
|
`;
|
|
157
262
|
exports.ItemWrapper = styled_1.styled.div `
|
|
158
263
|
display: flex;
|
|
159
264
|
flex-direction: column;
|
|
265
|
+
|
|
266
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
267
|
+
width: 100%;
|
|
268
|
+
}
|
|
269
|
+
`;
|
|
270
|
+
exports.StyledCollapse = (0, styled_1.styled)(Collapse_1.Collapse) `
|
|
271
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
272
|
+
display: none;
|
|
273
|
+
}
|
|
160
274
|
`;
|
|
@@ -67,4 +67,22 @@ export type TreeItemProps<TComponent extends ElementType = ElementType> = {
|
|
|
67
67
|
* Функция, которая запускается при нажатии на элемент списка.
|
|
68
68
|
*/
|
|
69
69
|
onClick?: (event: SyntheticEvent) => void;
|
|
70
|
+
/**
|
|
71
|
+
* Содержимое родителя в шапке мобильной панели.
|
|
72
|
+
* По умолчанию используется `label` / `renderItem`.
|
|
73
|
+
*/
|
|
74
|
+
mobileHeaderLabel?: ReactNode;
|
|
75
|
+
/**
|
|
76
|
+
* Элемент справа от родителя в шапке мобильной панели.
|
|
77
|
+
*/
|
|
78
|
+
mobileHeaderControl?: ReactNode;
|
|
79
|
+
/**
|
|
80
|
+
* Дополнительное содержимое под родителем в шапке мобильной панели.
|
|
81
|
+
*/
|
|
82
|
+
mobileHeaderAdditionalContent?: ReactNode;
|
|
83
|
+
/**
|
|
84
|
+
* Вызывается при открытии и закрытии мобильной панели вложенных элементов.
|
|
85
|
+
* На десктопе не вызывается: там список раскрывается через Collapse.
|
|
86
|
+
*/
|
|
87
|
+
onMobilePanelOpenChange?: (isOpen: boolean) => void;
|
|
70
88
|
} & Omit<ComponentProps<TComponent>, ''>;
|
|
@@ -1,22 +1,36 @@
|
|
|
1
|
-
import { type MouseEvent, type SyntheticEvent } from 'react';
|
|
1
|
+
import { type CSSProperties, type MouseEvent, type SyntheticEvent } from 'react';
|
|
2
2
|
import { type TreeItemProps } from '../types';
|
|
3
|
-
type UseLogicProps = TreeItemProps
|
|
4
|
-
export declare const useLogic: ({ id, prefixId, isDefaultExpanded, isForceExpanded, isDisabled, disabledReason, onClick, }: UseLogicProps) => {
|
|
3
|
+
type UseLogicProps = Omit<TreeItemProps, 'ref'>;
|
|
4
|
+
export declare const useLogic: ({ id, prefixId, label, note, renderItem, mobileHeaderLabel, mobileHeaderControl, mobileHeaderAdditionalContent, isDefaultExpanded, isForceExpanded, isDisabled, isSelected, disabledReason, level, onClick, onMobilePanelOpenChange, }: UseLogicProps) => {
|
|
5
5
|
isOpen: boolean;
|
|
6
|
+
isMobileOpen: boolean;
|
|
7
|
+
isMobile: boolean;
|
|
6
8
|
handleToggle: (event: MouseEvent<HTMLElement>) => void;
|
|
7
|
-
|
|
9
|
+
handleClose: (event: MouseEvent<HTMLElement>) => void;
|
|
10
|
+
handleClick: (event: SyntheticEvent<HTMLDivElement>) => any;
|
|
11
|
+
itemCssVars: CSSProperties;
|
|
8
12
|
itemProps: {
|
|
9
13
|
id: any;
|
|
10
14
|
};
|
|
11
15
|
itemContentProps: {
|
|
12
16
|
tabIndex: number;
|
|
13
|
-
onClick: (event: SyntheticEvent<HTMLDivElement>) =>
|
|
14
|
-
onKeyDown: (event: SyntheticEvent<HTMLDivElement>) =>
|
|
17
|
+
onClick: (event: SyntheticEvent<HTMLDivElement>) => any;
|
|
18
|
+
onKeyDown: (event: SyntheticEvent<HTMLDivElement>) => any;
|
|
15
19
|
};
|
|
16
20
|
tooltipProps: {
|
|
17
|
-
title:
|
|
21
|
+
title: any;
|
|
18
22
|
withoutContainer: boolean;
|
|
19
23
|
disableInteractive: boolean;
|
|
20
24
|
};
|
|
25
|
+
mobileSlidePanelProps: {
|
|
26
|
+
id: any;
|
|
27
|
+
parentLabel: any;
|
|
28
|
+
parentNote: any;
|
|
29
|
+
parentControl: any;
|
|
30
|
+
parentAdditionalContent: any;
|
|
31
|
+
isParentSelected: any;
|
|
32
|
+
isParentDisabled: any;
|
|
33
|
+
onParentClick: any;
|
|
34
|
+
};
|
|
21
35
|
};
|
|
22
36
|
export {};
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useLogic = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const useViewportType_1 = require("../../../useViewportType");
|
|
6
|
+
const useLogic = ({ id, prefixId, label, note, renderItem, mobileHeaderLabel, mobileHeaderControl, mobileHeaderAdditionalContent, isDefaultExpanded = false, isForceExpanded, isDisabled, isSelected, disabledReason, level = 0, onClick, onMobilePanelOpenChange, }) => {
|
|
7
|
+
const { isMobile } = (0, useViewportType_1.useViewportType)();
|
|
6
8
|
const [isOpen, setOpen] = (0, react_1.useState)(isDefaultExpanded);
|
|
9
|
+
const [isMobileOpen, setMobileOpen] = (0, react_1.useState)(false);
|
|
7
10
|
(0, react_1.useEffect)(() => {
|
|
8
11
|
setOpen(isDefaultExpanded);
|
|
9
12
|
}, []);
|
|
@@ -26,14 +29,39 @@ const useLogic = ({ id, prefixId, isDefaultExpanded = false, isForceExpanded, is
|
|
|
26
29
|
};
|
|
27
30
|
const handleToggle = (event) => {
|
|
28
31
|
event.stopPropagation();
|
|
32
|
+
if (isMobile) {
|
|
33
|
+
const nextState = !isMobileOpen;
|
|
34
|
+
setMobileOpen(nextState);
|
|
35
|
+
onMobilePanelOpenChange?.(nextState);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
29
38
|
setOpen((currentState) => !currentState);
|
|
30
39
|
};
|
|
40
|
+
const handleClose = (event) => {
|
|
41
|
+
event.stopPropagation();
|
|
42
|
+
setMobileOpen(false);
|
|
43
|
+
onMobilePanelOpenChange?.(false);
|
|
44
|
+
};
|
|
31
45
|
const idAttr = prefixId ? `${prefixId}${id}` : id;
|
|
32
46
|
const tabIndex = isDisabled ? -1 : 0;
|
|
47
|
+
const itemCssVars = { '--tree-item-level': level };
|
|
48
|
+
const parentLabel = (0, react_1.useMemo)(() => {
|
|
49
|
+
if (mobileHeaderLabel != null) {
|
|
50
|
+
return mobileHeaderLabel;
|
|
51
|
+
}
|
|
52
|
+
if (renderItem) {
|
|
53
|
+
return renderItem({ label, note, id });
|
|
54
|
+
}
|
|
55
|
+
return label;
|
|
56
|
+
}, [mobileHeaderLabel, renderItem, label, note, id]);
|
|
33
57
|
return {
|
|
34
58
|
isOpen,
|
|
59
|
+
isMobileOpen,
|
|
60
|
+
isMobile,
|
|
35
61
|
handleToggle,
|
|
62
|
+
handleClose,
|
|
36
63
|
handleClick,
|
|
64
|
+
itemCssVars,
|
|
37
65
|
itemProps: {
|
|
38
66
|
id: idAttr,
|
|
39
67
|
},
|
|
@@ -47,6 +75,16 @@ const useLogic = ({ id, prefixId, isDefaultExpanded = false, isForceExpanded, is
|
|
|
47
75
|
withoutContainer: !isDisabled,
|
|
48
76
|
disableInteractive: true,
|
|
49
77
|
},
|
|
78
|
+
mobileSlidePanelProps: {
|
|
79
|
+
id,
|
|
80
|
+
parentLabel,
|
|
81
|
+
parentNote: note,
|
|
82
|
+
parentControl: mobileHeaderControl,
|
|
83
|
+
parentAdditionalContent: mobileHeaderAdditionalContent,
|
|
84
|
+
isParentSelected: isSelected,
|
|
85
|
+
isParentDisabled: isDisabled,
|
|
86
|
+
onParentClick: onClick,
|
|
87
|
+
},
|
|
50
88
|
};
|
|
51
89
|
};
|
|
52
90
|
exports.useLogic = useLogic;
|