powell-react 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (341) 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 -321
  5. package/dist/cjs/index.js +1 -72407
  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/{api → src/powell/api}/PowellProvider.d.ts +2 -2
  11. package/dist/cjs/types/src/powell/api/configService.d.ts +2 -0
  12. package/dist/cjs/types/{api → src/powell/api}/powellDefaults.d.ts +1 -1
  13. package/dist/cjs/types/{api → src/powell/api}/primereact.d.ts +0 -14
  14. package/dist/cjs/types/{components → src/powell/components}/AutoComplete/AutoComplete.d.ts +4 -4
  15. package/dist/{esm/types → cjs/types/src/powell}/components/Button/Button.d.ts +3 -3
  16. package/dist/{esm/types → cjs/types/src/powell}/components/CascadeSelect/CascadeSelect.d.ts +4 -4
  17. package/dist/{esm/types → cjs/types/src/powell}/components/Checkbox/Checkbox.d.ts +4 -4
  18. package/dist/cjs/types/{components → src/powell/components}/Chips/Chips.d.ts +3 -3
  19. package/dist/{esm/types → cjs/types/src/powell}/components/ColorPicker/ColorPicker.d.ts +4 -4
  20. package/dist/{esm/types → cjs/types/src/powell}/components/Dropdown/Dropdown.d.ts +4 -4
  21. package/dist/{esm/types → cjs/types/src/powell}/components/Editor/Editor.d.ts +4 -4
  22. package/dist/{esm/types → cjs/types/src/powell}/components/FormContainer/FormContainer.d.ts +1 -1
  23. package/dist/cjs/types/{components → src/powell/components}/FormContainer/FormContext.d.ts +2 -2
  24. package/dist/{esm/types → cjs/types/src/powell}/components/InputMask/InputMask.d.ts +4 -4
  25. package/dist/cjs/types/{components → src/powell/components}/InputNumber/InputNumber.d.ts +4 -4
  26. package/dist/cjs/types/{components → src/powell/components}/InputOtp/InputOtp.d.ts +4 -4
  27. package/dist/cjs/types/{components → src/powell/components}/InputPassword/InputPassword.d.ts +3 -3
  28. package/dist/{esm/types → cjs/types/src/powell}/components/InputSwitch/InputSwitch.d.ts +4 -4
  29. package/dist/{esm/types → cjs/types/src/powell}/components/InputText/InputText.d.ts +4 -4
  30. package/dist/cjs/types/{components → src/powell/components}/InputTextarea/InputTextarea.d.ts +4 -4
  31. package/dist/cjs/types/{components → src/powell/components}/Knob/Knob.d.ts +3 -3
  32. package/dist/cjs/types/{components → src/powell/components}/ListBox/ListBox.d.ts +3 -3
  33. package/dist/{esm/types → cjs/types/src/powell}/components/Mention/Mention.d.ts +4 -4
  34. package/dist/cjs/types/{components → src/powell/components}/MultiSelect/MultiSelect.d.ts +4 -4
  35. package/dist/cjs/types/{components → src/powell/components}/MultiStateCheckbox/MultiStateCheckbox.d.ts +3 -3
  36. package/dist/cjs/types/{components → src/powell/components}/RadioGroup/RadioGroup.d.ts +4 -4
  37. package/dist/{esm/types → cjs/types/src/powell}/components/Rating/Rating.d.ts +4 -4
  38. package/dist/cjs/types/{components → src/powell/components}/SelectButton/SelectButton.d.ts +4 -4
  39. package/dist/{esm/types → cjs/types/src/powell}/components/Slider/Slider.d.ts +4 -4
  40. package/dist/cjs/types/{components → src/powell/components}/ToggleButton/ToggleButton.d.ts +4 -4
  41. package/dist/cjs/types/{components → src/powell/components}/TreeSelect/TreeSelect.d.ts +4 -4
  42. package/dist/cjs/types/{components → src/powell/components}/TriStateCheckbox/TriStateCheckbox.d.ts +4 -4
  43. package/dist/{esm/types → cjs/types/src/powell}/hooks/useApplyConfig.d.ts +2 -2
  44. package/dist/cjs/types/{hooks → src/powell/hooks}/useFormContext.d.ts +1 -1
  45. package/dist/cjs/types/{hooks → src/powell/hooks}/usePowellConfig.d.ts +1 -1
  46. package/dist/cjs/types/{models → src/powell/models}/config.d.ts +2 -2
  47. package/dist/cjs/types/{models → src/powell/models}/forms.d.ts +2 -2
  48. package/dist/{esm/types → cjs/types/src/powell}/utils/utilsService.d.ts +3 -3
  49. package/dist/cjs/types/vite.config.d.ts +2 -0
  50. package/dist/esm/index.js +1 -72377
  51. package/dist/esm/types/src/components/Button/Button.d.ts +6 -0
  52. package/dist/esm/types/src/components/Button/index.d.ts +1 -0
  53. package/dist/esm/types/src/components/index.d.ts +1 -0
  54. package/dist/esm/types/src/index.d.ts +1 -0
  55. package/dist/esm/types/{api → src/powell/api}/PowellProvider.d.ts +2 -2
  56. package/dist/esm/types/src/powell/api/configService.d.ts +2 -0
  57. package/dist/esm/types/{api → src/powell/api}/powellDefaults.d.ts +1 -1
  58. package/dist/esm/types/{api → src/powell/api}/primereact.d.ts +0 -14
  59. package/dist/esm/types/{components → src/powell/components}/AutoComplete/AutoComplete.d.ts +4 -4
  60. package/dist/{cjs/types → esm/types/src/powell}/components/Button/Button.d.ts +3 -3
  61. package/dist/{cjs/types → esm/types/src/powell}/components/CascadeSelect/CascadeSelect.d.ts +4 -4
  62. package/dist/{cjs/types → esm/types/src/powell}/components/Checkbox/Checkbox.d.ts +4 -4
  63. package/dist/esm/types/{components → src/powell/components}/Chips/Chips.d.ts +3 -3
  64. package/dist/{cjs/types → esm/types/src/powell}/components/ColorPicker/ColorPicker.d.ts +4 -4
  65. package/dist/{cjs/types → esm/types/src/powell}/components/Dropdown/Dropdown.d.ts +4 -4
  66. package/dist/{cjs/types → esm/types/src/powell}/components/Editor/Editor.d.ts +4 -4
  67. package/dist/{cjs/types → esm/types/src/powell}/components/FormContainer/FormContainer.d.ts +1 -1
  68. package/dist/esm/types/{components → src/powell/components}/FormContainer/FormContext.d.ts +2 -2
  69. package/dist/{cjs/types → esm/types/src/powell}/components/InputMask/InputMask.d.ts +4 -4
  70. package/dist/esm/types/{components → src/powell/components}/InputNumber/InputNumber.d.ts +4 -4
  71. package/dist/esm/types/{components → src/powell/components}/InputOtp/InputOtp.d.ts +4 -4
  72. package/dist/esm/types/{components → src/powell/components}/InputPassword/InputPassword.d.ts +3 -3
  73. package/dist/{cjs/types → esm/types/src/powell}/components/InputSwitch/InputSwitch.d.ts +4 -4
  74. package/dist/{cjs/types → esm/types/src/powell}/components/InputText/InputText.d.ts +4 -4
  75. package/dist/esm/types/{components → src/powell/components}/InputTextarea/InputTextarea.d.ts +4 -4
  76. package/dist/esm/types/{components → src/powell/components}/Knob/Knob.d.ts +3 -3
  77. package/dist/esm/types/{components → src/powell/components}/ListBox/ListBox.d.ts +3 -3
  78. package/dist/{cjs/types → esm/types/src/powell}/components/Mention/Mention.d.ts +4 -4
  79. package/dist/esm/types/{components → src/powell/components}/MultiSelect/MultiSelect.d.ts +4 -4
  80. package/dist/esm/types/{components → src/powell/components}/MultiStateCheckbox/MultiStateCheckbox.d.ts +3 -3
  81. package/dist/esm/types/{components → src/powell/components}/RadioGroup/RadioGroup.d.ts +4 -4
  82. package/dist/{cjs/types → esm/types/src/powell}/components/Rating/Rating.d.ts +4 -4
  83. package/dist/esm/types/{components → src/powell/components}/SelectButton/SelectButton.d.ts +4 -4
  84. package/dist/{cjs/types → esm/types/src/powell}/components/Slider/Slider.d.ts +4 -4
  85. package/dist/esm/types/{components → src/powell/components}/ToggleButton/ToggleButton.d.ts +4 -4
  86. package/dist/esm/types/{components → src/powell/components}/TreeSelect/TreeSelect.d.ts +4 -4
  87. package/dist/esm/types/{components → src/powell/components}/TriStateCheckbox/TriStateCheckbox.d.ts +4 -4
  88. package/dist/{cjs/types → esm/types/src/powell}/hooks/useApplyConfig.d.ts +2 -2
  89. package/dist/esm/types/{hooks → src/powell/hooks}/useFormContext.d.ts +1 -1
  90. package/dist/esm/types/{hooks → src/powell/hooks}/usePowellConfig.d.ts +1 -1
  91. package/dist/esm/types/{models → src/powell/models}/config.d.ts +2 -2
  92. package/dist/esm/types/{models → src/powell/models}/forms.d.ts +2 -2
  93. package/dist/{cjs/types → esm/types/src/powell}/utils/utilsService.d.ts +3 -3
  94. package/dist/esm/types/vite.config.d.ts +2 -0
  95. package/package.json +45 -57
  96. package/rollup.config.mjs +95 -0
  97. package/src/components/Button/Button.scss +43 -0
  98. package/src/components/Button/Button.stories.tsx +13 -0
  99. package/src/components/Button/Button.tsx +19 -0
  100. package/src/components/Button/index.ts +1 -0
  101. package/src/components/index.ts +1 -0
  102. package/src/index.ts +1 -0
  103. package/src/powell/api/PowellProvider.tsx +37 -0
  104. package/src/powell/api/configService.ts +4 -0
  105. package/src/powell/api/forms.ts +145 -0
  106. package/src/powell/api/index.ts +5 -0
  107. package/src/powell/api/powellDefaults.ts +11 -0
  108. package/src/powell/api/primereact.ts +1945 -0
  109. package/src/powell/components/AutoComplete/AutoComplete.scss +126 -0
  110. package/src/powell/components/AutoComplete/AutoComplete.tsx +190 -0
  111. package/src/powell/components/AutoComplete/index.ts +1 -0
  112. package/src/powell/components/Button/Button.tsx +90 -0
  113. package/src/powell/components/Button/index.ts +1 -0
  114. package/src/powell/components/CascadeSelect/CascadeSelect.scss +126 -0
  115. package/src/powell/components/CascadeSelect/CascadeSelect.tsx +190 -0
  116. package/src/powell/components/CascadeSelect/index.ts +1 -0
  117. package/src/powell/components/Checkbox/Checkbox.scss +32 -0
  118. package/src/powell/components/Checkbox/Checkbox.tsx +147 -0
  119. package/src/powell/components/Checkbox/index.ts +1 -0
  120. package/src/powell/components/Chips/Chips.scss +126 -0
  121. package/src/powell/components/Chips/Chips.tsx +190 -0
  122. package/src/powell/components/Chips/index.ts +1 -0
  123. package/src/powell/components/ColorPicker/ColorPicker.scss +126 -0
  124. package/src/powell/components/ColorPicker/ColorPicker.tsx +186 -0
  125. package/src/powell/components/ColorPicker/index.ts +1 -0
  126. package/src/powell/components/Dropdown/Dropdown.scss +126 -0
  127. package/src/powell/components/Dropdown/Dropdown.tsx +190 -0
  128. package/src/powell/components/Dropdown/index.ts +1 -0
  129. package/src/powell/components/Editor/Editor.scss +126 -0
  130. package/src/powell/components/Editor/Editor.tsx +183 -0
  131. package/src/powell/components/Editor/index.ts +1 -0
  132. package/src/powell/components/FormContainer/FormContainer.tsx +49 -0
  133. package/src/powell/components/FormContainer/FormContext.tsx +18 -0
  134. package/src/powell/components/FormContainer/index.ts +2 -0
  135. package/src/powell/components/InputMask/InputMask.scss +126 -0
  136. package/src/powell/components/InputMask/InputMask.tsx +190 -0
  137. package/src/powell/components/InputMask/index.ts +1 -0
  138. package/src/powell/components/InputNumber/InputNumber.scss +126 -0
  139. package/src/powell/components/InputNumber/InputNumber.tsx +190 -0
  140. package/src/powell/components/InputNumber/index.ts +1 -0
  141. package/src/powell/components/InputOtp/InputOtp.scss +126 -0
  142. package/src/powell/components/InputOtp/InputOtp.tsx +154 -0
  143. package/src/powell/components/InputOtp/index.ts +1 -0
  144. package/src/powell/components/InputPassword/InputPassword.scss +126 -0
  145. package/src/powell/components/InputPassword/InputPassword.tsx +189 -0
  146. package/src/powell/components/InputPassword/index.ts +1 -0
  147. package/src/powell/components/InputSwitch/InputSwitch.scss +32 -0
  148. package/src/powell/components/InputSwitch/InputSwitch.tsx +144 -0
  149. package/src/powell/components/InputSwitch/index.ts +1 -0
  150. package/src/powell/components/InputText/InputText.scss +126 -0
  151. package/src/powell/components/InputText/InputText.tsx +190 -0
  152. package/src/powell/components/InputText/index.ts +1 -0
  153. package/src/powell/components/InputTextarea/InputTextarea.scss +126 -0
  154. package/src/powell/components/InputTextarea/InputTextarea.tsx +187 -0
  155. package/src/powell/components/InputTextarea/index.ts +1 -0
  156. package/src/powell/components/Knob/Knob.scss +32 -0
  157. package/src/powell/components/Knob/Knob.tsx +134 -0
  158. package/src/powell/components/Knob/index.ts +1 -0
  159. package/src/powell/components/ListBox/ListBox.scss +32 -0
  160. package/src/powell/components/ListBox/ListBox.tsx +135 -0
  161. package/src/powell/components/ListBox/index.ts +1 -0
  162. package/src/powell/components/Mention/Mention.scss +126 -0
  163. package/src/powell/components/Mention/Mention.tsx +186 -0
  164. package/src/powell/components/Mention/index.ts +1 -0
  165. package/src/powell/components/MultiSelect/MultiSelect.scss +126 -0
  166. package/src/powell/components/MultiSelect/MultiSelect.tsx +190 -0
  167. package/src/powell/components/MultiSelect/index.ts +1 -0
  168. package/src/powell/components/MultiStateCheckbox/MultiStateCheckbox.scss +32 -0
  169. package/src/powell/components/MultiStateCheckbox/MultiStateCheckbox.tsx +143 -0
  170. package/src/powell/components/MultiStateCheckbox/index.ts +1 -0
  171. package/src/powell/components/RadioGroup/RadioGroup.scss +32 -0
  172. package/src/powell/components/RadioGroup/RadioGroup.tsx +167 -0
  173. package/src/powell/components/RadioGroup/index.ts +1 -0
  174. package/src/powell/components/Rating/Rating.scss +32 -0
  175. package/src/powell/components/Rating/Rating.tsx +135 -0
  176. package/src/powell/components/Rating/index.ts +1 -0
  177. package/src/powell/components/SelectButton/SelectButton.scss +32 -0
  178. package/src/powell/components/SelectButton/SelectButton.tsx +144 -0
  179. package/src/powell/components/SelectButton/index.ts +1 -0
  180. package/src/powell/components/Slider/Slider.scss +32 -0
  181. package/src/powell/components/Slider/Slider.tsx +135 -0
  182. package/src/powell/components/Slider/index.ts +1 -0
  183. package/src/powell/components/ToggleButton/ToggleButton.scss +32 -0
  184. package/src/powell/components/ToggleButton/ToggleButton.tsx +144 -0
  185. package/src/powell/components/ToggleButton/index.ts +1 -0
  186. package/src/powell/components/TreeSelect/TreeSelect.scss +126 -0
  187. package/src/powell/components/TreeSelect/TreeSelect.tsx +190 -0
  188. package/src/powell/components/TreeSelect/index.ts +1 -0
  189. package/src/powell/components/TriStateCheckbox/TriStateCheckbox.scss +32 -0
  190. package/src/powell/components/TriStateCheckbox/TriStateCheckbox.tsx +144 -0
  191. package/src/powell/components/TriStateCheckbox/index.ts +1 -0
  192. package/src/powell/hooks/index.ts +3 -0
  193. package/src/powell/hooks/useApplyConfig.ts +36 -0
  194. package/src/powell/hooks/useFormContext.ts +14 -0
  195. package/src/powell/hooks/usePowellConfig.ts +64 -0
  196. package/src/powell/index.ts +29 -0
  197. package/src/powell/models/common.ts +7 -0
  198. package/src/powell/models/config.ts +85 -0
  199. package/src/powell/models/forms.ts +33 -0
  200. package/src/powell/models/index.ts +3 -0
  201. package/src/powell/styles/common.scss +9 -0
  202. package/src/powell/styles/mixins.scss +0 -0
  203. package/src/powell/themes/arya-blue.css +1 -0
  204. package/src/powell/themes/arya-green.css +1 -0
  205. package/src/powell/themes/arya-orange.css +1 -0
  206. package/src/powell/themes/arya-purple.css +1 -0
  207. package/src/powell/themes/bootstrap4-dark-blue.css +1 -0
  208. package/src/powell/themes/bootstrap4-dark-purple.css +1 -0
  209. package/src/powell/themes/bootstrap4-light-blue.css +1 -0
  210. package/src/powell/themes/bootstrap4-light-purple.css +1 -0
  211. package/src/powell/themes/fluent-light.css +1 -0
  212. package/src/powell/themes/lara-dark-amber.css +1 -0
  213. package/src/powell/themes/lara-dark-blue.css +1 -0
  214. package/src/powell/themes/lara-dark-cyan.css +1 -0
  215. package/src/powell/themes/lara-dark-green.css +1 -0
  216. package/src/powell/themes/lara-dark-indigo.css +1 -0
  217. package/src/powell/themes/lara-dark-pink.css +1 -0
  218. package/src/powell/themes/lara-dark-purple.css +1 -0
  219. package/src/powell/themes/lara-dark-teal.css +1 -0
  220. package/src/powell/themes/lara-light-amber.css +1 -0
  221. package/src/powell/themes/lara-light-blue.css +1 -0
  222. package/src/powell/themes/lara-light-cyan.css +1 -0
  223. package/src/powell/themes/lara-light-green.css +1 -0
  224. package/src/powell/themes/lara-light-indigo.css +1 -0
  225. package/src/powell/themes/lara-light-pink.css +1 -0
  226. package/src/powell/themes/lara-light-purple.css +1 -0
  227. package/src/powell/themes/lara-light-teal.css +1 -0
  228. package/src/powell/themes/luna-amber.css +1 -0
  229. package/src/powell/themes/luna-blue.css +1 -0
  230. package/src/powell/themes/luna-green.css +1 -0
  231. package/src/powell/themes/luna-pink.css +1 -0
  232. package/src/powell/themes/md-dark-deeppurple.css +1 -0
  233. package/src/powell/themes/md-dark-indigo.css +1 -0
  234. package/src/powell/themes/md-light-deeppurple.css +1 -0
  235. package/src/powell/themes/md-light-indigo.css +1 -0
  236. package/src/powell/themes/mdc-dark-deeppurple.css +1 -0
  237. package/src/powell/themes/mdc-dark-indigo.css +1 -0
  238. package/src/powell/themes/mdc-light-deeppurple.css +1 -0
  239. package/src/powell/themes/mdc-light-indigo.css +1 -0
  240. package/src/powell/themes/mira.css +1 -0
  241. package/src/powell/themes/nano.css +1 -0
  242. package/src/powell/themes/nova-accent.css +1 -0
  243. package/src/powell/themes/nova-alt.css +1 -0
  244. package/src/powell/themes/nova.css +1 -0
  245. package/src/powell/themes/rhea.css +1 -0
  246. package/src/powell/themes/saga-blue.css +1 -0
  247. package/src/powell/themes/saga-green.css +1 -0
  248. package/src/powell/themes/saga-orange.css +1 -0
  249. package/src/powell/themes/saga-purple.css +1 -0
  250. package/src/powell/themes/soho-dark.css +1 -0
  251. package/src/powell/themes/soho-light.css +1 -0
  252. package/src/powell/themes/tailwind-light.css +1 -0
  253. package/src/powell/themes/vela-blue.css +1 -0
  254. package/src/powell/themes/vela-green.css +1 -0
  255. package/src/powell/themes/vela-orange.css +1 -0
  256. package/src/powell/themes/vela-purple.css +1 -0
  257. package/src/powell/themes/viva-dark.css +1 -0
  258. package/src/powell/themes/viva-light.css +1 -0
  259. package/src/powell/utils/globalState.ts +96 -0
  260. package/src/powell/utils/index.ts +2 -0
  261. package/src/powell/utils/utilsService.tsx +55 -0
  262. package/src/stories/Button.stories.tsx +16 -0
  263. package/tsconfig.json +55 -0
  264. package/vite.config.ts +14 -0
  265. package/dist/cjs/index.js.map +0 -1
  266. package/dist/cjs/types/api/configService.d.ts +0 -2
  267. package/dist/esm/index.js.map +0 -1
  268. package/dist/esm/types/api/configService.d.ts +0 -2
  269. package/dist/index.d.ts +0 -495
  270. /package/dist/cjs/types/{api → src/powell/api}/forms.d.ts +0 -0
  271. /package/dist/cjs/types/{api → src/powell/api}/index.d.ts +0 -0
  272. /package/dist/cjs/types/{components → src/powell/components}/AutoComplete/index.d.ts +0 -0
  273. /package/dist/cjs/types/{components → src/powell/components}/Button/index.d.ts +0 -0
  274. /package/dist/cjs/types/{components → src/powell/components}/CascadeSelect/index.d.ts +0 -0
  275. /package/dist/cjs/types/{components → src/powell/components}/Checkbox/index.d.ts +0 -0
  276. /package/dist/cjs/types/{components → src/powell/components}/Chips/index.d.ts +0 -0
  277. /package/dist/cjs/types/{components → src/powell/components}/ColorPicker/index.d.ts +0 -0
  278. /package/dist/cjs/types/{components → src/powell/components}/Dropdown/index.d.ts +0 -0
  279. /package/dist/cjs/types/{components → src/powell/components}/Editor/index.d.ts +0 -0
  280. /package/dist/cjs/types/{components → src/powell/components}/FormContainer/index.d.ts +0 -0
  281. /package/dist/cjs/types/{components → src/powell/components}/InputMask/index.d.ts +0 -0
  282. /package/dist/cjs/types/{components → src/powell/components}/InputNumber/index.d.ts +0 -0
  283. /package/dist/cjs/types/{components → src/powell/components}/InputOtp/index.d.ts +0 -0
  284. /package/dist/cjs/types/{components → src/powell/components}/InputPassword/index.d.ts +0 -0
  285. /package/dist/cjs/types/{components → src/powell/components}/InputSwitch/index.d.ts +0 -0
  286. /package/dist/cjs/types/{components → src/powell/components}/InputText/index.d.ts +0 -0
  287. /package/dist/cjs/types/{components → src/powell/components}/InputTextarea/index.d.ts +0 -0
  288. /package/dist/cjs/types/{components → src/powell/components}/Knob/index.d.ts +0 -0
  289. /package/dist/cjs/types/{components → src/powell/components}/ListBox/index.d.ts +0 -0
  290. /package/dist/cjs/types/{components → src/powell/components}/Mention/index.d.ts +0 -0
  291. /package/dist/cjs/types/{components → src/powell/components}/MultiSelect/index.d.ts +0 -0
  292. /package/dist/cjs/types/{components → src/powell/components}/MultiStateCheckbox/index.d.ts +0 -0
  293. /package/dist/cjs/types/{components → src/powell/components}/RadioGroup/index.d.ts +0 -0
  294. /package/dist/cjs/types/{components → src/powell/components}/Rating/index.d.ts +0 -0
  295. /package/dist/cjs/types/{components → src/powell/components}/SelectButton/index.d.ts +0 -0
  296. /package/dist/cjs/types/{components → src/powell/components}/Slider/index.d.ts +0 -0
  297. /package/dist/cjs/types/{components → src/powell/components}/ToggleButton/index.d.ts +0 -0
  298. /package/dist/cjs/types/{components → src/powell/components}/TreeSelect/index.d.ts +0 -0
  299. /package/dist/cjs/types/{components → src/powell/components}/TriStateCheckbox/index.d.ts +0 -0
  300. /package/dist/cjs/types/{hooks → src/powell/hooks}/index.d.ts +0 -0
  301. /package/dist/cjs/types/{index.d.ts → src/powell/index.d.ts} +0 -0
  302. /package/dist/cjs/types/{models → src/powell/models}/common.d.ts +0 -0
  303. /package/dist/cjs/types/{models → src/powell/models}/index.d.ts +0 -0
  304. /package/dist/cjs/types/{utils → src/powell/utils}/globalState.d.ts +0 -0
  305. /package/dist/cjs/types/{utils → src/powell/utils}/index.d.ts +0 -0
  306. /package/dist/esm/types/{api → src/powell/api}/forms.d.ts +0 -0
  307. /package/dist/esm/types/{api → src/powell/api}/index.d.ts +0 -0
  308. /package/dist/esm/types/{components → src/powell/components}/AutoComplete/index.d.ts +0 -0
  309. /package/dist/esm/types/{components → src/powell/components}/Button/index.d.ts +0 -0
  310. /package/dist/esm/types/{components → src/powell/components}/CascadeSelect/index.d.ts +0 -0
  311. /package/dist/esm/types/{components → src/powell/components}/Checkbox/index.d.ts +0 -0
  312. /package/dist/esm/types/{components → src/powell/components}/Chips/index.d.ts +0 -0
  313. /package/dist/esm/types/{components → src/powell/components}/ColorPicker/index.d.ts +0 -0
  314. /package/dist/esm/types/{components → src/powell/components}/Dropdown/index.d.ts +0 -0
  315. /package/dist/esm/types/{components → src/powell/components}/Editor/index.d.ts +0 -0
  316. /package/dist/esm/types/{components → src/powell/components}/FormContainer/index.d.ts +0 -0
  317. /package/dist/esm/types/{components → src/powell/components}/InputMask/index.d.ts +0 -0
  318. /package/dist/esm/types/{components → src/powell/components}/InputNumber/index.d.ts +0 -0
  319. /package/dist/esm/types/{components → src/powell/components}/InputOtp/index.d.ts +0 -0
  320. /package/dist/esm/types/{components → src/powell/components}/InputPassword/index.d.ts +0 -0
  321. /package/dist/esm/types/{components → src/powell/components}/InputSwitch/index.d.ts +0 -0
  322. /package/dist/esm/types/{components → src/powell/components}/InputText/index.d.ts +0 -0
  323. /package/dist/esm/types/{components → src/powell/components}/InputTextarea/index.d.ts +0 -0
  324. /package/dist/esm/types/{components → src/powell/components}/Knob/index.d.ts +0 -0
  325. /package/dist/esm/types/{components → src/powell/components}/ListBox/index.d.ts +0 -0
  326. /package/dist/esm/types/{components → src/powell/components}/Mention/index.d.ts +0 -0
  327. /package/dist/esm/types/{components → src/powell/components}/MultiSelect/index.d.ts +0 -0
  328. /package/dist/esm/types/{components → src/powell/components}/MultiStateCheckbox/index.d.ts +0 -0
  329. /package/dist/esm/types/{components → src/powell/components}/RadioGroup/index.d.ts +0 -0
  330. /package/dist/esm/types/{components → src/powell/components}/Rating/index.d.ts +0 -0
  331. /package/dist/esm/types/{components → src/powell/components}/SelectButton/index.d.ts +0 -0
  332. /package/dist/esm/types/{components → src/powell/components}/Slider/index.d.ts +0 -0
  333. /package/dist/esm/types/{components → src/powell/components}/ToggleButton/index.d.ts +0 -0
  334. /package/dist/esm/types/{components → src/powell/components}/TreeSelect/index.d.ts +0 -0
  335. /package/dist/esm/types/{components → src/powell/components}/TriStateCheckbox/index.d.ts +0 -0
  336. /package/dist/esm/types/{hooks → src/powell/hooks}/index.d.ts +0 -0
  337. /package/dist/esm/types/{index.d.ts → src/powell/index.d.ts} +0 -0
  338. /package/dist/esm/types/{models → src/powell/models}/common.d.ts +0 -0
  339. /package/dist/esm/types/{models → src/powell/models}/index.d.ts +0 -0
  340. /package/dist/esm/types/{utils → src/powell/utils}/globalState.d.ts +0 -0
  341. /package/dist/esm/types/{utils → src/powell/utils}/index.d.ts +0 -0
