@delightui/components 0.1.3 → 0.1.4

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 (262) hide show
  1. package/package.json +6 -1
  2. package/dist/cjs/App.d.ts +0 -6
  3. package/dist/cjs/App.utils.d.ts +0 -2
  4. package/dist/cjs/components/atoms/ActionCard/ActionCard.d.ts +0 -7
  5. package/dist/cjs/components/atoms/ActionCard/ActionCard.types.d.ts +0 -16
  6. package/dist/cjs/components/atoms/ActionCard/index.d.ts +0 -4
  7. package/dist/cjs/components/atoms/ActionImage/ActionImage.d.ts +0 -7
  8. package/dist/cjs/components/atoms/ActionImage/ActionImage.types.d.ts +0 -12
  9. package/dist/cjs/components/atoms/ActionImage/index.d.ts +0 -4
  10. package/dist/cjs/components/atoms/Button/Button.d.ts +0 -7
  11. package/dist/cjs/components/atoms/Button/Button.types.d.ts +0 -53
  12. package/dist/cjs/components/atoms/Button/index.d.ts +0 -4
  13. package/dist/cjs/components/atoms/Card/Card.d.ts +0 -7
  14. package/dist/cjs/components/atoms/Card/Card.types.d.ts +0 -11
  15. package/dist/cjs/components/atoms/Card/index.d.ts +0 -4
  16. package/dist/cjs/components/atoms/Checkbox/Checkbox.d.ts +0 -3
  17. package/dist/cjs/components/atoms/Checkbox/index.d.ts +0 -2
  18. package/dist/cjs/components/atoms/Checkbox/types.d.ts +0 -8
  19. package/dist/cjs/components/atoms/Icon/Icon.d.ts +0 -4
  20. package/dist/cjs/components/atoms/Icon/Icon.types.d.ts +0 -22
  21. package/dist/cjs/components/atoms/Icon/index.d.ts +0 -4
  22. package/dist/cjs/components/atoms/Icon/useDynamicSVGImport.d.ts +0 -5
  23. package/dist/cjs/components/atoms/IconButton/IconButton.d.ts +0 -4
  24. package/dist/cjs/components/atoms/IconButton/IconButton.types.d.ts +0 -9
  25. package/dist/cjs/components/atoms/IconButton/index.d.ts +0 -4
  26. package/dist/cjs/components/atoms/Image/image.d.ts +0 -3
  27. package/dist/cjs/components/atoms/Image/image.types.d.ts +0 -33
  28. package/dist/cjs/components/atoms/Image/index.d.ts +0 -4
  29. package/dist/cjs/components/atoms/Input/Input.d.ts +0 -10
  30. package/dist/cjs/components/atoms/Input/Input.types.d.ts +0 -34
  31. package/dist/cjs/components/atoms/Input/index.d.ts +0 -4
  32. package/dist/cjs/components/atoms/List/List.d.ts +0 -4
  33. package/dist/cjs/components/atoms/List/List.types.d.ts +0 -32
  34. package/dist/cjs/components/atoms/List/index.d.ts +0 -4
  35. package/dist/cjs/components/atoms/Password/Password.d.ts +0 -4
  36. package/dist/cjs/components/atoms/Password/Password.types.d.ts +0 -4
  37. package/dist/cjs/components/atoms/Password/index.d.ts +0 -2
  38. package/dist/cjs/components/atoms/Spinner/Spinner.d.ts +0 -4
  39. package/dist/cjs/components/atoms/Spinner/Spinner.types.d.ts +0 -3
  40. package/dist/cjs/components/atoms/Spinner/index.d.ts +0 -4
  41. package/dist/cjs/components/atoms/Text/Text.d.ts +0 -7
  42. package/dist/cjs/components/atoms/Text/Text.types.d.ts +0 -61
  43. package/dist/cjs/components/atoms/Text/contants.d.ts +0 -14
  44. package/dist/cjs/components/atoms/Text/index.d.ts +0 -4
  45. package/dist/cjs/components/atoms/TextArea/TextArea.d.ts +0 -8
  46. package/dist/cjs/components/atoms/TextArea/TextArea.types.d.ts +0 -21
  47. package/dist/cjs/components/atoms/TextArea/index.d.ts +0 -4
  48. package/dist/cjs/components/atoms/index.d.ts +0 -26
  49. package/dist/cjs/components/index.d.ts +0 -3
  50. package/dist/cjs/components/molecules/ContextMenu/ContextMenu.d.ts +0 -7
  51. package/dist/cjs/components/molecules/ContextMenu/ContextMenu.types.d.ts +0 -64
  52. package/dist/cjs/components/molecules/ContextMenu/MenuItem/MenuItem.d.ts +0 -9
  53. package/dist/cjs/components/molecules/ContextMenu/MenuItem/MenuItem.types.d.ts +0 -24
  54. package/dist/cjs/components/molecules/ContextMenu/MenuItem/index.d.ts +0 -4
  55. package/dist/cjs/components/molecules/ContextMenu/index.d.ts +0 -6
  56. package/dist/cjs/components/molecules/DatePicker/DatePicker.d.ts +0 -7
  57. package/dist/cjs/components/molecules/DatePicker/DatePicker.types.d.ts +0 -56
  58. package/dist/cjs/components/molecules/DatePicker/index.d.ts +0 -4
  59. package/dist/cjs/components/molecules/FormField/FormField.d.ts +0 -4
  60. package/dist/cjs/components/molecules/FormField/FormField.types.d.ts +0 -124
  61. package/dist/cjs/components/molecules/FormField/FormFieldContext.d.ts +0 -5
  62. package/dist/cjs/components/molecules/FormField/index.d.ts +0 -7
  63. package/dist/cjs/components/molecules/FormField/useField.d.ts +0 -11
  64. package/dist/cjs/components/molecules/Modal/Modal.d.ts +0 -7
  65. package/dist/cjs/components/molecules/Modal/Modal.types.d.ts +0 -54
  66. package/dist/cjs/components/molecules/Modal/index.d.ts +0 -4
  67. package/dist/cjs/components/molecules/Nav/Nav.d.ts +0 -4
  68. package/dist/cjs/components/molecules/Nav/Nav.types.d.ts +0 -2
  69. package/dist/cjs/components/molecules/Nav/NavItem/NavItem.d.ts +0 -4
  70. package/dist/cjs/components/molecules/Nav/NavItem/NavItem.types.d.ts +0 -2
  71. package/dist/cjs/components/molecules/Nav/NavItem/index.d.ts +0 -4
  72. package/dist/cjs/components/molecules/Nav/NavLink/NavLink.d.ts +0 -4
  73. package/dist/cjs/components/molecules/Nav/NavLink/NavLink.types.d.ts +0 -16
  74. package/dist/cjs/components/molecules/Nav/NavLink/index.d.ts +0 -4
  75. package/dist/cjs/components/molecules/Nav/index.d.ts +0 -8
  76. package/dist/cjs/components/molecules/Popover/Popover.d.ts +0 -7
  77. package/dist/cjs/components/molecules/Popover/Popover.types.d.ts +0 -85
  78. package/dist/cjs/components/molecules/Popover/Popover.utils.d.ts +0 -30
  79. package/dist/cjs/components/molecules/Popover/index.d.ts +0 -4
  80. package/dist/cjs/components/molecules/Select/Option/Option.d.ts +0 -10
  81. package/dist/cjs/components/molecules/Select/Option/Option.types.d.ts +0 -32
  82. package/dist/cjs/components/molecules/Select/Option/index.d.ts +0 -4
  83. package/dist/cjs/components/molecules/Select/Select.Context.d.ts +0 -18
  84. package/dist/cjs/components/molecules/Select/Select.d.ts +0 -11
  85. package/dist/cjs/components/molecules/Select/Select.types.d.ts +0 -128
  86. package/dist/cjs/components/molecules/Select/Select.utils.d.ts +0 -33
  87. package/dist/cjs/components/molecules/Select/index.d.ts +0 -15
  88. package/dist/cjs/components/molecules/TabContent/TabContent.d.ts +0 -4
  89. package/dist/cjs/components/molecules/TabContent/TabContent.types.d.ts +0 -20
  90. package/dist/cjs/components/molecules/TabContent/index.d.ts +0 -4
  91. package/dist/cjs/components/molecules/TabItem/TabItem.d.ts +0 -4
  92. package/dist/cjs/components/molecules/TabItem/TabItem.types.d.ts +0 -19
  93. package/dist/cjs/components/molecules/TabItem/index.d.ts +0 -4
  94. package/dist/cjs/components/molecules/TableBody/TableBody.d.ts +0 -4
  95. package/dist/cjs/components/molecules/TableBody/TableBody.types.d.ts +0 -2
  96. package/dist/cjs/components/molecules/TableBody/index.d.ts +0 -4
  97. package/dist/cjs/components/molecules/TableCell/TableCell.d.ts +0 -4
  98. package/dist/cjs/components/molecules/TableCell/TableCell.types.d.ts +0 -2
  99. package/dist/cjs/components/molecules/TableCell/index.d.ts +0 -4
  100. package/dist/cjs/components/molecules/TableHeader/TableHeader.d.ts +0 -4
  101. package/dist/cjs/components/molecules/TableHeader/TableHeader.types.d.ts +0 -2
  102. package/dist/cjs/components/molecules/TableHeader/index.d.ts +0 -4
  103. package/dist/cjs/components/molecules/TableRow/TableRow.d.ts +0 -4
  104. package/dist/cjs/components/molecules/TableRow/TableRow.types.d.ts +0 -2
  105. package/dist/cjs/components/molecules/TableRow/index.d.ts +0 -4
  106. package/dist/cjs/components/molecules/Tabs/Tabs.Context.d.ts +0 -13
  107. package/dist/cjs/components/molecules/Tabs/Tabs.d.ts +0 -4
  108. package/dist/cjs/components/molecules/Tabs/Tabs.types.d.ts +0 -37
  109. package/dist/cjs/components/molecules/Tabs/index.d.ts +0 -7
  110. package/dist/cjs/components/molecules/index.d.ts +0 -28
  111. package/dist/cjs/components/organisms/Form/Form.d.ts +0 -4
  112. package/dist/cjs/components/organisms/Form/Form.types.d.ts +0 -135
  113. package/dist/cjs/components/organisms/Form/Form.utils.d.ts +0 -2
  114. package/dist/cjs/components/organisms/Form/FormContext.d.ts +0 -5
  115. package/dist/cjs/components/organisms/Form/FormExample.d.ts +0 -14
  116. package/dist/cjs/components/organisms/Form/index.d.ts +0 -5
  117. package/dist/cjs/components/organisms/Table/Table.d.ts +0 -4
  118. package/dist/cjs/components/organisms/Table/Table.types.d.ts +0 -2
  119. package/dist/cjs/components/organisms/Table/index.d.ts +0 -4
  120. package/dist/cjs/components/organisms/index.d.ts +0 -4
  121. package/dist/cjs/components/utils.d.ts +0 -26
  122. package/dist/cjs/lib/config.d.ts +0 -1
  123. package/dist/cjs/library.css +0 -2489
  124. package/dist/cjs/library.d.ts +0 -3
  125. package/dist/cjs/library.js +0 -15
  126. package/dist/cjs/library.js.map +0 -1
  127. package/dist/cjs/main.d.ts +0 -1
  128. package/dist/cjs/modules/index.d.ts +0 -1
  129. package/dist/cjs/modules/theme/ThemeProvider.d.ts +0 -6
  130. package/dist/cjs/modules/theme/ThemeProvider.types.d.ts +0 -9
  131. package/dist/cjs/modules/theme/index.d.ts +0 -2
  132. package/dist/esm/App.d.ts +0 -6
  133. package/dist/esm/App.utils.d.ts +0 -2
  134. package/dist/esm/components/atoms/ActionCard/ActionCard.d.ts +0 -7
  135. package/dist/esm/components/atoms/ActionCard/ActionCard.types.d.ts +0 -16
  136. package/dist/esm/components/atoms/ActionCard/index.d.ts +0 -4
  137. package/dist/esm/components/atoms/ActionImage/ActionImage.d.ts +0 -7
  138. package/dist/esm/components/atoms/ActionImage/ActionImage.types.d.ts +0 -12
  139. package/dist/esm/components/atoms/ActionImage/index.d.ts +0 -4
  140. package/dist/esm/components/atoms/Button/Button.d.ts +0 -7
  141. package/dist/esm/components/atoms/Button/Button.types.d.ts +0 -53
  142. package/dist/esm/components/atoms/Button/index.d.ts +0 -4
  143. package/dist/esm/components/atoms/Card/Card.d.ts +0 -7
  144. package/dist/esm/components/atoms/Card/Card.types.d.ts +0 -11
  145. package/dist/esm/components/atoms/Card/index.d.ts +0 -4
  146. package/dist/esm/components/atoms/Checkbox/Checkbox.d.ts +0 -3
  147. package/dist/esm/components/atoms/Checkbox/index.d.ts +0 -2
  148. package/dist/esm/components/atoms/Checkbox/types.d.ts +0 -8
  149. package/dist/esm/components/atoms/Icon/Icon.d.ts +0 -4
  150. package/dist/esm/components/atoms/Icon/Icon.types.d.ts +0 -22
  151. package/dist/esm/components/atoms/Icon/index.d.ts +0 -4
  152. package/dist/esm/components/atoms/Icon/useDynamicSVGImport.d.ts +0 -5
  153. package/dist/esm/components/atoms/IconButton/IconButton.d.ts +0 -4
  154. package/dist/esm/components/atoms/IconButton/IconButton.types.d.ts +0 -9
  155. package/dist/esm/components/atoms/IconButton/index.d.ts +0 -4
  156. package/dist/esm/components/atoms/Image/image.d.ts +0 -3
  157. package/dist/esm/components/atoms/Image/image.types.d.ts +0 -33
  158. package/dist/esm/components/atoms/Image/index.d.ts +0 -4
  159. package/dist/esm/components/atoms/Input/Input.d.ts +0 -10
  160. package/dist/esm/components/atoms/Input/Input.types.d.ts +0 -34
  161. package/dist/esm/components/atoms/Input/index.d.ts +0 -4
  162. package/dist/esm/components/atoms/List/List.d.ts +0 -4
  163. package/dist/esm/components/atoms/List/List.types.d.ts +0 -32
  164. package/dist/esm/components/atoms/List/index.d.ts +0 -4
  165. package/dist/esm/components/atoms/Password/Password.d.ts +0 -4
  166. package/dist/esm/components/atoms/Password/Password.types.d.ts +0 -4
  167. package/dist/esm/components/atoms/Password/index.d.ts +0 -2
  168. package/dist/esm/components/atoms/Spinner/Spinner.d.ts +0 -4
  169. package/dist/esm/components/atoms/Spinner/Spinner.types.d.ts +0 -3
  170. package/dist/esm/components/atoms/Spinner/index.d.ts +0 -4
  171. package/dist/esm/components/atoms/Text/Text.d.ts +0 -7
  172. package/dist/esm/components/atoms/Text/Text.types.d.ts +0 -61
  173. package/dist/esm/components/atoms/Text/contants.d.ts +0 -14
  174. package/dist/esm/components/atoms/Text/index.d.ts +0 -4
  175. package/dist/esm/components/atoms/TextArea/TextArea.d.ts +0 -8
  176. package/dist/esm/components/atoms/TextArea/TextArea.types.d.ts +0 -21
  177. package/dist/esm/components/atoms/TextArea/index.d.ts +0 -4
  178. package/dist/esm/components/atoms/index.d.ts +0 -26
  179. package/dist/esm/components/index.d.ts +0 -3
  180. package/dist/esm/components/molecules/ContextMenu/ContextMenu.d.ts +0 -7
  181. package/dist/esm/components/molecules/ContextMenu/ContextMenu.types.d.ts +0 -64
  182. package/dist/esm/components/molecules/ContextMenu/MenuItem/MenuItem.d.ts +0 -9
  183. package/dist/esm/components/molecules/ContextMenu/MenuItem/MenuItem.types.d.ts +0 -24
  184. package/dist/esm/components/molecules/ContextMenu/MenuItem/index.d.ts +0 -4
  185. package/dist/esm/components/molecules/ContextMenu/index.d.ts +0 -6
  186. package/dist/esm/components/molecules/DatePicker/DatePicker.d.ts +0 -7
  187. package/dist/esm/components/molecules/DatePicker/DatePicker.types.d.ts +0 -56
  188. package/dist/esm/components/molecules/DatePicker/index.d.ts +0 -4
  189. package/dist/esm/components/molecules/FormField/FormField.d.ts +0 -4
  190. package/dist/esm/components/molecules/FormField/FormField.types.d.ts +0 -124
  191. package/dist/esm/components/molecules/FormField/FormFieldContext.d.ts +0 -5
  192. package/dist/esm/components/molecules/FormField/index.d.ts +0 -7
  193. package/dist/esm/components/molecules/FormField/useField.d.ts +0 -11
  194. package/dist/esm/components/molecules/Modal/Modal.d.ts +0 -7
  195. package/dist/esm/components/molecules/Modal/Modal.types.d.ts +0 -54
  196. package/dist/esm/components/molecules/Modal/index.d.ts +0 -4
  197. package/dist/esm/components/molecules/Nav/Nav.d.ts +0 -4
  198. package/dist/esm/components/molecules/Nav/Nav.types.d.ts +0 -2
  199. package/dist/esm/components/molecules/Nav/NavItem/NavItem.d.ts +0 -4
  200. package/dist/esm/components/molecules/Nav/NavItem/NavItem.types.d.ts +0 -2
  201. package/dist/esm/components/molecules/Nav/NavItem/index.d.ts +0 -4
  202. package/dist/esm/components/molecules/Nav/NavLink/NavLink.d.ts +0 -4
  203. package/dist/esm/components/molecules/Nav/NavLink/NavLink.types.d.ts +0 -16
  204. package/dist/esm/components/molecules/Nav/NavLink/index.d.ts +0 -4
  205. package/dist/esm/components/molecules/Nav/index.d.ts +0 -8
  206. package/dist/esm/components/molecules/Popover/Popover.d.ts +0 -7
  207. package/dist/esm/components/molecules/Popover/Popover.types.d.ts +0 -85
  208. package/dist/esm/components/molecules/Popover/Popover.utils.d.ts +0 -30
  209. package/dist/esm/components/molecules/Popover/index.d.ts +0 -4
  210. package/dist/esm/components/molecules/Select/Option/Option.d.ts +0 -10
  211. package/dist/esm/components/molecules/Select/Option/Option.types.d.ts +0 -32
  212. package/dist/esm/components/molecules/Select/Option/index.d.ts +0 -4
  213. package/dist/esm/components/molecules/Select/Select.Context.d.ts +0 -18
  214. package/dist/esm/components/molecules/Select/Select.d.ts +0 -11
  215. package/dist/esm/components/molecules/Select/Select.types.d.ts +0 -128
  216. package/dist/esm/components/molecules/Select/Select.utils.d.ts +0 -33
  217. package/dist/esm/components/molecules/Select/index.d.ts +0 -15
  218. package/dist/esm/components/molecules/TabContent/TabContent.d.ts +0 -4
  219. package/dist/esm/components/molecules/TabContent/TabContent.types.d.ts +0 -20
  220. package/dist/esm/components/molecules/TabContent/index.d.ts +0 -4
  221. package/dist/esm/components/molecules/TabItem/TabItem.d.ts +0 -4
  222. package/dist/esm/components/molecules/TabItem/TabItem.types.d.ts +0 -19
  223. package/dist/esm/components/molecules/TabItem/index.d.ts +0 -4
  224. package/dist/esm/components/molecules/TableBody/TableBody.d.ts +0 -4
  225. package/dist/esm/components/molecules/TableBody/TableBody.types.d.ts +0 -2
  226. package/dist/esm/components/molecules/TableBody/index.d.ts +0 -4
  227. package/dist/esm/components/molecules/TableCell/TableCell.d.ts +0 -4
  228. package/dist/esm/components/molecules/TableCell/TableCell.types.d.ts +0 -2
  229. package/dist/esm/components/molecules/TableCell/index.d.ts +0 -4
  230. package/dist/esm/components/molecules/TableHeader/TableHeader.d.ts +0 -4
  231. package/dist/esm/components/molecules/TableHeader/TableHeader.types.d.ts +0 -2
  232. package/dist/esm/components/molecules/TableHeader/index.d.ts +0 -4
  233. package/dist/esm/components/molecules/TableRow/TableRow.d.ts +0 -4
  234. package/dist/esm/components/molecules/TableRow/TableRow.types.d.ts +0 -2
  235. package/dist/esm/components/molecules/TableRow/index.d.ts +0 -4
  236. package/dist/esm/components/molecules/Tabs/Tabs.Context.d.ts +0 -13
  237. package/dist/esm/components/molecules/Tabs/Tabs.d.ts +0 -4
  238. package/dist/esm/components/molecules/Tabs/Tabs.types.d.ts +0 -37
  239. package/dist/esm/components/molecules/Tabs/index.d.ts +0 -7
  240. package/dist/esm/components/molecules/index.d.ts +0 -28
  241. package/dist/esm/components/organisms/Form/Form.d.ts +0 -4
  242. package/dist/esm/components/organisms/Form/Form.types.d.ts +0 -135
  243. package/dist/esm/components/organisms/Form/Form.utils.d.ts +0 -2
  244. package/dist/esm/components/organisms/Form/FormContext.d.ts +0 -5
  245. package/dist/esm/components/organisms/Form/FormExample.d.ts +0 -14
  246. package/dist/esm/components/organisms/Form/index.d.ts +0 -5
  247. package/dist/esm/components/organisms/Table/Table.d.ts +0 -4
  248. package/dist/esm/components/organisms/Table/Table.types.d.ts +0 -2
  249. package/dist/esm/components/organisms/Table/index.d.ts +0 -4
  250. package/dist/esm/components/organisms/index.d.ts +0 -4
  251. package/dist/esm/components/utils.d.ts +0 -26
  252. package/dist/esm/lib/config.d.ts +0 -1
  253. package/dist/esm/library.css +0 -2489
  254. package/dist/esm/library.d.ts +0 -3
  255. package/dist/esm/library.js +0 -15
  256. package/dist/esm/library.js.map +0 -1
  257. package/dist/esm/main.d.ts +0 -1
  258. package/dist/esm/modules/index.d.ts +0 -1
  259. package/dist/esm/modules/theme/ThemeProvider.d.ts +0 -6
  260. package/dist/esm/modules/theme/ThemeProvider.types.d.ts +0 -9
  261. package/dist/esm/modules/theme/index.d.ts +0 -2
  262. package/dist/index.d.ts +0 -1251
