@skbkontur/react-ui 6.4.2-static-css.0 → 6.4.3-6344a.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -97
- package/components/Autocomplete/Autocomplete.css.d.ts +5 -0
- package/components/Autocomplete/Autocomplete.css.js +3 -0
- package/components/Autocomplete/Autocomplete.css.js.map +1 -0
- package/components/Autocomplete/Autocomplete.d.ts +1 -0
- package/components/Autocomplete/Autocomplete.js +5 -14
- package/components/Autocomplete/Autocomplete.js.map +1 -1
- package/components/Button/Button.css.d.ts +95 -0
- package/components/Button/Button.css.js +5 -0
- package/components/Button/Button.css.js.map +1 -0
- package/components/Button/Button.d.ts +1 -15
- package/components/Button/Button.js +77 -162
- package/components/Button/Button.js.map +1 -1
- package/components/Button/Button.mixins.d.ts +4 -0
- package/components/Button/Button.mixins.js +26 -0
- package/components/Button/Button.mixins.js.map +1 -0
- package/components/Button/ButtonArrow.d.ts +4 -3
- package/components/Button/ButtonArrow.js +11 -9
- package/components/Button/ButtonArrow.js.map +1 -1
- package/components/Button/ButtonIcon.css.d.ts +16 -0
- package/components/Button/ButtonIcon.css.js +3 -0
- package/components/Button/ButtonIcon.css.js.map +1 -0
- package/components/Button/ButtonIcon.js +18 -8
- package/components/Button/ButtonIcon.js.map +1 -1
- package/components/Button/LoadingButtonIcon.js +1 -1
- package/components/Button/LoadingButtonIcon.js.map +1 -1
- package/components/Calendar/Calendar.css.d.ts +6 -0
- package/components/Calendar/Calendar.css.js +3 -0
- package/components/Calendar/Calendar.css.js.map +1 -0
- package/components/Calendar/Calendar.d.ts +1 -0
- package/components/Calendar/Calendar.js +4 -4
- package/components/Calendar/Calendar.js.map +1 -1
- package/components/Calendar/CalendarDay.js +8 -12
- package/components/Calendar/CalendarDay.js.map +1 -1
- package/components/Calendar/DayCellView.css.d.ts +9 -0
- package/components/Calendar/DayCellView.css.js +3 -0
- package/components/Calendar/DayCellView.css.js.map +1 -0
- package/components/Calendar/DayCellView.js +4 -2
- package/components/Calendar/DayCellView.js.map +1 -1
- package/components/Calendar/Month.js +12 -8
- package/components/Calendar/Month.js.map +1 -1
- package/components/Calendar/MonthView.css.d.ts +13 -0
- package/components/Calendar/MonthView.css.js +3 -0
- package/components/Calendar/MonthView.css.js.map +1 -0
- package/components/Calendar/MonthView.js +8 -8
- package/components/Calendar/MonthView.js.map +1 -1
- package/components/Center/Center.css.d.ts +7 -0
- package/components/Center/Center.css.js +3 -0
- package/components/Center/Center.css.js.map +1 -0
- package/components/Center/Center.d.ts +1 -0
- package/components/Center/Center.js +2 -2
- package/components/Center/Center.js.map +1 -1
- package/components/Checkbox/Checkbox.css.d.ts +35 -0
- package/components/Checkbox/Checkbox.css.js +5 -0
- package/components/Checkbox/Checkbox.css.js.map +1 -0
- package/components/Checkbox/Checkbox.d.ts +1 -8
- package/components/Checkbox/Checkbox.js +27 -58
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/Checkbox.mixins.d.ts +4 -0
- package/components/Checkbox/Checkbox.mixins.js +15 -0
- package/components/Checkbox/Checkbox.mixins.js.map +1 -0
- package/components/DateInput/DateFragmentsView.css.d.ts +7 -0
- package/components/DateInput/DateFragmentsView.css.js +3 -0
- package/components/DateInput/DateFragmentsView.css.js.map +1 -0
- package/components/DateInput/DateFragmentsView.d.ts +2 -0
- package/components/DateInput/DateFragmentsView.js +8 -11
- package/components/DateInput/DateFragmentsView.js.map +1 -1
- package/components/DateInput/DateInput.css.d.ts +10 -0
- package/components/DateInput/DateInput.css.js +3 -0
- package/components/DateInput/DateInput.css.js.map +1 -0
- package/components/DateInput/DateInput.d.ts +2 -0
- package/components/DateInput/DateInput.js +9 -7
- package/components/DateInput/DateInput.js.map +1 -1
- package/components/DatePicker/DatePicker.css.d.ts +5 -0
- package/components/DatePicker/DatePicker.css.js +3 -0
- package/components/DatePicker/DatePicker.css.js.map +1 -0
- package/components/DatePicker/DatePicker.d.ts +1 -0
- package/components/DatePicker/DatePicker.js +3 -3
- package/components/DatePicker/DatePicker.js.map +1 -1
- package/components/DatePicker/MobilePicker.css.d.ts +3 -0
- package/components/DatePicker/MobilePicker.css.js +3 -0
- package/components/DatePicker/MobilePicker.css.js.map +1 -0
- package/components/DatePicker/MobilePicker.js +1 -1
- package/components/DatePicker/MobilePicker.js.map +1 -1
- package/components/DatePicker/getMobilePickerTheme.js +9 -27
- package/components/DatePicker/getMobilePickerTheme.js.map +1 -1
- package/components/DateRangePicker/DateRangePicker.css.d.ts +20 -0
- package/components/DateRangePicker/DateRangePicker.css.js +3 -0
- package/components/DateRangePicker/DateRangePicker.css.js.map +1 -0
- package/components/DateRangePicker/DateRangePicker.d.ts +4 -4
- package/components/DateRangePicker/DateRangePicker.js +28 -21
- package/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/components/DateRangePicker/DateRangePickerTheme.js +10 -30
- package/components/DateRangePicker/DateRangePickerTheme.js.map +1 -1
- package/components/Dropdown/getDropdownTheme.d.ts +0 -11
- package/components/Dropdown/getDropdownTheme.js +4 -23
- package/components/Dropdown/getDropdownTheme.js.map +1 -1
- package/components/DropdownMenu/getDropdownMenuTheme.js +2 -9
- package/components/DropdownMenu/getDropdownMenuTheme.js.map +1 -1
- package/components/FileUploader/FileUploader.css.d.ts +74 -0
- package/components/FileUploader/FileUploader.css.js +6 -0
- package/components/FileUploader/FileUploader.css.js.map +1 -0
- package/components/FileUploader/FileUploader.d.ts +1 -2
- package/components/FileUploader/FileUploader.js +46 -51
- package/components/FileUploader/FileUploader.js.map +1 -1
- package/components/FileUploader/FileUploader.mixins.d.ts +1 -0
- package/components/FileUploader/FileUploader.mixins.js +4 -0
- package/components/FileUploader/FileUploader.mixins.js.map +1 -0
- package/components/FileUploader/FileUploaderFile.css.d.ts +60 -0
- package/components/FileUploader/FileUploaderFile.css.js +5 -0
- package/components/FileUploader/FileUploaderFile.css.js.map +1 -0
- package/components/FileUploader/FileUploaderFile.js +31 -29
- package/components/FileUploader/FileUploaderFile.js.map +1 -1
- package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.css.d.ts +34 -0
- package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.css.js +5 -0
- package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.css.js.map +1 -0
- package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.js +20 -18
- package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.js.map +1 -1
- package/components/FileUploader/FileUploaderFileStatusIcon.js +5 -3
- package/components/FileUploader/FileUploaderFileStatusIcon.js.map +1 -1
- package/components/FileUploader/FileUploaderFileTypeIcon.js +52 -47
- package/components/FileUploader/FileUploaderFileTypeIcon.js.map +1 -1
- package/components/FxInput/FxInput.d.ts +1 -1
- package/components/FxInput/FxInput.js +3 -7
- package/components/FxInput/FxInput.js.map +1 -1
- package/components/FxInput/FxInputRestoreBtn.js +15 -23
- package/components/FxInput/FxInputRestoreBtn.js.map +1 -1
- package/components/GlobalLoader/GlobalLoaderView.css.d.ts +21 -0
- package/components/GlobalLoader/GlobalLoaderView.css.js +4 -0
- package/components/GlobalLoader/GlobalLoaderView.css.js.map +1 -0
- package/components/GlobalLoader/GlobalLoaderView.js +20 -30
- package/components/GlobalLoader/GlobalLoaderView.js.map +1 -1
- package/components/Group/Group.css.d.ts +8 -0
- package/components/Group/Group.css.js +3 -0
- package/components/Group/Group.css.js.map +1 -0
- package/components/Group/Group.d.ts +1 -0
- package/components/Group/Group.js +4 -3
- package/components/Group/Group.js.map +1 -1
- package/components/Hint/Hint.css.d.ts +5 -0
- package/components/Hint/Hint.css.js +3 -0
- package/components/Hint/Hint.css.js.map +1 -0
- package/components/Hint/Hint.d.ts +1 -0
- package/components/Hint/Hint.js +4 -4
- package/components/Hint/Hint.js.map +1 -1
- package/components/Input/Input.css.d.ts +21 -0
- package/components/Input/Input.css.js +3 -0
- package/components/Input/Input.css.js.map +1 -0
- package/components/Input/Input.d.ts +1 -0
- package/components/Input/Input.js +14 -14
- package/components/Input/Input.js.map +1 -1
- package/components/Input/InputLayout/InputLayout.css.d.ts +18 -0
- package/components/Input/InputLayout/InputLayout.css.js +4 -0
- package/components/Input/InputLayout/InputLayout.css.js.map +1 -0
- package/components/Input/InputLayout/InputLayout.js +1 -1
- package/components/Input/InputLayout/InputLayout.js.map +1 -1
- package/components/Input/InputLayout/InputLayoutAside.js +1 -1
- package/components/Input/InputLayout/InputLayoutAside.js.map +1 -1
- package/components/Input/InputLayout/InputLayoutAsideCounter.js +9 -9
- package/components/Input/InputLayout/InputLayoutAsideCounter.js.map +1 -1
- package/components/Input/InputLayout/InputLayoutAsideIcon.js +26 -20
- package/components/Input/InputLayout/InputLayoutAsideIcon.js.map +1 -1
- package/components/Input/InputLayout/InputLayoutAsideText.js +5 -5
- package/components/Input/InputLayout/InputLayoutAsideText.js.map +1 -1
- package/components/Kebab/Kebab.css.d.ts +11 -0
- package/components/Kebab/Kebab.css.js +3 -0
- package/components/Kebab/Kebab.css.js.map +1 -0
- package/components/Kebab/Kebab.d.ts +1 -0
- package/components/Kebab/Kebab.js +3 -3
- package/components/Kebab/Kebab.js.map +1 -1
- package/components/Link/Link.css.d.ts +24 -0
- package/components/Link/Link.css.js +3 -0
- package/components/Link/Link.css.js.map +1 -0
- package/components/Link/Link.d.ts +1 -0
- package/components/Link/Link.js +19 -23
- package/components/Link/Link.js.map +1 -1
- package/components/Link/Link.mixins.d.ts +2 -0
- package/components/Link/Link.mixins.js +7 -0
- package/components/Link/Link.mixins.js.map +1 -0
- package/components/Link/LinkIcon.js +7 -5
- package/components/Link/LinkIcon.js.map +1 -1
- package/components/Loader/Loader.css.d.ts +8 -0
- package/components/Loader/Loader.css.js +3 -0
- package/components/Loader/Loader.css.js.map +1 -0
- package/components/Loader/Loader.d.ts +2 -0
- package/components/Loader/Loader.js +4 -3
- package/components/Loader/Loader.js.map +1 -1
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.css.d.ts +6 -0
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.css.js +4 -0
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.css.js.map +1 -0
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.js +22 -16
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.js.map +1 -1
- package/components/MaskedInput/MaskedInput.css.d.ts +7 -0
- package/components/MaskedInput/MaskedInput.css.js +4 -0
- package/components/MaskedInput/MaskedInput.css.js.map +1 -0
- package/components/MaskedInput/MaskedInputLegacy.js +7 -5
- package/components/MaskedInput/MaskedInputLegacy.js.map +1 -1
- package/components/MaskedInputV2/MaskedInputV2.css.d.ts +7 -0
- package/components/MaskedInputV2/MaskedInputV2.css.js +4 -0
- package/components/MaskedInputV2/MaskedInputV2.css.js.map +1 -0
- package/components/MaskedInputV2/MaskedInputV2.js +7 -5
- package/components/MaskedInputV2/MaskedInputV2.js.map +1 -1
- package/components/MaskedInputV2/internal/MaskOverlay.js +9 -9
- package/components/MaskedInputV2/internal/MaskOverlay.js.map +1 -1
- package/components/MaskedInputV2/internal/MaskedCore.js +6 -8
- package/components/MaskedInputV2/internal/MaskedCore.js.map +1 -1
- package/components/MaskedInputV2/internal/MaskedInternal.css.d.ts +15 -0
- package/components/MaskedInputV2/internal/MaskedInternal.css.js +4 -0
- package/components/MaskedInputV2/internal/MaskedInternal.css.js.map +1 -0
- package/components/MenuFooter/MenuFooter.css.d.ts +10 -0
- package/components/MenuFooter/MenuFooter.css.js +3 -0
- package/components/MenuFooter/MenuFooter.css.js.map +1 -0
- package/components/MenuFooter/MenuFooter.js +13 -11
- package/components/MenuFooter/MenuFooter.js.map +1 -1
- package/components/MenuFooter/MenuFooter.mixins.d.ts +2 -0
- package/components/MenuFooter/MenuFooter.mixins.js +8 -0
- package/components/MenuFooter/MenuFooter.mixins.js.map +1 -0
- package/components/MenuHeader/MenuHeader.css.d.ts +10 -0
- package/components/MenuHeader/MenuHeader.css.js +3 -0
- package/components/MenuHeader/MenuHeader.css.js.map +1 -0
- package/components/MenuHeader/MenuHeader.js +12 -10
- package/components/MenuHeader/MenuHeader.js.map +1 -1
- package/components/MenuHeader/MenuHeader.mixins.d.ts +2 -0
- package/components/MenuHeader/MenuHeader.mixins.js +8 -0
- package/components/MenuHeader/MenuHeader.mixins.js.map +1 -0
- package/components/MenuItem/MenuItem.css.d.ts +27 -0
- package/components/MenuItem/MenuItem.css.js +3 -0
- package/components/MenuItem/MenuItem.css.js.map +1 -0
- package/components/MenuItem/MenuItem.d.ts +1 -0
- package/components/MenuItem/MenuItem.js +22 -22
- package/components/MenuItem/MenuItem.js.map +1 -1
- package/components/MenuItem/MenuItem.mixins.d.ts +0 -6
- package/components/MenuItem/MenuItem.mixins.js +0 -6
- package/components/MenuItem/MenuItem.mixins.js.map +1 -1
- package/components/MenuSeparator/MenuSeparator.css.d.ts +5 -0
- package/components/MenuSeparator/MenuSeparator.css.js +3 -0
- package/components/MenuSeparator/MenuSeparator.css.js.map +1 -0
- package/components/MenuSeparator/MenuSeparator.js +7 -5
- package/components/MenuSeparator/MenuSeparator.js.map +1 -1
- package/components/MiniModal/MiniModal.css.d.ts +11 -0
- package/components/MiniModal/MiniModal.css.js +4 -0
- package/components/MiniModal/MiniModal.css.js.map +1 -0
- package/components/MiniModal/MiniModalBody.js +4 -4
- package/components/MiniModal/MiniModalBody.js.map +1 -1
- package/components/MiniModal/MiniModalFooter.js +7 -5
- package/components/MiniModal/MiniModalFooter.js.map +1 -1
- package/components/MiniModal/MiniModalHeader.js +7 -5
- package/components/MiniModal/MiniModalHeader.js.map +1 -1
- package/components/MiniModal/MiniModalIndent.js +5 -3
- package/components/MiniModal/MiniModalIndent.js.map +1 -1
- package/components/MiniModal/getMiniModalTheme.js +13 -39
- package/components/MiniModal/getMiniModalTheme.js.map +1 -1
- package/components/Modal/Modal.css.d.ts +55 -0
- package/components/Modal/Modal.css.js +4 -0
- package/components/Modal/Modal.css.js.map +1 -0
- package/components/Modal/Modal.d.ts +1 -0
- package/components/Modal/Modal.js +9 -9
- package/components/Modal/Modal.js.map +1 -1
- package/components/Modal/ModalBody.d.ts +1 -0
- package/components/Modal/ModalBody.js +8 -8
- package/components/Modal/ModalBody.js.map +1 -1
- package/components/Modal/ModalClose.js +10 -8
- package/components/Modal/ModalClose.js.map +1 -1
- package/components/Modal/ModalFooter.js +4 -4
- package/components/Modal/ModalFooter.js.map +1 -1
- package/components/Modal/ModalHeader.js +4 -4
- package/components/Modal/ModalHeader.js.map +1 -1
- package/components/Modal/ModalSeparator.js +7 -5
- package/components/Modal/ModalSeparator.js.map +1 -1
- package/components/Paging/Paging.css.d.ts +32 -0
- package/components/Paging/Paging.css.js +3 -0
- package/components/Paging/Paging.css.js.map +1 -0
- package/components/Paging/Paging.d.ts +2 -0
- package/components/Paging/Paging.js +38 -33
- package/components/Paging/Paging.js.map +1 -1
- package/components/PasswordInput/PasswordInput.css.d.ts +11 -0
- package/components/PasswordInput/PasswordInput.css.js +3 -0
- package/components/PasswordInput/PasswordInput.css.js.map +1 -0
- package/components/PasswordInput/PasswordInput.d.ts +2 -0
- package/components/PasswordInput/PasswordInput.js +12 -7
- package/components/PasswordInput/PasswordInput.js.map +1 -1
- package/components/Radio/Radio.css.d.ts +35 -0
- package/components/Radio/Radio.css.js +5 -0
- package/components/Radio/Radio.css.js.map +1 -0
- package/components/Radio/Radio.d.ts +1 -8
- package/components/Radio/Radio.js +29 -60
- package/components/Radio/Radio.js.map +1 -1
- package/components/Radio/Radio.mixins.d.ts +7 -0
- package/components/Radio/Radio.mixins.js +27 -0
- package/components/Radio/Radio.mixins.js.map +1 -0
- package/components/RadioGroup/RadioGroup.css.d.ts +6 -0
- package/components/RadioGroup/RadioGroup.css.js +3 -0
- package/components/RadioGroup/RadioGroup.css.js.map +1 -0
- package/components/RadioGroup/RadioGroup.d.ts +1 -0
- package/components/RadioGroup/RadioGroup.js +3 -2
- package/components/RadioGroup/RadioGroup.js.map +1 -1
- package/components/ScrollContainer/ScrollBar.d.ts +3 -1
- package/components/ScrollContainer/ScrollBar.js +15 -10
- package/components/ScrollContainer/ScrollBar.js.map +1 -1
- package/components/ScrollContainer/ScrollContainer.css.d.ts +21 -0
- package/components/ScrollContainer/ScrollContainer.css.js +4 -0
- package/components/ScrollContainer/ScrollContainer.css.js.map +1 -0
- package/components/ScrollContainer/ScrollContainer.d.ts +1 -0
- package/components/ScrollContainer/ScrollContainer.js +2 -2
- package/components/ScrollContainer/ScrollContainer.js.map +1 -1
- package/components/Select/Select.css.d.ts +18 -0
- package/components/Select/Select.css.js +3 -0
- package/components/Select/Select.css.js.map +1 -0
- package/components/Select/Select.d.ts +1 -0
- package/components/Select/Select.js +14 -14
- package/components/Select/Select.js.map +1 -1
- package/components/Select/selectTheme.js +7 -31
- package/components/Select/selectTheme.js.map +1 -1
- package/components/SidePage/SidePage.css.d.ts +50 -0
- package/components/SidePage/SidePage.css.js +3 -0
- package/components/SidePage/SidePage.css.js.map +1 -0
- package/components/SidePage/SidePage.d.ts +6 -0
- package/components/SidePage/SidePage.js +28 -10
- package/components/SidePage/SidePage.js.map +1 -1
- package/components/SidePage/SidePageBody.d.ts +1 -0
- package/components/SidePage/SidePageBody.js +9 -8
- package/components/SidePage/SidePageBody.js.map +1 -1
- package/components/SidePage/SidePageCloseButton.js +9 -7
- package/components/SidePage/SidePageCloseButton.js.map +1 -1
- package/components/SidePage/SidePageContainer.d.ts +2 -0
- package/components/SidePage/SidePageContainer.js +14 -12
- package/components/SidePage/SidePageContainer.js.map +1 -1
- package/components/SidePage/SidePageContext.d.ts +2 -0
- package/components/SidePage/SidePageContext.js.map +1 -1
- package/components/SidePage/SidePageFooter.d.ts +2 -0
- package/components/SidePage/SidePageFooter.js +18 -13
- package/components/SidePage/SidePageFooter.js.map +1 -1
- package/components/SidePage/SidePageHeader.d.ts +2 -0
- package/components/SidePage/SidePageHeader.js +21 -12
- package/components/SidePage/SidePageHeader.js.map +1 -1
- package/components/Spinner/Spinner.css.d.ts +13 -0
- package/components/Spinner/Spinner.css.js +3 -0
- package/components/Spinner/Spinner.css.js.map +1 -0
- package/components/Spinner/Spinner.d.ts +2 -0
- package/components/Spinner/Spinner.js +11 -8
- package/components/Spinner/Spinner.js.map +1 -1
- package/components/Sticky/Sticky.css.d.ts +7 -0
- package/components/Sticky/Sticky.css.js +3 -0
- package/components/Sticky/Sticky.css.js.map +1 -0
- package/components/Sticky/Sticky.d.ts +1 -0
- package/components/Sticky/Sticky.js +2 -2
- package/components/Sticky/Sticky.js.map +1 -1
- package/components/Switcher/Switcher.css.d.ts +12 -0
- package/components/Switcher/Switcher.css.js +3 -0
- package/components/Switcher/Switcher.css.js.map +1 -0
- package/components/Switcher/Switcher.d.ts +1 -0
- package/components/Switcher/Switcher.js +7 -7
- package/components/Switcher/Switcher.js.map +1 -1
- package/components/Switcher/switcherTheme.js +4 -12
- package/components/Switcher/switcherTheme.js.map +1 -1
- package/components/Tabs/Indicator.css.d.ts +8 -0
- package/components/Tabs/Indicator.css.js +3 -0
- package/components/Tabs/Indicator.css.js.map +1 -0
- package/components/Tabs/Indicator.d.ts +1 -0
- package/components/Tabs/Indicator.js +3 -3
- package/components/Tabs/Indicator.js.map +1 -1
- package/components/Tabs/Tab.css.d.ts +33 -0
- package/components/Tabs/Tab.css.js +6 -0
- package/components/Tabs/Tab.css.js.map +1 -0
- package/components/Tabs/Tab.d.ts +2 -0
- package/components/Tabs/Tab.js +25 -20
- package/components/Tabs/Tab.js.map +1 -1
- package/components/Tabs/Tabs.css.d.ts +7 -0
- package/components/Tabs/Tabs.css.js +3 -0
- package/components/Tabs/Tabs.css.js.map +1 -0
- package/components/Tabs/Tabs.d.ts +2 -0
- package/components/Tabs/Tabs.js +30 -25
- package/components/Tabs/Tabs.js.map +1 -1
- package/components/Tabs/helpers.d.ts +6 -0
- package/components/Tabs/helpers.js +25 -0
- package/components/Tabs/helpers.js.map +1 -0
- package/components/Textarea/Textarea.css.d.ts +23 -0
- package/components/Textarea/Textarea.css.js +3 -0
- package/components/Textarea/Textarea.css.js.map +1 -0
- package/components/Textarea/Textarea.d.ts +2 -0
- package/components/Textarea/Textarea.js +25 -18
- package/components/Textarea/Textarea.js.map +1 -1
- package/components/Textarea/Textarea.mixins.d.ts +2 -0
- package/components/Textarea/Textarea.mixins.js +7 -0
- package/components/Textarea/Textarea.mixins.js.map +1 -0
- package/components/Textarea/TextareaCounter.js +15 -23
- package/components/Textarea/TextareaCounter.js.map +1 -1
- package/components/TimePicker/TimePicker.css.d.ts +12 -0
- package/components/TimePicker/TimePicker.css.js +3 -0
- package/components/TimePicker/TimePicker.css.js.map +1 -0
- package/components/TimePicker/TimePicker.js +1 -1
- package/components/TimePicker/TimePicker.js.map +1 -1
- package/components/TimePicker/TimePickerItems.js +7 -7
- package/components/TimePicker/TimePickerItems.js.map +1 -1
- package/components/TimePicker/TimePickerPopup.js +2 -2
- package/components/TimePicker/TimePickerPopup.js.map +1 -1
- package/components/Toast/Toast.css.d.ts +6 -0
- package/components/Toast/Toast.css.js +3 -0
- package/components/Toast/Toast.css.js.map +1 -0
- package/components/Toast/Toast.d.ts +1 -0
- package/components/Toast/Toast.js +2 -2
- package/components/Toast/Toast.js.map +1 -1
- package/components/Toast/ToastView.css.d.ts +18 -0
- package/components/Toast/ToastView.css.js +3 -0
- package/components/Toast/ToastView.css.js.map +1 -0
- package/components/Toast/ToastView.d.ts +1 -0
- package/components/Toast/ToastView.js +18 -10
- package/components/Toast/ToastView.js.map +1 -1
- package/components/Toggle/Toggle.css.d.ts +50 -0
- package/components/Toggle/Toggle.css.js +5 -0
- package/components/Toggle/Toggle.css.js.map +1 -0
- package/components/Toggle/Toggle.d.ts +1 -1
- package/components/Toggle/Toggle.js +40 -56
- package/components/Toggle/Toggle.js.map +1 -1
- package/components/Toggle/Toggle.mixins.d.ts +8 -0
- package/components/Toggle/Toggle.mixins.js +29 -0
- package/components/Toggle/Toggle.mixins.js.map +1 -0
- package/components/Token/Token.css.d.ts +23 -0
- package/components/Token/Token.css.js +4 -0
- package/components/Token/Token.css.js.map +1 -0
- package/components/Token/Token.d.ts +2 -0
- package/components/Token/Token.js +11 -6
- package/components/Token/Token.js.map +1 -1
- package/components/Token/Token.mixins.d.ts +1 -0
- package/components/Token/Token.mixins.js +4 -0
- package/components/Token/Token.mixins.js.map +1 -0
- package/components/Token/TokenView.js +11 -9
- package/components/Token/TokenView.js.map +1 -1
- package/components/TokenInput/TextWidthHelper.d.ts +1 -0
- package/components/TokenInput/TextWidthHelper.js +5 -5
- package/components/TokenInput/TextWidthHelper.js.map +1 -1
- package/components/TokenInput/TokenInput.css.d.ts +21 -0
- package/components/TokenInput/TokenInput.css.js +4 -0
- package/components/TokenInput/TokenInput.css.js.map +1 -0
- package/components/TokenInput/TokenInput.d.ts +2 -1
- package/components/TokenInput/TokenInput.js +23 -21
- package/components/TokenInput/TokenInput.js.map +1 -1
- package/components/TokenInput/TokenInput.mixins.d.ts +2 -0
- package/components/TokenInput/TokenInput.mixins.js +7 -0
- package/components/TokenInput/TokenInput.mixins.js.map +1 -0
- package/components/Tooltip/Tooltip.css.d.ts +11 -0
- package/components/Tooltip/Tooltip.css.js +3 -0
- package/components/Tooltip/Tooltip.css.js.map +1 -0
- package/components/Tooltip/Tooltip.d.ts +1 -0
- package/components/Tooltip/Tooltip.js +13 -13
- package/components/Tooltip/Tooltip.js.map +1 -1
- package/index.d.ts +0 -4
- package/index.js +0 -12
- package/index.js.map +1 -1
- package/internal/ClearCrossIcon/ClearCrossIcon.css.d.ts +11 -0
- package/internal/ClearCrossIcon/ClearCrossIcon.css.js +3 -0
- package/internal/ClearCrossIcon/ClearCrossIcon.css.js.map +1 -0
- package/internal/ClearCrossIcon/ClearCrossIcon.js +10 -8
- package/internal/ClearCrossIcon/ClearCrossIcon.js.map +1 -1
- package/internal/CloseButtonIcon/CloseButtonIcon.css.d.ts +9 -0
- package/internal/CloseButtonIcon/CloseButtonIcon.css.js +3 -0
- package/internal/CloseButtonIcon/CloseButtonIcon.css.js.map +1 -0
- package/internal/CloseButtonIcon/CloseButtonIcon.d.ts +11 -21
- package/internal/CloseButtonIcon/CloseButtonIcon.js +19 -29
- package/internal/CloseButtonIcon/CloseButtonIcon.js.map +1 -1
- package/internal/CommonWrapper/CommonWrapper.d.ts +4 -3
- package/internal/CommonWrapper/CommonWrapper.js +17 -104
- package/internal/CommonWrapper/CommonWrapper.js.map +1 -1
- package/internal/CustomComboBox/ComboBoxView.d.ts +2 -1
- package/internal/CustomComboBox/ComboBoxView.js +9 -10
- package/internal/CustomComboBox/ComboBoxView.js.map +1 -1
- package/internal/CustomComboBox/CustomComboBox.css.d.ts +4 -0
- package/internal/CustomComboBox/CustomComboBox.css.js +3 -0
- package/internal/CustomComboBox/CustomComboBox.css.js.map +1 -0
- package/internal/DateSelect/DateSelect.css.d.ts +9 -0
- package/internal/DateSelect/DateSelect.css.js +4 -0
- package/internal/DateSelect/DateSelect.css.js.map +1 -0
- package/internal/DateSelect/DateSelect.d.ts +1 -0
- package/internal/DateSelect/DateSelect.js +3 -3
- package/internal/DateSelect/DateSelect.js.map +1 -1
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.css.d.ts +3 -0
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.css.js +3 -0
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.css.js.map +1 -0
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.d.ts +2 -16
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.js +12 -37
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.js.map +1 -1
- package/internal/InputLikeText/InputLikeText.css.d.ts +8 -0
- package/internal/InputLikeText/InputLikeText.css.js +3 -0
- package/internal/InputLikeText/InputLikeText.css.js.map +1 -0
- package/internal/InputLikeText/InputLikeText.d.ts +1 -0
- package/internal/InputLikeText/InputLikeText.js +19 -23
- package/internal/InputLikeText/InputLikeText.js.map +1 -1
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.css.d.ts +5 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.css.js +4 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.css.js.map +1 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.d.ts +1 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js +17 -17
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js.map +1 -1
- package/internal/MaskCharLowLine/MaskCharLowLine.css.d.ts +3 -0
- package/internal/MaskCharLowLine/MaskCharLowLine.css.js +3 -0
- package/internal/MaskCharLowLine/MaskCharLowLine.css.js.map +1 -0
- package/internal/MaskCharLowLine/MaskCharLowLine.js +1 -1
- package/internal/MaskCharLowLine/MaskCharLowLine.js.map +1 -1
- package/internal/Menu/Menu.css.d.ts +16 -0
- package/internal/Menu/Menu.css.js +3 -0
- package/internal/Menu/Menu.css.js.map +1 -0
- package/internal/Menu/Menu.d.ts +1 -0
- package/internal/Menu/Menu.js +10 -10
- package/internal/Menu/Menu.js.map +1 -1
- package/internal/MenuMessage/MenuMessage.css.d.ts +11 -0
- package/internal/MenuMessage/MenuMessage.css.js +3 -0
- package/internal/MenuMessage/MenuMessage.css.js.map +1 -0
- package/internal/MenuMessage/MenuMessage.js +11 -11
- package/internal/MenuMessage/MenuMessage.js.map +1 -1
- package/internal/MobilePopup/MobilePopup.css.d.ts +17 -0
- package/internal/MobilePopup/MobilePopup.css.js +3 -0
- package/internal/MobilePopup/MobilePopup.css.js.map +1 -0
- package/internal/MobilePopup/MobilePopup.d.ts +1 -0
- package/internal/MobilePopup/MobilePopup.js +12 -24
- package/internal/MobilePopup/MobilePopup.js.map +1 -1
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.css.d.ts +7 -0
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.css.js +3 -0
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.css.js.map +1 -0
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.d.ts +1 -0
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js +6 -6
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js.map +1 -1
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.css.d.ts +14 -0
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.css.js +3 -0
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.css.js.map +1 -0
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.d.ts +1 -0
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.js +11 -11
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.js.map +1 -1
- package/internal/NativeDateInput/NativeDateInput.css.d.ts +3 -0
- package/internal/NativeDateInput/NativeDateInput.css.js +3 -0
- package/internal/NativeDateInput/NativeDateInput.css.js.map +1 -0
- package/internal/NativeDateInput/NativeDateInput.d.ts +1 -0
- package/internal/NativeDateInput/NativeDateInput.js +2 -2
- package/internal/NativeDateInput/NativeDateInput.js.map +1 -1
- package/internal/NativeTimeInput/NativeTimeInput.css.d.ts +3 -0
- package/internal/NativeTimeInput/NativeTimeInput.css.js +3 -0
- package/internal/NativeTimeInput/NativeTimeInput.css.js.map +1 -0
- package/internal/NativeTimeInput/NativeTimeInput.js +3 -2
- package/internal/NativeTimeInput/NativeTimeInput.js.map +1 -1
- package/internal/Popup/Popup.css.d.ts +22 -0
- package/internal/Popup/Popup.css.js +3 -0
- package/internal/Popup/Popup.css.js.map +1 -0
- package/internal/Popup/Popup.d.ts +1 -0
- package/internal/Popup/Popup.js +6 -6
- package/internal/Popup/Popup.js.map +1 -1
- package/internal/Popup/PopupPin.css.d.ts +9 -0
- package/internal/Popup/PopupPin.css.js +3 -0
- package/internal/Popup/PopupPin.css.js.map +1 -0
- package/internal/Popup/PopupPin.d.ts +1 -0
- package/internal/Popup/PopupPin.js +2 -2
- package/internal/Popup/PopupPin.js.map +1 -1
- package/internal/PopupMenu/PopupMenu.css.d.ts +4 -0
- package/internal/PopupMenu/PopupMenu.css.js +3 -0
- package/internal/PopupMenu/PopupMenu.css.js.map +1 -0
- package/internal/PopupMenu/PopupMenu.d.ts +1 -0
- package/internal/PopupMenu/PopupMenu.js +2 -2
- package/internal/PopupMenu/PopupMenu.js.map +1 -1
- package/internal/RenderContainer/RenderContainer.d.ts +1 -0
- package/internal/RenderContainer/RenderContainer.js +26 -1
- package/internal/RenderContainer/RenderContainer.js.map +1 -1
- package/internal/RenderContainer/RenderInnerContainer.js +2 -4
- package/internal/RenderContainer/RenderInnerContainer.js.map +1 -1
- package/internal/ResizeDetector/ResizeDetector.css.d.ts +7 -0
- package/internal/ResizeDetector/ResizeDetector.css.js +3 -0
- package/internal/ResizeDetector/ResizeDetector.css.js.map +1 -0
- package/internal/ResizeDetector/ResizeDetector.d.ts +1 -0
- package/internal/ResizeDetector/ResizeDetector.js +2 -2
- package/internal/ResizeDetector/ResizeDetector.js.map +1 -1
- package/internal/SpinnerIcon/SpinnerIcon.css.d.ts +6 -0
- package/internal/SpinnerIcon/SpinnerIcon.css.js +3 -0
- package/internal/SpinnerIcon/SpinnerIcon.css.js.map +1 -0
- package/internal/SpinnerIcon/SpinnerIcon.js +3 -3
- package/internal/SpinnerIcon/SpinnerIcon.js.map +1 -1
- package/internal/TextWidthHelper/TextWidthHelper.css.d.ts +4 -0
- package/internal/TextWidthHelper/TextWidthHelper.css.js +3 -0
- package/internal/TextWidthHelper/TextWidthHelper.css.js.map +1 -0
- package/internal/TextWidthHelper/TextWidthHelper.d.ts +1 -0
- package/internal/TextWidthHelper/TextWidthHelper.js +2 -2
- package/internal/TextWidthHelper/TextWidthHelper.js.map +1 -1
- package/internal/TimeInput/TimeFragments.css.d.ts +32 -0
- package/internal/TimeInput/TimeFragments.css.js +3 -0
- package/internal/TimeInput/TimeFragments.css.js.map +1 -0
- package/internal/TimeInput/TimeFragments.js +16 -20
- package/internal/TimeInput/TimeFragments.js.map +1 -1
- package/internal/TimeInput/TimeInput.css.d.ts +7 -0
- package/internal/TimeInput/TimeInput.css.js +3 -0
- package/internal/TimeInput/TimeInput.css.js.map +1 -0
- package/internal/TimeInput/TimeInput.js +5 -5
- package/internal/TimeInput/TimeInput.js.map +1 -1
- package/internal/icons2022/BaseIcon.css.d.ts +3 -0
- package/internal/icons2022/BaseIcon.css.js +3 -0
- package/internal/icons2022/BaseIcon.css.js.map +1 -0
- package/internal/icons2022/BaseIcon.js +2 -9
- package/internal/icons2022/BaseIcon.js.map +1 -1
- package/internal/icons2022/LoadingIcon.js +6 -4
- package/internal/icons2022/LoadingIcon.js.map +1 -1
- package/internal/themes/BasicTheme.d.ts +0 -10
- package/internal/themes/BasicTheme.js +6 -17
- package/internal/themes/BasicTheme.js.map +1 -1
- package/internal/themes/DarkTheme6_0.js +342 -62
- package/internal/themes/DarkTheme6_0.js.map +1 -1
- package/internal/themes/DarkTheme6_1.js +3 -11
- package/internal/themes/DarkTheme6_1.js.map +1 -1
- package/internal/themes/DarkTheme6_4.js +1 -11
- package/internal/themes/DarkTheme6_4.js.map +1 -1
- package/lib/Upgrades.d.ts +2 -12
- package/lib/Upgrades.js +16 -12
- package/lib/Upgrades.js.map +1 -1
- package/lib/chars.d.ts +8 -0
- package/lib/chars.js +9 -0
- package/lib/chars.js.map +1 -0
- package/lib/globalObject.js +1 -4
- package/lib/globalObject.js.map +1 -1
- package/lib/renderEnvironment/RenderEnvironmentContext.d.ts +6 -38
- package/lib/renderEnvironment/RenderEnvironmentContext.js +19 -21
- package/lib/renderEnvironment/RenderEnvironmentContext.js.map +1 -1
- package/lib/renderEnvironment/RenderEnvironmentDecorator.js +3 -6
- package/lib/renderEnvironment/RenderEnvironmentDecorator.js.map +1 -1
- package/lib/styles/LabGrotesqueBaseline.css.d.ts +1 -0
- package/lib/styles/LabGrotesqueBaseline.css.js +0 -0
- package/lib/styles/LabGrotesqueBaseline.css.js.map +1 -0
- package/lib/styles/Mixins.d.ts +2 -0
- package/lib/styles/Mixins.js +7 -0
- package/lib/styles/Mixins.js.map +1 -0
- package/lib/styles/UiFont.d.ts +3 -0
- package/lib/styles/UiFont.js +18 -0
- package/lib/styles/UiFont.js.map +1 -0
- package/lib/styles/getLabGrotesqueBaselineCompensation.d.ts +7 -0
- package/lib/styles/getLabGrotesqueBaselineCompensation.js +36 -0
- package/lib/styles/getLabGrotesqueBaselineCompensation.js.map +1 -0
- package/lib/theming/AnimationKeyframes.d.ts +7 -0
- package/lib/theming/AnimationKeyframes.js +24 -0
- package/lib/theming/AnimationKeyframes.js.map +1 -0
- package/lib/theming/Emotion.d.ts +11 -41
- package/lib/theming/Emotion.js +49 -61
- package/lib/theming/Emotion.js.map +1 -1
- package/lib/theming/StaticStyles.d.ts +30 -0
- package/lib/theming/StaticStyles.js +410 -0
- package/lib/theming/StaticStyles.js.map +1 -0
- package/lib/theming/bindStaticStyles.d.ts +4 -0
- package/lib/theming/bindStaticStyles.js +18 -0
- package/lib/theming/bindStaticStyles.js.map +1 -0
- package/lib/theming/themeVars.d.ts +26 -0
- package/lib/theming/themeVars.js +72 -0
- package/lib/theming/themeVars.js.map +1 -0
- package/lib/theming/useTheme.d.ts +2 -0
- package/lib/theming/useTheme.js +6 -0
- package/lib/theming/useTheme.js.map +1 -0
- package/package.json +17 -48
- package/react-ui.css +5678 -6528
- package/typings/stylis-plugin-extra-scope.d.ts +3 -0
- package/components/Autocomplete/Autocomplete.styles.d.ts +0 -5
- package/components/Autocomplete/Autocomplete.styles.js +0 -7
- package/components/Autocomplete/Autocomplete.styles.js.map +0 -1
- package/components/Button/Button.styles.d.ts +0 -111
- package/components/Button/Button.styles.js +0 -113
- package/components/Button/Button.styles.js.map +0 -1
- package/components/Button/ButtonIcon.styles.d.ts +0 -16
- package/components/Button/ButtonIcon.styles.js +0 -18
- package/components/Button/ButtonIcon.styles.js.map +0 -1
- package/components/Calendar/Calendar.styles.d.ts +0 -6
- package/components/Calendar/Calendar.styles.js +0 -8
- package/components/Calendar/Calendar.styles.js.map +0 -1
- package/components/Calendar/DayCellView.styles.d.ts +0 -11
- package/components/Calendar/DayCellView.styles.js +0 -13
- package/components/Calendar/DayCellView.styles.js.map +0 -1
- package/components/Calendar/MonthView.styles.d.ts +0 -13
- package/components/Calendar/MonthView.styles.js +0 -15
- package/components/Calendar/MonthView.styles.js.map +0 -1
- package/components/Center/Center.styles.d.ts +0 -8
- package/components/Center/Center.styles.js +0 -10
- package/components/Center/Center.styles.js.map +0 -1
- package/components/Checkbox/Checkbox.styles.d.ts +0 -37
- package/components/Checkbox/Checkbox.styles.js +0 -40
- package/components/Checkbox/Checkbox.styles.js.map +0 -1
- package/components/DateInput/DateFragmentsView.styles.d.ts +0 -9
- package/components/DateInput/DateFragmentsView.styles.js +0 -11
- package/components/DateInput/DateFragmentsView.styles.js.map +0 -1
- package/components/DateInput/DateInput.styles.d.ts +0 -10
- package/components/DateInput/DateInput.styles.js +0 -12
- package/components/DateInput/DateInput.styles.js.map +0 -1
- package/components/DatePicker/DatePicker.styles.d.ts +0 -5
- package/components/DatePicker/DatePicker.styles.js +0 -7
- package/components/DatePicker/DatePicker.styles.js.map +0 -1
- package/components/DatePicker/MobilePicker.styles.d.ts +0 -4
- package/components/DatePicker/MobilePicker.styles.js +0 -6
- package/components/DatePicker/MobilePicker.styles.js.map +0 -1
- package/components/DateRangePicker/DateRangePicker.styles.d.ts +0 -22
- package/components/DateRangePicker/DateRangePicker.styles.js +0 -33
- package/components/DateRangePicker/DateRangePicker.styles.js.map +0 -1
- package/components/FileUploader/FileUploader.styles.d.ts +0 -75
- package/components/FileUploader/FileUploader.styles.js +0 -78
- package/components/FileUploader/FileUploader.styles.js.map +0 -1
- package/components/FileUploader/FileUploaderFile.styles.d.ts +0 -60
- package/components/FileUploader/FileUploaderFile.styles.js +0 -62
- package/components/FileUploader/FileUploaderFile.styles.js.map +0 -1
- package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.styles.d.ts +0 -34
- package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.styles.js +0 -36
- package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.styles.js.map +0 -1
- package/components/FileUploader/FileUploaderFileTypeIcon.styles.d.ts +0 -14
- package/components/FileUploader/FileUploaderFileTypeIcon.styles.js +0 -16
- package/components/FileUploader/FileUploaderFileTypeIcon.styles.js.map +0 -1
- package/components/FxInput/FxInput.styles.d.ts +0 -4
- package/components/FxInput/FxInput.styles.js +0 -6
- package/components/FxInput/FxInput.styles.js.map +0 -1
- package/components/FxInput/FxInputRestoreBtn.styles.d.ts +0 -6
- package/components/FxInput/FxInputRestoreBtn.styles.js +0 -8
- package/components/FxInput/FxInputRestoreBtn.styles.js.map +0 -1
- package/components/GlobalLoader/GlobalLoaderView.styles.d.ts +0 -23
- package/components/GlobalLoader/GlobalLoaderView.styles.js +0 -25
- package/components/GlobalLoader/GlobalLoaderView.styles.js.map +0 -1
- package/components/Group/Group.styles.d.ts +0 -8
- package/components/Group/Group.styles.js +0 -10
- package/components/Group/Group.styles.js.map +0 -1
- package/components/Hint/Hint.styles.d.ts +0 -5
- package/components/Hint/Hint.styles.js +0 -7
- package/components/Hint/Hint.styles.js.map +0 -1
- package/components/Input/Input.styles.d.ts +0 -21
- package/components/Input/Input.styles.js +0 -23
- package/components/Input/Input.styles.js.map +0 -1
- package/components/Input/InputLayout/InputLayout.styles.d.ts +0 -27
- package/components/Input/InputLayout/InputLayout.styles.js +0 -29
- package/components/Input/InputLayout/InputLayout.styles.js.map +0 -1
- package/components/Kebab/Kebab.styles.d.ts +0 -11
- package/components/Kebab/Kebab.styles.js +0 -13
- package/components/Kebab/Kebab.styles.js.map +0 -1
- package/components/Link/Link.styles.d.ts +0 -24
- package/components/Link/Link.styles.js +0 -26
- package/components/Link/Link.styles.js.map +0 -1
- package/components/Loader/Loader.styles.d.ts +0 -8
- package/components/Loader/Loader.styles.js +0 -10
- package/components/Loader/Loader.styles.js.map +0 -1
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.styles.d.ts +0 -7
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.styles.js +0 -10
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.styles.js.map +0 -1
- package/components/MaskedInput/MaskedInput.styles.d.ts +0 -7
- package/components/MaskedInput/MaskedInput.styles.js +0 -10
- package/components/MaskedInput/MaskedInput.styles.js.map +0 -1
- package/components/MaskedInputV2/MaskedInputV2.styles.d.ts +0 -7
- package/components/MaskedInputV2/MaskedInputV2.styles.js +0 -10
- package/components/MaskedInputV2/MaskedInputV2.styles.js.map +0 -1
- package/components/MaskedInputV2/internal/MaskedInternal.styles.d.ts +0 -15
- package/components/MaskedInputV2/internal/MaskedInternal.styles.js +0 -18
- package/components/MaskedInputV2/internal/MaskedInternal.styles.js.map +0 -1
- package/components/MenuFooter/MenuFooter.styles.d.ts +0 -10
- package/components/MenuFooter/MenuFooter.styles.js +0 -12
- package/components/MenuFooter/MenuFooter.styles.js.map +0 -1
- package/components/MenuHeader/MenuHeader.styles.d.ts +0 -10
- package/components/MenuHeader/MenuHeader.styles.js +0 -12
- package/components/MenuHeader/MenuHeader.styles.js.map +0 -1
- package/components/MenuItem/MenuItem.styles.d.ts +0 -29
- package/components/MenuItem/MenuItem.styles.js +0 -31
- package/components/MenuItem/MenuItem.styles.js.map +0 -1
- package/components/MenuSeparator/MenuSeparator.styles.d.ts +0 -5
- package/components/MenuSeparator/MenuSeparator.styles.js +0 -7
- package/components/MenuSeparator/MenuSeparator.styles.js.map +0 -1
- package/components/MiniModal/MiniModal.styles.d.ts +0 -11
- package/components/MiniModal/MiniModal.styles.js +0 -13
- package/components/MiniModal/MiniModal.styles.js.map +0 -1
- package/components/Modal/Modal.styles.d.ts +0 -55
- package/components/Modal/Modal.styles.js +0 -58
- package/components/Modal/Modal.styles.js.map +0 -1
- package/components/Paging/Paging.styles.d.ts +0 -32
- package/components/Paging/Paging.styles.js +0 -34
- package/components/Paging/Paging.styles.js.map +0 -1
- package/components/PasswordInput/PasswordInput.styles.d.ts +0 -11
- package/components/PasswordInput/PasswordInput.styles.js +0 -13
- package/components/PasswordInput/PasswordInput.styles.js.map +0 -1
- package/components/Radio/Radio.styles.d.ts +0 -37
- package/components/Radio/Radio.styles.js +0 -40
- package/components/Radio/Radio.styles.js.map +0 -1
- package/components/RadioGroup/RadioGroup.styles.d.ts +0 -6
- package/components/RadioGroup/RadioGroup.styles.js +0 -8
- package/components/RadioGroup/RadioGroup.styles.js.map +0 -1
- package/components/ScrollContainer/ScrollContainer.styles.d.ts +0 -21
- package/components/ScrollContainer/ScrollContainer.styles.js +0 -24
- package/components/ScrollContainer/ScrollContainer.styles.js.map +0 -1
- package/components/Select/Select.styles.d.ts +0 -18
- package/components/Select/Select.styles.js +0 -20
- package/components/Select/Select.styles.js.map +0 -1
- package/components/SidePage/SidePage.styles.d.ts +0 -50
- package/components/SidePage/SidePage.styles.js +0 -52
- package/components/SidePage/SidePage.styles.js.map +0 -1
- package/components/Spinner/Spinner.styles.d.ts +0 -13
- package/components/Spinner/Spinner.styles.js +0 -15
- package/components/Spinner/Spinner.styles.js.map +0 -1
- package/components/Sticky/Sticky.styles.d.ts +0 -8
- package/components/Sticky/Sticky.styles.js +0 -10
- package/components/Sticky/Sticky.styles.js.map +0 -1
- package/components/Switcher/Switcher.styles.d.ts +0 -12
- package/components/Switcher/Switcher.styles.js +0 -14
- package/components/Switcher/Switcher.styles.js.map +0 -1
- package/components/Tabs/Indicator.styles.d.ts +0 -8
- package/components/Tabs/Indicator.styles.js +0 -10
- package/components/Tabs/Indicator.styles.js.map +0 -1
- package/components/Tabs/Tab.styles.d.ts +0 -33
- package/components/Tabs/Tab.styles.js +0 -36
- package/components/Tabs/Tab.styles.js.map +0 -1
- package/components/Tabs/Tabs.styles.d.ts +0 -7
- package/components/Tabs/Tabs.styles.js +0 -9
- package/components/Tabs/Tabs.styles.js.map +0 -1
- package/components/Textarea/Textarea.styles.d.ts +0 -27
- package/components/Textarea/Textarea.styles.js +0 -29
- package/components/Textarea/Textarea.styles.js.map +0 -1
- package/components/TimePicker/TimePicker.styles.d.ts +0 -12
- package/components/TimePicker/TimePicker.styles.js +0 -14
- package/components/TimePicker/TimePicker.styles.js.map +0 -1
- package/components/Toast/Toast.styles.d.ts +0 -7
- package/components/Toast/Toast.styles.js +0 -9
- package/components/Toast/Toast.styles.js.map +0 -1
- package/components/Toast/ToastView.styles.d.ts +0 -20
- package/components/Toast/ToastView.styles.js +0 -22
- package/components/Toast/ToastView.styles.js.map +0 -1
- package/components/Toggle/Toggle.styles.d.ts +0 -50
- package/components/Toggle/Toggle.styles.js +0 -52
- package/components/Toggle/Toggle.styles.js.map +0 -1
- package/components/Token/Token.styles.d.ts +0 -24
- package/components/Token/Token.styles.js +0 -27
- package/components/Token/Token.styles.js.map +0 -1
- package/components/TokenInput/TokenInput.styles.d.ts +0 -22
- package/components/TokenInput/TokenInput.styles.js +0 -24
- package/components/TokenInput/TokenInput.styles.js.map +0 -1
- package/components/Tooltip/Tooltip.styles.d.ts +0 -12
- package/components/Tooltip/Tooltip.styles.js +0 -14
- package/components/Tooltip/Tooltip.styles.js.map +0 -1
- package/internal/ClearCrossIcon/ClearCrossIcon.styles.d.ts +0 -11
- package/internal/ClearCrossIcon/ClearCrossIcon.styles.js +0 -13
- package/internal/ClearCrossIcon/ClearCrossIcon.styles.js.map +0 -1
- package/internal/CloseButtonIcon/CloseButtonIcon.styles.d.ts +0 -8
- package/internal/CloseButtonIcon/CloseButtonIcon.styles.js +0 -10
- package/internal/CloseButtonIcon/CloseButtonIcon.styles.js.map +0 -1
- package/internal/CustomComboBox/CustomComboBox.styles.d.ts +0 -6
- package/internal/CustomComboBox/CustomComboBox.styles.js +0 -8
- package/internal/CustomComboBox/CustomComboBox.styles.js.map +0 -1
- package/internal/DateSelect/DateSelect.styles.d.ts +0 -9
- package/internal/DateSelect/DateSelect.styles.js +0 -12
- package/internal/DateSelect/DateSelect.styles.js.map +0 -1
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.styles.d.ts +0 -5
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.styles.js +0 -7
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.styles.js.map +0 -1
- package/internal/InputLikeText/InputLikeText.styles.d.ts +0 -8
- package/internal/InputLikeText/InputLikeText.styles.js +0 -10
- package/internal/InputLikeText/InputLikeText.styles.js.map +0 -1
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.d.ts +0 -4
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js +0 -6
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js.map +0 -1
- package/internal/MaskCharLowLine/MaskCharLowLine.styles.d.ts +0 -4
- package/internal/MaskCharLowLine/MaskCharLowLine.styles.js +0 -6
- package/internal/MaskCharLowLine/MaskCharLowLine.styles.js.map +0 -1
- package/internal/Menu/Menu.styles.d.ts +0 -16
- package/internal/Menu/Menu.styles.js +0 -18
- package/internal/Menu/Menu.styles.js.map +0 -1
- package/internal/MenuMessage/MenuMessage.styles.d.ts +0 -11
- package/internal/MenuMessage/MenuMessage.styles.js +0 -13
- package/internal/MenuMessage/MenuMessage.styles.js.map +0 -1
- package/internal/MobilePopup/MobilePopup.styles.d.ts +0 -17
- package/internal/MobilePopup/MobilePopup.styles.js +0 -19
- package/internal/MobilePopup/MobilePopup.styles.js.map +0 -1
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.d.ts +0 -7
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js +0 -9
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js.map +0 -1
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.d.ts +0 -14
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.js +0 -16
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.js.map +0 -1
- package/internal/NativeDateInput/NativeDateInput.styles.d.ts +0 -4
- package/internal/NativeDateInput/NativeDateInput.styles.js +0 -6
- package/internal/NativeDateInput/NativeDateInput.styles.js.map +0 -1
- package/internal/NativeTimeInput/NativeTimeInput.styles.d.ts +0 -4
- package/internal/NativeTimeInput/NativeTimeInput.styles.js +0 -6
- package/internal/NativeTimeInput/NativeTimeInput.styles.js.map +0 -1
- package/internal/Popup/Popup.styles.d.ts +0 -22
- package/internal/Popup/Popup.styles.js +0 -24
- package/internal/Popup/Popup.styles.js.map +0 -1
- package/internal/Popup/PopupPin.styles.d.ts +0 -10
- package/internal/Popup/PopupPin.styles.js +0 -12
- package/internal/Popup/PopupPin.styles.js.map +0 -1
- package/internal/PopupMenu/PopupMenu.styles.d.ts +0 -5
- package/internal/PopupMenu/PopupMenu.styles.js +0 -7
- package/internal/PopupMenu/PopupMenu.styles.js.map +0 -1
- package/internal/ResizeDetector/ResizeDetector.styles.d.ts +0 -8
- package/internal/ResizeDetector/ResizeDetector.styles.js +0 -10
- package/internal/ResizeDetector/ResizeDetector.styles.js.map +0 -1
- package/internal/SpinnerIcon/SpinnerIcon.styles.d.ts +0 -7
- package/internal/SpinnerIcon/SpinnerIcon.styles.js +0 -9
- package/internal/SpinnerIcon/SpinnerIcon.styles.js.map +0 -1
- package/internal/TextWidthHelper/TextWidthHelper.styles.d.ts +0 -5
- package/internal/TextWidthHelper/TextWidthHelper.styles.js +0 -7
- package/internal/TextWidthHelper/TextWidthHelper.styles.js.map +0 -1
- package/internal/TimeInput/TimeFragments.styles.d.ts +0 -20
- package/internal/TimeInput/TimeFragments.styles.js +0 -22
- package/internal/TimeInput/TimeFragments.styles.js.map +0 -1
- package/internal/TimeInput/TimeInput.styles.d.ts +0 -7
- package/internal/TimeInput/TimeInput.styles.js +0 -9
- package/internal/TimeInput/TimeInput.styles.js.map +0 -1
- package/internal/icons2022/BaseIcon.styles.d.ts +0 -6
- package/internal/icons2022/BaseIcon.styles.js +0 -8
- package/internal/icons2022/BaseIcon.styles.js.map +0 -1
- package/lib/classNames.generated.d.ts +0 -1235
- package/lib/classNames.generated.js +0 -1233
- package/lib/classNames.generated.js.map +0 -1
- package/lib/styles/baselineCompensation.d.ts +0 -63
- package/lib/styles/baselineCompensation.js +0 -122
- package/lib/styles/baselineCompensation.js.map +0 -1
- package/lib/theming/declaredTheme.d.ts +0 -43
- package/lib/theming/declaredTheme.js +0 -56
- package/lib/theming/declaredTheme.js.map +0 -1
- package/lib/theming/hashString.d.ts +0 -19
- package/lib/theming/hashString.js +0 -52
- package/lib/theming/hashString.js.map +0 -1
- package/lib/theming/staticStyles.d.ts +0 -17
- package/lib/theming/staticStyles.js +0 -8
- package/lib/theming/staticStyles.js.map +0 -1
- package/lib/theming/staticThemeDelta.d.ts +0 -17
- package/lib/theming/staticThemeDelta.js +0 -37
- package/lib/theming/staticThemeDelta.js.map +0 -1
- package/lib/theming/staticThemeVars.d.ts +0 -21
- package/lib/theming/staticThemeVars.js +0 -35
- package/lib/theming/staticThemeVars.js.map +0 -1
- package/lib/theming/themeCssVarsClass.d.ts +0 -89
- package/lib/theming/themeCssVarsClass.js +0 -253
- package/lib/theming/themeCssVarsClass.js.map +0 -1
- package/lib/theming/themeCssVarsDelta.d.ts +0 -13
- package/lib/theming/themeCssVarsDelta.js +0 -67
- package/lib/theming/themeCssVarsDelta.js.map +0 -1
- package/lib/theming/themeToCssVars.d.ts +0 -47
- package/lib/theming/themeToCssVars.js +0 -861
- package/lib/theming/themeToCssVars.js.map +0 -1
- package/react-ui-tailwind.css +0 -544
- package/react-ui-themes.css +0 -8628
- package/react-ui-token-map.json +0 -9029
- package/react-ui.layer.css +0 -7778
- package/themes/dark-6-0.css +0 -1439
- package/themes/dark-6-0.scoped.css +0 -1439
- package/themes/dark-6-1.css +0 -1439
- package/themes/dark-6-1.scoped.css +0 -1439
- package/themes/dark.css +0 -1439
- package/themes/dark.scoped.css +0 -1439
- package/themes/light-6-0.css +0 -1437
- package/themes/light-6-0.scoped.css +0 -1437
- package/themes/light-6-1.css +0 -1437
- package/themes/light-6-1.scoped.css +0 -1437
- package/themes/light.css +0 -1437
- package/themes/light.scoped.css +0 -1437
|
@@ -64,10 +64,10 @@ import { FocusControlWrapper } from '../../internal/FocusControlWrapper/index.js
|
|
|
64
64
|
import { useKeyListener } from '../../lib/events/keyListener.js';
|
|
65
65
|
import { forwardRefAndName } from '../../lib/forwardRefAndName.js';
|
|
66
66
|
import { isBrowser } from '../../lib/globalObject.js';
|
|
67
|
-
import { useGlobal, useStyles } from '../../lib/renderEnvironment/index.js';
|
|
67
|
+
import { useEmotion, useGlobal, useStyles } from '../../lib/renderEnvironment/index.js';
|
|
68
68
|
import { useSizeControl } from '../../lib/size/useSizeControl.js';
|
|
69
|
-
import {
|
|
70
|
-
import { getJsRowStyles, getJsStyles, getJsTileStyles, globalClasses } from './FileUploader.
|
|
69
|
+
import { ThemeContext } from '../../lib/theming/ThemeContext.js';
|
|
70
|
+
import { getJsRowStyles, getJsStyles, getJsTileStyles, globalClasses } from './FileUploader.css.js';
|
|
71
71
|
import { FileUploaderControlContext } from './FileUploaderControlContext.js';
|
|
72
72
|
import { FileUploaderFile } from './FileUploaderFile.js';
|
|
73
73
|
import { FileUploaderFileList } from './FileUploaderFileList/FileUploaderFileList.js';
|
|
@@ -89,20 +89,22 @@ var defaultRenderFile = function (props) { return React.createElement(FileUpload
|
|
|
89
89
|
var _FileUploader = forwardRefAndName('FileUploader', function (props, ref) {
|
|
90
90
|
var _a, _b, _c, _d, _e, _f;
|
|
91
91
|
var _g, _h;
|
|
92
|
+
var theme = useContext(ThemeContext);
|
|
92
93
|
var globalObject = useGlobal();
|
|
94
|
+
var cx = useEmotion().cx;
|
|
93
95
|
var jsStyles = useStyles(getJsStyles);
|
|
94
96
|
var jsRowStyles = useStyles(getJsRowStyles);
|
|
95
97
|
var jsTileStyles = useStyles(getJsTileStyles);
|
|
96
98
|
var keyListener = useKeyListener();
|
|
97
|
-
var disabled = props.disabled, error = props.error, warning = props.warning, _j = props.withValidationTooltip, withValidationTooltip = _j === void 0 ? false : _j, validationTooltipPosition = props.validationTooltipPosition, _k = props.withWarningIcon, withWarningIcon = _k === void 0 ? false : _k, _l = props.multiple, multiple = _l === void 0 ? false : _l, uploaderText = props.uploaderText, uploaderIcon = props.uploaderIcon, _m = props.view, view = _m === void 0 ? 'row' : _m, _o = props.uploadButtonPosition, uploadButtonPosition = _o === void 0 ? 'start' : _o, _p = props.validationSummary, validationSummary = _p === void 0 ? 'auto' : _p, _q = props.validationSummaryStart, validationSummaryStart = _q === void 0 ? 5 : _q,
|
|
99
|
+
var disabled = props.disabled, error = props.error, warning = props.warning, _j = props.withValidationTooltip, withValidationTooltip = _j === void 0 ? false : _j, validationTooltipPosition = props.validationTooltipPosition, _k = props.withWarningIcon, withWarningIcon = _k === void 0 ? false : _k, _l = props.multiple, multiple = _l === void 0 ? false : _l, uploaderText = props.uploaderText, uploaderIcon = props.uploaderIcon, _m = props.view, view = _m === void 0 ? 'row' : _m, _o = props.uploadButtonPosition, uploadButtonPosition = _o === void 0 ? 'start' : _o, _p = props.validationSummary, validationSummary = _p === void 0 ? 'auto' : _p, _q = props.validationSummaryStart, validationSummaryStart = _q === void 0 ? 5 : _q, _r = props.width, width = _r === void 0 ? theme.fileUploaderWidth : _r, _s = props.hideFiles, hideFiles = _s === void 0 ? false : _s, onBlur = props.onBlur, onFocus = props.onFocus, onChange = props.onChange, request = props.request, validateBeforeUpload = props.validateBeforeUpload, onRequestSuccess = props.onRequestSuccess, onRequestError = props.onRequestError, sizeProp = props.size, _t = props.renderFile, renderFile = _t === void 0 ? defaultRenderFile : _t, inputProps = __rest(props, ["disabled", "error", "warning", "withValidationTooltip", "validationTooltipPosition", "withWarningIcon", "multiple", "uploaderText", "uploaderIcon", "view", "uploadButtonPosition", "validationSummary", "validationSummaryStart", "width", "hideFiles", "onBlur", "onFocus", "onChange", "request", "validateBeforeUpload", "onRequestSuccess", "onRequestError", "size", "renderFile"]);
|
|
98
100
|
var size = useSizeControl(sizeProp);
|
|
99
|
-
var
|
|
101
|
+
var _u = useContext(FileUploaderControlContext), files = _u.files, setFiles = _u.setFiles, removeFile = _u.removeFile, reset = _u.reset, setFileValidationResult = _u.setFileValidationResult;
|
|
100
102
|
var locale = useControlLocale();
|
|
101
103
|
var inputRef = useRef(null);
|
|
102
104
|
var fileDivRef = useRef(null);
|
|
103
105
|
var isAsync = !!request;
|
|
104
106
|
var isSingleMode = !multiple;
|
|
105
|
-
var
|
|
107
|
+
var _v = useState(false), hovered = _v[0], setHovered = _v[1];
|
|
106
108
|
var upload = useUpload(request, onRequestSuccess, onRequestError);
|
|
107
109
|
var tryValidateAndUpload = useCallback(function (files) {
|
|
108
110
|
files.forEach(function (file) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -135,39 +137,39 @@ var _FileUploader = forwardRefAndName('FileUploader', function (props, ref) {
|
|
|
135
137
|
var isTileView = view === 'tile';
|
|
136
138
|
var jsViewStyles = isTileView ? jsTileStyles : jsRowStyles;
|
|
137
139
|
var sizeClassName = useFileUploaderSize(size, {
|
|
138
|
-
small: jsViewStyles.sizeSmall(),
|
|
139
|
-
medium: jsViewStyles.sizeMedium(),
|
|
140
|
-
large: jsViewStyles.sizeLarge(),
|
|
140
|
+
small: jsViewStyles.sizeSmall(theme),
|
|
141
|
+
medium: jsViewStyles.sizeMedium(theme),
|
|
142
|
+
large: jsViewStyles.sizeLarge(theme),
|
|
141
143
|
});
|
|
142
144
|
var uploadButtonTileWithFileClassName = useFileUploaderSize(size, {
|
|
143
|
-
small: jsTileStyles.uploadButtonTileWithFileSmall(),
|
|
144
|
-
medium: jsTileStyles.uploadButtonTileWithFileMedium(),
|
|
145
|
-
large: jsTileStyles.uploadButtonTileWithFileLarge(),
|
|
145
|
+
small: jsTileStyles.uploadButtonTileWithFileSmall(theme),
|
|
146
|
+
medium: jsTileStyles.uploadButtonTileWithFileMedium(theme),
|
|
147
|
+
large: jsTileStyles.uploadButtonTileWithFileLarge(theme),
|
|
146
148
|
});
|
|
147
149
|
var uploadButtonIconGapClass = useFileUploaderSize(size, {
|
|
148
|
-
small: jsViewStyles.uploadButtonIconGapSmall(),
|
|
149
|
-
medium: jsViewStyles.uploadButtonIconGapMedium(),
|
|
150
|
-
large: jsViewStyles.uploadButtonIconGapLarge(),
|
|
150
|
+
small: jsViewStyles.uploadButtonIconGapSmall(theme),
|
|
151
|
+
medium: jsViewStyles.uploadButtonIconGapMedium(theme),
|
|
152
|
+
large: jsViewStyles.uploadButtonIconGapLarge(theme),
|
|
151
153
|
});
|
|
152
154
|
var sizeIconClass = useFileUploaderSize(size, {
|
|
153
|
-
small: jsStyles.iconSmall(),
|
|
154
|
-
medium: jsStyles.iconMedium(),
|
|
155
|
-
large: jsStyles.iconLarge(),
|
|
155
|
+
small: jsStyles.iconSmall(theme),
|
|
156
|
+
medium: jsStyles.iconMedium(theme),
|
|
157
|
+
large: jsStyles.iconLarge(theme),
|
|
156
158
|
});
|
|
157
159
|
var sizeWrapperClass = useFileUploaderSize(size, {
|
|
158
|
-
small: jsTileStyles.uploadButtonWrapperSmall(),
|
|
159
|
-
medium: jsTileStyles.uploadButtonWrapperMedium(),
|
|
160
|
-
large: jsTileStyles.uploadButtonWrapperLarge(),
|
|
160
|
+
small: jsTileStyles.uploadButtonWrapperSmall(theme),
|
|
161
|
+
medium: jsTileStyles.uploadButtonWrapperMedium(theme),
|
|
162
|
+
large: jsTileStyles.uploadButtonWrapperLarge(theme),
|
|
161
163
|
});
|
|
162
164
|
var sizeWrapperEmptyFileClass = useFileUploaderSize(size, {
|
|
163
|
-
small: jsTileStyles.uploadButtonWrapperEmptyFileSmall(),
|
|
164
|
-
medium: jsTileStyles.uploadButtonWrapperEmptyFileMedium(),
|
|
165
|
-
large: jsTileStyles.uploadButtonWrapperEmptyFileLarge(),
|
|
165
|
+
small: jsTileStyles.uploadButtonWrapperEmptyFileSmall(theme),
|
|
166
|
+
medium: jsTileStyles.uploadButtonWrapperEmptyFileMedium(theme),
|
|
167
|
+
large: jsTileStyles.uploadButtonWrapperEmptyFileLarge(theme),
|
|
166
168
|
});
|
|
167
169
|
var contentInnerClass = useFileUploaderSize(size, {
|
|
168
|
-
small: jsStyles.contentInnerSmall(),
|
|
169
|
-
medium: jsStyles.contentInnerMedium(),
|
|
170
|
-
large: jsStyles.contentInnerLarge(),
|
|
170
|
+
small: jsStyles.contentInnerSmall(theme),
|
|
171
|
+
medium: jsStyles.contentInnerMedium(theme),
|
|
172
|
+
large: jsStyles.contentInnerLarge(theme),
|
|
171
173
|
});
|
|
172
174
|
/** common part **/
|
|
173
175
|
var handleChange = useCallback(function (newFiles) {
|
|
@@ -204,8 +206,8 @@ var _FileUploader = forwardRefAndName('FileUploader', function (props, ref) {
|
|
|
204
206
|
}
|
|
205
207
|
}
|
|
206
208
|
}, [handleChange, disabled]);
|
|
207
|
-
var
|
|
208
|
-
var
|
|
209
|
+
var _w = useDrop({ onDrop: handleDrop }), isDraggable = _w.isDraggable, labelRef = _w.ref;
|
|
210
|
+
var _x = useDrop(), isWindowDraggable = _x.isDraggable, windowRef = _x.ref;
|
|
209
211
|
if (isBrowser(globalObject)) {
|
|
210
212
|
windowRef.current = globalObject.document;
|
|
211
213
|
}
|
|
@@ -243,7 +245,7 @@ var _FileUploader = forwardRefAndName('FileUploader', function (props, ref) {
|
|
|
243
245
|
removeFile: handleRemoveFile,
|
|
244
246
|
getRootNode: function () { return rootNodeRef.current; },
|
|
245
247
|
}); }, [ref, blur, focus, handleReset, handleRemoveFile]);
|
|
246
|
-
var
|
|
248
|
+
var _y = useState(false), focusedByTab = _y[0], setFocusedByTab = _y[1];
|
|
247
249
|
var handleInputChange = function (event) {
|
|
248
250
|
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
249
251
|
handleChange(event.target.files);
|
|
@@ -273,41 +275,34 @@ var _FileUploader = forwardRefAndName('FileUploader', function (props, ref) {
|
|
|
273
275
|
var hasOneFileForSingle = isSingleMode && hasOneFile && !hideFiles;
|
|
274
276
|
var hasError = !!error || ((_g = files[0]) === null || _g === void 0 ? void 0 : _g.status) === FileUploaderFileStatus.Error;
|
|
275
277
|
var hasWarning = !!warning || ((_h = files[0]) === null || _h === void 0 ? void 0 : _h.status) === FileUploaderFileStatus.Warning;
|
|
276
|
-
var uploadButtonClassNames = cx(jsStyles.uploadButton(), jsViewStyles.uploadButton(), sizeClassName, hasOneFileForSingle && jsViewStyles.uploadButtonWithFile(), focusedByTab && jsStyles.uploadButtonFocus(), disabled && (_a = {},
|
|
277
|
-
_a[jsStyles.disabled()] = true,
|
|
278
|
-
_a[jsStyles.disabledBackground()] = !hasFiles,
|
|
278
|
+
var uploadButtonClassNames = cx(jsStyles.uploadButton(theme), jsViewStyles.uploadButton(), sizeClassName, hasOneFileForSingle && jsViewStyles.uploadButtonWithFile(theme), focusedByTab && jsStyles.uploadButtonFocus(theme), disabled && (_a = {},
|
|
279
|
+
_a[jsStyles.disabled(theme)] = true,
|
|
280
|
+
_a[jsStyles.disabledBackground(theme)] = !hasFiles,
|
|
279
281
|
_a), (focusedByTab || !hasOneFileForSingle) && (_b = {},
|
|
280
|
-
_b[jsStyles.warningButton()] = hasWarning,
|
|
281
|
-
_b[jsStyles.errorButton()] = hasError,
|
|
282
|
+
_b[jsStyles.warningButton(theme)] = hasWarning,
|
|
283
|
+
_b[jsStyles.errorButton(theme)] = hasError,
|
|
282
284
|
_b), hasOneFileForSingle && (_c = {},
|
|
283
285
|
_c[uploadButtonTileWithFileClassName] = isTileView,
|
|
284
286
|
_c[jsTileStyles.verticalAlign()] = isTileView,
|
|
285
|
-
_c[jsStyles.warningFile()] = (!isTileView || hovered) && hasWarning,
|
|
286
|
-
_c[jsStyles.errorFile()] = (!isTileView || hovered) && hasError,
|
|
287
|
+
_c[jsStyles.warningFile(theme)] = (!isTileView || hovered) && hasWarning,
|
|
288
|
+
_c[jsStyles.errorFile(theme)] = (!isTileView || hovered) && hasError,
|
|
287
289
|
_c), !disabled &&
|
|
288
290
|
hovered && (_d = {},
|
|
289
|
-
_d[jsStyles.hovered()] = true,
|
|
290
|
-
_d), isDraggable && !disabled && jsStyles.dragOver());
|
|
291
|
+
_d[jsStyles.hovered(theme)] = true,
|
|
292
|
+
_d), isDraggable && !disabled && jsStyles.dragOver(theme));
|
|
291
293
|
var canDrop = isWindowDraggable && !disabled;
|
|
292
294
|
var uploadButtonWrapperClassNames = cx(isTileView && (_e = {},
|
|
293
295
|
_e[sizeWrapperClass] = true,
|
|
294
296
|
_e[sizeWrapperEmptyFileClass] = !hasOneFileForSingle,
|
|
295
|
-
_e), jsViewStyles.uploadButtonWrapper(), canDrop && jsStyles.windowDragOver());
|
|
296
|
-
var uploadButtonIconClassNames = cx(jsStyles.icon(), sizeIconClass, disabled && jsStyles.iconDisabled(), uploadButtonIconGapClass);
|
|
297
|
-
|
|
298
|
-
// инлайн приезжал бы литералом в серверную разметку и терялся под
|
|
299
|
-
// `style-src-attr 'none'`. Проп `width` по-прежнему перебивает, потому что
|
|
300
|
-
// инлайн сильнее класса.
|
|
301
|
-
var isTileSingle = isTileView && !multiple;
|
|
302
|
-
var rootClassNames = cx(jsStyles.root(), isTileSingle ? jsStyles.tileSingleWidth() : jsStyles.defaultWidth());
|
|
303
|
-
// В одиночной плитке ширину задаёт тема, и проп её не менял и раньше.
|
|
304
|
-
var rootStyle = useMemoObject({ width: isTileSingle ? undefined : width });
|
|
297
|
+
_e), jsViewStyles.uploadButtonWrapper(), canDrop && jsStyles.windowDragOver(theme));
|
|
298
|
+
var uploadButtonIconClassNames = cx(jsStyles.icon(theme), sizeIconClass, disabled && jsStyles.iconDisabled(theme), uploadButtonIconGapClass);
|
|
299
|
+
var rootClassNames = cx(jsStyles.root(theme), !isTileView && jsRowStyles.root());
|
|
305
300
|
var contentClassNames = cx(jsViewStyles.content(), (_f = {},
|
|
306
301
|
_f[jsViewStyles.contentWithFiles()] = hasOneFileForSingle,
|
|
307
302
|
_f[contentInnerClass] = !isTileView && (!files.length || !isSingleMode),
|
|
308
303
|
_f));
|
|
309
304
|
var afterLinkTextClassNames = cx(globalClasses.afterLinkText, hasOneFileForSingle ? jsStyles.afterLinkText_HasFiles() : jsStyles.afterLinkText());
|
|
310
|
-
var linkClassNames = cx(jsStyles.link(), !disabled && hovered && jsStyles.linkHovered(), disabled && jsStyles.linkDisabled());
|
|
305
|
+
var linkClassNames = cx(jsStyles.link(theme), !disabled && hovered && jsStyles.linkHovered(theme), disabled && jsStyles.linkDisabled(theme));
|
|
311
306
|
useEffect(function () {
|
|
312
307
|
if (!files || !files.length || !inputRef.current) {
|
|
313
308
|
return;
|
|
@@ -344,7 +339,7 @@ var _FileUploader = forwardRefAndName('FileUploader', function (props, ref) {
|
|
|
344
339
|
};
|
|
345
340
|
var fileElement = renderFile(fileProps);
|
|
346
341
|
return (React.createElement(CommonWrapper, __assign({}, props),
|
|
347
|
-
React.createElement("div", { "data-tid": FileUploaderDataTids.root, className: rootClassNames, style:
|
|
342
|
+
React.createElement("div", { "data-tid": FileUploaderDataTids.root, className: rootClassNames, style: useMemoObject({ width: isTileView && !multiple ? theme.fileUploaderTileWidth : width }), ref: rootNodeRef },
|
|
348
343
|
uploadButtonPosition === 'end' && renderFileList(),
|
|
349
344
|
React.createElement("div", { className: uploadButtonWrapperClassNames },
|
|
350
345
|
React.createElement("label", { onMouseEnter: function () { return setHovered(true); }, onMouseLeave: function () { return setHovered(false); }, ref: labelRef, className: uploadButtonClassNames },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploader.js","sourceRoot":"","sources":["FileUploader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzG,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAElF,OAAO,EAAE,cAAc,EAAE,MA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{ useDrop } from '../../hooks/useDrop.js';\nimport { useMemoObject } from '../../hooks/useMemoObject.js';\nimport type { CommonProps } from '../../internal/CommonWrapper/index.js';\nimport { CommonWrapper } from '../../internal/CommonWrapper/index.js';\nimport { FocusControlWrapper } from '../../internal/FocusControlWrapper/index.js';\nimport type { PopupPositionsType, ShortPopupPositionsType } from '../../internal/Popup/index.js';\nimport { useKeyListener } from '../../lib/events/keyListener.js';\nimport { forwardRefAndName } from '../../lib/forwardRefAndName.js';\nimport { isBrowser } from '../../lib/globalObject.js';\nimport { useGlobal, useStyles } from '../../lib/renderEnvironment/index.js';\nimport type { InstanceWithRootNode } from '../../lib/rootNode/index.js';\nimport { useSizeControl } from '../../lib/size/useSizeControl.js';\nimport { concatClassNames as cx } from '../../lib/theming/Emotion.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport type { Nullable } from '../../typings/utility-types.js';\nimport { getJsRowStyles, getJsStyles, getJsTileStyles, globalClasses } from './FileUploader.styles.js';\nimport { FileUploaderControlContext } from './FileUploaderControlContext.js';\nimport type { FileUploaderControlProviderProps } from './FileUploaderControlProvider.js';\nimport { FileUploaderFile } from './FileUploaderFile.js';\nimport type { FileUploaderFileProps } from './FileUploaderFile.js';\nimport { FileUploaderFileList } from './FileUploaderFileList/FileUploaderFileList.js';\nimport { FileUploaderFileValidationResult } from './FileUploaderFileValidationResult.js';\nimport type {\n FileUploaderAttachedFile,\n FileUploaderUploadButtonPosition,\n FileUploaderValidationSummary,\n FileUploaderView,\n} from './fileUtils.js';\nimport { FileUploaderFileStatus, getAttachedFile } from './fileUtils.js';\nimport { useControlLocale } from './hooks/useControlLocale.js';\nimport { useFileUploaderSize } from './hooks/useFileUploaderSize.js';\nimport { useUpload } from './hooks/useUpload.js';\nimport { UploadIcon } from './icons/UploadIcon.js';\nimport { withFileUploaderControlProvider } from './withFileUploaderControlProvider.js';\n\nconst stopPropagation: React.ReactEventHandler = (e) => e.stopPropagation();\n\ntype FileUploaderOverriddenProps = 'size';\n\ninterface _FileUploaderProps\n extends CommonProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, FileUploaderOverriddenProps> {\n /** Переводит контрол в состояние ошибки. */\n /** Состояние ошибки всего контрола */\n error?: boolean;\n\n /** Переводит контрол в состояние предупреждения. */\n /** Состояние предупреждения всего контрола. */\n warning?: boolean;\n\n /** Расположение тултипа с текстом валидации файла.\n * @default 'top left' */\n validationTooltipPosition?: ShortPopupPositionsType | PopupPositionsType;\n\n /** Включает отображение текста валидации файла во всплывающей подсказке вместо строки рядом с именем.\n * @default false */\n withValidationTooltip?: boolean;\n\n /** Включает отображение иконки предупреждения (восклицательный знак) при статусе предупреждения у файла.\n * @default false */\n withWarningIcon?: boolean;\n\n /** Ширина контрола. По умолчанию — `fileUploaderWidth` из темы; в одиночной\n * плитке ширину задаёт `fileUploaderTileWidth`, и проп её не меняет. */\n width?: React.CSSProperties['width'];\n\n /** Размер контрола и вложенных элементов.\n * @default small */\n size?: SizeProp;\n\n /** Скрывает встроенный список файлов.\n * @default false */\n hideFiles?: boolean;\n\n /** Текст ссылки выбора файла.\n * @default \"Выберите файл\"\n */\n uploaderText?: string;\n\n /** Иконка в кнопке загрузки.\n */\n uploaderIcon?: React.ReactNode;\n\n /** Режим отображения списка файлов: строка (`row`) или плитка (`tile`).\n * @default row\n */\n view?: FileUploaderView;\n\n /** Режим блока-саммари по ошибкам и предупреждениям:\n * - `auto` — от порога `validationSummaryStart`,\n * - `enabled` / `disabled` — всегда или никогда.\n * @default auto\n */\n validationSummary?: FileUploaderValidationSummary;\n\n /** Порог числа файлов для показа саммари при `validationSummary=\"auto\"`.\n * @default 5 */\n validationSummaryStart?: number;\n\n /** Расположение кнопки загрузки относительно списка: в начале или в конце.\n * @default start */\n uploadButtonPosition?: FileUploaderUploadButtonPosition;\n\n /** Включает асинхронный режим загрузки файлов.\n * Отклонённый промис помечает файл(ы) ошибкой загрузки.\n */\n request?: (file: FileUploaderAttachedFile) => Promise<void>;\n\n /** Колбэк после успешного завершения `request` для файла. */\n onRequestSuccess?: (fileId: string) => void;\n\n /** Колбэк после ошибки `request` для файла. */\n onRequestError?: (fileId: string) => void;\n\n /** Проверка файла после выбора и до `request`: строка или `{ message, status }` — ошибка/предупреждение. Пустой результат — файл проходит.\n */\n validateBeforeUpload?: (\n file: FileUploaderAttachedFile,\n ) => Promise<Nullable<string | { message: string; status: FileUploaderFileStatus }>>;\n\n /**\n * Задаёт метод отрисовки файлов.\n * @default (props: FileUploaderFileProps) => <FileUploaderFile {...props} />\n */\n renderFile?: (props: FileUploaderFileProps) => React.ReactNode;\n}\n\nexport interface FileUploaderRef extends InstanceWithRootNode {\n /** Устанавливает фокус на скрытом `input` выбора файла. */\n focus: () => void;\n /** Снимает фокус с `input` выбора файла. */\n blur: () => void;\n /** Очищает список файлов и значения `input`. */\n reset: () => void;\n /** Удаляет файл по id с вызовом `onRemove` и `onValueChange`. */\n removeFile: (fileId: string) => void;\n}\n\nexport type FileUploader = FileUploaderRef;\n\nexport const FileUploaderDataTids = {\n root: 'FileUploader__root',\n content: 'FileUploader__content',\n link: 'FileUploader__link',\n input: 'FileUploader__input',\n} as const;\n\nconst defaultRenderFile = (props: FileUploaderFileProps) => <FileUploaderFile {...props} />;\n\nconst _FileUploader = forwardRefAndName<FileUploaderRef, _FileUploaderProps>('FileUploader', (props, ref) => {\n const globalObject = useGlobal();\n const jsStyles = useStyles(getJsStyles);\n const jsRowStyles = useStyles(getJsRowStyles);\n const jsTileStyles = useStyles(getJsTileStyles);\n const keyListener = useKeyListener();\n\n const {\n disabled,\n error,\n warning,\n withValidationTooltip = false,\n validationTooltipPosition,\n withWarningIcon = false,\n multiple = false,\n uploaderText,\n uploaderIcon,\n view = 'row',\n uploadButtonPosition = 'start',\n validationSummary = 'auto',\n validationSummaryStart = 5,\n width,\n hideFiles = false,\n onBlur,\n onFocus,\n onChange,\n request,\n validateBeforeUpload,\n onRequestSuccess,\n onRequestError,\n size: sizeProp,\n renderFile = defaultRenderFile,\n ...inputProps\n } = props;\n const size = useSizeControl(sizeProp);\n\n const { files, setFiles, removeFile, reset, setFileValidationResult } = useContext(FileUploaderControlContext);\n\n const locale = useControlLocale();\n\n const inputRef = useRef<HTMLInputElement>(null);\n const fileDivRef = useRef<HTMLDivElement>(null);\n\n const isAsync = !!request;\n const isSingleMode = !multiple;\n\n const [hovered, setHovered] = useState(false);\n const upload = useUpload(request, onRequestSuccess, onRequestError);\n\n const tryValidateAndUpload = useCallback(\n (files: FileUploaderAttachedFile[]) => {\n files.forEach(async (file) => {\n const validationMessage = validateBeforeUpload && (await validateBeforeUpload(file));\n\n if (!validationMessage) {\n isAsync && upload(file);\n } else if (typeof validationMessage === 'object') {\n setFileValidationResult(\n file.id,\n FileUploaderFileValidationResult.error(validationMessage.message),\n validationMessage.status,\n );\n } else {\n setFileValidationResult(\n file.id,\n FileUploaderFileValidationResult.error(validationMessage),\n FileUploaderFileStatus.Error,\n );\n }\n });\n },\n [validateBeforeUpload, isAsync, upload, setFileValidationResult],\n );\n\n const isTileView = view === 'tile';\n const jsViewStyles = isTileView ? jsTileStyles : jsRowStyles;\n\n const sizeClassName = useFileUploaderSize(size, {\n small: jsViewStyles.sizeSmall(),\n medium: jsViewStyles.sizeMedium(),\n large: jsViewStyles.sizeLarge(),\n });\n\n const uploadButtonTileWithFileClassName = useFileUploaderSize(size, {\n small: jsTileStyles.uploadButtonTileWithFileSmall(),\n medium: jsTileStyles.uploadButtonTileWithFileMedium(),\n large: jsTileStyles.uploadButtonTileWithFileLarge(),\n });\n\n const uploadButtonIconGapClass = useFileUploaderSize(size, {\n small: jsViewStyles.uploadButtonIconGapSmall(),\n medium: jsViewStyles.uploadButtonIconGapMedium(),\n large: jsViewStyles.uploadButtonIconGapLarge(),\n });\n\n const sizeIconClass = useFileUploaderSize(size, {\n small: jsStyles.iconSmall(),\n medium: jsStyles.iconMedium(),\n large: jsStyles.iconLarge(),\n });\n\n const sizeWrapperClass = useFileUploaderSize(size, {\n small: jsTileStyles.uploadButtonWrapperSmall(),\n medium: jsTileStyles.uploadButtonWrapperMedium(),\n large: jsTileStyles.uploadButtonWrapperLarge(),\n });\n\n const sizeWrapperEmptyFileClass = useFileUploaderSize(size, {\n small: jsTileStyles.uploadButtonWrapperEmptyFileSmall(),\n medium: jsTileStyles.uploadButtonWrapperEmptyFileMedium(),\n large: jsTileStyles.uploadButtonWrapperEmptyFileLarge(),\n });\n\n const contentInnerClass = useFileUploaderSize(size, {\n small: jsStyles.contentInnerSmall(),\n medium: jsStyles.contentInnerMedium(),\n large: jsStyles.contentInnerLarge(),\n });\n\n /** common part **/\n const handleChange = useCallback(\n (newFiles: FileList | null) => {\n if (!newFiles || !newFiles.length) {\n return;\n }\n\n let filesArray = Array.from(newFiles);\n\n if (isSingleMode) {\n filesArray = [filesArray[0]];\n }\n\n const attachedFiles = filesArray.map(getAttachedFile);\n\n if (isSingleMode && attachedFiles.length && files.length) {\n removeFile(files[0].id);\n }\n\n if (attachedFiles.length) {\n setFiles(attachedFiles);\n tryValidateAndUpload(attachedFiles);\n }\n },\n [tryValidateAndUpload, setFiles, isSingleMode, files, removeFile],\n );\n\n const handleDrop = useCallback(\n (event: DragEvent) => {\n if (disabled) {\n return;\n }\n\n const { dataTransfer } = event;\n if (dataTransfer) {\n if (isSingleMode && dataTransfer.files.length > 1) {\n dataTransfer.dropEffect = 'none';\n return;\n }\n if (dataTransfer.files?.length > 0) {\n inputRef.current && (inputRef.current.files = dataTransfer.files);\n handleChange(dataTransfer.files);\n }\n }\n },\n [handleChange, disabled],\n );\n\n const { isDraggable, ref: labelRef } = useDrop<HTMLLabelElement>({ onDrop: handleDrop });\n const { isDraggable: isWindowDraggable, ref: windowRef } = useDrop<Document>();\n\n if (isBrowser(globalObject)) {\n windowRef.current = globalObject.document;\n }\n\n const focus = useCallback(() => {\n keyListener.isTabPressed = true;\n inputRef.current?.focus();\n }, []);\n\n const blur = useCallback(() => {\n inputRef.current?.blur();\n }, []);\n\n const removeFileFromNativeInput = useCallback(\n (fileId: string) => {\n const dataTransfer = new DataTransfer();\n files\n .filter((f) => f.id !== fileId)\n .forEach((file) => {\n dataTransfer.items.add(file.originalFile);\n });\n inputRef.current && (inputRef.current.files = dataTransfer.files);\n },\n [files],\n );\n\n const handleRemoveFile = useCallback(\n (fileId: string) => {\n removeFile(fileId);\n removeFileFromNativeInput(fileId);\n },\n [removeFileFromNativeInput, removeFile],\n );\n\n const handleReset = useCallback(() => {\n reset();\n const dataTransfer = new DataTransfer();\n inputRef.current && (inputRef.current.files = dataTransfer.files);\n }, [reset, handleRemoveFile]);\n\n useImperativeHandle(\n ref,\n () => ({\n focus,\n blur,\n reset: handleReset,\n removeFile: handleRemoveFile,\n getRootNode: () => rootNodeRef.current,\n }),\n [ref, blur, focus, handleReset, handleRemoveFile],\n );\n\n const [focusedByTab, setFocusedByTab] = useState(false);\n const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(event);\n handleChange(event.target.files);\n setHovered(false);\n };\n\n const handleFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n if (!disabled) {\n // focus event fires before keyDown eventlistener\n // so we should check tabPressed in async way\n globalObject.requestAnimationFrame?.(() => {\n if (keyListener.isTabPressed) {\n setFocusedByTab(true);\n }\n });\n onFocus?.(e);\n }\n };\n\n const handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n setFocusedByTab(false);\n if (!disabled) {\n onBlur?.(e);\n }\n };\n\n const hasFiles = files.length > 0;\n const hasOneFile = files.length === 1;\n const hasOneFileForSingle = isSingleMode && hasOneFile && !hideFiles;\n\n const hasError = !!error || files[0]?.status === FileUploaderFileStatus.Error;\n const hasWarning = !!warning || files[0]?.status === FileUploaderFileStatus.Warning;\n\n const uploadButtonClassNames = cx(\n jsStyles.uploadButton(),\n jsViewStyles.uploadButton(),\n sizeClassName,\n hasOneFileForSingle && jsViewStyles.uploadButtonWithFile(),\n focusedByTab && jsStyles.uploadButtonFocus(),\n disabled && {\n [jsStyles.disabled()]: true,\n [jsStyles.disabledBackground()]: !hasFiles,\n },\n (focusedByTab || !hasOneFileForSingle) && {\n [jsStyles.warningButton()]: hasWarning,\n [jsStyles.errorButton()]: hasError,\n },\n hasOneFileForSingle && {\n [uploadButtonTileWithFileClassName]: isTileView,\n [jsTileStyles.verticalAlign()]: isTileView,\n [jsStyles.warningFile()]: (!isTileView || hovered) && hasWarning,\n [jsStyles.errorFile()]: (!isTileView || hovered) && hasError,\n },\n !disabled &&\n hovered && {\n [jsStyles.hovered()]: true,\n },\n isDraggable && !disabled && jsStyles.dragOver(),\n );\n\n const canDrop = isWindowDraggable && !disabled;\n const uploadButtonWrapperClassNames = cx(\n isTileView && {\n [sizeWrapperClass]: true,\n [sizeWrapperEmptyFileClass]: !hasOneFileForSingle,\n },\n jsViewStyles.uploadButtonWrapper(),\n canDrop && jsStyles.windowDragOver(),\n );\n\n const uploadButtonIconClassNames = cx(\n jsStyles.icon(),\n sizeIconClass,\n disabled && jsStyles.iconDisabled(),\n uploadButtonIconGapClass,\n );\n\n // Ширина по умолчанию — класс, а не инлайн: значение приходит из темы, а\n // инлайн приезжал бы литералом в серверную разметку и терялся под\n // `style-src-attr 'none'`. Проп `width` по-прежнему перебивает, потому что\n // инлайн сильнее класса.\n const isTileSingle = isTileView && !multiple;\n const rootClassNames = cx(jsStyles.root(), isTileSingle ? jsStyles.tileSingleWidth() : jsStyles.defaultWidth());\n // В одиночной плитке ширину задаёт тема, и проп её не менял и раньше.\n const rootStyle = useMemoObject({ width: isTileSingle ? undefined : width });\n\n const contentClassNames = cx(jsViewStyles.content(), {\n [jsViewStyles.contentWithFiles()]: hasOneFileForSingle,\n [contentInnerClass]: !isTileView && (!files.length || !isSingleMode),\n });\n\n const afterLinkTextClassNames = cx(\n globalClasses.afterLinkText,\n hasOneFileForSingle ? jsStyles.afterLinkText_HasFiles() : jsStyles.afterLinkText(),\n );\n\n const linkClassNames = cx(\n jsStyles.link(),\n !disabled && hovered && jsStyles.linkHovered(),\n disabled && jsStyles.linkDisabled(),\n );\n\n useEffect(() => {\n if (!files || !files.length || !inputRef.current) {\n return;\n }\n\n const dataTransfer = new DataTransfer();\n files.forEach((file) => dataTransfer.items.add(file.originalFile));\n inputRef.current.files = dataTransfer.files;\n }, []);\n\n const rootNodeRef = useRef(null);\n\n const icon = uploaderIcon ?? <UploadIcon size={size} view={view} />;\n const chooseFileText = uploaderText ?? locale.chooseFile;\n const chooseFileLocale = `${chooseFileText}${String.fromCharCode(0xa0)}`; /* */\n const hideUploaderText = isTileView && uploaderText === '';\n const renderChooseFileText = () =>\n !hideUploaderText && (\n <span data-tid={FileUploaderDataTids.link} className={linkClassNames}>\n {!hasOneFileForSingle && chooseFileLocale}\n </span>\n );\n\n const renderFileList = () => {\n return (\n !hideFiles &&\n !isSingleMode &&\n !!files.length && (\n <FileUploaderFileList\n renderFile={renderFile}\n size={size}\n view={view}\n onRemove={handleRemoveFile}\n validationTooltipPosition={validationTooltipPosition}\n withValidationTooltip={withValidationTooltip}\n validationSummary={validationSummary}\n validationSummaryStart={validationSummaryStart}\n withWarningIcon={withWarningIcon}\n disabled={disabled}\n />\n )\n );\n };\n\n const fileProps: FileUploaderFileProps = {\n file: files[0],\n size,\n view,\n onRemove: handleRemoveFile,\n error,\n warning,\n withValidationTooltip,\n validationTooltipPosition,\n withWarningIcon,\n hovered,\n disabled,\n };\n\n const fileElement = renderFile(fileProps);\n\n return (\n <CommonWrapper {...props}>\n <div data-tid={FileUploaderDataTids.root} className={rootClassNames} style={rootStyle} ref={rootNodeRef}>\n {uploadButtonPosition === 'end' && renderFileList()}\n <div className={uploadButtonWrapperClassNames}>\n <label\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n ref={labelRef}\n className={uploadButtonClassNames}\n >\n {!hasOneFileForSingle && <div className={uploadButtonIconClassNames}>{icon}</div>}\n <div data-tid={FileUploaderDataTids.content} className={contentClassNames}>\n {renderChooseFileText()}\n <div className={afterLinkTextClassNames}>\n {hasOneFileForSingle && (\n <div ref={fileDivRef} className={jsStyles.singleFile()}>\n {fileElement}\n </div>\n )}\n </div>\n </div>\n <FocusControlWrapper onBlurWhenDisabled={() => setFocusedByTab(false)}>\n <input\n {...inputProps}\n data-tid={FileUploaderDataTids.input}\n ref={inputRef}\n tabIndex={disabled ? -1 : 0}\n type=\"file\"\n disabled={disabled}\n multiple={multiple}\n className={jsStyles.visuallyHidden()}\n onClick={stopPropagation}\n onChange={handleInputChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </FocusControlWrapper>\n </label>\n </div>\n {uploadButtonPosition === 'start' && renderFileList()}\n </div>\n </CommonWrapper>\n );\n});\n\nexport interface FileUploaderProps extends _FileUploaderProps, FileUploaderControlProviderProps {}\n\n/**\n * Контрол для выбора пользователем файла на компьютере и отображения статуса его отправки на сервер.\n */\nexport const FileUploader = withFileUploaderControlProvider<FileUploaderProps, FileUploaderRef>(\n React.memo(_FileUploader),\n);\n\nFileUploader.displayName = 'FileUploader';\n"]}
|
|
1
|
+
{"version":3,"file":"FileUploader.js","sourceRoot":"","sources":["FileUploader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzG,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAElF,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,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AoB,KAAK,OAAO,IAAI,cAAc,EAAE,CACjD,CACQ,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,IAAM,YAAY,GAAG,+BAA+B,CACzD,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAC1B,CAAC;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import React, { useCallback, useContext, useEffect, useImperativeHandle, useRef, useState } from 'react';\n\nimport { useDrop } from '../../hooks/useDrop.js';\nimport { useMemoObject } from '../../hooks/useMemoObject.js';\nimport type { CommonProps } from '../../internal/CommonWrapper/index.js';\nimport { CommonWrapper } from '../../internal/CommonWrapper/index.js';\nimport { FocusControlWrapper } from '../../internal/FocusControlWrapper/index.js';\nimport type { PopupPositionsType, ShortPopupPositionsType } from '../../internal/Popup/index.js';\nimport { useKeyListener } from '../../lib/events/keyListener.js';\nimport { forwardRefAndName } from '../../lib/forwardRefAndName.js';\nimport { isBrowser } from '../../lib/globalObject.js';\nimport { useEmotion, useGlobal, useStyles } from '../../lib/renderEnvironment/index.js';\nimport type { InstanceWithRootNode } from '../../lib/rootNode/index.js';\nimport { useSizeControl } from '../../lib/size/useSizeControl.js';\nimport { ThemeContext } from '../../lib/theming/ThemeContext.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport type { Nullable } from '../../typings/utility-types.js';\nimport { getJsRowStyles, getJsStyles, getJsTileStyles, globalClasses } from './FileUploader.css.js';\nimport { FileUploaderControlContext } from './FileUploaderControlContext.js';\nimport type { FileUploaderControlProviderProps } from './FileUploaderControlProvider.js';\nimport { FileUploaderFile } from './FileUploaderFile.js';\nimport type { FileUploaderFileProps } from './FileUploaderFile.js';\nimport { FileUploaderFileList } from './FileUploaderFileList/FileUploaderFileList.js';\nimport { FileUploaderFileValidationResult } from './FileUploaderFileValidationResult.js';\nimport type {\n FileUploaderAttachedFile,\n FileUploaderUploadButtonPosition,\n FileUploaderValidationSummary,\n FileUploaderView,\n} from './fileUtils.js';\nimport { FileUploaderFileStatus, getAttachedFile } from './fileUtils.js';\nimport { useControlLocale } from './hooks/useControlLocale.js';\nimport { useFileUploaderSize } from './hooks/useFileUploaderSize.js';\nimport { useUpload } from './hooks/useUpload.js';\nimport { UploadIcon } from './icons/UploadIcon.js';\nimport { withFileUploaderControlProvider } from './withFileUploaderControlProvider.js';\n\nconst stopPropagation: React.ReactEventHandler = (e) => e.stopPropagation();\n\ntype FileUploaderOverriddenProps = 'size';\n\ninterface _FileUploaderProps\n extends CommonProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, FileUploaderOverriddenProps> {\n /** Переводит контрол в состояние ошибки. */\n /** Состояние ошибки всего контрола */\n error?: boolean;\n\n /** Переводит контрол в состояние предупреждения. */\n /** Состояние предупреждения всего контрола. */\n warning?: boolean;\n\n /** Расположение тултипа с текстом валидации файла.\n * @default 'top left' */\n validationTooltipPosition?: ShortPopupPositionsType | PopupPositionsType;\n\n /** Включает отображение текста валидации файла во всплывающей подсказке вместо строки рядом с именем.\n * @default false */\n withValidationTooltip?: boolean;\n\n /** Включает отображение иконки предупреждения (восклицательный знак) при статусе предупреждения у файла.\n * @default false */\n withWarningIcon?: boolean;\n\n /** Ширина контрола. */\n width?: React.CSSProperties['width'];\n\n /** Размер контрола и вложенных элементов.\n * @default small */\n size?: SizeProp;\n\n /** Скрывает встроенный список файлов.\n * @default false */\n hideFiles?: boolean;\n\n /** Текст ссылки выбора файла.\n * @default \"Выберите файл\"\n */\n uploaderText?: string;\n\n /** Иконка в кнопке загрузки.\n */\n uploaderIcon?: React.ReactNode;\n\n /** Режим отображения списка файлов: строка (`row`) или плитка (`tile`).\n * @default row\n */\n view?: FileUploaderView;\n\n /** Режим блока-саммари по ошибкам и предупреждениям:\n * - `auto` — от порога `validationSummaryStart`,\n * - `enabled` / `disabled` — всегда или никогда.\n * @default auto\n */\n validationSummary?: FileUploaderValidationSummary;\n\n /** Порог числа файлов для показа саммари при `validationSummary=\"auto\"`.\n * @default 5 */\n validationSummaryStart?: number;\n\n /** Расположение кнопки загрузки относительно списка: в начале или в конце.\n * @default start */\n uploadButtonPosition?: FileUploaderUploadButtonPosition;\n\n /** Включает асинхронный режим загрузки файлов.\n * Отклонённый промис помечает файл(ы) ошибкой загрузки.\n */\n request?: (file: FileUploaderAttachedFile) => Promise<void>;\n\n /** Колбэк после успешного завершения `request` для файла. */\n onRequestSuccess?: (fileId: string) => void;\n\n /** Колбэк после ошибки `request` для файла. */\n onRequestError?: (fileId: string) => void;\n\n /** Проверка файла после выбора и до `request`: строка или `{ message, status }` — ошибка/предупреждение. Пустой результат — файл проходит.\n */\n validateBeforeUpload?: (\n file: FileUploaderAttachedFile,\n ) => Promise<Nullable<string | { message: string; status: FileUploaderFileStatus }>>;\n\n /**\n * Задаёт метод отрисовки файлов.\n * @default (props: FileUploaderFileProps) => <FileUploaderFile {...props} />\n */\n renderFile?: (props: FileUploaderFileProps) => React.ReactNode;\n}\n\nexport interface FileUploaderRef extends InstanceWithRootNode {\n /** Устанавливает фокус на скрытом `input` выбора файла. */\n focus: () => void;\n /** Снимает фокус с `input` выбора файла. */\n blur: () => void;\n /** Очищает список файлов и значения `input`. */\n reset: () => void;\n /** Удаляет файл по id с вызовом `onRemove` и `onValueChange`. */\n removeFile: (fileId: string) => void;\n}\n\nexport type FileUploader = FileUploaderRef;\n\nexport const FileUploaderDataTids = {\n root: 'FileUploader__root',\n content: 'FileUploader__content',\n link: 'FileUploader__link',\n input: 'FileUploader__input',\n} as const;\n\nconst defaultRenderFile = (props: FileUploaderFileProps) => <FileUploaderFile {...props} />;\n\nconst _FileUploader = forwardRefAndName<FileUploaderRef, _FileUploaderProps>('FileUploader', (props, ref) => {\n const theme = useContext(ThemeContext);\n const globalObject = useGlobal();\n const { cx } = useEmotion();\n const jsStyles = useStyles(getJsStyles);\n const jsRowStyles = useStyles(getJsRowStyles);\n const jsTileStyles = useStyles(getJsTileStyles);\n const keyListener = useKeyListener();\n\n const {\n disabled,\n error,\n warning,\n withValidationTooltip = false,\n validationTooltipPosition,\n withWarningIcon = false,\n multiple = false,\n uploaderText,\n uploaderIcon,\n view = 'row',\n uploadButtonPosition = 'start',\n validationSummary = 'auto',\n validationSummaryStart = 5,\n width = theme.fileUploaderWidth,\n hideFiles = false,\n onBlur,\n onFocus,\n onChange,\n request,\n validateBeforeUpload,\n onRequestSuccess,\n onRequestError,\n size: sizeProp,\n renderFile = defaultRenderFile,\n ...inputProps\n } = props;\n const size = useSizeControl(sizeProp);\n\n const { files, setFiles, removeFile, reset, setFileValidationResult } = useContext(FileUploaderControlContext);\n\n const locale = useControlLocale();\n\n const inputRef = useRef<HTMLInputElement>(null);\n const fileDivRef = useRef<HTMLDivElement>(null);\n\n const isAsync = !!request;\n const isSingleMode = !multiple;\n\n const [hovered, setHovered] = useState(false);\n const upload = useUpload(request, onRequestSuccess, onRequestError);\n\n const tryValidateAndUpload = useCallback(\n (files: FileUploaderAttachedFile[]) => {\n files.forEach(async (file) => {\n const validationMessage = validateBeforeUpload && (await validateBeforeUpload(file));\n\n if (!validationMessage) {\n isAsync && upload(file);\n } else if (typeof validationMessage === 'object') {\n setFileValidationResult(\n file.id,\n FileUploaderFileValidationResult.error(validationMessage.message),\n validationMessage.status,\n );\n } else {\n setFileValidationResult(\n file.id,\n FileUploaderFileValidationResult.error(validationMessage),\n FileUploaderFileStatus.Error,\n );\n }\n });\n },\n [validateBeforeUpload, isAsync, upload, setFileValidationResult],\n );\n\n const isTileView = view === 'tile';\n const jsViewStyles = isTileView ? jsTileStyles : jsRowStyles;\n\n const sizeClassName = useFileUploaderSize(size, {\n small: jsViewStyles.sizeSmall(theme),\n medium: jsViewStyles.sizeMedium(theme),\n large: jsViewStyles.sizeLarge(theme),\n });\n\n const uploadButtonTileWithFileClassName = useFileUploaderSize(size, {\n small: jsTileStyles.uploadButtonTileWithFileSmall(theme),\n medium: jsTileStyles.uploadButtonTileWithFileMedium(theme),\n large: jsTileStyles.uploadButtonTileWithFileLarge(theme),\n });\n\n const uploadButtonIconGapClass = useFileUploaderSize(size, {\n small: jsViewStyles.uploadButtonIconGapSmall(theme),\n medium: jsViewStyles.uploadButtonIconGapMedium(theme),\n large: jsViewStyles.uploadButtonIconGapLarge(theme),\n });\n\n const sizeIconClass = useFileUploaderSize(size, {\n small: jsStyles.iconSmall(theme),\n medium: jsStyles.iconMedium(theme),\n large: jsStyles.iconLarge(theme),\n });\n\n const sizeWrapperClass = useFileUploaderSize(size, {\n small: jsTileStyles.uploadButtonWrapperSmall(theme),\n medium: jsTileStyles.uploadButtonWrapperMedium(theme),\n large: jsTileStyles.uploadButtonWrapperLarge(theme),\n });\n\n const sizeWrapperEmptyFileClass = useFileUploaderSize(size, {\n small: jsTileStyles.uploadButtonWrapperEmptyFileSmall(theme),\n medium: jsTileStyles.uploadButtonWrapperEmptyFileMedium(theme),\n large: jsTileStyles.uploadButtonWrapperEmptyFileLarge(theme),\n });\n\n const contentInnerClass = useFileUploaderSize(size, {\n small: jsStyles.contentInnerSmall(theme),\n medium: jsStyles.contentInnerMedium(theme),\n large: jsStyles.contentInnerLarge(theme),\n });\n\n /** common part **/\n const handleChange = useCallback(\n (newFiles: FileList | null) => {\n if (!newFiles || !newFiles.length) {\n return;\n }\n\n let filesArray = Array.from(newFiles);\n\n if (isSingleMode) {\n filesArray = [filesArray[0]];\n }\n\n const attachedFiles = filesArray.map(getAttachedFile);\n\n if (isSingleMode && attachedFiles.length && files.length) {\n removeFile(files[0].id);\n }\n\n if (attachedFiles.length) {\n setFiles(attachedFiles);\n tryValidateAndUpload(attachedFiles);\n }\n },\n [tryValidateAndUpload, setFiles, isSingleMode, files, removeFile],\n );\n\n const handleDrop = useCallback(\n (event: DragEvent) => {\n if (disabled) {\n return;\n }\n\n const { dataTransfer } = event;\n if (dataTransfer) {\n if (isSingleMode && dataTransfer.files.length > 1) {\n dataTransfer.dropEffect = 'none';\n return;\n }\n if (dataTransfer.files?.length > 0) {\n inputRef.current && (inputRef.current.files = dataTransfer.files);\n handleChange(dataTransfer.files);\n }\n }\n },\n [handleChange, disabled],\n );\n\n const { isDraggable, ref: labelRef } = useDrop<HTMLLabelElement>({ onDrop: handleDrop });\n const { isDraggable: isWindowDraggable, ref: windowRef } = useDrop<Document>();\n\n if (isBrowser(globalObject)) {\n windowRef.current = globalObject.document;\n }\n\n const focus = useCallback(() => {\n keyListener.isTabPressed = true;\n inputRef.current?.focus();\n }, []);\n\n const blur = useCallback(() => {\n inputRef.current?.blur();\n }, []);\n\n const removeFileFromNativeInput = useCallback(\n (fileId: string) => {\n const dataTransfer = new DataTransfer();\n files\n .filter((f) => f.id !== fileId)\n .forEach((file) => {\n dataTransfer.items.add(file.originalFile);\n });\n inputRef.current && (inputRef.current.files = dataTransfer.files);\n },\n [files],\n );\n\n const handleRemoveFile = useCallback(\n (fileId: string) => {\n removeFile(fileId);\n removeFileFromNativeInput(fileId);\n },\n [removeFileFromNativeInput, removeFile],\n );\n\n const handleReset = useCallback(() => {\n reset();\n const dataTransfer = new DataTransfer();\n inputRef.current && (inputRef.current.files = dataTransfer.files);\n }, [reset, handleRemoveFile]);\n\n useImperativeHandle(\n ref,\n () => ({\n focus,\n blur,\n reset: handleReset,\n removeFile: handleRemoveFile,\n getRootNode: () => rootNodeRef.current,\n }),\n [ref, blur, focus, handleReset, handleRemoveFile],\n );\n\n const [focusedByTab, setFocusedByTab] = useState(false);\n const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(event);\n handleChange(event.target.files);\n setHovered(false);\n };\n\n const handleFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n if (!disabled) {\n // focus event fires before keyDown eventlistener\n // so we should check tabPressed in async way\n globalObject.requestAnimationFrame?.(() => {\n if (keyListener.isTabPressed) {\n setFocusedByTab(true);\n }\n });\n onFocus?.(e);\n }\n };\n\n const handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n setFocusedByTab(false);\n if (!disabled) {\n onBlur?.(e);\n }\n };\n\n const hasFiles = files.length > 0;\n const hasOneFile = files.length === 1;\n const hasOneFileForSingle = isSingleMode && hasOneFile && !hideFiles;\n\n const hasError = !!error || files[0]?.status === FileUploaderFileStatus.Error;\n const hasWarning = !!warning || files[0]?.status === FileUploaderFileStatus.Warning;\n\n const uploadButtonClassNames = cx(\n jsStyles.uploadButton(theme),\n jsViewStyles.uploadButton(),\n sizeClassName,\n hasOneFileForSingle && jsViewStyles.uploadButtonWithFile(theme),\n focusedByTab && jsStyles.uploadButtonFocus(theme),\n disabled && {\n [jsStyles.disabled(theme)]: true,\n [jsStyles.disabledBackground(theme)]: !hasFiles,\n },\n (focusedByTab || !hasOneFileForSingle) && {\n [jsStyles.warningButton(theme)]: hasWarning,\n [jsStyles.errorButton(theme)]: hasError,\n },\n hasOneFileForSingle && {\n [uploadButtonTileWithFileClassName]: isTileView,\n [jsTileStyles.verticalAlign()]: isTileView,\n [jsStyles.warningFile(theme)]: (!isTileView || hovered) && hasWarning,\n [jsStyles.errorFile(theme)]: (!isTileView || hovered) && hasError,\n },\n !disabled &&\n hovered && {\n [jsStyles.hovered(theme)]: true,\n },\n isDraggable && !disabled && jsStyles.dragOver(theme),\n );\n\n const canDrop = isWindowDraggable && !disabled;\n const uploadButtonWrapperClassNames = cx(\n isTileView && {\n [sizeWrapperClass]: true,\n [sizeWrapperEmptyFileClass]: !hasOneFileForSingle,\n },\n jsViewStyles.uploadButtonWrapper(),\n canDrop && jsStyles.windowDragOver(theme),\n );\n\n const uploadButtonIconClassNames = cx(\n jsStyles.icon(theme),\n sizeIconClass,\n disabled && jsStyles.iconDisabled(theme),\n uploadButtonIconGapClass,\n );\n\n const rootClassNames = cx(jsStyles.root(theme), !isTileView && jsRowStyles.root());\n\n const contentClassNames = cx(jsViewStyles.content(), {\n [jsViewStyles.contentWithFiles()]: hasOneFileForSingle,\n [contentInnerClass]: !isTileView && (!files.length || !isSingleMode),\n });\n\n const afterLinkTextClassNames = cx(\n globalClasses.afterLinkText,\n hasOneFileForSingle ? jsStyles.afterLinkText_HasFiles() : jsStyles.afterLinkText(),\n );\n\n const linkClassNames = cx(\n jsStyles.link(theme),\n !disabled && hovered && jsStyles.linkHovered(theme),\n disabled && jsStyles.linkDisabled(theme),\n );\n\n useEffect(() => {\n if (!files || !files.length || !inputRef.current) {\n return;\n }\n\n const dataTransfer = new DataTransfer();\n files.forEach((file) => dataTransfer.items.add(file.originalFile));\n inputRef.current.files = dataTransfer.files;\n }, []);\n\n const rootNodeRef = useRef(null);\n\n const icon = uploaderIcon ?? <UploadIcon size={size} view={view} />;\n const chooseFileText = uploaderText ?? locale.chooseFile;\n const chooseFileLocale = `${chooseFileText}${String.fromCharCode(0xa0)}`; /* */\n const hideUploaderText = isTileView && uploaderText === '';\n const renderChooseFileText = () =>\n !hideUploaderText && (\n <span data-tid={FileUploaderDataTids.link} className={linkClassNames}>\n {!hasOneFileForSingle && chooseFileLocale}\n </span>\n );\n\n const renderFileList = () => {\n return (\n !hideFiles &&\n !isSingleMode &&\n !!files.length && (\n <FileUploaderFileList\n renderFile={renderFile}\n size={size}\n view={view}\n onRemove={handleRemoveFile}\n validationTooltipPosition={validationTooltipPosition}\n withValidationTooltip={withValidationTooltip}\n validationSummary={validationSummary}\n validationSummaryStart={validationSummaryStart}\n withWarningIcon={withWarningIcon}\n disabled={disabled}\n />\n )\n );\n };\n\n const fileProps: FileUploaderFileProps = {\n file: files[0],\n size,\n view,\n onRemove: handleRemoveFile,\n error,\n warning,\n withValidationTooltip,\n validationTooltipPosition,\n withWarningIcon,\n hovered,\n disabled,\n };\n\n const fileElement = renderFile(fileProps);\n\n return (\n <CommonWrapper {...props}>\n <div\n data-tid={FileUploaderDataTids.root}\n className={rootClassNames}\n style={useMemoObject({ width: isTileView && !multiple ? theme.fileUploaderTileWidth : width })}\n ref={rootNodeRef}\n >\n {uploadButtonPosition === 'end' && renderFileList()}\n <div className={uploadButtonWrapperClassNames}>\n <label\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n ref={labelRef}\n className={uploadButtonClassNames}\n >\n {!hasOneFileForSingle && <div className={uploadButtonIconClassNames}>{icon}</div>}\n <div data-tid={FileUploaderDataTids.content} className={contentClassNames}>\n {renderChooseFileText()}\n <div className={afterLinkTextClassNames}>\n {hasOneFileForSingle && (\n <div ref={fileDivRef} className={jsStyles.singleFile()}>\n {fileElement}\n </div>\n )}\n </div>\n </div>\n <FocusControlWrapper onBlurWhenDisabled={() => setFocusedByTab(false)}>\n <input\n {...inputProps}\n data-tid={FileUploaderDataTids.input}\n ref={inputRef}\n tabIndex={disabled ? -1 : 0}\n type=\"file\"\n disabled={disabled}\n multiple={multiple}\n className={jsStyles.visuallyHidden()}\n onClick={stopPropagation}\n onChange={handleInputChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </FocusControlWrapper>\n </label>\n </div>\n {uploadButtonPosition === 'start' && renderFileList()}\n </div>\n </CommonWrapper>\n );\n});\n\nexport interface FileUploaderProps extends _FileUploaderProps, FileUploaderControlProviderProps {}\n\n/**\n * Контрол для выбора пользователем файла на компьютере и отображения статуса его отправки на сервер.\n */\nexport const FileUploader = withFileUploaderControlProvider<FileUploaderProps, FileUploaderRef>(\n React.memo(_FileUploader),\n);\n\nFileUploader.displayName = 'FileUploader';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fileUploaderSizeMixin: (fontSize: string, lineHeight: string, paddingX: string, paddingY: string) => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export var fileUploaderSizeMixin = function (fontSize, lineHeight, paddingX, paddingY) {
|
|
2
|
+
return "\n font-size: ".concat(fontSize, ";\n box-sizing: border-box;\n padding: ").concat(paddingY, " ").concat(paddingX, ";\n line-height: ").concat(lineHeight, ";\n ");
|
|
3
|
+
};
|
|
4
|
+
//# sourceMappingURL=FileUploader.mixins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUploader.mixins.js","sourceRoot":"","sources":["FileUploader.mixins.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,qBAAqB,GAAG,UACnC,QAAgB,EAChB,UAAkB,EAClB,QAAgB,EAChB,QAAgB;IAEhB,OAAO,2BACQ,QAAQ,0DAEV,QAAQ,cAAI,QAAQ,iCAChB,UAAU,UAC1B,CAAC;AACJ,CAAC,CAAC","sourcesContent":["export const fileUploaderSizeMixin = (\n fontSize: string,\n lineHeight: string,\n paddingX: string,\n paddingY: string,\n): string => {\n return `\n font-size: ${fontSize};\n box-sizing: border-box;\n padding: ${paddingY} ${paddingX};\n line-height: ${lineHeight};\n `;\n};\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { Theme } from '../../lib/theming/Theme.js';
|
|
2
|
+
export declare const getJsStyles: import("../../lib/theming/StaticStyles.js").StylesGetter<{
|
|
3
|
+
root(): string;
|
|
4
|
+
content(): string;
|
|
5
|
+
validationTextError(t: Theme): string;
|
|
6
|
+
validationTextWarning(t: Theme): string;
|
|
7
|
+
nameBlock(): string;
|
|
8
|
+
size(t: Theme): string;
|
|
9
|
+
sizeSmall(t: Theme): string;
|
|
10
|
+
sizeMedium(t: Theme): string;
|
|
11
|
+
sizeLarge(t: Theme): string;
|
|
12
|
+
icon(t: Theme): string;
|
|
13
|
+
disabledFileTypeIconSvg(t: Theme): string;
|
|
14
|
+
fileTypeIconMultiple(): string;
|
|
15
|
+
contentSmall(t: Theme): string;
|
|
16
|
+
contentMedium(t: Theme): string;
|
|
17
|
+
contentLarge(t: Theme): string;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const getJsRowStyles: import("../../lib/theming/StaticStyles.js").StylesGetter<{
|
|
20
|
+
content(): string;
|
|
21
|
+
contentSmall(t: Theme): string;
|
|
22
|
+
contentMedium(t: Theme): string;
|
|
23
|
+
contentLarge(t: Theme): string;
|
|
24
|
+
iconSmall(t: Theme): string;
|
|
25
|
+
iconMedium(t: Theme): string;
|
|
26
|
+
iconLarge(t: Theme): string;
|
|
27
|
+
fileTypeIconSmall(t: Theme): string;
|
|
28
|
+
fileTypeIconMedium(t: Theme): string;
|
|
29
|
+
fileTypeIconLarge(t: Theme): string;
|
|
30
|
+
iconColor(t: Theme): string;
|
|
31
|
+
size(t: Theme): string;
|
|
32
|
+
name(): string;
|
|
33
|
+
nameBlock(): string;
|
|
34
|
+
disabled(t: Theme): string;
|
|
35
|
+
}>;
|
|
36
|
+
export declare const getJsTileStyles: import("../../lib/theming/StaticStyles.js").StylesGetter<{
|
|
37
|
+
content(): string;
|
|
38
|
+
iconAction(t: Theme): string;
|
|
39
|
+
iconActionShow(): string;
|
|
40
|
+
iconSmall(t: Theme): string;
|
|
41
|
+
iconMedium(t: Theme): string;
|
|
42
|
+
iconLarge(t: Theme): string;
|
|
43
|
+
fileTypeIcon(t: Theme): string;
|
|
44
|
+
fileTypeIconPreview(): string;
|
|
45
|
+
fileTypeIconSmall(t: Theme): string;
|
|
46
|
+
fileTypeIconMedium(t: Theme): string;
|
|
47
|
+
fileTypeIconLarge(t: Theme): string;
|
|
48
|
+
disabledFileTypeIcon(t: Theme): string;
|
|
49
|
+
sizeDisabled(t: Theme): string;
|
|
50
|
+
errorFileTypeIcon(t: Theme): string;
|
|
51
|
+
warningFileTypeIcon(t: Theme): string;
|
|
52
|
+
iconColor(t: Theme): string;
|
|
53
|
+
size(t: Theme): string;
|
|
54
|
+
name(): string;
|
|
55
|
+
nameBlock(): string;
|
|
56
|
+
contentSmall(t: Theme): string;
|
|
57
|
+
contentMedium(t: Theme): string;
|
|
58
|
+
contentLarge(t: Theme): string;
|
|
59
|
+
disabled(t: Theme): string;
|
|
60
|
+
}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
import { bindStaticStyles as _b9cd9 } from '../../lib/theming/bindStaticStyles.js';
|
|
3
|
+
export var getJsRowStyles = _b9cd9({content:'react-ui-FileUploaderFile__content-2',contentSmall:'react-ui-FileUploaderFile__contentSmall-2',contentMedium:'react-ui-FileUploaderFile__contentMedium-2',contentLarge:'react-ui-FileUploaderFile__contentMedium-2',iconSmall:'react-ui-FileUploaderFile__iconSmall',iconMedium:'react-ui-FileUploaderFile__iconMedium',iconLarge:'react-ui-FileUploaderFile__iconLarge',fileTypeIconSmall:'react-ui-FileUploaderFile__fileTypeIconSmall',fileTypeIconMedium:'react-ui-FileUploaderFile__fileTypeIconMedium',fileTypeIconLarge:'react-ui-FileUploaderFile__fileTypeIconLarge',iconColor:'react-ui-FileUploaderFile__iconColor',size:'react-ui-FileUploaderFile__size-2',name:'react-ui-FileUploaderFile__name',nameBlock:'react-ui-FileUploaderFile__nameBlock-2',disabled:'react-ui-FileUploaderFile__disabled'});
|
|
4
|
+
export var getJsStyles = _b9cd9({root:'react-ui-FileUploaderFile__root',content:'react-ui-FileUploaderFile__content',nameBlock:'react-ui-FileUploaderFile__nameBlock',size:'react-ui-FileUploaderFile__size',sizeSmall:'react-ui-FileUploaderFile__sizeSmall',sizeMedium:'react-ui-FileUploaderFile__sizeMedium',sizeLarge:'react-ui-FileUploaderFile__sizeLarge',icon:'react-ui-FileUploaderFile__icon',disabledFileTypeIconSvg:'react-ui-FileUploaderFile__disabledFileTypeIconSvg',fileTypeIconMultiple:'react-ui-FileUploaderFile__fileTypeIconMultiple',contentSmall:'react-ui-FileUploaderFile__contentSmall',contentMedium:'react-ui-FileUploaderFile__contentMedium',contentLarge:'react-ui-FileUploaderFile__contentLarge',validationTextWarning:'react-ui-FileUploaderFile__validationTextWarning',validationTextError:'react-ui-FileUploaderFile__validationTextError'});
|
|
5
|
+
export var getJsTileStyles = _b9cd9({content:'react-ui-FileUploaderFile__content-3',iconAction:'react-ui-FileUploaderFile__iconAction',iconActionShow:'react-ui-FileUploaderFile__iconActionShow',iconSmall:'react-ui-FileUploaderFile__iconSmall-2',iconMedium:'react-ui-FileUploaderFile__iconMedium-2',iconLarge:'react-ui-FileUploaderFile__iconLarge-2',fileTypeIcon:'react-ui-FileUploaderFile__fileTypeIcon',fileTypeIconPreview:'react-ui-FileUploaderFile__fileTypeIconPreview',fileTypeIconSmall:'react-ui-FileUploaderFile__fileTypeIconSmall-2',fileTypeIconMedium:'react-ui-FileUploaderFile__fileTypeIconMedium-2',fileTypeIconLarge:'react-ui-FileUploaderFile__fileTypeIconLarge-2',iconColor:'react-ui-FileUploaderFile__iconColor-2',size:'react-ui-FileUploaderFile__size-3',name:'react-ui-FileUploaderFile__name-2',nameBlock:'react-ui-FileUploaderFile__nameBlock-3',contentSmall:'react-ui-FileUploaderFile__contentSmall-3',contentMedium:'react-ui-FileUploaderFile__contentMedium-3',contentLarge:'react-ui-FileUploaderFile__contentLarge-2',disabled:'react-ui-FileUploaderFile__disabled-2',disabledFileTypeIcon:'react-ui-FileUploaderFile__disabledFileTypeIcon',warningFileTypeIcon:'react-ui-FileUploaderFile__warningFileTypeIcon',errorFileTypeIcon:'react-ui-FileUploaderFile__errorFileTypeIcon',sizeDisabled:'react-ui-FileUploaderFile__sizeDisabled'});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUploaderFile.css.js","sourceRoot":"","sources":["FileUploaderFile.css.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAG3F,MAAM,CAAC,IAAM,WAAW,GAAG,gBAAgB,CAAC,UAAC,EAAgB;QAAd,GAAG,SAAA;IAAgB,OAAA,CAAC;QACjE,IAAI;YACF,OAAO,GAAG,uHAAA,oDAGT,KAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,GAAG,mJAAA,gFAIT,KAAC;QACJ,CAAC;QAED,mBAAmB,YAAC,CAAQ;YAC1B,OAAO,GAAG,+FAAA,iBACC,EAA4B,SACtC,KADU,CAAC,CAAC,0BAA0B,EACrC;QACJ,CAAC;QAED,qBAAqB,YAAC,CAAQ;YAC5B,OAAO,GAAG,+FAAA,iBACC,EAA8B,SACxC,KADU,CAAC,CAAC,4BAA4B,EACvC;QACJ,CAAC;QAED,SAAS;YACP,OAAO,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C;AACJ,CAAC,CAAC,CAAC;AAEH,uDAAuD;AACvD,oBAAoB,CAAC;IACnB,uBAAuB;IACvB,qBAAqB;IACrB,sBAAsB;IACtB,qBAAqB;IACrB,mBAAmB;IACnB,cAAc;CACf,CAAC,CAAC","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\n\nimport { finalizeStaticStyles, memoizeGetStyles } from '../../lib/theming/StaticStyles.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\n\nexport const getJsStyles = memoizeGetStyles(({ css }: Emotion) => ({\n root() {\n return css`\n width: 100%;\n height: inherit;\n `;\n },\n\n content() {\n return css`\n display: flex;\n width: 100%;\n align-items: baseline;\n `;\n },\n\n validationTextError(t: Theme) {\n return css`\n color: ${t.fileUploaderErrorTextColor};\n `;\n },\n\n validationTextWarning(t: Theme) {\n return css`\n color: ${t.fileUploaderWarningTextColor};\n `;\n },\n\n nameBlock() {\n return css`\n display: flex;\n flex-wrap: wrap;\n flex: 1 1 100%;\n width: 100%;\n `;\n },\n\n size(t: Theme) {\n return css`\n margin-left: ${t.fileUploaderFileSizeMarginLeft};\n flex: 1 0 auto;\n `;\n },\n\n sizeSmall(t: Theme) {\n return css`\n width: ${t.fileUploaderFileSizeWidthSmall};\n margin-right: ${t.fileUploaderFileSizeMarginSmall};\n font-size: ${t.fileUploaderFontSizeSmall};\n line-height: ${t.fileUploaderLineHeightSmall};\n `;\n },\n\n sizeMedium(t: Theme) {\n return css`\n width: ${t.fileUploaderFileSizeWidthMedium};\n margin-right: ${t.fileUploaderFileSizeMarginMedium};\n font-size: ${t.fileUploaderFontSizeMedium};\n line-height: ${t.fileUploaderLineHeightMedium};\n `;\n },\n\n sizeLarge(t: Theme) {\n return css`\n width: ${t.fileUploaderFileSizeWidthLarge};\n margin-right: ${t.fileUploaderFileSizeMarginLarge};\n font-size: ${t.fileUploaderFontSizeLarge};\n line-height: ${t.fileUploaderLineHeightLarge};\n `;\n },\n\n icon(t: Theme) {\n return css`\n position: absolute;\n top: ${t.fileUploaderIconGapSmall};\n right: ${t.fileUploaderIconGapSmall};\n display: flex;\n flex: 1 0 auto;\n align-items: center;\n justify-content: center;\n width: ${t.fileUploaderTileIconSizeSmall};\n border-radius: ${t.fileUploaderBorderRadius};\n cursor: pointer;\n text-align: center;\n outline: none;\n &:hover {\n background: ${t.fileUploaderHoveredBg};\n }\n &:active {\n background: ${t.fileUploaderActiveBg};\n }\n `;\n },\n\n disabledFileTypeIconSvg(t: Theme) {\n return css`\n svg {\n fill: ${t.fileUploaderDisabledFileTypeIcon} !important;\n }\n `;\n },\n\n fileTypeIconMultiple() {\n return css`\n margin-left: 0;\n `;\n },\n\n contentSmall(t: Theme) {\n return css`\n font-size: ${t.fileUploaderFontSizeSmall};\n line-height: ${t.fileUploaderLineHeightSmall};\n `;\n },\n\n contentMedium(t: Theme) {\n return css`\n font-size: ${t.fileUploaderFontSizeMedium};\n line-height: ${t.fileUploaderLineHeightMedium};\n `;\n },\n\n contentLarge(t: Theme) {\n return css`\n font-size: ${t.fileUploaderFontSizeLarge};\n line-height: ${t.fileUploaderLineHeightLarge};\n `;\n },\n}));\n\nexport const getJsRowStyles = memoizeGetStyles(({ css }: Emotion) => {\n return {\n content() {\n return css`\n flex-direction: row;\n `;\n },\n\n contentSmall(t: Theme) {\n return css`\n margin-right: ${t.fileUploaderFileIconSizeSmall};\n `;\n },\n\n contentMedium(t: Theme) {\n return css`\n margin-right: ${t.fileUploaderFileIconSizeMedium};\n `;\n },\n\n contentLarge(t: Theme) {\n return css`\n margin-right: ${t.fileUploaderFileIconSizeMedium};\n `;\n },\n\n iconSmall(t: Theme) {\n return css`\n height: ${t.fileUploaderFileIconSizeSmall};\n width: ${t.fileUploaderFileIconSizeSmall};\n `;\n },\n\n iconMedium(t: Theme) {\n return css`\n height: ${t.fileUploaderFileIconSizeMedium};\n width: ${t.fileUploaderFileIconSizeMedium};\n `;\n },\n\n iconLarge(t: Theme) {\n return css`\n height: ${t.fileUploaderFileIconSizeLarge};\n width: ${t.fileUploaderFileIconSizeLarge};\n `;\n },\n\n fileTypeIconSmall(t: Theme) {\n return css`\n margin-right: ${t.fileUploaderIconGapSmall};\n `;\n },\n\n fileTypeIconMedium(t: Theme) {\n return css`\n margin-right: ${t.fileUploaderIconGapMedium};\n `;\n },\n\n fileTypeIconLarge(t: Theme) {\n return css`\n margin-right: ${t.fileUploaderIconGapLarge};\n `;\n },\n\n iconColor(t: Theme) {\n return css`\n color: ${t.fileUploaderIconColor};\n &:hover {\n color: ${t.fileUploaderIconHoverColor};\n }\n `;\n },\n\n size(t: Theme) {\n return css`\n margin-left: ${t.fileUploaderIconGapSmall};\n color: ${t.fileUploaderDisabledColor};\n `;\n },\n\n name() {\n return css`\n flex: 1 1 100%;\n overflow: hidden;\n `;\n },\n\n nameBlock() {\n return css`\n flex: 1 1 100%;\n `;\n },\n\n disabled(t: Theme) {\n return css`\n cursor: default;\n color: ${t.fileUploaderDisabledTextColor};\n `;\n },\n };\n});\n\nexport const getJsTileStyles = memoizeGetStyles(({ css }: Emotion) => {\n return {\n content() {\n return css`\n flex-direction: column;\n align-items: center;\n height: inherit;\n `;\n },\n\n iconAction(t: Theme) {\n return css`\n border-radius: ${t.fileUploaderBorderRadius};\n opacity: 0;\n background: ${t.fileUploaderTileIconColorBg};\n\n &:hover {\n background: ${t.fileUploaderTileIconHoverColorBg};\n }\n\n &:active {\n background: ${t.fileUploaderTileIconActiveColorBg};\n }\n `;\n },\n\n iconActionShow() {\n return css`\n opacity: 1;\n `;\n },\n\n iconSmall(t: Theme) {\n return css`\n width: ${t.fileUploaderTileIconSizeSmall};\n height: ${t.fileUploaderTileIconSizeSmall};\n padding: ${t.fileUploaderTileIconActionPaddingSmall};\n top: ${t.fileUploaderTileIconActionPositionSmall};\n right: ${t.fileUploaderTileIconActionPositionSmall};\n `;\n },\n\n iconMedium(t: Theme) {\n return css`\n width: ${t.fileUploaderTileIconSizeMedium};\n height: ${t.fileUploaderTileIconSizeMedium};\n padding: ${t.fileUploaderTileIconActionPaddingMedium};\n top: ${t.fileUploaderTileIconActionPositionMedium};\n right: ${t.fileUploaderTileIconActionPositionMedium};\n `;\n },\n\n iconLarge(t: Theme) {\n return css`\n width: ${t.fileUploaderTileIconSizeLarge};\n height: ${t.fileUploaderTileIconSizeLarge};\n padding: ${t.fileUploaderTileIconActionPaddingLarge};\n top: ${t.fileUploaderTileIconActionPositionLarge};\n right: ${t.fileUploaderTileIconActionPositionLarge};\n `;\n },\n\n fileTypeIcon(t: Theme) {\n return css`\n width: 100%;\n border: 1px solid ${t.fileUploaderDisabledBorderColor};\n border-radius: ${t.fileUploaderBorderRadius};\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n `;\n },\n\n fileTypeIconPreview() {\n return css`\n background-position: top;\n background-size: cover;\n background-repeat: no-repeat;\n `;\n },\n\n fileTypeIconSmall(t: Theme) {\n return css`\n margin-bottom: ${t.fileUploaderIconGapSmall};\n height: ${t.fileUploaderTileTypeIconHeightSmall};\n `;\n },\n\n fileTypeIconMedium(t: Theme) {\n return css`\n margin-bottom: ${t.fileUploaderIconGapMedium};\n height: ${t.fileUploaderTileTypeIconHeightMedium};\n `;\n },\n\n fileTypeIconLarge(t: Theme) {\n return css`\n margin-bottom: ${t.fileUploaderIconGapLarge};\n height: ${t.fileUploaderTileTypeIconHeightLarge};\n `;\n },\n\n disabledFileTypeIcon(t: Theme) {\n return css`\n box-shadow: none;\n background: ${t.fileUploaderDisabledBg};\n `;\n },\n\n sizeDisabled(t: Theme) {\n return css`\n color: ${t.fileUploaderDisabledIconColor};\n `;\n },\n\n errorFileTypeIcon(t: Theme) {\n return css`\n background: ${t.fileUploaderErrorBgColor};\n border: 1px solid ${t.fileUploaderErrorBgColor};\n `;\n },\n\n warningFileTypeIcon(t: Theme) {\n return css`\n background: ${t.fileUploaderWarningBgColor};\n border: 1px solid ${t.fileUploaderWarningBgColor};\n `;\n },\n\n iconColor(t: Theme) {\n return css`\n color: ${t.fileUploaderTileIconColor};\n &:hover {\n color: ${t.fileUploaderTileIconHoverColor};\n }\n `;\n },\n\n size(t: Theme) {\n return css`\n width: 100%;\n margin: ${t.fileUploaderIconGapSmall} 0 0;\n overflow: hidden;\n text-align: center;\n color: ${t.clearCrossIconColor};\n `;\n },\n\n name() {\n return css`\n flex: 1 1 100%;\n word-break: break-all;\n height: 100%;\n\n span {\n word-break: break-word;\n }\n `;\n },\n\n nameBlock() {\n return css`\n flex: 0;\n text-align: center;\n `;\n },\n\n contentSmall(t: Theme) {\n const maxHeight = `calc(${t.fileUploaderLineHeightSmall} * 2)`;\n return css`\n max-height: ${maxHeight};\n `;\n },\n\n contentMedium(t: Theme) {\n const maxHeight = `calc(${t.fileUploaderLineHeightMedium} * 2)`;\n return css`\n max-height: ${maxHeight};\n `;\n },\n\n contentLarge(t: Theme) {\n const maxHeight = `calc(${t.fileUploaderLineHeightLarge} * 2)`;\n return css`\n max-height: ${maxHeight};\n `;\n },\n\n disabled(t: Theme) {\n return css`\n cursor: default;\n color: ${t.fileUploaderDisabledIconColor};\n `;\n },\n };\n});\n\n// порядок вызова в cx(...): модификаторы после базовых\nfinalizeStaticStyles([\n 'validationTextWarning',\n 'validationTextError',\n 'disabledFileTypeIcon',\n 'warningFileTypeIcon',\n 'errorFileTypeIcon',\n 'sizeDisabled',\n]);\n"]}
|
|
@@ -29,13 +29,13 @@ import { isKeyEnter } from '../../lib/events/keyboard/identifiers.js';
|
|
|
29
29
|
import { useKeyListener } from '../../lib/events/keyListener.js';
|
|
30
30
|
import { forwardRefAndName } from '../../lib/forwardRefAndName.js';
|
|
31
31
|
import { LocaleContext } from '../../lib/locale/LocaleContext.js';
|
|
32
|
-
import { useGlobal, useStyles } from '../../lib/renderEnvironment/index.js';
|
|
32
|
+
import { useEmotion, useGlobal, useStyles } from '../../lib/renderEnvironment/index.js';
|
|
33
33
|
import { truncate } from '../../lib/stringUtils.js';
|
|
34
|
-
import {
|
|
34
|
+
import { ThemeContext } from '../../lib/theming/ThemeContext.js';
|
|
35
35
|
import { formatBytes } from '../../lib/utils.js';
|
|
36
36
|
import { Hint } from '../Hint/index.js';
|
|
37
37
|
import { Tooltip } from '../Tooltip/index.js';
|
|
38
|
-
import { getJsRowStyles, getJsStyles, getJsTileStyles } from './FileUploaderFile.
|
|
38
|
+
import { getJsRowStyles, getJsStyles, getJsTileStyles } from './FileUploaderFile.css.js';
|
|
39
39
|
import { FileUploaderFileStatusIcon } from './FileUploaderFileStatusIcon.js';
|
|
40
40
|
import { FileUploaderFileTypeIcon } from './FileUploaderFileTypeIcon.js';
|
|
41
41
|
import { FileUploaderFileStatus, getFileUploaderTypeIcon } from './fileUtils.js';
|
|
@@ -97,7 +97,9 @@ export var FileUploaderFile = forwardRefAndName('FileUploaderFile', function (pr
|
|
|
97
97
|
var textHelperRef = useRef(null);
|
|
98
98
|
var fileNameElementRef = useRef(null);
|
|
99
99
|
var langCode = useContext(LocaleContext).langCode;
|
|
100
|
+
var theme = useContext(ThemeContext);
|
|
100
101
|
var globalObject = useGlobal();
|
|
102
|
+
var cx = useEmotion().cx;
|
|
101
103
|
var keyListener = useKeyListener();
|
|
102
104
|
var jsStyles = useStyles(getJsStyles);
|
|
103
105
|
var jsRowStyles = useStyles(getJsRowStyles);
|
|
@@ -121,26 +123,26 @@ export var FileUploaderFile = forwardRefAndName('FileUploaderFile', function (pr
|
|
|
121
123
|
var isWarning = file.status === FileUploaderFileStatus.Warning || warning;
|
|
122
124
|
var isInvalid = isError || !isValid;
|
|
123
125
|
var sizeIconClass = useFileUploaderSize(size, {
|
|
124
|
-
small: jsViewStyles.iconSmall(),
|
|
125
|
-
medium: jsViewStyles.iconMedium(),
|
|
126
|
-
large: jsViewStyles.iconLarge(),
|
|
126
|
+
small: jsViewStyles.iconSmall(theme),
|
|
127
|
+
medium: jsViewStyles.iconMedium(theme),
|
|
128
|
+
large: jsViewStyles.iconLarge(theme),
|
|
127
129
|
});
|
|
128
130
|
var renderTooltipContent = useCallback(function () {
|
|
129
131
|
return !isValid && !error && message ? message : null;
|
|
130
132
|
}, [isValid, error, message]);
|
|
131
133
|
var sizeNameBlockClass = useFileUploaderSize(size, {
|
|
132
|
-
small: jsStyles.contentSmall(),
|
|
133
|
-
medium: jsStyles.contentMedium(),
|
|
134
|
-
large: jsStyles.contentLarge(),
|
|
134
|
+
small: jsStyles.contentSmall(theme),
|
|
135
|
+
medium: jsStyles.contentMedium(theme),
|
|
136
|
+
large: jsStyles.contentLarge(theme),
|
|
135
137
|
});
|
|
136
138
|
var sizeViewNameBlockClass = useFileUploaderSize(size, {
|
|
137
|
-
small: jsViewStyles.contentSmall(),
|
|
138
|
-
medium: jsViewStyles.contentMedium(),
|
|
139
|
-
large: jsViewStyles.contentLarge(),
|
|
139
|
+
small: jsViewStyles.contentSmall(theme),
|
|
140
|
+
medium: jsViewStyles.contentMedium(theme),
|
|
141
|
+
large: jsViewStyles.contentLarge(theme),
|
|
140
142
|
});
|
|
141
143
|
var validationTextClassName = cx((_a = {},
|
|
142
|
-
_a[jsStyles.validationTextWarning()] = isWarning,
|
|
143
|
-
_a[jsStyles.validationTextError()] = isError,
|
|
144
|
+
_a[jsStyles.validationTextWarning(theme)] = isWarning,
|
|
145
|
+
_a[jsStyles.validationTextError(theme)] = isError,
|
|
144
146
|
_a));
|
|
145
147
|
var contentClassNames = cx(jsStyles.content(), jsViewStyles.content());
|
|
146
148
|
var nameTextClassNames = cx(jsViewStyles.name(), isTileView && !disabled && validationTextClassName);
|
|
@@ -168,31 +170,31 @@ export var FileUploaderFile = forwardRefAndName('FileUploaderFile', function (pr
|
|
|
168
170
|
onRemove(id);
|
|
169
171
|
}
|
|
170
172
|
}, [onRemove, id]);
|
|
171
|
-
var iconClassNames = cx(jsStyles.icon(), (_b = {},
|
|
173
|
+
var iconClassNames = cx(jsStyles.icon(theme), (_b = {},
|
|
172
174
|
_b[sizeIconClass] = true,
|
|
173
|
-
_b[jsTileStyles.iconAction()] = isTileView,
|
|
175
|
+
_b[jsTileStyles.iconAction(theme)] = isTileView,
|
|
174
176
|
_b[jsTileStyles.iconActionShow()] = isTileView && !disabled && (hovered || hoveredFile || focused || focusedByTab),
|
|
175
177
|
_b));
|
|
176
178
|
var sizeClassName = useFileUploaderSize(size, {
|
|
177
|
-
small: jsStyles.sizeSmall(),
|
|
178
|
-
medium: jsStyles.sizeMedium(),
|
|
179
|
-
large: jsStyles.sizeLarge(),
|
|
179
|
+
small: jsStyles.sizeSmall(theme),
|
|
180
|
+
medium: jsStyles.sizeMedium(theme),
|
|
181
|
+
large: jsStyles.sizeLarge(theme),
|
|
180
182
|
});
|
|
181
|
-
var sizeClassNames = cx(jsStyles.size(), sizeClassName, jsViewStyles.size(), isTileView && (disabled || isLoading) && jsTileStyles.sizeDisabled());
|
|
183
|
+
var sizeClassNames = cx(jsStyles.size(theme), sizeClassName, jsViewStyles.size(theme), isTileView && (disabled || isLoading) && jsTileStyles.sizeDisabled(theme));
|
|
182
184
|
var sizeFileTypeIconClass = useFileUploaderSize(size, {
|
|
183
|
-
small: jsViewStyles.fileTypeIconSmall(),
|
|
184
|
-
medium: jsViewStyles.fileTypeIconMedium(),
|
|
185
|
-
large: jsViewStyles.fileTypeIconLarge(),
|
|
185
|
+
small: jsViewStyles.fileTypeIconSmall(theme),
|
|
186
|
+
medium: jsViewStyles.fileTypeIconMedium(theme),
|
|
187
|
+
large: jsViewStyles.fileTypeIconLarge(theme),
|
|
186
188
|
});
|
|
187
189
|
var isTruncated = truncatedFileName !== name;
|
|
188
|
-
var fileTypeIconClassName = cx(sizeFileTypeIconClass, disabled && jsStyles.disabledFileTypeIconSvg(), isTileView && (_c = {},
|
|
189
|
-
_c[jsTileStyles.fileTypeIcon()] = true,
|
|
190
|
+
var fileTypeIconClassName = cx(sizeFileTypeIconClass, disabled && jsStyles.disabledFileTypeIconSvg(theme), isTileView && (_c = {},
|
|
191
|
+
_c[jsTileStyles.fileTypeIcon(theme)] = true,
|
|
190
192
|
_c[jsTileStyles.fileTypeIconPreview()] = !!previewImg,
|
|
191
|
-
_c[jsTileStyles.disabledFileTypeIcon()] = disabled,
|
|
192
|
-
_c[jsTileStyles.warningFileTypeIcon()] = isWarning,
|
|
193
|
-
_c[jsTileStyles.errorFileTypeIcon()] = isError,
|
|
193
|
+
_c[jsTileStyles.disabledFileTypeIcon(theme)] = disabled,
|
|
194
|
+
_c[jsTileStyles.warningFileTypeIcon(theme)] = isWarning,
|
|
195
|
+
_c[jsTileStyles.errorFileTypeIcon(theme)] = isError,
|
|
194
196
|
_c), multiple && jsStyles.fileTypeIconMultiple());
|
|
195
|
-
var nameBlockClassNames = cx(sizeNameBlockClass, sizeViewNameBlockClass, jsStyles.nameBlock(), (disabled || isLoading) && jsViewStyles.disabled(), jsViewStyles.nameBlock());
|
|
197
|
+
var nameBlockClassNames = cx(sizeNameBlockClass, sizeViewNameBlockClass, jsStyles.nameBlock(), (disabled || isLoading) && jsViewStyles.disabled(theme), jsViewStyles.nameBlock());
|
|
196
198
|
var fileType = getFileUploaderTypeIcon(file.originalFile, isError, isWarning && !!withWarningIcon);
|
|
197
199
|
var icon = isTileView && isLoading ? (React.createElement(LoadingIcon, { size: size })) : ((fileTypeIcon !== null && fileTypeIcon !== void 0 ? fileTypeIcon : React.createElement(FileUploaderFileTypeIcon, { type: fileType, size: size, view: view })));
|
|
198
200
|
var splitTruncatedFileName = truncatedFileName && splitFileNameAndExtension(truncatedFileName);
|