@paygreen/pgui 2.14.10 → 3.0.1-beta

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 (158) 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 +44 -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 +49 -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 +9024 -0
  28. package/dist/pgui.css +1 -0
  29. package/dist/theme/index.d.ts +2 -0
  30. package/dist/theme/recipes/card-recipe.d.ts +15 -0
  31. package/dist/theme/recipes/index.d.ts +18 -0
  32. package/dist/theme/recipes/text-recipe.d.ts +2 -0
  33. package/dist/theme/semanticTokens/colors.d.ts +399 -0
  34. package/dist/theme/semanticTokens/index.d.ts +401 -0
  35. package/dist/theme/tokens/colors.d.ts +317 -0
  36. package/dist/theme/tokens/font-sizes.d.ts +42 -0
  37. package/dist/theme/tokens/fonts.d.ts +12 -0
  38. package/dist/theme/tokens/index.d.ts +465 -0
  39. package/dist/theme/tokens/radii.d.ts +39 -0
  40. package/dist/theme/tokens/sizes.d.ts +57 -0
  41. package/package.json +92 -103
  42. package/src/components/date-picker/date-picker.css +203 -0
  43. package/src/components/select/select.css +97 -0
  44. package/src/styles/index.css +12 -0
  45. package/dist/cjs/index.js +0 -60887
  46. package/dist/cjs/index.js.map +0 -1
  47. package/dist/cjs/types/components/ActionsButton/index.d.ts +0 -6
  48. package/dist/cjs/types/components/Card/index.d.ts +0 -3
  49. package/dist/cjs/types/components/ConfirmMenuItem/index.d.ts +0 -13
  50. package/dist/cjs/types/components/DataList/index.d.ts +0 -42
  51. package/dist/cjs/types/components/FormGroup/index.d.ts +0 -12
  52. package/dist/cjs/types/components/InputDayPicker/index.d.ts +0 -20
  53. package/dist/cjs/types/components/InputPhone/SearchOnList.d.ts +0 -19
  54. package/dist/cjs/types/components/InputPhone/index.d.ts +0 -12
  55. package/dist/cjs/types/components/InputRangePicker/index.d.ts +0 -25
  56. package/dist/cjs/types/components/ModalResponsive/index.d.ts +0 -5
  57. package/dist/cjs/types/components/Pagination/index.d.ts +0 -43
  58. package/dist/cjs/types/components/SearchInput/index.d.ts +0 -12
  59. package/dist/cjs/types/components/Select/index.d.ts +0 -120
  60. package/dist/cjs/types/components/Textarea/index.d.ts +0 -8
  61. package/dist/cjs/types/components/index.d.ts +0 -12
  62. package/dist/cjs/types/hooks/useClickOutside.d.ts +0 -3
  63. package/dist/cjs/types/index.d.ts +0 -4
  64. package/dist/cjs/types/layout/BottomBar/index.d.ts +0 -3
  65. package/dist/cjs/types/layout/LayoutContainer/index.d.ts +0 -3
  66. package/dist/cjs/types/layout/SideNav/index.d.ts +0 -21
  67. package/dist/cjs/types/layout/TopBar/index.d.ts +0 -10
  68. package/dist/cjs/types/layout/index.d.ts +0 -4
  69. package/dist/cjs/types/theme/components/alert.d.ts +0 -9
  70. package/dist/cjs/types/theme/components/badge.d.ts +0 -9
  71. package/dist/cjs/types/theme/components/button.d.ts +0 -163
  72. package/dist/cjs/types/theme/components/checkbox.d.ts +0 -11
  73. package/dist/cjs/types/theme/components/drawer.d.ts +0 -6
  74. package/dist/cjs/types/theme/components/form.d.ts +0 -8
  75. package/dist/cjs/types/theme/components/index.d.ts +0 -16
  76. package/dist/cjs/types/theme/components/input.d.ts +0 -58
  77. package/dist/cjs/types/theme/components/menu.d.ts +0 -9
  78. package/dist/cjs/types/theme/components/number-input.d.ts +0 -54
  79. package/dist/cjs/types/theme/components/pin-input.d.ts +0 -42
  80. package/dist/cjs/types/theme/components/radio.d.ts +0 -6
  81. package/dist/cjs/types/theme/components/slider.d.ts +0 -6
  82. package/dist/cjs/types/theme/components/switch.d.ts +0 -6
  83. package/dist/cjs/types/theme/components/tag.d.ts +0 -14
  84. package/dist/cjs/types/theme/components/textarea.d.ts +0 -54
  85. package/dist/cjs/types/theme/components/tooltip.d.ts +0 -8
  86. package/dist/cjs/types/theme/foundations/colors.d.ts +0 -66
  87. package/dist/cjs/types/theme/foundations/index.d.ts +0 -129
  88. package/dist/cjs/types/theme/foundations/radius.d.ts +0 -11
  89. package/dist/cjs/types/theme/foundations/shadows.d.ts +0 -10
  90. package/dist/cjs/types/theme/foundations/sizes.d.ts +0 -21
  91. package/dist/cjs/types/theme/foundations/typography.d.ts +0 -21
  92. package/dist/cjs/types/theme/index.d.ts +0 -1
  93. package/dist/cjs/types/theme/rawStyle/chakraStyle.d.ts +0 -2
  94. package/dist/cjs/types/theme/rawStyle/index.d.ts +0 -3
  95. package/dist/cjs/types/theme/rawStyle/reactDayPicker.d.ts +0 -23
  96. package/dist/cjs/types/theme/rawStyle/scrollbarStyles.d.ts +0 -11
  97. package/dist/cjs/types/theme/styles.d.ts +0 -2
  98. package/dist/cjs/types/theme/theme.d.ts +0 -1
  99. package/dist/cjs/types/utils/date.d.ts +0 -1
  100. package/dist/cjs/types/utils/index.d.ts +0 -2
  101. package/dist/cjs/types/utils/responsive.d.ts +0 -1
  102. package/dist/esm/index.js +0 -60814
  103. package/dist/esm/index.js.map +0 -1
  104. package/dist/esm/types/components/ActionsButton/index.d.ts +0 -6
  105. package/dist/esm/types/components/Card/index.d.ts +0 -3
  106. package/dist/esm/types/components/ConfirmMenuItem/index.d.ts +0 -13
  107. package/dist/esm/types/components/DataList/index.d.ts +0 -42
  108. package/dist/esm/types/components/FormGroup/index.d.ts +0 -12
  109. package/dist/esm/types/components/InputDayPicker/index.d.ts +0 -20
  110. package/dist/esm/types/components/InputPhone/SearchOnList.d.ts +0 -19
  111. package/dist/esm/types/components/InputPhone/index.d.ts +0 -12
  112. package/dist/esm/types/components/InputRangePicker/index.d.ts +0 -25
  113. package/dist/esm/types/components/ModalResponsive/index.d.ts +0 -5
  114. package/dist/esm/types/components/Pagination/index.d.ts +0 -43
  115. package/dist/esm/types/components/SearchInput/index.d.ts +0 -12
  116. package/dist/esm/types/components/Select/index.d.ts +0 -120
  117. package/dist/esm/types/components/Textarea/index.d.ts +0 -8
  118. package/dist/esm/types/components/index.d.ts +0 -12
  119. package/dist/esm/types/hooks/useClickOutside.d.ts +0 -3
  120. package/dist/esm/types/index.d.ts +0 -4
  121. package/dist/esm/types/layout/BottomBar/index.d.ts +0 -3
  122. package/dist/esm/types/layout/LayoutContainer/index.d.ts +0 -3
  123. package/dist/esm/types/layout/SideNav/index.d.ts +0 -21
  124. package/dist/esm/types/layout/TopBar/index.d.ts +0 -10
  125. package/dist/esm/types/layout/index.d.ts +0 -4
  126. package/dist/esm/types/theme/components/alert.d.ts +0 -9
  127. package/dist/esm/types/theme/components/badge.d.ts +0 -9
  128. package/dist/esm/types/theme/components/button.d.ts +0 -163
  129. package/dist/esm/types/theme/components/checkbox.d.ts +0 -11
  130. package/dist/esm/types/theme/components/drawer.d.ts +0 -6
  131. package/dist/esm/types/theme/components/form.d.ts +0 -8
  132. package/dist/esm/types/theme/components/index.d.ts +0 -16
  133. package/dist/esm/types/theme/components/input.d.ts +0 -58
  134. package/dist/esm/types/theme/components/menu.d.ts +0 -9
  135. package/dist/esm/types/theme/components/number-input.d.ts +0 -54
  136. package/dist/esm/types/theme/components/pin-input.d.ts +0 -42
  137. package/dist/esm/types/theme/components/radio.d.ts +0 -6
  138. package/dist/esm/types/theme/components/slider.d.ts +0 -6
  139. package/dist/esm/types/theme/components/switch.d.ts +0 -6
  140. package/dist/esm/types/theme/components/tag.d.ts +0 -14
  141. package/dist/esm/types/theme/components/textarea.d.ts +0 -54
  142. package/dist/esm/types/theme/components/tooltip.d.ts +0 -8
  143. package/dist/esm/types/theme/foundations/colors.d.ts +0 -66
  144. package/dist/esm/types/theme/foundations/index.d.ts +0 -129
  145. package/dist/esm/types/theme/foundations/radius.d.ts +0 -11
  146. package/dist/esm/types/theme/foundations/shadows.d.ts +0 -10
  147. package/dist/esm/types/theme/foundations/sizes.d.ts +0 -21
  148. package/dist/esm/types/theme/foundations/typography.d.ts +0 -21
  149. package/dist/esm/types/theme/index.d.ts +0 -1
  150. package/dist/esm/types/theme/rawStyle/chakraStyle.d.ts +0 -2
  151. package/dist/esm/types/theme/rawStyle/index.d.ts +0 -3
  152. package/dist/esm/types/theme/rawStyle/reactDayPicker.d.ts +0 -23
  153. package/dist/esm/types/theme/rawStyle/scrollbarStyles.d.ts +0 -11
  154. package/dist/esm/types/theme/styles.d.ts +0 -2
  155. package/dist/esm/types/theme/theme.d.ts +0 -1
  156. package/dist/esm/types/utils/date.d.ts +0 -1
  157. package/dist/esm/types/utils/index.d.ts +0 -2
  158. package/dist/esm/types/utils/responsive.d.ts +0 -1