@@ -0,0 +1,126 @@
1
+ .editor-wrapper {
2
+ .field {
3
+ display: flex;
4
+ gap: 0.25rem 1rem;
5
+
6
+ > .field-inner {
7
+ flex-grow: 1;
8
+ }
9
+ }
10
+
11
+ :where([data-pc-name="editor"]) {
12
+ width: 100%;
13
+ }
14
+
15
+ .p-icon-field {
16
+ .p-input-icon {
17
+ z-index: 5;
18
+ color: var(--text-color-secondary);
19
+ }
20
+
21
+ &.p-icon-field-right {
22
+ :where(.p-inputtext) {
23
+ padding-right: 2.5rem;
24
+ }
25
+
26
+ .p-input-icon {
27
+ right: 0.75rem;
28
+ left: auto;
29
+ }
30
+ }
31
+
32
+ &.p-icon-field-left {
33
+ :where(.p-inputtext) {
34
+ padding-left: 2.5rem;
35
+ }
36
+
37
+ .p-input-icon {
38
+ left: 0.75rem;
39
+ right: auto;
40
+ }
41
+ }
42
+ }
43
+
44
+ &.label-fix-side .field {
45
+ flex-direction: row;
46
+ align-items: center;
47
+ }
48
+
49
+ &.label-fix-top .field {
50
+ flex-direction: column;
51
+
52
+ label {
53
+ margin-bottom: 0.25rem;
54
+ }
55
+ }
56
+
57
+ &.addon-before {
58
+ [class*="icon-"] {
59
+ :where([data-pc-name="editor"]) {
60
+ border-radius: 0 var(--border-radius) var(--border-radius) 0;
61
+ }
62
+ }
63
+ }
64
+
65
+ &.addon-after {
66
+ &.label-float {
67
+ .p-inputgroup-addon {
68
+ border-left: 0;
69
+ }
70
+ }
71
+
72
+ [class*="icon-"] {
73
+ :where([data-pc-name="editor"]) {
74
+ border-radius: var(--border-radius) 0 0 var(--border-radius);
75
+ }
76
+ }
77
+ }
78
+
79
+ &[class*="addon-"] {
80
+ .p-inputgroup {
81
+ .p-icon-field,
82
+ .p-float-label {
83
+ flex-grow: 1;
84
+ }
85
+ }
86
+
87
+ &.addon-before :where([data-pc-name="editor"]) {
88
+ border-radius: 0 var(--border-radius) var(--border-radius) 0;
89
+ }
90
+
91
+ &.addon-after :where([data-pc-name="editor"]) {
92
+ border-radius: var(--border-radius) 0 0 var(--border-radius);
93
+ }
94
+ }
95
+
96
+ &.is-ltr {
97
+ direction: ltr;
98
+
99
+ &.label-float {
100
+ &.icon-left .field label {
101
+ left: 2.5rem;
102
+ }
103
+ }
104
+ }
105
+
106
+ &.is-rtl {
107
+ direction: rtl;
108
+
109
+ &.label-float {
110
+ label {
111
+ left: auto;
112
+ right: 0.75rem;
113
+ }
114
+
115
+ &.icon-right .field label {
116
+ right: 2.5rem;
117
+ }
118
+ }
119
+
120
+ &[class*="addon-"] {
121
+ .p-inputgroup {
122
+ flex-direction: row-reverse;
123
+ }
124
+ }
125
+ }
126
+ }
@@ -0,0 +1,183 @@
1
+ import {ChangeEvent, ReactNode, useCallback, useRef, useState} from "react";
2
+ import {Addon, LabelPosition} from "@powell/models";
3
+ import {
4
+ $classNames,
5
+ $Editor,
6
+ $EditorProps,
7
+ $ErrorMessage,
8
+ $Field,
9
+ $FieldProps,
10
+ $FloatLabel,
11
+ $IconField,
12
+ $IconFieldProps,
13
+ $InputIcon,
14
+ $UniqueComponentId
15
+ } from "@powell/api";
16
+ import {getAddonTemplate, isRequiredField, transformer} from "@powell/utils";
17
+ import {useApplyConfig, useFormContext} from "@powell/hooks";
18
+ import {SafeAny} from "@powell/models";
19
+ import '@components/Editor/Editor.scss';
20
+
21
+ interface EditorProps extends $EditorProps {
22
+ name?: string;
23
+ parseError?: (error: string) => ReactNode;
24
+ transform?: {
25
+ input?: (value: SafeAny) => string;
26
+ output?: (event: ChangeEvent<HTMLInputElement>) => SafeAny;
27
+ };
28
+ showRequiredStar?: boolean;
29
+ rtl?: boolean;
30
+ label?: string;
31
+ icon?: string | ReactNode;
32
+ hint?: string;
33
+ addon?: Addon;
34
+ iconPosition?: $IconFieldProps["iconPosition"];
35
+ labelPosition?: LabelPosition;
36
+ }
37
+
38
+ export const Editor = (props: EditorProps) => {
39
+ props = useApplyConfig(props);
40
+ const {
41
+ parseError,
42
+ name,
43
+ transform = {},
44
+ iconPosition = 'left',
45
+ labelPosition,
46
+ addon,
47
+ icon,
48
+ rtl,
49
+ showRequiredStar,
50
+ ...rest
51
+ } = props;
52
+
53
+ const inputId = useRef($UniqueComponentId());
54
+
55
+ // Check if we're in Formik context
56
+ const formContext = useFormContext();
57
+ const withinForm = !!formContext && !!name;
58
+ const isRequired = withinForm && isRequiredField(formContext, name);
59
+
60
+ // Internal state for non-Formik usage
61
+ const [internalValue, setInternalValue] = useState(rest.value || '');
62
+
63
+ const rootEl = useCallback(() => {
64
+ const commonProps = {
65
+ ...rest,
66
+ id: inputId.current,
67
+ name,
68
+ };
69
+
70
+ if (withinForm) {
71
+ // if in Formik context
72
+ return (
73
+ <$Field name={name}>
74
+ {({field}: $FieldProps) => {
75
+ const {value, onChange} = transformer({
76
+ value: field.value,
77
+ onChange: (event: string) => formContext.setFieldValue(name, event),
78
+ transform: {
79
+ input: transform.input ?? (value => value),
80
+ output: transform.output ?? (event => event.htmlValue)
81
+ }
82
+ });
83
+
84
+ return (
85
+ <>
86
+ <$Editor
87
+ {...commonProps}
88
+ value={value}
89
+ onTextChange={(event) => {
90
+ onChange(event);
91
+ rest.onTextChange?.(event);
92
+ }}
93
+ onBlur={(event) => {
94
+ field.onBlur(event);
95
+ rest.onBlur?.(event);
96
+ }}
97
+ />
98
+ <$ErrorMessage name={name}>
99
+ {
100
+ (message) => <small className="error">{parseError?.(message) ?? message}</small>
101
+ }
102
+ </$ErrorMessage>
103
+ <small className="hint">{rest.hint}</small>
104
+ </>
105
+ );
106
+ }}
107
+ </$Field>
108
+ );
109
+ } else {
110
+ // if outside Formik context
111
+ const {value, onChange} = transformer({
112
+ value: internalValue,
113
+ onChange: (event: string) => setInternalValue(event),
114
+ transform: {
115
+ input: transform.input ?? (value => value),
116
+ output: transform.output ?? (event => event.htmlValue)
117
+ }
118
+ });
119
+
120
+ return (
121
+ <$Editor
122
+ {...commonProps}
123
+ value={value}
124
+ onTextChange={(event) => {
125
+ onChange(event);
126
+ rest.onTextChange?.(event);
127
+ }}
128
+ onBlur={rest.onBlur}
129
+ />
130
+ );
131
+ }
132
+ }, [internalValue, props]);
133
+
134
+ const labelEl = rest.label && (
135
+ <label htmlFor={inputId.current}>
136
+ {rest.label}
137
+ {isRequired && showRequiredStar ? '*' : ''}
138
+ </label>
139
+ );
140
+
141
+ const iconEl = icon && (
142
+ typeof icon === 'string'
143
+ ? <$InputIcon className={icon}></$InputIcon>
144
+ : <$InputIcon>{icon}</$InputIcon>
145
+ );
146
+
147
+ const withIcon = (
148
+ <$IconField iconPosition={iconPosition}>
149
+ {iconEl}
150
+ {rootEl()}
151
+ </$IconField>
152
+ );
153
+
154
+ return (
155
+ <div className={$classNames('chips-wrapper',
156
+ {
157
+ [`label-${labelPosition}`]: rest.label,
158
+ [`icon-${iconPosition}`]: iconEl,
159
+ 'is-rtl': rtl,
160
+ 'is-ltr': !rtl,
161
+ 'addon-before': addon?.before,
162
+ 'addon-after': addon?.after,
163
+ })}>
164
+ <div className="field">
165
+ {labelPosition !== 'float' && labelEl}
166
+ <div className={$classNames('field-inner', {"p-inputgroup": addon})}>
167
+ {getAddonTemplate(addon?.before)}
168
+ {
169
+ labelPosition === 'float' ? (
170
+ <$FloatLabel>
171
+ {icon ? withIcon : rootEl()}
172
+ {labelEl}
173
+ </$FloatLabel>
174
+ ) : (
175
+ icon ? withIcon : rootEl()
176
+ )
177
+ }
178
+ {getAddonTemplate(addon?.after)}
179
+ </div>
180
+ </div>
181
+ </div>
182
+ );
183
+ };
@@ -0,0 +1 @@
1
+ export * from "./Editor";
@@ -0,0 +1,49 @@
1
+ import {ForwardedRef, forwardRef, PropsWithChildren, useEffect, useRef} from "react";
2
+ import {FormProvider} from "@powell/components/FormContainer";
3
+ import {$Form, $Formik, $FormikConfig, $FormikContextType, $FormikValues, $useFormikContext} from "@powell/api";
4
+
5
+ interface FormContainerProps<T extends $FormikValues> extends $FormikConfig<T> {
6
+ onInit?: (context: $FormikContextType<T>) => void;
7
+ className?: string;
8
+ }
9
+
10
+ const FormContent = <T extends $FormikValues>(props: PropsWithChildren<{onInit: FormContainerProps<T>['onInit']}>) => {
11
+ const {children, onInit} = props;
12
+ const formikContext: $FormikContextType<T> = $useFormikContext();
13
+ const initialized = useRef(false);
14
+
15
+ useEffect(() => {
16
+ if (!initialized.current) {
17
+ onInit?.(formikContext);
18
+ initialized.current = true;
19
+ }
20
+ }, [formikContext, onInit]);
21
+
22
+ return (
23
+ <>
24
+ {children}
25
+ </>
26
+ );
27
+ }
28
+
29
+ export const FormContainer = forwardRef(<T extends $FormikValues>(props: FormContainerProps<T>, ref: ForwardedRef<HTMLFormElement>) => {
30
+ const {children, onInit, className, ...rest} = props;
31
+
32
+ return (
33
+ <$Formik {...rest}>
34
+ {
35
+ (context) => (
36
+ <FormProvider {...rest}>
37
+ <$Form ref={ref} className={className}>
38
+ {
39
+ <FormContent<T> onInit={onInit}>
40
+ {typeof children === 'function' ? children(context) : children}
41
+ </FormContent>
42
+ }
43
+ </$Form>
44
+ </FormProvider>
45
+ )
46
+ }
47
+ </$Formik>
48
+ )
49
+ })
@@ -0,0 +1,18 @@
1
+ import {createContext, PropsWithChildren} from "react";
2
+ import {$FormikConfig, $FormikValues} from "@powell/api";
3
+ import {SafeAny} from "@powell/models";
4
+
5
+ export const FormContext = createContext<$FormikConfig<$FormikValues> | undefined>(undefined);
6
+
7
+ export const FormProvider = <T extends $FormikValues>(props: PropsWithChildren<$FormikConfig<T>>) => {
8
+ const {children, ...rest} = props;
9
+
10
+ return (
11
+ <FormContext.Provider value={rest as SafeAny}>
12
+ <>
13
+ {children}
14
+ </>
15
+ </FormContext.Provider>
16
+ );
17
+ };
18
+
@@ -0,0 +1,2 @@
1
+ export * from "./FormContainer";
2
+ export * from "./FormContext";
@@ -0,0 +1,126 @@
1
+ .input-mask-wrapper {
2
+ .field {
3
+ display: flex;
4
+ gap: 0.25rem 1rem;
5
+
6
+ > .field-inner {
7
+ flex-grow: 1;
8
+ }
9
+ }
10
+
11
+ :where(.p-inputtext) {
12
+ width: 100%;
13
+ }
14
+
15
+ .p-icon-field {
16
+ .p-input-icon {
17
+ z-index: 5;
18
+ color: var(--text-color-secondary);
19
+ }
20
+
21
+ &.p-icon-field-right {
22
+ :where(.p-inputtext) {
23
+ padding-right: 2.5rem;
24
+ }
25
+
26
+ .p-input-icon {
27
+ right: 0.75rem;
28
+ left: auto;
29
+ }
30
+ }
31
+
32
+ &.p-icon-field-left {
33
+ :where(.p-inputtext) {
34
+ padding-left: 2.5rem;
35
+ }
36
+
37
+ .p-input-icon {
38
+ left: 0.75rem;
39
+ right: auto;
40
+ }
41
+ }
42
+ }
43
+
44
+ &.label-fix-side .field {
45
+ flex-direction: row;
46
+ align-items: center;
47
+ }
48
+
49
+ &.label-fix-top .field {
50
+ flex-direction: column;
51
+
52
+ label {
53
+ margin-bottom: 0.25rem;
54
+ }
55
+ }
56
+
57
+ &.addon-before {
58
+ [class*="icon-"] {
59
+ :where(.p-inputtext) {
60
+ border-radius: 0 var(--border-radius) var(--border-radius) 0;
61
+ }
62
+ }
63
+ }
64
+
65
+ &.addon-after {
66
+ &.label-float {
67
+ .p-inputgroup-addon {
68
+ border-left: 0;
69
+ }
70
+ }
71
+
72
+ [class*="icon-"] {
73
+ :where(.p-inputtext) {
74
+ border-radius: var(--border-radius) 0 0 var(--border-radius);
75
+ }
76
+ }
77
+ }
78
+
79
+ &[class*="addon-"] {
80
+ .p-inputgroup {
81
+ .p-icon-field,
82
+ .p-float-label {
83
+ flex-grow: 1;
84
+ }
85
+ }
86
+
87
+ &.addon-before :where(.p-inputtext) {
88
+ border-radius: 0 var(--border-radius) var(--border-radius) 0;
89
+ }
90
+
91
+ &.addon-after :where(.p-inputtext) {
92
+ border-radius: var(--border-radius) 0 0 var(--border-radius);
93
+ }
94
+ }
95
+
96
+ &.is-ltr {
97
+ direction: ltr;
98
+
99
+ &.label-float {
100
+ &.icon-left .field label {
101
+ left: 2.5rem;
102
+ }
103
+ }
104
+ }
105
+
106
+ &.is-rtl {
107
+ direction: rtl;
108
+
109
+ &.label-float {
110
+ label {
111
+ left: auto;
112
+ right: 0.75rem;
113
+ }
114
+
115
+ &.icon-right .field label {
116
+ right: 2.5rem;
117
+ }
118
+ }
119
+
120
+ &[class*="addon-"] {
121
+ .p-inputgroup {
122
+ flex-direction: row-reverse;
123
+ }
124
+ }
125
+ }
126
+ }
@@ -0,0 +1,190 @@
1
+ import {ChangeEvent, ReactNode, useCallback, useRef, useState} from "react";
2
+ import {Addon, LabelPosition, Size} from "@powell/models";
3
+ import {
4
+ $classNames,
5
+ $ErrorMessage,
6
+ $Field,
7
+ $FieldProps,
8
+ $FloatLabel,
9
+ $IconField,
10
+ $IconFieldProps,
11
+ $InputIcon,
12
+ $InputMask,
13
+ $InputMaskProps,
14
+ $UniqueComponentId
15
+ } from "@powell/api";
16
+ import {getAddonTemplate, isRequiredField, transformer} from "@powell/utils";
17
+ import {useApplyConfig, useFormContext} from "@powell/hooks";
18
+ import {SafeAny} from "@powell/models";
19
+ import '@components/InputMask/InputMask.scss';
20
+
21
+ interface InputMaskProps extends $InputMaskProps {
22
+ name?: string;
23
+ parseError?: (error: string) => ReactNode;
24
+ transform?: {
25
+ input?: (value: SafeAny) => string;
26
+ output?: (event: ChangeEvent<HTMLInputElement>) => SafeAny;
27
+ };
28
+ showRequiredStar?: boolean;
29
+ rtl?: boolean;
30
+ label?: string;
31
+ icon?: string | ReactNode;
32
+ hint?: string;
33
+ inputSize?: Size;
34
+ addon?: Addon;
35
+ iconPosition?: $IconFieldProps["iconPosition"];
36
+ labelPosition?: LabelPosition;
37
+ }
38
+
39
+ export const InputMask = (props: InputMaskProps) => {
40
+ props = useApplyConfig(props);
41
+ const {
42
+ parseError,
43
+ name,
44
+ transform = {},
45
+ iconPosition = 'left',
46
+ labelPosition,
47
+ addon,
48
+ icon,
49
+ rtl,
50
+ showRequiredStar,
51
+ variant,
52
+ inputSize,
53
+ ...rest
54
+ } = props;
55
+
56
+ const inputId = useRef($UniqueComponentId());
57
+
58
+ // Check if we're in Formik context
59
+ const formContext = useFormContext();
60
+ const withinForm = !!formContext && !!name;
61
+ const isRequired = withinForm && isRequiredField(formContext, name);
62
+
63
+ // Internal state for non-Formik usage
64
+ const [internalValue, setInternalValue] = useState(rest.value || '');
65
+
66
+ const rootEl = useCallback(() => {
67
+ const commonProps = {
68
+ ...rest,
69
+ variant,
70
+ id: inputId.current,
71
+ name,
72
+ };
73
+
74
+ if (withinForm) {
75
+ // if in Formik context
76
+ return (
77
+ <$Field name={name}>
78
+ {({field, meta}: $FieldProps) => {
79
+ const {value, onChange} = transformer({
80
+ value: field.value,
81
+ onChange: (event: string) => formContext.setFieldValue(name, event),
82
+ transform: {
83
+ input: transform.input ?? (value => value),
84
+ output: transform.output ?? (event => event.value)
85
+ }
86
+ });
87
+
88
+ return (
89
+ <>
90
+ <$InputMask
91
+ {...commonProps}
92
+ value={value}
93
+ onChange={(event) => {
94
+ onChange(event);
95
+ rest.onChange?.(event);
96
+ }}
97
+ onBlur={(event) => {
98
+ field.onBlur(event);
99
+ rest.onBlur?.(event);
100
+ }}
101
+ invalid={!!meta.error}
102
+ />
103
+ <$ErrorMessage name={name}>
104
+ {
105
+ (message) => <small className="error">{parseError?.(message) ?? message}</small>
106
+ }
107
+ </$ErrorMessage>
108
+ <small className="hint">{rest.hint}</small>
109
+ </>
110
+ );
111
+ }}
112
+ </$Field>
113
+ );
114
+ } else {
115
+ // if outside Formik context
116
+ const {value, onChange} = transformer({
117
+ value: internalValue,
118
+ onChange: (event: string) => setInternalValue(event),
119
+ transform: {
120
+ input: transform.input ?? (value => value),
121
+ output: transform.output ?? (event => event.value)
122
+ }
123
+ });
124
+
125
+ return (
126
+ <$InputMask
127
+ {...commonProps}
128
+ value={value}
129
+ onChange={(event) => {
130
+ onChange(event);
131
+ rest.onChange?.(event);
132
+ }}
133
+ onBlur={rest.onBlur}
134
+ />
135
+ );
136
+ }
137
+ }, [internalValue, props]);
138
+
139
+ const labelEl = rest.label && (
140
+ <label htmlFor={inputId.current}>
141
+ {rest.label}
142
+ {isRequired && showRequiredStar ? '*' : ''}
143
+ </label>
144
+ );
145
+
146
+ const iconEl = icon && (
147
+ typeof icon === 'string'
148
+ ? <$InputIcon className={icon}></$InputIcon>
149
+ : <$InputIcon>{icon}</$InputIcon>
150
+ );
151
+
152
+ const withIcon = (
153
+ <$IconField iconPosition={iconPosition}>
154
+ {iconEl}
155
+ {rootEl()}
156
+ </$IconField>
157
+ );
158
+
159
+ return (
160
+ <div className={$classNames('input-mask-wrapper',
161
+ `variant-${variant}`,
162
+ `p-inputtext-${inputSize}`,
163
+ {
164
+ [`label-${labelPosition}`]: rest.label,
165
+ [`icon-${iconPosition}`]: iconEl,
166
+ 'is-rtl': rtl,
167
+ 'is-ltr': !rtl,
168
+ 'addon-before': addon?.before,
169
+ 'addon-after': addon?.after,
170
+ })}>
171
+ <div className="field">
172
+ {labelPosition !== 'float' && labelEl}
173
+ <div className={$classNames('field-inner', {"p-inputgroup": addon})}>
174
+ {getAddonTemplate(addon?.before)}
175
+ {
176
+ labelPosition === 'float' ? (
177
+ <$FloatLabel>
178
+ {icon ? withIcon : rootEl()}
179
+ {labelEl}
180
+ </$FloatLabel>
181
+ ) : (
182
+ icon ? withIcon : rootEl()
183
+ )
184
+ }
185
+ {getAddonTemplate(addon?.after)}
186
+ </div>
187
+ </div>
188
+ </div>
189
+ );
190
+ };
@@ -0,0 +1 @@
1
+ export * from "./InputMask";