@code0-tech/pictor 0.0.0-mvp.2

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 (301) hide show
  1. package/LICENSE +29 -0
  2. package/README.md +0 -0
  3. package/dist/DFlowDataType.service-Dz8pQUeO.js +793 -0
  4. package/dist/assets/Avatar.css +1 -0
  5. package/dist/assets/Badge.css +1 -0
  6. package/dist/assets/Breadcrumb.css +1 -0
  7. package/dist/assets/Button.css +1 -0
  8. package/dist/assets/ButtonGroup.css +1 -0
  9. package/dist/assets/Card.css +1 -0
  10. package/dist/assets/Col.css +1 -0
  11. package/dist/assets/Command.css +1 -0
  12. package/dist/assets/Container.css +1 -0
  13. package/dist/assets/DFlow.css +1 -0
  14. package/dist/assets/DFlowFolder.css +1 -0
  15. package/dist/assets/DFlowFunctionDefaultCard.css +1 -0
  16. package/dist/assets/DFlowInputDataType.css +1 -0
  17. package/dist/assets/DFlowMiniMap.css +1 -0
  18. package/dist/assets/DFlowSuggestionSearchInput.css +1 -0
  19. package/dist/assets/DFlowValidation.css +1 -0
  20. package/dist/assets/DFullScreen.css +1 -0
  21. package/dist/assets/DLayout.css +1 -0
  22. package/dist/assets/DResizable.css +1 -0
  23. package/dist/assets/Dialog.css +1 -0
  24. package/dist/assets/FileTabs.css +1 -0
  25. package/dist/assets/Flex.css +1 -0
  26. package/dist/assets/Input.css +1 -0
  27. package/dist/assets/Menu.css +1 -0
  28. package/dist/assets/Quote.css +1 -0
  29. package/dist/assets/Row.css +1 -0
  30. package/dist/assets/ScrollArea.css +1 -0
  31. package/dist/assets/SegmentedControl.css +1 -0
  32. package/dist/assets/Text.css +1 -0
  33. package/dist/assets/Tooltip.css +1 -0
  34. package/dist/compiler-runtime-BNHg76kC.js +36 -0
  35. package/dist/components/avatar/Avatar.d.ts +8 -0
  36. package/dist/components/avatar/Avatar.js +55 -0
  37. package/dist/components/badge/Badge.d.ts +7 -0
  38. package/dist/components/badge/Badge.js +22 -0
  39. package/dist/components/breadcrumb/Breadcrumb.d.ts +7 -0
  40. package/dist/components/breadcrumb/Breadcrumb.js +31 -0
  41. package/dist/components/button/Button.d.ts +10 -0
  42. package/dist/components/button/Button.js +28 -0
  43. package/dist/components/button-group/ButtonGroup.d.ts +7 -0
  44. package/dist/components/button-group/ButtonGroup.js +26 -0
  45. package/dist/components/card/Card.d.ts +14 -0
  46. package/dist/components/card/Card.js +39 -0
  47. package/dist/components/card/CardSection.d.ts +9 -0
  48. package/dist/components/card/CardSection.js +22 -0
  49. package/dist/components/col/Col.d.ts +13 -0
  50. package/dist/components/col/Col.js +26 -0
  51. package/dist/components/command/Command.d.ts +30 -0
  52. package/dist/components/command/Command.js +102 -0
  53. package/dist/components/container/Container.d.ts +6 -0
  54. package/dist/components/container/Container.js +20 -0
  55. package/dist/components/d-flow/DFlow.d.ts +5 -0
  56. package/dist/components/d-flow/DFlow.edges.hook.d.ts +4 -0
  57. package/dist/components/d-flow/DFlow.edges.hook.js +145 -0
  58. package/dist/components/d-flow/DFlow.js +373 -0
  59. package/dist/components/d-flow/DFlow.nodes.hook.d.ts +3 -0
  60. package/dist/components/d-flow/DFlow.nodes.hook.js +140 -0
  61. package/dist/components/d-flow/DFlow.service.d.ts +10 -0
  62. package/dist/components/d-flow/DFlow.service.js +11 -0
  63. package/dist/components/d-flow/DFlow.view.d.ts +109 -0
  64. package/dist/components/d-flow/DFlow.view.js +213 -0
  65. package/dist/components/d-flow/control/DFlowControl.d.ts +2 -0
  66. package/dist/components/d-flow/control/DFlowControl.js +77 -0
  67. package/dist/components/d-flow/control/index.d.ts +1 -0
  68. package/dist/components/d-flow/control/index.js +4 -0
  69. package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +10 -0
  70. package/dist/components/d-flow/data-type/DFlowDataType.service.js +7 -0
  71. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +2 -0
  72. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +18 -0
  73. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +4 -0
  74. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +6 -0
  75. package/dist/components/d-flow/data-type/DFlowDataType.view.d.ts +32 -0
  76. package/dist/components/d-flow/data-type/DFlowDataType.view.js +65 -0
  77. package/dist/components/d-flow/data-type/index.d.ts +2 -0
  78. package/dist/components/d-flow/data-type/index.js +6 -0
  79. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +6 -0
  80. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +6 -0
  81. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +6 -0
  82. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +6 -0
  83. package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.d.ts +7 -0
  84. package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.js +214 -0
  85. package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.d.ts +4 -0
  86. package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.js +214 -0
  87. package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.d.ts +9 -0
  88. package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +217 -0
  89. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.d.ts +4 -0
  90. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.js +214 -0
  91. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +6 -0
  92. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +7 -0
  93. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.d.ts +8 -0
  94. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.js +10 -0
  95. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.d.ts +3 -0
  96. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +8 -0
  97. package/dist/components/d-flow/edge/DFlowEdge.d.ts +10 -0
  98. package/dist/components/d-flow/edge/DFlowEdge.js +48 -0
  99. package/dist/components/d-flow/folder/DFlowFolder.d.ts +19 -0
  100. package/dist/components/d-flow/folder/DFlowFolder.js +118 -0
  101. package/dist/components/d-flow/folder/index.d.ts +1 -0
  102. package/dist/components/d-flow/folder/index.js +6 -0
  103. package/dist/components/d-flow/function/DFlowFunction.input.hook.d.ts +4 -0
  104. package/dist/components/d-flow/function/DFlowFunction.input.hook.js +9 -0
  105. package/dist/components/d-flow/function/DFlowFunction.return.hook.d.ts +4 -0
  106. package/dist/components/d-flow/function/DFlowFunction.return.hook.js +11 -0
  107. package/dist/components/d-flow/function/DFlowFunction.service.d.ts +6 -0
  108. package/dist/components/d-flow/function/DFlowFunction.service.js +9 -0
  109. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +10 -0
  110. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +75 -0
  111. package/dist/components/d-flow/function/DFlowFunction.view.d.ts +66 -0
  112. package/dist/components/d-flow/function/DFlowFunction.view.js +117 -0
  113. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.d.ts +15 -0
  114. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +158 -0
  115. package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +5 -0
  116. package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +55 -0
  117. package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.d.ts +11 -0
  118. package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +26 -0
  119. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.d.ts +9 -0
  120. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +97 -0
  121. package/dist/components/d-flow/function/index.d.ts +2 -0
  122. package/dist/components/d-flow/function/index.js +7 -0
  123. package/dist/components/d-flow/index.d.ts +13 -0
  124. package/dist/components/d-flow/index.js +46 -0
  125. package/dist/components/d-flow/input/DFlowInputDataType.d.ts +8 -0
  126. package/dist/components/d-flow/input/DFlowInputDataType.js +422 -0
  127. package/dist/components/d-flow/minimap/DFlowMiniMap.d.ts +2 -0
  128. package/dist/components/d-flow/minimap/DFlowMiniMap.js +21 -0
  129. package/dist/components/d-flow/minimap/index.d.ts +1 -0
  130. package/dist/components/d-flow/minimap/index.js +4 -0
  131. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.d.ts +33 -0
  132. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +151 -0
  133. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +5 -0
  134. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +18 -0
  135. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +21 -0
  136. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +25 -0
  137. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.d.ts +8 -0
  138. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +67 -0
  139. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.d.ts +3 -0
  140. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.js +42 -0
  141. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.d.ts +2 -0
  142. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +69 -0
  143. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.d.ts +6 -0
  144. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +21 -0
  145. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.d.ts +7 -0
  146. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +21 -0
  147. package/dist/components/d-flow/suggestion/index.d.ts +2 -0
  148. package/dist/components/d-flow/suggestion/index.js +7 -0
  149. package/dist/components/d-flow/tab/DFlowTabDefault.d.ts +11 -0
  150. package/dist/components/d-flow/tab/DFlowTabDefault.js +97 -0
  151. package/dist/components/d-flow/tab/DFlowTabTrigger.d.ts +6 -0
  152. package/dist/components/d-flow/tab/DFlowTabTrigger.js +51 -0
  153. package/dist/components/d-flow/tab/DFlowTabs.d.ts +2 -0
  154. package/dist/components/d-flow/tab/DFlowTabs.js +105 -0
  155. package/dist/components/d-flow/type/DFlowType.service.d.ts +6 -0
  156. package/dist/components/d-flow/type/DFlowType.service.js +9 -0
  157. package/dist/components/d-flow/type/DFlowType.view.d.ts +35 -0
  158. package/dist/components/d-flow/type/DFlowType.view.js +69 -0
  159. package/dist/components/d-flow/type/index.d.ts +2 -0
  160. package/dist/components/d-flow/type/index.js +6 -0
  161. package/dist/components/d-flow/validation/DFlowValidation.d.ts +6 -0
  162. package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +3 -0
  163. package/dist/components/d-flow/validation/DFlowValidation.hook.js +10 -0
  164. package/dist/components/d-flow/validation/DFlowValidation.js +59 -0
  165. package/dist/components/d-flow/validation/index.d.ts +2 -0
  166. package/dist/components/d-flow/validation/index.js +6 -0
  167. package/dist/components/d-fullscreen/DFullScreen.d.ts +7 -0
  168. package/dist/components/d-fullscreen/DFullScreen.js +20 -0
  169. package/dist/components/d-layout/DLayout.d.ts +10 -0
  170. package/dist/components/d-layout/DLayout.js +51 -0
  171. package/dist/components/d-namespace/DNamespace.service.d.ts +6 -0
  172. package/dist/components/d-namespace/DNamespace.service.js +11 -0
  173. package/dist/components/d-namespace/DNamespace.view.d.ts +32 -0
  174. package/dist/components/d-namespace/DNamespace.view.js +65 -0
  175. package/dist/components/d-namespace/index.d.ts +12 -0
  176. package/dist/components/d-namespace/index.js +35 -0
  177. package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +8 -0
  178. package/dist/components/d-namespace/license/DNamespaceLicense.service.js +11 -0
  179. package/dist/components/d-namespace/license/DNamespaceLicense.view.d.ts +26 -0
  180. package/dist/components/d-namespace/license/DNamespaceLicense.view.js +57 -0
  181. package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +9 -0
  182. package/dist/components/d-namespace/member/DNamespaceMember.service.js +11 -0
  183. package/dist/components/d-namespace/member/DNamespaceMember.view.d.ts +26 -0
  184. package/dist/components/d-namespace/member/DNamespaceMember.view.js +57 -0
  185. package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +9 -0
  186. package/dist/components/d-namespace/project/DNamespaceProject.service.js +11 -0
  187. package/dist/components/d-namespace/project/DNamespaceProject.view.d.ts +35 -0
  188. package/dist/components/d-namespace/project/DNamespaceProject.view.js +69 -0
  189. package/dist/components/d-namespace/project/DNamespaceProjectCard.d.ts +9 -0
  190. package/dist/components/d-namespace/project/DNamespaceProjectCard.js +57 -0
  191. package/dist/components/d-namespace/project/DNamespaceProjectMenu.d.ts +9 -0
  192. package/dist/components/d-namespace/project/DNamespaceProjectMenu.js +18 -0
  193. package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +10 -0
  194. package/dist/components/d-namespace/role/DNamespaceRole.service.js +11 -0
  195. package/dist/components/d-namespace/role/DNamespaceRole.view.d.ts +26 -0
  196. package/dist/components/d-namespace/role/DNamespaceRole.view.js +57 -0
  197. package/dist/components/d-organization/DOrganization.service.d.ts +8 -0
  198. package/dist/components/d-organization/DOrganization.service.js +11 -0
  199. package/dist/components/d-organization/DOrganization.view.d.ts +20 -0
  200. package/dist/components/d-organization/DOrganization.view.js +52 -0
  201. package/dist/components/d-organization/DOrganizationCard.d.ts +10 -0
  202. package/dist/components/d-organization/DOrganizationCard.js +63 -0
  203. package/dist/components/d-organization/DOrganizationMenu.d.ts +9 -0
  204. package/dist/components/d-organization/DOrganizationMenu.js +18 -0
  205. package/dist/components/d-organization/index.d.ts +4 -0
  206. package/dist/components/d-organization/index.js +19 -0
  207. package/dist/components/d-resizable/DResizable.d.ts +10 -0
  208. package/dist/components/d-resizable/DResizable.js +31 -0
  209. package/dist/components/d-runtime/DRuntime.service.d.ts +9 -0
  210. package/dist/components/d-runtime/DRuntime.service.js +11 -0
  211. package/dist/components/d-runtime/DRuntime.view.d.ts +38 -0
  212. package/dist/components/d-runtime/DRuntime.view.js +73 -0
  213. package/dist/components/d-runtime/index.d.ts +2 -0
  214. package/dist/components/d-runtime/index.js +6 -0
  215. package/dist/components/d-user/DUser.service.d.ts +21 -0
  216. package/dist/components/d-user/DUser.service.js +17 -0
  217. package/dist/components/d-user/DUser.view.d.ts +52 -0
  218. package/dist/components/d-user/DUser.view.js +100 -0
  219. package/dist/components/d-user/DUserMenu.d.ts +8 -0
  220. package/dist/components/d-user/DUserMenu.js +28 -0
  221. package/dist/components/d-user/index.d.ts +3 -0
  222. package/dist/components/d-user/index.js +17 -0
  223. package/dist/components/dialog/Dialog.d.ts +28 -0
  224. package/dist/components/dialog/Dialog.js +98 -0
  225. package/dist/components/file-tabs/FileTabs.d.ts +17 -0
  226. package/dist/components/file-tabs/FileTabs.js +70 -0
  227. package/dist/components/file-tabs/FileTabs.service.d.ts +13 -0
  228. package/dist/components/file-tabs/FileTabs.service.js +47 -0
  229. package/dist/components/file-tabs/FileTabs.view.d.ts +9 -0
  230. package/dist/components/file-tabs/FileTabs.view.js +1 -0
  231. package/dist/components/flex/Flex.d.ts +7 -0
  232. package/dist/components/flex/Flex.js +21 -0
  233. package/dist/components/form/CheckboxInput.d.ts +5 -0
  234. package/dist/components/form/CheckboxInput.js +67 -0
  235. package/dist/components/form/EmailInput.d.ts +8 -0
  236. package/dist/components/form/EmailInput.js +20 -0
  237. package/dist/components/form/Input.d.ts +22 -0
  238. package/dist/components/form/Input.js +153 -0
  239. package/dist/components/form/InputDescription.d.ts +5 -0
  240. package/dist/components/form/InputDescription.js +12 -0
  241. package/dist/components/form/InputLabel.d.ts +5 -0
  242. package/dist/components/form/InputLabel.js +12 -0
  243. package/dist/components/form/InputMessage.d.ts +5 -0
  244. package/dist/components/form/InputMessage.js +18 -0
  245. package/dist/components/form/InputSuggestion.d.ts +19 -0
  246. package/dist/components/form/InputSuggestion.js +102 -0
  247. package/dist/components/form/NumberInput.d.ts +6 -0
  248. package/dist/components/form/NumberInput.js +20 -0
  249. package/dist/components/form/PasswordInput.d.ts +8 -0
  250. package/dist/components/form/PasswordInput.js +18 -0
  251. package/dist/components/form/PinInput.d.ts +11 -0
  252. package/dist/components/form/PinInput.js +66 -0
  253. package/dist/components/form/RadioGroup.d.ts +5 -0
  254. package/dist/components/form/RadioGroup.js +48 -0
  255. package/dist/components/form/RadioInput.d.ts +7 -0
  256. package/dist/components/form/RadioInput.js +27 -0
  257. package/dist/components/form/SwitchInput.d.ts +6 -0
  258. package/dist/components/form/SwitchInput.js +19 -0
  259. package/dist/components/form/TextInput.d.ts +7 -0
  260. package/dist/components/form/TextInput.js +19 -0
  261. package/dist/components/form/index.d.ts +15 -0
  262. package/dist/components/form/index.js +37 -0
  263. package/dist/components/form/useForm.d.ts +25 -0
  264. package/dist/components/form/useForm.js +57 -0
  265. package/dist/components/menu/Menu.d.ts +27 -0
  266. package/dist/components/menu/Menu.js +104 -0
  267. package/dist/components/quote/Quote.d.ts +10 -0
  268. package/dist/components/quote/Quote.js +48 -0
  269. package/dist/components/row/Row.d.ts +6 -0
  270. package/dist/components/row/Row.js +20 -0
  271. package/dist/components/scroll-area/ScrollArea.d.ts +13 -0
  272. package/dist/components/scroll-area/ScrollArea.js +42 -0
  273. package/dist/components/segmented-control/SegmentedControl.d.ts +8 -0
  274. package/dist/components/segmented-control/SegmentedControl.js +23 -0
  275. package/dist/components/text/Text.d.ts +8 -0
  276. package/dist/components/text/Text.js +23 -0
  277. package/dist/components/tooltip/Tooltip.d.ts +13 -0
  278. package/dist/components/tooltip/Tooltip.js +47 -0
  279. package/dist/index.d.ts +28 -0
  280. package/dist/index.js +223 -0
  281. package/dist/utils/arrayService.d.ts +10 -0
  282. package/dist/utils/arrayService.js +1 -0
  283. package/dist/utils/contextStore.d.ts +62 -0
  284. package/dist/utils/contextStore.js +60 -0
  285. package/dist/utils/generics.d.ts +17 -0
  286. package/dist/utils/generics.js +311 -0
  287. package/dist/utils/index.d.ts +8 -0
  288. package/dist/utils/index.js +28 -0
  289. package/dist/utils/inspection.d.ts +13 -0
  290. package/dist/utils/inspection.js +4 -0
  291. package/dist/utils/nonReactiveArrayService.d.ts +19 -0
  292. package/dist/utils/nonReactiveArrayService.js +54 -0
  293. package/dist/utils/objectStore.d.ts +12 -0
  294. package/dist/utils/objectStore.js +34 -0
  295. package/dist/utils/reactiveArrayService.d.ts +22 -0
  296. package/dist/utils/reactiveArrayService.js +81 -0
  297. package/dist/utils/types.d.ts +57 -0
  298. package/dist/utils/types.js +4 -0
  299. package/dist/utils/utils.d.ts +68 -0
  300. package/dist/utils/utils.js +216 -0
  301. package/package.json +121 -0
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ export interface FileTabsView {
3
+ id?: string;
4
+ closeable: boolean;
5
+ children: React.ReactNode;
6
+ content: React.ReactNode;
7
+ active: boolean;
8
+ lastActive?: Date;
9
+ }
@@ -0,0 +1,7 @@
1
+ import { Code0Component } from '../../utils/types';
2
+ import { default as React } from 'react';
3
+ interface FlexType extends Code0Component<HTMLDivElement> {
4
+ children: React.ReactNode | React.ReactNode[];
5
+ }
6
+ export declare const Flex: React.FC<FlexType>;
7
+ export {};
@@ -0,0 +1,21 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { c as s } from "../../compiler-runtime-BNHg76kC.js";
3
+ import { mergeCode0Props as n } from "../../utils/utils.js";
4
+ import '../../assets/Flex.css';/* empty css */
5
+ const h = (i) => {
6
+ const e = s.c(6);
7
+ let t, r;
8
+ if (e[0] !== i) {
9
+ const {
10
+ children: l,
11
+ ...m
12
+ } = i;
13
+ t = l, r = n("flex", m), e[0] = i, e[1] = t, e[2] = r;
14
+ } else
15
+ t = e[1], r = e[2];
16
+ let o;
17
+ return e[3] !== t || e[4] !== r ? (o = /* @__PURE__ */ c("div", { ...r, children: t }), e[3] = t, e[4] = r, e[5] = o) : o = e[5], o;
18
+ };
19
+ export {
20
+ h as Flex
21
+ };
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { CheckboxProps, CheckedState } from '@radix-ui/react-checkbox';
3
+ import { InputProps } from './Input';
4
+ export type CheckboxInputProps = Omit<InputProps<CheckedState>, "wrapperComponent" | "type" | "left" | "right" | "leftType" | "rightType"> & Omit<CheckboxProps, 'defaultChecked' | 'value' | 'defaultValue'>;
5
+ export declare const CheckboxInput: React.FC<CheckboxInputProps>;
@@ -0,0 +1,67 @@
1
+ import { jsx as r, jsxs as v, Fragment as N } from "react/jsx-runtime";
2
+ import { c as R } from "../../compiler-runtime-BNHg76kC.js";
3
+ import $ from "react";
4
+ import { Checkbox as D, CheckboxIndicator as E } from "@radix-ui/react-checkbox";
5
+ import { InputLabel as F } from "./InputLabel.js";
6
+ import { InputDescription as L } from "./InputDescription.js";
7
+ import { mergeCode0Props as j } from "../../utils/utils.js";
8
+ import { InputMessage as P } from "./InputMessage.js";
9
+ import '../../assets/Input.css';/* empty css */
10
+ import { IconMinus as S, IconCheck as T } from "@tabler/icons-react";
11
+ const U = (l) => {
12
+ const e = R.c(40), [i, z] = $.useState(l.initialValue ?? "indeterminate");
13
+ let a, t, s, d, n, o, c;
14
+ if (e[0] !== i || e[1] !== l) {
15
+ const {
16
+ title: g,
17
+ description: x,
18
+ formValidation: M,
19
+ ...V
20
+ } = l;
21
+ t = M === void 0 ? {
22
+ valid: !0,
23
+ notValidMessage: null,
24
+ setValue: q
25
+ } : M, e[9] !== g ? (o = g ? /* @__PURE__ */ r(F, { children: g }) : null, e[9] = g, e[10] = o) : o = e[10], e[11] !== x ? (c = x ? /* @__PURE__ */ r(L, { children: x }) : null, e[11] = x, e[12] = c) : c = e[12];
26
+ const I = `input ${t?.valid ? "" : "input--not-valid"} checkbox-input`;
27
+ e[13] !== I ? (n = j(I, {}), e[13] = I, e[14] = n) : n = e[14], a = D, s = i, d = j("checkbox-input__button", {
28
+ ...V,
29
+ onCheckedChange: (_) => {
30
+ V.onCheckedChange && V.onCheckedChange(_), z(_), t.setValue(_);
31
+ }
32
+ }), e[0] = i, e[1] = l, e[2] = a, e[3] = t, e[4] = s, e[5] = d, e[6] = n, e[7] = o, e[8] = c;
33
+ } else
34
+ a = e[2], t = e[3], s = e[4], d = e[5], n = e[6], o = e[7], c = e[8];
35
+ let m;
36
+ e[15] !== i ? (m = i === "indeterminate" && /* @__PURE__ */ r(S, { size: 10 }), e[15] = i, e[16] = m) : m = e[16];
37
+ let f;
38
+ e[17] !== i ? (f = i === !0 && /* @__PURE__ */ r(T, { size: 10 }), e[17] = i, e[18] = f) : f = e[18];
39
+ let h;
40
+ e[19] !== m || e[20] !== f ? (h = /* @__PURE__ */ v(E, { className: "checkbox-input__indicator", children: [
41
+ m,
42
+ f
43
+ ] }), e[19] = m, e[20] = f, e[21] = h) : h = e[21];
44
+ let u;
45
+ e[22] !== a || e[23] !== s || e[24] !== d || e[25] !== h ? (u = /* @__PURE__ */ r(a, { defaultChecked: s, ...d, children: h }), e[22] = a, e[23] = s, e[24] = d, e[25] = h, e[26] = u) : u = e[26];
46
+ let p;
47
+ e[27] !== l.label ? (p = /* @__PURE__ */ r("div", { className: "input__right input__right--action}", children: l.label }), e[27] = l.label, e[28] = p) : p = e[28];
48
+ let k;
49
+ e[29] !== n || e[30] !== u || e[31] !== p ? (k = /* @__PURE__ */ v("div", { ...n, children: [
50
+ u,
51
+ p
52
+ ] }), e[29] = n, e[30] = u, e[31] = p, e[32] = k) : k = e[32];
53
+ let C;
54
+ e[33] !== t ? (C = !t?.valid && t?.notValidMessage ? /* @__PURE__ */ r(P, { children: t.notValidMessage }) : null, e[33] = t, e[34] = C) : C = e[34];
55
+ let b;
56
+ return e[35] !== k || e[36] !== C || e[37] !== o || e[38] !== c ? (b = /* @__PURE__ */ v(N, { children: [
57
+ o,
58
+ c,
59
+ k,
60
+ C
61
+ ] }), e[35] = k, e[36] = C, e[37] = o, e[38] = c, e[39] = b) : b = e[39], b;
62
+ };
63
+ function q(l) {
64
+ }
65
+ export {
66
+ U as CheckboxInput
67
+ };
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { InputProps } from './Input';
3
+ interface EmailInputProps extends Omit<InputProps<string | null>, "wrapperComponent" | "type"> {
4
+ clearable?: boolean;
5
+ }
6
+ export declare const emailValidation: (email: string) => boolean;
7
+ export declare const EmailInput: React.ForwardRefExoticComponent<EmailInputProps>;
8
+ export {};
@@ -0,0 +1,20 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import o from "react";
3
+ import { Input as l, setElementKey as m } from "./Input.js";
4
+ import { IconX as s } from "@tabler/icons-react";
5
+ import { Button as f } from "../button/Button.js";
6
+ const z = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/, d = (t) => z.test(t), g = o.forwardRef((t, x) => {
7
+ x = x || o.useRef(null);
8
+ const {
9
+ clearable: r = !1,
10
+ right: n,
11
+ ...c
12
+ } = t, i = () => {
13
+ x.current && m(x.current, "value", "", "change");
14
+ }, a = [n];
15
+ return r && a.push(/* @__PURE__ */ e(f, { onClick: i, children: /* @__PURE__ */ e(s, { size: 13 }) })), /* @__PURE__ */ e(l, { right: a, type: "email", ref: x, ...c });
16
+ });
17
+ export {
18
+ g as EmailInput,
19
+ d as emailValidation
20
+ };
@@ -0,0 +1,22 @@
1
+ import { default as React, ForwardRefExoticComponent } from 'react';
2
+ import { Code0Component } from '../../utils/types';
3
+ import { ValidationProps } from './useForm';
4
+ import { InputSuggestion } from './InputSuggestion';
5
+ export declare const setElementKey: (element: HTMLElement, key: string, value: any, event: string) => void;
6
+ export type Code0Input = Omit<Omit<Omit<Code0Component<HTMLInputElement>, "left">, "right">, "title">;
7
+ export interface InputProps<T> extends Code0Input, ValidationProps<T> {
8
+ suggestions?: InputSuggestion[];
9
+ suggestionsHeader?: React.ReactNode;
10
+ suggestionsFooter?: React.ReactNode;
11
+ onSuggestionSelect?: (suggestion: InputSuggestion) => void;
12
+ transformValue?: (value: T) => React.ReactNode | T;
13
+ disableOnValue?: (value: T) => boolean;
14
+ wrapperComponent?: Code0Component<HTMLDivElement>;
15
+ right?: React.ReactNode;
16
+ left?: React.ReactNode;
17
+ leftType?: "action" | "placeholder" | "icon";
18
+ rightType?: "action" | "placeholder" | "icon";
19
+ title?: React.ReactNode;
20
+ description?: React.ReactNode;
21
+ }
22
+ export declare const Input: ForwardRefExoticComponent<InputProps<any>>;
@@ -0,0 +1,153 @@
1
+ import { jsxs as f, jsx as r, Fragment as T } from "react/jsx-runtime";
2
+ import h, { useRef as v, useState as x, useEffect as V, useMemo as k } from "react";
3
+ import { mergeCode0Props as y } from "../../utils/utils.js";
4
+ import '../../assets/Input.css';/* empty css */
5
+ import { InputLabel as A } from "./InputLabel.js";
6
+ import { InputDescription as K } from "./InputDescription.js";
7
+ import { InputMessage as H } from "./InputMessage.js";
8
+ import { Menu as J, MenuTrigger as U, MenuPortal as q } from "../menu/Menu.js";
9
+ import { InputSuggestionMenuContent as z, InputSuggestionMenuContentItems as B } from "./InputSuggestion.js";
10
+ const G = (t, s, n, a) => {
11
+ const o = Object.getOwnPropertyDescriptor(t, s)?.set, l = Object.getPrototypeOf(t), i = Object.getOwnPropertyDescriptor(l, s)?.set;
12
+ o && o !== i ? i?.call(t, n) : o?.call(t, n), t.dispatchEvent(new Event(a, {
13
+ bubbles: !0
14
+ }));
15
+ }, oe = h.forwardRef((t, s) => {
16
+ const n = s || v(null), a = v(null), [o, l] = x(!1), i = v(!0), [c, _] = x(t.defaultValue || t.initialValue || t.placeholder), {
17
+ wrapperComponent: P = {},
18
+ // Default empty wrapper props
19
+ title: b,
20
+ // Optional input label
21
+ description: M,
22
+ // Optional description below label
23
+ disabled: w = !1,
24
+ // Input disabled state
25
+ left: E,
26
+ // Left element (icon/button)
27
+ right: I,
28
+ // Right element (icon/button)
29
+ leftType: j = "icon",
30
+ // Visual hint for left
31
+ rightType: R = "action",
32
+ // Visual hint for right
33
+ formValidation: u = {
34
+ valid: !0,
35
+ notValidMessage: null,
36
+ setValue: null
37
+ },
38
+ // Validation config
39
+ suggestions: d,
40
+ // Optional suggestions array
41
+ suggestionsHeader: S,
42
+ // Optional header above suggestion list
43
+ suggestionsFooter: O,
44
+ // Optional footer below suggestion list
45
+ onSuggestionSelect: C = () => {
46
+ },
47
+ // Callback for suggestion selection,
48
+ disableOnValue: D = () => !1,
49
+ ...m
50
+ // Remaining native input props
51
+ } = t;
52
+ V(() => {
53
+ const e = n.current;
54
+ if (!e || !u?.setValue) return;
55
+ const g = (L) => {
56
+ const N = m.type !== "checkbox" ? L.target.value : L.target.checked;
57
+ u.setValue?.(N);
58
+ };
59
+ return e.addEventListener("change", g), () => e.removeEventListener("change", g);
60
+ }, [u?.setValue]), V(() => {
61
+ if (!d) return;
62
+ const e = (g) => {
63
+ i.current = !!n.current?.contains(g.target);
64
+ };
65
+ return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
66
+ }, [d]);
67
+ const p = h.useMemo(() => D(c), [c, D]);
68
+ V(() => {
69
+ n.current && (n.current.addEventListener("change", (e) => {
70
+ p || _(e.target.value);
71
+ }), n.current.addEventListener("input", (e) => {
72
+ p || _(e.target.value);
73
+ }));
74
+ }, [n, p]);
75
+ const $ = h.useMemo(() => t.transformValue ? /* @__PURE__ */ f("div", { className: "input__syntax", children: [
76
+ t.transformValue(c),
77
+ " "
78
+ ] }) : null, [t.transformValue, c]), F = k(() => /* @__PURE__ */ f(
79
+ J,
80
+ {
81
+ open: o,
82
+ modal: !1,
83
+ onOpenChange: (e) => {
84
+ if (!e && i.current) {
85
+ i.current = !1;
86
+ return;
87
+ }
88
+ l(e), e && setTimeout(() => n.current?.focus(), 0);
89
+ },
90
+ children: [
91
+ /* @__PURE__ */ r(U, { asChild: !0, children: /* @__PURE__ */ r(
92
+ "input",
93
+ {
94
+ ref: n,
95
+ ...y(`input__control ${t.transformValue ? "input__control--syntax" : ""}`, m),
96
+ onFocus: () => !o && l(!0),
97
+ onKeyDown: (e) => {
98
+ e.key === "ArrowDown" ? (e.preventDefault(), a.current?.focusFirstItem()) : e.key === "ArrowUp" && (e.preventDefault(), a.current?.focusLastItem());
99
+ },
100
+ disabled: w || p
101
+ }
102
+ ) }),
103
+ /* @__PURE__ */ r(q, { children: /* @__PURE__ */ f(z, { children: [
104
+ S,
105
+ " ",
106
+ /* @__PURE__ */ r(
107
+ B,
108
+ {
109
+ ref: a,
110
+ suggestions: d,
111
+ onSuggestionSelect: (e) => {
112
+ C || G(s.current, "value", typeof c == "object" ? JSON.stringify(e.value) : e.value, "change"), C(e), l(!1);
113
+ }
114
+ }
115
+ ),
116
+ O,
117
+ " "
118
+ ] }) })
119
+ ]
120
+ }
121
+ ), [o, d, S, O]);
122
+ return /* @__PURE__ */ f(T, { children: [
123
+ b && /* @__PURE__ */ r(A, { children: b }),
124
+ " ",
125
+ M && /* @__PURE__ */ r(K, { children: M }),
126
+ " ",
127
+ /* @__PURE__ */ f("div", { ...y(
128
+ `input ${u?.valid ? "" : "input--not-valid"}`,
129
+ // Add error class if invalid
130
+ P
131
+ ), children: [
132
+ E && /* @__PURE__ */ r("div", { className: `input__left input__left--${j}`, children: E }),
133
+ " ",
134
+ d ? F : /* @__PURE__ */ r(
135
+ "input",
136
+ {
137
+ tabIndex: 2,
138
+ ref: n,
139
+ disabled: w,
140
+ ...y(`input__control ${t.transformValue ? "input__control--syntax" : ""}`, m)
141
+ }
142
+ ),
143
+ $,
144
+ I && /* @__PURE__ */ r("div", { className: `input__right input__right--${R}`, children: I }),
145
+ " "
146
+ ] }),
147
+ !u?.valid && u?.notValidMessage && /* @__PURE__ */ r(H, { children: u.notValidMessage })
148
+ ] });
149
+ });
150
+ export {
151
+ oe as Input,
152
+ G as setElementKey
153
+ };
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export interface InputDescriptionProps {
3
+ children: React.ReactNode | React.ReactElement;
4
+ }
5
+ export declare const InputDescription: React.FC<InputDescriptionProps>;
@@ -0,0 +1,12 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { c as i } from "../../compiler-runtime-BNHg76kC.js";
3
+ const p = (s) => {
4
+ const t = i.c(2), {
5
+ children: r
6
+ } = s;
7
+ let o;
8
+ return t[0] !== r ? (o = /* @__PURE__ */ e("span", { className: "input__description", children: r }), t[0] = r, t[1] = o) : o = t[1], o;
9
+ };
10
+ export {
11
+ p as InputDescription
12
+ };
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export interface InputLabelProps {
3
+ children: React.ReactNode | React.ReactElement;
4
+ }
5
+ export declare const InputLabel: React.FC<InputLabelProps>;
@@ -0,0 +1,12 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { c as s } from "../../compiler-runtime-BNHg76kC.js";
3
+ const i = (o) => {
4
+ const t = s.c(2), {
5
+ children: l
6
+ } = o;
7
+ let e;
8
+ return t[0] !== l ? (e = /* @__PURE__ */ r("label", { className: "input__label", children: l }), t[0] = l, t[1] = e) : e = t[1], e;
9
+ };
10
+ export {
11
+ i as InputLabel
12
+ };
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export interface InputMessageProps {
3
+ children: string;
4
+ }
5
+ export declare const InputMessage: React.FC<InputMessageProps>;
@@ -0,0 +1,18 @@
1
+ import { jsx as c, jsxs as i } from "react/jsx-runtime";
2
+ import { c as m } from "../../compiler-runtime-BNHg76kC.js";
3
+ import { IconExclamationCircle as n } from "@tabler/icons-react";
4
+ const f = (r) => {
5
+ const e = m.c(3), {
6
+ children: o
7
+ } = r;
8
+ let s;
9
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ c(n, { size: 16 }), e[0] = s) : s = e[0];
10
+ let t;
11
+ return e[1] !== o ? (t = /* @__PURE__ */ i("span", { className: "input__message", children: [
12
+ s,
13
+ o
14
+ ] }), e[1] = o, e[2] = t) : t = e[2], t;
15
+ };
16
+ export {
17
+ f as InputMessage
18
+ };
@@ -0,0 +1,19 @@
1
+ import { MenuContentProps } from '../menu/Menu';
2
+ import { default as React } from 'react';
3
+ export interface InputSuggestion {
4
+ children: React.ReactNode;
5
+ value: any;
6
+ ref?: any;
7
+ groupLabel?: string;
8
+ }
9
+ export type InputSuggestionMenuContentProps = MenuContentProps;
10
+ export interface InputSuggestionMenuContentItemsProps {
11
+ suggestions?: InputSuggestion[];
12
+ onSuggestionSelect?: (suggestion: InputSuggestion) => void;
13
+ }
14
+ export interface InputSuggestionMenuContentItemsHandle {
15
+ focusFirstItem: () => void;
16
+ focusLastItem: () => void;
17
+ }
18
+ export declare const InputSuggestionMenuContent: React.FC<InputSuggestionMenuContentProps>;
19
+ export declare const InputSuggestionMenuContentItems: React.FC<InputSuggestionMenuContentItemsProps>;
@@ -0,0 +1,102 @@
1
+ import { jsx as p, jsxs as d } from "react/jsx-runtime";
2
+ import { c as I } from "../../compiler-runtime-BNHg76kC.js";
3
+ import { MenuContent as x, MenuLabel as M, MenuItem as w } from "../menu/Menu.js";
4
+ import l from "react";
5
+ import { ScrollArea as R, ScrollAreaViewport as G, ScrollAreaScrollbar as A, ScrollAreaThumb as D } from "../scroll-area/ScrollArea.js";
6
+ import { IconChevronDown as E, IconChevronUp as y } from "@tabler/icons-react";
7
+ const k = l.forwardRef((o, h) => {
8
+ const e = I.c(6);
9
+ let a, u;
10
+ e[0] !== o ? ({
11
+ children: a,
12
+ ...u
13
+ } = o, e[0] = o, e[1] = a, e[2] = u) : (a = e[1], u = e[2]);
14
+ const i = l.useRef(null);
15
+ let c;
16
+ return e[3] !== a || e[4] !== u ? (c = /* @__PURE__ */ p(x, { ref: i, onContextMenuCapture: j, onInteractOutside: F, onCloseAutoFocus: O, align: "start", sideOffset: 8, ...u, children: a }), e[3] = a, e[4] = u, e[5] = c) : c = e[5], c;
17
+ }), U = l.forwardRef((o, h) => {
18
+ const {
19
+ suggestions: e,
20
+ onSuggestionSelect: a = () => {
21
+ },
22
+ ...u
23
+ } = o, i = l.useRef([]), [c, m] = l.useState({});
24
+ l.useEffect(() => {
25
+ if (!e) {
26
+ m({});
27
+ return;
28
+ }
29
+ m((r) => {
30
+ const t = {};
31
+ return e.forEach((n) => {
32
+ n.groupLabel && (r.hasOwnProperty(n.groupLabel) ? t[n.groupLabel] = r[n.groupLabel] : t[n.groupLabel] = !1);
33
+ }), t;
34
+ });
35
+ }, [e]);
36
+ const {
37
+ groupLabelCount: v,
38
+ visibleSuggestionCount: S
39
+ } = l.useMemo(() => {
40
+ if (!e) return {
41
+ groupLabelCount: 0,
42
+ visibleSuggestionCount: 0
43
+ };
44
+ let r = 0, t = 0;
45
+ return e.forEach((n, s, b) => {
46
+ const f = s > 0 ? b[s - 1]?.groupLabel : void 0;
47
+ n.groupLabel && n.groupLabel !== f && (r += 1), (n.groupLabel ? c[n.groupLabel] : !1) || (t += 1);
48
+ }), {
49
+ groupLabelCount: r,
50
+ visibleSuggestionCount: t
51
+ };
52
+ }, [c, e]), g = (r) => {
53
+ m((t) => ({
54
+ ...t,
55
+ [r]: !t[r]
56
+ }));
57
+ };
58
+ return l.useImperativeHandle(h, () => ({
59
+ focusFirstItem: () => i.current[0]?.focus(),
60
+ // @ts-ignore
61
+ focusLastItem: () => i.current.at(-1)?.focus()
62
+ }), []), i.current = [], /* @__PURE__ */ d(R, { h: `${Math.max(S + v, 1) * 27}px`, mah: "calc(var(--radix-popper-available-height) - 3rem - 69px)", ...u, children: [
63
+ /* @__PURE__ */ p(G, { children: e?.map((r, t, n) => {
64
+ const s = t > 0 ? n[t - 1]?.groupLabel : void 0, b = r.groupLabel && r.groupLabel !== s, f = r.groupLabel ? c[r.groupLabel] : !1;
65
+ let C = i.current.length;
66
+ return /* @__PURE__ */ d(l.Fragment, { children: [
67
+ b && r.groupLabel && /* @__PURE__ */ d(M, { onPointerDown: (L) => L.preventDefault(), onClick: () => g(r.groupLabel), style: {
68
+ display: "flex",
69
+ alignItems: "center",
70
+ justifyContent: "space-between",
71
+ cursor: "pointer"
72
+ }, children: [
73
+ /* @__PURE__ */ p("span", { children: r.groupLabel }),
74
+ f ? /* @__PURE__ */ p(E, { size: 16 }) : /* @__PURE__ */ p(y, { size: 16 })
75
+ ] }),
76
+ !f && /* @__PURE__ */ p(
77
+ w,
78
+ {
79
+ textValue: "",
80
+ onSelect: () => setTimeout(() => a(r), 0),
81
+ ref: (L) => i.current[C] = L,
82
+ children: r.children
83
+ }
84
+ )
85
+ ] }, t);
86
+ }) }),
87
+ /* @__PURE__ */ p(A, { orientation: "vertical", children: /* @__PURE__ */ p(D, {}) })
88
+ ] });
89
+ });
90
+ function j(o) {
91
+ return o.stopPropagation();
92
+ }
93
+ function F(o) {
94
+ return o.target instanceof HTMLInputElement && o.preventDefault();
95
+ }
96
+ function O(o) {
97
+ return o.preventDefault();
98
+ }
99
+ export {
100
+ k as InputSuggestionMenuContent,
101
+ U as InputSuggestionMenuContentItems
102
+ };
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { InputProps } from './Input';
3
+ interface NumberInputProps extends Omit<InputProps<string | null>, "wrapperComponent" | "type" | "left" | "right" | "leftType" | "rightType"> {
4
+ }
5
+ export declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps>;
6
+ export {};
@@ -0,0 +1,20 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import u from "react";
3
+ import { Input as i } from "./Input.js";
4
+ import { IconMinus as a, IconPlus as l } from "@tabler/icons-react";
5
+ import { Button as e } from "../button/Button.js";
6
+ const d = u.forwardRef((o, n) => {
7
+ n = n || u.useRef(null);
8
+ const {
9
+ step: r = 1,
10
+ ...c
11
+ } = o;
12
+ return /* @__PURE__ */ t(i, { className: "number-input", right: /* @__PURE__ */ t(e, { variant: "none", onClick: () => {
13
+ n.current && (n.current.value || (n.current.value = "0"), n.current.value = (Number.parseInt(n.current.value) + r).toString());
14
+ }, children: /* @__PURE__ */ t(l, { size: 13 }) }), left: /* @__PURE__ */ t(e, { variant: "none", onClick: () => {
15
+ n.current && (n.current.value || (n.current.value = "0"), n.current.value = (Number.parseInt(n.current.value) - r).toString());
16
+ }, children: /* @__PURE__ */ t(a, { size: 13 }) }), leftType: "action", type: "number", ref: n, ...c });
17
+ });
18
+ export {
19
+ d as NumberInput
20
+ };
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { InputProps } from './Input';
3
+ interface PasswordInputProps extends Omit<InputProps<string | null>, "wrapperComponent" | "type"> {
4
+ clearable?: boolean;
5
+ visible?: boolean;
6
+ }
7
+ export declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps>;
8
+ export {};
@@ -0,0 +1,18 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import o from "react";
3
+ import { Input as h, setElementKey as y } from "./Input.js";
4
+ import { IconEye as d, IconX as g } from "@tabler/icons-react";
5
+ import { Button as i } from "../button/Button.js";
6
+ const I = o.forwardRef((s, t) => {
7
+ t = t || o.useRef(null);
8
+ const {
9
+ clearable: a = !0,
10
+ visible: p = !0,
11
+ right: c,
12
+ ...u
13
+ } = s, l = (r) => (t.current && y(t.current, "value", "", "change"), r.stopPropagation(), r.preventDefault(), !1), m = (r) => (t.current && t.current.type == "password" ? t.current.type = "text" : t.current && t.current.type == "text" && (t.current.type = "password"), r.stopPropagation(), r.preventDefault(), !1), n = [c];
14
+ return p && n.push(/* @__PURE__ */ e(i, { variant: "none", onClick: (r) => m(r), children: /* @__PURE__ */ e(d, { size: 13 }) })), a && n.push(/* @__PURE__ */ e(i, { variant: "none", onClick: (r) => l(r), children: /* @__PURE__ */ e(g, { size: 13 }) })), /* @__PURE__ */ e(h, { right: n, rightType: "action", type: "password", ref: t, ...u });
15
+ });
16
+ export {
17
+ I as PasswordInput
18
+ };
@@ -0,0 +1,11 @@
1
+ import { OneTimePasswordFieldHiddenInputProps, OneTimePasswordFieldInputProps, OneTimePasswordFieldProps } from '@radix-ui/react-one-time-password-field';
2
+ import { Code0ComponentProps } from '../../utils/types';
3
+ import { default as React } from 'react';
4
+ import { InputProps } from './Input';
5
+ type PinInputProps = Omit<InputProps<string | null>, "wrapperComponent" | "type" | "left" | "right" | "leftType" | "rightType"> & OneTimePasswordFieldProps;
6
+ type PinInputFieldProps = Code0ComponentProps & OneTimePasswordFieldInputProps;
7
+ type PinInputHiddenFieldProps = Code0ComponentProps & OneTimePasswordFieldHiddenInputProps;
8
+ export declare const PinInput: React.FC<PinInputProps>;
9
+ export declare const PinInputField: React.FC<PinInputFieldProps>;
10
+ export declare const PinInputHiddenField: React.FC<PinInputHiddenFieldProps>;
11
+ export {};
@@ -0,0 +1,66 @@
1
+ import { jsx as d, jsxs as F, Fragment as x } from "react/jsx-runtime";
2
+ import { c as I } from "../../compiler-runtime-BNHg76kC.js";
3
+ import { OneTimePasswordFieldInput as C, OneTimePasswordFieldHiddenInput as M, OneTimePasswordField as T } from "@radix-ui/react-one-time-password-field";
4
+ import { mergeCode0Props as V } from "../../utils/utils.js";
5
+ import { InputLabel as _ } from "./InputLabel.js";
6
+ import { InputDescription as $ } from "./InputDescription.js";
7
+ import { InputMessage as w } from "./InputMessage.js";
8
+ import '../../assets/Input.css';/* empty css */
9
+ const y = (l) => {
10
+ const e = I.c(26);
11
+ let t, i, r, n, o, s;
12
+ if (e[0] !== l) {
13
+ const {
14
+ title: c,
15
+ description: p,
16
+ disabled: b,
17
+ formValidation: P,
18
+ ...g
19
+ } = l;
20
+ i = P === void 0 ? {
21
+ valid: !0,
22
+ notValidMessage: null,
23
+ setValue: O
24
+ } : P, e[7] !== c ? (o = c ? /* @__PURE__ */ d(_, { children: c }) : null, e[7] = c, e[8] = o) : o = e[8], e[9] !== p ? (s = p ? /* @__PURE__ */ d($, { children: p }) : null, e[9] = p, e[10] = s) : s = e[10];
25
+ const h = `${i?.valid ? "" : "input--not-valid"}`;
26
+ e[11] !== h ? (n = V(h, {}), e[11] = h, e[12] = n) : n = e[12], t = T, r = V("pin-input", {
27
+ ...g,
28
+ onValueChange: (v) => {
29
+ g.onValueChange && g.onValueChange(v), i.setValue(v);
30
+ }
31
+ }), e[0] = l, e[1] = t, e[2] = i, e[3] = r, e[4] = n, e[5] = o, e[6] = s;
32
+ } else
33
+ t = e[1], i = e[2], r = e[3], n = e[4], o = e[5], s = e[6];
34
+ let a;
35
+ e[13] !== t || e[14] !== r ? (a = /* @__PURE__ */ d(t, { ...r }), e[13] = t, e[14] = r, e[15] = a) : a = e[15];
36
+ let u;
37
+ e[16] !== n || e[17] !== a ? (u = /* @__PURE__ */ d("div", { ...n, children: a }), e[16] = n, e[17] = a, e[18] = u) : u = e[18];
38
+ let f;
39
+ e[19] !== i ? (f = !i?.valid && i?.notValidMessage ? /* @__PURE__ */ d(w, { children: i.notValidMessage }) : null, e[19] = i, e[20] = f) : f = e[20];
40
+ let m;
41
+ return e[21] !== o || e[22] !== s || e[23] !== u || e[24] !== f ? (m = /* @__PURE__ */ F(x, { children: [
42
+ o,
43
+ s,
44
+ u,
45
+ f
46
+ ] }), e[21] = o, e[22] = s, e[23] = u, e[24] = f, e[25] = m) : m = e[25], m;
47
+ }, z = (l) => {
48
+ const e = I.c(4);
49
+ let t;
50
+ e[0] !== l ? (t = V("input pin-input__field", l), e[0] = l, e[1] = t) : t = e[1];
51
+ let i;
52
+ return e[2] !== t ? (i = /* @__PURE__ */ d(C, { ...t }), e[2] = t, e[3] = i) : i = e[3], i;
53
+ }, A = (l) => {
54
+ const e = I.c(4);
55
+ let t;
56
+ e[0] !== l ? (t = V("pin-input__hidden-field", l), e[0] = l, e[1] = t) : t = e[1];
57
+ let i;
58
+ return e[2] !== t ? (i = /* @__PURE__ */ d(M, { ...t }), e[2] = t, e[3] = i) : i = e[3], i;
59
+ };
60
+ function O(l) {
61
+ }
62
+ export {
63
+ y as PinInput,
64
+ z as PinInputField,
65
+ A as PinInputHiddenField
66
+ };