package/README.md CHANGED
@@ -1,109 +1,178 @@
1
- # PGUI 🌿
1
+ # @paygreen/pgui
2
2
 
3
- ## Information
4
- PGUI is the current Paygreen's Design System. The purpose of the package is to provide Components for [Paygreen](https://paygreen.io) applications that works with [Chakra UI](https://chakra-ui.com)
5
- ___
3
+ Core UI components library for Paygreen applications built with React and Chakra UI.
6
4
 
7
- ## Getting Started
8
- To setup PGUI in a local environment, please install the package in your target project.
5
+ ## 📦 Installation
9
6
 
10
- ```bash
11
- npm i @paygreen/pgui
12
- ```
7
+ ### Base Installation
13
8
 
14
- ```javascript
15
- import { ChakraProvider } from '@chakra-ui/react';
16
- import { theme } from '@paygreen/pgui',
9
+ ```bash
10
+ # Install the core library
11
+ npm install @paygreen/pgui
17
12
 
18
- <ChakraProvider theme={theme}>
19
- {Your App}
20
- </ChakraProvider>
13
+ # Install required peer dependencies
14
+ npm install react react-dom @chakra-ui/react @emotion/react @emotion/styled framer-motion
21
15
  ```
22
- ___
23
16
 
24
- ## Develop a new component
17
+ ### Component-Specific Dependencies
25
18
 
26
- If you need to develop or update a component you will need to create a new folder with your component's name inside ```src/components```. Inside this folder you'll need to create 2 files, ```index.tsx``` and ```docs.stories.tsx``` if needed.
19
+ Install additional packages based on the components you want to use:
27
20
 
28
- Don't hesite to refer yourself to ```FormGroup``` component which is a good simple component created with Chakra.
21
+ | Component | Required Package | Command |
22
+ |-----------|------------------|---------|
23
+ | **DatePicker** | `react-datepicker` | `npm install react-datepicker` |
24
+ | **Select** | `react-select` | `npm install react-select` |
25
+ | **InputPhone** | `react-phone-number-input` | `npm install react-phone-number-input` |
26
+ | **InputMask** | `use-mask-input` | `npm install use-mask-input` |
27
+ | **DataTable** | `@tanstack/react-table` | `npm install @tanstack/react-table` |
28
+ | **All Icons** | `react-icons` | `npm install react-icons` |
29
29
 
30
- When your component is finished, you will need to export it globally on the
31
- ```src/components/index.ts``` and ```src/index.ts``` file.
30
+ ### Complete Installation (All Components)
32
31
 
33
- To make your modifications accessible, build the package with rollup.
34
32
  ```bash
