@sellgar/kit 0.0.40 → 0.0.41

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.
Files changed (38) hide show
  1. package/dist/index.css +9 -1
  2. package/dist/index.js +6538 -4154
  3. package/dist/index2.css +1 -1
  4. package/dist/index3.css +1 -1
  5. package/package.json +3 -1
  6. package/types/components/helpers/dropdown/dropdown.d.ts +138 -0
  7. package/types/components/helpers/dropdown/index.d.ts +1 -0
  8. package/types/components/helpers/dropdown2/dropdown.d.ts +138 -0
  9. package/types/components/helpers/dropdown2/index.d.ts +1 -0
  10. package/types/components/helpers/select/index.d.ts +1 -0
  11. package/types/components/helpers/select/select.d.ts +139 -0
  12. package/types/components/misc/base-option/base-option.d.ts +10 -0
  13. package/types/components/misc/base-option/index.d.ts +1 -0
  14. package/types/components/misc/index.d.ts +1 -0
  15. package/types/components/symbols/button-dropdown/button-dropdown.d.ts +14 -0
  16. package/types/components/symbols/button-dropdown/index.d.ts +1 -0
  17. package/types/components/symbols/dropdown/dropdown.d.ts +26 -0
  18. package/types/components/symbols/dropdown/index.d.ts +1 -0
  19. package/types/components/symbols/index.d.ts +3 -0
  20. package/types/components/symbols/input/input.d.ts +3 -3
  21. package/types/components/symbols/input-select/index.d.ts +1 -0
  22. package/types/components/symbols/input-select/input-select.d.ts +12 -0
  23. package/types/components/symbols/modal/modal.d.ts +2 -2
  24. package/types/components/symbols/select/index.d.ts +1 -0
  25. package/types/components/symbols/select/input/index.d.ts +1 -0
  26. package/types/components/symbols/select/input/input.d.ts +11 -0
  27. package/types/components/symbols/select/option/index.d.ts +1 -0
  28. package/types/components/symbols/select/option/option.d.ts +5 -0
  29. package/types/components/symbols/select/select.d.ts +15 -0
  30. package/types/components/symbols/tooltip/tooltip.d.ts +2 -2
  31. package/types/components/wrappers/drop-down/drop-down.wrapper.d.ts +5 -1
  32. package/types/components/wrappers/index.d.ts +1 -0
  33. package/types/components/wrappers/scrollbar/index.d.ts +1 -0
  34. package/types/components/wrappers/scrollbar/overflow.plugin.d.ts +2 -0
  35. package/types/components/wrappers/scrollbar/plugins/bounce.d.ts +9 -0
  36. package/types/components/wrappers/scrollbar/scrollbar.d.ts +6 -0
  37. package/types/index.d.ts +1 -0
  38. package/types/subcomponents/user/user.d.ts +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@sellgar/kit",
4
- "version": "0.0.40",
4
+ "version": "0.0.41",
5
5
  "description": "Sellgar storybook",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -37,6 +37,8 @@
37
37
  "@floating-ui/react": "0.27.4",
38
38
  "@types/react-slider": "1.3.6",
39
39
  "classnames": "2.5.1",
40
+ "overlayscrollbars": "2.11.1",
41
+ "react-baron": "3.0.0",
40
42
  "react-calendar": "5.1.0",
41
43
  "react-slider": "2.0.6"
42
44
  },
