powell-react 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (336) hide show
  1. package/.storybook/main.ts +28 -0
  2. package/.storybook/preview.scss +13 -0
  3. package/.storybook/preview.tsx +24 -0
  4. package/README.md +0 -0
  5. package/dist/cjs/index.js +1 -0
  6. package/dist/cjs/types/src/components/Button/Button.d.ts +6 -0
  7. package/dist/cjs/types/src/components/Button/index.d.ts +1 -0
  8. package/dist/cjs/types/src/components/index.d.ts +1 -0
  9. package/dist/cjs/types/src/index.d.ts +1 -0
  10. package/dist/cjs/types/src/powell/api/PowellProvider.d.ts +5 -0
  11. package/dist/cjs/types/src/powell/api/configService.d.ts +2 -0
  12. package/dist/cjs/types/src/powell/api/forms.d.ts +73 -0
  13. package/dist/cjs/types/src/powell/api/index.d.ts +5 -0
  14. package/dist/cjs/types/src/powell/api/powellDefaults.d.ts +2 -0
  15. package/dist/cjs/types/src/powell/api/primereact.d.ts +968 -0
  16. package/dist/cjs/types/src/powell/components/AutoComplete/AutoComplete.d.ts +24 -0
  17. package/dist/cjs/types/src/powell/components/AutoComplete/index.d.ts +1 -0
  18. package/dist/cjs/types/src/powell/components/Button/Button.d.ts +22 -0
  19. package/dist/cjs/types/src/powell/components/Button/index.d.ts +1 -0
  20. package/dist/cjs/types/src/powell/components/CascadeSelect/CascadeSelect.d.ts +24 -0
  21. package/dist/cjs/types/src/powell/components/CascadeSelect/index.d.ts +1 -0
  22. package/dist/cjs/types/src/powell/components/Checkbox/Checkbox.d.ts +21 -0
  23. package/dist/cjs/types/src/powell/components/Checkbox/index.d.ts +1 -0
  24. package/dist/cjs/types/src/powell/components/Chips/Chips.d.ts +23 -0
  25. package/dist/cjs/types/src/powell/components/Chips/index.d.ts +1 -0
  26. package/dist/cjs/types/src/powell/components/ColorPicker/ColorPicker.d.ts +24 -0
  27. package/dist/cjs/types/src/powell/components/ColorPicker/index.d.ts +1 -0
  28. package/dist/cjs/types/src/powell/components/Dropdown/Dropdown.d.ts +24 -0
  29. package/dist/cjs/types/src/powell/components/Dropdown/index.d.ts +1 -0
  30. package/dist/cjs/types/src/powell/components/Editor/Editor.d.ts +23 -0
  31. package/dist/cjs/types/src/powell/components/Editor/index.d.ts +1 -0
  32. package/dist/cjs/types/src/powell/components/FormContainer/FormContainer.d.ts +7 -0
  33. package/dist/cjs/types/src/powell/components/FormContainer/FormContext.d.ts +4 -0
  34. package/dist/cjs/types/src/powell/components/FormContainer/index.d.ts +2 -0
  35. package/dist/cjs/types/src/powell/components/InputMask/InputMask.d.ts +24 -0
  36. package/dist/cjs/types/src/powell/components/InputMask/index.d.ts +1 -0
  37. package/dist/cjs/types/src/powell/components/InputNumber/InputNumber.d.ts +24 -0
  38. package/dist/cjs/types/src/powell/components/InputNumber/index.d.ts +1 -0
  39. package/dist/cjs/types/src/powell/components/InputOtp/InputOtp.d.ts +21 -0
  40. package/dist/cjs/types/src/powell/components/InputOtp/index.d.ts +1 -0
  41. package/dist/cjs/types/src/powell/components/InputPassword/InputPassword.d.ts +23 -0
  42. package/dist/cjs/types/src/powell/components/InputPassword/index.d.ts +1 -0
  43. package/dist/cjs/types/src/powell/components/InputSwitch/InputSwitch.d.ts +21 -0
  44. package/dist/cjs/types/src/powell/components/InputSwitch/index.d.ts +1 -0
  45. package/dist/cjs/types/src/powell/components/InputText/InputText.d.ts +24 -0
  46. package/dist/cjs/types/src/powell/components/InputText/index.d.ts +1 -0
  47. package/dist/cjs/types/src/powell/components/InputTextarea/InputTextarea.d.ts +23 -0
  48. package/dist/cjs/types/src/powell/components/InputTextarea/index.d.ts +1 -0
  49. package/dist/cjs/types/src/powell/components/Knob/Knob.d.ts +20 -0
  50. package/dist/cjs/types/src/powell/components/Knob/index.d.ts +1 -0
  51. package/dist/cjs/types/src/powell/components/ListBox/ListBox.d.ts +20 -0
  52. package/dist/cjs/types/src/powell/components/ListBox/index.d.ts +1 -0
  53. package/dist/cjs/types/src/powell/components/Mention/Mention.d.ts +24 -0
  54. package/dist/cjs/types/src/powell/components/Mention/index.d.ts +1 -0
  55. package/dist/cjs/types/src/powell/components/MultiSelect/MultiSelect.d.ts +24 -0
  56. package/dist/cjs/types/src/powell/components/MultiSelect/index.d.ts +1 -0
  57. package/dist/cjs/types/src/powell/components/MultiStateCheckbox/MultiStateCheckbox.d.ts +20 -0
  58. package/dist/cjs/types/src/powell/components/MultiStateCheckbox/index.d.ts +1 -0
  59. package/dist/cjs/types/src/powell/components/RadioGroup/RadioGroup.d.ts +24 -0
  60. package/dist/cjs/types/src/powell/components/RadioGroup/index.d.ts +1 -0
  61. package/dist/cjs/types/src/powell/components/Rating/Rating.d.ts +21 -0
  62. package/dist/cjs/types/src/powell/components/Rating/index.d.ts +1 -0
  63. package/dist/cjs/types/src/powell/components/SelectButton/SelectButton.d.ts +21 -0
  64. package/dist/cjs/types/src/powell/components/SelectButton/index.d.ts +1 -0
  65. package/dist/cjs/types/src/powell/components/Slider/Slider.d.ts +21 -0
  66. package/dist/cjs/types/src/powell/components/Slider/index.d.ts +1 -0
  67. package/dist/cjs/types/src/powell/components/ToggleButton/ToggleButton.d.ts +21 -0
  68. package/dist/cjs/types/src/powell/components/ToggleButton/index.d.ts +1 -0
  69. package/dist/cjs/types/src/powell/components/TreeSelect/TreeSelect.d.ts +24 -0
  70. package/dist/cjs/types/src/powell/components/TreeSelect/index.d.ts +1 -0
  71. package/dist/cjs/types/src/powell/components/TriStateCheckbox/TriStateCheckbox.d.ts +21 -0
  72. package/dist/cjs/types/src/powell/components/TriStateCheckbox/index.d.ts +1 -0
  73. package/dist/cjs/types/src/powell/hooks/index.d.ts +3 -0
  74. package/dist/cjs/types/src/powell/hooks/useApplyConfig.d.ts +17 -0
  75. package/dist/cjs/types/src/powell/hooks/useFormContext.d.ts +2 -0
  76. package/dist/cjs/types/src/powell/hooks/usePowellConfig.d.ts +2 -0
  77. package/dist/cjs/types/src/powell/index.d.ts +29 -0
  78. package/dist/cjs/types/src/powell/models/common.d.ts +7 -0
  79. package/dist/cjs/types/src/powell/models/config.d.ts +13 -0
  80. package/dist/cjs/types/src/powell/models/forms.d.ts +28 -0
  81. package/dist/cjs/types/src/powell/models/index.d.ts +3 -0
  82. package/dist/cjs/types/src/powell/utils/globalState.d.ts +19 -0
  83. package/dist/cjs/types/src/powell/utils/index.d.ts +2 -0
  84. package/dist/cjs/types/src/powell/utils/utilsService.d.ts +8 -0
  85. package/dist/cjs/types/vite.config.d.ts +2 -0
  86. package/dist/esm/index.js +1 -0
  87. package/dist/esm/types/src/components/Button/Button.d.ts +6 -0
  88. package/dist/esm/types/src/components/Button/index.d.ts +1 -0
  89. package/dist/esm/types/src/components/index.d.ts +1 -0
  90. package/dist/esm/types/src/index.d.ts +1 -0
  91. package/dist/esm/types/src/powell/api/PowellProvider.d.ts +5 -0
  92. package/dist/esm/types/src/powell/api/configService.d.ts +2 -0
  93. package/dist/esm/types/src/powell/api/forms.d.ts +73 -0
  94. package/dist/esm/types/src/powell/api/index.d.ts +5 -0
  95. package/dist/esm/types/src/powell/api/powellDefaults.d.ts +2 -0
  96. package/dist/esm/types/src/powell/api/primereact.d.ts +968 -0
  97. package/dist/esm/types/src/powell/components/AutoComplete/AutoComplete.d.ts +24 -0
  98. package/dist/esm/types/src/powell/components/AutoComplete/index.d.ts +1 -0
  99. package/dist/esm/types/src/powell/components/Button/Button.d.ts +22 -0
  100. package/dist/esm/types/src/powell/components/Button/index.d.ts +1 -0
  101. package/dist/esm/types/src/powell/components/CascadeSelect/CascadeSelect.d.ts +24 -0
  102. package/dist/esm/types/src/powell/components/CascadeSelect/index.d.ts +1 -0
  103. package/dist/esm/types/src/powell/components/Checkbox/Checkbox.d.ts +21 -0
  104. package/dist/esm/types/src/powell/components/Checkbox/index.d.ts +1 -0
  105. package/dist/esm/types/src/powell/components/Chips/Chips.d.ts +23 -0
  106. package/dist/esm/types/src/powell/components/Chips/index.d.ts +1 -0
  107. package/dist/esm/types/src/powell/components/ColorPicker/ColorPicker.d.ts +24 -0
  108. package/dist/esm/types/src/powell/components/ColorPicker/index.d.ts +1 -0
  109. package/dist/esm/types/src/powell/components/Dropdown/Dropdown.d.ts +24 -0
  110. package/dist/esm/types/src/powell/components/Dropdown/index.d.ts +1 -0
  111. package/dist/esm/types/src/powell/components/Editor/Editor.d.ts +23 -0
  112. package/dist/esm/types/src/powell/components/Editor/index.d.ts +1 -0
  113. package/dist/esm/types/src/powell/components/FormContainer/FormContainer.d.ts +7 -0
  114. package/dist/esm/types/src/powell/components/FormContainer/FormContext.d.ts +4 -0
  115. package/dist/esm/types/src/powell/components/FormContainer/index.d.ts +2 -0
  116. package/dist/esm/types/src/powell/components/InputMask/InputMask.d.ts +24 -0
  117. package/dist/esm/types/src/powell/components/InputMask/index.d.ts +1 -0
  118. package/dist/esm/types/src/powell/components/InputNumber/InputNumber.d.ts +24 -0
  119. package/dist/esm/types/src/powell/components/InputNumber/index.d.ts +1 -0
  120. package/dist/esm/types/src/powell/components/InputOtp/InputOtp.d.ts +21 -0
  121. package/dist/esm/types/src/powell/components/InputOtp/index.d.ts +1 -0
  122. package/dist/esm/types/src/powell/components/InputPassword/InputPassword.d.ts +23 -0
  123. package/dist/esm/types/src/powell/components/InputPassword/index.d.ts +1 -0
  124. package/dist/esm/types/src/powell/components/InputSwitch/InputSwitch.d.ts +21 -0
  125. package/dist/esm/types/src/powell/components/InputSwitch/index.d.ts +1 -0
  126. package/dist/esm/types/src/powell/components/InputText/InputText.d.ts +24 -0
  127. package/dist/esm/types/src/powell/components/InputText/index.d.ts +1 -0
  128. package/dist/esm/types/src/powell/components/InputTextarea/InputTextarea.d.ts +23 -0
  129. package/dist/esm/types/src/powell/components/InputTextarea/index.d.ts +1 -0
  130. package/dist/esm/types/src/powell/components/Knob/Knob.d.ts +20 -0
  131. package/dist/esm/types/src/powell/components/Knob/index.d.ts +1 -0
  132. package/dist/esm/types/src/powell/components/ListBox/ListBox.d.ts +20 -0
  133. package/dist/esm/types/src/powell/components/ListBox/index.d.ts +1 -0
  134. package/dist/esm/types/src/powell/components/Mention/Mention.d.ts +24 -0
  135. package/dist/esm/types/src/powell/components/Mention/index.d.ts +1 -0
  136. package/dist/esm/types/src/powell/components/MultiSelect/MultiSelect.d.ts +24 -0
  137. package/dist/esm/types/src/powell/components/MultiSelect/index.d.ts +1 -0
  138. package/dist/esm/types/src/powell/components/MultiStateCheckbox/MultiStateCheckbox.d.ts +20 -0
  139. package/dist/esm/types/src/powell/components/MultiStateCheckbox/index.d.ts +1 -0
  140. package/dist/esm/types/src/powell/components/RadioGroup/RadioGroup.d.ts +24 -0
  141. package/dist/esm/types/src/powell/components/RadioGroup/index.d.ts +1 -0
  142. package/dist/esm/types/src/powell/components/Rating/Rating.d.ts +21 -0
  143. package/dist/esm/types/src/powell/components/Rating/index.d.ts +1 -0
  144. package/dist/esm/types/src/powell/components/SelectButton/SelectButton.d.ts +21 -0
  145. package/dist/esm/types/src/powell/components/SelectButton/index.d.ts +1 -0
  146. package/dist/esm/types/src/powell/components/Slider/Slider.d.ts +21 -0
  147. package/dist/esm/types/src/powell/components/Slider/index.d.ts +1 -0
  148. package/dist/esm/types/src/powell/components/ToggleButton/ToggleButton.d.ts +21 -0
  149. package/dist/esm/types/src/powell/components/ToggleButton/index.d.ts +1 -0
  150. package/dist/esm/types/src/powell/components/TreeSelect/TreeSelect.d.ts +24 -0
  151. package/dist/esm/types/src/powell/components/TreeSelect/index.d.ts +1 -0
  152. package/dist/esm/types/src/powell/components/TriStateCheckbox/TriStateCheckbox.d.ts +21 -0
  153. package/dist/esm/types/src/powell/components/TriStateCheckbox/index.d.ts +1 -0
  154. package/dist/esm/types/src/powell/hooks/index.d.ts +3 -0
  155. package/dist/esm/types/src/powell/hooks/useApplyConfig.d.ts +17 -0
  156. package/dist/esm/types/src/powell/hooks/useFormContext.d.ts +2 -0
  157. package/dist/esm/types/src/powell/hooks/usePowellConfig.d.ts +2 -0
  158. package/dist/esm/types/src/powell/index.d.ts +29 -0
  159. package/dist/esm/types/src/powell/models/common.d.ts +7 -0
  160. package/dist/esm/types/src/powell/models/config.d.ts +13 -0
  161. package/dist/esm/types/src/powell/models/forms.d.ts +28 -0
  162. package/dist/esm/types/src/powell/models/index.d.ts +3 -0
  163. package/dist/esm/types/src/powell/utils/globalState.d.ts +19 -0
  164. package/dist/esm/types/src/powell/utils/index.d.ts +2 -0
  165. package/dist/esm/types/src/powell/utils/utilsService.d.ts +8 -0
  166. package/dist/esm/types/vite.config.d.ts +2 -0
  167. package/package.json +70 -0
  168. package/rollup.config.mjs +95 -0
  169. package/src/components/Button/Button.scss +43 -0
  170. package/src/components/Button/Button.stories.tsx +13 -0
  171. package/src/components/Button/Button.tsx +19 -0
  172. package/src/components/Button/index.ts +1 -0
  173. package/src/components/index.ts +1 -0
  174. package/src/index.ts +1 -0
  175. package/src/powell/api/PowellProvider.tsx +37 -0
  176. package/src/powell/api/configService.ts +4 -0
  177. package/src/powell/api/forms.ts +145 -0
  178. package/src/powell/api/index.ts +5 -0
  179. package/src/powell/api/powellDefaults.ts +11 -0
  180. package/src/powell/api/primereact.ts +1945 -0
  181. package/src/powell/components/AutoComplete/AutoComplete.scss +126 -0
  182. package/src/powell/components/AutoComplete/AutoComplete.tsx +190 -0
  183. package/src/powell/components/AutoComplete/index.ts +1 -0
  184. package/src/powell/components/Button/Button.tsx +90 -0
  185. package/src/powell/components/Button/index.ts +1 -0
  186. package/src/powell/components/CascadeSelect/CascadeSelect.scss +126 -0
  187. package/src/powell/components/CascadeSelect/CascadeSelect.tsx +190 -0
  188. package/src/powell/components/CascadeSelect/index.ts +1 -0
  189. package/src/powell/components/Checkbox/Checkbox.scss +32 -0
  190. package/src/powell/components/Checkbox/Checkbox.tsx +147 -0
  191. package/src/powell/components/Checkbox/index.ts +1 -0
  192. package/src/powell/components/Chips/Chips.scss +126 -0
  193. package/src/powell/components/Chips/Chips.tsx +190 -0
  194. package/src/powell/components/Chips/index.ts +1 -0
  195. package/src/powell/components/ColorPicker/ColorPicker.scss +126 -0
  196. package/src/powell/components/ColorPicker/ColorPicker.tsx +186 -0
  197. package/src/powell/components/ColorPicker/index.ts +1 -0
  198. package/src/powell/components/Dropdown/Dropdown.scss +126 -0
  199. package/src/powell/components/Dropdown/Dropdown.tsx +190 -0
  200. package/src/powell/components/Dropdown/index.ts +1 -0
  201. package/src/powell/components/Editor/Editor.scss +126 -0
  202. package/src/powell/components/Editor/Editor.tsx +183 -0
  203. package/src/powell/components/Editor/index.ts +1 -0
  204. package/src/powell/components/FormContainer/FormContainer.tsx +49 -0
  205. package/src/powell/components/FormContainer/FormContext.tsx +18 -0
  206. package/src/powell/components/FormContainer/index.ts +2 -0
  207. package/src/powell/components/InputMask/InputMask.scss +126 -0
  208. package/src/powell/components/InputMask/InputMask.tsx +190 -0
  209. package/src/powell/components/InputMask/index.ts +1 -0
  210. package/src/powell/components/InputNumber/InputNumber.scss +126 -0
  211. package/src/powell/components/InputNumber/InputNumber.tsx +190 -0
  212. package/src/powell/components/InputNumber/index.ts +1 -0
  213. package/src/powell/components/InputOtp/InputOtp.scss +126 -0
  214. package/src/powell/components/InputOtp/InputOtp.tsx +154 -0
  215. package/src/powell/components/InputOtp/index.ts +1 -0
  216. package/src/powell/components/InputPassword/InputPassword.scss +126 -0
  217. package/src/powell/components/InputPassword/InputPassword.tsx +189 -0
  218. package/src/powell/components/InputPassword/index.ts +1 -0
  219. package/src/powell/components/InputSwitch/InputSwitch.scss +32 -0
  220. package/src/powell/components/InputSwitch/InputSwitch.tsx +144 -0
  221. package/src/powell/components/InputSwitch/index.ts +1 -0
  222. package/src/powell/components/InputText/InputText.scss +126 -0
  223. package/src/powell/components/InputText/InputText.tsx +190 -0
  224. package/src/powell/components/InputText/index.ts +1 -0
  225. package/src/powell/components/InputTextarea/InputTextarea.scss +126 -0
  226. package/src/powell/components/InputTextarea/InputTextarea.tsx +187 -0
  227. package/src/powell/components/InputTextarea/index.ts +1 -0
  228. package/src/powell/components/Knob/Knob.scss +32 -0
  229. package/src/powell/components/Knob/Knob.tsx +134 -0
  230. package/src/powell/components/Knob/index.ts +1 -0
  231. package/src/powell/components/ListBox/ListBox.scss +32 -0
  232. package/src/powell/components/ListBox/ListBox.tsx +135 -0
  233. package/src/powell/components/ListBox/index.ts +1 -0
  234. package/src/powell/components/Mention/Mention.scss +126 -0
  235. package/src/powell/components/Mention/Mention.tsx +186 -0
  236. package/src/powell/components/Mention/index.ts +1 -0
  237. package/src/powell/components/MultiSelect/MultiSelect.scss +126 -0
  238. package/src/powell/components/MultiSelect/MultiSelect.tsx +190 -0
  239. package/src/powell/components/MultiSelect/index.ts +1 -0
  240. package/src/powell/components/MultiStateCheckbox/MultiStateCheckbox.scss +32 -0
  241. package/src/powell/components/MultiStateCheckbox/MultiStateCheckbox.tsx +143 -0
  242. package/src/powell/components/MultiStateCheckbox/index.ts +1 -0
  243. package/src/powell/components/RadioGroup/RadioGroup.scss +32 -0
  244. package/src/powell/components/RadioGroup/RadioGroup.tsx +167 -0
  245. package/src/powell/components/RadioGroup/index.ts +1 -0
  246. package/src/powell/components/Rating/Rating.scss +32 -0
  247. package/src/powell/components/Rating/Rating.tsx +135 -0
  248. package/src/powell/components/Rating/index.ts +1 -0
  249. package/src/powell/components/SelectButton/SelectButton.scss +32 -0
  250. package/src/powell/components/SelectButton/SelectButton.tsx +144 -0
  251. package/src/powell/components/SelectButton/index.ts +1 -0
  252. package/src/powell/components/Slider/Slider.scss +32 -0
  253. package/src/powell/components/Slider/Slider.tsx +135 -0
  254. package/src/powell/components/Slider/index.ts +1 -0
  255. package/src/powell/components/ToggleButton/ToggleButton.scss +32 -0
  256. package/src/powell/components/ToggleButton/ToggleButton.tsx +144 -0
  257. package/src/powell/components/ToggleButton/index.ts +1 -0
  258. package/src/powell/components/TreeSelect/TreeSelect.scss +126 -0
  259. package/src/powell/components/TreeSelect/TreeSelect.tsx +190 -0
  260. package/src/powell/components/TreeSelect/index.ts +1 -0
  261. package/src/powell/components/TriStateCheckbox/TriStateCheckbox.scss +32 -0
  262. package/src/powell/components/TriStateCheckbox/TriStateCheckbox.tsx +144 -0
  263. package/src/powell/components/TriStateCheckbox/index.ts +1 -0
  264. package/src/powell/hooks/index.ts +3 -0
  265. package/src/powell/hooks/useApplyConfig.ts +36 -0
  266. package/src/powell/hooks/useFormContext.ts +14 -0
  267. package/src/powell/hooks/usePowellConfig.ts +64 -0
  268. package/src/powell/index.ts +29 -0
  269. package/src/powell/models/common.ts +7 -0
  270. package/src/powell/models/config.ts +85 -0
  271. package/src/powell/models/forms.ts +33 -0
  272. package/src/powell/models/index.ts +3 -0
  273. package/src/powell/styles/common.scss +9 -0
  274. package/src/powell/styles/mixins.scss +0 -0
  275. package/src/powell/themes/arya-blue.css +1 -0
  276. package/src/powell/themes/arya-green.css +1 -0
  277. package/src/powell/themes/arya-orange.css +1 -0
  278. package/src/powell/themes/arya-purple.css +1 -0
  279. package/src/powell/themes/bootstrap4-dark-blue.css +1 -0
  280. package/src/powell/themes/bootstrap4-dark-purple.css +1 -0
  281. package/src/powell/themes/bootstrap4-light-blue.css +1 -0
  282. package/src/powell/themes/bootstrap4-light-purple.css +1 -0
  283. package/src/powell/themes/fluent-light.css +1 -0
  284. package/src/powell/themes/lara-dark-amber.css +1 -0
  285. package/src/powell/themes/lara-dark-blue.css +1 -0
  286. package/src/powell/themes/lara-dark-cyan.css +1 -0
  287. package/src/powell/themes/lara-dark-green.css +1 -0
  288. package/src/powell/themes/lara-dark-indigo.css +1 -0
  289. package/src/powell/themes/lara-dark-pink.css +1 -0
  290. package/src/powell/themes/lara-dark-purple.css +1 -0
  291. package/src/powell/themes/lara-dark-teal.css +1 -0
  292. package/src/powell/themes/lara-light-amber.css +1 -0
  293. package/src/powell/themes/lara-light-blue.css +1 -0
  294. package/src/powell/themes/lara-light-cyan.css +1 -0
  295. package/src/powell/themes/lara-light-green.css +1 -0
  296. package/src/powell/themes/lara-light-indigo.css +1 -0
  297. package/src/powell/themes/lara-light-pink.css +1 -0
  298. package/src/powell/themes/lara-light-purple.css +1 -0
  299. package/src/powell/themes/lara-light-teal.css +1 -0
  300. package/src/powell/themes/luna-amber.css +1 -0
  301. package/src/powell/themes/luna-blue.css +1 -0
  302. package/src/powell/themes/luna-green.css +1 -0
  303. package/src/powell/themes/luna-pink.css +1 -0
  304. package/src/powell/themes/md-dark-deeppurple.css +1 -0
  305. package/src/powell/themes/md-dark-indigo.css +1 -0
  306. package/src/powell/themes/md-light-deeppurple.css +1 -0
  307. package/src/powell/themes/md-light-indigo.css +1 -0
  308. package/src/powell/themes/mdc-dark-deeppurple.css +1 -0
  309. package/src/powell/themes/mdc-dark-indigo.css +1 -0
  310. package/src/powell/themes/mdc-light-deeppurple.css +1 -0
  311. package/src/powell/themes/mdc-light-indigo.css +1 -0
  312. package/src/powell/themes/mira.css +1 -0
  313. package/src/powell/themes/nano.css +1 -0
  314. package/src/powell/themes/nova-accent.css +1 -0
  315. package/src/powell/themes/nova-alt.css +1 -0
  316. package/src/powell/themes/nova.css +1 -0
  317. package/src/powell/themes/rhea.css +1 -0
  318. package/src/powell/themes/saga-blue.css +1 -0
  319. package/src/powell/themes/saga-green.css +1 -0
  320. package/src/powell/themes/saga-orange.css +1 -0
  321. package/src/powell/themes/saga-purple.css +1 -0
  322. package/src/powell/themes/soho-dark.css +1 -0
  323. package/src/powell/themes/soho-light.css +1 -0
  324. package/src/powell/themes/tailwind-light.css +1 -0
  325. package/src/powell/themes/vela-blue.css +1 -0
  326. package/src/powell/themes/vela-green.css +1 -0
  327. package/src/powell/themes/vela-orange.css +1 -0
  328. package/src/powell/themes/vela-purple.css +1 -0
  329. package/src/powell/themes/viva-dark.css +1 -0
  330. package/src/powell/themes/viva-light.css +1 -0
  331. package/src/powell/utils/globalState.ts +96 -0
  332. package/src/powell/utils/index.ts +2 -0
  333. package/src/powell/utils/utilsService.tsx +55 -0
  334. package/src/stories/Button.stories.tsx +16 -0
  335. package/tsconfig.json +55 -0
  336. package/vite.config.ts +14 -0
