@okam/stack-ui 1.12.1 → 1.13.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/Button/index.d.ts +2 -1
- package/components/Button/interface.d.ts +4 -0
- package/components/Menu/components/MenuItems.d.ts +3 -0
- package/components/Menu/components/TabContainer.d.ts +3 -0
- package/components/Menu/index.d.ts +3 -0
- package/components/Menu/interface.d.ts +27 -0
- package/components/Popover/interface.d.ts +3 -3
- package/components/SidePanel/interface.d.ts +2 -0
- package/components/TabList/components/TabPanel/TabPanel.d.ts +4 -0
- package/components/TabList/interface.d.ts +18 -0
- package/index.d.ts +6 -0
- package/index.js +9 -6
- package/index.mjs +2857 -1253
- package/package.json +6 -2
- package/providers/Menu/index.d.ts +4 -0
- package/providers/Menu/interface.d.ts +28 -0
- package/providers/SidePanel/index.d.ts +1 -1
- package/providers/SidePanel/interface.d.ts +3 -0
- package/providers/Theme/interface.d.ts +3 -2
- package/transitions/RenderWithOpacity.d.ts +7 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okam/stack-ui",
|
|
3
3
|
"main": "./index.js",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.13.0",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -23,16 +23,20 @@
|
|
|
23
23
|
"@react-aria/focus": "^3.6.1",
|
|
24
24
|
"@react-aria/i18n": "^3.8.1",
|
|
25
25
|
"@react-aria/overlays": "3.17.0",
|
|
26
|
+
"@react-aria/tabs": "3.7.0",
|
|
26
27
|
"@react-aria/utils": "3.20.0",
|
|
27
28
|
"@react-aria/visually-hidden": "3.8.4",
|
|
28
29
|
"@react-stately/calendar": "3.4.0",
|
|
30
|
+
"@react-stately/collections": "3.10.1",
|
|
29
31
|
"@react-stately/datepicker": "3.7.0",
|
|
30
32
|
"@react-stately/overlays": "3.6.2",
|
|
31
33
|
"@react-stately/radio": "3.9.0",
|
|
34
|
+
"@react-stately/tabs": "3.6.0",
|
|
32
35
|
"@react-stately/toggle": "3.6.2",
|
|
33
36
|
"@react-types/dialog": "3.5.5",
|
|
34
37
|
"@react-types/radio": "3.5.1",
|
|
35
38
|
"@react-types/shared": "3.19.0",
|
|
39
|
+
"@react-types/tabs": "3.3.2",
|
|
36
40
|
"@tsed/exceptions": "^6.100.3",
|
|
37
41
|
"dequal": "^2.0.0",
|
|
38
42
|
"isomorphic-dompurify": "0.26.0",
|
|
@@ -45,7 +49,7 @@
|
|
|
45
49
|
"react-div-100vh": "0.7.0",
|
|
46
50
|
"react-hook-form": "7.43.0",
|
|
47
51
|
"react-i18next": "12.1.5",
|
|
48
|
-
"react-spring": "9.
|
|
52
|
+
"react-spring": "^9.7.3",
|
|
49
53
|
"react-stately": "^3.24.0",
|
|
50
54
|
"tailwind-variants": "^0.1.8",
|
|
51
55
|
"unlazy": "^0.10.2",
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { IMenuProviderProps, TMenuContext } from './interface';
|
|
3
|
+
export declare const useMenu: () => TMenuContext, MenuProvider: import("react").Provider<TMenuContext | undefined>;
|
|
4
|
+
export declare function MenuContextProvider({ children, defaultSelectedKey, defaultIsOpen, onCloseCallback, onOpenCallback, tabs, openBtn, closeBtn, ...rest }: IMenuProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { CollectionChildren } from '@react-types/shared';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { AriaTabListProps } from 'react-aria';
|
|
4
|
+
import type { TabListState } from 'react-stately';
|
|
5
|
+
export type TMenuProviderProps = {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
tabs?: CollectionChildren<object>;
|
|
8
|
+
defaultSelectedKey: string;
|
|
9
|
+
defaultIsOpen?: boolean;
|
|
10
|
+
onCloseCallback?: () => void;
|
|
11
|
+
onOpenCallback?: () => void;
|
|
12
|
+
openBtn?: () => JSX.Element;
|
|
13
|
+
closeBtn?: () => JSX.Element;
|
|
14
|
+
secondaryOpenBtn?: () => JSX.Element;
|
|
15
|
+
};
|
|
16
|
+
export type IMenuProviderProps = AriaTabListProps<TMenuProviderProps> & TMenuProviderProps;
|
|
17
|
+
export type TMenuContext = {
|
|
18
|
+
openBtn?: () => JSX.Element;
|
|
19
|
+
closeBtn?: () => JSX.Element;
|
|
20
|
+
secondaryOpenBtn?: () => JSX.Element;
|
|
21
|
+
tabState: TabListState<object>;
|
|
22
|
+
defaultSelectedKey: string;
|
|
23
|
+
};
|
|
24
|
+
export type TMenuProps = {
|
|
25
|
+
openBtn?: () => JSX.Element;
|
|
26
|
+
closeBtn?: () => JSX.Element;
|
|
27
|
+
secondaryOpenBtn?: () => JSX.Element;
|
|
28
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { TSidePanelContext, TSidePanelProviderProps } from './interface';
|
|
2
2
|
declare const useSidePanel: () => TSidePanelContext;
|
|
3
3
|
export { useSidePanel };
|
|
4
|
-
export declare function SidePanelContextProvider({ children, defaultSelectedKey }: TSidePanelProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function SidePanelContextProvider({ children, defaultSelectedKey, onOpenCallback, onCloseCallback, defaultIsOpen, }: TSidePanelProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,9 @@ import type React from 'react';
|
|
|
3
3
|
export type TSidePanelProviderProps = {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
defaultSelectedKey: string;
|
|
6
|
+
defaultIsOpen?: boolean;
|
|
7
|
+
onOpenCallback?: () => void;
|
|
8
|
+
onCloseCallback?: () => void;
|
|
6
9
|
};
|
|
7
10
|
export type TButtonProps = {
|
|
8
11
|
closeButtonProps: React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
@@ -2,8 +2,9 @@ import type React from 'react';
|
|
|
2
2
|
export type TStyleValue = false | string;
|
|
3
3
|
export type TToken = Record<string, string | boolean>;
|
|
4
4
|
export type TFunc = (props: TToken) => TStyleValue[] | string;
|
|
5
|
-
export type
|
|
6
|
-
|
|
5
|
+
export type TTheme = {
|
|
6
|
+
[key: string]: TFunc | TTheme;
|
|
7
|
+
};
|
|
7
8
|
export type TStyle = Record<string, TStyleValue>;
|
|
8
9
|
export type TCustomTheme = TStyleValue | null | undefined;
|
|
9
10
|
export type TStyleCollection = Record<string, TStyle>;
|