iguazio.dashboard-react-controls 2.2.24 → 3.0.0

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 (369) hide show
  1. package/dist/components/Backdrop/Backdrop.d.ts +14 -0
  2. package/dist/components/Backdrop/Backdrop.d.ts.map +1 -0
  3. package/dist/components/Backdrop/Backdrop.mjs +29 -0
  4. package/dist/components/Backdrop/Backdrop.mjs.map +1 -0
  5. package/dist/components/Button/Button.d.ts +28 -0
  6. package/dist/components/Button/Button.d.ts.map +1 -0
  7. package/dist/components/Button/Button.mjs +43 -0
  8. package/dist/components/Button/Button.mjs.map +1 -0
  9. package/dist/components/Button/Button.stories.d.ts +14 -0
  10. package/dist/components/Button/Button.stories.d.ts.map +1 -0
  11. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +33 -0
  12. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -0
  13. package/dist/components/ConfirmDialog/ConfirmDialog.mjs +83 -0
  14. package/dist/components/ConfirmDialog/ConfirmDialog.mjs.map +1 -0
  15. package/dist/components/ConfirmDialog/ConfirmDialog.stories.d.ts +8 -0
  16. package/dist/components/ConfirmDialog/ConfirmDialog.stories.d.ts.map +1 -0
  17. package/dist/components/FormCheckBox/FormCheckBox.d.ts +21 -0
  18. package/dist/components/FormCheckBox/FormCheckBox.d.ts.map +1 -0
  19. package/dist/components/FormCheckBox/FormCheckBox.mjs +54 -0
  20. package/dist/components/FormCheckBox/FormCheckBox.mjs.map +1 -0
  21. package/dist/components/FormCheckBox/FormCheckbox.stories.d.ts +7 -0
  22. package/dist/components/FormCheckBox/FormCheckbox.stories.d.ts.map +1 -0
  23. package/dist/components/FormChipCell/FormChip/FormChip.d.ts +45 -0
  24. package/dist/components/FormChipCell/FormChip/FormChip.d.ts.map +1 -0
  25. package/dist/components/FormChipCell/FormChip/FormChip.mjs +78 -0
  26. package/dist/components/FormChipCell/FormChip/FormChip.mjs.map +1 -0
  27. package/dist/components/FormChipCell/FormChipCell.d.ts +44 -0
  28. package/dist/components/FormChipCell/FormChipCell.d.ts.map +1 -0
  29. package/dist/components/FormChipCell/FormChipCell.mjs +239 -0
  30. package/dist/components/FormChipCell/FormChipCell.mjs.map +1 -0
  31. package/dist/components/FormChipCell/FormChipCellView.d.ts +56 -0
  32. package/dist/components/FormChipCell/FormChipCellView.d.ts.map +1 -0
  33. package/dist/components/FormChipCell/FormChipCellView.mjs +169 -0
  34. package/dist/components/FormChipCell/FormChipCellView.mjs.map +1 -0
  35. package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.d.ts +22 -0
  36. package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.d.ts.map +1 -0
  37. package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.mjs +72 -0
  38. package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.mjs.map +1 -0
  39. package/dist/components/FormChipCell/NewChipForm/NewChipForm.d.ts +35 -0
  40. package/dist/components/FormChipCell/NewChipForm/NewChipForm.d.ts.map +1 -0
  41. package/dist/components/FormChipCell/NewChipForm/NewChipForm.mjs +270 -0
  42. package/dist/components/FormChipCell/NewChipForm/NewChipForm.mjs.map +1 -0
  43. package/dist/components/FormChipCell/NewChipInput/NewChipInput.d.ts +16 -0
  44. package/dist/components/FormChipCell/NewChipInput/NewChipInput.d.ts.map +1 -0
  45. package/dist/components/FormChipCell/NewChipInput/NewChipInput.mjs +36 -0
  46. package/dist/components/FormChipCell/NewChipInput/NewChipInput.mjs.map +1 -0
  47. package/dist/components/FormChipCell/formChipCell.util.d.ts +6 -0
  48. package/dist/components/FormChipCell/formChipCell.util.d.ts.map +1 -0
  49. package/dist/components/FormChipCell/formChipCell.util.mjs +24 -0
  50. package/dist/components/FormChipCell/formChipCell.util.mjs.map +1 -0
  51. package/dist/components/FormCombobox/FormCombobox.d.ts +56 -0
  52. package/dist/components/FormCombobox/FormCombobox.d.ts.map +1 -0
  53. package/dist/components/FormCombobox/FormCombobox.mjs +278 -0
  54. package/dist/components/FormCombobox/FormCombobox.mjs.map +1 -0
  55. package/dist/components/FormCombobox/FormCombobox.stories.d.ts +12 -0
  56. package/dist/components/FormCombobox/FormCombobox.stories.d.ts.map +1 -0
  57. package/dist/components/FormInput/FormInput.d.ts +3 -0
  58. package/dist/components/FormInput/FormInput.d.ts.map +1 -0
  59. package/dist/components/FormInput/FormInput.mjs +272 -0
  60. package/dist/components/FormInput/FormInput.mjs.map +1 -0
  61. package/dist/components/FormInput/FormInput.stories.d.ts +14 -0
  62. package/dist/components/FormInput/FormInput.stories.d.ts.map +1 -0
  63. package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.d.ts +20 -0
  64. package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.d.ts.map +1 -0
  65. package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.mjs +61 -0
  66. package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.mjs.map +1 -0
  67. package/dist/components/FormKeyValueTable/FormKeyValueTable.d.ts +49 -0
  68. package/dist/components/FormKeyValueTable/FormKeyValueTable.d.ts.map +1 -0
  69. package/dist/components/FormKeyValueTable/FormKeyValueTable.mjs +202 -0
  70. package/dist/components/FormKeyValueTable/FormKeyValueTable.mjs.map +1 -0
  71. package/dist/components/FormOnChange/FormOnChange.d.ts +12 -0
  72. package/dist/components/FormOnChange/FormOnChange.d.ts.map +1 -0
  73. package/dist/components/FormOnChange/FormOnChange.mjs +33 -0
  74. package/dist/components/FormOnChange/FormOnChange.mjs.map +1 -0
  75. package/dist/components/FormRadio/FormRadio.d.ts +19 -0
  76. package/dist/components/FormRadio/FormRadio.d.ts.map +1 -0
  77. package/dist/components/FormRadio/FormRadio.mjs +57 -0
  78. package/dist/components/FormRadio/FormRadio.mjs.map +1 -0
  79. package/dist/components/FormRadio/FormRadio.stories.d.ts +7 -0
  80. package/dist/components/FormRadio/FormRadio.stories.d.ts.map +1 -0
  81. package/dist/components/FormSelect/FormSelect.d.ts +43 -0
  82. package/dist/components/FormSelect/FormSelect.d.ts.map +1 -0
  83. package/dist/components/FormSelect/FormSelect.mjs +257 -0
  84. package/dist/components/FormSelect/FormSelect.mjs.map +1 -0
  85. package/dist/components/FormSelect/FormSelect.stories.d.ts +10 -0
  86. package/dist/components/FormSelect/FormSelect.stories.d.ts.map +1 -0
  87. package/dist/components/FormTextarea/FormTextarea.d.ts +40 -0
  88. package/dist/components/FormTextarea/FormTextarea.d.ts.map +1 -0
  89. package/dist/components/FormTextarea/FormTextarea.mjs +122 -0
  90. package/dist/components/FormTextarea/FormTextarea.mjs.map +1 -0
  91. package/dist/components/FormTextarea/FormTextarea.stories.d.ts +9 -0
  92. package/dist/components/FormTextarea/FormTextarea.stories.d.ts.map +1 -0
  93. package/dist/components/FormToggle/FormToggle.d.ts +18 -0
  94. package/dist/components/FormToggle/FormToggle.d.ts.map +1 -0
  95. package/dist/components/FormToggle/FormToggle.mjs +48 -0
  96. package/dist/components/FormToggle/FormToggle.mjs.map +1 -0
  97. package/dist/components/Modal/Modal.d.ts +29 -0
  98. package/dist/components/Modal/Modal.d.ts.map +1 -0
  99. package/dist/components/Modal/Modal.mjs +71 -0
  100. package/dist/components/Modal/Modal.mjs.map +1 -0
  101. package/dist/components/PopUpDialog/PopUpDialog.d.ts +28 -0
  102. package/dist/components/PopUpDialog/PopUpDialog.d.ts.map +1 -0
  103. package/dist/components/PopUpDialog/PopUpDialog.mjs +90 -0
  104. package/dist/components/PopUpDialog/PopUpDialog.mjs.map +1 -0
  105. package/dist/components/RoundedIcon/RoundedIcon.d.ts +23 -0
  106. package/dist/components/RoundedIcon/RoundedIcon.d.ts.map +1 -0
  107. package/dist/components/RoundedIcon/RoundedIcon.mjs +40 -0
  108. package/dist/components/RoundedIcon/RoundedIcon.mjs.map +1 -0
  109. package/dist/components/RoundedIcon/RoundedIcon.stories.d.ts +9 -0
  110. package/dist/components/RoundedIcon/RoundedIcon.stories.d.ts.map +1 -0
  111. package/dist/components/Tip/Tip.d.ts +14 -0
  112. package/dist/components/Tip/Tip.d.ts.map +1 -0
  113. package/dist/components/Tip/Tip.mjs +67 -0
  114. package/dist/components/Tip/Tip.mjs.map +1 -0
  115. package/dist/components/Tip/Tip.stories.d.ts +7 -0
  116. package/dist/components/Tip/Tip.stories.d.ts.map +1 -0
  117. package/dist/components/Tooltip/Tooltip.d.ts +22 -0
  118. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
  119. package/dist/components/Tooltip/Tooltip.mjs +136 -0
  120. package/dist/components/Tooltip/Tooltip.mjs.map +1 -0
  121. package/dist/components/Tooltip/Tooltip.stories.d.ts +8 -0
  122. package/dist/components/Tooltip/Tooltip.stories.d.ts.map +1 -0
  123. package/dist/components/TooltipTemplate/ProducerTooltipTemplate.d.ts +12 -0
  124. package/dist/components/TooltipTemplate/ProducerTooltipTemplate.d.ts.map +1 -0
  125. package/dist/components/TooltipTemplate/TextTooltipTemplate.d.ts +12 -0
  126. package/dist/components/TooltipTemplate/TextTooltipTemplate.d.ts.map +1 -0
  127. package/dist/components/TooltipTemplate/TextTooltipTemplate.mjs +21 -0
  128. package/dist/components/TooltipTemplate/TextTooltipTemplate.mjs.map +1 -0
  129. package/dist/components/Wizard/Wizard.d.ts +33 -0
  130. package/dist/components/Wizard/Wizard.d.ts.map +1 -0
  131. package/dist/components/Wizard/Wizard.mjs +129 -0
  132. package/dist/components/Wizard/Wizard.mjs.map +1 -0
  133. package/dist/components/Wizard/WizardSteps/WizardSteps.d.ts +16 -0
  134. package/dist/components/Wizard/WizardSteps/WizardSteps.d.ts.map +1 -0
  135. package/dist/components/Wizard/WizardSteps/WizardSteps.mjs +41 -0
  136. package/dist/components/Wizard/WizardSteps/WizardSteps.mjs.map +1 -0
  137. package/dist/components/index.d.ts +21 -0
  138. package/dist/components/index.d.ts.map +1 -0
  139. package/dist/components/index.mjs +41 -0
  140. package/dist/components/index.mjs.map +1 -0
  141. package/dist/constants.d.ts +114 -0
  142. package/dist/constants.d.ts.map +1 -0
  143. package/dist/constants.mjs +44 -0
  144. package/dist/constants.mjs.map +1 -0
  145. package/dist/elements/FormActionButton/FormActionButton.d.ts +23 -0
  146. package/dist/elements/FormActionButton/FormActionButton.d.ts.map +1 -0
  147. package/dist/elements/FormActionButton/FormActionButton.mjs +43 -0
  148. package/dist/elements/FormActionButton/FormActionButton.mjs.map +1 -0
  149. package/dist/elements/FormRowActions/FormRowActions.d.ts +27 -0
  150. package/dist/elements/FormRowActions/FormRowActions.d.ts.map +1 -0
  151. package/dist/elements/FormRowActions/FormRowActions.mjs +87 -0
  152. package/dist/elements/FormRowActions/FormRowActions.mjs.map +1 -0
  153. package/dist/elements/OptionsMenu/OptionsMenu.d.ts +18 -0
  154. package/dist/elements/OptionsMenu/OptionsMenu.d.ts.map +1 -0
  155. package/dist/elements/OptionsMenu/OptionsMenu.mjs +47 -0
  156. package/dist/elements/OptionsMenu/OptionsMenu.mjs.map +1 -0
  157. package/dist/elements/SelectOption/SelectOption.d.ts +20 -0
  158. package/dist/elements/SelectOption/SelectOption.d.ts.map +1 -0
  159. package/dist/elements/SelectOption/SelectOption.mjs +84 -0
  160. package/dist/elements/SelectOption/SelectOption.mjs.map +1 -0
  161. package/dist/elements/ValidationTemplate/ValidationTemplate.d.ts +12 -0
  162. package/dist/elements/ValidationTemplate/ValidationTemplate.d.ts.map +1 -0
  163. package/dist/elements/ValidationTemplate/ValidationTemplate.mjs +22 -0
  164. package/dist/elements/ValidationTemplate/ValidationTemplate.mjs.map +1 -0
  165. package/dist/elements/index.d.ts +7 -0
  166. package/dist/elements/index.d.ts.map +1 -0
  167. package/dist/elements/index.mjs +13 -0
  168. package/dist/elements/index.mjs.map +1 -0
  169. package/dist/hooks/index.d.ts +6 -0
  170. package/dist/hooks/index.d.ts.map +1 -0
  171. package/dist/hooks/index.mjs +13 -0
  172. package/dist/hooks/index.mjs.map +1 -0
  173. package/dist/hooks/useChipCell.hook.d.ts +13 -0
  174. package/dist/hooks/useChipCell.hook.d.ts.map +1 -0
  175. package/dist/hooks/useChipCell.hook.mjs +58 -0
  176. package/dist/hooks/useChipCell.hook.mjs.map +1 -0
  177. package/dist/hooks/useDebounce.hook.d.ts +2 -0
  178. package/dist/hooks/useDebounce.hook.d.ts.map +1 -0
  179. package/dist/hooks/useDebounce.hook.mjs +19 -0
  180. package/dist/hooks/useDebounce.hook.mjs.map +1 -0
  181. package/dist/hooks/useDetectOutsideClick.hook.d.ts +2 -0
  182. package/dist/hooks/useDetectOutsideClick.hook.d.ts.map +1 -0
  183. package/dist/hooks/useDetectOutsideClick.hook.mjs +15 -0
  184. package/dist/hooks/useDetectOutsideClick.hook.mjs.map +1 -0
  185. package/dist/hooks/useFormTable.hook.d.ts +16 -0
  186. package/dist/hooks/useFormTable.hook.d.ts.map +1 -0
  187. package/dist/hooks/useFormTable.hook.mjs +128 -0
  188. package/dist/hooks/useFormTable.hook.mjs.map +1 -0
  189. package/dist/hooks/useHiddenChipsBlock.hook.d.ts +4 -0
  190. package/dist/hooks/useHiddenChipsBlock.hook.d.ts.map +1 -0
  191. package/dist/hooks/useHiddenChipsBlock.hook.mjs +51 -0
  192. package/dist/hooks/useHiddenChipsBlock.hook.mjs.map +1 -0
  193. package/dist/images/add.svg.mjs +6 -0
  194. package/dist/images/add.svg.mjs.map +1 -0
  195. package/dist/images/alerts-icon.svg +3 -0
  196. package/dist/images/arrow.svg.mjs +6 -0
  197. package/dist/images/arrow.svg.mjs.map +1 -0
  198. package/dist/images/back-arrow.svg.mjs +6 -0
  199. package/dist/images/back-arrow.svg.mjs.map +1 -0
  200. package/dist/images/checkmark.svg.mjs +6 -0
  201. package/dist/images/checkmark.svg.mjs.map +1 -0
  202. package/dist/images/checkmark2.svg.mjs +6 -0
  203. package/dist/images/checkmark2.svg.mjs.map +1 -0
  204. package/dist/images/close.svg.mjs +6 -0
  205. package/dist/images/close.svg.mjs.map +1 -0
  206. package/dist/images/delete.svg.mjs +6 -0
  207. package/dist/images/delete.svg.mjs.map +1 -0
  208. package/dist/images/documents-icon.svg +3 -0
  209. package/dist/images/dropdown.svg.mjs +6 -0
  210. package/dist/images/dropdown.svg.mjs.map +1 -0
  211. package/dist/images/edit.svg.mjs +6 -0
  212. package/dist/images/edit.svg.mjs.map +1 -0
  213. package/dist/images/exclamation-mark.svg.mjs +6 -0
  214. package/dist/images/exclamation-mark.svg.mjs.map +1 -0
  215. package/dist/images/llm-prompt-icon.svg +3 -0
  216. package/dist/images/mlrun-api-gateways.svg +8 -0
  217. package/dist/images/mlrun-artifacts.svg +11 -0
  218. package/dist/images/mlrun-datasets.svg +5 -0
  219. package/dist/images/mlrun-feature-store.svg +10 -0
  220. package/dist/images/mlrun-jobs-and-workflows.svg +5 -0
  221. package/dist/images/mlrun-ml-functions.svg +8 -0
  222. package/dist/images/mlrun-models.svg +5 -0
  223. package/dist/images/mlrun-project-home.svg +5 -0
  224. package/dist/images/mlrun-project-monitoring.svg +9 -0
  225. package/dist/images/mlrun-project-settings.svg +5 -0
  226. package/dist/images/mlrun-realtime-functions.svg +8 -0
  227. package/dist/images/model-monitoring.svg +3 -0
  228. package/dist/images/navbar/model-monitoring.svg +3 -0
  229. package/dist/images/plus.svg.mjs +6 -0
  230. package/dist/images/plus.svg.mjs.map +1 -0
  231. package/dist/images/popout.svg.mjs +6 -0
  232. package/dist/images/popout.svg.mjs.map +1 -0
  233. package/dist/images/question-mark.svg.mjs +6 -0
  234. package/dist/images/question-mark.svg.mjs.map +1 -0
  235. package/dist/images/range-arrow-small.svg.mjs +6 -0
  236. package/dist/images/range-arrow-small.svg.mjs.map +1 -0
  237. package/dist/images/search.svg.mjs +6 -0
  238. package/dist/images/search.svg.mjs.map +1 -0
  239. package/dist/images/success_done.svg.mjs +6 -0
  240. package/dist/images/success_done.svg.mjs.map +1 -0
  241. package/dist/images/warning.svg.mjs +6 -0
  242. package/dist/images/warning.svg.mjs.map +1 -0
  243. package/dist/index.css +1 -0
  244. package/dist/index.d.ts +8 -0
  245. package/dist/index.d.ts.map +1 -0
  246. package/dist/index.mjs +15 -0
  247. package/dist/index.mjs.map +1 -0
  248. package/dist/robots.txt +3 -0
  249. package/dist/scss/borders.scss +22 -22
  250. package/dist/scss/colors.scss +0 -11
  251. package/dist/scss/common.scss +48 -33
  252. package/dist/scss/fonts.scss +6 -0
  253. package/dist/scss/mixins.scss +117 -106
  254. package/dist/scss/shadows.scss +12 -12
  255. package/dist/scss/variables.scss +3 -3
  256. package/dist/types.d.ts +25 -0
  257. package/dist/types.d.ts.map +1 -0
  258. package/dist/types.mjs +143 -0
  259. package/dist/types.mjs.map +1 -0
  260. package/dist/utils/common.util.d.ts +10 -0
  261. package/dist/utils/common.util.d.ts.map +1 -0
  262. package/dist/utils/common.util.mjs +60 -0
  263. package/dist/utils/common.util.mjs.map +1 -0
  264. package/dist/utils/form.util.d.ts +11 -0
  265. package/dist/utils/form.util.d.ts.map +1 -0
  266. package/dist/utils/form.util.mjs +26 -0
  267. package/dist/utils/form.util.mjs.map +1 -0
  268. package/dist/utils/generateChipsList.util.d.ts +10 -0
  269. package/dist/utils/generateChipsList.util.d.ts.map +1 -0
  270. package/dist/utils/generateChipsList.util.mjs +19 -0
  271. package/dist/utils/generateChipsList.util.mjs.map +1 -0
  272. package/dist/utils/getFirstScrollableParent.util.d.ts +2 -0
  273. package/dist/utils/getFirstScrollableParent.util.d.ts.map +1 -0
  274. package/dist/utils/getFirstScrollableParent.util.mjs +5 -0
  275. package/dist/utils/getFirstScrollableParent.util.mjs.map +1 -0
  276. package/dist/utils/index.d.ts +7 -0
  277. package/dist/utils/index.d.ts.map +1 -0
  278. package/dist/utils/index.mjs +15 -0
  279. package/dist/utils/index.mjs.map +1 -0
  280. package/dist/utils/math.util.d.ts +2 -0
  281. package/dist/utils/math.util.d.ts.map +1 -0
  282. package/dist/utils/math.util.mjs +18 -0
  283. package/dist/utils/math.util.mjs.map +1 -0
  284. package/dist/utils/validation.util.d.ts +6 -0
  285. package/dist/utils/validation.util.d.ts.map +1 -0
  286. package/dist/utils/validation.util.mjs +306 -0
  287. package/dist/utils/validation.util.mjs.map +1 -0
  288. package/package.json +48 -38
  289. package/dist/components/Backdrop/Backdrop.js +0 -56
  290. package/dist/components/Backdrop/Backdrop.scss +0 -32
  291. package/dist/components/Button/Button.js +0 -73
  292. package/dist/components/Button/Button.scss +0 -171
  293. package/dist/components/ConfirmDialog/ConfirmDialog.js +0 -101
  294. package/dist/components/ConfirmDialog/confirmDialog.scss +0 -23
  295. package/dist/components/FormCheckBox/FormCheckBox.js +0 -82
  296. package/dist/components/FormCheckBox/formCheckBox.scss +0 -91
  297. package/dist/components/FormChipCell/FormChip/FormChip.js +0 -103
  298. package/dist/components/FormChipCell/FormChip/formChip.scss +0 -68
  299. package/dist/components/FormChipCell/FormChipCell.js +0 -339
  300. package/dist/components/FormChipCell/FormChipCellView.js +0 -190
  301. package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.js +0 -107
  302. package/dist/components/FormChipCell/NewChipForm/NewChipForm.js +0 -353
  303. package/dist/components/FormChipCell/NewChipForm/newChipForm.scss +0 -81
  304. package/dist/components/FormChipCell/NewChipInput/NewChipInput.js +0 -71
  305. package/dist/components/FormChipCell/formChipCell.scss +0 -64
  306. package/dist/components/FormChipCell/formChipCell.util.js +0 -52
  307. package/dist/components/FormCombobox/FormCombobox.js +0 -432
  308. package/dist/components/FormCombobox/formCombobox.scss +0 -134
  309. package/dist/components/FormInput/FormInput.js +0 -408
  310. package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.js +0 -91
  311. package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.scss +0 -123
  312. package/dist/components/FormInput/formInput.scss +0 -76
  313. package/dist/components/FormKeyValueTable/FormKeyValueTable.js +0 -221
  314. package/dist/components/FormOnChange/FormOnChange.js +0 -69
  315. package/dist/components/FormRadio/FormRadio.js +0 -85
  316. package/dist/components/FormRadio/FormRadio.scss +0 -41
  317. package/dist/components/FormSelect/FormSelect.js +0 -353
  318. package/dist/components/FormSelect/FormSelect.test.js +0 -138
  319. package/dist/components/FormSelect/formSelect.scss +0 -97
  320. package/dist/components/FormTextarea/FormTextarea.js +0 -184
  321. package/dist/components/FormTextarea/formTextarea.scss +0 -32
  322. package/dist/components/FormToggle/FormToggle.js +0 -82
  323. package/dist/components/FormToggle/formToggle.scss +0 -58
  324. package/dist/components/Modal/Modal.js +0 -116
  325. package/dist/components/Modal/Modal.scss +0 -149
  326. package/dist/components/PopUpDialog/PopUpDialog.js +0 -171
  327. package/dist/components/PopUpDialog/popUpDialog.scss +0 -83
  328. package/dist/components/RoundedIcon/RoundedIcon.js +0 -72
  329. package/dist/components/RoundedIcon/roundedIcon.scss +0 -57
  330. package/dist/components/Tip/Tip.js +0 -116
  331. package/dist/components/Tip/Tip.test.js +0 -64
  332. package/dist/components/Tip/tip.scss +0 -94
  333. package/dist/components/Tooltip/Tooltip.js +0 -180
  334. package/dist/components/Tooltip/Tooltip.test.js +0 -155
  335. package/dist/components/Tooltip/tooltip.scss +0 -29
  336. package/dist/components/TooltipTemplate/ProducerTooltipTemplate.js +0 -53
  337. package/dist/components/TooltipTemplate/TextTooltipTemplate.js +0 -53
  338. package/dist/components/TooltipTemplate/producerTooltipTemplate.scss +0 -23
  339. package/dist/components/TooltipTemplate/textTooltipTemplate.scss +0 -21
  340. package/dist/components/Wizard/Wizard.js +0 -192
  341. package/dist/components/Wizard/Wizard.scss +0 -53
  342. package/dist/components/Wizard/WizardSteps/WizardSteps.js +0 -74
  343. package/dist/components/Wizard/WizardSteps/WizardSteps.scss +0 -108
  344. package/dist/components/index.js +0 -139
  345. package/dist/constants.js +0 -120
  346. package/dist/elements/FormActionButton/FormActionButton.js +0 -64
  347. package/dist/elements/FormRowActions/FormRowActions.js +0 -99
  348. package/dist/elements/OptionsMenu/OptionsMenu.js +0 -75
  349. package/dist/elements/OptionsMenu/optionsMenu.scss +0 -45
  350. package/dist/elements/SelectOption/SelectOption.js +0 -107
  351. package/dist/elements/SelectOption/SelectOption.test.js +0 -98
  352. package/dist/elements/SelectOption/selectOption.scss +0 -98
  353. package/dist/elements/ValidationTemplate/ValidationTemplate.js +0 -56
  354. package/dist/elements/ValidationTemplate/ValidationTemplate.scss +0 -36
  355. package/dist/elements/index.js +0 -41
  356. package/dist/hooks/index.js +0 -40
  357. package/dist/hooks/useChipCell.hook.js +0 -129
  358. package/dist/hooks/useDebounce.hook.js +0 -52
  359. package/dist/hooks/useDetectOutsideClick.hook.js +0 -47
  360. package/dist/hooks/useFormTable.hook.js +0 -224
  361. package/dist/hooks/useHiddenChipsBlock.hook.js +0 -102
  362. package/dist/index.js +0 -18
  363. package/dist/types.js +0 -127
  364. package/dist/utils/common.util.js +0 -130
  365. package/dist/utils/form.util.js +0 -70
  366. package/dist/utils/generateChipsList.util.js +0 -39
  367. package/dist/utils/getFirstScrollableParent.util.js +0 -49
  368. package/dist/utils/math.util.js +0 -44
  369. package/dist/utils/validation.util.js +0 -401