@@ -0,0 +1 @@
1
+ export * from "./SelectButton";
@@ -0,0 +1,21 @@
1
+ import { ChangeEvent, ReactNode } from "react";
2
+ import { FixLabelPosition } from "@powell/models";
3
+ import { $SliderProps } from "@powell/api";
4
+ import { SafeAny } from "@powell/models";
5
+ import '@components/Slider/Slider.scss';
6
+ interface SliderProps extends Omit<$SliderProps, 'checked'> {
7
+ checked?: boolean;
8
+ name?: string;
9
+ parseError?: (error: string) => ReactNode;
10
+ transform?: {
11
+ input?: (value: SafeAny) => string;
12
+ output?: (event: ChangeEvent<HTMLInputElement>) => SafeAny;
13
+ };
14
+ showRequiredStar?: boolean;
15
+ rtl?: boolean;
16
+ label?: string;
17
+ hint?: string;
18
+ labelPosition?: FixLabelPosition;
19
+ }
20
+ export declare const Slider: (props: SliderProps) => import("react").JSX.Element;
21
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./Slider";
@@ -0,0 +1,21 @@
1
+ import { ChangeEvent, ReactNode } from "react";
2
+ import { FixLabelPosition } from "@powell/models";
3
+ import { $ToggleButtonProps } from "@powell/api";
4
+ import { SafeAny } from "@powell/models";
5
+ import '@components/ToggleButton/ToggleButton.scss';
6
+ interface ToggleButtonProps extends Omit<$ToggleButtonProps, 'checked'> {
7
+ checked?: boolean;
8
+ name?: string;
9
+ parseError?: (error: string) => ReactNode;
10
+ transform?: {
11
+ input?: (value: SafeAny) => string;
12
+ output?: (event: ChangeEvent<HTMLInputElement>) => SafeAny;
13
+ };
14
+ showRequiredStar?: boolean;
15
+ rtl?: boolean;
16
+ label?: string;
17
+ hint?: string;
18
+ labelPosition?: FixLabelPosition;
19
+ }
20
+ export declare const ToggleButton: (props: ToggleButtonProps) => import("react").JSX.Element;
21
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./ToggleButton";
@@ -0,0 +1,24 @@
1
+ import { ChangeEvent, ReactNode } from "react";
2
+ import { Addon, LabelPosition, Size } from "@powell/models";
3
+ import { $IconFieldProps, $TreeSelectProps } from "@powell/api";
4
+ import { SafeAny } from "@powell/models";
5
+ import '@components/TreeSelect/TreeSelect.scss';
6
+ interface TreeSelectProps extends $TreeSelectProps {
7
+ name?: string;
8
+ parseError?: (error: string) => ReactNode;
9
+ transform?: {
10
+ input?: (value: SafeAny) => string;
11
+ output?: (event: ChangeEvent<HTMLInputElement>) => SafeAny;
12
+ };
13
+ showRequiredStar?: boolean;
14
+ rtl?: boolean;
15
+ label?: string;
16
+ icon?: string | ReactNode;
17
+ hint?: string;
18
+ inputSize?: Size;
19
+ addon?: Addon;
20
+ iconPosition?: $IconFieldProps["iconPosition"];
21
+ labelPosition?: LabelPosition;
22
+ }
23
+ export declare const TreeSelect: (props: TreeSelectProps) => import("react").JSX.Element;
24
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./TreeSelect";
@@ -0,0 +1,21 @@
1
+ import { ChangeEvent, ReactNode } from "react";
2
+ import { FixLabelPosition } from "@powell/models";
3
+ import { $TriStateCheckboxProps } from "@powell/api";
4
+ import { SafeAny } from "@powell/models";
5
+ import '@components/TriStateCheckbox/TriStateCheckbox.scss';
6
+ interface TriStateCheckboxProps extends Omit<$TriStateCheckboxProps, 'checked'> {
7
+ checked?: boolean;
8
+ name?: string;
9
+ parseError?: (error: string) => ReactNode;
10
+ transform?: {
11
+ input?: (value: SafeAny) => string;
12
+ output?: (event: ChangeEvent<HTMLInputElement>) => SafeAny;
13
+ };
14
+ showRequiredStar?: boolean;
15
+ rtl?: boolean;
16
+ label?: string;
17
+ hint?: string;
18
+ labelPosition?: FixLabelPosition;
19
+ }
20
+ export declare const TriStateCheckbox: (props: TriStateCheckboxProps) => import("react").JSX.Element;
21
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./TriStateCheckbox";
@@ -0,0 +1,3 @@
1
+ export * from "./useApplyConfig";
2
+ export * from "./useFormContext";
3
+ export * from "./usePowellConfig";
@@ -0,0 +1,17 @@
1
+ import { PowellConfig } from "@powell/models";
2
+ interface ApplyConfigOptions {
3
+ isFixLabel?: boolean;
4
+ sizable?: boolean;
5
+ }
6
+ interface CommonConfigProps {
7
+ rtl?: PowellConfig["rtl"];
8
+ showRequiredStar?: PowellConfig["showRequiredStar"];
9
+ labelPosition?: PowellConfig["labelPosition"];
10
+ inputSize?: PowellConfig["inputSize"];
11
+ }
12
+ export declare const useApplyConfig: <T extends CommonConfigProps>(props: T, options?: ApplyConfigOptions) => T & {
13
+ rtl: boolean | undefined;
14
+ showRequiredStar: boolean | undefined;
15
+ labelPosition: import("@powell/models").LabelPosition | undefined;
16
+ };
17
+ export {};
@@ -0,0 +1,2 @@
1
+ import { $FormikContextType, $FormikValues } from "@powell/api";
2
+ export declare const useFormContext: () => $FormikContextType<$FormikValues> | null;
@@ -0,0 +1,2 @@
1
+ import { PowellConfig } from "@powell/models";
2
+ export declare const usePowellConfig: () => [config: PowellConfig, (c: Partial<PowellConfig>) => any];
@@ -0,0 +1,29 @@
1
+ export { PowellProvider } from "./api/PowellProvider";
2
+ export { AutoComplete } from "./components/AutoComplete";
3
+ export { Button } from "./components/Button";
4
+ export { CascadeSelect } from "./components/CascadeSelect";
5
+ export { Checkbox } from "./components/Checkbox";
6
+ export { Chips } from "./components/Chips";
7
+ export { ColorPicker } from "./components/ColorPicker";
8
+ export { Dropdown } from "./components/Dropdown";
9
+ export { Editor } from "./components/Editor";
10
+ export { FormContainer } from "./components/FormContainer";
11
+ export { InputMask } from "./components/InputMask";
12
+ export { InputNumber } from "./components/InputNumber";
13
+ export { InputOtp } from "./components/InputOtp";
14
+ export { InputPassword } from "./components/InputPassword";
15
+ export { InputSwitch } from "./components/InputSwitch";
16
+ export { InputText } from "./components/InputText";
17
+ export { InputTextarea } from "./components/InputTextarea";
18
+ export { Knob } from "./components/Knob";
19
+ export { ListBox } from "./components/ListBox";
20
+ export { Mention } from "./components/Mention";
21
+ export { MultiSelect } from "./components/MultiSelect";
22
+ export { MultiStateCheckbox } from "./components/MultiStateCheckbox";
23
+ export { RadioGroup } from "./components/RadioGroup";
24
+ export { Rating } from "./components/Rating";
25
+ export { SelectButton } from "./components/SelectButton";
26
+ export { Slider } from "./components/Slider";
27
+ export { ToggleButton } from "./components/ToggleButton";
28
+ export { TreeSelect } from "./components/TreeSelect";
29
+ export { TriStateCheckbox } from "./components/TriStateCheckbox";
@@ -0,0 +1,7 @@
1
+ export type ButtonAppearance = 'default' | 'text' | 'outlined' | 'link';
2
+ export type Direction = 'rtl' | 'ltr';
3
+ export type Size = 'sm' | 'md' | 'lg';
4
+ export type Orientation = 'horizontal' | 'vertical';
5
+ export type Position = 'left' | 'right' | 'top' | 'bottom';
6
+ export type Nullable<T = void> = T | null | undefined;
7
+ export type SafeAny = any;
@@ -0,0 +1,13 @@
1
+ import { $APIOptions } from "@powell/api";
2
+ import { FixLabelPosition, LabelPosition, Size } from "@powell/models";
3
+ export type ThemeName = "arya-blue" | "arya-green" | "arya-orange" | "arya-purple" | "bootstrap4-dark-blue" | "bootstrap4-dark-purple" | "bootstrap4-light-blue" | "bootstrap4-light-purple" | "fluent-light" | "lara-dark-amber" | "lara-dark-blue" | "lara-dark-cyan" | "lara-dark-green" | "lara-dark-indigo" | "lara-dark-pink" | "lara-dark-purple" | "lara-dark-teal" | "lara-light-amber" | "lara-light-blue" | "lara-light-cyan" | "lara-light-green" | "lara-light-indigo" | "lara-light-pink" | "lara-light-purple" | "lara-light-teal" | "luna-amber" | "luna-blue" | "luna-green" | "luna-pink" | "md-dark-deeppurple" | "md-dark-indigo" | "md-light-deeppurple" | "md-light-indigo" | "mdc-dark-deeppurple" | "mdc-dark-indigo" | "mdc-light-deeppurple" | "mdc-light-indigo" | "mira" | "nano" | "nova" | "nova-accent" | "nova-alt" | "rhea" | "saga-blue" | "saga-green" | "saga-orange" | "saga-purple" | "soho-dark" | "soho-light" | "tailwind-light" | "vela-blue" | "vela-green" | "vela-orange" | "vela-purple" | "viva-dark" | "viva-light";
4
+ type OmittedApiOptions = Omit<$APIOptions, "setAppendTo" | "setStyleContainer" | "setAutoZIndex" | "setCssTransition" | "setFilterMatchModeOptions" | "setHideOverlaysOnDocumentScrolling" | "setInputStyle" | "setLocale" | "setNonce" | "setNullSortOrder" | "setRipple" | "setZIndex" | "setPt" | "changeTheme">;
5
+ export interface PowellConfig extends OmittedApiOptions {
6
+ theme?: ThemeName;
7
+ rtl?: boolean;
8
+ showRequiredStar?: boolean;
9
+ inputSize?: Size;
10
+ labelPosition?: LabelPosition;
11
+ fixLabelPosition?: FixLabelPosition;
12
+ }
13
+ export {};
@@ -0,0 +1,28 @@
1
+ import { $ButtonProps } from "@powell/api";
2
+ import { ButtonAppearance, Nullable, Position, SafeAny } from "@powell/models";
3
+ import { MouseEvent } from "react";
4
+ export type LabelPosition = 'float' | 'fix-side' | 'fix-top';
5
+ export type FixLabelPosition = Exclude<LabelPosition, 'float'>;
6
+ export type IconPosition = Exclude<Position, 'top' | 'bottom'>;
7
+ export interface AddonConfig {
8
+ type: 'button' | 'icon' | 'text';
9
+ label?: string;
10
+ severity?: $ButtonProps["severity"];
11
+ appearance?: ButtonAppearance;
12
+ icon?: string;
13
+ iconPosition?: IconPosition;
14
+ text?: string;
15
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
16
+ }
17
+ export interface Addon {
18
+ before?: AddonConfig;
19
+ after?: AddonConfig;
20
+ }
21
+ export type TransformOptions<V = SafeAny, T = SafeAny> = {
22
+ value: Nullable<V>;
23
+ onChange: (...event: SafeAny[]) => void;
24
+ transform?: {
25
+ input?: (value: Nullable<V>) => SafeAny;
26
+ output?: (...event: T[]) => SafeAny;
27
+ };
28
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./common";
2
+ export * from "./config";
3
+ export * from "./forms";
@@ -0,0 +1,19 @@
1
+ import { SetStateAction } from "react";
2
+ type Set<T> = (newState: SetStateAction<T>, callback?: (newState: T) => void) => void;
3
+ type UseSelector<T> = <TSelected = unknown>(selector: (state: T) => TSelected, equalityFn?: Comparator<TSelected>) => TSelected;
4
+ export interface StateWithValue<T> {
5
+ use: () => [T, Set<T>];
6
+ useValue: () => T;
7
+ get: () => T;
8
+ useSelector: UseSelector<T>;
9
+ set: Set<T>;
10
+ reset: () => void;
11
+ subscribe(subscriber: SubscriberFunc<T>): () => void;
12
+ }
13
+ type SubscriberFunc<T> = (newState: T, previousState: T) => void;
14
+ interface Options<T> {
15
+ onSet?: SubscriberFunc<T>;
16
+ }
17
+ type Comparator<TSelected = unknown> = (a: TSelected, b: TSelected) => boolean;
18
+ export declare function globalState<T>(initialValue: T, options?: Options<T>): StateWithValue<T>;
19
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./globalState";
2
+ export * from "./utilsService";
@@ -0,0 +1,8 @@
1
+ import { AddonConfig, TransformOptions } from "@powell/models";
2
+ import { $FormikContextType, $FormikValues } from "@powell/api";
3
+ export declare const getAddonTemplate: (config?: AddonConfig) => import("react").JSX.Element;
4
+ export declare const isRequiredField: (formContext: $FormikContextType<$FormikValues> | null, name: string | undefined) => any;
5
+ export declare const transformer: <V = any, T = any>(options: TransformOptions<V, T>) => {
6
+ value: V;
7
+ onChange: (...event: T[]) => void;
8
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ import t from"react";"function"==typeof SuppressedError&&SuppressedError;!function(t,e){void 0===e&&(e={});var o=e.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}('.button{background-color:#4caf50;border:none;box-shadow:0 8px 16px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);color:#fff;cursor:pointer;font-size:28px;overflow:hidden;padding:20px;position:relative;text-align:center;text-decoration:none;-webkit-transition-duration:.4s;transition-duration:.4s;width:200px}.button:after{background:#f1f1f1;content:"";display:block;margin-left:-20px!important;margin-top:-120%;opacity:0;padding-left:350%;padding-top:300%;position:absolute;transition:all .8s}.button:active:after{margin:0;opacity:1;padding:0;transition:0s}.button--dsiabled{background-color:grey;opacity:.5}');const e=e=>{var{onClick:o,disabled:n,className:r,children:i}=e,a=function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(o[n[r]]=t[n[r]])}return o}(e,["onClick","disabled","className","children"]);return t.createElement("button",Object.assign({type:"button",className:`button ${r} ${n&&"button--dsiabled"}`,onClick:o,disabled:n},a),i)};export{e as Button};
@@ -0,0 +1,6 @@
1
+ import { ButtonHTMLAttributes, FC, ReactNode } from 'react';
2
+ import './Button.scss';
3
+ export interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
+ children?: ReactNode;
5
+ }
6
+ export declare const Button: FC<IButtonProps>;
@@ -0,0 +1 @@
1
+ export * from './Button';
@@ -0,0 +1 @@
1
+ export * from './Button';
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from "react";
2
+ import { PowellConfig } from "@powell/models";
3
+ export declare const PowellProvider: (props: PropsWithChildren<{
4
+ config?: PowellConfig;
5
+ }>) => import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { PowellConfig } from "@powell/models";
2
+ export declare const configService: import("@powell/utils").StateWithValue<PowellConfig>;
@@ -0,0 +1,73 @@
1
+ import { ArrayHelpers, ComponentDecorator, CompositeComponent, connect, ErrorMessage, ErrorMessageProps, FastField, FastFieldAttributes, FastFieldConfig, FastFieldProps, Field, FieldArray, FieldArrayConfig, FieldArrayRenderProps, FieldAttributes, FieldConfig, FieldHelperProps, FieldHookConfig, FieldInputProps, FieldMetaProps, FieldProps, FieldValidator, Form, Formik, FormikBag, FormikComputedProps, FormikConfig, FormikConsumer, FormikContext, FormikContextType, FormikErrors, FormikFormProps, FormikHandlers, FormikHelpers, FormikProps, FormikProvider, FormikRegistration, FormikSharedConfig, FormikState, FormikTouched, FormikValues, GenericFieldHTMLAttributes, getActiveElement, getIn, InferableComponentDecorator, InjectedFormikProps, insert, isEmptyArray, isEmptyChildren, isFunction, isInputEvent, isInteger, isNaN, isObject, isPromise, isString, move, prepareDataForValidation, replace, setIn, setNestedObjectValues, SharedRenderProps, swap, useField, useFormik, useFormikContext, validateYupSchema, withFormik, WithFormikConfig, yupToFormErrors } from 'formik';
2
+ import * as Yup from 'yup';
3
+ export { ErrorMessage as $ErrorMessage };
4
+ export type { ErrorMessageProps as $ErrorMessageProps };
5
+ export type { FieldProps as $FieldProps };
6
+ export { Field as $Field };
7
+ export { FieldArray as $FieldArray };
8
+ export { Form as $Form };
9
+ export type { ArrayHelpers as $ArrayHelpers };
10
+ export type { FieldArrayConfig as $FieldArrayConfig };
11
+ export type { FastFieldConfig as $FastFieldConfig };
12
+ export type { FastFieldProps as $FastFieldProps };
13
+ export { FastField as $FastField };
14
+ export type { FastFieldAttributes as $FastFieldAttributes };
15
+ export type { FieldConfig as $FieldConfig };
16
+ export type { FieldAttributes as $FieldAttributes };
17
+ export type { FieldHookConfig as $FieldHookConfig };
18
+ export type { FieldInputProps as $FieldInputProps };
19
+ export type { FieldMetaProps as $FieldMetaProps };
20
+ export type { FieldHelperProps as $FieldHelperProps };
21
+ export type { FieldValidator as $FieldValidator };
22
+ export type { FieldArrayRenderProps as $FieldArrayRenderProps };
23
+ export { useField as $useField };
24
+ export type { FormikProps as $FormikProps };
25
+ export type { FormikComputedProps as $FormikComputedProps };
26
+ export type { FormikFormProps as $FormikFormProps };
27
+ export { Formik as $Formik };
28
+ export type { FormikConfig as $FormikConfig };
29
+ export type { FormikSharedConfig as $FormikSharedConfig };
30
+ export type { FormikBag as $FormikBag };
31
+ export { FormikConsumer as $FormikConsumer };
32
+ export type { FormikErrors as $FormikErrors };
33
+ export { FormikContext as $FormikContext };
34
+ export type { FormikContextType as $FormikContextType };
35
+ export type { FormikHandlers as $FormikHandlers };
36
+ export type { FormikHelpers as $FormikHelpers };
37
+ export { FormikProvider as $FormikProvider };
38
+ export type { FormikRegistration as $FormikRegistration };
39
+ export type { FormikState as $FormikState };
40
+ export type { FormikTouched as $FormikTouched };
41
+ export type { FormikValues as $FormikValues };
42
+ export { useFormikContext as $useFormikContext };
43
+ export type { WithFormikConfig as $WithFormikConfig };
44
+ export type { GenericFieldHTMLAttributes as $GenericFieldHTMLAttributes };
45
+ export type { SharedRenderProps as $SharedRenderProps };
46
+ export { connect as $connect };
47
+ export { getIn as $getIn };
48
+ export { isEmptyArray as $isEmptyArray };
49
+ export { useFormik as $useFormik };
50
+ export { withFormik as $withFormik };
51
+ export type { ComponentDecorator as $ComponentDecorator };
52
+ export type { InferableComponentDecorator as $InferableComponentDecorator };
53
+ export { insert as $insert };
54
+ export type { CompositeComponent as $CompositeComponent };
55
+ export { isEmptyChildren as $isEmptyChildren };
56
+ export { isInputEvent as $isInputEvent };
57
+ export { isNaN as $isNaN };
58
+ export type { InjectedFormikProps as $InjectedFormikProps };
59
+ export { isFunction as $isFunction };
60
+ export { move as $move };
61
+ export { isInteger as $isInteger };
62
+ export { isObject as $isObject };
63
+ export { isPromise as $isPromise };
64
+ export { isString as $isString };
65
+ export { swap as $swap };
66
+ export { replace as $replace };
67
+ export { setIn as $setIn };
68
+ export { prepareDataForValidation as $prepareDataForValidation };
69
+ export { setNestedObjectValues as $setNestedObjectValues };
70
+ export { validateYupSchema as $validateYupSchema };
71
+ export { yupToFormErrors as $yupToFormErrors };
72
+ export { getActiveElement as $getActiveElement };
73
+ export { Yup as $Yup };
@@ -0,0 +1,5 @@
1
+ export * from './configService';
2
+ export * from './forms';
3
+ export * from './powellDefaults';
4
+ export * from './PowellProvider';
5
+ export * from './primereact';
@@ -0,0 +1,2 @@
1
+ import { PowellConfig } from "@powell/models";
2
+ export declare const powellDefaults: PowellConfig;