@tecsinapse/cortex-react 1.3.0-beta.1 → 1.3.0-beta.10
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/cjs/components/Calendar.js +1 -0
- package/dist/cjs/components/CalendarCell.js +1 -0
- package/dist/cjs/components/CalendarGrid.js +1 -0
- package/dist/cjs/components/DatePickerInput.js +1 -0
- package/dist/cjs/components/DatePickerInputBase.js +2 -2
- package/dist/cjs/components/DateRangePickerInput.js +1 -0
- package/dist/cjs/components/Divider.js +10 -0
- package/dist/cjs/components/Input/Box.js +32 -0
- package/dist/cjs/components/Input/Face.js +30 -0
- package/dist/cjs/components/Input/Left.js +12 -0
- package/dist/cjs/components/Input/Right.js +12 -0
- package/dist/cjs/components/Input/Root.js +13 -0
- package/dist/cjs/components/Input/Search.js +25 -0
- package/dist/cjs/components/Input/index.js +19 -0
- package/dist/cjs/components/Masonry.js +49 -0
- package/dist/cjs/components/Menubar/Categories.js +10 -0
- package/dist/cjs/components/Menubar/Category.js +11 -0
- package/dist/cjs/components/Menubar/Dropdown.js +23 -0
- package/dist/cjs/components/Menubar/DropdownRoot.js +38 -0
- package/dist/cjs/components/Menubar/Header.js +26 -0
- package/dist/cjs/components/Menubar/IconControlSubItem.js +19 -0
- package/dist/cjs/components/Menubar/Item.js +22 -0
- package/dist/cjs/components/Menubar/ItemLink.js +18 -0
- package/dist/cjs/components/Menubar/Left.js +11 -0
- package/dist/cjs/components/Menubar/MostUsed.js +11 -0
- package/dist/cjs/components/Menubar/MostUsedItem.js +31 -0
- package/dist/cjs/components/Menubar/MostUsedList.js +58 -0
- package/dist/cjs/components/Menubar/Right.js +11 -0
- package/dist/cjs/components/Menubar/Root.js +11 -0
- package/dist/cjs/components/Menubar/Search.js +21 -0
- package/dist/cjs/components/Menubar/SubItem.js +20 -0
- package/dist/cjs/components/Menubar/index.js +33 -0
- package/dist/cjs/components/Popover/Content.js +31 -0
- package/dist/cjs/components/Popover/Context.js +15 -0
- package/dist/cjs/components/Popover/Provider.js +19 -0
- package/dist/cjs/components/Popover/Root.js +14 -0
- package/dist/cjs/components/Popover/Trigger.js +11 -0
- package/dist/cjs/components/Popover/index.js +15 -0
- package/dist/cjs/components/RangeCalendar.js +1 -0
- package/dist/cjs/components/Select/Content.js +27 -0
- package/dist/cjs/components/Select/GroupedOptions.js +34 -0
- package/dist/cjs/components/Select/Option.js +25 -0
- package/dist/cjs/components/Select/Options.js +31 -0
- package/dist/cjs/components/Select/Popover.js +10 -0
- package/dist/cjs/components/Select/Root.js +24 -0
- package/dist/cjs/components/Select/Trigger.js +28 -0
- package/dist/cjs/components/Select/context.js +10 -0
- package/dist/cjs/components/Select/index.js +19 -0
- package/dist/cjs/components/TimeFieldInput.js +2 -2
- package/dist/cjs/components/Tooltip.js +54 -0
- package/dist/cjs/hooks/useFloatingLogic.js +53 -0
- package/dist/cjs/hooks/useOutsideClickListener.js +22 -0
- package/dist/cjs/index.js +16 -9
- package/dist/cjs/provider/MenubarProvider.js +22 -0
- package/dist/cjs/provider/SnackbarProvider.js +51 -0
- package/dist/cjs/service/SnackbarSonner.js +23 -2
- package/dist/cjs/styles/menubar.js +62 -0
- package/dist/esm/components/Calendar.js +1 -0
- package/dist/esm/components/CalendarCell.js +1 -0
- package/dist/esm/components/CalendarGrid.js +1 -0
- package/dist/esm/components/DatePickerInput.js +1 -0
- package/dist/esm/components/DatePickerInputBase.js +1 -1
- package/dist/esm/components/DateRangePickerInput.js +1 -0
- package/dist/esm/components/Divider.js +8 -0
- package/dist/esm/components/Input/Box.js +30 -0
- package/dist/esm/components/Input/Face.js +28 -0
- package/dist/esm/components/Input/Left.js +10 -0
- package/dist/esm/components/Input/Right.js +10 -0
- package/dist/esm/components/Input/Root.js +11 -0
- package/dist/esm/components/Input/Search.js +23 -0
- package/dist/esm/components/Input/index.js +17 -0
- package/dist/esm/components/Masonry.js +47 -0
- package/dist/esm/components/Menubar/Categories.js +8 -0
- package/dist/esm/components/Menubar/Category.js +9 -0
- package/dist/esm/components/Menubar/Dropdown.js +21 -0
- package/dist/esm/components/Menubar/DropdownRoot.js +36 -0
- package/dist/esm/components/Menubar/Header.js +24 -0
- package/dist/esm/components/Menubar/IconControlSubItem.js +17 -0
- package/dist/esm/components/Menubar/Item.js +20 -0
- package/dist/esm/components/Menubar/ItemLink.js +16 -0
- package/dist/esm/components/Menubar/Left.js +9 -0
- package/dist/esm/components/Menubar/MostUsed.js +9 -0
- package/dist/esm/components/Menubar/MostUsedItem.js +29 -0
- package/dist/esm/components/Menubar/MostUsedList.js +56 -0
- package/dist/esm/components/Menubar/Right.js +9 -0
- package/dist/esm/components/Menubar/Root.js +9 -0
- package/dist/esm/components/Menubar/Search.js +19 -0
- package/dist/esm/components/Menubar/SubItem.js +18 -0
- package/dist/esm/components/Menubar/index.js +31 -0
- package/dist/esm/components/Popover/Content.js +29 -0
- package/dist/esm/components/Popover/Context.js +12 -0
- package/dist/esm/components/Popover/Provider.js +17 -0
- package/dist/esm/components/Popover/Root.js +12 -0
- package/dist/esm/components/Popover/Trigger.js +9 -0
- package/dist/esm/components/Popover/index.js +13 -0
- package/dist/esm/components/RangeCalendar.js +1 -0
- package/dist/esm/components/Select/Content.js +25 -0
- package/dist/esm/components/Select/GroupedOptions.js +32 -0
- package/dist/esm/components/Select/Option.js +23 -0
- package/dist/esm/components/Select/Options.js +29 -0
- package/dist/esm/components/Select/Popover.js +8 -0
- package/dist/esm/components/Select/Root.js +22 -0
- package/dist/esm/components/Select/Trigger.js +26 -0
- package/dist/esm/components/Select/context.js +8 -0
- package/dist/esm/components/Select/index.js +17 -0
- package/dist/esm/components/TimeFieldInput.js +1 -1
- package/dist/esm/components/Tooltip.js +49 -0
- package/dist/esm/hooks/useFloatingLogic.js +51 -0
- package/dist/esm/hooks/useOutsideClickListener.js +20 -0
- package/dist/esm/index.js +8 -2
- package/dist/esm/provider/MenubarProvider.js +19 -0
- package/dist/esm/provider/SnackbarProvider.js +49 -0
- package/dist/esm/service/SnackbarSonner.js +23 -2
- package/dist/esm/styles/menubar.js +54 -0
- package/dist/types/components/Card.d.ts +3 -4
- package/dist/types/components/Divider.d.ts +5 -0
- package/dist/types/components/Input/Box.d.ts +3 -0
- package/dist/types/components/Input/Face.d.ts +3 -0
- package/dist/types/components/Input/Left.d.ts +3 -0
- package/dist/types/components/Input/Right.d.ts +3 -0
- package/dist/types/components/Input/Root.d.ts +3 -0
- package/dist/types/components/Input/Search.d.ts +3 -0
- package/dist/types/components/Input/index.d.ts +9 -0
- package/dist/types/components/Input/types.d.ts +20 -0
- package/dist/types/components/Masonry.d.ts +7 -0
- package/dist/types/components/Menubar/Categories.d.ts +3 -0
- package/dist/types/components/Menubar/Category.d.ts +8 -0
- package/dist/types/components/Menubar/Dropdown.d.ts +3 -0
- package/dist/types/components/Menubar/DropdownRoot.d.ts +17 -0
- package/dist/types/components/Menubar/Header.d.ts +6 -0
- package/dist/types/components/Menubar/IconControlSubItem.d.ts +6 -0
- package/dist/types/components/Menubar/Item.d.ts +10 -0
- package/dist/types/components/Menubar/ItemLink.d.ts +8 -0
- package/dist/types/components/Menubar/Left.d.ts +3 -0
- package/dist/types/components/Menubar/MostUsed.d.ts +8 -0
- package/dist/types/components/Menubar/MostUsedItem.d.ts +8 -0
- package/dist/types/components/Menubar/MostUsedList.d.ts +3 -0
- package/dist/types/components/Menubar/Right.d.ts +3 -0
- package/dist/types/components/Menubar/Root.d.ts +6 -0
- package/dist/types/components/Menubar/Search.d.ts +3 -0
- package/dist/types/components/Menubar/SubItem.d.ts +6 -0
- package/dist/types/components/Menubar/index.d.ts +15 -0
- package/dist/types/components/Menubar/interface.d.ts +4 -0
- package/dist/types/components/Popover/Content.d.ts +6 -0
- package/dist/types/components/Popover/Context.d.ts +18 -0
- package/dist/types/components/Popover/Provider.d.ts +8 -0
- package/dist/types/components/Popover/Root.d.ts +8 -0
- package/dist/types/components/Popover/Trigger.d.ts +5 -0
- package/dist/types/components/Popover/index.d.ts +6 -0
- package/dist/types/components/SearchInput.d.ts +0 -10
- package/dist/types/components/Select/Content.d.ts +9 -0
- package/dist/types/components/Select/GroupedOptions.d.ts +6 -0
- package/dist/types/components/Select/Option.d.ts +5 -0
- package/dist/types/components/Select/Options.d.ts +5 -0
- package/dist/types/components/Select/Popover.d.ts +5 -0
- package/dist/types/components/Select/Root.d.ts +8 -0
- package/dist/types/components/Select/Trigger.d.ts +5 -0
- package/dist/types/components/Select/context.d.ts +7 -0
- package/dist/types/components/Select/index.d.ts +8 -0
- package/dist/types/components/Tooltip.d.ts +13 -0
- package/dist/types/components/index.d.ts +5 -1
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/useFloatingLogic.d.ts +46 -0
- package/dist/types/hooks/useOutsideClickListener.d.ts +7 -0
- package/dist/types/provider/MenubarProvider.d.ts +8 -0
- package/dist/types/provider/index.d.ts +2 -0
- package/dist/types/styles/menubar.d.ts +346 -0
- package/dist/types/tests/Input/Face.test.d.ts +1 -0
- package/dist/types/tests/Input/Left.test.d.ts +1 -0
- package/dist/types/tests/Input/Right.test.d.ts +1 -0
- package/dist/types/tests/Input/Root.test.d.ts +1 -0
- package/dist/types/tests/Input/Search.test.d.ts +1 -0
- package/dist/types/tests/Menubar/Categories.test.d.ts +1 -0
- package/dist/types/tests/Menubar/Category.test.d.ts +1 -0
- package/dist/types/tests/Menubar/Dropdown.test.d.ts +1 -0
- package/dist/types/tests/Menubar/DropdownRoot.test.d.ts +1 -0
- package/dist/types/tests/Menubar/Header.test.d.ts +1 -0
- package/dist/types/tests/Menubar/HeaderLeft.test.d.ts +1 -0
- package/dist/types/tests/Menubar/HeaderRigth.test.d.ts +1 -0
- package/dist/types/tests/Menubar/Item.test.d.ts +1 -0
- package/dist/types/tests/Menubar/MostUsed.test.d.ts +1 -0
- package/dist/types/tests/Menubar/MostUsedItem.test.d.ts +1 -0
- package/dist/types/tests/Menubar/MostUsedList.test.d.ts +1 -0
- package/dist/types/tests/Menubar/Root.test.d.ts +1 -0
- package/dist/types/tests/Menubar/SubItem.test.d.ts +1 -0
- package/dist/types/tests/Popover.test.d.ts +1 -0
- package/dist/types/tests/Tooltip.test.d.ts +1 -0
- package/dist/types/tests/useOutsideClickListener.test.d.ts +1 -0
- package/package.json +7 -4
- package/dist/cjs/components/Input.js +0 -81
- package/dist/cjs/components/SearchInput.js +0 -83
- package/dist/cjs/components/Select.js +0 -101
- package/dist/esm/components/Input.js +0 -74
- package/dist/esm/components/SearchInput.js +0 -81
- package/dist/esm/components/Select.js +0 -96
- package/dist/types/components/Input.d.ts +0 -34
- package/dist/types/components/Select.d.ts +0 -27
- /package/dist/types/tests/{Input.test.d.ts → Divider.test.d.ts} +0 -0
- /package/dist/types/tests/{SearchInput.test.d.ts → Input/Box.test.d.ts} +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { Placement } from '@floating-ui/react';
|
|
3
|
+
interface FloatingLogicProps {
|
|
4
|
+
placement?: Placement;
|
|
5
|
+
trigger?: 'hover' | 'click';
|
|
6
|
+
arrowRef?: RefObject<SVGSVGElement>;
|
|
7
|
+
}
|
|
8
|
+
export declare const useFloatingLogic: ({ placement, trigger, arrowRef, }: FloatingLogicProps) => {
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
setIsOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
14
|
+
refs: {
|
|
15
|
+
reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
|
|
16
|
+
floating: import("react").MutableRefObject<HTMLElement | null>;
|
|
17
|
+
setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
|
|
18
|
+
setFloating: (node: HTMLElement | null) => void;
|
|
19
|
+
} & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
20
|
+
context: {
|
|
21
|
+
placement: Placement;
|
|
22
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
26
|
+
isPositioned: boolean;
|
|
27
|
+
update: () => void;
|
|
28
|
+
floatingStyles: import("react").CSSProperties;
|
|
29
|
+
open: boolean;
|
|
30
|
+
onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
|
|
31
|
+
events: import("@floating-ui/react").FloatingEvents;
|
|
32
|
+
dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
|
|
33
|
+
nodeId: string | undefined;
|
|
34
|
+
floatingId: string;
|
|
35
|
+
refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
36
|
+
elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
37
|
+
};
|
|
38
|
+
floatingStyles: import("react").CSSProperties;
|
|
39
|
+
triggerProps: {
|
|
40
|
+
onClick?: (() => void) | undefined;
|
|
41
|
+
onMouseEnter?: (() => void) | undefined;
|
|
42
|
+
onMouseLeave?: (() => void) | undefined;
|
|
43
|
+
ref: ((node: import("@floating-ui/react-dom").ReferenceType | null) => void) & ((node: import("@floating-ui/react").ReferenceType | null) => void);
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
interface useOutsideClickListenerProps {
|
|
3
|
+
ref: MutableRefObject<any>;
|
|
4
|
+
onClickOutside?: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const useOutsideClickListener: ({ ref, onClickOutside, }: useOutsideClickListenerProps) => void;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
export declare const menubar: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
[key: string]: {
|
|
3
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
4
|
+
right?: import("tailwind-merge").ClassNameValue;
|
|
5
|
+
left?: import("tailwind-merge").ClassNameValue;
|
|
6
|
+
root?: import("tailwind-merge").ClassNameValue;
|
|
7
|
+
dropdown?: import("tailwind-merge").ClassNameValue;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
} | {
|
|
11
|
+
[x: string]: {
|
|
12
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
13
|
+
right?: import("tailwind-merge").ClassNameValue;
|
|
14
|
+
left?: import("tailwind-merge").ClassNameValue;
|
|
15
|
+
root?: import("tailwind-merge").ClassNameValue;
|
|
16
|
+
dropdown?: import("tailwind-merge").ClassNameValue;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
} | {}, {
|
|
20
|
+
root: string;
|
|
21
|
+
left: string;
|
|
22
|
+
right: string;
|
|
23
|
+
dropdown: string;
|
|
24
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
25
|
+
[key: string]: {
|
|
26
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
27
|
+
right?: import("tailwind-merge").ClassNameValue;
|
|
28
|
+
left?: import("tailwind-merge").ClassNameValue;
|
|
29
|
+
root?: import("tailwind-merge").ClassNameValue;
|
|
30
|
+
dropdown?: import("tailwind-merge").ClassNameValue;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
} | {}>, {
|
|
34
|
+
[key: string]: {
|
|
35
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
36
|
+
right?: import("tailwind-merge").ClassNameValue;
|
|
37
|
+
left?: import("tailwind-merge").ClassNameValue;
|
|
38
|
+
root?: import("tailwind-merge").ClassNameValue;
|
|
39
|
+
dropdown?: import("tailwind-merge").ClassNameValue;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
} | {}, {
|
|
43
|
+
root: string;
|
|
44
|
+
left: string;
|
|
45
|
+
right: string;
|
|
46
|
+
dropdown: string;
|
|
47
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
48
|
+
root: string;
|
|
49
|
+
left: string;
|
|
50
|
+
right: string;
|
|
51
|
+
dropdown: string;
|
|
52
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
53
|
+
[key: string]: {
|
|
54
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
55
|
+
right?: import("tailwind-merge").ClassNameValue;
|
|
56
|
+
left?: import("tailwind-merge").ClassNameValue;
|
|
57
|
+
root?: import("tailwind-merge").ClassNameValue;
|
|
58
|
+
dropdown?: import("tailwind-merge").ClassNameValue;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
62
|
+
export declare const mostUsed: import("tailwind-variants").TVReturnType<{
|
|
63
|
+
[key: string]: {
|
|
64
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
65
|
+
label?: import("tailwind-merge").ClassNameValue;
|
|
66
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
67
|
+
containerList?: import("tailwind-merge").ClassNameValue;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
} | {
|
|
71
|
+
[x: string]: {
|
|
72
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
73
|
+
label?: import("tailwind-merge").ClassNameValue;
|
|
74
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
75
|
+
containerList?: import("tailwind-merge").ClassNameValue;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
} | {}, {
|
|
79
|
+
container: string;
|
|
80
|
+
label: string;
|
|
81
|
+
containerList: string;
|
|
82
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
83
|
+
[key: string]: {
|
|
84
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
85
|
+
label?: import("tailwind-merge").ClassNameValue;
|
|
86
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
87
|
+
containerList?: import("tailwind-merge").ClassNameValue;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
} | {}>, {
|
|
91
|
+
[key: string]: {
|
|
92
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
93
|
+
label?: import("tailwind-merge").ClassNameValue;
|
|
94
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
95
|
+
containerList?: import("tailwind-merge").ClassNameValue;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
} | {}, {
|
|
99
|
+
container: string;
|
|
100
|
+
label: string;
|
|
101
|
+
containerList: string;
|
|
102
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
103
|
+
container: string;
|
|
104
|
+
label: string;
|
|
105
|
+
containerList: string;
|
|
106
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
107
|
+
[key: string]: {
|
|
108
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
109
|
+
label?: import("tailwind-merge").ClassNameValue;
|
|
110
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
111
|
+
containerList?: import("tailwind-merge").ClassNameValue;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
115
|
+
export declare const mostUsedItem: import("tailwind-variants").TVReturnType<{
|
|
116
|
+
[key: string]: {
|
|
117
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
118
|
+
title?: import("tailwind-merge").ClassNameValue;
|
|
119
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
120
|
+
category?: import("tailwind-merge").ClassNameValue;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
} | {
|
|
124
|
+
[x: string]: {
|
|
125
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
126
|
+
title?: import("tailwind-merge").ClassNameValue;
|
|
127
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
128
|
+
category?: import("tailwind-merge").ClassNameValue;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
} | {}, {
|
|
132
|
+
container: string;
|
|
133
|
+
title: string;
|
|
134
|
+
category: string;
|
|
135
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
136
|
+
[key: string]: {
|
|
137
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
138
|
+
title?: import("tailwind-merge").ClassNameValue;
|
|
139
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
140
|
+
category?: import("tailwind-merge").ClassNameValue;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
} | {}>, {
|
|
144
|
+
[key: string]: {
|
|
145
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
146
|
+
title?: import("tailwind-merge").ClassNameValue;
|
|
147
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
148
|
+
category?: import("tailwind-merge").ClassNameValue;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
} | {}, {
|
|
152
|
+
container: string;
|
|
153
|
+
title: string;
|
|
154
|
+
category: string;
|
|
155
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
156
|
+
container: string;
|
|
157
|
+
title: string;
|
|
158
|
+
category: string;
|
|
159
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
160
|
+
[key: string]: {
|
|
161
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
162
|
+
title?: import("tailwind-merge").ClassNameValue;
|
|
163
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
164
|
+
category?: import("tailwind-merge").ClassNameValue;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
168
|
+
export declare const item: import("tailwind-variants").TVReturnType<{
|
|
169
|
+
[key: string]: {
|
|
170
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
171
|
+
text?: import("tailwind-merge").ClassNameValue;
|
|
172
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
173
|
+
icon?: import("tailwind-merge").ClassNameValue;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
} | {
|
|
177
|
+
[x: string]: {
|
|
178
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
179
|
+
text?: import("tailwind-merge").ClassNameValue;
|
|
180
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
181
|
+
icon?: import("tailwind-merge").ClassNameValue;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
} | {}, {
|
|
185
|
+
container: string;
|
|
186
|
+
text: string;
|
|
187
|
+
icon: string;
|
|
188
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
189
|
+
[key: string]: {
|
|
190
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
191
|
+
text?: import("tailwind-merge").ClassNameValue;
|
|
192
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
193
|
+
icon?: import("tailwind-merge").ClassNameValue;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
} | {}>, {
|
|
197
|
+
[key: string]: {
|
|
198
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
199
|
+
text?: import("tailwind-merge").ClassNameValue;
|
|
200
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
201
|
+
icon?: import("tailwind-merge").ClassNameValue;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
} | {}, {
|
|
205
|
+
container: string;
|
|
206
|
+
text: string;
|
|
207
|
+
icon: string;
|
|
208
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
209
|
+
container: string;
|
|
210
|
+
text: string;
|
|
211
|
+
icon: string;
|
|
212
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
213
|
+
[key: string]: {
|
|
214
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
215
|
+
text?: import("tailwind-merge").ClassNameValue;
|
|
216
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
217
|
+
icon?: import("tailwind-merge").ClassNameValue;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
221
|
+
export declare const category: import("tailwind-variants").TVReturnType<{
|
|
222
|
+
[key: string]: {
|
|
223
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
224
|
+
hr?: import("tailwind-merge").ClassNameValue;
|
|
225
|
+
text?: import("tailwind-merge").ClassNameValue;
|
|
226
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
} | {
|
|
230
|
+
[x: string]: {
|
|
231
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
232
|
+
hr?: import("tailwind-merge").ClassNameValue;
|
|
233
|
+
text?: import("tailwind-merge").ClassNameValue;
|
|
234
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
} | {}, {
|
|
238
|
+
text: string;
|
|
239
|
+
hr: string;
|
|
240
|
+
container: string;
|
|
241
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
242
|
+
[key: string]: {
|
|
243
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
244
|
+
hr?: import("tailwind-merge").ClassNameValue;
|
|
245
|
+
text?: import("tailwind-merge").ClassNameValue;
|
|
246
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
} | {}>, {
|
|
250
|
+
[key: string]: {
|
|
251
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
252
|
+
hr?: import("tailwind-merge").ClassNameValue;
|
|
253
|
+
text?: import("tailwind-merge").ClassNameValue;
|
|
254
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
} | {}, {
|
|
258
|
+
text: string;
|
|
259
|
+
hr: string;
|
|
260
|
+
container: string;
|
|
261
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
262
|
+
text: string;
|
|
263
|
+
hr: string;
|
|
264
|
+
container: string;
|
|
265
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
266
|
+
[key: string]: {
|
|
267
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
268
|
+
hr?: import("tailwind-merge").ClassNameValue;
|
|
269
|
+
text?: import("tailwind-merge").ClassNameValue;
|
|
270
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
274
|
+
export declare const subItem: import("tailwind-variants").TVReturnType<{
|
|
275
|
+
[key: string]: {
|
|
276
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
277
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
} | {
|
|
281
|
+
[x: string]: {
|
|
282
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
283
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
} | {}, {
|
|
287
|
+
container: string;
|
|
288
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
289
|
+
[key: string]: {
|
|
290
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
291
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
} | {}>, {
|
|
295
|
+
[key: string]: {
|
|
296
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
297
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
} | {}, {
|
|
301
|
+
container: string;
|
|
302
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
303
|
+
container: string;
|
|
304
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
305
|
+
[key: string]: {
|
|
306
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
307
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
311
|
+
export declare const animate: import("tailwind-variants").TVReturnType<{
|
|
312
|
+
show: {
|
|
313
|
+
true: string;
|
|
314
|
+
false: string;
|
|
315
|
+
};
|
|
316
|
+
}, undefined, "transition-all ease-in-out duration-250", import("tailwind-variants/dist/config").TVConfig<{
|
|
317
|
+
show: {
|
|
318
|
+
true: string;
|
|
319
|
+
false: string;
|
|
320
|
+
};
|
|
321
|
+
}, {
|
|
322
|
+
show: {
|
|
323
|
+
true: string;
|
|
324
|
+
false: string;
|
|
325
|
+
};
|
|
326
|
+
}>, {
|
|
327
|
+
show: {
|
|
328
|
+
true: string;
|
|
329
|
+
false: string;
|
|
330
|
+
};
|
|
331
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
332
|
+
show: {
|
|
333
|
+
true: string;
|
|
334
|
+
false: string;
|
|
335
|
+
};
|
|
336
|
+
}, undefined, "transition-all ease-in-out duration-250", import("tailwind-variants/dist/config").TVConfig<{
|
|
337
|
+
show: {
|
|
338
|
+
true: string;
|
|
339
|
+
false: string;
|
|
340
|
+
};
|
|
341
|
+
}, {
|
|
342
|
+
show: {
|
|
343
|
+
true: string;
|
|
344
|
+
false: string;
|
|
345
|
+
};
|
|
346
|
+
}>, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/cortex-react",
|
|
3
|
-
"version": "1.3.0-beta.
|
|
3
|
+
"version": "1.3.0-beta.10",
|
|
4
4
|
"description": "React components based in @tecsinapse/cortex-core",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -18,12 +18,15 @@
|
|
|
18
18
|
"test:watch": "jest --watch"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@
|
|
21
|
+
"@floating-ui/react": "^0.26.18",
|
|
22
|
+
"@internationalized/date": "*",
|
|
23
|
+
"@tecsinapse/cortex-core": "0.3.0-beta.4",
|
|
22
24
|
"clsx": "*",
|
|
23
25
|
"react-aria": "^3.33.1",
|
|
24
26
|
"react-icons": "^5.2.1",
|
|
25
27
|
"react-stately": "^3.31.1",
|
|
26
|
-
"sonner": "^1.5.0"
|
|
28
|
+
"sonner": "^1.5.0",
|
|
29
|
+
"tailwind-merge": "*"
|
|
27
30
|
},
|
|
28
31
|
"repository": {
|
|
29
32
|
"type": "git",
|
|
@@ -39,5 +42,5 @@
|
|
|
39
42
|
"react-dom": ">=18.0.0",
|
|
40
43
|
"tailwind": ">=3.3.0"
|
|
41
44
|
},
|
|
42
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "1474ff5567adf5659cc49acefa0a4b90956dccb9"
|
|
43
46
|
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var cortexCore = require('@tecsinapse/cortex-core');
|
|
4
|
-
var clsx = require('clsx');
|
|
5
|
-
var React = require('react');
|
|
6
|
-
|
|
7
|
-
const getValidChildren = (children) => {
|
|
8
|
-
return React.Children.toArray(children).filter(
|
|
9
|
-
(el) => React.isValidElement(el)
|
|
10
|
-
);
|
|
11
|
-
};
|
|
12
|
-
const Box = React.forwardRef(
|
|
13
|
-
({ id, name, variants, label, placeholder, className, ...rest }, ref) => {
|
|
14
|
-
return /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-col" }, /* @__PURE__ */ React.createElement(
|
|
15
|
-
"input",
|
|
16
|
-
{
|
|
17
|
-
id: id ?? name,
|
|
18
|
-
name,
|
|
19
|
-
placeholder: placeholder ?? " ",
|
|
20
|
-
className: clsx.clsx(cortexCore.inputBox(placeholder, label, className)),
|
|
21
|
-
...rest,
|
|
22
|
-
ref,
|
|
23
|
-
"data-testid": "input-input"
|
|
24
|
-
}
|
|
25
|
-
), /* @__PURE__ */ React.createElement(
|
|
26
|
-
"label",
|
|
27
|
-
{
|
|
28
|
-
htmlFor: id ?? name,
|
|
29
|
-
className: cortexCore.labelStyle({ intent: variants?.intent, placeholder }),
|
|
30
|
-
"data-testid": "input-label"
|
|
31
|
-
},
|
|
32
|
-
label
|
|
33
|
-
));
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
const Face = React.forwardRef(
|
|
37
|
-
({ children, variants, className, ...rest }, ref) => {
|
|
38
|
-
const clones = getValidChildren(children).map((el) => {
|
|
39
|
-
return React.cloneElement(el, { ...el.props, variants });
|
|
40
|
-
});
|
|
41
|
-
return /* @__PURE__ */ React.createElement(
|
|
42
|
-
"div",
|
|
43
|
-
{
|
|
44
|
-
...rest,
|
|
45
|
-
className: clsx.clsx(cortexCore.input(variants), className),
|
|
46
|
-
id: "input-face",
|
|
47
|
-
ref
|
|
48
|
-
},
|
|
49
|
-
clones
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
const Root = React.forwardRef(
|
|
54
|
-
({ variants, className, ...rest }, ref) => {
|
|
55
|
-
return /* @__PURE__ */ React.createElement(Face, { variants, className }, /* @__PURE__ */ React.createElement(Box, { ...rest, ref }));
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
const Left = React.forwardRef(
|
|
59
|
-
({ children, className, ...rest }, ref) => {
|
|
60
|
-
return /* @__PURE__ */ React.createElement("div", { className: clsx.clsx(className, "mr-2.5"), ...rest, ref }, children);
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
const Right = React.forwardRef(
|
|
64
|
-
({ children, className, ...rest }, ref) => {
|
|
65
|
-
return /* @__PURE__ */ React.createElement("div", { className: clsx.clsx(className, "ml-2.5"), ...rest, ref }, children);
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
const Input = {
|
|
69
|
-
Root,
|
|
70
|
-
Face,
|
|
71
|
-
Box,
|
|
72
|
-
Left,
|
|
73
|
-
Right
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
exports.Box = Box;
|
|
77
|
-
exports.Face = Face;
|
|
78
|
-
exports.Input = Input;
|
|
79
|
-
exports.Left = Left;
|
|
80
|
-
exports.Right = Right;
|
|
81
|
-
exports.Root = Root;
|