35
- npm run build
33
+ # Install everything at once
34
+ npm install @paygreen/pgui react react-dom @chakra-ui/react @emotion/react @emotion/styled framer-motion react-datepicker react-select react-phone-number-input use-mask-input @tanstack/react-table react-icons
36
35
  ```
37
- ___
38
36
 
39
- ## Storybook
37
+ ## 🎨 CSS Setup
40
38
 
41
- When you add a component and you write documentation, you can see it in storybook.
42
- To run storybook please use the command
43
- ```bash
44
- npm run storybook
39
+ ```javascript
40
+ // In your main App.js or index.js
41
+ import '@paygreen/pgui/src/styles/index.css';
45
42
  ```
46
43
 
47
- It should open you storybook on your localhost:6006 port.
48
- ___
44
+ ## 🚀 Basic Usage
49
45
 
50
- ## Link PGUI development into your current React project
46
+ ```javascript
47
+ import React from 'react';
48
+ import { ChakraProvider } from '@chakra-ui/react';
49
+ import { DatePicker, Select, Input, systemTheme } from '@paygreen/pgui';
50
+ import '@paygreen/pgui/src/styles/index.css';
51
+
52
+ function App() {
53
+ return (
54
+ <ChakraProvider value={systemTheme}>
55
+ {/* Your components */}
56
+ </ChakraProvider>
57
+ );
58
+ }
59
+ ```
60
+
61
+ ## 🔧 Development & Testing
62
+
63
+ ### Why YALC?
51
64
 