@@ -1,353 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _classnames = _interopRequireDefault(require("classnames"));
10
- var _lodash = require("lodash");
11
- var _NewChipInput = _interopRequireDefault(require("../NewChipInput/NewChipInput"));
12
- var _OptionsMenu = _interopRequireDefault(require("../../../elements/OptionsMenu/OptionsMenu"));
13
- var _ValidationTemplate = _interopRequireDefault(require("../../../elements/ValidationTemplate/ValidationTemplate"));
14
- var _types = require("../../../types");
15
- var _constants = require("../../../constants");
16
- var _formChipCell = require("../formChipCell.util");
17
- var _common = require("../../../utils/common.util");
18
- var _close = require("../../../images/close.svg");
19
- require("./newChipForm.scss");
20
- var _jsxRuntime = require("react/jsx-runtime");
21
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
23
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24
- /*
25
- Copyright 2022 Iguazio Systems Ltd.
26
- Licensed under the Apache License, Version 2.0 (the "License") with
27
- an addition restriction as set forth herein. You may not use this
28
- file except in compliance with the License. You may obtain a copy of
29
- the License at http://www.apache.org/licenses/LICENSE-2.0.
30
- Unless required by applicable law or agreed to in writing, software
31
- distributed under the License is distributed on an "AS IS" BASIS,
32
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
33
- implied. See the License for the specific language governing
34
- permissions and limitations under the License.
35
- In addition, you may not use the software for any purposes that are
36
- illegal under applicable law, and the grant of the foregoing license
37
- under the Apache 2.0 license is conditioned upon your compliance with
38
- such restriction.
39
- */
40
-
41
- const defaultProps = {
42
- rules: {}
43
- };
44
- const NewChipForm = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
45
- let {
46
- chip,
47
- chipIndex,
48
- chipOptions,
49
- className = '',
50
- editConfig,
51
- handleRemoveChip,
52
- isEditable,
53
- keyName,
54
- meta,
55
- onChange,
56
- setEditConfig,
57
- validationRules: rules = defaultProps.rules,
58
- valueName
59
- } = _ref;
60
- const [chipData, setChipData] = (0, _react.useState)({
61
- isKeyOnly: chip.isKeyOnly,
62
- key: chip.key,
63
- value: chip.value,
64
- keyFieldWidth: 0,
65
- valueFieldWidth: 0
66
- });
67
- const [selectedInput, setSelectedInput] = (0, _react.useState)('key');
68
- const [validationRules, setValidationRules] = (0, _react.useState)(rules);
69
- const [showValidationRules, setShowValidationRules] = (0, _react.useState)(false);
70
- const {
71
- background,
72
- borderColor,
73
- borderRadius,
74
- density,
75
- font
76
- } = chipOptions;
77
- const minWidthInput = (0, _react.useMemo)(() => {
78
- return isEditable ? 25 : 20;
79
- }, [isEditable]);
80
- const minWidthValueInput = (0, _react.useMemo)(() => {
81
- return isEditable ? 35 : 20;
82
- }, [isEditable]);
83
- const transitionEndEventName = (0, _react.useMemo)(() => (0, _common.getTransitionEndEventName)(), []);
84
- const refInputKey = _react.default.useRef({});
85
- const refInputValue = _react.default.useRef({});
86
- const refInputContainer = _react.default.useRef();
87
- const validationRulesRef = _react.default.useRef();
88
- const labelKeyClassName = (0, _classnames.default)(className, !editConfig.isKeyFocused && 'item_edited', !(0, _lodash.isEmpty)((0, _lodash.get)(meta, ['error', chipIndex, 'key'], [])) && !(0, _lodash.isEmpty)(chipData.key) && !chip.disabled && 'item_edited_invalid');
89
- const labelContainerClassName = (0, _classnames.default)('edit-chip-container', background && `edit-chip-container-background_${background}`, borderColor && `edit-chip-container-border_${borderColor}`, font && `edit-chip-container-font_${font}`, density && `edit-chip-container-density_${density}`, borderRadius && `edit-chip-container-border_${borderRadius}`, (editConfig.isEdit || editConfig.isNewChip) && 'edit-chip-container_edited', chip.disabled && 'edit-chip-container_disabled edit-chip-container-font_disabled');
90
- const labelValueClassName = (0, _classnames.default)('input-label-value', !editConfig.isValueFocused && 'item_edited', !(0, _lodash.isEmpty)((0, _lodash.get)(meta, ['error', chipIndex, 'value'], [])) && !(0, _lodash.isEmpty)(chipData.value) && 'item_edited_invalid');
91
- const closeButtonClass = (0, _classnames.default)('item-icon-close', !chip.disabled && editConfig.chipIndex === chipIndex && isEditable && 'item-icon-close_invisible', !isEditable && 'item-icon-close_hidden');
92
- const resizeChip = (0, _react.useCallback)(() => {
93
- if (refInputKey.current) {
94
- const currentWidthKeyInput = (0, _formChipCell.getTextWidth)(refInputKey.current) + 1;
95
- const currentWidthValueInput = (0, _formChipCell.getTextWidth)(refInputValue.current) + 1;
96
- const maxWidthInput = ref.current?.clientWidth - 50;
97
- const keyEllipsis = currentWidthKeyInput >= maxWidthInput / 2;
98
- const valueEllipsis = currentWidthValueInput >= maxWidthInput / 2;
99
- let keyFieldWidth = null;
100
- let valueFieldWidth = null;
101
- if (keyEllipsis && valueEllipsis) {
102
- keyFieldWidth = valueFieldWidth = maxWidthInput / 2;
103
- } else if (keyEllipsis) {
104
- valueFieldWidth = !chipData.value ? minWidthValueInput : currentWidthValueInput;
105
- const remainingPlace = maxWidthInput - valueFieldWidth;
106
- keyFieldWidth = remainingPlace > currentWidthKeyInput ? currentWidthKeyInput : remainingPlace;
107
- } else if (valueEllipsis) {
108
- keyFieldWidth = !chipData.key ? minWidthInput : currentWidthKeyInput;
109
- const remainingPlace = maxWidthInput - keyFieldWidth;
110
- valueFieldWidth = remainingPlace > currentWidthValueInput ? currentWidthValueInput : remainingPlace;
111
- } else {
112
- keyFieldWidth = !chipData.key || currentWidthKeyInput <= minWidthInput ? minWidthInput : currentWidthKeyInput;
113
- valueFieldWidth = !chipData.value || currentWidthValueInput <= minWidthValueInput ? minWidthValueInput : currentWidthValueInput;
114
- }
115
- refInputKey.current.style.width = `${keyFieldWidth}px`;
116
- if (!(0, _lodash.isEmpty)(refInputValue.current)) {
117
- refInputValue.current.style.width = `${valueFieldWidth}px`;
118
- }
119
- setChipData(prevState => ({
120
- ...prevState,
121
- keyFieldWidth,
122
- valueFieldWidth
123
- }));
124
- }
125
- }, [chipData.key, chipData.value, minWidthInput, minWidthValueInput, ref]);
126
- (0, _react.useEffect)(() => {
127
- const resizeChipDebounced = (0, _lodash.throttle)(resizeChip, 500);
128
- if (isEditable) {
129
- window.addEventListener('resize', resizeChipDebounced);
130
- window.addEventListener(transitionEndEventName, resizeChipDebounced);
131
- return () => {
132
- window.removeEventListener('resize', resizeChipDebounced);
133
- window.removeEventListener(transitionEndEventName, resizeChipDebounced);
134
- };
135
- }
136
- }, [isEditable, resizeChip, transitionEndEventName]);
137
- (0, _react.useEffect)(() => {
138
- if (!chipData.keyFieldWidth && !chipData.valueFieldWidth) {
139
- resizeChip();
140
- }
141
- }, [chipData.keyFieldWidth, chipData.valueFieldWidth, resizeChip]);
142
- (0, _react.useEffect)(() => {
143
- if (showValidationRules) {
144
- window.addEventListener('scroll', handleScroll, true);
145
- }
146
- return () => {
147
- window.removeEventListener('scroll', handleScroll, true);
148
- };
149
- }, [showValidationRules]);
150
- (0, _react.useEffect)(() => {
151
- if (editConfig.chipIndex === chipIndex) {
152
- if (editConfig.isKeyFocused) {
153
- refInputKey.current.focus();
154
- } else if (editConfig.isValueFocused) {
155
- refInputValue.current.focus();
156
- }
157
- }
158
- }, [editConfig.isKeyFocused, editConfig.isValueFocused, refInputKey, refInputValue, chipIndex, editConfig.chipIndex]);
159
- const outsideClick = (0, _react.useCallback)((event, forceOutsideClick) => {
160
- if (editConfig.chipIndex === chipIndex) {
161
- const elementPath = event.path ?? event.composedPath?.();
162
- if (!elementPath.includes(refInputContainer.current) || forceOutsideClick) {
163
- onChange(event, _constants.CLICK, true);
164
- window.getSelection().removeAllRanges();
165
- document.activeElement.blur();
166
- } else {
167
- event.stopPropagation();
168
- }
169
- }
170
- }, [onChange, refInputContainer, chipIndex, editConfig.chipIndex]);
171
- const handleScroll = (0, _react.useCallback)(event => {
172
- if (validationRulesRef?.current && !validationRulesRef.current.contains(event.target)) {
173
- setShowValidationRules(false);
174
- outsideClick(event, true);
175
- }
176
- }, [outsideClick]);
177
- (0, _react.useEffect)(() => {
178
- if (showValidationRules) {
179
- window.addEventListener('scroll', handleScroll, true);
180
- }
181
- return () => {
182
- window.removeEventListener('scroll', handleScroll, true);
183
- };
184
- }, [handleScroll, showValidationRules]);
185
- (0, _react.useEffect)(() => {
186
- if (editConfig.isEdit) {
187
- document.addEventListener('click', outsideClick, true);
188
- return () => {
189
- document.removeEventListener('click', outsideClick, true);
190
- };
191
- }
192
- }, [outsideClick, editConfig.isEdit]);
193
- const focusChip = (0, _react.useCallback)(event => {
194
- if (editConfig.chipIndex === chipIndex && isEditable) {
195
- if (!event.shiftKey && event.key === _constants.TAB && editConfig.isValueFocused) {
196
- return onChange(event, _constants.TAB);
197
- } else if (event.shiftKey && event.key === _constants.TAB && editConfig.isKeyFocused) {
198
- return onChange(event, _constants.TAB_SHIFT);
199
- }
200
- }
201
- event.stopPropagation();
202
- }, [editConfig, onChange, chipIndex, isEditable]);
203
- const handleOnFocus = (0, _react.useCallback)(event => {
204
- const isKeyFocused = event.target.name === keyName;
205
- if (editConfig.chipIndex === chipIndex) {
206
- if (isKeyFocused) {
207
- refInputKey.current.selectionStart = refInputKey.current.selectionEnd;
208
- setEditConfig(prevConfig => ({
209
- ...prevConfig,
210
- isKeyFocused: true,
211
- isValueFocused: false
212
- }));
213
- } else {
214
- refInputValue.current.selectionStart = refInputValue.current.selectionEnd;
215
- setEditConfig(prevConfig => ({
216
- ...prevConfig,
217
- isKeyFocused: false,
218
- isValueFocused: true
219
- }));
220
- }
221
- event && event.stopPropagation();
222
- } else if ((0, _lodash.isNil)(editConfig.chipIndex)) {
223
- if (isKeyFocused) {
224
- refInputKey.current.selectionStart = refInputKey.current.selectionEnd;
225
- } else {
226
- refInputValue.current.selectionStart = refInputValue.current.selectionEnd;
227
- }
228
- setEditConfig({
229
- chipIndex,
230
- isEdit: true,
231
- isKeyFocused: isKeyFocused,
232
- isValueFocused: !isKeyFocused
233
- });
234
- }
235
- }, [keyName, refInputKey, refInputValue, setEditConfig, editConfig.chipIndex, chipIndex]);
236
- const handleOnChange = (0, _react.useCallback)(event => {
237
- const maxWidthInput = ref.current?.clientWidth - 50;
238
- event.preventDefault();
239
- if (event.target.name === keyName) {
240
- const currentWidthKeyInput = (0, _formChipCell.getTextWidth)(refInputKey.current);
241
- setChipData(prevState => ({
242
- ...prevState,
243
- key: refInputKey.current.value,
244
- keyFieldWidth: refInputKey.current.value.length <= 1 ? minWidthInput : currentWidthKeyInput >= maxWidthInput ? maxWidthInput : currentWidthKeyInput > minWidthInput ? currentWidthKeyInput + 2 : minWidthInput
245
- }));
246
- } else {
247
- const currentWidthValueInput = (0, _formChipCell.getTextWidth)(refInputValue.current);
248
- setChipData(prevState => ({
249
- ...prevState,
250
- value: refInputValue.current.value,
251
- valueFieldWidth: refInputValue.current.value?.length <= 1 ? minWidthValueInput : currentWidthValueInput >= maxWidthInput ? maxWidthInput : currentWidthValueInput > minWidthValueInput ? currentWidthValueInput + 2 : minWidthValueInput
252
- }));
253
- }
254
- }, [keyName, minWidthInput, ref, minWidthValueInput]);
255
- (0, _react.useLayoutEffect)(() => {
256
- if (editConfig.chipIndex === chipIndex) {
257
- setSelectedInput(editConfig.isKeyFocused ? 'key' : editConfig.isValueFocused ? 'value' : null);
258
- }
259
- }, [editConfig.isKeyFocused, editConfig.isValueFocused, editConfig.chipIndex, chipIndex]);
260
- (0, _react.useEffect)(() => {
261
- if (meta.valid && showValidationRules) {
262
- setShowValidationRules(false);
263
- }
264
- }, [meta.valid, showValidationRules]);
265
- (0, _react.useEffect)(() => {
266
- if (meta.error) {
267
- setValidationRules(prevState => {
268
- return {
269
- ...prevState,
270
- [selectedInput]: prevState[selectedInput]?.map(rule => {
271
- return {
272
- ...rule,
273
- isValid: (0, _lodash.isEmpty)((0, _lodash.get)(meta, ['error', editConfig.chipIndex, selectedInput], [])) ? true : !meta.error[editConfig.chipIndex][selectedInput].some(err => err && err.name === rule.name)
274
- };
275
- })
276
- };
277
- });
278
- !showValidationRules && setShowValidationRules(true);
279
- }
280
- }, [meta, showValidationRules, selectedInput, editConfig.chipIndex]);
281
- const getValidationRules = (0, _react.useCallback)(() => {
282
- return validationRules[selectedInput]?.map(_ref2 => {
283
- let {
284
- isValid = false,
285
- label,
286
- name
287
- } = _ref2;
288
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ValidationTemplate.default, {
289
- valid: isValid,
290
- validationMessage: label
291
- }, name);
292
- });
293
- }, [selectedInput, validationRules]);
294
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
295
- className: labelContainerClassName,
296
- onKeyDown: event => !chip.disabled && editConfig.isEdit && focusChip(event),
297
- ref: refInputContainer,
298
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_NewChipInput.default, {
299
- className: labelKeyClassName,
300
- disabled: chip.disabled || !isEditable || !(0, _lodash.isNil)(editConfig.chipIndex) && editConfig.chipIndex !== chipIndex,
301
- name: keyName,
302
- onChange: handleOnChange,
303
- onFocus: handleOnFocus,
304
- placeholder: "key",
305
- ref: refInputKey,
306
- style: {
307
- width: chipData.keyFieldWidth
308
- }
309
- }), !chipData.isKeyOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
310
- className: "edit-chip-separator",
311
- children: ":"
312
- }), !chipData.isKeyOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)(_NewChipInput.default, {
313
- className: labelValueClassName,
314
- disabled: chip.disabled || !isEditable || !(0, _lodash.isNil)(editConfig.chipIndex) && editConfig.chipIndex !== chipIndex,
315
- name: valueName,
316
- onChange: handleOnChange,
317
- onFocus: handleOnFocus,
318
- placeholder: "value",
319
- ref: refInputValue,
320
- style: {
321
- width: chipData.valueFieldWidth
322
- }
323
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
324
- disabled: chip.disabled,
325
- className: closeButtonClass,
326
- onClick: event => !chip.disabled && handleRemoveChip(event, chipIndex),
327
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_close.ReactComponent, {})
328
- }), !chip.disabled && (editConfig.isKeyFocused ? !(0, _lodash.isEmpty)(chipData.key) : !(0, _lodash.isEmpty)(chipData.value)) && editConfig.chipIndex === chipIndex && !(0, _lodash.isEmpty)((0, _lodash.get)(meta, ['error', editConfig.chipIndex, selectedInput], [])) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_OptionsMenu.default, {
329
- show: showValidationRules,
330
- ref: {
331
- refInputContainer,
332
- validationRulesRef
333
- },
334
- children: getValidationRules()
335
- })]
336
- });
337
- });
338
- NewChipForm.propTypes = {
339
- chip: _propTypes.default.object.isRequired,
340
- chipIndex: _propTypes.default.number.isRequired,
341
- chipOptions: _types.CHIP_OPTIONS.isRequired,
342
- className: _propTypes.default.string,
343
- editConfig: _propTypes.default.shape({}).isRequired,
344
- handleRemoveChip: _propTypes.default.func.isRequired,
345
- isEditable: _propTypes.default.bool.isRequired,
346
- keyName: _propTypes.default.string.isRequired,
347
- meta: _propTypes.default.object.isRequired,
348
- onChange: _propTypes.default.func.isRequired,
349
- setEditConfig: _propTypes.default.func.isRequired,
350
- validationRules: _propTypes.default.object,
351
- valueName: _propTypes.default.string.isRequired
352
- };
353
- var _default = exports.default = NewChipForm;
@@ -1,81 +0,0 @@
1
- @import '../../../scss/colors';
2
- @import '../../../scss/borders';
3
- @import '../../../scss/mixins';
4
-
5
- .edit-chip {
6
- &-container {
7
- display: inline-flex;
8
- max-width: 100%;
9
- margin: 2px 8px 2px 0;
10
- padding: 0 8px;
11
- font-size: 14px;
12
- line-height: 22px;
13
-
14
- input {
15
- display: flex;
16
- padding: 0;
17
- font-size: 14px;
18
- background-color: transparent;
19
- border: none;
20
-
21
- &[disabled] {
22
- pointer-events: none;
23
- }
24
-
25
- &.item_edited {
26
- &_invalid {
27
- color: $amaranth;
28
- }
29
- }
30
-
31
- &.input-label-key,
32
- &.input-label-value {
33
- &::placeholder {
34
- color: $topaz;
35
- }
36
- }
37
- }
38
-
39
- &-background {
40
- @include chipBackground(false);
41
- }
42
-
43
- &-border {
44
- @include chipBorder();
45
- }
46
-
47
- &-density {
48
- @include chipDensity(true, false);
49
- }
50
-
51
- &-font {
52
- @include chipsFont(EditableChip);
53
- }
54
-
55
- .item-icon-close {
56
- display: flex;
57
- align-items: center;
58
- justify-content: center;
59
-
60
- &_hidden {
61
- display: none;
62
- }
63
-
64
- &_invisible {
65
- visibility: hidden;
66
- }
67
-
68
- svg {
69
- transform: scale(0.7);
70
- }
71
- }
72
-
73
- &_disabled {
74
- cursor: not-allowed;
75
- }
76
- }
77
-
78
- &-separator {
79
- margin-right: 5px;
80
- }
81
- }
@@ -1,71 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _reactFinalForm = require("react-final-form");
10
- var _jsxRuntime = require("react/jsx-runtime");
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- /*
13
- Copyright 2022 Iguazio Systems Ltd.
14
- Licensed under the Apache License, Version 2.0 (the "License") with
15
- an addition restriction as set forth herein. You may not use this
16
- file except in compliance with the License. You may obtain a copy of
17
- the License at http://www.apache.org/licenses/LICENSE-2.0.
18
- Unless required by applicable law or agreed to in writing, software
19
- distributed under the License is distributed on an "AS IS" BASIS,
20
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
21
- implied. See the License for the specific language governing
22
- permissions and limitations under the License.
23
- In addition, you may not use the software for any purposes that are
24
- illegal under applicable law, and the grant of the foregoing license
25
- under the Apache 2.0 license is conditioned upon your compliance with
26
- such restriction.
27
- */
28
-
29
- const NewChipInput = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
30
- let {
31
- name,
32
- onChange,
33
- onFocus,
34
- ...inputProps
35
- } = _ref;
36
- const {
37
- input
38
- } = (0, _reactFinalForm.useField)(name);
39
- const handleInputChange = event => {
40
- input.onChange(event);
41
- onChange(event);
42
- };
43
- const handleInputFocus = event => {
44
- input.onFocus(event);
45
- onFocus(event);
46
- };
47
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
48
- name: name,
49
- children: _ref2 => {
50
- let {
51
- input
52
- } = _ref2;
53
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
54
- autoComplete: "off",
55
- "data-testid": "input",
56
- ref: ref,
57
- type: "text",
58
- ...inputProps,
59
- ...input,
60
- onChange: handleInputChange,
61
- onFocus: handleInputFocus
62
- });
63
- }
64
- });
65
- });
66
- NewChipInput.propTypes = {
67
- name: _propTypes.default.string.isRequired,
68
- onChange: _propTypes.default.func.isRequired,
69
- onFocus: _propTypes.default.func.isRequired
70
- };
71
- var _default = exports.default = NewChipInput;
@@ -1,64 +0,0 @@
1
- @import '../../scss/colors';
2
- @import '../../scss/borders';
3
- @import '../../scss/mixins';
4
-
5
- .chips {
6
- @include inputSelectField;
7
- height: auto;
8
-
9
- &__wrapper {
10
- padding: 12px 16px;
11
- }
12
-
13
- &-wrapper {
14
- display: flex;
15
- flex-flow: row wrap;
16
- align-items: center;
17
- }
18
-
19
- &-cell {
20
- display: flex;
21
- flex: 1;
22
- align-items: center;
23
- max-width: 100%;
24
-
25
- .fixed-max-width {
26
- max-width: 100%;
27
- }
28
-
29
- .chip {
30
- &-block {
31
- position: relative;
32
- max-width: 100%;
33
- }
34
- }
35
-
36
- .button-add {
37
- display: flex;
38
- align-items: center;
39
- justify-content: center;
40
- margin: 2px 0 2px 0;
41
- border-radius: 32px;
42
-
43
- &-background {
44
- @include chipBackground(true);
45
- }
46
-
47
- &_border {
48
- @include chipBorder();
49
- }
50
-
51
- &-density {
52
- @include chipDensity(false, true);
53
- }
54
-
55
- &-font {
56
- @include chipsFont(ButtonAddChip);
57
- }
58
- }
59
- }
60
-
61
- input:disabled {
62
- cursor: default;
63
- }
64
- }
@@ -1,52 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.uniquenessError = exports.getTextWidth = void 0;
7
- /*
8
- Copyright 2022 Iguazio Systems Ltd.
9
- Licensed under the Apache License, Version 2.0 (the "License") with
10
- an addition restriction as set forth herein. You may not use this
11
- file except in compliance with the License. You may obtain a copy of
12
- the License at http://www.apache.org/licenses/LICENSE-2.0.
13
- Unless required by applicable law or agreed to in writing, software
14
- distributed under the License is distributed on an "AS IS" BASIS,
15
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16
- implied. See the License for the specific language governing
17
- permissions and limitations under the License.
18
- In addition, you may not use the software for any purposes that are
19
- illegal under applicable law, and the grant of the foregoing license
20
- under the Apache 2.0 license is conditioned upon your compliance with
21
- such restriction.
22
- */
23
- const uniquenessError = exports.uniquenessError = {
24
- name: 'uniqueness',
25
- label: 'Key must be unique'
26
- };
27
- const getTextWidth = elementWithText => {
28
- if (!elementWithText) {
29
- return 0;
30
- }
31
- const hiddenElementId = 'chips-hidden-element';
32
- let hiddenElement = document.getElementById(hiddenElementId);
33
- if (!hiddenElement) {
34
- hiddenElement = document.createElement('span');
35
- const styles = {
36
- position: 'absolute',
37
- left: '-10000px',
38
- top: 'auto',
39
- visibility: 'hidden'
40
- };
41
- for (const [styleName, styleValue] of Object.entries(styles)) {
42
- hiddenElement.style[styleName] = styleValue;
43
- }
44
- hiddenElement.style.font = window.getComputedStyle(elementWithText).font;
45
- hiddenElement.id = hiddenElementId;
46
- hiddenElement.tabIndex = -1;
47
- document.body.append(hiddenElement);
48
- }
49
- hiddenElement.textContent = elementWithText.value;
50
- return hiddenElement.offsetWidth ?? 0;
51
- };
52
- exports.getTextWidth = getTextWidth;