@@ -0,0 +1,138 @@
1
+ import { ReferenceType } from '@floating-ui/react';
2
+ import { default as React } from 'react';
3
+ interface IOptions {
4
+ initialOpen?: boolean;
5
+ open?: boolean;
6
+ setOpen?(open: boolean): void;
7
+ }
8
+ declare const useDropdown: (options: IOptions) => {
9
+ open: boolean | undefined;
10
+ setOpen: (open: boolean) => void;
11
+ role: import('@floating-ui/react').ElementProps;
12
+ dismiss: import('@floating-ui/react').ElementProps;
13
+ listRef: React.RefObject<(HTMLElement | null)[]>;
14
+ listContentRef: React.RefObject<(string | null)[]>;
15
+ activeIndex: number | null;
16
+ setActiveIndex: React.Dispatch<React.SetStateAction<number | null>>;
17
+ selectedIndex: number | null;
18
+ setSelectedIndex: React.Dispatch<React.SetStateAction<number | null>>;
19
+ floating: {
20
+ placement: import('@floating-ui/utils').Placement;
21
+ strategy: import('@floating-ui/utils').Strategy;
22
+ middlewareData: import('@floating-ui/core').MiddlewareData;
23
+ x: number;
24
+ y: number;
25
+ isPositioned: boolean;
26
+ update: () => void;
27
+ floatingStyles: React.CSSProperties;
28
+ refs: {
29
+ reference: React.MutableRefObject<import('@floating-ui/react-dom').ReferenceType | null>;
30
+ floating: React.MutableRefObject<HTMLElement | null>;
31
+ setReference: (node: import('@floating-ui/react-dom').ReferenceType | null) => void;
32
+ setFloating: (node: HTMLElement | null) => void;
33
+ } & import('@floating-ui/react').ExtendedRefs<ReferenceType>;
34
+ elements: {
35
+ reference: import('@floating-ui/react-dom').ReferenceType | null;
36
+ floating: HTMLElement | null;
37
+ } & import('@floating-ui/react').ExtendedElements<ReferenceType>;
38
+ context: {
39
+ update: () => void;
40
+ placement: import('@floating-ui/utils').Placement;
41
+ strategy: import('@floating-ui/utils').Strategy;
42
+ x: number;
43
+ y: number;
44
+ middlewareData: import('@floating-ui/core').MiddlewareData;
45
+ isPositioned: boolean;
46
+ floatingStyles: React.CSSProperties;
47
+ open: boolean;
48
+ onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void;
49
+ events: import('@floating-ui/react').FloatingEvents;
50
+ dataRef: React.MutableRefObject<import('@floating-ui/react').ContextData>;
51
+ nodeId: string | undefined;
52
+ floatingId: string | undefined;
53
+ refs: import('@floating-ui/react').ExtendedRefs<ReferenceType>;
54
+ elements: import('@floating-ui/react').ExtendedElements<ReferenceType>;
55
+ };
56
+ };
57
+ interactions: import('@floating-ui/react').UseInteractionsReturn;
58
+ };
59
+ type TDropdownContext = ReturnType<typeof useDropdown>;
60
+ export declare const useDropdownContext: () => {
61
+ open: boolean | undefined;
62
+ setOpen: (open: boolean) => void;
63
+ role: import('@floating-ui/react').ElementProps;
64
+ dismiss: import('@floating-ui/react').ElementProps;
65
+ listRef: React.RefObject<(HTMLElement | null)[]>;
66
+ listContentRef: React.RefObject<(string | null)[]>;
67
+ activeIndex: number | null;
68
+ setActiveIndex: React.Dispatch<React.SetStateAction<number | null>>;
69
+ selectedIndex: number | null;
70
+ setSelectedIndex: React.Dispatch<React.SetStateAction<number | null>>;
71
+ floating: {
72
+ placement: import('@floating-ui/utils').Placement;
73
+ strategy: import('@floating-ui/utils').Strategy;
74
+ middlewareData: import('@floating-ui/core').MiddlewareData;
75
+ x: number;
76
+ y: number;
77
+ isPositioned: boolean;
78
+ update: () => void;
79
+ floatingStyles: React.CSSProperties;
80
+ refs: {
81
+ reference: React.MutableRefObject<import('@floating-ui/react-dom').ReferenceType | null>;
82
+ floating: React.MutableRefObject<HTMLElement | null>;
83
+ setReference: (node: import('@floating-ui/react-dom').ReferenceType | null) => void;
84
+ setFloating: (node: HTMLElement | null) => void;
85
+ } & import('@floating-ui/react').ExtendedRefs<ReferenceType>;
86
+ elements: {
87
+ reference: import('@floating-ui/react-dom').ReferenceType | null;
88
+ floating: HTMLElement | null;
89
+ } & import('@floating-ui/react').ExtendedElements<ReferenceType>;
90
+ context: {
91
+ update: () => void;
92
+ placement: import('@floating-ui/utils').Placement;
93
+ strategy: import('@floating-ui/utils').Strategy;
94
+ x: number;
95
+ y: number;
96
+ middlewareData: import('@floating-ui/core').MiddlewareData;
97
+ isPositioned: boolean;
98
+ floatingStyles: React.CSSProperties;
99
+ open: boolean;
100
+ onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void;
101
+ events: import('@floating-ui/react').FloatingEvents;
102
+ dataRef: React.MutableRefObject<import('@floating-ui/react').ContextData>;
103
+ nodeId: string | undefined;
104
+ floatingId: string | undefined;
105
+ refs: import('@floating-ui/react').ExtendedRefs<ReferenceType>;
106
+ elements: import('@floating-ui/react').ExtendedElements<ReferenceType>;
107
+ };
108
+ };
109
+ interactions: import('@floating-ui/react').UseInteractionsReturn;
110
+ };
111
+ interface IProps {
112
+ initialOpen?: boolean;
113
+ open?: boolean;
114
+ setOpen?(open: boolean): void;
115
+ }
116
+ declare const DropdownWrapper: React.FC<React.PropsWithChildren<IProps>>;
117
+ interface IReferenceProps {
118
+ reference(context: TDropdownContext): React.ReactNode;
119
+ }
120
+ declare const Reference: React.MemoExoticComponent<(props: IReferenceProps) => React.JSX.Element>;
121
+ interface IOptionsProps {
122
+ empty: React.ReactNode;
123
+ options(context: TDropdownContext): React.ReactNode[];
124
+ }
125
+ declare const Options: React.MemoExoticComponent<(props: IOptionsProps) => React.JSX.Element | null>;
126
+ interface IOptionProps {
127
+ index: number;
128
+ onClick?(event: React.MouseEvent<HTMLElement>): void;
129
+ option(context: TDropdownContext): React.ReactNode;
130
+ }
131
+ declare const Option: React.MemoExoticComponent<(props: IOptionProps) => React.JSX.Element>;
132
+ type TDropdown = typeof DropdownWrapper & {
133
+ Reference: typeof Reference;
134
+ Options: typeof Options;
135
+ Option: typeof Option;
136
+ };
137
+ export declare const Dropdown: TDropdown;
138
+ export {};
@@ -0,0 +1 @@
1
+ export { Dropdown } from './dropdown.tsx';
@@ -0,0 +1,138 @@
1
+ import { ReferenceType } from '@floating-ui/react';
2
+ import { default as React } from 'react';
3
+ interface IOptions {
4
+ initialOpen?: boolean;
5
+ open?: boolean;
6
+ setOpen?(open: boolean): void;
7
+ }
8
+ declare const useDropdown: (options: IOptions) => {
9
+ open: boolean | undefined;
10
+ setOpen: (open: boolean) => void;
11
+ role: import('@floating-ui/react').ElementProps;
12
+ dismiss: import('@floating-ui/react').ElementProps;
13
+ listRef: React.RefObject<(HTMLElement | null)[]>;
14
+ listContentRef: React.RefObject<(string | null)[]>;
15
+ activeIndex: number | null;
16
+ setActiveIndex: React.Dispatch<React.SetStateAction<number | null>>;
17
+ selectedIndex: number | null;
18
+ setSelectedIndex: React.Dispatch<React.SetStateAction<number | null>>;
19
+ floating: {
20
+ placement: import('@floating-ui/utils').Placement;
21
+ strategy: import('@floating-ui/utils').Strategy;
22
+ middlewareData: import('@floating-ui/core').MiddlewareData;
23
+ x: number;
24
+ y: number;
25
+ isPositioned: boolean;
26
+ update: () => void;
27
+ floatingStyles: React.CSSProperties;
28
+ refs: {
29
+ reference: React.MutableRefObject<import('@floating-ui/react-dom').ReferenceType | null>;
30
+ floating: React.MutableRefObject<HTMLElement | null>;
31
+ setReference: (node: import('@floating-ui/react-dom').ReferenceType | null) => void;
32
+ setFloating: (node: HTMLElement | null) => void;
33
+ } & import('@floating-ui/react').ExtendedRefs<ReferenceType>;
34
+ elements: {
35
+ reference: import('@floating-ui/react-dom').ReferenceType | null;
36
+ floating: HTMLElement | null;
37
+ } & import('@floating-ui/react').ExtendedElements<ReferenceType>;
38
+ context: {
39
+ update: () => void;
40
+ placement: import('@floating-ui/utils').Placement;
41
+ strategy: import('@floating-ui/utils').Strategy;
42
+ x: number;
43
+ y: number;
44
+ middlewareData: import('@floating-ui/core').MiddlewareData;
45
+ isPositioned: boolean;
46
+ floatingStyles: React.CSSProperties;
47
+ open: boolean;
48
+ onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void;
49
+ events: import('@floating-ui/react').FloatingEvents;
50
+ dataRef: React.MutableRefObject<import('@floating-ui/react').ContextData>;
51
+ nodeId: string | undefined;
52
+ floatingId: string | undefined;
53
+ refs: import('@floating-ui/react').ExtendedRefs<ReferenceType>;
54
+ elements: import('@floating-ui/react').ExtendedElements<ReferenceType>;
55
+ };
56
+ };
57
+ interactions: import('@floating-ui/react').UseInteractionsReturn;
58
+ };
59
+ type TDropdownContext = ReturnType<typeof useDropdown>;
60
+ export declare const useDropdownContext: () => {
61
+ open: boolean | undefined;
62
+ setOpen: (open: boolean) => void;
63
+ role: import('@floating-ui/react').ElementProps;
64
+ dismiss: import('@floating-ui/react').ElementProps;
65
+ listRef: React.RefObject<(HTMLElement | null)[]>;
66
+ listContentRef: React.RefObject<(string | null)[]>;
67
+ activeIndex: number | null;
68
+ setActiveIndex: React.Dispatch<React.SetStateAction<number | null>>;
69
+ selectedIndex: number | null;
70
+ setSelectedIndex: React.Dispatch<React.SetStateAction<number | null>>;
71
+ floating: {
72
+ placement: import('@floating-ui/utils').Placement;
73
+ strategy: import('@floating-ui/utils').Strategy;
74
+ middlewareData: import('@floating-ui/core').MiddlewareData;
75
+ x: number;
76
+ y: number;
77
+ isPositioned: boolean;
78
+ update: () => void;
79
+ floatingStyles: React.CSSProperties;
80
+ refs: {
81
+ reference: React.MutableRefObject<import('@floating-ui/react-dom').ReferenceType | null>;
82
+ floating: React.MutableRefObject<HTMLElement | null>;
83
+ setReference: (node: import('@floating-ui/react-dom').ReferenceType | null) => void;
84
+ setFloating: (node: HTMLElement | null) => void;
85
+ } & import('@floating-ui/react').ExtendedRefs<ReferenceType>;
86
+ elements: {
87
+ reference: import('@floating-ui/react-dom').ReferenceType | null;
88
+ floating: HTMLElement | null;
89
+ } & import('@floating-ui/react').ExtendedElements<ReferenceType>;
90
+ context: {
91
+ update: () => void;
92
+ placement: import('@floating-ui/utils').Placement;
93
+ strategy: import('@floating-ui/utils').Strategy;
94
+ x: number;
95
+ y: number;
96
+ middlewareData: import('@floating-ui/core').MiddlewareData;
97
+ isPositioned: boolean;
98
+ floatingStyles: React.CSSProperties;
99
+ open: boolean;
100
+ onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void;
101
+ events: import('@floating-ui/react').FloatingEvents;
102
+ dataRef: React.MutableRefObject<import('@floating-ui/react').ContextData>;
103
+ nodeId: string | undefined;
104
+ floatingId: string | undefined;
105
+ refs: import('@floating-ui/react').ExtendedRefs<ReferenceType>;
106
+ elements: import('@floating-ui/react').ExtendedElements<ReferenceType>;
107
+ };
108
+ };
109
+ interactions: import('@floating-ui/react').UseInteractionsReturn;
110
+ };
111
+ interface IProps {
112
+ initialOpen?: boolean;
113
+ open?: boolean;
114
+ setOpen?(open: boolean): void;
115
+ }
116
+ declare const DropdownWrapper: React.FC<React.PropsWithChildren<IProps>>;
117
+ interface IReferenceProps {
118
+ reference(context: TDropdownContext): React.ReactNode;
119
+ }
120
+ declare const Reference: React.MemoExoticComponent<(props: IReferenceProps) => React.JSX.Element>;
121
+ interface IOptionsProps {
122
+ empty: React.ReactNode;
123
+ options(context: TDropdownContext): React.ReactNode[];
124
+ }
125
+ declare const Options: React.MemoExoticComponent<(props: IOptionsProps) => React.JSX.Element | null>;
126
+ interface IOptionProps {
127
+ index: number;
128
+ onClick?(event: React.MouseEvent<HTMLElement>): void;
129
+ option(context: TDropdownContext): React.ReactNode;
130
+ }
131
+ declare const Option: React.MemoExoticComponent<(props: IOptionProps) => React.JSX.Element>;
132
+ type TDropdown = typeof DropdownWrapper & {
133
+ Reference: typeof Reference;
134
+ Options: typeof Options;
135
+ Option: typeof Option;
136
+ };
137
+ export declare const Dropdown: TDropdown;
138
+ export {};
@@ -0,0 +1 @@
1
+ export { Dropdown } from './dropdown.tsx';
@@ -0,0 +1 @@
1
+ export { Select } from './select.tsx';
@@ -0,0 +1,139 @@
1
+ import { ReferenceType } from '@floating-ui/react';
2
+ import { default as React } from 'react';
3
+ interface IOptions {
4
+ initialOpen?: boolean;
5
+ initialSelectedIndex?: number;
6
+ open?: boolean;
7
+ setOpen?(open: boolean): void;
8
+ }
9
+ declare const useSelect: (options: IOptions) => {
10
+ open: boolean | undefined;
11
+ setOpen: (open: boolean) => void;
12
+ role: import('@floating-ui/react').ElementProps;
13
+ dismiss: import('@floating-ui/react').ElementProps;
14
+ listRef: React.RefObject<(HTMLElement | null)[]>;
15
+ activeIndex: number | null;
16
+ setActiveIndex: React.Dispatch<React.SetStateAction<number | null>>;
17
+ selectedIndex: number | null;
18
+ setSelectedIndex: React.Dispatch<React.SetStateAction<number | null>>;
19
+ floating: {
20
+ placement: import('@floating-ui/utils').Placement;
21
+ strategy: import('@floating-ui/utils').Strategy;
22
+ middlewareData: import('@floating-ui/core').MiddlewareData;
23
+ x: number;
24
+ y: number;
25
+ isPositioned: boolean;
26
+ update: () => void;
27
+ floatingStyles: React.CSSProperties;
28
+ refs: {
29
+ reference: React.MutableRefObject<import('@floating-ui/react-dom').ReferenceType | null>;
30
+ floating: React.MutableRefObject<HTMLElement | null>;
31
+ setReference: (node: import('@floating-ui/react-dom').ReferenceType | null) => void;
32
+ setFloating: (node: HTMLElement | null) => void;
33
+ } & import('@floating-ui/react').ExtendedRefs<ReferenceType>;
34
+ elements: {
35
+ reference: import('@floating-ui/react-dom').ReferenceType | null;
36
+ floating: HTMLElement | null;
37
+ } & import('@floating-ui/react').ExtendedElements<ReferenceType>;
38
+ context: {
39
+ update: () => void;
40
+ placement: import('@floating-ui/utils').Placement;
41
+ strategy: import('@floating-ui/utils').Strategy;
42
+ x: number;
43
+ y: number;
44
+ middlewareData: import('@floating-ui/core').MiddlewareData;
45
+ isPositioned: boolean;
46
+ floatingStyles: React.CSSProperties;
47
+ open: boolean;
48
+ onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void;
49
+ events: import('@floating-ui/react').FloatingEvents;
50
+ dataRef: React.MutableRefObject<import('@floating-ui/react').ContextData>;
51
+ nodeId: string | undefined;
52
+ floatingId: string | undefined;
53
+ refs: import('@floating-ui/react').ExtendedRefs<ReferenceType>;
54
+ elements: import('@floating-ui/react').ExtendedElements<ReferenceType>;
55
+ };
56
+ };
57
+ interactions: import('@floating-ui/react').UseInteractionsReturn;
58
+ };
59
+ type TSelectContext = ReturnType<typeof useSelect>;
60
+ export declare const useSelectContext: () => {
61
+ open: boolean | undefined;
62
+ setOpen: (open: boolean) => void;
63
+ role: import('@floating-ui/react').ElementProps;
64
+ dismiss: import('@floating-ui/react').ElementProps;
65
+ listRef: React.RefObject<(HTMLElement | null)[]>;
66
+ activeIndex: number | null;
67
+ setActiveIndex: React.Dispatch<React.SetStateAction<number | null>>;
68
+ selectedIndex: number | null;
69
+ setSelectedIndex: React.Dispatch<React.SetStateAction<number | null>>;
70
+ floating: {
71
+ placement: import('@floating-ui/utils').Placement;
72
+ strategy: import('@floating-ui/utils').Strategy;
73
+ middlewareData: import('@floating-ui/core').MiddlewareData;
74
+ x: number;
75
+ y: number;
76
+ isPositioned: boolean;
77
+ update: () => void;
78
+ floatingStyles: React.CSSProperties;
79
+ refs: {
80
+ reference: React.MutableRefObject<import('@floating-ui/react-dom').ReferenceType | null>;
81
+ floating: React.MutableRefObject<HTMLElement | null>;
82
+ setReference: (node: import('@floating-ui/react-dom').ReferenceType | null) => void;
83
+ setFloating: (node: HTMLElement | null) => void;
84
+ } & import('@floating-ui/react').ExtendedRefs<ReferenceType>;
85
+ elements: {
86
+ reference: import('@floating-ui/react-dom').ReferenceType | null;
87
+ floating: HTMLElement | null;
88
+ } & import('@floating-ui/react').ExtendedElements<ReferenceType>;
89
+ context: {
90
+ update: () => void;
91
+ placement: import('@floating-ui/utils').Placement;
92
+ strategy: import('@floating-ui/utils').Strategy;
93
+ x: number;
94
+ y: number;
95
+ middlewareData: import('@floating-ui/core').MiddlewareData;
96
+ isPositioned: boolean;
97
+ floatingStyles: React.CSSProperties;
98
+ open: boolean;
99
+ onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void;
100
+ events: import('@floating-ui/react').FloatingEvents;
101
+ dataRef: React.MutableRefObject<import('@floating-ui/react').ContextData>;
102
+ nodeId: string | undefined;
103
+ floatingId: string | undefined;
104
+ refs: import('@floating-ui/react').ExtendedRefs<ReferenceType>;
105
+ elements: import('@floating-ui/react').ExtendedElements<ReferenceType>;
106
+ };
107
+ };
108
+ interactions: import('@floating-ui/react').UseInteractionsReturn;
109
+ };
110
+ interface IProps {
111
+ initialOpen?: boolean;
112
+ initialSelectedIndex?: number;
113
+ open?: boolean;
114
+ setOpen?(open: boolean): void;
115
+ }
116
+ declare const SelectWrapper: React.FC<React.PropsWithChildren<IProps>>;
117
+ interface IReferenceProps {
118
+ reference(context: TSelectContext): React.ReactNode;
119
+ }
120
+ declare const Reference: React.MemoExoticComponent<(props: IReferenceProps) => React.JSX.Element>;
121
+ interface IOptionsProps {
122
+ empty: React.ReactNode;
123
+ options(context: TSelectContext): React.ReactNode[];
124
+ }
125
+ declare const Options: React.MemoExoticComponent<(props: IOptionsProps) => React.JSX.Element | null>;
126
+ interface IOptionProps {
127
+ index: number;
128
+ option(context: TSelectContext): React.ReactNode;
129
+ onClick?(event: React.MouseEvent<HTMLElement>): void;
130
+ onChange?(event: React.KeyboardEvent<HTMLElement>): void;
131
+ }
132
+ declare const Option: React.MemoExoticComponent<(props: IOptionProps) => React.JSX.Element>;
133
+ type TSelect = typeof SelectWrapper & {
134
+ Reference: typeof Reference;
135
+ Options: typeof Options;
136
+ Option: typeof Option;
137
+ };
138
+ export declare const Select: TSelect;
139
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ interface IProps {
3
+ leadicon?: React.ReactNode;
4
+ active?: boolean;
5
+ label: string;
6
+ badge?: string;
7
+ toggle?: boolean;
8
+ }
9
+ export declare const BaseOption: React.FC<IProps>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { BaseOption } from './base-option.tsx';
@@ -1,3 +1,4 @@
1
1
  export * from './dot';