52
- You will need to link Chakra UI and React packages from your target project to PGUI and then link PGUI to your target project as the schema explains here.
65
+ **YALC** (Yet Another Local Cache) is the best tool for testing libraries locally because it:
53
66
 
54
- ![Screenshot](pgui-schema.png)
67
+ - ✅ **No symlinks** - Avoids React duplicate issues from `npm link`
68
+ - ✅ **Real package simulation** - Works exactly like published packages
69
+ - ✅ **Fast updates** - Push changes instantly to consuming projects
70
+ - ✅ **No conflicts** - Prevents peer dependency resolution issues
71
+ - ✅ **Production-like** - Tests the actual built package, not source
55
72
 
56
- To do that please follow these steps
73
+ ### Setting up YALC
74
+
75
+ #### 1. Install YALC globally
57
76
 
58
- 1. in ```/target_app/node_modules/@chakra-ui/react```, this will create 1st symlink to @chakra-ui/react
59
77
  ```bash
60
- npm link
78
+ npm install -g yalc
61
79
  ```
62
80
 
63
- 2. in ```/target_app/node_modules/react```, this will create 2nd symlink react
81
+ #### 2. In this library (pgui/)
82
+
64
83
  ```bash
65
- npm link
84
+ # Generate types if necessary
85
+ npx @chakra-ui/cli typegen ./src/theme/index.ts
86
+
87
+ # Build and publish to local store
88
+ npm run build
89
+ yalc publish
90
+
91
+ # For development - rebuild and push changes
92
+ npm run build
93
+ yalc push # Updates all projects using this package
66
94
  ```
67
95
 
68
- 3. in ```/pgui```, this will create 3rd symlink to pgui library
96
+ #### 3. In your test project
97
+
69
98
  ```bash
70
- npm link
99
+ # Install from local YALC store
100
+ yalc add @paygreen/pgui
101
+ npm install
102
+
103
+ # When done testing, clean up
104
+ yalc remove @paygreen/pgui
105
+ npm install @paygreen/pgui # Back to npm registry
71
106
  ```
72
107
 
73
- 4. in ```/pgui```, this will link your local packages @chakra-ui/react and react
108
+ ### Development Workflow
109
+
74
110
  ```bash
75
- npm run link-local-lib
111
+ # 1. Make changes to components in pgui/
112
+ # 2. Build and push
113
+ npm run build && yalc push
114
+
115
+ # 3. Your test project automatically gets the updates
116
+ # 4. Test your changes
117
+
118
+ # 5. When ready, publish to npm
119
+ npm publish
76
120
  ```
77
121
 
78
- 5. in ```/pgui```, this will build your project
122
+ ### Useful YALC Commands
123
+
79
124
  ```bash
80
- npm run build
125
+ # See which packages are published locally
126
+ yalc installations show
127
+
128
+ # Remove package from YALC store
129
+ yalc remove @paygreen/pgui --all
130
+
131
+ # Clean all YALC installations
132
+ yalc remove --all
81
133
  ```
82
134
 
