iguazio.dashboard-react-controls 2.2.25 → 3.0.1
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.
- package/dist/components/Backdrop/Backdrop.d.ts +14 -0
- package/dist/components/Backdrop/Backdrop.d.ts.map +1 -0
- package/dist/components/Backdrop/Backdrop.mjs +29 -0
- package/dist/components/Backdrop/Backdrop.mjs.map +1 -0
- package/dist/components/Button/Button.d.ts +28 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.mjs +43 -0
- package/dist/components/Button/Button.mjs.map +1 -0
- package/dist/components/Button/Button.stories.d.ts +14 -0
- package/dist/components/Button/Button.stories.d.ts.map +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +33 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.mjs +83 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.mjs.map +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.stories.d.ts +8 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.stories.d.ts.map +1 -0
- package/dist/components/FormCheckBox/FormCheckBox.d.ts +21 -0
- package/dist/components/FormCheckBox/FormCheckBox.d.ts.map +1 -0
- package/dist/components/FormCheckBox/FormCheckBox.mjs +54 -0
- package/dist/components/FormCheckBox/FormCheckBox.mjs.map +1 -0
- package/dist/components/FormCheckBox/FormCheckbox.stories.d.ts +7 -0
- package/dist/components/FormCheckBox/FormCheckbox.stories.d.ts.map +1 -0
- package/dist/components/FormChipCell/FormChip/FormChip.d.ts +45 -0
- package/dist/components/FormChipCell/FormChip/FormChip.d.ts.map +1 -0
- package/dist/components/FormChipCell/FormChip/FormChip.mjs +78 -0
- package/dist/components/FormChipCell/FormChip/FormChip.mjs.map +1 -0
- package/dist/components/FormChipCell/FormChipCell.d.ts +44 -0
- package/dist/components/FormChipCell/FormChipCell.d.ts.map +1 -0
- package/dist/components/FormChipCell/FormChipCell.mjs +239 -0
- package/dist/components/FormChipCell/FormChipCell.mjs.map +1 -0
- package/dist/components/FormChipCell/FormChipCellView.d.ts +56 -0
- package/dist/components/FormChipCell/FormChipCellView.d.ts.map +1 -0
- package/dist/components/FormChipCell/FormChipCellView.mjs +169 -0
- package/dist/components/FormChipCell/FormChipCellView.mjs.map +1 -0
- package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.d.ts +22 -0
- package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.d.ts.map +1 -0
- package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.mjs +72 -0
- package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.mjs.map +1 -0
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.d.ts +35 -0
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.d.ts.map +1 -0
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.mjs +270 -0
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.mjs.map +1 -0
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.d.ts +16 -0
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.d.ts.map +1 -0
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.mjs +36 -0
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.mjs.map +1 -0
- package/dist/components/FormChipCell/formChipCell.util.d.ts +6 -0
- package/dist/components/FormChipCell/formChipCell.util.d.ts.map +1 -0
- package/dist/components/FormChipCell/formChipCell.util.mjs +24 -0
- package/dist/components/FormChipCell/formChipCell.util.mjs.map +1 -0
- package/dist/components/FormCombobox/FormCombobox.d.ts +56 -0
- package/dist/components/FormCombobox/FormCombobox.d.ts.map +1 -0
- package/dist/components/FormCombobox/FormCombobox.mjs +278 -0
- package/dist/components/FormCombobox/FormCombobox.mjs.map +1 -0
- package/dist/components/FormCombobox/FormCombobox.stories.d.ts +12 -0
- package/dist/components/FormCombobox/FormCombobox.stories.d.ts.map +1 -0
- package/dist/components/FormInput/FormInput.d.ts +3 -0
- package/dist/components/FormInput/FormInput.d.ts.map +1 -0
- package/dist/components/FormInput/FormInput.mjs +272 -0
- package/dist/components/FormInput/FormInput.mjs.map +1 -0
- package/dist/components/FormInput/FormInput.stories.d.ts +14 -0
- package/dist/components/FormInput/FormInput.stories.d.ts.map +1 -0
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.d.ts +20 -0
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.d.ts.map +1 -0
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.mjs +61 -0
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.mjs.map +1 -0
- package/dist/components/FormKeyValueTable/FormKeyValueTable.d.ts +49 -0
- package/dist/components/FormKeyValueTable/FormKeyValueTable.d.ts.map +1 -0
- package/dist/components/FormKeyValueTable/FormKeyValueTable.mjs +202 -0
- package/dist/components/FormKeyValueTable/FormKeyValueTable.mjs.map +1 -0
- package/dist/components/FormOnChange/FormOnChange.d.ts +12 -0
- package/dist/components/FormOnChange/FormOnChange.d.ts.map +1 -0
- package/dist/components/FormOnChange/FormOnChange.mjs +33 -0
- package/dist/components/FormOnChange/FormOnChange.mjs.map +1 -0
- package/dist/components/FormRadio/FormRadio.d.ts +19 -0
- package/dist/components/FormRadio/FormRadio.d.ts.map +1 -0
- package/dist/components/FormRadio/FormRadio.mjs +57 -0
- package/dist/components/FormRadio/FormRadio.mjs.map +1 -0
- package/dist/components/FormRadio/FormRadio.stories.d.ts +7 -0
- package/dist/components/FormRadio/FormRadio.stories.d.ts.map +1 -0
- package/dist/components/FormSelect/FormSelect.d.ts +43 -0
- package/dist/components/FormSelect/FormSelect.d.ts.map +1 -0
- package/dist/components/FormSelect/FormSelect.mjs +257 -0
- package/dist/components/FormSelect/FormSelect.mjs.map +1 -0
- package/dist/components/FormSelect/FormSelect.stories.d.ts +10 -0
- package/dist/components/FormSelect/FormSelect.stories.d.ts.map +1 -0
- package/dist/components/FormTextarea/FormTextarea.d.ts +40 -0
- package/dist/components/FormTextarea/FormTextarea.d.ts.map +1 -0
- package/dist/components/FormTextarea/FormTextarea.mjs +122 -0
- package/dist/components/FormTextarea/FormTextarea.mjs.map +1 -0
- package/dist/components/FormTextarea/FormTextarea.stories.d.ts +9 -0
- package/dist/components/FormTextarea/FormTextarea.stories.d.ts.map +1 -0
- package/dist/components/FormToggle/FormToggle.d.ts +18 -0
- package/dist/components/FormToggle/FormToggle.d.ts.map +1 -0
- package/dist/components/FormToggle/FormToggle.mjs +48 -0
- package/dist/components/FormToggle/FormToggle.mjs.map +1 -0
- package/dist/components/Modal/Modal.d.ts +29 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -0
- package/dist/components/Modal/Modal.mjs +71 -0
- package/dist/components/Modal/Modal.mjs.map +1 -0
- package/dist/components/PopUpDialog/PopUpDialog.d.ts +28 -0
- package/dist/components/PopUpDialog/PopUpDialog.d.ts.map +1 -0
- package/dist/components/PopUpDialog/PopUpDialog.mjs +90 -0
- package/dist/components/PopUpDialog/PopUpDialog.mjs.map +1 -0
- package/dist/components/RoundedIcon/RoundedIcon.d.ts +23 -0
- package/dist/components/RoundedIcon/RoundedIcon.d.ts.map +1 -0
- package/dist/components/RoundedIcon/RoundedIcon.mjs +40 -0
- package/dist/components/RoundedIcon/RoundedIcon.mjs.map +1 -0
- package/dist/components/RoundedIcon/RoundedIcon.stories.d.ts +9 -0
- package/dist/components/RoundedIcon/RoundedIcon.stories.d.ts.map +1 -0
- package/dist/components/Tip/Tip.d.ts +14 -0
- package/dist/components/Tip/Tip.d.ts.map +1 -0
- package/dist/components/Tip/Tip.mjs +67 -0
- package/dist/components/Tip/Tip.mjs.map +1 -0
- package/dist/components/Tip/Tip.stories.d.ts +7 -0
- package/dist/components/Tip/Tip.stories.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +22 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.mjs +136 -0
- package/dist/components/Tooltip/Tooltip.mjs.map +1 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +8 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts.map +1 -0
- package/dist/components/TooltipTemplate/ProducerTooltipTemplate.d.ts +12 -0
- package/dist/components/TooltipTemplate/ProducerTooltipTemplate.d.ts.map +1 -0
- package/dist/components/TooltipTemplate/TextTooltipTemplate.d.ts +12 -0
- package/dist/components/TooltipTemplate/TextTooltipTemplate.d.ts.map +1 -0
- package/dist/components/TooltipTemplate/TextTooltipTemplate.mjs +21 -0
- package/dist/components/TooltipTemplate/TextTooltipTemplate.mjs.map +1 -0
- package/dist/components/Wizard/Wizard.d.ts +33 -0
- package/dist/components/Wizard/Wizard.d.ts.map +1 -0
- package/dist/components/Wizard/Wizard.mjs +129 -0
- package/dist/components/Wizard/Wizard.mjs.map +1 -0
- package/dist/components/Wizard/WizardSteps/WizardSteps.d.ts +16 -0
- package/dist/components/Wizard/WizardSteps/WizardSteps.d.ts.map +1 -0
- package/dist/components/Wizard/WizardSteps/WizardSteps.mjs +41 -0
- package/dist/components/Wizard/WizardSteps/WizardSteps.mjs.map +1 -0
- package/dist/components/index.d.ts +21 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.mjs +41 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/constants.d.ts +114 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.mjs +44 -0
- package/dist/constants.mjs.map +1 -0
- package/dist/elements/FormActionButton/FormActionButton.d.ts +23 -0
- package/dist/elements/FormActionButton/FormActionButton.d.ts.map +1 -0
- package/dist/elements/FormActionButton/FormActionButton.mjs +43 -0
- package/dist/elements/FormActionButton/FormActionButton.mjs.map +1 -0
- package/dist/elements/FormRowActions/FormRowActions.d.ts +27 -0
- package/dist/elements/FormRowActions/FormRowActions.d.ts.map +1 -0
- package/dist/elements/FormRowActions/FormRowActions.mjs +87 -0
- package/dist/elements/FormRowActions/FormRowActions.mjs.map +1 -0
- package/dist/elements/OptionsMenu/OptionsMenu.d.ts +18 -0
- package/dist/elements/OptionsMenu/OptionsMenu.d.ts.map +1 -0
- package/dist/elements/OptionsMenu/OptionsMenu.mjs +47 -0
- package/dist/elements/OptionsMenu/OptionsMenu.mjs.map +1 -0
- package/dist/elements/SelectOption/SelectOption.d.ts +20 -0
- package/dist/elements/SelectOption/SelectOption.d.ts.map +1 -0
- package/dist/elements/SelectOption/SelectOption.mjs +84 -0
- package/dist/elements/SelectOption/SelectOption.mjs.map +1 -0
- package/dist/elements/ValidationTemplate/ValidationTemplate.d.ts +12 -0
- package/dist/elements/ValidationTemplate/ValidationTemplate.d.ts.map +1 -0
- package/dist/elements/ValidationTemplate/ValidationTemplate.mjs +22 -0
- package/dist/elements/ValidationTemplate/ValidationTemplate.mjs.map +1 -0
- package/dist/elements/index.d.ts +7 -0
- package/dist/elements/index.d.ts.map +1 -0
- package/dist/elements/index.mjs +13 -0
- package/dist/elements/index.mjs.map +1 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.mjs +13 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/hooks/useChipCell.hook.d.ts +13 -0
- package/dist/hooks/useChipCell.hook.d.ts.map +1 -0
- package/dist/hooks/useChipCell.hook.mjs +58 -0
- package/dist/hooks/useChipCell.hook.mjs.map +1 -0
- package/dist/hooks/useDebounce.hook.d.ts +2 -0
- package/dist/hooks/useDebounce.hook.d.ts.map +1 -0
- package/dist/hooks/useDebounce.hook.mjs +19 -0
- package/dist/hooks/useDebounce.hook.mjs.map +1 -0
- package/dist/hooks/useDetectOutsideClick.hook.d.ts +2 -0
- package/dist/hooks/useDetectOutsideClick.hook.d.ts.map +1 -0
- package/dist/hooks/useDetectOutsideClick.hook.mjs +15 -0
- package/dist/hooks/useDetectOutsideClick.hook.mjs.map +1 -0
- package/dist/hooks/useFormTable.hook.d.ts +16 -0
- package/dist/hooks/useFormTable.hook.d.ts.map +1 -0
- package/dist/hooks/useFormTable.hook.mjs +128 -0
- package/dist/hooks/useFormTable.hook.mjs.map +1 -0
- package/dist/hooks/useHiddenChipsBlock.hook.d.ts +4 -0
- package/dist/hooks/useHiddenChipsBlock.hook.d.ts.map +1 -0
- package/dist/hooks/useHiddenChipsBlock.hook.mjs +51 -0
- package/dist/hooks/useHiddenChipsBlock.hook.mjs.map +1 -0
- package/dist/images/add.svg.mjs +6 -0
- package/dist/images/add.svg.mjs.map +1 -0
- package/dist/images/alerts-icon.svg +3 -0
- package/dist/images/arrow.svg.mjs +6 -0
- package/dist/images/arrow.svg.mjs.map +1 -0
- package/dist/images/back-arrow.svg.mjs +6 -0
- package/dist/images/back-arrow.svg.mjs.map +1 -0
- package/dist/images/checkmark.svg.mjs +6 -0
- package/dist/images/checkmark.svg.mjs.map +1 -0
- package/dist/images/checkmark2.svg.mjs +6 -0
- package/dist/images/checkmark2.svg.mjs.map +1 -0
- package/dist/images/close.svg.mjs +6 -0
- package/dist/images/close.svg.mjs.map +1 -0
- package/dist/images/delete.svg.mjs +6 -0
- package/dist/images/delete.svg.mjs.map +1 -0
- package/dist/images/documents-icon.svg +3 -0
- package/dist/images/dropdown.svg.mjs +6 -0
- package/dist/images/dropdown.svg.mjs.map +1 -0
- package/dist/images/edit.svg.mjs +6 -0
- package/dist/images/edit.svg.mjs.map +1 -0
- package/dist/images/exclamation-mark.svg.mjs +6 -0
- package/dist/images/exclamation-mark.svg.mjs.map +1 -0
- package/dist/images/llm-prompt-icon.svg +3 -0
- package/dist/images/mlrun-api-gateways.svg +8 -0
- package/dist/images/mlrun-artifacts.svg +11 -0
- package/dist/images/mlrun-datasets.svg +5 -0
- package/dist/images/mlrun-feature-store.svg +10 -0
- package/dist/images/mlrun-jobs-and-workflows.svg +5 -0
- package/dist/images/mlrun-ml-functions.svg +8 -0
- package/dist/images/mlrun-models.svg +5 -0
- package/dist/images/mlrun-project-home.svg +5 -0
- package/dist/images/mlrun-project-monitoring.svg +9 -0
- package/dist/images/mlrun-project-settings.svg +5 -0
- package/dist/images/mlrun-realtime-functions.svg +8 -0
- package/dist/images/model-monitoring.svg +3 -0
- package/dist/images/plus.svg.mjs +6 -0
- package/dist/images/plus.svg.mjs.map +1 -0
- package/dist/images/popout.svg.mjs +6 -0
- package/dist/images/popout.svg.mjs.map +1 -0
- package/dist/images/question-mark.svg.mjs +6 -0
- package/dist/images/question-mark.svg.mjs.map +1 -0
- package/dist/images/range-arrow-small.svg.mjs +6 -0
- package/dist/images/range-arrow-small.svg.mjs.map +1 -0
- package/dist/images/search.svg.mjs +6 -0
- package/dist/images/search.svg.mjs.map +1 -0
- package/dist/images/success_done.svg.mjs +6 -0
- package/dist/images/success_done.svg.mjs.map +1 -0
- package/dist/images/warning.svg.mjs +6 -0
- package/dist/images/warning.svg.mjs.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +15 -0
- package/dist/index.mjs.map +1 -0
- package/dist/robots.txt +3 -0
- package/dist/scss/borders.scss +22 -22
- package/dist/scss/colors.scss +0 -11
- package/dist/scss/common.scss +48 -33
- package/dist/scss/fonts.scss +6 -0
- package/dist/scss/mixins.scss +117 -106
- package/dist/scss/shadows.scss +12 -12
- package/dist/scss/variables.scss +3 -3
- package/dist/types.d.ts +25 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.mjs +143 -0
- package/dist/types.mjs.map +1 -0
- package/dist/utils/common.util.d.ts +10 -0
- package/dist/utils/common.util.d.ts.map +1 -0
- package/dist/utils/common.util.mjs +60 -0
- package/dist/utils/common.util.mjs.map +1 -0
- package/dist/utils/form.util.d.ts +11 -0
- package/dist/utils/form.util.d.ts.map +1 -0
- package/dist/utils/form.util.mjs +26 -0
- package/dist/utils/form.util.mjs.map +1 -0
- package/dist/utils/generateChipsList.util.d.ts +10 -0
- package/dist/utils/generateChipsList.util.d.ts.map +1 -0
- package/dist/utils/generateChipsList.util.mjs +19 -0
- package/dist/utils/generateChipsList.util.mjs.map +1 -0
- package/dist/utils/getFirstScrollableParent.util.d.ts +2 -0
- package/dist/utils/getFirstScrollableParent.util.d.ts.map +1 -0
- package/dist/utils/getFirstScrollableParent.util.mjs +5 -0
- package/dist/utils/getFirstScrollableParent.util.mjs.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.mjs +15 -0
- package/dist/utils/index.mjs.map +1 -0
- package/dist/utils/math.util.d.ts +2 -0
- package/dist/utils/math.util.d.ts.map +1 -0
- package/dist/utils/math.util.mjs +18 -0
- package/dist/utils/math.util.mjs.map +1 -0
- package/dist/utils/validation.util.d.ts +6 -0
- package/dist/utils/validation.util.d.ts.map +1 -0
- package/dist/utils/validation.util.mjs +306 -0
- package/dist/utils/validation.util.mjs.map +1 -0
- package/package.json +48 -38
- package/dist/components/Backdrop/Backdrop.js +0 -56
- package/dist/components/Backdrop/Backdrop.scss +0 -32
- package/dist/components/Button/Button.js +0 -73
- package/dist/components/Button/Button.scss +0 -171
- package/dist/components/ConfirmDialog/ConfirmDialog.js +0 -101
- package/dist/components/ConfirmDialog/confirmDialog.scss +0 -23
- package/dist/components/FormCheckBox/FormCheckBox.js +0 -82
- package/dist/components/FormCheckBox/formCheckBox.scss +0 -91
- package/dist/components/FormChipCell/FormChip/FormChip.js +0 -103
- package/dist/components/FormChipCell/FormChip/formChip.scss +0 -68
- package/dist/components/FormChipCell/FormChipCell.js +0 -339
- package/dist/components/FormChipCell/FormChipCellView.js +0 -190
- package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.js +0 -107
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.js +0 -353
- package/dist/components/FormChipCell/NewChipForm/newChipForm.scss +0 -81
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.js +0 -71
- package/dist/components/FormChipCell/formChipCell.scss +0 -64
- package/dist/components/FormChipCell/formChipCell.util.js +0 -52
- package/dist/components/FormCombobox/FormCombobox.js +0 -432
- package/dist/components/FormCombobox/formCombobox.scss +0 -134
- package/dist/components/FormInput/FormInput.js +0 -408
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.js +0 -91
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.scss +0 -123
- package/dist/components/FormInput/formInput.scss +0 -76
- package/dist/components/FormKeyValueTable/FormKeyValueTable.js +0 -221
- package/dist/components/FormOnChange/FormOnChange.js +0 -69
- package/dist/components/FormRadio/FormRadio.js +0 -85
- package/dist/components/FormRadio/FormRadio.scss +0 -41
- package/dist/components/FormSelect/FormSelect.js +0 -353
- package/dist/components/FormSelect/FormSelect.test.js +0 -138
- package/dist/components/FormSelect/formSelect.scss +0 -97
- package/dist/components/FormTextarea/FormTextarea.js +0 -184
- package/dist/components/FormTextarea/formTextarea.scss +0 -32
- package/dist/components/FormToggle/FormToggle.js +0 -82
- package/dist/components/FormToggle/formToggle.scss +0 -58
- package/dist/components/Modal/Modal.js +0 -116
- package/dist/components/Modal/Modal.scss +0 -149
- package/dist/components/PopUpDialog/PopUpDialog.js +0 -171
- package/dist/components/PopUpDialog/popUpDialog.scss +0 -83
- package/dist/components/RoundedIcon/RoundedIcon.js +0 -72
- package/dist/components/RoundedIcon/roundedIcon.scss +0 -57
- package/dist/components/Tip/Tip.js +0 -116
- package/dist/components/Tip/Tip.test.js +0 -64
- package/dist/components/Tip/tip.scss +0 -94
- package/dist/components/Tooltip/Tooltip.js +0 -180
- package/dist/components/Tooltip/Tooltip.test.js +0 -155
- package/dist/components/Tooltip/tooltip.scss +0 -29
- package/dist/components/TooltipTemplate/ProducerTooltipTemplate.js +0 -53
- package/dist/components/TooltipTemplate/TextTooltipTemplate.js +0 -53
- package/dist/components/TooltipTemplate/producerTooltipTemplate.scss +0 -23
- package/dist/components/TooltipTemplate/textTooltipTemplate.scss +0 -21
- package/dist/components/Wizard/Wizard.js +0 -192
- package/dist/components/Wizard/Wizard.scss +0 -53
- package/dist/components/Wizard/WizardSteps/WizardSteps.js +0 -74
- package/dist/components/Wizard/WizardSteps/WizardSteps.scss +0 -108
- package/dist/components/index.js +0 -139
- package/dist/constants.js +0 -120
- package/dist/elements/FormActionButton/FormActionButton.js +0 -64
- package/dist/elements/FormRowActions/FormRowActions.js +0 -99
- package/dist/elements/OptionsMenu/OptionsMenu.js +0 -75
- package/dist/elements/OptionsMenu/optionsMenu.scss +0 -45
- package/dist/elements/SelectOption/SelectOption.js +0 -107
- package/dist/elements/SelectOption/SelectOption.test.js +0 -98
- package/dist/elements/SelectOption/selectOption.scss +0 -98
- package/dist/elements/ValidationTemplate/ValidationTemplate.js +0 -56
- package/dist/elements/ValidationTemplate/ValidationTemplate.scss +0 -36
- package/dist/elements/index.js +0 -41
- package/dist/hooks/index.js +0 -40
- package/dist/hooks/useChipCell.hook.js +0 -129
- package/dist/hooks/useDebounce.hook.js +0 -52
- package/dist/hooks/useDetectOutsideClick.hook.js +0 -47
- package/dist/hooks/useFormTable.hook.js +0 -224
- package/dist/hooks/useHiddenChipsBlock.hook.js +0 -102
- package/dist/index.js +0 -18
- package/dist/types.js +0 -127
- package/dist/utils/common.util.js +0 -130
- package/dist/utils/form.util.js +0 -70
- package/dist/utils/generateChipsList.util.js +0 -39
- package/dist/utils/getFirstScrollableParent.util.js +0 -49
- package/dist/utils/math.util.js +0 -44
- package/dist/utils/validation.util.js +0 -401
|
@@ -1,171 +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 _reactDom = require("react-dom");
|
|
11
|
-
var _lodash = require("lodash");
|
|
12
|
-
var _RoundedIcon = _interopRequireDefault(require("../RoundedIcon/RoundedIcon"));
|
|
13
|
-
var _Tooltip = _interopRequireDefault(require("../Tooltip/Tooltip"));
|
|
14
|
-
var _TextTooltipTemplate = _interopRequireDefault(require("../TooltipTemplate/TextTooltipTemplate"));
|
|
15
|
-
var _types = require("../../types");
|
|
16
|
-
var _close = require("../../images/close.svg");
|
|
17
|
-
require("./popUpDialog.scss");
|
|
18
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
|
-
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); }
|
|
21
|
-
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; }
|
|
22
|
-
/*
|
|
23
|
-
Copyright 2022 Iguazio Systems Ltd.
|
|
24
|
-
Licensed under the Apache License, Version 2.0 (the "License") with
|
|
25
|
-
an addition restriction as set forth herein. You may not use this
|
|
26
|
-
file except in compliance with the License. You may obtain a copy of
|
|
27
|
-
the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
28
|
-
Unless required by applicable law or agreed to in writing, software
|
|
29
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
30
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
31
|
-
implied. See the License for the specific language governing
|
|
32
|
-
permissions and limitations under the License.
|
|
33
|
-
In addition, you may not use the software for any purposes that are
|
|
34
|
-
illegal under applicable law, and the grant of the foregoing license
|
|
35
|
-
under the Apache 2.0 license is conditioned upon your compliance with
|
|
36
|
-
such restriction.
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
const PopUpDialog = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
40
|
-
let {
|
|
41
|
-
children,
|
|
42
|
-
className = '',
|
|
43
|
-
closePopUp = () => {},
|
|
44
|
-
customPosition = {},
|
|
45
|
-
headerIsHidden = false,
|
|
46
|
-
headerText = '',
|
|
47
|
-
showPopUpDialog = true,
|
|
48
|
-
style = {},
|
|
49
|
-
tooltipText = ''
|
|
50
|
-
} = _ref;
|
|
51
|
-
const [showPopUp, setShowPopUp] = (0, _react.useState)(showPopUpDialog ?? true);
|
|
52
|
-
const popUpOverlayRef = (0, _react.useRef)(null);
|
|
53
|
-
ref ??= popUpOverlayRef;
|
|
54
|
-
const popUpClassNames = (0, _classnames.default)(className, 'pop-up-dialog__overlay', customPosition.element && 'custom-position');
|
|
55
|
-
const handleClosePopUp = (0, _react.useCallback)(() => {
|
|
56
|
-
closePopUp && closePopUp();
|
|
57
|
-
setShowPopUp(false);
|
|
58
|
-
}, [closePopUp]);
|
|
59
|
-
const calculateCustomPopUpPosition = (0, _react.useCallback)(() => {
|
|
60
|
-
if (customPosition?.element?.current && ref?.current) {
|
|
61
|
-
const elementRect = customPosition.element.current.getBoundingClientRect();
|
|
62
|
-
const popUpRect = ref.current.getBoundingClientRect();
|
|
63
|
-
const [verticalPosition, horizontalPosition] = customPosition.position.split('-');
|
|
64
|
-
const popupMargin = 15;
|
|
65
|
-
const elementMargin = 5;
|
|
66
|
-
const isEnoughSpaceFromLeft = elementRect.right >= popUpRect.width + popupMargin;
|
|
67
|
-
const isEnoughSpaceFromRight = window.innerWidth - elementRect.left >= popUpRect.width + popupMargin;
|
|
68
|
-
const isEnoughSpaceFromTop = elementRect.top > popUpRect.height + popupMargin + elementMargin;
|
|
69
|
-
const isEnoughSpaceFromBottom = elementRect.bottom + popUpRect.height + popupMargin + elementMargin <= window.innerHeight;
|
|
70
|
-
let leftPosition = horizontalPosition === 'left' ? elementRect.right - popUpRect.width : elementRect.left;
|
|
71
|
-
let topPosition;
|
|
72
|
-
if (verticalPosition === 'top') {
|
|
73
|
-
topPosition = isEnoughSpaceFromTop ? elementRect.top - popUpRect.height - elementMargin : popupMargin;
|
|
74
|
-
} else {
|
|
75
|
-
topPosition = isEnoughSpaceFromBottom ? elementRect.bottom + elementMargin : window.innerHeight - popUpRect.height - popupMargin;
|
|
76
|
-
}
|
|
77
|
-
if (customPosition.autoVerticalPosition) {
|
|
78
|
-
if (verticalPosition === 'top') {
|
|
79
|
-
if (!isEnoughSpaceFromTop && isEnoughSpaceFromBottom) {
|
|
80
|
-
topPosition = elementRect.bottom + elementMargin;
|
|
81
|
-
}
|
|
82
|
-
} else {
|
|
83
|
-
if (isEnoughSpaceFromTop && !isEnoughSpaceFromBottom) {
|
|
84
|
-
topPosition = elementRect.top - popUpRect.height - elementMargin;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
if (customPosition.autoHorizontalPosition) {
|
|
89
|
-
if (verticalPosition === 'left') {
|
|
90
|
-
if (!isEnoughSpaceFromLeft && isEnoughSpaceFromRight) {
|
|
91
|
-
leftPosition = elementRect.left;
|
|
92
|
-
} else if (!isEnoughSpaceFromLeft && !isEnoughSpaceFromRight) {
|
|
93
|
-
leftPosition = popupMargin;
|
|
94
|
-
}
|
|
95
|
-
} else {
|
|
96
|
-
if (isEnoughSpaceFromLeft && !isEnoughSpaceFromRight) {
|
|
97
|
-
leftPosition = elementRect.right - popUpRect.width;
|
|
98
|
-
} else if (!isEnoughSpaceFromLeft && !isEnoughSpaceFromRight) {
|
|
99
|
-
leftPosition = window.innerWidth - popUpRect.width - popupMargin;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
ref.current.style.top = `${topPosition}px`;
|
|
104
|
-
if (style.left && !(customPosition.autoHorizontalPosition && isEnoughSpaceFromRight)) {
|
|
105
|
-
ref.current.style.left = `calc(${leftPosition}px + ${style.left})`;
|
|
106
|
-
} else {
|
|
107
|
-
ref.current.style.left = `${leftPosition}px`;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}, [customPosition, style.left, ref]);
|
|
111
|
-
(0, _react.useLayoutEffect)(() => {
|
|
112
|
-
calculateCustomPopUpPosition();
|
|
113
|
-
}, [calculateCustomPopUpPosition]);
|
|
114
|
-
(0, _react.useEffect)(() => {
|
|
115
|
-
if (showPopUp) {
|
|
116
|
-
const throttledCalculatedCustomPopUpPosition = (0, _lodash.throttle)(calculateCustomPopUpPosition, 100, {
|
|
117
|
-
trailing: true,
|
|
118
|
-
leading: true
|
|
119
|
-
});
|
|
120
|
-
const popupObserver = new ResizeObserver(throttledCalculatedCustomPopUpPosition);
|
|
121
|
-
const popupElement = ref.current;
|
|
122
|
-
popupObserver.observe(popupElement);
|
|
123
|
-
window.addEventListener('resize', throttledCalculatedCustomPopUpPosition);
|
|
124
|
-
return () => {
|
|
125
|
-
popupObserver.unobserve(popupElement);
|
|
126
|
-
window.removeEventListener('resize', throttledCalculatedCustomPopUpPosition);
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
}, [calculateCustomPopUpPosition, ref, showPopUp]);
|
|
130
|
-
return showPopUp ? /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
131
|
-
ref: ref,
|
|
132
|
-
className: popUpClassNames,
|
|
133
|
-
style: style,
|
|
134
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
135
|
-
"data-testid": "pop-up-dialog",
|
|
136
|
-
className: "pop-up-dialog",
|
|
137
|
-
children: [!headerIsHidden && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
138
|
-
className: "pop-up-dialog__header",
|
|
139
|
-
children: [headerText && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
140
|
-
"data-testid": "pop-up-dialog-header",
|
|
141
|
-
className: "pop-up-dialog__header-text",
|
|
142
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
143
|
-
template: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextTooltipTemplate.default, {
|
|
144
|
-
text: tooltipText || headerText
|
|
145
|
-
}),
|
|
146
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
147
|
-
children: headerText
|
|
148
|
-
})
|
|
149
|
-
})
|
|
150
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RoundedIcon.default, {
|
|
151
|
-
className: "pop-up-dialog__btn_close",
|
|
152
|
-
onClick: handleClosePopUp,
|
|
153
|
-
tooltipText: "Close",
|
|
154
|
-
"data-testid": "pop-up-close-btn",
|
|
155
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_close.ReactComponent, {})
|
|
156
|
-
})]
|
|
157
|
-
}), children]
|
|
158
|
-
})
|
|
159
|
-
}), document.getElementById('overlay_container')) : null;
|
|
160
|
-
});
|
|
161
|
-
PopUpDialog.propTypes = {
|
|
162
|
-
className: _propTypes.default.string,
|
|
163
|
-
closePopUp: _propTypes.default.func,
|
|
164
|
-
customPosition: _types.POP_UP_CUSTOM_POSITION,
|
|
165
|
-
headerIsHidden: _propTypes.default.bool,
|
|
166
|
-
headerText: _propTypes.default.string,
|
|
167
|
-
showPopUpDialog: _propTypes.default.bool,
|
|
168
|
-
style: _propTypes.default.object,
|
|
169
|
-
tooltipText: _propTypes.default.string
|
|
170
|
-
};
|
|
171
|
-
var _default = exports.default = PopUpDialog;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
@import '../../scss/variables';
|
|
2
|
-
@import '../../scss/colors';
|
|
3
|
-
@import '../../scss/borders';
|
|
4
|
-
@import '../../scss/shadows';
|
|
5
|
-
|
|
6
|
-
.pop-up-dialog {
|
|
7
|
-
position: relative;
|
|
8
|
-
width: 477px;
|
|
9
|
-
max-height: 90vh;
|
|
10
|
-
padding: 20px;
|
|
11
|
-
overflow-y: auto;
|
|
12
|
-
background-color: $white;
|
|
13
|
-
border-radius: $modalBorderRadius;
|
|
14
|
-
box-shadow: $previewBoxShadow;
|
|
15
|
-
|
|
16
|
-
&__buttons_wrapper {
|
|
17
|
-
display: flex;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&__overlay {
|
|
21
|
-
position: fixed;
|
|
22
|
-
top: 0;
|
|
23
|
-
left: 0;
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
justify-content: center;
|
|
27
|
-
width: 100%;
|
|
28
|
-
height: 100%;
|
|
29
|
-
background: $mineshaftTwo;
|
|
30
|
-
z-index: 9;
|
|
31
|
-
|
|
32
|
-
&.custom-position {
|
|
33
|
-
width: auto;
|
|
34
|
-
height: auto;
|
|
35
|
-
background: unset;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&__header {
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: baseline;
|
|
42
|
-
justify-content: space-between;
|
|
43
|
-
min-height: 30px;
|
|
44
|
-
margin-bottom: 15px;
|
|
45
|
-
|
|
46
|
-
&-text {
|
|
47
|
-
width: 100%;
|
|
48
|
-
color: $primary;
|
|
49
|
-
font-size: 24px;
|
|
50
|
-
line-height: 28px;
|
|
51
|
-
word-break: break-word;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&-close {
|
|
55
|
-
width: 14px;
|
|
56
|
-
height: 14px;
|
|
57
|
-
margin: 5px 0 5px auto;
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&__footer-container {
|
|
63
|
-
display: flex;
|
|
64
|
-
justify-content: flex-end;
|
|
65
|
-
margin-top: 20px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&__btn {
|
|
69
|
-
&_cancel {
|
|
70
|
-
margin: 0 10px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&_close {
|
|
74
|
-
position: absolute;
|
|
75
|
-
top: 10px;
|
|
76
|
-
right: 10px;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&__form-input {
|
|
81
|
-
width: 100%;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
@@ -1,72 +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 _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
-
var _Tooltip = _interopRequireDefault(require("../Tooltip/Tooltip"));
|
|
11
|
-
var _TextTooltipTemplate = _interopRequireDefault(require("../TooltipTemplate/TextTooltipTemplate"));
|
|
12
|
-
require("./roundedIcon.scss");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
/*
|
|
16
|
-
Copyright 2022 Iguazio Systems Ltd.
|
|
17
|
-
Licensed under the Apache License, Version 2.0 (the "License") with
|
|
18
|
-
an addition restriction as set forth herein. You may not use this
|
|
19
|
-
file except in compliance with the License. You may obtain a copy of
|
|
20
|
-
the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
21
|
-
Unless required by applicable law or agreed to in writing, software
|
|
22
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
23
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
24
|
-
implied. See the License for the specific language governing
|
|
25
|
-
permissions and limitations under the License.
|
|
26
|
-
In addition, you may not use the software for any purposes that are
|
|
27
|
-
illegal under applicable law, and the grant of the foregoing license
|
|
28
|
-
under the Apache 2.0 license is conditioned upon your compliance with
|
|
29
|
-
such restriction.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
const RoundedIcon = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
33
|
-
let {
|
|
34
|
-
children,
|
|
35
|
-
className = '',
|
|
36
|
-
disabled = false,
|
|
37
|
-
id = '',
|
|
38
|
-
isActive = false,
|
|
39
|
-
onClick = () => {},
|
|
40
|
-
tooltipText = ''
|
|
41
|
-
} = _ref;
|
|
42
|
-
const wrapperClassNames = (0, _classnames.default)('round-icon-cp', className);
|
|
43
|
-
const IconClassNames = (0, _classnames.default)('round-icon-cp__circle', isActive && 'round-icon-cp__circle-active', disabled && 'round-icon-cp__circle-disabled');
|
|
44
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
45
|
-
className: wrapperClassNames,
|
|
46
|
-
ref: ref,
|
|
47
|
-
"data-testid": id,
|
|
48
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
49
|
-
hidden: !tooltipText,
|
|
50
|
-
id: id,
|
|
51
|
-
template: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextTooltipTemplate.default, {
|
|
52
|
-
text: tooltipText
|
|
53
|
-
}),
|
|
54
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
55
|
-
onClick: onClick,
|
|
56
|
-
disabled: disabled,
|
|
57
|
-
className: IconClassNames,
|
|
58
|
-
children: children
|
|
59
|
-
})
|
|
60
|
-
})
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
RoundedIcon.propTypes = {
|
|
64
|
-
children: _propTypes.default.node.isRequired,
|
|
65
|
-
className: _propTypes.default.string,
|
|
66
|
-
disabled: _propTypes.default.bool,
|
|
67
|
-
id: _propTypes.default.string,
|
|
68
|
-
isActive: _propTypes.default.bool,
|
|
69
|
-
onClick: _propTypes.default.func,
|
|
70
|
-
tooltipText: _propTypes.default.string
|
|
71
|
-
};
|
|
72
|
-
var _default = exports.default = /*#__PURE__*/_react.default.memo(RoundedIcon);
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
@import '../../scss/colors.scss';
|
|
2
|
-
|
|
3
|
-
.round-icon-cp {
|
|
4
|
-
position: relative;
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
margin: 0 0.2rem;
|
|
8
|
-
|
|
9
|
-
&__circle {
|
|
10
|
-
display: flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
width: 36px;
|
|
14
|
-
height: 36px;
|
|
15
|
-
padding: 4px;
|
|
16
|
-
|
|
17
|
-
& > * {
|
|
18
|
-
position: relative;
|
|
19
|
-
z-index: 2;
|
|
20
|
-
display: inline-flex;
|
|
21
|
-
margin: 0 !important;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&::before {
|
|
25
|
-
position: absolute;
|
|
26
|
-
right: 0;
|
|
27
|
-
left: 0;
|
|
28
|
-
z-index: 1;
|
|
29
|
-
width: inherit;
|
|
30
|
-
height: inherit;
|
|
31
|
-
background-color: $mulledWineThree;
|
|
32
|
-
border-radius: 50%;
|
|
33
|
-
opacity: 0;
|
|
34
|
-
transition: opacity 0.3s ease-in-out;
|
|
35
|
-
content: '';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&:hover,
|
|
39
|
-
&-active {
|
|
40
|
-
&::before {
|
|
41
|
-
opacity: 1;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&-disabled {
|
|
46
|
-
path {
|
|
47
|
-
fill: $spunPearl;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:hover {
|
|
51
|
-
&::before {
|
|
52
|
-
opacity: 0;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,116 +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 _reactTransitionGroup = require("react-transition-group");
|
|
10
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var _reactDom = require("react-dom");
|
|
12
|
-
var _questionMark = require("../../images/question-mark.svg");
|
|
13
|
-
var _exclamationMark = require("../../images/exclamation-mark.svg");
|
|
14
|
-
var _tip = _interopRequireDefault(require("./tip.scss"));
|
|
15
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
-
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); }
|
|
18
|
-
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; }
|
|
19
|
-
/*
|
|
20
|
-
Copyright 2022 Iguazio Systems Ltd.
|
|
21
|
-
Licensed under the Apache License, Version 2.0 (the "License") with
|
|
22
|
-
an addition restriction as set forth herein. You may not use this
|
|
23
|
-
file except in compliance with the License. You may obtain a copy of
|
|
24
|
-
the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
25
|
-
Unless required by applicable law or agreed to in writing, software
|
|
26
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
27
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
28
|
-
implied. See the License for the specific language governing
|
|
29
|
-
permissions and limitations under the License.
|
|
30
|
-
In addition, you may not use the software for any purposes that are
|
|
31
|
-
illegal under applicable law, and the grant of the foregoing license
|
|
32
|
-
under the Apache 2.0 license is conditioned upon your compliance with
|
|
33
|
-
such restriction.
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
const arrowOffset = parseInt(_tip.default.arrowoffset);
|
|
37
|
-
const arrowLength = parseInt(_tip.default.arrowlength);
|
|
38
|
-
const iconLength = parseInt(_tip.default.iconlength);
|
|
39
|
-
const minTextLength = 40;
|
|
40
|
-
const Tip = _ref => {
|
|
41
|
-
let {
|
|
42
|
-
className = '',
|
|
43
|
-
text,
|
|
44
|
-
withExclamationMark
|
|
45
|
-
} = _ref;
|
|
46
|
-
const [isShow, setIsShow] = (0, _react.useState)(false);
|
|
47
|
-
const [tipClassName, setTipClassName] = (0, _react.useState)('tip_top tip_left');
|
|
48
|
-
const iconRef = (0, _react.useRef)();
|
|
49
|
-
const tipBodyRef = (0, _react.useRef)();
|
|
50
|
-
const tipContainerClassNames = (0, _classnames.default)(className, 'tip-container');
|
|
51
|
-
const tipClassNames = (0, _classnames.default)('tip', tipClassName, text.length <= minTextLength ? 'tip_small' : 'tip_big');
|
|
52
|
-
const handleMouseEnter = (0, _react.useCallback)(event => {
|
|
53
|
-
setIsShow(true);
|
|
54
|
-
}, []);
|
|
55
|
-
(0, _react.useEffect)(() => {
|
|
56
|
-
if (isShow) {
|
|
57
|
-
const iconRect = iconRef.current.getBoundingClientRect();
|
|
58
|
-
const tipRect = tipBodyRef.current.getBoundingClientRect();
|
|
59
|
-
const widthPosition = iconRect.left > tipRect.width - arrowOffset ? 'tip_left' : 'tip_right';
|
|
60
|
-
const heightPosition = iconRect.top > tipRect.height + arrowLength ? 'tip_top' : 'tip_bottom';
|
|
61
|
-
setTipClassName(`${heightPosition} ${widthPosition}`);
|
|
62
|
-
if (widthPosition === 'tip_left') {
|
|
63
|
-
const computedArrowOffset = arrowOffset + (iconLength + arrowLength) / 2;
|
|
64
|
-
tipBodyRef.current.style.left = `${iconRect.left - (tipRect.width - computedArrowOffset)}px`;
|
|
65
|
-
} else {
|
|
66
|
-
const computedArrowOffset = arrowOffset - (iconLength - arrowLength) / 2;
|
|
67
|
-
tipBodyRef.current.style.left = `${iconRect.left - computedArrowOffset}px`;
|
|
68
|
-
}
|
|
69
|
-
tipBodyRef.current.style.top = heightPosition === 'tip_top' ? `${iconRect.top - tipRect.height - arrowLength}px` : `${iconRect.bottom + arrowLength}px`;
|
|
70
|
-
}
|
|
71
|
-
}, [isShow]);
|
|
72
|
-
const handleMouseLeave = () => {
|
|
73
|
-
setIsShow(false);
|
|
74
|
-
};
|
|
75
|
-
(0, _react.useEffect)(() => {
|
|
76
|
-
const node = iconRef.current;
|
|
77
|
-
if (iconRef.current) {
|
|
78
|
-
node.addEventListener('mouseenter', handleMouseEnter);
|
|
79
|
-
node.addEventListener('mouseleave', handleMouseLeave);
|
|
80
|
-
return () => {
|
|
81
|
-
node.removeEventListener('mouseenter', handleMouseEnter);
|
|
82
|
-
node.removeEventListener('mouseleave', handleMouseLeave);
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
}, [handleMouseEnter, isShow]);
|
|
86
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
87
|
-
"data-testid": "tip",
|
|
88
|
-
className: tipContainerClassNames,
|
|
89
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
90
|
-
ref: iconRef,
|
|
91
|
-
className: "tip-wrapper",
|
|
92
|
-
children: withExclamationMark ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_exclamationMark.ReactComponent, {
|
|
93
|
-
"data-testid": "tip-icon"
|
|
94
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_questionMark.ReactComponent, {
|
|
95
|
-
"data-testid": "tip-icon"
|
|
96
|
-
})
|
|
97
|
-
}), /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
98
|
-
nodeRef: tipBodyRef,
|
|
99
|
-
in: isShow,
|
|
100
|
-
timeout: 200,
|
|
101
|
-
classNames: "fade",
|
|
102
|
-
unmountOnExit: true,
|
|
103
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
104
|
-
ref: tipBodyRef,
|
|
105
|
-
"data-testid": "tip-text",
|
|
106
|
-
className: tipClassNames,
|
|
107
|
-
children: text
|
|
108
|
-
})
|
|
109
|
-
}), document.getElementById('overlay_container'))]
|
|
110
|
-
});
|
|
111
|
-
};
|
|
112
|
-
Tip.propTypes = {
|
|
113
|
-
className: _propTypes.default.string,
|
|
114
|
-
text: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.element]).isRequired
|
|
115
|
-
};
|
|
116
|
-
var _default = exports.default = Tip;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _react = _interopRequireDefault(require("react"));
|
|
4
|
-
var _react2 = require("@testing-library/react");
|
|
5
|
-
var _Tip = _interopRequireDefault(require("./Tip"));
|
|
6
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
-
/*
|
|
9
|
-
Copyright 2022 Iguazio Systems Ltd.
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License") with
|
|
11
|
-
an addition restriction as set forth herein. You may not use this
|
|
12
|
-
file except in compliance with the License. You may obtain a copy of
|
|
13
|
-
the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
14
|
-
Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
17
|
-
implied. See the License for the specific language governing
|
|
18
|
-
permissions and limitations under the License.
|
|
19
|
-
In addition, you may not use the software for any purposes that are
|
|
20
|
-
illegal under applicable law, and the grant of the foregoing license
|
|
21
|
-
under the Apache 2.0 license is conditioned upon your compliance with
|
|
22
|
-
such restriction.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
jest.mock('../../images/question-mark.svg', () => ({
|
|
26
|
-
ReactComponent: 'Question-icon'
|
|
27
|
-
}));
|
|
28
|
-
const renderComponent = props => (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tip.default, {
|
|
29
|
-
...props
|
|
30
|
-
}));
|
|
31
|
-
describe('Tip component', () => {
|
|
32
|
-
let wrapper;
|
|
33
|
-
beforeEach(() => {
|
|
34
|
-
const props = {
|
|
35
|
-
text: 'Show tip component'
|
|
36
|
-
};
|
|
37
|
-
wrapper = renderComponent(props);
|
|
38
|
-
});
|
|
39
|
-
it('renders without crashing', () => {
|
|
40
|
-
expect(wrapper.queryByTestId('tip')).not.toBeNull();
|
|
41
|
-
});
|
|
42
|
-
it('should display tip text if mouse over the icon', () => {
|
|
43
|
-
const tipIcon = wrapper.getByTestId('tip-icon');
|
|
44
|
-
_react2.fireEvent.mouseEnter(tipIcon);
|
|
45
|
-
expect(wrapper.queryByTestId('tip-text')).not.toBeNull();
|
|
46
|
-
});
|
|
47
|
-
it('should hide tip text if mouse leave the icon', async () => {
|
|
48
|
-
const tipIcon = wrapper.getByTestId('tip-icon');
|
|
49
|
-
_react2.fireEvent.mouseEnter(tipIcon);
|
|
50
|
-
expect(wrapper.queryByTestId('tip-text')).not.toBeNull();
|
|
51
|
-
_react2.fireEvent.mouseLeave(tipIcon);
|
|
52
|
-
const tipText = await (0, _react2.waitForElementToBeRemoved)(() => wrapper.queryByTestId('tip-text'));
|
|
53
|
-
expect(tipText).toBeUndefined();
|
|
54
|
-
});
|
|
55
|
-
it('should add the class "tip_big" if the length of the prop text is more than 40 characters', () => {
|
|
56
|
-
wrapper.rerender(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tip.default, {
|
|
57
|
-
text: "Lorem Ipsum is simply dummy text of the printing and typesetting"
|
|
58
|
-
}));
|
|
59
|
-
const tipIcon = wrapper.getByTestId('tip-icon');
|
|
60
|
-
_react2.fireEvent.mouseEnter(tipIcon);
|
|
61
|
-
const tipText = wrapper.getByTestId('tip-text');
|
|
62
|
-
expect(tipText.className).toMatch('tip_big');
|
|
63
|
-
});
|
|
64
|
-
});
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
@import '../../scss/colors';
|
|
2
|
-
|
|
3
|
-
$arrowLength: 10px;
|
|
4
|
-
$iconLength: 16px;
|
|
5
|
-
$arrowOffset: 20px;
|
|
6
|
-
|
|
7
|
-
.tip-container {
|
|
8
|
-
position: relative;
|
|
9
|
-
display: inline-flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.tip {
|
|
14
|
-
position: fixed;
|
|
15
|
-
display: block;
|
|
16
|
-
padding: 10px;
|
|
17
|
-
color: $white;
|
|
18
|
-
white-space: pre-line;
|
|
19
|
-
background: $primary;
|
|
20
|
-
border-radius: 4px;
|
|
21
|
-
z-index: 9;
|
|
22
|
-
|
|
23
|
-
&-wrapper {
|
|
24
|
-
display: inline-flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&_top {
|
|
29
|
-
&::after {
|
|
30
|
-
bottom: calc(-#{$arrowLength} / 2);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&_bottom {
|
|
35
|
-
&::after {
|
|
36
|
-
top: calc(-#{$arrowLength} / 2);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&_left {
|
|
41
|
-
&::after {
|
|
42
|
-
right: calc(#{$arrowOffset});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&_right {
|
|
47
|
-
&::after {
|
|
48
|
-
left: calc(#{$arrowOffset});
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&_small {
|
|
53
|
-
min-width: 100px;
|
|
54
|
-
max-width: 250px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&_big {
|
|
58
|
-
min-width: 250px;
|
|
59
|
-
max-width: 400px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&::after {
|
|
63
|
-
position: absolute;
|
|
64
|
-
width: $arrowLength;
|
|
65
|
-
height: $arrowLength;
|
|
66
|
-
background: $primary;
|
|
67
|
-
transform: rotate(45deg);
|
|
68
|
-
content: '';
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.fade-enter {
|
|
73
|
-
opacity: 0;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.fade-enter-active {
|
|
77
|
-
opacity: 1;
|
|
78
|
-
transition: opacity 200ms;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.fade-exit {
|
|
82
|
-
opacity: 1;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.fade-exit-active {
|
|
86
|
-
opacity: 0;
|
|
87
|
-
transition: opacity 200ms;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
:export {
|
|
91
|
-
arrowlength: $arrowLength;
|
|
92
|
-
iconlength: $iconLength;
|
|
93
|
-
arrowoffset: $arrowOffset;
|
|
94
|
-
}
|