2
2
  export * from './divider';
3
3
  export * from './menu-item';
4
+ export * from './base-option';
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { TIconName } from '../icon';
3
+ interface IProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {
4
+ form?: 'icon-only';
5
+ style?: 'primary' | 'secondary' | 'tertiary' | 'ghost';
6
+ size?: 'lg' | 'md' | 'sm' | 'xs';
7
+ target?: 'destructive';
8
+ shape?: 'rounded' | 'pill';
9
+ leadicon?: TIconName;
10
+ tailicon?: TIconName;
11
+ label?: string | number;
12
+ }
13
+ export declare const ButtonDropdown: React.FC<IProps>;
14
+ export {};
@@ -0,0 +1 @@
1
+ export { ButtonDropdown } from './button-dropdown.tsx';
@@ -0,0 +1,26 @@
1
+ import { default as React } from 'react';
2
+ interface IReferenceProps<T extends Record<string, any>, K extends keyof T> {
3
+ activeIndex: number | null;
4
+ selectedIndex: number | null;
5
+ setActive(index: number | null): void;
6
+ }
7
+ interface IOptionProps<T extends Record<string, any>, K extends keyof T> {
8
+ option: T;
9
+ value: T[K];
10
+ active: boolean;
11
+ selected: boolean;
12
+ activeIndex: number | null;
13
+ selectedIndex: number | null;
14
+ setActive(index: number | null): void;
15
+ }
16
+ export interface IProps<T extends Record<string, any>, K extends keyof T> {
17
+ open?: boolean;
18
+ setOpen?(state: boolean): void;
19
+ optionKey: K;
20
+ optionValue: K;
21
+ options: T[];
22
+ optionElement(props: IOptionProps<T, K>): React.ReactNode;
23
+ referenceElement(props: IReferenceProps<T, K>): React.ReactNode;
24
+ }
25
+ export declare const Dropdown: <T extends Record<string, any>, K extends keyof T>({ open, setOpen, options, optionKey, optionValue, ...props }: IProps<T, K>) => React.JSX.Element;
26
+ export {};
@@ -0,0 +1 @@
1
+ export { Dropdown } from './dropdown.tsx';
@@ -3,9 +3,11 @@ export * from './badge';
3
3
  export * from './button';
