@salt-ds/lab 1.0.0-alpha.60 → 1.0.0-alpha.62
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/CHANGELOG.md +93 -0
- package/css/salt-lab.css +185 -1
- package/dist-cjs/date-picker/DatePickerRangeInput.js +1 -0
- package/dist-cjs/date-picker/DatePickerRangeInput.js.map +1 -1
- package/dist-cjs/date-picker/DatePickerSingleInput.js +1 -0
- package/dist-cjs/date-picker/DatePickerSingleInput.js.map +1 -1
- package/dist-cjs/index.js +6 -0
- package/dist-cjs/index.js.map +1 -1
- package/dist-cjs/splitter/SplitHandle.css.js +6 -0
- package/dist-cjs/splitter/SplitHandle.css.js.map +1 -0
- package/dist-cjs/splitter/SplitHandle.js +60 -0
- package/dist-cjs/splitter/SplitHandle.js.map +1 -0
- package/dist-cjs/splitter/SplitPanel.css.js +6 -0
- package/dist-cjs/splitter/SplitPanel.css.js.map +1 -0
- package/dist-cjs/splitter/SplitPanel.js +37 -0
- package/dist-cjs/splitter/SplitPanel.js.map +1 -0
- package/dist-cjs/splitter/Splitter.js +31 -0
- package/dist-cjs/splitter/Splitter.js.map +1 -0
- package/dist-cjs/splitter/utils.js +18 -0
- package/dist-cjs/splitter/utils.js.map +1 -0
- package/dist-cjs/stepped-tracker/stepReducer.js +127 -81
- package/dist-cjs/stepped-tracker/stepReducer.js.map +1 -1
- package/dist-cjs/stepped-tracker/useStepReducer.js +6 -4
- package/dist-cjs/stepped-tracker/useStepReducer.js.map +1 -1
- package/dist-cjs/stepped-tracker/utils.js +44 -9
- package/dist-cjs/stepped-tracker/utils.js.map +1 -1
- package/dist-cjs/stepper-input/StepperInput.js +6 -5
- package/dist-cjs/stepper-input/StepperInput.js.map +1 -1
- package/dist-cjs/tabs-next/TabListNext.css.js +1 -1
- package/dist-cjs/tabs-next/TabListNext.js +10 -16
- package/dist-cjs/tabs-next/TabListNext.js.map +1 -1
- package/dist-cjs/tabs-next/TabOverflowList.js +1 -1
- package/dist-cjs/tabs-next/TabOverflowList.js.map +1 -1
- package/dist-cjs/tabs-next/TabsNext.js +4 -51
- package/dist-cjs/tabs-next/TabsNext.js.map +1 -1
- package/dist-cjs/tabs-next/TabsNextContext.js +1 -1
- package/dist-cjs/tabs-next/TabsNextContext.js.map +1 -1
- package/dist-cjs/tabs-next/hooks/useCollection.js.map +1 -1
- package/dist-cjs/tabs-next/hooks/useOverflow.js +48 -5
- package/dist-cjs/tabs-next/hooks/useOverflow.js.map +1 -1
- package/dist-cjs/tabs-next/hooks/useRestoreActiveTab.js +93 -0
- package/dist-cjs/tabs-next/hooks/useRestoreActiveTab.js.map +1 -0
- package/dist-es/date-picker/DatePickerRangeInput.js +1 -0
- package/dist-es/date-picker/DatePickerRangeInput.js.map +1 -1
- package/dist-es/date-picker/DatePickerSingleInput.js +1 -0
- package/dist-es/date-picker/DatePickerSingleInput.js.map +1 -1
- package/dist-es/index.js +3 -0
- package/dist-es/index.js.map +1 -1
- package/dist-es/splitter/SplitHandle.css.js +4 -0
- package/dist-es/splitter/SplitHandle.css.js.map +1 -0
- package/dist-es/splitter/SplitHandle.js +58 -0
- package/dist-es/splitter/SplitHandle.js.map +1 -0
- package/dist-es/splitter/SplitPanel.css.js +4 -0
- package/dist-es/splitter/SplitPanel.css.js.map +1 -0
- package/dist-es/splitter/SplitPanel.js +35 -0
- package/dist-es/splitter/SplitPanel.js.map +1 -0
- package/dist-es/splitter/Splitter.js +27 -0
- package/dist-es/splitter/Splitter.js.map +1 -0
- package/dist-es/splitter/utils.js +15 -0
- package/dist-es/splitter/utils.js.map +1 -0
- package/dist-es/stepped-tracker/stepReducer.js +128 -82
- package/dist-es/stepped-tracker/stepReducer.js.map +1 -1
- package/dist-es/stepped-tracker/useStepReducer.js +7 -5
- package/dist-es/stepped-tracker/useStepReducer.js.map +1 -1
- package/dist-es/stepped-tracker/utils.js +43 -9
- package/dist-es/stepped-tracker/utils.js.map +1 -1
- package/dist-es/stepper-input/StepperInput.js +6 -5
- package/dist-es/stepper-input/StepperInput.js.map +1 -1
- package/dist-es/tabs-next/TabListNext.css.js +1 -1
- package/dist-es/tabs-next/TabListNext.js +11 -17
- package/dist-es/tabs-next/TabListNext.js.map +1 -1
- package/dist-es/tabs-next/TabOverflowList.js +1 -1
- package/dist-es/tabs-next/TabOverflowList.js.map +1 -1
- package/dist-es/tabs-next/TabsNext.js +5 -52
- package/dist-es/tabs-next/TabsNext.js.map +1 -1
- package/dist-es/tabs-next/TabsNextContext.js +1 -1
- package/dist-es/tabs-next/TabsNextContext.js.map +1 -1
- package/dist-es/tabs-next/hooks/useCollection.js.map +1 -1
- package/dist-es/tabs-next/hooks/useOverflow.js +49 -6
- package/dist-es/tabs-next/hooks/useOverflow.js.map +1 -1
- package/dist-es/tabs-next/hooks/useRestoreActiveTab.js +91 -0
- package/dist-es/tabs-next/hooks/useRestoreActiveTab.js.map +1 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/splitter/SplitHandle.d.ts +21 -0
- package/dist-types/splitter/SplitPanel.d.ts +10 -0
- package/dist-types/splitter/Splitter.d.ts +22 -0
- package/dist-types/splitter/index.d.ts +4 -0
- package/dist-types/splitter/utils.d.ts +4 -0
- package/dist-types/stepped-tracker/Step.types.d.ts +2 -4
- package/dist-types/stepped-tracker/stepReducer.types.d.ts +6 -4
- package/dist-types/stepped-tracker/utils.d.ts +6 -3
- package/dist-types/tabs/drag-drop/drag-utils.d.ts +6 -6
- package/dist-types/tabs-next/TabsNextContext.d.ts +1 -1
- package/dist-types/tabs-next/hooks/useOverflow.d.ts +1 -1
- package/dist-types/tabs-next/hooks/useRestoreActiveTab.d.ts +10 -0
- package/package.json +5 -4
|
@@ -20,24 +20,24 @@ export declare type targetType = {
|
|
|
20
20
|
declare type Dimension = keyof Pick<DOMRect, "width" | "height">;
|
|
21
21
|
export declare const measureElementSizeAndPosition: (element: HTMLElement, dimension?: Dimension, includeAutoMargin?: boolean) => number[];
|
|
22
22
|
export declare const dimensions: (orientation: orientationType) => {
|
|
23
|
-
CLIENT_SIZE: "
|
|
23
|
+
CLIENT_SIZE: "scrollHeight" | "clientHeight" | "scrollWidth" | "clientWidth" | "scrollTop" | "scrollLeft";
|
|
24
24
|
CONTRA: "x" | "y" | "height" | "width" | "left" | "right" | "top" | "bottom";
|
|
25
25
|
CONTRA_POS: "clientX" | "clientY";
|
|
26
26
|
DIMENSION: "height" | "width";
|
|
27
27
|
END: "x" | "y" | "height" | "width" | "left" | "right" | "top" | "bottom";
|
|
28
28
|
POS: "clientX" | "clientY";
|
|
29
|
-
SCROLL_POS: "
|
|
30
|
-
SCROLL_SIZE: "
|
|
29
|
+
SCROLL_POS: "scrollHeight" | "clientHeight" | "scrollWidth" | "clientWidth" | "scrollTop" | "scrollLeft";
|
|
30
|
+
SCROLL_SIZE: "scrollHeight" | "clientHeight" | "scrollWidth" | "clientWidth" | "scrollTop" | "scrollLeft";
|
|
31
31
|
START: "x" | "y" | "height" | "width" | "left" | "right" | "top" | "bottom";
|
|
32
32
|
} | {
|
|
33
|
-
CLIENT_SIZE: "
|
|
33
|
+
CLIENT_SIZE: "scrollHeight" | "clientHeight" | "scrollWidth" | "clientWidth" | "scrollTop" | "scrollLeft";
|
|
34
34
|
CONTRA: "x" | "y" | "height" | "width" | "left" | "right" | "top" | "bottom";
|
|
35
35
|
CONTRA_POS: "clientX" | "clientY";
|
|
36
36
|
DIMENSION: "height" | "width";
|
|
37
37
|
END: "x" | "y" | "height" | "width" | "left" | "right" | "top" | "bottom";
|
|
38
38
|
POS: "clientX" | "clientY";
|
|
39
|
-
SCROLL_POS: "
|
|
40
|
-
SCROLL_SIZE: "
|
|
39
|
+
SCROLL_POS: "scrollHeight" | "clientHeight" | "scrollWidth" | "clientWidth" | "scrollTop" | "scrollLeft";
|
|
40
|
+
SCROLL_SIZE: "scrollHeight" | "clientHeight" | "scrollWidth" | "clientWidth" | "scrollTop" | "scrollLeft";
|
|
41
41
|
START: "x" | "y" | "height" | "width" | "left" | "right" | "top" | "bottom";
|
|
42
42
|
};
|
|
43
43
|
export declare const getDraggedItem: (measuredItems: MeasuredDropTarget[]) => MeasuredDropTarget;
|
|
@@ -13,7 +13,7 @@ export interface TabsNextContextValue extends Omit<ReturnType<typeof useCollecti
|
|
|
13
13
|
selected?: string;
|
|
14
14
|
setSelected: (event: SyntheticEvent, value: string) => void;
|
|
15
15
|
activeTab: MutableRefObject<Pick<Item, "id" | "value"> | undefined>;
|
|
16
|
-
|
|
16
|
+
removedActiveTabRef: MutableRefObject<string | undefined>;
|
|
17
17
|
menuOpen: boolean;
|
|
18
18
|
setMenuOpen: Dispatch<SetStateAction<boolean>>;
|
|
19
19
|
}
|
|
@@ -7,5 +7,5 @@ interface UseOverflowProps {
|
|
|
7
7
|
tabs: Item[];
|
|
8
8
|
overflowButton: RefObject<HTMLButtonElement>;
|
|
9
9
|
}
|
|
10
|
-
export declare function useOverflow({ tabs, container, overflowButton, children, selected, }: UseOverflowProps): readonly [(string | number | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | import("react").ReactPortal)[], (string | number | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | import("react").ReactPortal)[], false] | readonly [(string | number | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | import("react").ReactPortal)[], readonly [], true];
|
|
10
|
+
export declare function useOverflow({ tabs, container, overflowButton, children, selected, }: UseOverflowProps): readonly [(string | number | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | import("react").ReactPortal)[], (string | number | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | import("react").ReactPortal)[], false, import("react").MutableRefObject<number>] | readonly [(string | number | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | import("react").ReactPortal)[], readonly [], true, import("react").MutableRefObject<number>];
|
|
11
11
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type MutableRefObject, type RefObject } from "react";
|
|
2
|
+
import type { Item } from "./useCollection";
|
|
3
|
+
interface UseHandleRemovalProps {
|
|
4
|
+
container: RefObject<HTMLElement>;
|
|
5
|
+
tabs: Item[];
|
|
6
|
+
realSelectedIndex: RefObject<number>;
|
|
7
|
+
removedActiveTabRef: MutableRefObject<string | undefined>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useRestoreActiveTab({ container, tabs, realSelectedIndex, removedActiveTabRef, }: UseHandleRemovalProps): void;
|
|
10
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salt-ds/lab",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.62",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@floating-ui/react": "^0.26.28",
|
|
24
|
-
"@salt-ds/core": "^1.
|
|
25
|
-
"@salt-ds/date-adapters": "0.1.0-alpha.
|
|
26
|
-
"@salt-ds/icons": "^1.13.
|
|
24
|
+
"@salt-ds/core": "^1.42.0",
|
|
25
|
+
"@salt-ds/date-adapters": "0.1.0-alpha.3",
|
|
26
|
+
"@salt-ds/icons": "^1.13.2",
|
|
27
27
|
"@salt-ds/styles": "0.2.1",
|
|
28
28
|
"@salt-ds/window": "0.1.1",
|
|
29
29
|
"@types/react-window": "^1.8.2",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"deepmerge": "^4.2.2",
|
|
36
36
|
"no-scroll": "^2.1.1",
|
|
37
37
|
"react-color": "^2.19.3",
|
|
38
|
+
"react-resizable-panels": "^2.1.7",
|
|
38
39
|
"react-window": "^1.8.6",
|
|
39
40
|
"rifm": "^0.12.0",
|
|
40
41
|
"tabbable": "^6.0.0",
|