@candy.thieves/ui-kit-lumos 0.0.12 → 0.0.13
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/dist/index.css +1 -1
- package/dist/index.js +627 -590
- package/dist/index.js.map +1 -1
- package/dist/types/components/Modal/Modal.d.ts +25 -0
- package/dist/types/components/Modal/index.d.ts +1 -0
- package/dist/types/components/Scroll/Scroll.d.ts +6 -0
- package/dist/types/components/Scroll/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/types/index.d.ts +1 -0
- package/dist/types/components/types/scroll.types.d.ts +10 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/useScrollThumbs.d.ts +9 -0
- package/dist/types/hooks/useThumbDrag.d.ts +9 -0
- package/dist/types/types/types.d.ts +1 -0
- package/dist/types/utils/getHorizontalMetrics.d.ts +2 -0
- package/dist/types/utils/getVerticalMetrics.d.ts +2 -0
- package/package.json +5 -4
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as Dialog from '@radix-ui/react-dialog';
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
3
|
+
import type { ModalSize } from '@/types';
|
|
4
|
+
export type ModalProps = {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
size?: ModalSize;
|
|
8
|
+
modalTitle?: ReactNode;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
showHeader?: boolean;
|
|
11
|
+
showCloseButton?: boolean;
|
|
12
|
+
fullSize?: boolean;
|
|
13
|
+
closeButtonOutside?: boolean;
|
|
14
|
+
} & Omit<ComponentPropsWithoutRef<typeof Dialog.Content>, 'children'>;
|
|
15
|
+
export declare const Modal: import("react").ForwardRefExoticComponent<{
|
|
16
|
+
open: boolean;
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
size?: ModalSize;
|
|
19
|
+
modalTitle?: ReactNode;
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
showHeader?: boolean;
|
|
22
|
+
showCloseButton?: boolean;
|
|
23
|
+
fullSize?: boolean;
|
|
24
|
+
closeButtonOutside?: boolean;
|
|
25
|
+
} & Omit<Omit<Dialog.DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "children"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Modal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Scroll';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { VerticalMetrics, HorizontalMetrics } from './scroll.types.ts';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
type UseScrollThumbsParams = {
|
|
3
|
+
viewportRef: RefObject<HTMLDivElement | null>;
|
|
4
|
+
contentRef: RefObject<HTMLDivElement | null>;
|
|
5
|
+
verticalThumbRef: RefObject<HTMLDivElement | null>;
|
|
6
|
+
horizontalThumbRef: RefObject<HTMLDivElement | null>;
|
|
7
|
+
};
|
|
8
|
+
export declare const useScrollThumbs: ({ viewportRef, contentRef, verticalThumbRef, horizontalThumbRef, }: UseScrollThumbsParams) => void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
type UseThumbDragParams = {
|
|
3
|
+
viewportRef: RefObject<HTMLDivElement | null>;
|
|
4
|
+
};
|
|
5
|
+
export declare const useThumbDrag: ({ viewportRef }: UseThumbDragParams) => {
|
|
6
|
+
handleVerticalMouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
7
|
+
handleHorizontalMouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -2,3 +2,4 @@ export type ProgressThemeColor = 'error' | 'inherit' | 'primary' | 'success' | '
|
|
|
2
2
|
export type ProgressSizeVariant = 'lg' | 'md' | 'sm';
|
|
3
3
|
export type AvatarSize = 'l' | 'm' | 's' | 'xs';
|
|
4
4
|
export type MainAvatarSize = 'xl' | 'xxl';
|
|
5
|
+
export type ModalSize = 'l' | 'm' | 's' | 'xl' | 'xs';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@candy.thieves/ui-kit-lumos",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -28,9 +28,10 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@fontsource-variable/inter": "^5.3.0",
|
|
30
30
|
"@fontsource-variable/roboto": "^5.3.0",
|
|
31
|
-
"@radix-ui/react-tabs": "^1.1.18",
|
|
32
31
|
"@radix-ui/react-checkbox": "^1.3.8",
|
|
32
|
+
"@radix-ui/react-dialog": "^1.1.23",
|
|
33
33
|
"@radix-ui/react-radio-group": "^1.4.5",
|
|
34
|
+
"@radix-ui/react-tabs": "^1.1.18",
|
|
34
35
|
"@radix-ui/react-tooltip": "^1.2.16",
|
|
35
36
|
"@radix-ui/themes": "^3.3.0",
|
|
36
37
|
"clsx": "^2.1.1",
|
|
@@ -74,14 +75,14 @@
|
|
|
74
75
|
"lint-staged": "^17.1.0",
|
|
75
76
|
"playwright": "^1.61.1",
|
|
76
77
|
"prettier": "3.9.5",
|
|
78
|
+
"react-hook-form": "^7.82.0",
|
|
77
79
|
"sass": "^1.101.0",
|
|
78
80
|
"storybook": "^10.5.2",
|
|
79
81
|
"stylelint": "^17.14.0",
|
|
80
82
|
"typescript": "~6.0.2",
|
|
81
83
|
"typescript-eslint": "^8.62.0",
|
|
82
84
|
"vite": "^8.1.1",
|
|
83
|
-
"vitest": "^4.1.10"
|
|
84
|
-
"react-hook-form": "^7.82.0"
|
|
85
|
+
"vitest": "^4.1.10"
|
|
85
86
|
},
|
|
86
87
|
"lint-staged": {
|
|
87
88
|
"**/*.{jsx,js,tsx,ts}": [
|