4
4
  export * from './button-icon';
5
5
  export * from './button-link';
6
+ export * from './button-dropdown';
6
7
  export * from './radio';
7
8
  export * from './checkbox';
8
9
  export * from './input';
10
+ export * from './input-select';
9
11
  export * from './textarea';
10
12
  export * from './label-field';
11
13
  export * from './caption-field';
@@ -22,3 +24,4 @@ export * from './quantity-stepper';
22
24
  export * from './breadcrumb';
23
25
  export * from './notification';
24
26
  export * from './modal';
27
+ export * from './select';
@@ -1,8 +1,8 @@
1
1
  import { default as React } from 'react';
2
- import { TIconName } from '../icon';
3
2
  export interface IProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'className'> {
4
- leadicon?: TIconName;
5
- tailicon?: TIconName;
3
+ ref?: React.RefCallback<HTMLInputElement>;
4
+ leadicon?: React.ReactNode;
5
+ tailicon?: React.ReactNode;
6
6
  badge?: string | number;
7
7
  size?: 'xs' | 'md';
8
8
  target?: 'destructive';
@@ -0,0 +1 @@
1
+ export { InputSelect } from './input-select.tsx';
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ export interface IProps<T extends Record<string, any>, K extends keyof T> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'className' | 'children'> {
3
+ leadicon?: React.ReactNode;
4
+ tailicon?: React.ReactNode;
5
+ badge?: string | number;
6
+ size?: 'xs' | 'md';
7
+ target?: 'destructive';
8
+ optionKey: K;
9
+ optionValue: K;
10
+ options: T[];
11
+ }
12
+ export declare const InputSelect: <T extends Record<string, any>, K extends keyof T>({ options, optionKey, optionValue, ...props }: IProps<T, K>) => React.JSX.Element;
@@ -25,13 +25,13 @@ export declare function useDialog({ initialOpen, open: controlledOpen, onOpen, o
25
25
  floating: HTMLElement | null;
26
26
  } & import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
27
27
  context: {
28
+ update: () => void;
28
29
  placement: import('@floating-ui/utils').Placement;
29
30
  strategy: import('@floating-ui/utils').Strategy;
30
31
  x: number;
31
32
  y: number;
32
33
  middlewareData: import('@floating-ui/core').MiddlewareData;
33
34
  isPositioned: boolean;
34
- update: () => void;
35
35
  floatingStyles: React.CSSProperties;
36
36
  open: boolean;
37
37
  onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void;
@@ -72,13 +72,13 @@ export declare const useModalContext: () => {
72
72
  floating: HTMLElement | null;
73
73
  } & import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
74
74
  context: {
75
+ update: () => void;
75
76
  placement: import('@floating-ui/utils').Placement;
76
77
  strategy: import('@floating-ui/utils').Strategy;
77
78
  x: number;
78
79
  y: number;
79
80
  middlewareData: import('@floating-ui/core').MiddlewareData;
80
81
  isPositioned: boolean;
81
- update: () => void;
82
82
  floatingStyles: React.CSSProperties;
83
83
  open: boolean;
84
84
  onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void;
@@ -0,0 +1 @@
1
+ export { Select } from './select.tsx';
@@ -0,0 +1 @@
1
+ export { Input } from './input.tsx';
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ export interface IProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'className'> {
3
+ ref?: React.RefCallback<HTMLInputElement>;
4
+ leadicon?: React.ReactNode;
5
+ tailicon?: React.ReactNode;
6
+ badge?: string | number;
7
+ size?: 'xs' | 'md';
8
+ target?: 'destructive';
9
+ isFocused?: boolean;
10
+ }
11
+ export declare const Input: React.FC<React.PropsWithChildren<IProps>>;
@@ -0,0 +1 @@
1
+ export { Option } from './option.tsx';
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export interface IProps {
3
+ title: string;
4
+ }
5
+ export declare const Option: React.FC<IProps>;
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ export interface IProps<T extends Record<string, any>, K extends keyof T> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'className' | 'children'> {
3
+ leadicon?: React.ReactNode;
4
+ tailicon?: React.ReactNode;
5
+ badge?: string | number;
6
+ size?: 'xs' | 'md';
7
+ target?: 'destructive';
8
+ optionKey: K;
9
+ optionValue: K;
10
+ options: T[];
11
+ value?: T[K];
12
+ templateValue?(option?: T): React.ReactNode;
13
+ templateOption?(option: T): React.ReactNode;
14
+ }
15
+ export declare const Select: <T extends Record<string, any>, K extends keyof T>({ value, options, optionKey, optionValue, templateValue, templateOption, ...props }: IProps<T, K>) => React.JSX.Element;