@sellgar/kit 0.0.102 → 0.0.104

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sellgar/kit",
3
3
  "type": "module",
4
- "version": "0.0.102",
4
+ "version": "0.0.104",
5
5
  "description": "Storybook",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@floating-ui/dom": "1.6.13",
37
- "@floating-ui/react": "0.27.6",
37
+ "@floating-ui/react": "0.27.7",
38
38
  "@react-input/mask": "2.0.4",
39
39
  "@react-input/number-format": "2.0.3",
40
40
  "@types/react-slider": "1.3.6",
@@ -61,9 +61,9 @@
61
61
  "devDependencies": {
62
62
  "@vitejs/plugin-react": "4.3.4",
63
63
  "typescript": "5.8.3",
64
- "vite": "6.2.5",
64
+ "vite": "6.2.6",
65
65
  "vite-plugin-dts": "4.5.3",
66
- "vite-plugin-lib-inject-css": "2.2.1",
66
+ "vite-plugin-lib-inject-css": "2.2.2",
67
67
  "vite-plugin-webfont-dl": "3.10.4"
68
68
  },
69
69
  "bugs": {
@@ -0,0 +1 @@
1
+ export { Modal, useModalContext } from './modal.tsx';
@@ -0,0 +1,106 @@
1
+ import { default as React } from 'react';
2
+ interface IProps {
3
+ open?: boolean;
4
+ initialOpen?: boolean;
5
+ onOpen?(): void;
6
+ onClose?(): void;
7
+ }
8
+ export declare function useDialog({ initialOpen, open: controlledOpen, onOpen, onClose }?: IProps): {
9
+ placement: import('@floating-ui/utils').Placement;
10
+ strategy: import('@floating-ui/utils').Strategy;
11
+ middlewareData: import('@floating-ui/core').MiddlewareData;
12
+ x: number;
13
+ y: number;
14
+ isPositioned: boolean;
15
+ update: () => void;
16
+ floatingStyles: React.CSSProperties;
17
+ refs: {
18
+ reference: React.MutableRefObject<import('@floating-ui/react-dom').ReferenceType | null>;
19
+ floating: React.MutableRefObject<HTMLElement | null>;
20
+ setReference: (node: import('@floating-ui/react-dom').ReferenceType | null) => void;
21
+ setFloating: (node: HTMLElement | null) => void;
22
+ } & import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>;
23
+ elements: {
24
+ reference: import('@floating-ui/react-dom').ReferenceType | null;
25
+ floating: HTMLElement | null;
26
+ } & import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
27
+ context: {
28
+ update: () => void;
29
+ placement: import('@floating-ui/utils').Placement;
30
+ strategy: import('@floating-ui/utils').Strategy;
31
+ x: number;
32
+ y: number;
33
+ middlewareData: import('@floating-ui/core').MiddlewareData;
34
+ isPositioned: boolean;
35
+ floatingStyles: React.CSSProperties;
36
+ open: boolean;
37
+ onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void;
38
+ events: import('@floating-ui/react').FloatingEvents;
39
+ dataRef: React.MutableRefObject<import('@floating-ui/react').ContextData>;
40
+ nodeId: string | undefined;
41
+ floatingId: string | undefined;
42
+ refs: import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>;
43
+ elements: import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
44
+ };
45
+ getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
46
+ getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
47
+ getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
48
+ active?: boolean;
49
+ selected?: boolean;
50
+ }) => Record<string, unknown>;
51
+ open: boolean;
52
+ onOpen: (() => void) | undefined;
53
+ onClose: (() => void) | undefined;
54
+ };
55
+ export declare const useModalContext: () => {
56
+ placement: import('@floating-ui/utils').Placement;
57
+ strategy: import('@floating-ui/utils').Strategy;
58
+ middlewareData: import('@floating-ui/core').MiddlewareData;
59
+ x: number;
60
+ y: number;
61
+ isPositioned: boolean;
62
+ update: () => void;
63
+ floatingStyles: React.CSSProperties;
64
+ refs: {
65
+ reference: React.MutableRefObject<import('@floating-ui/react-dom').ReferenceType | null>;
66
+ floating: React.MutableRefObject<HTMLElement | null>;
67
+ setReference: (node: import('@floating-ui/react-dom').ReferenceType | null) => void;
68
+ setFloating: (node: HTMLElement | null) => void;
69
+ } & import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>;
70
+ elements: {
71
+ reference: import('@floating-ui/react-dom').ReferenceType | null;
72
+ floating: HTMLElement | null;
73
+ } & import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
74
+ context: {
75
+ update: () => void;
76
+ placement: import('@floating-ui/utils').Placement;
77
+ strategy: import('@floating-ui/utils').Strategy;
78
+ x: number;
79
+ y: number;
80
+ middlewareData: import('@floating-ui/core').MiddlewareData;
81
+ isPositioned: boolean;
82
+ floatingStyles: React.CSSProperties;
83
+ open: boolean;
84
+ onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void;
85
+ events: import('@floating-ui/react').FloatingEvents;
86
+ dataRef: React.MutableRefObject<import('@floating-ui/react').ContextData>;
87
+ nodeId: string | undefined;
88
+ floatingId: string | undefined;
89
+ refs: import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>;
90
+ elements: import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
91
+ };
92
+ getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
93
+ getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
94
+ getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
95
+ active?: boolean;
96
+ selected?: boolean;
97
+ }) => Record<string, unknown>;
98
+ open: boolean;
99
+ onOpen: (() => void) | undefined;
100
+ onClose: (() => void) | undefined;
101
+ };
102
+ export declare const Dialog: React.FC<React.PropsWithChildren<IProps>>;
103
+ export declare const DialogContent: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
104
+ export declare const DialogClose: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
105
+ export declare const Modal: React.FC<React.PropsWithChildren<IProps>>;
106
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ export interface IProps {
3
+ leadIcon?: React.ReactNode;
4
+ caption: string;
5
+ state?: 'default' | 'info' | 'success' | 'destructive';
6
+ }
7
+ export declare const Caption: React.FC<IProps>;
@@ -0,0 +1,2 @@
1
+ export { Caption } from './caption.tsx';
2
+ export type { IProps as ICaptionProps } from './caption.tsx';
@@ -11,8 +11,8 @@ export * from './input-mask';
11
11
  export * from './input-numeral';
12
12
  export * from './input-select';
13
13
  export * from './textarea';
14
- export * from './label-field';
15
- export * from './caption-field';
14
+ export * from './label';
15
+ export * from './caption';
16
16
  export * from './accordion';
17
17
  export * from './avatar';
18
18
  export * from './chip';
@@ -23,7 +23,6 @@ export * from './calendar';
23
23
  export * from './quantity-stepper';
24
24
  export * from './breadcrumb';
25
25
  export * from './notification';
26
- export * from './modal';
27
26
  export * from './select';
28
27
  export * from './select-tree';
29
28
  export * from './datepicker';
@@ -0,0 +1,2 @@
1
+ export { Label } from './label.tsx';
2
+ export type { IProps as ILabelProps } from './label.tsx';
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ export interface IProps {
3
+ label: string;
4
+ caption?: string;
5
+ required?: boolean;
6
+ }
7
+ export declare const Label: React.FC<IProps>;
package/types/index.d.ts CHANGED
@@ -3,4 +3,5 @@ export * from './components/symbols';
3
3
  export * from './components/wrappers';
4
4
  export * from './subcomponents';
5
5
  export * from './components/helpers/animate';
6
+ export * from './components/modal';
6
7
  export * from './components/table';