83
- 6. in ```/target_app```, this will link pgui to your local app directory
135
+ ## 🏗️ Building
136
+
84
137
  ```bash
85
- npm link @paygreen/pgui
138
+ # Build the library
139
+ npm run build
140
+
141
+ # Output files:
142
+ # - dist/index.mjs (ES modules)
143
+ # - dist/index.js (CommonJS)
144
+ # - dist/index.d.ts (TypeScript definitions)
145
+ # - dist/pgui.css (Compiled styles)
86
146
  ```
87
147
 
88
- 7. it should works well, you just now have to link your theme with the one on PGUI on your ChakraProvider in your target project, and then use the components you need! 🥳
148
+ ## 🐛 Troubleshooting
89
149
 
90
- > See all links
91
- ```
92
- npm ls --link --global
150
+ ### CSS Not Loading
151
+
152
+ Make sure you import the CSS file:
153
+
154
+ ```javascript
155
+ import '@paygreen/pgui/src/styles/index.css';
93
156
  ```
94
157
 
95
- Instead of use npm link, to real-time testing your component, run ```npx relative-deps``` in the APP project ad restart it.
158
+ ### Missing Dependencies
96
159
 
97
- Then your modifications will be available on your target project.
160
+ If you get an error about missing packages, install the required dependency for the component you're using (see table above).
98
161
 
99
- ___
162
+ ### Source Map Warnings
100
163
 
101
- ## Troubleshooting
164
+ If you see warnings about react-datepicker source maps, add this to your `.env` file:
102
165
 
103
- ### React Invalid Hook Call Warning
104
- If you have an error based on [React Invalid Hook Call Warning](https://reactjs.org/warnings/invalid-hook-call-warning.html), this is because you're trying to use the local project without npm link (on chakra-ui/react or react). Please use the command to normally solve it
105
166
  ```bash
