@candy.thieves/ui-kit-lumos 0.0.11 → 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.
@@ -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,6 @@
1
+ type Props = {
2
+ orientation?: 'both' | 'horizontal' | 'vertical';
3
+ children?: React.ReactNode;
4
+ };
5
+ export declare const Scroll: ({ orientation, children }: Props) => import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Scroll';
@@ -0,0 +1,18 @@
1
+ import type { ReactNode } from 'react';
2
+ export type SidebarItem = {
3
+ activeIcon?: ReactNode;
4
+ disabled?: boolean;
5
+ href?: string;
6
+ icon: ReactNode;
7
+ id: string;
8
+ label: string;
9
+ };
10
+ type Props = {
11
+ activeId: string;
12
+ items: SidebarItem[];
13
+ logOutIcon: ReactNode;
14
+ onLogout: () => void;
15
+ onValueChange?: (id: string) => void;
16
+ };
17
+ export declare const Sidebar: ({ items, activeId, onValueChange, onLogout, logOutIcon }: Props) => import("react").JSX.Element;
18
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Sidebar';
@@ -7,6 +7,7 @@ export * from './CircularProgress';
7
7
  export * from './Input';
8
8
  export * from './LinearProgress';
9
9
  export * from './Message';
10
+ export * from './Modal';
10
11
  export * from './PasswordInput';
11
12
  export * from './RadioGroup';
12
13
  export * from './ReadMore';
@@ -0,0 +1 @@
1
+ export type { VerticalMetrics, HorizontalMetrics } from './scroll.types.ts';
@@ -0,0 +1,10 @@
1
+ export type VerticalMetrics = {
2
+ thumbHeight: number;
3
+ maxThumbOffsetY: number;
4
+ maxScrollOffsetY: number;
5
+ };
6
+ export type HorizontalMetrics = {
7
+ thumbWidth: number;
8
+ maxThumbOffsetX: number;
9
+ maxScrollOffsetX: number;
10
+ };
@@ -0,0 +1,2 @@
1
+ export * from './useScrollThumbs';
2
+ export * from './useThumbDrag';
@@ -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';
@@ -0,0 +1,2 @@
1
+ import type { HorizontalMetrics } from '@/components/types';
2
+ export declare const getHorizontalMetrics: (viewport: HTMLDivElement) => HorizontalMetrics | null;
@@ -0,0 +1,2 @@
1
+ import type { VerticalMetrics } from '@/components/types';
2
+ export declare const getVerticalMetrics: (viewport: HTMLDivElement) => null | VerticalMetrics;
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.11",
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}": [