@onewelcome/react-lib-components 13.2.0-alpha.1 → 13.3.0-alpha.2
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.module.scss.cjs.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.es.js +5 -5
- 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.module.scss.cjs.js +2 -2
- package/dist/components/Button/Button.module.scss.es.js +17 -17
- 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/ContextMenu/ContextMenu.cjs.js.map +1 -1
- 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 +6 -6
- 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.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 +20 -17
- 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 +76 -51
- 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 +8 -7
- package/dist/components/DataGrid/DataGrid.module.scss.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.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 +4 -2
- 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.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.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.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.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.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.es.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.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 +4 -4
- 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/DataGridFilterService.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.es.js +44 -25
- 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 +15 -4
- 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 +56 -6
- 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/DataGridToolbar.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.es.js +4 -4
- 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 +10 -10
- 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 +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 +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.es.js +45 -24
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.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 +7 -9
- 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 +5 -2
- 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 +7 -4
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.es.js +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 +11 -11
- 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.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 +2 -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 +8 -5
- package/dist/components/Form/Fieldset/Fieldset.module.scss.es.js.map +1 -1
- 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 +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 +6 -6
- 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.module.scss.cjs.js +2 -2
- package/dist/components/Form/Form.module.scss.es.js +2 -2
- 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.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.es.js +9 -6
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.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.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 +4 -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/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 +2 -1
- 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 +8 -8
- 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.map +1 -1
- package/dist/components/Form/Radio/Radio.es.js +1 -1
- 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 +6 -6
- 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 +198 -40
- 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 +18 -15
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.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.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 +81 -33
- package/dist/components/Form/Select/MultiSelect/useArrowNavigation.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 +40 -6
- 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 +10 -3
- 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 +169 -31
- 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 +20 -17
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.es.js.map +1 -1
- 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 +119 -91
- 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 +34 -4
- package/dist/components/Form/Select/SingleSelect/useSearch.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 +18 -5
- 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 +4 -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 +5 -3
- 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 +25 -17
- 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 +8 -4
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.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 +5 -5
- 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 +37 -21
- 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 +8 -4
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.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 +2 -0
- 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 +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 +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 +108 -108
- package/dist/components/Layout/ActionBar/ActionBar.module.scss.cjs.js +2 -2
- package/dist/components/Layout/ActionBar/ActionBar.module.scss.es.js +10 -10
- 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 +66 -41
- 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 +28 -13
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.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.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.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.map +1 -1
- package/dist/components/Link/Link.es.js +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 +17 -17
- 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 +7 -1
- package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.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/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.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.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.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.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.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.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.es.js +10 -10
- package/dist/components/Notifications/SideSheet/SideSheet.cjs.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheet.es.js +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.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.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.map +1 -1
- package/dist/components/Notifications/SlideInModal/SlideInModal.es.js +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 +118 -90
- 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 +15 -14
- package/dist/components/Pagination/Pagination.module.scss.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.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/Skeleton/Skeleton.module.scss.cjs.js +2 -2
- package/dist/components/Skeleton/Skeleton.module.scss.es.js +5 -5
- 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.module.scss.cjs.js +2 -2
- package/dist/components/Stepper/Step.module.scss.es.js +22 -22
- 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.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/Tab.module.scss.es.js +3 -3
- 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 +1 -1
- 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.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 +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.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.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.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 +9 -16
- 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 +28 -27
- package/dist/components/Tooltip/Tooltip.module.scss.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 +2 -1
- package/dist/components/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
- package/dist/components/_BaseStyling_/BaseStyling.es.js +3 -3
- package/dist/components/_BaseStyling_/BaseStyling.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.es.js +1 -1
- 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/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/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 +7 -6
- package/dist/components/admin/layout/LeftNav/useRefItems.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.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.es.js +7 -7
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.es.js +13 -13
- 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 +2 -4
- package/dist/components/withReadOnly.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 +1 -1
- package/dist/hooks/useScreenSize.es.js.map +1 -1
- package/dist/hooks/useStickyStacking.cjs.js +2 -0
- package/dist/hooks/useStickyStacking.cjs.js.map +1 -0
- package/dist/hooks/useStickyStacking.es.js +208 -0
- package/dist/hooks/useStickyStacking.es.js.map +1 -0
- package/dist/hooks/useUploadFile.cjs.js +1 -1
- package/dist/hooks/useUploadFile.cjs.js.map +1 -1
- package/dist/hooks/useUploadFile.es.js +1 -1
- package/dist/hooks/useUploadFile.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +95 -7
- package/dist/index.es.js +2 -0
- package/dist/index.es.js.map +1 -1
- 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 +14 -16
- package/dist/util/helper.es.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUpload.es.js","sources":["../../../../src/components/Form/FileUpload/FileUpload.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, {\n DragEvent,\n DragEventHandler,\n ForwardRefRenderFunction,\n useEffect,\n useRef,\n useState\n} from \"react\";\nimport { Button } from \"../../Button/Button\";\nimport { FILE_ACTION, FileItem, Props as FileConfig } from \"./FileItem/FileItem\";\nimport { Props as InputProps } from \"../Input/Input\";\nimport { Typography } from \"../../Typography/Typography\";\nimport classes from \"./FileUpload.module.scss\";\nimport { useDetermineStatusIcon } from \"../../../hooks/useDetermineStatusIcon\";\nimport { Label } from \"../Label/Label\";\nimport { withReadOnly } from \"../../withReadOnly\";\n\ntype FileUploadType = Omit<InputProps, \"onDrop\" | \"type\" | \"onChange\" | \"suffix\" | \"prefix\">;\nexport type FileType = Omit<FileConfig, \"onRequestedFileAction\"> &\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any */\n Pick<File, \"size\" | \"type\"> & { data?: any };\n\nexport interface Props extends FileUploadType {\n accept: string;\n title: string;\n multiple: boolean;\n fileList: FileType[];\n exceedingMaxSizeErrorText?: string;\n maxFileSizeInBytes?: number;\n selectButtonText?: string;\n dragAndDropText?: string;\n onDragOver?: DragEventHandler;\n onDragEnter?: DragEventHandler;\n onDragLeave?: DragEventHandler;\n onDrop?: (e: FileType[]) => void;\n onChange?: (e: FileType[]) => void;\n onRequestedFileAction?: (action: FILE_ACTION, name: FileType[\"name\"]) => void;\n downloadFileLink?: string;\n onDownloadFile?: () => void;\n isRequired?: boolean;\n invalidDropErrorMessage?: string;\n noMultipleFileDropErrorMessage?: string;\n readOnlyViewMessage?: string;\n helperText?: string;\n}\n\nconst FileUploadComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (\n {\n name,\n accept,\n error,\n success,\n maxFileSizeInBytes,\n multiple,\n id,\n title,\n labeledBy,\n disabled = false,\n onChange,\n dragAndDropText = \"Drag and drop or\",\n selectButtonText = \"Browse file\",\n readOnlyViewMessage = \"No file uploaded\",\n onDragOver,\n onDragLeave,\n wrapperProps,\n onDrop,\n onRequestedFileAction,\n exceedingMaxSizeErrorText,\n fileList,\n onDownloadFile,\n downloadFileLink,\n isRequired = true,\n invalidDropErrorMessage = \"Invalid file format. Supported formats are: $accept.\",\n noMultipleFileDropErrorMessage = \"You can upload only a single file.\",\n helperText,\n ...rest\n }: Props,\n ref\n) => {\n const labelRef = useRef(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const fileItemRefs = useRef<Map<string, HTMLDivElement>>(new Map());\n const previousFileListLength = useRef<number>(0);\n const [dragActive, setDragActive] = useState(false);\n const [errorMsg, setErrorMsg] = useState(\"\");\n const [inputError, setInputError] = useState(false);\n const icon = useDetermineStatusIcon({ success, error });\n const dropzoneClassNames = [classes[\"file-dropzone\"]];\n const dropzoneContainerClassNames = [classes[\"upload-button-wrapper\"]];\n const subTextClass = [classes[\"file-selector-sub-text\"]];\n const errorTextClass = [classes[\"file-selector-sub-text\"]];\n dragActive && dropzoneContainerClassNames.push(classes[\"drag-active\"]);\n const hasError = inputError || error || errorMsg;\n const readOnlyView = rest[\"data-readonlyview\"];\n if (hasError) {\n const errorClass = classes[\"error\"];\n dropzoneClassNames.push(errorClass);\n subTextClass.push(errorClass);\n errorTextClass.push(errorClass);\n }\n disabled && dropzoneContainerClassNames.push(classes[\"disabled\"]);\n success && !error && dropzoneClassNames.push(classes[\"success\"]);\n const inputId = `input-${name}`;\n const labelClasses = [classes[\"file-upload-title\"]];\n isRequired && labelClasses.push(classes[\"required\"]);\n\n const getFileList = (files: FileList | null): FileType[] => {\n let savedFiles = fileList ? [...fileList] : [];\n const fileNames = fileList.map(el => el.name);\n files?.length &&\n Array.from(files as ArrayLike<File>).forEach(el => {\n if (!fileNames.includes(el.name)) {\n savedFiles = multiple\n ? [\n ...savedFiles,\n {\n ...validateUpload(el),\n data: el\n }\n ]\n : [\n {\n ...validateUpload(el),\n data: el\n }\n ];\n }\n });\n return savedFiles;\n };\n const onInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n e.preventDefault();\n e.stopPropagation();\n const files = getFileList(e.target.files);\n const isFileValid = files.length && verifyExtensionValidity(files[files.length - 1]);\n\n if (isFileValid) {\n setErrorMsg(\"\");\n e.target.value = \"\";\n onChange?.(files);\n }\n };\n\n const verifyExtensionValidity = (file: FileType) => {\n const extension = file.name.split(\".\").pop();\n return extension && accept.includes(extension);\n };\n\n const validateUpload = (file: FileType) => {\n const result: FileType = {\n name: file.name,\n size: file.size,\n type: file.type\n };\n\n let err = false;\n\n if (maxFileSizeInBytes && file.size && file.size >= maxFileSizeInBytes) {\n let sizeMessage: string;\n const isAtLeastOneMb = maxFileSizeInBytes >= 1024 * 1024;\n\n if (isAtLeastOneMb) {\n sizeMessage = `${parseFloat((maxFileSizeInBytes / (1024 * 1024)).toFixed(2))}MB`;\n } else {\n sizeMessage = `${parseFloat((maxFileSizeInBytes / 1024).toFixed(2))}KB`;\n }\n\n result.error =\n exceedingMaxSizeErrorText ??\n `The maximum allowed file size is ${sizeMessage}. Upload a smaller file.`;\n result.status = \"error\";\n err = true;\n }\n\n setInputError(err);\n return result;\n };\n\n useEffect(() => {\n if (fileList.length) {\n const validatedFiles = fileList.map(file => validateUpload(file));\n onChange?.(validatedFiles);\n }\n }, []);\n\n useEffect(() => {\n if (fileList.length > previousFileListLength.current && fileList.length > 0) {\n const newFile = fileList[fileList.length - 1];\n\n if (newFile) {\n requestAnimationFrame(() => {\n setTimeout(() => {\n const fileItemElement = fileItemRefs.current.get(newFile.name);\n if (fileItemElement) {\n fileItemElement.focus();\n fileItemElement.scrollIntoView({ behavior: \"smooth\", block: \"nearest\" });\n }\n }, 300);\n });\n }\n }\n previousFileListLength.current = fileList.length;\n }, [fileList]);\n\n const handleOnDragOver = (e: DragEvent<HTMLElement>) => {\n e.preventDefault();\n e.stopPropagation();\n if (!dragActive) {\n setDragActive(true);\n }\n onDragOver?.(e);\n };\n\n const handleOnDragLeave = (e: DragEvent<HTMLElement>) => {\n e.preventDefault();\n e.stopPropagation();\n const target = e.target as HTMLElement;\n if (target?.offsetParent?.classList.contains(classes[\"file-dropzone\"])) {\n setDragActive(false);\n }\n onDragLeave?.(e);\n };\n\n const handleOnDrop = (e: DragEvent<HTMLElement>) => {\n e.preventDefault();\n e.stopPropagation();\n if (e?.dataTransfer?.files && e.dataTransfer.files.length) {\n const extension = e?.dataTransfer?.files[0]?.name.split(\".\").pop();\n if (extension && accept && !accept.includes(extension)) {\n setErrorMsg(invalidDropErrorMessage.replace(\"$accept\", accept));\n setDragActive(false);\n return;\n } else if (!multiple && e.dataTransfer.files.length > 1) {\n setErrorMsg(noMultipleFileDropErrorMessage);\n setDragActive(false);\n return;\n } else {\n setErrorMsg(\"\");\n }\n const validatedFiles = getFileList(e.dataTransfer.files);\n onDrop ? onDrop?.(validatedFiles) : onChange?.(validatedFiles);\n }\n setDragActive(false);\n };\n\n return (\n <div\n className={classes[\"file-upload-wrapper\"]}\n data-file-upload-component=\"true\"\n {...wrapperProps}\n >\n <div className={classes[\"dropzone-wrapper\"]}>\n <div className={dropzoneClassNames.join(\" \")} data-readonlyview={readOnlyView}>\n <Label ref={labelRef} className={`${labelClasses.join(\" \")}`} htmlFor={inputId}>\n {title}\n </Label>\n {fileList?.length > 0 && (\n <ul className={classes[\"file-list\"]}>\n {fileList.map(({ name, status, progress, error }) => (\n <li key={name} className={status} id={name}>\n <FileItem\n ref={(el: HTMLDivElement | null) => {\n if (el) {\n fileItemRefs.current.set(name, el);\n } else {\n fileItemRefs.current.delete(name);\n }\n }}\n name={name}\n key={`${name}_${status}`}\n status={status}\n progress={progress}\n error={error}\n downloadFileLink={downloadFileLink}\n onDownloadFile={onDownloadFile}\n onRequestedFileAction={onRequestedFileAction}\n />\n </li>\n ))}\n </ul>\n )}\n\n <section\n className={dropzoneContainerClassNames.join(\" \")}\n onDragOver={e => !disabled && handleOnDragOver(e)}\n onDragLeave={e => !disabled && handleOnDragLeave(e)}\n onDrop={e => !disabled && handleOnDrop(e)}\n aria-label={\n readOnlyView\n ? readOnlyViewMessage\n : `File upload area. ${dragAndDropText} ${selectButtonText}`\n }\n data-file-upload-dropzone=\"true\"\n >\n <div className={classes[\"file-select\"]}>\n <Typography variant=\"body\" className={\"drag-and-drop-text\"}>\n {readOnlyView ? readOnlyViewMessage : dragAndDropText}\n </Typography>\n\n <div className={classes[\"file-upload-btn\"]}>\n <Button\n variant=\"outline\"\n disabled={disabled}\n onClick={e => {\n e.stopPropagation();\n inputRef.current?.click();\n }}\n aria-label={`click ${selectButtonText} to upload file`}\n >\n {selectButtonText}\n </Button>\n <input\n {...rest}\n className={`${classes[\"upload-input\"]} ${rest.className}`}\n ref={inputRef}\n type=\"file\"\n id={inputId}\n name={name}\n multiple={multiple}\n disabled={disabled}\n accept={accept}\n onChange={onInputChange}\n spellCheck={false}\n tabIndex={-1}\n aria-hidden=\"true\"\n />\n </div>\n {!disabled && icon}\n <span className={classes[\"outline\"]}></span>\n </div>\n </section>\n </div>\n {errorMsg && (\n <Typography variant={\"sub-text\"} className={errorTextClass.join(\" \")}>\n {errorMsg}\n </Typography>\n )}\n {helperText && (\n <Typography variant={\"sub-text\"} className={subTextClass.join(\" \")}>\n {helperText}\n </Typography>\n )}\n </div>\n </div>\n );\n};\n\nexport const FileUpload = withReadOnly(React.forwardRef(FileUploadComponent));\n"],"names":["name","error"],"mappings":";;;;;;;;AA8DA,MAAM,sBAAyE,CAC7E;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,0BAA0B;AAAA,EAC1B,iCAAiC;AAAA,EACjC;AAAA,EACA,GAAG;AACL,GACA,QACG;AACH,QAAM,WAAW,OAAO,IAAI;AAC5B,QAAM,WAAW,OAAyB,IAAI;AAC9C,QAAM,eAAe,OAAoC,oBAAI,KAAK;AAClE,QAAM,yBAAyB,OAAe,CAAC;AAC/C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,EAAE;AAC3C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,OAAO,uBAAuB,EAAE,SAAS,OAAO;AACtD,QAAM,qBAAqB,CAAC,QAAQ,eAAe,CAAC;AACpD,QAAM,8BAA8B,CAAC,QAAQ,uBAAuB,CAAC;AACrE,QAAM,eAAe,CAAC,QAAQ,wBAAwB,CAAC;AACvD,QAAM,iBAAiB,CAAC,QAAQ,wBAAwB,CAAC;AACzD,gBAAc,4BAA4B,KAAK,QAAQ,aAAa,CAAC;AACrE,QAAM,WAAW,cAAc,SAAS;AACxC,QAAM,eAAe,KAAK,mBAAmB;AAC7C,MAAI,UAAU;AACZ,UAAM,aAAa,QAAQ,OAAO;AAClC,uBAAmB,KAAK,UAAU;AAClC,iBAAa,KAAK,UAAU;AAC5B,mBAAe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E,gBAAA;AACF,2BAAS,YAAT,mBAAkB;AAAA,UACpB;AAAA,UACA,cAAY,SAAS,gBAAgB;AAAA,QAAA;AAAA,QAEpC;AAAA,MAAA,GAEH,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACE,GAAG;AAAA,UACJ,WAAW,GAAG,QAAQ,cAAc,CAAC,IAAI,KAAK,SAAS;AAAA,UACvD,KAAK;AAAA,UACL,MAAK;AAAA,UACL,IAAI;AAAA,UACJ;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,UAAU;AAAA,UACV,eAAY;AAAA,QAAA;AAAA,MAAA,CAEhB,GACC,CAAC,YAAY,MACd,sBAAA,cAAC,QAAA,EAAK,WAAW,QAAQ,SAAS,EAAA,CAAG,CACvC;AAAA,IAAA,CAEJ,GACC,YACC,sBAAA,cAAC,YAAA,EAAW,SAAS,YAAY,WAAW,eAAe,KAAK,GAAG,EAAA,GAChE,QACH,GAED,cACC,sBAAA,cAAC,YAAA,EAAW,SAAS,YAAY,WAAW,aAAa,KAAK,GAAG,EAAA,GAC9D,UACH,CAEJ;AAAA,EAAA;AAGN;AAEO,MAAM,aAAa,aAAa,MAAM,WAAW,mBAAmB,CAAC;"}
|
|
1
|
+
{"version":3,"file":"FileUpload.es.js","sources":["../../../../src/components/Form/FileUpload/FileUpload.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, {\n DragEvent,\n DragEventHandler,\n ForwardRefRenderFunction,\n useEffect,\n useRef,\n useState\n} from \"react\";\nimport { Button } from \"../../Button/Button\";\nimport { FILE_ACTION, FileItem, Props as FileConfig } from \"./FileItem/FileItem\";\nimport { Props as InputProps } from \"../Input/Input\";\nimport { Typography } from \"../../Typography/Typography\";\nimport classes from \"./FileUpload.module.scss\";\nimport { useDetermineStatusIcon } from \"../../../hooks/useDetermineStatusIcon\";\nimport { Label } from \"../Label/Label\";\nimport { withReadOnly } from \"../../withReadOnly\";\n\ntype FileUploadType = Omit<InputProps, \"onDrop\" | \"type\" | \"onChange\" | \"suffix\" | \"prefix\">;\nexport type FileType = Omit<FileConfig, \"onRequestedFileAction\"> &\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any */\n Pick<File, \"size\" | \"type\"> & { data?: any };\n\nexport interface Props extends FileUploadType {\n accept: string;\n title: string;\n multiple: boolean;\n fileList: FileType[];\n exceedingMaxSizeErrorText?: string;\n maxFileSizeInBytes?: number;\n selectButtonText?: string;\n dragAndDropText?: string;\n onDragOver?: DragEventHandler;\n onDragEnter?: DragEventHandler;\n onDragLeave?: DragEventHandler;\n onDrop?: (e: FileType[]) => void;\n onChange?: (e: FileType[]) => void;\n onRequestedFileAction?: (action: FILE_ACTION, name: FileType[\"name\"]) => void;\n downloadFileLink?: string;\n onDownloadFile?: () => void;\n isRequired?: boolean;\n invalidDropErrorMessage?: string;\n noMultipleFileDropErrorMessage?: string;\n readOnlyViewMessage?: string;\n helperText?: string;\n}\n\nconst FileUploadComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (\n {\n name,\n accept,\n error,\n success,\n maxFileSizeInBytes,\n multiple,\n id,\n title,\n labeledBy,\n disabled = false,\n onChange,\n dragAndDropText = \"Drag and drop or\",\n selectButtonText = \"Browse file\",\n readOnlyViewMessage = \"No file uploaded\",\n onDragOver,\n onDragLeave,\n wrapperProps,\n onDrop,\n onRequestedFileAction,\n exceedingMaxSizeErrorText,\n fileList,\n onDownloadFile,\n downloadFileLink,\n isRequired = true,\n invalidDropErrorMessage = \"Invalid file format. Supported formats are: $accept.\",\n noMultipleFileDropErrorMessage = \"You can upload only a single file.\",\n helperText,\n ...rest\n }: Props,\n ref\n) => {\n const labelRef = useRef(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const fileItemRefs = useRef<Map<string, HTMLDivElement>>(new Map());\n const previousFileListLength = useRef<number>(0);\n const [dragActive, setDragActive] = useState(false);\n const [errorMsg, setErrorMsg] = useState(\"\");\n const [inputError, setInputError] = useState(false);\n const icon = useDetermineStatusIcon({ success, error });\n const dropzoneClassNames = [classes[\"file-dropzone\"]];\n const dropzoneContainerClassNames = [classes[\"upload-button-wrapper\"]];\n const subTextClass = [classes[\"file-selector-sub-text\"]];\n const errorTextClass = [classes[\"file-selector-sub-text\"]];\n dragActive && dropzoneContainerClassNames.push(classes[\"drag-active\"]);\n const hasError = inputError || error || errorMsg;\n const readOnlyView = rest[\"data-readonlyview\"];\n if (hasError) {\n const errorClass = classes[\"error\"];\n dropzoneClassNames.push(errorClass);\n subTextClass.push(errorClass);\n errorTextClass.push(errorClass);\n }\n disabled && dropzoneContainerClassNames.push(classes[\"disabled\"]);\n success && !error && dropzoneClassNames.push(classes[\"success\"]);\n const inputId = `input-${name}`;\n const labelClasses = [classes[\"file-upload-title\"]];\n isRequired && labelClasses.push(classes[\"required\"]);\n\n const getFileList = (files: FileList | null): FileType[] => {\n let savedFiles = fileList ? [...fileList] : [];\n const fileNames = new Set(fileList.map(el => el.name));\n files?.length &&\n Array.from(files as ArrayLike<File>).forEach(el => {\n if (!fileNames.has(el.name)) {\n savedFiles = multiple\n ? [\n ...savedFiles,\n {\n ...validateUpload(el),\n data: el\n }\n ]\n : [\n {\n ...validateUpload(el),\n data: el\n }\n ];\n }\n });\n return savedFiles;\n };\n const onInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n e.preventDefault();\n e.stopPropagation();\n const files = getFileList(e.target.files);\n const isFileValid = files.length && verifyExtensionValidity(files[files.length - 1]);\n\n if (isFileValid) {\n setErrorMsg(\"\");\n e.target.value = \"\";\n onChange?.(files);\n }\n };\n\n const verifyExtensionValidity = (file: FileType) => {\n const extension = file.name.split(\".\").pop();\n return extension && accept.includes(extension);\n };\n\n const validateUpload = (file: FileType) => {\n const result: FileType = {\n name: file.name,\n size: file.size,\n type: file.type\n };\n\n let err = false;\n\n if (maxFileSizeInBytes && file.size && file.size >= maxFileSizeInBytes) {\n let sizeMessage: string;\n const isAtLeastOneMb = maxFileSizeInBytes >= 1024 * 1024;\n\n if (isAtLeastOneMb) {\n sizeMessage = `${Number.parseFloat((maxFileSizeInBytes / (1024 * 1024)).toFixed(2))}MB`;\n } else {\n sizeMessage = `${Number.parseFloat((maxFileSizeInBytes / 1024).toFixed(2))}KB`;\n }\n\n result.error =\n exceedingMaxSizeErrorText ??\n `The maximum allowed file size is ${sizeMessage}. Upload a smaller file.`;\n result.status = \"error\";\n err = true;\n }\n\n setInputError(err);\n return result;\n };\n\n useEffect(() => {\n if (fileList.length) {\n const validatedFiles = fileList.map(file => validateUpload(file));\n onChange?.(validatedFiles);\n }\n }, []);\n\n useEffect(() => {\n if (fileList.length > previousFileListLength.current && fileList.length > 0) {\n const newFile = fileList[fileList.length - 1];\n\n if (newFile) {\n requestAnimationFrame(() => {\n setTimeout(() => {\n const fileItemElement = fileItemRefs.current.get(newFile.name);\n if (fileItemElement) {\n fileItemElement.focus();\n fileItemElement.scrollIntoView({ behavior: \"smooth\", block: \"nearest\" });\n }\n }, 300);\n });\n }\n }\n previousFileListLength.current = fileList.length;\n }, [fileList]);\n\n const handleOnDragOver = (e: DragEvent<HTMLElement>) => {\n e.preventDefault();\n e.stopPropagation();\n if (!dragActive) {\n setDragActive(true);\n }\n onDragOver?.(e);\n };\n\n const handleOnDragLeave = (e: DragEvent<HTMLElement>) => {\n e.preventDefault();\n e.stopPropagation();\n const target = e.target as HTMLElement;\n if (target?.offsetParent?.classList.contains(classes[\"file-dropzone\"])) {\n setDragActive(false);\n }\n onDragLeave?.(e);\n };\n\n const handleOnDrop = (e: DragEvent<HTMLElement>) => {\n e.preventDefault();\n e.stopPropagation();\n if (e?.dataTransfer?.files?.length) {\n const extension = e.dataTransfer.files[0]?.name.split(\".\").pop();\n if (extension && accept && !accept.includes(extension)) {\n setErrorMsg(invalidDropErrorMessage.replace(\"$accept\", accept));\n setDragActive(false);\n return;\n } else if (!multiple && e.dataTransfer.files.length > 1) {\n setErrorMsg(noMultipleFileDropErrorMessage);\n setDragActive(false);\n return;\n } else {\n setErrorMsg(\"\");\n }\n const validatedFiles = getFileList(e.dataTransfer.files);\n onDrop ? onDrop?.(validatedFiles) : onChange?.(validatedFiles);\n }\n setDragActive(false);\n };\n\n return (\n <div\n className={classes[\"file-upload-wrapper\"]}\n data-file-upload-component=\"true\"\n {...wrapperProps}\n >\n <div className={classes[\"dropzone-wrapper\"]}>\n <div className={dropzoneClassNames.join(\" \")} data-readonlyview={readOnlyView}>\n <Label ref={labelRef} className={`${labelClasses.join(\" \")}`} htmlFor={inputId}>\n {title}\n </Label>\n {fileList?.length > 0 && (\n <ul className={classes[\"file-list\"]}>\n {fileList.map(({ name, status, progress, error }) => (\n <li key={name} className={status} id={name}>\n <FileItem\n ref={(el: HTMLDivElement | null) => {\n if (el) {\n fileItemRefs.current.set(name, el);\n } else {\n fileItemRefs.current.delete(name);\n }\n }}\n name={name}\n key={`${name}_${status}`}\n status={status}\n progress={progress}\n error={error}\n downloadFileLink={downloadFileLink}\n onDownloadFile={onDownloadFile}\n onRequestedFileAction={onRequestedFileAction}\n />\n </li>\n ))}\n </ul>\n )}\n\n <section\n className={dropzoneContainerClassNames.join(\" \")}\n onDragOver={e => !disabled && handleOnDragOver(e)}\n onDragLeave={e => !disabled && handleOnDragLeave(e)}\n onDrop={e => !disabled && handleOnDrop(e)}\n aria-label={\n readOnlyView\n ? readOnlyViewMessage\n : `File upload area. ${dragAndDropText} ${selectButtonText}`\n }\n data-file-upload-dropzone=\"true\"\n >\n <div className={classes[\"file-select\"]}>\n <Typography variant=\"body\" className={\"drag-and-drop-text\"}>\n {readOnlyView ? readOnlyViewMessage : dragAndDropText}\n </Typography>\n\n <div className={classes[\"file-upload-btn\"]}>\n <Button\n variant=\"outline\"\n disabled={disabled}\n onClick={e => {\n e.stopPropagation();\n inputRef.current?.click();\n }}\n aria-label={`click ${selectButtonText} to upload file`}\n >\n {selectButtonText}\n </Button>\n <input\n {...rest}\n className={`${classes[\"upload-input\"]} ${rest.className}`}\n ref={inputRef}\n type=\"file\"\n id={inputId}\n name={name}\n multiple={multiple}\n disabled={disabled}\n accept={accept}\n onChange={onInputChange}\n spellCheck={false}\n tabIndex={-1}\n aria-hidden=\"true\"\n />\n </div>\n {!disabled && icon}\n <span className={classes[\"outline\"]}></span>\n </div>\n </section>\n </div>\n {errorMsg && (\n <Typography variant={\"sub-text\"} className={errorTextClass.join(\" \")}>\n {errorMsg}\n </Typography>\n )}\n {helperText && (\n <Typography variant={\"sub-text\"} className={subTextClass.join(\" \")}>\n {helperText}\n </Typography>\n )}\n </div>\n </div>\n );\n};\n\nexport const FileUpload = withReadOnly(React.forwardRef(FileUploadComponent));\n"],"names":["name","error"],"mappings":";;;;;;;;AA8DA,MAAM,sBAAyE,CAC7E;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,0BAA0B;AAAA,EAC1B,iCAAiC;AAAA,EACjC;AAAA,EACA,GAAG;AACL,GACA,QACG;AACH,QAAM,WAAW,OAAO,IAAI;AAC5B,QAAM,WAAW,OAAyB,IAAI;AAC9C,QAAM,eAAe,OAAoC,oBAAI,KAAK;AAClE,QAAM,yBAAyB,OAAe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AAA,GAChE,QACH,GAED,cACC,sBAAA,cAAC,YAAA,EAAW,SAAS,YAAY,WAAW,aAAa,KAAK,GAAG,EAAA,GAC9D,UACH,CAEJ;AAAA,EAAA;AAGN;AAEO,MAAM,aAAa,aAAa,MAAM,WAAW,mBAAmB,CAAC;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.FileUpload_sr-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.FileUpload_sr-only_PX3IM{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.FileUpload_hidden_PX3IM{display:none}.FileUpload_slide-in_PX3IM{animation:FileUpload_slide-in_PX3IM .5s forwards}@media(prefers-reduced-motion:reduce){.FileUpload_slide-in_PX3IM{animation-duration:.1ms}}.FileUpload_slide-out_PX3IM{animation:FileUpload_slide-out_PX3IM .5s forwards}@media(prefers-reduced-motion:reduce){.FileUpload_slide-out_PX3IM{animation-duration:.1ms}}@keyframes FileUpload_slide-in_PX3IM{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes FileUpload_slide-out_PX3IM{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\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 */.FileUpload_file-upload-wrapper_PX3IM{display:flex;flex-direction:column}.FileUpload_file-dropzone_PX3IM{border-radius:var(--input-border-radius);background-color:var(--input-background-color);position:relative;transition-property:all;transition-duration:.2s;transition-timing-function:ease-in-out}@media(prefers-reduced-motion:reduce){.FileUpload_file-dropzone_PX3IM{transition-duration:.1ms}}.FileUpload_file-dropzone_PX3IM .FileUpload_file-upload-title_PX3IM{margin:0 0 .25rem;font-family:var(--font-family);font-size:var(--form-control-font-size);line-height:var(--default-line-height);color:var(--color-blue-grey900);font-weight:400;display:block}.FileUpload_file-dropzone_PX3IM .FileUpload_file-upload-title_PX3IM.FileUpload_required_PX3IM:after{content:" *";color:var(--error)}.FileUpload_file-dropzone_PX3IM.FileUpload_error_PX3IM span[data-icon-status],.FileUpload_file-dropzone_PX3IM.FileUpload_error_PX3IM .FileUpload_file-upload-title_PX3IM{color:var(--error)}.FileUpload_file-dropzone_PX3IM.FileUpload_error_PX3IM .FileUpload_file-select_PX3IM{border-color:var(--error)}.FileUpload_file-dropzone_PX3IM.FileUpload_success_PX3IM span[data-icon-status]{color:var(--success)}.FileUpload_file-dropzone_PX3IM .FileUpload_upload-button-wrapper_PX3IM.FileUpload_disabled_PX3IM{pointer-events:none}.FileUpload_file-dropzone_PX3IM .FileUpload_upload-button-wrapper_PX3IM.FileUpload_disabled_PX3IM p{color:var(--color-blue-grey400)}.FileUpload_file-dropzone_PX3IM span[data-icon-status]{font-size:var(--font-size-big);position:absolute;top:auto;right:2rem}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:has(.FileUpload_file-list_PX3IM) .FileUpload_required_PX3IM:after{display:none}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:has(.FileUpload_file-list_PX3IM) ul li p span[data-icon]:before{color:var(--color-blue-grey900)}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:has(.FileUpload_file-list_PX3IM) ul li button{visibility:hidden}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:has(.FileUpload_file-list_PX3IM) .FileUpload_upload-button-wrapper_PX3IM{display:none}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:not(:has(.FileUpload_file-list_PX3IM)) .FileUpload_upload-button-wrapper_PX3IM{min-height:4.5rem}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:not(:has(.FileUpload_file-list_PX3IM)) .FileUpload_upload-button-wrapper_PX3IM .FileUpload_file-select_PX3IM{border:0}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:not(:has(.FileUpload_file-list_PX3IM)) .FileUpload_upload-button-wrapper_PX3IM .FileUpload_file-select_PX3IM p{color:var(--read-only-text-color)}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:not(:has(.FileUpload_file-list_PX3IM)) .FileUpload_upload-button-wrapper_PX3IM .FileUpload_file-upload-btn_PX3IM{display:none}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:not(:has(.FileUpload_file-list_PX3IM)) .FileUpload_required_PX3IM:after{display:none}.FileUpload_upload-button-wrapper_PX3IM{background:var(--color-blue-grey25);padding:4px}.FileUpload_upload-button-wrapper_PX3IM.FileUpload_drag-active_PX3IM .FileUpload_outline_PX3IM{position:absolute;margin:0;padding:0;top:0;right:0;bottom:0;left:0;border:var(--file-upload-border-width) var(--drag-drop-border-style) var(--color-blue-grey500);border-radius:var(--input-border-radius);background-color:var(--color-primary50);transition-property:all;transition-duration:.2s;transition-timing-function:ease-in-out}@media(prefers-reduced-motion:reduce){.FileUpload_upload-button-wrapper_PX3IM.FileUpload_drag-active_PX3IM .FileUpload_outline_PX3IM{transition-duration:.1ms}}.FileUpload_upload-button-wrapper_PX3IM.FileUpload_drag-active_PX3IM .FileUpload_outline_PX3IM:before{content:"Drop here";text-align:center;display:block;color:var(--color-primary);padding-top:2rem}.FileUpload_upload-button-wrapper_PX3IM.FileUpload_drag-active_PX3IM:hover .FileUpload_outline_PX3IM{background-color:var(--color-primary50)}.FileUpload_upload-button-wrapper_PX3IM.FileUpload_drag-active_PX3IM .FileUpload_file-select_PX3IM{position:relative}.FileUpload_upload-button-wrapper_PX3IM.FileUpload_drag-active_PX3IM .FileUpload_error_PX3IM .FileUpload_outline_PX3IM{border-color:var(--error)}.FileUpload_file-selector-sub-text_PX3IM{color:var(--input-helper-text-color)}.FileUpload_file-selector-sub-text_PX3IM.FileUpload_error_PX3IM{color:var(--error);display:block}.FileUpload_file-selector-helper-text_PX3IM{color:var(--greyed-out);display:block}.FileUpload_file-select_PX3IM{display:flex;align-items:center;flex-direction:row;justify-content:center;border:var(--file-upload-border-width) var(--drag-drop-border-style) var(--color-blue-grey100);padding:1.25rem}.FileUpload_file-select_PX3IM [class*=file]{font-size:var(--font-size-big);margin-left:.5rem}.FileUpload_file-select_PX3IM [class*=typography]{margin-bottom:0}.FileUpload_upload-input_PX3IM{display:block;width:100%;border:none;text-transform:none;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;cursor:pointer}.FileUpload_upload-input_PX3IM:focus{outline:none}.FileUpload_file-upload-btn_PX3IM{position:relative}.FileUpload_file-list_PX3IM{list-style:none;padding:0;margin:.25rem 0}.FileUpload_file-list_PX3IM li:not(:last-child){margin-bottom:.5rem}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="FileUpload_required_PX3IM",l="FileUpload_error_PX3IM",o="FileUpload_success_PX3IM",i="FileUpload_disabled_PX3IM",p="FileUpload_outline_PX3IM",d={"file-upload-wrapper":"FileUpload_file-upload-wrapper_PX3IM","file-dropzone":"FileUpload_file-dropzone_PX3IM","file-upload-title":"FileUpload_file-upload-title_PX3IM",required:e,error:l,"file-select":"FileUpload_file-select_PX3IM",success:o,"upload-button-wrapper":"FileUpload_upload-button-wrapper_PX3IM",disabled:i,"file-list":"FileUpload_file-list_PX3IM","file-upload-btn":"FileUpload_file-upload-btn_PX3IM","drag-active":"FileUpload_drag-active_PX3IM",outline:p,"file-selector-sub-text":"FileUpload_file-selector-sub-text_PX3IM","upload-input":"FileUpload_upload-input_PX3IM"};exports.default=d,exports.disabled=i,exports.error=l,exports.outline=p,exports.required=e,exports.success=o;
|
|
3
3
|
//# sourceMappingURL=FileUpload.module.scss.cjs.js.map
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.FileUpload_sr-
|
|
2
|
-
const required = "
|
|
3
|
-
const error = "
|
|
4
|
-
const success = "
|
|
5
|
-
const disabled = "
|
|
6
|
-
const outline = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.FileUpload_sr-only_PX3IM{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.FileUpload_hidden_PX3IM{display:none}.FileUpload_slide-in_PX3IM{animation:FileUpload_slide-in_PX3IM .5s forwards}@media(prefers-reduced-motion:reduce){.FileUpload_slide-in_PX3IM{animation-duration:.1ms}}.FileUpload_slide-out_PX3IM{animation:FileUpload_slide-out_PX3IM .5s forwards}@media(prefers-reduced-motion:reduce){.FileUpload_slide-out_PX3IM{animation-duration:.1ms}}@keyframes FileUpload_slide-in_PX3IM{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes FileUpload_slide-out_PX3IM{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\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 */.FileUpload_file-upload-wrapper_PX3IM{display:flex;flex-direction:column}.FileUpload_file-dropzone_PX3IM{border-radius:var(--input-border-radius);background-color:var(--input-background-color);position:relative;transition-property:all;transition-duration:.2s;transition-timing-function:ease-in-out}@media(prefers-reduced-motion:reduce){.FileUpload_file-dropzone_PX3IM{transition-duration:.1ms}}.FileUpload_file-dropzone_PX3IM .FileUpload_file-upload-title_PX3IM{margin:0 0 .25rem;font-family:var(--font-family);font-size:var(--form-control-font-size);line-height:var(--default-line-height);color:var(--color-blue-grey900);font-weight:400;display:block}.FileUpload_file-dropzone_PX3IM .FileUpload_file-upload-title_PX3IM.FileUpload_required_PX3IM:after{content:" *";color:var(--error)}.FileUpload_file-dropzone_PX3IM.FileUpload_error_PX3IM span[data-icon-status],.FileUpload_file-dropzone_PX3IM.FileUpload_error_PX3IM .FileUpload_file-upload-title_PX3IM{color:var(--error)}.FileUpload_file-dropzone_PX3IM.FileUpload_error_PX3IM .FileUpload_file-select_PX3IM{border-color:var(--error)}.FileUpload_file-dropzone_PX3IM.FileUpload_success_PX3IM span[data-icon-status]{color:var(--success)}.FileUpload_file-dropzone_PX3IM .FileUpload_upload-button-wrapper_PX3IM.FileUpload_disabled_PX3IM{pointer-events:none}.FileUpload_file-dropzone_PX3IM .FileUpload_upload-button-wrapper_PX3IM.FileUpload_disabled_PX3IM p{color:var(--color-blue-grey400)}.FileUpload_file-dropzone_PX3IM span[data-icon-status]{font-size:var(--font-size-big);position:absolute;top:auto;right:2rem}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:has(.FileUpload_file-list_PX3IM) .FileUpload_required_PX3IM:after{display:none}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:has(.FileUpload_file-list_PX3IM) ul li p span[data-icon]:before{color:var(--color-blue-grey900)}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:has(.FileUpload_file-list_PX3IM) ul li button{visibility:hidden}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:has(.FileUpload_file-list_PX3IM) .FileUpload_upload-button-wrapper_PX3IM{display:none}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:not(:has(.FileUpload_file-list_PX3IM)) .FileUpload_upload-button-wrapper_PX3IM{min-height:4.5rem}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:not(:has(.FileUpload_file-list_PX3IM)) .FileUpload_upload-button-wrapper_PX3IM .FileUpload_file-select_PX3IM{border:0}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:not(:has(.FileUpload_file-list_PX3IM)) .FileUpload_upload-button-wrapper_PX3IM .FileUpload_file-select_PX3IM p{color:var(--read-only-text-color)}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:not(:has(.FileUpload_file-list_PX3IM)) .FileUpload_upload-button-wrapper_PX3IM .FileUpload_file-upload-btn_PX3IM{display:none}.FileUpload_file-dropzone_PX3IM[data-readonlyview=true]:not(:has(.FileUpload_file-list_PX3IM)) .FileUpload_required_PX3IM:after{display:none}.FileUpload_upload-button-wrapper_PX3IM{background:var(--color-blue-grey25);padding:4px}.FileUpload_upload-button-wrapper_PX3IM.FileUpload_drag-active_PX3IM .FileUpload_outline_PX3IM{position:absolute;margin:0;padding:0;top:0;right:0;bottom:0;left:0;border:var(--file-upload-border-width) var(--drag-drop-border-style) var(--color-blue-grey500);border-radius:var(--input-border-radius);background-color:var(--color-primary50);transition-property:all;transition-duration:.2s;transition-timing-function:ease-in-out}@media(prefers-reduced-motion:reduce){.FileUpload_upload-button-wrapper_PX3IM.FileUpload_drag-active_PX3IM .FileUpload_outline_PX3IM{transition-duration:.1ms}}.FileUpload_upload-button-wrapper_PX3IM.FileUpload_drag-active_PX3IM .FileUpload_outline_PX3IM:before{content:"Drop here";text-align:center;display:block;color:var(--color-primary);padding-top:2rem}.FileUpload_upload-button-wrapper_PX3IM.FileUpload_drag-active_PX3IM:hover .FileUpload_outline_PX3IM{background-color:var(--color-primary50)}.FileUpload_upload-button-wrapper_PX3IM.FileUpload_drag-active_PX3IM .FileUpload_file-select_PX3IM{position:relative}.FileUpload_upload-button-wrapper_PX3IM.FileUpload_drag-active_PX3IM .FileUpload_error_PX3IM .FileUpload_outline_PX3IM{border-color:var(--error)}.FileUpload_file-selector-sub-text_PX3IM{color:var(--input-helper-text-color)}.FileUpload_file-selector-sub-text_PX3IM.FileUpload_error_PX3IM{color:var(--error);display:block}.FileUpload_file-selector-helper-text_PX3IM{color:var(--greyed-out);display:block}.FileUpload_file-select_PX3IM{display:flex;align-items:center;flex-direction:row;justify-content:center;border:var(--file-upload-border-width) var(--drag-drop-border-style) var(--color-blue-grey100);padding:1.25rem}.FileUpload_file-select_PX3IM [class*=file]{font-size:var(--font-size-big);margin-left:.5rem}.FileUpload_file-select_PX3IM [class*=typography]{margin-bottom:0}.FileUpload_upload-input_PX3IM{display:block;width:100%;border:none;text-transform:none;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;cursor:pointer}.FileUpload_upload-input_PX3IM:focus{outline:none}.FileUpload_file-upload-btn_PX3IM{position:relative}.FileUpload_file-list_PX3IM{list-style:none;padding:0;margin:.25rem 0}.FileUpload_file-list_PX3IM li:not(:last-child){margin-bottom:.5rem}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
|
|
2
|
+
const required = "FileUpload_required_PX3IM";
|
|
3
|
+
const error = "FileUpload_error_PX3IM";
|
|
4
|
+
const success = "FileUpload_success_PX3IM";
|
|
5
|
+
const disabled = "FileUpload_disabled_PX3IM";
|
|
6
|
+
const outline = "FileUpload_outline_PX3IM";
|
|
7
7
|
const classes = {
|
|
8
|
-
"file-upload-wrapper": "FileUpload_file-upload-
|
|
9
|
-
"file-dropzone": "FileUpload_file-
|
|
10
|
-
"file-upload-title": "FileUpload_file-upload-
|
|
8
|
+
"file-upload-wrapper": "FileUpload_file-upload-wrapper_PX3IM",
|
|
9
|
+
"file-dropzone": "FileUpload_file-dropzone_PX3IM",
|
|
10
|
+
"file-upload-title": "FileUpload_file-upload-title_PX3IM",
|
|
11
11
|
required,
|
|
12
12
|
error,
|
|
13
|
-
"file-select": "FileUpload_file-
|
|
13
|
+
"file-select": "FileUpload_file-select_PX3IM",
|
|
14
14
|
success,
|
|
15
|
-
"upload-button-wrapper": "FileUpload_upload-button-
|
|
15
|
+
"upload-button-wrapper": "FileUpload_upload-button-wrapper_PX3IM",
|
|
16
16
|
disabled,
|
|
17
|
-
"file-list": "FileUpload_file-
|
|
18
|
-
"file-upload-btn": "FileUpload_file-upload-
|
|
19
|
-
"drag-active": "FileUpload_drag-
|
|
17
|
+
"file-list": "FileUpload_file-list_PX3IM",
|
|
18
|
+
"file-upload-btn": "FileUpload_file-upload-btn_PX3IM",
|
|
19
|
+
"drag-active": "FileUpload_drag-active_PX3IM",
|
|
20
20
|
outline,
|
|
21
|
-
"file-selector-sub-text": "FileUpload_file-selector-sub-
|
|
22
|
-
"upload-input": "FileUpload_upload-
|
|
21
|
+
"file-selector-sub-text": "FileUpload_file-selector-sub-text_PX3IM",
|
|
22
|
+
"upload-input": "FileUpload_upload-input_PX3IM"
|
|
23
23
|
};
|
|
24
24
|
export {
|
|
25
25
|
classes as default,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */.
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */.Form_form_PX3IM{font-family:var(--font-family)}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="Form_form_PX3IM",o={form:e};exports.default=o,exports.form=e;
|
|
3
3
|
//# sourceMappingURL=Form.module.scss.cjs.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */.
|
|
2
|
-
const form = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */.Form_form_PX3IM{font-family:var(--font-family)}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
const form = "Form_form_PX3IM";
|
|
3
3
|
const classes = {
|
|
4
4
|
form
|
|
5
5
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('/*!\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 */.FormControl_form-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('/*!\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 */.FormControl_form-control_PX3IM{font-size:var(--form-control-font-size)}.FormControl_form-control_PX3IM+.FormControl_form-control_PX3IM{margin-top:1rem}.FormControl_form-control_PX3IM.FormControl_grid_PX3IM{display:flex;flex-wrap:wrap;gap:1rem}.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_center_PX3IM,.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_middle_PX3IM{align-items:center}.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_start_PX3IM,.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_top_PX3IM{align-items:flex-start}.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_end_PX3IM,.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_bottom_PX3IM{align-items:flex-end}.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_stretch_PX3IM{align-items:stretch}.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_stretch_PX3IM>*>*{box-sizing:border-box;height:100%}.FormControl_column_PX3IM{flex-grow:1;flex-shrink:0}.FormControl_col-2_PX3IM{flex-basis:calc((100% - 1rem)/2)}.FormControl_col-3_PX3IM{flex-basis:calc((100% - 2rem) / 3)}')),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="FormControl_grid_PX3IM",t="FormControl_center_PX3IM",r="FormControl_middle_PX3IM",e="FormControl_start_PX3IM",l="FormControl_top_PX3IM",n="FormControl_end_PX3IM",_="FormControl_bottom_PX3IM",m="FormControl_stretch_PX3IM",s="FormControl_column_PX3IM",c={"form-control":"FormControl_form-control_PX3IM",grid:o,center:t,middle:r,start:e,top:l,end:n,bottom:_,stretch:m,column:s,"col-2":"FormControl_col-2_PX3IM","col-3":"FormControl_col-3_PX3IM"};exports.bottom=_,exports.center=t,exports.column=s,exports.default=c,exports.end=n,exports.grid=o,exports.middle=r,exports.start=e,exports.stretch=m,exports.top=l;
|
|
3
3
|
//# sourceMappingURL=FormControl.module.scss.cjs.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('/*!\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 */.FormControl_form-
|
|
2
|
-
const grid = "
|
|
3
|
-
const center = "
|
|
4
|
-
const middle = "
|
|
5
|
-
const start = "
|
|
6
|
-
const top = "
|
|
7
|
-
const end = "
|
|
8
|
-
const bottom = "
|
|
9
|
-
const stretch = "
|
|
10
|
-
const column = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('/*!\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 */.FormControl_form-control_PX3IM{font-size:var(--form-control-font-size)}.FormControl_form-control_PX3IM+.FormControl_form-control_PX3IM{margin-top:1rem}.FormControl_form-control_PX3IM.FormControl_grid_PX3IM{display:flex;flex-wrap:wrap;gap:1rem}.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_center_PX3IM,.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_middle_PX3IM{align-items:center}.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_start_PX3IM,.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_top_PX3IM{align-items:flex-start}.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_end_PX3IM,.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_bottom_PX3IM{align-items:flex-end}.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_stretch_PX3IM{align-items:stretch}.FormControl_form-control_PX3IM.FormControl_grid_PX3IM.FormControl_stretch_PX3IM>*>*{box-sizing:border-box;height:100%}.FormControl_column_PX3IM{flex-grow:1;flex-shrink:0}.FormControl_col-2_PX3IM{flex-basis:calc((100% - 1rem)/2)}.FormControl_col-3_PX3IM{flex-basis:calc((100% - 2rem) / 3)}')),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}}();
|
|
2
|
+
const grid = "FormControl_grid_PX3IM";
|
|
3
|
+
const center = "FormControl_center_PX3IM";
|
|
4
|
+
const middle = "FormControl_middle_PX3IM";
|
|
5
|
+
const start = "FormControl_start_PX3IM";
|
|
6
|
+
const top = "FormControl_top_PX3IM";
|
|
7
|
+
const end = "FormControl_end_PX3IM";
|
|
8
|
+
const bottom = "FormControl_bottom_PX3IM";
|
|
9
|
+
const stretch = "FormControl_stretch_PX3IM";
|
|
10
|
+
const column = "FormControl_column_PX3IM";
|
|
11
11
|
const classes = {
|
|
12
|
-
"form-control": "FormControl_form-
|
|
12
|
+
"form-control": "FormControl_form-control_PX3IM",
|
|
13
13
|
grid,
|
|
14
14
|
center,
|
|
15
15
|
middle,
|
|
@@ -19,8 +19,8 @@ const classes = {
|
|
|
19
19
|
bottom,
|
|
20
20
|
stretch,
|
|
21
21
|
column,
|
|
22
|
-
"col-2": "FormControl_col-
|
|
23
|
-
"col-3": "FormControl_col-
|
|
22
|
+
"col-2": "FormControl_col-2_PX3IM",
|
|
23
|
+
"col-3": "FormControl_col-3_PX3IM"
|
|
24
24
|
};
|
|
25
25
|
export {
|
|
26
26
|
bottom,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var r=document.createElement("style");r.appendChild(document.createTextNode(".FormErrorText_error-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var r=document.createElement("style");r.appendChild(document.createTextNode(".FormErrorText_error-message_PX3IM{color:var(--error);display:block;line-height:1rem}.FormErrorText_message_PX3IM{display:flex;align-items:flex-end}.FormErrorText_error-icon_PX3IM{flex-shrink:0;margin-right:.5rem;font-size:var(--font-size-big)}.FormErrorText_error-icon-before_PX3IM{margin-right:.5rem}.FormErrorText_error-icon-after_PX3IM{margin-left:.5rem}")),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r="FormErrorText_message_PX3IM",e={"error-message":"FormErrorText_error-message_PX3IM",message:r,"error-icon":"FormErrorText_error-icon_PX3IM","error-icon-before":"FormErrorText_error-icon-before_PX3IM","error-icon-after":"FormErrorText_error-icon-after_PX3IM"};exports.default=e,exports.message=r;
|
|
3
3
|
//# sourceMappingURL=FormErrorText.module.scss.cjs.js.map
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var r=document.createElement("style");r.appendChild(document.createTextNode(".FormErrorText_error-
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var r=document.createElement("style");r.appendChild(document.createTextNode(".FormErrorText_error-message_PX3IM{color:var(--error);display:block;line-height:1rem}.FormErrorText_message_PX3IM{display:flex;align-items:flex-end}.FormErrorText_error-icon_PX3IM{flex-shrink:0;margin-right:.5rem;font-size:var(--font-size-big)}.FormErrorText_error-icon-before_PX3IM{margin-right:.5rem}.FormErrorText_error-icon-after_PX3IM{margin-left:.5rem}")),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
|
2
|
+
const message = "FormErrorText_message_PX3IM";
|
|
2
3
|
const classes = {
|
|
3
|
-
"error-message": "FormErrorText_error-
|
|
4
|
-
|
|
5
|
-
"error-icon
|
|
6
|
-
"error-icon-
|
|
4
|
+
"error-message": "FormErrorText_error-message_PX3IM",
|
|
5
|
+
message,
|
|
6
|
+
"error-icon": "FormErrorText_error-icon_PX3IM",
|
|
7
|
+
"error-icon-before": "FormErrorText_error-icon-before_PX3IM",
|
|
8
|
+
"error-icon-after": "FormErrorText_error-icon-after_PX3IM"
|
|
7
9
|
};
|
|
8
10
|
export {
|
|
9
|
-
classes as default
|
|
11
|
+
classes as default,
|
|
12
|
+
message
|
|
10
13
|
};
|
|
11
14
|
//# sourceMappingURL=FormErrorText.module.scss.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormErrorText.module.scss.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormErrorText.module.scss.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */.FormGroup_form-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default={"form-group":"FormGroup_form-
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */.FormGroup_form-group_PX3IM{position:relative}.FormGroup_default-helper_PX3IM{font-size:var(--font-size-sub);line-height:1.33333333}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default={"form-group":"FormGroup_form-group_PX3IM","default-helper":"FormGroup_default-helper_PX3IM"};
|
|
3
3
|
//# sourceMappingURL=FormGroup.module.scss.cjs.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */.FormGroup_form-
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */.FormGroup_form-group_PX3IM{position:relative}.FormGroup_default-helper_PX3IM{font-size:var(--font-size-sub);line-height:1.33333333}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
2
|
const classes = {
|
|
3
|
-
"form-group": "FormGroup_form-
|
|
4
|
-
"default-helper": "FormGroup_default-
|
|
3
|
+
"form-group": "FormGroup_form-group_PX3IM",
|
|
4
|
+
"default-helper": "FormGroup_default-helper_PX3IM"
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
classes as default
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */div.FormHelperText_form-helper-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */div.FormHelperText_form-helper-text_PX3IM{color:var(--input-helper-text-color);margin-bottom:0}div.FormHelperText_disabled_PX3IM{color:var(--greyed-out)}div.FormHelperText_error_PX3IM{color:var(--error)}[data-readonlyview=true] div.FormHelperText_form-helper-text_PX3IM{display:none}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="FormHelperText_disabled_PX3IM",r="FormHelperText_error_PX3IM",t={"form-helper-text":"FormHelperText_form-helper-text_PX3IM",disabled:e,error:r};exports.default=t,exports.disabled=e,exports.error=r;
|
|
3
3
|
//# sourceMappingURL=FormHelperText.module.scss.cjs.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */div.FormHelperText_form-helper-
|
|
2
|
-
const disabled = "
|
|
3
|
-
const error = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */div.FormHelperText_form-helper-text_PX3IM{color:var(--input-helper-text-color);margin-bottom:0}div.FormHelperText_disabled_PX3IM{color:var(--greyed-out)}div.FormHelperText_error_PX3IM{color:var(--error)}[data-readonlyview=true] div.FormHelperText_form-helper-text_PX3IM{display:none}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
const disabled = "FormHelperText_disabled_PX3IM";
|
|
3
|
+
const error = "FormHelperText_error_PX3IM";
|
|
4
4
|
const classes = {
|
|
5
|
-
"form-helper-text": "FormHelperText_form-helper-
|
|
5
|
+
"form-helper-text": "FormHelperText_form-helper-text_PX3IM",
|
|
6
6
|
disabled,
|
|
7
7
|
error
|
|
8
8
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../FormHelperText/FormHelperText.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../FormHelperText/FormHelperText.cjs.js"),s=require("./FormSelectorWrapper.module.scss.cjs.js"),t=require("../../InlineEditing/InlineEditingContext.cjs.js"),o=require("../../RequiredSign/RequiredSign.cjs.js"),l=require("../FormErrorText/FormErrorText.cjs.js"),n=require("../FormStatusIndicator/FormStatusIndicator.cjs.js"),i=require("../../Icon/Icon.cjs.js"),a=e.forwardRef(({children:a,className:c,nestedChildren:d,containerProps:u,helperProps:m,error:p,disabled:g,helperText:E,success:j,errorMessage:f,errorMessageProps:I,parentErrorId:q,errorId:F,identifier:x,required:S,...h},v)=>{const T=(null==m?void 0:m.ref)??e.createRef(),{enabled:M}=t.useInlineEditing(),N=E??(null==m?void 0:m.children),$=!p&&N,b=p&&(f||(null==I?void 0:I.children));return e.createElement("div",{...h,ref:v,className:`${p?s.default.error:""} ${g?s.default.disabled:""} ${c??""}`},e.createElement("div",{...u,className:`${null==u?void 0:u.className} ${s.default["children-container"]}`},a,M&&e.createElement(e.Fragment,null,e.createElement(o.RequiredSign,{className:s.default.required}),e.createElement(n.FormStatusIndicator,{success:j,error:p},e.createElement(e.Fragment,null)))),!M&&($||b)&&(b?e.createElement(l.FormErrorText,{error:p,errorMessage:f,errorMessageProps:I,errorId:F,errorMessageIcon:i.Icons.Error,errorMessageIconPosition:"before"}):e.createElement(r.FormHelperText,{...m,ref:T,id:x,className:`${s.default["helper-text"]} ${(null==m?void 0:m.className)??""}`},(null==m?void 0:m.children)||E)),d)});exports.FormSelectorWrapper=a;
|
|
2
2
|
//# sourceMappingURL=FormSelectorWrapper.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormSelectorWrapper.cjs.js","sources":["../../../../src/components/Form/FormSelectorWrapper/FormSelectorWrapper.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, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n createRef,\n ReactNode\n} from \"react\";\nimport { KeyValuePair } from \"../../../interfaces\";\nimport { FormSelector } from \"../form.interfaces\";\nimport { FormHelperText, Props as FormHelperTextProps } from \"../FormHelperText/FormHelperText\";\nimport classes from \"./FormSelectorWrapper.module.scss\";\nimport { useInlineEditing } from \"../../InlineEditing/InlineEditingContext\";\nimport { RequiredSign } from \"../../RequiredSign/RequiredSign\";\nimport { FormErrorText } from \"../FormErrorText/FormErrorText\";\nimport { FormStatusIndicator } from \"../FormStatusIndicator/FormStatusIndicator\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, FormSelector {\n children?: ReactNode;\n nestedChildren?: ReactNode;\n containerProps?: ComponentPropsWithRef<\"div\"> & KeyValuePair;\n helperProps?: FormHelperTextProps;\n disabled?: boolean;\n errorId?: string;\n identifier?: string;\n required?: boolean;\n}\n\nconst FormSelectorWrapperComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n children,\n className,\n nestedChildren,\n containerProps,\n helperProps,\n error,\n disabled,\n helperText,\n success,\n errorMessage,\n errorMessageProps,\n parentErrorId,\n errorId,\n identifier,\n required,\n ...rest\n }: Props,\n ref\n) => {\n const helperRef = helperProps?.ref ?? createRef();\n const { enabled } = useInlineEditing();\n\n const hasHelperText = helperText ?? helperProps?.children;\n const showHelperText = !error && hasHelperText;\n const showErrorText = error && (errorMessage || errorMessageProps?.children);\n\n return (\n <div\n {...rest}\n ref={ref}\n className={`${error ? classes[\"error\"] : \"\"} ${disabled ? classes[\"disabled\"] : \"\"} ${\n className ?? \"\"\n }`}\n >\n <div\n {...containerProps}\n className={`${containerProps?.className} ${classes[\"children-container\"]}`}\n >\n {children}\n {enabled && (\n <>\n <RequiredSign className={classes[\"required\"]} />\n <FormStatusIndicator success={success} error={error}>\n <></>\n </FormStatusIndicator>\n </>\n )}\n </div>\n {!enabled &&\n (showHelperText || showErrorText) &&\n (showErrorText ? (\n <FormErrorText\n error={error}\n errorMessage={errorMessage}\n errorMessageProps={errorMessageProps}\n errorId={errorId}\n />\n ) : (\n <FormHelperText\n {...helperProps}\n ref={helperRef}\n id={identifier}\n className={`${classes[\"helper-text\"]} ${helperProps?.className ?? \"\"}`}\n >\n {helperProps?.children || helperText}\n </FormHelperText>\n ))}\n {nestedChildren}\n </div>\n );\n};\n\nexport const FormSelectorWrapper = React.forwardRef(FormSelectorWrapperComponent);\n"],"names":["FormSelectorWrapper","React","forwardRef","children","className","nestedChildren","containerProps","helperProps","error","disabled","helperText","success","errorMessage","errorMessageProps","parentErrorId","errorId","identifier","required","rest","ref","helperRef","createRef","enabled","useInlineEditing","hasHelperText","showHelperText","showErrorText","createElement","classes","Fragment","RequiredSign","FormStatusIndicator","FormErrorText","FormHelperText","id"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormSelectorWrapper.cjs.js","sources":["../../../../src/components/Form/FormSelectorWrapper/FormSelectorWrapper.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, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n createRef,\n ReactNode\n} from \"react\";\nimport { KeyValuePair } from \"../../../interfaces\";\nimport { FormSelector } from \"../form.interfaces\";\nimport { FormHelperText, Props as FormHelperTextProps } from \"../FormHelperText/FormHelperText\";\nimport classes from \"./FormSelectorWrapper.module.scss\";\nimport { useInlineEditing } from \"../../InlineEditing/InlineEditingContext\";\nimport { RequiredSign } from \"../../RequiredSign/RequiredSign\";\nimport { FormErrorText } from \"../FormErrorText/FormErrorText\";\nimport { FormStatusIndicator } from \"../FormStatusIndicator/FormStatusIndicator\";\nimport { Icons } from \"../../Icon/Icon\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, FormSelector {\n children?: ReactNode;\n nestedChildren?: ReactNode;\n containerProps?: ComponentPropsWithRef<\"div\"> & KeyValuePair;\n helperProps?: FormHelperTextProps;\n disabled?: boolean;\n errorId?: string;\n identifier?: string;\n required?: boolean;\n}\n\nconst FormSelectorWrapperComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n children,\n className,\n nestedChildren,\n containerProps,\n helperProps,\n error,\n disabled,\n helperText,\n success,\n errorMessage,\n errorMessageProps,\n parentErrorId,\n errorId,\n identifier,\n required,\n ...rest\n }: Props,\n ref\n) => {\n const helperRef = helperProps?.ref ?? createRef();\n const { enabled } = useInlineEditing();\n\n const hasHelperText = helperText ?? helperProps?.children;\n const showHelperText = !error && hasHelperText;\n const showErrorText = error && (errorMessage || errorMessageProps?.children);\n\n return (\n <div\n {...rest}\n ref={ref}\n className={`${error ? classes[\"error\"] : \"\"} ${disabled ? classes[\"disabled\"] : \"\"} ${\n className ?? \"\"\n }`}\n >\n <div\n {...containerProps}\n className={`${containerProps?.className} ${classes[\"children-container\"]}`}\n >\n {children}\n {enabled && (\n <>\n <RequiredSign className={classes[\"required\"]} />\n <FormStatusIndicator success={success} error={error}>\n <></>\n </FormStatusIndicator>\n </>\n )}\n </div>\n {!enabled &&\n (showHelperText || showErrorText) &&\n (showErrorText ? (\n <FormErrorText\n error={error}\n errorMessage={errorMessage}\n errorMessageProps={errorMessageProps}\n errorId={errorId}\n errorMessageIcon={Icons.Error}\n errorMessageIconPosition=\"before\"\n />\n ) : (\n <FormHelperText\n {...helperProps}\n ref={helperRef}\n id={identifier}\n className={`${classes[\"helper-text\"]} ${helperProps?.className ?? \"\"}`}\n >\n {helperProps?.children || helperText}\n </FormHelperText>\n ))}\n {nestedChildren}\n </div>\n );\n};\n\nexport const FormSelectorWrapper = React.forwardRef(FormSelectorWrapperComponent);\n"],"names":["FormSelectorWrapper","React","forwardRef","children","className","nestedChildren","containerProps","helperProps","error","disabled","helperText","success","errorMessage","errorMessageProps","parentErrorId","errorId","identifier","required","rest","ref","helperRef","createRef","enabled","useInlineEditing","hasHelperText","showHelperText","showErrorText","createElement","classes","Fragment","RequiredSign","FormStatusIndicator","FormErrorText","errorMessageIcon","Icons","Error","errorMessageIconPosition","FormHelperText","id"],"mappings":"2dAuHaA,EAAsBC,EAAMC,WA5E6C,EAElFC,WACAC,YACAC,iBACAC,iBACAC,cACAC,QACAC,WACAC,aACAC,UACAC,eACAC,oBACAC,gBACAC,UACAC,aACAC,cACGC,GAELC,KAEA,MAAMC,GAAY,MAAAb,OAAA,EAAAA,EAAaY,MAAOE,eAChCC,QAAEA,GAAYC,qBAEdC,EAAgBd,IAAc,MAAAH,OAAA,EAAAA,EAAaJ,UAC3CsB,GAAkBjB,GAASgB,EAC3BE,EAAgBlB,IAAUI,IAAgB,MAAAC,OAAA,EAAAA,EAAmBV,WAEnE,OACEF,EAAA0B,cAAC,MAAA,IACKT,EACJC,MACAf,UAAW,GAAGI,EAAQoB,EAAAA,QAAe,MAAI,MAAMnB,EAAWmB,EAAAA,QAAkB,SAAI,MAC9ExB,GAAa,MAGfH,EAAA0B,cAAC,MAAA,IACKrB,EACJF,UAAW,GAAG,MAAAE,OAAA,EAAAA,EAAgBF,aAAawB,EAAAA,QAAQ,yBAElDzB,EACAmB,GACCrB,EAAA0B,cAAA1B,EAAA4B,SAAA,KACE5B,EAAA0B,cAACG,EAAAA,aAAA,CAAa1B,UAAWwB,EAAAA,QAAkB,2BAC1CG,EAAAA,oBAAA,CAAoBpB,UAAkBH,SACrCP,EAAA0B,cAAA1B,EAAA4B,SAAA,UAKNP,IACCG,GAAkBC,KAClBA,EACCzB,EAAA0B,cAACK,EAAAA,cAAA,CACCxB,QACAI,eACAC,oBACAE,UACAkB,iBAAkBC,EAAAA,MAAMC,MACxBC,yBAAyB,WAG3BnC,EAAA0B,cAACU,EAAAA,eAAA,IACK9B,EACJY,IAAKC,EACLkB,GAAItB,EACJZ,UAAW,GAAGwB,EAAAA,QAAQ,mBAAkB,MAAArB,OAAA,EAAAA,EAAaH,YAAa,aAEjEG,WAAaJ,WAAYO,IAG/BL"}
|
|
@@ -5,6 +5,7 @@ import { useInlineEditing } from "../../InlineEditing/InlineEditingContext.es.js
|
|
|
5
5
|
import { RequiredSign } from "../../RequiredSign/RequiredSign.es.js";
|
|
6
6
|
import { FormErrorText } from "../FormErrorText/FormErrorText.es.js";
|
|
7
7
|
import { FormStatusIndicator } from "../FormStatusIndicator/FormStatusIndicator.es.js";
|
|
8
|
+
import { Icons } from "../../Icon/Icon.es.js";
|
|
8
9
|
const FormSelectorWrapperComponent = ({
|
|
9
10
|
children,
|
|
10
11
|
className,
|
|
@@ -50,7 +51,9 @@ const FormSelectorWrapperComponent = ({
|
|
|
50
51
|
error,
|
|
51
52
|
errorMessage,
|
|
52
53
|
errorMessageProps,
|
|
53
|
-
errorId
|
|
54
|
+
errorId,
|
|
55
|
+
errorMessageIcon: Icons.Error,
|
|
56
|
+
errorMessageIconPosition: "before"
|
|
54
57
|
}
|
|
55
58
|
) : /* @__PURE__ */ React.createElement(
|
|
56
59
|
FormHelperText,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormSelectorWrapper.es.js","sources":["../../../../src/components/Form/FormSelectorWrapper/FormSelectorWrapper.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, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n createRef,\n ReactNode\n} from \"react\";\nimport { KeyValuePair } from \"../../../interfaces\";\nimport { FormSelector } from \"../form.interfaces\";\nimport { FormHelperText, Props as FormHelperTextProps } from \"../FormHelperText/FormHelperText\";\nimport classes from \"./FormSelectorWrapper.module.scss\";\nimport { useInlineEditing } from \"../../InlineEditing/InlineEditingContext\";\nimport { RequiredSign } from \"../../RequiredSign/RequiredSign\";\nimport { FormErrorText } from \"../FormErrorText/FormErrorText\";\nimport { FormStatusIndicator } from \"../FormStatusIndicator/FormStatusIndicator\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, FormSelector {\n children?: ReactNode;\n nestedChildren?: ReactNode;\n containerProps?: ComponentPropsWithRef<\"div\"> & KeyValuePair;\n helperProps?: FormHelperTextProps;\n disabled?: boolean;\n errorId?: string;\n identifier?: string;\n required?: boolean;\n}\n\nconst FormSelectorWrapperComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n children,\n className,\n nestedChildren,\n containerProps,\n helperProps,\n error,\n disabled,\n helperText,\n success,\n errorMessage,\n errorMessageProps,\n parentErrorId,\n errorId,\n identifier,\n required,\n ...rest\n }: Props,\n ref\n) => {\n const helperRef = helperProps?.ref ?? createRef();\n const { enabled } = useInlineEditing();\n\n const hasHelperText = helperText ?? helperProps?.children;\n const showHelperText = !error && hasHelperText;\n const showErrorText = error && (errorMessage || errorMessageProps?.children);\n\n return (\n <div\n {...rest}\n ref={ref}\n className={`${error ? classes[\"error\"] : \"\"} ${disabled ? classes[\"disabled\"] : \"\"} ${\n className ?? \"\"\n }`}\n >\n <div\n {...containerProps}\n className={`${containerProps?.className} ${classes[\"children-container\"]}`}\n >\n {children}\n {enabled && (\n <>\n <RequiredSign className={classes[\"required\"]} />\n <FormStatusIndicator success={success} error={error}>\n <></>\n </FormStatusIndicator>\n </>\n )}\n </div>\n {!enabled &&\n (showHelperText || showErrorText) &&\n (showErrorText ? (\n <FormErrorText\n error={error}\n errorMessage={errorMessage}\n errorMessageProps={errorMessageProps}\n errorId={errorId}\n />\n ) : (\n <FormHelperText\n {...helperProps}\n ref={helperRef}\n id={identifier}\n className={`${classes[\"helper-text\"]} ${helperProps?.className ?? \"\"}`}\n >\n {helperProps?.children || helperText}\n </FormHelperText>\n ))}\n {nestedChildren}\n </div>\n );\n};\n\nexport const FormSelectorWrapper = React.forwardRef(FormSelectorWrapperComponent);\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormSelectorWrapper.es.js","sources":["../../../../src/components/Form/FormSelectorWrapper/FormSelectorWrapper.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, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n createRef,\n ReactNode\n} from \"react\";\nimport { KeyValuePair } from \"../../../interfaces\";\nimport { FormSelector } from \"../form.interfaces\";\nimport { FormHelperText, Props as FormHelperTextProps } from \"../FormHelperText/FormHelperText\";\nimport classes from \"./FormSelectorWrapper.module.scss\";\nimport { useInlineEditing } from \"../../InlineEditing/InlineEditingContext\";\nimport { RequiredSign } from \"../../RequiredSign/RequiredSign\";\nimport { FormErrorText } from \"../FormErrorText/FormErrorText\";\nimport { FormStatusIndicator } from \"../FormStatusIndicator/FormStatusIndicator\";\nimport { Icons } from \"../../Icon/Icon\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, FormSelector {\n children?: ReactNode;\n nestedChildren?: ReactNode;\n containerProps?: ComponentPropsWithRef<\"div\"> & KeyValuePair;\n helperProps?: FormHelperTextProps;\n disabled?: boolean;\n errorId?: string;\n identifier?: string;\n required?: boolean;\n}\n\nconst FormSelectorWrapperComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n children,\n className,\n nestedChildren,\n containerProps,\n helperProps,\n error,\n disabled,\n helperText,\n success,\n errorMessage,\n errorMessageProps,\n parentErrorId,\n errorId,\n identifier,\n required,\n ...rest\n }: Props,\n ref\n) => {\n const helperRef = helperProps?.ref ?? createRef();\n const { enabled } = useInlineEditing();\n\n const hasHelperText = helperText ?? helperProps?.children;\n const showHelperText = !error && hasHelperText;\n const showErrorText = error && (errorMessage || errorMessageProps?.children);\n\n return (\n <div\n {...rest}\n ref={ref}\n className={`${error ? classes[\"error\"] : \"\"} ${disabled ? classes[\"disabled\"] : \"\"} ${\n className ?? \"\"\n }`}\n >\n <div\n {...containerProps}\n className={`${containerProps?.className} ${classes[\"children-container\"]}`}\n >\n {children}\n {enabled && (\n <>\n <RequiredSign className={classes[\"required\"]} />\n <FormStatusIndicator success={success} error={error}>\n <></>\n </FormStatusIndicator>\n </>\n )}\n </div>\n {!enabled &&\n (showHelperText || showErrorText) &&\n (showErrorText ? (\n <FormErrorText\n error={error}\n errorMessage={errorMessage}\n errorMessageProps={errorMessageProps}\n errorId={errorId}\n errorMessageIcon={Icons.Error}\n errorMessageIconPosition=\"before\"\n />\n ) : (\n <FormHelperText\n {...helperProps}\n ref={helperRef}\n id={identifier}\n className={`${classes[\"helper-text\"]} ${helperProps?.className ?? \"\"}`}\n >\n {helperProps?.children || helperText}\n </FormHelperText>\n ))}\n {nestedChildren}\n </div>\n );\n};\n\nexport const FormSelectorWrapper = React.forwardRef(FormSelectorWrapperComponent);\n"],"names":[],"mappings":";;;;;;;;AA2CA,MAAM,+BAAgF,CACpF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,QACG;AACH,QAAM,aAAY,2CAAa,QAAO,UAAA;AACtC,QAAM,EAAE,QAAA,IAAY,iBAAA;AAEpB,QAAM,gBAAgB,eAAc,2CAAa;AACjD,QAAM,iBAAiB,CAAC,SAAS;AACjC,QAAM,gBAAgB,UAAU,iBAAgB,uDAAmB;AAEnE,SACE,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,WAAW,GAAG,QAAQ,QAAQ,OAAO,IAAI,EAAE,IAAI,WAAW,QAAQ,UAAU,IAAI,EAAE,IAChF,aAAa,EACf;AAAA,IAAA;AAAA,IAEA,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,WAAW,GAAG,iDAAgB,SAAS,IAAI,QAAQ,oBAAoB,CAAC;AAAA,MAAA;AAAA,MAEvE;AAAA,MACA,WACC,sBAAA,cAAA,MAAA,UAAA,MACE,sBAAA,cAAC,cAAA,EAAa,WAAW,QAAQ,UAAU,GAAG,uCAC7C,qBAAA,EAAoB,SAAkB,SACrC,sBAAA,cAAA,MAAA,UAAA,IAAE,CACJ,CACF;AAAA,IAAA;AAAA,IAGH,CAAC,YACC,kBAAkB,mBAClB,gBACC,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,kBAAkB,MAAM;AAAA,QACxB,0BAAyB;AAAA,MAAA;AAAA,IAAA,IAG3B,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,IAAI;AAAA,QACJ,WAAW,GAAG,QAAQ,aAAa,CAAC,KAAI,2CAAa,cAAa,EAAE;AAAA,MAAA;AAAA,OAEnE,2CAAa,aAAY;AAAA,IAAA;AAAA,IAG/B;AAAA,EAAA;AAGP;AAEO,MAAM,sBAAsB,MAAM,WAAW,4BAA4B;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */.
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */.FormSelectorWrapper_error_PX3IM input+span{outline:var(--error) solid 1px;outline-offset:-1px;border-radius:2px;overflow:hidden}.FormSelectorWrapper_helper-text_PX3IM{margin-top:.25rem;margin-left:calc(1.75 * var(--font-size))}.FormSelectorWrapper_children-container_PX3IM>span:nth-of-type(2){margin-right:.5rem}.FormSelectorWrapper_children-container_PX3IM [data-icon-status=success]{color:var(--success);font-size:var(--font-size-big)}.FormSelectorWrapper_children-container_PX3IM [data-icon-status=error]{color:var(--error);font-size:var(--font-size-big)}.FormSelectorWrapper_children-container_PX3IM [data-icon-status=info]{color:var(--default);font-size:var(--font-size-big)}.FormSelectorWrapper_disabled_PX3IM input{color:var(--disabled)}.FormSelectorWrapper_disabled_PX3IM input:disabled{cursor:not-allowed}.FormSelectorWrapper_disabled_PX3IM label{cursor:not-allowed}.FormSelectorWrapper_required_PX3IM{color:var(--error)}')),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="FormSelectorWrapper_error_PX3IM",r="FormSelectorWrapper_disabled_PX3IM",o="FormSelectorWrapper_required_PX3IM",t={error:e,"helper-text":"FormSelectorWrapper_helper-text_PX3IM","children-container":"FormSelectorWrapper_children-container_PX3IM",disabled:r,required:o};exports.default=t,exports.disabled=r,exports.error=e,exports.required=o;
|
|
3
3
|
//# sourceMappingURL=FormSelectorWrapper.module.scss.cjs.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */.
|
|
2
|
-
const error = "
|
|
3
|
-
const disabled = "
|
|
4
|
-
const required = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\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 */.FormSelectorWrapper_error_PX3IM input+span{outline:var(--error) solid 1px;outline-offset:-1px;border-radius:2px;overflow:hidden}.FormSelectorWrapper_helper-text_PX3IM{margin-top:.25rem;margin-left:calc(1.75 * var(--font-size))}.FormSelectorWrapper_children-container_PX3IM>span:nth-of-type(2){margin-right:.5rem}.FormSelectorWrapper_children-container_PX3IM [data-icon-status=success]{color:var(--success);font-size:var(--font-size-big)}.FormSelectorWrapper_children-container_PX3IM [data-icon-status=error]{color:var(--error);font-size:var(--font-size-big)}.FormSelectorWrapper_children-container_PX3IM [data-icon-status=info]{color:var(--default);font-size:var(--font-size-big)}.FormSelectorWrapper_disabled_PX3IM input{color:var(--disabled)}.FormSelectorWrapper_disabled_PX3IM input:disabled{cursor:not-allowed}.FormSelectorWrapper_disabled_PX3IM label{cursor:not-allowed}.FormSelectorWrapper_required_PX3IM{color:var(--error)}')),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}}();
|
|
2
|
+
const error = "FormSelectorWrapper_error_PX3IM";
|
|
3
|
+
const disabled = "FormSelectorWrapper_disabled_PX3IM";
|
|
4
|
+
const required = "FormSelectorWrapper_required_PX3IM";
|
|
5
5
|
const classes = {
|
|
6
6
|
error,
|
|
7
|
-
"helper-text": "FormSelectorWrapper_helper-
|
|
8
|
-
"children-container": "FormSelectorWrapper_children-
|
|
7
|
+
"helper-text": "FormSelectorWrapper_helper-text_PX3IM",
|
|
8
|
+
"children-container": "FormSelectorWrapper_children-container_PX3IM",
|
|
9
9
|
disabled,
|
|
10
10
|
required
|
|
11
11
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),a=require("./Input.module.scss.cjs.js"),s=require("../../../readyclasses.module.scss.cjs.js"),t=require("../../../hooks/useDetermineStatusIcon.cjs.js"),l=require("../../withReadOnly.cjs.js"),r=require("../../Icon/Icon.cjs.js"),u=["date","time","datetime-local"],n=l.withReadOnly(e.forwardRef(({error:l=!1,success:n=!1,className:d,name:i,style:o,wrapperProps:c,type:p,labeledBy:f,prefix:m,suffix:h,disabled:y,onFocus:x,onBlur:b,readOnlyView:j,...w},I)=>{const[v,E]=e.useState(!1),N=e.useRef(null),q=e.useRef(null);e.useEffect(()=>{if(void 0===i)throw new Error("Please give your <Input /> component a 'name' attribute")},[]);const O=[a.default.input],R=u.includes(p),S=a=>"string"==typeof a?e.createElement("span",null,a):a;d&&O.push(d);const g=[a.default["input-wrapper"]],k=[a.default.outline];(null==c?void 0:c.className)&&g.push(c.className),"hidden"===p&&g.push(s.default.hidden),m&&g.push(a.default.prefix),h&&g.push(a.default.suffix),y&&g.push(a.default.disabled)&&k.push(a.default.disabled),l&&g.push(a.default.error)&&k.push(a.default.error),v&&g.push(a.default.focus)&&k.push(a.default.focus),n&&g.push(a.default.success);const B=t.useDetermineStatusIcon({success:n,error:l}),C=w["data-readonlyview"];return e.createElement("div",{ref:N,...c,style:{...o},"data-readonlyview":C,className:`${a.default["input-wrapper"]} ${g.join(" ")}`,tabIndex:C?0:-1,...C&&{role:"textbox","aria-readonly":!0}},m&&e.createElement("div",{"data-prefix":!0,className:a.default.prefix},S(m)),e.createElement("input",{...w,ref:I,"aria-readonly":C,readOnly:C,onFocus:e=>{E(!0),null==x||x(e)},onBlur:e=>{E(!1),null==b||b(e)},"aria-labelledby":f,type:p,name:i,disabled:y,"aria-disabled":y,className:O.join(" "),spellCheck:w.spellCheck??!1,tabIndex:C?-1:0}),R?e.createElement(r.Icon,{icon:r.Icons.Calendar,"data-date-icon":!0}):B,h&&e.createElement("div",{ref:q,"data-suffix":!0,className:a.default.suffix},S(h)),e.createElement("span",{className:k.join(" ")}))}));exports.Input=n,exports.dateTypes=u;
|
|
2
2
|
//# sourceMappingURL=Input.cjs.js.map
|