@onewelcome/react-lib-components 12.1.0-alpha → 12.1.0-alpha.4
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/Breadcrumbs/Breadcrumbs.cjs.js +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs.js.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.es.js.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.es.js +5 -5
- package/dist/components/Button/BaseButton.cjs.js +1 -1
- package/dist/components/Button/BaseButton.cjs.js.map +1 -1
- package/dist/components/Button/BaseButton.es.js.map +1 -1
- package/dist/components/Button/BaseButton.module.scss.cjs.js +2 -2
- package/dist/components/Button/BaseButton.module.scss.es.js +4 -4
- package/dist/components/Button/Button.cjs.js +1 -1
- package/dist/components/Button/Button.cjs.js.map +1 -1
- package/dist/components/Button/Button.es.js.map +1 -1
- package/dist/components/Button/Button.module.scss.cjs.js +2 -2
- package/dist/components/Button/Button.module.scss.es.js +17 -17
- package/dist/components/Button/IconButton.cjs.js.map +1 -1
- package/dist/components/Button/IconButton.es.js.map +1 -1
- package/dist/components/Button/IconButton.module.scss.cjs.js +2 -2
- package/dist/components/Button/IconButton.module.scss.es.js +18 -18
- package/dist/components/Button/Spinner.cjs.js.map +1 -1
- package/dist/components/Button/Spinner.es.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.cjs.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.cjs.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.es.js +28 -11
- package/dist/components/ContextMenu/ContextMenu.es.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.module.scss.es.js +8 -5
- package/dist/components/ContextMenu/ContextMenu.module.scss.es.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenuDivider.cjs.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenuDivider.es.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.es.js +2 -2
- package/dist/components/ContextMenu/ContextMenuItem.cjs.js +1 -1
- package/dist/components/ContextMenu/ContextMenuItem.cjs.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenuItem.es.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenuItem.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenuItem.module.scss.es.js +3 -3
- package/dist/components/ContextMenu/ContextMenuService.cjs.js +1 -1
- package/dist/components/ContextMenu/ContextMenuService.cjs.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenuService.es.js.map +1 -1
- package/dist/components/DataGrid/DataGrid.cjs.js +1 -1
- package/dist/components/DataGrid/DataGrid.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGrid.es.js.map +1 -1
- package/dist/components/DataGrid/DataGrid.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGrid.module.scss.es.js +6 -6
- package/dist/components/DataGrid/DataGridActions/DataGridActions.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridActions.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridActions.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.es.js +6 -6
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.es.js +7 -7
- package/dist/components/DataGrid/DataGridBody/DataGridBody.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridBody.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridBody.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.es.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.es.js +5 -5
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.es.js +4 -4
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.es.js +5 -5
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.es.js +2 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.es.js +24 -24
- package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridDateFilter.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridDateFilter.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.es.js +9 -9
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridSearchbar.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridSearchbar.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridSearchbar.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.es.js +8 -8
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbarWrapper.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbarWrapper.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.es.js +17 -17
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerInputSection.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerInputSection.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerInputSection.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimeService.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimeService.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/SideMenu.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/SideMenu.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/SideMenu.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/FilterKeyMapper.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/FilterKeyMapper.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/FilterKeyMapper.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.es.js +3 -3
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.es.js +7 -7
- package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
- package/dist/components/DatePicker/DatePicker.cjs.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.es.js +1 -1
- package/dist/components/DatePicker/DatePicker.es.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.module.scss.cjs.js +2 -2
- package/dist/components/DatePicker/DatePicker.module.scss.es.js +31 -31
- package/dist/components/Form/Checkbox/Checkbox.cjs.js +1 -1
- package/dist/components/Form/Checkbox/Checkbox.cjs.js.map +1 -1
- package/dist/components/Form/Checkbox/Checkbox.es.js +1 -0
- package/dist/components/Form/Checkbox/Checkbox.es.js.map +1 -1
- package/dist/components/Form/Checkbox/Checkbox.module.scss.cjs.js +2 -2
- package/dist/components/Form/Checkbox/Checkbox.module.scss.es.js +13 -13
- package/dist/components/Form/Fieldset/Fieldset.cjs.js +1 -1
- package/dist/components/Form/Fieldset/Fieldset.cjs.js.map +1 -1
- package/dist/components/Form/Fieldset/Fieldset.es.js.map +1 -1
- package/dist/components/Form/Fieldset/Fieldset.module.scss.cjs.js +2 -2
- package/dist/components/Form/Fieldset/Fieldset.module.scss.es.js +5 -5
- package/dist/components/Form/FileUpload/FileItem/FileItem.cjs.js +1 -1
- package/dist/components/Form/FileUpload/FileItem/FileItem.cjs.js.map +1 -1
- package/dist/components/Form/FileUpload/FileItem/FileItem.es.js.map +1 -1
- package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.cjs.js +2 -2
- package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.es.js +18 -18
- package/dist/components/Form/FileUpload/FileUpload.cjs.js +1 -1
- package/dist/components/Form/FileUpload/FileUpload.cjs.js.map +1 -1
- package/dist/components/Form/FileUpload/FileUpload.es.js +18 -4
- package/dist/components/Form/FileUpload/FileUpload.es.js.map +1 -1
- package/dist/components/Form/FileUpload/FileUpload.module.scss.cjs.js +2 -2
- package/dist/components/Form/FileUpload/FileUpload.module.scss.es.js +16 -16
- package/dist/components/Form/Form.cjs.js +1 -1
- package/dist/components/Form/Form.cjs.js.map +1 -1
- package/dist/components/Form/Form.es.js.map +1 -1
- package/dist/components/Form/Form.module.scss.cjs.js +2 -2
- package/dist/components/Form/Form.module.scss.es.js +2 -2
- package/dist/components/Form/FormControl/FormControl.cjs.js +1 -1
- package/dist/components/Form/FormControl/FormControl.cjs.js.map +1 -1
- package/dist/components/Form/FormControl/FormControl.es.js.map +1 -1
- package/dist/components/Form/FormControl/FormControl.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormControl/FormControl.module.scss.es.js +13 -13
- package/dist/components/Form/FormErrorText/FormErrorText.cjs.js.map +1 -1
- package/dist/components/Form/FormErrorText/FormErrorText.es.js.map +1 -1
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.es.js +5 -5
- package/dist/components/Form/FormGroup/FormGroup.cjs.js +1 -1
- package/dist/components/Form/FormGroup/FormGroup.cjs.js.map +1 -1
- package/dist/components/Form/FormGroup/FormGroup.es.js.map +1 -1
- package/dist/components/Form/FormGroup/FormGroup.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormGroup/FormGroup.module.scss.es.js +3 -3
- package/dist/components/Form/FormHelperText/FormHelperText.cjs.js +1 -1
- package/dist/components/Form/FormHelperText/FormHelperText.cjs.js.map +1 -1
- package/dist/components/Form/FormHelperText/FormHelperText.es.js.map +1 -1
- package/dist/components/Form/FormHelperText/FormHelperText.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormHelperText/FormHelperText.module.scss.es.js +4 -4
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.cjs.js +1 -1
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.cjs.js.map +1 -1
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.es.js.map +1 -1
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.es.js +6 -6
- package/dist/components/Form/FormStatusIndicator/FormStatusIndicator.cjs.js.map +1 -1
- package/dist/components/Form/FormStatusIndicator/FormStatusIndicator.es.js.map +1 -1
- package/dist/components/Form/Input/Input.cjs.js +1 -1
- package/dist/components/Form/Input/Input.cjs.js.map +1 -1
- package/dist/components/Form/Input/Input.es.js +1 -0
- package/dist/components/Form/Input/Input.es.js.map +1 -1
- package/dist/components/Form/Input/Input.module.scss.cjs.js +2 -2
- package/dist/components/Form/Input/Input.module.scss.es.js +9 -9
- package/dist/components/Form/Label/Label.cjs.js +1 -1
- package/dist/components/Form/Label/Label.cjs.js.map +1 -1
- package/dist/components/Form/Label/Label.es.js.map +1 -1
- package/dist/components/Form/Label/Label.module.scss.cjs.js +2 -2
- package/dist/components/Form/Label/Label.module.scss.es.js +2 -2
- package/dist/components/Form/Radio/Radio.cjs.js +1 -1
- package/dist/components/Form/Radio/Radio.cjs.js.map +1 -1
- package/dist/components/Form/Radio/Radio.es.js +1 -0
- package/dist/components/Form/Radio/Radio.es.js.map +1 -1
- package/dist/components/Form/Radio/Radio.module.scss.cjs.js +2 -2
- package/dist/components/Form/Radio/Radio.module.scss.es.js +11 -11
- package/dist/components/Form/Select/MultiSelect/MultiOption.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiOption.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiOption.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.es.js +15 -15
- package/dist/components/Form/Select/MultiSelect/SelectButton.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectButton.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectButton.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.es.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.es.js +4 -4
- package/dist/components/Form/Select/MultiSelect/useArrowNavigation.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/useArrowNavigation.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useArrowNavigation.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useMultiSelect.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/useMultiSelect.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useMultiSelect.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useSearch.es.js.map +1 -1
- package/dist/components/Form/Select/Select.interfaces.cjs.js.map +1 -1
- package/dist/components/Form/Select/Select.interfaces.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Option.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/Option.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Option.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.es.js +17 -17
- package/dist/components/Form/Select/SingleSelect/useArrowNavigation.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/useArrowNavigation.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/useArrowNavigation.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/useSearch.es.js.map +1 -1
- package/dist/components/Form/Select/useAddNewBtn.cjs.js +1 -1
- package/dist/components/Form/Select/useAddNewBtn.cjs.js.map +1 -1
- package/dist/components/Form/Select/useAddNewBtn.es.js.map +1 -1
- package/dist/components/Form/Select/useAddNewBtn.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/useAddNewBtn.module.scss.es.js +4 -4
- package/dist/components/Form/Select/useSelectPositionList.cjs.js +1 -1
- package/dist/components/Form/Select/useSelectPositionList.cjs.js.map +1 -1
- package/dist/components/Form/Select/useSelectPositionList.es.js.map +1 -1
- package/dist/components/Form/Textarea/Textarea.cjs.js +1 -1
- package/dist/components/Form/Textarea/Textarea.cjs.js.map +1 -1
- package/dist/components/Form/Textarea/Textarea.es.js +1 -0
- package/dist/components/Form/Textarea/Textarea.es.js.map +1 -1
- package/dist/components/Form/Textarea/Textarea.module.scss.cjs.js +2 -2
- package/dist/components/Form/Textarea/Textarea.module.scss.es.js +6 -6
- package/dist/components/Form/Toggle/Toggle.cjs.js +1 -1
- package/dist/components/Form/Toggle/Toggle.cjs.js.map +1 -1
- package/dist/components/Form/Toggle/Toggle.es.js.map +1 -1
- package/dist/components/Form/Toggle/Toggle.module.scss.cjs.js +2 -2
- package/dist/components/Form/Toggle/Toggle.module.scss.es.js +18 -18
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.es.js +9 -1
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.es.js +4 -4
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.es.js +9 -1
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.es.js +9 -1
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.es.js +10 -2
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.es.js +8 -8
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.es.js +6 -6
- package/dist/components/Icon/Icon.cjs.js +1 -1
- package/dist/components/Icon/Icon.cjs.js.map +1 -1
- package/dist/components/Icon/Icon.es.js.map +1 -1
- package/dist/components/Icon/Icon.module.scss.cjs.js +2 -2
- package/dist/components/Icon/Icon.module.scss.es.js +107 -107
- package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.cjs.js +1 -1
- package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.cjs.js.map +1 -1
- package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.es.js +11 -9
- package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.es.js.map +1 -1
- package/dist/components/InlineEditing/InlineEditingContext.cjs.js +1 -1
- package/dist/components/InlineEditing/InlineEditingContext.cjs.js.map +1 -1
- package/dist/components/InlineEditing/InlineEditingContext.es.js +40 -2
- package/dist/components/InlineEditing/InlineEditingContext.es.js.map +1 -1
- package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.cjs.js +1 -1
- package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.cjs.js.map +1 -1
- package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.es.js +13 -10
- package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.es.js.map +1 -1
- package/dist/components/Layout/Card/Card.cjs.js.map +1 -1
- package/dist/components/Layout/Card/Card.es.js.map +1 -1
- package/dist/components/Layout/Card/Card.module.scss.cjs.js +2 -2
- package/dist/components/Layout/Card/Card.module.scss.es.js +12 -12
- package/dist/components/Layout/ContentHeader/ContentHeader.cjs.js +1 -1
- package/dist/components/Layout/ContentHeader/ContentHeader.cjs.js.map +1 -1
- package/dist/components/Layout/ContentHeader/ContentHeader.es.js.map +1 -1
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.cjs.js +2 -2
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.es.js +12 -12
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.cjs.js.map +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.es.js.map +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.es.js +4 -4
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js.map +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.es.js +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.es.js.map +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.es.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js.map +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.es.js.map +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.es.js +3 -3
- package/dist/components/Link/Link.cjs.js +1 -1
- package/dist/components/Link/Link.cjs.js.map +1 -1
- package/dist/components/Link/Link.es.js.map +1 -1
- package/dist/components/Link/Link.module.scss.cjs.js +2 -2
- package/dist/components/Link/Link.module.scss.es.js +19 -16
- package/dist/components/Link/Link.module.scss.es.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.cjs.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.es.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.es.js +11 -11
- package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js +1 -1
- package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.es.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.cjs.js +1 -1
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.cjs.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.es.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.es.js +22 -22
- package/dist/components/Notifications/Alert/AlertProvider/AlertContext.cjs.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertProvider/AlertContext.es.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertProvider/AlertProvider.cjs.js +1 -1
- package/dist/components/Notifications/Alert/AlertProvider/AlertProvider.cjs.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertProvider/AlertProvider.es.js.map +1 -1
- package/dist/components/Notifications/Alert/useAlert.cjs.js.map +1 -1
- package/dist/components/Notifications/Alert/useAlert.es.js.map +1 -1
- package/dist/components/Notifications/Banner/Banner.cjs.js +1 -1
- package/dist/components/Notifications/Banner/Banner.cjs.js.map +1 -1
- package/dist/components/Notifications/Banner/Banner.es.js.map +1 -1
- package/dist/components/Notifications/Banner/Banner.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Banner/Banner.module.scss.es.js +9 -9
- package/dist/components/Notifications/BaseModal/BaseModal.cjs.js +1 -1
- package/dist/components/Notifications/BaseModal/BaseModal.cjs.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModal.es.js +1 -1
- package/dist/components/Notifications/BaseModal/BaseModal.es.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModal.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModal.module.scss.es.js +5 -5
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.cjs.js +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.cjs.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.es.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.es.js +4 -4
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.cjs.js +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.cjs.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.es.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.es.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.cjs.js +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.cjs.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.es.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.es.js +6 -6
- package/dist/components/Notifications/Dialog/Dialog.cjs.js +1 -1
- package/dist/components/Notifications/Dialog/Dialog.cjs.js.map +1 -1
- package/dist/components/Notifications/Dialog/Dialog.es.js +2 -2
- package/dist/components/Notifications/Dialog/Dialog.es.js.map +1 -1
- package/dist/components/Notifications/Dialog/Dialog.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/Dialog.module.scss.es.js +4 -4
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.cjs.js +1 -1
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.cjs.js.map +1 -1
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.es.js.map +1 -1
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.es.js +3 -3
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.cjs.js +1 -1
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.cjs.js.map +1 -1
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.es.js.map +1 -1
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.es.js +10 -10
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.cjs.js +1 -1
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.cjs.js.map +1 -1
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.es.js.map +1 -1
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesModal.cjs.js.map +1 -1
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesModal.es.js.map +1 -1
- package/dist/components/Notifications/NotificationProvider/NotificationContext.cjs.js +1 -1
- package/dist/components/Notifications/NotificationProvider/NotificationContext.cjs.js.map +1 -1
- package/dist/components/Notifications/NotificationProvider/NotificationContext.es.js +1 -1
- package/dist/components/Notifications/NotificationProvider/NotificationContext.es.js.map +1 -1
- package/dist/components/Notifications/NotificationProvider/NotificationService.es.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheet.cjs.js +1 -1
- package/dist/components/Notifications/SideSheet/SideSheet.cjs.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheet.es.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheet.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheet.module.scss.es.js +13 -13
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.cjs.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.es.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.es.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.cjs.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.es.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.es.js +2 -2
- package/dist/components/Notifications/SlideInModal/SlideInModal.cjs.js +1 -1
- package/dist/components/Notifications/SlideInModal/SlideInModal.cjs.js.map +1 -1
- package/dist/components/Notifications/SlideInModal/SlideInModal.es.js.map +1 -1
- package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.es.js +10 -10
- package/dist/components/Pagination/Pagination.cjs.js +1 -1
- package/dist/components/Pagination/Pagination.cjs.js.map +1 -1
- package/dist/components/Pagination/Pagination.es.js.map +1 -1
- package/dist/components/Pagination/Pagination.module.scss.cjs.js +2 -2
- package/dist/components/Pagination/Pagination.module.scss.es.js +14 -14
- package/dist/components/Popover/Popover.cjs.js +1 -1
- package/dist/components/Popover/Popover.cjs.js.map +1 -1
- package/dist/components/Popover/Popover.es.js.map +1 -1
- package/dist/components/Popover/Popover.module.scss.cjs.js +2 -2
- package/dist/components/Popover/Popover.module.scss.es.js +3 -3
- package/dist/components/ProgressBar/ProgressBar.cjs.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.es.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.module.scss.cjs.js +2 -2
- package/dist/components/ProgressBar/ProgressBar.module.scss.es.js +9 -9
- package/dist/components/RequiredSign/RequiredSign.cjs.js.map +1 -1
- package/dist/components/RequiredSign/RequiredSign.es.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.cjs.js +1 -1
- package/dist/components/Skeleton/Skeleton.cjs.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.es.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.module.scss.cjs.js +2 -2
- package/dist/components/Skeleton/Skeleton.module.scss.es.js +5 -5
- package/dist/components/Spinner/Spinner.cjs.js.map +1 -1
- package/dist/components/Spinner/Spinner.es.js.map +1 -1
- package/dist/components/Spinner/Spinner.module.scss.cjs.js +2 -2
- package/dist/components/Spinner/Spinner.module.scss.es.js +3 -3
- package/dist/components/Stepper/Step.cjs.js.map +1 -1
- package/dist/components/Stepper/Step.es.js.map +1 -1
- package/dist/components/Stepper/Step.module.scss.cjs.js +2 -2
- package/dist/components/Stepper/Step.module.scss.es.js +22 -22
- package/dist/components/Stepper/Stepper.cjs.js +1 -1
- package/dist/components/Stepper/Stepper.cjs.js.map +1 -1
- package/dist/components/Stepper/Stepper.es.js.map +1 -1
- package/dist/components/Stepper/Stepper.module.scss.cjs.js +2 -2
- package/dist/components/Stepper/Stepper.module.scss.es.js +4 -4
- package/dist/components/Tabs/Tab.cjs.js.map +1 -1
- package/dist/components/Tabs/Tab.es.js.map +1 -1
- package/dist/components/Tabs/Tab.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/Tab.module.scss.es.js +3 -3
- package/dist/components/Tabs/TabButton.cjs.js +1 -1
- package/dist/components/Tabs/TabButton.cjs.js.map +1 -1
- package/dist/components/Tabs/TabButton.es.js.map +1 -1
- package/dist/components/Tabs/TabButton.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/TabButton.module.scss.es.js +12 -12
- package/dist/components/Tabs/Tabs.cjs.js +1 -1
- package/dist/components/Tabs/Tabs.cjs.js.map +1 -1
- package/dist/components/Tabs/Tabs.es.js +61 -36
- package/dist/components/Tabs/Tabs.es.js.map +1 -1
- package/dist/components/Tabs/Tabs.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/Tabs.module.scss.es.js +10 -10
- package/dist/components/Tag/RemoveButton.cjs.js +1 -1
- package/dist/components/Tag/RemoveButton.cjs.js.map +1 -1
- package/dist/components/Tag/RemoveButton.es.js.map +1 -1
- package/dist/components/Tag/RemoveButton.module.scss.cjs.js +2 -2
- package/dist/components/Tag/RemoveButton.module.scss.es.js +3 -3
- package/dist/components/Tag/Tag.cjs.js +1 -1
- package/dist/components/Tag/Tag.cjs.js.map +1 -1
- package/dist/components/Tag/Tag.es.js.map +1 -1
- package/dist/components/Tag/Tag.module.scss.cjs.js +2 -2
- package/dist/components/Tag/Tag.module.scss.es.js +6 -6
- package/dist/components/TextEllipsis/TextEllipsis.cjs.js +1 -1
- package/dist/components/TextEllipsis/TextEllipsis.cjs.js.map +1 -1
- package/dist/components/TextEllipsis/TextEllipsis.es.js.map +1 -1
- package/dist/components/TextEllipsis/TextEllipsis.module.scss.cjs.js +2 -2
- package/dist/components/TextEllipsis/TextEllipsis.module.scss.es.js +3 -3
- package/dist/components/Tiles/Tile.cjs.js +1 -1
- package/dist/components/Tiles/Tile.cjs.js.map +1 -1
- package/dist/components/Tiles/Tile.es.js.map +1 -1
- package/dist/components/Tiles/Tile.module.scss.cjs.js +2 -2
- package/dist/components/Tiles/Tile.module.scss.es.js +8 -8
- package/dist/components/Tiles/Tiles.cjs.js +1 -1
- package/dist/components/Tiles/Tiles.cjs.js.map +1 -1
- package/dist/components/Tiles/Tiles.es.js.map +1 -1
- package/dist/components/Tiles/Tiles.module.scss.cjs.js +2 -2
- package/dist/components/Tiles/Tiles.module.scss.es.js +2 -2
- package/dist/components/Tooltip/Tooltip.cjs.js +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.es.js +1 -1
- package/dist/components/Tooltip/Tooltip.es.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.module.scss.cjs.js +2 -2
- package/dist/components/Tooltip/Tooltip.module.scss.es.js +27 -27
- package/dist/components/Typography/Typography.cjs.js +1 -1
- package/dist/components/Typography/Typography.cjs.js.map +1 -1
- package/dist/components/Typography/Typography.es.js.map +1 -1
- package/dist/components/Typography/Typography.module.scss.cjs.js +2 -2
- package/dist/components/Typography/Typography.module.scss.es.js +13 -13
- package/dist/components/_BaseStyling_/BaseStyling.cjs.js +1 -1
- package/dist/components/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
- package/dist/components/_BaseStyling_/BaseStyling.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.cjs.js +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.es.js +2 -0
- package/dist/components/admin/layout/LeftNav/LeftNav.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.es.js +5 -5
- package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.cjs.js +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.es.js +2 -0
- package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.cjs.js +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.es.js +14 -14
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.cjs.js +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.es.js +90 -2
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/useKeyboardNavigation.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/useKeyboardNavigation.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/useRefItems.cjs.js +1 -1
- package/dist/components/admin/layout/LeftNav/useRefItems.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/useRefItems.es.js.map +1 -1
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.cjs.js +1 -1
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.cjs.js.map +1 -1
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.es.js +1 -1
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.es.js.map +1 -1
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.es.js +3 -3
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.cjs.js +2 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.cjs.js.map +1 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.es.js +33 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.es.js.map +1 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.cjs.js +3 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.cjs.js.map +1 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.es.js +25 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.es.js.map +1 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.cjs.js +2 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.cjs.js.map +1 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.es.js +45 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.es.js.map +1 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.cjs.js +3 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.cjs.js.map +1 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.es.js +25 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.es.js.map +1 -0
- package/dist/components/miscellaneous/IdentityProviderButton.cjs.js.map +1 -1
- package/dist/components/miscellaneous/IdentityProviderButton.es.js.map +1 -1
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.cjs.js +2 -2
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.es.js +3 -3
- package/dist/components/withReadOnly.cjs.js +1 -1
- package/dist/components/withReadOnly.cjs.js.map +1 -1
- package/dist/components/withReadOnly.es.js.map +1 -1
- package/dist/hooks/useAnimation.cjs.js +1 -1
- package/dist/hooks/useAnimation.cjs.js.map +1 -1
- package/dist/hooks/useAnimation.es.js.map +1 -1
- package/dist/hooks/useClickOutside.cjs.js +1 -1
- package/dist/hooks/useClickOutside.cjs.js.map +1 -1
- package/dist/hooks/useClickOutside.es.js.map +1 -1
- package/dist/hooks/useDebouncedCallback.cjs.js +1 -1
- package/dist/hooks/useDebouncedCallback.cjs.js.map +1 -1
- package/dist/hooks/useDebouncedCallback.es.js.map +1 -1
- package/dist/hooks/useDescribedBy.cjs.js +2 -0
- package/dist/hooks/useDescribedBy.cjs.js.map +1 -0
- package/dist/hooks/useDescribedBy.es.js +30 -0
- package/dist/hooks/useDescribedBy.es.js.map +1 -0
- package/dist/hooks/useDetermineStatusIcon.cjs.js.map +1 -1
- package/dist/hooks/useDetermineStatusIcon.es.js.map +1 -1
- package/dist/hooks/useFormSelector.cjs.js +1 -1
- package/dist/hooks/useFormSelector.cjs.js.map +1 -1
- package/dist/hooks/useFormSelector.es.js +11 -16
- package/dist/hooks/useFormSelector.es.js.map +1 -1
- package/dist/hooks/useFullHeightCollapse.cjs.js.map +1 -1
- package/dist/hooks/useFullHeightCollapse.es.js.map +1 -1
- package/dist/hooks/useGetDomRoot.cjs.js +1 -1
- package/dist/hooks/useGetDomRoot.cjs.js.map +1 -1
- package/dist/hooks/useGetDomRoot.es.js.map +1 -1
- package/dist/hooks/usePosition.cjs.js +1 -1
- package/dist/hooks/usePosition.cjs.js.map +1 -1
- package/dist/hooks/usePosition.es.js.map +1 -1
- package/dist/hooks/useRepeatFocus.cjs.js +1 -1
- package/dist/hooks/useRepeatFocus.cjs.js.map +1 -1
- package/dist/hooks/useRepeatFocus.es.js +6 -23
- package/dist/hooks/useRepeatFocus.es.js.map +1 -1
- package/dist/hooks/useRepeater.cjs.js +1 -1
- package/dist/hooks/useRepeater.cjs.js.map +1 -1
- package/dist/hooks/useRepeater.es.js.map +1 -1
- package/dist/hooks/useScreenSize.cjs.js +1 -1
- package/dist/hooks/useScreenSize.cjs.js.map +1 -1
- package/dist/hooks/useScreenSize.es.js.map +1 -1
- package/dist/hooks/useSpacing.cjs.js +1 -1
- package/dist/hooks/useSpacing.cjs.js.map +1 -1
- package/dist/hooks/useSpacing.es.js.map +1 -1
- package/dist/hooks/useUploadFile.cjs.js +1 -1
- package/dist/hooks/useUploadFile.cjs.js.map +1 -1
- package/dist/hooks/useUploadFile.es.js.map +1 -1
- package/dist/hooks/useWrapper.cjs.js.map +1 -1
- package/dist/hooks/useWrapper.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +48 -4
- package/dist/index.es.js +6 -0
- package/dist/index.es.js.map +1 -1
- package/dist/node_modules/tabbable/dist/index.esm.cjs.js +2 -0
- package/dist/node_modules/tabbable/dist/index.esm.cjs.js.map +1 -0
- package/dist/node_modules/tabbable/dist/index.esm.es.js +322 -0
- package/dist/node_modules/tabbable/dist/index.esm.es.js.map +1 -0
- package/dist/readyclasses.module.scss.cjs.js +2 -2
- package/dist/readyclasses.module.scss.es.js +5 -5
- package/dist/util/helper.cjs.js +1 -1
- package/dist/util/helper.cjs.js.map +1 -1
- package/dist/util/helper.es.js +1 -1
- package/dist/util/helper.es.js.map +1 -1
- package/dist/utils/focusManagement.cjs.js +2 -0
- package/dist/utils/focusManagement.cjs.js.map +1 -0
- package/dist/utils/focusManagement.es.js +8 -0
- package/dist/utils/focusManagement.es.js.map +1 -0
- package/dist/utils/statusUtils.cjs.js.map +1 -1
- package/dist/utils/statusUtils.es.js.map +1 -1
- package/dist/variables.cjs.js.map +1 -1
- package/dist/variables.es.js.map +1 -1
- package/package.json +26 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withReadOnly.cjs.js","sources":["../../src/components/withReadOnly.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentType, ForwardedRef, PropsWithChildren } from \"react\";\n\nexport interface WithReadOnlyProps {\n readOnlyView?: boolean;\n required?: boolean;\n helperText?: string;\n type?: string;\n}\n\nconst componentsWithKeyEventsToPrevent: string[] = [\"CheckboxWrapper\"];\n\nconst getDisplayName = <P,>(WrappedComponent: ComponentType<P>) => {\n return WrappedComponent.displayName ?? WrappedComponent.name ?? \"Component\";\n};\n\nconst getConditionalProps = (readOnlyView: boolean, type: string, helperText?: string) => {\n const props: Record<string, unknown> = {};\n\n if (readOnlyView) {\n props.style = { pointerEvents: \"none\", userSelect: \"text\" };\n if (helperText) {\n props.helperText = \"\";\n }\n } else if (helperText) {\n props.helperText = helperText;\n }\n\n if (type) {\n props.type = type;\n }\n\n return props;\n};\n\ntype WithReadOnlyOptions = {\n isWrapperComponent: boolean;\n};\n\nexport const withReadOnly = <P extends object>(\n WrappedComponent: ComponentType<P>,\n options?: WithReadOnlyOptions\n) => {\n const { isWrapperComponent } = options || {};\n\n const preventKeyUpAndKeyDownHandlerForSpecificComponents = (readOnlyView: boolean) => {\n const preventSubmissionKeys = (e: KeyboardEvent) => {\n const isEnterOrSpace = (e: KeyboardEvent) => e.key === \"Enter\" || e.key === \" \";\n if (isEnterOrSpace(e)) {\n e.stopPropagation();\n e.preventDefault();\n }\n };\n\n if (\n readOnlyView &&\n componentsWithKeyEventsToPrevent.includes(\n WrappedComponent.displayName || WrappedComponent.name\n )\n ) {\n const props: Record<string, unknown> = {};\n\n props.onKeyUp = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n props.onKeyDown = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n return props;\n }\n\n return {};\n };\n\n const WithReadOnlyComponent = React.forwardRef(\n (props: PropsWithChildren<P & WithReadOnlyProps
|
|
1
|
+
{"version":3,"file":"withReadOnly.cjs.js","sources":["../../src/components/withReadOnly.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentType, ForwardedRef, PropsWithChildren, PropsWithoutRef } from \"react\";\n\nexport interface WithReadOnlyProps {\n readOnlyView?: boolean;\n required?: boolean;\n helperText?: string;\n type?: string;\n}\n\nconst componentsWithKeyEventsToPrevent: string[] = [\"CheckboxWrapper\"];\n\nconst getDisplayName = <P,>(WrappedComponent: ComponentType<P>) => {\n return WrappedComponent.displayName ?? WrappedComponent.name ?? \"Component\";\n};\n\nconst getConditionalProps = (readOnlyView: boolean, type: string, helperText?: string) => {\n const props: Record<string, unknown> = {};\n\n if (readOnlyView) {\n props.style = { pointerEvents: \"none\", userSelect: \"text\" };\n if (helperText) {\n props.helperText = \"\";\n }\n } else if (helperText) {\n props.helperText = helperText;\n }\n\n if (type) {\n props.type = type;\n }\n\n return props;\n};\n\ntype WithReadOnlyOptions = {\n isWrapperComponent: boolean;\n};\n\nexport const withReadOnly = <P extends object>(\n WrappedComponent: ComponentType<P>,\n options?: WithReadOnlyOptions\n) => {\n const { isWrapperComponent } = options || {};\n\n const preventKeyUpAndKeyDownHandlerForSpecificComponents = (readOnlyView: boolean) => {\n const preventSubmissionKeys = (e: KeyboardEvent) => {\n const isEnterOrSpace = (e: KeyboardEvent) => e.key === \"Enter\" || e.key === \" \";\n if (isEnterOrSpace(e)) {\n e.stopPropagation();\n e.preventDefault();\n }\n };\n\n if (\n readOnlyView &&\n componentsWithKeyEventsToPrevent.includes(\n WrappedComponent.displayName || WrappedComponent.name\n )\n ) {\n const props: Record<string, unknown> = {};\n\n props.onKeyUp = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n props.onKeyDown = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n return props;\n }\n\n return {};\n };\n\n const WithReadOnlyComponent = React.forwardRef(\n (\n props: PropsWithoutRef<PropsWithChildren<P & WithReadOnlyProps>>,\n ref: ForwardedRef<unknown>\n ) => {\n const {\n readOnlyView = false,\n required,\n children,\n helperText,\n type = \"\",\n ...restProps\n } = props;\n\n return (\n <WrappedComponent\n ref={ref}\n {...(restProps as P)}\n data-readonlyview={readOnlyView}\n aria-readonly={isWrapperComponent ? undefined : readOnlyView}\n required={readOnlyView ? false : required}\n {...getConditionalProps(readOnlyView, type, helperText)}\n {...preventKeyUpAndKeyDownHandlerForSpecificComponents(readOnlyView)}\n >\n {children}\n </WrappedComponent>\n );\n }\n );\n\n WithReadOnlyComponent.displayName = `withReadOnly_${getDisplayName(WrappedComponent)}`;\n return WithReadOnlyComponent;\n};\n"],"names":["componentsWithKeyEventsToPrevent","getConditionalProps","readOnlyView","type","helperText","props","style","pointerEvents","userSelect","WrappedComponent","options","isWrapperComponent","preventKeyUpAndKeyDownHandlerForSpecificComponents","preventSubmissionKeys","e","key","stopPropagation","preventDefault","includes","displayName","name","WithReadOnlyComponent","React","forwardRef","ref","required","children","restProps","createElement","getDisplayName"],"mappings":"yGAyBMA,EAA6C,CAAC,mBAM9CC,EAAsB,CAACC,EAAuBC,EAAcC,KAChE,MAAMC,EAAiC,CAAA,EAevC,OAbIH,GACFG,EAAMC,MAAQ,CAAEC,cAAe,OAAQC,WAAY,QAC/CJ,IACFC,EAAMD,WAAa,KAEZA,IACTC,EAAMD,WAAaA,GAGjBD,IACFE,EAAMF,KAAOA,GAGRE,wBAOmB,CAC1BI,EACAC,KAEA,MAAMC,mBAAEA,GAAuBD,GAAW,CAAA,EAEpCE,EAAsDV,IAC1D,MAAMW,EAAyBC,IACN,IAACA,GAA+B,WAA/BA,EACLA,GAD4BC,KAA6B,MAAVD,EAAEC,OAElED,EAAEE,kBACFF,EAAEG,mBAIN,GACEf,GACAF,EAAiCkB,SAC/BT,EAAiBU,aAAeV,EAAiBW,MAEnD,CAWA,MAVuC,CAEvCf,QAAiBS,IACfD,EAAsBC,IAGxBT,UAAmBS,IACjBD,EAAsBC,IAI1B,CAEA,MAAO,CAAA,GAGHO,EAAwBC,EAAMC,WAClC,CACElB,EACAmB,KAEA,MAAMtB,aACJA,GAAe,EAAAuB,SACfA,EAAAC,SACAA,EAAAtB,WACAA,EAAAD,KACAA,EAAO,MACJwB,GACDtB,EAEJ,OACEiB,EAAAM,cAACnB,EAAA,CACCe,SACKG,EACL,oBAAmBzB,EACnB,gBAAeS,OAAqB,EAAYT,EAChDuB,UAAUvB,GAAuBuB,KAC7BxB,EAAoBC,EAAcC,EAAMC,MACxCQ,EAAmDV,IAEtDwB,KAOT,OADAL,EAAsBF,YAAc,gBA9Ff,CAAKV,GACnBA,EAAiBU,aAAeV,EAAiBW,MAAQ,YA6FZS,CAAepB,KAC5DY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withReadOnly.es.js","sources":["../../src/components/withReadOnly.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentType, ForwardedRef, PropsWithChildren } from \"react\";\n\nexport interface WithReadOnlyProps {\n readOnlyView?: boolean;\n required?: boolean;\n helperText?: string;\n type?: string;\n}\n\nconst componentsWithKeyEventsToPrevent: string[] = [\"CheckboxWrapper\"];\n\nconst getDisplayName = <P,>(WrappedComponent: ComponentType<P>) => {\n return WrappedComponent.displayName ?? WrappedComponent.name ?? \"Component\";\n};\n\nconst getConditionalProps = (readOnlyView: boolean, type: string, helperText?: string) => {\n const props: Record<string, unknown> = {};\n\n if (readOnlyView) {\n props.style = { pointerEvents: \"none\", userSelect: \"text\" };\n if (helperText) {\n props.helperText = \"\";\n }\n } else if (helperText) {\n props.helperText = helperText;\n }\n\n if (type) {\n props.type = type;\n }\n\n return props;\n};\n\ntype WithReadOnlyOptions = {\n isWrapperComponent: boolean;\n};\n\nexport const withReadOnly = <P extends object>(\n WrappedComponent: ComponentType<P>,\n options?: WithReadOnlyOptions\n) => {\n const { isWrapperComponent } = options || {};\n\n const preventKeyUpAndKeyDownHandlerForSpecificComponents = (readOnlyView: boolean) => {\n const preventSubmissionKeys = (e: KeyboardEvent) => {\n const isEnterOrSpace = (e: KeyboardEvent) => e.key === \"Enter\" || e.key === \" \";\n if (isEnterOrSpace(e)) {\n e.stopPropagation();\n e.preventDefault();\n }\n };\n\n if (\n readOnlyView &&\n componentsWithKeyEventsToPrevent.includes(\n WrappedComponent.displayName || WrappedComponent.name\n )\n ) {\n const props: Record<string, unknown> = {};\n\n props.onKeyUp = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n props.onKeyDown = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n return props;\n }\n\n return {};\n };\n\n const WithReadOnlyComponent = React.forwardRef(\n (props: PropsWithChildren<P & WithReadOnlyProps
|
|
1
|
+
{"version":3,"file":"withReadOnly.es.js","sources":["../../src/components/withReadOnly.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentType, ForwardedRef, PropsWithChildren, PropsWithoutRef } from \"react\";\n\nexport interface WithReadOnlyProps {\n readOnlyView?: boolean;\n required?: boolean;\n helperText?: string;\n type?: string;\n}\n\nconst componentsWithKeyEventsToPrevent: string[] = [\"CheckboxWrapper\"];\n\nconst getDisplayName = <P,>(WrappedComponent: ComponentType<P>) => {\n return WrappedComponent.displayName ?? WrappedComponent.name ?? \"Component\";\n};\n\nconst getConditionalProps = (readOnlyView: boolean, type: string, helperText?: string) => {\n const props: Record<string, unknown> = {};\n\n if (readOnlyView) {\n props.style = { pointerEvents: \"none\", userSelect: \"text\" };\n if (helperText) {\n props.helperText = \"\";\n }\n } else if (helperText) {\n props.helperText = helperText;\n }\n\n if (type) {\n props.type = type;\n }\n\n return props;\n};\n\ntype WithReadOnlyOptions = {\n isWrapperComponent: boolean;\n};\n\nexport const withReadOnly = <P extends object>(\n WrappedComponent: ComponentType<P>,\n options?: WithReadOnlyOptions\n) => {\n const { isWrapperComponent } = options || {};\n\n const preventKeyUpAndKeyDownHandlerForSpecificComponents = (readOnlyView: boolean) => {\n const preventSubmissionKeys = (e: KeyboardEvent) => {\n const isEnterOrSpace = (e: KeyboardEvent) => e.key === \"Enter\" || e.key === \" \";\n if (isEnterOrSpace(e)) {\n e.stopPropagation();\n e.preventDefault();\n }\n };\n\n if (\n readOnlyView &&\n componentsWithKeyEventsToPrevent.includes(\n WrappedComponent.displayName || WrappedComponent.name\n )\n ) {\n const props: Record<string, unknown> = {};\n\n props.onKeyUp = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n props.onKeyDown = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n return props;\n }\n\n return {};\n };\n\n const WithReadOnlyComponent = React.forwardRef(\n (\n props: PropsWithoutRef<PropsWithChildren<P & WithReadOnlyProps>>,\n ref: ForwardedRef<unknown>\n ) => {\n const {\n readOnlyView = false,\n required,\n children,\n helperText,\n type = \"\",\n ...restProps\n } = props;\n\n return (\n <WrappedComponent\n ref={ref}\n {...(restProps as P)}\n data-readonlyview={readOnlyView}\n aria-readonly={isWrapperComponent ? undefined : readOnlyView}\n required={readOnlyView ? false : required}\n {...getConditionalProps(readOnlyView, type, helperText)}\n {...preventKeyUpAndKeyDownHandlerForSpecificComponents(readOnlyView)}\n >\n {children}\n </WrappedComponent>\n );\n }\n );\n\n WithReadOnlyComponent.displayName = `withReadOnly_${getDisplayName(WrappedComponent)}`;\n return WithReadOnlyComponent;\n};\n"],"names":["e"],"mappings":";AAyBA,MAAM,mCAA6C,CAAC,iBAAiB;AAErE,MAAM,iBAAiB,CAAK,qBAAuC;AACjE,SAAO,iBAAiB,eAAe,iBAAiB,QAAQ;AAClE;AAEA,MAAM,sBAAsB,CAAC,cAAuB,MAAc,eAAwB;AACxF,QAAM,QAAiC,CAAA;AAEvC,MAAI,cAAc;AAChB,UAAM,QAAQ,EAAE,eAAe,QAAQ,YAAY,OAAA;AACnD,QAAI,YAAY;AACd,YAAM,aAAa;AAAA,IACrB;AAAA,EACF,WAAW,YAAY;AACrB,UAAM,aAAa;AAAA,EACrB;AAEA,MAAI,MAAM;AACR,UAAM,OAAO;AAAA,EACf;AAEA,SAAO;AACT;AAMO,MAAM,eAAe,CAC1B,kBACA,YACG;AACH,QAAM,EAAE,uBAAuB,WAAW,CAAA;AAE1C,QAAM,qDAAqD,CAAC,iBAA0B;AACpF,UAAM,wBAAwB,CAAC,MAAqB;AAClD,YAAM,iBAAiB,CAACA,OAAqBA,GAAE,QAAQ,WAAWA,GAAE,QAAQ;AAC5E,UAAI,eAAe,CAAC,GAAG;AACrB,UAAE,gBAAA;AACF,UAAE,eAAA;AAAA,MACJ;AAAA,IACF;AAEA,QACE,gBACA,iCAAiC;AAAA,MAC/B,iBAAiB,eAAe,iBAAiB;AAAA,IAAA,GAEnD;AACA,YAAM,QAAiC,CAAA;AAEvC,YAAM,UAAU,CAAC,MAAqB;AACpC,8BAAsB,CAAC;AAAA,MACzB;AAEA,YAAM,YAAY,CAAC,MAAqB;AACtC,8BAAsB,CAAC;AAAA,MACzB;AAEA,aAAO;AAAA,IACT;AAEA,WAAO,CAAA;AAAA,EACT;AAEA,QAAM,wBAAwB,MAAM;AAAA,IAClC,CACE,OACA,QACG;AACH,YAAM;AAAA,QACJ,eAAe;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA,OAAO;AAAA,QACP,GAAG;AAAA,MAAA,IACD;AAEJ,aACE,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACC,GAAI;AAAA,UACL,qBAAmB;AAAA,UACnB,iBAAe,qBAAqB,SAAY;AAAA,UAChD,UAAU,eAAe,QAAQ;AAAA,UAChC,GAAG,oBAAoB,cAAc,MAAM,UAAU;AAAA,UACrD,GAAG,mDAAmD,YAAY;AAAA,QAAA;AAAA,QAElE;AAAA,MAAA;AAAA,IAGP;AAAA,EAAA;AAGF,wBAAsB,cAAc,gBAAgB,eAAe,gBAAgB,CAAC;AACpF,SAAO;AACT;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useAnimation=t=>{const n=e.useRef(null),[r,a]=e.useState(!1),i=()=>r&&t();return e.useEffect((
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useAnimation=t=>{const n=e.useRef(null),[r,a]=e.useState(!1),i=()=>r&&t();return e.useEffect(()=>{var e;return null==(e=n.current)||e.addEventListener("animationend",i),()=>{var e;return null==(e=n.current)?void 0:e.removeEventListener("animationend",i)}},[r]),{ref:n,animationStarted:r,startAnimation:()=>a(!0)}};
|
|
2
2
|
//# sourceMappingURL=useAnimation.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAnimation.cjs.js","sources":["../../src/hooks/useAnimation.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useRef, useState } from \"react\";\n\nexport const useAnimation = <RefElement extends HTMLElement>(callback: () => void) => {\n const animatedObjectRef = useRef<RefElement>(null);\n /** We need to store flag that says us when to call the callback */\n const [animationStarted, setAnimationStarted] = useState(false);\n\n const onAnimationEnd = () => animationStarted && callback();\n\n useEffect(() => {\n animatedObjectRef.current?.addEventListener(\"animationend\", onAnimationEnd);\n return () => animatedObjectRef.current?.removeEventListener(\"animationend\", onAnimationEnd);\n }, [animationStarted]);\n\n return {\n ref: animatedObjectRef,\n animationStarted,\n startAnimation: () => setAnimationStarted(true)\n };\n};\n"],"names":["callback","animatedObjectRef","useRef","animationStarted","setAnimationStarted","useState","onAnimationEnd","useEffect","_a","current","addEventListener","removeEventListener","ref","startAnimation"],"mappings":"8HAkB6DA,
|
|
1
|
+
{"version":3,"file":"useAnimation.cjs.js","sources":["../../src/hooks/useAnimation.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useRef, useState } from \"react\";\n\nexport const useAnimation = <RefElement extends HTMLElement>(callback: () => void) => {\n const animatedObjectRef = useRef<RefElement>(null);\n /** We need to store flag that says us when to call the callback */\n const [animationStarted, setAnimationStarted] = useState(false);\n\n const onAnimationEnd = () => animationStarted && callback();\n\n useEffect(() => {\n animatedObjectRef.current?.addEventListener(\"animationend\", onAnimationEnd);\n return () => animatedObjectRef.current?.removeEventListener(\"animationend\", onAnimationEnd);\n }, [animationStarted]);\n\n return {\n ref: animatedObjectRef,\n animationStarted,\n startAnimation: () => setAnimationStarted(true)\n };\n};\n"],"names":["callback","animatedObjectRef","useRef","animationStarted","setAnimationStarted","useState","onAnimationEnd","useEffect","_a","current","addEventListener","removeEventListener","ref","startAnimation"],"mappings":"8HAkB6DA,IAC3D,MAAMC,EAAoBC,EAAAA,OAAmB,OAEtCC,EAAkBC,GAAuBC,EAAAA,UAAS,GAEnDC,EAAiB,IAAMH,GAAoBH,IAOjD,OALAO,EAAAA,UAAU,WAER,OADA,OAAAC,EAAAP,EAAkBQ,UAAlBD,EAA2BE,iBAAiB,eAAgBJ,GACrD,WAAM,OAAA,OAAAE,EAAAP,EAAkBQ,cAAlB,EAAAD,EAA2BG,oBAAoB,eAAgBL,KAC3E,CAACH,IAEG,CACLS,IAAKX,EACLE,mBACAU,eAAgB,IAAMT,GAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAnimation.es.js","sources":["../../src/hooks/useAnimation.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useRef, useState } from \"react\";\n\nexport const useAnimation = <RefElement extends HTMLElement>(callback: () => void) => {\n const animatedObjectRef = useRef<RefElement>(null);\n /** We need to store flag that says us when to call the callback */\n const [animationStarted, setAnimationStarted] = useState(false);\n\n const onAnimationEnd = () => animationStarted && callback();\n\n useEffect(() => {\n animatedObjectRef.current?.addEventListener(\"animationend\", onAnimationEnd);\n return () => animatedObjectRef.current?.removeEventListener(\"animationend\", onAnimationEnd);\n }, [animationStarted]);\n\n return {\n ref: animatedObjectRef,\n animationStarted,\n startAnimation: () => setAnimationStarted(true)\n };\n};\n"],"names":["_a"],"mappings":";
|
|
1
|
+
{"version":3,"file":"useAnimation.es.js","sources":["../../src/hooks/useAnimation.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useRef, useState } from \"react\";\n\nexport const useAnimation = <RefElement extends HTMLElement>(callback: () => void) => {\n const animatedObjectRef = useRef<RefElement>(null);\n /** We need to store flag that says us when to call the callback */\n const [animationStarted, setAnimationStarted] = useState(false);\n\n const onAnimationEnd = () => animationStarted && callback();\n\n useEffect(() => {\n animatedObjectRef.current?.addEventListener(\"animationend\", onAnimationEnd);\n return () => animatedObjectRef.current?.removeEventListener(\"animationend\", onAnimationEnd);\n }, [animationStarted]);\n\n return {\n ref: animatedObjectRef,\n animationStarted,\n startAnimation: () => setAnimationStarted(true)\n };\n};\n"],"names":["_a"],"mappings":";AAkBO,MAAM,eAAe,CAAiC,aAAyB;AACpF,QAAM,oBAAoB,OAAmB,IAAI;AAEjD,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAS,KAAK;AAE9D,QAAM,iBAAiB,MAAM,oBAAoB,SAAA;AAEjD,YAAU,MAAM;;AACd,4BAAkB,YAAlB,mBAA2B,iBAAiB,gBAAgB;AAC5D,WAAO,MAAA;;AAAM,cAAAA,MAAA,kBAAkB,YAAlB,gBAAAA,IAA2B,oBAAoB,gBAAgB;AAAA;AAAA,EAC9E,GAAG,CAAC,gBAAgB,CAAC;AAErB,SAAO;AAAA,IACL,KAAK;AAAA,IACL;AAAA,IACA,gBAAgB,MAAM,oBAAoB,IAAI;AAAA,EAAA;AAElD;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useClickOutside=(t,i,n)=>{function o(e){const n=null==t?void 0:t.current;n&&(n.contains(e.target)||i(e))}e.useEffect((
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useClickOutside=(t,i,n)=>{function o(e){const n=null==t?void 0:t.current;n&&(n.contains(e.target)||i(e))}e.useEffect(()=>(setTimeout(()=>window.addEventListener("click",o)),()=>{setTimeout(()=>window.removeEventListener("click",o))}),n)};
|
|
2
2
|
//# sourceMappingURL=useClickOutside.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useClickOutside.cjs.js","sources":["../../src/hooks/useClickOutside.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DependencyList, useEffect } from \"react\";\n\nexport const useClickOutside = (\n myElementRef: React.RefObject<HTMLElement>,\n onClickOutside: (event: MouseEvent) => void,\n dependencies?: DependencyList\n) => {\n function eventListener(event: MouseEvent) {\n const myElement = myElementRef?.current;\n if (!myElement) {\n return;\n }\n const clickedInsideMyElement = myElement.contains(event.target as Node);\n\n if (!clickedInsideMyElement) {\n onClickOutside(event);\n }\n }\n useEffect(() => {\n setTimeout(() => window.addEventListener(\"click\", eventListener));\n\n return () => {\n setTimeout(() => window.removeEventListener(\"click\", eventListener));\n };\n }, dependencies);\n};\n"],"names":["myElementRef","onClickOutside","dependencies","eventListener","event","myElement","current","contains","target","useEffect","setTimeout","window","addEventListener","removeEventListener"],"mappings":"iIAkB+B,CAC7BA,EACAC,EACAC,KAEA,SAASC,EAAcC,GACrB,MAAMC,
|
|
1
|
+
{"version":3,"file":"useClickOutside.cjs.js","sources":["../../src/hooks/useClickOutside.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DependencyList, useEffect } from \"react\";\n\nexport const useClickOutside = (\n myElementRef: React.RefObject<HTMLElement>,\n onClickOutside: (event: MouseEvent) => void,\n dependencies?: DependencyList\n) => {\n function eventListener(event: MouseEvent) {\n const myElement = myElementRef?.current;\n if (!myElement) {\n return;\n }\n const clickedInsideMyElement = myElement.contains(event.target as Node);\n\n if (!clickedInsideMyElement) {\n onClickOutside(event);\n }\n }\n useEffect(() => {\n setTimeout(() => window.addEventListener(\"click\", eventListener));\n\n return () => {\n setTimeout(() => window.removeEventListener(\"click\", eventListener));\n };\n }, dependencies);\n};\n"],"names":["myElementRef","onClickOutside","dependencies","eventListener","event","myElement","current","contains","target","useEffect","setTimeout","window","addEventListener","removeEventListener"],"mappings":"iIAkB+B,CAC7BA,EACAC,EACAC,KAEA,SAASC,EAAcC,GACrB,MAAMC,EAAY,MAAAL,OAAA,EAAAA,EAAcM,QAC3BD,IAG0BA,EAAUE,SAASH,EAAMI,SAGtDP,EAAeG,GAEnB,CACAK,EAAAA,UAAU,KACRC,WAAW,IAAMC,OAAOC,iBAAiB,QAAST,IAE3C,KACLO,WAAW,IAAMC,OAAOE,oBAAoB,QAASV,MAEtDD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useClickOutside.es.js","sources":["../../src/hooks/useClickOutside.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DependencyList, useEffect } from \"react\";\n\nexport const useClickOutside = (\n myElementRef: React.RefObject<HTMLElement>,\n onClickOutside: (event: MouseEvent) => void,\n dependencies?: DependencyList\n) => {\n function eventListener(event: MouseEvent) {\n const myElement = myElementRef?.current;\n if (!myElement) {\n return;\n }\n const clickedInsideMyElement = myElement.contains(event.target as Node);\n\n if (!clickedInsideMyElement) {\n onClickOutside(event);\n }\n }\n useEffect(() => {\n setTimeout(() => window.addEventListener(\"click\", eventListener));\n\n return () => {\n setTimeout(() => window.removeEventListener(\"click\", eventListener));\n };\n }, dependencies);\n};\n"],"names":[],"mappings":";AAkBO,MAAM,kBAAkB,CAC7B,cACA,gBACA,iBACG;AACH,WAAS,cAAc,OAAmB;AACxC,UAAM,YAAY,6CAAc;AAChC,QAAI,CAAC,WAAW;AACd;AAAA,
|
|
1
|
+
{"version":3,"file":"useClickOutside.es.js","sources":["../../src/hooks/useClickOutside.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DependencyList, useEffect } from \"react\";\n\nexport const useClickOutside = (\n myElementRef: React.RefObject<HTMLElement>,\n onClickOutside: (event: MouseEvent) => void,\n dependencies?: DependencyList\n) => {\n function eventListener(event: MouseEvent) {\n const myElement = myElementRef?.current;\n if (!myElement) {\n return;\n }\n const clickedInsideMyElement = myElement.contains(event.target as Node);\n\n if (!clickedInsideMyElement) {\n onClickOutside(event);\n }\n }\n useEffect(() => {\n setTimeout(() => window.addEventListener(\"click\", eventListener));\n\n return () => {\n setTimeout(() => window.removeEventListener(\"click\", eventListener));\n };\n }, dependencies);\n};\n"],"names":[],"mappings":";AAkBO,MAAM,kBAAkB,CAC7B,cACA,gBACA,iBACG;AACH,WAAS,cAAc,OAAmB;AACxC,UAAM,YAAY,6CAAc;AAChC,QAAI,CAAC,WAAW;AACd;AAAA,IACF;AACA,UAAM,yBAAyB,UAAU,SAAS,MAAM,MAAc;AAEtE,QAAI,CAAC,wBAAwB;AAC3B,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF;AACA,YAAU,MAAM;AACd,eAAW,MAAM,OAAO,iBAAiB,SAAS,aAAa,CAAC;AAEhE,WAAO,MAAM;AACX,iBAAW,MAAM,OAAO,oBAAoB,SAAS,aAAa,CAAC;AAAA,IACrE;AAAA,EACF,GAAG,YAAY;AACjB;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useDebouncedCallback=(r,t,u)=>{const c=e.useRef(),o=u?[r,t,...u]:[r,t];return e.useCallback((
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useDebouncedCallback=(r,t,u)=>{const c=e.useRef(),o=u?[r,t,...u]:[r,t];return e.useCallback((...e)=>{null!=c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{r(...e)},t)},o)};
|
|
2
2
|
//# sourceMappingURL=useDebouncedCallback.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDebouncedCallback.cjs.js","sources":["../../src/hooks/useDebouncedCallback.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\
|
|
1
|
+
{"version":3,"file":"useDebouncedCallback.cjs.js","sources":["../../src/hooks/useDebouncedCallback.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\nexport const useDebouncedCallback = <T extends unknown[]>(\n callback: (...args: T) => void,\n delay: number,\n dependencies?: React.DependencyList\n) => {\n const timeout = React.useRef<ReturnType<typeof setTimeout>>();\n const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];\n\n return React.useCallback((...args: T) => {\n if (timeout.current != null) {\n clearTimeout(timeout.current);\n }\n\n timeout.current = setTimeout(() => {\n callback(...args);\n }, delay);\n }, comboDeps);\n};\n"],"names":["callback","delay","dependencies","timeout","React","useRef","comboDeps","useCallback","args","current","clearTimeout","setTimeout"],"mappings":"sIAkBoC,CAClCA,EACAC,EACAC,KAEA,MAAMC,EAAUC,EAAMC,SAChBC,EAAYJ,EAAe,CAACF,EAAUC,KAAUC,GAAgB,CAACF,EAAUC,GAEjF,OAAOG,EAAMG,YAAY,IAAIC,KACJ,MAAnBL,EAAQM,SACVC,aAAaP,EAAQM,SAGvBN,EAAQM,QAAUE,WAAW,KAC3BX,KAAYQ,IACXP,IACFK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDebouncedCallback.es.js","sources":["../../src/hooks/useDebouncedCallback.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\
|
|
1
|
+
{"version":3,"file":"useDebouncedCallback.es.js","sources":["../../src/hooks/useDebouncedCallback.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\nexport const useDebouncedCallback = <T extends unknown[]>(\n callback: (...args: T) => void,\n delay: number,\n dependencies?: React.DependencyList\n) => {\n const timeout = React.useRef<ReturnType<typeof setTimeout>>();\n const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];\n\n return React.useCallback((...args: T) => {\n if (timeout.current != null) {\n clearTimeout(timeout.current);\n }\n\n timeout.current = setTimeout(() => {\n callback(...args);\n }, delay);\n }, comboDeps);\n};\n"],"names":[],"mappings":";AAkBO,MAAM,uBAAuB,CAClC,UACA,OACA,iBACG;AACH,QAAM,UAAU,MAAM,OAAA;AACtB,QAAM,YAAY,eAAe,CAAC,UAAU,OAAO,GAAG,YAAY,IAAI,CAAC,UAAU,KAAK;AAEtF,SAAO,MAAM,YAAY,IAAI,SAAY;AACvC,QAAI,QAAQ,WAAW,MAAM;AAC3B,mBAAa,QAAQ,OAAO;AAAA,IAC9B;AAEA,YAAQ,UAAU,WAAW,MAAM;AACjC,eAAS,GAAG,IAAI;AAAA,IAClB,GAAG,KAAK;AAAA,EACV,GAAG,SAAS;AACd;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),exports.useDescribedBy=({error:e,errorMessage:r,helperText:o,helperId:t,errorId:d,parentErrorId:p,parentHelperId:s})=>e?p||(r?d:void 0):o?t:s||void 0;
|
|
2
|
+
//# sourceMappingURL=useDescribedBy.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDescribedBy.cjs.js","sources":["../../src/hooks/useDescribedBy.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface DescribedByConfig {\n error?: boolean;\n errorMessage?: string;\n helperText?: string;\n helperId: string;\n errorId: string;\n parentErrorId?: string;\n parentHelperId?: string;\n}\n\nexport const useDescribedBy = ({\n error,\n errorMessage,\n helperText,\n helperId,\n errorId,\n parentErrorId,\n parentHelperId\n}: DescribedByConfig): string | undefined => {\n if (error) {\n if (parentErrorId) {\n return parentErrorId;\n }\n if (errorMessage) {\n return errorId;\n }\n return undefined;\n }\n\n if (helperText) {\n return helperId;\n }\n if (parentHelperId) {\n return parentHelperId;\n }\n\n return undefined;\n};\n"],"names":["error","errorMessage","helperText","helperId","errorId","parentErrorId","parentHelperId"],"mappings":"uGA0B8B,EAC5BA,QACAC,eACAC,aACAC,WACAC,UACAC,gBACAC,oBAEIN,EACEK,IAGAJ,EACKG,OAET,GAGEF,EACKC,EAELG,QAAJ"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const useDescribedBy = ({
|
|
2
|
+
error,
|
|
3
|
+
errorMessage,
|
|
4
|
+
helperText,
|
|
5
|
+
helperId,
|
|
6
|
+
errorId,
|
|
7
|
+
parentErrorId,
|
|
8
|
+
parentHelperId
|
|
9
|
+
}) => {
|
|
10
|
+
if (error) {
|
|
11
|
+
if (parentErrorId) {
|
|
12
|
+
return parentErrorId;
|
|
13
|
+
}
|
|
14
|
+
if (errorMessage) {
|
|
15
|
+
return errorId;
|
|
16
|
+
}
|
|
17
|
+
return void 0;
|
|
18
|
+
}
|
|
19
|
+
if (helperText) {
|
|
20
|
+
return helperId;
|
|
21
|
+
}
|
|
22
|
+
if (parentHelperId) {
|
|
23
|
+
return parentHelperId;
|
|
24
|
+
}
|
|
25
|
+
return void 0;
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
useDescribedBy
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=useDescribedBy.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDescribedBy.es.js","sources":["../../src/hooks/useDescribedBy.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface DescribedByConfig {\n error?: boolean;\n errorMessage?: string;\n helperText?: string;\n helperId: string;\n errorId: string;\n parentErrorId?: string;\n parentHelperId?: string;\n}\n\nexport const useDescribedBy = ({\n error,\n errorMessage,\n helperText,\n helperId,\n errorId,\n parentErrorId,\n parentHelperId\n}: DescribedByConfig): string | undefined => {\n if (error) {\n if (parentErrorId) {\n return parentErrorId;\n }\n if (errorMessage) {\n return errorId;\n }\n return undefined;\n }\n\n if (helperText) {\n return helperId;\n }\n if (parentHelperId) {\n return parentHelperId;\n }\n\n return undefined;\n};\n"],"names":[],"mappings":"AA0BO,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA6C;AAC3C,MAAI,OAAO;AACT,QAAI,eAAe;AACjB,aAAO;AAAA,IACT;AACA,QAAI,cAAc;AAChB,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAEA,MAAI,YAAY;AACd,WAAO;AAAA,EACT;AACA,MAAI,gBAAgB;AAClB,WAAO;AAAA,EACT;AAEA,SAAO;AACT;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDetermineStatusIcon.cjs.js","sources":["../../src/hooks/useDetermineStatusIcon.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormElement } from \"../components/Form/form.interfaces\";\nimport React, { ReactElement, useRef } from \"react\";\nimport { Icon, Icons } from \"../components/Icon/Icon\";\nexport const useDetermineStatusIcon = (params: Partial<FormElement>): ReactElement | null => {\n const { error, success } = params || false;\n let icon = null;\n const errorRef = useRef(null);\n const successRef = useRef(null);\n\n if (error) {\n icon = <Icon ref={errorRef} data-icon-status=\"error\" icon={Icons.Error} />;\n } else if (success) {\n icon = <Icon ref={successRef} data-icon-status=\"success\" icon={Icons.CheckmarkCircleAlt} />;\n }\n\n return icon;\n};\n"],"names":["params","error","success","icon","errorRef","useRef","successRef","React","createElement","Icon","ref","Icons","Error","CheckmarkCircleAlt"],"mappings":"oLAmBuCA,IACrC,MAAMC,MAAEA,EAAAC,QAAOA,GAAYF,IAAU,EACrC,IAAIG,EAAO,
|
|
1
|
+
{"version":3,"file":"useDetermineStatusIcon.cjs.js","sources":["../../src/hooks/useDetermineStatusIcon.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormElement } from \"../components/Form/form.interfaces\";\nimport React, { ReactElement, useRef } from \"react\";\nimport { Icon, Icons } from \"../components/Icon/Icon\";\nexport const useDetermineStatusIcon = (params: Partial<FormElement>): ReactElement | null => {\n const { error, success } = params || false;\n let icon = null;\n const errorRef = useRef(null);\n const successRef = useRef(null);\n\n if (error) {\n icon = <Icon ref={errorRef} data-icon-status=\"error\" icon={Icons.Error} />;\n } else if (success) {\n icon = <Icon ref={successRef} data-icon-status=\"success\" icon={Icons.CheckmarkCircleAlt} />;\n }\n\n return icon;\n};\n"],"names":["params","error","success","icon","errorRef","useRef","successRef","React","createElement","Icon","ref","Icons","Error","CheckmarkCircleAlt"],"mappings":"oLAmBuCA,IACrC,MAAMC,MAAEA,EAAAC,QAAOA,GAAYF,IAAU,EACrC,IAAIG,EAAO,KACX,MAAMC,EAAWC,EAAAA,OAAO,MAClBC,EAAaD,EAAAA,OAAO,MAQ1B,OANIJ,EACFE,EAAOI,EAAAC,cAACC,EAAAA,MAAKC,IAAKN,EAAU,mBAAiB,QAAQD,KAAMQ,EAAAA,MAAMC,QACxDV,IACTC,EAAOI,EAAAC,cAACC,EAAAA,MAAKC,IAAKJ,EAAY,mBAAiB,UAAUH,KAAMQ,EAAAA,MAAME,sBAGhEV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDetermineStatusIcon.es.js","sources":["../../src/hooks/useDetermineStatusIcon.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormElement } from \"../components/Form/form.interfaces\";\nimport React, { ReactElement, useRef } from \"react\";\nimport { Icon, Icons } from \"../components/Icon/Icon\";\nexport const useDetermineStatusIcon = (params: Partial<FormElement>): ReactElement | null => {\n const { error, success } = params || false;\n let icon = null;\n const errorRef = useRef(null);\n const successRef = useRef(null);\n\n if (error) {\n icon = <Icon ref={errorRef} data-icon-status=\"error\" icon={Icons.Error} />;\n } else if (success) {\n icon = <Icon ref={successRef} data-icon-status=\"success\" icon={Icons.CheckmarkCircleAlt} />;\n }\n\n return icon;\n};\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"useDetermineStatusIcon.es.js","sources":["../../src/hooks/useDetermineStatusIcon.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormElement } from \"../components/Form/form.interfaces\";\nimport React, { ReactElement, useRef } from \"react\";\nimport { Icon, Icons } from \"../components/Icon/Icon\";\nexport const useDetermineStatusIcon = (params: Partial<FormElement>): ReactElement | null => {\n const { error, success } = params || false;\n let icon = null;\n const errorRef = useRef(null);\n const successRef = useRef(null);\n\n if (error) {\n icon = <Icon ref={errorRef} data-icon-status=\"error\" icon={Icons.Error} />;\n } else if (success) {\n icon = <Icon ref={successRef} data-icon-status=\"success\" icon={Icons.CheckmarkCircleAlt} />;\n }\n\n return icon;\n};\n"],"names":[],"mappings":";;AAmBO,MAAM,yBAAyB,CAAC,WAAsD;AAC3F,QAAM,EAAE,OAAO,QAAA,IAAY,UAAU;AACrC,MAAI,OAAO;AACX,QAAM,WAAW,OAAO,IAAI;AAC5B,QAAM,aAAa,OAAO,IAAI;AAE9B,MAAI,OAAO;AACT,WAAO,sBAAA,cAAC,QAAK,KAAK,UAAU,oBAAiB,SAAQ,MAAM,MAAM,MAAA,CAAO;AAAA,EAC1E,WAAW,SAAS;AAClB,WAAO,sBAAA,cAAC,QAAK,KAAK,YAAY,oBAAiB,WAAU,MAAM,MAAM,mBAAA,CAAoB;AAAA,EAC3F;AAEA,SAAO;AACT;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../util/helper.cjs.js"),t=require("./useDescribedBy.cjs.js");exports.useFormSelector=s=>{const[o]=e.useState(r.generateID(15,s.name)),[a]=e.useState(r.generateID(15,s.errorMessage));return{describedBy:t.useDescribedBy({error:s.error,errorMessage:s.errorMessage,helperText:s.helperText,helperId:o,errorId:a,parentErrorId:s.parentErrorId,parentHelperId:s.parentHelperId}),errorId:a,identifier:o}};
|
|
2
2
|
//# sourceMappingURL=useFormSelector.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormSelector.cjs.js","sources":["../../src/hooks/useFormSelector.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"useFormSelector.cjs.js","sources":["../../src/hooks/useFormSelector.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState } from \"react\";\nimport { generateID } from \"../util/helper\";\nimport { useDescribedBy } from \"./useDescribedBy\";\n\nexport interface ConfigObject {\n name: string | undefined;\n errorMessage?: string;\n error?: boolean;\n parentErrorId?: string;\n helperText?: string;\n parentHelperId?: string;\n}\n\nexport const useFormSelector = (configObject: ConfigObject) => {\n const [identifier] = useState(generateID(15, configObject.name));\n const [errorId] = useState(generateID(15, configObject.errorMessage));\n\n const describedBy = useDescribedBy({\n error: configObject.error,\n errorMessage: configObject.errorMessage,\n helperText: configObject.helperText,\n helperId: identifier,\n errorId,\n parentErrorId: configObject.parentErrorId,\n parentHelperId: configObject.parentHelperId\n });\n\n return {\n describedBy,\n errorId,\n identifier\n };\n};\n"],"names":["configObject","identifier","useState","generateID","name","errorId","errorMessage","describedBy","useDescribedBy","error","helperText","helperId","parentErrorId","parentHelperId"],"mappings":"yMA6BgCA,IAC9B,MAAOC,GAAcC,EAAAA,SAASC,EAAAA,WAAW,GAAIH,EAAaI,QACnDC,GAAWH,EAAAA,SAASC,EAAAA,WAAW,GAAIH,EAAaM,eAYvD,MAAO,CACLC,YAXkBC,EAAAA,eAAe,CACjCC,MAAOT,EAAaS,MACpBH,aAAcN,EAAaM,aAC3BI,WAAYV,EAAaU,WACzBC,SAAUV,EACVI,UACAO,cAAeZ,EAAaY,cAC5BC,eAAgBb,EAAaa,iBAK7BR,UACAJ"}
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import { useState
|
|
1
|
+
import { useState } from "react";
|
|
2
2
|
import { generateID } from "../util/helper.es.js";
|
|
3
|
+
import { useDescribedBy } from "./useDescribedBy.es.js";
|
|
3
4
|
const useFormSelector = (configObject) => {
|
|
4
5
|
const [identifier] = useState(generateID(15, configObject.name));
|
|
5
|
-
const [describedBy, setDescribedBy] = useState("");
|
|
6
6
|
const [errorId] = useState(generateID(15, configObject.errorMessage));
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
if (configObject.errorMessage && !configObject.parentErrorId && configObject.error) {
|
|
18
|
-
setDescribedBy(errorId);
|
|
19
|
-
}
|
|
20
|
-
}, [identifier, configObject.error, configObject.parentErrorId]);
|
|
7
|
+
const describedBy = useDescribedBy({
|
|
8
|
+
error: configObject.error,
|
|
9
|
+
errorMessage: configObject.errorMessage,
|
|
10
|
+
helperText: configObject.helperText,
|
|
11
|
+
helperId: identifier,
|
|
12
|
+
errorId,
|
|
13
|
+
parentErrorId: configObject.parentErrorId,
|
|
14
|
+
parentHelperId: configObject.parentHelperId
|
|
15
|
+
});
|
|
21
16
|
return {
|
|
22
17
|
describedBy,
|
|
23
18
|
errorId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormSelector.es.js","sources":["../../src/hooks/useFormSelector.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"useFormSelector.es.js","sources":["../../src/hooks/useFormSelector.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState } from \"react\";\nimport { generateID } from \"../util/helper\";\nimport { useDescribedBy } from \"./useDescribedBy\";\n\nexport interface ConfigObject {\n name: string | undefined;\n errorMessage?: string;\n error?: boolean;\n parentErrorId?: string;\n helperText?: string;\n parentHelperId?: string;\n}\n\nexport const useFormSelector = (configObject: ConfigObject) => {\n const [identifier] = useState(generateID(15, configObject.name));\n const [errorId] = useState(generateID(15, configObject.errorMessage));\n\n const describedBy = useDescribedBy({\n error: configObject.error,\n errorMessage: configObject.errorMessage,\n helperText: configObject.helperText,\n helperId: identifier,\n errorId,\n parentErrorId: configObject.parentErrorId,\n parentHelperId: configObject.parentHelperId\n });\n\n return {\n describedBy,\n errorId,\n identifier\n };\n};\n"],"names":[],"mappings":";;;AA6BO,MAAM,kBAAkB,CAAC,iBAA+B;AAC7D,QAAM,CAAC,UAAU,IAAI,SAAS,WAAW,IAAI,aAAa,IAAI,CAAC;AAC/D,QAAM,CAAC,OAAO,IAAI,SAAS,WAAW,IAAI,aAAa,YAAY,CAAC;AAEpE,QAAM,cAAc,eAAe;AAAA,IACjC,OAAO,aAAa;AAAA,IACpB,cAAc,aAAa;AAAA,IAC3B,YAAY,aAAa;AAAA,IACzB,UAAU;AAAA,IACV;AAAA,IACA,eAAe,aAAa;AAAA,IAC5B,gBAAgB,aAAa;AAAA,EAAA,CAC9B;AAED,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFullHeightCollapse.cjs.js","sources":["../../src/hooks/useFullHeightCollapse.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState } from \"react\";\n\nexport const useFullHeightCollapse = (isCollapsed?: boolean) => {\n const [collapsed, setCollapsed] = useState(isCollapsed ?? false);\n\n const handleScroll = (e: React.UIEvent<HTMLDivElement>) => {\n const target = e.target as HTMLDivElement;\n const { scrollTop, scrollHeight, clientHeight } = target;\n const position = Math.ceil((scrollTop / (scrollHeight - clientHeight)) * 100);\n setCollapsed(position !== 0);\n };\n\n return {\n collapsed,\n handleScroll\n };\n};\n"],"names":["isCollapsed","collapsed","setCollapsed","useState","handleScroll","e","target","scrollTop","scrollHeight","clientHeight","position","Math","ceil"],"mappings":"uIAkBsCA,IACpC,MAAOC,EAAWC,GAAgBC,EAAAA,SAASH,IAAe,
|
|
1
|
+
{"version":3,"file":"useFullHeightCollapse.cjs.js","sources":["../../src/hooks/useFullHeightCollapse.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState } from \"react\";\n\nexport const useFullHeightCollapse = (isCollapsed?: boolean) => {\n const [collapsed, setCollapsed] = useState(isCollapsed ?? false);\n\n const handleScroll = (e: React.UIEvent<HTMLDivElement>) => {\n const target = e.target as HTMLDivElement;\n const { scrollTop, scrollHeight, clientHeight } = target;\n const position = Math.ceil((scrollTop / (scrollHeight - clientHeight)) * 100);\n setCollapsed(position !== 0);\n };\n\n return {\n collapsed,\n handleScroll\n };\n};\n"],"names":["isCollapsed","collapsed","setCollapsed","useState","handleScroll","e","target","scrollTop","scrollHeight","clientHeight","position","Math","ceil"],"mappings":"uIAkBsCA,IACpC,MAAOC,EAAWC,GAAgBC,EAAAA,SAASH,IAAe,GAS1D,MAAO,CACLC,YACAG,aAToBC,IACpB,MAAMC,EAASD,EAAEC,QACXC,UAAEA,EAAAC,aAAWA,EAAAC,aAAcA,GAAiBH,EAC5CI,EAAWC,KAAKC,KAAML,GAAaC,EAAeC,GAAiB,KACzEP,EAA0B,IAAbQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFullHeightCollapse.es.js","sources":["../../src/hooks/useFullHeightCollapse.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState } from \"react\";\n\nexport const useFullHeightCollapse = (isCollapsed?: boolean) => {\n const [collapsed, setCollapsed] = useState(isCollapsed ?? false);\n\n const handleScroll = (e: React.UIEvent<HTMLDivElement>) => {\n const target = e.target as HTMLDivElement;\n const { scrollTop, scrollHeight, clientHeight } = target;\n const position = Math.ceil((scrollTop / (scrollHeight - clientHeight)) * 100);\n setCollapsed(position !== 0);\n };\n\n return {\n collapsed,\n handleScroll\n };\n};\n"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"useFullHeightCollapse.es.js","sources":["../../src/hooks/useFullHeightCollapse.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState } from \"react\";\n\nexport const useFullHeightCollapse = (isCollapsed?: boolean) => {\n const [collapsed, setCollapsed] = useState(isCollapsed ?? false);\n\n const handleScroll = (e: React.UIEvent<HTMLDivElement>) => {\n const target = e.target as HTMLDivElement;\n const { scrollTop, scrollHeight, clientHeight } = target;\n const position = Math.ceil((scrollTop / (scrollHeight - clientHeight)) * 100);\n setCollapsed(position !== 0);\n };\n\n return {\n collapsed,\n handleScroll\n };\n};\n"],"names":[],"mappings":";AAkBO,MAAM,wBAAwB,CAAC,gBAA0B;AAC9D,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,eAAe,KAAK;AAE/D,QAAM,eAAe,CAAC,MAAqC;AACzD,UAAM,SAAS,EAAE;AACjB,UAAM,EAAE,WAAW,cAAc,aAAA,IAAiB;AAClD,UAAM,WAAW,KAAK,KAAM,aAAa,eAAe,gBAAiB,GAAG;AAC5E,iBAAa,aAAa,CAAC;AAAA,EAC7B;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useGetDomRoot=(t,r)=>{const[o,s]=e.useState(document.body);return e.useEffect((
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useGetDomRoot=(t,r)=>{const[o,s]=e.useState(document.body);return e.useEffect(()=>{if((null==r?void 0:r.current)&&!t){const e=r.current.closest(".basestyling-wrapper");if(e)return void s(e)}else if(t)return void s(t)},[r]),{root:o}};
|
|
2
2
|
//# sourceMappingURL=useGetDomRoot.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetDomRoot.cjs.js","sources":["../../src/hooks/useGetDomRoot.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useState } from \"react\";\n\nexport const useGetDomRoot = (\n passedDomRoot: HTMLElement | undefined,\n relativeElement: React.RefObject<HTMLDivElement> | null\n) => {\n const [root, setRoot] = useState<HTMLElement>(document.body);\n\n useEffect(() => {\n if (relativeElement?.current && !passedDomRoot) {\n const closestBaseStylingWrapper = relativeElement.current.closest(\".basestyling-wrapper\");\n\n if (closestBaseStylingWrapper) {\n setRoot(closestBaseStylingWrapper as HTMLElement);\n return;\n }\n } else if (passedDomRoot) {\n setRoot(passedDomRoot);\n return;\n }\n }, [relativeElement]);\n\n return { root };\n};\n"],"names":["passedDomRoot","relativeElement","root","setRoot","useState","document","body","useEffect","current","closestBaseStylingWrapper","closest"],"mappings":"+HAkB6B,CAC3BA,EACAC,KAEA,MAAOC,EAAMC,GAAWC,EAAAA,SAAsBC,SAASC,MAgBvD,OAdAC,EAAAA,
|
|
1
|
+
{"version":3,"file":"useGetDomRoot.cjs.js","sources":["../../src/hooks/useGetDomRoot.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useState } from \"react\";\n\nexport const useGetDomRoot = (\n passedDomRoot: HTMLElement | undefined,\n relativeElement: React.RefObject<HTMLDivElement> | null\n) => {\n const [root, setRoot] = useState<HTMLElement>(document.body);\n\n useEffect(() => {\n if (relativeElement?.current && !passedDomRoot) {\n const closestBaseStylingWrapper = relativeElement.current.closest(\".basestyling-wrapper\");\n\n if (closestBaseStylingWrapper) {\n setRoot(closestBaseStylingWrapper as HTMLElement);\n return;\n }\n } else if (passedDomRoot) {\n setRoot(passedDomRoot);\n return;\n }\n }, [relativeElement]);\n\n return { root };\n};\n"],"names":["passedDomRoot","relativeElement","root","setRoot","useState","document","body","useEffect","current","closestBaseStylingWrapper","closest"],"mappings":"+HAkB6B,CAC3BA,EACAC,KAEA,MAAOC,EAAMC,GAAWC,EAAAA,SAAsBC,SAASC,MAgBvD,OAdAC,EAAAA,UAAU,KACR,IAAI,MAAAN,OAAA,EAAAA,EAAiBO,WAAYR,EAAe,CAC9C,MAAMS,EAA4BR,EAAgBO,QAAQE,QAAQ,wBAElE,GAAID,EAEF,YADAN,EAAQM,EAGZ,SAAWT,EAET,YADAG,EAAQH,IAGT,CAACC,IAEG,CAAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetDomRoot.es.js","sources":["../../src/hooks/useGetDomRoot.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useState } from \"react\";\n\nexport const useGetDomRoot = (\n passedDomRoot: HTMLElement | undefined,\n relativeElement: React.RefObject<HTMLDivElement> | null\n) => {\n const [root, setRoot] = useState<HTMLElement>(document.body);\n\n useEffect(() => {\n if (relativeElement?.current && !passedDomRoot) {\n const closestBaseStylingWrapper = relativeElement.current.closest(\".basestyling-wrapper\");\n\n if (closestBaseStylingWrapper) {\n setRoot(closestBaseStylingWrapper as HTMLElement);\n return;\n }\n } else if (passedDomRoot) {\n setRoot(passedDomRoot);\n return;\n }\n }, [relativeElement]);\n\n return { root };\n};\n"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"useGetDomRoot.es.js","sources":["../../src/hooks/useGetDomRoot.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useState } from \"react\";\n\nexport const useGetDomRoot = (\n passedDomRoot: HTMLElement | undefined,\n relativeElement: React.RefObject<HTMLDivElement> | null\n) => {\n const [root, setRoot] = useState<HTMLElement>(document.body);\n\n useEffect(() => {\n if (relativeElement?.current && !passedDomRoot) {\n const closestBaseStylingWrapper = relativeElement.current.closest(\".basestyling-wrapper\");\n\n if (closestBaseStylingWrapper) {\n setRoot(closestBaseStylingWrapper as HTMLElement);\n return;\n }\n } else if (passedDomRoot) {\n setRoot(passedDomRoot);\n return;\n }\n }, [relativeElement]);\n\n return { root };\n};\n"],"names":[],"mappings":";AAkBO,MAAM,gBAAgB,CAC3B,eACA,oBACG;AACH,QAAM,CAAC,MAAM,OAAO,IAAI,SAAsB,SAAS,IAAI;AAE3D,YAAU,MAAM;AACd,SAAI,mDAAiB,YAAW,CAAC,eAAe;AAC9C,YAAM,4BAA4B,gBAAgB,QAAQ,QAAQ,sBAAsB;AAExF,UAAI,2BAA2B;AAC7B,gBAAQ,yBAAwC;AAChD;AAAA,MACF;AAAA,IACF,WAAW,eAAe;AACxB,cAAQ,aAAa;AACrB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,eAAe,CAAC;AAEpB,SAAO,EAAE,KAAA;AACX;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=require("./useDebouncedCallback.cjs.js");var o=(t=>(t.LEFT="left",t.CENTER="center",t.CENTER_H="centerh",t.RIGHT="right",t))(o||{}),i=(t=>(t.TOP="top",t.CENTER="center",t.CENTER_V="centerv",t.BOTTOM="bottom",t))(i||{});const n={relativeElement:void 0,elementToBePositioned:void 0,transformOrigin:{horizontal:"left",vertical:"top"},placement:{horizontal:"left",vertical:"top"},offset:{top:0,right:0,bottom:0,left:0},debounceAmount:20};exports.horizontal=o,exports.usePosition=(o=n)=>{const i={...n,...o},[r,l]=t.useState(!1);void 0===i.transformOrigin&&(i.transformOrigin=n.transformOrigin),void 0===i.placement&&(i.placement=n.placement),void 0===i.offset&&(i.offset=n.offset);const[h,f]=t.useState({left:0,top:0,right:"initial",bottom:"initial"}),a=(t,e,o)=>{var n,r;const l=((t,e,o,n,r)=>{const l="center"===e?(t=>{if("horizontal"===t)return"centerh";if("vertical"===t)return"centerv";throw new Error(`the requested return value isn't "vertical" or "horizontal" ${t} was given.`)})(o):e,h=((t,e,o,i,n)=>{let r=0;return"left"===t[e]||"top"===t[e]?r=o[i]:"center"===t[e]?r=o[i]-n["horizontal"===e?"width":"height"]/2:"right"!==t[e]&&"bottom"!==t[e]||(r=window["horizontal"===e?"innerWidth":"innerHeight"]-o[i]),r})(t,o,n,l,r),f=((t,e,o)=>{var n,r,l,h,f,a,d,c,s,u,g,v;let m=t;return("horizontal"===e&&0!==(null==(n=i.offset)?void 0:n.left)||"horizontal"===e&&0!==(null==(r=i.offset)?void 0:r.right))&&("left"!==o[e]&&"center"!==o[e]||(m+=null==(l=i.offset)?void 0:l.left,m-=null==(h=i.offset)?void 0:h.right),"right"===o[e]&&(m-=null==(f=i.offset)?void 0:f.left,m+=null==(a=i.offset)?void 0:a.right)),("vertical"===e&&0!==(null==(d=i.offset)?void 0:d.top)||"vertical"===e&&0!==(null==(c=i.offset)?void 0:c.bottom))&&("top"!==o[e]&&"center"!==o[e]||(m+=null==(s=i.offset)?void 0:s.top,m-=null==(u=i.offset)?void 0:u.bottom),"bottom"===o[e]&&(m-=null==(g=i.offset)?void 0:g.top,m+=null==(v=i.offset)?void 0:v.bottom)),m})(h,o,t);return((t,e,o,i)=>{let n=t;return("left"===e[o]&&n<0||"top"===e[o]&&n<0||"center"===e[o]&&n<0||"bottom"===e[o]&&n<0)&&(n=0),("left"===e[o]&&n>window.innerWidth-i.width||"center"===e[o]&&"horizontal"===o&&n>window.innerWidth-i.width)&&(n=window.innerWidth-i.width),("top"===e[o]&&n>window.innerHeight-i.height||"center"===e[o]&&"vertical"===o&&n>window.innerHeight-i.height)&&(n=window.innerHeight-i.height),"right"===e[o]&&n>window.innerWidth-i.width&&(n=window.innerWidth-i.width),"bottom"===e[o]&&n>window.innerHeight-i.height&&(n=window.innerHeight-i.height),n})(f,t,o,r)})(i.transformOrigin,i.placement[o],o,t,e);let h="left",a="right";"horizontal"===o&&"right"===(null==(n=i.transformOrigin)?void 0:n.horizontal)?(h="right",a="left"):"horizontal"===o&&(h="left",a="right"),"vertical"===o&&"bottom"===(null==(r=i.transformOrigin)?void 0:r.vertical)?(h="bottom",a="top"):"vertical"===o&&(h="top",a="bottom"),f(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=require("./useDebouncedCallback.cjs.js");var o=(t=>(t.LEFT="left",t.CENTER="center",t.CENTER_H="centerh",t.RIGHT="right",t))(o||{}),i=(t=>(t.TOP="top",t.CENTER="center",t.CENTER_V="centerv",t.BOTTOM="bottom",t))(i||{});const n={relativeElement:void 0,elementToBePositioned:void 0,transformOrigin:{horizontal:"left",vertical:"top"},placement:{horizontal:"left",vertical:"top"},offset:{top:0,right:0,bottom:0,left:0},debounceAmount:20};exports.horizontal=o,exports.usePosition=(o=n)=>{const i={...n,...o},[r,l]=t.useState(!1);void 0===i.transformOrigin&&(i.transformOrigin=n.transformOrigin),void 0===i.placement&&(i.placement=n.placement),void 0===i.offset&&(i.offset=n.offset);const[h,f]=t.useState({left:0,top:0,right:"initial",bottom:"initial"}),a=(t,e,o)=>{var n,r;const l=((t,e,o,n,r)=>{const l="center"===e?(t=>{if("horizontal"===t)return"centerh";if("vertical"===t)return"centerv";throw new Error(`the requested return value isn't "vertical" or "horizontal" ${t} was given.`)})(o):e,h=((t,e,o,i,n)=>{let r=0;return"left"===t[e]||"top"===t[e]?r=o[i]:"center"===t[e]?r=o[i]-n["horizontal"===e?"width":"height"]/2:"right"!==t[e]&&"bottom"!==t[e]||(r=window["horizontal"===e?"innerWidth":"innerHeight"]-o[i]),r})(t,o,n,l,r),f=((t,e,o)=>{var n,r,l,h,f,a,d,c,s,u,g,v;let m=t;return("horizontal"===e&&0!==(null==(n=i.offset)?void 0:n.left)||"horizontal"===e&&0!==(null==(r=i.offset)?void 0:r.right))&&("left"!==o[e]&&"center"!==o[e]||(m+=null==(l=i.offset)?void 0:l.left,m-=null==(h=i.offset)?void 0:h.right),"right"===o[e]&&(m-=null==(f=i.offset)?void 0:f.left,m+=null==(a=i.offset)?void 0:a.right)),("vertical"===e&&0!==(null==(d=i.offset)?void 0:d.top)||"vertical"===e&&0!==(null==(c=i.offset)?void 0:c.bottom))&&("top"!==o[e]&&"center"!==o[e]||(m+=null==(s=i.offset)?void 0:s.top,m-=null==(u=i.offset)?void 0:u.bottom),"bottom"===o[e]&&(m-=null==(g=i.offset)?void 0:g.top,m+=null==(v=i.offset)?void 0:v.bottom)),m})(h,o,t);return((t,e,o,i)=>{let n=t;return("left"===e[o]&&n<0||"top"===e[o]&&n<0||"center"===e[o]&&n<0||"bottom"===e[o]&&n<0)&&(n=0),("left"===e[o]&&n>window.innerWidth-i.width||"center"===e[o]&&"horizontal"===o&&n>window.innerWidth-i.width)&&(n=window.innerWidth-i.width),("top"===e[o]&&n>window.innerHeight-i.height||"center"===e[o]&&"vertical"===o&&n>window.innerHeight-i.height)&&(n=window.innerHeight-i.height),"right"===e[o]&&n>window.innerWidth-i.width&&(n=window.innerWidth-i.width),"bottom"===e[o]&&n>window.innerHeight-i.height&&(n=window.innerHeight-i.height),n})(f,t,o,r)})(i.transformOrigin,i.placement[o],o,t,e);let h="left",a="right";"horizontal"===o&&"right"===(null==(n=i.transformOrigin)?void 0:n.horizontal)?(h="right",a="left"):"horizontal"===o&&(h="left",a="right"),"vertical"===o&&"bottom"===(null==(r=i.transformOrigin)?void 0:r.vertical)?(h="bottom",a="top"):"vertical"===o&&(h="top",a="bottom"),f(t=>({...t,[h]:l,[a]:"initial"}))},d=e.useDebouncedCallback(()=>{var t,e;if(!(null==(t=i.relativeElement)?void 0:t.current)||!(null==(e=i.elementToBePositioned)?void 0:e.current))return;const o=i.relativeElement.current.getBoundingClientRect(),n={height:i.elementToBePositioned.current.offsetHeight,width:i.elementToBePositioned.current.offsetWidth},h={top:o.top,right:o.right,bottom:o.bottom,center:0,centerv:o.top+o.height/2,centerh:o.left+o.width/2,left:o.left,width:o.width,height:o.height,x:o.x,y:o.y};a(h,n,"horizontal"),a(h,n,"vertical"),r||l(!0)},i.debounceAmount??20);return{top:h.top,bottom:h.bottom,left:h.left,right:h.right,calculatePosition:d,initialCalculationDone:r}},exports.vertical=i;
|
|
2
2
|
//# sourceMappingURL=usePosition.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePosition.cjs.js","sources":["../../src/hooks/usePosition.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useState } from \"react\";\nimport { useDebouncedCallback } from \"./useDebouncedCallback\";\n\nexport interface ConfigObject {\n relativeElement: RefElement;\n elementToBePositioned: RefElement;\n transformOrigin?: Placement;\n placement?: Placement;\n offset?: Offset;\n debounceAmount?: number;\n}\n\nexport enum horizontal {\n LEFT = \"left\",\n CENTER = \"center\",\n CENTER_H = \"centerh\",\n RIGHT = \"right\"\n}\n\nexport enum vertical {\n TOP = \"top\",\n CENTER = \"center\",\n CENTER_V = \"centerv\",\n BOTTOM = \"bottom\"\n}\n\nexport type HorizontalPlacement = `${horizontal}`;\nexport type VerticalPlacement = `${vertical}`;\n\ntype Axis = \"vertical\" | \"horizontal\";\ntype RefElement = React.RefObject<HTMLOrSVGElement> | undefined;\n\ninterface DomRectObject {\n top: number;\n right: number;\n bottom: number;\n left: number;\n center: number;\n centerh: number;\n centerv: number;\n width: number;\n height: number;\n x: number;\n y: number;\n}\n\nexport interface Placement {\n horizontal: HorizontalPlacement;\n vertical: VerticalPlacement;\n}\n\nexport interface Offset {\n top: number;\n right: number;\n bottom: number;\n left: number;\n}\n\nexport interface Position {\n top: PositionType;\n right: PositionType;\n bottom: PositionType;\n left: PositionType;\n}\n\ninterface Dimensions {\n height: number;\n width: number;\n}\n\nexport type PositionType = number | \"initial\";\n\nconst defaultConfigObject: ConfigObject = {\n relativeElement: undefined,\n elementToBePositioned: undefined,\n transformOrigin: {\n horizontal: \"left\",\n vertical: \"top\"\n },\n placement: {\n horizontal: \"left\",\n vertical: \"top\"\n },\n offset: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n debounceAmount: 20\n};\n\n/* eslint-disable @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain*/\nexport const usePosition = (providedConfigObject: ConfigObject = defaultConfigObject) => {\n const configObject = { ...defaultConfigObject, ...providedConfigObject };\n const [initialCalculationDone, setInitialCalculationDone] = useState(false);\n\n if (configObject.transformOrigin === undefined) {\n configObject.transformOrigin = defaultConfigObject.transformOrigin;\n }\n\n if (configObject.placement === undefined) {\n configObject.placement = defaultConfigObject.placement;\n }\n\n if (configObject.offset === undefined) {\n configObject.offset = defaultConfigObject.offset;\n }\n\n const [position, setPosition] = useState<Position>({\n left: 0,\n top: 0,\n right: \"initial\",\n bottom: \"initial\"\n });\n\n const _fixPossibleViewportOverflow = (\n value: number,\n transformOrigin: Placement,\n requestedReturnValue: Axis,\n elDimensions: Dimensions\n ) => {\n let returnValue = value;\n\n if (\n (transformOrigin[requestedReturnValue] === \"left\" && returnValue < 0) ||\n (transformOrigin[requestedReturnValue] === \"top\" && returnValue < 0) ||\n (transformOrigin[requestedReturnValue] === \"center\" && returnValue < 0) ||\n (transformOrigin[requestedReturnValue] === \"bottom\" && returnValue < 0)\n ) {\n returnValue = 0;\n }\n\n if (\n (transformOrigin[requestedReturnValue] === \"left\" &&\n returnValue > window.innerWidth - elDimensions.width) ||\n (transformOrigin[requestedReturnValue] === \"center\" &&\n requestedReturnValue === \"horizontal\" &&\n returnValue > window.innerWidth - elDimensions.width)\n ) {\n returnValue = window.innerWidth - elDimensions.width;\n }\n\n if (\n (transformOrigin[requestedReturnValue] === \"top\" &&\n returnValue > window.innerHeight - elDimensions.height) ||\n (transformOrigin[requestedReturnValue] === \"center\" &&\n requestedReturnValue === \"vertical\" &&\n returnValue > window.innerHeight - elDimensions.height)\n ) {\n returnValue = window.innerHeight - elDimensions.height;\n }\n\n if (\n transformOrigin[requestedReturnValue] === \"right\" &&\n returnValue > window.innerWidth - elDimensions.width\n ) {\n returnValue = window.innerWidth - elDimensions.width;\n }\n\n if (\n transformOrigin[requestedReturnValue] === \"bottom\" &&\n returnValue > window.innerHeight - elDimensions.height\n ) {\n returnValue = window.innerHeight - elDimensions.height;\n }\n\n return returnValue;\n };\n\n const _applyOffsetToPlacementValue = (\n value: number,\n requestedReturnValue: Axis,\n transformOrigin: Placement\n ) => {\n let returnValue = value;\n if (\n (requestedReturnValue === \"horizontal\" && configObject.offset?.left !== 0) ||\n (requestedReturnValue === \"horizontal\" && configObject.offset?.right !== 0)\n ) {\n if (\n transformOrigin[requestedReturnValue] === \"left\" ||\n transformOrigin[requestedReturnValue] === \"center\"\n ) {\n returnValue += configObject.offset?.left!;\n returnValue -= configObject.offset?.right!;\n }\n\n if (transformOrigin[requestedReturnValue] === \"right\") {\n returnValue -= configObject.offset?.left!;\n returnValue += configObject.offset?.right!;\n }\n }\n\n if (\n (requestedReturnValue === \"vertical\" && configObject.offset?.top !== 0) ||\n (requestedReturnValue === \"vertical\" && configObject.offset?.bottom !== 0)\n ) {\n if (\n transformOrigin[requestedReturnValue] === \"top\" ||\n transformOrigin[requestedReturnValue] === \"center\"\n ) {\n returnValue += configObject.offset?.top!;\n returnValue -= configObject.offset?.bottom!;\n }\n\n if (transformOrigin[requestedReturnValue] === \"bottom\") {\n returnValue -= configObject.offset?.top!;\n returnValue += configObject.offset?.bottom!;\n }\n }\n\n return returnValue;\n };\n\n const _calculateInitialPlacementValue = (\n transformOrigin: Placement,\n requestedReturnValue: Axis,\n relEl: DomRectObject,\n placementOriginDefinition: HorizontalPlacement | VerticalPlacement,\n elDimensions: Dimensions\n ) => {\n let value = 0;\n\n if (\n transformOrigin[requestedReturnValue] === \"left\" ||\n transformOrigin[requestedReturnValue] === \"top\"\n ) {\n value = relEl[placementOriginDefinition];\n } else if (transformOrigin[requestedReturnValue] === \"center\") {\n value =\n relEl[placementOriginDefinition] -\n elDimensions[requestedReturnValue === \"horizontal\" ? \"width\" : \"height\"] / 2;\n } else if (\n transformOrigin[requestedReturnValue] === \"right\" ||\n transformOrigin[requestedReturnValue] === \"bottom\"\n ) {\n value =\n window[requestedReturnValue === \"horizontal\" ? \"innerWidth\" : \"innerHeight\"] -\n relEl[placementOriginDefinition];\n }\n\n return value;\n };\n\n /**\n *\n * @param requestedReturnValue whether the requested return value is for the horizontal or vertical axis\n * @returns either the horizontally centered placement definition (centerh) or the vertically centered one (centerv)\n */\n const _determineCenteredPlacementOrigin = (requestedReturnValue: Axis) => {\n if (requestedReturnValue === \"horizontal\") {\n return \"centerh\";\n } else if (requestedReturnValue === \"vertical\") {\n return \"centerv\";\n }\n throw new Error(\n `the requested return value isn't \"vertical\" or \"horizontal\" ${requestedReturnValue} was given.`\n );\n };\n\n const _calculatePlacementValue = (\n transformOrigin: Placement,\n placement: HorizontalPlacement | VerticalPlacement,\n requestedReturnValue: Axis,\n relEl: DomRectObject,\n elDimensions: Dimensions\n ): number => {\n const placementOriginDefinition =\n placement === \"center\" ? _determineCenteredPlacementOrigin(requestedReturnValue) : placement;\n\n const value = _calculateInitialPlacementValue(\n transformOrigin,\n requestedReturnValue,\n relEl,\n placementOriginDefinition,\n elDimensions\n );\n\n const valueWithOffset = _applyOffsetToPlacementValue(\n value,\n requestedReturnValue,\n transformOrigin\n );\n\n return _fixPossibleViewportOverflow(\n valueWithOffset,\n transformOrigin,\n requestedReturnValue,\n elDimensions\n );\n };\n\n const _calculatePlacement = (relEl: DomRectObject, elDimensions: Dimensions, axis: Axis) => {\n const placementValue = _calculatePlacementValue(\n configObject.transformOrigin!,\n configObject.placement![axis]!,\n axis,\n relEl,\n elDimensions\n );\n\n let direction = \"left\";\n let oppositeDirection = \"right\";\n\n if (axis === \"horizontal\" && configObject.transformOrigin?.horizontal === \"right\") {\n direction = \"right\";\n oppositeDirection = \"left\";\n } else if (axis === \"horizontal\") {\n direction = \"left\";\n oppositeDirection = \"right\";\n }\n\n if (axis === \"vertical\" && configObject.transformOrigin?.vertical === \"bottom\") {\n direction = \"bottom\";\n oppositeDirection = \"top\";\n } else if (axis === \"vertical\") {\n direction = \"top\";\n oppositeDirection = \"bottom\";\n }\n\n setPosition(prevState => ({\n ...prevState,\n [direction]: placementValue,\n [oppositeDirection]: \"initial\"\n }));\n };\n\n const calculatePosition = useDebouncedCallback(() => {\n if (!configObject.relativeElement?.current || !configObject.elementToBePositioned?.current) {\n return;\n }\n const relativeElRect = (configObject.relativeElement!\n .current as HTMLElement)!.getBoundingClientRect();\n const elementToBePositionedDimensions: Dimensions = {\n height: (configObject.elementToBePositioned!.current as HTMLElement).offsetHeight,\n width: (configObject.elementToBePositioned!.current as HTMLElement).offsetWidth\n };\n\n /** We want to add a center (horizontal and vertical) property to the DOMRect object. Since it's a special object we can't modify so we clone it and add it. */\n const clonedRelEl = {\n top: relativeElRect.top,\n right: relativeElRect.right,\n bottom: relativeElRect.bottom,\n center: 0,\n centerv: relativeElRect.top + relativeElRect.height / 2,\n centerh: relativeElRect.left + relativeElRect.width / 2,\n left: relativeElRect.left,\n width: relativeElRect.width,\n height: relativeElRect.height,\n x: relativeElRect.x,\n y: relativeElRect.y\n };\n\n _calculatePlacement(clonedRelEl, elementToBePositionedDimensions, \"horizontal\");\n _calculatePlacement(clonedRelEl, elementToBePositionedDimensions, \"vertical\");\n\n if (!initialCalculationDone) {\n setInitialCalculationDone(true);\n }\n }, configObject.debounceAmount ?? 20);\n\n return {\n top: position.top,\n bottom: position.bottom,\n left: position.left,\n right: position.right,\n calculatePosition,\n initialCalculationDone\n };\n};\n"],"names":["horizontal","vertical","defaultConfigObject","relativeElement","elementToBePositioned","transformOrigin","placement","offset","top","right","bottom","left","debounceAmount","providedConfigObject","configObject","initialCalculationDone","setInitialCalculationDone","useState","position","setPosition","_calculatePlacement","relEl","elDimensions","axis","placementValue","requestedReturnValue","placementOriginDefinition","Error","_determineCenteredPlacementOrigin","value","window","_calculateInitialPlacementValue","valueWithOffset","returnValue","_a","_b","_c","_d","_e","_f","_g","_h","_i","_j","_k","_l","_applyOffsetToPlacementValue","innerWidth","width","innerHeight","height","_fixPossibleViewportOverflow","_calculatePlacementValue","direction","oppositeDirection","prevState","calculatePosition","useDebouncedCallback","current","relativeElRect","getBoundingClientRect","elementToBePositionedDimensions","offsetHeight","offsetWidth","clonedRelEl","center","centerv","centerh","x","y"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"usePosition.cjs.js","sources":["../../src/hooks/usePosition.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useState } from \"react\";\nimport { useDebouncedCallback } from \"./useDebouncedCallback\";\n\nexport interface ConfigObject {\n relativeElement: RefElement;\n elementToBePositioned: RefElement;\n transformOrigin?: Placement;\n placement?: Placement;\n offset?: Offset;\n debounceAmount?: number;\n}\n\nexport enum horizontal {\n LEFT = \"left\",\n CENTER = \"center\",\n CENTER_H = \"centerh\",\n RIGHT = \"right\"\n}\n\nexport enum vertical {\n TOP = \"top\",\n CENTER = \"center\",\n CENTER_V = \"centerv\",\n BOTTOM = \"bottom\"\n}\n\nexport type HorizontalPlacement = `${horizontal}`;\nexport type VerticalPlacement = `${vertical}`;\n\ntype Axis = \"vertical\" | \"horizontal\";\ntype RefElement = React.RefObject<HTMLOrSVGElement> | undefined;\n\ninterface DomRectObject {\n top: number;\n right: number;\n bottom: number;\n left: number;\n center: number;\n centerh: number;\n centerv: number;\n width: number;\n height: number;\n x: number;\n y: number;\n}\n\nexport interface Placement {\n horizontal: HorizontalPlacement;\n vertical: VerticalPlacement;\n}\n\nexport interface Offset {\n top: number;\n right: number;\n bottom: number;\n left: number;\n}\n\nexport interface Position {\n top: PositionType;\n right: PositionType;\n bottom: PositionType;\n left: PositionType;\n}\n\ninterface Dimensions {\n height: number;\n width: number;\n}\n\nexport type PositionType = number | \"initial\";\n\nconst defaultConfigObject: ConfigObject = {\n relativeElement: undefined,\n elementToBePositioned: undefined,\n transformOrigin: {\n horizontal: \"left\",\n vertical: \"top\"\n },\n placement: {\n horizontal: \"left\",\n vertical: \"top\"\n },\n offset: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n debounceAmount: 20\n};\n\nexport const usePosition = (providedConfigObject: ConfigObject = defaultConfigObject) => {\n const configObject = { ...defaultConfigObject, ...providedConfigObject };\n const [initialCalculationDone, setInitialCalculationDone] = useState(false);\n\n if (configObject.transformOrigin === undefined) {\n configObject.transformOrigin = defaultConfigObject.transformOrigin;\n }\n\n if (configObject.placement === undefined) {\n configObject.placement = defaultConfigObject.placement;\n }\n\n if (configObject.offset === undefined) {\n configObject.offset = defaultConfigObject.offset;\n }\n\n const [position, setPosition] = useState<Position>({\n left: 0,\n top: 0,\n right: \"initial\",\n bottom: \"initial\"\n });\n\n const _fixPossibleViewportOverflow = (\n value: number,\n transformOrigin: Placement,\n requestedReturnValue: Axis,\n elDimensions: Dimensions\n ) => {\n let returnValue = value;\n\n if (\n (transformOrigin[requestedReturnValue] === \"left\" && returnValue < 0) ||\n (transformOrigin[requestedReturnValue] === \"top\" && returnValue < 0) ||\n (transformOrigin[requestedReturnValue] === \"center\" && returnValue < 0) ||\n (transformOrigin[requestedReturnValue] === \"bottom\" && returnValue < 0)\n ) {\n returnValue = 0;\n }\n\n if (\n (transformOrigin[requestedReturnValue] === \"left\" &&\n returnValue > window.innerWidth - elDimensions.width) ||\n (transformOrigin[requestedReturnValue] === \"center\" &&\n requestedReturnValue === \"horizontal\" &&\n returnValue > window.innerWidth - elDimensions.width)\n ) {\n returnValue = window.innerWidth - elDimensions.width;\n }\n\n if (\n (transformOrigin[requestedReturnValue] === \"top\" &&\n returnValue > window.innerHeight - elDimensions.height) ||\n (transformOrigin[requestedReturnValue] === \"center\" &&\n requestedReturnValue === \"vertical\" &&\n returnValue > window.innerHeight - elDimensions.height)\n ) {\n returnValue = window.innerHeight - elDimensions.height;\n }\n\n if (\n transformOrigin[requestedReturnValue] === \"right\" &&\n returnValue > window.innerWidth - elDimensions.width\n ) {\n returnValue = window.innerWidth - elDimensions.width;\n }\n\n if (\n transformOrigin[requestedReturnValue] === \"bottom\" &&\n returnValue > window.innerHeight - elDimensions.height\n ) {\n returnValue = window.innerHeight - elDimensions.height;\n }\n\n return returnValue;\n };\n\n const _applyOffsetToPlacementValue = (\n value: number,\n requestedReturnValue: Axis,\n transformOrigin: Placement\n ) => {\n let returnValue = value;\n if (\n (requestedReturnValue === \"horizontal\" && configObject.offset?.left !== 0) ||\n (requestedReturnValue === \"horizontal\" && configObject.offset?.right !== 0)\n ) {\n if (\n transformOrigin[requestedReturnValue] === \"left\" ||\n transformOrigin[requestedReturnValue] === \"center\"\n ) {\n returnValue += configObject.offset?.left!;\n returnValue -= configObject.offset?.right!;\n }\n\n if (transformOrigin[requestedReturnValue] === \"right\") {\n returnValue -= configObject.offset?.left!;\n returnValue += configObject.offset?.right!;\n }\n }\n\n if (\n (requestedReturnValue === \"vertical\" && configObject.offset?.top !== 0) ||\n (requestedReturnValue === \"vertical\" && configObject.offset?.bottom !== 0)\n ) {\n if (\n transformOrigin[requestedReturnValue] === \"top\" ||\n transformOrigin[requestedReturnValue] === \"center\"\n ) {\n returnValue += configObject.offset?.top!;\n returnValue -= configObject.offset?.bottom!;\n }\n\n if (transformOrigin[requestedReturnValue] === \"bottom\") {\n returnValue -= configObject.offset?.top!;\n returnValue += configObject.offset?.bottom!;\n }\n }\n\n return returnValue;\n };\n\n const _calculateInitialPlacementValue = (\n transformOrigin: Placement,\n requestedReturnValue: Axis,\n relEl: DomRectObject,\n placementOriginDefinition: HorizontalPlacement | VerticalPlacement,\n elDimensions: Dimensions\n ) => {\n let value = 0;\n\n if (\n transformOrigin[requestedReturnValue] === \"left\" ||\n transformOrigin[requestedReturnValue] === \"top\"\n ) {\n value = relEl[placementOriginDefinition];\n } else if (transformOrigin[requestedReturnValue] === \"center\") {\n value =\n relEl[placementOriginDefinition] -\n elDimensions[requestedReturnValue === \"horizontal\" ? \"width\" : \"height\"] / 2;\n } else if (\n transformOrigin[requestedReturnValue] === \"right\" ||\n transformOrigin[requestedReturnValue] === \"bottom\"\n ) {\n value =\n window[requestedReturnValue === \"horizontal\" ? \"innerWidth\" : \"innerHeight\"] -\n relEl[placementOriginDefinition];\n }\n\n return value;\n };\n\n /**\n *\n * @param requestedReturnValue whether the requested return value is for the horizontal or vertical axis\n * @returns either the horizontally centered placement definition (centerh) or the vertically centered one (centerv)\n */\n const _determineCenteredPlacementOrigin = (requestedReturnValue: Axis) => {\n if (requestedReturnValue === \"horizontal\") {\n return \"centerh\";\n } else if (requestedReturnValue === \"vertical\") {\n return \"centerv\";\n }\n throw new Error(\n `the requested return value isn't \"vertical\" or \"horizontal\" ${requestedReturnValue} was given.`\n );\n };\n\n const _calculatePlacementValue = (\n transformOrigin: Placement,\n placement: HorizontalPlacement | VerticalPlacement,\n requestedReturnValue: Axis,\n relEl: DomRectObject,\n elDimensions: Dimensions\n ): number => {\n const placementOriginDefinition =\n placement === \"center\" ? _determineCenteredPlacementOrigin(requestedReturnValue) : placement;\n\n const value = _calculateInitialPlacementValue(\n transformOrigin,\n requestedReturnValue,\n relEl,\n placementOriginDefinition,\n elDimensions\n );\n\n const valueWithOffset = _applyOffsetToPlacementValue(\n value,\n requestedReturnValue,\n transformOrigin\n );\n\n return _fixPossibleViewportOverflow(\n valueWithOffset,\n transformOrigin,\n requestedReturnValue,\n elDimensions\n );\n };\n\n const _calculatePlacement = (relEl: DomRectObject, elDimensions: Dimensions, axis: Axis) => {\n const placementValue = _calculatePlacementValue(\n configObject.transformOrigin!,\n configObject.placement![axis]!,\n axis,\n relEl,\n elDimensions\n );\n\n let direction = \"left\";\n let oppositeDirection = \"right\";\n\n if (axis === \"horizontal\" && configObject.transformOrigin?.horizontal === \"right\") {\n direction = \"right\";\n oppositeDirection = \"left\";\n } else if (axis === \"horizontal\") {\n direction = \"left\";\n oppositeDirection = \"right\";\n }\n\n if (axis === \"vertical\" && configObject.transformOrigin?.vertical === \"bottom\") {\n direction = \"bottom\";\n oppositeDirection = \"top\";\n } else if (axis === \"vertical\") {\n direction = \"top\";\n oppositeDirection = \"bottom\";\n }\n\n setPosition(prevState => ({\n ...prevState,\n [direction]: placementValue,\n [oppositeDirection]: \"initial\"\n }));\n };\n\n const calculatePosition = useDebouncedCallback(() => {\n if (!configObject.relativeElement?.current || !configObject.elementToBePositioned?.current) {\n return;\n }\n const relativeElRect = (configObject.relativeElement!\n .current as HTMLElement)!.getBoundingClientRect();\n const elementToBePositionedDimensions: Dimensions = {\n height: (configObject.elementToBePositioned!.current as HTMLElement).offsetHeight,\n width: (configObject.elementToBePositioned!.current as HTMLElement).offsetWidth\n };\n\n /** We want to add a center (horizontal and vertical) property to the DOMRect object. Since it's a special object we can't modify so we clone it and add it. */\n const clonedRelEl = {\n top: relativeElRect.top,\n right: relativeElRect.right,\n bottom: relativeElRect.bottom,\n center: 0,\n centerv: relativeElRect.top + relativeElRect.height / 2,\n centerh: relativeElRect.left + relativeElRect.width / 2,\n left: relativeElRect.left,\n width: relativeElRect.width,\n height: relativeElRect.height,\n x: relativeElRect.x,\n y: relativeElRect.y\n };\n\n _calculatePlacement(clonedRelEl, elementToBePositionedDimensions, \"horizontal\");\n _calculatePlacement(clonedRelEl, elementToBePositionedDimensions, \"vertical\");\n\n if (!initialCalculationDone) {\n setInitialCalculationDone(true);\n }\n }, configObject.debounceAmount ?? 20);\n\n return {\n top: position.top,\n bottom: position.bottom,\n left: position.left,\n right: position.right,\n calculatePosition,\n initialCalculationDone\n };\n};\n"],"names":["horizontal","vertical","defaultConfigObject","relativeElement","elementToBePositioned","transformOrigin","placement","offset","top","right","bottom","left","debounceAmount","providedConfigObject","configObject","initialCalculationDone","setInitialCalculationDone","useState","position","setPosition","_calculatePlacement","relEl","elDimensions","axis","placementValue","requestedReturnValue","placementOriginDefinition","Error","_determineCenteredPlacementOrigin","value","window","_calculateInitialPlacementValue","valueWithOffset","returnValue","_a","_b","_c","_d","_e","_f","_g","_h","_i","_j","_k","_l","_applyOffsetToPlacementValue","innerWidth","width","innerHeight","height","_fixPossibleViewportOverflow","_calculatePlacementValue","direction","oppositeDirection","prevState","calculatePosition","useDebouncedCallback","current","relativeElRect","getBoundingClientRect","elementToBePositionedDimensions","offsetHeight","offsetWidth","clonedRelEl","center","centerv","centerh","x","y"],"mappings":"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"}
|