106
- npm run link-local-lib
167
+ GENERATE_SOURCEMAP=false
107
168
  ```
108
169
 
109
- If it doesn't work, please refer to Getting Started guide to check the npm link process.
170
+ ## 📋 Requirements
171
+
172
+ - **React** ^18.0.0 || ^19.0.0
173
+ - **Node.js** >= 16
174
+ - **TypeScript** >= 4.5 (if using TypeScript)
175
+
176
+ ## 📄 License
177
+
178
+ Private - Paygreen Internal Use Only
@@ -0,0 +1,21 @@
1
+ import { ReactElement } from 'react';
2
+ import { IconButtonProps } from '@chakra-ui/react';
3
+ /**
4
+ * Props for the ActionsButton component
5
+ */
6
+ export interface ActionsButtonProps extends Omit<IconButtonProps, 'aria-label' | 'icon'> {
7
+ /** Accessible label for the action button (used for aria-label) */
8
+ label: string;
9
+ /** Optional custom icon to display instead of the default three dots */
10
+ icon?: ReactElement;
11
+ }
12
+ /**
13
+ * ActionsButton component - A semantic action button for triggering contextual menus
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <ActionsButton label="Open actions menu" />
18
+ * ```
19
+ */
20
+ declare const ActionsButton: import('react').ForwardRefExoticComponent<ActionsButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
21
+ export { ActionsButton };
@@ -0,0 +1,87 @@
1
+ import { AccordionItemProps, AccordionRootProps, FlexProps } from '@chakra-ui/react';
2
+ /**
3
+ * Record mapping column names to their configuration properties
4
+ */
5
+ interface DataListColumns extends Record<string, DataListCellProps> {
6
+ }
7
+ /**
8
+ * Props for individual data list cells that represent table columns
9
+ */
10
+ interface DataListCellProps extends FlexProps {
11
+ /** Unique identifier for the column, used to link header and body cells */
12
+ colName?: string;
13
+ /** Column width configuration - can be relative number, CSS unit, or responsive object */
14
+ colWidth?: string | number | Record<string, string | number>;
15
+ /** Column visibility configuration - can be boolean or responsive object */
16
+ isVisible?: boolean | boolean[] | Record<string, boolean>;
17
+ }
18
+ /**
19
+ * Props for accordion items within the DataList
20
+ */
21
+ interface DataListAccordionProps extends AccordionItemProps {
22
+ /** Unique string identifier for the accordion item */
23
+ value: string;
24
+ }
25
+ /**
26
+ * Props for DataList row components
27
+ */
28
+ interface DataListRowProps extends FlexProps {
29
+ /** Row visibility configuration - can be boolean or responsive object */
30
+ isVisible?: boolean | boolean[] | Record<string, boolean>;
31
+ /** Whether the row is disabled (grayed out and non-interactive) */
32
+ isDisabled?: boolean;
33
+ }
34
+ /**
35
+ * Props for DataList header component
36
+ */
37
+ interface DataListHeaderProps extends DataListRowProps {
38
+ }
39
+ /**
40
+ * Props for DataList footer component
41
+ */
42
+ interface DataListFooterProps extends DataListRowProps {
43
+ }
44
+ /**
45
+ * Main props for the DataList component
46
+ */
47
+ interface DataListProps extends AccordionRootProps {
48
+ /** Whether to enable hover effects on rows */
49
+ isHover?: boolean;
50
+ }
51
+ /**
52
+ * DataList component - A flexible data list with accordion functionality
53
+ *
54
+ * @example
55
+ * ```tsx
56
+ * <DataList>
57
+ * <DataList.Header>
58
+ * <DataList.Cell colName="name">Name</DataList.Cell>
59
+ * <DataList.Cell colName="email">Email</DataList.Cell>
60
+ * </DataList.Header>
61
+ * <DataList.Row>
62
+ * <DataList.Cell colName="name">John Doe</DataList.Cell>
63
+ * <DataList.Cell colName="email">john@example.com</DataList.Cell>
64
+ * </DataList.Row>
65
+ * </DataList>
66
+ * ```
67
+ */
68
+ declare const DataList: {
69
+ ({ multiple, collapsible, isHover, ...rest }: DataListProps): import("react/jsx-runtime").JSX.Element;
70
+ Cell: import('react').NamedExoticComponent<DataListCellProps>;
71
+ Row({ isVisible, isDisabled, ...rest }: DataListRowProps): import("react/jsx-runtime").JSX.Element;
72
+ Header({ ...rest }: DataListHeaderProps): import("react/jsx-runtime").JSX.Element;
73
+ Footer({ ...rest }: DataListFooterProps): import("react/jsx-runtime").JSX.Element;
74
+ Accordion({ value, ...rest }: DataListAccordionProps): import("react/jsx-runtime").JSX.Element;
75
+ AccordionButton({ ...rest }: {
76
+ [x: string]: any;
77
+ }): import("react/jsx-runtime").JSX.Element;
78
+ AccordionIcon({ ...rest }: {
79
+ [x: string]: any;
80
+ }): import("react/jsx-runtime").JSX.Element;
81
+ AccordionPanel({ ...rest }: {
82
+ [x: string]: any;
83
+ }): import("react/jsx-runtime").JSX.Element;
84
+ displayName: string;
85
+ };
86
+ export { DataList };
87
+ export type { DataListAccordionProps, DataListCellProps, DataListColumns, DataListFooterProps, DataListHeaderProps, DataListProps, DataListRowProps, };
@@ -0,0 +1,67 @@
1
+ import { ReactNode } from 'react';
2
+ import { ColumnDef, ColumnFiltersState, SortingState } from '@tanstack/react-table';
3
+ import { PaginationProps } from '../pagination/pagination';
4
+ /**
5
+ * Configuration for DataTable pagination
6
+ */
7
+ export interface DataTablePagination extends PaginationProps {
8
+ /** Whether to enable client-side pagination (all data loaded at once) */
9
+ enableClientSide?: boolean;
10
+ }
11
+ /**
12
+ * Props for the DataTable component
13
+ */
14
+ export interface DataTableProps<TData> {
15
+ /** Array of data objects to display in the table */
16
+ data: TData[];
17
+ /** Column definitions for the table structure and rendering */
18
+ columns: ColumnDef<TData, any>[];
19
+ /** Pagination configuration (optional) */
20
+ pagination?: DataTablePagination;
21
+ /** Visual variant of the table */
22
+ variant?: 'simple' | 'striped';
23
+ /** Enable column filtering functionality */
24
+ enableFiltering?: boolean;
25
+ /** Enable column sorting functionality */
26
+ enableSorting?: boolean;
27
+ /** Content to display when no data is available */
28
+ emptyState?: ReactNode;
29
+ /** Enable responsive behavior (mobile cards view) */
30
+ responsive?: boolean;
31
+ /** Mobile view mode when responsive is enabled */
32
+ mobileView?: 'cards' | 'scroll';
33
+ /** Force mobile view regardless of screen size */
34
+ isMobile?: boolean;
35
+ /** Show loading state */
36
+ isLoading?: boolean;
37
+ /** Callback fired when column filters change */
38
+ onFilterChange?: (filters: ColumnFiltersState) => void;
39
+ /** Callback fired when sorting changes */
40
+ onSortingChange?: (sorting: SortingState) => void;
41
+ /** Callback fired when a row is clicked */
42
+ onRowClick?: (row: TData) => void;
43
+ }
44
+ /**
45
+ * DataTable component - A flexible, responsive data table with sorting, filtering, and pagination
46
+ *
47
+ * @example
48
+ * ```tsx
49
+ * <DataTable
50
+ * data={users}
51
+ * columns={columns}
52
+ * enableSorting
53
+ * enableFiltering
54
+ * pagination={{
55
+ * page: 1,
56
+ * pageSize: 10,
57
+ * totalItems: 100,
58
+ * setPage: setCurrentPage
59
+ * }}
60
+ * />
61
+ * ```
62
+ */
63
+ declare function DataTable<TData>({ data, columns, pagination, variant, enableFiltering, enableSorting, emptyState, responsive, mobileView, isMobile, isLoading, onFilterChange, onSortingChange, onRowClick, }: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element;
64
+ declare namespace DataTable {
65
+ var displayName: string;
66
+ }
67
+ export { DataTable };
@@ -0,0 +1,44 @@
1
+ import { Locale } from 'date-fns';
2
+ /**
3
+ * Props for the DatePicker component
4
+ */
5
+ export interface DatePickerProps {
6
+ /** The selected date or date range */
7
+ value?: Date | [Date | null, Date | null] | null;
8
+ /** Label text displayed above the input */
9
+ label?: string;
10
+ /** Callback fired when the date selection changes */
11
+ onChange?: (date: Date | [Date | null, Date | null] | null) => void;
12
+ /** Whether to enable date range selection */
13
+ isRange?: boolean;
14
+ /** Whether to enable time selection */
15
+ isDateTime?: boolean;
16
+ /** Placeholder text for the input */
17
+ placeholderText?: string;
18
+ /** Locale for date formatting and translations */
19
+ locale?: Locale;
20
+ /** Minimum selectable date */
21
+ minDate?: Date;
22
+ /** Maximum selectable date */
23
+ maxDate?: Date;
24
+ /** Custom date format string */
25
+ dateFormat?: string;
26
+ /** Callback fired when the input loses focus */
27
+ onBlur?: () => void;
28
+ /** Whether the input is disabled */
29
+ isDisabled?: boolean;
30
+ }
31
+ /**
32
+ * A reusable date picker component with floating label and range selection support
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * <DatePicker
37
+ * label="Birthdate"
38
+ * value={date}
39
+ * onChange={setDate}
40
+ * />
41
+ * ```
42
+ */
43
+ declare const DatePicker: import('react').ForwardRefExoticComponent<DatePickerProps & import('react').RefAttributes<HTMLInputElement>>;
44
+ export { DatePicker };
@@ -0,0 +1,50 @@
1
+ import { ReactNode } from 'react';
2
+ interface FieldContextType {
3
+ /** Whether the field is invalid */
4
+ isInvalid?: boolean;
5
+ /** Whether the field is required */
6
+ isRequired?: boolean;
7
+ /** Whether the field is disabled */
8
+ isDisabled?: boolean;
9
+ }
10
+ export interface FieldWrapperProps {
11
+ /** The field label */
12
+ label?: string;
13
+ /** The error message to display */
14
+ errorMessage?: string;
15
+ /** Whether the field is invalid */
16
+ isInvalid?: boolean;
17
+ /** Whether the field is required */
18
+ isRequired?: boolean;
19
+ /** Whether the field is disabled */
20
+ isDisabled?: boolean;
21
+ /** Helper text to display below the field */
22
+ helperText?: string;
23
+ /** The field content (input, select, etc.) */
24
+ children: ReactNode;
25
+ /** Additional props for the field root */
26
+ fieldRootProps?: Record<string, any>;
27
+ /** Additional props for the field container */
28
+ containerProps?: Record<string, any>;
29
+ }
30
+ /**
31
+ * FieldWrapper component - A wrapper for form fields with label, error message, and context
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * <FieldWrapper
36
+ * label="Email"
37
+ * errorMessage="Please enter a valid email"
38
+ * isInvalid={hasError}
39
+ * isRequired
40
+ * >
41
+ * <Input type="email" />
42
+ * </FieldWrapper>
43
+ * ```
44
+ */
45
+ declare const FieldWrapper: import('react').ForwardRefExoticComponent<FieldWrapperProps & import('react').RefAttributes<HTMLDivElement>>;
46
+ /**
47
+ * Hook to access the field context
48
+ */
49
+ declare const useField: () => FieldContextType;
50
+ export { FieldWrapper, useField };
@@ -0,0 +1,19 @@
1
+ export * from './actions-button/actions-button';
2
+ export * from './data-list/datalist';
3
+ export * from './data-table/data-table';
4
+ export * from './date-picker/date-picker';
5
+ export * from './field-wrapper/field-wrapper';
6
+ export * from './input-mask/input-mask';
7
+ export * from './input-password/input-password';
8
+ export * from './input-phone/input-phone';
9
+ export * from './input-search/input-search';
10
+ export * from './input/input';
11
+ export * from './loader/loader';
12
+ export * from './logos/logoPaygreenByLemonway';
13
+ export * from './modal/modal';
14
+ export * from './pagination/pagination';
15
+ export * from './select/select';
16
+ export * from './sidebar/sidebar';
17
+ export * from './tooltip/tooltip';
18
+ export * from './ui/color-mode';
19
+ export * from './ui/toaster';
@@ -0,0 +1,24 @@
1
+ import { InputProps as ChakraInputProps } from '@chakra-ui/react';
2
+ /**
3
+ * Props for the Input component
4
+ */
5
+ export interface InputProps extends ChakraInputProps {
6
+ /** Label text displayed above the input */
7
+ label?: string;
8
+ /** Whether the input is disabled */
9
+ isDisabled?: boolean;
10
+ }
11
+ /**
12
+ * A reusable input component that extends Chakra UI's Input with floating label and field validation
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <Input
17
+ * label="Email"
18
+ * placeholder="Enter your email"
19
+ * isRequired
20
+ * />
21
+ * ```
22
+ */
23
+ declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
24
+ export { Input };
@@ -0,0 +1,28 @@
1
+ import { ChangeEvent } from 'react';
2
+ import { InputProps } from '../input/input';
3
+ /**
4
+ * Props for the InputMask component
5
+ */
6
+ export interface InputMaskProps extends Omit<InputProps, 'onChange'> {
7
+ /** The mask pattern to apply to the input */
8
+ mask: string | string[];
9
+ /** Additional options for the mask behavior */
10
+ maskOptions?: any;
11
+ /** Callback fired when the input value changes */
12
+ onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
13
+ }
14
+ /**
15
+ * A reusable input component that extends the base Input with mask functionality
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * <InputMask
20
+ * label="Phone"
21
+ * mask="(999) 999-9999"
22
+ * placeholder="(555) 555-5555"
23
+ * isRequired
24
+ * />
25
+ * ```
26
+ */
27
+ declare const InputMask: import('react').ForwardRefExoticComponent<InputMaskProps & import('react').RefAttributes<HTMLInputElement>>;
28
+ export { InputMask };
@@ -0,0 +1,34 @@
1
+ import { GroupProps, InputProps, StackProps } from '@chakra-ui/react';
2
+ import * as React from 'react';
3
+ interface PasswordStrengthMeterProps extends StackProps {
4
+ max?: number;
5
+ value: number;
6
+ }
7
+ declare const PasswordStrengthMeter: React.ForwardRefExoticComponent<PasswordStrengthMeterProps & React.RefAttributes<HTMLDivElement>>;
8
+ export interface PasswordVisibilityProps {
9
+ /**
10
+ * The default visibility state of the password input.
11
+ */
12
+ defaultVisible?: boolean;
13
+ /**
14
+ * The controlled visibility state of the password input.
15
+ */
16
+ visible?: boolean;
17
+ /**
18
+ * Callback invoked when the visibility state changes.
19
+ */
20
+ onVisibleChange?: (visible: boolean) => void;
21
+ /**
22
+ * Custom icons for the visibility toggle button.
23
+ */
24
+ visibilityIcon?: {
25
+ on: React.ReactNode;
26
+ off: React.ReactNode;
27
+ };
28
+ }
29
+ export interface InputPasswordProps extends InputProps, PasswordVisibilityProps {
30
+ rootProps?: GroupProps;
31
+ label?: string;
32
+ }
33
+ declare const InputPassword: React.ForwardRefExoticComponent<InputPasswordProps & React.RefAttributes<HTMLInputElement>>;
34
+ export { InputPassword, PasswordStrengthMeter };