@paygreen/pgui 2.14.10 → 3.0.0

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 (159) hide show
  1. package/README.md +128 -59
  2. package/dist/components/actions-button/actions-button.d.ts +21 -0
  3. package/dist/components/data-list/datalist.d.ts +87 -0
  4. package/dist/components/data-table/data-table.d.ts +67 -0
  5. package/dist/components/date-picker/date-picker.d.ts +43 -0
  6. package/dist/components/field-wrapper/field-wrapper.d.ts +50 -0
  7. package/dist/components/index.d.ts +19 -0
  8. package/dist/components/input/input.d.ts +24 -0
  9. package/dist/components/input-mask/input-mask.d.ts +28 -0
  10. package/dist/components/input-password/input-password.d.ts +34 -0
  11. package/dist/components/input-phone/input-phone.d.ts +62 -0
  12. package/dist/components/input-phone/partials/search-on-list.d.ts +61 -0
  13. package/dist/components/input-search/input-search.d.ts +14 -0
  14. package/dist/components/loader/loader.d.ts +25 -0
  15. package/dist/components/logos/logoPaygreenByLemonway.d.ts +25 -0
  16. package/dist/components/modal/modal.d.ts +79 -0
  17. package/dist/components/pagination/pagination.d.ts +36 -0
  18. package/dist/components/select/select.d.ts +64 -0
  19. package/dist/components/sidebar/sidebar.d.ts +117 -0
  20. package/dist/components/tooltip/tooltip.d.ts +11 -0
  21. package/dist/components/ui/color-mode.d.ts +21 -0
  22. package/dist/components/ui/toaster.d.ts +2 -0
  23. package/dist/hooks/scroll-shadow.d.ts +7 -0
  24. package/dist/hooks/use-data-table.d.ts +12 -0
  25. package/dist/index.d.ts +2 -352
  26. package/dist/index.js +48 -0
  27. package/dist/index.mjs +9402 -0
  28. package/dist/pgui.css +1 -0
  29. package/dist/theme/index.d.ts +2 -0
  30. package/dist/theme/recipes/alert-recipe.d.ts +2 -0
  31. package/dist/theme/recipes/card-recipe.d.ts +15 -0
  32. package/dist/theme/recipes/index.d.ts +4 -0
  33. package/dist/theme/recipes/text-recipe.d.ts +2 -0
  34. package/dist/theme/semanticTokens/colors.d.ts +399 -0
  35. package/dist/theme/semanticTokens/index.d.ts +401 -0
  36. package/dist/theme/tokens/colors.d.ts +317 -0
  37. package/dist/theme/tokens/font-sizes.d.ts +42 -0
  38. package/dist/theme/tokens/fonts.d.ts +12 -0
  39. package/dist/theme/tokens/index.d.ts +465 -0
  40. package/dist/theme/tokens/radii.d.ts +39 -0
  41. package/dist/theme/tokens/sizes.d.ts +57 -0
  42. package/package.json +93 -104
  43. package/src/components/date-picker/date-picker.css +225 -0
  44. package/src/components/select/select.css +99 -0
  45. package/src/styles/index.css +12 -0
  46. package/dist/cjs/index.js +0 -60887
  47. package/dist/cjs/index.js.map +0 -1
  48. package/dist/cjs/types/components/ActionsButton/index.d.ts +0 -6
  49. package/dist/cjs/types/components/Card/index.d.ts +0 -3
  50. package/dist/cjs/types/components/ConfirmMenuItem/index.d.ts +0 -13
  51. package/dist/cjs/types/components/DataList/index.d.ts +0 -42
  52. package/dist/cjs/types/components/FormGroup/index.d.ts +0 -12
  53. package/dist/cjs/types/components/InputDayPicker/index.d.ts +0 -20
  54. package/dist/cjs/types/components/InputPhone/SearchOnList.d.ts +0 -19
  55. package/dist/cjs/types/components/InputPhone/index.d.ts +0 -12
  56. package/dist/cjs/types/components/InputRangePicker/index.d.ts +0 -25
  57. package/dist/cjs/types/components/ModalResponsive/index.d.ts +0 -5
  58. package/dist/cjs/types/components/Pagination/index.d.ts +0 -43
  59. package/dist/cjs/types/components/SearchInput/index.d.ts +0 -12
  60. package/dist/cjs/types/components/Select/index.d.ts +0 -120
  61. package/dist/cjs/types/components/Textarea/index.d.ts +0 -8
  62. package/dist/cjs/types/components/index.d.ts +0 -12
  63. package/dist/cjs/types/hooks/useClickOutside.d.ts +0 -3
  64. package/dist/cjs/types/index.d.ts +0 -4
  65. package/dist/cjs/types/layout/BottomBar/index.d.ts +0 -3
  66. package/dist/cjs/types/layout/LayoutContainer/index.d.ts +0 -3
  67. package/dist/cjs/types/layout/SideNav/index.d.ts +0 -21
  68. package/dist/cjs/types/layout/TopBar/index.d.ts +0 -10
  69. package/dist/cjs/types/layout/index.d.ts +0 -4
  70. package/dist/cjs/types/theme/components/alert.d.ts +0 -9
  71. package/dist/cjs/types/theme/components/badge.d.ts +0 -9
  72. package/dist/cjs/types/theme/components/button.d.ts +0 -163
  73. package/dist/cjs/types/theme/components/checkbox.d.ts +0 -11
  74. package/dist/cjs/types/theme/components/drawer.d.ts +0 -6
  75. package/dist/cjs/types/theme/components/form.d.ts +0 -8
  76. package/dist/cjs/types/theme/components/index.d.ts +0 -16
  77. package/dist/cjs/types/theme/components/input.d.ts +0 -58
  78. package/dist/cjs/types/theme/components/menu.d.ts +0 -9
  79. package/dist/cjs/types/theme/components/number-input.d.ts +0 -54
  80. package/dist/cjs/types/theme/components/pin-input.d.ts +0 -42
  81. package/dist/cjs/types/theme/components/radio.d.ts +0 -6
  82. package/dist/cjs/types/theme/components/slider.d.ts +0 -6
  83. package/dist/cjs/types/theme/components/switch.d.ts +0 -6
  84. package/dist/cjs/types/theme/components/tag.d.ts +0 -14
  85. package/dist/cjs/types/theme/components/textarea.d.ts +0 -54
  86. package/dist/cjs/types/theme/components/tooltip.d.ts +0 -8
  87. package/dist/cjs/types/theme/foundations/colors.d.ts +0 -66
  88. package/dist/cjs/types/theme/foundations/index.d.ts +0 -129
  89. package/dist/cjs/types/theme/foundations/radius.d.ts +0 -11
  90. package/dist/cjs/types/theme/foundations/shadows.d.ts +0 -10
  91. package/dist/cjs/types/theme/foundations/sizes.d.ts +0 -21
  92. package/dist/cjs/types/theme/foundations/typography.d.ts +0 -21
  93. package/dist/cjs/types/theme/index.d.ts +0 -1
  94. package/dist/cjs/types/theme/rawStyle/chakraStyle.d.ts +0 -2
  95. package/dist/cjs/types/theme/rawStyle/index.d.ts +0 -3
  96. package/dist/cjs/types/theme/rawStyle/reactDayPicker.d.ts +0 -23
  97. package/dist/cjs/types/theme/rawStyle/scrollbarStyles.d.ts +0 -11
  98. package/dist/cjs/types/theme/styles.d.ts +0 -2
  99. package/dist/cjs/types/theme/theme.d.ts +0 -1
  100. package/dist/cjs/types/utils/date.d.ts +0 -1
  101. package/dist/cjs/types/utils/index.d.ts +0 -2
  102. package/dist/cjs/types/utils/responsive.d.ts +0 -1
  103. package/dist/esm/index.js +0 -60814
  104. package/dist/esm/index.js.map +0 -1
  105. package/dist/esm/types/components/ActionsButton/index.d.ts +0 -6
  106. package/dist/esm/types/components/Card/index.d.ts +0 -3
  107. package/dist/esm/types/components/ConfirmMenuItem/index.d.ts +0 -13
  108. package/dist/esm/types/components/DataList/index.d.ts +0 -42
  109. package/dist/esm/types/components/FormGroup/index.d.ts +0 -12
  110. package/dist/esm/types/components/InputDayPicker/index.d.ts +0 -20
  111. package/dist/esm/types/components/InputPhone/SearchOnList.d.ts +0 -19
  112. package/dist/esm/types/components/InputPhone/index.d.ts +0 -12
  113. package/dist/esm/types/components/InputRangePicker/index.d.ts +0 -25
  114. package/dist/esm/types/components/ModalResponsive/index.d.ts +0 -5
  115. package/dist/esm/types/components/Pagination/index.d.ts +0 -43
  116. package/dist/esm/types/components/SearchInput/index.d.ts +0 -12
  117. package/dist/esm/types/components/Select/index.d.ts +0 -120
  118. package/dist/esm/types/components/Textarea/index.d.ts +0 -8
  119. package/dist/esm/types/components/index.d.ts +0 -12
  120. package/dist/esm/types/hooks/useClickOutside.d.ts +0 -3
  121. package/dist/esm/types/index.d.ts +0 -4
  122. package/dist/esm/types/layout/BottomBar/index.d.ts +0 -3
  123. package/dist/esm/types/layout/LayoutContainer/index.d.ts +0 -3
  124. package/dist/esm/types/layout/SideNav/index.d.ts +0 -21
  125. package/dist/esm/types/layout/TopBar/index.d.ts +0 -10
  126. package/dist/esm/types/layout/index.d.ts +0 -4
  127. package/dist/esm/types/theme/components/alert.d.ts +0 -9
  128. package/dist/esm/types/theme/components/badge.d.ts +0 -9
  129. package/dist/esm/types/theme/components/button.d.ts +0 -163
  130. package/dist/esm/types/theme/components/checkbox.d.ts +0 -11
  131. package/dist/esm/types/theme/components/drawer.d.ts +0 -6
  132. package/dist/esm/types/theme/components/form.d.ts +0 -8
  133. package/dist/esm/types/theme/components/index.d.ts +0 -16
  134. package/dist/esm/types/theme/components/input.d.ts +0 -58
  135. package/dist/esm/types/theme/components/menu.d.ts +0 -9
  136. package/dist/esm/types/theme/components/number-input.d.ts +0 -54
  137. package/dist/esm/types/theme/components/pin-input.d.ts +0 -42
  138. package/dist/esm/types/theme/components/radio.d.ts +0 -6
  139. package/dist/esm/types/theme/components/slider.d.ts +0 -6
  140. package/dist/esm/types/theme/components/switch.d.ts +0 -6
  141. package/dist/esm/types/theme/components/tag.d.ts +0 -14
  142. package/dist/esm/types/theme/components/textarea.d.ts +0 -54
  143. package/dist/esm/types/theme/components/tooltip.d.ts +0 -8
  144. package/dist/esm/types/theme/foundations/colors.d.ts +0 -66
  145. package/dist/esm/types/theme/foundations/index.d.ts +0 -129
  146. package/dist/esm/types/theme/foundations/radius.d.ts +0 -11
  147. package/dist/esm/types/theme/foundations/shadows.d.ts +0 -10
  148. package/dist/esm/types/theme/foundations/sizes.d.ts +0 -21
  149. package/dist/esm/types/theme/foundations/typography.d.ts +0 -21
  150. package/dist/esm/types/theme/index.d.ts +0 -1
  151. package/dist/esm/types/theme/rawStyle/chakraStyle.d.ts +0 -2
  152. package/dist/esm/types/theme/rawStyle/index.d.ts +0 -3
  153. package/dist/esm/types/theme/rawStyle/reactDayPicker.d.ts +0 -23
  154. package/dist/esm/types/theme/rawStyle/scrollbarStyles.d.ts +0 -11
  155. package/dist/esm/types/theme/styles.d.ts +0 -2
  156. package/dist/esm/types/theme/theme.d.ts +0 -1
  157. package/dist/esm/types/utils/date.d.ts +0 -1
  158. package/dist/esm/types/utils/index.d.ts +0 -2
  159. package/dist/esm/types/utils/responsive.d.ts +0 -1
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Props for the InputPhone component
3
+ */
4
+ export interface InputPhoneProps {
5
+ /** The locale to use for translations ('fr' or 'en') */
6
+ locale?: 'fr' | 'en';
7
+ /** The phone number value in E.164 format */
8
+ value?: string;
9
+ /** The label to display above the input */
10
+ label?: string;
11
+ /** Placeholder text for the input */
12
+ placeholder?: string;
13
+ /** Whether the input is disabled */
14
+ disabled?: boolean;
15
+ /** Additional props to pass to the input element */
16
+ inputProps?: Record<string, unknown>;
17
+ /** Callback fired when the phone number changes */
18
+ onChange?: (value: string) => void;
19
+ /** Whether the input is required */
20
+ isRequired?: boolean;
21
+ /** Whether the input is invalid */
22
+ invalid?: boolean;
23
+ /** Error message to display when invalid */
24
+ errorMessage?: string;
25
+ /** Custom labels for the country search component */
26
+ searchLabels?: {
27
+ /** Placeholder text for the search input */
28
+ search?: string;
29
+ /** Text shown when no results are found */
30
+ noResults?: string;
31
+ /** Text shown while loading */
32
+ loading?: string;
33
+ };
34
+ }
35
+ /**
36
+ * Validates if a phone number is valid
37
+ */
38
+ declare const isValidPhone: (val: string) => boolean;
39
+ /**
40
+ * Formats a phone number to international format
41
+ */
42
+ declare const formatPhoneIntl: (val: string) => string;
43
+ /**
44
+ * A reusable phone input component with international formatting and country selection
45
+ *
46
+ * Note: This component does NOT use forwardRef intentionally, as react-phone-number-input
47
+ * manages its own ref system for proper focus management and country selection.
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * <InputPhone
52
+ * value="+33612345678"
53
+ * onChange={setPhoneNumber}
54
+ * isRequired
55
+ * />
56
+ * ```
57
+ */
58
+ declare const InputPhone: {
59
+ ({ locale, label, value, placeholder, disabled, inputProps, onChange, isRequired, invalid, errorMessage, searchLabels, ...props }: InputPhoneProps): import("react/jsx-runtime").JSX.Element;
60
+ displayName: string;
61
+ };
62
+ export { formatPhoneIntl, InputPhone, isValidPhone };
@@ -0,0 +1,61 @@
1
+ import { ComponentType } from 'react';
2
+ /**
3
+ * Represents a selectable option in the search list
4
+ */
5
+ export interface SearchOption {
6
+ /** Display text for the option */
7
+ label: string;
8
+ /** Unique value identifier for the option */
9
+ value: string;
10
+ }
11
+ /**
12
+ * Props for the SearchOnList component
13
+ */
14
+ export interface SearchOnListProps {
15
+ /** Array of options to display and search through */
16
+ options: SearchOption[];
17
+ /** Callback fired when an option is selected */
18
+ onChange: (value: string) => void;
19
+ /** Component to render icons for each option (typically country flags) */
20
+ iconComponent: ComponentType<{
21
+ country: string;
22
+ label: string;
23
+ [key: string]: any;
24
+ }>;
25
+ /** Locale for default labels and formatting */
26
+ locale?: 'fr' | 'en';
27
+ /** Currently selected value */
28
+ value?: string;
29
+ /** Whether the component is disabled */
30
+ disabled?: boolean;
31
+ /** Placeholder text for the search input */
32
+ placeholder?: string;
33
+ /** Maximum height of the dropdown list */
34
+ maxHeight?: string;
35
+ /** Maximum width of the dropdown container */
36
+ maxWidth?: string;
37
+ /** Custom labels to override default translations */
38
+ labels?: {
39
+ /** Label for the search input placeholder */
40
+ search?: string;
41
+ /** Message shown when no results are found */
42
+ noResults?: string;
43
+ /** Message shown during search loading */
44
+ loading?: string;
45
+ };
46
+ }
47
+ /**
48
+ * SearchOnList component - A searchable dropdown list with keyboard navigation
49
+ *
50
+ * @example
51
+ * ```tsx
52
+ * <SearchOnList
53
+ * options={countries}
54
+ * onChange={setSelectedCountry}
55
+ * iconComponent={CountryFlag}
56
+ * locale="fr"
57
+ * />
58
+ * ```
59
+ */
60
+ declare const SearchOnList: ({ options, onChange, iconComponent: IconComponent, locale, labels: customLabels, ...props }: SearchOnListProps) => import("react/jsx-runtime").JSX.Element;
61
+ export { SearchOnList };
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { InputProps } from '@chakra-ui/react';
3
+ type CustomProps = {
4
+ value?: string;
5
+ defaultValue?: string;
6
+ onChange?(value?: string): void;
7
+ delay?: number;
8
+ clearLabel?: string;
9
+ inputProps?: object;
10
+ isDisabled?: boolean;
11
+ customEndElement?: React.ReactNode;
12
+ };
13
+ export declare const InputSearch: React.ForwardRefExoticComponent<Omit<InputProps, keyof CustomProps> & CustomProps & React.RefAttributes<HTMLInputElement>>;
14
+ export {};
@@ -0,0 +1,25 @@
1
+ import { SpinnerProps } from '@chakra-ui/react';
2
+ /**
3
+ * Props for the Loader component
4
+ */
5
+ export interface LoaderProps extends SpinnerProps {
6
+ /** Whether the loader should be visible and spinning */
7
+ loading?: boolean;
8
+ /** Size of the spinner */
9
+ size?: 'sm' | 'md' | 'lg' | 'xl';
10
+ /** Custom color for the spinner (overrides theme colors) */
11
+ color?: string;
12
+ }
13
+ /**
14
+ * Loader component - A reusable loading spinner with theme-aware styling
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * <Loader size="lg" loading={false} />
19
+ * ```
20
+ */
21
+ declare const Loader: {
22
+ ({ loading, size, color, ...rest }: LoaderProps): import("react/jsx-runtime").JSX.Element | null;
23
+ displayName: string;
24
+ };
25
+ export { Loader };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Props for the LogoPayGreenByLemonway component
3
+ */
4
+ export interface LogoPayGreenByLemonwayProps {
5
+ /** Color of the logo - accepts any valid CSS color value or CSS variable */
6
+ color?: string;
7
+ /** Width of the logo - accepts CSS units as string or number (pixels) */
8
+ width?: string | number;
9
+ /** Height of the logo - accepts CSS units as string or number (pixels) */
10
+ height?: string | number;
11
+ }
12
+ /**
13
+ * PayGreen by LemonWay logo component
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <LogoPayGreenByLemonway
18
+ * color="#00B956"
19
+ * width={200}
20
+ * height={80}
21
+ * />
22
+ * ```
23
+ */
24
+ declare const LogoPayGreenByLemonway: ({ color, width, height, ...rest }: LogoPayGreenByLemonwayProps) => import("react/jsx-runtime").JSX.Element;
25
+ export { LogoPayGreenByLemonway };
@@ -0,0 +1,79 @@
1
+ import { ReactNode } from 'react';
2
+ import { DialogRootProps, DrawerRootProps } from '@chakra-ui/react';
3
+ /**
4
+ * Props for the Modal component
5
+ */
6
+ export interface ModalProps {
7
+ /** Whether the modal is open or closed */
8
+ open: boolean;
9
+ /** Function to control the modal open/closed state */
10
+ setOpen: (open: boolean) => void;
11
+ /** Content to be rendered inside the modal */
12
+ children: ReactNode;
13
+ }
14
+ export type ModalPropsWithExtensions = ModalProps & Partial<DrawerRootProps> & Partial<DialogRootProps>;
15
+ /**
16
+ * Responsive Modal component that adapts to screen size
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <Modal.Root open={isOpen} setOpen={setIsOpen}>
21
+ * <Modal.Trigger asChild>
22
+ * <Button>Open Modal</Button>
23
+ * </Modal.Trigger>
24
+ * <Modal.Content>
25
+ * <Modal.Header>Title</Modal.Header>
26
+ * <Modal.Body>Content goes here</Modal.Body>
27
+ * <Modal.Footer>
28
+ * <Modal.ActionTrigger asChild>
29
+ * <Button onClick={() => setIsOpen(false)}>Close</Button>
30
+ * </Modal.ActionTrigger>
31
+ * </Modal.Footer>
32
+ * </Modal.Content>
33
+ * </Modal.Root>
34
+ * ```
35
+ */
36
+ declare const ModalRoot: {
37
+ ({ open, setOpen, children, ...rest }: ModalPropsWithExtensions): import("react/jsx-runtime").JSX.Element;
38
+ Trigger({ children, ...rest }: {
39
+ children: ReactNode;
40
+ [key: string]: any;
41
+ }): import("react/jsx-runtime").JSX.Element;
42
+ Header({ children, ...rest }: {
43
+ children: ReactNode;
44
+ }): import("react/jsx-runtime").JSX.Element;
45
+ Body({ children, ...rest }: {
46
+ children: ReactNode;
47
+ }): import("react/jsx-runtime").JSX.Element;
48
+ Footer({ children, ...rest }: {
49
+ children: ReactNode;
50
+ }): import("react/jsx-runtime").JSX.Element;
51
+ ActionTrigger({ children, ...rest }: {
52
+ children: ReactNode;
53
+ [key: string]: any;
54
+ }): import("react/jsx-runtime").JSX.Element;
55
+ Backdrop(props: any): import("react/jsx-runtime").JSX.Element;
56
+ Positioner(props: any): import("react/jsx-runtime").JSX.Element;
57
+ Portal({ children, ...rest }: {
58
+ children: ReactNode;
59
+ [key: string]: any;
60
+ }): import("react/jsx-runtime").JSX.Element;
61
+ ContentWrapper({ children, ...rest }: {
62
+ children: ReactNode;
63
+ [key: string]: any;
64
+ }): import("react/jsx-runtime").JSX.Element;
65
+ displayName: string;
66
+ };
67
+ declare const Modal: typeof ModalRoot & {
68
+ Root: typeof ModalRoot;
69
+ Trigger: typeof ModalRoot.Trigger;
70
+ Header: typeof ModalRoot.Header;
71
+ Body: typeof ModalRoot.Body;
72
+ Footer: typeof ModalRoot.Footer;
73
+ Backdrop: typeof ModalRoot.Backdrop;
74
+ Positioner: typeof ModalRoot.Positioner;
75
+ ContentWrapper: typeof ModalRoot.ContentWrapper;
76
+ ActionTrigger: typeof ModalRoot.ActionTrigger;
77
+ Portal: typeof ModalRoot.Portal;
78
+ };
79
+ export { Modal };
@@ -0,0 +1,36 @@
1
+ import { ColorPalette } from '@chakra-ui/react';
2
+ /**
3
+ * Props for the Pagination component
4
+ */
5
+ export interface PaginationProps {
6
+ /** Current active page number (1-based) */
7
+ page: number;
8
+ /** Function to update the current page */
9
+ setPage: (page: number) => void;
10
+ /** Number of items displayed per page */
11
+ pageSize: number;
12
+ /** Total number of items across all pages */
13
+ totalItems: number;
14
+ /** Whether a page is currently loading - disables all interactions when true */
15
+ isLoadingPage?: boolean;
16
+ /** Color palette for the pagination */
17
+ colorPalette?: ColorPalette;
18
+ }
19
+ /**
20
+ * Pagination component for navigating through paginated data
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <Pagination
25
+ * page={currentPage}
26
+ * setPage={setCurrentPage}
27
+ * pageSize={10}
28
+ * totalItems={250}
29
+ * />
30
+ * ```
31
+ */
32
+ declare const Pagination: {
33
+ ({ page, setPage, pageSize, totalItems, isLoadingPage, colorPalette, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
34
+ displayName: string;
35
+ };
36
+ export { Pagination };
@@ -0,0 +1,64 @@
1
+ import { ActionMeta, MultiValue, Props as ReactSelectProps, SingleValue } from 'react-select';
2
+ /**
3
+ * Option interface for Select component
4
+ */
5
+ export interface SelectOptionType {
6
+ /** The value of the option */
7
+ value: string;
8
+ /** The label displayed for the option */
9
+ label: string;
10
+ /** Whether the option is disabled */
11
+ isDisabled?: boolean;
12
+ }
13
+ /**
14
+ * Props for single-select mode
15
+ */
16
+ export interface SingleSelectProps extends Omit<ReactSelectProps<SelectOptionType, false>, 'options' | 'isMulti' | 'onChange' | 'value'> {
17
+ /** Array of options to display */
18
+ options?: SelectOptionType[];
19
+ /** Enable multi-selection - must be false or undefined */
20
+ isMulti?: false;
21
+ /** Current value for controlled component */
22
+ value?: SingleValue<SelectOptionType> | null;
23
+ /** onChange handler for controlled component */
24
+ onChange?: (value: SingleValue<SelectOptionType> | null, actionMeta: ActionMeta<SelectOptionType>) => void;
25
+ /** Enable async loading of options */
26
+ isAsync?: boolean;
27
+ /** Enable creating new options */
28
+ isCreatable?: boolean;
29
+ /** Function to load options asynchronously */
30
+ loadOptions?: (inputValue: string) => Promise<SelectOptionType[]>;
31
+ /** Name attribute for form integration */
32
+ name?: string;
33
+ /** Whether the select is in invalid state */
34
+ invalid?: boolean;
35
+ }
36
+ /**
37
+ * Props for multi-select mode
38
+ */
39
+ export interface MultiSelectProps extends Omit<ReactSelectProps<SelectOptionType, true>, 'options' | 'isMulti' | 'onChange' | 'value'> {
40
+ /** Array of options to display */
41
+ options?: SelectOptionType[];
42
+ /** Enable multi-selection - must be true */
43
+ isMulti: true;
44
+ /** Current value for controlled component - never null in multi mode, always an array */
45
+ value?: MultiValue<SelectOptionType>;
46
+ /** onChange handler for controlled component - never receives null in multi mode */
47
+ onChange?: (value: MultiValue<SelectOptionType>, actionMeta: ActionMeta<SelectOptionType>) => void;
48
+ /** Enable async loading of options */
49
+ isAsync?: boolean;
50
+ /** Enable creating new options */
51
+ isCreatable?: boolean;
52
+ /** Function to load options asynchronously */
53
+ loadOptions?: (inputValue: string) => Promise<SelectOptionType[]>;
54
+ /** Name attribute for form integration */
55
+ name?: string;
56
+ /** Whether the select is in invalid state */
57
+ invalid?: boolean;
58
+ }
59
+ /**
60
+ * Union type for Select component props
61
+ */
62
+ export type SelectProps = SingleSelectProps | MultiSelectProps;
63
+ declare const Select: import('react').ForwardRefExoticComponent<SelectProps & import('react').RefAttributes<any>>;
64
+ export { Select };
@@ -0,0 +1,117 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ import { BoxProps, DrawerRootProps } from '@chakra-ui/react';
3
+ /**
4
+ * Theme configuration for sidebar styling
5
+ */
6
+ interface SidebarTheme {
7
+ /** Width of the sidebar in desktop mode */
8
+ width?: string;
9
+ /** Background color */
10
+ backgroundColor?: string;
11
+ /** Border color */
12
+ borderColor?: string;
13
+ /** Box shadow */
14
+ boxShadow?: string;
15
+ /** Z-index value */
16
+ zIndex?: number;
17
+ /** Transition duration for animations */
18
+ transitionDuration?: string;
19
+ }
20
+ /**
21
+ * Props for individual navigation items in the sidebar
22
+ */
23
+ interface NavItemProps {
24
+ /** Icon component to display before the label */
25
+ icon?: React.ElementType;
26
+ /** Text label for the navigation item */
27
+ label: string;
28
+ /** Whether the navigation item is currently active/selected */
29
+ hidden?: boolean;
30
+ /** Whether the item has a submenu (shows chevron down icon) */
31
+ hasSubmenu?: boolean;
32
+ /** Number to display in a badge (for notifications or counts) */
33
+ badge?: number;
34
+ /** Whether this is a sub-item (applies additional left padding) */
35
+ isSubItem?: boolean;
36
+ /** Child elements to render inside the navigation item */
37
+ children?: ReactNode;
38
+ /** Callback function when the navigation item is clicked */
39
+ onClick?: () => void;
40
+ /** Whether the item is disabled */
41
+ disabled?: boolean;
42
+ /** Link to navigate to when the item is clicked */
43
+ link?: string;
44
+ }
45
+ /**
46
+ * Props for navigation sections that group related navigation items
47
+ */
48
+ interface NavSectionProps {
49
+ /** Optional title for the navigation section */
50
+ title?: string;
51
+ /** Array of navigation items to display in this section */
52
+ items: NavItemProps[];
53
+ /** Whether the section is hidden */
54
+ hidden?: boolean;
55
+ /** Optional icon to display next to the section title */
56
+ icon?: React.ElementType;
57
+ }
58
+ /**
59
+ * Props for the sidebar body component that contains navigation sections
60
+ */
61
+ interface SidebarBodyProps {
62
+ navSections: NavSectionProps[] | null;
63
+ }
64
+ /**
65
+ * Props for the sidebar root component
66
+ */
67
+ interface SidebarRootProps extends SidebarProps {
68
+ pathname: string;
69
+ navItemsAs?: React.ElementType;
70
+ navItemsProps?: (item: NavItemProps) => Record<string, any>;
71
+ }
72
+ /**
73
+ * Main props for the Sidebar component
74
+ */
75
+ export interface SidebarProps extends Omit<DrawerRootProps, 'open'> {
76
+ /** Custom breakpoint configuration for responsive behavior */
77
+ breakpoints?: any[] | Partial<Record<string, any>>;
78
+ /** Whether the sidebar is currently open/visible */
79
+ open: boolean;
80
+ /** Function to control the sidebar open/close state */
81
+ setOpen: (val: boolean) => void;
82
+ /** Reference to the container element where the drawer portal should be rendered */
83
+ containerRef: RefObject<HTMLElement | null> | undefined;
84
+ /** Path to the active item */
85
+ activePath?: string;
86
+ /** Child components (Header, Body, Footer) to render inside the sidebar */
87
+ children: ReactNode;
88
+ /** Custom theme configuration for styling */
89
+ theme?: SidebarTheme;
90
+ }
91
+ /**
92
+ * Sidebar component - A responsive sidebar with navigation sections
93
+ *
94
+ * @example
95
+ * ```tsx
96
+ * <Sidebar open={isOpen} setOpen={setIsOpen} containerRef={containerRef}>
97
+ * <Sidebar.Header>
98
+ * <Logo />
99
+ * </Sidebar.Header>
100
+ * <Sidebar.Body navSections={navigationSections} />
101
+ * </Sidebar>
102
+ * ```
103
+ */
104
+ declare const Sidebar: {
105
+ ({ breakpoints, open, setOpen, containerRef, children, theme, ...props }: SidebarProps): import("react/jsx-runtime").JSX.Element;
106
+ NavItem: import('react').NamedExoticComponent<NavItemProps>;
107
+ NavSection: import('react').NamedExoticComponent<NavSectionProps>;
108
+ Body: import('react').NamedExoticComponent<SidebarBodyProps>;
109
+ Header({ children, ...props }: {
110
+ children: ReactNode;
111
+ } & Partial<BoxProps>): import("react/jsx-runtime").JSX.Element;
112
+ Footer({ children, ...props }: {
113
+ children: ReactNode;
114
+ } & Partial<BoxProps>): import("react/jsx-runtime").JSX.Element;
115
+ Root: ({ pathname, navItemsAs, navItemsProps, ...props }: SidebarRootProps) => import("react/jsx-runtime").JSX.Element;
116
+ };
117
+ export { Sidebar };
@@ -0,0 +1,11 @@
1
+ import { Tooltip as ChakraTooltip } from '@chakra-ui/react';
2
+ import * as React from 'react';
3
+ export interface TooltipProps extends ChakraTooltip.RootProps {
4
+ showArrow?: boolean;
5
+ portalled?: boolean;
6
+ portalRef?: React.RefObject<HTMLElement>;
7
+ content: React.ReactNode;
8
+ contentProps?: ChakraTooltip.ContentProps;
9
+ disabled?: boolean;
10
+ }
11
+ export declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ import { IconButtonProps, SpanProps } from '@chakra-ui/react';
3
+ import { ThemeProviderProps } from 'next-themes';
4
+ export interface ColorModeProviderProps extends ThemeProviderProps {
5
+ }
6
+ export declare function ColorModeProvider(props: ColorModeProviderProps): import("react/jsx-runtime").JSX.Element;
7
+ export type ColorMode = 'light' | 'dark';
8
+ export interface UseColorModeReturn {
9
+ colorMode: ColorMode;
10
+ setColorMode: (colorMode: ColorMode) => void;
11
+ toggleColorMode: () => void;
12
+ }
13
+ export declare function useColorMode(): UseColorModeReturn;
14
+ export declare function useColorModeValue<T>(light: T, dark: T): T;
15
+ export declare function ColorModeIcon(): import("react/jsx-runtime").JSX.Element;
16
+ interface ColorModeButtonProps extends Omit<IconButtonProps, 'aria-label'> {
17
+ }
18
+ export declare const ColorModeButton: React.ForwardRefExoticComponent<ColorModeButtonProps & React.RefAttributes<HTMLButtonElement>>;
19
+ export declare const LightMode: React.ForwardRefExoticComponent<SpanProps & React.RefAttributes<HTMLSpanElement>>;
20
+ export declare const DarkMode: React.ForwardRefExoticComponent<SpanProps & React.RefAttributes<HTMLSpanElement>>;
21
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const toaster: import('@zag-js/toast').Store<any>;
2
+ export declare const Toaster: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ interface ScrollShadowProps {
3
+ children: ReactNode;
4
+ [key: string]: any;
5
+ }
6
+ export declare function ScrollShadow({ children, ...props }: ScrollShadowProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,12 @@
1
+ import { ColumnFiltersState, SortingState } from '@tanstack/react-table';
2
+ import { DataTableProps } from '../components';
3
+ /**
4
+ * Custom hook for managing DataTable state and configuration
5
+ */
6
+ export declare function useDataTable<TData>({ data, columns, pagination, enableFiltering, enableSorting, onFilterChange, onSortingChange, }: Pick<DataTableProps<TData>, 'data' | 'columns' | 'pagination' | 'enableFiltering' | 'enableSorting' | 'onFilterChange' | 'onSortingChange'>): {
7
+ table: import('@tanstack/table-core').Table<TData>;
8
+ columnFilters: ColumnFiltersState;
9
+ sorting: SortingState;
10
+ pageCount: number | undefined;
11
+ validatedPagination: import('../components').DataTablePagination | null;
12
+ };