package/dist/index.d.ts DELETED
@@ -1,1251 +0,0 @@
1
- import React$1, { HTMLAttributes, ReactNode, ImgHTMLAttributes, SyntheticEvent, MouseEvent, InputHTMLAttributes, TextareaHTMLAttributes, CSSProperties, FormHTMLAttributes, Ref, LiHTMLAttributes, TdHTMLAttributes, TableHTMLAttributes } from 'react';
2
- import { Offset } from 'react-overlays/usePopper';
3
- import { LinkProps } from 'react-router-dom';
4
-
5
- type ActionCardProps = HTMLAttributes<HTMLDivElement> & {
6
- /**
7
- * The content to be displayed within the action card.
8
- */
9
- children: ReactNode;
10
- /**
11
- * Specifies if the action card is disabled.
12
- * @default false
13
- */
14
- disabled?: boolean;
15
- /**
16
- * Additional class for styling.
17
- */
18
- className?: string;
19
- };
20
-
21
- /**
22
- * ActionCard component definition.
23
- */
24
- declare const ActionCard: (props: ActionCardProps) => React$1.JSX.Element;
25
-
26
- /**
27
- * Enum for different image fit options.
28
- */
29
- type ImageFitEnum = 'Fit' | 'Fill' | 'Crop';
30
- interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
31
- /**
32
- * The URL of the image to display if the image fails to load.
33
- */
34
- fallback?: string;
35
- /**
36
- * The fit option for the image.
37
- * @default 'Fit'
38
- */
39
- fit?: ImageFitEnum;
40
- /**
41
- * Callback function when the image has loaded.
42
- */
43
- onLoad?: () => void;
44
- /**
45
- * Callback function when an error occurs while loading the image.
46
- */
47
- onError?: (error: SyntheticEvent<HTMLImageElement>) => void;
48
- /**
49
- * Flag to show a loading indicator for the image.
50
- * @default false
51
- */
52
- showLoading?: boolean;
53
- /**
54
- * Additional class for styling.
55
- */
56
- className?: string;
57
- }
58
-
59
- declare const Image: (props: ImageProps) => JSX.Element;
60
-
61
- type ActionImageProps = ImageProps & {
62
- /**
63
- * Specifies if the action image is disabled.
64
- * @default false
65
- */
66
- disabled?: boolean;
67
- /**
68
- * Additional class for styling.
69
- */
70
- className?: string;
71
- };
72
-
73
- /**
74
- * ActionImage component definition.
75
- */
76
- declare const ActionImage: (props: ActionImageProps) => React$1.JSX.Element;
77
-
78
- type ButtonTypeEnum = 'Filled' | 'Outline' | 'Ghost';
79
- type ButtonStyleEnum = 'Primary' | 'Secondary' | 'Destructive';
80
- type ButtonSizeEnum = 'Small' | 'Medium' | 'Large';
81
- type ButtonActionTypeEnum = 'button' | 'submit' | 'reset';
82
- type ButtonProps = Omit<HTMLAttributes<HTMLButtonElement>, 'style'> & {
83
- /**
84
- * Type of the button.
85
- * @default 'Filled'
86
- */
87
- type?: ButtonTypeEnum;
88
- /**
89
- * Style of the button.
90
- * @default 'Primary'
91
- */
92
- style?: ButtonStyleEnum;
93
- /**
94
- * Size of the button.
95
- * @default 'Medium'
96
- */
97
- size?: ButtonSizeEnum;
98
- /**
99
- * Indicates if the button is in a loading state.
100
- * @default false
101
- */
102
- loading?: boolean;
103
- /**
104
- * Specifies if the button is disabled.
105
- * @default false
106
- */
107
- disabled?: boolean;
108
- /**
109
- * Icon to be displayed before the button's content.
110
- */
111
- leadingIcon?: ReactNode;
112
- /**
113
- * Icon to be displayed after the button's content.
114
- */
115
- trailingIcon?: ReactNode;
116
- /**
117
- * Click event handler for the button.
118
- */
119
- onClick?: (event?: MouseEvent<HTMLElement>) => void;
120
- /**
121
- * Additional class for styling.
122
- */
123
- className?: string;
124
- /**
125
- * Type of action associated with the button.
126
- * @default 'button'
127
- */
128
- actionType?: ButtonActionTypeEnum;
129
- };
130
-
131
- /**
132
- * Button component definition.
133
- */
134
- declare const Button: (props: ButtonProps) => React$1.JSX.Element;
135
-
136
- type CardProps = {
137
- /**
138
- * The content to be displayed within the card.
139
- */
140
- children: ReactNode;
141
- /**
142
- * Additional class for styling.
143
- */
144
- className?: string;
145
- };
146
-
147
- /**
148
- * Card component definition.
149
- */
150
- declare const Card: (props: CardProps) => React$1.JSX.Element;
151
-
152
- type IconStyleEnum = 'Outlined' | 'Filled' | 'Round';
153
- type IconSizeEnum = 'Small' | 'Medium' | 'Large';
154
- interface IconProps {
155
- /**
156
- * The name of the icon to be displayed.
157
- */
158
- icon: string;
159
- /**
160
- * Style of the icon.
161
- * @default 'Filled'
162
- */
163
- style?: IconStyleEnum;
164
- /**
165
- * Size of the icon.
166
- * @default 'Medium'
167
- */
168
- size?: IconSizeEnum;
169
- /**
170
- * Additional class for styling.
171
- */
172
- className?: string;
173
- }
174
-
175
- declare const Icon: (props: IconProps) => React$1.JSX.Element | null;
176
-
177
- type IconButtonStyleEnum = 'Primary' | 'Secondary';
178
- interface IconButtonProps extends Omit<ButtonProps, 'leadingIcon' | 'trailingIcon'> {
179
- /**
180
- * The icon to be displayed.
181
- */
182
- icon?: ReactNode;
183
- }
184
-
185
- declare const IconButton: (props: IconButtonProps) => React$1.JSX.Element;
186
-
187
- /**
188
- * Enum for different input types.
189
- */
190
- type InputTypeEnum = 'Text' | 'Number' | 'Email' | 'Password';
191
- type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'value'> & {
192
- /**
193
- * The type of input.
194
- * @default 'Text'
195
- */
196
- inputType?: InputTypeEnum;
197
- /**
198
- * The value of the input.
199
- */
200
- value?: string;
201
- /**
202
- * Callback function when the input value changes.
203
- * @param value - The new value of the input.
204
- */
205
- onValueChanged?: (value: string) => void;
206
- /**
207
- * Indicates if the input is invalid.
208
- * @default false
209
- */
210
- invalid?: boolean;
211
- /**
212
- * Icon to be displayed before the input.
213
- */
214
- leadingIcon?: React.ReactNode;
215
- /**
216
- * Icon to be displayed after the input.
217
- */
218
- trailingIcon?: React.ReactNode;
219
- };
220
-
221
- declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type" | "value"> & {
222
- inputType?: InputTypeEnum;
223
- value?: string;
224
- onValueChanged?: (value: string) => void;
225
- invalid?: boolean;
226
- leadingIcon?: React$1.ReactNode;
227
- trailingIcon?: React$1.ReactNode;
228
- } & React$1.RefAttributes<HTMLInputElement>>;
229
-
230
- /**
231
- * Enum for the alignment of the list.
232
- */
233
- type ListAlignEnum = 'Horizontal' | 'Vertical';
234
- type ListProps<T> = HTMLAttributes<HTMLUListElement> & {
235
- /**
236
- * The data to be rendered in the list.
237
- */
238
- data?: T[];
239
- /**
240
- * The component used to render each item in the list.
241
- */
242
- component: React.FC<any>;
243
- /**
244
- * Function to extract keys.
245
- */
246
- keyExtractor?: (item: T, index: number) => string | number;
247
- /**
248
- * The alignment of the list.
249
- * @default 'Vertical'
250
- */
251
- align?: ListAlignEnum;
252
- /**
253
- * Flag to control if the content should wrap.
254
- */
255
- wrap?: boolean;
256
- /**
257
- * Additional class for styling.
258
- */
259
- className?: string;
260
- };
261
-
262
- declare const List: <T>(props: ListProps<T>) => React$1.JSX.Element;
263
-
264
- type PasswordProps = Omit<InputProps, 'inputType' | 'trailingIcon'> & {
265
- hideTrailingIcon?: boolean;
266
- };
267
-
268
- declare const Password: (props: PasswordProps) => React$1.JSX.Element;
269
-
270
- type SpinnerProps = {
271
- className?: string;
272
- };
273
-
274
- declare const Spinner: ({ className }: SpinnerProps) => React$1.JSX.Element;
275
-
276
- declare const types: readonly ["Heading1", "Heading2", "Heading3", "Heading4", "Heading5", "Heading6", "BodyLarge", "BodyMedium", "BodySmall"];
277
- declare const weights: readonly ["Thin", "ExtraLight", "Light", "Regular", "Medium", "SemiBold", "Bold", "ExtraBold", "Black", "ExtraBlack", 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
278
- declare const transforms: readonly ["None", "Capitalize", "UpperCase", "LowerCase"];
279
-
280
- /**
281
- * Enum for the types of text.
282
- */
283
- type TextTypeEnum = typeof types[number];
284
- /**
285
- * Enum for the weights of text.
286
- */
287
- type TextWeightEnum = typeof weights[number];
288
- /**
289
- * Enum for text decorations.
290
- */
291
- type TextDecorationEnum = 'None' | 'Underline' | 'Strikethrough';
292
- /**
293
- * Enum for text transformations.
294
- */
295
- type TextTransformEnum = typeof transforms[number];
296
- interface TextProps {
297
- /**
298
- * Additional class for styling.
299
- */
300
- className?: string;
301
- /**
302
- * Type of the text.
303
- * @default 'BodyMedium'
304
- */
305
- type?: TextTypeEnum;
306
- /**
307
- * Weight of the text.
308
- * @default 'Regular'
309
- */
310
- weight?: TextWeightEnum;
311
- /**
312
- * The content to be displayed as text.
313
- */
314
- children?: React.ReactNode;
315
- /**
316
- * Flag to prevent text from wrapping.
317
- * @default false
318
- */
319
- noWrap?: boolean;
320
- /**
321
- * Flag to italicize the text.
322
- * @default false
323
- */
324
- italic?: boolean;
325
- /**
326
- * Decoration style for the text.
327
- * @default 'None'
328
- */
329
- decoration?: TextDecorationEnum;
330
- /**
331
- * Transform style for the text.
332
- * @default 'None'
333
- */
334
- transform?: TextTransformEnum;
335
- /**
336
- * Modify the element type used for rendering
337
- */
338
- as?: React.ElementType<any, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span'>;
339
- }
340
-
341
- /**
342
- * Text component definition.
343
- */
344
- declare const Text: (props: TextProps) => React$1.JSX.Element;
345
-
346
- type TextAreaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value'> & {
347
- /**
348
- * The value of the text area.
349
- */
350
- value?: string;
351
- /**
352
- * Callback function when the value of the text area changes.
353
- * @param value - The new value of the text area.
354
- */
355
- onValueChanged?: (value: string) => void;
356
- /**
357
- * Indicates if the text area is in an invalid state.
358
- * @default false
359
- */
360
- invalid?: boolean;
361
- /**
362
- * Additional class for styling.
363
- */
364
- className?: string;
365
- };
366
-
367
- declare const TextArea: React$1.ForwardRefExoticComponent<Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, "value"> & {
368
- value?: string;
369
- onValueChanged?: (value: string) => void;
370
- invalid?: boolean;
371
- className?: string;
372
- } & React$1.RefAttributes<HTMLTextAreaElement>>;
373
-
374
- /**
375
- * Enum for the action type of the Popover.
376
- */
377
- type ActionType = 'Click' | 'Hover';
378
- /**
379
- * Enum for the overlay direction of the Popover.
380
- */
381
- type OverlayDirectionEnum = 'Up' | 'Down' | 'Right' | 'Left';
382
- /**
383
- * Enum for the overlay alignment of the Popover.
384
- */
385
- type OverlayAlignEnum = 'Start' | 'End' | 'Center';
386
- /**
387
- * Props for the content of the Popover.
388
- */
389
- type ContentProps = {
390
- width?: CSSProperties['width'] | 'match-trigger';
391
- minWidth?: CSSProperties['minWidth'] | 'match-trigger';
392
- };
393
- /**
394
- * Props for the Popover component.
395
- */
396
- type PopoverProps = {
397
- /**
398
- * The content to display in the Popover.
399
- */
400
- content: ReactNode;
401
- /**
402
- * The target element for the Popover.
403
- */
404
- target: ReactNode;
405
- /**
406
- * Offset for positioning the Popover.
407
- */
408
- offset?: Offset;
409
- /**
410
- * Function to handle hiding the Popover.
411
- */
412
- onHide?: () => void;
413
- /**
414
- * Direction in which the Popover should open.
415
- * @default 'Down'
416
- */
417
- direction?: OverlayDirectionEnum;
418
- /**
419
- * Indicates if Popover should hide on click away.
420
- * @default true
421
- */
422
- hideOnClickAway?: boolean;
423
- /**
424
- * Indicates if content should stay on item click.
425
- * @default false
426
- */
427
- keepContentOnItemClick?: boolean;
428
- /**
429
- * Indicates if the Popover is shown.
430
- * @default false
431
- */
432
- show?: boolean;
433
- /**
434
- * Action type to trigger the Popover.
435
- * @default 'Click'
436
- */
437
- action?: ActionType;
438
- /**
439
- * Alignment of the Popover.
440
- * @default 'Center'
441
- */
442
- alignment?: OverlayAlignEnum;
443
- /**
444
- * Props for the content of the Popover.
445
- */
446
- contentProps?: ContentProps;
447
- /**
448
- * Indicates if the Popover is disabled.
449
- * @default false
450
- */
451
- disabled?: boolean;
452
- /**
453
- * Additional class for styling.
454
- */
455
- className?: string;
456
- };
457
-
458
- /**
459
- * Props for the ContextMenu component.
460
- */
461
- type ContextMenuProps = HTMLAttributes<HTMLUListElement> & {
462
- /**
463
- * The content to be rendered inside the context menu.
464
- */
465
- children: React$1.ReactNode;
466
- /**
467
- * The element that triggers the display of the context menu.
468
- */
469
- target: React$1.ReactNode;
470
- /**
471
- * Alignment of the menu relative to its target.
472
- * @default 'Center'
473
- */
474
- alignment?: OverlayAlignEnum;
475
- /**
476
- * Direction in which the menu expands.
477
- * @default 'Down'
478
- */
479
- direction?: OverlayDirectionEnum;
480
- /**
481
- * Offset position of the menu relative to its target.
482
- */
483
- offset?: Offset;
484
- /**
485
- * Controls whether the context menu is visible (`true`) or hidden (`false`).
486
- * @default false
487
- */
488
- show?: boolean;
489
- /**
490
- * Disables interaction with the context menu if `true`.
491
- * @default false
492
- */
493
- disabled?: boolean;
494
- /**
495
- * Additional props to be passed to the menu content.
496
- */
497
- menuProps?: ContentProps;
498
- /**
499
- * Action that triggers the display of the context menu.
500
- * @default 'Click'
501
- */
502
- action?: ActionType;
503
- /**
504
- * Determines whether the context menu should be hidden when clicking away from it.
505
- * @default true
506
- */
507
- hideOnClickAway?: boolean;
508
- /**
509
- * Determines whether the menu should remain open when clicking inside it.
510
- * @default false
511
- */
512
- keepMenuOnItemClick?: boolean;
513
- /**
514
- * Additional CSS class names to apply to the context menu.
515
- */
516
- className?: string;
517
- };
518
-
519
- /**
520
- * ContextMenu component that renders a popover menu.
521
- */
522
- declare const ContextMenu: (props: ContextMenuProps) => React$1.JSX.Element;
523
-
524
- /**
525
- * Props for the MenuItem component.
526
- */
527
- type MenuItemProps = HTMLAttributes<HTMLLIElement> & {
528
- /**
529
- * The content to be rendered inside the menu item.
530
- */
531
- children: React.ReactNode;
532
- /**
533
- * Optional key to identify the menu item uniquely.
534
- */
535
- key?: string;
536
- /**
537
- * Disables interaction with the menu item if `true`.
538
- * @default false
539
- */
540
- disabled?: boolean;
541
- /**
542
- * Indicates whether the menu item is selected.
543
- * @default false
544
- */
545
- selected?: boolean;
546
- };
547
-
548
- /**
549
- * MenuItem component definition.
550
- *
551
- * Renders a menu item (`<li>`) with optional disabled and selected states.
552
- */
553
- declare const MenuItem: (props: MenuItemProps) => React$1.JSX.Element;
554
-
555
- type DatePickerProps = {
556
- /**
557
- * Additional class for styling.
558
- */
559
- className?: string;
560
- /**
561
- * The minimum selectable date.
562
- */
563
- minDate?: string | Date;
564
- /**
565
- * The maximum selectable date.
566
- */
567
- maxDate?: string | Date;
568
- /**
569
- * Enable time selection in the date picker.
570
- * @default false
571
- */
572
- enableTime?: boolean;
573
- /**
574
- * Enable selecting a start and end date.
575
- * @default false
576
- */
577
- enableRange?: boolean;
578
- /**
579
- * The date that is initially displayed.
580
- */
581
- defaultDate?: string | Date;
582
- /**
583
- * The format of the date to be displayed.
584
- * @remark
585
- * For info about what formats exist, refer to the flatpickr documentation
586
- */
587
- dateFormat?: string;
588
- /**
589
- * Callback function when the date(s) are changed.
590
- * @param dates - Array of selected dates.
591
- * @param dateStr - String representation of the selected date(s). Will match the date format.
592
- */
593
- onChange?: (dates: Date[], dateStr: string) => void;
594
- /**
595
- * Callback function when the date picker is opened.
596
- * @param dates - Array of selected dates.
597
- * @param dateStr - String representation of the selected date(s). Will match the date format.
598
- */
599
- onOpen?: (dates: Date[], dateStr: string) => void;
600
- /**
601
- * Callback function when the date picker is closed.
602
- * @param dates - Array of selected dates.
603
- * @param dateStr - String representation of the selected date(s). Will match the date format.
604
- */
605
- onClose?: (dates: Date[], dateStr: string) => void;
606
- /**
607
- * render date picker inline
608
- */
609
- inline?: boolean;
610
- };
611
-
612
- declare const DatePicker: (props: DatePickerProps) => React$1.JSX.Element;
613
-
614
- /**
615
- * Type representing the allowed values for form fields
616
- */
617
- type FieldValue = string | number | Date | boolean | Array<string | number | Date>;
618
- /**
619
- * Type representing the form values as a partial record of field names to field values
620
- * @example
621
- * ```typescript
622
- * const formState: FormState = {
623
- * name: 'John Doe',
624
- * age: 30,
625
- * dob: new Date('1990-01-01')
626
- * };
627
- * ```
628
- */
629
- type FormState<T extends FieldValue = FieldValue> = Partial<Record<string, T>>;
630
- /**
631
- * Type representing the form errors as a partial record of field names to error messages
632
- */
633
- type FormErrors<T extends FormState = FormState> = Partial<Record<keyof T, string>>;
634
- /**
635
- * Type representing a validation function for a form field
636
- * It takes an error setter function and the field value (optional) and returns a boolean indicating if the value is valid
637
- * @example
638
- * ```typescript
639
- * const nameValidator: FieldValidationFunction = (setError, value) => {
640
- * if (!value) {
641
- * setError('Name is required');
642
- * return false;
643
- * }
644
- * return true;
645
- * };
646
- * ```
647
- */
648
- type FieldValidationFunction<T extends FieldValue = FieldValue> = (setError: (message: string) => void, value?: T) => boolean;
649
- /**
650
- * Type representing the required fields in a form
651
- * It's a partial record of field names to a boolean indicating if the field is required
652
- */
653
- type RequiredFields<T extends FormState = FormState> = Partial<Record<keyof T, boolean>>;
654
- /**
655
- * Type representing the validation functions for each field in a form
656
- * It's a partial record of field names to validation functions (or undefined)
657
- * @example
658
- * ```typescript
659
- * const nameValidator: FieldValidationFunction = (setError, value) => {
660
- * if (!value) {
661
- * setError('Name is required');
662
- * return false;
663
- * }
664
- * return true;
665
- * };
666
- * const fieldValidators: FieldValidators = {
667
- * name: nameValidator,
668
- * age: undefined,
669
- * };
670
- * ```
671
- */
672
- type FieldValidators<T extends FormState = FormState> = Partial<Record<keyof T, FieldValidationFunction | undefined>>;
673
- /**
674
- * Type representing a function that handles form state changes
675
- * It takes the new form state and an error setter function and doesn't return anything
676
- * @example
677
- * ```typescript
678
- * const handleFormStateChange: FormStateChangeHandler = (state, setError) => {
679
- * // Validate form state and set errors
680
- * if (!state.name) {
681
- * setError('name', 'Name is required');
682
- * }
683
- * };
684
- * ```
685
- */
686
- type FormStateChangeHandler<T extends FormState = FormState> = (state: T, setError: (field: keyof T, errorMessage: string) => void) => void;
687
- /**
688
- * Type representing a function that validates the entire form
689
- * It takes the form values and an error setter function and returns a boolean indicating if the form is valid
690
- * @example
691
- * ```typescript
692
- * const validateForm: FormValidator = (state, setError) => {
693
- * let isValid = true;
694
- * if (!state.name) {
695
- * setError('name', 'Name is required');
696
- * isValid = false;
697
- * }
698
- * if (!state.age || typeof state.age !== 'number') {
699
- * setError('age', 'Age must be a number');
700
- * isValid = false;
701
- * }
702
- * return isValid;
703
- * };
704
- * ```
705
- */
706
- type FormValidator<T extends FormState = FormState> = (state: T, setError: (field: keyof T, errorMessage: string) => void) => boolean;
707
- /**
708
- * Type representing a function that handles form submission.
709
- * It takes updated form state and a function to set error messages for specific fields.
710
- *
711
- * @template T - The type of the form state, defaulting to `FormState`.
712
- *
713
- * @param {T} values - The updated form state values.
714
- * @param {(field: keyof T, errorMessage: string) => void} setError - A function to set error messages for specific fields.
715
- *
716
- * @example
717
- * ```typescript
718
- * const handleFormSubmit: FormSubmitHandler = (values, setError) => {
719
- * // Submit form data
720
- * console.log(values);
721
- * };
722
- * ```
723
- */
724
- type FormSubmitHandler<T extends FormState = FormState> = (values: T, setError: (field: keyof T, errorMessage: string) => void) => void;
725
- type FormProps = Omit<FormHTMLAttributes<HTMLFormElement>, 'onSubmit'> & {
726
- formRef?: Ref<HTMLFormElement>;
727
- };
728
- type FormContextValues<T extends FormState = FormState> = {
729
- formRef?: Ref<HTMLFormElement>;
730
- formState?: T;
731
- updateFieldValue: (name: string, value: FieldValue) => void;
732
- formErrors: FormErrors<T>;
733
- updateFieldError: (name: keyof T, errorMessage: string) => void;
734
- onFormSubmit: React$1.FormEventHandler<HTMLFormElement>;
735
- updateFieldValidators: (name: keyof T, validate?: FieldValidationFunction) => void;
736
- updateRequiredFields: (name: keyof T, required?: boolean) => void;
737
- };
738
- type FormProviderProps<T extends FormState = FormState> = {
739
- formRef?: Ref<HTMLFormElement>;
740
- children?: React$1.ReactNode;
741
- formState?: T;
742
- onFormStateChange?: FormStateChangeHandler<T>;
743
- formValidator?: FormValidator<T>;
744
- onSubmit?: FormSubmitHandler<T>;
745
- validateOnChange?: boolean;
746
- };
747
-
748
- /**
749
- * Props for the FormField component.
750
- */
751
- type FormFieldProps = HTMLAttributes<HTMLDivElement> & {
752
- /**
753
- * The label for the form field
754
- */
755
- label: string;
756
- /**
757
- * Optional message for the form field
758
- */
759
- message?: string;
760
- /**
761
- * Info icon for message
762
- */
763
- infoIcon?: React.ReactNode;
764
- };
765
- /**
766
- * Props for the FormFieldProvider component.
767
- */
768
- type FormFieldProviderProps = {
769
- /**
770
- * Child components
771
- */
772
- children: React.ReactNode;
773
- /**
774
- * Name of the form field
775
- */
776
- name: string;
777
- /**
778
- * Indicates if the field is disabled
779
- * @default false
780
- */
781
- disabled?: boolean;
782
- /**
783
- * Indicates if the field is invalid
784
- * @default false
785
- */
786
- invalid?: boolean;
787
- /**
788
- * Indicates if the field is required
789
- * @default false
790
- */
791
- required?: boolean;
792
- /**
793
- * Validation function for the field
794
- */
795
- validate?: FieldValidationFunction;
796
- /**
797
- * id attribute to connect label and field of form field
798
- * note:- this is optional as FormFieldContext will generate an id
799
- */
800
- id?: string;
801
- };
802
- /**
803
- * Props for the UseField hook.
804
- */
805
- type UseFieldProps<T extends FieldValue = FieldValue> = {
806
- /**
807
- * The value of the field
808
- */
809
- value?: T;
810
- /**
811
- * Indicates if the field is invalid
812
- * @default false
813
- */
814
- invalid?: boolean;
815
- /**
816
- * Callback when the field value changes
817
- */
818
- onValueChanged?: (value: T) => void;
819
- /**
820
- * Indicates if the field is disabled
821
- * @default false
822
- */
823
- disabled?: boolean;
824
- /**
825
- * Indicates if the field is required
826
- * @default false
827
- */
828
- required?: boolean;
829
- /**
830
- * Default value for the field
831
- */
832
- defaultValue?: T;
833
- };
834
-
835
- declare const useField: <T extends FieldValue = FieldValue>(props: UseFieldProps<T>) => {
836
- fieldValue: T;
837
- updateFieldValue: (newValue: T) => void;
838
- disabledField: boolean | undefined;
839
- requiredField: boolean | undefined;
840
- invalidField: boolean | undefined;
841
- formFieldId: string | undefined;
842
- };
843
-
844
- declare const FormField: (props: FormFieldProviderProps & FormFieldProps) => React$1.JSX.Element;
845
-
846
- /**
847
- * Enum defining the possible sizes for the Modal component.
848
- */
849
- type ModalSizeEnum = 'Small' | 'Medium' | 'Large';
850
- /**
851
- * Props for the Modal component.
852
- */
853
- type ModalProps = {
854
- /**
855
- * The content that will be rendered inside the modal.
856
- */
857
- children: ReactNode;
858
- /**
859
- * Optional size of the modal. Defaults to 'Medium'.
860
- * @default "Medium"
861
- */
862
- size?: ModalSizeEnum;
863
- /**
864
- * Callback function invoked when the modal is hidden.
865
- */
866
- onHide?: () => void;
867
- /**
868
- * Controls whether the modal is visible (`true`) or hidden (`false`).
869
- * @default false
870
- */
871
- show?: boolean;
872
- /**
873
- * The content to be rendered in the header of the modal.
874
- */
875
- header?: ReactNode;
876
- /**
877
- * The content to be rendered in the footer of the modal.
878
- */
879
- footer?: ReactNode;
880
- /**
881
- * Custom JSX element to render as the backdrop for the modal.
882
- */
883
- renderBackdrop?: ReactNode;
884
- /**
885
- * Determines whether a backdrop should be displayed behind the modal.
886
- * @default true
887
- */
888
- backdrop?: boolean;
889
- /**
890
- * Disables the ability to dismiss the modal by clicking on the backdrop.
891
- * @default false
892
- */
893
- disableBackdropDismiss?: boolean;
894
- /**
895
- * Additional CSS class names to apply to the modal.
896
- */
897
- className?: string;
898
- };
899
-
900
- /**
901
- * Modal component for displaying a dialog window.
902
- */
903
- declare const Modal: (props: ModalProps) => React$1.JSX.Element;
904
-
905
- type NavProps = HTMLAttributes<HTMLElement> & {};
906
-
907
- declare const Nav: (props: NavProps) => React$1.JSX.Element;
908
-
909
- type NavItemProps = LiHTMLAttributes<HTMLElement> & {};
910
-
911
- declare const NavItem: (props: NavItemProps) => React$1.JSX.Element;
912
-
913
- type NavLinkProps = Omit<LinkProps, 'to'> & {
914
- /**
915
- * The destination URL or path for the navigation link.
916
- * If the URL starts with "https", it will be treated as an external link and rendered as an <a> tag.
917
- * Otherwise, it will be treated as an internal link and rendered as a <RouterNavLink> component.
918
- *
919
- * @example
920
- * // Internal link
921
- * <NavLink to="/home">Home</NavLink>
922
- *
923
- * // External link
924
- * <NavLink to="https://www.example.com">External</NavLink>
925
- */
926
- to: string | -1;
927
- };
928
-
929
- declare const NavLink: (props: NavLinkProps) => React$1.JSX.Element;
930
-
931
- /**
932
- * Popover component definition.
933
- */
934
- declare const Popover: (props: PopoverProps) => React$1.JSX.Element;
935
-
936
- /**
937
- * Props for the Option component, extending LiHTMLAttributes<HTMLLIElement>.
938
- * Represents an option within a Select component.
939
- */
940
- type OptionProps = LiHTMLAttributes<HTMLLIElement> & {
941
- /**
942
- * Value associated with the option.
943
- */
944
- value: string | number;
945
- /**
946
- * Indicates if the option is disabled.
947
- * @default false
948
- */
949
- disabled?: boolean;
950
- /**
951
- * Icon to be displayed before the option content.
952
- */
953
- leadingIcon?: ReactNode;
954
- /**
955
- * Icon to be displayed after the option content.
956
- */
957
- trailingIcon?: ReactNode;
958
- /**
959
- * Additional CSS class names for custom styling.
960
- */
961
- className?: string;
962
- /**
963
- * Children elements or text content of the option.
964
- */
965
- children?: ReactNode;
966
- };
967
-
968
- /**
969
- * Functional component representing an option within a select dropdown.
970
- *
971
- * @param props - Props for configuring the Option component.
972
- * @returns Element representing the option.
973
- */
974
- declare const Option: (props: OptionProps) => React$1.JSX.Element;
975
-
976
- /**
977
- * Represents the context provided by the Select component.
978
- */
979
- type SelectContextType = {
980
- /**
981
- * The currently selected value in the Select component.
982
- */
983
- selectedValue: FieldValue;
984
- /**
985
- * Function to update the selected value.
986
- * @param value - The new value to select, either a string or number.
987
- */
988
- updateSelectedValue: (value: string | number) => void;
989
- /**
990
- * Function to reset the selected value to its default state.
991
- */
992
- resetSelectedValue: () => void;
993
- /**
994
- * Indicates whether the field is in an invalid state.
995
- */
996
- invalidField?: boolean;
997
- /**
998
- * Indicates whether the field is disabled.
999
- */
1000
- disabledField?: boolean;
1001
- /**
1002
- * id to use as htmlFor for label, which will be fetched from FormFieldContext
1003
- */
1004
- formFieldId: string;
1005
- };
1006
- /**
1007
- * Props for the SelectProvider component, which manages state and provides context for Select.
1008
- */
1009
- type SelectProviderProps = {
1010
- /**
1011
- * Child elements to be rendered within the SelectProvider.
1012
- */
1013
- children: ReactNode;
1014
- /**
1015
- * Currently selected value (if controlled).
1016
- */
1017
- value?: FieldValue;
1018
- /**
1019
- * Indicates if multiple options can be selected.
1020
- * @default false
1021
- */
1022
- multiple?: boolean;
1023
- /**
1024
- * Default selected value (if uncontrolled).
1025
- */
1026
- defaultValue?: FieldValue;
1027
- /**
1028
- * Indicates whether the Select is disabled.
1029
- * @default false
1030
- */
1031
- disabled?: boolean;
1032
- /**
1033
- * Callback function invoked when the selected value changes.
1034
- * @param event - Optional event containing the new field value.
1035
- */
1036
- onValueChanged?: (event?: FieldValue) => void;
1037
- /**
1038
- * Indicates whether the selected field is hasDefaultOption or not.
1039
- * @default false
1040
- */
1041
- hasDefaultOption?: boolean;
1042
- };
1043
- /**
1044
- * Enum representing different states of the Select component.
1045
- */
1046
- type SelectStateEnum = 'Default' | 'Error';
1047
- /**
1048
- * Props for the SelectView component, defining its visual appearance and behavior.
1049
- */
1050
- type SelectViewProps = Omit<HTMLAttributes<HTMLElement>, 'style' | 'children'> & {
1051
- /**
1052
- * Options to be rendered within the Select component.
1053
- */
1054
- children: React.ReactElement<OptionProps> | React.ReactElement<OptionProps>[];
1055
- /**
1056
- * Placeholder text displayed when no option is selected.
1057
- */
1058
- placeholder?: string;
1059
- /**
1060
- * Determines if the dropdown menu is initially open.
1061
- * @default false
1062
- */
1063
- defaultOpen?: boolean;
1064
- /**
1065
- * Icon displayed before the select input.
1066
- */
1067
- leadingIcon?: ReactNode;
1068
- /**
1069
- * Icon displayed for the expand sign.
1070
- */
1071
- expandIcon?: ReactNode;
1072
- /**
1073
- * Indicates whether the dropdown menu is currently open.
1074
- * @default false
1075
- */
1076
- open?: boolean;
1077
- /**
1078
- * Current state of the Select component.
1079
- * @default 'Default'
1080
- */
1081
- state?: SelectStateEnum;
1082
- /**
1083
- * Additional props for the dropdown menu.
1084
- */
1085
- menuProps?: ContentProps;
1086
- /**
1087
- * Indicates whether the selected field is hasDefaultOption or not.
1088
- * @default false
1089
- */
1090
- hasDefaultOption?: boolean;
1091
- /**
1092
- * Additional CSS classes for customization.
1093
- */
1094
- className?: string;
1095
- };
1096
- /**
1097
- * Props for the Select component, combining provider and view props.
1098
- */
1099
- type SelectProps = Omit<SelectProviderProps, 'children'> & SelectViewProps;
1100
-
1101
- /**
1102
- * Custom hook to use the SelectContext values.
1103
- * Throws an error if used outside of a SelectProvider.
1104
- *
1105
- * @throws Error if used outside of SelectProvider.
1106
- * @returns Context values of type SelectContextType.
1107
- */
1108
- declare const useSelectContext: () => SelectContextType;
1109
- /**
1110
- * Provider component for managing state and providing context to Select components.
1111
- * Manages the selected value state and provides methods to update or reset it.
1112
- *
1113
- * @param props - Props for configuring the SelectProvider.
1114
- * @returns JSX element that provides context to its children.
1115
- */
1116
- declare const SelectProvider: ({ children, value, defaultValue, multiple, disabled, onValueChanged, }: SelectProviderProps) => React$1.JSX.Element;
1117
-
1118
- /**
1119
- * Select component that wraps SelectComponent with SelectProvider.
1120
- * Provides state management and context to SelectComponent.
1121
- *
1122
- * @param props - Props for configuring the Select component.
1123
- * @returns JSX element that renders the SelectComponent wrapped with SelectProvider.
1124
- */
1125
- declare const Select: (props: SelectProps) => JSX.Element;
1126
-
1127
- interface TabContentProps {
1128
- /**
1129
- * The tab contents value.
1130
- * @remarks
1131
- * This is used for determining which tab is selected.
1132
- * The value from TabContent will be compared to the value from TabItem.
1133
- * @example
1134
- * 1
1135
- * "One"
1136
- */
1137
- value: number | string;
1138
- /**
1139
- * The contents of the tab.
1140
- */
1141
- children: React.ReactNode;
1142
- /**
1143
- * The classname applied to the tab content.
1144
- */
1145
- className?: string;
1146
- }
1147
-
1148
- declare const TabContent: (props: TabContentProps) => React$1.JSX.Element | null;
1149
-
1150
- interface TabItemProps extends ButtonProps {
1151
- /**
1152
- * The tabs value.
1153
- * @remarks
1154
- * This is used for determining which tab is selected.
1155
- * The value from TabContent will be compared to the value from TabItem.
1156
- * @example
1157
- * 1
1158
- * "One"
1159
- */
1160
- value: number | string;
1161
- /**
1162
- * The default tab.
1163
- * @remarks
1164
- * True means that this tab will be displayed initially
1165
- */
1166
- defaultTab?: boolean;
1167
- }
1168
-
1169
- declare const TabItem: (props: TabItemProps) => React$1.JSX.Element;
1170
-
1171
- type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
1172
-
1173
- declare const TableBody: (props: TableBodyProps) => React$1.JSX.Element;
1174
-
1175
- type TableCellProps = TdHTMLAttributes<HTMLTableCellElement>;
1176
-
1177
- declare const TableCell: (props: TableCellProps) => React$1.JSX.Element;
1178
-
1179
- type TableHeaderProps = HTMLAttributes<HTMLTableSectionElement>;
1180
-
1181
- declare const TableHeader: (props: TableHeaderProps) => React$1.JSX.Element;
1182
-
1183
- type TableRowProps = HTMLAttributes<HTMLTableRowElement>;
1184
-
1185
- declare const TableRow: (props: TableRowProps) => React$1.JSX.Element;
1186
-
1187
- type TabContextType = {
1188
- /**
1189
- * The currently selected tab.
1190
- */
1191
- currentTab: string | number;
1192
- /**
1193
- * Function to update the currently selected tab.
1194
- * @param tabValue - The value of the tab to be set.
1195
- */
1196
- updateCurrentTab: (tabValue: string | number) => void;
1197
- };
1198
- type TabProviderProps = {
1199
- /**
1200
- * The content to be displayed within the tab provider.
1201
- */
1202
- children: React.ReactNode;
1203
- /**
1204
- * The value of the tab.
1205
- */
1206
- value?: number | string;
1207
- /**
1208
- * Callback function when a tab is clicked.
1209
- * @param value - The value of the clicked tab.
1210
- */
1211
- onClick?: (value: string | number) => void;
1212
- };
1213
- type TabsViewProps = {
1214
- /**
1215
- * The content to be displayed within the tabs.
1216
- */
1217
- children: React.ReactNode;
1218
- /**
1219
- * Additional class for styling.
1220
- */
1221
- className?: string;
1222
- };
1223
- type TabsProps = TabProviderProps & TabsViewProps;
1224
-
1225
- /**
1226
- * Custom hook to use the TabContext
1227
- * Throws an error if used outside of a TabProvider
1228
- */
1229
- declare const useTab: () => TabContextType;
1230
-
1231
- declare const Tabs: (props: TabsProps) => React$1.JSX.Element;
1232
-
1233
- declare const Form: <T extends FormState>(props: FormProviderProps<T> & FormProps) => React$1.JSX.Element;
1234
-
1235
- type TableProps = TableHTMLAttributes<HTMLTableElement>;
1236
-
1237
- declare const Table: (props: TableProps) => React$1.JSX.Element;
1238
-
1239
- type ThemeContextType = {
1240
- theme: string;
1241
- updateTheme: (theme: string) => void;
1242
- };
1243
- type ThemeProviderProps = {
1244
- theme?: string;
1245
- children?: ReactNode;
1246
- };
1247
-
1248
- declare const ThemeContext: React$1.Context<ThemeContextType>;
1249
- declare const ThemeProvider: React$1.FC<ThemeProviderProps>;
1250
-
1251
- export { ActionCard, type ActionCardProps, ActionImage, type ActionImageProps, Button, type ButtonProps, Card, type CardProps, ContextMenu, type ContextMenuProps, DatePicker, type DatePickerProps, type FieldValidationFunction, type FieldValidators, type FieldValue, Form, type FormContextValues, type FormErrors, FormField, type FormFieldProps, type FormProps, type FormProviderProps, type FormState, type FormStateChangeHandler, type FormSubmitHandler, type FormValidator, Icon, IconButton, type IconButtonProps, type IconButtonStyleEnum, type IconProps, type IconSizeEnum, type IconStyleEnum, Image, type ImageFitEnum, type ImageProps, Input, type InputProps, type InputTypeEnum, List, type ListProps, MenuItem, type MenuItemProps, Modal, type ModalProps, Nav, NavItem, type NavItemProps, NavLink, type NavLinkProps, type NavProps, Option, type OptionProps, Password, Popover, type PopoverProps, type RequiredFields, Select, type SelectProps, SelectProvider, Spinner, type SpinnerProps, TabContent, type TabContentProps, TabItem, type TabItemProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Text, TextArea, type TextAreaProps, type TextDecorationEnum, type TextProps, type TextTypeEnum, type TextWeightEnum, ThemeContext, type ThemeContextType, ThemeProvider, type ThemeProviderProps, useField, useSelectContext, useTab };